/* client/auth/login.php · bloque 1 · movido fuera del HTML el 2026-09-24 (punto 4: style-src sin 'unsafe-inline') */
        :root {
            --gold-primary: #C9A227;
            --gold-light: #E8D5A3;
            --gold-dark: #9C8462;   /* LA COLA 466 (contraste MEDIDO, WCAG 2.1): la letra oscura del botón, 4,4:1 en este extremo; ahora 5,6:1) */
            --dark-primary: #0A0A0A;
            --dark-secondary: #141414;
            --dark-tertiary: #1A1A1A;
            --error-color: #EF4444;
            --success-color: #10B981;
            --warning-color: #F59E0B;
            --font-display: 'Playfair Display', serif;
            --font-body: 'Montserrat', sans-serif;
            --safe-area-top: env(safe-area-inset-top, 0px);
            --safe-area-bottom: env(safe-area-inset-bottom, 0px);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: var(--font-body);
            background: var(--dark-primary);
            color: #FFFFFF;
            line-height: 1.6;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        .login-container {
            min-height: 100vh;
            display: flex;
            position: relative;
        }

        /* === LEFT VISUAL === */
        .login-visual {
            flex: 1;
            background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, rgba(10, 10, 10, 0.85) 100%),
                url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23C9A227" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 4rem;
            position: relative;
            overflow: hidden;
        }

        .login-visual::before {
            content: '';
            position: absolute;
            top: -50%; left: -50%;
            width: 200%; height: 200%;
            background: radial-gradient(circle at center, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
            animation: pulse 8s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.3; }
        }

        .login-visual-content { position: relative; z-index: 1; text-align: center; }

        .login-logo {
            font-family: var(--font-display);
            font-size: 3.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 1.5rem;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .login-tagline {
            font-size: 1.5rem;
            color: var(--gold-light);
            font-weight: 300;
            margin-bottom: 3rem;
            letter-spacing: 1px;
        }

        .login-features {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            max-width: 400px;
        }

        .login-feature {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: rgba(201, 162, 39, 0.05);
            border-radius: 12px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(201, 162, 39, 0.1);
        }

        .login-feature i { font-size: 1.5rem; color: var(--gold-primary); min-width: 30px; }
        .login-feature span { font-size: 1rem; color: rgba(255, 255, 255, 0.9); }

        /* === RIGHT FORM === */
        .login-form-section {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem;
            background: var(--dark-secondary);
            position: relative;
        }

        .login-form-container {
            width: 100%;
            max-width: 480px;
            padding: 3rem;
            background: rgba(26, 26, 26, 0.8);
            border-radius: 20px;
            border: 1px solid rgba(201, 162, 39, 0.2);
            backdrop-filter: blur(20px);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(201, 162, 39, 0.1);
        }

        /* === LANGUAGE SELECTOR === */
        .lang-selector-wrapper {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            z-index: 100;
        }

        .lang-selector {
            position: relative;
        }

        .lang-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1rem;
            background: rgba(201, 162, 39, 0.1);
            border: 1px solid rgba(201, 162, 39, 0.3);
            border-radius: 25px;
            color: var(--gold-primary);
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lang-btn:hover { background: rgba(201, 162, 39, 0.2); }

        .lang-code { font-weight: 500; }
        .lang-arrow { font-size: 0.7rem; transition: transform 0.3s; }

        .lang-dropdown {
            position: absolute;
            top: calc(100% + 0.5rem);
            right: 0;
            min-width: 160px;
            background: var(--dark-tertiary);
            border: 1px solid rgba(201, 162, 39, 0.2);
            border-radius: 12px;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .lang-selector:hover .lang-dropdown,
        .lang-selector.active .lang-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .lang-selector:hover .lang-arrow { transform: rotate(180deg); }

        .lang-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            color: rgba(255,255,255,0.8);
            text-decoration: none;
            transition: all 0.2s;
        }

        .lang-option:hover { background: rgba(201, 162, 39, 0.15); color: #fff; }
        .lang-option.active { background: rgba(201, 162, 39, 0.2); color: var(--gold-primary); }
        .lang-option .lang-name { font-size: 0.9rem; }

        /* === FORM HEADER === */
        .login-form-header { text-align: center; margin-bottom: 2.5rem; }

        .login-form-title {
            font-family: var(--font-display);
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
        }

        .login-form-subtitle { font-size: 1rem; color: rgba(255, 255, 255, 0.7); }

        /* === ALERTS === */
        .alert {
            padding: 1rem 1.25rem;
            border-radius: 12px;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.95rem;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .alert i { font-size: 1.25rem; }
        .alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #FCA5A5; }
        .alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: #6EE7B7; }

        /* === FORM ELEMENTS === */
        .form-group { margin-bottom: 1.5rem; }

        .form-label {
            display: block;
            font-size: 0.95rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 0.5rem;
        }

        .form-label .required { color: var(--error-color); margin-left: 0.25rem; }

        .input-group { position: relative; }

        .input-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gold-primary);
            font-size: 1.1rem;
            z-index: 1;
        }

        .form-input {
            width: 100%;
            padding: 1rem 1rem 1rem 3rem;
            background: rgba(20, 20, 20, 0.6);
            border: 2px solid rgba(201, 162, 39, 0.2);
            border-radius: 12px;
            color: #FFFFFF;
            font-size: 1rem;
            font-family: var(--font-body);
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--gold-primary);
            background: rgba(20, 20, 20, 0.8);
            box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
        }

        .form-input::placeholder { color: rgba(255, 255, 255, 0.6);   /* LA COLA 528 (2026-10-16, contraste MEDIDO): al 40 %, ~3,6:1 */ }
        .form-input:disabled { opacity: 0.5; cursor: not-allowed; }

        .toggle-password {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            padding: 0.5rem;
            transition: color 0.2s ease;
        }

        .toggle-password:hover { color: var(--gold-primary); }

        /* === CHECKBOX === */
        .form-checkbox-group {
            display: flex;
            align-items: center;
            min-height: 44px;   /* LA COLA 24: la etiqueta entera (casilla y texto) es la zona táctil */
            cursor: pointer;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }

        .form-checkbox { position: relative; width: 20px; height: 20px; cursor: pointer; }

        .form-checkbox input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            width: 100%;
            height: 100%;
        }

        .checkbox-custom {
            position: absolute;
            top: 0; left: 0;
            width: 20px; height: 20px;
            background: rgba(20, 20, 20, 0.6);
            border: 2px solid rgba(201, 162, 39, 0.3);
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .form-checkbox input[type="checkbox"]:checked ~ .checkbox-custom {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
        }

        .checkbox-custom::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0);
            color: var(--dark-primary);
            font-size: 0.7rem;
            transition: transform 0.2s ease;
        }

        .form-checkbox input[type="checkbox"]:checked ~ .checkbox-custom::after {
            transform: translate(-50%, -50%) scale(1);
        }

        .checkbox-label { font-size: 0.95rem; color: rgba(255, 255, 255, 0.8); user-select: none; }

        /* === SUBMIT BUTTON === */
        .btn-submit {
            width: 100%;
            padding: 1.1rem 2rem;
            background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
            border: none;
            border-radius: 12px;
            color: var(--dark-primary);
            font-size: 1.1rem;
            font-weight: 600;
            font-family: var(--font-body);
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
        }

        .btn-submit::before {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s ease;
        }

        .btn-submit:hover::before { left: 100%; }
        .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201, 162, 39, 0.4); }
        .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
        .btn-submit i { margin-right: 0.5rem; }
        .btn-submit.loading { pointer-events: none; }
        .btn-submit.loading i { animation: spin 1s linear infinite; }

        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        /* === FORM FOOTER === */
        .form-footer { margin-top: 2rem; text-align: center; }

        .form-link {
            color: var(--gold-primary);
            text-decoration: none;
            font-size: 0.95rem;
            transition: color 0.2s ease;
        }

        .form-link:hover { color: var(--gold-light); text-decoration: underline; }

        .form-divider {
            display: flex;
            align-items: center;
            margin: 2rem 0;
            color: rgba(255, 255, 255, 0.6);   /* LA COLA 466: el «o» entre las dos formas de entrar, al 40 %, 3,8:1 */
            font-size: 0.9rem;
        }

        .form-divider::before, .form-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: rgba(201, 162, 39, 0.2);
        }

        .form-divider span { padding: 0 1rem; }

        .register-prompt { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }

        /* === RECAPTCHA === */
        .grecaptcha-badge { visibility: hidden !important; }

        .recaptcha-notice {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);   /* LA COLA 466 (contraste MEDIDO, WCAG 2.1): al 40 %, 3,8:1) */
            text-align: center;
            margin-top: 1rem;
        }

        .recaptcha-notice a { color: rgba(255, 255, 255, 0.75); }

        /* === RESPONSIVE === */
        @media (max-width: 992px) {
            .login-visual { display: none; }
            .login-form-section { flex: 1; }
        }

        @media (max-width: 576px) {
            .login-form-container { padding: 2rem 1.5rem; border-radius: 16px; }
            .login-form-title { font-size: 2rem; }
            .btn-submit { padding: 1rem; font-size: 1rem; }
            .lang-selector-wrapper { top: 1rem; right: 1rem; }
        }

        @supports (padding: max(0px)) {
            .login-form-section {
                padding-top: max(2rem, var(--safe-area-top));
                padding-bottom: max(2rem, var(--safe-area-bottom));
            }
        }
    

/* 2026-10-27 (medido con tools/pruebas/barrido_movil.mjs en WebKit y Chrome a 390 px): el formulario usaba el 71 % del ancho del teléfono
   (rellenos de escritorio uno dentro de otro: 64 px la sección y 50 el contenedor). En el teléfono, los rellenos justos: ~88 %. */
@media (max-width: 480px) {
    .login-form-section { padding-left: 8px; padding-right: 8px; }
    .login-form-container { padding: 1.25rem 0.9rem; }
}
