/* menudisplay.in — core styles (no framework, plain CSS)
 * Palette inspired by smartfoodlab.in: terracotta-orange primary, a leafy
 * green secondary, a pale-mint footer band, and a deep espresso-charcoal
 * sidebar/footer base, on a warm off-white background.
 */

:root {
  --brand: #d9502e;
  --brand-dark: #b8401f;
  --brand-light: #fdeae2;
  --brand-gold: #e8a53d;
  --green: #4b8b3b;
  --green-dark: #386b2c;
  --bg: #faf8f5;
  --card: #ffffff;
  --text: #262421;
  --muted: #746f68;
  --border: #e8e2da;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --success: #1e7e42;
  --success-bg: #e8f6ee;
  --mint-bg: #eaf3ea;
  --footer-dark: #241d1a;
  --footer-dark-2: #14100e;
  --sidebar-text: #cfc4ba;
  --sidebar-text-dim: #9c9088;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(20,18,12,.07), 0 1px 2px rgba(20,18,12,.05);
}

/* --- Dark mode — customer-facing public pages only (menu/scan.php,
   menu/view.php, menu/raw.php, menu/orders.php). Toggled via
   #theme-toggle (see includes/public_header.php + app.js), remembered
   in localStorage, applied as data-theme="dark" on <html> before first
   paint by an inline script in public_header.php so there's no flash of
   light theme on a repeat dark-mode visit. Same variable names as
   :root above — every existing rule that already reads var(--text) etc.
   picks this up automatically, no per-component dark rules needed. ---*/
[data-theme="dark"] {
  --brand-light: #3a2a22;
  --bg: #17140f;
  --card: #221e18;
  --text: #f0ece5;
  --muted: #a89d90;
  --border: #37312a;
  --danger-bg: #3a201d;
  --success-bg: #1c3226;
  --mint-bg: #1c2b21;
  --footer-dark: #100d0a;
  --footer-dark-2: #0a0806;
  --shadow: 0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
}
[data-theme="dark"] .menu-hero { background: linear-gradient(180deg, var(--brand-light) 0%, var(--card) 100%); }
[data-theme="dark"] .menu-hero-logo,
[data-theme="dark"] .cat-pill,
[data-theme="dark"] .menu-add-btn { background: var(--card); }
[data-theme="dark"] .cat-pill.active,
[data-theme="dark"] .cat-pill:hover { background: var(--brand); color: #fff; }
[data-theme="dark"] .public-tab { background: #2c2620; }
[data-theme="dark"] img { opacity: .96; }

* { box-sizing: border-box; }

/* The HTML `hidden` attribute must always win, even over elements whose
   own class sets `display` unconditionally (e.g. .cart-bar, .cart-drawer
   below use `display: flex` for when they're shown, which — without this
   rule — silently overrides the browser's default `[hidden]{display:none}`
   any time an author stylesheet sets `display` on the same element). */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; color: var(--text); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- Top bar --- */
.topbar {
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf7 100%);
  color: var(--text);
  padding: 12px 0;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 10px rgba(20,18,12,.06);
  position: relative;
  z-index: 5;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; }
.topbar .brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
}
.topbar .brand:hover { text-decoration: none; color: var(--text); }
/* Official menudisplay.in logo mark, replacing the old four-dot placeholder.
   A white padded ring + soft shadow keeps it crisp and legible against any
   topbar background, rather than blending into a flat edge. */
.brand-logo {
  height: 62px; width: 62px; border-radius: 50%; margin-right: 14px;
  vertical-align: middle; object-fit: cover; background: #fff;
  padding: 2px; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(20,18,12,.18);
}
.hero .brand-mark .brand-logo { height: 40px; width: 40px; margin-right: 10px; padding: 2px; }
.topbar .brand-suffix {
  margin-left: 10px; padding-left: 12px; border-left: 2px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
}
/* Four-dot mark echoing smartfoodlab.in's colourful logo motif — kept as a
   fallback for any spot that hasn't been switched to the real logo yet. */
.topbar .brand.brand-dots::before,
.hero .brand-mark.brand-dots::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  margin-right: 11px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(20,18,12,.18);
  background-image:
    radial-gradient(circle at 27% 27%, #2fa8a0 0 48%, transparent 49%),
    radial-gradient(circle at 73% 27%, var(--brand) 0 48%, transparent 49%),
    radial-gradient(circle at 27% 73%, #d1428c 0 48%, transparent 49%),
    radial-gradient(circle at 73% 73%, var(--green) 0 48%, transparent 49%);
}
.hero .brand-mark.brand-dots::before { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }
.topbar nav { display: flex; align-items: center; }
.topbar nav a { color: var(--text); margin-left: 20px; font-size: .93rem; font-weight: 500; }
.topbar nav a:hover { color: var(--brand); text-decoration: none; }
.topbar .role-tag {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: .8rem;
  font-weight: 600;
  margin-left: 20px;
  border: 1px solid rgba(217,80,46,.15);
}
/* Logout as a proper ghost button rather than a bare text link, matching
   the more finished look of the rest of the topbar. */
.topbar nav a.logout-btn {
  margin-left: 16px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text);
}
.topbar nav a.logout-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* --- Dark mode toggle button (public pages only — see #theme-toggle in
   includes/public_header.php). Shows whichever icon matches the CURRENT
   theme (sun = currently light, moon = currently dark), like a status
   indicator; clicking either flips to the other. --- */
.theme-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0;
  transition: background .12s ease, border-color .12s ease;
}
.theme-toggle-btn:hover { background: var(--brand-light); border-color: var(--brand); }
.theme-toggle-icon-dark { display: none; }
[data-theme="dark"] .theme-toggle-icon-light { display: none; }
[data-theme="dark"] .theme-toggle-icon-dark { display: inline; }

/* --- Hamburger toggle (mobile off-canvas sidebar) --- */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
}
.hamburger-btn:hover { background: var(--bg); }
.hamburger-btn span { display: block; width: 20px; height: 2px; margin: 0 auto; background: var(--text); border-radius: 2px; }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,12,10,.5);
  z-index: 40;
}
.sidebar-backdrop.show { display: block; }

/* --- Layout shell (sidebar + content) --- */
.shell { display: flex; min-height: calc(100vh - 98px); }
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--footer-dark) 0%, var(--footer-dark-2) 100%);
  color: var(--sidebar-text);
  padding: 0 0 20px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.sidebar-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
}
.sidebar-user-name { color: #fff; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.sidebar-user-role { color: var(--sidebar-text-dim); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-plan-badge {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
}
.sidebar-plan-row { display:flex; align-items:center; gap:6px; margin-top:4px; }
.sidebar-plan-row .sidebar-plan-badge { margin-top:0; }
.sidebar a.sidebar-upgrade-btn {
  display:inline-flex; align-items:center; width:auto; margin:0; padding:2px 8px;
  border:1px solid rgba(255,255,255,.65); border-radius:var(--radius-pill);
  background:transparent; color:#fff; font-size:.66rem; font-weight:800; line-height:1.35;
}
.sidebar a.sidebar-upgrade-btn:hover { background:#fff; color:var(--footer-dark); transform:none; }
.sidebar a.nav-plan-locked { color:var(--sidebar-text-dim); }
.sidebar a.nav-plan-locked .nav-icon { opacity:.45; }
.nav-upgrade-badge { margin-left:auto; padding:2px 6px; border-radius:var(--radius-pill); background:var(--brand); color:#fff; font-size:.61rem; font-weight:800; }
.plan-unlock-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0 18px; padding:12px 14px; border-radius:var(--radius); background:var(--brand-light); color:var(--brand-dark); }
.plan-unlock-banner span { font-size:.84rem; }
.upgrade-reminder-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; padding:14px 16px; border:1px solid #f3b79f; border-left:5px solid var(--brand); border-radius:var(--radius); background:#fff4ee; color:var(--text); box-shadow:var(--shadow); }
.upgrade-reminder-banner div { display:flex; flex-direction:column; gap:3px; }
.upgrade-reminder-banner span { color:var(--muted); font-size:.88rem; }
[data-theme="dark"] .upgrade-reminder-banner { background:rgba(217,80,46,.13); border-color:rgba(217,80,46,.45); }
@media (max-width:600px) { .upgrade-reminder-banner { align-items:flex-start; flex-direction:column; } .upgrade-reminder-banner .btn { width:100%; text-align:center; } }
.sidebar a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--sidebar-text);
  padding: 10px 20px;
  margin: 2px 10px;
  border-radius: 8px;
  font-size: .93rem;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.sidebar a .nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.sidebar a:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
  text-decoration: none;
  transform: translateX(2px);
}
.sidebar a:hover .nav-icon { opacity: 1; }
.sidebar a.active {
  background: linear-gradient(90deg, var(--brand) 0%, rgba(217,80,46,.15) 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(217,80,46,.35);
}
.sidebar a.active .nav-icon { opacity: 1; color: #fff; }
.content { flex: 1; padding: 28px 30px; }

/* --- App chrome footer (admin/user sections) --- */
.app-footer {
  background: linear-gradient(90deg, var(--footer-dark) 0%, var(--footer-dark-2) 100%);
  color: var(--sidebar-text-dim);
  text-align: center;
  font-size: .8rem;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.app-footer a { color: var(--sidebar-text); }
.app-footer a:hover { color: #fff; }

/* --- Footer links row (Payment, Terms & Conditions, Privacy Policy,
   Contact us, Plans) — shown in every footer, see includes/footer_links.php --- */
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  margin-bottom: 6px; text-align: center;
}
.footer-links a { font-size: .78rem; text-decoration: underline; }
.site-footer .footer-links a { color: var(--brand); }
.site-footer .footer-links a:hover { color: var(--brand-dark); }

/* --- Cards / panels --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--brand); }
.stat-card .label { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* --- Forms --- */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .9rem; }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=number], input[type=search], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
  background: #fff;
  color: var(--text);
  appearance: none; -webkit-appearance: none;
}
/* Safari/Chrome draw their own "x" clear button and magnifier decoration
   inside a native type=search field — remove both everywhere so every
   search input's appearance is fully controlled by this stylesheet
   (menu-search-input below adds its own icon + clear button instead). */
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-results-button,
input[type=search]::-webkit-search-results-decoration { -webkit-appearance: none; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
textarea { min-height: 80px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 200px; }
.form-narrow { max-width: 420px; }
.form-medium { max-width: 680px; }

/* --- Searchable dropdowns: every <select> is progressively enhanced into
   a type-to-filter combobox by app.js (search "ss-" for the JS side).
   The real <select> (.ss-native) stays in the DOM, just hidden, so it's
   still what actually gets submitted. --- */
.ss-wrap { position: relative; }
.ss-native { display: none; }
.ss-wrap::after {
  content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .8rem; pointer-events: none;
}
.ss-input { padding-right: 30px; cursor: pointer; }
.ss-wrap.ss-open .ss-input { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.ss-wrap.ss-invalid .ss-input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ss-menu {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.ss-group-label {
  padding: 6px 11px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--muted);
}
.ss-option { padding: 8px 11px; font-size: .92rem; cursor: pointer; }
.ss-option:hover, .ss-option.ss-active { background: var(--brand-light); color: var(--brand-dark); }
.ss-option-disabled { color: var(--muted); cursor: default; }
.ss-option-disabled:hover { background: none; color: var(--muted); }
.help-text { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* --- Sticky save bar for long forms (e.g. Settings) --- */
.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--card);
  margin: 26px -22px -22px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--footer-dark); }
.btn-secondary:hover { background: #0d1c14; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #96281c; }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-link { background: none; color: var(--brand); padding: 0; border-radius: 0; font-weight: 500; }
.btn-link:hover { background: none; color: var(--brand-dark); }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #fbf9f6; }
.actions a, .actions button { margin-right: 6px; }

/* --- Sortable table headers --- */
table.sortable thead th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable thead th[data-sort]::after { content: '⇅'; opacity: .35; margin-left: 6px; font-size: .85em; }
table.sortable thead th[data-sort][data-dir="asc"]::after { content: '↑'; opacity: .9; color: var(--brand); }
table.sortable thead th[data-sort][data-dir="desc"]::after { content: '↓'; opacity: .9; color: var(--brand); }

/* --- Small icon action buttons (edit/delete) --- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  vertical-align: middle;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn-edit { background: #e8a13a; }
.icon-btn-edit:hover { background: #d38f2a; }
.icon-btn-delete { background: var(--danger); }
.icon-btn-delete:hover { background: #96281c; }
.sl-no { color: var(--muted); }
[aria-busy="true"] { opacity: .5; transition: opacity .1s ease; }

/* --- Admin-impersonation banner (shown on user pages) --- */
.impersonation-banner {
  background: #3d2f0b;
  color: #ffe6a3;
  font-size: .85rem;
  padding: 8px 0;
}
.impersonation-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.impersonation-banner a { color: #ffe6a3; text-decoration: underline; font-weight: 600; }
.impersonation-banner a:hover { color: #fff; }

/* --- Alerts / flash --- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bfe6cc; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c7c2; }

/* --- Badges --- */
.badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 600; }
.badge-veg { background: var(--success-bg); color: var(--success); }
.badge-nonveg { background: var(--danger-bg); color: var(--danger); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: #eee; color: #777; }
/* Icon + text badges (veg/non-veg) — the base .badge stays inline-block
   for every other single-text badge, this just adds icon alignment. */
.badge-icon { display: inline-flex; align-items: center; gap: 5px; }
/* A .badge that's actually a <button> (recipe On Menu/Off Menu toggle) —
   strip the browser's default button chrome so it reads as a plain badge
   that happens to be clickable, not a button that happens to say a word. */
.badge-toggle { border: none; cursor: pointer; font-family: inherit; line-height: 1.4; }
.badge-toggle:hover { filter: brightness(0.93); }

/* --- Standard veg/non-veg food type mark (green square+dot / brown
   square+triangle) — see food_type_icon() in includes/functions.php.
   Used in place of plain colored dots or text-only badges everywhere. --- */
.food-type-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* --- Landing page --- */
.hero { text-align: center; padding: 90px 20px 60px; }
.hero .brand-mark { display: inline-flex; align-items: center; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 10px; }
.hero h1 .accent { color: var(--brand); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 30px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .actions a { min-width: 160px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto 60px; padding: 0 20px; }
.feature-grid .card { text-align: left; border-top: 3px solid var(--brand); }
.feature-grid .card:nth-child(2) { border-top-color: var(--green); }
.feature-grid .card:nth-child(3) { border-top-color: #2fa8a0; }

/* --- Ingredient rows in recipe form --- */
#ingredient-rows .ingredient-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.ingredient-row .col-name { flex: 3; }
.ingredient-row .col-qty { flex: 1; min-width: 90px; }
.ingredient-row .col-brand { flex: 1.5; }
.ingredient-row .col-removable { flex: 0 0 auto; text-align: center; }
.ingredient-row .col-removable label[title] { font-size: .78rem; white-space: nowrap; }
.ingredient-row .col-remove { flex: 0 0 auto; }

/* --- Nutrition result table --- */
.nutrition-table th, .nutrition-table td { text-align: center; }
.nutrition-table th:first-child, .nutrition-table td:first-child { text-align: left; }

/* --- Public site footer (landing page) --- */
footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 22px 0;
  background: var(--mint-bg);
  border-top: 4px solid var(--footer-dark);
}

/* --- Printable recipe "Calculation Report" --- */
.calc-report {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 20px;
}
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 14px;
  margin-bottom: 24px;
}
.report-logo { max-height: 64px; max-width: 160px; object-fit: contain; }
.report-title { margin: 0; font-size: 1.7rem; letter-spacing: .04em; text-transform: uppercase; }
.report-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; border: 1px solid #999; }
.report-table th, .report-table td { border: 1px solid #999; padding: 8px 12px; font-size: .92rem; vertical-align: top; }
.report-section-title { text-align: center; font-size: 1.05rem; background: var(--bg); }
.report-label { width: 220px; font-weight: 600; }
.report-value { color: var(--brand-dark); font-weight: 600; }
.report-calc-table th { background: var(--bg); font-size: .82rem; }
.report-basis { font-weight: 700; white-space: nowrap; }
.report-allergen { text-align: left; font-size: .85rem; }
.report-foodtype { text-align: center; }
.food-type-label { margin-top: 4px; font-size: .78rem; }
.report-notes { font-size: .85rem; color: var(--muted); }
.report-notes ul { margin: 6px 0 0; padding-left: 20px; }

/* --- Printable recipe menu --- */
.menu-letterhead { border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; }
.menu-letterhead h2 { text-transform: uppercase; margin: 0 0 4px; }
.menu-letterhead-brand { display: flex; align-items: center; gap: 14px; }
.menu-logo { max-height: 64px; max-width: 140px; object-fit: contain; }
.menu-title { text-align: center; letter-spacing: 3px; font-weight: 700; margin: 0 0 18px; color: var(--muted); }
.menu-table th, .menu-table td { text-align: center; }
.menu-table th:nth-child(1), .menu-table td:nth-child(1),
.menu-table th:nth-child(2), .menu-table td:nth-child(2) { text-align: left; }
.size { display: none; }
.size.psize { display: inline; }
.price-input {
  width: 70px; text-align: center; padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px;
}
/* Dishes switched off the public menu still show on-screen (dimmed) so
   the owner can manage/re-enable them, but never make it onto the
   printed menu — see the @media print rule below. */
.menu-row-disabled { opacity: .5; }

@media print {
  .topbar, .sidebar, .no-print { display: none !important; }
  .content { padding: 0; }
  .card { border: none; box-shadow: none; padding: 0; }
  .calc-report { border: none; box-shadow: none; padding: 0; }
  .menu-row-disabled { display: none !important; }

  /* Chrome/Edge/Firefox drop background colors on print by default —
     force them to render so the veg/non-veg dot, badges and section-title
     shading actually show up on the printed page/PDF. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}

@media (max-width: 900px) {
  /* Sidebar becomes an off-canvas drawer, toggled by the hamburger button
     in the topbar, instead of competing for horizontal space with content. */
  .hamburger-btn { display: flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 280px);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 6px 0 24px rgba(0,0,0,.25);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 20px; }
  .topbar .brand { font-size: 1.05rem; }
  .topbar .role-tag { display: none; }
  .brand-logo { height: 44px; width: 44px; margin-right: 9px; }
}

/* --- QR code page (business/qr_code.php) --- */
.qr-preview-wrap { display:flex; gap:26px; flex-wrap:wrap; align-items:flex-start; margin-top:14px; }
.qr-preview-wrap > div { flex:1; min-width:240px; }
.qr-preview-img { width:240px; height:240px; border:1px solid var(--border); border-radius:8px; padding:10px; background:#fff; flex-shrink:0; }
.qr-link-box { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.qr-link-box input { flex:1; min-width:220px; }

/* --- Printable table tent (business/qr_table_tent.php) --- */
.table-tent {
  max-width: 320px; margin: 0 auto; text-align: center; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 20px;
}
.table-tent-logo { max-height: 60px; max-width: 160px; object-fit: contain; margin-bottom: 6px; }
.table-tent-qr { width: 220px; height: 220px; margin: 14px auto; display: block; }
.table-tent-caption { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* --- Public customer-facing pages: QR scan form + public menu --- */
.public-body { background: var(--bg); }
.public-container { padding-top: 24px; padding-bottom: 40px; max-width: 760px; }

.scan-welcome { display: flex; justify-content: center; padding-top: 40px; }
.scan-card { max-width: 400px; width: 100%; text-align: center; }
.scan-card .scan-logo { max-height: 70px; max-width: 160px; object-fit: contain; margin-bottom: 8px; }
.scan-card form { text-align: left; margin-top: 14px; }

.menu-hero {
  text-align: center; padding: 26px 22px 24px; margin: 4px 0 20px;
  background: linear-gradient(180deg, var(--brand-light) 0%, #fff 100%);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-hero-logo {
  max-height: 68px; max-width: 168px; object-fit: contain; margin-bottom: 12px;
  background: #fff; padding: 8px; border-radius: 14px; box-shadow: 0 4px 14px rgba(20,18,12,.16);
}
.menu-hero h1 { margin-bottom: 6px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }

/* --- Promo banner carousel (business/banners.php) at the top of the
   public menu — auto-rotating track of full-width slides + tap-to-jump
   dots, JS-driven (app.js) via a translateX transform on .menu-banner-track. --- */
.menu-banner-carousel {
  margin: 4px 0 20px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border); position: relative;
}
.menu-banner-track { display: flex; transition: transform .45s ease; }
.menu-banner-slide { flex: 0 0 100%; min-width: 100%; line-height: 0; }
.menu-banner-slide img { width: 100%; height: auto; max-height: 220px; object-fit: cover; display: block; }
.menu-banner-dots {
  position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px;
}
.menu-banner-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.menu-banner-dot.active { background: #fff; width: 20px; border-radius: var(--radius-pill); }

/* --- Sticky nav: search box + veg/category pills all stick together as
   one block below the topbar while scrolling the menu (Zomato-style
   "scroll-spy" category nav) — see .menu-sticky-nav wrapping all three
   in menu/view.php + menu/raw.php, and the IntersectionObserver in
   app.js that auto-highlights the current category pill as the visitor
   scrolls past each section (only while the "All" category filter is
   active — a specific category filter hides the other sections, making
   scroll-spy moot until "All" is picked again). --- */
.menu-sticky-nav {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  margin: 0 -20px; padding: 10px 20px 6px;
}
/* Dish search — a soft filled pill (Swiggy/Zomato style) rather than a
   bordered white box: no visible border at rest, just a warm tinted
   fill (brand-light — the same tone already used for hover states
   elsewhere), so it reads clearly as "type here" against the page's
   plain --bg without needing a heavy border. A real SVG magnifier
   (.menu-search-icon) replaces the old emoji glyph for crisp rendering
   at any zoom/DPI, and a custom "x" clear button (.menu-search-clear,
   toggled by app.js) replaces the browser's own inconsistent native one
   — see the ::-webkit-search-* reset this input type now shares with
   every other input. */
.menu-search-wrap { position: relative; margin: 0 0 12px; }
.menu-search-input {
  padding: 12px 40px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; background: var(--brand-light);
  box-shadow: none; font-size: .92rem;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.menu-search-input::placeholder { color: var(--muted); }
.menu-search-input:focus {
  background: var(--card); border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.menu-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; z-index: 1;
}
.menu-search-input:focus ~ .menu-search-icon { color: var(--brand); }
.menu-search-clear {
  position: absolute; right: 38px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 24px; height: 24px; border-radius: 50%; border: none; padding: 0;
  background: var(--border); color: var(--text); opacity: .7;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .12s ease, opacity .12s ease;
}
.menu-search-clear:hover { background: var(--brand); color: #fff; opacity: 1; }
.menu-voice-search {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--brand-dark); cursor: pointer;
}
.menu-voice-search:hover { background: var(--card); }
.menu-voice-search.listening { color: #fff; background: #d93025; animation: voice-pulse 1s infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 6px rgba(217,48,37,.16); } }
/* Search suggestions dropdown — matching dishes with photo thumbnails,
   shown live as the visitor types (app.js). Positioned relative to
   .menu-search-wrap (its parent, given position:relative above), which
   in turn sits inside the sticky .menu-sticky-nav — the dropdown floats
   over the pill rows and menu sections beneath it. */
.menu-search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20,18,12,.18); max-height: 340px; overflow-y: auto;
}
.menu-search-suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border); text-align: left;
}
.menu-search-suggest-item:last-child { border-bottom: none; }
.menu-search-suggest-item:hover, .menu-search-suggest-item.suggest-active { background: var(--brand-light); }
.menu-search-suggest-photo {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: var(--brand-light); border: 1px solid var(--border);
}
.menu-search-suggest-info { flex: 1; min-width: 0; }
.menu-search-suggest-name { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-search-suggest-price { color: var(--brand-dark); font-weight: 700; font-size: .82rem; }
.menu-cat-pills, .menu-veg-pills, .menu-diet-pills { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 0; -webkit-overflow-scrolling: touch; }
.menu-allergen-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .8rem; font-weight: 700; color: var(--text-muted); }
.menu-allergen-filter select { flex: 1; min-width: 0; margin: 0; padding: 8px 10px; border-radius: var(--radius-pill); font: inherit; color: var(--text); background: var(--card); }
.menu-advanced-filters { margin: 2px 0 8px; border-top: 1px solid var(--border); padding-top: 7px; }
.menu-advanced-filters summary { cursor: pointer; color: var(--brand-dark); font-size: .82rem; font-weight: 800; }
.menu-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.menu-filter-grid label { color: var(--text-muted); font-size: .72rem; font-weight: 700; }
.menu-filter-grid input, .menu-filter-grid select { margin: 4px 0 0; padding: 8px 9px; font-size: .8rem; background: var(--card); }
.menu-goal-pills { display: flex; gap: 7px; overflow-x: auto; margin-top: 9px; padding-bottom: 3px; }
.menu-goal-pills .cat-pill { padding: 7px 12px; font-size: .76rem; }
@media (max-width: 700px) { .menu-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.menu-filter-status {
  min-height: 28px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; color: var(--text-muted); font-size: .8rem; font-weight: 700;
}
.menu-clear-filters {
  border: 0; padding: 4px 0; background: transparent; color: var(--brand-dark);
  font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.menu-clear-filters:hover { color: var(--brand); }
.menu-no-results {
  margin: 20px 0; padding: 28px 20px; border: 1px dashed var(--border);
  border-radius: var(--radius); background: var(--card); text-align: center;
}
.menu-no-results strong, .menu-no-results span { display: block; }
.menu-no-results strong { margin-bottom: 5px; font-size: 1rem; }
.menu-no-results span { margin-bottom: 14px; color: var(--text-muted); font-size: .88rem; }
.special-price-editor { min-width:260px; margin-top:6px; font-size:.78rem; }
.special-price-editor summary { color:var(--brand-dark); cursor:pointer; font-weight:700; }
.special-price-editor label { font-size:.72rem; margin-top:6px; }
.special-price-editor input { padding:6px; font-size:.76rem; }
.special-price-days { display:flex; flex-wrap:wrap; gap:5px 9px; margin-top:5px; }
.special-price-days label { display:flex; align-items:center; gap:3px; width:auto; margin:0; }
.special-price-days input { width:auto; margin:0; }
.menu-regular-price { color:var(--text-muted); font-size:.84em; font-weight:500; }
.dish-special-price { color:var(--brand-dark); }
.menu-combo-nutrition { display:flex; flex-wrap:wrap; gap:5px 9px; margin-top:5px; color:var(--text-muted); font-size:.74rem; font-weight:700; }
.plan-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:18px; }
.plan-card { padding:20px; border:1px solid var(--border); border-radius:var(--radius); background:var(--card); }
.plan-card-current { border:2px solid var(--brand); box-shadow:var(--shadow); }
.plan-card-unlocks { box-shadow:0 0 0 3px var(--brand-light), var(--shadow); }
.plan-unlocks-badge { margin-left:4px; background:var(--brand-light); color:var(--brand-dark); }
.plan-billing-prices { display:grid; gap:6px; margin:14px 0; }
.plan-billing-prices > div { display:flex; justify-content:space-between; gap:10px; padding:7px 9px; border-radius:8px; background:var(--bg); }
.plan-billing-prices span { color:var(--text-muted); font-size:.8rem; }
.plan-feature-list { padding:0; list-style:none; font-size:.82rem; line-height:1.7; }
.plan-purchase-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
@media (max-width:800px) { .plan-card-grid { grid-template-columns:1fr; } }
.order-price-breakdown { margin-top:12px; padding:12px 0; border-top:1px dashed var(--border); border-bottom:1px dashed var(--border); }
.order-price-breakdown > div { display:flex; justify-content:space-between; gap:18px; padding:4px 0; font-size:.86rem; }
.order-price-saving { color:var(--green); }
.order-price-total-saving { margin-top:4px; color:var(--green); font-weight:800; }
.order-price-grand-total { margin-top:5px; padding-top:9px !important; border-top:1px solid var(--border); font-size:1rem !important; color:var(--text); }
.order-payment-detail { color:var(--text-muted); font-size:.78rem !important; }
.payment-state { padding:3px 8px; border-radius:var(--radius-pill); }
.payment-state-paid { color:#176b3a; background:#e8f7ee; }
.payment-state-due { color:#9a3a12; background:#fff0e8; }
.payment-state-refunded { color:#555; background:#eee; }
.cat-pill {
  flex-shrink: 0; border: 1.5px solid var(--border); background: #fff; color: var(--text);
  padding: 8px 18px; border-radius: var(--radius-pill); font-size: .85rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 1px 2px rgba(20,18,12,.05);
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.cat-pill.active, .cat-pill:hover {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 12px rgba(217,80,46,.35);
}
/* Distinguishes a scroll-spy highlight (just following scroll position,
   nothing is filtered) from an actual click-applied filter — same
   brand-colored fill, but no shadow "pop", so it reads as slightly
   quieter/passive rather than an explicit user action. */
.cat-pill.spy-active:not(.active) {
  background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none;
}

/* --- Category tiles: "Our Menu" browse row, restyled from the plain
   text pills above into rounded colour-swatch icon tiles (à la Burger
   King's app home screen) — same .cat-pill buttons and data-cat wiring
   underneath (app.js filtering/scroll-spy is untouched), just a very
   different look for this one row via the .menu-cat-tiles override. --- */
.menu-cat-tiles-title {
  margin: 4px 0 8px; font-size: 1.02rem; font-weight: 800; color: var(--text);
}
.menu-cat-tiles { gap: 14px; padding-bottom: 10px; }
.menu-cat-tiles.menu-cat-pills { padding-bottom: 10px; }
.menu-cat-tiles .cat-pill {
  flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px; width: 72px; padding: 0; border: none; background: transparent;
  box-shadow: none; border-radius: 0;
}
.menu-cat-tiles .cat-pill:hover { background: transparent; color: var(--text); box-shadow: none; }
.menu-cat-tile-icon {
  width: 62px; height: 62px; border-radius: 20px; font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); border: 2px solid transparent;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.menu-cat-tile-label {
  font-size: .74rem; font-weight: 700; color: var(--text); text-align: center;
  line-height: 1.2; max-width: 76px; white-space: normal;
}
/* A small rotating pastel palette so the row doesn't look like one flat
   colour repeated — purely decorative, same brand family throughout. */
.menu-cat-tile-icon-0 { background: var(--brand-light); }
.menu-cat-tile-icon-1 { background: #fdeae2; }
.menu-cat-tile-icon-2 { background: #fdf1d9; }
.menu-cat-tile-icon-3 { background: #e6f4ea; }
.menu-cat-tile-icon-4 { background: #e3f1f7; }
.menu-cat-tile-icon-5 { background: #f2e8f7; }
[data-theme="dark"] .menu-cat-tile-icon-0 { background: rgba(216,122,40,.22); }
[data-theme="dark"] .menu-cat-tile-icon-1 { background: rgba(216,122,40,.16); }
[data-theme="dark"] .menu-cat-tile-icon-2 { background: rgba(216,165,40,.16); }
[data-theme="dark"] .menu-cat-tile-icon-3 { background: rgba(60,150,90,.18); }
[data-theme="dark"] .menu-cat-tile-icon-4 { background: rgba(60,130,170,.18); }
[data-theme="dark"] .menu-cat-tile-icon-5 { background: rgba(150,90,180,.18); }
.menu-cat-tiles .cat-pill.active .menu-cat-tile-icon,
.menu-cat-tiles .cat-pill:hover .menu-cat-tile-icon {
  border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(217,80,46,.28);
}
.menu-cat-tiles .cat-pill.active .menu-cat-tile-label { color: var(--brand-dark); }
.menu-cat-tiles .cat-pill.spy-active:not(.active) .menu-cat-tile-icon { border-color: var(--brand); }

/* --- Two-pane menu (Burger King app style): a persistent left category
   rail alongside a right-hand pane showing only the active category's
   dishes (menu/view.php) — see the .menu-cat-rail/.menu-dish-pane markup
   and the JS in app.js (unchanged filtering logic, just no more "All"
   pill). The category tiles run as one horizontal scrolling strip across
   the top, pinned via position:sticky so they stay reachable while the
   dish list scrolls underneath at full page width. (They were briefly a
   narrow vertical rail down the left; that cost the dishes ~78px of width
   on phones, which is where nearly all of this traffic is.) --- */
.menu-two-pane { display: block; margin-top: 4px; }
.menu-cat-rail {
  width: auto; position: sticky; top: 0; z-index: 3;
  background: var(--bg); padding: 6px 0 0; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  max-height: none; overflow: visible;
}
.menu-cat-rail .menu-cat-tiles-title { font-size: 1.02rem; text-align: left; margin: 0 0 8px; }
.menu-cat-rail .menu-cat-pills.menu-cat-tiles {
  flex-direction: row; overflow-x: auto; overflow-y: hidden;
  gap: 14px; padding-bottom: 10px; scrollbar-width: thin;
}
.menu-cat-rail .menu-cat-pills.menu-cat-tiles::-webkit-scrollbar { height: 5px; }
.menu-cat-rail .menu-cat-pills.menu-cat-tiles::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-pill); }
.menu-cat-rail .menu-cat-pills.menu-cat-tiles .cat-pill { flex: 0 0 auto; width: 72px; }
.menu-dish-pane { width: 100%; min-width: 0; }
/* Server-rendered fallback for "only the first category shows before JS
   runs" — app.js's applyMenuFilters() takes over with inline styles
   (which always win over this class) the moment it runs, so this just
   avoids a flash of every category stacked at once on first paint. */
.menu-section.menu-section-hidden-init { display: none; }

/* --- "Recommended for you" horizontal strip — this customer's own most-
   ordered dishes here (menu/view.php only; skipped entirely when there's
   no order history to base it on). Reuses .menu-item-card/.menu-add-slot
   so the existing add-to-cart/stepper/tap-to-expand JS just works on
   these cards too — .menu-reco-card only restyles the layout. --- */
.menu-reco-strip { margin: 4px 0 26px; }
.menu-reco-title { font-size: .92rem; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.menu-reco-track {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.menu-item-card.menu-reco-card {
  flex: 0 0 auto; width: 132px; display: flex; flex-direction: column; align-items: stretch;
  padding: 0; border: none; scroll-snap-align: start; cursor: pointer;
}
.menu-item-card.menu-reco-card:hover { background: transparent; }
.menu-reco-photo {
  /* No overflow:hidden here (unlike most photo boxes) — the Add button
     (.menu-add-slot) is a child of this element and is deliberately
     positioned half outside its bottom edge (bottom:0 + translateY(50%),
     see .menu-add-slot below) so it straddles the photo like on a full
     menu card. overflow:hidden would clip that bottom half off, leaving
     only a sliver of the button visible. Corners are rounded on the img
     itself instead, so the photo still looks clipped without cutting off
     the button. */
  position: relative; width: 132px; height: 100px; border-radius: 12px;
  background: var(--brand-light); box-shadow: var(--shadow); border: 1px solid var(--border);
}
.menu-reco-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.menu-reco-photo .menu-add-slot { transform: translate(-50%, 50%) scale(.86); }
.menu-reco-info { padding: 10px 2px 0; }
.menu-reco-info h4 { margin: 0; font-size: .84rem; font-weight: 700; line-height: 1.3; display: flex; align-items: center; gap: 5px; }
.menu-reco-price { color: var(--brand-dark); font-weight: 800; font-size: .82rem; margin-top: 4px; }

.menu-section { margin-bottom: 30px; }
.menu-section-title {
  font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text); font-weight: 800;
  border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 4px;
}
.menu-section-count { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .82em; }

/* --- Menu items: Zomato-style list rows — dish info on the left, a
   square photo on the right with a white "ADD" pill straddling its
   bottom edge, separated by hairline dividers instead of boxed cards. --- */
.menu-card-grid { display: flex; flex-direction: column; }
.menu-item-card {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  padding: 20px 2px 32px; border-bottom: 1px solid var(--border);
  transition: background .12s ease;
}
.menu-item-card:last-child { border-bottom: none; }
.menu-item-card:hover { box-shadow: none; transform: none; background: var(--brand-light); }

/* WhatsApp-share icon — sits as a small badge on the top-right corner of
   the dish photo itself (anchored to .menu-item-photo-wrap, which is
   position:relative), not floating over the card's text column. Solid
   WhatsApp-green circle with a white ring so it reads clearly against any
   photo or the placeholder background. */
.menu-share-btn {
  position: absolute; top: -7px; right: -7px; z-index: 3;
  width: 27px; height: 27px; border-radius: 50%; border: 2px solid #fff;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
.menu-share-btn:hover { background: #1ebc59; }
/* Brief highlight after jumping to a dish from a search suggestion or
   "Order Again" — works on both the photo-card row (.menu-item-card)
   and the plain table row (menu/raw.php's <tr>). */
.menu-item-flash { animation: menu-item-flash-anim 1.2s ease; }
@keyframes menu-item-flash-anim {
  0%, 100% { background: transparent; }
  25% { background: var(--brand-light); }
}
.menu-item-info { flex: 1; min-width: 0; padding-top: 2px; }
.menu-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-item-top h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }

/* Small pill badges on a dish's title row — bestseller today, room for
   "Chef's Special" / "New" once those get their own recipe columns. */
.dish-badge {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  padding: 2px 7px; border-radius: var(--radius-pill); white-space: nowrap;
}
.dish-badge-bestseller { background: #fff3cd; color: #8a6d1a; }
[data-theme="dark"] .dish-badge-bestseller { background: rgba(255,193,7,.18); color: #ffd873; }
.dish-badge-special { background: var(--brand-light); color: var(--brand-dark); }
[data-theme="dark"] .dish-badge-special { background: rgba(216,122,40,.22); }
.dish-badge-new { background: var(--success-bg); color: var(--success); }
.dish-badge-sold-out { background: var(--danger-bg); color: var(--danger); }

/* "Sold out today" (business/menu.php toggle) — the dish stays visible so
   customers know it exists, just greyed out and un-orderable for today. */
.menu-item-sold-out .menu-item-photo img { opacity: .5; filter: grayscale(.4); }
.menu-item-sold-out .menu-item-price,
.menu-item-sold-out .menu-item-info h3 { opacity: .6; }
.menu-sold-out-pill {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); z-index: 2;
  background: var(--muted); color: #fff; border-radius: 10px; font-weight: 800; font-size: .72rem;
  letter-spacing: .04em; text-transform: uppercase; padding: 9px 10px; box-shadow: 0 4px 10px rgba(20,18,12,.2);
}

/* Short one-line marketing blurb (recipes.short_description, optional —
   business/recipe_add.php + recipe_edit.php) under the dish name. */
.menu-item-desc {
  margin: 2px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Small dietary-tag chips (Vegan/Jain/Gluten-Free/etc.) under the price. */
.menu-item-dietary-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.dish-tag {
  font-size: .68rem; font-weight: 600; color: var(--muted); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px 8px;
}
.menu-item-price {
  color: var(--brand-dark); font-weight: 800; font-size: .98rem; margin: 6px 0;
  display: flex; align-items: baseline; gap: 8px;
}
.menu-item-tax-note { color: var(--muted); font-weight: 500; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }
.menu-item-ingredients { margin: 0 0 6px; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.menu-item-ingredients-more { color: var(--brand); font-weight: 600; cursor: pointer; }
.menu-item-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; }
.menu-allergens { margin-top: 8px; font-size: .82rem; }
.menu-allergens summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.menu-allergens p { margin: 6px 0 0; color: var(--muted); }

.menu-item-photo-wrap { position: relative; flex: 0 0 auto; width: 112px; }
.menu-item-photo {
  width: 112px; height: 112px; border-radius: 14px; overflow: hidden;
  background: var(--brand-light); box-shadow: var(--shadow); border: 1px solid var(--border);
}
.menu-item-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Diagonal "NEW" ribbon across the photo's top-left corner (Burger King
   app style) — purely decorative, alongside (not instead of) the existing
   text .dish-badge-new pill in the title row, which stays the accessible/
   readable signal. aria-hidden since the badge above already announces it. */
.menu-item-ribbon {
  position: absolute; top: 10px; left: -30px; z-index: 2; width: 110px;
  transform: rotate(-45deg); text-align: center; padding: 3px 0;
  background: var(--success); color: #fff; font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 2px 6px rgba(20,18,12,.2);
}
/* Small veg/non-veg indicator square, top-right — stacked just under the
   WhatsApp share button (which sits further out, at top:-7px;right:-7px)
   so the two never touch. Deliberately kept out of the bottom of the
   photo entirely: the "ADD" button (.menu-add-slot) straddles that edge
   via translateY(50%) and the protein badge already lives down there
   (see .menu-item-protein-badge below) — stacking a third element in
   that same narrow strip doesn't fit on a ~100px-wide photo. */
.menu-item-veg-dot {
  position: absolute; top: 24px; right: 8px; z-index: 2;
  width: 15px; height: 15px; border-radius: 4px; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(20,18,12,.25);
}
.menu-item-veg-dot-veg { background: var(--success); }
.menu-item-veg-dot-nonveg { background: var(--danger); }
/* Protein-per-serving overlay pill, bottom-left of the photo — only shown
   when the recipe's ingredients actually carry a protein value. Sits at
   bottom:24px rather than flush with the edge — the "ADD" button
   (.menu-add-slot) straddles the photo's bottom edge via translateY(50%),
   so anything closer than ~17px of true bottom ends up underneath it.
   max-width now leaves 38px clear on the right (rather than the old 16px)
   so it stops short of .menu-heart-btn, which shares this bottom strip on
   the opposite corner — text-overflow handles anything still too long. */
.menu-item-protein-badge {
  position: absolute; left: 8px; bottom: 24px; z-index: 2; max-width: calc(100% - 46px);
  background: rgba(20,18,12,.72); color: #fff; font-size: .62rem; font-weight: 700;
  padding: 3px 7px; border-radius: var(--radius-pill); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Favorite (heart) toggle — bottom-right of the photo, mirroring the
   protein badge's bottom:24px offset (same "clear of the ADD button"
   reasoning) on the opposite corner, which is otherwise unused. Outline
   heart at rest; filled red + a brief pop animation once favorited (see
   toggleFavorite() in app.js, which POSTs to menu/favorites.php). */
.menu-heart-btn {
  position: absolute; right: 8px; bottom: 24px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,.92); color: var(--muted); box-shadow: 0 1px 4px rgba(20,18,12,.25);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.menu-heart-btn:hover { color: var(--danger); }
.menu-heart-btn.favorited { color: var(--danger); }
.menu-heart-btn.favorited-pop { animation: menu-heart-pop .35s ease; }
@keyframes menu-heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
/* A white pill "ADD" button straddling the bottom edge of the photo —
   the classic Zomato/Swiggy menu-row treatment. Flashes green with a
   checkmark on add (.added, toggled briefly by app.js). Once a dish is
   in the cart, app.js swaps this slot's contents for a −/qty/+ stepper
   (.menu-card-stepper) so quantity can be adjusted right on the card,
   with no need to open the cart drawer. */
.menu-add-slot { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); z-index: 2; }
.menu-add-btn {
  position: relative;
  background: #fff; border: 1.5px solid var(--brand); border-radius: 10px;
  color: var(--brand); font-weight: 800; font-size: .74rem; letter-spacing: .04em;
  padding: 9px 6px; width: 86px; text-align: center; text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(20,18,12,.2); cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.menu-add-btn:hover, .menu-add-btn:focus-visible { background: var(--brand-light); }
.menu-add-btn-icon { display: none; }
.menu-add-btn-label { max-width: none; opacity: 1; }
.menu-add-btn.added { background: var(--green); border-color: var(--green); color: #fff; }
.menu-add-btn.added .menu-add-btn-label { visibility: hidden; }
.menu-add-btn.added::after {
  content: '✓ Added'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}

.menu-card-stepper {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1.5px solid var(--brand);
  border-radius: 10px; padding: 7px 10px; box-shadow: 0 4px 10px rgba(20,18,12,.2);
}
.menu-card-qty-btn {
  width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--brand); color: #fff;
  font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .82rem;
}
.menu-card-qty-btn:hover { background: var(--brand-dark); }
.menu-card-qty { font-weight: 800; font-size: .84rem; color: var(--text); min-width: 12px; text-align: center; }
[data-theme="dark"] .menu-card-stepper { background: var(--card); }

/* --- Floating "back to top" button (public menu pages) — appears once
   the visitor has scrolled past the hero (toggled via app.js), bottom-
   right so it never overlaps the centered cart bar / tab bar. --- */
.back-to-top-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--brand); box-shadow: 0 4px 14px rgba(20,18,12,.22);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease;
}
.back-to-top-btn.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top-btn:hover { background: var(--brand-light); }
/* Nudge above the cart bar / tab bar so it never sits on top of them on
   pages where those are also visible near the bottom of the screen. */
body:has(#cart-bar:not([hidden])) .back-to-top-btn { bottom: 78px; }

/* --- Sticky cart bar + drawer (public menu ordering) --- */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 14px; background: var(--footer-dark); color: #fff;
  border: none; border-radius: var(--radius-pill); padding: 12px 20px; box-shadow: 0 6px 20px rgba(20,18,12,.35);
  cursor: pointer; font-size: .9rem; font-weight: 600; max-width: calc(100% - 32px);
}
.cart-bar-action { color: var(--brand-gold); }
#cart-bar-total { color: #fff; }

.cart-drawer-backdrop { position: fixed; inset: 0; background: rgba(15,12,10,.5); z-index: 70; }
.cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(100%, 380px); background: var(--card);
  z-index: 75; display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(0,0,0,.2);
}
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.cart-drawer-header h3 { margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 18px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.cart-item-photo {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: 0 0 auto;
  background: var(--brand-light); border: 1px solid var(--border);
}
.cart-item-name { flex: 1; font-weight: 600; font-size: .9rem; }
.cart-item-price { color: var(--muted); font-size: .82rem; }
.cart-item-removed { display: inline-block; color: var(--brand-dark); font-size: .78rem; font-weight: 600; }
.cart-item-kcal { color: var(--muted); font-size: .78rem; font-weight: 400; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  cursor: pointer; font-weight: 700; line-height: 1; color: var(--text);
}
.cart-qty-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.cart-item-total { width: 64px; text-align: right; font-weight: 600; font-size: .88rem; }
.cart-item-save-link {
  background: none; border: none; padding: 0; margin-top: 2px; color: var(--brand); font-size: .76rem;
  font-weight: 600; cursor: pointer; text-decoration: underline;
}

/* --- "Save for later" (cart drawer) — items moved out of a past cart,
   tied to the customer's mobile number so they're still here on a future
   visit. See menu/saved_items.php. --- */
.saved-items-section { padding: 4px 18px 12px; border-top: 1px dashed var(--border); }
.saved-items-section h4 { margin: 10px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.saved-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.saved-item-photo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--brand-light); border: 1px solid var(--border); }
.saved-item-name { flex: 1; font-weight: 600; font-size: .86rem; }
.saved-item-price { color: var(--muted); font-weight: 500; font-size: .78rem; }
.saved-item-remove { background: none; border: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 4px; }
.cart-drawer-notes { padding: 0 18px 12px; }
.cart-drawer-notes label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.cart-drawer-notes textarea {
  width: 100%; resize: vertical; font-family: inherit; font-size: .85rem;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text);
}
.cart-promo { padding: 0 18px 12px; }
.cart-promo label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.cart-promo-row { display: flex; gap: 8px; }
.cart-promo-row input {
  flex: 1; font-family: inherit; font-size: .85rem; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text);
}
.cart-promo-message { font-size: .8rem; margin: 6px 0 0; }
.cart-promo-message-success { color: var(--success); }
.cart-promo-message-error { color: var(--danger); }

/* --- Loyalty reward redeem box (cart drawer) — mirrors .cart-promo's
   spacing/typography so the two read as a matched pair, just with a
   brand-tinted panel instead of a plain input row since there's nothing to
   type, only a balance to show and a toggle to press. See
   redeem_loyalty_reward() in functions.php / cartLoyaltyBox in app.js. --- */
.cart-loyalty {
  margin: 0 18px 12px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--brand-light); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.cart-loyalty-text { margin: 0; font-size: .84rem; color: var(--brand-dark); flex: 1 1 180px; }
.cart-loyalty .cart-loyalty-applied { background: var(--success); border-color: var(--success); color: #fff; }

/* --- "Add Extras" upsell strip (cart drawer) — horizontal scroll of
   is_addon-flagged dishes (business/recipe_add.php & recipe_edit.php),
   rendered client-side from #cart-addons-strip's data-addons JSON. --- */
.cart-addons-strip { padding: 0 18px 12px; border-top: 1px dashed var(--border); }
.cart-addons-strip h4 { margin: 10px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.cart-addons-track { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.cart-addon-chip {
  flex: 0 0 auto; width: 108px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px; background: var(--card);
}
.cart-addon-photo { width: 100%; height: 60px; object-fit: cover; border-radius: 6px; background: var(--brand-light); margin-bottom: 6px; }
.cart-addon-name { display: block; font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-addon-price { display: block; font-size: .78rem; color: var(--muted); margin: 2px 0 6px; }
.cart-addon-add-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--brand); background: var(--brand-light);
  color: var(--brand-dark); font-weight: 700; cursor: pointer; line-height: 1;
}
.cart-addon-add-btn:hover { background: var(--brand); color: #fff; }

.cart-drawer-footer { padding: 16px 18px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; font-size: 1.05rem; }
.cart-subtotal-row, .cart-discount-row, .cart-loyalty-row { font-weight: 500; font-size: .88rem; color: var(--muted); }
.cart-discount-row, .cart-loyalty-row { color: var(--success); }
.cart-discount-row #cart-discount-code { font-weight: 400; font-size: .82em; }
.cart-empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* --- Dish detail modal: tap anywhere on a menu card (outside the add
   button/stepper) to see a bigger photo plus the same ingredients/kcal/
   allergen info already on the card, with its own Add to Cart button. --- */
.dish-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 80;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.28);
  max-width: 380px; width: calc(100% - 40px); max-height: calc(100% - 60px); overflow-y: auto;
}
.dish-modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92); color: var(--text); font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.dish-modal-photo { width: 100%; height: 200px; background: var(--brand-light); }
.dish-modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-modal-body { padding: 18px 20px 22px; }
.dish-modal-body h3 { margin: 0 0 4px; font-size: 1.12rem; }
.dish-modal-body .menu-item-ingredients { font-size: .84rem; }
.dish-modal-allergens { font-size: .8rem; color: var(--danger); margin: 8px 0 0; }
.dish-modal-allergens[hidden] { display: none; }

/* --- "No X" ingredient-removal toggles inside the dish detail modal —
   only rendered when the dish has any recipe_ingredients.is_removable
   ingredients (see openDishModal() in app.js). Selected chips are sent as
   this cart line's removed_ingredients at checkout (menu/order.php). --- */
.dish-modal-removables { margin-top: 14px; }
.dish-modal-removables[hidden] { display: none; }
.dish-modal-removables-label { margin: 0 0 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.dish-modal-removables-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dish-modal-removable-chip {
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  padding: 6px 12px; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 600; cursor: pointer;
}
.dish-modal-removable-chip.selected { background: var(--brand); border-color: var(--brand); color: #fff; }

.order-confirm {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 80;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.28);
  padding: 34px 28px; text-align: center; max-width: 320px; width: calc(100% - 40px);
}
.order-confirm-check {
  width: 60px; height: 60px; border-radius: 50%; background: var(--success-bg); color: var(--success);
  font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.order-confirm-id { font-weight: 700; color: var(--brand-dark); margin: 2px 0 0; }
.order-confirm-gateway-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.order-confirm-gateway-btn { width: 100%; }

/* --- Post-order feedback popup (menu/orders.php) --- */
.feedback-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 80;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.28);
  padding: 30px 26px; text-align: center; max-width: 340px; width: calc(100% - 40px);
}
.feedback-modal h3 { margin: 0 0 4px; }
.star-rating { display: flex; justify-content: center; gap: 6px; margin: 18px 0 4px; }
.star-btn {
  background: none; border: none; cursor: pointer; font-size: 2rem; line-height: 1;
  color: #ddd; padding: 2px; transition: color .1s ease;
}
.star-btn.active { color: #f5b301; }
.star-rating-label { min-height: 1.2em; font-weight: 600; color: var(--brand-dark); margin: 0 0 14px; }
.feedback-modal textarea {
  width: 100%; resize: vertical; min-height: 60px; font-family: inherit;
}
.feedback-modal-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }

/* --- Trust links (uploaded compliance documents, shown below the firm
   name/logo — see business_document_types() and business/documents.php).
   Styled as a prominent "verified" badge strip (shield icon + green-tinted
   pill row) rather than plain underlined text, so it reads as a trust
   signal at a glance instead of blending into ordinary body copy. --- */
.trust-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  max-width: 560px; margin: 0 auto 16px; padding: 10px 16px; text-align: center;
  background: var(--success-bg); border: 1px solid rgba(30,126,66,.25); border-radius: var(--radius-pill);
}
.trust-links-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 800; color: var(--success); text-transform: uppercase; letter-spacing: .03em;
}
.trust-links a {
  font-size: .78rem; font-weight: 600; color: var(--success);
  background: var(--card); border: 1px solid rgba(30,126,66,.3); border-radius: var(--radius-pill);
  padding: 3px 11px; text-decoration: none;
}
.trust-links a:hover { background: var(--success); color: #fff; text-decoration: none; }

/* --- Menu / Order / My Orders tab bar (public menu/scan flow) --- */
.public-tabs { display: flex; gap: 8px; max-width: 480px; margin: 16px auto 0; padding: 0 14px; }
.public-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 8px; border-radius: var(--radius-pill); background: #f1efec;
  color: var(--muted); font-weight: 700; font-size: .82rem; text-decoration: none;
  white-space: nowrap;
}
.public-tab:hover { text-decoration: none; background: #e8e5e0; }
.public-tab.active { background: var(--brand); color: #fff; }
.public-tab.active:hover { background: var(--brand-dark); }
.public-tab .nav-badge { margin-left: 0; }

/* --- "Call Waiter" / "Request Bill" (dine-in only) --- */
.service-request-bar { display: flex; gap: 8px; max-width: 480px; margin: 8px auto 0; padding: 0 14px; }
.service-request-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 8px; border-radius: var(--radius-pill); background: var(--card);
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .78rem;
  cursor: pointer; white-space: nowrap;
}
.service-request-btn:hover { background: var(--brand-light); border-color: var(--brand); }
.service-request-btn:disabled { opacity: .7; cursor: default; }

/* --- Read-only "Menu" tab (menu/raw.php) — a plain table per category,
   matching the simple look of the business owner's own "My Menu" table
   instead of the photo-card style used on the "Order" tab. --- */
.raw-menu-table { margin-bottom: 6px; }
.raw-menu-table th, .raw-menu-table td { text-align: center; }
.raw-menu-table th:first-child, .raw-menu-table td:first-child,
.raw-menu-table th:nth-child(3), .raw-menu-table td:nth-child(3) { text-align: left; }
.raw-menu-table td:last-child { text-align: right; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.raw-menu-table td { font-size: .85rem; }
.raw-menu-dish-name { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--text); }
.raw-menu-table .menu-item-ingredients { margin: 3px 0 0; }

/* --- Order card highlight (just-placed order on menu/orders.php) --- */
.order-card-highlight { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }

/* --- Order id tag (orders page, customers page) --- */
.order-id-tag {
  display: inline-block; color: var(--muted); font-weight: 700; font-size: .8rem;
  letter-spacing: .02em; margin-right: 8px;
}

/* --- Per-customer order details (business/customers.php) --- */
.customer-orders-summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .85rem; }
.customer-orders-summary::-webkit-details-marker { color: var(--brand); }
.customer-orders-detail { margin-top: 8px; }
.customer-orders-detail .orders-list { gap: 10px; }
.customer-orders-none { color: var(--muted); font-size: .85rem; }

/* --- Sidebar notification badge (Orders link) --- */
.nav-badge {
  margin-left: auto; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700;
  border-radius: var(--radius-pill); padding: 1px 8px; line-height: 1.5;
}
.sidebar a.active .nav-badge { background: #fff; color: var(--brand-dark); }

/* --- Tables & Rooms page (business/tables.php) --- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.table-item-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.table-item-card.table-item-inactive { opacity: .55; }
.table-item-qr { width: 140px; height: 140px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; }
.table-rename-form { display: flex; gap: 6px; align-items: center; width: 100%; }
.table-name-input { text-align: center; font-weight: 600; padding: 6px 8px; }
.table-item-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* --- Table/room indicator tags (scan form, public menu, orders page) --- */
.scan-table-tag, .menu-table-tag, .order-table-tag {
  display: inline-block; background: var(--brand-light); color: var(--brand-dark);
  border-radius: var(--radius-pill); padding: 3px 12px; font-size: .8rem; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
}
.scan-table-tag, .menu-table-tag { margin: 4px 0 0; }
.order-table-tag { margin-bottom: 4px; }

.regular-badge {
  display: inline-block; margin: 8px 0 0; padding: 5px 14px; border-radius: var(--radius-pill);
  background: var(--success-bg); color: var(--success); font-size: .82rem; font-weight: 700;
}

/* --- Loyalty points/reward mentions: hero line, order confirmation,
   receipt and order-tracking discount notes (see loyalty_reward_summary()
   in functions.php). Just a color/weight accent on the existing
   .help-text / .order-discount-note it's paired with, not a standalone
   component. --- */
.loyalty-badge { color: var(--brand-dark); font-weight: 600; }

/* --- Call Waiter / Request Bill alert banner (business/orders.php) --- */
.service-requests-banner { max-width: 900px; margin: 0 auto 16px; display: flex; flex-direction: column; gap: 8px; }
.service-request-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--danger-bg); border: 1px solid rgba(178,58,58,.25); border-radius: var(--radius);
  padding: 10px 16px; animation: service-request-pulse 1.8s ease-in-out infinite;
}
.service-request-bill { background: var(--brand-light); border-color: rgba(216,122,40,.3); }
.service-request-text { font-size: .92rem; color: var(--text); }
@keyframes service-request-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178,58,58,.18); }
  50% { box-shadow: 0 0 0 6px rgba(178,58,58,0); }
}

/* --- Restaurant orders page (business/orders.php) --- */
.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.order-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.order-item-list { list-style: none; margin: 0; padding: 0; }
.order-item-list li { display: flex; justify-content: space-between; font-size: .88rem; padding: 4px 0; color: var(--text); }
.order-item-kcal { display: block; font-size: .76rem; margin-top: 1px; }
.order-notes {
  font-size: .82rem; color: var(--text); background: var(--brand-light); border-radius: 8px;
  padding: 7px 10px; margin: 8px 0 0;
}
.order-discount-note {
  font-size: .82rem; color: var(--success); background: var(--success-bg); border-radius: 8px;
  padding: 7px 10px; margin: 8px 0 0; font-weight: 600;
}
.order-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.order-card-total { font-weight: 700; }
/* "Order Again" (menu/orders.php only) — re-adds a past order's items to
   a fresh cart on the ordering tab; see app.js's reorder handling. */
.btn-order-again { width: 100%; margin-top: 10px; font-size: .84rem; padding: 9px 12px; }
.order-card-actions { margin-top: 10px; display: flex; gap: 8px; }
.order-status-badge-new { background: var(--brand-light); color: var(--brand-dark); }
.order-status-badge-accepted { background: #e0e7ff; color: #3730a3; }
.order-status-badge-preparing { background: #fff3cd; color: #8a6d1a; }
.order-status-badge-serving { background: #dbeafe; color: #1d4ed8; }
.order-status-badge-served { background: var(--success-bg); color: var(--success); }
/* Takeaway-only stages (see order_status_stages() in functions.php) */
.order-status-badge-packing { background: #ffe8cc; color: #95530a; }
.order-status-badge-ready_to_deliver { background: #dbeafe; color: #1d4ed8; }
.order-status-badge-delivered { background: var(--success-bg); color: var(--success); }
.order-status-badge-cancelled { background: #eee; color: #777; }
.order-card.order-status-cancelled { opacity: .6; }
/* The final stage of either pipeline (served/delivered) — a clear green
   "this order is closed" signal, distinct from the in-progress colors
   above and from the plain badge-final marker used on the customer
   progress bar's last step (see .order-progress-step.done below). */
.order-status-badge-final { box-shadow: inset 0 0 0 1px var(--success); }

/* --- Kitchen Display screen (business/kitchen_display.php) — meant to be
   read from a few feet away on a screen sitting in the kitchen, so
   everything here is deliberately larger than the equivalent
   business/orders.php card: bigger type, bigger tap targets, one action
   per card, no secondary chrome. --- */
.kds-page { padding: 18px; }
.kds-empty { text-align: center; padding: 60px 20px; font-size: 1.3rem; color: var(--muted); }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kds-card {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  background: var(--card); display: flex; flex-direction: column; gap: 8px;
}
/* Age-based urgency — a plain amber/red border is readable at a glance
   from across a kitchen in a way a small badge or timer digit isn't. */
.kds-card.kds-warm { border-color: #e0a53a; }
.kds-card.kds-urgent { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(178,58,58,.15); }
.kds-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kds-order-id { font-size: 1.3rem; font-weight: 800; }
.kds-order-tag { font-weight: 700; color: var(--brand-dark); font-size: 1rem; }
.kds-order-age { font-size: .95rem; color: var(--muted); font-weight: 600; }
.kds-status-badge {
  align-self: flex-start; font-size: .85rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark);
}
.kds-item-list { list-style: none; margin: 4px 0; padding: 0; font-size: 1.1rem; }
.kds-item-list li { padding: 3px 0; }
.kds-item-qty { font-weight: 800; margin-right: 4px; }
.kds-notes { font-size: .95rem; background: var(--brand-light); border-radius: 8px; padding: 8px 10px; margin: 4px 0 0; }
.kds-advance-form { margin-top: 8px; }
.kds-advance-btn { width: 100%; font-size: 1.15rem; padding: 16px 12px; font-weight: 800; }

/* --- Sales analytics dashboard (business/analytics.php) — plain CSS
   bars, no JS charting library or external CDN (same offline-first
   approach the app already takes for QR codes). --- */
.range-toggle { display: inline-flex; gap: 6px; }
.analytics-bars {
  display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 22px;
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.analytics-bar-col { flex: 1; min-width: 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.analytics-bar { width: 100%; max-width: 34px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.analytics-bar-hour { background: var(--brand-light); border: 1px solid var(--brand); }
.analytics-bar-hour.analytics-bar-peak { background: var(--brand); }
.analytics-bars-hours { height: 130px; padding-top: 10px; }
.analytics-bar-value { font-size: .68rem; color: var(--muted); white-space: nowrap; margin-bottom: 2px; }
.analytics-bar-label { font-size: .68rem; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.analytics-hbars { display: flex; flex-direction: column; gap: 12px; }
.analytics-hbar-row { display: flex; flex-direction: column; gap: 3px; }
.analytics-hbar-label { font-weight: 600; font-size: .88rem; }
.analytics-hbar-track { background: var(--brand-light); border-radius: 6px; height: 10px; overflow: hidden; }
.analytics-hbar { height: 100%; background: var(--brand); border-radius: 6px; }
.analytics-hbar-value { font-size: .78rem; color: var(--muted); }

/* --- Order progress tracker (customer-facing menu/order_status.php) --- */
.order-progress { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 22px; }
.order-progress-step { flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--muted); font-weight: 600; }
.order-progress-step::before {
  content: ''; display: block; width: 26px; height: 26px; border-radius: 50%;
  background: #eee; color: #999; margin: 0 auto 6px; line-height: 26px;
}
.order-progress-step.done::before { background: var(--success); }
.order-progress-step.current { color: var(--brand-dark); }
.order-progress-step.current::before { background: var(--brand); }
.order-progress-line { position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #eee; z-index: -1; }
.order-progress-step.done .order-progress-line, .order-progress-step.current .order-progress-line { background: var(--success); }
.order-progress-step:first-child .order-progress-line { display: none; }
.order-status-cancelled-note { text-align: center; color: var(--danger); font-weight: 600; margin: 18px 0 22px; }
.order-eta { text-align: center; font-size: .82rem; color: var(--muted); margin: 4px 0 12px; }

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .card, .calc-report { padding: 16px; }
  .stat-grid { gap: 10px; }
  /* Homepage topbar (index.php): the "Recipe & Nutrition Calculator"
     tagline next to the wordmark is a nice-to-have on desktop, but at
     this width it just fights the nav for space — drop it and let the
     brand name + nav buttons breathe instead. */
  .topbar .brand-suffix { display: none; }

  /* Wide data tables scroll horizontally at natural width instead of
     squeezing every column unreadably narrow. The 2-column Firm/Recipe
     Details tables in the calculation report are left alone since they
     read fine full-width. */
  table:not(.report-table) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table:not(.report-table) th, table:not(.report-table) td { white-space: nowrap; }
  .report-calc-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .report-calc-table tr { display: table-row; }
  .report-calc-table th, .report-calc-table td { white-space: nowrap; }

  /* Ingredient rows in the recipe form: stack instead of a cramped row. */
  #ingredient-rows .ingredient-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .ingredient-row .col-name, .ingredient-row .col-qty,
  .ingredient-row .col-brand, .ingredient-row .col-removable,
  .ingredient-row .col-remove { flex: none; width: 100%; }

  .form-row > div { min-width: 100%; }

  .report-header { flex-wrap: wrap; gap: 10px; text-align: center; justify-content: center; }
  .menu-letterhead { flex-wrap: wrap; gap: 10px; }
  .hero { padding: 50px 16px 40px; }
  .hero h1 { font-size: 1.8rem; }

  /* Public menu: match the sticky nav's negative margin to the narrower
     container padding at this breakpoint, and shrink the dish photo/ADD
     button a little so long names don't get too cramped on small phones. */
  .menu-sticky-nav { margin: 0 -14px; padding: 10px 14px 6px; }
  .menu-item-photo-wrap, .menu-item-photo { width: 92px; }
  .menu-item-photo { height: 92px; }
  .menu-add-btn { width: 74px; font-size: .68rem; padding: 8px 4px; }
  .menu-card-stepper { padding: 6px 8px; gap: 7px; }
  .menu-cat-tile-icon { width: 54px; height: 54px; font-size: 1.4rem; border-radius: 16px; }
  .menu-cat-tiles .cat-pill { width: 64px; }
  .menu-cat-tile-label { font-size: .68rem; max-width: 66px; }

  /* Two-pane menu: narrower rail so the dish pane still has room on
     small phones — icons shrink a touch further than the tablet size
     above, labels wrap to two lines rather than truncating. */
  .menu-cat-rail .menu-cat-pills.menu-cat-tiles { gap: 10px; }
  .menu-cat-rail .menu-cat-tile-icon { width: 52px; height: 52px; font-size: 1.35rem; border-radius: 16px; }
  .menu-cat-rail .menu-cat-tiles .cat-pill { width: 60px; }
  .menu-cat-rail .menu-cat-tile-label { font-size: .64rem; max-width: 62px; }
}

/* Customer engagement: saved dietary preferences, public notices, and owner campaigns. */
.scan-preferences { border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0 10px; padding: 10px 12px; }
.scan-preferences legend { padding: 0 4px; font-weight: 700; }
.scan-preferences label, .scan-promotion-consent { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; font-size: .88rem; font-weight: 500; }
.scan-preferences input, .scan-promotion-consent input { width: auto; margin: 0; }
.scan-promotion-consent { display: flex; margin: 12px 0 0; }
.public-announcement { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand-light); color: var(--brand-dark); font-size: .9rem; font-weight: 700; }
.engagement-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.engagement-row form { margin: 0; }
.engagement-campaign { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.engagement-campaign summary { cursor: pointer; }
.receipt-card { max-width: 540px; margin: 24px auto; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@media (max-width: 520px) { .engagement-row { align-items: flex-start; flex-direction: column; } }

/* --- Customer menu visual refresh (menu/view.php) --- */
body:has(.public-menu) {
  background:
    radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--brand-light) 70%, transparent) 0, transparent 28rem),
    var(--bg);
}
body:has(.public-menu) .public-container { max-width: 1120px; padding-top: 18px; }
.public-menu { max-width: 1080px; margin: 0 auto; }
.public-menu .menu-hero {
  position: relative; overflow: hidden; text-align: left; padding: 30px;
  border: 0; border-radius: 26px; margin: 6px 0 22px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.3) 0 7rem, transparent 7.1rem),
    linear-gradient(135deg, var(--brand-dark), var(--brand) 58%, #ed8b45);
  color: #fff; box-shadow: 0 18px 45px rgba(92,43,20,.18);
}
.public-menu .menu-hero::after {
  content: ''; position: absolute; right: -54px; bottom: -88px; width: 230px; height: 230px;
  border: 34px solid rgba(255,255,255,.09); border-radius: 50%; pointer-events: none;
}
.menu-hero-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; }
.public-menu .menu-hero-logo {
  width: 104px; height: 104px; max-width: none; max-height: none; flex: 0 0 104px;
  object-fit: contain; margin: 0; padding: 10px; border-radius: 24px;
  box-shadow: 0 12px 30px rgba(44,20,10,.24); border: 1px solid rgba(255,255,255,.5);
}
.menu-hero-copy { flex: 1; min-width: 0; }
.menu-hero-eyebrow { display: block; margin-bottom: 4px; font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.public-menu .menu-hero h1 { margin: 0; color: #fff; font-size: clamp(1.75rem, 4vw, 2.65rem); line-height: 1.08; letter-spacing: -.035em; }
.menu-hero-address { margin: 8px 0 0; max-width: 620px; color: rgba(255,255,255,.82); font-size: .88rem; line-height: 1.45; }
.menu-hero-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.menu-hero-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font-size: .72rem; font-weight: 750;
  backdrop-filter: blur(8px);
}
.menu-hero-chip-live i { width: 7px; height: 7px; border-radius: 50%; background: #78e69f; box-shadow: 0 0 0 4px rgba(120,230,159,.16); }
.menu-hero-chip-table { background: rgba(255,255,255,.22); }
.menu-hero-preferences {
  align-self: flex-start; position: relative; z-index: 2; flex: 0 0 auto;
  padding: 9px 13px; border-radius: 999px; background: #fff; color: var(--brand-dark);
  font-size: .75rem; font-weight: 800; box-shadow: 0 6px 18px rgba(44,20,10,.16);
}
.menu-hero-preferences:hover { color: var(--brand); transform: translateY(-1px); }
.menu-hero-welcome {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; padding: 14px 16px; border-radius: 17px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18);
}
.menu-hero-welcome > div { flex: 1; min-width: 210px; }
.menu-hero-welcome strong, .menu-hero-welcome span { color: #fff; }
.menu-hero-welcome > div strong, .menu-hero-welcome > div span { display: block; }
.menu-hero-welcome > div strong { font-size: .9rem; }
.menu-hero-welcome > div span { margin-top: 2px; font-size: .74rem; opacity: .78; }
.menu-hero-reward, .menu-hero-regular { padding: 7px 10px; border-radius: 999px; background: rgba(20,18,12,.18); font-size: .72rem; font-weight: 800; }

.public-menu .menu-banner-carousel { border: 0; border-radius: 22px; box-shadow: 0 14px 34px rgba(35,25,18,.13); }
.public-menu .trust-links { border-radius: 14px; }
.public-menu .menu-reco-strip {
  padding: 20px; margin-bottom: 18px; border: 1px solid var(--border);
  border-radius: 20px; background: color-mix(in srgb, var(--card) 92%, var(--brand-light));
  box-shadow: 0 8px 24px rgba(35,25,18,.06);
}
.public-menu .menu-reco-title { font-size: 1.02rem; margin-bottom: 14px; }
.public-menu .menu-item-card.menu-reco-card { width: 158px; }
.public-menu .menu-reco-photo { width: 158px; height: 116px; }

.public-menu .menu-sticky-nav {
  top: 8px; margin: 0 0 16px; padding: 12px; border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 20px; background: color-mix(in srgb, var(--card) 91%, transparent);
  box-shadow: 0 10px 30px rgba(35,25,18,.09); backdrop-filter: blur(16px);
}
.public-menu .menu-search-wrap { margin-bottom: 10px; }
.public-menu .menu-search-input { min-height: 48px; background: var(--bg); border-color: var(--border); font-size: .95rem; }
.public-menu .menu-search-input:focus { background: var(--card); }
.public-menu .menu-advanced-filters { margin-bottom: 0; }
.public-menu .menu-filter-status { min-height: 22px; }

.public-menu .menu-cat-rail {
  top: 8px; margin: 0 0 18px; padding: 14px 16px 5px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--card); box-shadow: 0 8px 24px rgba(35,25,18,.06);
}
.public-menu .menu-cat-rail .menu-cat-tiles-title { font-size: 1.15rem; letter-spacing: -.015em; }
.public-menu .menu-cat-tile-icon { box-shadow: 0 7px 16px rgba(35,25,18,.09); }
.public-menu .menu-section-title {
  border: 0; margin: 0 0 14px; padding: 2px 2px 10px; font-size: 1.28rem;
  text-transform: none; letter-spacing: -.02em;
}
.public-menu .menu-section-count { display: inline-flex; vertical-align: middle; padding: 3px 8px; border-radius: 999px; background: var(--brand-light); color: var(--brand-dark); font-size: .65rem; }
.public-menu .menu-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.public-menu .menu-item-card:not(.menu-reco-card) {
  min-height: 196px; padding: 18px 18px 27px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--card); box-shadow: 0 7px 22px rgba(35,25,18,.055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.public-menu .menu-item-card:not(.menu-reco-card):hover {
  transform: translateY(-2px); background: var(--card); border-color: color-mix(in srgb, var(--brand) 38%, var(--border));
  box-shadow: 0 14px 32px rgba(35,25,18,.11);
}
.public-menu .menu-item-top h3 { font-size: 1.06rem; line-height: 1.28; }
.public-menu .menu-item-photo-wrap, .public-menu .menu-item-photo { width: 128px; }
.public-menu .menu-item-photo { height: 128px; border-radius: 18px; box-shadow: 0 9px 22px rgba(35,25,18,.14); }
.public-menu .menu-item-price { font-size: 1.04rem; }
.public-menu .menu-add-btn, .public-menu .menu-card-stepper { box-shadow: 0 6px 16px rgba(35,25,18,.2); }
.public-menu .cart-bar { min-width: min(430px, calc(100% - 28px)); justify-content: space-between; padding: 14px 22px; background: linear-gradient(135deg, var(--footer-dark), #34251e); }

[data-theme="dark"] .public-menu .menu-hero { background: linear-gradient(135deg, #3a211a, #713b28 58%, #8c512f); }
[data-theme="dark"] .public-menu .menu-reco-strip,
[data-theme="dark"] .public-menu .menu-sticky-nav { background: color-mix(in srgb, var(--card) 92%, transparent); }

@media (max-width: 900px) {
  body:has(.public-menu) .public-container { max-width: 760px; }
  .public-menu .menu-card-grid { grid-template-columns: 1fr; }
  .public-menu .menu-item-card:not(.menu-reco-card) { min-height: 0; }
}
@media (max-width: 640px) {
  body:has(.public-menu) .public-container { padding-top: 10px; }
  .public-menu .menu-hero { margin-top: 4px; padding: 22px 18px; border-radius: 22px; }
  .menu-hero-main { align-items: flex-start; gap: 14px; }
  .public-menu .menu-hero-logo { width: 72px; height: 72px; flex-basis: 72px; border-radius: 18px; padding: 7px; }
  .public-menu .menu-hero h1 { font-size: 1.55rem; }
  .menu-hero-address { font-size: .76rem; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .menu-hero-chips { margin-top: 11px; gap: 5px; }
  .menu-hero-chip { padding: 5px 8px; font-size: .65rem; }
  .menu-hero-preferences { position: absolute; top: 0; right: 0; padding: 7px 9px; font-size: .67rem; }
  .menu-hero-welcome { margin-top: 17px; padding: 12px; gap: 8px; }
  .menu-hero-welcome > div { min-width: 100%; }
  .menu-hero-reward, .menu-hero-regular { font-size: .65rem; }
  .public-menu .menu-reco-strip { margin-left: -2px; margin-right: -2px; padding: 16px 14px; border-radius: 18px; }
  .public-menu .menu-item-card.menu-reco-card { width: 142px; }
  .public-menu .menu-reco-photo { width: 142px; height: 106px; }
  .public-menu .menu-sticky-nav { top: 4px; margin: 0 -4px 14px; padding: 9px; border-radius: 17px; }
  .public-menu .menu-search-input { min-height: 45px; }
  .public-menu .menu-cat-rail { top: 4px; margin-left: -2px; margin-right: -2px; padding: 12px 12px 4px; border-radius: 18px; }
  .public-menu .menu-section-title { font-size: 1.15rem; }
  .public-menu .menu-card-grid { gap: 11px; }
  .public-menu .menu-item-card:not(.menu-reco-card) { padding: 16px 14px 27px; border-radius: 18px; }
  .public-menu .menu-item-photo-wrap, .public-menu .menu-item-photo { width: 104px; }
  .public-menu .menu-item-photo { height: 104px; border-radius: 15px; }
  .public-menu .menu-item-top h3 { font-size: .98rem; }
  .public-menu .menu-item-ingredients { display: none; }
}
@media (max-width: 390px) {
  .public-menu .menu-hero-logo { width: 62px; height: 62px; flex-basis: 62px; }
  .public-menu .menu-hero h1 { font-size: 1.35rem; padding-right: 58px; }
  .menu-hero-eyebrow { font-size: .62rem; }
  .public-menu .menu-item-card:not(.menu-reco-card) { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .public-menu .menu-item-photo-wrap, .public-menu .menu-item-photo { width: 92px; }
  .public-menu .menu-item-photo { height: 92px; }
  .public-menu .menu-item-tax-note { display: none; }
}
/* Restaurant-owned identity in the customer menu top bar. */
.public-restaurant-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: .94rem; font-weight: 850; letter-spacing: -.015em; }
.public-restaurant-brand .brand-logo { width: 38px; height: 38px; margin: 0; padding: 4px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
body:has(.public-menu) .topbar { background: color-mix(in srgb, var(--card) 94%, transparent); border-bottom: 1px solid var(--border); box-shadow: 0 4px 18px rgba(35,25,18,.055); }
body:has(.public-menu) .site-footer { color: var(--text-muted); background: transparent; }
@media (max-width: 420px) { .public-restaurant-brand span { max-width: 215px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.menu-item-meta span { display:inline-flex; align-items:center; gap:4px; font-weight:750; }
.menu-item-meta span + span::before { content:'•'; margin-right:2px; color:var(--brand); }
.menu-item-meta small { font-size:.68rem; color:var(--text-muted); }
/* Compact restaurant category tabs. */
.public-menu .menu-category-tabs { display:flex; align-items:center; gap:16px; padding:12px 14px; }
.public-menu .menu-category-tabs .menu-cat-tiles-title { flex:0 0 auto; margin:0; font-size:.82rem; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); }
.public-menu .menu-category-tabs .menu-cat-pills { flex:1; gap:8px; padding:2px 2px 4px; }
.public-menu .menu-category-tabs .cat-pill { padding:9px 15px; border:1px solid var(--border); background:var(--bg); box-shadow:none; font-size:.78rem; white-space:nowrap; }
.public-menu .menu-category-tabs .cat-pill.active,
.public-menu .menu-category-tabs .cat-pill:hover { color:#fff; border-color:var(--brand); background:var(--brand); box-shadow:0 5px 12px rgba(217,80,46,.22); }
.public-menu .menu-section { scroll-margin-top:90px; }
@media (max-width:640px) {
  .public-menu .menu-category-tabs { display:block; padding:10px 9px 6px; }
  .public-menu .menu-category-tabs .menu-cat-tiles-title { margin:0 5px 7px; font-size:.7rem; }
  .public-menu .menu-category-tabs .cat-pill { padding:8px 13px; font-size:.73rem; }
  .public-menu .menu-section { scroll-margin-top:82px; }
}
/* Keep the customer category menu pinned while dishes scroll. */
.public-menu .menu-category-tabs {
  position: sticky !important;
  top: 8px !important;
  z-index: 35;
  isolation: isolate;
  background: color-mix(in srgb, var(--card) 96%, transparent);
  box-shadow: 0 10px 28px rgba(35,25,18,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.public-menu .menu-category-tabs::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -9px; height: 9px;
  background: linear-gradient(to bottom, rgba(35,25,18,.06), transparent); pointer-events: none;
}
@media (max-width:640px) {
  .public-menu .menu-category-tabs { top: 4px !important; }
}
/* Enhanced customer dish search. */
.public-menu .menu-sticky-nav { padding:14px; }
.menu-search-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:0 3px 11px; }
.menu-search-heading > div { min-width:0; }
.menu-search-heading strong { display:block; color:var(--text); font-size:1rem; letter-spacing:-.018em; }
.menu-search-heading span { display:block; margin-top:2px; color:var(--text-muted); font-size:.7rem; }
.menu-search-count { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:var(--brand-light); color:var(--brand-dark) !important; font-size:.67rem !important; font-weight:800; }
.public-menu .menu-search-wrap { margin-bottom:12px; }
.public-menu .menu-search-input {
  height:54px; padding:12px 88px 12px 54px; border:1px solid color-mix(in srgb,var(--border) 78%,var(--brand));
  border-radius:16px; background:var(--card); font-size:.95rem; font-weight:600;
  box-shadow:0 7px 20px rgba(35,25,18,.07); caret-color:var(--brand);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease;
}
.public-menu .menu-search-input::placeholder { color:color-mix(in srgb,var(--text-muted) 78%,transparent); font-weight:500; }
.public-menu .menu-search-input:focus { border-color:var(--brand); background:var(--card); box-shadow:0 0 0 4px var(--brand-light),0 10px 26px rgba(35,25,18,.1); transform:translateY(-1px); }
.public-menu .menu-search-icon {
  left:12px; width:32px; height:32px; padding:7px; border-radius:10px;
  color:var(--brand-dark); background:var(--brand-light);
}
.public-menu .menu-search-input:focus ~ .menu-search-icon { color:#fff; background:var(--brand); }
.public-menu .menu-voice-search { right:10px; width:34px; height:34px; border-radius:10px; background:var(--bg); }
.public-menu .menu-search-clear { right:49px; width:28px; height:28px; background:transparent; }
.public-menu .menu-search-suggest { top:calc(100% + 8px); border:0; border-radius:16px; padding:6px; box-shadow:0 18px 45px rgba(20,18,12,.2); }
.public-menu .menu-search-suggest-item { border:0; border-radius:11px; padding:9px; }
@media (max-width:640px) {
  .public-menu .menu-sticky-nav { padding:11px; }
  .menu-search-heading { align-items:center; margin-bottom:9px; }
  .menu-search-heading strong { font-size:.9rem; }
  .menu-search-heading > div span { display:none; }
  .menu-search-count { font-size:.62rem !important; }
  .public-menu .menu-search-input { height:50px; padding-left:50px; font-size:.88rem; }
  .public-menu .menu-search-icon { width:30px; height:30px; }
}
/* Floating restaurant Menu / Order / My Orders navigation. */
.restaurant-public-tabs {
  position:relative; z-index:8; max-width:580px; margin:-62px auto 34px; padding:8px;
  gap:7px; border:1px solid color-mix(in srgb,var(--border) 75%,transparent);
  border-radius:20px; background:color-mix(in srgb,var(--card) 96%,transparent);
  box-shadow:0 22px 50px rgba(35,25,18,.23),0 2px 0 rgba(255,255,255,.75) inset; backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
}
.restaurant-public-tabs .public-tab {
  position:relative; min-height:62px; padding:8px 12px; border:1px solid transparent; border-radius:15px;
  flex-direction:column; gap:3px; background:transparent; color:var(--text-muted); font-size:.72rem;
  transition:transform .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease;
}
.restaurant-public-tabs .public-tab-icon { font-size:1.15rem; line-height:1; filter:grayscale(.25); }
.restaurant-public-tabs .public-tab:hover { transform:translateY(-3px); color:var(--brand-dark); background:var(--brand-light); }
.restaurant-public-tabs .public-tab.active {
  color:#fff; background:linear-gradient(135deg,var(--brand-dark),var(--brand));
  transform:translateY(-3px); box-shadow:0 13px 25px rgba(217,80,46,.38);
}
.restaurant-public-tabs .public-tab.active .public-tab-icon { filter:none; transform:scale(1.08); }
.restaurant-public-tabs .nav-badge { position:absolute; top:5px; right:8px; min-width:20px; padding:1px 6px; background:#fff; color:var(--brand-dark); box-shadow:0 2px 7px rgba(20,18,12,.16); }
@media (max-width:640px) {
  .restaurant-public-tabs { margin:-52px 8px 28px; padding:7px; border-radius:18px; }
  .restaurant-public-tabs .public-tab { min-height:57px; padding:7px 5px; border-radius:13px; font-size:.67rem; }
  .restaurant-public-tabs .public-tab-icon { font-size:1.05rem; }
}
/* Premium My Orders customer layout. */
.public-orders-heading { max-width:1080px; margin:0 auto; }
.orders-overview {
  max-width:760px; margin:8px auto 18px; padding:20px 22px; display:flex; align-items:center; gap:20px;
  border:1px solid var(--border); border-radius:20px; background:var(--card); box-shadow:0 9px 28px rgba(35,25,18,.07);
}
.orders-overview > div:first-child { flex:1; min-width:0; }
.orders-overview-eyebrow { color:var(--brand-dark); font-size:.65rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.orders-overview h2 { margin:2px 0 3px; font-size:1.35rem; letter-spacing:-.025em; }
.orders-overview p { margin:0; color:var(--text-muted); font-size:.76rem; }
.orders-overview-stats { display:flex; gap:8px; }
.orders-overview-stats span { min-width:70px; padding:9px 12px; border-radius:14px; background:var(--bg); color:var(--text-muted); font-size:.67rem; text-align:center; }
.orders-overview-stats strong { display:block; color:var(--text); font-size:1.15rem; }
.public-orders { max-width:760px; margin:0 auto; }
.customer-orders-list { max-width:none; margin:0 auto 30px; gap:18px; }
.customer-orders-list .order-card {
  position:relative; overflow:hidden; padding:20px 22px; border-radius:22px; background:var(--card);
  border:1px solid var(--border); box-shadow:0 9px 28px rgba(35,25,18,.075);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.customer-orders-list .order-card:hover { transform:translateY(-2px); box-shadow:0 16px 38px rgba(35,25,18,.12); }
.customer-orders-list .order-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--border); }
.customer-orders-list .order-status-new::before,
.customer-orders-list .order-status-accepted::before { background:var(--brand); }
.customer-orders-list .order-status-preparing::before,
.customer-orders-list .order-status-packing::before { background:#e7a21a; }
.customer-orders-list .order-status-serving::before,
.customer-orders-list .order-status-ready_to_deliver::before { background:#3b82f6; }
.customer-orders-list .order-status-served::before,
.customer-orders-list .order-status-delivered::before { background:var(--success); }
.customer-orders-list .order-status-cancelled::before { background:var(--muted); }
.customer-orders-list .order-card-header { margin-bottom:14px; }
.customer-orders-list .order-id-tag { display:block; margin:0 0 5px; color:var(--text); font-size:.92rem; }
.customer-orders-list .order-table-tag { margin:0; font-size:.65rem; }
.customer-orders-list .order-status-badge { padding:6px 10px; border-radius:999px; font-size:.68rem; }
.customer-orders-list .order-progress-box { margin:0 -4px 15px; padding:13px 10px 1px; border-radius:16px; background:var(--bg); }
.customer-orders-list .order-progress { margin:8px 0 18px; }
.customer-orders-list .order-progress-step { font-size:.68rem; }
.customer-orders-list .order-progress-step::before { width:24px; height:24px; line-height:24px; border:3px solid var(--card); box-shadow:0 0 0 1px var(--border); }
.customer-orders-list .order-progress-line { top:12px; }
.customer-orders-list .order-item-list { margin:0; padding:3px 0 0; list-style:none; }
.customer-orders-list .order-item-list li { display:flex; justify-content:space-between; gap:16px; padding:12px 2px; border-bottom:1px solid var(--border); font-size:.84rem; }
.customer-orders-list .order-item-list li:last-child { border-bottom:0; }
.customer-orders-list .order-item-list li > span:first-child { flex:1; min-width:0; font-weight:700; }
.customer-orders-list .order-item-list li > span:last-child { flex:0 0 auto; text-align:right; }
.customer-orders-list .order-item-kcal { font-size:.69rem; font-weight:500; line-height:1.45; }
.order-price-details { margin-top:12px; border:1px solid var(--border); border-radius:15px; background:var(--bg); overflow:hidden; }
.order-price-details summary { cursor:pointer; padding:11px 13px; color:var(--brand-dark); font-size:.76rem; font-weight:800; list-style:none; }
.order-price-details summary::after { content:'＋'; float:right; }
.order-price-details[open] summary::after { content:'−'; }
.order-price-details[open] summary { border-bottom:1px solid var(--border); }
.order-price-details .order-price-breakdown { margin:0; padding:10px 13px; border:0; background:var(--card); }
.customer-orders-list .order-card-footer { margin-top:14px; padding-top:13px; }
.customer-orders-list .order-card-total { font-size:.9rem; color:var(--text); }
.customer-orders-list .order-card-meta { color:var(--text-muted); font-size:.7rem; }
.customer-orders-list .btn-order-again { width:100%; margin-top:12px; border-radius:12px; }
@media (max-width:640px) {
  .orders-overview { margin:6px 2px 15px; padding:17px 15px; flex-wrap:wrap; gap:12px; }
  .orders-overview > div:first-child { flex-basis:100%; }
  .orders-overview-stats { flex:1; }
  .orders-overview-stats span { flex:1; min-width:64px; }
  .customer-orders-list { gap:13px; }
  .customer-orders-list .order-card { padding:17px 14px 18px 18px; border-radius:18px; }
  .customer-orders-list .order-progress-step { font-size:.59rem; }
  .customer-orders-list .order-item-list li { gap:10px; font-size:.8rem; }
  .customer-orders-list .order-card-footer { align-items:flex-start; gap:6px; flex-direction:column; }
}
/* My Orders interaction polish. */
.order-filter-bar { max-width:760px; margin:0 auto 18px; padding:6px; display:flex; align-items:center; gap:6px; overflow-x:auto; border:1px solid var(--border); border-radius:16px; background:var(--card); box-shadow:0 7px 22px rgba(35,25,18,.06); }
.order-filter { flex:0 0 auto; padding:9px 14px; border:0; border-radius:11px; background:transparent; color:var(--text-muted); font:inherit; font-size:.76rem; font-weight:800; cursor:pointer; }
.order-filter span { display:inline-grid; place-items:center; min-width:20px; margin-left:4px; padding:1px 5px; border-radius:999px; background:var(--bg); font-size:.65rem; }
.order-filter.active { color:#fff; background:var(--brand); box-shadow:0 7px 14px rgba(217,80,46,.25); }
.order-filter.active span { color:var(--brand-dark); background:#fff; }
.orders-live-status { margin-left:auto; padding:0 9px; color:var(--text-muted); font-size:.66rem; white-space:nowrap; }
.order-group-section { display:grid; gap:12px; }
.order-group-section + .order-group-section { margin-top:24px; }
.order-group-section > h3 { margin:0; display:flex; align-items:baseline; justify-content:space-between; gap:12px; color:var(--text); font-size:1rem; }
.order-group-section > h3 small { color:var(--text-muted); font-size:.66rem; font-weight:600; }
.order-group-cards { display:grid; gap:16px; }
.order-card-header-actions { display:flex; align-items:center; gap:7px; }
.order-collapse-toggle { width:32px; height:32px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); font-size:1.1rem; line-height:1; cursor:pointer; }
.order-card-collapsed > :not(.order-card-header) { display:none !important; }
.order-card-collapsed .order-card-header { margin-bottom:0 !important; }
.customer-orders-list .order-item-list li { align-items:center; }
.order-item-thumb { width:48px; height:48px; flex:0 0 48px; border-radius:12px; object-fit:cover; background:var(--bg); border:1px solid var(--border); }
.order-card-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.order-card-actions .btn { flex:1 1 135px; margin:0 !important; border-radius:12px; }
.order-card-actions .btn-pay-order { color:#fff; border-color:var(--brand); background:linear-gradient(135deg,var(--brand-dark),var(--brand)); box-shadow:0 9px 18px rgba(217,80,46,.25); }
.customer-orders-list .order-status-cancelled { opacity:1; background:color-mix(in srgb,var(--card) 90%,var(--muted)); }
.customer-orders-list .order-payment-refunded { background:color-mix(in srgb,var(--card) 93%,#3b82f6); }
.order-status-cancelled-note { padding:10px 12px; border-radius:12px; color:#8b2f2f; background:#fff1f1; font-size:.76rem; font-weight:700; }
.orders-refreshing .order-group-cards { opacity:.62; }
.orders-refreshing .orders-live-status::before { content:''; display:inline-block; width:8px; height:8px; margin-right:6px; border:2px solid var(--border); border-top-color:var(--brand); border-radius:50%; animation:orderRefreshSpin .7s linear infinite; }
@keyframes orderRefreshSpin { to { transform:rotate(360deg); } }
.order-filter:focus-visible, .order-collapse-toggle:focus-visible, .order-card-actions .btn:focus-visible, .order-price-details summary:focus-visible { outline:3px solid color-mix(in srgb,var(--brand) 36%,transparent); outline-offset:3px; }
@media (max-width:640px) {
  .order-filter-bar { margin:0 2px 14px; border-radius:14px; }
  .order-filter { padding:8px 11px; font-size:.71rem; }
  .orders-live-status { display:none; }
  .order-group-section > h3 { padding:0 3px; }
  .order-item-thumb { width:42px; height:42px; flex-basis:42px; }
}
@media (prefers-reduced-motion:reduce) {
  .customer-orders-list .order-card, .order-filter, .order-card-actions .btn { transition:none !important; }
  .orders-refreshing .orders-live-status::before { animation:none; }
}