:root {
  --bg: #F6F7F3; --card: #FFFFFF; --line: #DCE3DD; --line2: #E6EBE6;
  --ink: #1E2B25; --muted: #55645C; --brand: #0C5A44; --green: #0C5A44; --green-bg: #E6F1EC;
  --red: #8E1B14; --red-bg: #FBEDEB; --red-line: #E3B9B4; --gold: #7A5E1C; --gold-bg: #F8F2E2;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
h1 { margin: 0; font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .005em; }
p { margin: 4px 0 0; }
.display { font-family: "Archivo Black", sans-serif; letter-spacing: .01em; }
.lbl { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.mono { font-family: "IBM Plex Mono", monospace; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 600; } .italic { font-style: italic; }
.red { color: var(--red); } .green { color: var(--green); }
.pad { padding: 24px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-wrap { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.row-wrap > .field { flex: 1 1 180px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* shell */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px 10px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand .display { font-size: 18px; }
.top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.loc-select { width: auto; min-height: 36px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.loc-select option { color: var(--ink); }
.role { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em; background: rgba(255,255,255,.15); padding: 4px 8px; border-radius: 6px; }
.linkish { background: none; border: 0; color: rgba(255,255,255,.85); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em; cursor: pointer; padding: 6px 2px; }
.linkish:hover { color: #fff; text-decoration: underline; }
.tabs { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; color: rgba(255,255,255,.78); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; padding: 12px 10px 11px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs button[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.badge { display: inline-block; margin-left: 6px; background: #fff; color: var(--red); border-radius: 10px; padding: 0 6px; font-size: 10.5px; }
.main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }

/* cards and tiles */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card.low { border-color: var(--red-line); background: var(--red-bg); }
.card.done { opacity: .85; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.big { font-family: "Archivo Black", sans-serif; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.big.red { color: var(--red); } .big.green { color: var(--green); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.alert { background: var(--red-bg); border: 1px solid var(--red-line); color: var(--ink); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.err { background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.ok { background: var(--green-bg); color: var(--green); border-radius: 8px; padding: 8px 12px; font-size: 14px; }

/* buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border-radius: 8px; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-solid { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-line { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn-danger { background: var(--red); color: #fff; border: 1px solid var(--red); }
.btn-danger-line { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn[aria-pressed="true"] { background: var(--green-bg); }
a.btn-solid:hover { color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13.5px; }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .04em; background: var(--gold-bg); color: var(--gold); padding: 3px 8px; border-radius: 6px; }
.loc-pill { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; background: var(--line2); color: var(--ink); padding: 2px 7px; border-radius: 6px; margin-right: 4px; }
.pill { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--line2); }
.pill-paid { background: var(--green-bg); color: var(--green); } .pill-needs_attention { background: var(--red-bg); color: var(--red); }
.pill-cancelled { background: var(--line2); color: var(--muted); text-decoration: line-through; } .pill-unpaid { background: var(--gold-bg); color: var(--gold); }
.pill-delivery { background: #E8EEF8; color: #23406E; } .pill-pickup { background: var(--green-bg); color: var(--green); }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.filters { gap: 14px; }
.picker { border-top: 1px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: end; }

/* reviews, issues */
.stars { color: var(--gold); letter-spacing: 1px; font-size: 18px; } .stars.red { color: var(--red); }
.quote { margin: 0; font-size: 15.5px; line-height: 1.45; }
.contact { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.card.low .contact { background: rgba(255,255,255,.7); }
.actions { gap: 8px; }

/* overview */
.money .math { width: 100%; border-collapse: collapse; font-size: 14px; }
.math td { padding: 6px 0; border-top: 1px solid var(--line2); }
.math tr.sum td { font-weight: 600; }
.math tr.total td { font-weight: 700; font-size: 16px; border-top: 2px solid var(--ink); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 6px; }
.bar-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.bar { width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; opacity: .85; }
.insights { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* tables */
.grid-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid-table th { text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.grid-table td { padding: 10px 12px; border-top: 1px solid var(--line2); vertical-align: top; }
.card > .grid-table td, .card > .grid-table th { padding-left: 0; padding-right: 8px; }
.card[style*="padding: 0"] .grid-table td, .card[style*="padding: 0"] .grid-table th { padding-left: 14px; }
.grid-table.clickable tbody tr { cursor: pointer; }
.grid-table.clickable tbody tr:hover, .grid-table tr.sel { background: var(--bg); }
.grid-table tr.sum td { font-weight: 600; } .grid-table tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.card[style*="padding: 0"] { overflow-x: auto; }

.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(520px, 100vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 30px rgba(0,0,0,.08); padding: 20px; overflow-y: auto; z-index: 10; display: flex; flex-direction: column; gap: 12px; }

/* menu */
.menu-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); }

/* kitchen */
.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.ticket { gap: 8px; border-width: 2px; }
.ticket.st-cooking { border-color: var(--gold); }
.ticket.st-ready { border-color: var(--green); background: var(--green-bg); }
.ticket.fresh { animation: pulse 1.2s ease-in-out 6; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 30%, transparent); } }
.cold { background: #E3F0FB; color: #0B4A80; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 700; padding: 6px 8px; border-radius: 6px; letter-spacing: .04em; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lines li { padding: 4px 0; border-top: 1px solid var(--line2); }
.lines li.is-cold { color: #0B4A80; }
.lines li.is-cold .strong::after { content: " ❄"; }
.qty { font-family: "Archivo Black", sans-serif; }
.note-box { background: var(--gold-bg); color: var(--gold); font-weight: 600; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; }

/* sign-in */
.signin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.signin-card { width: min(380px, 100%); gap: 14px; }

@media (max-width: 640px) {
  .main { padding: 16px 16px 60px; }
  .top-row { padding: 12px 16px 6px; }
  h1 { font-size: 22px; }
  .cards, .rail { grid-template-columns: 1fr; }
  .big { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .ticket.fresh { animation: none; border-color: var(--brand); } }

/* the binder (Oct 2) */
.binder { display: grid; gap: 10px; max-width: 820px; }
.doc { gap: 0; padding: 0; }
.doc summary { cursor: pointer; list-style: none; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; min-height: 44px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: 12px; }
.doc[open] summary { border-bottom: 1px solid var(--line); }
.doc-body { padding: 12px 18px 16px; }
.doc-body h3 { font-size: 15px; margin: 12px 0 6px; }
.doc-body p, .doc-body li { line-height: 1.55; margin: 0 0 8px; }
.doc-body ol { margin: 0 0 8px; padding-left: 22px; }
.doc-warn { background: var(--red-bg); border: 1px solid var(--red-line); border-radius: 8px; padding: 8px 10px; font-weight: 600; }

/* new tickets while staff are on another tab (Oct 2) */
.badge-new { background: var(--gold-bg); color: var(--gold); }
.newbar { display: block; width: 100%; border: 0; background: var(--gold-bg); color: var(--gold); border-bottom: 1px solid var(--line); font: 600 14px "IBM Plex Mono", monospace; letter-spacing: .04em; padding: 12px 16px; min-height: 44px; cursor: pointer; text-align: center; }
.newbar:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

/* ---- the demo bar (sales demos only; appended to office.css by build-web) ---- */
.demo-bar { background: #15181A; color: #F4F1EA; padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 3px solid #C9A227; }
.demo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: .12em; background: #C9A227; color: #15181A; padding: 3px 7px; border-radius: 5px; }
.demo-title { font-family: "Archivo Black", sans-serif; font-size: 15px; flex: 1 1 auto; min-width: 0; }
.demo-link { color: #F4F1EA; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.demo-link:hover { color: #fff; }
.demo-lbl { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: #B9B4A8; }
.demo-roles { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-roles button, .demo-reset { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid #5D615F; background: transparent; color: #F4F1EA;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; }
.demo-roles button[aria-pressed="true"] { background: #C9A227; border-color: #C9A227; color: #15181A; }
.demo-reset { margin-left: auto; border-style: dashed; }
.demo-sub { margin: 0; font-size: 12.5px; color: #C9C4B8; }
.demo-bar :focus-visible { outline: 3px solid #C9A227; outline-offset: 2px; }
.demo-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; width: min(560px, calc(100vw - 24px));
  background: #15181A; color: #F4F1EA; border: 1px solid #C9A227; border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 13.5px; }
.demo-toast span { flex: 1; }
.demo-toast button { background: #C9A227; color: #15181A; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; min-height: 36px; }
@media (max-width: 560px) {
  .demo-bar { padding: 8px 12px 10px; gap: 6px; }
  .demo-title { font-size: 14px; }
  .demo-roles button, .demo-reset { padding: 5px 10px; font-size: 11.5px; }
  .demo-reset { margin-left: 0; }
}
