/* Admin panel: white ground, black ink. Poppins for headings, Nunito Sans for text. */
:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #262626;
  --muted: #5C5C5C;
  --faint: #6B6B6B;
  --line: #E8E8E8;
  --line-soft: #F2F2F2;
  --fill: #F4F4F4;
  --fill-2: #F7F7F7;
  --danger: #B42318;
  /* Surfaces and accents; the dark theme below swaps these. */
  --canvas: #F5F7FA;
  --surface: #FFFFFF;
  --chip: #E8ECF2;
  --column: #EDF0F5;
  --hover: #FAFBFD;
  --line-strong: #D5DBE5;
  /* Pick Menu brand: navy for the main actions, the selected page and switches. */
  --brand: #0B1F4F;
  --on-brand: #FFFFFF;
  --brand-hover: #061230;
  --on-ink: #FFFFFF;
  --accent: var(--ink);
  --on-accent: #FFFFFF;
  --nav-bg: rgba(255,255,255,.96);
  --chart-ink: #0A0A0A;
  --chart-wash: rgba(10,10,10,0.07);
  --chart-grid: #EEEEEE;
  --chart-axis: #D6D6D6;
  --chart-muted: #8A8A8A;
  --chart-soft: #B5B5B5;
  --radius: 12px;
  --head: 'Poppins', system-ui, sans-serif;
  --text: 'Nunito Sans', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); margin: 0; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--ink); }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: 0; font-size: 14px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: var(--bg); border-color: var(--line); color: var(--ink); font-weight: 600; }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-sm { min-height: 38px; padding: 0 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-text { background: none; border: 0; padding: 10px 4px; font-weight: 600; color: var(--ink); min-height: 44px; }
.btn-text.danger, .list-row.danger { color: var(--danger); }
.center { align-self: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.icon-btn.outline { border: 1px solid var(--line); }
.chip-btn {
  position: relative; min-height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.link-underline { font-weight: 600; font-size: 14px; text-underline-offset: 3px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .inline-form input {
  width: 100%; min-height: 50px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  padding: 0 14px; font-size: 16px; font-weight: 400; color: var(--ink);
}
.field textarea { padding: 12px 14px; resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus, .search input:focus { outline: none; border-color: var(--ink); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding-right: 14px; }
.input-suffix:focus-within { border-color: var(--ink); }
.input-suffix input { border: 0 !important; min-width: 0; }
.input-suffix em { font-style: normal; color: var(--muted); font-size: 15px; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }

/* Switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); box-shadow: none; }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-logo .brand-pick { height: 40px; width: auto; display: block; }
.login-logo .bp-ink { stroke: #101828; }
.login-logo .logo-sep { width: 1px; height: 36px; background: var(--line-strong); }
.login-logo .logo-tag { font-family: 'Space Grotesk', var(--text); font-size: 13px; line-height: 1.25; color: var(--ink); }
[data-theme="dark"] .login-logo .bp-ink { stroke: #EDEDED; }
.login-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.6px; }
.login-card p.muted { margin: -6px 0 6px; }
.login-card .btn { min-height: 52px; margin-top: 6px; font-size: 15px; }

/* ---------- App shell ---------- */
.app { min-height: 100dvh; }
.main { padding: calc(20px + var(--safe-t)) 20px calc(104px + var(--safe-b)); max-width: 1240px; }
.sidebar { display: contents; }
.brand, .sidebar-foot { display: none; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; padding: 8px 6px calc(10px + var(--safe-b));
  background: var(--nav-bg); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav button {
  flex: 1 1 0; min-width: 0; border: 0; background: none; padding: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--faint); font-size: 11px; font-weight: 600;
}
.nav-icon { position: relative; width: 52px; height: 30px; border-radius: 8px; display: grid; place-items: center; transition: background .15s; }
.nav button.active { color: var(--ink); font-weight: 700; }
.nav button.active .nav-icon { background: var(--brand); color: var(--on-brand); }
.nav-badge {
  position: absolute; top: -3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink); border: 2px solid var(--surface); font-size: 10px; font-weight: 700; line-height: 14px;
}
.nav button.active .nav-badge { background: var(--surface); color: var(--ink); border-color: var(--ink); }

/* ---------- Page heads ---------- */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.page-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.8px; line-height: 1.05; }
.page-head .link-underline { padding-bottom: 6px; }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.plan-chip { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--ink); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-row h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }

/* ---------- Orders ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-family: var(--head); font-size: 26px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.stat.dark span { color: var(--faint); }
.stat.dark strong { color: var(--on-ink); }
.stat.top { display: none; }

.segmented { display: flex; padding: 4px; border-radius: 8px; background: var(--fill); margin-bottom: 16px; max-width: 420px; }
.segmented button { flex: 1; min-height: 38px; border: 0; border-radius: 5px; background: transparent; font-weight: 600; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.board { display: flex; flex-direction: column; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.col.is-empty { display: none; }
.col-head { display: flex; align-items: center; gap: 8px; }
.col-head h2 { font-size: 15px; font-weight: 600; flex: 1; }
.count { min-width: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--ink); font-size: 12px; font-weight: 700; text-align: center; }
.count.dark { background: var(--ink); color: var(--on-ink); }
.col-empty { color: var(--faint); font-size: 14px; text-align: center; padding: 24px 12px; }
.orders-list { display: grid; gap: 12px; }
.empty-state { text-align: center; color: var(--muted); padding: 48px 16px; border: 1px dashed var(--line); border-radius: 12px; }
.empty-state strong { display: block; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

.order { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.order.is-new { border: 1.5px solid var(--ink); }
.order.is-closed { opacity: .6; }
.order-head { display: flex; align-items: center; gap: 8px; }
.order-head strong { font-size: 16px; font-weight: 700; }
.order-head .id { font-size: 13px; color: var(--muted); }
.order-head .grow { flex: 1; }
.chip { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.dark { background: var(--ink); color: var(--on-ink); }
.chip.soft { border-color: var(--line-strong); color: var(--muted); }
.order-items { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.order-items div { display: flex; gap: 10px; }
.order-items .q { width: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-items .n { flex: 1; min-width: 0; }
.order-items .p { color: var(--muted); font-variant-numeric: tabular-nums; }
.order-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--fill); font-size: 14px; color: var(--ink-soft); }
.order-note svg { width: 16px; height: 16px; margin-top: 2px; }
.order-foot { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.order-foot .total { flex: 1; font-family: var(--head); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Chat ---------- */
.conv-list { display: flex; flex-direction: column; }
.conv {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; text-align: left; min-height: 68px;
}
.conv-avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--head); font-weight: 600; font-size: 14px; flex: none; }
.conv.alert .conv-avatar { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-top { display: flex; align-items: baseline; gap: 8px; }
.conv-top strong { flex: 1; font-size: 15px; }
.conv-top time { font-size: 12px; color: var(--faint); }
.conv-body small { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread small { color: var(--ink); font-weight: 600; }
.conv.closed { opacity: .5; }
.conv.active { background: var(--fill-2); border-radius: 12px; }
.unread-dot { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

.conv-thread { display: none; }
.thread-open .conv-thread {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 30; background: var(--surface);
  padding-top: var(--safe-t);
}
.thread-open .conv-list { display: none; }
.thread-head { min-height: 72px; padding: 0 12px 0 6px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.thread-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread-head strong { font-size: 17px; font-family: var(--head); font-weight: 600; }
.thread-head small { font-size: 13px; color: var(--muted); }
.thread-messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.day { align-self: center; font-size: 12px; color: var(--faint); padding: 2px 0 6px; }
.bubble { max-width: 78%; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; word-wrap: break-word; }
.bubble > span:first-child { white-space: pre-wrap; font-size: 15px; line-height: 1.4; }
.bubble small { font-size: 11px; }
.bubble.guest { align-self: flex-start; background: var(--fill); border-radius: 18px 18px 18px 6px; }
.bubble.guest small { color: var(--faint); }
.bubble.staff { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-radius: 18px 18px 6px 18px; }
.bubble.staff small { color: var(--faint); }
.alert-msg { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--ink); }
.alert-msg .icon { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; flex: none; }
.alert-msg .icon svg { width: 18px; height: 18px; }
.alert-msg div { display: flex; flex-direction: column; }
.alert-msg strong { font-size: 15px; }
.alert-msg small { font-size: 12px; color: var(--muted); }
.thread-foot { padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.compose { display: flex; gap: 8px; align-items: center; }
.compose input { flex: 1; min-width: 0; height: 48px; border-radius: 8px; border: 0; background: var(--fill); padding: 0 18px; font-size: 16px; }
.compose input:focus { outline: 2px solid var(--ink); }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex: none; }
.thread-closed { text-align: center; color: var(--muted); padding: 8px 0; }
.empty { display: grid; place-items: center; height: 100%; color: var(--faint); }

/* ---------- Menu ---------- */
.search { height: 46px; border-radius: 8px; background: var(--fill); display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--faint); margin-bottom: 14px; max-width: 560px; }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.search input:focus { outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 14px; border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.chips .add { border-style: dashed; color: var(--muted); }
.cat-head { display: flex; align-items: center; gap: 8px; padding: 22px 0 6px; }
.cat-head h2 { flex: 1; font-family: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.cat-head h2 span { color: var(--faint); font-weight: 600; }
.cat-head .hidden-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.item-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.item-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; border: 0; background: none; padding: 0; text-align: left; }
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--fill) repeating-linear-gradient(135deg, rgba(0,0,0,.04) 0 6px, transparent 6px 12px); }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-text strong { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-text span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item-row.off .thumb { opacity: .5; }
.item-row.off strong { color: var(--faint); }
.fab {
  position: fixed; right: 20px; bottom: calc(96px + var(--safe-b)); z-index: 15;
  height: 52px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

/* ---------- Tables / QR ---------- */
.venue-card { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; max-width: 560px; }
.venue-card img { width: 120px; height: 120px; flex: none; }
.venue-card div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.venue-card strong { font-family: var(--head); font-weight: 600; font-size: 17px; }
.venue-card p { margin: 0; color: var(--muted); font-size: 14px; }
.venue-card .row { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.qr-card strong { font-size: 15px; }
.qr-card img { width: 100%; max-width: 150px; }
.qr-card .row { display: flex; gap: 6px; width: 100%; }
.qr-card .row > * { flex: 1; min-height: 38px; padding: 0 10px; }
.upgrade { margin-top: 20px; max-width: 560px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.upgrade p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Settings ---------- */
.plan-card { padding: 16px; border-radius: 12px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; gap: 14px; margin-bottom: 22px; max-width: 640px; }
.plan-card div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.plan-card span { font-size: 12px; color: var(--faint); letter-spacing: .5px; text-transform: uppercase; }
.plan-card strong { font-family: var(--head); font-size: 17px; font-weight: 600; }
.plan-card p { margin: 4px 0 0; font-size: 13px; color: var(--on-ink); opacity: .75; }
.plan-card .mark { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #3A3A3A; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 16px; overflow: hidden; flex: none; }
.plan-card .mark img { width: 100%; height: 100%; object-fit: cover; }
.group { margin-bottom: 22px; max-width: 640px; }
.group-title { margin: 0 0 8px 4px; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.list { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.list:empty { display: none; }
.list-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px;
  border: 0; border-bottom: 1px solid var(--line-soft); background: var(--surface); text-align: left; text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.list > :last-child, .list > :last-child > .list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row small { font-size: 13px; font-weight: 400; color: var(--muted); }
.list-row .value { font-size: 14px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.list-row > svg { width: 18px; height: 18px; color: var(--faint); }
.list-block { padding: 16px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 14px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme-option { position: relative; display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.theme-option input { position: absolute; top: 10px; left: 10px; opacity: 0; pointer-events: none; }
.theme-preview { height: 64px; border-radius: 8px; display: flex; align-items: center; padding-left: 14px; font-size: 20px; border: 1px solid var(--line); }
.theme-preview.premium { background: var(--ink); color: #C9A44C; font-family: 'Poppins', system-ui, sans-serif; border-color: #0B0B0B; }
.theme-preview.minimal { background: var(--surface); color: #1A1A1A; font-weight: 700; }
.theme-option input:checked + .theme-preview { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--ink); }
.theme-option input:checked ~ span:last-child { color: var(--ink); }
.theme-option input:focus-visible + .theme-preview { outline: 2px solid var(--ink); outline-offset: 5px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.swatch-custom { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.swatch-custom svg { width: 16px; height: 16px; }

/* Logo and covers */
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-preview { width: 72px; height: 72px; border-radius: 8px; border: 1px dashed var(--line-strong); display: grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 400; color: var(--faint); }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input, .cover-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.covers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cover-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--fill); }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-thumb button { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(10,10,10,.75); color: var(--on-ink); display: grid; place-items: center; }
.cover-thumb button svg { width: 16px; height: 16px; }
.cover-add { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }

/* ---------- Sheets (dialogs) ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  background: var(--surface); color: var(--ink);
}
dialog.sheet[open] { display: block; animation: sheet-in .22s ease-out; }
dialog.sheet::backdrop { background: rgba(10,10,10,.4); }
@keyframes sheet-in { from { transform: translateY(24px); } }
.sheet-form { display: flex; flex-direction: column; height: 100%; }
.sheet-head {
  min-height: 64px; padding: var(--safe-t) 16px 0 6px; display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line); flex: none;
}
.sheet-head h2 { flex: 1; font-size: 17px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 20px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }

.photo-box {
  height: 176px; border-radius: 12px; flex: none; position: relative; overflow: hidden;
  background: var(--fill) repeating-linear-gradient(135deg, rgba(0,0,0,.04) 0 8px, transparent 8px 16px) center / cover;
}
.photo-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.photo-actions .chip-btn { border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.tags-editor { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 50px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.tags-editor:focus-within { border-color: var(--ink); }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px 0 12px; border-radius: 6px; background: var(--ink); color: var(--on-ink); border: 0; font-size: 14px; font-weight: 600; }
.tag-chip svg { width: 14px; height: 14px; }
.tags-editor input { flex: 1; min-width: 140px; border: 0; min-height: 34px; padding: 0 6px; font-size: 16px; font-weight: 400; color: var(--ink); background: transparent; }
.tags-editor input:focus { outline: none; }
details.translation { border-bottom: 1px solid var(--line-soft); }
details.translation summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; cursor: pointer; }
details.translation summary::-webkit-details-marker { display: none; }
details.translation summary .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
details.translation summary strong { font-size: 15px; }
details.translation summary small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.translation summary svg { width: 18px; height: 18px; color: var(--faint); transition: transform .2s; }
details.translation[open] summary svg { transform: rotate(90deg); }
details.translation .tr-fields { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }

.toast {
  position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); z-index: 100;
  padding: 10px 18px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

/* ---------- Tablet & desktop ---------- */
@media (min-width: 1024px) {
  body { font-size: 15px; }
  .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh;
    padding: 24px 16px; border-right: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-family: var(--head); font-weight: 700; overflow: hidden; flex: none; }
  .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
  .brand-text { display: flex; flex-direction: column; min-width: 0; }
  .brand-text strong { font-family: var(--head); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-text span { font-size: 12px; color: var(--muted); }
  .nav { position: static; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; backdrop-filter: none; }
  .nav button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 15px; color: var(--ink); font-weight: 500; }
  .nav button:hover { background: var(--fill-2); }
  .nav-icon { width: auto; height: auto; border-radius: 0; background: none !important; color: inherit !important; }
  .nav-icon svg { width: 18px; height: 18px; }
  .nav-label { flex: 1; text-align: left; }
  .nav button.active { background: var(--brand); color: var(--on-brand); font-weight: 700; }
  .nav-badge { position: static; order: 3; border: 0; }
  .nav button { position: relative; }
  .nav button .nav-icon { display: contents; }
  .sidebar-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
  .main { padding: 32px 40px 48px; }
  .only-mobile { display: none !important; }
  .page-head h1 { font-size: 36px; letter-spacing: -1px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 200px)); }
  .stat.top { display: flex; }
  .board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .col, .col.is-empty { display: flex; padding: 16px; border-radius: 12px; background: var(--fill-2); min-height: 240px; }
  .col .order { padding: 14px; }
  .orders-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .chips { margin: 0; padding: 0 0 14px; }
  .fab { position: absolute; right: 40px; top: 36px; bottom: auto; box-shadow: none; height: 44px; }
  .main { position: relative; }
  .chat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; height: calc(100dvh - 150px); }
  .conv-list { overflow-y: auto; border-right: 1px solid var(--line-soft); padding-right: 12px; }
  .conv-thread, .thread-open .conv-thread { display: flex; flex-direction: column; position: static; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .thread-open .conv-list { display: flex; }
  .thread-head .back { display: none; }
  .covers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  dialog.sheet { width: min(560px, calc(100% - 48px)); height: auto; max-height: min(860px, calc(100dvh - 48px)); margin: auto; border-radius: 16px; overflow: hidden; }
  dialog.sheet .sheet-form { max-height: min(860px, calc(100dvh - 48px)); }
  .sheet-head { padding-top: 0; }
}

@media print {
  .sidebar, .nav, .page-head, .section-row, .inline-form, .qr-card .row, .venue-card .row, .upgrade, .fab { display: none !important; }
  [data-panel]:not([data-panel=tables]) { display: none !important; }
  .main { padding: 0; }
  .qr-card { break-inside: avoid; }
}
.sheet-body { min-height: 0; }
.sheet-body > * { flex-shrink: 0; }
.order-head strong { white-space: nowrap; }
@media (min-width: 1024px) {
  .col, .col.is-empty { padding: 12px; }
  .col .order { padding: 14px; gap: 10px; }
  .col .order-foot { flex-wrap: wrap; }
  .col .order-foot .total { flex-basis: 100%; }
  .col .order-foot .btn { flex: 1; }
  .col .order-items { font-size: 14px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  dialog.sheet { height: fit-content; }
  dialog.sheet .sheet-form { height: auto; }
}

/* Trial / payment banner */
.venue-banner { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--fill); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.venue-banner.warn { background: #FBF1E6; color: #7A3B08; }
.venue-banner.danger { background: #FBEAE7; color: #8E271C; }
.login-alt { text-align: center; margin: 6px 0 0 !important; font-size: 14px; }
.login-alt a { font-weight: 700; }

/* Interface language */
.lang-select { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lang-select svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang-select select { appearance: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 600 14px var(--text); min-height: 36px; padding: 0 30px 0 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.login-lang { align-self: center; margin-top: 4px; }

/* Drag & drop in the menu */
.drag-handle { flex: none; width: 32px; height: 40px; margin-left: -8px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); cursor: grab; touch-action: none; border-radius: 8px; }
.drag-handle:hover { color: var(--ink); background: var(--fill); }
.drag-handle svg { width: 18px; height: 18px; }
.cat-head .drag-handle { height: 32px; }
.item-list { min-height: 8px; }
.list-empty { margin: 6px 0 0; }
.drag-placeholder { border: 1.5px dashed var(--line); border-radius: 8px; background: var(--fill-2); margin: 4px 0; }
.drag-ghost { position: fixed; z-index: 100; pointer-events: none; background: var(--surface); border-radius: 8px; box-shadow: 0 18px 40px rgba(10,10,10,.18); padding-left: 8px; padding-right: 8px; opacity: .97; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* Menu from photos */
.import-banner { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.import-banner:hover { border-color: var(--ink); }
.import-banner[hidden] { display: none; }
.import-banner .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.import-banner strong { font-family: var(--head); font-weight: 600; font-size: 15px; }
.import-banner small { color: var(--muted); font-size: 13px; }
.import-icon { width: 44px; height: 44px; flex: none; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.import-icon svg, .import-banner .chev { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.import-banner .chev { width: 18px; color: var(--faint); }
.import-drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.import-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.import-thumbs:empty { display: none; }
.import-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--fill); }
.import-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.import-thumb .pdf { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.import-thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10,10,10,.75); color: var(--on-ink); display: grid; place-items: center; padding: 0; }
.import-thumb button svg { width: 14px; height: 14px; }
.import-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.import-buttons .btn { flex: 1; min-width: 140px; gap: 8px; }
.import-buttons .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.import-tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.import-wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 12px; }
.import-wait strong { font-family: var(--head); font-weight: 600; font-size: 18px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-summary { margin: 0; font-weight: 600; }
.import-currency { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--fill); }
.import-cat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.import-cat-head { display: flex; gap: 8px; align-items: center; }
.import-cat-name { flex: 1; font-family: var(--head); font-weight: 600; font-size: 15px; }
.import-cat input, .import-item input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; background: var(--surface); color: var(--ink); min-width: 0; }
.import-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 8px; background: var(--fill-2); }
.import-item.unsure { background: #FBF1E6; box-shadow: inset 3px 0 0 #C27A1A; }
.import-item-main { display: flex; gap: 6px; align-items: center; }
.import-item-main > input { flex: 1; }
.import-item-main .import-price { width: 88px; flex: none; text-align: right; }
.import-desc { font-size: 14px; }
.unsure-note { color: #9A4B0B; font-size: 12px; font-weight: 700; }
.import-mode { margin-top: 14px; }
.import-mode input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); }

/* Statistics */
.stats-range { max-width: 360px; margin-bottom: 14px; }
.stats-demo { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--fill); font-size: 14px; color: var(--muted); }
.stats-demo b { color: var(--ink); }
.stats-root { transition: opacity .2s; }
.stats-root.loading { opacity: .5; }
.viz-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.viz-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.viz-tile-label { font-size: 13px; color: var(--muted); }
.viz-tile-value { font-family: var(--head); font-weight: 600; font-size: 24px; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-delta { font-size: 12px; font-weight: 700; }
.viz-delta.up { color: #006300; }
.viz-delta.down { color: var(--danger); }
.viz-delta-note { font-weight: 400; color: var(--muted); }
.viz-spark { width: 100%; height: 28px; margin-top: 4px; display: block; }
.viz-grid { display: grid; gap: 12px; }
.viz-card { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.viz-head h2 { font-size: 16px; font-weight: 600; }
.viz-head p { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.viz-plot { position: relative; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; stroke: none; fill: none; }
.viz-spark { stroke: none; fill: none; }
.viz-hit, .viz-col rect { pointer-events: all; }
.viz-axis { font: 11px var(--text); fill: var(--chart-muted); font-variant-numeric: tabular-nums; }
.viz-value { font: 700 11px var(--text); fill: var(--ink); }
.viz-hit { outline: none; cursor: crosshair; }
.viz-col { outline: none; cursor: default; }
.viz-col:hover .viz-bar, .viz-col:focus .viz-bar { fill: var(--ink-soft); }
.viz-col:focus-visible rect:first-child, .viz-hit:focus-visible { stroke: var(--ink); stroke-width: 1; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(10,10,10,.12); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.viz-tip-row { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.viz-tip-row strong { font-weight: 700; color: var(--ink); }
.viz-tip-row span { color: var(--muted); }
.viz-table-btn { margin-top: 10px; border: 0; background: none; padding: 4px 0; font: 600 13px var(--text); color: var(--muted); text-decoration: underline; cursor: pointer; }
.viz-table-wrap { max-height: 260px; overflow: auto; margin-top: 6px; }
.viz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.viz-table th, .viz-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.viz-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.viz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.viz-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.viz-top li { display: grid; grid-template-columns: minmax(0, 40%) 1fr; gap: 12px; align-items: center; }
.viz-top-name { display: flex; flex-direction: column; min-width: 0; }
.viz-top-name strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-top-name small { font-size: 12px; color: var(--muted); }
.viz-top-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.viz-top-bar { height: 12px; background: var(--ink); border-radius: 0 4px 4px 0; flex: none; max-width: calc(100% - 64px); }
.viz-top-qty { font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
  .viz-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .viz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz-card.wide { grid-column: 1 / -1; }
}
.viz-delta.flat { color: var(--muted); }

.sec-icon svg, .icon-choice svg { width: 20px; height: 20px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-choice { position: relative; }
.icon-choice input { position: absolute; opacity: 0; inset: 0; }
.icon-choice span { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); cursor: pointer; }
.icon-choice input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--fill); }
.icon-choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.order-other { font-size: 12px; color: var(--muted); padding-top: 4px; }
.import-target { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.import-target select, .import-target input { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; background: var(--surface); color: var(--ink); }
.import-item-extra { display: flex; gap: 6px; }
.import-item-extra .import-portion { width: 88px; flex: none; font-size: 14px; }
.import-item-extra .import-desc { flex: 1; }

/* =====================================================================
   Dashboard layout: sidebar + title bar on wide screens, tab bar on phones.
   Light grey canvas with white cards.
   ===================================================================== */
.app { background: var(--canvas); }
.list, .qr-card, .venue-card, .viz-card, .conv-thread, .empty-state { background: var(--surface); }
.fold-btn { width: 30px; height: 30px; flex: none; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--muted); padding: 0; }
.fold-btn:hover { background: var(--fill); color: var(--ink); }
.fold-btn svg { width: 16px; height: 16px; transition: transform .15s; }
.fold-btn[aria-expanded="true"] svg { transform: rotate(90deg); }
.hidden-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 1px 8px; border-radius: 6px; white-space: nowrap; font-weight: 600; }
.grow { flex: 1; }

/* Title bar */
.main { padding: 0 16px calc(104px + var(--safe-b)); max-width: none; }
.main > section > .page-head {
  margin: 0 -16px 14px; padding: calc(12px + var(--safe-t)) 16px 12px; background: var(--surface);
  border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; row-gap: 10px;
}
.page-head h1 { font-size: 26px; letter-spacing: -0.5px; }
.head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.head-actions .btn { gap: 6px; border-radius: 8px; }
.head-actions .btn svg { width: 17px; height: 17px; }
.head-actions .btn[hidden] { display: none; }
.head-actions .lbl { display: none; }
.head-actions .btn:has(.lbl) { width: 40px; padding: 0; }
.only-desktop { display: none !important; }
.venue-banner { margin: 0 0 14px; }
.venue-banner.trial { background: var(--surface); border: 1px solid var(--line); }

/* Phone tab bar: chat and settings move under "More". */
.nav-desk { display: none !important; }
.nav-badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 0; right: 14px; }
dialog.sheet-small { height: auto; top: auto; }
.sheet-small .sheet-body { padding-bottom: calc(24px + var(--safe-b)); }

/* ---------- Orders ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi strong { font-family: var(--head); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 12px; font-weight: 800; }
.kpi em.up { color: #1F7A4D; }
.kpi em.down { color: #B42318; }
.kpi:nth-child(n+3) { display: none; }
.seg { display: flex; background: var(--chip); border-radius: 8px; padding: 3px; gap: 2px; }
.seg[hidden] { display: none; }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 5px; background: none; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.order-sections { order: 5; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
.order-sections button { flex: 1; }
.order-sections + .head-actions { margin-left: auto; }
#order-history[aria-pressed="true"], #order-sound[aria-pressed="false"] { background: var(--fill); }
#order-sound[aria-pressed="false"] svg { opacity: .45; }
.status-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs[hidden] { display: none; }
.status-tabs button { flex: none; height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--chip); font-weight: 700; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.status-tabs button i { font-style: normal; font-size: 11px; background: var(--surface); border-radius: 999px; padding: 0 6px; }
.status-tabs button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.status-tabs button[aria-pressed="true"] i { color: var(--brand); }
.board { display: block; }
.col { display: none; flex-direction: column; gap: 10px; }
.col.is-current { display: flex; }
.col-head { display: none; align-items: center; gap: 8px; padding: 2px 4px; }
.col-head h2 { font-family: var(--text); font-size: 13px; font-weight: 800; flex: 1; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #A0A0A0; flex: none; }
[data-col="new"] .dot { background: #E5484D; }
[data-col="preparing"] .dot { background: #E8A23A; }
[data-col="ready"] .dot { background: #2F9E62; }
.col-head .count { border: 0; background: var(--surface); min-width: 24px; }
.col-empty { border: 1.5px dashed var(--line-strong); border-radius: 12px; color: var(--faint); font-size: 13px; text-align: center; padding: 28px 12px; }
.order { border-radius: 12px; padding: 14px; gap: 10px; }
.order.is-new { border: 1px solid transparent; box-shadow: 0 0 0 2px var(--ink); }
.order-head strong { font-family: var(--head); font-weight: 600; font-size: 16px; }
.order-head time { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--muted); white-space: nowrap; }
.order-items { font-size: 14px; gap: 4px; }
.order-foot { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.order-foot .total { font-family: var(--text); font-weight: 800; font-size: 15px; }
.orders-list { display: grid; gap: 10px; }

/* ---------- Menu ---------- */
.menu-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.menu-bar .search { order: -1; margin: 0; max-width: none; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.menu-bar .search input { font-size: 15px; }
.sec-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-tab { flex: none; display: flex; align-items: center; border-radius: 8px; background: var(--chip); }
.sec-pick { height: 38px; padding: 0 12px; border: 0; background: none; display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--ink-soft); white-space: nowrap; touch-action: pan-x; }
.sec-pick .n { font-size: 12px; color: var(--faint); font-weight: 800; }
.sec-tab .sec-icon { display: none; }
.sec-tab.on { background: var(--ink); }
.sec-tab.on .sec-pick, .sec-tab.on .sec-more { color: var(--on-ink); }
.sec-tab.on .sec-pick .n { color: var(--faint); }
.sec-tab.is-off .sec-pick { opacity: .6; }
.sec-tab .hidden-tag { font-size: 11px; padding: 0 6px; }
.sec-more { width: 30px; height: 38px; margin-left: -6px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); border-radius: 0 8px 8px 0; }
.sec-more svg { width: 16px; height: 16px; }
.sec-tab.add { height: 38px; padding: 0 12px; gap: 6px; border: 1.5px dashed var(--line-strong); background: none; color: var(--muted); font-weight: 800; font-size: 14px; }
.sec-tab.add svg { width: 16px; height: 16px; }
.drag-ghost.sec-tab { padding: 0; border-radius: 8px; }
.drag-placeholder.is-column { flex: none; align-self: stretch; min-height: 38px; margin: 0; }

.menu-split { display: block; }
.cat-nav { display: none; }
.menu-board { display: flex; flex-direction: column; gap: 10px; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cat-card.is-off .cat-head h3 { color: var(--muted); }
.cat-card .cat-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 8px; border-bottom: 1px solid var(--line-soft); }
.cat-card.is-folded .cat-head { border-bottom: 0; }
.cat-card.is-folded .cat-body { display: none; }
.cat-card .cat-head .drag-handle { margin-left: -4px; height: 34px; width: 26px; }
.cat-card h3 { font-size: 15px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-card h3 small { font-family: var(--text); font-size: 13px; color: var(--muted); font-weight: 600; }
.cat-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cat-head .add-in { min-height: 36px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; color: var(--ink); }
.cat-head .add-in svg { width: 18px; height: 18px; }
.cat-head .add-in .lbl { display: none; }
.cat-head .add-in:hover { background: var(--fill); }
.cat-head .icon-btn { width: 36px; height: 36px; }
.cat-head .icon-btn svg { width: 18px; height: 18px; }
.item-thead { display: none; }
.item-list .list-empty { padding: 14px 16px; margin: 0; font-size: 14px; }
.menu-board .item-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px 8px 4px; border-bottom: 1px solid var(--line-soft); }
.menu-board .item-row:last-child { border-bottom: 0; }
.menu-board .item-row .drag-handle { margin: 0; width: 22px; height: 36px; }
.menu-board .item-open { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.menu-board .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: linear-gradient(135deg, #ECE7DE, #DCD2C2); }
.menu-board .thumb.no-photo { background: var(--fill); display: grid; place-items: center; color: var(--faint); }
.menu-board .thumb.no-photo svg { width: 18px; height: 18px; }
.menu-board .item-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.menu-board .item-text strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-board .item-text .desc { display: none; }
.menu-board .item-text .sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-board .item-text .sub b { color: #A15C07; }
.tag-soft { display: none; }
.menu-board .c-portion, .menu-board .c-price, .menu-board .row-more { display: none; }
.menu-board .item-row.off .thumb { opacity: .5; }
.menu-board .item-row.off strong { color: var(--muted); }
.menu-empty { background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 28px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.menu-empty strong { color: var(--ink); font-family: var(--head); font-weight: 600; }
.menu-empty .btn { gap: 6px; }
.menu-empty svg, .cat-new-card svg, .cat-nav-new svg { width: 16px; height: 16px; }
.cat-new-card { height: 48px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: none; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--muted); font-size: 14px; }
.fab { bottom: calc(92px + var(--safe-b)); }

@media (min-width: 1024px) {
  .app { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
  .brand { padding: 4px 8px 18px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 8px; }
  .nav button { min-height: 42px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-radius: 8px; }
  .nav button svg { width: 18px; height: 18px; }
  .nav button.active { background: var(--brand); color: var(--on-brand); }
  .nav-badge { background: #E5484D; border: 0; color: var(--on-ink); }
  .nav button.active .nav-badge { background: #E5484D; color: var(--on-ink); }
  .nav-desk { display: flex !important; }
  .nav-desk[hidden] { display: none !important; }
  .nav-phone { display: none !important; }
  .sidebar-foot { gap: 8px; }
  .sidebar-foot .btn { gap: 8px; border-radius: 10px; }
  .sidebar-foot .btn svg { width: 16px; height: 16px; }
  .sidebar-foot .btn-text { font-size: 14px; color: var(--muted); min-height: 32px; padding: 0; }
  .trial-card { background: var(--fill); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
  .trial-card[hidden] { display: none; }
  .trial-bar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
  .trial-bar i { display: block; height: 100%; background: var(--ink); }

  .main { padding: 0 28px 32px; }
  .main > section > .page-head {
    margin: 0 -28px 20px; padding: 0 28px; min-height: 72px; position: sticky; top: 0; z-index: 10; flex-wrap: nowrap;
  }
  .page-head h1 { font-size: 22px; letter-spacing: -0.3px; }
  .head-actions { gap: 10px; }
  .head-actions .lbl { display: inline; }
  .head-actions .btn:has(.lbl) { width: auto; padding: 0 14px; }
  .head-actions .btn { min-height: 40px; }
  .only-desktop { display: inline-flex !important; }
  .only-desktop[hidden] { display: none !important; }
  .venue-banner.trial { display: none; }
  .order-sections { order: 0; margin-left: auto; flex-basis: auto; }
  .order-sections button { flex: none; }
  .order-sections + .head-actions { margin-left: 0; }

  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .kpi { padding: 14px 16px; }
  .kpi strong { font-size: 24px; }
  .kpi:nth-child(n+3) { display: flex; }
  .status-tabs { display: none; }
  .board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .col, .col.is-empty, .col.is-current { display: flex; padding: 10px; border-radius: 12px; background: var(--column); min-height: calc(100dvh - 290px); }
  .col-head { display: flex; }
  .col-empty { flex: 1; display: grid; place-items: center; }
  .col .order { padding: 12px; }
  .col .order-foot .btn { min-height: 34px; padding: 0 12px; }
  .orders-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  /* Menu: tabs + search on one row, categories left, products as a table. */
  .menu-bar { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 16px; }
  .menu-bar .search { order: 0; width: 300px; flex: none; margin-left: auto; height: 40px; }
  .sec-tabs { margin: 0; padding: 0; flex: 0 1 auto; min-width: 0; }
  .sec-tab { background: none; }
  .sec-tab .sec-icon { display: grid; width: auto; height: auto; background: none; border-radius: 0; color: inherit; }
  .sec-tab .sec-icon svg { width: 18px; height: 18px; }
  .sec-pick { height: 40px; padding: 0 14px; color: var(--ink-soft); }
  .sec-pick:hover { color: var(--ink); }
  .sec-tab.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .sec-tab.on .sec-pick, .sec-tab.on .sec-more { color: var(--ink); }
  .sec-tab.on .sec-pick .n { color: var(--muted); }
  .sec-tab.add { height: 40px; }

  .menu-split { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
  .menu-split:has(.cat-nav[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .cat-nav { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: 92px; }
  .cat-nav[hidden] { display: none; }
  .cat-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px 8px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
  .cat-nav-head .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
  .cat-nav-head .icon-btn svg { width: 16px; height: 16px; }
  .cat-link { display: flex; align-items: center; border-radius: 8px; }
  .cat-link:hover { background: var(--fill); }
  .cat-link .drag-handle { width: 22px; height: 38px; margin: 0; color: var(--faint); }
  .cat-go { flex: 1; min-width: 0; height: 38px; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0 8px 0 4px; font-weight: 700; font-size: 14px; color: var(--ink-soft); text-align: left; }
  .cat-link:not(:has(.drag-handle)) .cat-go { padding-left: 10px; }
  .cat-go .n { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 700; }
  .cat-link.is-off .cat-go { color: var(--faint); }
  .cat-nav-new { height: 38px; margin-top: 4px; border: 0; background: none; border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-weight: 800; font-size: 14px; color: var(--muted); }
  .cat-nav-new:hover { background: var(--fill); color: var(--ink); }
  .drag-ghost.cat-link { padding: 0 8px; border-radius: 8px; }

  .menu-board { gap: 16px; }
  .cat-card { scroll-margin-top: 92px; }
  .cat-card .cat-head { padding: 10px 10px 10px 12px; }
  .cat-card h3 { font-size: 16px; }
  .cat-head .add-in .lbl { display: inline; }
  .cat-head .add-in { padding: 0 10px; }
  .item-thead, .menu-board .item-row { grid-template-columns: 22px 52px minmax(0, 1fr) 110px 110px 64px 34px; gap: 12px; padding: 0 12px 0 10px; }
  .item-thead { display: grid; align-items: center; height: 34px; background: var(--fill-2); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
  .menu-board .item-row { min-height: 64px; }
  .menu-board .item-open { display: contents; }
  .menu-board .item-open > * { cursor: pointer; }
  .menu-board .thumb { width: 52px; height: 44px; }
  .menu-board .item-text .desc { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-board .item-text .sub { display: none; }
  .tag-soft { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: #FCF1E1; color: #A15C07; vertical-align: 1px; }
  .menu-board .c-portion { display: block; color: var(--muted); font-size: 14px; }
  .menu-board .c-price { display: block; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
  .menu-board .row-more { display: grid; width: 34px; height: 34px; color: var(--muted); }
  .menu-board .row-more svg { width: 18px; height: 18px; }
  .menu-board .item-row:hover { background: var(--hover); }
  .menu-board .item-row.off .c-price { color: var(--muted); }
  [data-panel="menu"] .fab { display: none; }
}

/* =====================================================================
   Dark theme: black. Near-black canvas (#0A0A0A), raised surfaces in dark greys,
   light text; active items turn white with black text.
   Set with <html data-theme="dark">.
   ===================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --canvas: #0A0A0A;
  --surface: #141414;
  --fill: #1F1F1F;
  --fill-2: #191919;
  --chip: #1F1F1F;
  --column: #111111;
  --hover: #1A1A1A;
  --line: #262626;
  --line-soft: #1F1F1F;
  --line-strong: #3A3A3A;
  --ink: #EDEDED;
  --ink-soft: #D4D4D4;
  --muted: #A3A3A3;
  --faint: #737373;
  --on-ink: #0A0A0A;
  --accent: #EDEDED;
  --on-accent: #0A0A0A;
  --brand: #8FA8EC;
  --on-brand: #0A0A0A;
  --brand-hover: #A9BCF0;
  --danger: #F2837B;
  --nav-bg: rgba(20,20,20,.96);
  --chart-ink: #EDEDED;
  --chart-wash: rgba(237,237,237,0.08);
  --chart-grid: #262626;
  --chart-axis: #3A3A3A;
  --chart-muted: #A3A3A3;
  --chart-soft: #737373;
}
[data-theme="dark"] .nav button.active .nav-icon,
[data-theme="dark"] .sec-tab.on,
[data-theme="dark"] .status-tabs button[aria-pressed="true"],
[data-theme="dark"] .switch input:checked + span,
[data-theme="dark"] .chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
[data-theme="dark"] .sec-tab.on .sec-pick, [data-theme="dark"] .sec-tab.on .sec-more { color: var(--on-accent); }
[data-theme="dark"] .sec-tab.on .sec-pick .n { color: #525252; }
[data-theme="dark"] .status-tabs button[aria-pressed="true"] i { background: #0A0A0A; color: #EDEDED; }
[data-theme="dark"] .order.is-new { box-shadow: 0 0 0 2px #EDEDED; }
[data-theme="dark"] .pill, [data-theme="dark"] .tag-soft { background: var(--fill); color: var(--ink-soft); }
[data-theme="dark"] .tag-soft { color: #E6B26A; background: rgba(230,178,106,.12); }
[data-theme="dark"] .menu-board .item-text .sub b { color: #E6B26A; }
[data-theme="dark"] .kpi em.up { color: #6FD3A0; }
[data-theme="dark"] .kpi em.down { color: #F2837B; }
[data-theme="dark"] .venue-banner.warn { background: #3A2A12; color: #F3C987; }
[data-theme="dark"] .venue-banner.danger { background: #3B1A1A; color: #F2B1AB; }
[data-theme="dark"] .menu-board .thumb { background: linear-gradient(135deg, #262626, #1F1F1F); }
[data-theme="dark"] .menu-board .thumb.no-photo { background: var(--fill); color: var(--faint); }
[data-theme="dark"] .switch span { background: #3A3A3A; }
[data-theme="dark"] dialog.sheet::backdrop { background: rgba(0,0,0,.6); }
@media (min-width: 1024px) {
  [data-theme="dark"] .nav button.active { background: var(--accent); color: var(--on-accent); }
  [data-theme="dark"] .sec-tab.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
  [data-theme="dark"] .sec-tab.on .sec-pick, [data-theme="dark"] .sec-tab.on .sec-more { color: var(--ink); }
  [data-theme="dark"] .sec-tab.on .sec-pick .n { color: var(--muted); }
}
[data-theme="dark"] .switch span::after { background: #FFFFFF; }
/* These previews show the guest menu's own looks, so they keep their colours. */
[data-theme="dark"] .theme-preview.premium { background: #0A0A0A; border-color: #3A3A3A; }
[data-theme="dark"] .theme-preview.minimal { background: #FFFFFF; color: #1A1A1A; }
[data-theme="dark"] .plan-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
[data-theme="dark"] .plan-card p { color: var(--muted); opacity: 1; }
[data-theme="dark"] .plan-card .mark { border-color: var(--line-strong); color: var(--ink); }

/* ---------- Reservations ---------- */
.date-nav { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; height: 40px; }
.date-nav .icon-btn { width: 36px; height: 38px; border-radius: 8px; }
.date-nav .icon-btn svg { width: 16px; height: 16px; }
.date-pick { position: relative; padding: 0 6px; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; }
.date-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.date-pick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
/* Phones: the date gets its own row under the title. */
@media (max-width: 1023px) {
  [data-panel="reservations"] .head-actions { display: contents; }
  [data-panel="reservations"] #res-open-settings { margin-left: auto; }
  [data-panel="reservations"] .date-nav { order: 5; flex-basis: 100%; justify-content: space-between; }
}
.res-off { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line-strong); }
.res-off div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.res-off span { color: var(--muted); font-size: 13px; }
.res-tabs { margin-bottom: 12px; }
.res-week { display: none; }
.res-grid { display: flex; flex-direction: column; gap: 14px; }
[data-panel="reservations"][data-view="waiting"] #res-day-panel,
[data-panel="reservations"][data-view="day"] #res-waiting-panel { display: none; }
.res-panel > header { display: none; }
.res-waiting { display: flex; flex-direction: column; gap: 10px; }
.res-empty { border: 1.5px dashed var(--line-strong); border-radius: 12px; color: var(--faint); font-size: 14px; text-align: center; padding: 26px 12px; background: var(--surface); }
.res-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.res-card.is-new { border-color: transparent; box-shadow: 0 0 0 2px var(--ink); }
.res-card-top { display: flex; align-items: center; gap: 8px; }
.res-card-top strong { flex: 1; min-width: 0; font-family: var(--head); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.res-meta span, .res-meta a, .res-who small a, .res-people { display: inline-flex; align-items: center; gap: 5px; }
.res-meta a, .res-who small a { color: inherit; text-decoration: none; }
.res-meta svg, .res-who svg, .res-people svg { width: 14px; height: 14px; }
.res-actions { display: flex; gap: 6px; }
.res-actions .btn-primary { margin-left: auto; }
.res-wait { margin: 0; font-size: 13px; color: var(--muted); }
.res-hour { padding: 10px 2px 4px; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.res-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 34px; grid-template-areas: "time who people more" "time chip table more" "acts acts acts acts";
  align-items: center; gap: 4px 10px; padding: 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.res-row.is-done { opacity: .55; }
.res-time { grid-area: time; font-family: var(--head); font-weight: 600; font-size: 16px; align-self: start; padding-top: 1px; }
.res-who { grid-area: who; min-width: 0; display: flex; flex-direction: column; }
.res-who strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-who small { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 12px; }
.res-people { grid-area: people; font-weight: 800; font-size: 14px; justify-self: end; }
.res-table { grid-area: table; justify-self: end; border: 0; background: none; padding: 2px 0; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.res-table:hover { color: var(--ink); text-decoration: underline; }
.res-chip { grid-area: chip; justify-self: start; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 2px 9px; background: var(--fill); color: var(--muted); white-space: nowrap; }
.st-pending, .st-proposed { background: #FCF1E1; color: #A15C07; }
.st-confirmed { background: #E8EEFC; color: #1E4FD6; }
.st-arrived { background: #E7F3EC; color: #1F7A4D; }
.st-no_show, .st-declined { background: #FBEAE7; color: #B42318; }
.res-row-actions { grid-area: acts; display: flex; gap: 6px; justify-content: flex-end; }
.res-row-actions:empty { display: none; }
.res-row > .icon-btn { grid-area: more; width: 34px; height: 34px; align-self: start; color: var(--muted); }
.res-row > .icon-btn svg { width: 18px; height: 18px; }
.count-dot { background: #E5484D; color: #FFFFFF; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 8px; }
.count-dot[hidden] { display: none; }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; min-width: 0; }
.field-row > .field.small { flex: 0 0 96px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick { position: relative; }
.day-pick input { position: absolute; opacity: 0; inset: 0; }
.day-pick span { display: grid; place-items: center; min-width: 48px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; color: var(--ink); cursor: pointer; }
.day-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day-pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.shifts { display: flex; flex-direction: column; gap: 8px; }
.shift { display: flex; align-items: center; gap: 8px; }
.shift input { flex: 1; min-height: 46px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 16px; color: var(--ink); }
#res-add-shift { align-self: flex-start; margin-top: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--fill); padding: 0 10px; font-size: 13px; color: var(--muted); }
[data-theme="dark"] .st-pending, [data-theme="dark"] .st-proposed { background: rgba(230,178,106,.14); color: #E6B26A; }
[data-theme="dark"] .st-confirmed { background: rgba(120,160,255,.14); color: #9DB8FF; }
[data-theme="dark"] .st-arrived { background: rgba(111,211,160,.14); color: #6FD3A0; }
[data-theme="dark"] .st-no_show, [data-theme="dark"] .st-declined { background: rgba(242,131,123,.14); color: #F2837B; }
[data-theme="dark"] .res-card.is-new { box-shadow: 0 0 0 2px #EDEDED; }

@media (min-width: 1024px) {
  .res-tabs { display: none; }
  .res-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .res-daycard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; color: var(--ink); }
  .res-daycard span { font-size: 12px; color: var(--muted); font-weight: 700; }
  .res-daycard strong { font-family: var(--head); font-weight: 600; font-size: 19px; }
  .res-daycard small { font-size: 12px; color: var(--muted); }
  .res-daycard .bars { display: flex; gap: 3px; margin-top: 6px; }
  .res-daycard .bars i { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
  .res-daycard .bars i.f { background: var(--ink); }
  .res-daycard.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
  .res-daycard.on span, .res-daycard.on small { color: var(--on-brand); opacity: .7; }
  .res-daycard.on .bars i { background: rgba(127,127,127,.4); }
  .res-daycard.on .bars i.f { background: var(--on-brand); }
  .res-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
  [data-panel="reservations"] #res-day-panel, [data-panel="reservations"] #res-waiting-panel { display: block !important; }
  .res-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .res-panel > header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .res-panel > header small { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 12px; }
  .res-waiting { padding: 12px; background: var(--fill-2); min-height: 140px; }
  .res-panel .res-empty { border: 0; background: none; }
  #res-day .res-hour { padding: 8px 16px 4px; background: var(--fill-2); border-bottom: 1px solid var(--line-soft); }
  #res-day .res-row {
    grid-template-columns: 56px minmax(0, 1fr) 56px 110px 120px auto 34px; grid-template-areas: none; gap: 10px;
    margin: 0; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 10px 12px 10px 16px; min-height: 60px;
  }
  #res-day .res-row > * { grid-area: auto; }
  #res-day .res-time { align-self: center; padding: 0; }
  #res-day .res-people { justify-self: start; }
  #res-day .res-table { justify-self: start; }
  #res-day .res-row > .icon-btn { align-self: center; }
  #res-day .res-row-actions:empty { display: block; }
}
[data-theme="dark"] .switch input:checked + span::after { background: #0A0A0A; }

/* ---------- Online orders ---------- */
.type-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.type-tag.pickup { background: #E8EEFC; color: #1E4FD6; }
.type-tag.delivery { background: #FCEEE6; color: #B4410F; }
.order-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.order-who span { color: var(--ink); }
.order-who a, .order-address { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.order-who svg, .order-address svg { width: 14px; height: 14px; flex: none; }
.order-address { font-size: 13px; color: var(--ink); font-weight: 600; align-items: flex-start; }
.order-address svg { margin-top: 2px; color: #B4410F; }
.order-address:hover span { text-decoration: underline; }
.order-foot .total small { font-family: var(--text); font-size: 12px; font-weight: 700; color: var(--muted); }
[data-theme="dark"] .type-tag.pickup { background: rgba(120,160,255,.14); color: #9DB8FF; }
[data-theme="dark"] .type-tag.delivery { background: rgba(255,140,90,.14); color: #FFA27A; }
[data-theme="dark"] .order-address svg { color: #FFA27A; }

/* ---------- Product options editor ---------- */
.opt-editor { display: flex; flex-direction: column; gap: 10px; }
.opt-editor:empty { display: none; }
.opt-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--fill-2); }
.opt-group-head, .opt-choice { display: flex; gap: 8px; align-items: center; }
.opt-group input, .opt-group select { min-height: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; }
.opt-group-head input { flex: 1; font-weight: 700; }
.opt-group-head select { flex: 0 1 210px; }
.opt-choice > input { flex: 1; }
.opt-choice .input-suffix { flex: 0 0 120px; min-height: 42px; border-radius: 8px; background: var(--surface); }
.opt-choice .input-suffix input { border: 0; min-height: 40px; width: 100%; padding-right: 4px; }
.opt-group .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.opt-group .icon-btn svg { width: 16px; height: 16px; }
.opt-group .btn-text { align-self: flex-start; min-height: 32px; padding: 4px 2px; font-size: 14px; }
#add-option-group { align-self: flex-start; }
.order-items .n small { display: block; font-size: 12px; color: var(--muted); }

.accept-time { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--fill); font-size: 14px; font-weight: 600; }
.accept-time div { display: flex; flex-wrap: wrap; gap: 6px; }
.accept-time .btn { min-width: 48px; background: var(--surface); }

/* Getting-started guide on the home page of a new venue. */
.setup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 16px; display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.setup[hidden] { display: none; }
.setup h2 { font-family: var(--head); font-size: 20px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.3px; }
.setup-intro p { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.45; }
.setup-meter { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.setup-meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s ease; }
.setup-count { font-size: 13px; font-weight: 700; margin-top: 8px; }
.setup-hide { margin-top: 14px; background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.setup-step { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.setup-step:first-child { border-top: 0; }
.setup-check { width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--line-strong); display: grid; place-items: center; }
.setup-step.done .setup-check { border: 0; background: #1F7A4D; color: #FFFFFF; }
.setup-check svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.setup-step b { display: block; font-size: 15px; }
.setup-step b em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; }
.setup-step div > span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.setup-step.done b { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.setup-step.now { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.setup-step .btn { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .setup { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .setup-step { grid-template-columns: 24px 1fr; }
  .setup-step .btn { grid-column: 2; justify-self: start; }
}

/* Statistics before the first visitors and orders. */
.stats-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); }
.stats-empty-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--chip); display: grid; place-items: center; margin-bottom: 6px; }
.stats-empty-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stats-empty strong { font-family: var(--head); font-size: 18px; font-weight: 600; }
.stats-empty p { margin: 0; max-width: 360px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.stats-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* Sign-in extras: forgotten password link, success note, email confirmation banner. */
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; align-self: center; }
.ok-msg { margin: 0; padding: 10px 12px; border-radius: 8px; background: #E7F4EC; color: #1F7A4D; font-size: 14px; }
[data-theme="dark"] .ok-msg { background: rgba(111,211,160,.14); color: #6FD3A0; }
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); font-size: 14px; }
.verify-banner[hidden] { display: none; }

/* Settings on wide screens: the groups in two columns instead of one narrow strip. */
@media (min-width: 1100px) {
  [data-panel="settings"] .plan-card { max-width: none; }
  .settings-grid { columns: 2; column-gap: 24px; }
  .settings-grid > .group { max-width: none; break-inside: avoid; }
}
