/* Always light on a white page. The count is one dense list in the order of the Excel sheet; the shop header, search and location bar stay pinned while the list scrolls. Locations are added as the shop is walked. */
:root {
  --bg: #FFFFFF;
  color-scheme: light;
  --card: #FFFFFF;
  --card-2: #F6F8FC;
  --ink: #131A36;
  --ink-2: #485174;
  --ink-3: #7A84A4;
  --line: #DFE5F0;
  --shell: #1E274F;
  --shell-2: #283267;
  --shell-ink: #C9D2EE;
  --ice: #5CA9FF;
  --primary: #0A4FD1;
  --primary-ink: #FFFFFF;
  --ok: #17845A; --ok-bg: #E4F4EC;
  --warn: #A5650A; --warn-bg: #FFF3DD;
  --bad: #BE3A2C; --bad-bg: #FCE9E6;
  --c-drinks: #0A4FD1; --c-alcohol: #7A3FC4; --c-food: #D2691E; --c-consumables: #2B8AA6;
  --c-cleaning: #5B7A2E; --c-icecream: #DA3F78; --c-pastries: #B0861A; --c-crockery: #66708A; --c-gelato: #8A5635;
  --display: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --r: 16px;
}
@media not all { :root {
  --bg: #0E1330; --card: #172044; --card-2: #1D2752; --ink: #E9EEFB; --ink-2: #B4BDDB; --ink-3: #8790B3; --line: #2A3566;
  --shell: #0A0F27; --shell-2: #141B42; --shell-ink: #AEB8DC; --primary: #3D7BF2;
  --ok: #5FD39C; --ok-bg: #123A2D; --warn: #F0B65A; --warn-bg: #3A2C12; --bad: #FF8E80; --bad-bg: #3F1B19; color-scheme: dark; } }
:root[data-theme="never"] {
  --bg: #0E1330; --card: #172044; --card-2: #1D2752; --ink: #E9EEFB; --ink-2: #B4BDDB; --ink-3: #8790B3; --line: #2A3566;
  --shell: #0A0F27; --shell-2: #141B42; --shell-ink: #AEB8DC; --primary: #3D7BF2;
  --ok: #5FD39C; --ok-bg: #123A2D; --warn: #F0B65A; --warn-bg: #3A2C12; --bad: #FF8E80; --bad-bg: #3F1B19; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.2px; text-wrap: balance; }
h1 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* shell */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--shell); color: #fff; }
.top .in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 16px; white-space: nowrap; }
.mark svg { width: 30px; height: 30px; flex: none; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; color: var(--shell-ink); padding: 8px 12px; border-radius: 999px; font-weight: 650; font-size: 14px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-current="page"] { background: rgba(92,169,255,.18); color: #fff; }
.spacer { flex: 1; }
.as { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--shell-ink); }
.as select { background: var(--shell-2); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px 8px; font-weight: 600; max-width: 170px; }
.proto { background: var(--shell-2); color: var(--shell-ink); font-size: 12.5px; }
.proto .in { max-width: 1240px; margin: 0 auto; padding: 6px 16px; }
.page { max-width: 1240px; margin: 0 auto; padding: 22px 16px 130px; }

/* bits */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 650; white-space: nowrap; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.live { background: rgba(10,79,209,.12); color: var(--primary); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-weight: 500; opacity: .7; }
.rail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rail::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; padding: 3px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid .r { text-align: right; }
.grid tr.click { cursor: pointer; }
.grid tr.click:hover td { background: var(--card-2); }
.scroll { overflow-x: auto; }
.section { padding: 18px 20px; margin-top: 16px; }
.section > header { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.up { color: var(--ok); font-weight: 700; }
.down { color: var(--bad); font-weight: 700; }
.note { font-size: 13px; color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* home */
.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.hello p { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
.mine { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .mine { grid-template-columns: 1fr; } }
.due { background: var(--shell); color: #fff; border: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.due .when { color: var(--shell-ink); font-size: 13px; }
.due .big { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; }
.due .drow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.due .btn.primary { background: #fff; color: var(--shell); border-color: #fff; }
.due .btn.ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.frost { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; opacity: .12; pointer-events: none; }
.spark { width: 100%; height: 120px; display: block; }
.spark text { font-size: 11px; fill: var(--ink-3); font-family: var(--body); }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.shop { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r); }
.shop:hover { border-color: var(--ice); }
.shop .nm { font-family: var(--display); font-weight: 800; font-size: 19px; }
.shop .v { font-size: 22px; }
.mini { width: 100%; height: 34px; display: block; }

/* count */
.chead { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 52px)); z-index: 30; margin: -22px -16px 0; padding: 14px 16px 12px; background: var(--shell-2); color: #fff; }
.chead .in { max-width: 1208px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.ring { width: 54px; height: 54px; flex: none; }
.ring circle { fill: none; stroke-width: 6; }
.chead .who { flex: 1; min-width: 0; }
.chead .shopname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chead .shopname { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; }
.chead .sub { color: var(--shell-ink); font-size: 12.5px; }
.chead .meter { text-align: right; }
.chead .meter .v { font-size: clamp(24px, 4.6vw, 34px); line-height: 1; }
.chead .meter .d { font-size: 12.5px; color: var(--shell-ink); margin-top: 3px; }
.tools { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 52px) + var(--head-h, 80px)); z-index: 25; background: var(--bg); padding: 12px 0 10px; display: flex; flex-direction: column; gap: 10px; }
.toolrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 44px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 16px; }
.wherelabel { font-size: 12px; font-weight: 650; color: var(--ink-3); }
.where .chip svg { width: 16px; height: 16px; }

.group { margin-top: 18px; }
.group > header { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 8px; }
.group > header h2 { display: flex; align-items: center; gap: 10px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 12px 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; border-left: 4px solid var(--line); }
.row.done { border-left-color: var(--ok); }
.row.flag { border-left-color: var(--warn); }
.row .nm { font-weight: 650; line-height: 1.3; }
.row .meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.row .meta b { color: var(--ink-2); font-weight: 600; }
.row .hint { grid-column: 1 / -1; font-size: 13px; color: var(--warn); }
.locs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.loc { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.loc label { font-size: 11px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.loc input { width: 74px; height: 44px; text-align: center; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font-family: var(--display); font-weight: 800; font-size: 18px; }
.loc input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(10,79,209,.18); }
.loc.total input { background: var(--card-2); border-style: dashed; }
.lv { font-size: 12.5px; color: var(--ink-2); text-align: right; margin-top: 4px; }

/* walk mode */
.walk { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: 14px; align-items: start; }
@media (max-width: 900px) { .walk { grid-template-columns: 1fr; } .upnext { display: none; } }
.focus { padding: 0; overflow: hidden; }
.focus .band { height: 8px; }
.focus .body { padding: 20px clamp(16px, 3vw, 28px) 22px; display: flex; flex-direction: column; gap: 16px; }
.focus .crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.focus .pname { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.focus .how { color: var(--ink-2); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--card-2); border-radius: 12px; padding: 10px 12px; }
.fact .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.fact .v { font-family: var(--display); font-weight: 800; font-size: 20px; }
.placetabs { display: flex; gap: 8px; flex-wrap: wrap; }
.place { flex: 1 1 120px; min-width: 0; text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 12px; }
.place .pl { font-size: 12px; color: var(--ink-3); font-weight: 650; display: flex; gap: 6px; align-items: center; }
.place .pq { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; min-height: 29px; }
.place[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,209,.14); }
.place.add { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-weight: 650; font-size: 13px; border-style: dashed; flex: 0 0 auto; padding: 10px 14px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); font-family: var(--display); font-weight: 800; font-size: 22px; }
.keypad button:active { transform: scale(.97); }
.keypad .wide { font-size: 15px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--card-2); }
.total-line .v { font-size: 22px; }
.hintbox { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.hintbox.info { background: rgba(10,79,209,.08); color: var(--primary); }
.hintbox svg { flex: none; margin-top: 2px; }
.navrow { display: flex; gap: 10px; }
.navrow .btn { flex: 1; min-height: 52px; }
.upnext { padding: 14px; position: sticky; top: calc(var(--top-h, 52px) + var(--head-h, 80px) + 90px); max-height: 70vh; overflow: auto; }
.upnext button { display: flex; width: 100%; justify-content: space-between; gap: 10px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.upnext button[aria-current="true"] { background: var(--card-2); font-weight: 700; }
.upnext button .q { font-family: var(--display); font-weight: 800; }

.gelato { margin-top: 22px; padding: 18px 20px; border-left: 6px solid var(--c-gelato); }
.gelato .flav { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 12px; }
.gelato .f { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--card-2); font-size: 13.5px; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.dock .in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dock .sum { font-size: 13px; color: var(--ink-2); }
.dock .sum b { color: var(--ink); }

/* sheet dialog */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(10,14,35,.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 760px) { .scrim { align-items: center; } }
.sheet { width: min(760px, 100%); max-height: 92vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 22px clamp(16px, 4vw, 28px) calc(22px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { .sheet { border-radius: 22px; } }
.sheet .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-size: 14px; }
.li.warn { background: var(--warn-bg); }
.cmp { display: grid; grid-template-columns: 112px minmax(0, 1fr) 92px 92px; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.cmp .bars { display: flex; flex-direction: column; gap: 3px; }
.cmp .b { height: 8px; border-radius: 99px; }
.cmp .r { text-align: right; }
@media (max-width: 560px) { .cmp { grid-template-columns: 84px minmax(0, 1fr) 76px; } .cmp .hidesm { display: none; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; min-width: 0; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field input, .field select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--card); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.shopdots { display: flex; gap: 4px; }
.shopdots i { width: 18px; height: 18px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); font-style: normal; font-size: 10px; display: grid; place-items: center; color: var(--ink-3); font-weight: 700; }
.shopdots i.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lock { max-width: 520px; margin: 8vh auto; padding: 28px; text-align: center; }
.lock svg { margin-bottom: 10px; }
.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + span { background: var(--primary); }
.toggle input:checked + span::after { transform: translateX(18px); }
.bigchart { width: 100%; height: 220px; display: block; }
.bigchart text { font-size: 11.5px; fill: var(--ink-3); font-family: var(--body); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi .v { font-size: 24px; }

.proto .short { display: none; }
@media (max-width: 640px) {
  .proto .long { display: none; } .proto .short { display: inline; }
  .top .in { gap: 8px; padding: 8px 12px; }
  .mark svg { width: 26px; height: 26px; }
  .as select { max-width: 112px; font-size: 12px; }
  .chead .sub { font-size: 12px; }
  .chead .meter .d { display: none; }
  .search { min-width: 0; flex: 1 1 100%; }
  .toolrow .seg { flex: 1; } .toolrow .seg button { flex: 1; }
  .cmp { grid-template-columns: 108px minmax(0, 1fr) 76px; }
  .focus .body { gap: 12px; }
  .keypad button { height: 52px; }
  .mark b { display: none; }
  .as span { display: none; }
  .tabs button { padding: 8px 10px; font-size: 13px; }
  .row { grid-template-columns: 1fr; padding: 10px 10px 10px 12px; }
  .locs { justify-content: flex-start; }
  .loc input { width: 66px; }
  .facts .fact .v { font-size: 17px; }
  .chead .shopname { font-size: 17px; }
  .ring { width: 44px; height: 44px; }
}

.fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 36; display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 700; box-shadow: 0 8px 24px rgba(10, 79, 209, .35); }
.wrapchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wrapchips .chip { min-height: 38px; }
.bignum { font-family: var(--display); font-weight: 800; font-size: 22px !important; }
.loc .sh { display: none; }
.row .xs { }
@media (max-width: 640px) {
  .fab span { display: none; }
  .fab { width: 56px; padding: 0; justify-content: center; }
  .tools { position: static; padding-top: 10px; }
  .group { margin-top: 12px; }
  .group > header { margin-bottom: 6px; }
  .group > header h2 { font-size: 16px; }
  .rows { gap: 4px; }
  .row { grid-template-columns: minmax(0, 1fr) auto !important; gap: 2px 10px; padding: 7px 8px 7px 10px; border-radius: 10px; border-left-width: 3px; }
  .row .locs { flex-wrap: nowrap; gap: 5px; }
  .row .nm { font-size: 14px; font-weight: 600; line-height: 1.25; }
  .row .meta { font-size: 11.5px; gap: 0 8px; margin-top: 1px; }
  .row .xs { display: none; }
  .row .hint { font-size: 12px; }
  .row .hint .btn { min-height: 28px; padding: 0 8px; font-size: 12px; }
  .loc { gap: 1px; }
  .loc .lg { display: none; } .loc .sh { display: inline; }
  .loc label { font-size: 10px; }
  .loc input { width: 58px; height: 38px; font-size: 16px; border-radius: 8px; }
  .loc.total { display: none; }
  .row.multi .loc input { width: 50px; }
  #mergeto { flex: 1 1 100% !important; order: 3; }
  .lv { display: none; }
  .chead { padding: 8px 12px; }
  .ring { width: 36px; height: 36px; }
  .chead .meter .v { font-size: 22px; }
}

.drow2 { display: flex; gap: 8px; flex-wrap: wrap; }
.drow2 .btn { flex: 1; }
.cell { border: 0; background: var(--card-2); border-radius: 8px; padding: 4px 8px; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--ink); }
.cell:hover { background: rgba(10,79,209,.12); color: var(--primary); }
.grid.year td, .grid.year th { padding: 8px 8px; }
.grid.year tr.duerow td { border-bottom: 1px solid var(--line); padding-top: 0; }
.grid.year .totrow td { background: var(--card-2); }
.pasthead { background: var(--shell); border: 0; padding: 20px clamp(16px, 3vw, 24px); }
.pasthead .ph1 { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.chip.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--shell-ink); min-height: 34px; }
.chip.dark[aria-pressed="true"] { background: #fff; color: var(--shell); border-color: #fff; }
.upd { color: #7FE0AA; font-weight: 700; } .downd { color: #FFB1A6; font-weight: 700; }
.grid.past tr.cathead td { background: var(--card-2); padding-top: 12px; }
@media (max-width: 640px) { .grid.past .hidesm { display: none; } .grid.past td { padding: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* live additions */
.whoname { color: #fff; font-weight: 600; font-size: 13px; }
.hublink { color: var(--ice); text-decoration: none; font-weight: 600; font-size: 13px; margin-left: 10px; }
#savest { margin-left: 6px; }
.gate { max-width: 420px; margin: 8vh auto; padding: 28px; }
.gate h1 { font-size: 28px; }
.gate p { color: var(--ink-2); }
.gate form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.gate input { min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 16px; background: var(--card); color: var(--ink); }
.gate .err { color: var(--bad); font-size: 14px; min-height: 1em; }
.loading { padding: 18vh 16px; text-align: center; color: var(--ink-3); }
.loading .bar { width: 160px; height: 4px; margin: 14px auto 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 40%; background: var(--primary); border-radius: inherit; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .loading .bar i { animation: none; } }

/* ---------- count v3.2: pinned header, locations, dense list ---------- */
.cstick { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 52px)); z-index: 30; margin: -22px -16px 0; background: #fff; box-shadow: 0 1px 0 var(--line); }
.cstick .chead { position: static; margin: 0; }
.cstick .tools { position: static; max-width: 1240px; margin: 0 auto; padding: 8px 16px; gap: 6px; background: #fff; }
.lrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lrow .wherelabel { flex: none; }
.lrow .rail { flex: 1; min-width: 0; }
.cstick .chip { min-height: 32px; padding: 0 11px; font-size: 13px; gap: 6px; }
.cstick .chip .n { font-size: 12px; }
.cstick .search { min-height: 38px; }
.chip.add { border-style: dashed; color: var(--primary); background: #fff; }
.note { margin: 10px 0 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.rows.flat { gap: 0; margin-top: 2px; }
.rows.flat .row { display: grid; grid-template-columns: minmax(0, 1fr) auto !important; align-items: center; gap: 0 10px; padding: 5px 8px 5px 10px; background: #fff; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 0; }
.rows.flat .row.done { border-left-color: var(--ok); }
.rows.flat .row.flag { border-left-color: var(--warn); background: #FFFBF2; }
.rows.flat .row .nm { font-size: 14px; font-weight: 600; line-height: 1.25; }
.rows.flat .row .nm .dot { width: 7px; height: 7px; margin-right: 6px; display: inline-block; vertical-align: 2px; }
.rows.flat .row .meta { font-size: 11.5px; gap: 0 9px; margin-top: 1px; }
.rows.flat .row .meta .tot b { color: var(--primary); }
.rows.flat .rin input { width: 66px; height: 36px; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 16px; }
.rows.flat .rin input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(10,79,209,.18); }
.rows.flat .rin input:disabled { background: var(--card-2); }
.rows.flat .tq { min-width: 66px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 16px; }
.rows.flat .row .hint { grid-column: 1 / -1; font-size: 12px; padding: 2px 0 1px; }
.rows.flat .row .hint .btn { min-height: 26px; padding: 0 8px; font-size: 12px; }
.empty { padding: 28px 8px; text-align: center; }
.lchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin: 6px 4px 0 0; color: var(--ink-2); }
.lchip .x { border: 0; background: none; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0 2px; }
@media (min-width: 900px) { .rows.flat .row { padding: 6px 12px; } .rows.flat .row .nm { font-size: 14.5px; } }
@media (max-width: 640px) {
  .cstick .tools { padding: 6px 10px 7px; gap: 5px; }
  .cstick .search { min-height: 36px; border-radius: 10px; }
  .rows.flat { margin: 0 -16px; }
  .rows.flat .row .xs { display: none; }
  .wherelabel { display: none; }
}

/* ---------- v3.4: locations you add as you walk, gelato from the HUB ---------- */
.where .chip.wl svg { width: 14px; height: 14px; opacity: .75; }
.chip.add svg { width: 14px; height: 14px; }
.nextloc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 14px 0 0; padding: 14px 16px; border: 1.5px dashed #BFD0F2; border-radius: 14px; background: #F5F8FF; }
.nextloc > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.nextloc .nlb { display: flex; flex-wrap: wrap; gap: 8px; }
.nextloc .btn svg { width: 16px; height: 16px; }
.locgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin-top: 14px; }
.loctile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 76px; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; text-align: left; font-weight: 700; color: var(--ink); transition: border-color .15s, background .15s; }
.loctile svg { color: var(--primary); }
.loctile:hover, .loctile:focus-visible { border-color: var(--primary); background: #F5F8FF; }
.loctile:active { transform: scale(.98); }
.locadd { display: flex; gap: 8px; margin-top: 10px; }
.locadd input, .locedit { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.locadd input:focus, .locedit:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(10,79,209,.18); }
.loclist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.locrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #fff; }
.locrow:last-child { border-bottom: 0; }
.locrow.on { background: #F5F8FF; box-shadow: inset 3px 0 0 var(--primary); }
.locgo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 6px 4px; }
.locgo svg { color: var(--primary); flex: none; }
.locgo > span { display: flex; flex-direction: column; min-width: 0; }
.locact { display: flex; gap: 2px; }
.ib { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ink-2); }
.ib:hover { background: var(--card-2); }
.ib:disabled { opacity: .3; cursor: default; }
.gel { margin-top: 10px; }
.ghead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c-gelato); }
.ghead p { margin: 4px 0 0; max-width: 60ch; }
.gtot { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.gtot .num { font-family: var(--display); font-weight: 800; font-size: 24px; }
.gtot .btn svg { width: 15px; height: 15px; }
.gcat { display: flex; justify-content: space-between; padding: 14px 10px 6px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .4px; }
.rows.flat .row.gl { padding-top: 7px; padding-bottom: 7px; }
.rows.flat .row .meta .gb { color: var(--ink-3); }
.rows.flat .row.flag .meta .gb { color: var(--warn); font-weight: 600; }
.gv { font-family: var(--display); font-weight: 800; font-size: 15px; text-align: right; min-width: 72px; }
.note.warn { color: var(--warn); background: var(--warn-bg); border-color: #F2D9A8; }
@media (max-width: 640px) {
  .ghead { flex-direction: column; border-radius: 12px; }
  .gtot { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .nextloc { margin: 14px 0 0; }
  .nextloc .nlb, .nextloc .nlb .btn { width: 100%; }
  .locgrid { grid-template-columns: repeat(2, 1fr); }
}
#body { padding-bottom: 84px; }
.cstick .where .chip { flex-direction: row; }

/* ---------- v3.5: master list, gaps, ticking several, side panel ---------- */
.mhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.mhead h1 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.6px; }
.mhead p { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }
.mhbtn { display: flex; gap: 8px; flex-wrap: wrap; }
.mhbtn .btn svg { width: 16px; height: 16px; }
.mtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mtile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden; }
.mtile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); opacity: 0; transition: opacity .15s; }
.mtile .k { font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
.mtile .v { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.15; color: var(--ink); }
.mtile .s { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.mtile:hover { border-color: #BFD0F2; box-shadow: 0 6px 18px -12px rgba(10,79,209,.45); transform: translateY(-1px); }
.mtile[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,209,.12); }
.mtile[aria-pressed="true"]::before { opacity: 1; }
.mtile.warn .v { color: #E04A12; }
.mtile.warn::before { background: #FF5C1F; }
.mtile.warn[aria-pressed="true"] { border-color: #FF5C1F; box-shadow: 0 0 0 3px rgba(255,92,31,.14); }
.mtile.ok .v { color: var(--ok); }
.mlist { margin-top: 16px; padding: 0; overflow: hidden; }
.mtools { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 10px; }
.mtools .search { flex: 1 1 260px; }
.mtools select.btn { min-height: 44px; padding: 0 12px; }
.gaprail { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px; }
.gaprail:not(:empty) { padding-bottom: 10px; }
.gaprail .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
.gaprail .chip[aria-pressed="true"] { background: #FF5C1F; border-color: #FF5C1F; color: #fff; }
.mtable { overflow-x: auto; border-top: 1px solid var(--line); }
.mgrid th { position: sticky; top: 0; background: #FAFBFE; z-index: 1; }
.mgrid td { padding: 9px 12px; }
.mgrid tr.click:hover td { background: #F7F9FE; }
.mgrid tr.sel td { background: #EEF3FE; }
.mgrid tr.sel:hover td { background: #E6EEFD; }
.mgrid .ck { width: 44px; padding-right: 0; }
.pm .pn { font-weight: 650; line-height: 1.3; }
.pm .ps { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.sm-only { display: none; }
.gaps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.gp { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #FFF0E9; color: #C2410C; }
.gp.par, .gp.shops { background: #EEF3FE; color: var(--primary); }
.gp.note { background: var(--warn-bg); color: var(--warn); }
.gaps.big { margin-top: 10px; }
.gaps.big .gp { height: 24px; font-size: 12px; padding: 0 10px; }
.cb { position: relative; display: inline-grid; width: 22px; height: 22px; cursor: pointer; }
.cb input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cb span { width: 22px; height: 22px; border: 1.5px solid #B8C3DC; border-radius: 7px; background: #fff; transition: background .12s, border-color .12s; }
.cb input:checked + span { background: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 15px; background-position: center; background-repeat: no-repeat; }
.cb input:indeterminate + span { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 5px var(--primary), inset 0 0 0 20px #fff; }
.cb input:focus-visible + span { outline: 3px solid var(--ice); outline-offset: 2px; }
.inl { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 3px 6px; font: inherit; color: var(--ink); transition: border-color .12s, background .12s; }
.inl:hover { border-color: var(--line); background: #fff; }
.inl:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(10,79,209,.15); }
.inl.sup { font-size: 12.5px; width: min(220px, 100%); margin-left: -6px; border-color: #F3C7B3; border-style: dashed; color: var(--ink-2); }
.eurin { display: inline-flex; align-items: center; justify-content: flex-end; gap: 1px; font-family: var(--display); font-weight: 800; }
.eurin .inl { width: 82px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 14.5px; }
.eurin.empty { color: #C2410C; }
.eurin.empty .inl { border-color: #F3C7B3; border-style: dashed; background: #FFF8F4; }
.mfoot { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.bulkbar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; width: min(760px, calc(100% - 24px)); }
.bulkbar .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--shell); color: #fff; box-shadow: 0 18px 40px -16px rgba(10,14,35,.6); }
.bulkbar .bb { display: flex; gap: 6px; flex-wrap: wrap; }
.bulkbar .btn { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; }
.bulkbar .btn.primary { background: #fff; color: var(--primary); border-color: #fff; }
.bulkbar .btn.ghost { background: transparent; }
.bulkbar .btn svg { width: 15px; height: 15px; }
body.noscroll { overflow: hidden; }
.dscrim { position: fixed; inset: 0; z-index: 85; background: rgba(10,14,35,.38); display: flex; justify-content: flex-end; }
.drawer { width: min(520px, 100%); height: 100%; overflow: auto; background: #fff; box-shadow: -20px 0 50px -20px rgba(10,14,35,.35); display: flex; flex-direction: column; }
.dtop { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.dnav { display: flex; align-items: center; gap: 2px; }
.dsave { margin-left: auto; }
.dbody { padding: 18px 22px 40px; }
.dcat { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 650; }
.dname { width: 100%; margin-top: 4px; padding: 4px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.3px; color: var(--ink); background: transparent; }
.dname:hover { border-color: var(--line); }
.dname:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,209,.15); }
.okline { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ok); font-weight: 650; }
.dblock { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.dblock h3 { font-size: 15px; }
.dblock.newp { padding: 14px; border: 1px solid #F3C7B3; border-radius: 14px; background: #FFF8F4; }
.dblock.danger { display: flex; justify-content: flex-start; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.field input.need { border-color: #F3C7B3; border-style: dashed; background: #FFF8F4; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,209,.15); }
.wrapchips .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.wrapchips .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.wrapchips .chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.shopgrid { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.srow { display: grid; grid-template-columns: auto 1fr auto 78px; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow.off .sn { color: var(--ink-3); }
.srow .sn { font-weight: 650; }
.srow .par { width: 78px; min-height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; text-align: right; font-family: var(--display); font-weight: 800; }
.srow .par:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,209,.15); }
.srow .par:disabled { background: var(--card-2); }
.toggle.sm { width: 36px; height: 22px; }
.toggle.sm span::after { width: 16px; height: 16px; }
.toggle.sm input:checked + span::after { transform: translateX(14px); }
.chip.tri[data-st="add"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.tri[data-st="add"]::before { content: '+'; font-weight: 800; }
.chip.tri[data-st="off"] { background: var(--bad-bg); border-color: #F2B8B0; color: var(--bad); text-decoration: line-through; }
.blist { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); line-height: 1.45; }
@media (max-width: 900px) { .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .dscrim { align-items: flex-end; }
  .drawer { width: 100%; height: 94vh; border-radius: 22px 22px 0 0; }
  .dbody { padding: 14px 16px 40px; }
  .three { grid-template-columns: 1fr 1fr; }
  .three .field:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .mtile { padding: 12px 14px; }
  .mtile .v { font-size: 24px; }
  .mlist { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .mtools { padding: 12px 12px 8px; }
  .mtools select.btn { flex: 1 1 calc(50% - 4px); min-width: 0; font-size: 14px; }
  .mtools #mf { flex-basis: 100%; }
  .gaprail { padding: 0 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mgrid .hm { display: none; }
  .sm-only { display: inline; }
  .mgrid td { padding: 9px 8px; }
  .mgrid .ck { width: 34px; padding-left: 12px; }
  .eurin .inl { width: 70px; }
  .mhbtn { width: 100%; }
  .mhbtn .btn { flex: 1; }
  .bulkbar .in { padding: 10px 12px; }
  .bulkbar .bb { width: 100%; }
  .bulkbar .bb .btn { flex: 1; }
}
.dsave { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }

/* ---------- v3.6: PAR set by managers in the count sheet ---------- */
.chip.parchip { border-color: #FFC9B3; color: #C2410C; }
.chip.parchip[aria-pressed="true"] { background: #FF5C1F; border-color: #FF5C1F; color: #fff; }
.note.parnote { background: #FFF6F1; border-color: #FFD6C4; color: var(--ink-2); align-items: flex-start; }
.note.parnote svg { color: #FF5C1F; flex: none; margin-top: 2px; }
.rows.flat .rin input.parin { border-color: #FFC9B3; color: #C2410C; }
.rows.flat .rin input.parin:focus { border-color: #FF5C1F; box-shadow: 0 0 0 3px rgba(255,92,31,.18); }
.rows.flat .rin input.parin::placeholder { color: #E8B8A3; font-weight: 600; }
.parrows .row.done { border-left-color: #FF5C1F; }
.drow .btn svg { width: 16px; height: 16px; }
.acclist { display: flex; flex-direction: column; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.accrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.accrow:last-child { border-bottom: 0; }
.accrow .av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #EEF3FE; color: var(--primary); font-weight: 800; font-size: 13px; }
.accrow .an { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.accrow .an .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accrow select { min-height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; font-weight: 650; }

/* ---------- v3.8: one box per product, + adds more, total shown ---------- */
.rows.flat .row.cnt .rin { display: flex; align-items: center; gap: 6px; }
.plus { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1.5px dashed #BFD0F2; background: #F5F8FF; color: var(--primary); }
.plus:hover { border-style: solid; border-color: var(--primary); }
.plus:active { transform: scale(.94); }
.row.adding .plus { background: var(--primary); border-color: var(--primary); border-style: solid; color: #fff; }
.rows.flat .row .meta .tot { color: var(--primary); font-weight: 650; }
.rows.flat .row.multi .rin input { border-color: #9FBAF0; }
.addrow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 6px 0 4px; padding: 8px 10px; border-radius: 12px; background: #F5F8FF; border: 1px solid #DCE6FA; }
.addrow .ap { display: flex; flex-wrap: wrap; gap: 6px; }
.addrow .ap:empty { display: none; }
.addrow .part { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: #fff; border: 1px solid #C9D8F6; font-family: var(--display); font-weight: 800; font-size: 13.5px; color: var(--primary); }
.addrow .part button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-3); }
.addrow .part button:hover { background: var(--bad-bg); color: var(--bad); }
.addrow .aw { display: flex; gap: 6px; flex: 1 1 180px; }
.addrow .aw input { flex: 1; min-width: 0; height: 36px; border: 1.5px solid var(--primary); border-radius: 9px; padding: 0 10px; font-family: var(--display); font-weight: 800; font-size: 16px; background: #fff; }
.addrow .aw input:focus { outline: none; box-shadow: 0 0 0 3px rgba(10,79,209,.18); }
.addrow .at { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.addrow .at b { display: inline-block; font-family: var(--display); font-size: 18px; color: var(--ink); margin-left: 4px; }
.chip.cntchip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.note[hidden] { display: none !important; }
@media (max-width: 640px) { .fab { right: auto; left: 16px; } }

/* hazard flag on lines to check */
.haz { display: inline-grid; place-items: center; margin-right: 6px; vertical-align: -3px; }
.rows.flat .row.flag .nm .dot { display: none; }
.rows.flat .row.flag { border-left-color: #FF5C1F; background: #FFF6F1; }
.rows.flat .row.flag .rin input { border-color: #FF5C1F; background: #FFF; box-shadow: 0 0 0 3px rgba(255,92,31,.14); color: #C2410C; }
.rows.flat .row.flag .hint span { color: #B4410E !important; font-weight: 600; }
.chip.chk { border-color: #FFC9B3; color: #C2410C; }
.chip.chk svg { width: 15px; height: 15px; }
.chip.chk[aria-pressed="true"] { background: #FF5C1F; border-color: #FF5C1F; color: #fff; }
.dhaz { display: inline-flex; align-items: center; gap: 4px; color: #C2410C; }
.dhaz svg { width: 15px; height: 15px; }
.chip.chk[aria-pressed="true"] svg { filter: brightness(0) invert(1); }
/* v3.12 packs, add check, keyboard */
.row .meta .pc { color: var(--ink-3); }
.rows.flat .row .meta .pc { display: inline; }
.row .meta .pkv { color: var(--primary); margin-left: 0; }
.row .meta .pkv b { color: var(--primary); }
.row.flag .meta .pkv, .row.flag .meta .pkv b { color: var(--warn); }
.addrow .seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #fff; border: 1px solid #C9D8F6; flex: 0 0 auto; }
.addrow .seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.addrow .seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.sure { margin-top: 14px; padding: 14px; border-radius: 14px; background: #FFF6EE; border: 1px solid #F6CFA8; }
.sure .surehead { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sure p { margin: 6px 0 0; }
.sure .list { background: #fff; border-radius: 10px; }
.sure .actions { margin-top: 12px; }
@media (max-width: 640px) { .addrow .seg { flex: 1 1 100%; } .addrow .seg button { flex: 1; } }
.sheet .actions[hidden] { display: none; }
.row .meta .tot .pkv:not(:first-child) { margin-left: 8px; }
.fab[hidden], #fab[hidden] { display: none !important; }
/* v3.14 how to guide */
.guidebtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(92,169,255,.12); color: #fff; font-weight: 650; font-size: 13px; }
.guidebtn[aria-current="page"] { background: rgba(92,169,255,.3); }
@media (max-width: 640px) { .guidebtn span { display: none; } .guidebtn { width: 32px; padding: 0; justify-content: center; } .whoname { display: none; } }
.linkbtn { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.guide { max-width: 980px; margin: 0 auto; }
.ghero { display: grid; gap: 10px; margin-bottom: 22px; justify-items: start; }
.ghero p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.gjump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gjump a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.gjump a .num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--shell); color: #fff; font-size: 11.5px; }
.gjump a:hover { border-color: var(--primary); }
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gstep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 28px; padding: 22px 24px; align-items: start; scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.gstep.noimg { grid-template-columns: 1fr; background: var(--card-2); }
.gtxt { display: grid; gap: 10px; min-width: 0; }
.gnum { font-size: 34px; line-height: 1; color: var(--primary); display: flex; align-items: baseline; gap: 6px; }
.gnum span { font-family: var(--body); font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.gtxt h2 { font-size: 21px; }
.gtxt ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); max-width: 58ch; }
.gtxt ul b { color: var(--ink); }
.gshot { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(19,26,54,.10); background: var(--card-2); }
.gshot img { display: block; width: 100%; height: auto; }
#guide-office, #guide-faq { scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.goffice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.goffice p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.gfaq { display: grid; }
.gfaq details { border-top: 1px solid var(--line); padding: 12px 2px; }
.gfaq details:first-child { border-top: 0; }
.gfaq summary { cursor: pointer; font-weight: 650; }
.gfaq p { margin: 8px 0 0; color: var(--ink-2); }
@media (max-width: 720px) {
  .gstep { grid-template-columns: 1fr; padding: 18px 16px; gap: 16px; }
  .gshot { max-width: 300px; }
}
/* v3.15 practice count */
.prbar { background: #FF9A3D; color: #2B1600; }
.prbar .in { max-width: 1240px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.prtag { font-family: var(--display); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; background: #2B1600; color: #FFB46B; padding: 3px 9px; border-radius: 999px; }
.prmsg { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prbtn { border: 0; background: #2B1600; color: #fff; font-weight: 700; font-size: 12.5px; height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap; }
.prbtn.ghost { background: rgba(43,22,0,.12); color: #2B1600; }
@media (max-width: 520px) { .prmsg { display: none; } .prbar .in { justify-content: space-between; } }
.prentry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-color: #FFC58F; background: #FFF8F0; }
.prentry > div:first-child { flex: 1 1 280px; min-width: 0; }
.prgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.prgrid .section { margin-top: 0; }
.prtasks ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prtasks li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--card-2); color: var(--ink-2); }
.prtasks li.ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.prtasks .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--card); }
.prtasks li.ok .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.prmsgbox { margin-top: 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); padding: 12px 14px; overflow-x: auto; }
.prmsgbox pre { margin: 0; white-space: pre-wrap; font: 13px/1.5 var(--body); color: var(--ink); }
.prgo textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; resize: vertical; }
.prgo .field span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.prentry { margin: 0 0 16px; }
/* v3.16 count review */
.rventry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; border-color: #C9D8F6; background: #F3F7FF; }
.rventry > div:first-child { flex: 1 1 280px; min-width: 0; }
.rvhead { align-items: center; }
.rvmonth { display: flex; align-items: center; gap: 6px; }
.rvmonth .btn { width: 36px; padding: 0; justify-content: center; }
.rvkpi { margin-bottom: 6px; }
.rvkpi .of { font-size: 16px; color: var(--ink-3); font-weight: 700; }
.rvh { margin: 22px 0 12px; }
.rvshops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.rvshop { padding: 16px 18px; display: grid; gap: 12px; align-content: start; border-top: 4px solid var(--line); }
.rvshop.submitted { border-top-color: var(--ok); }
.rvshop.counting { border-top-color: var(--primary); }
.rvshop.none { border-top-color: var(--bad); }
.rvshop header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rvshop .nm { font-family: var(--display); font-size: 18px; font-weight: 800; }
.rvval { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.rvval .big { font-size: 26px; line-height: 1.1; }
.gelv { display: grid; text-align: right; }
.gelv b { font-size: 15px; }
.rvbar { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.rvbar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.rvshop.submitted .rvbar i { background: var(--ok); }
.rvfacts { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.rvfacts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.rvfacts dt { color: var(--ink-3); }
.rvfacts dd { margin: 0; color: var(--ink); }
.rvtags { display: flex; flex-wrap: wrap; gap: 6px; }
.rvtags:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; border: 0; font-size: 12.5px; font-weight: 650; background: var(--card-2); color: var(--ink-2); }
.tag svg { width: 14px; height: 14px; }
.tag.warn { background: var(--warn-bg); color: var(--warn); cursor: pointer; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.rvchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rvt td { vertical-align: top; }
.why { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--card-2); color: var(--ink-2); }
.why.big, .why.spike, .why.packs { background: var(--warn-bg); color: var(--warn); }
.why.zero { background: var(--bad-bg); color: var(--bad); }
.why.noprice, .why.newp { background: rgba(10,79,209,.10); color: var(--primary); }
.rvcat td .small { font-size: 11.5px; }
#rvlines { scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.kpi.click { cursor: pointer; }
.kpi.click:hover { border-color: var(--primary); }
.pin { display: inline-flex; gap: 6px; align-items: center; }
.pin input { width: 86px; height: 34px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 10px; text-align: right; font-family: var(--display); font-weight: 800; }
.pin input:focus { outline: none; border-color: var(--primary); }
#rvprice { scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.rows.flat .row .meta .gdl { color: var(--primary); font-weight: 650; }
.rvnew { display: grid; gap: 12px; }
.rvnp { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; background: var(--card); }
.rvnp header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.rvnp header > div:first-child { min-width: 0; }
.rvwhere { color: var(--ink-2); }
.rvsame, .rvkeep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rvsame .btn { max-width: 100%; white-space: normal; text-align: left; }
.rvpick { display: inline-flex; gap: 6px; }
.rvpick input, .rvkeep input[data-nn] { height: 34px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 10px; min-width: 0; }
.rvpick input { width: 210px; }
.rvkeep input[data-nn] { width: 230px; }
.rvkeep select { height: 34px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--card); }
@media (max-width: 640px) { .rvpick, .rvpick input, .rvkeep input[data-nn] { width: 100%; } }
.mcard { margin: 0 0 16px; border-color: #FFC58F; background: #FFF8F0; }
.mcard ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.mcard s { color: var(--ink-3); }
.npboth { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 4px; font-size: 12px; color: var(--warn); font-weight: 650; } .npboth svg { width: 13px; height: 13px; flex: none; }
/* v3.19 prices and check my count */
.pfhow .steps, .ckstep .ckwhy { color: var(--ink-2); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 72ch; }
.steps b { color: var(--ink); }
.pfprog { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pfprog .rvbar { flex: 1; }
.pfunit { font-weight: 650; }
.pfother summary { cursor: pointer; }
.ckentry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; border-color: #C9D8F6; background: #F3F7FF; }
.ckentry > div:first-child { flex: 1 1 280px; min-width: 0; }
.ckstep header { justify-content: flex-start; }
.ckstep header h2 { flex: 1; }
.cknum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--display); font-weight: 800; flex: none; }
.ckstep.done .cknum { background: var(--ok); }
.ckwhy { margin: 0 0 12px; max-width: 72ch; }
.ckt tr.ckdone td { background: var(--ok-bg); }
.ckt .pin input { width: 72px; }
.cklist { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.cklist s { color: var(--ink-3); }
.ckgel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ckgel > div { flex: 1 1 220px; }
.ckgel .num { font-size: 22px; }
@media (max-width: 640px) {
  .ckt thead { display: none; }
  .ckt, .ckt tbody { display: block; }
  .ckt tr { display: grid; grid-template-columns: repeat(4, auto) 1fr; align-items: center; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ckt td { border: 0; padding: 0; }
  .ckt td:first-child { grid-column: 1 / -1; }
  .ckt td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ink-3); font-family: var(--body); font-weight: 600; }
  .ckt td:last-child { justify-self: end; }
  .ckt td.small { grid-column: 1 / -1; }
  .ckstep .scroll { overflow: visible; }
}

.why.par0 { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 640px) {
  .pft thead { display: none; }
  .pft, .pft tbody { display: block; }
  .pft tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .pft td { border: 0; padding: 0; }
  .pft td:first-child, .pft td.pfw { grid-column: 1 / -1; }
  .pft td.r { text-align: right; }
  .pft .pin input { width: 84px; }
  .pfhow + .card .scroll, .pfother .scroll { overflow: visible; }
}

/* value of the counted amount, next to the box */
.rows.flat .rin { display: flex; align-items: center; gap: 6px; }
.rows.flat .rin .rv { min-width: 64px; text-align: right; font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.rows.flat .rin .rv:empty { min-width: 0; }
.rows.flat .rin .rv.np { color: var(--muted, #8a93a6); font-weight: 600; font-size: 12px; }
.rows.flat .row.flag .rin .rv { color: #C2410C; }
@media (max-width: 420px) { .rows.flat .rin .rv { min-width: 52px; font-size: 12px; } }

/* the counting unit as a clear chip, so pieces, packets and kg are never mixed up */
.rows.flat .row .meta .un { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: #EAF0FC; color: var(--primary); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.rows.flat .row.flag .meta .un { background: #FFE6DB; color: #C2410C; }

/* month end summary in Reports */
.msum .msum-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; background: var(--card-2); border-radius: 12px; }
.msum .msum-top .k { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.msum .msum-top .v { font-family: var(--display); font-size: 28px; font-weight: 800; }
.msum .msum-top .v2 { font-family: var(--display); font-size: 18px; font-weight: 750; margin-top: 6px; }
.msum .msum-top small { font-size: 12px; font-weight: 650; }
.msum-t tr.tot td { border-top: 2px solid var(--line); background: var(--card-2); }
.msum-notes { margin-top: 16px; }
.msum-notes h3 { font-size: 15px; margin: 0 0 8px; }
.msum-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.msum-notes li { font-size: 14px; line-height: 1.45; }
@media (max-width: 560px) { .msum .msum-top { grid-template-columns: 1fr 1fr; } .msum .msum-top > div:first-child { grid-column: 1 / -1; } .msum .msum-top .v { font-size: 24px; } }
.msum-t td:first-child { white-space: nowrap; }
@media (max-width: 560px) { .msum-t { font-size: 12.5px; } .msum-t th, .msum-t td { padding: 9px 5px; } .msum-t th:first-child, .msum-t td:first-child { padding-left: 0; } }
@media (max-width: 560px) { .msum-t .hidesm { display: none; } }

.pill.sku { background: #EEF2FA; color: var(--primary); font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .03em; }
#n-sku:not(:placeholder-shown), #f-sku:not(:placeholder-shown) { text-transform: uppercase; }

/* new supplier details */
.newsup { margin-top: 10px; padding: 16px; border: 1px solid #CFE2FF; background: #F5F9FF; border-radius: 14px; }
.newsup .nsh { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.newsup .nsh b { font-family: var(--display); font-size: 15px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
