/* ==========================================================================
   Cofferant design system — RTL-first, light/dark, no framework
   ========================================================================== */
@font-face {
  font-family: "VazirLocal";
  src: url("../css/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  /* Neutral, crisp surfaces (the look of Toast / Square / Uber Eats dashboards) with one confident accent. */
  --brand: #059669;
  --brand-ink: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, transparent);
  --alt: #f97316;
  --alt-soft: color-mix(in srgb, var(--alt) 13%, transparent);
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .20);

  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --info: #2563eb;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --font: "Vazirmatn", "VazirLocal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0e11;
  --surface: #14171b;
  --surface-2: #1c2026;
  --ink: #f3f4f6;
  --muted: #9aa1ad;
  --line: #262b33;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Layout helpers ---------- */
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.text-ok { color: var(--ok); } .text-bad { color: var(--bad); } .text-warn { color: var(--warn); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform .08s ease, background .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 85%, #000); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }

/* ---------- Cards, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title h3 { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-new { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge-preparing { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.badge-ready { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge-delivered { background: var(--surface-2); color: var(--muted); }
.badge-cancelled { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.badge-paid { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge-unpaid { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.badge-plain::before { display: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: all .15s; }
.chip:hover { border-color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip .count { font-size: .75rem; opacity: .75; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.input, .field input[type=text], .field input[type=number], .field input[type=password], .field input[type=email], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input, .field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-color { padding: 4px; height: 46px; cursor: pointer; }
.help { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--bad); font-size: .85rem; }
.check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check label { margin: 0; font-weight: 500; cursor: pointer; flex: 1; }
.search { position: relative; }
.search .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-inline-start: 42px; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(-20px); }
[dir=ltr] .switch input:checked + span::after { transform: translateX(20px); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: .78rem; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.table tr.is-new td { background: color-mix(in srgb, var(--warn) 7%, transparent); }

/* ---------- Toasts, sheet ---------- */
.toasts { position: fixed; z-index: 9999; inset-inline: 0; bottom: 90px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 440px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; animation: toast-in .25s ease; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(15, 10, 6, .55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 1000; inset-inline: 0; bottom: 0; max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); width: min(560px, 100%); margin-inline: auto; }
.sheet.is-open { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; flex: none; }
.sheet-head h3 { margin: 0; }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.sheet-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
@media (min-width: 700px) { .sheet { bottom: 4vh; border-radius: 26px; } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; opacity: .45; margin-bottom: 8px; }

.messages { position: fixed; z-index: 9998; top: 14px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.msg { pointer-events: auto; padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 500; max-width: 480px; animation: toast-in .3s ease; }
.msg.success { border-color: var(--ok); } .msg.error { border-color: var(--bad); } .msg.warning { border-color: var(--warn); }

/* ---------- Stats / charts ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 1.75rem; font-weight: 800; line-height: 1.2; }
.stat .unit { font-size: .8rem; font-weight: 500; color: var(--muted); }
.delta { font-size: .8rem; font-weight: 700; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.stat-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }

.vbars { display: flex; align-items: flex-end; gap: 8px; height: 170px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.vbar .bar { width: 100%; max-width: 44px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, transparent)); min-height: 4px; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.vbar .bar.zero { background: var(--line); }
.vbar .cap { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 14px; align-items: center; }
.hbar .track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--brand); }
.heat { display: grid; grid-template-columns: repeat(17, 1fr); gap: 4px; }
.heat div { aspect-ratio: 1; border-radius: 6px; background: color-mix(in srgb, var(--brand) calc(var(--v) * 1%), var(--surface-2)); }
.heat-cap { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 6px; }

/* ---------- Public site shell ---------- */
.topnav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topnav .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.navlinks { display: flex; gap: 4px; margin-inline-start: 12px; }
.navlinks a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none !important; }
.navlinks a:hover, .navlinks a.is-active { color: var(--ink); background: var(--surface-2); }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0; color: var(--muted); font-size: .9rem; }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.phone-mock { background: var(--surface); border: 8px solid var(--ink); border-radius: 38px; padding: 18px 14px; box-shadow: var(--shadow-lg); max-width: 320px; margin-inline: auto; }
.mock-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--bg); }
.mock-thumb { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.4rem; }
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature .stat-icon { width: 46px; height: 46px; }
.section { padding: 56px 0 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-head p { color: var(--muted); }
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: var(--brand-ink); border-radius: var(--r-lg); padding: 40px; text-align: center; }
.cta-band .btn { background: #fff; color: #231a14; border-color: #fff; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 20px; width: 100%; }

/* ---------- Vendor shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; background: var(--surface); border-inline-end: 1px solid var(--line); }
.side .brand { padding: 4px 10px 18px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; text-decoration: none !important; position: relative; border: 0; background: none; width: 100%; cursor: pointer; text-align: start; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand); }
.nav-item .pill { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .72rem; display: grid; place-items: center; font-weight: 700; }
.side .spacer { flex: 1; }
.main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.mobile-top { display: none; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .bottom-nav { display: flex; position: fixed; z-index: 60; inset-inline: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); padding: 6px 2px; border-radius: 10px; text-decoration: none !important; position: relative; }
  .bottom-nav a.is-active { color: var(--brand); background: var(--brand-soft); }
  .bottom-nav .pill { position: absolute; top: 0; inset-inline-end: 22%; min-width: 18px; height: 18px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .65rem; display: grid; place-items: center; }
  .main { padding-bottom: 100px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .navlinks { display: none; }
}
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } .stat .value { font-size: 1.4rem; } }

/* ---------- Live board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 14px; align-items: start; padding-bottom: 8px; }
@media (max-width: 700px) { .board { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; } .lane { scroll-snap-align: center; } }
.lane { background: var(--surface-2); border-radius: var(--r); padding: 12px; min-height: 240px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; font-weight: 700; }
.lane-head .count { background: var(--surface); border-radius: 99px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: .85rem; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); animation: pop .35s ease; }
.ticket.is-late { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.ticket-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.table-tag { display: inline-grid; place-items: center; min-width: 44px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 800; }
.ticket ul { list-style: none; margin: 0 0 10px; padding: 0; }
.ticket li { display: flex; gap: 8px; padding: 3px 0; }
.ticket li .q { font-weight: 800; color: var(--brand); min-width: 26px; }
.ticket .note { color: var(--warn); font-size: .82rem; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.alert-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 10px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); animation: pop .3s ease; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; display: inline-block; }
.live-dot.off { background: var(--bad); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Order timeline / stepper ---------- */
.stepper { display: flex; justify-content: space-between; position: relative; margin: 24px 0; }
.stepper::before { content: ""; position: absolute; top: 17px; inset-inline: 8%; height: 3px; background: var(--line); border-radius: 2px; }
.step { position: relative; z-index: 1; flex: 1; text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.step i { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); font-style: normal; transition: all .3s; }
.step.is-done i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.step.is-now { color: var(--ink); }
.step.is-now i { box-shadow: 0 0 0 6px var(--brand-soft); }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lines li:last-child { border-bottom: none; }
.stars { display: flex; gap: 6px; justify-content: center; direction: ltr; }
.stars button { background: none; border: 0; font-size: 2rem; color: var(--line); cursor: pointer; padding: 2px; transition: transform .1s; }
.stars button.on { color: #f5b301; }
.stars button:active { transform: scale(1.25); }

/* ---------- Customer menu ---------- */
.menu-hero { background: linear-gradient(160deg, var(--brand), var(--brand-strong)); color: var(--brand-ink); padding: 22px 0 54px; }
.menu-hero .row { align-items: flex-start; }
.menu-hero .table-badge { background: rgba(255,255,255,.2); border-radius: 999px; padding: 4px 14px; font-weight: 700; backdrop-filter: blur(6px); }
.menu-hero h1 { margin: 6px 0 2px; }
.menu-hero p { opacity: .9; margin: 0; }
.menu-body { margin-top: -30px; position: relative; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.cat-bar { position: sticky; top: 0; z-index: 30; padding: 10px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }
.dish { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); transition: transform .15s; }
.dish.is-off { opacity: .55; }
.dish-img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; font-size: 2.2rem; }
.dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dish-desc { color: var(--muted); font-size: .84rem; line-height: 1.55; margin: 2px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; font-size: 1.02rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .72rem; margin-inline-start: 3px; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.qty button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface); color: var(--ink); font-size: 1.2rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.qty button.add { background: var(--brand); color: var(--brand-ink); }
.qty .n { min-width: 24px; text-align: center; font-weight: 800; }
.add-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 40%, transparent); }
.add-btn:active { transform: scale(.92); }
.popular-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.pop-card { flex: none; width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.pop-card .im { height: 96px; background: var(--surface-2); display: grid; place-items: center; font-size: 2rem; }
.pop-card img { width: 100%; height: 96px; object-fit: cover; }
.pop-card .t { padding: 8px 10px; }
.cart-bar { position: fixed; z-index: 500; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--ink); color: var(--bg); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateY(160%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.cart-bar.is-show { transform: none; }
.cart-bar .cnt { background: var(--brand); color: var(--brand-ink); min-width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.cart-bar .btn-primary { margin-inline-start: auto; }
.fab-row { display: flex; gap: 8px; margin: 14px 0 6px; overflow-x: auto; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- QR print ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-card { text-align: center; }
.qr-card img { width: 100%; max-width: 190px; margin: 0 auto 8px; background: #fff; padding: 8px; border-radius: 12px; }
.qr-sheet { break-inside: avoid; border: 2px dashed #bbb; border-radius: 18px; padding: 22px; text-align: center; color: #231a14; background: #fff; }
.qr-sheet img { width: 220px; margin: 12px auto; }

.item-thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.preview-img { max-height: 140px; border-radius: 12px; margin-bottom: 8px; }

@media print {
  .side, .mobile-top, .bottom-nav, .no-print, .messages, .toasts { display: none !important; }
  .shell { display: block; } .main { padding: 0; } body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Money, pricing, onboarding ---------- */
.badge-alt { background: var(--alt-soft); color: var(--alt); }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: .92rem; }
.sum-row.total { color: var(--ink); font-weight: 800; font-size: 1.1rem; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum-row .neg { color: var(--ok); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 56px; min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.seg button.on { border-color: var(--alt); background: var(--alt-soft); color: var(--alt); }
.pay-opt { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; margin-bottom: 8px; background: var(--surface); }
.pay-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.upsell { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.upsell button { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px dashed var(--alt); border-radius: 12px; background: var(--alt-soft); cursor: pointer; font-weight: 600; }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--alt)); border-radius: 99px; }
.todo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); text-decoration: none !important; color: var(--ink); }
.todo:last-child { border-bottom: 0; }
.todo .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.todo.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo.done span { color: var(--muted); text-decoration: line-through; }
.lock-strip { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); margin-bottom: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.plan { text-align: center; position: relative; }
.plan.best { border: 2px solid var(--brand); }
.plan .ribbon { position: absolute; top: -12px; inset-inline: 0; margin: auto; width: fit-content; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; padding: 2px 12px; border-radius: 99px; }
.plan .amount { font-size: 1.5rem; font-weight: 900; }
.key-box { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 10px 14px; border-radius: 12px; direction: ltr; text-align: left; overflow-x: auto; white-space: pre; font-size: .85rem; }
.state-active { color: var(--ok); } .state-expired { color: var(--warn); } .state-cancelled { color: var(--bad); }

.dev-mobile { display: none; padding-top: 12px; }
@media (max-width: 900px) { .dev-mobile { display: flex; } }

.split { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
