/* ============================================
   BioAsist — Página de Autenticación + Kiosco Biométrico Split-Screen v3.4
   ============================================ */

/* ── Página de Autenticación (Split-Screen) ── */
.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
}

/* ── Fondo General con Imagen Futurista Visible en Ambos Lados ── */
.auth-bg {
    position: fixed;
    inset: 0;
    background: url('../js/fotos/futurista.png') center / cover no-repeat;
    z-index: 0;
    pointer-events: none;
}

.auth-split-layout {
    display: grid;
    grid-template-columns: 1.32fr minmax(390px, 0.68fr);
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   COLUMNA IZQUIERDA: KIOSCO BIOMÉTRICO DE FUNCIONARIOS
   (Fondo azul institucional translúcido + distribución original de 2 columnas)
   ══════════════════════════════════════════════════════════════ */
.auth-kiosk-side {
    position: relative;
    background: linear-gradient(145deg, rgba(14, 52, 102, 0.48) 0%, rgba(18, 68, 132, 0.42) 50%, rgba(9, 34, 70, 0.52) 100%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    color: #ffffff;
    padding: 1.5rem 2.25rem 3.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-right: 1px solid rgba(125, 211, 252, 0.22);
}

/* Círculos geométricos sutiles de fondo */
.auth-kiosk-side::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 1px solid rgba(125, 211, 252, 0.14);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-kiosk-side::after {
    content: '';
    position: absolute;
    bottom: -160px;
    left: -120px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.1);
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Indicador de hardware biométrico en la esquina inferior izquierda */
.kiosk-bottom-left-hw {
    position: absolute;
    bottom: 1.35rem;
    left: 1.75rem;
    z-index: 20;
}

.kiosk-bottom-left-hw .biometric-status-widget {
    background: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid rgba(52, 211, 153, 0.35) !important;
    border-radius: 999px !important;
    padding: 0.4rem 0.9rem !important;
    backdrop-filter: blur(8px);
}

.kiosk-bottom-left-hw .biometric-status-widget div {
    color: #f8fafc !important;
    gap: 8px !important;
}

.kiosk-bottom-left-hw .biometric-status-widget p {
    display: none !important;
}

/* Encabezado Institucional del Kiosco (Arriba con Fecha debajo) */
.kiosk-hero-header {
    position: relative;
    z-index: 25;
    text-align: center;
    margin-top: 2.2rem;
    margin-bottom: 4.4rem;
}

/* Slot superior para la tarjeta de notificación glassmorphism (Centrada arriba del título) */
.kiosk-top-banner-slot {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: min(290px, 92%);
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 150;
}

.kiosk-hero-title {
    font-size: clamp(1.5rem, 2.2vw, 2.05rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #e0f2fe;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 4px 16px rgba(3, 15, 38, 0.45);
}

.kiosk-hero-date {
    font-size: 0.92rem;
    font-weight: 600;
    color: #bae6fd;
    text-transform: capitalize;
    margin-top: 0.35rem;
    letter-spacing: 0.02em;
}

/* Contenedor Central del Kiosco */
.kiosk-stage-center {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

/* Distribución Original de 2 Columnas: Reloj/Sensor a la izquierda + Instrucciones a la derecha */
.kiosk-layout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.65rem;
    align-items: start;
    justify-content: center;
    width: 100%;
}

.kiosk-col-main {
    position: relative;
    width: 100%;
}

.kiosk-col-side {
    position: relative;
    width: 100%;
}

/* Robot asomándose arriba del recuadro principal (como estaba originalmente) */
.robot-peeking-top {
    position: absolute;
    top: -92px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    pointer-events: none;
    filter: drop-shadow(0 8px 18px rgba(2, 132, 199, 0.35));
}

/* ── Tarjeta Principal del Kiosco (Cristal Azul Ultra Transparente) ── */
.kiosk-card-light {
    background: linear-gradient(155deg, rgba(59, 130, 246, 0.03) 0%, rgba(23, 58, 117, 0.06) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 26px;
    padding: 1.75rem 1.65rem 1.55rem 1.65rem;
    box-shadow:
        0 18px 40px -12px rgba(3, 12, 30, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-align: center;
    position: relative;
    z-index: 10;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* Recuadro interno Soft Glass para el Reloj y Fecha */
.kiosk-clock-bento {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(186, 230, 253, 0.20);
    border-radius: 20px;
    padding: 1rem 1.15rem 0.85rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Reloj Digital Central en Blanco-Celeste Luminoso */
.digital-clock-display {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(2.8rem, 3.6vw, 3.7rem);
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 55%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 14px rgba(14, 165, 233, 0.32));
    line-height: 1.02;
    margin-bottom: 0.3rem;
}

.digital-date-display {
    font-size: 0.84rem;
    font-weight: 600;
    color: #bfdbfe;
    text-transform: capitalize;
    letter-spacing: 0.25px;
}

/* ========================================================
   PÍLDORA DE ESTADO DEL SENSOR Y BANNER DINÁMICO GLASSMORPHISM
   (Efecto Dynamic Island / Superposición iOS)
   ======================================================== */
.kiosk-sensor-pill-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin: 0.35rem 0;
    z-index: 85;
}

/* Píldora de estado del sensor (Captura 3 - Estado normal) */
.kiosk-sensor-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.38rem 1rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(186, 230, 253, 0.28);
    font-size: 0.78rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background 0.3s ease;
    transform-origin: center center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kiosk-sensor-pill.pill-hidden {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* ========================================================
   TARJETA DE ALERTA GLASSMORPHISM COMPACTA (Arriba del Título)
   Efecto de caída fluida desde el borde superior,
   cristal esmerilado translúcido + campana roja superior
   ======================================================== */
.kiosk-dynamic-banner {
    --tone: #ef4444;
    --tone-glow: rgba(239, 68, 68, 0.38);
    position: relative;
    width: 100%;
    padding: 24px 16px 12px 16px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50px) scale(0.92);
    transform-origin: center top;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0%, rgba(241, 245, 249, 0.52) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.90);
    box-shadow:
        0 18px 38px -10px rgba(15, 23, 42, 0.38),
        0 6px 16px -4px rgba(15, 23, 42, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(255, 255, 255, 0.35);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

/* Brillo especular superior del cristal */
.kiosk-dynamic-banner::after {
    content: '';
    position: absolute;
    inset: 0 0 55% 0;
    border-radius: 18px 18px 60% 60% / 18px 18px 16px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.kiosk-dynamic-banner.tone-amber { --tone: #f59e0b; --tone-glow: rgba(245, 158, 11, 0.40); }
.kiosk-dynamic-banner.tone-blue  { --tone: #0284c7; --tone-glow: rgba(2, 132, 199, 0.38); }

.kiosk-dynamic-banner.visible {
    opacity: 1;
    pointer-events: auto;
    animation: dynamicBannerSlideDown 0.44s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

.kiosk-dynamic-banner.collapsing {
    animation: dynamicBannerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dynamicBannerSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-60px) scale(0.85);
        filter: blur(4px);
    }
    70% {
        opacity: 1;
        transform: translateY(4px) scale(1.02);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes dynamicBannerSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.88);
        filter: blur(3px);
    }
}

/* Insignia circular flotante (como la campana de la referencia) */
.kiosk-dynamic-banner-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.94) 0%, rgba(226, 232, 240, 0.75) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.35), inset 0 1px 0 #ffffff;
}

.kiosk-dynamic-banner-icon svg {
    width: 20px;
    height: 20px;
    color: var(--tone);
    filter: drop-shadow(0 2px 5px var(--tone-glow));
}

.kiosk-dynamic-banner.visible .kiosk-dynamic-banner-icon svg {
    animation: alertIconRing 0.8s ease-in-out 0.2s 2;
    transform-origin: 50% 15%;
}

@keyframes alertIconRing {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-12deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(-5deg); }
}

.kiosk-dynamic-banner-title {
    position: relative;
    z-index: 1;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.kiosk-dynamic-banner-msg {
    position: relative;
    z-index: 1;
    max-width: 235px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
}

/* Barra de tiempo restante (sustituye a los botones) */
.kiosk-dynamic-banner-progress {
    position: relative;
    z-index: 1;
    height: 3px;
    width: 48%;
    margin: 0.55rem auto 0 auto;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.kiosk-dynamic-banner-progress span {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: var(--tone);
    box-shadow: 0 0 8px var(--tone-glow);
    transform-origin: left center;
}

.kiosk-dynamic-banner.visible .kiosk-dynamic-banner-progress span {
    animation: alertProgress var(--banner-duration, 3.4s) linear forwards;
}

@keyframes alertProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Radar y Sensor Central */
.radar-kiosk-wrapper {
    position: relative;
    width: 156px;
    height: 156px;
    margin: 0.85rem auto 0.65rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(125, 211, 252, 0.38);
    animation: radarRipple 2.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

.radar-pulse-ring:nth-child(2) {
    animation-delay: 0.85s;
}

.radar-pulse-ring:nth-child(3) {
    animation-delay: 1.7s;
}

@keyframes radarRipple {
    0% {
        transform: scale(0.68);
        opacity: 1;
    }
    100% {
        transform: scale(1.36);
        opacity: 0;
    }
}

.fingerprint-glow-core {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.96) 45%, rgba(224, 242, 254, 0.92) 100%);
    border: 3px solid #38bdf8;
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35), inset 0 0 15px rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fingerprint-glow-core:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 34px rgba(56, 189, 248, 0.5), inset 0 0 18px rgba(56, 189, 248, 0.28);
}

.fingerprint-glow-core.reading {
    border-color: #38bdf8;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.45);
    animation: breatheBlue 1.2s infinite alternate;
}

.fingerprint-glow-core.error {
    border-color: #f87171;
    box-shadow: 0 10px 30px rgba(248, 113, 113, 0.45);
}

@keyframes breatheBlue {
    from { transform: scale(1); filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5)); }
    to { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.75)); }
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: blinkLive 1.5s infinite;
}

@keyframes blinkLive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ── Tarjeta Lateral Derecha: Instrucciones de Marcación (Cristal Azul Ultra Transparente) ── */
.kiosk-instructions-card {
    background: linear-gradient(155deg, rgba(59, 130, 246, 0.03) 0%, rgba(23, 58, 117, 0.06) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 24px;
    padding: 1.5rem 1.45rem;
    box-shadow:
        0 18px 40px -12px rgba(3, 12, 30, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-align: left;
    color: #ffffff;
}

.kiosk-instructions-header {
    font-size: 1rem;
    font-weight: 800;
    color: #7dd3fc;
    padding-bottom: 0.85rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(186, 230, 253, 0.22);
    letter-spacing: -0.01em;
}

.kiosk-instructions-list {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.kiosk-instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.kiosk-step-badge {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #6ee7b7;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.kiosk-instruction-text {
    font-size: 0.83rem;
    color: #e0f2fe;
    line-height: 1.48;
}

.kiosk-instruction-text b {
    color: #ffffff;
    font-weight: 700;
}

/* ── Botón "Marcación por Cédula" (Fuera del recuadro inferior, Cristal Azul + Hover Azul) ── */
.btn-kiosk-cedula {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 1.55rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.22);
    border: 1.5px solid rgba(186, 230, 253, 0.34);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(3, 12, 30, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-kiosk-cedula svg {
    color: #7dd3fc;
    transition: color 0.22s ease;
}

.btn-kiosk-cedula:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border-color: #bae6fd;
    color: #ffffff;
    box-shadow: 0 12px 28px -4px rgba(14, 165, 233, 0.6);
    transform: translateY(-2px);
}

.btn-kiosk-cedula:hover svg {
    color: #ffffff;
}

/* ── Tarjeta de Marcación por Cédula (Cristal Azul Ultra Transparente) ── */
.kiosk-manual-card {
    background: linear-gradient(155deg, rgba(59, 130, 246, 0.04) 0%, rgba(23, 58, 117, 0.08) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 26px;
    padding: 1.65rem 1.75rem;
    max-width: 440px;
    margin: 0 auto;
    box-shadow:
        0 18px 40px -12px rgba(3, 12, 30, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-align: left;
}

.kiosk-manual-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(186, 230, 253, 0.2);
}

.btn-kiosk-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(186, 230, 253, 0.28);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-kiosk-back:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border-color: #7dd3fc;
    color: #ffffff;
}

.kiosk-manual-pill {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
    border: 1px solid rgba(125, 211, 252, 0.32);
}

.kiosk-manual-bento-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(186, 230, 253, 0.24);
    border-radius: 18px;
    padding: 1.1rem 1.15rem;
    margin-bottom: 1rem;
}

.kiosk-cedula-input {
    width: 100%;
    font-size: 1.45rem !important;
    text-align: center;
    font-weight: 800;
    letter-spacing: 5px;
    padding: 0.7rem 1rem !important;
    border-radius: 14px !important;
    background: rgba(15, 23, 42, 0.45) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(186, 230, 253, 0.32) !important;
    box-shadow: inset 0 2px 6px rgba(3, 12, 30, 0.25);
    transition: all 0.2s ease;
}

.kiosk-cedula-input::placeholder {
    color: rgba(186, 230, 253, 0.45) !important;
}

.kiosk-cedula-input:focus {
    outline: none;
    border-color: #38bdf8 !important;
    background: rgba(15, 23, 42, 0.62) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.22) !important;
}

.btn-kiosk-verify {
    width: 100%;
    padding: 0.82rem 1.2rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #166db0 0%, #0e4f81 100%);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    border: 1px solid rgba(118, 168, 211, 0.45);
    cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(22, 109, 176, 0.45);
    transition: all 0.2s ease;
}

.btn-kiosk-verify:hover {
    background: linear-gradient(135deg, #1c7ec9 0%, #166db0 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -4px rgba(22, 109, 176, 0.6);
}

/* Modal de Confirmación Animado (Kiosco) */
.confirmation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.confirmation-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.confirmation-card {
    background: #ffffff;
    color: #0f172a;
    border: 2.5px solid #0284c7;
    border-radius: 28px;
    padding: 2.75rem 2rem 2.25rem 2rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 65px -10px rgba(2, 132, 199, 0.3), 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
}

.confirmation-overlay.active .confirmation-card {
    transform: scale(1) translateY(0);
}

.confirmation-card.warning-mode {
    border-color: #0284c7;
}

.confirm-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
    width: 100%;
    border-radius: 0 0 26px 26px;
    transition: width 3.5s linear;
}

/* ══════════════════════════════════════════════════════════════
   COLUMNA DERECHA: INICIO DE SESIÓN ADMINISTRATIVO / FUNCIONARIOS
   (Cristal Semi-Transparente con Alta Visibilidad y Contraste)
   ══════════════════════════════════════════════════════════════ */
.auth-login-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(11, 15, 26, 0.72), rgba(17, 24, 39, 0.68));
}

[data-theme="light"] .auth-login-side {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.82), rgba(226, 232, 240, 0.86));
}

/* ── Contenedor de Autenticación ── */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
}

/* ── Tarjeta de Autenticación (Cristal Translúcido de Alta Visibilidad) ── */
.auth-card {
    background: linear-gradient(160deg, rgba(15, 28, 55, 0.52) 0%, rgba(11, 22, 44, 0.44) 100%);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border: 1.5px solid rgba(186, 230, 253, 0.35);
    border-radius: 24px;
    padding: 1.65rem 1.85rem;
    box-shadow:
        0 24px 55px -12px rgba(3, 12, 30, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    animation: fadeInUp .7s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .auth-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.48) 0%, rgba(240, 249, 255, 0.38) 100%);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1.5px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 24px 55px -12px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(14, 165, 233, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

/* ── Logotipo Original (Sin recuadro, colores originales) ── */
.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.25));
    transition: transform var(--transition-slow);
}

.auth-logo-icon:hover {
    transform: scale(1.05);
}

.auth-logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin-top: 0.1rem;
}

.auth-logo p {
    font-size: .8rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 260px;
    line-height: 1.35;
}

/* ── Formulario con Estilo de Ejemplo ── */
.auth-form .form-group {
    margin-bottom: 0.85rem;
}

.auth-form .form-label {
    color: #f1f5f9;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.32rem;
}

[data-theme="light"] .auth-form .form-label {
    color: #263b4d;
}

.auth-form .form-input {
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #f8fafc !important;
    caret-color: #38bdf8;
    padding: 0.68rem 2.55rem;
    border-radius: 11px;
    font-size: 0.86rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .auth-form .form-input {
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #0f172a !important;
    caret-color: #004b93;
}

.auth-form .form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

[data-theme="light"] .auth-form .form-input::placeholder {
    color: #64748b;
}

.auth-form .form-input:hover,
.auth-form .form-input:focus {
    background: transparent !important;
    border: 1px solid #38bdf8;
    box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.25);
    outline: none;
}

[data-theme="light"] .auth-form .form-input:hover,
[data-theme="light"] .auth-form .form-input:focus {
    background: transparent !important;
    border: 1px solid #004b93;
    box-shadow: 0 0 0 3.5px rgba(186, 230, 253, 0.55);
    outline: none;
}

/* Evita que el autocompletado del navegador pinte un recuadro de fondo opaco */
.auth-form .form-input:-webkit-autofill,
.auth-form .form-input:-webkit-autofill:hover,
.auth-form .form-input:-webkit-autofill:focus,
.auth-form .form-input:-webkit-autofill:active {
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #38bdf8;
    background-color: transparent !important;
    background-image: none !important;
    transition: background-color 99999s ease-in-out 0s;
}

[data-theme="light"] .auth-form .form-input:-webkit-autofill,
[data-theme="light"] .auth-form .form-input:-webkit-autofill:hover,
[data-theme="light"] .auth-form .form-input:-webkit-autofill:focus,
[data-theme="light"] .auth-form .form-input:-webkit-autofill:active {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #004b93;
}

.auth-field-hint {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.22rem;
    padding-left: 0.1rem;
    font-weight: 400;
}

[data-theme="light"] .auth-field-hint {
    color: #7b8d9e;
}

.auth-form .input-icon {
    position: relative;
}

.auth-form .input-icon > svg {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #94a3b8;
    transition: color 0.2s ease;
    pointer-events: none;
}

[data-theme="light"] .auth-form .input-icon > svg {
    color: #60788c;
}

.auth-form .input-icon:hover > svg,
.auth-form .input-icon:focus-within > svg {
    color: #38bdf8;
}

[data-theme="light"] .auth-form .input-icon:hover > svg,
[data-theme="light"] .auth-form .input-icon:focus-within > svg {
    color: #004b93;
}

.auth-form .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #166db0 0%, #0e4f81 100%);
    border: none;
    height: 44px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(22, 109, 176, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.8rem;
    color: #fff;
    border-radius: var(--radius-lg);
    font-size: .9rem;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #1c7ec9 0%, #166db0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 109, 176, 0.45);
}

.auth-form .btn-primary:hover::before {
    left: 100%;
}

/* ── Botón para mostrar/ocultar contraseña ── */
.password-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #60788c;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.password-toggle:hover {
    color: #004b93;
    background: rgba(0, 75, 147, 0.06);
}

.password-toggle:focus {
    outline: none;
}

.password-toggle svg.hidden {
    display: none;
}

/* ── Mensaje de Error ── */
.auth-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-400);
    padding: .75rem 1rem;
    border-radius: var(--radius-md);
    font-size: .85rem;
    margin-bottom: 1rem;
    display: none;
    animation: shake .4s ease;
    backdrop-filter: blur(8px);
}

.auth-error.show {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Pie de Página con Versión del Sistema ── */
.auth-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-light);
    font-size: .65rem;
    color: var(--text-tertiary);
}

.auth-footer p {
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-style: normal;
    line-height: 1.35;
}

.auth-version-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

.auth-version-badge {
    font-style: italic;
    font-weight: 600;
    color: var(--primary-400);
    letter-spacing: 0.02em;
}

/* ── Responsividad para pantallas medianas y móviles ── */
@media (max-width: 1180px) {
    .auth-split-layout {
        grid-template-columns: 1fr;
    }

    .auth-kiosk-side {
        padding: 2rem 1.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    }

    .auth-login-side {
        padding: 2.5rem 1.25rem;
    }
}

@media (max-width: 780px) {
    .kiosk-layout-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }
}
