        :root {
            --primary: #0F4C81;
            --primary-hover: #0B3A63;
            --accent: #E53935;
            --bg-body: #F1F5F9;
            --card-bg: #FFFFFF;
            --text-main: #0F172A;
            --text-muted: #64748B;
            --border-color: #CBD5E1;
            --focus-ring: rgba(15, 76, 129, 0.2);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        }

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            min-height: 100vh;
            min-height: 100dvh; /* Soporte din?mico para navegadores m?viles */
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }

        /* CARD CONTENEDOR PRINCIPAL RESPONSIVO */
        .login-container {
            display: flex;
            flex-direction: row;
            width: 100%;
            max-width: 1020px;
            min-height: 600px;
            background: var(--card-bg);
            border-radius: 16px;
            box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
            overflow: hidden;
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* LADO IZQUIERDO: VISUAL INSTITUCIONAL */
        .brand-section {
            flex: 1.1;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: clamp(24px, 4vw, 45px);
            color: #FFFFFF;
            overflow: hidden;
        }

        /* Fondo Blur */
        .brand-bg-blur {
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            background-size: cover;
            background-position: center;
            filter: blur(8px) brightness(0.65);
            transform: scale(1.05);
            z-index: 1;
        }

        .brand-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(15, 76, 129, 0.88) 0%, rgba(15, 23, 42, 0.92) 100%);
            z-index: 2;
        }

        .brand-header, .brand-body, .brand-footer {
            position: relative;
            z-index: 3;
        }

        .brand-logo-img {
            max-height: 122px;
            width: auto;
            max-width: 100%;
            object-fit: contain;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }

        .brand-body h1 {
            font-size: clamp(22px, 3vw, 32px);
            font-weight: 700;
            line-height: 1.25;
            margin-bottom: 12px;
            letter-spacing: -0.5px;
        }

        .brand-body p {
            font-size: clamp(13px, 1.5vw, 15px);
            color: #E2E8F0;
            line-height: 1.5;
            max-width: 400px;
        }

        .brand-footer {
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            padding-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .goverment-badge {
            font-size: 13px;
            font-weight: 600;
            color: #F8FAFC;
        }

        .footer-copyright {
            font-size: 12px;
            color: #94A3B8;
        }

        /* LADO DERECHO: FORMULARIO */
        .form-section {
            flex: 0.9;
            padding: clamp(28px, 4vw, 45px);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background-color: var(--card-bg);
        }

        .form-title-group {
            margin-bottom: 24px;
        }

        .form-title-group h2 {
            font-size: clamp(22px, 2.5vw, 26px);
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 6px;
        }

        .form-title-group p {
            font-size: 14px;
            color: var(--text-muted);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 8px;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px;
            font-size: 15px; /* Evita auto-zoom molesto en iOS */
            border: 1.5px solid var(--border-color);
            border-radius: 8px;
            outline: none;
            transition: all 0.2s ease-in-out;
            background-color: #F8FAFC;
            color: var(--text-main);
            min-height: 46px;
        }

        .form-control:focus {
            background-color: #FFFFFF;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--focus-ring);
        }

        .form-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 24px;
            font-size: 13px;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            cursor: pointer;
            user-select: none;
        }

        .remember-me input {
            accent-color: var(--primary);
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .forgot-pass {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
        }

        .forgot-pass:hover {
            color: var(--primary-hover);
            text-decoration: underline;
        }

        .btn-primary {
            width: 100%;
            padding: 13px;
            font-size: 15px;
            font-weight: 600;
            color: #FFFFFF;
            background-color: var(--primary);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease;
            box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
            min-height: 48px;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

        .btn-primary:active {
            transform: scale(0.99);
        }

        /* PIE CON LOGO DE DESARROLLADOR */
        .form-footer-dev {
            margin-top: 24px;
            padding-top: 16px;
            border-top: 1px solid #E2E8F0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
        }

        .form-footer-dev span {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .dev-logo-right {
            height: 32px;
            width: auto;
            max-width: 180px;
            object-fit: contain;
        }

        /* MEDIA QUERIES PARA DISPOSITIVOS M?VILES Y TABLETS */

        /* Tablets y m?viles en orientaci?n horizontal */
        @media (max-width: 850px) {
            .login-container {
                flex-direction: column;
                max-width: 480px;
                min-height: auto;
            }

            .brand-section {
                padding: 30px 24px;
                justify-content: center;
                gap: 16px;
            }

            .brand-body h1 {
                font-size: 24px;
            }

            .brand-body p {
                font-size: 13px;
            }

            .brand-footer {
                display: none; /* Se oculta en m?vil para simplificar espacio vertical */
            }

            .form-section {
                padding: 32px 24px;
            }
        }

        /* Celulares peque?os (< 480px) */
        @media (max-width: 480px) {
            body {
                padding: 10px;
            }

            .login-container {
                border-radius: 12px;
                box-shadow: 0 10px 20px rgba(0,0,0,0.05);
            }

            .brand-section {
                padding: 24px 20px;
            }

            .brand-logo-img {
                max-height: 42px;
            }

            .form-section {
                padding: 24px 20px;
            }

            .form-actions {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .forgot-pass {
                align-self: flex-end;
            }
        }
