/* Corner Crumb Kitchen Hub: styles */
:root {
  --cream: #FBF6EE;
  --cream-2: #F4EBDD;
  --cream-3: #EDE1CE;
  --surface: #FFFDF9;
  --line: #E7DAC7;
  --line-strong: #D6C2A6;
  --ink: #2B1D14;
  --ink-2: #4E3B2D;
  --muted: #745E4C;
  --crust: #6B4226;
  --crust-deep: #3B271A;
  --crust-darker: #2C1C12;
  --terracotta: #B4532F;
  --terracotta-hover: #9C4424;
  --terracotta-soft: #F7E3D8;
  --berry: #8E2453;
  --berry-hover: #761C44;
  --berry-soft: #F6E1EA;
  --sage: #47714C;
  --sage-soft: #E3EEDF;
  --amber: #8A5A00;
  --amber-soft: #FBEFD2;
  --red: #B42318;
  --red-soft: #FDE6E2;
  --slate: #2F4858;
  --focus: #8E2453;
  --shadow-sm: 0 1px 2px rgba(59, 39, 26, .06), 0 1px 1px rgba(59, 39, 26, .04);
  --shadow: 0 2px 6px rgba(59, 39, 26, .06), 0 8px 24px rgba(59, 39, 26, .07);
  --shadow-lg: 0 18px 50px rgba(44, 28, 18, .22);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --sidebar-w: 252px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--terracotta); }
kbd {
  font-family: var(--font); font-size: 11px; font-weight: 600;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  padding: 0 5px; background: var(--surface); color: var(--muted); line-height: 18px;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px; height: 18px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.text-late { color: var(--red); }
.text-berry { color: var(--berry); }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sidebar :focus-visible { outline-color: #F2B8CF; }
[tabindex="-1"]:focus-visible { outline: none; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--crust-deep); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- demo banner ---------- */
.demo-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--crust-darker); color: #F7EBDC; font-size: 13px;
  padding: 6px 12px 6px 16px; min-height: 36px;
}
.demo-banner[hidden] { display: none; }
.demo-banner p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: #E8A07E; box-shadow: 0 0 0 3px rgba(232, 160, 126, .25); flex: none; }
.demo-banner-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.banner-link { background: none; border: 0; color: #FFD9C7; text-decoration: underline; text-underline-offset: 3px; padding: 4px 8px; font-weight: 600; font-size: 13px; }
.banner-link:hover { color: #fff; }
.banner-close { background: none; border: 0; color: #F7EBDC; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.banner-close:hover { background: rgba(255, 255, 255, .12); }
.demo-banner :focus-visible { outline-color: #FFD9C7; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--crust-deep);
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(180, 83, 47, .28), transparent 60%);
  color: #F5E8D8;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 18px 14px 18px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.logo { width: 40px; height: 40px; flex: none; }
.logo-sm { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: #fff; }
.brand-sub { font-size: 12.5px; color: #D9C4AD; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-list a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #EADBC8; text-decoration: none; font-weight: 500; font-size: 14.5px;
  transition: background .15s, color .15s;
}
.nav-list a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-list a[aria-current="page"] { background: var(--terracotta); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(180, 83, 47, .35); }
.nav-list a .icon { width: 19px; height: 19px; }
.nav-badge {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #F4D9CB; color: var(--crust-deep); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.nav-badge[hidden] { display: none; }
.nav-list a[aria-current="page"] .nav-badge { background: #fff; color: var(--terracotta); }
.nav-badge-warn { background: #F3D58F; }
.sidebar-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.store-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.store-dot { width: 9px; height: 9px; border-radius: 50%; background: #C9A88B; flex: none; }
.store-card.is-open .store-dot { background: #8FD19B; box-shadow: 0 0 0 3px rgba(143, 209, 155, .2); }
.store-card div { display: flex; flex-direction: column; line-height: 1.25; }
.store-name { font-size: 13px; font-weight: 600; color: #fff; }
.store-status { font-size: 12.5px; color: #D9C4AD; }
.side-btn {
  display: flex; align-items: center; gap: 8px; background: transparent; color: #EADBC8;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 500;
}
.side-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-credit { font-size: 12px; color: #BFA68D; padding: 0 4px; }
.side-credit strong { color: #F0D3C1; }
.nav-scrim { display: none; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 28px; min-height: 62px;
  background: rgba(251, 246, 238, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-toggle, .top-brand { display: none; }
.top-brand { align-items: center; gap: 8px; font-weight: 800; font-size: 16px; color: var(--crust-deep); }
.search-trigger {
  display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 8px 10px 8px 12px; color: var(--muted); text-align: left; box-shadow: var(--shadow-sm);
}
.search-trigger:hover { border-color: var(--line-strong); }
.st-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.st-keys { display: flex; gap: 3px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-variant-numeric: tabular-nums; }
.clock time { font-weight: 700; font-size: 15px; color: var(--crust-deep); }
.clock-date { font-size: 12px; color: var(--muted); }
.me { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.me-text { display: flex; flex-direction: column; line-height: 1.15; }
.me-name { font-weight: 700; font-size: 13.5px; }
.me-role { font-size: 12px; color: var(--muted); }
.mnav { display: none; }

.view { flex: 1; padding: 26px 28px 128px; width: 100%; max-width: 1440px; margin: 0 auto; }
.view:focus { outline: none; }
.noscript { padding: 20px; background: var(--amber-soft); border-radius: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 15px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 2px 8px rgba(180, 83, 47, .28); }
.btn-primary:hover:not(:disabled) { background: var(--terracotta-hover); }
.btn-berry { background: var(--berry); color: #fff; }
.btn-berry:hover { background: var(--berry-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #941C13; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--cream-2); }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2); flex: none;
}
.icon-btn:hover { background: var(--cream-2); border-color: var(--line); }
.icon-btn[aria-pressed="true"] { color: var(--terracotta); background: var(--terracotta-soft); }
.icon-btn-sm { width: 34px; height: 34px; }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; color: var(--terracotta); text-decoration: none; }
.link:hover { text-decoration: underline; }
.link .icon { width: 15px; height: 15px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--terracotta); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head-text { min-width: 0; max-width: 760px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 4px; }
.page-title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 34px);
  line-height: 1.12; letter-spacing: -.015em; color: var(--crust-deep);
  font-variation-settings: "opsz" 96;
}
.page-title:focus { outline: none; }
.page-sub { color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.today-clock { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--crust-deep); color: #FBEBDD; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; min-height: 40px; }
.today-clock .icon { color: #E8A07E; }

/* ---------- cards & KPIs ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px 20px; min-width: 0;
}
.card + .card { margin-top: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head-pad { padding: 16px 20px 0; }
.card-head h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.005em; color: var(--crust-deep); }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-foot { font-size: 13px; margin-top: 12px; }
.card-accent { background: linear-gradient(160deg, #FFF8F1, var(--terracotta-soft)); border-color: #EFCDBB; }
.big-line { font-size: 18px; margin-bottom: 4px; }
.big-line strong { font-size: 28px; color: var(--terracotta); font-weight: 800; }
.card-accent .btn { margin-top: 14px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; min-width: 0;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kpi-c, var(--line-strong)); }
.kpi-terracotta { --kpi-c: var(--terracotta); --kpi-soft: var(--terracotta-soft); }
.kpi-brown { --kpi-c: var(--crust); --kpi-soft: var(--cream-3); }
.kpi-berry { --kpi-c: var(--berry); --kpi-soft: var(--berry-soft); }
.kpi-sage { --kpi-c: var(--sage); --kpi-soft: var(--sage-soft); }
.kpi-warn { --kpi-c: #C98A00; --kpi-soft: var(--amber-soft); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kpi-soft, var(--cream-2)); color: var(--kpi-c, var(--crust)); }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; color: var(--crust-deep); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kpi-sub a { color: var(--terracotta); font-weight: 600; }
.kpis-sm .kpi-value { font-size: 24px; }
.delta { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.delta-up { color: var(--sage); }
.delta-down { color: var(--red); }
.delta-flat { color: var(--muted); }

.grid-today { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.grid-today .card + .card, .grid-3 .card + .card, .grid-reports .card + .card, .stack .card + .card { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-inv { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.grid-reports { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }

/* ---------- charts ---------- */
.chart-host { width: 100%; min-height: 200px; }
.chart { display: block; max-width: 100%; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .bar-act { fill: var(--terracotta); }
.chart .hatch-bg { fill: #F6E4D9; }
.chart .hatch-line { stroke: #E7BFA9; stroke-width: 3; }
.chart .now-line { stroke: var(--berry); stroke-width: 2; stroke-dasharray: 4 3; }
.chart .now-label { fill: var(--berry); font-size: 11.5px; font-weight: 700; font-family: var(--font); }
.chart .prev-line { stroke: var(--crust); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.chart .closed-mark { fill: var(--line-strong); font-size: 13px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-act { background: var(--terracotta); }
.lg-proj { background: repeating-linear-gradient(45deg, #F6E4D9 0 3px, #E7BFA9 3px 5px); }
.lg-prev { height: 0; border-top: 2px dashed var(--crust); border-radius: 0; width: 16px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { flex: none; }
.donut-track { stroke: var(--cream-2); }
.donut-total { font-size: 22px; font-weight: 800; fill: var(--crust-deep); font-family: var(--font); }
.donut-label { font-size: 12px; fill: var(--muted); font-family: var(--font); }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; display: grid; gap: 8px; }
.donut-legend li { display: grid; grid-template-columns: 12px 1fr auto auto auto; align-items: center; gap: 10px; font-size: 14px; }
.lg-swatch { width: 12px; height: 12px; border-radius: 4px; }
.lg-name { font-weight: 600; }
.lg-val { font-variant-numeric: tabular-nums; }
.lg-pct { color: var(--muted); font-size: 13px; width: 36px; text-align: right; }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-list li { display: flex; gap: 12px; align-items: flex-start; }
.bl-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--cream-2); color: var(--crust); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.bl-main { flex: 1; min-width: 0; }
.bl-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.bl-bar { display: block; height: 7px; background: var(--cream-2); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bl-bar span { display: block; height: 100%; border-radius: 99px; }

.spark { vertical-align: middle; }
.spark polyline { stroke: var(--line-strong); stroke-width: 1.5; }
.spark circle { fill: var(--crust); }
.fc { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-item { display: grid; grid-template-columns: 70px 14px 1fr; gap: 10px; align-items: start; position: relative; }
.tl-item + .tl-item { margin-top: 4px; }
.tl-item::before { content: ""; position: absolute; left: 86px; top: 22px; bottom: -10px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-time { font-weight: 700; font-size: 13.5px; text-align: right; padding-top: 10px; font-variant-numeric: tabular-nums; color: var(--crust-deep); }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line-strong); background: var(--cream-3); margin-top: 13px; position: relative; z-index: 1; }
.tl-new .tl-dot { background: var(--slate); box-shadow: 0 0 0 2px #B8C6CF; }
.tl-baking .tl-dot { background: var(--terracotta); box-shadow: 0 0 0 2px #EBC1AE; }
.tl-ready .tl-dot { background: var(--sage); box-shadow: 0 0 0 2px #BFD6BF; }
.tl-body {
  display: grid; gap: 2px; text-align: left; background: none; border: 1px solid transparent; border-radius: 10px;
  padding: 7px 10px; width: 100%; min-width: 0;
}
.tl-body:hover { background: var(--cream); border-color: var(--line); }
.tl-name { font-weight: 600; font-size: 14px; }
.tl-items { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }

.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-val { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.mini-val strong { color: var(--red); }

/* ---------- chips, tags, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; line-height: 18px; border: 1px solid transparent; white-space: nowrap; }
.chip-new { background: #E4ECF1; color: var(--slate); }
.chip-baking { background: var(--terracotta-soft); color: #8E3B1D; }
.chip-ready { background: var(--sage-soft); color: #355A3A; }
.chip-picked { background: var(--cream-2); color: var(--muted); }
.chip-soldout { background: var(--surface); border-color: var(--line-strong); color: var(--ink); padding: 6px 12px; font-size: 13px; }
.chip-soldout:hover { background: var(--cream-2); }
.chip-soldout .icon { width: 14px; height: 14px; color: var(--muted); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.due { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.due-late { background: var(--red); color: #fff; }
.due-warn { background: var(--amber-soft); color: var(--amber); border: 1px solid #EBCB85; }
.due-soon { background: var(--amber-soft); color: var(--amber); }
.due-ok { background: var(--sage-soft); color: #355A3A; }
.due-muted { background: var(--cream-2); color: var(--muted); }
.due-done { display: none; }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 7px; background: var(--cream-2); color: var(--ink-2); white-space: nowrap; }
.tag-gluten { background: #F5E9D2; color: #6E4A12; }
.tag-dairy { background: #E6EEF6; color: #2F4A66; }
.tag-eggs { background: #FBF0C9; color: #6B5300; }
.tag-nuts { background: #F3E1D3; color: #73401E; }
.tag-soy { background: #E5F0E1; color: #3A5C35; }
.tag-sesame { background: #EFE6F5; color: #563A6E; }
.tag-none { background: transparent; color: var(--muted); padding-left: 0; font-weight: 500; }
.tag-soldout { background: var(--berry-soft); color: var(--berry); }
.tag-warn { background: var(--amber-soft); color: var(--amber); }
.tag-crit { background: var(--red-soft); color: var(--red); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; margin-right: 7px; vertical-align: 1px; }
.cat-pill { display: inline-flex; align-items: center; font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.pill .icon { width: 15px; height: 15px; }
.pill-late { background: var(--red-soft); border-color: #F3B8B0; color: var(--red); }
.pill-soon { background: var(--amber-soft); border-color: #EBCB85; color: var(--amber); }
.pill-ok { background: var(--sage-soft); border-color: #C3DABF; color: #355A3A; }
.pill-soldout { background: var(--berry-soft); border-color: #E8BCD0; color: var(--berry); max-width: 100%; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.av-0 { background: #F7E3D8; color: #8E3B1D; }
.av-1 { background: #E3EEDF; color: #355A3A; }
.av-2 { background: #F6E1EA; color: #761C44; }
.av-3 { background: #E4ECF1; color: #2F4858; }
.av-4 { background: #F5E9D2; color: #6E4A12; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 26px 16px; display: grid; justify-items: center; gap: 6px; }
.empty-art { width: 54px; height: 54px; border-radius: 16px; background: var(--cream-2); color: var(--crust); display: grid; place-items: center; margin-bottom: 4px; }
.empty-art .icon { width: 26px; height: 26px; }
.empty-title { font-weight: 700; color: var(--crust-deep); }
.empty-text { color: var(--muted); font-size: 14px; max-width: 340px; }
.empty .btn { margin-top: 8px; }

/* ---------- order queue (kanban) ---------- */
.queue-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.queue-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.search-field {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 0 12px; min-height: 40px; min-width: 0; flex: 0 1 300px; color: var(--muted);
}
.search-field:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-field input { border: 0; background: transparent; outline: none; min-width: 0; flex: 1; padding: 8px 0; color: var(--ink); }
.search-wide { flex-basis: 380px; }

.kboard {
  display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start;
  overflow-x: auto; padding-bottom: 8px; scroll-padding: 0 4px;
}
.kcol { background: var(--cream-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 240px; transition: background .15s, box-shadow .15s; }
.kcol.drop-target { background: var(--terracotta-soft); box-shadow: inset 0 0 0 2px var(--terracotta); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.kcol-head h2 { font-size: 14.5px; font-weight: 700; color: var(--crust-deep); flex: 1; }
.kcol-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--crust); }
.kcol-icon .icon { width: 16px; height: 16px; }
.kcol-new .kcol-icon { color: var(--slate); }
.kcol-baking .kcol-icon { color: var(--terracotta); }
.kcol-ready .kcol-icon { color: var(--sage); }
.count { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; color: var(--ink-2); }
.kcol-body { display: grid; gap: 10px; }
.kcol-empty { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; display: grid; justify-items: center; gap: 8px; }
.kcol-empty .icon { width: 22px; height: 22px; opacity: .7; }

.ticket {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--slate);
  border-radius: 12px; padding: 10px 12px 12px; box-shadow: var(--shadow-sm); display: grid; gap: 8px;
  transition: box-shadow .15s, transform .15s, opacity .15s;
}
.ticket:hover { box-shadow: var(--shadow); }
.ticket.st-baking { border-left-color: var(--terracotta); }
.ticket.st-ready { border-left-color: var(--sage); }
.ticket.st-picked { border-left-color: var(--line-strong); background: #FDFAF5; }
.ticket.st-picked .t-items, .ticket.st-picked .t-note { opacity: .75; }
.ticket.is-late { border-color: #F0B3AA; border-left-color: var(--red); background: linear-gradient(180deg, #FFF7F5, var(--surface) 60%); }
.ticket.is-fresh { animation: fresh 1.6s ease-out 1; }
@keyframes fresh { 0% { box-shadow: 0 0 0 0 rgba(142, 36, 83, .55); transform: translateY(-6px); } 30% { transform: none; } 100% { box-shadow: 0 0 0 12px rgba(142, 36, 83, 0); } }
.ticket.is-dragging { opacity: .35; }
.ticket-ghost { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .96; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.t-top { display: flex; align-items: flex-start; gap: 6px; }
.grip { color: var(--line-strong); cursor: grab; padding: 6px 0; margin-left: -4px; touch-action: none; display: grid; place-items: center; width: 22px; flex: none; }
.grip:hover { color: var(--muted); }
.grip .icon { width: 16px; height: 16px; }
.t-title { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0; display: grid; }
.t-title:hover .t-name { text-decoration: underline; text-underline-offset: 3px; }
.t-name { font-weight: 700; font-size: 15px; color: var(--crust-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-id { font-size: 12px; color: var(--muted); }
.t-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.t-pickup { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.t-pickup .icon { width: 15px; height: 15px; color: var(--muted); }
.t-new-flag { position: absolute; top: -9px; right: 12px; background: var(--berry); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.t-items { list-style: none; margin: 0; padding: 8px 10px; background: var(--cream); border-radius: 8px; font-size: 13.5px; display: grid; gap: 3px; }
.qty { font-weight: 800; color: var(--terracotta); font-variant-numeric: tabular-nums; }
.t-cake, .t-note, .t-warn, .t-done { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.t-cake .icon, .t-note .icon, .t-warn .icon, .t-done .icon { width: 15px; height: 15px; margin-top: 2px; }
.t-cake { color: var(--berry); font-weight: 600; font-style: italic; }
.t-note { color: var(--ink-2); }
.t-warn { color: var(--amber); font-weight: 600; }
.t-done { color: var(--muted); }
.t-done .icon { color: var(--sage); }
.btn-advance { width: 100%; justify-content: space-between; min-height: 38px; font-size: 13.5px; color: #fff; background: var(--slate); }
.btn-advance:hover { filter: brightness(1.1); }
.adv-new { background: var(--terracotta); }
.adv-baking { background: var(--sage); }
.adv-ready { background: var(--crust); }

/* ---------- menus ---------- */
.menu {
  position: fixed; z-index: 250; min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-heading { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 8px; padding: 9px 10px; text-align: left; font-size: 14px; }
.menu-item:hover, .menu-item:focus { background: var(--cream-2); outline: none; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.menu-item.disabled { color: var(--muted); cursor: default; }
.menu-item.disabled:hover { background: none; }
.menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- tables ---------- */
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable thead th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FCF8F2; white-space: nowrap; }
.rtable thead th.num { text-align: right; }
.rtable thead th.center { text-align: center; }
.rtable tbody th, .rtable tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; font-weight: 400; }
.rtable tbody td.num { text-align: right; }
.rtable tbody td.center { text-align: center; }
.rtable tbody tr:last-child th, .rtable tbody tr:last-child td { border-bottom: 0; }
.rtable tbody tr:hover { background: #FDF9F3; }
.row-actions { text-align: right !important; white-space: nowrap; }
.row-actions .btn + .btn { margin-left: 6px; }
.card .rtable { border-top: 1px solid var(--line); }
.card-head-pad + .rtable { margin-top: 14px; }

.plan-table .prod-cell { display: flex; align-items: flex-start; font-weight: 600; }
.plan-table .prod-cell .cat-dot { margin-top: 6px; }
.plan-table tr.row-adjusted { background: #FFF8EE; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.step-btn { width: 38px; height: 38px; border: 0; background: transparent; display: grid; place-items: center; color: var(--crust); }
.step-btn:hover:not(:disabled) { background: var(--cream-2); }
.step-btn:disabled { color: var(--line-strong); cursor: not-allowed; }
.step-btn:focus-visible { outline-offset: -3px; }
.step-val { min-width: 36px; text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--crust-deep); }
.adj-note { display: block; font-size: 11.5px; margin-top: 4px; color: var(--terracotta); font-weight: 600; }
.adj-note.muted { color: var(--muted); font-weight: 500; }
.formula { display: flex; gap: 10px; align-items: flex-start; background: #FFF8EE; border: 1px solid #EFD9BC; color: var(--ink-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
.formula .icon { color: var(--terracotta); margin-top: 2px; }
.pre-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pre-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.pre-list li:last-child { border-bottom: 0; }
.pre-time { font-weight: 700; width: 72px; flex: none; font-variant-numeric: tabular-nums; color: var(--crust-deep); }
.pre-main { min-width: 0; }
.pre-main .t-cake { margin-top: 3px; display: inline-flex; }

.inv-table .ing-name { font-weight: 600; margin-right: 8px; }
.meter-wrap { display: grid; gap: 5px; min-width: 130px; }
.meter-val { font-variant-numeric: tabular-nums; font-size: 13.5px; }
.meter { display: block; height: 7px; border-radius: 99px; background: var(--cream-2); overflow: hidden; max-width: 180px; }
.meter-fill { display: block; height: 100%; border-radius: 99px; background: var(--sage); }
.lvl-low .meter-fill { background: #D08A3E; }
.lvl-crit .meter-fill { background: var(--red); }
.lvl-low { background: #FFFBF3; }
.lvl-crit { background: #FFF6F4; }
.shop-group + .shop-group { margin-top: 14px; }
.shop-sup { font-size: 13.5px; font-weight: 700; display: flex; justify-content: space-between; color: var(--crust-deep); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.shop-items { list-style: none; margin: 0; padding: 0; }
.shop-items li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; }
.shop-qty { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-total { display: flex; justify-content: space-between; margin: 14px 0 12px; padding-top: 10px; border-top: 2px solid var(--line); font-size: 15px; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.activity li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.act-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.act-icon .icon { width: 16px; height: 16px; }
.act-receive { background: var(--sage-soft); color: var(--sage); }
.act-usage { background: var(--terracotta-soft); color: var(--terracotta); }

.switch-label { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch-label input:checked + .switch { background: var(--terracotta); }
.switch-label input:checked + .switch::after { transform: translateX(16px); }
.switch-label input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 2px; }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--cream-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.seg-btn { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; min-height: 34px; }
.seg-btn:hover { background: rgba(255, 255, 255, .6); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--crust-deep); box-shadow: var(--shadow-sm); }
.seg-count { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }

.menu-table .prod-name { font-weight: 600; }
.menu-table .price { font-weight: 700; }
.row-soldout { background: #FBF4F7; }
.row-soldout .prod-name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(142, 36, 83, .5); }
tr.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 40% { background: #FCE7C7; } 100% { background: transparent; } }
.toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 2px; font-size: 13.5px; font-weight: 600; color: var(--sage); min-height: 36px; }
.toggle-track { width: 40px; height: 24px; border-radius: 99px; background: var(--sage); position: relative; transition: background .15s; flex: none; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transform: translateX(16px); transition: transform .15s; }
.toggle[aria-checked="false"] { color: var(--berry); }
.toggle[aria-checked="false"] .toggle-track { background: var(--line-strong); }
.toggle[aria-checked="false"] .toggle-thumb { transform: none; }
.toggle-text { min-width: 104px; text-align: left; }

.cust-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.cust-btn:hover .cust-name { text-decoration: underline; text-underline-offset: 3px; }
.cust-name { font-weight: 600; color: var(--crust-deep); }
.loyal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loyal-text { font-size: 13px; color: var(--muted); white-space: nowrap; }
.punches { display: inline-flex; gap: 3px; }
.punch { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.punch.on { background: var(--terracotta); border-color: var(--terracotta); }
.punches-big { gap: 6px; flex-wrap: wrap; }
.punches-big .punch { width: 34px; height: 34px; border-width: 2px; border-style: dashed; display: grid; place-items: center; color: var(--line-strong); }
.punches-big .punch .icon { width: 17px; height: 17px; }
.punches-big .punch.on { background: var(--terracotta); border-style: solid; color: #fff; }

.wow-table { margin-top: 16px; }

/* ---------- dialogs ---------- */
.overlay { position: fixed; inset: 0; z-index: 200; display: flex; }
.scrim { position: absolute; inset: 0; background: rgba(44, 28, 18, .42); animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.overlay.leaving .scrim { opacity: 0; transition: opacity .18s; }
.overlay-modal { align-items: flex-start; justify-content: center; padding: 8vh 16px 110px; overflow-y: auto; }
.dialog { position: relative; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; outline: none; }
.dialog-modal { border-radius: 18px; width: 100%; max-height: calc(100vh - 8vh - 110px); animation: rise .2s ease-out; }
.overlay.leaving .dialog-modal { opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.size-sm { max-width: 460px; }
.size-md { max-width: 600px; }
.size-lg { max-width: 860px; }
.size-palette { max-width: 640px; }
.size-palette .dialog-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
.size-palette .dialog-body { padding: 0; }
.overlay-drawer { justify-content: flex-end; }
.dialog-drawer { width: min(500px, 100vw); height: 100%; border-radius: 18px 0 0 18px; animation: slide .22s ease-out; }
.overlay.leaving .dialog-drawer { transform: translateX(30px); opacity: 0; transition: opacity .18s, transform .18s; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.dialog-title { font-size: 19px; font-weight: 800; color: var(--crust-deep); letter-spacing: -.01em; }
.dialog-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.dialog-body { padding: 18px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.dialog-drawer .dialog-body { padding-bottom: 120px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.drawer-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; padding: 14px; background: var(--cream); border-radius: 12px; }
.info-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.info-val { font-weight: 600; font-size: 14px; word-break: break-word; }
.callout { display: flex; gap: 10px; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.callout .icon { margin-top: 2px; }
.callout-note { background: #FFF6E3; border: 1px solid #F0DDB2; color: #5E4310; }
.callout-berry { background: var(--berry-soft); border: 1px solid #E8BCD0; color: var(--berry); }
.cake-msg { font-family: var(--font); font-size: 17px; font-style: italic; font-weight: 600; }
.sub-h { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.items-table th, .items-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.items-table thead th { font-size: 12px; color: var(--muted); font-weight: 700; }
.items-table .num { text-align: right; }
.items-table tfoot th, .items-table tfoot td { border-bottom: 0; padding-top: 10px; font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; position: relative; color: var(--muted); }
.step::before { content: ""; position: absolute; left: 12px; top: 26px; height: calc(100% - 14px); width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; position: relative; z-index: 1; }
.step-dot .icon { width: 14px; height: 14px; color: #fff; stroke-width: 3; }
.step.done { color: var(--ink); }
.step.done .step-dot { background: var(--sage); border-color: var(--sage); }
.step.done::before { background: #BFD6BF; }
.step.current .step-dot { background: var(--terracotta); border-color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-soft); }
.step.current .step-label { font-weight: 700; }
.step-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drawer-actions { display: grid; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.cust-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cust-hero .avatar { width: 48px; height: 48px; font-size: 16px; }
.cust-hero-name { font-weight: 800; font-size: 17px; }
.loyalty-card { border-radius: 16px; padding: 16px; margin-bottom: 16px; background: linear-gradient(140deg, #FFF8F1, #F7E3D8); border: 1px solid #EFCDBB; display: grid; gap: 12px; }
.lc-head { display: flex; justify-content: space-between; font-weight: 700; color: var(--crust-deep); }
.lc-head strong { font-size: 18px; color: var(--terracotta); }
.lc-note { font-size: 13.5px; color: var(--ink-2); }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.field input[type="text"], .field input[type="number"], .field input[type="search"], .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; background: var(--surface);
  font-weight: 400; min-height: 42px;
}
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--red); background: #FFF9F8; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.field-inline select { width: auto; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px; background: var(--surface); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { color: var(--red); font-size: 13.5px; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.check:has(input:checked) { background: var(--terracotta-soft); border-color: #EBC1AE; }
.check input { width: 17px; height: 17px; accent-color: var(--terracotta); margin: 0; }

/* palette */
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0; outline: none; font-size: 17px; background: transparent; min-width: 0; color: var(--ink); }
.palette-input .icon { width: 20px; height: 20px; }
.palette-list { max-height: min(56vh, 440px); overflow-y: auto; padding: 6px 8px 8px; }
.pal-gtitle { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
.pal-item .icon { color: var(--muted); }
.pal-item.active { background: var(--terracotta-soft); }
.pal-item.active .icon { color: var(--terracotta); }
.pal-label { font-weight: 600; font-size: 14.5px; flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-hint { font-size: 13px; color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pal-empty { text-align: center; padding: 30px 16px; color: var(--ink-2); }
.pal-empty .icon { width: 26px; height: 26px; color: var(--muted); margin-bottom: 6px; }
.palette-foot { display: flex; gap: 16px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.palette-foot kbd { margin-right: 2px; }

/* ticket + bake sheet previews */
.ticket-preview { background: var(--cream-2); border-radius: 12px; padding: 18px; display: grid; place-items: center; }
.print-ticket {
  width: 300px; max-width: 100%; background: #fff; color: #111; padding: 18px 16px 14px; box-shadow: var(--shadow);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45;
  border-radius: 4px;
}
.print-ticket hr { border: 0; border-top: 1px dashed #999; margin: 10px 0; }
.pt-brand { text-align: center; font-weight: 800; letter-spacing: .08em; }
.pt-sub { text-align: center; font-size: 11.5px; color: #555; }
.pt-big { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.pt-row { display: flex; justify-content: space-between; gap: 8px; }
.pt-item { display: grid; grid-template-columns: 36px 1fr 16px; gap: 6px; align-items: center; padding: 2px 0; font-size: 14px; }
.pt-qty { font-weight: 800; }
.pt-box, .bs-box { width: 14px; height: 14px; border: 1.5px solid #333; display: inline-block; border-radius: 2px; }
.pt-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-top: 6px; }
.pt-msg { font-size: 16px; font-weight: 700; border: 2px solid #111; padding: 6px 8px; margin: 4px 0 8px; text-align: center; }
.pt-note { margin-bottom: 8px; }
.pt-total { border-top: 1px dashed #999; padding-top: 8px; margin-top: 8px; }
.pt-foot { text-align: center; font-size: 11px; color: #666; margin-top: 10px; }
.bake-sheet { display: grid; gap: 20px; }
.bs-station h3 { font-size: 15px; font-weight: 800; color: var(--crust-deep); margin-bottom: 8px; }
.bs-station h3 .muted { font-weight: 500; font-size: 13px; }
.bs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bs-table th, .bs-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.bs-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--cream); }
.bs-table .num { text-align: right; }
.bs-table .center { text-align: center; }
.bs-notes { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.bs-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px; }
.bs-brand { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.bs-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.bs-meta { text-align: right; font-size: 13px; }
#print-root { display: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 74px; right: 18px; z-index: 260; display: grid; gap: 10px; width: min(400px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; background: var(--crust-darker); color: #F7EBDC;
  border-radius: 14px; padding: 12px 10px 12px 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: toastIn .22s ease-out;
}
.toast.leaving { opacity: 0; transform: translateX(16px); transition: opacity .2s, transform .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
.toast-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .1); }
.toast-success .toast-icon { background: #3F6B45; color: #DDF2DE; }
.toast-error .toast-icon { background: #9B2A1F; color: #FFE1DB; }
.toast-order .toast-icon { background: var(--berry); color: #fff; }
.toast-info .toast-icon { background: #5C4130; color: #FBE3D2; }
.toast-body { flex: 1; display: grid; gap: 2px; min-width: 0; padding-top: 3px; }
.toast-body strong { color: #fff; }
.toast-action { background: rgba(255, 255, 255, .12); color: #FFD9C7; border: 0; border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13px; flex: none; margin-top: 1px; }
.toast-action:hover { background: rgba(255, 255, 255, .2); }
.toast-close { background: none; border: 0; color: #CDB8A5; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; flex: none; }
.toast-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.toast :focus-visible { outline-color: #FFD9C7; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 .card-accent { grid-column: 1 / -1; }
  .grid-inv { grid-template-columns: 1fr; }
  .me-text { display: none; }
}
@media (max-width: 1024px) {
  .grid-today, .grid-reports { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .sidebar {
    position: fixed; z-index: 150; left: 0; top: 0; bottom: 0; height: 100%;
    transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s;
    box-shadow: var(--shadow-lg); width: min(300px, 86vw);
  }
  body.nav-open .sidebar { transform: none; visibility: visible; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 140; background: rgba(44, 28, 18, .42); }
  .nav-toggle { display: inline-grid; }
  .top-brand { display: inline-flex; }
  .topbar { padding: 8px 14px; gap: 8px; min-height: 58px; }
  .search-trigger { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; justify-content: center; margin-left: auto; box-shadow: none; }
  .st-text, .st-keys { display: none; }
  .top-right { margin-left: 0; gap: 4px; }
  .me { display: none; }
  .mnav {
    display: block; position: sticky; top: 58px; z-index: 29; background: var(--cream);
    border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
  }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav ul { list-style: none; margin: 0; padding: 6px 12px; display: flex; gap: 4px; width: max-content; }
  .mnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; min-height: 38px; }
  .mnav a[aria-current="page"] { background: var(--crust-deep); color: #fff; }
  .mnav a[aria-current="page"] .nav-badge { background: var(--terracotta); color: #fff; }
  .mnav .nav-badge { margin-left: 0; height: 18px; min-width: 18px; font-size: 11px; }
  .view { padding: 18px 16px 140px; }
  .kboard {
    grid-template-columns: repeat(4, minmax(272px, 84vw)); scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 0 16px 10px; scroll-padding: 0 16px;
  }
  .kcol { scroll-snap-align: start; }
  .toasts { top: 112px; right: 12px; left: 12px; width: auto; }
  .dialog-drawer { border-radius: 0; width: 100vw; }
  .overlay-modal { padding: 12px 12px 110px; }
  .dialog-modal { max-height: calc(100vh - 122px); max-height: calc(100dvh - 122px); }
}
@media (max-width: 720px) {
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-value { font-size: 24px; }
  .kpi-icon { width: 28px; height: 28px; }
  .kpi-icon .icon { width: 15px; height: 15px; }
  .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .card-flush { padding: 0; }
  .card-head-pad { padding: 14px 16px 0; }
  .search-field, .search-wide { flex: 1 1 100%; }
  .toolbar .seg { width: 100%; }
  .seg-btn { flex: 1 1 auto; justify-content: center; }
  .clock-date { display: none; }

  /* tables become stacked cards */
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable, .rtable tbody, .rtable tr, .rtable th, .rtable td { display: block; width: 100%; }
  .rtable tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .rtable tbody tr:last-child { border-bottom: 0; }
  .rtable tbody th, .rtable tbody td { border: 0 !important; padding: 4px 0; }
  .rtable tbody td { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right !important; }
  .rtable tbody td::before { content: attr(data-label); font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .rtable tbody th { padding-bottom: 6px; }
  .rtable tbody td.row-actions { justify-content: flex-start; gap: 8px; padding-top: 8px; }
  .rtable tbody td.row-actions::before { display: none; }
  .rtable tbody td.row-actions .btn { flex: 1; }
  .rtable tbody td.row-actions .btn + .btn { margin-left: 0; }
  .plan-table td.center { flex-wrap: wrap; }
  .plan-table td.center .adj-note { width: 100%; text-align: right; margin-top: 0; }
  .meter-wrap { justify-items: end; }
  .meter { width: 140px; }
  .loyal { justify-content: flex-end; }
  .toggle-text { min-width: 0; }
  .info-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }
  .donut-wrap { justify-content: center; }
  .donut-legend li { grid-template-columns: 12px 1fr auto auto; }
  .donut-legend li .delta { grid-column: 2 / -1; justify-self: start; }
  .tl-item { grid-template-columns: 60px 14px 1fr; gap: 8px; }
  .tl-item::before { left: 74px; }
  .demo-banner { font-size: 12.5px; padding-left: 12px; }
  .demo-banner p strong { display: none; }
  .palette-foot { display: none; }
  .pal-label { max-width: 55%; }
  .bs-table { font-size: 13px; }
  .bs-table th, .bs-table td { padding: 6px; }
}
@media (max-width: 400px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 21px; }
  .kpi-sub { font-size: 12px; }
  .top-brand span { display: none; }
  .banner-link { padding: 4px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; }
  body.print-ticket-mode .print-ticket { box-shadow: none; width: 80mm; margin: 0 auto; padding: 0; }
  body.print-sheet-mode #print-root { font-family: var(--font); color: #111; }
  body.print-sheet-mode .bs-table th, body.print-sheet-mode .bs-table td { border-bottom: 1px solid #bbb; }
  body.print-sheet-mode .bs-station { break-inside: avoid; }
  body:not(.printing) .demo-banner, body:not(.printing) .sidebar, body:not(.printing) .topbar, body:not(.printing) .mnav, body:not(.printing) .toasts { display: none !important; }
  .shop-group { break-inside: avoid; }
  .shop-items li { border-bottom: 1px solid #ddd; }
  .bs-box { margin-right: 8px; vertical-align: -2px; }
}
