/* 0.6 Catering OS
   Brand: 0.6 Catering & Events (zeropointsix.com.au) — navy, blush and cream, DM Sans headings, Open Sans body.
   Layout: navy left rail for navigation, a calm cream canvas, and kitchen "dockets" for production.
   RAG colours (green / amber / red) are reserved for status. */
:root {
  --bg: #fbf6f0;
  --surface: #ffffff;
  --surface-2: #f5ece2;
  --ink: #2a3946;
  --muted: #5e6c78;
  --line: #e8ddd1;
  --accent: #1d4867;
  --accent-ink: #ffffff;
  --accent-soft: #e2eaf1;
  --blush: #f2cdc3;
  --blush-ink: #1d4867;
  --docket: #fffaf4;
  --rail: #1d4867;
  --rail-ink: #d9e4ec;
  --rail-active: #2a5b80;

  --green: #2a7448; --green-soft: #e2f1e6;
  --amber: #a35f00; --amber-soft: #fbefd9;
  --red: #b83a28; --red-soft: #f9e3df;
  --blue: #2d649f; --blue-soft: #e2ecf7;
  --purple: #65489a; --purple-soft: #ece6f6;
  --teal: #16767b; --teal-soft: #dcf0f0;
  --grey: #5e6c78; --grey-soft: #eee8e1;

  --font-display: 'DM Sans', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Open Sans', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(29 72 103 / 7%), 0 2px 8px rgb(29 72 103 / 6%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1922; --surface: #16232e; --surface-2: #1d2d3a; --ink: #edf1f4; --muted: #9eafbc; --line: #2a3b49;
    --accent: #9cc3e0; --accent-ink: #0f1922; --accent-soft: #1c3346; --blush: #f2cdc3; --blush-ink: #1d4867; --docket: #1a2834; --rail: #0b141b; --rail-ink: #c4d3de; --rail-active: #1a2f40;
    --green: #6fcf8f; --green-soft: #1b3324; --amber: #f0b45a; --amber-soft: #3a2b12; --red: #f08a78; --red-soft: #3d1f1a;
    --blue: #86b4ea; --blue-soft: #1a2a3d; --purple: #b9a0ea; --purple-soft: #2a2140; --teal: #6fd0d4; --teal-soft: #15302f; --grey: #a3adb5; --grey-soft: #24313c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1922; --surface: #16232e; --surface-2: #1d2d3a; --ink: #edf1f4; --muted: #9eafbc; --line: #2a3b49;
    --accent: #9cc3e0; --accent-ink: #0f1922; --accent-soft: #1c3346; --blush: #f2cdc3; --blush-ink: #1d4867; --docket: #1a2834; --rail: #0b141b; --rail-ink: #c4d3de; --rail-active: #1a2f40;
    --green: #6fcf8f; --green-soft: #1b3324; --amber: #f0b45a; --amber-soft: #3a2b12; --red: #f08a78; --red-soft: #3d1f1a;
    --blue: #86b4ea; --blue-soft: #1a2a3d; --purple: #b9a0ea; --purple-soft: #2a2140; --teal: #6fd0d4; --teal-soft: #15302f; --grey: #a3adb5; --grey-soft: #24313c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: 0.02em; color: var(--accent); }
h1 { font-size: 1.75rem; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1.05rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
.h3 { margin: 4px 0 8px; font-size: .95rem; }
p { margin: 0 0 8px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; max-width: 100%;
}
textarea { width: 100%; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .88em; letter-spacing: -0.01em; }
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.break { word-break: break-word; }
.text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-green { color: var(--green); }
.row { display: flex; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.gap-s { gap: 8px; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.print-only { display: none; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--rail); color: var(--rail-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; }
.brand { flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px 22px; }
.wordmark { font: 500 1.55rem/1 var(--font-display); color: #fff; letter-spacing: -0.01em; }
.wordmark b { font-weight: 800; }
.wordmark-sub { font: 700 .62rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--rail-ink); padding-left: 2px; }
.wordmark-app { margin-top: 10px; display: inline-block; background: var(--blush); color: var(--blush-ink); font: 800 .66rem var(--font-display); letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { color: var(--rail-ink); border-radius: 8px; display: block; }
.nav-item:hover { background: var(--rail-active); text-decoration: none; }
.nav-item.active { background: var(--rail-active); color: #fff; box-shadow: inset 3px 0 0 var(--blush); }
.nav-inner { display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-weight: 500; }
.badge { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; padding: 0 6px; }
.badge.tone-red { background: var(--red); color: #fff; }
.badge.tone-amber { background: var(--amber); color: #fff; }
.sidebar-foot { margin-top: auto; font-size: .75rem; opacity: .6; padding: 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.topbar-title { font-family: var(--font-display); font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.viewing-as { display: flex; align-items: center; gap: 8px; }
.viewing-as select { min-height: 36px; padding: 4px 8px; max-width: 260px; }
.menu-btn { display: none; }
.scrim { display: none; }
.page { padding: 24px 28px 64px; max-width: 1360px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.crumbs { font-size: .9rem; margin-bottom: -8px; }

/* ---------- Buttons ---------- */
.btn { border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 999px; font-family: var(--font-display); letter-spacing: .02em; padding: 8px 14px; min-height: 40px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--blush); border-color: var(--blush-ink); color: var(--blush-ink); }
.btn:hover:not(:disabled) { background: var(--accent-soft); }
.btn.primary:hover:not(:disabled) { background: var(--blush); filter: brightness(.96); }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.chip { border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: .85rem; font-weight: 600; }
.seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.seg.sm button { padding: 5px 10px; font-size: .82rem; }
.seg button.on-doing { background: var(--amber); color: #fff; }
.seg button.on-done { background: var(--green); color: #fff; }
.seg button.on-todo { background: var(--grey); color: #fff; }

/* ---------- Pills, tones ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-green-solid { background: var(--green); color: #fff; }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-red-muted { background: var(--grey-soft); color: var(--red); text-decoration: line-through; }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-grey { background: var(--grey-soft); color: var(--grey); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.tone-green { background: var(--green); } .dot.tone-amber { background: var(--amber); } .dot.tone-red { background: var(--red); } .dot.tone-blue { background: var(--blue); } .dot.tone-grey { background: var(--line); }
.source { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.src-woocommerce { color: var(--purple); } .src-email { color: var(--blue); } .src-whatsapp { color: var(--green); } .src-in_person { color: var(--amber); }
.allergens { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.allergen { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--red); color: var(--red); text-transform: uppercase; letter-spacing: .03em; }
.banner { border-radius: var(--radius); padding: 10px 14px; border: 1px solid currentColor; }
.banner.tone-red, .banner.tone-amber, .banner.tone-blue, .banner.tone-green { color: var(--ink); }
.banner.tone-red { background: var(--red-soft); border-color: var(--red); }
.banner.tone-amber { background: var(--amber-soft); border-color: var(--amber); }
.banner.tone-blue { background: var(--blue-soft); border-color: var(--blue); }
.callout { background: var(--amber-soft); border-left: 3px solid var(--amber); padding: 8px 12px; border-radius: 4px; margin: 8px 0; }
.hint { color: var(--muted); font-size: .8rem; }

/* ---------- Cards & stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 0; flex-wrap: wrap; }
.card-body { padding: 14px 16px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; border-top: 4px solid var(--accent); }
.stat-green { border-top-color: var(--green); } .stat-amber { border-top-color: var(--amber); } .stat-red { border-top-color: var(--red); }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-value { font: 800 2rem/1.15 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat-sub { font-size: .85rem; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 8px; }
.mini { display: flex; flex-direction: column; }
.mini span { font-size: .78rem; color: var(--muted); }
.mini strong { font: 700 1.25rem var(--font-display); font-variant-numeric: tabular-nums; }
.mini em { font-style: normal; font-size: .8rem; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; flex: 1; min-width: 40px; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-fill.tone-accent { background: var(--accent); } .bar-fill.tone-green { background: var(--green); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap { border: 0; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table tr.covered td { color: var(--muted); }
.table input.qty { width: 80px; min-height: 34px; padding: 4px 8px; text-align: right; }
.perm td { text-align: center; } .perm th:first-child { text-align: left; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); }
.raw { font: .75rem/1.4 var(--font-mono); max-height: 320px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 6px; margin: 0; white-space: pre; }

/* ---------- Filters, tabs ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 280px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--accent); border-bottom-color: var(--blush-ink); }
.tab-count { background: var(--surface-2); border-radius: 999px; padding: 0 7px; font-size: .75rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; }
.field-label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check.big { align-items: flex-start; gap: 10px; }
.check.big input { width: 22px; height: 22px; margin-top: 2px; }
.line-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.line-row { display: grid; grid-template-columns: minmax(160px, 2fr) minmax(130px, 1.3fr) 70px 90px 90px minmax(120px, 1.5fr) auto; gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.line-row .qty, .line-row .price { width: 100%; text-align: right; }
.line-total { font-weight: 600; }
.totals { margin-left: auto; max-width: 360px; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; }
.totals .grand { font: 700 1.15rem var(--font-display); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.problems { margin: 0; padding: 10px 14px 10px 30px; background: var(--amber-soft); border-radius: var(--radius); color: var(--ink); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; justify-content: flex-end; border-top: 1px solid var(--line); }
.input.price, input.price { width: 110px; }
input.qty { width: 80px; }
.paste { font: .85rem/1.45 var(--font-mono); margin: 10px 0; }
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.thumb { max-height: 120px; border-radius: 6px; border: 1px solid var(--line); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; }
.dl dt { color: var(--muted); font-size: .85rem; }
.dl dd { margin: 0; min-width: 0; }
.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.method { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { border-left: 2px solid var(--line); padding-left: 12px; }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alert { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 6px; font-size: .88rem; color: var(--ink); }

/* ---------- Dashboard ---------- */
.attn, .runs { list-style: none; margin: 0; padding: 0; }
.attn li, .runs li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.attn li:last-child, .runs li:last-child { border-bottom: 0; }
.attn li:hover, .runs li:hover { background: var(--surface-2); }
.attn-main, .run-main { flex: 1; min-width: 0; }
.attn-side { text-align: right; }
.run-time { display: flex; flex-direction: column; width: 82px; flex: none; font-variant-numeric: tabular-nums; }
.workload { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wl-row { display: grid; grid-template-columns: 110px 1fr 50px; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; border-radius: 6px; cursor: pointer; text-align: left; }
.wl-row:hover { background: var(--surface-2); }
.wl-n { text-align: right; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 1.2fr) 1fr minmax(100px, auto); gap: 10px; align-items: center; }
.hbar-label { font-size: .88rem; min-width: 0; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Production ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; min-width: 0; }
.week-day.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.week-day.is-today .wd::after { content: ' · today'; color: var(--accent); font-weight: 700; text-transform: none; letter-spacing: 0; }
.wd { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dn { font: 700 1.05rem var(--font-display); }
.flag { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.dockets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.docket {
  background: var(--docket); border: 1px solid var(--line); border-radius: 4px 4px var(--radius) var(--radius); padding: 14px 16px 12px; position: relative;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 8px -3px, var(--bg) 5px, transparent 5.5px); background-size: 16px 8px; background-repeat: repeat-x;
  border-top: 0; padding-top: 18px;
}
.docket.status-done { opacity: .72; }
.docket.status-done h3 a { text-decoration: line-through; }
.docket.status-doing { box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.docket.changed { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.docket header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.docket h3 a { color: var(--ink); }
.docket-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.docket-qty { text-align: right; display: flex; flex-direction: column; }
.docket-qty strong { font: 700 1.6rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.docket-qty span { font-size: .78rem; color: var(--muted); }
.docket-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .85rem; }
.docket-orders { list-style: none; padding: 8px 0 0; margin: 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
.docket-orders li { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 8px; align-items: baseline; }
.docket-orders .diet { grid-column: 2 / -1; font-size: .78rem; color: var(--blue); font-weight: 600; }
.docket-notes { margin: 0; padding: 8px 10px 8px 26px; background: var(--amber-soft); border-radius: 6px; font-size: .84rem; }
.docket footer { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.docket footer select { min-height: 32px; padding: 3px 8px; font-size: .85rem; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.packing { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pack-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; break-inside: avoid; }
.pack-card header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }

/* ---------- Recipes ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.recipe-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.recipe-card:hover { border-color: var(--accent); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.recipe-cost { margin-top: auto; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; font-size: .88rem; font-variant-numeric: tabular-nums; }

/* ---------- Modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgb(10 20 15 / 45%); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgb(0 0 0 / 25%); }
.modal-wide { width: min(900px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 10px 16px; border-radius: 8px; font-weight: 600; box-shadow: var(--shadow); border: 1px solid currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-row { grid-template-columns: 1fr 1fr 70px 90px; }
  .line-row .note { grid-column: 1 / 4; }
  .line-row .line-total { text-align: right; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; height: auto; padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .menu-open .sidebar { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 35%); z-index: 30; }
  .menu-btn { display: inline-flex; font-size: 1.2rem; }
  .topbar { padding-left: max(8px, env(safe-area-inset-left, 0px)); }
  .grid.cols-2, .grid.cols-3, .grid.cols-3-1 { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
  .week { grid-template-columns: repeat(7, minmax(92px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .topbar-title { display: none; }
  .viewing-as .muted { display: none; }
  .viewing-as select { max-width: 200px; }
  .dockets, .checklist, .packing { grid-template-columns: minmax(0, 1fr); }
  .line-row { grid-template-columns: 1fr 70px; }
  .line-row select:first-child { grid-column: 1 / -1; }
  .line-row .note { grid-column: 1 / -1; }
  .hbar { grid-template-columns: 1fr; gap: 4px; }
  .hbar-val { text-align: left; }
  .stat-value { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Print ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --docket: #fff; --ink: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .sidebar, .topbar, .toasts, .tabs, .crumbs, .week, .scrim { display: none !important; }
  .print-only { display: block; }
  .print-head { font-size: 13pt; margin-bottom: 8px; border-bottom: 2px solid #000; padding-bottom: 6px; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .page-head .row { display: none; }
  .dockets, .packing, .checklist { grid-template-columns: 1fr 1fr; gap: 10px; }
  .docket, .pack-card, .card { box-shadow: none !important; break-inside: avoid; background: #fff; }
  .docket { border: 1px solid #000; border-radius: 0; background-image: none; padding-top: 12px; }
  .banner { border: 1px solid #000; background: #fff !important; }
  a { color: #000; }
}
.fillings { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; }
@media (max-width: 1300px) and (min-width: 601px) {
  .line-row { grid-template-columns: 1fr 1fr 70px 90px 90px; }
  .line-row .note { grid-column: 1 / 5; }
}

/* ---------- Menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.menu-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.menu-card h3 { font-size: 1.05rem; }
.menu-card p { margin: 0; }
.menu-card .sizes td { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.menu-card .linkish { align-self: flex-start; }
.menu-detail { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- Phase 1.1 ---------- */
.tight { margin: 4px 0 0; padding-left: 18px; }
.tight li { margin: 2px 0; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.readonly { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: .9rem; }
.problems.tone-red { background: var(--red-soft); }
.banner.tone-grey { background: var(--grey-soft); border-color: var(--line); color: var(--ink); }
.banner.notice .table-wrap { margin: 6px 0; }
.allergen-box { border-radius: 8px; padding: 8px 12px; margin: 6px 0; color: var(--ink); }
.allergen-box.tone-red { background: var(--red-soft); border-left: 3px solid var(--red); }
.allergen-box.tone-amber { background: var(--amber-soft); border-left: 3px solid var(--amber); }
.allergen-box.tone-blue { background: var(--blue-soft); border-left: 3px solid var(--blue); }
.callout.tone-red { background: var(--red-soft); border-left-color: var(--red); }
.storage-banner { margin: 12px 28px 0; }
.recovery { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); }
.recovery .card { max-width: 680px; width: 100%; }
@media (max-width: 900px) { .storage-banner { margin: 12px 16px 0; } }
@media print {
  .banner.notice button, .storage-banner { display: none !important; }
  .banner.notice { break-inside: avoid; }
}

/* ---------- Phase 2: shared test environment ---------- */
.login { max-width: 420px; width: 100%; }
.brand-login { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--rail); padding: 14px 16px; border-radius: 10px; }
.signed-in { align-items: center; }
