/* Verify — mobile-first PWA. Twilight Hues palette. */
:root {
  --ink: #11151c;
  --navy: #212d40;
  --slate: #364156;
  --mauve: #7d4e57;
  --coral: #d66853;
  --cream: #f3efe7;
  --muted: #9aa3b2;
  --good: #4caf78;
  --warn: #e0a93b;
  --bad: #d66853;
  --radius: 16px;
  font-size: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--cream);
  background: linear-gradient(165deg, #11151c 0%, #212d40 55%, #364156 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }

header.top {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px 18px;
}
header.top .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--coral); display: grid; place-items: center;
  font-weight: 800; color: var(--ink); font-size: 20px;
}
header.top h1 { font-size: 21px; margin: 0; letter-spacing: .3px; }
header.top .mode {
  margin-left: auto; font-size: 12px; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap;
}
header.top .mode.live { color: var(--good); background: rgba(76,175,120,.14); }

.card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 19px; }
.card p.sub { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

.step-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 1px;
}
.step-badge b { color: var(--coral); }

button, .btn {
  font: inherit; font-weight: 650; cursor: pointer; border: none;
  border-radius: 12px; padding: 15px 18px; width: 100%;
  background: var(--coral); color: var(--ink);
  transition: transform .08s ease, opacity .15s ease;
}
button:active { transform: scale(.985); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: rgba(255,255,255,.07); color: var(--cream); }
button.ghost:active { background: rgba(255,255,255,.12); }
.btn-row { display: flex; gap: 10px; }
.btn-row button { width: auto; flex: 1; }

label.file {
  display: block; text-align: center; padding: 22px;
  border: 1.5px dashed rgba(214,104,83,.55); border-radius: 14px;
  color: var(--cream); cursor: pointer; margin-bottom: 14px;
}
label.file small { display: block; color: var(--muted); margin-top: 6px; font-size: 13px; }
input[type=file] { display: none; }

.items { list-style: none; margin: 0; padding: 0; }
.items li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.07);
}
.items li:last-child { border-bottom: none; }
.items .desc { flex: 1; font-size: 15.5px; line-height: 1.3; }
.items .desc small { color: var(--muted); display: block; font-size: 12.5px; }
.items .qty {
  font-weight: 750; font-size: 17px; min-width: 58px; text-align: right;
}
.items .qty input {
  width: 54px; font: inherit; font-weight: 700; text-align: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: var(--cream); padding: 6px 4px;
}

video.preview {
  width: 100%; border-radius: 14px; background: #000; aspect-ratio: 3/4;
  object-fit: cover; margin-bottom: 12px;
}
.rec-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.rec-dot.on { background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.checklist { margin: 4px 0 14px; }
.checklist .chk {
  display: inline-block; font-size: 13px; padding: 5px 10px; margin: 0 6px 6px 0;
  border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted);
}
.checklist .chk.heard { background: rgba(76,175,120,.16); color: var(--good); }

.transcript {
  background: rgba(0,0,0,.22); border-radius: 12px; padding: 12px 14px;
  font-size: 14.5px; line-height: 1.5; min-height: 60px; color: var(--cream);
  white-space: pre-wrap; margin-bottom: 12px;
}
.transcript .interim { color: var(--muted); }
textarea.manual {
  width: 100%; min-height: 90px; font: inherit; font-size: 15px;
  background: rgba(0,0,0,.22); color: var(--cream); border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1); padding: 12px 14px; resize: vertical;
}

.result-head { text-align: center; padding: 6px 0 14px; }
.result-head .ring {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 38px;
  border: 3px solid;
}
.result-head .ring.clean { border-color: var(--good); color: var(--good); }
.result-head .ring.flag { border-color: var(--coral); color: var(--coral); }
.result-head h2 { margin: 0 0 4px; }
.result-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.recon { list-style: none; margin: 0; padding: 0; }
.recon li {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.recon li:last-child { border-bottom: none; }
.recon .tag {
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 7px;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.tag.matched { background: rgba(76,175,120,.18); color: var(--good); }
.tag.qty_mismatch { background: rgba(224,169,59,.18); color: var(--warn); }
.tag.not_mentioned { background: rgba(214,104,83,.18); color: var(--coral); }
.tag.extra_item { background: rgba(125,78,87,.3); color: #e6b8c0; }
.recon .info { flex: 1; }
.recon .info b { font-size: 15px; font-weight: 600; }
.recon .info small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.recon .counts { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap; }

.meta-line { font-size: 12.5px; color: var(--muted); margin: 2px 0; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; padding: 30px 10px; color: var(--muted); }

.history { font-size: 14px; }
.history a { display: flex; gap: 10px; align-items: center; padding: 10px 0; color: var(--cream); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.06); }
.history a:last-child { border-bottom: none; }
.history .pill { width: 9px; height: 9px; border-radius: 50%; }
.history .pill.clean { background: var(--good); }
.history .pill.flag { background: var(--coral); }
.history .pill.pending { background: var(--muted); }
.history .ago { margin-left: auto; color: var(--muted); font-size: 12px; }

.hidden { display: none !important; }
.error { background: rgba(214,104,83,.16); color: #f0c2b8; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
