/* ==========================================================================
   TAPEVI CHECADOR - TERMINAL KIOSCO (LFT MÉXICO)
   Estética de Alta Relojería Suiza y Precisión Ejecutiva
   Paleta: Navy TAPEVI (#071B41) + Turquesa (#00B8C8) + Esmeralda (#00A878)
   ========================================================================== */

:root {
  --color-navy-deep: #051433;
  --color-navy-base: #071B41;
  --color-navy-card: rgba(11, 32, 74, 0.75);
  --color-navy-border: rgba(255, 255, 255, 0.08);
  
  --color-turquoise: #00B8C8;
  --color-turquoise-glow: rgba(0, 184, 200, 0.35);
  
  --color-emerald: #00A878;
  --color-emerald-glow: rgba(0, 168, 120, 0.3);
  
  --color-crimson: #D92D3F;
  --color-gold: #FFC72C;
  
  --color-white: #FFFFFF;
  --color-text-muted: #8E9BAE;
  --color-text-dim: #5A6A80;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body.kiosco-body {
  font-family: var(--font-main);
  background-color: var(--color-navy-deep);
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(0, 184, 200, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 85%, rgba(7, 27, 65, 0.8) 0%, transparent 50%);
  color: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Luz ambiental sutil de fondo */
.clock-ambient-light {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 184, 200, 0.08), transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   HEADER SUPERIOR EJECUTIVO
   ========================================================================== */
.kiosco-header {
  height: 72px;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-navy-border);
  background: rgba(5, 20, 51, 0.6);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-tape {
  color: var(--color-white);
}

.logo-vi {
  color: var(--color-turquoise);
}

.logo-sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.branch-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--color-navy-border);
  background: rgba(7, 27, 65, 0.4);
}

.system-status-zone {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 100px;
}

.status-indicator.online {
  background: rgba(0, 168, 120, 0.12);
  color: var(--color-emerald);
  border: 1px solid rgba(0, 168, 120, 0.25);
}

.status-indicator.offline {
  background: rgba(255, 199, 44, 0.12);
  color: var(--color-gold);
  border: 1px solid rgba(255, 199, 44, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.offline-counter {
  font-size: 0.75rem;
  color: var(--color-gold);
  font-weight: 600;
}

/* ==========================================================================
   MAIN: HOROLOGÍA Y ESCÁNER ÓPTICO
   ========================================================================== */
.kiosco-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 32px;
  z-index: 5;
}

@media (min-width: 900px) {
  .kiosco-main {
    flex-direction: row;
    gap: 64px;
    padding: 40px;
  }
}

/* --------------------------------------------------------------------------
   MÓDULO DE RELOJ CENTRAL
   -------------------------------------------------------------------------- */
.clock-module {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.date-badge {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.precision-clock-container {
  position: relative;
  width: 290px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.second-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 3;
}

.ring-progress {
  fill: none;
  stroke: var(--color-turquoise);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 942; /* 2 * PI * 150 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.25s linear;
  filter: drop-shadow(0 0 6px var(--color-turquoise-glow));
}

.digital-time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.time-hours-mins {
  font-family: var(--font-main);
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-white);
  line-height: 1;
}

.time-seconds {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-turquoise);
  margin-left: 4px;
  opacity: 0.9;
}

.timezone-legend {
  margin-top: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-icon {
  color: var(--color-turquoise);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   MÓDULO DE ESCÁNER ÓPTICO (LENTE TIPO LEICA)
   -------------------------------------------------------------------------- */
.scanner-module {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.optical-lens-frame {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 24px;
  background: rgba(7, 27, 65, 0.5);
  border: 1px solid var(--color-navy-border);
  overflow: hidden;
  box-shadow: 
    0 12px 32px -8px rgba(0, 0, 0, 0.5),
    inset 0 0 24px rgba(0, 0, 0, 0.4);
}

.camera-stream-box {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  object-fit: cover;
}

.camera-stream-box video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 24px;
}

/* Esquinas de precisión óptica */
.corner-bracket {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--color-turquoise);
  border-style: solid;
  z-index: 5;
  pointer-events: none;
}

.corner-bracket.top-left {
  top: 14px;
  left: 14px;
  border-width: 2.5px 0 0 2.5px;
  border-top-left-radius: 6px;
}

.corner-bracket.top-right {
  top: 14px;
  right: 14px;
  border-width: 2.5px 2.5px 0 0;
  border-top-right-radius: 6px;
}

.corner-bracket.bottom-left {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 2.5px 2.5px;
  border-bottom-left-radius: 6px;
}

.corner-bracket.bottom-right {
  bottom: 14px;
  right: 14px;
  border-width: 0 2.5px 2.5px 0;
  border-bottom-right-radius: 6px;
}

/* Línea láser de barrido turquesa */
.scanner-laser-beam {
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-turquoise), transparent);
  box-shadow: 0 0 10px var(--color-turquoise);
  animation: laserScan 2.4s ease-in-out infinite;
  z-index: 6;
  pointer-events: none;
}

@keyframes laserScan {
  0%, 100% {
    top: 12%;
    opacity: 0.3;
  }
  50% {
    top: 86%;
    opacity: 0.9;
  }
}

.lens-instruction {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-white);
  background: rgba(5, 20, 51, 0.7);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  margin: 0 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 7;
}

.lens-icon-qr svg {
  color: var(--color-turquoise);
}

/* Botón de contingencia */
.action-btn-contingency {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-navy-border);
  color: var(--color-text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-contingency:hover,
.action-btn-contingency:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MODALES Y CAPAS SUPERPUESTAS
   ========================================================================== */
.kiosco-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 11, 28, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   TECLADO NIP (TOUCH KEYPAD)
   -------------------------------------------------------------------------- */
.nip-modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--color-navy-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.employee-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-navy-base), var(--color-turquoise));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.employee-greeting {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.nip-sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.nip-dots-wrapper {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.nip-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all 0.15s ease;
}

.nip-dot.filled {
  background: var(--color-turquoise);
  border-color: var(--color-turquoise);
  box-shadow: 0 0 10px var(--color-turquoise-glow);
  transform: scale(1.15);
}

.nip-error-msg {
  height: 18px;
  font-size: 0.78rem;
  color: var(--color-crimson);
  font-weight: 600;
  margin-bottom: 12px;
}

.touch-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.key-btn {
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.key-btn:hover,
.key-btn:active {
  background: rgba(0, 184, 200, 0.2);
  border-color: var(--color-turquoise);
  transform: scale(0.96);
}

.key-btn.action-key {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

.key-btn.cancel-key:active {
  background: rgba(217, 45, 63, 0.2);
  color: var(--color-crimson);
}

/* --------------------------------------------------------------------------
   CONFIRMACIÓN EJECUTIVA (3 SEGUNDOS)
   -------------------------------------------------------------------------- */
.confirm-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-navy-card);
  border: 1px solid rgba(0, 168, 120, 0.35);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  animation: confirmPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.verified-badge-top {
  background: linear-gradient(90deg, rgba(0, 168, 120, 0.2), rgba(0, 184, 200, 0.2));
  border-bottom: 1px solid rgba(0, 168, 120, 0.2);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-emerald);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.confirm-body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.confirm-employee {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.confirm-position {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.confirm-event-chip {
  background: rgba(0, 168, 120, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(0, 168, 120, 0.3);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.confirm-time-clock {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 6px;
}

.confirm-status-line {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-turquoise);
  margin-bottom: 24px;
}

.crypto-seal-box {
  width: 100%;
  background: rgba(5, 20, 51, 0.8);
  border: 1px solid var(--color-navy-border);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seal-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}

.seal-hash {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

.auto-reset-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

.reset-fill {
  height: 100%;
  width: 100%;
  background: var(--color-emerald);
  transition: width 3s linear;
}

/* --------------------------------------------------------------------------
   MODAL DE CONTINGENCIA (OLVIDÉ MI GAFETE)
   -------------------------------------------------------------------------- */
.forgot-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-navy-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.forgot-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.forgot-header p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.search-input-box input {
  width: 100%;
  height: 48px;
  background: rgba(5, 20, 51, 0.7);
  border: 1px solid var(--color-navy-border);
  border-radius: 12px;
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--color-white);
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.search-input-box input:focus {
  border-color: var(--color-turquoise);
}

.employee-results-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 240px;
}

.employee-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-navy-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.employee-list-item:hover,
.employee-list-item:active {
  background: rgba(0, 184, 200, 0.12);
  border-color: var(--color-turquoise);
}

.item-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.item-role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.forgot-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-navy-border);
  color: var(--color-text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}
