/* NWS Pack: tower half-screen app (designed for ~960 x 1040, works 900-1000 wide). Palette = Hard Reset / iPad app. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 18px/1.35 "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif; color: #1d2b26; background: #f5f3ee; min-height: 100vh; }
button { font: inherit; border-radius: 12px; border: 2px solid #b9c4bf; background: #fff; color: #1d2b26; padding: 10px 18px; cursor: pointer; }
button:active { transform: translateY(1px); }
button.primary { background: #2f5d50; border-color: #2f5d50; color: #fff; font-weight: 700; }
button.big { font-size: 24px; padding: 16px 28px; border-radius: 16px; width: 100%; }
button[disabled] { opacity: .45; cursor: default; }
.muted { color: #6a7772; } .center { text-align: center; } .pad { padding: 40px 16px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; background: #fff; border-bottom: 1px solid #ddd; height: 64px; padding: 0 16px; }
header .logo { height: 38px; margin-right: 14px; }
header .title { flex: 1; font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: #e8ece9; font-size: 15px; font-weight: 600; margin-left: 8px; border: 0; white-space: nowrap; }
.pill.warn { background: #fff1b8; color: #6b5200; }
.whobtn { cursor: pointer; } .whobtn b { margin-left: 4px; }
main { padding: 14px 16px 40px; }
#scan { position: fixed; left: -400px; top: 0; width: 200px; opacity: 0; }

/* ---------- queue ---------- */
.qhead { display: flex; align-items: baseline; margin: 2px 2px 12px; }
.qhead h1 { margin: 0; font-size: 26px; } .qhead .muted { margin-left: 12px; font-size: 15px; flex: 1; }
.row { display: block; width: 100%; text-align: left; background: #fff; border: 2px solid #dfe5e1; border-left: 10px solid #cfd8d3; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
.row:hover { border-color: #b9c9c0; }
.row .l1, .row .l2 { display: flex; align-items: center; }
.row .num { font-size: 26px; font-weight: 800; margin-right: 14px; min-width: 150px; }
.row .store { flex: 1; font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .l2 { margin-top: 8px; }
.thumbs { display: flex; flex: 1; min-height: 52px; }
.thumbs img, .thumbs .ph { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; margin-right: 6px; background: #eef0ee; border: 1px solid #e3e7e4; }
.items { font-size: 24px; font-weight: 800; margin: 0 16px; min-width: 96px; text-align: right; } .items small { font-size: 14px; color: #6a7772; font-weight: 600; margin-left: 4px; }
.chip { display: inline-block; padding: 7px 12px; border-radius: 10px; font-size: 16px; font-weight: 700; background: #e3ece8; color: #2f5d50; white-space: nowrap; }
.chip.unpaid { background: #f9d4d0; color: #8a1c12; } .chip.started, .chip.printed, .chip.scanning { background: #fdecc8; color: #7a4b00; }
.chip.packed { background: #d6efdd; color: #165c2c; } .chip.held { background: #ece5f5; color: #5b2b8a; }
.packer { font-size: 14px; color: #6a7772; margin-left: 10px; min-width: 70px; }
.due { font-size: 16px; font-weight: 800; padding: 5px 10px; border-radius: 8px; text-transform: uppercase; white-space: nowrap; }
.due.late { background: #b3261e; color: #fff; } .due.today { background: #e07b00; color: #fff; } .due.soon { background: #e3ece8; color: #2f5d50; }
.due.later, .due.none { background: #f0f2f0; color: #6a7772; }
.row.late { border-left-color: #b3261e; } .row.today { border-left-color: #e07b00; } .row.soon { border-left-color: #2f5d50; }
.row.packed { opacity: .72; border-left-color: #2e9b4f; }
.row.unpaid .store::after { content: ""; }
.empty { background: #fff; border-radius: 14px; padding: 40px; text-align: center; font-size: 22px; }

/* ---------- order ---------- */
.ohead { display: flex; align-items: center; margin-bottom: 12px; }
.ohead .back { margin-right: 14px; padding: 8px 14px; }
.ohead h1 { margin: 0; font-size: 28px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ohead h1 span { font-weight: 400; color: #6a7772; margin-left: 10px; }
.stepper { display: flex; margin-bottom: 12px; }
.step { flex: 1; display: flex; align-items: center; background: #fff; border: 2px solid #dfe5e1; border-radius: 12px; padding: 8px 12px; margin-right: 8px; font-size: 18px; font-weight: 700; color: #6a7772; }
.step:last-child { margin-right: 0; }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: #e8ece9; display: flex; align-items: center; justify-content: center; margin-right: 10px; font-size: 16px; flex-shrink: 0; }
.step.done { color: #165c2c; border-color: #9cc9ad; } .step.done .n { background: #2e9b4f; color: #fff; }
.step.on { color: #1d2b26; border-color: #2f5d50; box-shadow: 0 0 0 3px rgba(47,93,80,.15); } .step.on .n { background: #2f5d50; color: #fff; }
.card { background: #fff; border: 2px solid #dfe5e1; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card h2 { margin: 0 0 4px; font-size: 22px; }
.ok-line { color: #165c2c; font-weight: 700; font-size: 20px; margin: 8px 0 12px; }
.warn-line { background: #fdecc8; color: #7a4b00; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 16px; }
.bad-line { background: #f9d4d0; color: #8a1c12; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 16px; font-weight: 600; }
.btnrow { display: flex; margin-top: 10px; } .btnrow button { flex: 1; margin-right: 10px; } .btnrow button:last-child { margin-right: 0; }
.linkbtn { border: 0; background: none; color: #2f5d50; text-decoration: underline; padding: 4px; font-size: 15px; }

.lines { background: #fff; border: 2px solid #dfe5e1; border-radius: 16px; overflow: hidden; }
.line { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid #eef1ef; min-height: 84px; }
.line:last-child { border-bottom: 0; }
.line img, .line .ph { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; margin-right: 12px; flex-shrink: 0; background: #eef0ee; border: 1px solid #e3e7e4; }
.line .info { flex: 1; min-width: 0; }
.line .cat { display: block; font-size: 12px; color: #6a7772; text-transform: uppercase; font-weight: 700; letter-spacing: .03em; }
.line .design { display: block; font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line .sku { display: block; font-family: Consolas, "Courier New", monospace; font-size: 16px; color: #3c4a45; }
.line .qty { font-size: 26px; font-weight: 800; min-width: 92px; text-align: center; }
.line .qty small { display: block; font-size: 12px; color: #6a7772; font-weight: 700; text-transform: uppercase; }
.line .st { min-width: 110px; text-align: center; font-weight: 800; font-size: 17px; }
.line .act { min-width: 96px; text-align: right; }
.line .act button { padding: 8px 12px; font-size: 16px; }
.line.ok { background: #eef8f0; } .line.ok .st { color: #165c2c; }
.line.short .st { color: #7a4b00; }
.line.over { background: #fde8e6; } .line.over .st { color: #b3261e; }
.line.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 4px #9be3b0; } 100% { box-shadow: inset 0 0 0 0 transparent; } }
button.minus { background: #fbeaea; border-color: #e3b3b3; color: #8a1c12; font-weight: 800; }

.flashcard { display: flex; align-items: center; border-radius: 16px; padding: 14px 18px; color: #fff; background: #1f7a3a; margin-bottom: 12px; min-height: 132px; }
.flashcard img, .flashcard .ph { width: 104px; height: 104px; border-radius: 12px; object-fit: cover; margin-right: 18px; border: 3px solid rgba(255,255,255,.7); background: rgba(255,255,255,.2); flex-shrink: 0; }
.flashcard .big, .flashcard .what, .flashcard .sub { display: block; }
.flashcard .big { font-size: 46px; font-weight: 900; line-height: 1; }
.flashcard .what { font-size: 24px; font-weight: 800; margin-top: 6px; }
.flashcard .sub { font-size: 18px; opacity: .92; margin-top: 2px; }
.flashcard.bad { background: #b3261e; }
.flashcard.idle { background: #fff; color: #2f5d50; border: 4px dashed #2f5d50; justify-content: center; font-size: 24px; font-weight: 800; }
.flashcard.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.97); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.prog { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.bar { height: 26px; background: #e8ece9; border-radius: 13px; overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f5d50, #2e9b4f); border-radius: 13px; transition: width .25s; }
.wrongbox { background: #fde8e6; border-radius: 12px; padding: 10px 12px; margin-top: 10px; color: #8a1c12; font-size: 17px; }
.wrongbox div { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; }

.donebig { text-align: center; padding: 26px 10px; }
.donebig .tick { font-size: 96px; line-height: 1; color: #2e9b4f; }
.donebig h2 { font-size: 36px; margin: 8px 0 4px; }
.kv { display: flex; justify-content: space-between; font-size: 19px; padding: 8px 0; border-bottom: 1px solid #eef1ef; }

/* ---------- modal / packer / setup ---------- */
.modal { position: fixed; inset: 0; background: rgba(20,30,26,.55); z-index: 20; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal .box { background: #fff; border-radius: 20px; padding: 28px; width: 620px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { margin: 0 0 6px; font-size: 30px; } .modal p { font-size: 19px; margin: 6px 0 18px; }
.modal .unpaid h2 { color: #8a1c12; }
.names { display: flex; flex-wrap: wrap; margin: 0 -6px; } .names button { width: calc(50% - 12px); margin: 6px; font-size: 26px; padding: 18px; font-weight: 700; }
.setup label { display: block; font-weight: 700; margin: 12px 0 4px; } .setup input { width: 100%; font: inherit; padding: 10px; border: 2px solid #b9c4bf; border-radius: 10px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1d2b26; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 17px; z-index: 30; max-width: 90vw; }
.toast.bad { background: #b3261e; }

.wrongbox .wtitle { display: block; margin-bottom: 4px; }
.flashcard .ph.q { display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 800; color: #fff; }
.demo-pill { margin-right: 10px; background: #6b3fa0; color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 14px; letter-spacing: .04em; }

/* M3: active (just-scanned) row: white bold on dark green, 6.2:1 (WCAG AA for normal text needs 4.5:1) */
.line.cur { background: #1d6f36; color: #fff; }
.line.cur .cat, .line.cur .design, .line.cur .sku, .line.cur .qty, .line.cur .qty small, .line.cur .st { color: #fff; }
.line.cur .st { font-weight: 800; }

/* M3: sticker printer light (header) */
.plight { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 6px 12px; margin: 0 8px;
  font-size: 15px; font-weight: 700; background: #eef0ee; color: #33413b; white-space: nowrap; }
.plight i { width: 14px; height: 14px; border-radius: 50%; background: #9aa5a0; box-shadow: 0 0 0 3px rgba(0,0,0,.06); flex-shrink: 0; }
.plight.green { background: #e3f3e8; color: #155e2b; } .plight.green i { background: #22a34a; }
.plight.red { background: #fde8e6; color: #9b1c13; } .plight.red i { background: #d93025; }
.plight.amber { background: #fff3d6; color: #6b4700; } .plight.amber i { background: #f0a500; }
.plight.grey { background: #eceeed; color: #4a5551; } .plight.grey i { background: #9aa5a0; }
.plight.pulse i { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pstop { background: #fde8e6; color: #7d1810; border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-size: 18px; }
.pstop > b:first-child { display: block; font-size: 24px; margin-bottom: 4px; }
.pstop span { display: block; margin: 2px 0; }
.line .pst { min-width: 120px; text-align: center; font-weight: 800; font-size: 16px; color: #5c6863; }
.line.p-printing { background: #fff8e1; } .line.p-printing .pst { color: #6b4700; }
.line.p-done .pst { color: #155e2b; }
.line.p-check { background: #fde8e6; } .line.p-check .pst { color: #9b1c13; }
.line .act.re { min-width: 0; display: flex; gap: 6px; }
.line .act.re button { padding: 8px 10px; font-size: 15px; }
.modal .printer input { font-size: 30px; letter-spacing: .2em; text-align: center; }
