:root { --ink: #0D3B2C; --accent: #028553; --accent2: #028553; --forest: #0D3B2C; --honey: #F2D27A; --soft: #E3E8DD; --soft2: #F7F5F0; --stone: #EDE8DF; --line: #E4DED3; --text: #0C1A15; --muted: #4E5B55; --amber: #fdf1d3; --amber-ink: #7a5300; --red: #8a1c13; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: #F7F5F0; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #CFC8BB; border-radius: 10px; background: #fff; color: var(--text); width: 100%; }
input:focus, textarea:focus, select:focus { outline: 3px solid #b8dccb; border-color: var(--accent); }
textarea { resize: vertical; }
.upper { text-transform: uppercase; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1 { margin: 0; font-size: 26px; color: var(--ink); }
h2 { margin: 0 0 10px; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.err { background: #fdecea; color: var(--red); padding: 9px 12px; border-radius: 10px; font-size: 13.5px; margin: 0; white-space: pre-wrap; }
.primary { background: var(--accent2); color: #fff; border: 0; border-radius: 10px; font-weight: 700; padding: 10px 18px; min-height: 44px; }
.primary:hover { background: var(--forest); } .primary:disabled { opacity: .6; cursor: wait; }
.primary.big { width: 100%; min-height: 52px; font-size: 16px; }
.secondary { background: #fff; color: var(--ink); border: 1px solid #CFC8BB; border-radius: 10px; font-weight: 600; padding: 8px 14px; min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; }
.link { background: none; border: 0; color: var(--ink); text-decoration: underline; font-weight: 600; padding: 4px; min-height: 36px; }
.link.danger { color: var(--red); }

/* bar */
.bar { background: var(--accent); color: #fff; padding: 8px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.brand .leaf { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand > span { display: flex; flex-direction: column; line-height: 1.1; } .brand b { font-size: 19px; font-weight: 500; } .brand i { font-style: normal; color: var(--honey); }
.brand small { font-size: 9px; letter-spacing: .2em; color: rgba(255,255,255,.85); font-weight: 600; }
.bar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 10px 10px 0 0; font-weight: 600; color: #fff; padding: 9px 14px; display: inline-flex; gap: 6px; align-items: center; }
.nav:hover { background: rgba(255,255,255,.12); } .nav.on { background: #fff; color: var(--forest); border-bottom-color: var(--honey); }
.badge { background: #c62f22; color: #fff; font-size: 11px; padding: 0 7px; border-radius: 6px; line-height: 19px; }
.who { font-weight: 600; font-size: 14px; }
.bar .link { color: #fff; }
.notice { background: var(--amber); color: var(--amber-ink); padding: 8px 20px; font-size: 13.5px; }
.view { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .tools > input { flex: 1 1 240px; width: auto; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }

/* form */
.form { display: flex; flex-direction: column; gap: 22px; }
.form.small { gap: 12px; }
.form section { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.form h1 + section { border-top: 0; padding-top: 0; }
.n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 5px; } .lbl { font-size: 13px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid #CFC8BB; background: #fff; border-radius: 999px; padding: 8px 16px; min-height: 42px; font-weight: 600; color: var(--ink); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 12px; align-items: center; text-align: left; border: 1.5px solid #CFC8BB; background: #fff; border-radius: 12px; padding: 14px; color: var(--ink); }
.choice .ic { width: 28px; height: 28px; color: var(--accent2); }
.choice > span { display: flex; flex-direction: column; } .choice > span span { font-size: 12.5px; color: var(--muted); }
.choice.on { border-color: var(--accent2); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent2); }
.chosen { background: var(--soft2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.addr { white-space: pre-line; font-size: 13.5px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; } .check input { width: 20px; height: 20px; accent-color: var(--accent2); }
.searchbox { display: flex; align-items: center; gap: 8px; border: 1px solid #CFC8BB; border-radius: 10px; padding: 0 10px; background: #fff; }
.searchbox input { border: 0; padding-left: 0; } .searchbox input:focus { outline: none; } .searchbox:focus-within { outline: 3px solid #cfe9d6; border-color: var(--accent); }
.searchbox .ic { color: var(--muted); }
.results { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; border-radius: 10px; }
.results:not(:empty) { border: 1px solid var(--line); }
.res { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; min-height: 48px; }
.res:hover, .res:focus { background: var(--soft); outline: none; } .res span { font-size: 12px; color: var(--muted); }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
.line.low { border-color: #f0b4ae; background: #fff8f7; }
.lname { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; } .lname span { font-size: 12px; color: var(--muted); } .lname .bad { color: var(--red); font-weight: 700; }
.qty { display: flex; border: 1px solid #CFC8BB; border-radius: 10px; overflow: hidden; }
.qty input { width: 52px; border: 0; border-radius: 0; text-align: center; padding: 8px 2px; }
.step { width: 42px; min-height: 44px; border: 0; background: var(--soft2); font-size: 18px; font-weight: 700; color: var(--ink); }
.bin { width: 44px; height: 44px; border: 1px solid #f0b4ae; background: #fff; color: #c62f22; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.foot { display: flex; flex-direction: column; gap: 10px; background: var(--soft); margin: 0 -18px -18px; padding: 16px 18px; border-radius: 0 0 14px 14px; }
.sum { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink); }
.row { display: flex; gap: 10px; align-items: center; }

/* list */
.list { display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); text-align: center; padding: 30px; margin: 0; }
.sample { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.shead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .shead .when { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill.green { background: var(--soft); color: #0b5d27; } .pill.blue { background: #e4edf9; color: #1f3d73; } .pill.red { background: #fdecea; color: var(--red); } .pill.grey { background: #eceff0; color: #4d5b58; }
.sbody { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(160px, 1fr); gap: 12px; }
.sbody > div { display: flex; flex-direction: column; gap: 2px; }
.k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); }
.how { font-size: 13px; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; } .items li { display: flex; justify-content: space-between; gap: 8px; }
.meta { font-size: 13px; color: var(--muted); } .meta b { color: var(--text); }
.sfoot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; } .sfoot > span:first-child { margin-right: auto; }
@media (max-width: 760px) { .sbody { grid-template-columns: 1fr; } }

/* report + tables */
.rep { display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.tile span { font-size: 12.5px; font-weight: 600; color: var(--muted); } .tile b { font-size: 30px; color: var(--ink); line-height: 1.2; } .tile small { font-size: 12px; color: var(--muted); }
.tile.green { background: var(--soft); border-color: #C9D6C3; } .tile.green b, .tile.green span { color: #0b5d27; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.dates { display: flex; gap: 8px; } .dates input { width: 170px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; background: var(--soft); color: var(--ink); padding: 9px 10px; white-space: nowrap; } td { border-top: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
td.addr { font-size: 12.5px; } .num { text-align: right; white-space: nowrap; } tr.off td { color: #8a9693; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; max-width: calc(100% - 32px); z-index: 40; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--red); }
@media (max-width: 700px) { .bar { padding: 6px 10px 0; gap: 2px 10px; justify-content: space-between; } .bar nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -10px; padding: 0 6px; } .who { display: none; } .nav { padding: 8px 10px; font-size: 13.5px; white-space: nowrap; } .view { padding: 14px 10px 50px; } h1 { font-size: 22px; } .card { padding: 14px; } .foot { margin: 0 -14px -14px; } }

/* sign-in */
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--ink); }
.signin .card { width: 100%; max-width: 400px; padding: 0; overflow: hidden; }
.cardtop { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.signin form { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.signin h1 { font-size: 22px; } .signin p { margin: 0; color: var(--muted); font-size: 13px; }
.signin label { font-weight: 600; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }

/* v2: sign-off, allowances, click & collect */
.badge.amber { background: #b06d00; }
.pill.amber { background: var(--amber); color: var(--amber-ink); }
.row.wrap { flex-wrap: wrap; } .row.wrap > input { flex: 1 1 220px; width: auto; }
.grow { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.chosen.pick { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; border: 2px solid var(--accent2); background: var(--soft); }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.allow { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--soft2); }
.allow.over { border: 2px solid var(--red); background: #fff8f7; }
.mrow { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.meter { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.mbar { height: 8px; border-radius: 99px; background: #dde5df; overflow: hidden; min-width: 90px; }
.mbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.over .mbar i { background: var(--red); } .meter.over b, .meter.over > span { color: var(--red); }
.flow { margin: 0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.flow.amber { background: var(--amber); color: var(--amber-ink); } .flow.green { background: var(--soft); color: #0b5d27; }
.see { margin: 0; display: flex; gap: 10px; align-items: flex-start; background: #e4edf9; color: #1f3d73; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.see .ic { flex: none; margin-top: 1px; } .see.small { padding: 7px 10px; font-size: 13px; }
.choice:disabled { opacity: .5; cursor: not-allowed; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; } legend { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.grid2.tight { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.secondary.danger { color: var(--red); }
.primary .ic, .secondary .ic { width: 18px; height: 18px; vertical-align: -3px; }
/* to collect */
.due { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--ink); }
.due.now b { color: var(--red); }
.sample.urgent { border: 2px solid #e2a29b; }
/* scan */
.scanin { font-size: 18px; padding: 14px; border: 2px solid var(--accent2); }
.scanmsg { margin: 0; font-weight: 600; min-height: 22px; } .scanmsg.ok { color: #0b5d27; } .scanmsg.bad { color: var(--red); }
.line.scan .count { font-size: 20px; min-width: 64px; text-align: right; } .line.scan .count span { font-size: 14px; color: var(--muted); }
.line.scan.done { border-color: #9fd0aa; background: var(--soft); }
.line.scan.extra { border-color: #e7b866; background: #fff9ec; }
.cam { display: flex; flex-direction: column; gap: 8px; } .cam video { width: 100%; max-width: 480px; border-radius: 12px; background: #000; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 6px 0; }

/* website logo + stock */
.brand { flex-direction: column; align-items: flex-start; gap: 2px; }
.brand img { height: 30px; width: auto; display: block; }
.cardtop { background: var(--accent); }
.res.out { background: #f6f3ee; cursor: not-allowed; } .res.out b { color: #8a8f8c; } .res .oos { color: var(--red); font-weight: 600; }
.step:disabled { opacity: .35; cursor: not-allowed; }
.primary.big:disabled { opacity: .5; cursor: not-allowed; }
