* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
  padding: 24px 14px;
}
.container {
  max-width: 560px;
  margin: 0 auto;
  background: #1e293b;
  border-radius: 16px;
  padding: 24px;
}
.container.narrow { max-width: 380px; }
h1 { margin: 0 0 6px; font-size: 22px; }
.nav { margin: 0 0 18px; font-size: 14px; }
.nav a { color: #38bdf8; text-decoration: none; }
.form-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row input {
  flex: 1 1 160px;
  padding: 11px 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 15px;
}
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.prompt { margin: 14px 0 6px; font-weight: 600; color: #93c5fd; }
.btn-row { display: flex; gap: 10px; }
button {
  flex: 1;
  margin-top: 14px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: #16a34a; }
button:disabled { background: #475569; cursor: not-allowed; }
.status { margin-top: 12px; font-size: 14px; color: #94a3b8; }
.result { margin-top: 10px; padding: 12px; border-radius: 10px; font-weight: 600; }
.result.ok   { background: #052e1a; color: #4ade80; }
.result.warn { background: #3a2c05; color: #fbbf24; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #334155; vertical-align: middle; }
th { color: #94a3b8; font-weight: 600; }
.badge { background: #052e1a; color: #4ade80; padding: 3px 9px; border-radius: 999px; font-size: 12px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }

/* --- report v3 additions --- */
.container.wide { max-width: 820px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  background: #0f172a; padding: 14px; border-radius: 12px; margin-bottom: 14px;
}
.filters label { font-size: 12px; color: #94a3b8; display: flex; flex-direction: column; gap: 4px; }
.filters input, .filters select {
  padding: 9px 10px; border: 1px solid #334155; border-radius: 9px;
  background: #1e293b; color: #e2e8f0; font-size: 14px;
}
.filters button { flex: 0 0 auto; margin-top: 0; padding: 10px 16px; }
.btn-link {
  display: inline-block; padding: 10px 14px; border-radius: 9px; margin-top: 0;
  background: #334155; color: #e2e8f0; text-decoration: none; font-size: 14px; font-weight: 600;
}
.btn-link.export { background: #16a34a; color: #fff; }
.btn-link.disabled { opacity: .4; cursor: not-allowed; }
button.del {
  background: #7f1d1d; color: #fecaca; padding: 7px 12px; font-size: 13px; margin-top: 0; width: auto;
}
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.page-info { font-size: 14px; color: #94a3b8; }
.badge.guest { background: #2a1e05; color: #fbbf24; }

/* --- v4 additions --- */
.clock {
  text-align: center; font-size: 15px; font-weight: 600; color: #93c5fd;
  background: #0f172a; padding: 10px; border-radius: 10px; margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.waiting { margin-top: 8px; font-size: 15px; font-weight: 600; color: #fbbf24; min-height: 20px; }

/* --- v5 additions: start gate, banner, employee actions --- */
.start-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(2, 6, 23, 0.85); z-index: 5;
}
.start-overlay p { margin: 0; font-size: 13px; color: #94a3b8; }
#startBtn { width: auto; padding: 16px 28px; font-size: 18px; }

.banner {
  display: none; margin: 12px 0; padding: 18px; border-radius: 14px;
  text-align: center; font-size: 18px; line-height: 1.4;
}
.banner.show { display: block; animation: pop .25s ease-out; }
.banner.ok   { background: #052e1a; color: #4ade80; border: 2px solid #16a34a; }
.banner.warn { background: #3a2c05; color: #fbbf24; border: 2px solid #b45309; }
.banner strong { font-size: 26px; display: inline-block; }
.banner .sub { font-size: 15px; opacity: .9; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-link.warn-link { background: #92400e; color: #fde68a; }
