:root {
  --blue: #2f6edb;
  --butter: #f8e28c;
  --bg: #f6f3ee;
  --card: #ffffff;
  --text: #1f1a17;
  --muted: #6e655d;
  --line: rgba(31, 26, 23, 0.1);
  --accent: #b5482b;
  --new: #2f6edb;
  --cooking: #d48a1c;
  --ready: #2e8b57;
  --late-bg: #fde8e4; --late: #b42318;
  --soon-bg: #fff2d6; --soon: #8a5a00;
  --ok-bg: #e5f4ec; --ok: #1d7a4b;
  --shadow: 0 8px 24px rgba(40, 30, 20, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120f;
    --card: #211c18;
    --text: #f3ede6;
    --muted: #a99d91;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f08a68;
    --late-bg: #3c1c18; --late: #ffa190;
    --soon-bg: #3a2d10; --soon: #f5d27a;
    --ok-bg: #15301f; --ok: #79d9a5;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
h1, h2, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { width: min(1320px, 100% - 32px); margin-inline: auto; }

/* Demo banner */
.demo-banner {
  position: sticky; top: 0; z-index: 1000;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #1d2433; color: #fff; font-size: 0.9rem;
}
.demo-banner a { color: #f8e28c; font-weight: 600; text-decoration: none; }
.demo-banner a:hover { text-decoration: underline; }
.demo-banner-links { display: flex; gap: 16px; align-items: center; }
.demo-banner .demo-banner-cta { background: var(--blue); color: #fff; padding: 6px 12px; border-radius: 8px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 18px 0; }
.venue { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.venue-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
}
.venue h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.venue p { color: var(--muted); font-size: 0.9rem; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { display: flex; flex-direction: column; padding: 6px 14px; border-radius: 12px; background: var(--bg); min-width: 92px; }
.stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat-value { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-value.bad { color: var(--late); }
.rush-toggle {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-weight: 700; cursor: pointer;
}
.rush-toggle[aria-pressed="false"] { background: var(--soon-bg); color: var(--soon); }

/* Ask REMI bar */
.ask {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin-top: 16px; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 110, 219, 0.1), rgba(248, 226, 140, 0.2)), var(--card);
  border: 1px solid var(--line);
}
.ask-orb {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--butter));
  box-shadow: 0 0 14px rgba(47, 110, 219, 0.45);
}
.ask-label { font-weight: 800; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.ask-chip:hover { border-color: var(--blue); color: var(--blue); }

/* Layout */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-top: 16px; align-items: start; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.column { background: rgba(127, 110, 95, 0.08); border-radius: 16px; padding: 12px; min-height: 420px; }
.column h2 { font-size: 0.95rem; display: flex; align-items: center; gap: 8px; margin: 2px 4px 12px; }
.column h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.column[data-status="new"] h2::before { background: var(--new); }
.column[data-status="cooking"] h2::before { background: var(--cooking); }
.column[data-status="ready"] h2::before { background: var(--ready); }
.count { font-size: 0.8rem; padding: 1px 8px; border-radius: 999px; background: var(--card); color: var(--muted); }
.cards { display: grid; gap: 10px; }
.empty { color: var(--muted); font-size: 0.88rem; text-align: center; padding: 18px 8px; }

/* Order card */
.order {
  background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
  border-left: 5px solid var(--line);
}
.order.late { border-left-color: var(--late); }
.order.soon { border-left-color: var(--cooking); }
.order.arrived { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { box-shadow: 0 0 0 3px var(--blue); transform: translateY(-4px); } }
.order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.order-id { font-weight: 800; font-size: 1.05rem; }
.channel { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-align: right; }
.times { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.chip.late { background: var(--late-bg); color: var(--late); }
.chip.soon { background: var(--soon-bg); color: var(--soon); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.items { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 3px; font-size: 0.9rem; }
.items li { display: flex; justify-content: space-between; gap: 8px; }
.items .station { font-size: 0.72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.items li.out { color: var(--late); text-decoration: line-through; }
.items li.out .station { text-decoration: none; color: var(--late); font-weight: 800; }
.note {
  font-size: 0.82rem; font-weight: 700; padding: 6px 8px; border-radius: 8px; margin-bottom: 8px;
  background: var(--soon-bg); color: var(--soon);
}
.note.allergy { background: var(--late-bg); color: var(--late); }
.advance {
  width: 100%; padding: 8px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; color: #fff;
}
.advance[data-to="cooking"] { background: var(--new); }
.advance[data-to="ready"] { background: var(--cooking); }
.advance[data-to="done"] { background: var(--ready); }
.advance:hover { filter: brightness(1.08); }

/* Side panels */
.side { display: grid; gap: 14px; }
.panel { background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.panel h2 { font-size: 0.95rem; margin-bottom: 10px; }
.panel-hint { font-size: 0.8rem; color: var(--muted); margin: -6px 0 10px; }
.st { margin-bottom: 10px; }
.st:last-child { margin-bottom: 0; }
.st-row { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.st-row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--ready); transition: width 0.3s ease; }
.bar span.busy { background: var(--cooking); }
.bar span.slammed { background: var(--late); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.88rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row small { color: var(--muted); display: block; }
.stock-btn {
  padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font-size: 0.78rem; font-weight: 800; cursor: pointer;
}
.stock-btn.is-out { background: var(--late-bg); color: var(--late); border-color: transparent; }
.muted { color: var(--muted); font-size: 0.88rem; }

.foot { padding: 24px 0 90px; }
.foot p { color: var(--muted); font-size: 0.82rem; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 760px) {
  .board { grid-template-columns: 1fr; }
  .column { min-height: 0; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .order.arrived { animation: none; }
}

/* ----- Phone ordering ----- */
.call-promo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: var(--accent); color: #fff;
}
.call-promo strong { display: block; font-size: 1.02rem; }
.call-promo span { font-size: 0.9rem; opacity: 0.92; }
.call-btn {
  padding: 11px 18px; border-radius: 12px; border: none; background: #fff; color: var(--accent);
  font-weight: 800; cursor: pointer; white-space: nowrap;
}
.call-btn:hover { filter: brightness(0.96); }

.call {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 8, 6, 0.6); backdrop-filter: blur(4px);
}
.call[hidden] { display: none; }
.call-card {
  width: min(420px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; align-items: center;
  padding: 20px 20px 16px; border-radius: 28px; background: #141821; color: #f2f4f8;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.call-top { width: 100%; display: flex; justify-content: space-between; font-size: 0.85rem; color: #aab3c5; }
.call-timer { font-variant-numeric: tabular-nums; }
.call-orb-wrap { margin: 18px 0 10px; width: 96px; height: 96px; display: grid; place-items: center; }
.call-orb {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--butter));
  box-shadow: 0 0 30px rgba(47, 110, 219, 0.55), 0 0 60px rgba(248, 226, 140, 0.35);
}
.call-orb.ringing { animation: ring-pulse 1s ease-in-out infinite; }
.call-orb.listening { animation: ring-pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(47, 110, 219, 0.35), 0 0 40px rgba(47, 110, 219, 0.6); }
.call-orb.thinking { animation: ring-pulse 0.8s ease-in-out infinite; filter: brightness(1.15); }
.call-orb.speaking { animation: talk 0.4s ease-in-out infinite alternate; }
@keyframes ring-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes talk { from { transform: scale(1.05); } to { transform: scale(1.22); filter: brightness(1.2); } }
.call-name { font-size: 1.25rem; font-weight: 800; }
.call-sub { color: #aab3c5; font-size: 0.88rem; margin-bottom: 12px; }
.call-log {
  width: 100%; flex: 1; min-height: 140px; max-height: 300px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 4px 2px;
}
.call-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; }
.call-msg.remi { align-self: flex-start; background: #232a38; border-bottom-left-radius: 4px; }
.call-msg.you { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.call-msg.system { align-self: center; background: #173324; color: #8fe0b0; font-weight: 700; font-size: 0.85rem; text-align: center; }
.call-msg.error { align-self: center; background: #3c1c18; color: #ffa190; font-size: 0.85rem; text-align: center; }
.call-form { width: 100%; display: flex; gap: 8px; margin-top: 10px; }
.call-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.9rem; padding: 10px 12px; border-radius: 12px;
  border: 1px solid #333c4f; background: #1c2230; color: #f2f4f8;
}
.call-form button, .call-mic {
  padding: 10px 14px; border-radius: 12px; border: 1px solid #333c4f; background: #232a38; color: #f2f4f8;
  font-weight: 700; cursor: pointer;
}
.call-actions { width: 100%; display: flex; gap: 10px; margin-top: 12px; }
.call-actions button { flex: 1; }
.call-mic[aria-pressed="false"] { color: #aab3c5; text-decoration: line-through; }
.call-hangup { padding: 12px; border-radius: 999px; border: none; background: #d93a2b; color: #fff; font-weight: 800; cursor: pointer; }
.call-note { margin-top: 10px; font-size: 0.75rem; color: #8a93a6; text-align: center; }
@media (prefers-reduced-motion: reduce) { .call-orb { animation: none !important; } }
