/* Pack Check packer UI — section 14 of the build guide / the prototype. */
:root {
  --ink: #16181D; --muted: #4A4D55; --soft: #6B6E76; --body: #2A2C33;
  --ground: #F2F1EC; --card: #FFFFFF; --key: #F7F6F2; --line: #D4D1C7; --line-strong: #9A978C;
  --green: #127A3E; --green-bg: #E7F4EC; --green-ink: #0B4F28; --green-dot: #3FBF6F;
  --red: #C2261C; --red-bg: #FBE9E7; --red-ink: #8A1A12;
  --amber: #B45309; --amber-bg: #FDEFD9; --amber-bg2: #FFF6E5; --amber-ink: #7A3E06; --amber-pill: #F5B759;
  --blue: #1F4FD1; --blue-bg: #E3E8F8; --blue-ink: #1F3A8A;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); }
body { font-family: var(--sans); color: var(--ink); -webkit-user-select: none; user-select: none;
       -webkit-tap-highlight-color: transparent; overflow: hidden; }
button { font-family: inherit; cursor: pointer; color: var(--ink); touch-action: manipulation; }
button:focus { outline: none; }
button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
img { display: block; }
.mono { font-family: var(--mono); }

#app { width: 1280px; height: 800px; display: flex; flex-direction: column; background: var(--ground); overflow: hidden; margin: 0 auto; }
.dev #app { height: 880px; }
.dev body, body.dev { overflow: auto; }

/* ── Header ─────────────────────────────────────────────────────────── */
.hdr { height: 64px; flex-shrink: 0; padding: 0 28px; display: flex; align-items: center; gap: 18px;
       background: var(--ink); color: var(--ground); }
.hdr .brand { font-size: 21px; font-weight: 700; letter-spacing: .02em; }
.hdr .sep { width: 1px; height: 26px; background: #3A3D45; }
.hdr .station { font-size: 17px; color: var(--line); }
.hdr .who { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.badge-i { width: 32px; height: 32px; border-radius: 16px; background: var(--amber-pill); color: var(--ink);
           font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hdr .switch { height: 36px; padding: 0 14px; border: 1px solid var(--soft); border-radius: 8px; background: transparent;
               color: var(--ground); font-size: 15px; font-weight: 600; }
.hdr .grow { flex-grow: 1; }
.pill-review { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
               background: var(--amber-pill); color: var(--ink); font-size: 15px; font-weight: 600; }
.sync { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--line); }
.sync .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--green-dot); flex-shrink: 0; }
.sync.amber .dot { background: var(--amber-pill); }
.sync.red { color: #FFB4AC; font-weight: 600; }
.sync.red .dot { background: #FF5A4E; }
.net-off { padding: 6px 12px; border-radius: 8px; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; }

.main { flex-grow: 1; min-height: 0; display: flex; }

/* ── Generic buttons ───────────────────────────────────────────────── */
.btn { height: 56px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); font-size: 17px; font-weight: 600; padding: 0 16px; }
.btn.dark { background: var(--ink); color: #fff; border: none; }
.btn.green { background: var(--green); color: #fff; border: none; }
.btn.amber { background: var(--amber); color: #fff; border: none; }
.btn.amber.off { background: #C9A27A; }
.btn.outline { border: 2px solid var(--line-strong); }
.btn.outline-red { border: 2px solid var(--red); color: var(--red-ink); }
.btn.outline-amber { border: 2px solid var(--amber); color: var(--amber-ink); }
.btn.link { border: none; background: transparent; color: var(--blue); height: 40px; }
.btn.sm { height: 46px; font-size: 16px; }
.btn.xs { height: 38px; font-size: 15px; padding: 0 14px; border-radius: 8px; }
.err { padding: 8px 12px; border-radius: 8px; background: var(--red-bg); color: var(--red-ink); font-size: 15px; font-weight: 600; }

/* ── Sign-in ───────────────────────────────────────────────────────── */
.signin { flex-grow: 1; padding: 40px 56px; display: flex; gap: 48px; align-items: center; }
.signin .left { flex-grow: 1; display: flex; flex-direction: column; gap: 22px; }
h1 { margin: 0; font-weight: 700; }
.signin h1 { font-size: 44px; }
.lead { margin: 0; font-size: 20px; color: var(--muted); }
.packers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.packer { height: 112px; border-radius: 14px; border: 3px solid var(--line); background: var(--card); display: flex;
          align-items: center; gap: 16px; padding: 0 20px; text-align: left; }
.packer.on { border-color: var(--amber); background: var(--amber-bg2); }
.packer .ini { width: 56px; height: 56px; flex-shrink: 0; border-radius: 28px; background: #E9E7E0; font-size: 20px;
               font-weight: 700; display: flex; align-items: center; justify-content: center; }
.packer.on .ini { background: var(--amber-pill); }
.packer .nm { font-size: 22px; font-weight: 600; }
.pinpad { width: 380px; flex-shrink: 0; padding: 26px; background: var(--card); border: 2px solid var(--line);
          border-radius: 18px; display: flex; flex-direction: column; gap: 16px; opacity: .55; }
.pinpad.on { border-color: var(--amber); opacity: 1; }
.pinpad .title { font-size: 22px; font-weight: 700; }
.dots { display: flex; gap: 16px; justify-content: center; padding: 6px 0; }
.dots span { width: 22px; height: 22px; border-radius: 11px; border: 3px solid var(--ink); }
.dots span.f { background: var(--ink); }
.shake .dots { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key { height: 64px; border-radius: 10px; border: 2px solid var(--line); background: var(--key); font-family: var(--mono);
       font-size: 28px; font-weight: 600; }
.key.alt { background: var(--card); border-color: var(--line-strong); font-size: 24px; }
.key.word { font-family: var(--sans); font-size: 16px; }
.key.go { background: var(--green); border-color: var(--green); color: #fff; font-family: var(--sans); font-size: 18px; }
.keys.small .key { height: 52px; font-size: 26px; }
.keys.mid .key { height: 58px; font-size: 26px; }
.keys.small .key.go, .keys.mid .key.go { font-size: 18px; }

/* ── Home / centered screens ───────────────────────────────────────── */
.center { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px; }
.scan-tile { width: 160px; height: 160px; border-radius: 24px; background: var(--card); border: 2px solid var(--line);
             display: flex; align-items: center; justify-content: center; }
.hi { font-size: 22px; color: var(--muted); }
.center h1 { font-size: 46px; letter-spacing: -.01em; text-align: center; }
.note-amber { margin-top: 10px; padding: 14px 20px; background: var(--amber-bg); border: 2px solid var(--amber);
              border-radius: 10px; font-size: 17px; color: var(--amber-ink); font-weight: 500; max-width: 900px; }
.note-red { margin-top: 10px; padding: 14px 20px; background: var(--red-bg); border: 2px solid var(--red);
            border-radius: 10px; font-size: 18px; color: var(--red-ink); font-weight: 600; max-width: 900px; text-align: center; }
.shift { margin-top: 10px; padding: 12px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
         font-size: 17px; color: var(--muted); }
.shift b { font-family: var(--mono); color: var(--ink); }
.gate { max-width: 760px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.gate .row { display: flex; gap: 14px; }
.gate .detail { font-size: 22px; color: var(--body); }

/* ── Order screen ──────────────────────────────────────────────────── */
.order { flex-grow: 1; min-height: 0; padding: 18px 28px; display: flex; gap: 24px; }
.list { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.ohead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 2px; }
.ohead .lbl { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.ohead .row { display: flex; align-items: center; gap: 16px; }
.ohead .ono { font-family: var(--mono); font-size: 30px; font-weight: 700; }
.ohead .ship { font-size: 16px; color: var(--muted); }
.progress { width: 240px; display: flex; flex-direction: column; gap: 8px; }
.progress .t { font-size: 18px; font-weight: 600; text-align: right; }
.bar { height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.bar div { height: 14px; background: var(--green); transition: width .15s; }
.banner { padding: 10px 14px; border-radius: 10px; font-size: 16px; font-weight: 600; }
.banner.amber { background: var(--amber-bg); border: 2px solid var(--amber); color: var(--amber-ink); }
.banner.red { background: var(--red-bg); border: 2px solid var(--red); color: var(--red-ink); }

.item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.item.part { border-color: var(--blue); }
.item.done { background: var(--green-bg); border-color: var(--green); }
.thumb { width: 96px; height: 96px; flex-shrink: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden;
         display: flex; align-items: center; justify-content: center; }
.thumb img { width: 94px; height: 94px; object-fit: contain; }
.item .info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item .name { font-size: 18px; font-weight: 600; line-height: 1.25; }
.tag { display: inline-flex; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.tag.scan { background: var(--blue-bg); color: var(--blue-ink); }
.tag.photo { background: var(--amber-bg); color: var(--amber-ink); }
.tag.review { background: var(--amber-pill); color: var(--ink); }
.codes { display: flex; gap: 16px; font-family: var(--mono); font-size: 15px; }
.codes b { font-weight: 700; }
.codes .none { color: var(--amber-ink); }
.count { width: 86px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.count .n { font-family: var(--mono); font-size: 26px; font-weight: 700; white-space: nowrap; }
.count .n span { color: var(--soft); font-weight: 500; }
.count .s { font-size: 14px; font-weight: 600; color: var(--muted); }
.item.done .count .s { color: var(--green); }
.act { width: 138px; flex-shrink: 0; display: flex; justify-content: flex-end; }
.check { width: 48px; height: 48px; border-radius: 24px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.btn-check { height: 52px; padding: 0 16px; border: none; border-radius: 10px; background: var(--amber); color: #fff; font-size: 17px; font-weight: 600; }
.btn-nobc { height: 52px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 600; }

.side { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.panel { padding: 22px 24px; background: var(--card); border: 3px solid var(--line-strong); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel.blue { border-color: var(--blue); padding: 18px 20px; }
.panel.amber { border-color: var(--amber); padding: 20px 22px; gap: 12px; }
.panel.dark { border-color: var(--ink); gap: 14px; }
.panel .h { font-size: 21px; font-weight: 700; }
.panel .p { font-size: 15px; line-height: 1.4; color: var(--body); }
.entry { height: 64px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--ink); background: var(--key); display: flex;
         align-items: center; font-family: var(--mono); font-size: 32px; font-weight: 700; }
.entry.ph { color: var(--line-strong); }
.fb { padding: 22px 24px; border-radius: 16px; border: 3px solid var(--line-strong); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.fb.ok { background: var(--green-bg); border-color: var(--green); }
.fb.bad { background: var(--red-bg); border-color: var(--red); }
.fb.note { background: var(--amber-bg2); border-color: var(--amber); }
.fb .lbl { font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.fb.ok .lbl, .fb.ok .ttl { color: var(--green-ink); }
.fb.bad .lbl, .fb.bad .ttl { color: var(--red-ink); }
.fb.note .lbl, .fb.note .ttl { color: var(--amber-ink); }
.fb .top { display: flex; gap: 14px; align-items: center; }
.fb .top img { width: 84px; height: 84px; flex-shrink: 0; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.fb .ttl { font-size: 25px; font-weight: 700; line-height: 1.2; }
.fb .dtl { font-size: 17px; line-height: 1.4; color: var(--body); }
.fb .flag { padding: 10px 12px; border-radius: 8px; background: var(--amber-bg); color: var(--amber-ink); font-size: 15px; font-weight: 500; line-height: 1.4; }
.fb .ovr { height: 48px; border: 2px solid var(--red-ink); border-radius: 10px; background: #fff; color: var(--red-ink); font-size: 17px; font-weight: 600; }
.confirm { padding: 14px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 10px; }
.confirm .h { font-size: 18px; font-weight: 700; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; text-align: left; min-height: 56px; }
.pick img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.pick .nm { flex-grow: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pick .q { font-family: var(--mono); font-size: 13px; color: var(--muted); flex-shrink: 0; }
.small-lbl { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.miss { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--amber-bg2); border: 1px solid var(--amber-pill); }
.miss img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 6px; }
.miss .nm { flex-grow: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.miss .q { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--amber-ink); flex-shrink: 0; }
.reason { height: 46px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; }
.reason.on { border-color: var(--amber); background: var(--amber-bg2); }
.ready { padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; }
.ready .t { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; }
.ready .t span:first-child { width: 12px; height: 12px; border-radius: 6px; background: var(--green-dot); }
.ready .d { font-size: 16px; line-height: 1.45; color: var(--muted); }

/* ── Photo screen ──────────────────────────────────────────────────── */
.photoscr { flex-grow: 1; display: flex; gap: 28px; align-items: stretch; min-width: 0; }
.bigphoto { width: 600px; flex-shrink: 0; padding: 0; border: 4px solid var(--green); border-radius: 20px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.bigphoto img { width: 592px; height: 592px; object-fit: contain; background: #fff; }
.bigphoto .strip { flex-grow: 1; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--green); color: #fff; font-size: 22px; font-weight: 700; }
.bigphoto.view { border-color: var(--line-strong); cursor: default; }
.bigphoto.view .strip { background: var(--line-strong); }
.pside { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pside .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pside .why { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--amber-ink); }
.btn-bc { flex-shrink: 0; height: 40px; padding: 0 12px; border: 2px solid var(--blue); border-radius: 8px; background: #fff; color: var(--blue-ink); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pside .pname { font-size: 30px; font-weight: 700; line-height: 1.2; }
.pside .codes { font-size: 18px; gap: 18px; }
.qtybox { padding: 14px 16px; border-radius: 12px; background: #fff; border: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.qtybox.multi { border-color: var(--amber); }
.qtybox .c { font-size: 20px; }
.qtybox .c b { font-family: var(--mono); }
.units { display: flex; gap: 10px; flex-wrap: wrap; }
.unit { width: 52px; height: 52px; border-radius: 10px; border: 3px solid var(--line); background: var(--key); display: flex; align-items: center; justify-content: center;
        font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--soft); }
.unit.done { background: var(--green); border-color: var(--green); color: #fff; }
.unit.next { background: var(--amber-bg2); border-color: var(--amber); color: var(--amber-ink); }
.pnote { padding: 12px 14px; border-radius: 10px; background: var(--amber-bg); color: var(--amber-ink); font-size: 16px; font-weight: 500; line-height: 1.4; }
.look { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--red-bg); border: 2px solid var(--red); }
.look .im { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.look .im img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; }
.look .im > svg { position: absolute; left: 0; top: 0; }
.look .t { font-size: 15px; font-weight: 700; color: var(--red-ink); }
.look .d { font-size: 15px; line-height: 1.4; color: var(--body); }
.grow { flex-grow: 1; }
.bcpanel { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 3px solid var(--blue); border-radius: 14px; background: #fff; }
.bcpanel .h { font-size: 20px; font-weight: 700; }
.bcpanel .entry { height: 58px; font-size: 28px; }
.fb .top .placeholder, .pick .placeholder, .miss .placeholder { width: 84px; height: 84px; flex-shrink: 0; border-radius: 10px; }
.pick .placeholder, .miss .placeholder { width: 44px; height: 44px; }
.look .im .placeholder { width: 96px; height: 96px; border-radius: 8px; }
.bigphoto .placeholder { width: 592px; height: 592px; }
.placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--key); color: var(--line-strong); }

/* ── Done ──────────────────────────────────────────────────────────── */
.done-scr { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px; background: var(--green-bg); }
.done-scr.short { background: var(--amber-bg2); }
.done-scr .circle { width: 140px; height: 140px; border-radius: 70px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.done-scr.short .circle { background: var(--amber); }
.done-scr h1 { font-size: 54px; color: var(--green-ink); }
.done-scr.short h1 { color: var(--amber-ink); }
.done-scr .sum { font-size: 23px; }
.done-scr .sum b { font-family: var(--mono); font-weight: 600; }
.done-scr .rsn { font-size: 19px; color: var(--body); }
.done-scr .by { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 12px; background: #fff; border: 2px solid var(--green); font-size: 20px; }
.done-scr .by .badge-i { width: 36px; height: 36px; border-radius: 18px; font-size: 15px; }
.done-scr p { margin: 0; font-size: 20px; color: var(--body); }

/* ── Station setup ─────────────────────────────────────────────────── */
.setup { margin: auto; width: 520px; padding: 32px; background: #fff; border: 2px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; gap: 16px; }
.setup label { display: flex; flex-direction: column; gap: 6px; font-size: 16px; font-weight: 600; }
.setup input { height: 56px; border-radius: 10px; border: 2px solid var(--ink); padding: 0 14px; font-size: 20px; font-family: var(--sans); }

/* ── Dev-only simulate-scan bar (?dev=1) ───────────────────────────── */
.devbar { height: 80px; flex-shrink: 0; padding: 0 24px; border-top: 2px dashed var(--line-strong); display: flex; align-items: center; gap: 10px; }
.devbar .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); width: 120px; line-height: 1.35; }
.devbar button { height: 46px; padding: 0 14px; border: none; border-radius: 8px; color: #fff; font-size: 15px; font-weight: 600; background: var(--ink); }
.devbar .b { background: var(--blue); }
.devbar .r { background: var(--red); }
.devbar input { height: 46px; width: 200px; border: 2px solid var(--ink); border-radius: 8px; padding: 0 10px; font-family: var(--mono); font-size: 16px; }
