/* Station / Ask — one column, phone first, one green accent. */
:root {
  --bg: #f6f7f4; --panel: #ffffff; --ink: #16201a; --muted: #5f6b63; --line: #d9ded8; --line-soft: #e8ebe6;
  --accent: #1e7a4c; --accent-ink: #0f4d2e; --accent-soft: #e4f1e9; --accent-mid: #cfe6d8; --accent-glow: rgba(30,122,76,.35);
  --warn: #b8771a; --warn-soft: #fbf1df; --bad: #b23a2e; --bad-soft: #f9e6e3; --new: #2f6f9f; --new-soft: #e3eef7;
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --tabs-h: 58px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512; --panel: #18201b; --ink: #e7ebe6; --muted: #9aa69e; --line: #2a342d; --line-soft: #202a24;
    --accent: #3fa36e; --accent-ink: #8fd8ae; --accent-soft: #17301f; --accent-mid: #1f4a2e; --accent-glow: rgba(63,163,110,.35);
    --warn: #d9a24a; --warn-soft: #2e2415; --bad: #e06a5e; --bad-soft: #341b18; --new: #7fb3dc; --new-soft: #172836;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.1; margin: 4px 0 10px; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
h2 .right { margin-left: auto; font-family: var(--body); font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px; }
.num, td.num, .kpi b { font-variant-numeric: tabular-nums; }
td.num { white-space: nowrap; }
.r { text-align: right; }
.error { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); }
.live { color: var(--accent-ink); font-weight: 600; }
.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 4px; vertical-align: middle; }
.shiftnow { margin: 2px 0 0; color: var(--muted); }
.flash { background: var(--accent-soft); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.flash.wait { background: var(--warn-soft); color: var(--warn); }
.flash.done::before { content: "✓ "; }
.flash.bad { background: var(--bad-soft); color: var(--bad); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); letter-spacing: .01em; }
.brand .site { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; letter-spacing: .06em; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.top .dot { margin-left: auto; }
.top .who { display: flex; align-items: center; gap: 6px; margin: 0 0 0 12px; }
.top .pick { display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.top .pick select { font: inherit; color: inherit; background: transparent; border: 0; padding: 0 2px; min-width: 0;
  max-width: 100%; min-height: 44px; text-overflow: ellipsis; cursor: pointer; }
.top .pick ~ .dot { flex: none; margin-left: auto; }
.top .pick ~ .who { flex: none; }
/* a phone with the picker: the picker names the store, so its code and the person's name give it the room */
@media (max-width: 559px) { .top .pick .site, .top .pick ~ .who .me { display: none; } }
button.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-decoration: underline; }

main { max-width: 640px; margin: 0 auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
html, body { overflow-x: hidden; }
section { display: flex; flex-direction: column; gap: 6px; }

.status .line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.kpi b { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 5.5vw, 26px); line-height: 1.1; white-space: nowrap; }
@media (min-width: 560px) { .kpi b { font-size: 22px; } }
.kpi span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi.warn b { color: var(--warn); }
.kpis.small .kpi b { font-size: 18px; }

.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
tr.flag td { background: var(--warn-soft); }
tr.void td { text-decoration: line-through; color: var(--muted); }
tr.total td { border-top: 1px solid var(--line); }
.pill { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: middle; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.chartwrap { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px 2px; }
svg.chart { width: 100%; height: 120px; display: block; color: var(--muted); }
.barbox { position: relative; color: var(--muted); }
.barbox > span { position: absolute; pointer-events: none; font-family: var(--mono); line-height: 1; white-space: nowrap; }
.barbox .peak { transform: translate(-50%, calc(-100% - 4px)); font-size: 11px; color: var(--ink); opacity: .8; }
.barbox .tick { bottom: 3px; transform: translateX(-50%); font-size: 10px; opacity: .8; }
.barbox .tick.first, .barbox .tick.last { transform: none; }
svg.chart .bar { opacity: .55; }
svg.chart .bar.hi { opacity: 1; }
svg .col[data-tip] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg.chart, svg.pbars { touch-action: pan-y; }        /* a sideways drag reads the bars; up and down still scrolls */
svg.chart .col.on .bar { opacity: 1; fill: var(--accent-ink); }
svg.pbars .col.on .b { opacity: 1; filter: brightness(.8); }
.charttip { position: absolute; z-index: 2; pointer-events: none; white-space: nowrap; background: var(--ink); color: var(--panel);
  font-size: 12px; font-weight: 600; line-height: 1.2; padding: 4px 8px; border-radius: 6px; }
svg.spark { width: 90px; height: 24px; vertical-align: middle; color: var(--muted); }
svg.gauge { width: 100%; height: 14px; display: block; color: var(--muted); }
svg.gauge.low rect:nth-child(2) { fill: var(--bad); }

.tanks { display: grid; gap: 8px; }
.tank { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.brief { background: var(--panel); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0;
  list-style: none; margin: 0; display: grid; gap: 10px; line-height: 1.45; }
.brief li { margin: 0; }
.brief b { font-weight: 650; }
.brief li.act { border-top: 1px solid var(--line); padding-top: 10px; }

form.pick select, .search input, .inline input, .inline select, .askbar input, .login input {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
form.pick select { width: 100%; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.inline input[type=number] { width: 84px; }
.inline input[type=text] { flex: 1; min-width: 160px; }
/* Buttons: every button is green so it reads as something to press; primary is solid, the rest tinted. */
button, .button { font: inherit; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .01em; color: var(--accent-ink);
  background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 10px; padding: 10px 16px; cursor: pointer; display: inline-block;
  box-shadow: 0 1px 2px rgba(0,0,0,.10); transition: background .12s, transform .05s; white-space: nowrap; }
button:hover, .button:hover { background: var(--accent-mid); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); box-shadow: none; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 8px var(--accent-glow); }
button.primary:hover, .button.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
button.quiet { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; font-family: var(--body); font-weight: 500; }
button.quiet:hover { background: var(--line-soft); }
/* off until its step is done: still answers a tap (to point at what is missing), so not the disabled attribute */
button:disabled, button[aria-disabled="true"], button.primary[aria-disabled="true"], button.primary[aria-disabled="true"]:hover {
  background: var(--line-soft); border-color: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
button.busy { pointer-events: none; display: inline-flex; align-items: center; gap: 8px; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet input.qty { width: 74px; text-align: right; font-family: var(--mono); }
.sheet .row { margin-top: 10px; }
.login { max-width: 360px; margin: 40px auto; display: flex; flex-direction: column; gap: 10px; }
.login label { display: flex; flex-direction: column; gap: 4px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.rcpt { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); }
.rcpt:hover { text-decoration: none; border-color: var(--accent); }
.choice button { width: 100%; text-align: left; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--panel); border-top: 1px solid var(--line); z-index: 10; }
.tabs a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-family: var(--display); font-weight: 500; font-size: 11px; letter-spacing: .02em; color: var(--muted); border-top: 2px solid transparent; }
.tabs a svg { width: 22px; height: 22px; display: block; }
.tabs a span { line-height: 1; }
.tabs a.on { color: var(--accent-ink); border-top-color: var(--accent); }
@media (min-width: 560px) { .tabs a { font-size: 13px; } }
.tabs a:hover { text-decoration: none; }

/* chat */
body.chat main { padding-bottom: 0; min-height: calc(100vh - 120px); }
.messages { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { max-width: 92%; padding: 9px 13px; border-radius: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot table { font-size: 13.5px; margin: 6px 0; }
.msg.bot th, .msg.bot td { padding: 4px 8px; }
.msg.intro { color: var(--muted); }
.tool { align-self: flex-start; font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.tool.err { color: var(--bad); }
.confirm { align-self: flex-start; background: var(--accent-soft); color: var(--accent-ink); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--accent); color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; box-shadow: none; font-family: var(--body); }
.askbar { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); display: flex; gap: 6px; padding: 8px 0 10px; background: var(--bg); }
.askbar input { flex: 1; }
.askbar button.quiet { padding: 9px 8px; }
/* Jay: the mic in the ask bar; red with the seconds while it listens, faded while the words are written down */
.askbar button.mic { display: inline-flex; align-items: center; gap: 4px; padding: 9px 10px; -webkit-tap-highlight-color: transparent; }
.askbar button.mic[hidden] { display: none; }
.askbar button.mic.on { background: var(--bad, #c62828); border-color: var(--bad, #c62828); color: #fff; }
.askbar button.mic.on svg { animation: jay-pulse 1s ease-in-out infinite; }
.askbar button.mic.busy { opacity: .55; }
.askbar button.mic .secs { font-family: var(--mono); font-size: 12px; min-width: 0; }
.askbar button.mic .secs:empty { display: none; }
@keyframes jay-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .askbar button.mic.on svg { animation: none; } }
.msg.user .heard { opacity: .7; margin-right: 2px; }
.typing::after { content: "…"; animation: blink 1s steps(3, end) infinite; }
@keyframes blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* fuel and photos */
.tank .big { font-family: var(--display); font-size: 22px; white-space: nowrap; }
.snap input[type=file] { display: none; }
.snap label.button { display: inline-block; }
img.photo { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
details summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; padding: 6px 0; }
details form.sheet { margin-top: 8px; }
form.pick.inline select { width: auto; }
form.pick.inline input[type=month] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.inline input[type=date] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
table.ledger { font-size: 13.5px; }
table.ledger th, table.ledger td { padding: 7px 8px; }
table.lines input.desc { width: 100%; min-width: 160px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
table.lines select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-width: 220px; }
.inline label input { width: auto; }
h2 form.right { margin-left: auto; }
h2 form.right input { font: inherit; font-size: 14px; font-family: var(--body); font-weight: 400; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }

.chores .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .chores .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chores .button { text-align: center; padding: 12px 8px; }
.chores .button:hover { text-decoration: none; }
.views a { color: var(--muted); font-weight: 600; }
.views a.on { color: var(--accent-ink); border-bottom: 2px solid var(--accent); }
.inline input[type=time] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
h3 { font-family: var(--display); font-weight: 600; font-size: 16px; margin: 10px 0 4px; }
.neg { color: var(--bad); }
.pos { color: var(--accent-ink); }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); z-index: 11;
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.fab svg { width: 18px; height: 18px; }
.fab:hover { text-decoration: none; background: var(--accent-ink); }
/* room under the page for the floating buttons, so they never sit over its last lines (QA 2026-11-20: Scan covered
   the last row of the reconciliation page at 390 px): Report alone reaches ~58px above the tabs, Scan above it ~112px */
body:has(.fab) main { padding-bottom: 76px; }
body:has(.fab.scan) main { padding-bottom: 130px; }
.snap { display: flex; flex-wrap: wrap; gap: 8px; }
.snap label.button { display: inline-block; text-align: center; }
.action .button.primary { display: block; text-align: center; padding: 14px; font-size: 17px; }
.action .snap label.button.primary { flex: 1 1 220px; padding: 14px; font-size: 17px; }
.action .snap label.button { flex: 1 1 160px; padding: 14px; }

/* cigarette sheet: brand blocks, kings and 100s side by side, cartons + packs per kind */
table.cig td { padding: 6px 6px; }
table.cig td.name { font-weight: 600; min-width: 96px; }
table.cig .cell { display: flex; flex-direction: column; gap: 3px; }
table.cig .cell + .cell { margin-top: 6px; }
table.cig .oh { white-space: nowrap; }
table.cig .pair { display: flex; gap: 4px; }
table.cig input.qty { width: 54px; text-align: right; font-family: var(--mono); padding: 7px 6px; }
.cigsheet h3 { margin-top: 14px; }
.cigsheet .tablewrap { margin-top: 2px; }
/* Sub-tabs: two separate bordered buttons, the current one filled. */
.subtabs { display: flex; gap: 10px; margin: 0 0 8px; }
.subtabs a { padding: 9px 18px; border-radius: 9px; border: 1.5px solid var(--accent); font-family: var(--display); font-weight: 600; font-size: 15px;
  color: var(--accent-ink); background: var(--accent-soft); box-shadow: 0 1px 2px rgba(0,0,0,.10); }
.subtabs a.on { background: var(--accent); color: #fff; }
.subtabs a:hover { text-decoration: none; }
.subtabs a:not(.on):hover { background: var(--accent-mid); }
h2 form.right select { font: inherit; font-size: 14px; font-family: var(--body); font-weight: 400; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; max-width: 200px; }
tr.total.hi td { background: var(--accent-soft); border-top: 2px solid var(--accent); font-size: 16px; }
table.depts td.barcell { width: 46%; }
table.depts tr.fuelrow td { color: var(--muted); }
.sharebar { display: inline-block; vertical-align: middle; width: calc(100% - 52px); height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.sharebar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.pct { display: inline-block; width: 48px; text-align: right; font-size: 13px; color: var(--muted); vertical-align: middle; }
.pend { display: flex; flex-direction: column; gap: 6px; }
.pend .linkform { margin-top: 2px; }
.pend .linkform select { flex: 1 1 100%; max-width: 100%; }
.pend .linkform input[type=text] { flex: 1; min-width: 120px; }
.chips.brands { flex-wrap: wrap; overflow: visible; gap: 6px 6px; margin: 4px 0 6px; }
.chips.brands .chip { padding: 5px 10px; }
.cigsheet h3 { scroll-margin-top: 60px; }
.sizeform { margin-top: 3px; }
.sizeform select { font: inherit; font-size: 13px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 6px; padding: 3px 6px; }

/* scan: a second floating button above Report, the camera frame, count modes and the add form */
.fab.scan { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 68px); background: var(--panel); color: var(--accent-ink); border: 1.5px solid var(--accent); }
.fab.scan:hover { background: var(--accent-soft); }
#scanner .cam { position: relative; display: none; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; }
#scanner.live .cam { display: block; }
#scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
#scanner .reticle { position: absolute; left: 10%; right: 10%; top: 32%; bottom: 32%; border: 2px solid rgba(255,255,255,.9); border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
#scanner #scan-msg { min-height: 1.2em; margin: 0; }
#scanner form.inline input[type=text] { flex: 1; min-width: 140px; font-family: var(--mono); font-size: 15px; }
.result { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.countform { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.countform .inline input[type=number] { flex: 1; width: auto; min-width: 120px; font-size: 22px; font-variant-numeric: tabular-nums; }
.modes { display: flex; gap: 10px; }
.modes label { flex: 1; position: relative; }
.modes input { position: absolute; opacity: 0; width: 0; height: 0; }
.modes span { display: block; text-align: center; padding: 9px 12px; border-radius: 9px; border: 1.5px solid var(--accent); background: var(--accent-soft);
  color: var(--accent-ink); font-family: var(--display); font-weight: 600; font-size: 15px; cursor: pointer; }
.modes input:checked + span { background: var(--accent); color: #fff; }
.modes input:focus-visible + span { outline: 2px solid var(--accent-glow); outline-offset: 2px; }
.addform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.addform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.addform label.wide, .addform button { grid-column: 1 / -1; }
.addform input, .addform select { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
[hidden] { display: none !important; }
.bc { font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
th.sold, td.sold { background: var(--accent-soft); }
td.sold b { font-size: 17px; color: var(--accent-ink); }
.kpi.hi { border-color: var(--accent); background: var(--accent-soft); }
.kpi.hi b { color: var(--accent-ink); }

/* the stock board: one card per group, two to a row on a phone */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); min-width: 0; }
.card:hover { text-decoration: none; border-color: var(--accent); }
.card.flag { border-color: var(--bad); }
.card .name { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card b { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 5.5vw, 26px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .unit { font-size: 12px; color: var(--muted); }
.card small { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.attn .pill { flex: none; }
details.more { margin: 12px 0; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }
.board.bins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .board.bins { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.card.tile { padding: 8px 10px; }
.card.tile b { font-size: clamp(16px, 5vw, 22px); }
.card.tile .unit, .card.tile small { font-size: 11px; overflow-wrap: anywhere; }
.card.tile.empty { border-style: dashed; opacity: .75; }
.tally-switch { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
#tally-log .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
figure.page { margin: 0 0 12px; }
figure.page figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.inline-form { display: inline; }
.pages-add { display: grid; gap: 6px; margin-top: 8px; }
.hidden-edit { text-align: center; margin: 24px 0 8px; }
.hidden-edit a { color: var(--line); text-decoration: none; padding: 8px 16px; }
.register-edit { margin: 8px 0; }
.register-writes { margin: 6px 0; padding-left: 18px; }
.calc-ops { display: flex; align-items: center; gap: 8px; }
.calc-ops button { min-width: 48px; font-size: 20px; }
.calc-out { font-variant-numeric: tabular-nums; font-weight: 600; }
.combo { display: flex; gap: 6px; align-items: stretch; }
.combo input { flex: 1; min-width: 0; }
.combo select.dept-pick { flex: 0 0 auto; width: 48px; }
/* photos of the goods as delivered, and the admin record */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.delivery-shots { display: flex; flex-direction: column; gap: 8px; }
.record { border-top: 1px solid var(--line); padding: 10px 0; }
.contact { border-top: 1px solid var(--line); padding: 10px 0; }
.contact input[type=email], .contact input[type=tel], .contact input:not([type]) { flex: 1; min-width: 160px; }
.vmap details form { margin-top: 6px; }
.topline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px; margin: 12px 0; color: var(--ink); }
.topline:hover { text-decoration: none; border-color: var(--accent); }
.topline .name { font-size: 13px; color: var(--muted); width: 100%; }
.topline b { font-size: 26px; }
.topline small { width: 100%; }

.msg.station { border-left: 3px solid var(--accent); }

/* a delivery's goods step: glows once the invoice is in, and pulses harder when Done is tapped without it */
.goods { border-radius: 12px; padding: 2px 10px 10px; margin: 0 -10px; transition: box-shadow .3s; }
.goods.glow { box-shadow: 0 0 0 2px var(--accent), 0 0 18px var(--accent-glow); animation: glow 2.4s ease-in-out infinite; }
.goods.glow.now { animation: glow .5s ease-in-out 4, glow 2.4s ease-in-out 2s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px var(--accent), 0 0 30px var(--accent-glow); } }
.done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.done .check { flex-basis: 100%; display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }

/* stock: good against bad, a button per state, categories folded shut */
.split { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.split .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.split .name { font-size: 13px; color: var(--muted); }
.split .row b { font-family: var(--display); font-weight: 600; font-size: 28px; font-variant-numeric: tabular-nums; }
.split .bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.split .bar span { display: block; height: 100%; }
.split .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.split .legend b { font-variant-numeric: tabular-nums; }
.split .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.split .good, .split .legend i.good { background: var(--accent); }
.split .bad, .split .legend i.bad { background: var(--bad); }
.split .aside, .split .legend i.aside { background: var(--muted); }
.states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (min-width: 560px) { .states { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.state { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); min-width: 0; }
.state:hover { text-decoration: none; border-color: var(--accent); }
.state .name { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.state b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.state small { font-size: 12px; color: var(--muted); }
.state.bad { border-left-color: var(--bad); } .state.bad b { color: var(--bad); }
.state.warn { border-left-color: var(--warn); } .state.warn b { color: var(--warn); }
.state.aside { border-left-color: var(--muted); }
.state.none b { color: var(--muted); }
.pill.aside, .pill.quiet { background: var(--line-soft); color: var(--muted); }
span.bad { color: var(--bad); } span.warn { color: var(--warn); }
details.cat, details.dept { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
details.dept { margin: 0 8px 6px; background: var(--bg); }
details.cat > summary, details.dept > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 10px 12px; color: var(--ink); font-weight: 400; }
details.cat > summary::-webkit-details-marker, details.dept > summary::-webkit-details-marker { display: none; }
details.cat > summary .name { font-family: var(--display); font-weight: 600; font-size: 18px; }
details.dept > summary .name { font-weight: 600; }
details > summary .num { font-variant-numeric: tabular-nums; font-weight: 600; }
details > summary .sub { grid-column: 1 / -1; }
details.cat > summary .name::before, details.dept > summary .name::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
details[open] > summary .name::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details > summary .name::before { transition: none; } }
details.dept > a.small { display: inline-block; padding: 0 12px 10px; }
details.dept > p { padding: 0 12px; }
ul.probs { list-style: none; margin: 0; padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; }
ul.probs li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
ul.probs li .num { margin-left: auto; font-variant-numeric: tabular-nums; }
ul.probs li .muted.small { width: 100%; }
ul.probs.big { padding: 0; }
ul.probs.big li { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
ul.probs.big .row { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
ul.probs.big .acts { margin-top: 4px; }
details.mismatch ul.probs { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips .chip.on { background: var(--accent); color: #fff; }
.chips .chip:hover { text-decoration: none; }
p.sheets { margin: 4px 0; line-height: 1.7; }
p.sheets .name { font-weight: 600; margin-right: 4px; }

/* four stock tabs fit a phone on one line */
.subtabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
.subtabs a { flex: none; white-space: nowrap; padding: 8px 12px; font-size: 14.5px; }
ul.probs.big .acts { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 4px; }
section.vendor h2 { flex-wrap: wrap; }
ul.probs.big .acts form.inline { display: inline-flex; margin: 0; }

/* selling, slow and not moving apart; new items on trial; the * count box */
.split .bar span.selling, .split .legend i.selling { background: var(--accent); }
.split .bar span.slow, .split .legend i.slow { background: var(--warn); }
.split .bar span.not_moving, .split .legend i.not_moving { background: var(--bad); }
.split .bar span.trial, .split .legend i.trial { background: var(--new); }
.split .bar span.aside, .split .legend i.aside { background: var(--muted); }
.split .legend { flex-direction: column; gap: 6px; }
.split .legend .part { display: flex; gap: 8px; align-items: baseline; }
.split .legend .part i { flex: none; position: relative; top: 1px; }
details.lines summary { font-size: 14px; }
details.lines label { font-size: 13px; }
.state.new { border-left-color: var(--new); }
.pill.new { background: var(--new-soft); color: var(--new); }
form.quick { margin: 2px 0 0; width: 100%; }
form.quick input.qty { width: 80px; padding: 5px 8px; }
form.quick button { padding: 5px 10px; }
.state.good { border-left-color: var(--accent); } .state.good b { color: var(--accent-ink); }

/* item actions (seasonal, stop tracking, returning, marked down): clearly buttons, smaller than the main one */
button.act { font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--ink); background: var(--panel);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 12px; box-shadow: 0 1px 0 var(--line); }
button.act:hover { background: var(--accent-soft); border-color: var(--accent); }
button.act.stop { color: var(--bad); }
button.act.stop:hover { background: var(--bad-soft); border-color: var(--bad); }
ul.probs.big .acts { gap: 6px; margin-top: 8px; }
ul.probs.big .acts form.inline { gap: 6px; }
span.good { color: var(--accent-ink); }

/* Stock's parts (merchandise, cigarettes, lottery): one segmented bar, set apart from each part's own tabs below it */
.sections { display: flex; background: var(--line-soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin: 0 0 10px; }
.sections a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; font-family: var(--display); font-weight: 600;
  font-size: 15px; color: var(--muted); }
.sections a:hover { text-decoration: none; color: var(--ink); }
.sections a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* the employee's home: three big buttons, Scan first */
.me-buttons { display: grid; gap: 12px; margin: 8px 0 24px; }
/* the employee's no-barcode list: whole rows to tap, as tall as a thumb */
.no-barcode { display: grid; gap: 8px; }
.no-barcode a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
a.button.big { display: flex; align-items: center; justify-content: center; min-height: 72px; font-size: 20px; }

/* off production (the dev app, a demo): never mistaken for the store's own */
.devbar { background: #b45309; color: #fff; text-align: center; font-size: 12px; font-weight: 600; padding: 3px 8px; letter-spacing: .03em; }

/* a delivery's guesses on one page: the paper's name over ours, a tick for each that's right */
.guesses { display: flex; flex-direction: column; gap: 6px; }
.guess { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; align-items: start; padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.guess input { grid-row: span 2; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.guess .paper { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.guess .ours { font-size: 15px; color: var(--accent-ink); overflow-wrap: anywhere; }
.guess .ours::before { content: "→ "; color: var(--muted); }
.guess:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.guess.pack { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.guess.pack legend { padding: 0; float: left; width: 100%; }
.guess.pack .ours { display: flex; gap: 10px; align-items: center; }
.guess.pack .ours::before { content: none; }
.guess.pack input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.guess.pack:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Prices nearby: one line per grade on top, then a box per price coloured against ours. */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0 0 12px; }
.glance-grade { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); }
.glance-grade .label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.glance-grade b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.glance-grade.best { background: var(--accent-soft); border-color: var(--accent-mid); }
.glance-grade.best .small:not(.muted):not(.cash) { color: var(--accent-ink); font-weight: 600; }
.glance-grade.behind { background: var(--warn-soft); border-color: var(--warn-soft); }
.glance-grade.behind .small:not(.muted):not(.cash) { color: var(--warn); font-weight: 600; }
table.prices th, table.prices td { vertical-align: middle; padding: 6px 4px; }
table.prices th:first-child, table.prices td:first-child { padding-left: 10px; }
table.prices th:last-child, table.prices td:last-child { padding-right: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-end; padding: 3px 6px; border-radius: 6px;
  border: 1px solid transparent; line-height: 1.2; white-space: nowrap; }
.chip b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.chip small { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.under { background: var(--warn-soft); } .chip.under small { color: var(--warn); }
.chip.over { background: var(--accent-soft); } .chip.over small { color: var(--accent-ink); }
.chip.same, .chip.none { background: var(--line-soft); } .chip.same small { color: var(--muted); }
.chip.ours { background: var(--ink); color: var(--panel); } .chip.ours small { color: var(--panel); opacity: .8; font-weight: 500; }
.chip.stale { border: 1.5px dashed var(--muted); }                    /* old on Google: marked, still easy to read */
.chip small.age { color: var(--ink); font-weight: 500; }
.legend { color: var(--muted); line-height: 1.9; }
.legend .chip { display: inline-block; padding: 0 6px; }
.legend .chip b { font-size: 12px; font-weight: 600; }

/* Pumps: a tile per pump (gallons, a bar against the busiest), then pump × hour. */
.alert { padding: 10px 12px; border-radius: 8px; margin: 0 0 10px; }
.alert.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); }
.pumpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 0 0 16px; }
.pump { display: flex; flex-direction: column; gap: 2px; padding: 8px 9px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.pump .label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pump b { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.1; }
.pump b small { font-size: 14px; font-weight: 500; color: var(--muted); }
.pump .meter { display: block; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.pump .meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.pump.busiest { border-color: var(--accent-mid); }
.pump.quiet { background: var(--warn-soft); border-color: var(--warn); }
.pump.quiet .meter i { background: var(--warn); }
.heat { display: grid; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; overflow-x: auto; }
.heat i { display: block; aspect-ratio: 1; min-height: 9px; border-radius: 2px;
  background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--line-soft)); }
.heatwrap { position: relative; }
.heat { touch-action: pan-y; }                          /* a sideways drag reads a pump's hours, as on the bar charts */
.heat i.col { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.heat i.col.on { outline: 2px solid var(--ink); outline-offset: -1px; }
.heat .hl { font-family: var(--mono); color: var(--muted); text-align: right; padding-right: 4px; align-self: center; }
.heat .hh { font-family: var(--mono); color: var(--muted); white-space: nowrap; overflow: visible; }
.pump .small { font-size: 12px; line-height: 1.3; }

/* Stock › Margins: the sure ledger (green) and the estimate (violet) side by side, never added together */
:root { --est: #6a5aa8; --est-soft: #eeebf8; }
@media (prefers-color-scheme: dark) { :root { --est: #b3a6ec; --est-soft: #241f3a; } }
.ledgers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ledger { border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ledger .k { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ledger b { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 6vw, 28px); line-height: 1.1; overflow-wrap: anywhere; }
.ledger small { color: var(--muted); font-size: 12.5px; }
.ledger.sure { background: var(--accent-soft); } .ledger.sure .k, .ledger.sure b { color: var(--accent-ink); }
.ledger.est { background: var(--est-soft); } .ledger.est .k, .ledger.est b { color: var(--est); }
.meter { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.meter .s { background: var(--accent); } .meter .e { background: var(--est); opacity: .55; }
.cover { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.pill.sure { background: var(--accent-soft); color: var(--accent-ink); }
.pill.est { background: var(--est-soft); color: var(--est); }
table.margins td.bad { color: var(--bad); font-weight: 600; }
table.margins form.inline { margin-top: 4px; }
.cardsplit { font-variant-numeric: tabular-nums; }

/* Station tabs: Owner (profit at a glance) and Manager (what needs doing, its count on the tab) */
:root { --up: #12945a; --down: #c8432f; }
@media (prefers-color-scheme: dark) { :root { --up: #3ad08a; --down: #ff6b5e; } }
.up { color: var(--up); } .down { color: var(--down); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font-family: var(--mono); font-size: 11px; line-height: 18px; text-align: center; margin-left: 2px; }
.subtabs a.on .badge { background: #fff; color: var(--bad); }
.hero { gap: 2px; }
.hero .k { font-size: 14px; color: var(--muted); }
.hero .big { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 13vw, 58px); line-height: 1; letter-spacing: -.01em; }
.hero .big .est { font-size: .4em; color: var(--muted); font-weight: 500; margin-left: 4px; vertical-align: .9em; }
.hero .chg { font-weight: 600; font-size: 15px; }
.hero.up .chg { color: var(--up); } .hero.down .chg { color: var(--down); }
.hero .chg .muted { font-weight: 400; }
.hero .after-wages-line { color: var(--muted); } .hero .after-wages-line b { color: var(--ink); } .hero .after-wages-line b.down { color: var(--down); }
.hero .after-wages-line .est { font-size: .85em; }
.linewrap { color: var(--muted); margin: 6px 0 2px; }
.linewrap svg { display: block; width: 100%; height: 130px; }
.ranges { display: flex; justify-content: space-between; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ranges a { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 6px; }
.ranges a.on { background: var(--up); color: #fff; }
.hero.down .ranges a.on { background: var(--down); }
.ranges a:hover { text-decoration: none; }
.sureness { gap: 4px; }
.sureness b.sure { color: var(--accent-ink); } .sureness b.est { color: var(--est); }
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex-direction: row; }
@media (max-width: 520px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.part { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; color: var(--ink); min-width: 0; }
.part:hover { text-decoration: none; border-color: var(--accent); }
.part .k { font-size: 12px; color: var(--muted); }
.part b { font-family: var(--display); font-weight: 600; font-size: clamp(17px, 5vw, 22px); }
.part small { font-size: 12px; }
.wins { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.streak { font-family: var(--mono); font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 3px 9px; border-radius: 999px; }
.best-day { width: 100%; background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.best-day b { color: var(--warn); font-family: var(--display); font-size: 17px; }
.goalrow { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.goalrow > div { display: flex; flex-direction: column; }
.goalrow b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.tick { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.tick:last-child { border-bottom: 0; }
.tick .n { display: flex; flex-direction: column; min-width: 0; }
.tick .pill { font-size: 11px; text-align: center; padding: 3px 6px; }
.pill.up { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up); }
.pill.down { background: color-mix(in srgb, var(--down) 15%, transparent); color: var(--down); }
.todo { gap: 8px; }
.task { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px 0 0; overflow: hidden; color: var(--ink); min-height: 52px; }
.task:hover { text-decoration: none; border-color: var(--accent); }
.task i { align-self: stretch; } .task.bad i { background: var(--bad); } .task.warn i { background: var(--warn); }
.task span { display: flex; flex-direction: column; padding: 8px 0; min-width: 0; }
.task small { color: var(--muted); font-size: 13px; }
.task em { font-style: normal; font-weight: 600; color: var(--accent-ink); font-size: 14px; white-space: nowrap; }
.hero .chg.muted, .hero.up .chg.muted { color: var(--muted); font-weight: 400; }
.linewrap svg.pbars { display: block; width: 100%; height: 126px; }
.pbars-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; color: var(--muted); }
.chartkey { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; }
.chartkey > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.chartkey .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.chartkey .sw.up { background: var(--up); } .chartkey .sw.down { background: var(--down); margin-left: 6px; }
.chartkey .sw.avg { width: 14px; height: 0; border-top: 1.5px dashed var(--muted); border-radius: 0; margin-left: 6px; }
.stations .picks li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.stations .picks li > span { min-width: 0; }
.stations form.inline { margin: 6px 0; }

/* the clock card (/me and the manager tab) */
.clock { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.clock.on { border-color: var(--accent); background: var(--accent-soft); }
.clock p { margin: 0; }
.clock form { margin: 0; }
.clock button { min-height: 48px; min-width: 130px; }

/* Compare: the person's stores side by side (/poc/compare), a column a store; the labels stay put as it scrolls */
.compare .ranges { margin: 6px 0 10px; }
table.side th[scope=row] { position: sticky; left: 0; background: var(--panel); font-weight: 600; font-size: 14px; min-width: 120px; }
table.side th.store { min-width: 130px; font-family: var(--display); font-size: 16px; vertical-align: bottom; }
table.side th.store small { display: block; font-family: var(--body, inherit); font-size: 12px; font-weight: 400; }
table.side td { position: relative; min-width: 110px; white-space: nowrap; }
table.side td .bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--accent-mid); }
table.side td.best { background: var(--accent-soft); font-weight: 600; }
table.side td.best .bar { background: var(--accent); }
table.side td.neg { color: var(--bad); }
table.side td.neg .bar { background: var(--bad-soft); }
.best-key { color: var(--accent); font-size: 12px; }
table.side form { margin: 0; }
table.side .button, table.side button { font-size: 14px; padding: 6px 14px; }

/* pump prices changed: the street sign must follow (docs/PUMP_PRICES.md) */
.signbar { padding: 12px 16px; font-size: 15px; line-height: 1.5; border-bottom: 3px solid; }
.signbar.now { background: #b91c1c; color: #fff; border-color: #7f1d1d; font-size: 17px; }
.signbar.wait { background: var(--warn-soft); color: var(--ink); border-color: var(--warn); }
.signbar.stopped { background: var(--bad-soft); color: var(--ink); border-color: var(--bad); }
.signbar.stopped .small { display: block; margin-top: 4px; }
.signbar .sp { display: inline-block; margin: 0 10px 0 0; white-space: nowrap; }
.signbar form { display: block; margin-top: 8px; }
.signbar button { background: #fff; color: #7f1d1d; font-weight: 700; border: 0; border-radius: 8px; padding: 10px 14px; min-height: 44px; }
.pumpbtns { flex-wrap: wrap; justify-content: flex-start; }

/* stock score (stockhistory.py) */
.scorelink { display: block; color: inherit; text-decoration: none; margin-bottom: 12px; }
.scorelink .more { display: block; text-align: right; margin-top: -4px; }
.scorecard { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.scorecard .ring { grid-row: span 2; }
.scorecard .scoreline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.scorecard .scoreline b { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1; }
.scorecard.big .scoreline b { font-size: 40px; }
.scorecard .of { color: var(--muted); font-size: 14px; margin-left: -4px; }
.scorecard .delta { font-size: 13px; color: var(--muted); }
.scorecard .delta.up { color: var(--up); }
.scorecard .delta.down { color: var(--down); }
.pill.level.bronze { background: color-mix(in srgb, #b0703a 22%, transparent); }
.pill.level.silver { background: color-mix(in srgb, #9aa3ad 30%, transparent); }
.pill.level.gold { background: color-mix(in srgb, #d4a514 28%, transparent); }
.pill.level.platinum { background: color-mix(in srgb, #6fb7c9 30%, transparent); }
.wins { margin: 0; padding-left: 20px; }
.wins li { margin: 2px 0; }
.part-row { margin: 10px 0; }
.part-row .row { display: flex; justify-content: space-between; gap: 8px; }
.meter { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 4px 0 2px; }
.meter span { display: block; height: 100%; background: var(--accent); }
td.nowrap { white-space: nowrap; }
/* a delivery's two steps (docs/DELIVERY_CHECK.md) */
.step { display: flex; align-items: center; gap: 8px; }
.step .stepno { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700; }
.step.done .stepno { background: var(--accent); color: var(--panel); }
details.skip { margin: 8px 0; }
details.skip label { display: block; margin: 6px 0; }

/* how sure we are of a delivery line's item, and what looks off (docs/DELIVERY_CHECK.md section 3) */
.pill.mark-checked { background: color-mix(in srgb, var(--good, #2e7d32) 18%, transparent); color: var(--good, #2e7d32); }
.pill.mark-remembered { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pill.mark-guess { background: color-mix(in srgb, #b26a00 18%, transparent); color: #b26a00; }
.pill.mark-unknown { background: color-mix(in srgb, var(--bad, #c62828) 16%, transparent); color: var(--bad, #c62828); }
.flag { margin: 2px 0; padding-left: 8px; border-left: 3px solid #b26a00; }
.flag.strong { border-left-color: var(--bad, #c62828); font-weight: 600; }
details.fine > summary { cursor: pointer; padding: 6px 0; }
.pill.mark { white-space: nowrap; display: inline-block; }
.lineitem { margin-top: 4px; display: flex; gap: 4px; align-items: center; }
.lineitem select { max-width: 100%; }
.lineitem .thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
dialog.line-scan { width: min(560px, calc(100vw - 32px)); border: 1px solid var(--line, #ccc); border-radius: 12px; padding: 12px 16px; }
dialog.line-scan::backdrop { background: rgba(0, 0, 0, .45); }
.vmap .thumb, #shelf-check .thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.progressline .meter { height: 8px; background: var(--line, #ddd); border-radius: 4px; overflow: hidden; }
.progressline .meter span { display: block; height: 100%; background: var(--accent); }

/* a photo on its way from the phone */
.sending { margin: 6px 0; font-weight: 600; }
.snap .busy { opacity: .5; pointer-events: none; }
/* Compare as a scoreboard and a map (/poc/compare, docs/OWNER_COMPARE.md): low-key; green and red only ever with ▲/▼ */
.view-switch { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin: 4px 0 12px; }
.view-switch a { padding: 6px 14px; font-size: 14px; color: var(--muted); }
.view-switch a + a { border-left: 1px solid var(--line); }
.view-switch a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.view-switch a:hover { text-decoration: none; }
.game .total { margin-bottom: 8px; }
.game .total .big { font-family: var(--display); font-size: 34px; font-weight: 600; margin: 2px 0; line-height: 1.1; }
.game .total .big small { font-family: var(--body); font-size: 14px; font-weight: 400; }
.game .total .chg { font-weight: 600; font-size: 15px; margin: 0 0 4px; }
.game .total.up .chg { color: var(--up); } .game .total.down .chg { color: var(--down); }
/* the trend: a store's colour by its slot (compare.trend), validated in both modes with the dataviz checker; light's
   aqua and yellow sit under 3:1 on white, so every line is also named in the legend and the tip */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #0ca30c; --series-7: #9085e9; --series-8: #e66767; } }
.trend { margin: 8px 0 2px; }
.trend-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.trend-modes button { background: none; border: 0; padding: 4px 12px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.trend-modes button + button { border-left: 1px solid var(--line); }
.trend-modes button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.game .line-wrap { position: relative; touch-action: pan-y; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.game .line-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend[data-mode="total"] [data-mode="stores"], .trend[data-mode="stores"] [data-mode="total"] { display: none; }
/* axes: labels in HTML around the chart (text in an svg that scales to the page would scale with it) */
.trend .plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ytitle ytitle" "yticks chart" ". xticks" ". xtitle"; column-gap: 6px; }
.trend .y-title { grid-area: ytitle; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.trend .y-ticks { grid-area: yticks; position: relative; min-width: 38px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trend .y-ticks span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.trend .line-wrap { grid-area: chart; }
.trend .x-ticks { grid-area: xticks; position: relative; height: 18px; font-size: 11px; color: var(--muted); }
.trend .x-ticks span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.trend .x-ticks span.first { transform: none; } .trend .x-ticks span.last { transform: translateX(-100%); }
.trend .x-title { grid-area: xtitle; font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px; }
.line-wrap .grid { stroke: var(--line-soft); stroke-width: 1; } .line-wrap .grid.zero { stroke: var(--line); }
section.compare.game.loading .total, section.compare.game.loading .awards, section.compare.game.loading .standings { opacity: .55; transition: opacity .15s; }
.trend[data-mode="total"] .trend-legend { display: none; }
.line-wrap .cross line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.line-wrap .cross circle { stroke: var(--panel); stroke-width: 2; }
.trend-legend { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.trend-legend .key, .trend-tip .key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.trend-tip { min-width: 170px; padding: 6px 10px; font-weight: 400; }
.trend-tip .tip-head { font-weight: 600; margin-bottom: 4px; }
.trend-tip .tip-row { display: flex; align-items: center; gap: 0; margin: 2px 0; }
.trend-tip .tip-row .name { flex: 1; margin-right: 12px; }
.trend-tip .tip-row .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.trend-tip .tip-row.total { border-top: 1px solid color-mix(in srgb, var(--panel) 35%, transparent); padding-top: 3px; margin-top: 4px; }
.trend-tip .key.none { width: 0; margin-right: 0; }
.game .ranges { justify-content: flex-start; margin-bottom: 12px; }
.chg-pill { display: inline-block; min-width: 64px; text-align: right; font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.chg-pill.up { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.chg-pill.down { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.chg-pill.flat { color: var(--muted); background: var(--line-soft); }
.awards { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.award { display: flex; gap: 8px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; }
.award-icon { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
.standings { list-style: none; padding: 0; margin: 0 0 12px; }
.standings li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 72px auto auto; grid-template-areas: "rank who spark num chg" "rank who spark open open";
  align-items: center; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.standings .rank { grid-area: rank; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--muted); text-align: center; }
.standings li:first-child:not(.unranked) .rank { color: var(--accent); }
.standings .who { grid-area: who; min-width: 0; }
.standings .who strong, .standings .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .spark-cell { grid-area: spark; } .standings .spark-cell svg { width: 72px; height: 24px; display: block; }
.standings .num { grid-area: num; font-weight: 600; text-align: right; }
.standings .chg-pill { grid-area: chg; }
.standings .open-store, .standings > li > a { grid-area: open; justify-self: end; font-size: 13px; }
.standings li.unranked { opacity: .8; }
@media (max-width: 420px) { .standings li { grid-template-columns: 22px minmax(0, 1fr) auto auto; grid-template-areas: "rank who num chg" "rank who open open"; }
  .standings .spark-cell { display: none; } }
.store-map { height: min(60vh, 480px); border-radius: 12px; border: 1px solid var(--line); margin: 0 0 10px; background: var(--line-soft); z-index: 0; }
.store-map .pad { padding: 16px; }
.store-pin { background: none; border: 0; }
.store-pin-label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; background: var(--panel); color: var(--ink);
  border: 1.5px solid var(--muted); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.store-pin.up .store-pin-label { border-color: var(--up); } .store-pin.down .store-pin-label { border-color: var(--down); }
.store-pin-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; }
.store-pin-chg { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.store-pin.up .store-pin-chg, .store-pin-chg.up { color: var(--up); } .store-pin.down .store-pin-chg, .store-pin-chg.down { color: var(--down); }
.store-pin-card { display: grid; gap: 4px; font-size: 14px; }
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--ink); }
