/* ============================================
   DISEÑO MODERNO LOGIN ASPIRANTES - UPV
   ============================================ */

:root {
    --primary-color: #640d64;
    --secondary-color: #7a1e7a;
    --primary-dark: #4a0d4a;
    --accent-color: #902990;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #e0e0e0;
    --border-focus: #640d64;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-overlay: rgba(100, 13, 100, 0.95);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   OPCIONES DE FONDO MODERNAS
   ============================================ */

/* OPCIÓN 1: Gradiente Morado Institucional (RECOMENDADA) */
.modern-login-body {
    background: linear-gradient(135deg, #640d64 0%, #7a1e7a 25%, #902990 50%, #4a0d4a 75%, #640d64 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.modern-login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* OPCIÓN 2: Patrón Geométrico Sutil (ALTERNATIVA 1) */
/*
.modern-login-body {
    background: linear-gradient(135deg, #640d64 0%, #4a0d4a 100%);
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px);
    min-height: 100vh;
}
*/

/* OPCIÓN 3: Formas Abstractas con Blur (ALTERNATIVA 2) */
/*
.modern-login-body {
    background: linear-gradient(135deg, #640d64 0%, #4a0d4a 100%);
    position: relative;
    overflow: hidden;
}

.modern-login-body::before,
.modern-login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.modern-login-body::before {
    width: 600px;
    height: 600px;
    background: #902990;
    top: -200px;
    right: -200px;
}

.modern-login-body::after {
    width: 500px;
    height: 500px;
    background: #4a0d4a;
    bottom: -150px;
    left: -150px;
}
*/

/* OPCIÓN 4: Imagen de Fondo con Overlay Morado (ALTERNATIVA 3) */
/*
.modern-login-body {
    background-image: url('../logos/aspirantes/backgroundLogin.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
}

.modern-login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 13, 100, 0.85) 0%, rgba(74, 13, 74, 0.85) 100%);
    pointer-events: none;
}
*/

/* ============================================
   TIPOGRAFÍA
   ============================================ */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============================================
   CONTENEDOR PRINCIPAL DESKTOP
   ============================================ */

.container.login_pc_bg {
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-container {
    background: var(--bg-white);
}

.sign-up-container {
    overflow-y: auto;
    overflow-x: hidden;
}

.sign-up-container form {
    padding: 2rem 2.5rem !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100% !important;
    display: flex !important;
}

.sign-up-container .form-header {
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}

.sign-up-container .button-input-group {
    flex-shrink: 0;
    width: 100%;
    margin-top: 0;
}

.form-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.form-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.input-wrapper {
    width: 100%;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

.sign-up-container .input-wrapper {
    max-height: none;
    overflow: visible;
}

.modern-input-group {
    position: relative;
    margin-bottom: 1.1rem;
}

.sign-up-container .modern-input-group {
    margin-bottom: 1rem;
    position: relative;
}

.sign-up-container .modern-input-group:last-of-type {
    margin-bottom: 0;
}

.sign-up-container .input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modern-input-group .input-icon,
.group.modern-input-group .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.15rem;
    z-index: 2;
    pointer-events: none;
    transition: var(--transition);
    width: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modern-input,
.modern-input-group .form-control,
.group.modern-input-group input,
.group.modern-input-group .form-control {
    width: 100%;
    height: 52px;
    padding: 0 1rem 0 4.25rem !important;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
    box-sizing: border-box;
}

.modern-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(100, 13, 100, 0.1);
    transform: translateY(-1px);
}

.modern-input:focus ~ .input-icon,
.modern-input-group:has(.modern-input:focus) .input-icon,
.modern-input-group:has(.modern-input:not(:placeholder-shown)) .input-icon {
    color: var(--primary-color);
}

.modern-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.modern-input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.email-input-hidden {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* ============================================
   BOTONES
   ============================================ */

.modern-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    letter-spacing: 0.3px;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

.modern-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.modern-btn i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.modern-btn:hover i {
    transform: translateX(4px);
}

/* ============================================
   OVERLAY DE BIENVENIDA
   ============================================ */

.overlay {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.overlay-logo {
    margin-bottom: 1.5rem;
    z-index: 1;
    position: relative;
}

.overlay-logo-img,
.overlay-logo-img-white {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.overlay-content {
    z-index: 1;
    position: relative;
    margin-bottom: 1.5rem;
}

.overlay-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.overlay-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.overlay-features {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
}

.feature-item i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.modern-ghost-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    width: auto;
    min-width: 180px;
    font-size: 0.95rem;
}

.modern-ghost-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-ghost-btn i {
    font-size: 1.1rem;
}


/* ============================================
   MODAL DE VALIDACIÓN DE CORREO
   ============================================ */

.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modern-modal {
    background: var(--bg-white);
    border-radius: 24px;
    max-width: 480px;
    width: calc(100% - 3rem);
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Asegurar ancho máximo en escritorio */
@media (min-width: 770px) {
    .modern-modal {
        width: 480px;
        max-width: 480px;
    }
    
    .privacy-modal-content {
        width: 600px;
        max-width: 600px;
    }
}

.modern-modal-form {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.modal-header {
    text-align: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.modal-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0;
}

.modal-text:first-of-type {
    margin-top: 0;
}

.modal-text:last-of-type {
    margin-bottom: 0;
}

.modal-body {
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.modern-modal-loader {
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.loader-container {
    text-align: center;
    width: 100%;
}

.modern-loader-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: var(--primary-color);
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: var(--secondary-color);
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: var(--accent-color);
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

.loader-icon {
    position: relative;
    font-size: 3rem;
    color: var(--primary-color);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.loader-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.loader-text {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Ajustes generales para pantallas medianas */
@media (max-width: 1024px) {
    .container.login_pc_bg {
        max-width: 95%;
        height: auto;
    }

    .overlay-logo-img,
    .overlay-logo-img-white {
        max-width: 160px;
    }

    .overlay-title {
        font-size: 1.6rem;
    }

    .overlay-text {
        font-size: 0.9rem;
    }
}

/* Versión móvil: reordenar y simplificar manteniendo funcionalidad 
   Aplica desde 0px hasta 769px de ancho (incluye tablets pequeñas) */
@media (max-width: 769px) {
    .modern-login-body {
        min-height: auto;
        height: auto;
        padding: 0;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .container.login_pc_bg {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    /* Mostrar botones de alternancia en móvil */
    .mobile-toggle-buttons {
        display: flex !important;
        width: 100%;
        background: var(--bg-light);
        border-bottom: 2px solid var(--border-color);
        padding: 0;
        margin: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 0;
    }

    /* Romper el layout absoluto de escritorio y apilar los formularios */
    .form-container {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        left: auto !important;
        top: auto !important;
    }

    /* Asegurar que solo un formulario sea visible a la vez en móvil */
    .sign-in-container {
        display: block !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        z-index: auto !important;
    }

    .sign-up-container {
        display: none !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        opacity: 0 !important;
        transform: translateX(0) !important;
        z-index: auto !important;
    }

    /* Cuando se activa right-panel-active, mostrar solo registro */
    .container.right-panel-active .sign-in-container {
        display: none !important;
        opacity: 0 !important;
        transform: translateX(0) !important;
    }

    .container.right-panel-active .sign-up-container {
        display: block !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        z-index: auto !important;
    }

    .sign-in-container form,
    .sign-up-container form {
        padding: 1.75rem 1.5rem !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        background: var(--bg-white);
        height: auto !important;
        min-height: auto !important;
    }

    .form-header {
        margin-bottom: 1.25rem;
    }

    .form-title {
        font-size: 1.35rem;
    }

    .input-wrapper {
        padding: 0;
    }

    .modern-input,
    .modern-input-group .form-control,
    .group.modern-input-group input,
    .group.modern-input-group .form-control {
        height: 48px;
        padding-left: 3.5rem !important;
    }

    .modern-btn {
        height: 48px;
        font-size: 0.95rem;
    }

    .group.button-group {
        width: 100%;
        margin-top: 1rem;
    }

    /* En móvil ocultamos el overlay visual y usamos solo el cambio de panel */
    .overlay-container {
        display: none;
    }

    /* Mostrar headers móviles solo en móvil */
    .mobile-login-header,
    .mobile-register-header {
        display: block !important;
    }

    .mobile-info-card {
        display: flex !important;
    }

    /* Ajustar form-header en móvil cuando hay mobile-header */
    .sign-in-container .form-header,
    .sign-up-container .form-header {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    /* Reducir padding superior del formulario cuando hay mobile-info-card */
    .sign-in-container .mobile-info-card ~ form {
        padding-top: 1rem !important;
    }

    /* Ocultar form-header en móvil si hay mobile-header (opcional, para evitar duplicación) */
    .sign-in-container .mobile-login-header ~ form .form-header .form-title,
    .sign-up-container .mobile-register-header ~ form .form-header .form-title {
        font-size: 1.1rem;
    }

    .mobile-toggle-btn {
        flex: 1;
        padding: 1rem;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: var(--transition);
    }

    .mobile-toggle-btn i {
        font-size: 1.1rem;
    }

    .mobile-toggle-btn.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
        background: var(--bg-white);
    }

    .mobile-toggle-btn:not(.active):hover {
        color: var(--text-primary);
        background: rgba(100, 13, 100, 0.05);
    }

    /* Headers móviles con diseño atractivo */
    .mobile-login-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 2rem 1.5rem 2.5rem;
        text-align: center;
        color: white;
        position: relative;
        overflow: hidden;
    }

    .mobile-login-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }

    .mobile-register-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-dark) 100%);
        padding: 2rem 1.5rem 2.5rem;
        text-align: center;
        color: white;
        position: relative;
        overflow: hidden;
    }

    .mobile-register-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }

    .mobile-logo-container {
        position: relative;
        z-index: 1;
        margin-bottom: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .mobile-logo,
    .mobile-logo-white {
        max-width: 140px;
        height: auto;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
        display: block;
        margin: 0 auto;
    }

    .mobile-welcome-title,
    .mobile-register-title {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        position: relative;
        z-index: 1;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .mobile-welcome-text,
    .mobile-register-text {
        font-size: 0.9rem;
        opacity: 0.95;
        line-height: 1.5;
        position: relative;
        z-index: 1;
    }

    /* Tarjeta informativa móvil */
    .mobile-info-card {
        background: linear-gradient(135deg, rgba(100, 13, 100, 0.05) 0%, rgba(122, 30, 122, 0.05) 100%);
        border-left: 4px solid var(--primary-color);
        border-radius: 12px;
        padding: 1.25rem;
        margin: 1rem 1.5rem 0.75rem;
        display: flex;
        gap: 1rem;
        align-items: flex-start;
    }

    .mobile-info-icon {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.3rem;
    }

    .mobile-info-content {
        flex: 1;
    }

    .mobile-info-title {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 0.25rem;
    }

    .mobile-info-text {
        font-size: 0.85rem;
        color: var(--text-secondary);
        line-height: 1.5;
        margin: 0;
    }
}

/* ============================================
   AJUSTES PARA PANTALLAS MUY PEQUEÑAS (TELÉFONOS)
   ============================================ */

@media (max-width: 480px) {
    /* Asegurar que los headers móviles se muestren en pantallas pequeñas */
    .mobile-login-header,
    .mobile-register-header {
        display: block !important;
        padding: 1.5rem 1rem 2rem;
    }

    .mobile-info-card {
        display: flex !important;
    }

    .mobile-logo,
    .mobile-logo-white {
        max-width: 110px;
    }

    .mobile-welcome-title,
    .mobile-register-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .mobile-welcome-text,
    .mobile-register-text {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    /* Tarjeta informativa más compacta */
    .mobile-info-card {
        padding: 1rem;
        margin: 0.75rem 1rem 0.5rem;
        gap: 0.75rem;
    }

    /* Reducir padding superior del formulario en pantallas pequeñas */
    .sign-in-container .mobile-info-card ~ form {
        padding-top: 0.75rem !important;
    }

    .mobile-info-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .mobile-info-title {
        font-size: 0.9rem;
    }

    .mobile-info-text {
        font-size: 0.8rem;
    }

    /* Formularios más compactos */
    .sign-in-container form,
    .sign-up-container form {
        padding: 1.5rem 1rem !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .modern-input,
    .modern-input-group .form-control,
    .group.modern-input-group input,
    .group.modern-input-group .form-control {
        height: 46px;
        font-size: 0.9rem;
        padding-left: 3.25rem !important;
    }

    .modern-btn {
        height: 46px;
        font-size: 0.9rem;
    }

    /* Botones de alternancia más compactos */
    .mobile-toggle-btn {
        padding: 0.875rem 0.5rem;
        font-size: 0.85rem;
    }

    .mobile-toggle-btn i {
        font-size: 1rem;
    }

    .mobile-toggle-btn span {
        display: inline;
    }

    /* Asegurar visibilidad correcta en pantallas pequeñas */
    .sign-in-container {
        display: block !important;
    }

    .sign-up-container {
        display: none !important;
    }

    .container.right-panel-active .sign-in-container {
        display: none !important;
    }

    .container.right-panel-active .sign-up-container {
        display: block !important;
    }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 360px) {
    /* Asegurar que los headers móviles se muestren en pantallas muy pequeñas */
    .mobile-login-header,
    .mobile-register-header {
        display: block !important;
        padding: 1.25rem 0.75rem 1.75rem;
    }

    .mobile-info-card {
        display: flex !important;
    }

    .mobile-logo,
    .mobile-logo-white {
        max-width: 90px;
    }

    .mobile-welcome-title,
    .mobile-register-title {
        font-size: 1.15rem;
    }

    .mobile-welcome-text,
    .mobile-register-text {
        font-size: 0.8rem;
    }

    .mobile-info-card {
        padding: 0.875rem;
        margin: 0.75rem 0.75rem 0.5rem;
        flex-direction: column;
        text-align: center;
    }

    /* Reducir padding superior del formulario en pantallas muy pequeñas */
    .sign-in-container .mobile-info-card ~ form {
        padding-top: 0.5rem !important;
    }

    .mobile-info-icon {
        margin: 0 auto;
    }

    .sign-in-container form,
    .sign-up-container form {
        padding: 1.25rem 0.75rem !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    .mobile-toggle-btn span {
        display: none;
    }

    .mobile-toggle-btn {
        padding: 0.875rem 0.25rem;
    }

    /* Asegurar visibilidad correcta en pantallas muy pequeñas también */
    .sign-in-container {
        display: block !important;
    }

    .sign-up-container {
        display: none !important;
    }

    .container.right-panel-active .sign-in-container {
        display: none !important;
    }

    .container.right-panel-active .sign-up-container {
        display: block !important;
    }
}

    /* Cuando right-panel-active está activo, también activamos el botón de registro */
    .container.right-panel-active .mobile-toggle-btn#mobileToggleLogin {
        border-bottom-color: transparent;
        color: var(--text-secondary);
        background: transparent;
    }

    .container.right-panel-active .mobile-toggle-btn#mobileToggleLogin.active {
        border-bottom-color: transparent;
        color: var(--text-secondary);
        background: transparent;
    }

    .container.right-panel-active .mobile-toggle-btn#mobileToggleRegister {
        border-bottom-color: var(--primary-color);
        color: var(--primary-color);
        background: var(--bg-white);
    }

    .container.right-panel-active .mobile-toggle-btn#mobileToggleRegister.active {
        border-bottom-color: var(--primary-color);
        color: var(--primary-color);
        background: var(--bg-white);
    }

    /* Modales mejor adaptados a móvil */
    .modern-modal-overlay {
        padding: 0.75rem;
        align-items: center;
    }

    .modern-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .modern-modal-form {
        padding: 1.25rem 1.25rem;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-text {
        font-size: 0.9rem;
    }

    .privacy-modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .privacy-modal-header,
    .privacy-modal-body,
    .privacy-modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ============================================
   ANIMACIONES Y TRANSICIONES
   ============================================ */

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

.modern-modal {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   MODAL DE AVISO DE PRIVACIDAD
   ============================================ */

.privacy-modal-content {
    max-width: 600px;
    width: calc(100% - 3rem);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.privacy-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.privacy-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.privacy-modal-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 200px);
}

.privacy-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.privacy-content p {
    margin-bottom: 1rem;
}

.privacy-content p:first-child {
    margin-top: 0;
}

.privacy-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.privacy-content ul {
    margin: 0.75rem 0 1.25rem 1.5rem;
    padding-left: 0;
}

.privacy-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.privacy-notice-main-title {
    color: #c62828;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.privacy-content .privacy-transfer-list {
    margin: 1rem 0 1.25rem 1.5rem;
    padding-left: 0.5rem;
}

.privacy-content .privacy-transfer-list li {
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.privacy-content .privacy-transfer-list li:last-child {
    margin-bottom: 0;
}

.privacy-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.privacy-content a:hover {
    text-decoration: none;
}

.privacy-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    background: var(--bg-light);
}

.privacy-accept-btn {
    min-width: 200px;
    font-size: 1rem;
    padding: 0.875rem 2rem;
}

/* Scrollbar personalizado para el contenido de privacidad */
.privacy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.privacy-modal-body::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.privacy-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.privacy-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================ */

.modern-btn:focus,
.modern-input:focus,
.modern-ghost-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   HEADERS MÓVILES - OCULTOS POR DEFECTO EN ESCRITORIO
   ============================================ */

/* Solo ocultar en pantallas de escritorio (mayor a 769px) */
@media (min-width: 770px) {
    .mobile-login-header,
    .mobile-register-header,
    .mobile-info-card {
        display: none;
    }
}

/* ============================================
   COMPATIBILIDAD CON ESTILOS EXISTENTES
   ============================================ */

.group.button-group {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 0;
    flex-shrink: 0;
}

.sign-up-container .group.button-group {
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding-bottom: 0;
}
    margin-bottom: 0;
}

.sign-in-container,
.sign-up-container {
    background-color: var(--bg-white) !important;
}

.header {
    display: none; /* Ocultamos el header antiguo */
}

/* Ajustes finos para mejor visualización */
.modern-input-group .group {
    margin-bottom: 1.1rem;
}

.button-input-group {
    width: 100%;
}

