/* Café dashboard. One stylesheet; phone first, sidebar layout from 1024px. */

@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url(../fonts/young-serif-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url(../fonts/young-serif-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #1E1916; --ink-2: #5A504A; --ink-3: #6A5F57;
  --cream: #F6EFE4; --paper: #FFFBF5; --white: #FFFFFF; --ops: #F3EDE4;
  --line: #E4D9CA; --line-2: #EDE4D7;
  --clay: #B0482A; --clay-deep: #8E3820; --clay-tint: #F4E0D5; --clay-wash: #FBEFE8;
  --green: #2E6B45; --green-tint: #DDEBDF;
  --amber: #8A5A00; --amber-tint: #F8E9C8;
  --red: #A3261E; --red-tint: #F6DAD6;
  --veg: #2E7D32; --nonveg: #7A3E1D;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 25, 22, .06);
  --sidebar: 244px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ops); color: var(--ink); font: 400 15px/1.45 var(--sans); }
a { color: var(--clay); text-underline-offset: 2px; }
a:hover { color: var(--clay-deep); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 12px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 20px; color: var(--ink); text-decoration: none; }
.brand small { display: block; font: 500 12px/1.2 var(--sans); color: var(--ink-2); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.badge {
  position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--clay); color: var(--white); font: 700 11px/18px var(--sans); text-align: center;
}
.main { padding: 16px 16px 96px; max-width: 1280px; margin: 0 auto; }
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.bottom-nav a {
  flex: 1 1 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 600; border-radius: 12px;
}
.bottom-nav a[aria-current="page"] { color: var(--clay); font-weight: 700; }

@media (min-width: 1024px) {
  .topbar, .bottom-nav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 22px; position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
    padding: 26px 14px 18px; background: var(--paper); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .sidebar .brand { padding: 0 12px; font-size: 23px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a {
    display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px;
    color: var(--ink); text-decoration: none; font-weight: 600;
  }
  .sidebar nav a .icon { color: var(--ink-2); }
  .sidebar nav a:hover { background: var(--line-2); }
  .sidebar nav a[aria-current="page"] { background: var(--clay-tint); color: var(--clay-deep); font-weight: 700; }
  .sidebar nav a[aria-current="page"] .icon { color: var(--clay-deep); }
  .sidebar .nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--clay); color: var(--white); font: 700 12px/22px var(--sans); text-align: center; }
  .sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
  .main { margin-left: var(--sidebar); padding: 32px 40px 48px; max-width: none; }
  .main > * { max-width: 1240px; }
}

/* ---------------------------------------------------------------- page structure */
.page { display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.page-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grid-3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-kpi { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .cols-2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .cols-2-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card.white { background: var(--white); }
.card-pad-lg { padding: 20px 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h2, .card h2 { font-size: 16px; font-weight: 700; }
.card-head .sub, .card .sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; font-weight: 400; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.strong { font-weight: 700; }
.divider { height: 1px; background: var(--line); }
.empty { color: var(--ink-2); font-size: 14px; padding: 8px 0; }

/* ---------------------------------------------------------------- pills, badges, notices */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; background: var(--line-2); color: var(--ink-2);
}
.pill .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.pill-good { background: var(--green-tint); color: var(--green); }
.pill-warn { background: var(--amber-tint); color: var(--amber); }
.pill-critical { background: var(--red-tint); color: var(--red); }
.pill-clay { background: var(--clay-tint); color: var(--clay-deep); }
.pill-ink { background: var(--ink); color: var(--paper); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--line-2); font-size: 14px; }
.notice .icon { margin-top: 1px; }
.notice-good { background: var(--green-tint); } .notice-good .icon { color: var(--green); }
.notice-warn { background: var(--amber-tint); } .notice-warn .icon { color: var(--amber); }
.notice-error, .notice-critical { background: var(--red-tint); } .notice-error .icon, .notice-critical .icon { color: var(--red); }
.notice-info .icon { color: var(--ink-2); }
.notice strong { font-weight: 700; }
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.demo-banner { background: var(--ink); color: var(--paper); font-size: 13px; padding: 8px 16px; text-align: center; }
.demo-banner a { color: #F4C9B8; }

/* ---------------------------------------------------------------- buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--white); color: var(--ink); border-color: #D6C8B6; }
.btn-primary { background: var(--clay); border-color: var(--clay); color: var(--white); }
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--white); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #33291F; color: var(--paper); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 600; }
.help { font-size: 12px; color: var(--ink-2); }
.input, input[type=text], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=password],
input[type=time], select, textarea {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--white);
  color: var(--ink); font: 500 16px/1.2 var(--sans);
}
textarea { padding: 10px 12px; min-height: 80px; line-height: 1.4; }
input[type=file] { font: 500 14px var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--clay); outline-offset: 0; border-color: var(--clay); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--clay); }

/* ---------------------------------------------------------------- figures */
.hero-figure { font-size: 52px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.meter { height: 10px; border-radius: 999px; background: var(--clay-tint); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--clay); }
.meter.good > span { background: var(--green); } .meter.good { background: var(--green-tint); }
.delta { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.flat { color: var(--ink-2); }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tile .value { font-size: 26px; font-weight: 600; line-height: 1.1; }
.tile .sub { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kpi .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.kpi .value { font-size: 32px; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.kpi .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }

.hbar-list { display: flex; flex-direction: column; gap: 14px; position: relative; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 76px; align-items: center; gap: 12px; }
.hbar .name { display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 600; }
.hbar .name small { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.hbar .track { position: relative; height: 12px; }
.hbar .fill { position: absolute; left: 0; top: 0; height: 12px; background: var(--clay); border-radius: 0 4px 4px 0; }
.hbar .fill.neutral { background: #8A7D71; }
.hbar .fill.range { background: #CFC4B7; }
.hbar .val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hbar-band { position: absolute; top: -8px; bottom: -8px; background: var(--green-tint); border-radius: 4px; }
@media (min-width: 600px) { .hbar { grid-template-columns: 150px minmax(0, 1fr) 76px; } }

/* ---------------------------------------------------------------- lists and tables */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .title { font-size: 15px; font-weight: 600; }
.list-row .title a { color: var(--ink); text-decoration: none; }
.list-row .title a:hover { text-decoration: underline; }
.list-row .meta { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.list-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.code-chip { width: 42px; height: 42px; border-radius: 12px; background: var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.code-chip.web { background: var(--clay-tint); color: var(--clay-deep); }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.order-actions select { width: auto; min-height: 40px; font-size: 15px; }
.waiting { color: var(--red); font-weight: 700; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table .section td { font-size: 12px; font-weight: 700; color: var(--ink-2); padding-top: 14px; border-bottom: 1px solid var(--line); }
.row-warn td { background: var(--amber-tint); }

.tabs { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--line-2); gap: 2px; }
.tabs a { min-height: 38px; padding: 0 14px; border-radius: 9px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.switch-row .t { font-size: 15px; font-weight: 600; }
.switch-row .s { font-size: 13px; color: var(--ink-2); }
.switch { width: 60px; height: 44px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.switch .track { width: 52px; height: 30px; border-radius: 999px; background: #CFC4B7; display: flex; align-items: center; padding: 3px; transition: background .15s; }
.switch .knob { width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch[aria-checked="true"] .track { background: var(--green); }
.switch[aria-checked="true"] .knob { transform: translateX(22px); }

/* ---------------------------------------------------------------- checklist */
.checklist { display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; text-align: left; font: 500 15px/1.35 var(--sans); color: var(--ink); cursor: pointer; }
.check-item:last-child { border-bottom: 0; }
.check-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #CFC4B7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--white); }
.check-item.done .check-box { background: var(--green); border-color: var(--green); color: var(--white); }
.check-item.done .text { color: var(--ink-2); }
.check-item .who { margin-left: auto; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* ---------------------------------------------------------------- marks, charts */
.mark rect { fill: none; stroke-width: 1.5; }
.mark-veg rect { stroke: var(--veg); } .mark-veg circle { fill: var(--veg); }
.mark-nonveg rect { stroke: var(--nonveg); } .mark-nonveg path { fill: var(--nonveg); }
svg.chart { width: 100%; height: auto; display: block; font-family: var(--sans); }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .grid.base { stroke: #D4C7B6; }
.chart .tick { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .value { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart .bar { fill: var(--clay); }
.chart .bar:hover { fill: var(--clay-deep); }
.chart .bar.partial { fill: var(--clay-tint); stroke: var(--clay); stroke-width: 1; stroke-dasharray: 3 2; }
.chart .ref { stroke: var(--ink-3); stroke-width: 1; }
.chart .ref.strong { stroke: var(--ink); stroke-width: 1.5; }
.chart .ref-text { fill: var(--ink-3); font-size: 12px; font-weight: 600; }
.chart .ref.strong-text, .chart .strong-text { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart .dot { fill: var(--clay); stroke: var(--white); stroke-width: 2; }
.chart .dot:hover { fill: var(--clay-deep); }
.chart .label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .quad { fill: var(--ink-3); font-size: 12px; font-weight: 700; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--cream); }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; }
.code-input { font-size: 28px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.demo-list { display: flex; flex-direction: column; gap: 6px; }
.demo-list button { justify-content: space-between; width: 100%; }

.photo-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); }
.photo-frame img { display: block; width: 100%; height: auto; }
.key-box { font: 600 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ink); color: var(--paper); padding: 14px; border-radius: 12px; word-break: break-all; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline .step { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.timeline .step span:first-child { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .bottom-nav, .head-actions, .demo-banner, form { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
}

/* ---------------------------------------------------------------- additions used by the templates */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.main-plain { margin-left: 0 !important; }
.main .demo-banner { display: flex; gap: 8px; align-items: center; border-radius: 12px; margin: 0 0 16px; text-align: left; }
.nav-badge:empty, .badge:empty { display: none; }
.sidebar .who { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.sidebar .who span { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar .who small { color: var(--ink-2); font-size: 12px; }
.sidebar .who:hover { background: var(--line-2); }
.brand-lg { font-family: var(--serif); font-size: 20px; color: var(--clay-deep); margin-bottom: 6px; }
.center { text-align: center; }
.serif { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--clay); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.narrow { max-width: 680px; }
.card-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty-good { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; font-size: 14px; padding: 4px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 6px; }
.top-gap { margin-top: 12px; }
.inactive { opacity: .6; }
.plain-link { color: var(--ink); text-decoration: none; }
.plain-link:hover { color: var(--clay); text-decoration: underline; }
.alert-item strong a { text-decoration: none; }
.alert-item strong a:hover { text-decoration: underline; }
code { font: 500 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--line-2); padding: 1px 5px; border-radius: 5px; }
.ok-text { color: var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.warn-text { color: var(--amber); font-weight: 700; }
.bad-text { color: var(--red); font-weight: 700; }
.grid-2 { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-end { justify-content: flex-end; }
.with-mark { display: flex; align-items: center; gap: 10px; }

/* notices and alerts */
.notice .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notice a { color: inherit; }
.notice-dark { background: var(--ink); color: var(--paper); }
.notice-dark .icon { color: var(--paper); }
.alert-item { align-items: flex-start; }
.alert-item .ack { flex-shrink: 0; margin: -6px -6px -6px 0; }
@media (max-width: 420px) { .alert-item .ack span { display: none; } }

/* live board */
.row-urgent { background: var(--clay-wash); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.list-row .order-actions { margin-top: 8px; }
.live-pill[data-state="off"] { background: var(--amber-tint); color: var(--amber); }
.voided td { color: var(--ink-3); text-decoration: line-through; }
.voided td .pill { text-decoration: none; }

/* deliveries */
.delivery-card { gap: 16px; }
.address { font-size: 22px; font-weight: 700; line-height: 1.25; }

/* close the day */
.count-row { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.count-input { display: flex; align-items: center; gap: 10px; position: relative; }
.count-input .prefix { position: absolute; left: 12px; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.count-input input { padding-left: 28px; max-width: 220px; font-weight: 600; }
.settings-grid .count-input input { max-width: none; }
.diff { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.diff.match { color: var(--green); }
.diff.off { color: var(--amber); }
.total-diff { border-radius: 14px; padding: 14px 16px; background: var(--green-tint); display: flex; flex-direction: column; gap: 4px; }
.total-diff.over { background: var(--amber-tint); }
.total-figure { font-size: 24px; font-weight: 700; }
.total-card.good { background: var(--green-tint); border-color: #C6DDCB; }
.total-card.bad { background: var(--amber-tint); border-color: #EBD49F; }
.total-card .icon { vertical-align: -3px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--line-2); border-radius: 12px; }
.person-row .grow { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
details > summary { cursor: pointer; }
.summary-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--clay); list-style: none; }
.summary-btn::-webkit-details-marker { display: none; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }

/* daily logs */
.checklist form { border-bottom: 1px solid var(--line-2); }
.checklist form:last-child { border-bottom: 0; }
.checklist .check-item { border-bottom: 0; }
.unit-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile-bad { background: var(--red-tint); border-color: #EBC2BC; }
.tile-bad .value { color: var(--red); }

/* stock, purchases, menu */
details.edit-row { display: block; }
details.edit-row > summary { display: flex; align-items: center; gap: 12px; list-style: none; }
details.edit-row > summary::-webkit-details-marker { display: none; }
details.edit-row > summary .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
details.edit-row > summary > .icon { color: var(--ink-2); }
details.edit-row[open] > summary > .icon { color: var(--clay); }
.qty-input { display: flex; align-items: center; gap: 8px; }
.qty-input input { width: 110px; text-align: right; font-weight: 600; }
.qty-input .unit { width: 22px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.qty-input.compact { justify-content: flex-end; }
.qty-input.compact input { width: 96px; min-height: 38px; }
.count-line { gap: 16px; }
.count-line label { cursor: pointer; }
fieldset.lines { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.lines legend { padding: 0; margin-bottom: 8px; }
.line-head, .line-row { display: grid; gap: 8px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.line-head { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.menu-row { gap: 10px; }
.avail { display: flex; align-items: center; gap: 2px; margin: 0; flex-shrink: 0; }
.avail-text { font-size: 12px; font-weight: 700; color: var(--ink-2); min-width: 52px; text-align: right; }
.avail-text.off { color: var(--red); }
.head-actions .avail-text { min-width: 0; }

/* reports */
.hbar .track .band { position: absolute; top: -7px; bottom: -7px; background: var(--green-tint); border-radius: 4px; }
.food-bars { gap: 18px; }
.small-delta { font-size: 13px; line-height: 1.4; align-items: flex-start; }
.small-delta .icon { margin-top: 1px; }
.legend { display: flex; flex-direction: column; gap: 4px; }
.export-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.export-grid .btn { white-space: normal; text-align: left; min-height: 44px; padding: 10px 14px; line-height: 1.25; }
.kpi .label .tiny { font-weight: 500; }

/* settings */
.settings-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.unit-rows { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.key-card { border-color: var(--clay); }
.key-card h2 { display: flex; align-items: center; gap: 8px; }

/* more (mobile menu) */
.more-list { padding: 4px 16px; gap: 0; }
.more-list a { display: flex; align-items: center; gap: 14px; min-height: 54px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.more-list a:last-child { border-bottom: 0; }
.more-list a .icon { color: var(--ink-2); }
.more-list a span:first-of-type { flex: 1 1 auto; }
.more-list .chev { margin-left: auto; }

@media (max-width: 400px) {
  .hero-figure { font-size: 44px; }
  .page-head h1 { font-size: 27px; }
  .grid-3 { gap: 8px; }
  .tile { padding: 10px; }
  .tile .value { font-size: 22px; }
}
.audit-row { align-items: flex-start; }
.wrap-text { white-space: normal; overflow-wrap: anywhere; }
.card .address { font-size: 22px; font-weight: 700; line-height: 1.25; }

.table td.num { white-space: nowrap; }
.table td .pill { margin-left: 6px; height: 22px; padding: 0 8px; font-size: 11px; vertical-align: 1px; }
@media (max-width: 480px) {
  .table { font-size: 13px; }
  .table td, .table th { padding-right: 8px; }
}
