/* ============================================================
   MODAL DE INICIO DE SESIÓN
   
   Estilos del modal que se abre al hacer click en "PERFIL" o
   "Iniciar sesión". Diseño basado en la imagen de referencia
   del cliente: tarjeta blanca centrada con backdrop oscuro,
   pestañas Entidad/Administrador, campos usuario/contraseña.
   
   Usa las fuentes y paleta institucionales del proyecto:
   - Sansation → título "Acceso al Sistema"
   - Exo 2 → labels y botones (UPPERCASE)
   - Funnel Display → texto corrido (aviso, placeholders)
   - Azul principal #003060 → botón y acentos
   ============================================================ */


/* ───────────────────────────────────────────────
   1. BACKDROP (fondo oscuro semi-transparente)
   ─────────────────────────────────────────────── */
.modal-login-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 18, 38, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.modal-login-backdrop.abierto {
    display: flex;
    opacity: 1;
}


/* ───────────────────────────────────────────────
   2. CAJA DEL MODAL (tarjeta blanca)
   ─────────────────────────────────────────────── */
.modal-login-caja {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 14px;
    padding: 40px 44px 36px;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35),
                0 4px 12px rgba(0, 0, 0, 0.18);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal-login-backdrop.abierto .modal-login-caja {
    transform: translateY(0) scale(1);
}


/* ───────────────────────────────────────────────
   3. BOTÓN CERRAR (X arriba-derecha)
   ─────────────────────────────────────────────── */
.modal-login-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #8FB3D6;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.modal-login-cerrar:hover {
    background: #F3F6FA;
    color: #003060;
}
.modal-login-cerrar svg {
    width: 22px;
    height: 22px;
}


/* ───────────────────────────────────────────────
   4. LOGO DEL OBSERVATORIO
   ─────────────────────────────────────────────── */
.modal-login-logo {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}
.modal-login-logo img {
    width: 56px;
    height: 56px;
    display: block;
}


/* ───────────────────────────────────────────────
   5. TÍTULO + SUBTÍTULO
   ─────────────────────────────────────────────── */
.modal-login-titulo {
    font-family: 'Sansation', 'Exo 2', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #003060;
    margin: 0 0 6px;
    line-height: 1.15;
}
.modal-login-subtitulo {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0C7CC8;
    letter-spacing: 0.08em;
    margin: 0 0 26px;
    text-transform: uppercase;
}


/* ───────────────────────────────────────────────
   6. PESTAÑAS (Entidad / Administrador)
   ─────────────────────────────────────────────── */
.modal-login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}
.modal-login-tab {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 11px 8px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: #F3F6FA;
    color: #8FA4B8;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}
.modal-login-tab:hover:not(.activa) {
    background: #E8F1F8;
    color: #4A6580;
}
.modal-login-tab.activa {
    background: #ffffff;
    color: #003060;
    border-color: #0C7CC8;
    box-shadow: 0 2px 6px rgba(12, 124, 200, 0.12);
}


/* ───────────────────────────────────────────────
   7. CAMPOS DEL FORMULARIO
   ─────────────────────────────────────────────── */
.modal-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-login-campo {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.modal-login-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #003060;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.modal-login-input {
    font-family: 'Funnel Display', 'Exo 2', sans-serif;
    font-size: 0.92rem;
    color: #1F2937;
    background: #F7F9FC;
    border: 1.5px solid #DDE6EF;
    border-radius: 10px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    width: 100%;
}
.modal-login-input::placeholder {
    color: #A8B5C4;
}
.modal-login-input:hover {
    background: #FFFFFF;
    border-color: #B8CADC;
}
.modal-login-input:focus {
    background: #FFFFFF;
    border-color: #0C7CC8;
    box-shadow: 0 0 0 3px rgba(12, 124, 200, 0.14);
}

/* ───────────────────────────────────────────────
   7.b. TOGGLE MOSTRAR/OCULTAR CONTRASEÑA (set/2026 pase 2)
   Botón ojo dentro del input de contraseña. Por defecto la
   contraseña queda oculta; al hacer clic (o Enter) alterna entre
   type=password / type=text sin perder el foco ni el cursor.
   Reutilizable: cualquier input que quiera este botón puede usar
   el mismo wrapper .*-password-wrap con .modal-login-toggle-pwd
   y data-toggle-pwd apuntando al id del input.
   ─────────────────────────────────────────────── */
.modal-login-password-wrap {
    position: relative;
    display: block;
}
.modal-login-input-password {
    padding-right: 44px;                /* aire para el botón */
}
.modal-login-toggle-pwd {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6B7A8C;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s, background 0.15s;
}
.modal-login-toggle-pwd:hover,
.modal-login-toggle-pwd:focus-visible {
    color: #003060;
    background: rgba(12, 124, 200, 0.10);
    outline: none;
}
.modal-login-toggle-pwd .pwd-icono {
    width: 18px;
    height: 18px;
    pointer-events: none;
}


/* ───────────────────────────────────────────────
   8. BOTÓN INGRESAR
   ─────────────────────────────────────────────── */
.modal-login-boton {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    background: #003060;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.18s, transform 0.08s, box-shadow 0.18s;
    box-shadow: 0 4px 12px rgba(0, 48, 96, 0.22);
}
.modal-login-boton:hover {
    background: #02254F;
    box-shadow: 0 6px 16px rgba(0, 48, 96, 0.30);
}
.modal-login-boton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 48, 96, 0.22);
}


/* ───────────────────────────────────────────────
   9. AVISO INFERIOR
   ─────────────────────────────────────────────── */
.modal-login-error {
    font-family: 'Funnel Display', 'Exo 2', sans-serif;
    font-size: 0.82rem;
    color: #B91C1C;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    margin-top: 14px;
}
.modal-login-aviso {
    font-family: 'Funnel Display', 'Exo 2', sans-serif;
    font-size: 0.78rem;
    color: #6B7E92;
    text-align: center;
    margin: 22px 0 0;
    line-height: 1.5;
}


/* ───────────────────────────────────────────────
   10. RESPONSIVE (móvil)
   ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .modal-login-caja {
        padding: 32px 26px 28px;
        border-radius: 12px;
    }
    .modal-login-titulo {
        font-size: 1.4rem;
    }
    .modal-login-tab {
        font-size: 0.66rem;
        padding: 10px 4px;
    }
}


/* ───────────────────────────────────────────────
   11. BLOQUEO DE SCROLL CUANDO EL MODAL ESTÁ ABIERTO
   ─────────────────────────────────────────────── */
body.modal-login-bloqueado {
    overflow: hidden;
}
