/* Layout: phone-first kitchen tool. Sticky green header with scrolling tabs, cards for batches, tables for costing. */
/* Weiss brand: deep plum + mauve on warm ivory, Cormorant for display, Source Sans for work. */
:root {
  --bg: #f7f2f0; --surface: #ffffff; --ink: #2a1820; --muted: #6e5862; --line: #e6dade; --hover: #f3eaee;
  --brand: #57263b; --brand-ink: #ffffff; --tab-hi: #d9a9bf; --accent: #924f6e; --accent-ink: #ffffff; --accent-soft: #f4e7ed;
  --good: #2f7a47; --good-bg: #e3f2e7; --warn: #8a5a00; --warn-bg: #fbefd4; --bad: #b3261e; --bad-bg: #fbe4e1;
  --f-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #170e12; --surface: #22161c; --ink: #f2e9ed; --muted: #b59ca8; --line: #3a2830; --hover: #2c1d24;
  --brand: #3d1a2a; --brand-ink: #f7eef2; --accent: #c98aa6; --accent-ink: #170e12; --accent-soft: #3a2230;
  --good: #6fcf8f; --good-bg: #183224; --warn: #f0bf5a; --warn-bg: #362a10; --bad: #ff8a80; --bad-bg: #3a1916; color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-body); -webkit-text-size-adjust: 100%; }
.wrap { max-width: 1000px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.row { display: flex; align-items: center; } .between { justify-content: space-between; gap: 12px; } .gap { gap: 8px; flex-wrap: wrap; } .wrapr { flex-wrap: wrap; gap: 8px; }
h1 { font: 600 32px/1.05 var(--f-display); margin: 16px 0 6px; letter-spacing: .01em; text-wrap: balance; }
h2 { font: 600 23px/1.15 var(--f-display); margin: 0 0 10px; } .h2 { margin-top: 22px; }
h3 { font: 600 19px/1.2 var(--f-display); margin: 14px 0 8px; }
p { margin: 6px 0; } .sub { color: var(--muted); max-width: 62ch; margin-bottom: 14px; }
.dim { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--f-mono); font-size: 13px; } .pre { white-space: pre-wrap; }
.good { color: var(--good); font-weight: 600; } .warn { color: var(--warn); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; }
.pad { padding: 24px 16px; } .err { color: var(--bad); background: var(--bad-bg); padding: 8px 10px; border-radius: 8px; }
.note { background: var(--warn-bg); color: var(--warn); padding: 8px 10px; border-radius: 8px; font-weight: 600; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: var(--brand); border-bottom: 3px double color-mix(in srgb, var(--brand-ink) 30%, transparent); color: var(--brand-ink); padding-top: env(safe-area-inset-top); }
.top .row { gap: 10px; padding-block: 10px 4px; }
.logo { display: flex; align-items: center; gap: 10px; font: 500 20px var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); }
.logo img { height: 30px; width: auto; } .who { margin-left: auto; font-size: 13px; opacity: .8; text-transform: capitalize; }
.top .btn.link { color: var(--brand-ink); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: var(--brand-ink); opacity: .75; text-decoration: none; font-weight: 600; padding: 10px 12px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { opacity: 1; border-bottom-color: var(--tab-hi); }
.page { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

/* controls */
.btn { font: 600 15px var(--f-body); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 9px 14px; border-radius: 10px; cursor: pointer; min-height: 42px; }
.btn:hover { background: var(--hover); } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } }
.btn.link { border: 0; background: none; color: var(--accent); padding: 6px 0; min-height: 0; }
.btn.sm { padding: 6px 10px; min-height: 36px; font-size: 14px; } .btn.wide { width: 100%; }
.btn.mic { font-size: 17px; } .btn.mic.live { background: var(--bad); color: #fff; border-color: var(--bad); }
.x { border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; padding: 4px 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { font: 16px var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.seg button { border: 0; background: var(--surface); color: var(--ink); font: 600 14px var(--f-body); padding: 8px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.check { display: flex; gap: 10px; align-items: center; } .check input { width: 22px; height: 22px; }

/* cards & lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.form { margin-bottom: 14px; } .inset { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.meta { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--hover); color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.s-planned.pill, .o-new { background: var(--warn-bg); color: var(--warn); }
.s-in_progress.pill, .o-in_production { background: var(--accent-soft); color: var(--accent); }
.s-done.pill, .q-processed, .st-ok, .o-shipped, .o-ready { background: var(--good-bg); color: var(--good); }
.q-new, .st-review { background: var(--warn-bg); color: var(--warn); } .st-partial, .st-none, .q-rejected { background: var(--bad-bg); color: var(--bad); }
.batch { border-left: 5px solid var(--warn); } .batch.s-in_progress { border-left-color: var(--accent); } .batch.s-done { border-left-color: var(--good); }
.task.urgent { border-left: 5px solid var(--bad); } .task.event { border-left: 5px solid var(--brand); } .task.isdone { opacity: .55; }
.alert.seen { opacity: .6; }
.recipe { margin-top: 10px; background: var(--bg); border-radius: 10px; padding: 10px; overflow-x: auto; }
.recipe td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.finish { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 4px; }
.shipbox { background: var(--bg); padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-top: 12px; scrollbar-width: none; }
.day { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 600 14px var(--f-body); white-space: nowrap; cursor: pointer; }
.day.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.orow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 80px; gap: 6px; margin-bottom: 6px; }
.lines { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.lrow { display: grid; grid-template-columns: minmax(0, 2.2fr) 80px 90px minmax(0, 1.4fr) 36px; gap: 6px; align-items: center; }
@media (max-width: 620px) { .lrow { grid-template-columns: minmax(0, 1fr) 80px 84px 36px; } .lrow input[id^="rl-n"] { grid-column: 1 / -1; grid-row: 2; } }
.addsize { margin-top: 12px; } .addsize input, .addsize select { width: auto; flex: 1 1 110px; }
.quote { font-size: 17px; } ul.plain { margin: 6px 0 0; padding-left: 18px; }

/* tables */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; } .n { text-align: right; white-space: nowrap; }
tr.click, .click { cursor: pointer; } tr.click:hover td { background: var(--hover); }
.card .t input { min-width: 90px; }

/* chat */
.chat .msgs { display: flex; flex-direction: column; gap: 8px; min-height: 40vh; max-height: 62vh; overflow-y: auto; padding: 4px 0 10px; }
.msg { max-width: 82%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg .by { font-size: 12px; color: var(--muted); } .msg p { margin: 2px 0 0; white-space: pre-wrap; }
.send { position: sticky; bottom: 0; background: var(--bg); padding-block: 8px calc(8px + env(safe-area-inset-bottom)); }

/* auth */
.auth { max-width: 420px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) 16px 40px; }
.brand { margin-bottom: 22px; text-align: center; } .brand img { height: 84px; width: auto; display: block; margin: 0 auto 10px; } .brand b { display: block; font: 500 30px/1.1 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--brand); } .brand span { color: var(--muted); font-size: 14px; letter-spacing: .04em; }
@media (prefers-color-scheme: dark) { .brand b { color: var(--accent); } .brand img { filter: brightness(0) invert(1); opacity: .85; } }
.auth .card { display: flex; flex-direction: column; gap: 4px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 20; max-width: 90vw; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* kitchen switcher, report button, dialogs */
.kpick { width: auto; max-width: 56vw; background: transparent; color: var(--brand-ink); border: 1px solid color-mix(in srgb, var(--brand-ink) 35%, transparent); font: 500 17px var(--f-display); letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; }
.kpick option { color: var(--ink); background: var(--surface); }
.report-btn { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 13px var(--f-body); padding: 8px 12px; border-radius: 999px; box-shadow: 0 2px 10px rgb(0 0 0 / .12); cursor: pointer; }
.modal { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.modal .card { width: 100%; max-width: 520px; }
@media (min-width: 700px) { .modal { align-items: center; } }
.shot { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; }
.took-row { padding: 6px 0; border-bottom: 1px dashed var(--line); } .took-row.unsure { background: var(--warn-bg); margin: 0 -14px; padding: 6px 14px; }
.kroles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; margin-top: 10px; }
.lrow.labor { grid-template-columns: minmax(0, 2fr) 80px minmax(0, 1.6fr) 60px 36px; }
@media (max-width: 620px) { .lrow.labor { grid-template-columns: minmax(0, 1fr) 70px 36px; } .lrow.labor select { grid-column: 1 / -1; grid-row: 2; } .lrow.labor .dim { display: none; } }
.pr-new { background: var(--warn-bg); color: var(--warn); } .pr-fixed { background: var(--good-bg); color: var(--good); }
.page { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
/* show every tab: wrap on wider screens, fade hint on phones */
@media (min-width: 700px) { .tabs { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 699px) { .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 32px; } }
@media (max-width: 520px) { .who { display: none; } .top .row { gap: 8px; } .kpick { max-width: none; flex: 1 1 auto; font-size: 15px; letter-spacing: .08em; } .top .btn.link { margin-left: auto; white-space: nowrap; } }
/* read-only viewers: hide every action button (navigation buttons are marked .keep) */
.viewonly .btn:not(.keep):not(.link), .viewonly .x, .viewonly .btn.link.sm { display: none !important; }
.viewnote { margin-top: 12px; }
/* access switches */
.access { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.access > select { max-width: 280px; }
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.sw { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; cursor: pointer; }
.sw input { width: 20px; height: 20px; accent-color: var(--brand); }
.sw:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sw.locked { opacity: .5; cursor: default; }
details.person > summary { list-style: none; cursor: pointer; }
details.person > summary::-webkit-details-marker { display: none; }
details.person[open] > summary { margin-bottom: 6px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.invite-send { margin-bottom: 14px; border-color: var(--accent); }

/* Dip Kitchen: mayonnaise cream ground, caramelised-onion header, golden accents */
:root[data-kitchen="dip"] {
  --bg: #faf5e9; --surface: #fffdf7; --ink: #2b2116; --muted: #6d5f4c; --line: #e9dcc3; --hover: #f4ead6;
  --brand: #6e4520; --brand-ink: #fff8ec; --tab-hi: #f2c97e; --accent: #b07a2e; --accent-ink: #ffffff; --accent-soft: #f6e9cf;
}
@media (prefers-color-scheme: dark) { :root[data-kitchen="dip"] {
  --bg: #16110b; --surface: #211910; --ink: #f4ebdc; --muted: #b9a68a; --line: #3a2d1d; --hover: #2a2016;
  --brand: #3f2a14; --brand-ink: #f8eedd; --tab-hi: #e0b064; --accent: #d9a65a; --accent-ink: #16110b; --accent-soft: #3a2a15; } }
.dmark { position: relative; display: inline-flex; flex-direction: column; align-items: center; font: 500 34px/0.9 var(--f-display); letter-spacing: 0; color: var(--brand-ink); padding: 0 2px; }
.dmark img { height: 8px; width: auto; margin-top: 2px; }
:root[data-kitchen="dip"] .brand b { color: var(--brand); }
/* floating dictation mic next to the box you're typing in */
.dictate { position: absolute; z-index: 25; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 2px 8px rgb(0 0 0 / .15); font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.dictate.live { background: var(--bad); color: #fff; border-color: var(--bad); }
label.btn { cursor: pointer; } label.btn.busy { opacity: .6; }
.chats { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 600 14px var(--f-body); white-space: nowrap; cursor: pointer; position: relative; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.fresh::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 6px 0; } .or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gbtn { display: inline-flex; justify-content: center; align-items: center; gap: 10px; }
.sent-line { padding: 8px 0; border-top: 1px dashed var(--line); } .sent-line:first-of-type { border-top: 0; }
.sent-line.gone > .row span:first-child { text-decoration: line-through; color: var(--muted); }
.confirm { margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--warn-bg); color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.trace { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* departments & categories */
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.tagchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.labrow { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.labrow label.row { gap: 4px; align-items: center; }
.bulk { background: var(--accent-soft); padding: 6px 10px; border-radius: 10px; }

/* invoices */
.inv-row { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.inv-row:hover { background: var(--hover); }
.pill.inv-draft { background: var(--warn-bg); color: var(--warn); }
.pill.inv-sent { background: var(--accent-soft); color: var(--accent); }
.pill.inv-paid { background: var(--good-bg); color: var(--good); }
.pill.inv-void { text-decoration: line-through; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.warnbox { background: var(--warn-bg); color: var(--ink); }
tr.needs td { background: var(--bad-bg); }
.t tfoot td { border-top: 1px solid var(--line); }
.pos-setup { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; }
@media print {
  .top, .tabs, .noprint, .report-btn, .dictate, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* item search box */
.ppick { position: relative; width: 100%; }
.ppick input { width: 100%; }
.ppick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.ppick-opt { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.ppick-opt:last-child { border-bottom: 0; }
.ppick-opt.hi, button.ppick-opt:hover { background: var(--hover); }
.ppick-opt.on { font-weight: 700; }
.oline { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.oline .orow, .took-row .orow { margin: 0; }
.took-row { display: flex; flex-direction: column; gap: 6px; }
.price-line { margin: 0; color: var(--muted); } .price-line b { color: var(--ink); }
.price-total { font-size: 17px; margin: 10px 0; }

/* took / waste switch */
.seg { display: flex; gap: 0; margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg button { flex: 1; padding: 12px 8px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.quicknote { margin-top: 16px; background: var(--accent-soft); border-color: transparent; }
.quicknote textarea { width: 100%; }

/* production */
.card.wait { border-left: 5px solid var(--accent); }
.packs { background: var(--bg); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.packs ul { margin: 2px 0 0; }
.orow.pack { grid-template-columns: minmax(0, 2fr) 100px minmax(0, 1fr); align-items: center; }
.needs { margin-top: 10px; }
.took-row .orow { grid-template-columns: 110px minmax(0, 1fr); }
.took-row .orow > span:empty { display: none; }
.done-box { text-align: center; }
.bigno { font-size: 30px; font-weight: 700; letter-spacing: .04em; background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 12px; margin: 6px 0 10px; }
.shipbox.off { opacity: .6; }
.card.wait.new { border-left-color: var(--warn); }
.notes-bill { border-left: 5px solid var(--warn); margin-bottom: 12px; }
.notes-bill summary { cursor: pointer; }
.taxsel { display: block; margin-top: 4px; font-size: 13px; padding: 2px 6px; max-width: 200px; }
.weekbar { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.weekbar .btn { font-size: 20px; line-height: 1; padding: 6px 14px; }
.weekname { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.weekpad { width: 46px; }
.ingdetail { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.packrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.seg.wrap4 { flex-wrap: wrap; } .seg.wrap4 button { flex: 1 1 45%; }
@media (min-width: 640px) { .seg.wrap4 button { flex: 1; } }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: center; margin: 10px 0 4px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.billline { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.billline.off { opacity: .55; }
.bl-desc { flex: 1; min-width: 0; font-weight: 600; }
.billnums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.billnums label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
@media (max-width: 480px) { .billnums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* front tabs + office menu */
.tabs .menu-btn { margin-left: auto; display: flex; align-items: center; gap: 6px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--brand-ink); opacity: .85; font: inherit; font-weight: 600; padding: 10px 12px; cursor: pointer; white-space: nowrap; }
.tabs .menu-btn.on { opacity: 1; border-bottom-color: var(--tab-hi); }
.tabs .burger { font-size: 18px; line-height: 1; }
.menu-back { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.25); }
.menu-panel { position: relative; z-index: 41; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 4px 16px; background: var(--surface); color: var(--ink); border-radius: 0 0 14px 14px; padding: 12px 16px 16px; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.menu-group { display: flex; flex-direction: column; }
.menu-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 4px; }
.menu-panel a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 8px; border-radius: 8px; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--hover); }
.tabs.wrap { flex-wrap: nowrap; }

/* ---- legibility pass: bigger, darker, tighter on phones ---- */
:root { --ink: #1c0f15; --muted: #4a3640; --line: #d8c7ce; }
:root[data-kitchen="dip"] { --ink: #1f170e; --muted: #4a3d2c; --line: #dccdb0; }
@media (prefers-color-scheme: dark) { :root, :root[data-kitchen="dip"] { --ink: #fbf5f8; --muted: #d6c3cc; --line: #4a3640; } }
html, body { font-size: 17px; line-height: 1.45; font-weight: 500; -webkit-font-smoothing: antialiased; }
b, strong { font-weight: 700; }
h1 { font-weight: 700; font-size: 34px; }
h2 { font: 700 21px/1.2 var(--f-body); letter-spacing: 0; }
h3 { font: 700 18px/1.25 var(--f-body); }
.sub { font-size: 16px; color: var(--muted); }
.small { font-size: 15px; } .meta { font-size: 15.5px; color: var(--muted); } .mono { font-size: 14.5px; }
.dim { color: var(--muted); }
.pill { font-size: 13.5px; padding: 4px 10px; }
.btn { font-size: 16px; font-weight: 700; }
.btn.sm { font-size: 15px; min-height: 40px; padding: 8px 12px; }
.chip { font-size: 15px; font-weight: 700; padding: 8px 14px; }
input, select, textarea { font-size: 17px; font-weight: 500; border-color: #bfa9b3; }
:root[data-kitchen="dip"] input, :root[data-kitchen="dip"] select, :root[data-kitchen="dip"] textarea { border-color: #c9b48f; }
label.f > span { font-size: 15px; font-weight: 700; color: var(--ink); }
.card { border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.t td, .t th { font-size: 16px; } .t th { font-weight: 700; color: var(--ink); }
.tabs a, .tabs .menu-btn { font-size: 16px; font-weight: 700; opacity: .85; }
.who { font-size: 14px; opacity: .95; }
.ppick-opt { font-size: 16.5px; font-weight: 500; }
.seg button { font-size: 16px; font-weight: 700; }
@media (max-width: 620px) {
  .wrap { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .card { padding: 12px; border-radius: 12px; }
  .list { gap: 8px; }
  h1 { font-size: 30px; margin-top: 12px; }
}
.itembox { display: flex; flex-direction: column; gap: 2px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 6px 0 12px; }
.itembox span { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.itembox b { font-size: 24px; line-height: 1.2; color: var(--ink); }
.packfixed { display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--bg); min-height: 44px; }
.orow.pack { grid-template-columns: minmax(0, 2fr) 110px minmax(0, 0.8fr); }
.newsize { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.stockcard { margin-top: 12px; border-left: 5px solid var(--good); }
.seg .seg-link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; text-decoration: none; font-weight: 700; font-size: 16px; color: var(--ink); background: var(--surface); }
.seg .seg-link span { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ===== Final design (G + E tabs + dot tags + emblem) ===== */
:root { --f-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, sans-serif; --bg: #faf6f3; --line: #e2d3da; --card-line: #e2d3da;
  --st-amber: #b37a00; --st-amber-ink: #6e4700; --st-blue: #2563c9; --st-blue-ink: #1f4c8f; --st-green: #1f8a4c; --st-green-ink: #1b6b3b; --st-red: #d93a2f; --st-red-ink: #a3241c; --st-grey: #8a8288; --st-grey-ink: #4a4448; }
:root[data-kitchen="dip"] { --bg: #faf5e9; --line: #e6d6b8; --card-line: #e6d6b8; }
@media (prefers-color-scheme: dark) { :root, :root[data-kitchen="dip"] { --bg: #18161a; --card-line: #3a3036; --line: #3a3036;
  --st-amber: #f0bf5a; --st-amber-ink: #f5cf73; --st-blue: #7fb0ff; --st-blue-ink: #9cc3ff; --st-green: #6fcf8f; --st-green-ink: #8fdca8; --st-red: #ff8a80; --st-red-ink: #ffaaa2; --st-grey: #a59ca2; --st-grey-ink: #cfc6cc; } }
html, body { font-family: var(--f-body); font-weight: 400; }
h1 { font: 700 30px/1.1 var(--f-body); letter-spacing: 0; }
h2 { font: 700 21px/1.2 var(--f-body); } h3 { font: 700 18px/1.25 var(--f-body); }
b, strong { font-weight: 700; }
/* header */
.top { border-bottom: 0; }
.top .row { padding-block: 12px 8px; }
.logo img { height: 30px; }
.kpick, b.logo { font: 700 19px var(--f-body); letter-spacing: .05em; text-transform: uppercase; border: 0; background: transparent; color: var(--brand-ink); padding: 4px 4px; }
.kpick { border: 1px solid color-mix(in srgb, var(--brand-ink) 30%, transparent); border-radius: 10px; padding: 4px 8px; }
.dmark { font-family: var(--f-display); }
/* framed tabs */
.tabs.wrap { background: rgba(255,255,255,.16); border-radius: 14px; padding: 4px; gap: 4px; margin: 2px 0 12px; display: flex; flex-wrap: nowrap; overflow: visible; }
.tabs a, .tabs .menu-btn { flex: 1 1 0; justify-content: center; text-align: center; border: 0 !important; border-radius: 11px; padding: 10px 6px; min-height: 46px; display: flex; align-items: center; gap: 6px; color: var(--brand-ink); opacity: 1; font-size: 16px; font-weight: 700; white-space: nowrap; }
.tabs a[aria-current="page"], .tabs .menu-btn.on { background: #fff; color: var(--brand); }
.tabs .menu-btn { margin-left: 0; flex: 0 1 auto; padding-inline: 12px; }
@media (max-width: 520px) { .tabs a, .tabs .menu-btn { font-size: 15px; padding-inline: 4px; } }
/* cards & buttons */
.card { background: var(--surface); border: 2px solid var(--card-line); border-radius: 18px; box-shadow: none; }
.btn { border-radius: 999px; font-weight: 700; border-width: 2px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.sm { border-radius: 999px; }
.btn.link { border-radius: 8px; }
.chip { border-radius: 999px; border-width: 2px; }
.seg { border-radius: 14px; border: 2px solid var(--card-line); padding: 4px; gap: 4px; background: var(--surface); }
.seg button { border-radius: 11px; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
input, select, textarea { border-radius: 12px; border-width: 2px; border-color: var(--card-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
/* status tags: rounded outline + coloured dot */
.pill { --c: var(--st-grey); --ci: var(--st-grey-ink); display: inline-flex; align-items: center; gap: 6px; background: transparent !important; color: var(--ci) !important; border: 2px solid var(--c); border-radius: 999px; padding: 3px 10px; font-size: 14px; font-weight: 700; text-transform: none; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.o-new, .s-planned, .q-new, .st-review, .inv-draft, .pr-new, .o-accepted { --c: var(--st-amber); --ci: var(--st-amber-ink); }
.o-in_production, .s-in_progress, .inv-sent, .pr-sent_to_fix { --c: var(--st-blue); --ci: var(--st-blue-ink); }
.o-ready, .o-shipped, .s-done, .q-processed, .st-ok, .inv-paid, .pr-fixed { --c: var(--st-green); --ci: var(--st-green-ink); }
.pill.bad, .pill.late, .st-partial, .st-none, .q-rejected, .o-declined, .o-cancelled, .s-cancelled, .inv-void { --c: var(--st-red); --ci: var(--st-red-ink); }
.batch { border-left-width: 2px; border-left-color: var(--card-line); }
.card.wait, .card.wait.new, .stockcard, .notes-bill, .quicknote { border-left-width: 2px; border-left-color: var(--card-line); }
.quicknote { background: var(--surface); }
.itembox { border-width: 2px; border-radius: 16px; }
.tabs.wrap { width: calc(100% - 32px); max-width: 968px; margin: 2px auto 12px; box-sizing: border-box; padding: 4px; }
@media (max-width: 620px) { .tabs.wrap { width: calc(100% - 24px); } }
/* ingredient detail, tidy */
.ingdetail { margin-top: 12px; border-top: 2px solid var(--card-line); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.ing-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ing-sec-h h3 { margin: 0; }
.packs-tbl { border: 2px solid var(--card-line); border-radius: 14px; overflow: hidden; }
.packrow2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; }
.packrow2 + .packrow2 { border-top: 1px solid var(--card-line); }
.pk-name, .pk-price { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-price { text-align: right; }
.pk-act { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
@media (max-width: 560px) { .packrow2 { grid-template-columns: minmax(0, 1fr) auto; } .pk-act { grid-column: 1 / -1; justify-content: space-between; } }
.ing-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.on { background: var(--hover); border-color: var(--brand); }
.panel { background: var(--bg); border: 2px solid var(--card-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.panel-h h3 { margin: 0; }
.panel .x { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--card-line); background: var(--surface); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.pf-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .pf-row2 { grid-template-columns: minmax(0, 1fr); gap: 0; } .pf-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; } }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.yield-seg { flex-wrap: wrap; margin-bottom: 8px; }
.yield-seg button { flex: 1 1 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; min-height: 60px; }
.yield-seg button span { font-size: 13px; font-weight: 400; opacity: .85; }
.progress { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.progress-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--card-line); overflow: hidden; max-width: 320px; }
.progress-bar span { display: block; height: 100%; background: var(--st-green); border-radius: 999px; }
.checkbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--st-amber); background: var(--surface); font-weight: 700; }
.checkbar.ok { border: 2px solid var(--st-green); color: var(--st-green-ink); }
.checkbar.inline { display: inline-flex; padding: 8px 12px; }
/* one-time field checks */
.tick { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--st-amber); background: var(--surface); color: transparent; font: 700 20px/1 var(--f-body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tick:hover { color: var(--st-amber); }
.tick.on { background: var(--st-green); border-color: var(--st-green); color: #fff; }
.verify { border: 2px dashed var(--st-amber); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.verify.compact { margin-top: 10px; padding: 10px; }
.verify-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.verify-h h3 { margin: 0; }
.vgroup { border: 2px solid var(--card-line); border-radius: 12px; overflow: hidden; }
.vgroup-h { background: var(--bg); padding: 6px 12px; font-weight: 700; font-size: 15px; }
.vline { display: grid; grid-template-columns: 38px minmax(90px, 0.6fr) minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 6px 10px; }
.vline + .vline { border-top: 1px solid var(--card-line); }
.vline .vl { font-weight: 700; color: var(--muted); font-size: 15px; }
.vline .vv { font-size: 16px; overflow-wrap: anywhere; }
.vline.ok .vv { color: var(--st-green-ink); }
.vrow { display: flex; align-items: center; gap: 8px; }
.vrow > .lrow { flex: 1; min-width: 0; }
.vrow.ok > .lrow input, .vrow.ok > .lrow select { border-color: var(--st-green); }
.lines { display: flex; flex-direction: column; gap: 6px; }
.vline .vv { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vline .vv input, .vline .vv select { max-width: 100%; }
.vline.dirty { background: var(--warn-bg); }
.vfields { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .vline { grid-template-columns: 38px minmax(0, 1fr); } .vline .vv { grid-column: 2; } }
label.mini { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 2 1 160px; min-width: 0; }
label.mini.sm { flex: 1 1 110px; }
.recipe-src { margin-bottom: 12px; }
.took-search { display: flex; gap: 8px; align-items: flex-start; }
.took-search .ppick { flex: 1; min-width: 0; }
.took-search .btn.mic { min-width: 52px; min-height: 48px; font-size: 20px; }
.notebox { display: flex; flex-direction: column; gap: 6px; background: var(--warn-bg); border-radius: 12px; padding: 10px; }
.cust-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.done-took { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-color: var(--st-green); }
.howmuch { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.x.sm { width: 28px; height: 28px; font-size: 16px; border-radius: 50%; border: 1px solid var(--card-line); background: var(--surface); cursor: pointer; color: var(--muted); flex: none; }
.sizeblock { border: 2px solid var(--card-line); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.sizeblock-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sizeblock-h b { font-size: 18px; margin-right: auto; }
.sizeblock-h select { width: auto; }
.costtag { background: var(--bg); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.pricegrid { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px 100px minmax(0, 1.4fr); gap: 6px 10px; align-items: center; }
.pg-h { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pg-c { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 620px) { .pricegrid { grid-template-columns: minmax(0, 1fr) 92px 80px; } .pricegrid .pg-h:nth-child(4) { display: none; } .pricegrid > .pg-c:nth-child(4n) { grid-column: 1 / -1; margin-bottom: 6px; } }
.sizes-list { display: flex; flex-direction: column; gap: 6px; }
.sizerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px solid var(--card-line); border-radius: 12px; padding: 8px 10px; }
.sizerow > b { margin-right: auto; font-size: 17px; }
.sizerow select { width: auto; }
.custprices { display: flex; flex-direction: column; gap: 6px; }
.custrow { border: 2px solid var(--card-line); border-radius: 14px; overflow: hidden; }
.custrow.open { border-color: var(--brand); }
.custrow-h { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 24px; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 0; padding: 12px; font: inherit; color: var(--ink); cursor: pointer; min-height: 52px; }
.custrow-h .chev { color: var(--muted); }
@media (max-width: 560px) { .custrow-h { grid-template-columns: minmax(0, 1fr) 24px; } .custrow-h .dim { grid-column: 1; grid-row: 2; } }
.custrow-b { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.pline { display: grid; grid-template-columns: minmax(0, 1.2fr) 110px 100px minmax(0, 1fr) 30px; gap: 8px; align-items: end; padding-top: 8px; border-top: 1px solid var(--card-line); }
.pl-size, .pl-profit { display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
@media (max-width: 560px) { .pline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; } .pl-size { grid-column: 1 / -1; } .pl-profit { grid-column: 1 / 3; min-height: 0; } }
.yield-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0; }
@media (max-width: 620px) { .yield-opts { grid-template-columns: minmax(0, 1fr); } }
.yopt { border: 2px solid var(--card-line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.yopt.on { border-color: var(--brand); }
.yopt label.check { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.yopt label.check .dim { flex-basis: 100%; padding-left: 28px; }

/* install-as-app button */
.install-wrap{position:relative;display:inline-flex}
.install-btn{background:#fff;color:#57263b;border:2px solid #fff;font-weight:700}
.install-tip{position:absolute;top:calc(100% + 8px);right:0;z-index:30;width:230px;background:#fff;color:#1c1a1e;border:2px solid #e2d3da;border-radius:12px;padding:10px 12px;font-size:16px;box-shadow:0 6px 18px rgba(0,0,0,.18)}
