/* ============================================================
   LOGIN MODERNO - PANEL DIVIDIDO v5.4
   - Transiciones suaves login/registro
   - Módulo de recuperación de contraseña inline
   ============================================================ */

/* =============================
   VIDEO DE FONDO
   ============================= */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 50%, #f5f3ff 100%);
    padding: 20px;
    overflow-x: hidden;
}

/* ============================================
   CONTENEDOR PRINCIPAL - PANEL DIVIDIDO
   ============================================ */
.container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 80px -20px rgba(37, 99, 235, 0.12),
        0 10px 30px -10px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

/* ============================================
   PANEL IZQUIERDO - FORMULARIO
   ============================================ */
.left-panel {
    flex: 1;
    background: #ffffff;
    padding: 38px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-width: 420px;
    overflow: hidden;
}

/* Ocultar hero-content del panel izquierdo (se mueve al derecho) */
.left-panel .hero-content {
    display: none;
}

/* Ocultar logo CANTV del panel izquierdo */
.left-panel .logo-cantv-3d-wrapper,
.left-panel .logo-cantv-sidebar {
    display: none;
}

/* ============================================
   PANEL DERECHO - BIENVENIDA / BRANDING
   ============================================ */
.right-panel {
    flex: 1;
    background: linear-gradient(180deg, #0f172a 0%, #3730a3 50%, #1e1b4b 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    overflow: hidden;
    min-width: 380px;
}

/* Formas orgánicas / blobs */
.right-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.right-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

/* Blob adicional */
.right-panel .blob-3 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    top: 40%;
    left: 20%;
    animation: morph 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes morph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    75% { border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%; }
}

/* Logo S-CORE en panel derecho - BLANCO y sin cuadrado */
.right-panel .logo {
    position: absolute;
    top: 32px;
    left: 48px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.right-panel .logo:hover {
    transform: translateY(-1px);
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0.9;
}

/* Contenido del panel derecho */
.right-panel .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 340px;
    animation: fadeInUp 0.8s ease-out;
}

.right-panel .hero-content h1 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.right-panel .hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 400;
}

/* Botón de cambio de vista en panel derecho */
.right-panel .btn-switch {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(3, 3, 3, 0.3);
    color: #ffffff;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 8px;
}

.right-panel .btn-switch:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.right-panel .btn-switch:active {
    transform: translateY(0);
}

/* Logo CANTV en panel derecho (abajo) */
.right-panel .logo-cantv-3d-wrapper,
.right-panel .logo-cantv-sidebar {
    position: absolute;
    bottom: 32px;
    right: 32px;
    z-index: 2;
    opacity: 0.6;
    transform: scale(0.7);
}

/* ============================================
   FORMULARIOS - TRANSICIONES SUAVES
   ============================================ */
.forms-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-height: 420px;
}

.form-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px) scale(0.96);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.form-section.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    position: relative;
}

.form-section.exit-left {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-40px) scale(0.96);
    pointer-events: none;
}

.form-section.exit-right {
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px) scale(0.96);
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-title {
    font-size: 26px;
    font-weight: 700;
    color: #020303;
    margin-bottom: 4px;
    text-align: center;
}

.form-subtitle {
    font-size: 14px;
    color: #050505;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 400;
}

/* ============================================
   FIELDSETS E INPUTS - ESTILO LIMPIO
   ============================================ */
fieldset {
    border: 1.5px solid #e5e7eb;
    margin: 0;
    padding: 0;
    min-width: 0;
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    min-height: 52px;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

fieldset:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

fieldset:focus-within {
    border-color: #11337e;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Input base */
fieldset input {
    background: transparent;
    color: #21578d;
    outline: none;
    width: 100%;
    border: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    padding: 14px 14px 14px 48px;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Placeholder visible y estilizado */
fieldset input::placeholder {
    color: #000000;
    opacity: 1;
    font-weight: 400;
    font-size: 13px;
}

/* Labels flotantes - FONDO BLANCO para que se lean */
fieldset label {
    color: #6b7280;
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    font-size: 14px;
    line-height: 1;
    transform-origin: left top;
    z-index: 10;
    background: #ffffff;
    padding: 0 6px;
    font-weight: 400;
    opacity: 0;
    white-space: nowrap;
}

/* Label visible cuando hay contenido - CON FONDO */
fieldset input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%) scale(0.8);
    color: #2563eb;
    font-weight: 600;
    left: 42px;
    opacity: 1;
    box-shadow: 0 0 0 2px #ffffff;
}

/* Iconos dentro de inputs - a la izquierda */
fieldset i:not(.password-toggle i):not(.lock-icon) {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #080808;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 2;
    margin: 0;
    transition: color 0.3s ease;
}

fieldset:focus-within i:not(.password-toggle i):not(.lock-icon) {
    color: #2563eb;
}

fieldset input:not(:placeholder-shown) ~ i:not(.password-toggle i):not(.lock-icon) {
    color: #2563eb;
}

/* Password fieldset específico */
fieldset.password-fieldset input {
    padding-right: 5.5rem;
    padding-left: 48px;
}

fieldset.password-fieldset label {
    left: 48px;
}

fieldset.password-fieldset input:not(:placeholder-shown) ~ label {
    left: 42px;
}

/* Toggle password */
.password-toggle {
    position: absolute;
    right: 2.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #9ca3af;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 20;
    pointer-events: auto;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
}

.password-toggle:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.password-toggle.active {
    color: #2563eb;
}

.lock-icon {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 10;
    transition: all 0.3s ease;
    margin: 0;
}

fieldset.password-fieldset input:focus ~ .lock-icon {
    color: #2563eb;
}

fieldset.password-fieldset input:not(:placeholder-shown) ~ .lock-icon {
    color: #2563eb;
}

/* Fix navegadores */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none;
}

input[type="password"]::-webkit-textfield-decoration-container {
    display: none;
}

/* ============================================
   OPCIONES ADICIONALES
   ============================================ */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 8px;
    padding: 0 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}

.checkbox-group label {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.checkbox-group a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.forgot-link:hover::after {
    width: 100%;
}

.forgot-link:hover {
    color: #1d4ed8;
}

/* ============================================
   BOTÓN PRINCIPAL - COLORES AZUL/PÚRPURA
   ============================================ */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled::before {
    display: none;
}

/* ============================================
   FOOTER DEL FORMULARIO
   ============================================ */
.footer-text {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-top: 20px;
    font-weight: 500;
}

.link-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-family: inherit;
    transition: all 0.2s ease;
    position: relative;
}

.link-btn:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.link-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.link-btn:hover::after {
    width: 100%;
}

/* ============================================
   MÓDULO RECUPERAR CONTRASEÑA - INLINE
   ============================================ */
.recovery-module {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 420px; /* <-- Límite para que no crezca más que el login */
    background: #ffffff;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px; /* <-- Reducido de 18px */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.97);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    padding: 0 4px;
    overflow-y: auto; /* <-- Scroll si el contenido excede */
}

.recovery-module.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    position: relative;
}

.recovery-module .recovery-header {
    text-align: center;
    margin-bottom: 4px; /* <-- Reducido de 8px */
    flex-shrink: 0;
}

.recovery-module .recovery-header .recovery-icon {
    width: 48px; /* <-- Reducido de 64px */
    height: 48px; /* <-- Reducido de 64px */
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px; /* <-- Reducido de 16px */
    border: 2px solid #e0e7ff;
}

.recovery-module .recovery-header .recovery-icon i {
    font-size: 1.4rem; /* <-- Reducido de 1.8rem */
    color: #2563eb;
    margin: 0;
}

.recovery-module .recovery-header h3 {
    font-size: 20px; /* <-- Reducido de 22px */
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px; /* <-- Reducido de 6px */
}

.recovery-module .recovery-header p {
    font-size: 12px; /* <-- Reducido de 13px */
    color: #6b7280;
    line-height: 1.4;
}
.recovery-step {
    display: none;
    flex-direction: column;
    gap: 12px; /* <-- Reducido de 16px */
    animation: fadeIn 0.4s ease;
    flex: 1;
    justify-content: flex-start;
}

.recovery-step.active {
    display: flex;
}

.recovery-step .step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0; /* <-- Eliminado margen extra */
    flex-shrink: 0;
}

.recovery-step .step-indicator .step-dot {
    width: 8px; /* <-- Reducido de 10px */
    height: 8px; /* <-- Reducido de 10px */
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.recovery-step .step-indicator .step-dot.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); /* <-- Reducido */
}

.recovery-step .step-indicator .step-dot.completed {
    background: #10b981;
}

.recovery-step .step-label {
    text-align: center;
    font-size: 11px; /* <-- Reducido de 12px */
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px; /* <-- Añadido para compactar */
    flex-shrink: 0;
}

.recovery-questions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recovery-question-item {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.3s ease;
}

.recovery-question-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.recovery-question-item:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.recovery-question-item .question-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.recovery-question-item .question-text i {
    color: #2563eb;
    font-size: 1rem;
    margin: 0;
}

.recovery-question-item input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1f2937;
    outline: none;
    padding: 4px 0;
    font-family: inherit;
}

.recovery-question-item input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.recovery-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.recovery-actions .btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.recovery-actions .btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.recovery-actions .btn-secondary i {
    font-size: 1.1rem;
    margin: 0;
}

.recovery-success {
    text-align: center;
    padding: 20px 10px;
}

.recovery-success .success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.recovery-success .success-icon i {
    font-size: 2.2rem;
    color: #059669;
    margin: 0;
}

.recovery-success h4 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.recovery-success p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.new-password-display {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 2px dashed #93c5fd;
    border-radius: 16px;
    padding: 20px;
    margin: 0 0 20px;
    position: relative;
}

.new-password-display .password-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.new-password-display .password-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: 0.2rem;
    font-family: 'Courier New', monospace;
    display: block;
    margin-bottom: 12px;
    word-break: break-all;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* ============================================
   MODAL 2FA - COLORES AZUL/PÚRPURA
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border-radius: 28px;
    padding: 2.5rem;
    max-width: 440px;
    width: 90%;
    box-shadow: 
        0 25px 60px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.85) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.modal-header {
    margin-bottom: 2rem;
}

.icon-shield {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
    animation: pulse-shield 2.5s infinite;
}

@keyframes pulse-shield {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35); }
    50% { transform: scale(1.08); box-shadow: 0 15px 40px rgba(37, 99, 235, 0.5); }
}

.icon-shield i {
    font-size: 2.5rem;
    color: white;
    margin: 0;
}

.modal-header h3 {
    font-size: 1.6rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.modal-header p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

.codigo-display {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 1.5rem 0;
    position: relative;
    border: 2px dashed #93c5fd;
    transition: all 0.3s ease;
}

.codigo-display:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
}

#codigo-numero {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: 0.6rem;
    font-family: 'Courier New', monospace;
    display: block;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-copiar {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #4b5563;
    padding: 0.6rem 1.2rem;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: inherit;
}

.btn-copiar:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    transform: scale(1.05);
}

.btn-copiar i {
    font-size: 1.1rem;
    margin: 0;
}

.modal-footer {
    margin-top: 1.5rem;
}

.expira-texto {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.expira-texto span {
    color: #dc2626;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.05rem;
}

.btn-entendido {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    width: 100%;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.btn-entendido:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* ============================================================
   6. NOTIFICACIONES — S-CORE Panel Dividido
   ============================================================ */
.score-notif {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 340px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(48px) scale(0.95);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.score-notif.show { opacity: 1; transform: translateX(0) scale(1); }
.score-notif.success { box-shadow: 0 8px 32px rgba(5, 150, 105, 0.22),  0 2px 8px rgba(0,0,0,0.08); }
.score-notif.error   { box-shadow: 0 8px 32px rgba(220, 38, 38, 0.22),  0 2px 8px rgba(0,0,0,0.08); }
.score-notif.warning { box-shadow: 0 8px 32px rgba(217, 119, 6, 0.22),  0 2px 8px rgba(0,0,0,0.08); }
.score-notif.info    { box-shadow: 0 8px 32px rgba(124, 58, 237, 0.22), 0 2px 8px rgba(0,0,0,0.08); }

.score-notif-panel {
    width: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}
.score-notif-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}
.score-notif.success .score-notif-panel { background: linear-gradient(160deg, #059669 0%, #0d9488 100%); }
.score-notif.error   .score-notif-panel { background: linear-gradient(160deg, #dc2626 0%, #9333ea 100%); }
.score-notif.warning .score-notif-panel { background: linear-gradient(160deg, #d97706 0%, #ea580c 100%); }
.score-notif.info    .score-notif-panel { background: linear-gradient(160deg, #7c3aed 0%, #2563eb 100%); }

.score-notif-body {
    flex: 1;
    padding: 12px 14px 10px 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.score-notif-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.score-notif-pill {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 99px;
    line-height: 1.6;
}
.score-notif.success .score-notif-pill { background: #ecfdf5; color: #065f46; }
.score-notif.error   .score-notif-pill { background: #fef2f2; color: #991b1b; }
.score-notif.warning .score-notif-pill { background: #fffbeb; color: #92400e; }
.score-notif.info    .score-notif-pill { background: #f5f3ff; color: #4c1d95; }
.score-notif-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    flex: 1;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.score-notif-track { height: 3px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.score-notif-bar { height: 100%; border-radius: 99px; animation: scoreNotifProgress 5s linear forwards; }
.score-notif.success .score-notif-bar { background: #34d399; box-shadow: 0 0 6px rgba(5, 150, 105, 0.5); }
.score-notif.error   .score-notif-bar { background: #f87171; box-shadow: 0 0 6px rgba(220, 38, 38, 0.5); }
.score-notif.warning .score-notif-bar { background: #fbbf24; box-shadow: 0 0 6px rgba(217, 119, 6, 0.5); }
.score-notif.info    .score-notif-bar { background: #a78bfa; box-shadow: 0 0 6px rgba(124, 58, 237, 0.5); }
@keyframes scoreNotifProgress { from { width: 100%; } to { width: 0%; } }
.score-notif-close {
    background: none; border: none; cursor: pointer; color: #cbd5e1;
    font-size: 18px; line-height: 1; padding: 0;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; flex-shrink: 0; transition: color 0.15s ease; margin: 0;
}
.score-notif-close:hover { color: #475569; }
.notificacion-core, .notificacion-ali, .notificacion-tron, .notificacion-ultima-milla { }


/* ============================================
   UTILIDADES
   ============================================ */
.hidden {
    display: none !important;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

/* ============================================================
   RECUPERAR CONTRASEÑA - SELECT V6
   Fuerza bruta para sobrescribir cualquier conflicto
   ============================================================ */

/* Contenedor principal */
.recovery-step .select-group {
    margin-bottom: 10px !important; /* <-- Era 16px */
    width: 100% !important;
    display: block !important;
}

/* Label del select */
.recovery-step .select-group-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2563eb !important;
    margin-bottom: 8px !important;
    padding-left: 4px !important;
    font-family: 'Inter', sans-serif !important;
}

.recovery-step .select-group-label i {
    font-size: 18px !important;
    color: #2563eb !important;
}

/* Wrapper que dibuja el borde */
.recovery-step .select-wrapper {
    position: relative !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    height: 52px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.recovery-step .select-wrapper:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.recovery-step .select-wrapper:focus-within {
    border-color: #11337e !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* EL SELECT - reset total */
.recovery-step .select-wrapper select,
.recovery-step .select-wrapper select#recovery-pregunta,
#recovery-step-2 .select-wrapper select,
#recovery-pregunta {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
    
    width: 100% !important;
    height: 100% !important;
    min-height: 52px !important;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 44px 0 16px !important;
    
    color: #1f2937 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 52px !important;
    cursor: pointer !important;
    
    box-shadow: none !important;
    border-radius: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Flecha custom */
.recovery-step .select-wrapper::after {
    content: '' !important;
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    width: 10px !important;
    height: 10px !important;
    border-right: 2.5px solid #6b7280 !important;
    border-bottom: 2.5px solid #6b7280 !important;
    transform: translateY(-70%) rotate(45deg) !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    display: block !important;
}

.recovery-step .select-wrapper:focus-within::after {
    border-color: #2563eb !important;
    transform: translateY(-30%) rotate(-135deg) !important;
}

/* Placeholder gris */
.recovery-step .select-wrapper select:required:invalid {
    color: #9ca3af !important;
}

.recovery-step .select-wrapper select option {
    color: #1f2937 !important;
    background: #ffffff !important;
    padding: 12px !important;
    font-size: 14px !important;
}

/* Ocultar opción placeholder en dropdown */
.recovery-step .select-wrapper select option[value=""][disabled] {
    display: none !important;
}

/* ============================================================
   RESPUESTA - Asegurar que también se vea bien
   ============================================================ */

#recovery-step-2 fieldset {
    position: relative !important;
    margin-bottom: 10px !important; /* <-- Era 16px */
    border: none !important;
    padding: 0 !important;
    display: block !important;
}

#recovery-step-2 fieldset input#recovery-respuesta {
    width: 100% !important;
    height: 52px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 0 16px 0 48px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #1f2937 !important;
    background: #ffffff !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    display: block !important;
    margin: 0 !important;
}

#recovery-step-2 fieldset input#recovery-respuesta:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

#recovery-step-2 fieldset input#recovery-respuesta:focus {
    border-color: #11337e !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    transform: translateY(-1px) !important;
}

#recovery-step-2 fieldset input#recovery-respuesta::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Icono de la respuesta */
#recovery-step-2 fieldset > i.bx-key {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #080808 !important;
    font-size: 20px !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

#recovery-step-2 fieldset:focus-within > i.bx-key {
    color: #2563eb !important;
}

/* Label flotante para respuesta */
#recovery-step-2 fieldset > label {
    position: absolute !important;
    left: 48px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    background: #ffffff !important;
    padding: 0 6px !important;
    pointer-events: none !important;
    transition: all 0.25s ease !important;
    z-index: 10 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Label flotante activo */
#recovery-step-2 fieldset:focus-within > label,
#recovery-step-2 fieldset:has(input:not(:placeholder-shown)) > label,
#recovery-step-2 fieldset:has(input:focus) > label {
    top: 0 !important;
    left: 42px !important;
    transform: translateY(-50%) scale(0.8) !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    box-shadow: 0 0 0 2px #ffffff !important;
}

/* ============================================================
   ELIMINAR CONFLICTOS VIEJOS
   ============================================================ */

/* Desactivar completamente los estilos viejos del fieldset */
fieldset.select-fieldset,
fieldset.recovery-select-field,
.select-fieldset,
.recovery-select-field {
    all: initial !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 16px !important;
}

/* Resetear select viejos */
select#recovery-pregunta::-ms-expand,
.select-fieldset select::-ms-expand,
.recovery-select-field select::-ms-expand {
    display: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
    }

    .left-panel {
        min-width: auto;
        padding: 40px 32px;
        order: 2;
    }

    .right-panel {
        min-width: auto;
        min-height: 220px;
        padding: 32px 24px;
        order: 1;
        border-radius: 24px 24px 0 0;
    }

    .right-panel .logo {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 16px;
        justify-content: center;
    }

    .right-panel .hero-content h1 {
        font-size: 26px;
    }

    .right-panel .hero-content p {
        font-size: 14px;
    }

    .forms-wrapper {
        max-width: 100%;
        min-height: 380px;
    }

    .form-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        background: #ffffff;
    }

    .container {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
        box-shadow: none;
    }

    .left-panel {
        padding: 24px 20px 40px;
    }

    .right-panel {
        min-height: 180px;
        padding: 24px 20px;
        border-radius: 0;
    }

    .right-panel .hero-content h1 {
        font-size: 22px;
    }

    fieldset {
        min-height: 50px;
    }

    fieldset input {
        padding: 14px 14px 14px 44px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 15px;
    }

    .modal-content {
        padding: 2rem 1.25rem;
        margin: 1rem;
    }

    #codigo-numero {
        font-size: 2.4rem;
        letter-spacing: 0.3rem;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 24px);
        margin: 0 12px;
    }

    .toast-container {
        right: 0;
        left: 0;
        align-items: center;
    }

    .toast-aviso {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: 0;
        max-width: none;
    }

    fieldset.password-fieldset input {
        padding-right: 4.8rem;
    }

    .lock-icon {
        right: 0.4rem;
        font-size: 1.1rem;
    }

    .password-toggle {
        right: 2.4rem;
        font-size: 1.1rem;
    }

    .recovery-module .recovery-header .recovery-icon {
        width: 56px;
        height: 56px;
    }

    .recovery-module .recovery-header h3 {
        font-size: 20px;
    }

    .new-password-display .password-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 380px) {
    .right-panel {
        min-height: 160px;
        padding: 20px 16px;
    }

    .right-panel .hero-content h1 {
        font-size: 20px;
    }

    .left-panel {
        padding: 20px 16px 32px;
    }

    .form-title {
        font-size: 22px;
    }
}