* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0a0f14;
  color: #c7d0db;
  position: relative;
}

/* ─── BACKGROUND ─── */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0b1536 0%, #0a1628 50%, #0b2030 100%);
  z-index: 0;
}

.bg-glow-1 {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 161, 157, 0.18) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow-2 {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 82, 204, 0.15) 0%, transparent 70%);
  top: -100px;
  left: 200px;
  z-index: 0;
  pointer-events: none;
}

.bg-dots {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mix-blend-mode: screen;
  z-index: 0;
  pointer-events: none;
}

/* ─── LAYOUT ─── */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px 32px 0;
  gap: 0;
}

/* ─── TOP BAR ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand img {
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.topbar-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.topbar-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
}

/* Sucursal selector en topbar */
.sucursal-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sucursal-wrap svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.3);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.sucursal-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.sucursal-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") calc(100% - 6px) 50% / 14px no-repeat;
  appearance: none;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  min-width: 260px;
}

.sucursal-select option {
  background: #1a2540;
  color: #c7d0db;
}

.sucursal-select:focus {
  outline: none;
  border-color: rgba(0, 161, 157, 0.6);
  background-color: rgba(255, 255, 255, 0.1);
}

/* ─── MAIN 3-COL GRID ─── */
.cols {
  display: grid;
  grid-template-columns: 290px 8px 1fr 8px 250px;
  column-gap: 0;
  row-gap: 0;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
}

/* ─── RESIZE HANDLES ─── */
.col-resize-handle {
  width: 8px;
  cursor: col-resize;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  user-select: none;
  z-index: 10;
}

.col-resize-handle::before {
  content: '';
  position: absolute;
  inset: 0 -6px;
}

.col-resize-handle::after {
  content: '';
  position: absolute;
  top: 15%;
  bottom: 15%;
  width: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  transition: background 150ms, transform 150ms;
}

.col-resize-handle:hover::after {
  background: rgba(255,255,255,0.3);
  transform: scaleX(1.5);
}

.cols.col-resizing .col-resize-handle::after {
  background: rgba(255,255,255,0.35);
}

.cols.col-resizing {
  cursor: col-resize;
  user-select: none;
}

/* ─── GLASS CARD ─── */
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  padding: 8px 16px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.card-title.accent {
  color: #ffab00;
}

/* ─── COL 1: CHECK-IN ─── */
.col-checkin {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: 4px;
}

.col-checkin .card {
  flex: 1;
  min-height: 0;
}

.checkin-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 24px;
  gap: 16px;
}

/* Clock */
.clock-block {
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 20px 28px;
  width: 100%;
}

#reload-sugerido {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 153, 31, 0.12);
  border: 1px solid rgba(255, 153, 31, 0.35);
}

#reload-razon {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 200, 120, 0.85);
  letter-spacing: 0.01em;
}

#reload-sugerido button {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 153, 31, 0.2);
  border: 1px solid rgba(255, 153, 31, 0.5);
  border-radius: 4px;
  color: rgba(255, 200, 120, 0.95);
  cursor: pointer;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

#reload-sugerido button:hover {
  background: rgba(255, 153, 31, 0.35);
}

#last-error-wrap {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(222, 53, 11, 0.1);
  border: 1px solid rgba(222, 53, 11, 0.25);
}

#last-error-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(222, 53, 11, 0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

#last-error-ts {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(222, 53, 11, 0.8);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

#last-error-text {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 200, 180, 0.75);
  letter-spacing: 0.01em;
}

#diag-status-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 40px rgba(0, 161, 157, 0.4);
}

.clock-date {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* Huella / clave */
.input-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.biometric-icon {
  width: 52px;
  height: 52px;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

@keyframes fp-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

@keyframes fp-processing {
  0%, 100% { opacity: 0.7; filter: drop-shadow(0 0 4px rgba(255,255,255,0.2)); }
  50% { opacity: 1; filter: drop-shadow(0 0 14px rgba(255,255,255,0.7)); }
}

.biometric-icon.reader-ready {
  animation: fp-breathe 2.5s ease-in-out infinite;
}

.biometric-icon.reader-processing {
  animation: fp-processing 0.7s ease-in-out infinite;
}

.input-card-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.input-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.input-divider span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.input-divider::before,
.input-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.clave-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.clave-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.1em;
  transition: border-color 150ms, background 150ms;
}

.clave-input::placeholder {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.2);
}

.clave-input:focus {
  outline: none;
  border-color: rgba(0, 161, 157, 0.7);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(0, 161, 157, 0.15);
}

.btn-registrar {
  height: 40px;
  padding: 0 16px;
  background: #0052cc;
  border: 0;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: 0 4px 14px 0 rgba(0, 145, 255, 0.35);
  transition: background 150ms, box-shadow 150ms, transform 100ms;
}

.btn-registrar:hover {
  background: #0747a6;
  box-shadow: 0 4px 18px 0 rgba(0, 145, 255, 0.45);
}

.btn-registrar:active {
  transform: scale(0.97);
}

.btn-registrar svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── COL 2: AVISOS ─── */
.col-avisos {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 4px;
}

.col-avisos .card {
  flex: 1;
  min-height: 0;
}

.avisos-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aviso-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  min-height: 0;
}

.aviso-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  border-radius: 0;
}

.aviso-viewer img.active {
  display: block;
}

.aviso-placeholder-dark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.15);
  padding: 40px;
  text-align: center;
}

.aviso-placeholder-dark svg {
  width: 64px;
  height: 64px;
  stroke: rgba(255, 255, 255, 0.12);
  fill: none;
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aviso-placeholder-dark p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.2);
  line-height: 1.6;
}

.aviso-caption {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.aviso-footer {
  padding: 6px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.aviso-progress {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-right: 16px;
  overflow: hidden;
}

.aviso-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff8b00, #ffab00);
  border-radius: 2px;
  width: 40%;
  transition: width 150ms;
}

.aviso-nav-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.aviso-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.aviso-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 150ms, transform 150ms;
}

.aviso-dot.active {
  background: #ffab00;
  transform: scale(1.2);
}

/* ─── COL 3: REGISTROS ─── */
.col-registros {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-left: 4px;
  --reg-base: 12px;
}

.col-registros .card {
  flex: 1;
  min-height: 0;
}

.registros-inner {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 8px 0;
}

.registros-inner::-webkit-scrollbar {
  width: 3px;
}

.registros-inner::-webkit-scrollbar-track {
  background: transparent;
}

.registros-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.reg-empty {
  padding: 32px 20px;
  text-align: center;
  font-size: calc(var(--reg-base) * 1.083);
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.6;
}

.reg-row {
  display: grid;
  grid-template-columns: 1fr 68px;
  gap: 0;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 150ms;
  animation: row-in 250ms ease-out both;
}

.reg-row:last-child {
  border-bottom: 0;
}

.reg-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.reg-nombre {
  font-size: var(--reg-base);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.reg-id-time {
  font-family: var(--font-mono);
  font-size: calc(var(--reg-base) * 0.833);
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.reg-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.lozenge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: calc(var(--reg-base) * 0.75);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.st-tiempo {
  background: rgba(0, 135, 90, 0.25);
  color: #57d9a3;
}

.st-retardo {
  background: rgba(255, 171, 0, 0.2);
  color: #ffc400;
}

.st-falta {
  background: rgba(222, 53, 11, 0.2);
  color: #ff7452;
}

/* ─── REG FONT CONTROL ─── */
.reg-font-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.reg-font-btn {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms;
  padding: 0;
}

.reg-font-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.reg-font-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  min-width: 18px;
  text-align: center;
}

/* ─── STATUS BAR ─── */
.statusbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 32px 8px;
  gap: 8px;
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8898aa;
  box-shadow: 0 0 0 3px rgba(136, 152, 170, 0.2);
  transition: background 0.4s, box-shadow 0.4s;
}

.status-dot.ok {
  background: #00875a;
  box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.2);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.status-dot.error {
  background: #de350b;
  box-shadow: 0 0 0 3px rgba(222, 53, 11, 0.2);
  animation: none;
}

.status-dot.connecting {
  background: #ff991f;
  box-shadow: 0 0 0 3px rgba(255, 153, 31, 0.2);
  animation: pulse-dot-amber 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(0, 135, 90, 0.35); }
}

@keyframes pulse-dot-amber {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 153, 31, 0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(255, 153, 31, 0.35); }
}

.status-text {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.02em;
}

.status-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.uptime-counter {
  position: absolute;
  right: 32px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  padding: 24px 40px;
  border-radius: 16px;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  backdrop-filter: blur(24px);
  white-space: normal;
  max-width: 80vw;
  text-align: center;
  line-height: 1.3;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast.success {
  background: rgba(0, 135, 90, 0.95);
  color: #fff;
  border: 1px solid rgba(0, 200, 120, 0.5);
}

.toast.warning {
  background: rgba(200, 150, 0, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 200, 0, 0.5);
}

.toast.error {
  background: rgba(200, 20, 20, 0.97);
  color: #fff;
  border: 1px solid rgba(255, 80, 80, 0.5);
}

.toast svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── STEPPER ─── */
.stepper-wrap {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 14px 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper-wrap.show-stepper {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

/* línea conectora */
.stepper::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 300ms, border-color 300ms, box-shadow 300ms;
  flex-shrink: 0;
}

.step-dot svg {
  width: 10px;
  height: 10px;
  stroke: rgba(255, 255, 255, 0.4);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 200ms;
}

.step.done .step-dot {
  background: #00875a;
  border-color: #00875a;
  box-shadow: 0 0 0 4px rgba(0, 135, 90, 0.2);
}

.step.done .step-dot svg {
  opacity: 1;
  stroke: #fff;
}

.step.active .step-dot {
  background: #0052cc;
  border-color: #4c9aff;
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.25);
  animation: pulse-step 2s ease-in-out infinite;
}

@keyframes pulse-step {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.25);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(0, 82, 204, 0.15);
  }
}

.step-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 200ms;
}

.step.done .step-label {
  color: #57d9a3;
}

.step.active .step-label {
  color: #4c9aff;
  font-weight: 700;
}

.step-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.step.done .step-time {
  color: rgba(87, 217, 163, 0.7);
}

/* línea de progreso sobre el connector */
.stepper-progress {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 2px;
  background: linear-gradient(90deg, #00875a, #0052cc);
  z-index: 0;
  border-radius: 1px;
  transition: width 400ms ease-out;
}

/* ─── FEEDBACK POST-CHECADA ─── */
.feedback-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px 16px 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: row-in 250ms ease-out both;
}

.feedback-card.show {
  display: flex;
}

.feedback-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 2px;
}

.feedback-tipo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.feedback-quedan {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
  margin-top: 1px;
  margin-bottom: 2px;
}

.feedback-nombre {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.feedback-bar {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0052cc, #00a19d);
  margin-top: 4px;
  animation: shrink-bar 3s linear forwards;
}

@keyframes shrink-bar {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.3;
  }
}

/* ─── MODAL AVISO ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.7);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal-img-wrap {
  max-width: 80vw;
  max-height: 85vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-overlay);
  position: relative;
}

.modal-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ─── TWEAKS ─── */
.tweaks-panel {
  position: fixed;
  bottom: 60px;
  right: 24px;
  width: 240px;
  background: rgba(20, 30, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  z-index: 400;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.tweaks-panel.open {
  display: flex;
}

.tweaks-title {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tweaks-title button {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.tweaks-title button:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tweaks-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tweak-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tweak-row label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tweak-row select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  width: 100%;
  appearance: none;
}

.tweak-row select option {
  background: #1a2540;
}

.tweak-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.toggle-sw {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background 150ms;
}

.toggle-sw.on {
  background: #0052cc;
}

.toggle-sw::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 150ms;
}

.toggle-sw.on::after {
  transform: translateX(14px);
}


/* ─── LIGHT MODE ─── */
body.light {
  background: #f4f5f7;
  color: #172b4d;
}

body.light .bg-gradient {
  background: linear-gradient(135deg, #e8f0fe 0%, #f4f5f7 50%, #eaf6f6 100%) !important;
}

body.light .bg-glow-1 {
  background: radial-gradient(circle, rgba(0, 161, 157, 0.08) 0%, transparent 70%) !important;
}

body.light .bg-glow-2 {
  background: radial-gradient(circle, rgba(0, 82, 204, 0.07) 0%, transparent 70%) !important;
}

body.light .bg-dots {
  background-image: radial-gradient(rgba(9, 30, 66, 0.06) 1px, transparent 1px) !important;
}

body.light .card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(9, 30, 66, 0.1);
}

body.light .card-header {
  border-bottom-color: rgba(9, 30, 66, 0.08);
}

body.light .card-eyebrow {
  color: #6b778c;
}

body.light .card-title {
  color: #172b4d;
}

body.light .card-title.accent {
  color: #ff8b00;
}

body.light .topbar-brand img {
  filter: none;
  opacity: 1;
}

body.light .topbar-title {
  color: #6b778c;
}

body.light .topbar-sep {
  background: rgba(9, 30, 66, 0.12);
}

body.light .sucursal-wrap svg {
  stroke: #6b778c;
}

body.light .sucursal-label {
  color: #6b778c;
}

body.light .sucursal-select {
  background-color: #fff;
  border-color: #dfe1e6;
  color: #172b4d;
}

body.light .sucursal-select option {
  background: #fff;
  color: #172b4d;
}

body.light .clock-block {
  background: rgba(9, 30, 66, 0.04);
  border-color: rgba(9, 30, 66, 0.08);
}

body.light .clock-time {
  color: #172b4d;
  text-shadow: none !important;
}

body.light #reloj-ampm {
  color: #6b778c !important;
}

body.light .clock-date {
  color: #6b778c;
}

body.light .input-card {
  background: rgba(9, 30, 66, 0.03);
  border-color: rgba(9, 30, 66, 0.08);
}

body.light .biometric-icon {
  stroke: #6b778c !important;
}

body.light .input-card-label {
  color: #42526e;
}

body.light .input-divider span {
  color: #97a0af;
}

body.light .input-divider::before,
body.light .input-divider::after {
  background: rgba(9, 30, 66, 0.1);
}

body.light .clave-input {
  background: #fff;
  border-color: #dfe1e6;
  color: #172b4d;
}

body.light .clave-input::placeholder {
  color: #97a0af;
}

body.light .clave-input:focus {
  border-color: #0065ff;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}

body.light .stepper-wrap {
  background: rgba(9, 30, 66, 0.03);
  border-color: rgba(9, 30, 66, 0.08);
}

body.light .stepper::before {
  background: rgba(9, 30, 66, 0.1);
}

body.light .step-dot {
  background: rgba(9, 30, 66, 0.06);
  border-color: rgba(9, 30, 66, 0.15);
}

body.light .step.done .step-dot {
  background: #00875a;
  border-color: #00875a;
}

body.light .step.active .step-dot {
  background: #0052cc;
  border-color: #0065ff;
}

body.light .step-label {
  color: #97a0af;
}

body.light .step.done .step-label {
  color: #00875a;
}

body.light .step.active .step-label {
  color: #0052cc;
}

body.light .step-time {
  color: #6b778c;
}

body.light .step.done .step-time {
  color: #00875a;
}

body.light .feedback-card {
  background: rgba(9, 30, 66, 0.03);
  border-color: rgba(9, 30, 66, 0.08);
}

body.light .feedback-tipo {
  color: #6b778c;
}

body.light .feedback-nombre {
  color: #172b4d;
}

body.light .aviso-viewer {
  background: rgba(9, 30, 66, 0.04);
}

body.light .aviso-placeholder-dark svg {
  stroke: rgba(9, 30, 66, 0.12);
}

body.light .aviso-placeholder-dark p {
  color: rgba(9, 30, 66, 0.25);
}

body.light .aviso-caption {
  background: rgba(9, 30, 66, 0.03);
  border-top-color: rgba(9, 30, 66, 0.08);
  color: #344563;
}

body.light .aviso-footer {
  border-top-color: rgba(9, 30, 66, 0.08);
}

body.light .aviso-progress {
  background: rgba(9, 30, 66, 0.08);
}

body.light .aviso-nav-hint {
  color: #97a0af;
}

body.light .aviso-dot {
  background: rgba(9, 30, 66, 0.15);
}

body.light .aviso-dot.active {
  background: #ff8b00;
}

body.light .reg-empty {
  color: #97a0af;
}

body.light .reg-row {
  border-bottom-color: rgba(9, 30, 66, 0.07);
}

body.light .reg-row:hover {
  background: rgba(9, 30, 66, 0.03);
}

body.light .reg-nombre {
  color: #172b4d;
}

body.light .reg-id-time {
  color: #6b778c;
}

body.light .st-tiempo {
  background: #e3fcef;
  color: #006644;
}

body.light .st-retardo {
  background: #fffae6;
  color: #974f00;
}

body.light .st-falta {
  background: #ffebe6;
  color: #bf2600;
}

body.light .reg-count-label {
  color: #172b4d;
}

body.light .statusbar {}

body.light .status-text {
  color: #6b778c;
}

body.light .tweaks-panel {
  background: rgba(255, 255, 255, 0.97);
  border-color: #dfe1e6;
  box-shadow: 0 4px 16px rgba(9, 30, 66, 0.12);
}

body.light .tweaks-title {
  color: #6b778c;
  border-bottom-color: #ebecf0;
}

body.light .tweaks-title button {
  color: #97a0af;
}

body.light .tweak-row label {
  color: #6b778c;
}

body.light .tweak-row select {
  background: #f4f5f7;
  border-color: #dfe1e6;
  color: #172b4d;
}

body.light .tweak-row select option {
  background: #fff;
  color: #172b4d;
}

body.light .tweak-toggle {
  color: #42526e;
}

body.light .toggle-sw {
  background: #dfe1e6;
}

body.light .toggle-sw.on {
  background: #0052cc;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.reg-row:nth-child(1) {
  animation-delay: 0ms;
}

.reg-row:nth-child(2) {
  animation-delay: 25ms;
}

.reg-row:nth-child(3) {
  animation-delay: 50ms;
}

.reg-row:nth-child(4) {
  animation-delay: 75ms;
}

.reg-row:nth-child(5) {
  animation-delay: 100ms;
}

.reg-row:nth-child(6) {
  animation-delay: 125ms;
}

.reg-row:nth-child(7) {
  animation-delay: 150ms;
}

.reg-row:nth-child(8) {
  animation-delay: 175ms;
}

.reg-row:nth-child(9) {
  animation-delay: 200ms;
}

.reg-row:nth-child(10) {
  animation-delay: 225ms;
}

.reg-row:nth-child(n+11) {
  animation-delay: 250ms;
}

@media (prefers-reduced-motion: reduce) {

  .reg-row,
  .toast {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .status-dot {
    animation: none;
  }
}