/* V1 — Forest Editorial: admin. Tokens in tokens.css. Designed at 1440, usable at 768 (store tablet). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--forest-950);
  color: var(--text);
  font: 400 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--leaf-500); outline-offset: 2px; border-radius: 6px; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 40vw at 85% -10%, color-mix(in oklab, var(--leaf-500) 10%, transparent), transparent 70%),
    radial-gradient(50vw 40vw at -10% 110%, color-mix(in oklab, var(--moss-600) 45%, transparent), transparent 70%);
}

.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: .86; letter-spacing: .02em; margin: 0; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mask { display: block; overflow: hidden; padding-bottom: .04em; }
.mask > span { display: block; }
.muted { color: var(--muted); }

/* ---------- Shell ---------- */
.shell { max-width: 1520px; margin: 0 auto; padding: 0 24px 48px; }
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
  margin: 0 -24px;
  padding: 0 24px;
  background: color-mix(in oklab, var(--forest-950) 80%, transparent);
  backdrop-filter: blur(14px);
}
.top__logo { display: flex; align-items: center; gap: 10px; }
.top__logo img { height: 38px; }
.top__logo span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.nav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--forest-900);
  border: 1px solid var(--line);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .3s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--forest-950); }
.nav a .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--clay-500); color: var(--forest-950); font-size: 11px; display: inline-grid; place-items: center; }
.nav__ink { position: absolute; top: 4px; left: 0; height: 36px; border-radius: 999px; background: var(--leaf-500); }
.top__right { display: flex; align-items: center; gap: 8px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.chip-btn:hover { background: var(--raised); }
.chip-btn svg { width: 16px; height: 16px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-500); box-shadow: 0 0 0 0 var(--leaf-500); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px transparent; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-100); color: var(--forest-950); font-weight: 600; font-size: 14px; flex: none; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--moss { background: var(--moss-600); color: var(--cream-100); }

.menu-pop {
  position: absolute;
  z-index: 50;
  min-width: 240px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--forest-900);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  display: none;
}
.menu-pop.open { display: block; }
.menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 14px; }
.menu-pop button:hover { background: var(--raised); }
.menu-pop button small { margin-left: auto; color: var(--muted); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding: 20px 0 22px; }
.page-head__title { font-size: clamp(56px, 6vw, 96px); }
.page-head__sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-left: auto; }
.kpi { display: grid; gap: 2px; }
.kpi__v { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.kpi__l { font-size: 12px; color: var(--muted); }
.delta { font-size: 12px; font-weight: 600; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: color-mix(in oklab, var(--leaf-500) 20%, transparent); color: var(--leaf-300); }
.delta--down { background: color-mix(in oklab, var(--clay-500) 20%, transparent); color: #F0A27F; }
.delta--warn { background: color-mix(in oklab, var(--sun-400) 18%, transparent); color: var(--sun-400); }

/* ---------- Panels ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.panel {
  position: relative;
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--forest-900) 88%, transparent);
  border: 1px solid var(--line);
  padding: 20px;
  min-width: 0;
}
.panel--cream { background: var(--cream-100); color: var(--forest-950); --muted: color-mix(in oklab, var(--forest-950) 62%, transparent); --line: color-mix(in oklab, var(--forest-950) 13%, transparent); }
.panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel__title { font-size: 34px; }
.panel__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }

.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); transition: background .2s; flex: none; }
.icon-btn:hover { background: var(--raised); }
.icon-btn svg { width: 16px; height: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--raised); }
.btn svg { width: 16px; height: 16px; }
.btn--leaf { background: var(--leaf-500); color: var(--forest-950); border-color: var(--leaf-500); }
.btn--leaf:hover { background: var(--leaf-300); border-color: var(--leaf-300); }
.btn--cream { background: var(--cream-100); color: var(--forest-950); border-color: var(--cream-100); }
.btn--cream:hover { background: #fff; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.seg button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--cream-100); color: var(--forest-950); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--cream-100); color: var(--forest-950); border-color: var(--cream-100); }
.chip svg { width: 14px; height: 14px; }

/* Toggle */
.toggle { position: relative; width: 40px; height: 24px; border-radius: 999px; background: color-mix(in oklab, var(--cream-100) 16%, transparent); flex: none; transition: background .25s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--cream-100); transition: translate .3s var(--ease-out); }
.toggle[aria-checked="true"] { background: var(--leaf-500); }
.toggle[aria-checked="true"]::after { translate: 16px 0; background: var(--forest-950); }
.toggle--snoozed { background: color-mix(in oklab, var(--sun-400) 55%, transparent); }

/* ---------- Overview ---------- */
.stores { display: grid; gap: 10px; }
.store-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--forest-950); border: 1px solid var(--line); }
.store-row__name { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: .9; text-transform: uppercase; }
.store-row__meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.store-row__meta b { color: var(--text); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--open { color: var(--leaf-500); }
.status--busy { color: var(--sun-400); }
.status--paused { color: var(--clay-500); }
.wait { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.wait small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }

.pass-list { display: grid; gap: 8px; }
.mini-ticket { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--forest-950); border: 1px solid var(--line); }
.mini-ticket__no { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: .9; }
.mini-ticket__items { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; height: 22px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center; }
.state--new { background: var(--sun-400); color: var(--forest-950); }
.state--preparing { background: var(--clay-500); color: var(--forest-950); }
.state--ready { background: var(--leaf-500); color: var(--forest-950); }
.state--collected { background: color-mix(in oklab, var(--cream-100) 14%, transparent); color: var(--muted); }

.snoozed { display: grid; gap: 8px; }
.snz { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.snz img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--cream-100); }
.snz__name { font-weight: 500; font-size: 14px; }
.snz__meta { font-size: 12px; color: var(--muted); }

.feed { display: grid; gap: 0; }
.feed__row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.feed__row:last-child { border-bottom: 0; }
.feed__row b { font-weight: 500; }
.feed__time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.diff-old { color: #F0A27F; text-decoration: line-through; }
.diff-new { color: var(--leaf-300); }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { font-size: 11px; fill: var(--muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--leaf-500); }
.chart .bar--prev { fill: color-mix(in oklab, var(--cream-100) 18%, transparent); }
.chart .line { fill: none; stroke: var(--leaf-500); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .line--prev { stroke: color-mix(in oklab, var(--cream-100) 45%, transparent); stroke-dasharray: 4 5; }
.chart .area { fill: url(#leafFade); }
.chart .hit { fill: transparent; }
.chart .cross { stroke: color-mix(in oklab, var(--cream-100) 35%, transparent); stroke-width: 1; }
.chart .marker { fill: var(--leaf-500); stroke: var(--forest-900); stroke-width: 2; }
.tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--cream-100);
  color: var(--forest-950);
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  translate: -50% calc(-100% - 12px);
  transition: opacity .15s;
}
.tip b { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tip .sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, color-mix(in oklab, var(--cream-100) 45%, transparent) 0 4px, transparent 4px 8px); }

.hero-num { font-size: 56px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.01em; }

.mix { display: grid; gap: 14px; }
.mix__row { display: grid; gap: 6px; }
.mix__top { display: flex; justify-content: space-between; font-size: 14px; }
.mix__top span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.mix__top i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mix__bar { height: 10px; border-radius: 999px; background: color-mix(in oklab, var(--cream-100) 8%, transparent); overflow: hidden; }
.mix__bar b { display: block; height: 100%; border-radius: 999px; width: 0; }
.mix__sub { font-size: 12px; color: var(--muted); }

.heat { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.heat__row { display: grid; grid-template-columns: 34px repeat(10, 1fr); gap: 4px; align-items: center; }
.heat__cell { height: 30px; border-radius: 6px; background: color-mix(in oklab, var(--leaf-500) calc(var(--v) * 100%), var(--forest-950)); border: 1px solid var(--line); position: relative; }
.heat__cell:hover { outline: 2px solid var(--cream-100); outline-offset: 1px; }
.heat__head { display: grid; grid-template-columns: 34px repeat(10, 1fr); gap: 4px; text-align: center; }
.heat__scale { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.heat__scale i { flex: none; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--forest-950), var(--leaf-500)); border: 1px solid var(--line); }

.dish-list { display: grid; gap: 10px; }
.dish { display: grid; grid-template-columns: 22px 40px 1fr auto; gap: 12px; align-items: center; }
.dish__rank { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--muted); }
.dish img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--cream-100); }
.dish__name { font-size: 14px; font-weight: 500; }
.dish__bar { height: 6px; border-radius: 999px; background: var(--leaf-500); margin-top: 6px; width: 0; }
.dish__v { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.dish__v small { display: block; font-size: 12px; color: var(--muted); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: color-mix(in oklab, var(--cream-100) 4%, transparent); }

/* ---------- Orders board ---------- */
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { border-radius: var(--r-lg); background: color-mix(in oklab, var(--forest-900) 80%, transparent); border: 1px solid var(--line); padding: 12px; min-height: 60vh; display: flex; flex-direction: column; gap: 10px; }
.col__head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; }
.col__head .display { font-size: 30px; }
.col__count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col__dot { width: 10px; height: 10px; border-radius: 50%; }
.ticket {
  border-radius: var(--r-md);
  padding: 14px;
  color: var(--forest-950);
  display: grid;
  gap: 10px;
  background: var(--tc, var(--cream-100));
}
.ticket[data-state="new"] { --tc: #EEDCA4; }
.ticket[data-state="preparing"] { --tc: #E9B396; }
.ticket[data-state="ready"] { --tc: #C3D69A; }
.ticket[data-state="collected"] { --tc: color-mix(in oklab, var(--cream-100) 10%, var(--forest-900)); color: var(--muted); }
.ticket__top { display: flex; align-items: center; gap: 8px; }
.ticket__no { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: .85; }
.ticket__time { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; background: color-mix(in oklab, var(--forest-950) 10%, transparent); }
.ticket__time--late { background: var(--forest-950); color: var(--sun-400); }
.ticket__ch { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; }
.ticket__ch svg { width: 14px; height: 14px; }
.ticket__who { font-weight: 600; font-size: 15px; }
.ticket__who small { font-weight: 400; color: color-mix(in oklab, var(--forest-950) 60%, transparent); }
.ticket__items { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, #fff 40%, transparent); font-size: 13px; display: grid; gap: 4px; }
.ticket[data-state="collected"] .ticket__items { background: transparent; padding: 0; }
.ticket__items li { display: grid; grid-template-columns: 22px 1fr; }
.ticket__items .mod { grid-column: 2; font-size: 12px; color: color-mix(in oklab, var(--forest-950) 65%, transparent); }
.ticket__items .mod--out { color: #A3401A; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ticket__flag { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--forest-950); color: var(--sun-400); }
.ticket__flag svg { width: 14px; height: 14px; }
.ticket__foot { display: flex; align-items: center; gap: 8px; }
.ticket__foot .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.ticket__act { margin-left: auto; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--forest-950); color: var(--cream-100); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.ticket__act svg { width: 14px; height: 14px; }
.ticket__act:hover { background: var(--moss-600); }
.ticket[data-state="collected"] .ticket__act { display: none; }

/* ---------- Menu manager ---------- */
.menu-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.cats { position: sticky; top: 88px; display: grid; gap: 2px; }
.cats button { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--muted); text-align: left; }
.cats button:hover { background: var(--forest-900); color: var(--text); }
.cats button[aria-current="true"] { background: var(--forest-900); color: var(--text); box-shadow: inset 3px 0 0 var(--leaf-500); }
.prod-tbl td:first-child { width: 56px; }
.prod-tbl img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--cream-100); }
.prod-name { font-weight: 500; }
.prod-sub { font-size: 12px; color: var(--muted); }
.avail { display: flex; gap: 10px; justify-content: flex-end; }
.avail label { display: grid; justify-items: center; gap: 4px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.lock svg { width: 12px; height: 12px; }
.pos-chip { font-size: 11px; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; border: 1px solid var(--line); color: var(--muted); }

.drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 100%);
  background: var(--forest-900);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(5, 10, 7, .6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; }
.scrim.open { pointer-events: auto; }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 32px; display: grid; gap: 22px; align-content: start; }
.drawer__foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); align-items: center; }
.ed-hero { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.ed-hero img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; background: var(--cream-100); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.input {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--forest-950);
  color: var(--text);
  width: 100%;
}
.input:focus { outline: 2px solid var(--leaf-500); outline-offset: 1px; }
.input[readonly] { color: var(--muted); border-style: dashed; }
textarea.input { resize: vertical; min-height: 80px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sec-title { font-size: 28px; margin-bottom: 10px; }
.allergens { display: flex; flex-wrap: wrap; gap: 6px; }
.allergens button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.allergens button[aria-pressed="true"] { background: var(--clay-500); border-color: var(--clay-500); color: var(--forest-950); font-weight: 600; }
.allergens--diet button[aria-pressed="true"] { background: var(--leaf-500); border-color: var(--leaf-500); }
.mg { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 6px; }
.mg__head { display: flex; align-items: center; gap: 10px; }
.mg__head b { font-weight: 500; }
.mg__rule { font-size: 12px; color: var(--muted); margin-left: auto; }
.mg__opts { font-size: 13px; color: var(--muted); }
.store-avail { display: grid; gap: 8px; }
.sa { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--forest-950); border: 1px solid var(--line); }
.sa__name { font-weight: 500; }
.sa__meta { font-size: 12px; color: var(--muted); }
.ownership { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in oklab, var(--series-app) 14%, transparent); border: 1px solid color-mix(in oklab, var(--series-app) 40%, transparent); font-size: 13px; }
.ownership svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #8CC3E3; }

/* ---------- Team & access ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { position: relative; height: 44px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--leaf-500); }
.scope { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); white-space: nowrap; }
.scope b { font-weight: 600; }
.scope--global { border-color: color-mix(in oklab, var(--leaf-500) 50%, transparent); color: var(--leaf-300); }
.scopes { display: flex; gap: 6px; flex-wrap: wrap; }
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px dashed var(--line); text-align: center; white-space: nowrap; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: var(--forest-900); }
.matrix thead th { font-weight: 500; font-size: 12px; color: var(--muted); vertical-align: bottom; border-bottom: 1px solid var(--line); }
.matrix thead th .display { font-size: 22px; color: var(--text); display: block; }
.matrix .grp td { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf-300); padding-top: 18px; border-bottom: 0; }
.perm-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.cell { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.cell svg { width: 14px; height: 14px; opacity: 0; }
.cell[aria-checked="true"] { background: var(--leaf-500); border-color: var(--leaf-500); color: var(--forest-950); }
.cell[aria-checked="true"] svg { opacity: 1; }
.cell-limit { display: block; font-size: 10px; color: var(--sun-400); margin-top: 2px; }
.audit-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.audit-tools .input { width: 260px; min-height: 38px; padding: 6px 14px; border-radius: 999px; }
.chain { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--leaf-300); padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--leaf-500) 40%, transparent); }
.chain svg { width: 14px; height: 14px; }
.audit { display: grid; }
.ev { display: grid; grid-template-columns: 72px 36px 1fr auto; gap: 14px; align-items: start; padding: 14px 4px; border-bottom: 1px dashed var(--line); }
.ev__time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; }
.ev__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); }
.ev__icon svg { width: 16px; height: 16px; }
.ev__icon--money { color: var(--sun-400); }
.ev__icon--menu { color: var(--leaf-300); }
.ev__icon--auth { color: #8CC3E3; }
.ev__icon--danger { color: #F0A27F; }
.ev__what { font-size: 14px; }
.ev__what b { font-weight: 500; }
.ev__who { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ev__diff { margin-top: 8px; display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: var(--forest-950); border: 1px solid var(--line); }
.ev__meta { font-size: 11px; color: var(--faint); text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--cream-100);
  color: var(--forest-950);
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
}
.toast b { font-weight: 600; }
.toast__no { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: .8; }

@media (max-width: 1200px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
  .top__logo span, .top__clock { display: none; }
}
@media (max-width: 900px) {
  .shell { padding: 0 16px 40px; }
  .top { margin: 0 -16px; padding: 0 16px; }
  .menu-wrap { grid-template-columns: 1fr; }
  .cats { position: static; display: flex; overflow-x: auto; }
  .cats button { flex: none; }
  .kpis { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.ticket[data-state="collected"] .ticket__who small { color: var(--faint); }
.nav a .badge:empty, .nav a .badge[data-zero="true"] { display: none; }

/* ---------- Sign in (admin MFA required) ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login[hidden], .shell[hidden] { display: none; }
.login__art { position: relative; margin: 16px; border-radius: 280px var(--r-lg) var(--r-lg) var(--r-lg); overflow: hidden; background: var(--moss-600); }
.login__art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.login__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, color-mix(in oklab, var(--forest-950) 88%, transparent)); }
.login__art-copy { position: absolute; z-index: 1; left: 40px; right: 40px; bottom: 36px; display: grid; gap: 10px; }
.login__title { font-size: clamp(80px, 9vw, 150px); }
.login__art-copy p { margin: 0; color: var(--muted); font-size: 17px; }
.login__side { display: grid; place-items: center; padding: 32px 24px; }
.login__card { width: min(420px, 100%); display: grid; gap: 18px; }
.login__card h2 { font-size: 52px; }
.login__card p { margin: 0; color: var(--muted); }
.login__card .btn { height: 50px; font-size: 15px; }
.login__card .input { min-height: 50px; }
.login__or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.login__or::before, .login__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login__note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); }
.login__note svg { width: 18px; height: 18px; flex: none; color: var(--leaf-500); }
.login__back { justify-self: start; font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.mfa-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.mfa-tabs button { height: 40px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.mfa-tabs button[aria-selected="true"] { background: var(--cream-100); color: var(--forest-950); }
.passkey { display: grid; justify-items: center; gap: 14px; padding: 18px 0 6px; text-align: center; }
.passkey__btn { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-900); border: 1px solid var(--line); color: var(--leaf-500); transition: background .2s; }
.passkey__btn:hover { background: var(--raised); }
.passkey__btn svg.fp { width: 64px; height: 64px; }
.passkey__btn svg.fp path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.passkey__ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--leaf-500); opacity: 0; }
.passkey__scan { position: absolute; left: 22%; right: 22%; height: 2px; top: 30%; background: var(--leaf-300); box-shadow: 0 0 12px var(--leaf-500); opacity: 0; }
.passkey__btn.ok { background: var(--leaf-500); color: var(--forest-950); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--forest-950); color: var(--text); text-align: center; font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; caret-color: var(--leaf-500); width: 100%; }
.otp input:focus { outline: 2px solid var(--leaf-500); outline-offset: 1px; }
.otp input.ok { background: var(--leaf-500); color: var(--forest-950); border-color: var(--leaf-500); }
.otp-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.otp-ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.otp-ring circle { fill: none; stroke-width: 3; }
.otp-ring .bg { stroke: var(--line); }
.otp-ring .fg { stroke: var(--leaf-500); stroke-linecap: round; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; accent-color: var(--leaf-500); }
#mePop button[disabled] { cursor: default; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__art { height: 38vh; border-radius: 0 0 var(--r-lg) var(--r-lg); margin: 0; }
  .login__art-copy { left: 20px; bottom: 20px; }
}
