/* Mobile-first, dark by default: this page is used one-handed, in a store,
   held up at shelf height. Big targets, high contrast, nothing below the fold
   that matters during a pitch. */

:root {
  --bg: #0b0f14;
  --surface: #151b23;
  --surface-2: #1e262f;
  --border: #2a343f;
  --text: #e8eef5;
  --muted: #94a3b2;
  --accent: #3b82f6;
  --accent-press: #2563eb;
  --live: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* The page is a camera viewfinder; rubber-banding it is disorienting. */
  overscroll-behavior: none;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 18px;
}

.wordmark { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.wordmark span { color: var(--muted); font-weight: 450; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-transform: uppercase;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  /* 16px keeps iOS Safari from zooming the viewport on focus. */
  font-size: 16px;
}

input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:active { background: var(--accent-press); }
button:disabled { opacity: 0.5; cursor: default; }
button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--danger); }

.video-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
.dot.warn { background: var(--warn); }
.dot.error { background: var(--danger); }

@keyframes pulse { 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .dot.live { animation: none; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.stat { background: var(--surface); padding: 11px 13px; }
.stat dt { margin: 0 0 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat dd { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat dd.ok { color: var(--live); }
.stat dd.warn { color: var(--warn); }
.stat dd.bad { color: var(--danger); }

.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.qr svg { width: 200px; height: 200px; border-radius: 10px; }
.qr .hint { font-size: 13px; color: var(--muted); max-width: 34ch; }

.link-row { display: flex; gap: 8px; }
.link-row button { flex: 1; font-size: 15px; padding: 12px; }

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.notice.error { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #fecaca; }
.notice.warn  { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.4); color: #fde68a; }
.notice.info  { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.4); color: #bfdbfe; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 13px; }

[hidden] { display: none !important; }

footer { text-align: center; padding: 22px 0 8px; font-size: 12px; color: var(--muted); }
