/* QR Menu by Sugarcoat — theme tokens follow the Sugarcoat brand theme. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.f208f1ceee9d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.6aaa5f578bc1.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --fg: #000000;
  --card: #ffffff;
  --primary: #3f5ec2;
  --primary-fg: #eff6ff;
  --muted: #525252;
  --accent: #ea1a1a;
  --border: #e4e4e4;
  --soft: #f2f4fb;
  --c1: #dbe6f6;
  --c2: #9ab0e5;
  --c3: #6a7ccd;
  --c5: #14185a;
  --ok: #1f7a4d;
  --radius: 0.5rem;
  --shadow: 0 1px 2px rgba(20, 24, 90, 0.06), 0 4px 14px rgba(20, 24, 90, 0.08);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --fg: #ffffff;
  --card: #181818;
  --muted: #a4a4a4;
  --border: #242424;
  --soft: #10131f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.mono, .num { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.i-lg { width: 1.6em; height: 1.6em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; border-color: var(--c2); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: #3651a9; border-color: #3651a9; }
.btn-dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { color: var(--accent); }
.btn-danger:hover { border-color: var(--accent); }
.btn-danger-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.icon-btn { width: 40px; padding: 0; }

.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  font: 400 15px var(--font);
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
input[type="color"].input { padding: 4px; width: 64px; }
input[type="file"].input { height: auto; padding: 8px; }
.check { width: 18px; height: 18px; accent-color: var(--primary); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.field .help { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field.check-field { display: flex; align-items: center; gap: 10px; }
.field.check-field label { margin: 0; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--accent); font-size: 13px; }
.form-error { background: #fdecec; color: #8c1010; border: 1px solid #f6c6c6; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card h2 { font-size: 1.1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 999px; font: 500 12px/1 var(--mono); background: var(--soft); color: var(--c5);
  border: 1px solid var(--c1);
}
.badge-red { background: #fdecec; color: #a11212; border-color: #f6c6c6; }
.badge-ok { background: #e8f5ee; color: var(--ok); border-color: #c4e6d3; }
.badge-muted { background: transparent; color: var(--muted); border-color: var(--border); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 16px 0 0; }
.messages li { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--c1); background: var(--soft); color: var(--c5); margin-bottom: 8px; font-size: 14px; }
.messages li.error { background: #fdecec; color: #8c1010; border-color: #f6c6c6; }

/* ---------- site header / footer ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; }
.brand small { font: 500 10px/1 var(--mono); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.link { color: var(--muted); padding: 8px 12px; border-radius: var(--radius); font-weight: 500; font-size: 14px; }
.nav a.link:hover, .nav a.link.active { color: var(--fg); background: var(--soft); text-decoration: none; }
.nav form { margin: 0; }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--card); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 10px 20px 16px; }
  .nav.open { display: flex; }
  .nav .btn { width: 100%; }
}

.site-footer { border-top: 1px solid var(--border); background: var(--card); margin-top: 80px; padding: 40px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--fg); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- marketing ---------- */
.hero { padding-top: 72px; padding-bottom: 40px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 18px; display: inline-flex; gap: 8px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.phone { border: 1px solid var(--border); border-radius: 22px; padding: 14px; background: var(--bg); max-width: 300px; margin: 0 auto; }
.phone-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-top: 8px; font-size: 14px; }
.section { padding-top: 56px; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.feature .icon-box { width: 40px; height: 40px; border-radius: var(--radius); background: var(--soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--c1); }
.steps { counter-reset: step; }
.step-num { font: 600 13px/1 var(--mono); color: var(--primary); margin-bottom: 10px; }
.cta { background: var(--primary); color: var(--primary-fg); border-radius: 16px; padding: 44px 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: 1.7rem; }
.cta p { color: var(--primary-fg); opacity: 0.9; margin: 0; }
.cta .btn { background: #fff; color: var(--primary); border-color: #fff; }
.tagline { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.page-head { padding-top: 48px; padding-bottom: 24px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 28px; } }

.price-card { display: flex; flex-direction: column; }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.price-card li .i { color: var(--primary); margin-top: 3px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.6rem; }

/* ---------- owner app ---------- */
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 28px 0 18px; }
.app-head h1 { font-size: 1.6rem; margin: 0; }
.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 4px; overflow-x: auto; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); color: var(--muted); font: 500 13.5px/1 var(--font); white-space: nowrap; border: 0; background: none; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--fg); text-decoration: none; }
.tabs a.active { background: var(--primary); color: var(--primary-fg); }
.tabs .count { font-family: var(--mono); font-size: 11px; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 6px; }

.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.lane { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); min-height: 360px; display: flex; flex-direction: column; }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.lane-head h2 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; }
.lane-pending .lane-head { border-top: 3px solid var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.lane-preparing .lane-head { border-top: 3px solid var(--c3); border-radius: var(--radius) var(--radius) 0 0; }
.lane-ready .lane-head { border-top: 3px solid var(--ok); border-radius: var(--radius) var(--radius) 0 0; }
.lane-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lane-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 40px 10px; }
.ticket { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--bg); }
.ticket.new { animation: flash 1.6s ease-out 2; }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px var(--c2); } }
.ticket-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ticket-table { font-weight: 700; font-size: 16px; }
.ticket-meta { font: 400 12px var(--mono); color: var(--muted); }
.ticket ul { list-style: none; padding: 0; margin: 10px 0; font-size: 14px; }
.ticket li { display: flex; gap: 8px; padding: 2px 0; }
.ticket li .q { font-family: var(--mono); color: var(--primary); min-width: 26px; }
.ticket .note { font-size: 13px; background: var(--card); border: 1px dashed var(--border); border-radius: 6px; padding: 6px 8px; margin-bottom: 10px; }
.ticket-actions { display: flex; gap: 8px; }
.ticket-actions .btn { flex: 1; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.live-dot.off { background: var(--accent); }

/* kitchen mode: big, high contrast */
body.kitchen { --bg: #000; --fg: #fff; --card: #121212; --border: #2c2c2c; --muted: #b5b5b5; --soft: #1b1d29; }
body.kitchen .ticket { font-size: 17px; }
body.kitchen .ticket-table { font-size: 22px; }
body.kitchen .site-footer, body.kitchen .app-sub { display: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat { display: flex; gap: 14px; align-items: center; }
.stat .icon-box { width: 44px; height: 44px; border-radius: var(--radius); background: var(--soft); color: var(--primary); display: grid; place-items: center; }
.stat .label { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat .value { font: 600 24px/1.2 var(--mono); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.item-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.item-card.off { opacity: 0.6; }
.item-img { aspect-ratio: 16 / 10; background: var(--soft); display: grid; place-items: center; color: var(--c3); font: 700 34px var(--font); overflow: hidden; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.item-body .row { gap: 6px; }
.item-actions { display: flex; gap: 6px; padding: 0 14px 14px; }
.item-actions form { flex: 1; display: flex; }
.item-actions .btn { flex: 1; }
.veg { width: 14px; height: 14px; border: 1.5px solid var(--ok); border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.veg::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.nonveg { border-color: #8c3a12; }
.nonveg::after { background: #8c3a12; border-radius: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #8c3a12; background: none; }

.qr-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: #fff; }
.qr-box img { width: 100%; height: auto; image-rendering: pixelated; }
.qr-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-table { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--card); }
.qr-table img { background: #fff; border-radius: 6px; }
.qr-table .row { justify-content: space-between; margin-top: 8px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }

/* ---------- customer menu ---------- */
.menu-page { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 120px; }
.menu-top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
.menu-hero { padding: 20px 18px 14px; display: flex; gap: 14px; align-items: center; }
.menu-logo { width: 52px; height: 52px; border-radius: 12px; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font: 700 22px var(--font); flex: none; overflow: hidden; }
.menu-hero h1 { font-size: 1.35rem; margin: 0; }
.menu-tools { display: flex; gap: 6px; margin-left: auto; }
.menu-search { padding: 0 18px 10px; position: relative; }
.menu-search .i { position: absolute; left: 30px; top: 12px; color: var(--muted); }
.menu-search .input { padding-left: 38px; border-radius: 999px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--fg); font: 500 13px var(--font); cursor: pointer; }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.menu-section { padding: 18px 18px 0; }
.menu-section h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.menu-section h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.dish { display: flex; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.dish.off { opacity: 0.55; }
.dish-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dish-name { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.dish-desc { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-price { font: 600 15px var(--mono); margin-top: auto; }
.dish-side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; width: 104px; }
.dish-img { width: 104px; height: 88px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--c3); font: 700 26px var(--font); }
.dish-img img { width: 100%; height: 100%; object-fit: cover; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--primary); border-radius: var(--radius); overflow: hidden; height: 34px; background: var(--card); }
.qty button { width: 32px; height: 100%; border: 0; background: none; color: var(--primary); cursor: pointer; display: grid; place-items: center; }
.qty span { min-width: 24px; text-align: center; font: 600 14px var(--mono); }
.add-btn { height: 34px; width: 100%; border-radius: var(--radius); border: 1px solid var(--primary); background: var(--card); color: var(--primary); font: 600 13px var(--font); cursor: pointer; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.cart-bar .btn { pointer-events: auto; max-width: 528px; margin: 0 auto; width: 100%; height: 54px; justify-content: space-between; border-radius: 12px; box-shadow: 0 8px 24px rgba(20, 24, 90, 0.25); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--card); border-radius: 18px 18px 0 0; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow-y: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-line .grow { min-width: 0; }
.cart-total { display: flex; justify-content: space-between; font: 600 17px var(--mono); padding: 14px 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.service-grid .btn { height: auto; padding: 16px 8px; flex-direction: column; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-size: 14px; z-index: 80; max-width: 90vw; text-align: center; }
.menu-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 18px; }
.menu-foot a { color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .i { width: 40px; height: 40px; color: var(--c2); margin: 0 auto 12px; display: block; }

.progress { list-style: none; padding: 0; margin: 20px 0; }
.progress li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted); }
.progress li .dot { width: 14px; height: 14px; border: 2px solid var(--border); background: transparent; }
.progress li.done { color: var(--fg); font-weight: 600; }
.progress li.done .dot { background: var(--primary); border-color: var(--primary); }

@media print {
  .site-header, .site-footer, .tabs, .no-print { display: none !important; }
}

/* ---------- small layout fixes ---------- */
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }
.site-footer.slim { margin-top: 48px; padding: 0; }
.site-footer.slim .footer-bottom { border-top: 0; margin-top: 0; padding: 18px 20px; }
.date-nav { flex-wrap: nowrap; }
.date-nav .input { width: auto; }
a.chip { display: inline-flex; align-items: center; gap: 6px; }
a.chip:hover { text-decoration: none; border-color: var(--c2); }
.qr-table .row { flex-wrap: nowrap; gap: 6px; }
.qr-table .row form { margin: 0; }
.qr-actions { justify-content: flex-start !important; }
[data-qty-slot] { width: 100%; display: flex; justify-content: center; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  /* 16px stops iOS Safari from zooming into inputs */
  .input, textarea.input, select.input { font-size: 16px; height: 44px; }
  .btn { height: 44px; }
  .btn-sm { height: 38px; }
  .icon-btn.btn-sm { width: 38px; }

  .app-head { padding: 18px 0 14px; gap: 12px; }
  .app-head h1 { font-size: 1.35rem; }
  .app-head > div:first-child { width: 100%; }
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 2px; overflow: visible; }
  .tabs a { flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 11.5px; text-align: center; position: relative; white-space: normal; line-height: 1.15; }
  .tabs a .i { width: 18px; height: 18px; }
  .tabs .count { position: absolute; top: 2px; right: 6px; padding: 1px 5px; font-size: 10px; }

  .lane { min-height: 0; }
  .lane-empty { padding: 14px 10px; }
  .ticket-actions .btn { height: 44px; }

  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 12px; gap: 0; }
  .stat .icon-box { display: none; }
  .stat .label { font-size: 10px; letter-spacing: 0.04em; }
  .stat .value { font-size: 17px; word-break: break-all; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filters .chip { flex: none; }

  /* order table becomes a list of cards */
  .table-wrap.card { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
  .table.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); font: 500 11px/1.8 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; flex: none; }
  .table.responsive td.items { display: block; text-align: left; }
  .table.responsive td.items::before { display: block; }
  .table.responsive td:empty { display: none; }
  .table.responsive td.actions::before { content: none; }
  .table.responsive td.actions form, .table.responsive td.actions .btn { width: 100%; }

  /* menu manager: compact horizontal cards */
  .items-grid { grid-template-columns: 1fr; gap: 10px; }
  .item-card { display: grid; grid-template-columns: 84px 1fr; grid-template-areas: "img body" "act act"; }
  .item-img { grid-area: img; aspect-ratio: auto; height: 100%; min-height: 84px; font-size: 26px; }
  .item-body { grid-area: body; padding: 10px 12px; gap: 4px; }
  .item-actions { grid-area: act; padding: 0 12px 12px; }
  .menu-search-owner { flex: 1 1 100%; }
  .card.row.between > .btn { flex: 1 1 100%; }

  /* QR codes two per row */
  .qr-tables { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .qr-table { padding: 8px; }
  .qr-table .row strong { font-size: 14px; }
  .qr-actions { justify-content: space-between !important; }

  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 16px; }
  .card-head { flex-wrap: wrap; }
  .grid-2 { grid-template-columns: 1fr; }
  .switch-row { align-items: flex-start; }
  .date-nav .input { flex: 1; }
  .auth-wrap { place-items: start center; padding-top: 24px; }
}
