:root {
  --bg: #f6f7f5;
  --card: #fff;
  --ink: #142017;
  --muted: #5b6b5f;
  --accent: #0a7a4b;
  --danger: #b42318;
  --warn: #b54708;
  --tap: 3rem;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.35;
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: var(--accent); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.top a { color: #fff; text-decoration: none; margin-left: .75rem; font-weight: 600; }
.brand { font-weight: 800; letter-spacing: .02em; margin-left: 0 !important; }
.wrap { max-width: 42rem; margin: 0 auto; padding: 1rem; padding-bottom: 5rem; }
h1 { font-size: 1.35rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; margin-bottom: .75rem;
}
.muted { color: var(--muted); font-size: .9rem; }
.btn, button.btn, input[type=submit].btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: .75rem 1.1rem;
  border: 0; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 1.05rem; font-weight: 700; text-decoration: none; cursor: pointer;
  width: 100%; margin: .35rem 0;
}
.btn.secondary { background: #234; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: #e7eee9; color: var(--ink); }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center;
}
.pick-line {
  display: grid; gap: .4rem; padding: .85rem 0; border-bottom: 1px solid #e5ebe6;
}
.pick-line:last-child { border-bottom: 0; }
.pick-line .name { font-weight: 700; font-size: 1.05rem; }
.qty-input {
  width: 5.5rem; min-height: var(--tap); font-size: 1.25rem;
  text-align: center; border: 2px solid #c9d5cc; border-radius: 10px;
}
.sticky-actions {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.96); border-top: 1px solid #d8e0da;
  padding: .65rem 1rem env(safe-area-inset-bottom);
  max-width: 42rem; margin: 0 auto;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .35rem; border-bottom: 1px solid #e5ebe6; }
.neg { color: var(--danger); font-weight: 700; }
.badge { display: inline-block; padding: .15rem .45rem; border-radius: 999px; background: #e8f6ee; font-size: .75rem; }
.badge.warn { background: #fef0c7; color: #7a4b00; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
label { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=number], select {
  min-height: 2.75rem; font-size: 1rem; padding: .5rem .65rem;
  border: 2px solid #c9d5cc; border-radius: 10px; width: 100%;
}
.flash { background: #e8f6ee; padding: .75rem 1rem; border-radius: 10px; margin-bottom: .75rem; }
.flash.warn { background: #fef0c7; }
.acct-bar {
  display: flex; flex-wrap: wrap; gap: .15rem .6rem; align-items: baseline;
  padding: .4rem 1rem; background: #e8f6ee; border-bottom: 1px solid #cfe3d6; font-size: .9rem;
}
.acct-bar .acct-name { font-weight: 700; }

/* ---- phone pick list (Tester criterion 10, 390x844) ---- */
:root { --bar-h: 5.5rem; }
html { scroll-padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 1rem); }
/* No-JS fallback: room for the sticky bar + safe area (JS sets the exact height). */
main.wrap:has(#pick-bar) { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 1.5rem); }
.pick-summary { margin: 0 0 .75rem; font-size: 1rem; }
.pick-summary .muted { font-size: .85rem; }
.outstanding { margin-top: .25rem; }
.pick-detail { display: flex; flex-wrap: wrap; gap: 0 .6rem; font-size: .85rem; }
.pick-detail span { white-space: nowrap; }
.pick-detail span + span::before { content: "·"; margin-right: .6rem; color: #9aa79d; }
.pick-line .row { grid-template-columns: 1fr 6.5rem; }
.pick-line .suggested { font-weight: 500; font-size: .95rem; }
.qty-input { width: 6.5rem; min-height: 2.75rem; }
.qty-input::placeholder { color: #a7b3aa; }
.sticky-actions .btn { margin: .2rem 0; min-height: 3rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.confirm-all-zone { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed #c9d5cc; }
.confirm-all-zone .btn { min-height: 2.75rem; font-size: 1rem; }
.btn.armed { background: var(--warn); color: #fff; }

/* ---- stock table: Min/Par stacked into one narrow column; scrolls if still too wide ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stock-table th.num, .stock-table td.num { text-align: right; white-space: nowrap; }
.stock-table td.minpar { color: var(--muted); }
@media (max-width: 420px) {
  .stock-table { font-size: .9rem; }
  .stock-table th, .stock-table td { padding: .5rem .3rem; }
}
