/* Laser Wraps Intake — daylight-first industrial UI.
   High contrast for shop/outdoor light; big glove-friendly tap targets (min 56px). */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #10151b;
  --muted: #5b6773;
  --line: #d7dde3;
  --primary: #f25c05;     /* hi-vis safety orange — the do-it action */
  --primary-ink: #fff;
  --accent: #0b5fff;
  --green: #18a558;
  --amber: #e8a200;
  --red: #e23b3b;
  --grey: #9aa6b2;
  --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.45 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen { max-width: 720px; margin: 0 auto; padding: 16px; min-height: 100%; }

h1 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; }
h2.sub { font-size: 0.95rem; color: var(--muted); margin: 22px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.muted { color: var(--muted); }
.hdr { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 14px; }
.date { color: var(--muted); font-variant-numeric: tabular-nums; }
.kicker { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }

/* buttons */
.btn { display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; padding: 14px 18px; margin: 8px 0; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); border-radius: var(--radius); font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.btn small { font-weight: 500; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.btn.big { min-height: 68px; font-size: 1.15rem; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary small { color: rgba(255,255,255,0.85); }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { background: transparent; border: none; color: var(--muted); min-height: 44px; }
.btn.small { min-height: 44px; width: auto; padding: 8px 14px; font-size: 0.9rem; }
.btn.light { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.3); }
.btn.chip { background: var(--surface); }
.btn[disabled] { opacity: 0.4; }
.back { background: none; border: none; color: var(--accent); font-size: 1rem; padding: 8px 0; cursor: pointer; }
.back.light { color: #fff; font-size: 1.6rem; line-height: 1; padding: 4px 10px; }

/* banners + pills */
.banner { padding: 10px 14px; border-radius: 10px; margin: 8px 0; font-size: 0.92rem; }
.banner.ok { background: #e7f6ee; color: #0c6b3c; }
.banner.warn { background: #fdecec; color: #9c1f1f; }
.banner.amber { background: #fff4d6; color: #7a5600; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.pill.green { background: #e7f6ee; color: #0c6b3c; }
.pill.amber { background: #fff4d6; color: #7a5600; }
.pill.red { background: #fdecec; color: #b12020; }

/* lists / rows */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 14px 16px; min-height: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; text-align: left; }
.row.static { cursor: default; }
.row.attention { border-left: 4px solid var(--red); }
.row-main { display: flex; flex-direction: column; }
.row-main b { font-size: 1.05rem; }
.row-main span { color: var(--muted); font-size: 0.9rem; }

/* confirm + gate + done */
.confirm, .gate, .done { text-align: center; padding: 18px 6px; }
.bigname { font-size: 1.35rem; font-weight: 700; margin: 6px 0; letter-spacing: -0.01em; }
.plate { color: var(--muted); font-variant-numeric: tabular-nums; }
.choices { margin: 22px 0 10px; }
.big-ok { font-size: 1.5rem; font-weight: 800; color: var(--green); margin: 24px 0 6px; }
.big-wait { font-size: 1.5rem; font-weight: 800; color: var(--amber); margin: 24px 0 6px; }
.stat { color: var(--muted); margin: 6px 0; }

/* camera screen */
.cam { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Camera viewfinder outline — scoped class so it never collides with the .btn.ghost button modifier
   (an unqualified `.ghost` here used to land position:absolute + pointer-events:none on every ghost
   button: the "Wrong car" / "Can't get it" back-outs floated over other elements and were untappable). */
.viewfinder { position: absolute; inset: 12% 7% 20%; border: 2px dashed rgba(255,255,255,0.55); border-radius: 16px; pointer-events: none; }
.cam-top { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; background: linear-gradient(rgba(0,0,0,0.55), transparent); color: #fff; }
.prompt { flex: 1; text-align: center; }
.shotlabel { font-size: 1.15rem; font-weight: 700; }
.shothint { font-size: 0.85rem; opacity: 0.85; }
.counter { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 44px; text-align: right; }
.cam-bottom { position: relative; z-index: 2; margin-top: auto;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(transparent, rgba(0,0,0,0.6)); }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.thumb { position: relative; flex: 0 0 auto; }
.thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #000; }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.grey { background: var(--grey); }
.controls { display: flex; align-items: center; justify-content: space-between; }
.slot-left, .slot-right { flex: 1; display: flex; }
.slot-right { justify-content: flex-end; }
.shutter { width: 74px; height: 74px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,0.55); cursor: pointer; }
.shutter:disabled { opacity: 0.6; }
.cam-status { position: absolute; z-index: 3; top: 42%; left: 0; right: 0; text-align: center; color: #fff;
  font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.7); pointer-events: none; }

/* review grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.cell { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell.superseded { opacity: 0.4; }
.cell .dot { right: 6px; bottom: 6px; }
.cell .flag { position: absolute; top: 4px; left: 6px; color: #fff; background: var(--amber); width: 18px; height: 18px;
  border-radius: 50%; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.cell .retake { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.55); color: #fff; border: none;
  width: 28px; height: 28px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.celllabel { position: absolute; left: 4px; bottom: 4px; color: #fff; font-size: 0.62rem; background: rgba(0,0,0,0.5);
  padding: 1px 5px; border-radius: 6px; max-width: 86%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A drop-off corner marked unavailable: a documented absence (no image) shown in the review grid. */
.cell.skip-cell { background: #fff4d6; border: 1px dashed var(--amber); display: grid; place-items: center; }
.cell.skip-cell .skip-mark { color: #7a5600; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.06em; }
.cell.skip-cell .celllabel { background: rgba(122,86,0,0.85); }

/* signature pad (Tier-A drop-off) */
.sig-screen { padding: 6px 2px 18px; }
.sig-screen h1 .muted { font-size: 1rem; font-weight: 500; }
.sigpad-host { margin: 16px 0 8px; }
.sigpad { display: block; width: 100%; height: 200px; background: #fff; border: 2px dashed var(--line);
  border-radius: var(--radius); touch-action: none; cursor: crosshair; }
.sig-actions { display: flex; gap: 10px; margin-top: 8px; }
.sig-actions .btn { flex: 1; width: auto; margin: 0; }

/* modal sheet */
.modal { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; }
.sheet { background: var(--surface); width: 100%; max-width: 720px; margin: 0 auto; padding: 22px 18px calc(env(safe-area-inset-bottom) + 22px);
  border-radius: 18px 18px 0 0; text-align: center; }
.sheet h3 { margin: 0 0 6px; }
