/* ============================================================================
   ESTILOS GENERALES Y TÓTEM DE AUTOREGISTRO (KIOSCO) - SENATI
   Diseño: Corporate Cyber-Dark UI (Negro, Tonos Azules, Blanco Hielo)
   ============================================================================ */

/* 1. CONFIGURACIÓN DE VARIABLES Y TEMAS */
:root {
  --color-bg-base: #f6fafd;
  --color-bg-navy: #0a1931;
  --color-bg-panel: rgba(255, 255, 255, 0.86);
  --color-bg-panel-solid: #b3cfe5;
  --color-surface: #ffffff;
  --color-surface-soft: #eef6fc;
  --color-border-dark: rgba(74, 127, 167, 0.35);
  --color-border-medium: #4a7fa7;
  --color-accent: #1a3d63;
  --color-accent-soft: #b3cfe5;
  --color-text-primary: #0a1931;
  --color-text-secondary: #1a3d63;
  --color-success: #2ec4b6;
  --color-error: #e63946;
  --color-warning: #ff9f1c;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-premium: 0 18px 40px rgba(10, 25, 49, 0.12), 0 0 0 1px rgba(179, 207, 229, 0.26);
}

:root[data-theme="dark"] {
  --color-bg-base: #0a1931;
  --color-bg-navy: #0a1931;
  --color-bg-panel: rgba(26, 61, 99, 0.72);
  --color-bg-panel-solid: #1a3d63;
  --color-surface: #102846;
  --color-surface-soft: #0f223e;
  --color-border-dark: rgba(179, 207, 229, 0.28);
  --color-border-medium: #4a7fa7;
  --color-accent: #b3cfe5;
  --color-accent-soft: #4a7fa7;
  --color-text-primary: #f6fafd;
  --color-text-secondary: #b3cfe5;
  --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.48), 0 0 30px rgba(74, 127, 167, 0.14);
}

/* 2. ESTILOS DE BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at top right, rgba(179, 207, 229, 0.36) 0%, rgba(246, 250, 253, 0.92) 34%, var(--color-bg-base) 76%);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 12%, rgba(179, 207, 229, 0.14) 0%, rgba(179, 207, 229, 0) 28%),
    radial-gradient(circle at 88% 20%, rgba(74, 127, 167, 0.22) 0%, rgba(74, 127, 167, 0) 34%),
    linear-gradient(145deg, #081427 0%, #0a1931 46%, #06101f 100%);
}

/* Scrollbars elegantes */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-soft);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* 3. CAPAS FLUIDAS Y EFECTO NEÓN */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 127, 167, 0.18) 0%, rgba(246,250,253,0) 70%);
  border-radius: 50%;
  z-index: -1;
  filter: blur(60px);
  pointer-events: none;
}
.glow-1 { top: -200px; left: -200px; }
.glow-2 { bottom: -200px; right: -200px; }

/* Ocultar búfer del foco absoluto */
#barcode-capture-buffer {
  position: absolute;
  top: -100px;
  left: -100px;
  opacity: 0;
  width: 1px;
  height: 1px;
  border: none;
  pointer-events: none;
}

/* 4. BARRA DE NAVEGACIÓN (NAVBAR) */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(246, 250, 253, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-dark);
  z-index: 100;
  box-shadow: 0 10px 30px rgba(10, 25, 49, 0.1);
}

:root[data-theme="dark"] .navbar {
  background: rgba(10, 25, 49, 0.78);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  width: 64px;
  height: 64px;
  display: block;
}

.fallback-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-bg-panel-solid);
  border: 2px solid var(--color-accent);
  color: var(--color-text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(179, 207, 229, 0.5);
}

.nav-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--color-text-primary);
  text-shadow: 0 0 10px rgba(246, 250, 253, 0.1);
}

.text-accent {
  color: var(--color-border-medium);
  text-shadow: 0 0 12px rgba(179, 207, 229, 0.4);
}

.nav-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* RELOJ DIGITAL */
.nav-clock-container {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--color-surface);
  padding: 10px 20px;
  border: 1px solid var(--color-border-dark);
  border-radius: 12px;
}

.clock-icon {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  filter: drop-shadow(0 0 5px rgba(179, 207, 229, 0.4));
}

.clock-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
}

.clock-time {
  font-size: 20px;
  font-weight: 700;
  font-feature-settings: "tnum";
  color: var(--color-text-primary);
}

/* BOTÓN ACCESO ADMINISTRATIVO */
.btn-admin-access {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-medium);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-admin-access:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-bg-navy);
  box-shadow: 0 0 15px rgba(179, 207, 229, 0.2);
  transform: translateY(-1px);
}

.btn-admin-access:active {
  transform: translateY(0);
}

/* 5. CONTENEDOR KIOSCO (DOS COLUMNAS) */
.kiosk-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.kiosk-scanner-section,
.kiosk-status-section {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* MODO CONMUTADOR (BOTONES DE ENTRADA Y SALIDA) */
.kiosk-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.btn-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-dark);
  border-radius: 14px;
  padding: 18px 24px;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-mode svg {
  transition: transform 0.3s ease;
}

.btn-mode:hover {
  background: var(--color-accent-soft);
  color: var(--color-text-primary);
  border-color: var(--color-border-medium);
}

.btn-mode:hover svg {
  transform: scale(1.1);
}

.btn-mode.active.mode-entrada {
  background: var(--color-bg-navy);
  border-color: var(--color-accent);
  color: #f6fafd;
  box-shadow: 0 0 25px rgba(179, 207, 229, 0.25), inset 0 0 10px rgba(179, 207, 229, 0.2);
}

.btn-mode.active.mode-salida {
  background: rgba(230, 57, 70, 0.15);
  border-color: var(--color-error);
  color: var(--color-text-primary);
  box-shadow: 0 0 25px rgba(230, 57, 70, 0.25), inset 0 0 10px rgba(230, 57, 70, 0.1);
}

/* TARJETA DE ESCANEO */
.scanner-card {
  background: var(--color-bg-panel);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--color-border-dark);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-premium);
}

.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border-dark);
  padding-bottom: 15px;
}

.scanner-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--color-accent);
  color: var(--color-bg-navy);
  text-shadow: none;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.scanner-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pulse-dot {
  background: var(--color-success);
  box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.7);
  animation: pulse 1.6s infinite;
}

/* VISOR DE CÁMARA O HOLOGRÁFICO */
.visor-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a1931;
  border: 2px solid var(--color-border-dark);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Ocultar bordes de html5-qrcode internos */
#reader__dashboard, #reader__header {
  display: none !important;
}
#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 14px;
}

/* ANIMACIÓN HOLOGRÁFICA */
.hologram-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.hologram-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent);
  z-index: 10;
  animation: scanLaser 3.5s ease-in-out infinite;
}

.barcode-vector {
  color: var(--color-border-medium);
  opacity: 0.3;
  animation: hologramPulse 2s infinite ease-in-out;
}

.hologram-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(179,207,229,0.03) 0%, rgba(0,0,0,0) 50%, rgba(179,207,229,0.03) 100%);
  pointer-events: none;
}

.scanner-instructions {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

/* PANEL DE INGRESO MANUAL SIMULADO */
.mock-input-panel {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.mock-input-panel input {
  flex: 1;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-dark);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.mock-input-panel input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(179, 207, 229, 0.35);
  background: var(--color-surface);
}

.btn-mock-vincular {
  background: var(--color-accent);
  color: var(--color-bg-navy);
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-mock-vincular:hover {
  background: var(--color-text-primary);
  box-shadow: 0 0 15px rgba(179, 207, 229, 0.4);
  transform: translateY(-1px);
}

.btn-mock-vincular:active {
  transform: translateY(0);
}

.theme-toggle {
  background: var(--color-bg-navy);
  border: 1px solid var(--color-border-medium);
  border-radius: 10px;
  color: #f6fafd;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 10px 14px;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.theme-toggle:hover {
  background: var(--color-border-medium);
  transform: translateY(-1px);
}

:root[data-theme="dark"] .theme-toggle {
  background: var(--color-accent);
  color: var(--color-bg-navy);
}

/* 6. COLUMNA DERECHA: PANTALLAS DE RENDERIZACIÓN DE ESTADOS */
.status-card {
  flex: 1;
  background: var(--color-bg-panel);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--color-border-dark);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.status-icon-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(179, 207, 229, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-accent);
  margin-bottom: 25px;
  border: 2px solid rgba(179, 207, 229, 0.2);
  transition: var(--transition-smooth);
}

.status-svg {
  width: 44px;
  height: 44px;
}

.pulse-icon {
  animation: pulseIcon 2s infinite ease-in-out;
}

.status-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.status-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 2;
}

.status-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.status-card-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(179, 207, 229, 0.08) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  bottom: -150px;
  z-index: 1;
  pointer-events: none;
}

/* ESTADO PROCESANDO (SPINNER) */
.spinner {
  animation: rotate 2s linear infinite;
  width: 50px;
  height: 50px;
}
.spinner .path {
  stroke: var(--color-accent);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

/* ESTADO ÉXITO */
.status-card.success {
  border-color: rgba(46, 196, 182, 0.4);
}
.success-bg {
  background: rgba(46, 196, 182, 0.15);
  border-color: var(--color-success);
  color: var(--color-success);
}
.text-success {
  color: var(--color-success);
  text-shadow: 0 0 15px rgba(46, 196, 182, 0.3);
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-bg-panel-solid);
  border: 2px solid var(--color-accent);
  color: var(--color-text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.person-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.person-detail {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.person-dni {
  font-size: 13px;
  background: rgba(10, 25, 49, 0.6);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border-dark);
  font-family: monospace;
}

.welcome-box {
  width: 100%;
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid var(--color-success);
  border-radius: 12px;
  padding: 14px;
  color: var(--color-success);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 10px;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(46, 196, 182, 0.1);
}

.success-glow {
  background: radial-gradient(circle, rgba(46, 196, 182, 0.15) 0%, rgba(0,0,0,0) 70%);
}

/* ESTADO DENEGADO (SIN ENTRADA PREVIA U OTROS ERRORES) */
.status-card.error-critical {
  border-color: rgba(255, 159, 28, 0.4);
}
.status-card.error-denied {
  border-color: rgba(230, 57, 70, 0.4);
}

.error-critical-bg {
  background: rgba(255, 159, 28, 0.15);
  border-color: var(--color-warning);
  color: var(--color-warning);
}
.error-denied-bg {
  background: rgba(230, 57, 70, 0.15);
  border-color: var(--color-error);
  color: var(--color-error);
}

.text-warning {
  color: var(--color-warning);
  text-shadow: 0 0 15px rgba(255, 159, 28, 0.3);
}
.text-danger {
  color: var(--color-error);
  text-shadow: 0 0 15px rgba(230, 57, 70, 0.3);
}

.status-error-msg {
  font-size: 15px;
  color: var(--color-text-primary);
  line-height: 1.6;
}

.person-name.small {
  font-size: 16px;
  margin-top: 10px;
  color: var(--color-text-secondary);
}

.warning-glow {
  background: radial-gradient(circle, rgba(255, 159, 28, 0.15) 0%, rgba(0,0,0,0) 70%);
}
.error-glow {
  background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, rgba(0,0,0,0) 70%);
}

/* 6.1. KIOSCO: TEMA OSCURO PROFESIONAL */
:root[data-theme="dark"] .navbar {
  background: rgba(8, 20, 39, 0.88);
  border-bottom-color: rgba(179, 207, 229, 0.22);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .nav-title,
:root[data-theme="dark"] .clock-time,
:root[data-theme="dark"] .status-title,
:root[data-theme="dark"] .person-name,
:root[data-theme="dark"] .scanner-instructions {
  color: #f6fafd;
}

:root[data-theme="dark"] .nav-subtitle,
:root[data-theme="dark"] .clock-date,
:root[data-theme="dark"] .status-text,
:root[data-theme="dark"] .person-detail,
:root[data-theme="dark"] .person-name.small {
  color: #b3cfe5;
}

:root[data-theme="dark"] .text-accent {
  color: #b3cfe5;
  text-shadow: 0 0 18px rgba(179, 207, 229, 0.28);
}

:root[data-theme="dark"] .nav-clock-container,
:root[data-theme="dark"] .btn-admin-access,
:root[data-theme="dark"] .scanner-card,
:root[data-theme="dark"] .status-card {
  background: linear-gradient(180deg, rgba(26, 61, 99, 0.82), rgba(10, 25, 49, 0.84));
  border-color: rgba(179, 207, 229, 0.22);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(246, 250, 253, 0.06);
}

:root[data-theme="dark"] .btn-admin-access {
  color: #f6fafd;
}

:root[data-theme="dark"] .btn-admin-access:hover {
  background: #b3cfe5;
  border-color: #b3cfe5;
  color: #0a1931;
  box-shadow: 0 0 0 4px rgba(179, 207, 229, 0.14);
}

:root[data-theme="dark"] .btn-mode {
  background: rgba(10, 25, 49, 0.72);
  border-color: rgba(179, 207, 229, 0.2);
  color: #b3cfe5;
}

:root[data-theme="dark"] .btn-mode:hover {
  background: rgba(74, 127, 167, 0.28);
  color: #f6fafd;
  border-color: #4a7fa7;
}

:root[data-theme="dark"] .btn-mode.active.mode-entrada {
  background: linear-gradient(135deg, #b3cfe5, #4a7fa7);
  border-color: #b3cfe5;
  color: #0a1931;
  box-shadow: 0 18px 30px rgba(74, 127, 167, 0.22);
}

:root[data-theme="dark"] .btn-mode.active.mode-salida {
  color: #f6fafd;
}

:root[data-theme="dark"] .scanner-badge,
:root[data-theme="dark"] .btn-mock-vincular {
  background: #b3cfe5;
  color: #0a1931;
}

:root[data-theme="dark"] .scanner-header {
  border-bottom-color: rgba(179, 207, 229, 0.18);
}

:root[data-theme="dark"] .visor-container,
:root[data-theme="dark"] #camera-reader,
:root[data-theme="dark"] #cam-inactive {
  background:
    radial-gradient(circle at center, rgba(74, 127, 167, 0.18), rgba(10, 25, 49, 0.2) 48%),
    #050d1a !important;
  border-color: rgba(179, 207, 229, 0.22);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.82), 0 0 0 1px rgba(179, 207, 229, 0.08);
}

:root[data-theme="dark"] #cam-inactive p,
:root[data-theme="dark"] .cam-inactive-overlay p,
:root[data-theme="dark"] #camStatusText {
  color: #b3cfe5 !important;
}

:root[data-theme="dark"] #cam-inactive small {
  color: #4a7fa7 !important;
}

:root[data-theme="dark"] .cam-status-bar {
  background: rgba(8, 20, 39, 0.92) !important;
  border-top-color: rgba(179, 207, 229, 0.16);
  color: #b3cfe5 !important;
}

:root[data-theme="dark"] .camera-laser-line,
:root[data-theme="dark"] .hologram-laser {
  background: linear-gradient(to right, transparent, #b3cfe5, #f6fafd, #4a7fa7, transparent);
  box-shadow: 0 0 22px rgba(179, 207, 229, 0.78), 0 0 8px rgba(246, 250, 253, 0.72);
}

:root[data-theme="dark"] .scan-frame {
  border-color: rgba(179, 207, 229, 0.68);
}

:root[data-theme="dark"] .scan-frame::before,
:root[data-theme="dark"] .scan-frame::after,
:root[data-theme="dark"] .scan-frame > span::before,
:root[data-theme="dark"] .scan-frame > span::after {
  border-color: #f6fafd;
}

:root[data-theme="dark"] .mock-input-panel input {
  background: rgba(8, 20, 39, 0.88);
  border-color: rgba(179, 207, 229, 0.24);
  color: #f6fafd;
}

:root[data-theme="dark"] .mock-input-panel input::placeholder {
  color: rgba(179, 207, 229, 0.62);
}

:root[data-theme="dark"] .mock-input-panel input:focus {
  background: rgba(8, 20, 39, 0.96);
  border-color: #b3cfe5;
  box-shadow: 0 0 0 4px rgba(179, 207, 229, 0.12);
}

:root[data-theme="dark"] .status-icon-container {
  background: rgba(179, 207, 229, 0.1);
  border-color: rgba(179, 207, 229, 0.24);
  color: #b3cfe5;
}

:root[data-theme="dark"] .avatar-placeholder {
  background: #1a3d63;
  border-color: #b3cfe5;
  color: #f6fafd;
}

:root[data-theme="dark"] .person-dni {
  background: rgba(8, 20, 39, 0.88);
  color: #f6fafd;
  border-color: rgba(179, 207, 229, 0.2);
}

:root[data-theme="dark"] .welcome-box {
  background: rgba(46, 196, 182, 0.14);
}

:root[data-theme="dark"] .theme-toggle {
  box-shadow: 0 0 0 1px rgba(179, 207, 229, 0.26), 0 12px 24px rgba(0, 0, 0, 0.22);
}

/* 7. EFECTOS DE ANIMACIÓN */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 196, 182, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 196, 182, 0);
  }
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes scanLaser {
  0%, 100% { top: 0%; }
  50% { top: 98%; }
}

@keyframes hologramPulse {
  0%, 100% { transform: scale(1); opacity: 0.25; }
  50% { transform: scale(1.02); opacity: 0.45; }
}

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

@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* CLASES DE TRANSICIÓN */
.animate-zoom-in {
  animation: zoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-pulse {
  animation: pulseIcon 1.5s infinite ease-in-out;
}

.animate-shake {
  animation: shake 0.4s ease-in-out;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* 8. DISEÑO RESPONSIVO (DISEÑO FLUIDO) */
@media (max-width: 1024px) {
  .kiosk-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }
  .navbar {
    padding: 15px 20px;
  }
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .nav-brand {
    gap: 12px;
  }
  .nav-title {
    font-size: 16px;
    line-height: 1.2;
  }
  .btn-admin-access {
    justify-content: center;
  }
  .nav-clock-container {
    display: none; /* Ocultar reloj en pantallas muy pequeñas */
  }
  .kiosk-modes {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mock-input-panel {
    flex-direction: column;
  }
  .btn-mock-vincular {
    min-height: 44px;
  }
  .status-card,
  .scanner-card {
    padding: 22px;
  }
}
