/* ---------------------------------------------------------------------
   Outback Voice — base styles
   Brand: Outback Steakhouse red (#D2231D) on warm neutral surfaces.
   Data-viz roles below follow the validated reference palette (see the
   dataviz skill) so charts stay colorblind-safe and consistent.
--------------------------------------------------------------------- */

@font-face {
  font-family: 'BigBloke';
  src: url('/fonts/BIG_BLOKE_1.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'ArbFONTSAGC';
  src: url('/fonts/ArbFONTSAGCRegular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'ArbFONTSAGC';
  src: url('/fonts/ArbFONTSAGCLight.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'ArbFONTSAGC';
  src: url('/fonts/ArbFONTSAGCBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand-red: #D2231D;
  --brand-red-dark: #a51a15;
  --brand-charcoal: #241F1C;

  --surface-1: #fcfcfb;
  --page-plane: #f4f2ef;
  --text-primary: #1c1a18;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --gridline: #e1e0d9;
  --border: rgba(11,11,11,0.10);

  --series-1: #256abf;   /* sequential blue, single-series charts */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-critical: #d03b3b;

  --radius: 10px;
  --font-sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

html[dir="rtl"] body, html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] textarea, html[dir="rtl"] button {
  font-family: 'ArbFONTSAGC', var(--font-sans);
}

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

h1, h2, h3, h4 { color: var(--text-primary); margin: 0 0 12px; }
.page-title { font-size: 26px; margin-bottom: 20px; }

.muted { color: var(--text-secondary); }
.muted.small, .small { font-size: 13px; }

/* ---------------- App shell (admin) ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--brand-charcoal);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 16px;
}
.sidebar-brand img { height: 32px; }
.sidebar-brand span { font-weight: 700; font-size: 15px; }

.sidebar-nav { display: flex; flex-direction: column; flex: 1; gap: 2px; padding: 0 10px; }
.sidebar-nav a {
  color: rgba(255,255,255,0.75);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-nav a.active { background: var(--brand-red); color: #fff; }

/* ROUND 67 - collapsible sidebar nav group ("Menu"), see partials/header.ejs */
.sidebar-nav-group { display: flex; flex-direction: column; }
.sidebar-nav-group-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 10px 12px; border-radius: 8px; border: none; background: none;
  color: rgba(255,255,255,0.75); font-size: 14px; font-family: inherit; text-align: left; cursor: pointer;
}
html[dir="rtl"] .sidebar-nav-group-toggle { text-align: right; }
.sidebar-nav-group-toggle:hover { background: rgba(255,255,255,0.08); }
.sidebar-nav-group-toggle.active-parent { color: #fff; }
.sidebar-nav-group-arrow { font-size: 10px; transition: transform 0.15s ease; }
html[dir="rtl"] .sidebar-nav-group-arrow { transform: scaleX(-1); }
.sidebar-nav-group.expanded .sidebar-nav-group-arrow { transform: rotate(90deg); }
html[dir="rtl"] .sidebar-nav-group.expanded .sidebar-nav-group-arrow { transform: rotate(-90deg) scaleX(-1); }
.sidebar-nav-group-items { display: flex; flex-direction: column; gap: 2px; padding-inline-start: 14px; }
.sidebar-nav-group-items a { font-size: 13.5px; }
/* An author `display: flex` rule on the same element beats the browser's
   built-in `[hidden] { display: none }` rule (equal specificity, author
   stylesheet loads after the UA one) - same gotcha/fix already documented
   at .ms-panel[hidden] and .guest-account-panel[hidden] above. */
.sidebar-nav-group-items[hidden] { display: none; }

.sidebar-account { padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 16px; }
.user-chip { font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 8px; }
.lang-switch { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-switch a { padding: 3px 9px; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; font-size: 12px; color: rgba(255,255,255,0.75); }
.lang-switch a.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

.main-content { flex: 1; padding: 28px 32px; max-width: 1200px; }

/* ---------------- Public survey shell ---------------- */
/* Every customer/staff-facing public page (login, survey, thank-you) is dark
   themed now — only the logged-in admin area (.app-shell) stays light. This
   background lives here (not just on body) because .public-shell previously
   painted an opaque light rectangle over the whole viewport, hiding any dark
   color set on body outside the centered column on wide screens. */
.public-shell { min-height: 100vh; background-color: #14100e; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--brand-red); color: #fff; }
.btn-primary:hover { background: var(--brand-red-dark); text-decoration: none; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text-primary); }
.btn-ghost:hover { background: #f2f2f0; text-decoration: none; }
.btn-menu { background: var(--brand-charcoal); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
/* A button whose label is followed by a status badge (e.g. the Loyalty
   card's "Add to Apple/Google Wallet ... Coming soon" buttons) - flexbox
   with an explicit gap so the badge never reads as crammed against the
   label, regardless of the button's own width. */
.btn-with-badge { display: flex; align-items: center; justify-content: center; gap: 10px; }

.link-button { background: none; border: none; color: var(--brand-red); cursor: pointer; padding: 0; font-size: inherit; }
.link-button.danger { color: var(--status-critical); }
.inline-form { display: inline; }

/* ---------------- Cards / forms ---------------- */
.card, .form-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; align-items: flex-start; }
.form-row > div { flex: 1; min-width: 200px; }
/* A field's helper/description text sits in this reserved-height slot right
   after the label, before the input - not appended after the input, and not
   packed inline into the label itself. A fixed min-height (regardless of
   whether a particular column actually has hint text) is what keeps every
   input/select in a row starting at the same y position even when sibling
   columns' hints are different lengths (or one has none at all) - without
   this, the column with the longest hint pushes its own input down while
   shorter columns' inputs stay higher, reading as "unaligned". */
.field-hint { display: block; min-height: 30px; margin: 2px 0 6px; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
.field-hint:empty { margin: 2px 0 6px; }

/* A field's longer "additional notes" text used to always sit inline right
   under its label (see .field-hint above), reserving a fixed height so every
   column in a multi-column .form-row started at the same y position - but
   that only works up to a point: a note long enough to wrap onto more lines
   than its row-mates' notes still pushes its own input down further than
   theirs, reading as unaligned (this is exactly what happened to Settings'
   App Base URL / Menu URL / Campaign Send Rate row). Longer notes now live
   in a click-to-reveal tooltip attached to the field's own label instead -
   `<label data-tip="...">Field Name</label>` - so no column reserves any
   extra height for its note and every row aligns regardless of note length.
   Click/toggle behavior lives in partials/footer.ejs. .field-hint is kept
   only for the rare case a "hint" needs to be actual clickable content (a
   link) rather than plain descriptive text - a tooltip bubble can't
   sensibly host something the reader needs to click through to. */
label[data-tip] { position: relative; display: inline-flex; align-items: center; gap: 5px; cursor: help; width: auto; }
label[data-tip]::after {
  content: '?';
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gridline); color: var(--text-secondary);
  font-size: 10px; font-weight: 700; line-height: 1;
}
label[data-tip]:hover::after, label[data-tip].tip-open::after { background: var(--brand-red); color: #fff; }
.tip-bubble {
  position: absolute; top: 100%; inset-inline-start: 0; z-index: 80; margin-top: 6px;
  background: var(--brand-charcoal); color: #f5f1ec;
  border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 400;
  line-height: 1.4; max-width: 280px; width: max-content; white-space: normal;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  cursor: default;
}
.tip-bubble a { color: #ffce9e; }
.variable-row-remove { flex: 0 0 90px; min-width: 90px; }
.button-row > div { flex: 1; min-width: 130px; }
.button-row .btn-text-field,
.button-row .btn-value-field { min-width: 160px; }
.button-row .btn-dynamic-field,
.button-row .btn-dynamic-source-field { min-width: 140px; }
.button-row-remove { flex: 0 0 90px; min-width: 90px; }
.inline-edit-input { width: 100%; min-width: 90px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 12px 0 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="color"], input[type="file"],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text-primary);
}
textarea { resize: vertical; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0 4px; align-content: start; }
.checkbox-pill { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; color: var(--text-primary); background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
.checkbox-pill input { width: auto; }

/* Multi-column filter blocks (Branch/Brand/City/Age Group/Gender/Country
   side by side, on Campaigns/Coupons/Campaign Groups/Surveys) - each
   column's own checkbox-grid naturally wraps to a different number of rows
   depending on how many options it has (a dozen Branches vs. just one or
   two Brands), which used to leave the columns' bottoms ragged since
   .form-row's default align-items:flex-start only lines up their TOPS.
   .filter-row (added alongside .form-row on these specific rows) stretches
   every column to the row's tallest column's height instead, and
   .filter-col wraps each column in its own bordered box - anchored to the
   top via .checkbox-grid's own align-content:start above - so an uneven
   pill count reads as "boxes with different amounts of empty space below"
   rather than a jagged, misaligned row. */
.filter-row.form-row { align-items: stretch; }
.filter-col { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 12px; display: flex; flex-direction: column; }
.filter-col > label { margin-top: 0; }
.filter-col .checkbox-grid { flex: 1; }
.filter-col > p.muted.small { margin: 4px 0 0; }

/* Brand multi-select dropdown (Survey/Coupons/Campaigns "Brand" filter
   column) - a compact button + popover replacing a checkbox-grid so the
   column stays a fixed, predictable size as the number of brands grows,
   instead of the pill grid getting taller/wider every time a brand is
   added. The underlying <input type="checkbox"> elements inside the panel
   are unchanged (same name/value/class as before) so all existing
   selection/cascade JS keeps working exactly as it did with the old pill
   grid - this is a visual wrapper only. */
.ms-dropdown { position: relative; }
.ms-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--text-primary); cursor: pointer; text-align: start; }
.ms-toggle:hover { border-color: var(--brand-red); }
.ms-toggle-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-caret { color: var(--text-muted); font-size: 11px; flex: none; }
.ms-panel { position: absolute; z-index: 30; top: calc(100% + 4px); inset-inline-start: 0; min-width: 100%; width: max-content; max-width: 320px; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; box-shadow: 0 6px 18px rgba(11,11,11,0.12); }
.ms-panel[hidden] { display: none; }
.ms-option { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 13px; color: var(--text-primary); padding: 6px 4px; border-radius: 6px; }
.ms-option:hover { background: var(--surface-2, #f5f5f5); }
.ms-option input { width: auto; }

/* ROUND 59 - Item Master's live "Digital Menu Preview" panel (item 4): a
   two-column layout wraps the existing .form-card (unchanged) on the start
   side with a new sticky preview column on the end side. The preview card
   itself is a self-contained dark box (NOT dependent on body.survey-dark-bg,
   since this page as a whole stays on the admin light theme) that reuses the
   guest menu's OWN .guest-item-card/.guest-item-info/.guest-item-price
   classes verbatim, so the preview is pixel-accurate to the real public menu
   rendering (views/public-menu/menu.ejs) rather than a lookalike. JS wiring
   lives in menu-items/form.ejs. */
.menu-item-form-layout { display: flex; gap: 20px; align-items: flex-start; }
.menu-item-form-main { flex: 1; min-width: 0; }
/* ROUND 60 - item 1: the admin's own screenshot showed long (especially
   Arabic) names/descriptions wrapping awkwardly inside the original 300px
   column when there was clearly more free space beside it - widened to
   420px, then to 520px in this same round's own follow-up screenshot once
   the .main-content cap below was relaxed and even MORE room opened up on
   wide screens - the internal thumb/text was sized up to match both times
   rather than just letting text wrap into a still-narrow box. */
.menu-item-preview-col { flex: 0 0 520px; position: sticky; top: 16px; }
/* ROUND 62 item 4 - a draggable divider between .menu-item-form-main and
   .menu-item-preview-col replaces the old fixed 520px split: the admin can
   now grab this handle and freely widen/narrow either side as they wish,
   with the chosen width persisted (per-browser, via localStorage - see the
   JS in menu-items/form.ejs) so it's remembered next time this page loads.
   Sits between the two flex children as its own small fixed-width flex
   item; `align-self: stretch` (inherited by default from the container's
   own `align-items: flex-start` would otherwise leave it collapsed to its
   content height) makes it span the full row height so it's grabbable
   anywhere along the split, not just near the top. */
.menu-item-resize-handle {
  flex: 0 0 10px; align-self: stretch; cursor: col-resize; position: relative;
}
.menu-item-resize-handle::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  transform: translateX(-50%); background: var(--border); border-radius: 1px;
}
.menu-item-resize-handle:hover::after,
.menu-item-resize-handle.dragging::after { background: var(--brand-red); width: 3px; }
@media (max-width: 1300px) {
  .menu-item-form-layout { flex-direction: column; }
  .menu-item-preview-col { flex: 1 1 auto; width: 100%; position: static; }
  /* The two columns stack vertically below this breakpoint (see above) -
     there's no horizontal split left to drag at that point. */
  .menu-item-resize-handle { display: none; }
}
/* ROUND 60 - item 1 (follow-up): the app-wide .main-content max-width
   (1200px, below) left a visibly empty gray gutter beside the preview
   column on wide monitors even after widening the column itself - this
   page alone (routes/menuItems.js's formLocals() sets bodyClass) is allowed
   to use much more of the viewport, since it's the one page in the app
   with a second, non-form column that actually benefits from the space. */
body.menu-item-form-page .main-content { max-width: 1680px; }
.item-preview-panel {
  background: #14100e; border-radius: 12px; padding: 16px; border: 1px solid rgba(255,255,255,0.08);
}
.item-preview-panel h3 { color: #fff; font-size: 14px; margin: 0 0 4px; }
.item-preview-panel .muted.small { color: rgba(245,241,236,0.68); margin: 0 0 12px; }
.item-preview-card {
  background: rgba(255,255,255,0.04); border-radius: 10px; padding: 14px; border: 1px solid rgba(255,255,255,0.08);
}
.item-preview-card .guest-item-card { border-bottom: none; padding: 0; }
.item-preview-card .guest-item-card img,
.item-preview-thumb-placeholder {
  width: 88px; height: 88px; border-radius: 8px; flex: 0 0 88px; object-fit: cover;
}
.item-preview-thumb-placeholder {
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08);
  color: rgba(245,241,236,0.45); font-size: 28px;
}
/* ROUND 60 (follow-up) - real bug caught from the admin's own screenshot:
   the real item photo AND this placeholder icon were rendering at the same
   time whenever the item actually had an image. Cause: this class's own
   `display: flex` above has the same CSS specificity as the browser's
   built-in `[hidden] { display: none }` rule, and an author stylesheet
   always wins that tie over the user-agent default - so toggling the
   `hidden` property from menu-items/form.ejs's own updateImage() JS (which
   was already correct) was silently having no visual effect on this
   element. A same-specificity-but-more-specific selector (class + attribute)
   is what's needed to actually win over the plain class rule below it. */
.item-preview-thumb-placeholder[hidden] { display: none; }
.item-preview-card .guest-item-card .guest-item-info strong { font-size: 16px; }
.item-preview-lang-switch { display: flex; gap: 6px; margin-bottom: 10px; }
.item-preview-lang-switch button {
  padding: 3px 9px; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; font-size: 12px;
  color: rgba(255,255,255,0.75); background: transparent; cursor: pointer;
}
.item-preview-lang-switch button.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

.preset-buttons { margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.permission-group { margin-bottom: 14px; }
.permission-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 6px; }

.form-actions { margin-top: 20px; display: flex; gap: 10px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #8a1f1f; border: 1px solid #f3c1bd; }
.alert-success { background: #eaf7ea; color: #1e5c1e; border: 1px solid #bfe3bf; }
/* Round 50 - dismissible alerts (manual close button + optional JS
   auto-hide via data-auto-dismiss, see views/loyalty/marketing.ejs). */
.alert-dismissible { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; color: inherit; opacity: 0.6; }
.alert-close:hover { opacity: 1; }
/* Neutral "heads up, not a failure" tone - e.g. the SMTP test-email banner
   when no SMTP credentials are configured yet (the test email only got
   logged to data/email-test-log.json, same test-mode fallback every other
   outbound email in this app uses). */
.alert-warning { background: #fdf3e3; color: #8a5a1f; border: 1px solid #f0d9a8; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar select, .filter-bar input { width: auto; }

/* ---------------- Pagination (ROUND 67) ---------------- */
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
}
.pagination-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination-controls .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.pagination-page-numbers { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.pagination-page-number {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px;
  font-size: 13px; color: var(--text-muted);
}
.pagination-page-number:hover { background: rgba(0,0,0,0.05); text-decoration: none; }
.pagination-page-number.active { background: var(--brand-red); color: #fff; font-weight: 600; }
.pagination-ellipsis { padding: 0 4px; color: var(--text-muted); font-size: 13px; }
.pagination-page-size { margin-inline-start: 10px; display: inline-flex; align-items: center; gap: 6px; }
.pagination-page-size-select { width: auto; padding: 3px 6px; font-size: 12.5px; }

/* ---------------- Tables ---------------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--gridline); text-align: left; vertical-align: top; }
html[dir="rtl"] .data-table th, html[dir="rtl"] .data-table td { text-align: right; }
.data-table th { background: #f7f6f4; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.data-table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-good { background: #eaf7ea; color: #1e5c1e; }
.badge-bad { background: #fdecea; color: #8a1f1f; }
.badge-muted { background: #f0efec; color: var(--text-secondary); }
.badge-warn { background: #fff4e0; color: #8a5a00; }

/* Marks a Coupon/Campaign "Message Value" field as required by the
   currently-selected WhatsApp template - see whatsapp.templateRequirements()
   and the live sync script in campaigns/form.ejs and coupons/form.ejs.
   ROUND 103 (follow-up) - this used to sit INLINE inside the field's own
   <label> (e.g. "Coupon / Promo Code (required by this template)"), which
   made that one label wrap onto a second line in a narrow .form-row column
   while its sibling columns' one-line labels didn't - pushing that column's
   input down and reading as "misaligned", exactly the same class of bug
   .field-hint above was already introduced to solve for hint text. Fixed the
   same way: the badge now lives in its OWN block-level line, styled here
   with a reserved min-height (one line of this same 12px text) so every
   column in the row - including ones that never show a badge at all, via a
   permanently-empty placeholder using this same class, see campaigns/
   form.ejs - reserves identical space and every input starts at the same y
   position regardless of which columns actually have a badge showing. */
.tpl-req-badge { display: block; min-height: 18px; margin: 2px 0 4px; color: #8a1f1f; font-weight: 600; font-size: 12px; line-height: 1.4; }

/* The "map this template's variables" widget on Survey/Coupon/Campaign forms
   - one row per header/body/dynamic-button variable slot the selected
   WhatsApp template needs, each with a <select> pre-filled to that slot's
   default source (see whatsapp.templateRequirements()/parseVariableMapOverride()
   and the render function shared by surveys/form.ejs, coupons/form.ejs and
   campaigns/form.ejs). */
.varmap-section { margin: 8px 0 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-1); }
.varmap-section h4 { margin: 0 0 4px; }
.varmap-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; flex-wrap: wrap; }
.varmap-row label { min-width: 200px; font-weight: 600; font-size: 13px; margin: 0; }
.varmap-row select { flex: 1; min-width: 180px; }
.varmap-fixed-note { color: var(--text-muted); font-size: 13px; }
.varmap-footer-note { margin: 8px 0 0; color: var(--text-muted); font-size: 13px; }

.code-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.code-list code, code { background: #f0efec; padding: 2px 7px; border-radius: 5px; font-size: 13px; }

.link-line { margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h1 { font-size: 48px; color: var(--brand-red); }

/* ---------------- Dashboard ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text-primary); font-variant-numeric: proportional-nums; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.trend-svg { width: 100%; height: 160px; }

.hbar-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.hbar-row { display: grid; grid-template-columns: 160px 1fr 50px; align-items: center; gap: 10px; }
.hbar-label { font-size: 13px; color: var(--text-secondary); }
.hbar-track { background: var(--gridline); border-radius: 6px; height: 10px; overflow: hidden; }
.hbar-fill { background: var(--series-1); height: 100%; border-radius: 6px; }
.hbar-value { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Dashboard section grouping (Overview / Campaigns / By Brand) - a plain
   heading + top rule between each stat-grid, same visual weight as every
   other admin page's own <h3> section breaks. */
.dash-section { margin-top: 30px; }
.dash-section-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 12px; padding-top: 18px; border-top: 1px solid var(--gridline); }
.dash-section:first-child .dash-section-title { padding-top: 0; border-top: none; }

/* Delivery Success Rate tile only - reuses the same reserved status colors
   the donut charts below use for "good"/"critical", so a glance at the
   number alone already reads as healthy or not before you even reach the
   Campaign Status chart. */
.stat-value.stat-good { color: var(--status-good); }
.stat-value.stat-critical { color: var(--status-critical); }

/* Donut charts (Coupon Status / Campaign Status / Submissions & Coupons by
   Brand) - a ring built from stacked SVG circles (see partials/donut-chart)
   with a hero total in the middle and a legend (swatch + label + value +
   %) beside it, so identity never rests on color alone. */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 420px)); gap: 18px; margin-top: 18px; }
.donut-chart { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.donut-visual { position: relative; flex: none; width: 168px; height: 168px; }
.donut-visual svg circle { transition: stroke-dasharray 0.2s ease; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.donut-center-value { font-size: 26px; font-weight: 700; color: var(--text-primary); font-variant-numeric: proportional-nums; }
.donut-center-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 9px; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.donut-legend-label { color: var(--text-secondary); flex: 1; }
.donut-legend-value { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.donut-legend-pct { font-weight: 400; color: var(--text-muted); }

/* ---------------- Login ---------------- */
/* Dark themed to match the customer-facing survey/thank-you pages (all
   customer + staff-facing public pages share one dark brand look now - only
   the logged-in admin area (.app-shell) stays on the light theme). */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px;
  position: relative;
  overflow: hidden;
  background-color: #14100e;
  background-image: url('/images/patterns/wavedot.png');
  background-repeat: repeat;
  background-size: 340px auto;
  background-position: center 40px;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,7,6,0.55) 0%, rgba(10,7,6,0.90) 100%);
}
.login-card {
  position: relative;
  background: rgba(24, 19, 16, 0.92);
  color: #f5f1ec;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.login-logo { height: 120px; margin-bottom: 18px; }
.login-card h1 { font-size: 20px; color: #fff; }
.login-card p.muted { color: rgba(245,241,236,0.68); }
.login-card label { color: rgba(245,241,236,0.88); }
.login-card input {
  background: #fff;
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}
.login-card form { text-align: left; margin-top: 16px; }
html[dir="rtl"] .login-card form { text-align: right; }
/* The submit button had no top margin, so it sat flush against the password
   field right below it - visually reading as overlapping. Give it the same
   breathing room as the labels above each field. */
.login-card form button[type="submit"] { margin-top: 16px; }

/* ROUND 76 - same "submit button sat flush against the field right above it"
   fix as .login-card above, just never applied to .survey-card's own forms -
   caught on the customer portal's Profile page (the WhatsApp Number field,
   disabled, directly touching Save) but this fixes it for every .survey-card
   form site-wide (Reserve, Choose Restaurant, Sign Up, ...). */
.survey-card form button[type="submit"] { margin-top: 16px; }

/* ROUND 58 - the shared login page's Email/WhatsApp tab toggle (views/login.ejs)
   - same "pill row" visual language as .lang-switch, just centered and a
   touch larger since these are the primary choice on the page, not a
   secondary corner control. */
.login-tabs { display: flex; gap: 8px; margin-top: 18px; justify-content: center; }
.login-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  background: transparent;
  color: rgba(245,241,236,0.75);
  font-size: 13px;
  cursor: pointer;
}
.login-tab.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

/* ROUND 56 - QR scan mode (mobile app only): @capacitor-mlkit/barcode-scanning
   draws the native camera preview BEHIND the WebView, so while a scan is
   active this page's own background (and the .login-page::before darkening
   gradient) have to go fully transparent for the camera to show through -
   the .redeem-terminal-card itself is hidden rather than removed (so its
   form/inputs stay in the DOM, untouched) and replaced by the small
   viewfinder overlay in redeem-terminal.ejs. The `barcode-scanner-active`
   class is only ever added by JS that itself only runs inside the native
   app (see redeem-terminal.ejs's termStartScan()) - a plain browser tab
   never sees any of this. */
body.barcode-scanner-active { background: transparent; }
body.barcode-scanner-active .login-page,
body.barcode-scanner-active .login-page::before { background: transparent; }
body.barcode-scanner-active .redeem-terminal-card { visibility: hidden; }
.term-scan-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.term-scan-viewfinder {
  width: 240px;
  height: 240px;
  border: 3px solid #fff;
  border-radius: 16px;
  box-shadow: 0 0 0 999px rgba(0,0,0,0.45);
}
.term-scan-hint {
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  max-width: 280px;
  text-align: center;
}

/* ---------------- Redeem terminal (the separate /redeem link) ---------------- */
/* Reuses .login-card's dark styling for a consistent look, with a couple of
   tweaks: a slightly wider card (room for a big code field + branch picker)
   and a large, easy-to-read/tap coupon code input. */
.redeem-terminal-card { max-width: 420px; }
.redeem-terminal-logo { height: 90px; }
.redeem-terminal-user { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: -6px; }
/* Sign out used to be a plain underlined text link here, which read as an
   accidental piece of text rather than an actual control - it's now a real
   small ghost button (same .btn-ghost already used for the card's other
   dark-background buttons). The "Signed in as ..." text sits in its own
   bordered pill (same radius as the button, a plain outline rather than a
   filled background so it still reads as a label, not a second button) and
   both share the same line-height/vertical padding rhythm as the button, so
   the two sit level on one line instead of the text's plain baseline
   looking mismatched against the button's boxed shape. */
.redeem-terminal-user-badge {
  /* inline-block, not inline-flex: flexbox can collapse the plain
     whitespace text node between "Signed in as" and the <strong> name to
     zero width, running the two words together - inline-block has no such
     bug and still centers fine as a sibling flex item in the outer
     .redeem-terminal-user row. font-size/line-height/padding/border-width
     here are deliberately identical to the .btn-sm override just below -
     two boxes with a different total height still look "not on the same
     line" even when their centers are aligned, since one box's top/bottom
     edges stick out past the other's. Matching the full box model (not
     just centering) is what actually lines the two edges up. */
  display: inline-block;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 18px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(245,241,236,0.75);
  white-space: nowrap;
}
/* Selector needs 3 class-level components (not 2) to actually beat
   `.login-card form button[type="submit"]` below, which gives every submit
   button inside a .login-card form a 16px top margin (sized for the
   login/password form's fields stacked above it, not relevant to this
   inline sign-out button) - `.login-card form button[type="submit"]` has
   the SAME 2-class-level specificity as a plain `.redeem-terminal-user
   .btn-sm` override once its 2 element-type selectors are counted, so a
   two-class override was silently losing the cascade despite appearing
   later in the file. Routing through `.inline-form` (the form's own class,
   already in the markup) instead of the element name `form` clears that. */
.redeem-terminal-user .inline-form {
  /* .login-card form (further down this file) also puts a 16px top margin
     on the form itself, not just the button inside it - both need
     resetting here, or the form's own margin alone still pushes the button
     down out of line with the badge even after the button's own margin is
     zeroed. */
  margin-top: 0;
}
.redeem-terminal-user .inline-form .btn-sm {
  box-sizing: border-box;
  font-size: 13px;
  line-height: 18px;
  padding: 6px 9px;
  white-space: nowrap;
  margin-top: 0;
}
.redeem-terminal-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  font-family: monospace;
}
.redeem-terminal-button { font-size: 16px; padding: 12px 16px; margin-top: 14px; }

/* Redeem/Stamp mode toggle: two centered pill buttons, each with its own
   fill color once selected (red for Redeem Coupon - the same accent used
   everywhere else on this page - gold for Give Stamp, echoing the gold
   used for the Loyalty card's own stamp styling elsewhere in the app) -
   a plain pair of native radio dots read as an afterthought and sat flush
   against the card's left edge instead of centered under the heading. The
   native radio input is visually hidden (not removed - it's still what
   actually gets submitted and is still keyboard/focus accessible) in favor
   of styling the whole label as the control, so "selected" reads as an
   obvious solid-filled shape rather than a small dot next to plain text. */
.term-mode-toggle { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.term-mode-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(245,241,236,0.75);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.term-mode-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.term-mode-pill:has(input:focus-visible) { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.term-mode-pill-redeem.term-mode-pill-active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.term-mode-pill-stamp.term-mode-pill-active { background: #F5C518; border-color: #F5C518; color: #241c02; }

/* ---------------- Public survey page ---------------- */
.survey-page { max-width: 640px; margin: 0 auto; padding: 0 0 40px; }
.survey-topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.survey-topbar .lang-switch a { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; margin-inline-end: 4px; color: var(--text-secondary); }
.survey-topbar .lang-switch a.active { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }

.survey-banner-video { overflow: hidden; }
.survey-banner-video video { width: 100%; display: block; max-height: 320px; background: #000; }
.survey-hero {
  height: 240px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 480px) { .survey-hero { height: 300px; } }
/* ROUND 95 - "increase the hero banner size" (Brand > Portal Banners only -
   the survey/thank-you/loyalty pages above use this same .survey-hero base
   for their own, unrelated hero photo and were NOT part of this ask, so
   their height stays exactly as it was). Opt-in via this second class on
   the same element (customer-portal/home.ejs and
   partials/guest-menu/hero-widget.ejs only) rather than raising
   .survey-hero itself. */
.survey-hero.brand-hero-banner { height: 340px; }
@media (min-width: 480px) { .survey-hero.brand-hero-banner { height: 420px; } }
/* One .survey-hero-slide per banner image, stacked and cross-faded via
   opacity - see the inline auto-advance script in views/public/survey.ejs.
   With a single banner there's just one slide, already .active, so this
   renders identically to the old single-image hero. */
.survey-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
  /* Round 63 - a hidden/inactive slide sits in the exact same stacked
     position as the active one (see .survey-hero above), so without this its
     own CTA button (below) would still be clickable even at opacity: 0.
     Only the currently-active slide should ever be interactive. */
  pointer-events: none;
}
.survey-hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
/* Round 63 - a banner slide can now be a short looping video instead of a
   background-image div (see views/customer-portal/home.ejs /
   views/public-menu/menu.ejs) - sized/cropped the same way a background
   image is (cover, centered). */
.survey-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Round 63 - each banner's own required call-to-action button, overlaid on
   its slide (photo or video) - bottom-left keeps it clear of the language
   switcher in the top-right corner. */
.survey-hero-cta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
}
html[dir="rtl"] .survey-hero-cta { left: auto; right: 16px; }

/* Dark, real-photo theme for the customer-facing survey + thank-you pages only
   (admin/login stay on the light theme). Set via bodyClass: 'survey-dark-bg'
   from src/routes/public.js. The photo itself lives in the fixed-height
   .survey-hero band (below) rather than on body directly, so it always
   renders at a sane, uncropped size no matter how long the survey form is. */
body.survey-dark-bg {
  background-color: #14100e;
  min-height: 100vh;
}
body.survey-dark-bg .survey-topbar .lang-switch a {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25);
}
body.survey-dark-bg .survey-topbar .lang-switch a.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

body.survey-dark-bg .survey-card {
  background: rgba(24, 19, 16, 0.90);
  color: #f5f1ec;
  border: 1px solid rgba(255,255,255,0.08);
}
body.survey-dark-bg .survey-card h1 { color: #fff; }
body.survey-dark-bg .survey-card p.muted,
body.survey-dark-bg .survey-card .muted { color: rgba(245,241,236,0.68); }
body.survey-dark-bg .survey-card label { color: rgba(245,241,236,0.88); }
body.survey-dark-bg .survey-card input,
body.survey-dark-bg .survey-card select,
body.survey-dark-bg .survey-card textarea {
  background: #fff;
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}
/* ROUND 40 - the Loyalty join page's Terms & Conditions box
   (views/public/loyalty-join.ejs) is a light .card nested INSIDE the dark
   .survey-card above - it and its "I agree" checkbox label keep their own
   near-white background regardless of the dark page around them, so the
   pale text-color rules just above (meant for text sitting directly on the
   dark .survey-card background) made both almost unreadable instead.
   Scoped to these two dedicated classes only, so no other .card/.muted/
   .checkbox-pill usage elsewhere on a dark page is affected. */
body.survey-dark-bg .survey-card .loyalty-terms-box,
body.survey-dark-bg .survey-card .loyalty-terms-box p.muted {
  color: #000;
  font-weight: 700;
}
body.survey-dark-bg .survey-card label.loyalty-terms-agree {
  color: #000;
  font-weight: 700;
}
/* ROUND 58 - same bug class as the loyalty-terms-box fix above, just never
   caught for it until now: ANY plain light `.card` nested inside a dark
   `.survey-card` (Loyalty/Coupons/Reservations history rows, the new
   reservation review summary on reserve-review.ejs) inherits the pale
   near-white text color meant for text sitting directly on the dark
   `.survey-card` background - on the near-white `.card` background
   underneath it, that text was almost unreadable (caught via a live
   Playwright screenshot during Round 58 verification). Scoped to `.card`
   specifically so nothing else on a dark page is affected. */
body.survey-dark-bg .survey-card .card {
  color: var(--text-primary);
}
body.survey-dark-bg .survey-card .card .muted,
body.survey-dark-bg .survey-card .card p.muted {
  color: var(--text-secondary);
}
body.survey-dark-bg .yesno-option,
body.survey-dark-bg .choice-option {
  border-color: rgba(255,255,255,0.18);
  color: rgba(245,241,236,0.92);
}
body.survey-dark-bg .yesno-option:has(input:checked),
body.survey-dark-bg .choice-option:has(input:checked) {
  border-color: var(--brand-red);
  background: rgba(210,35,29,0.16);
}

/* ROUND 54 - the live survey page's three regions (language switch/menu
   button, banner, and the form itself) used to run together - a
   transparent topbar, a full-bleed hero fading into the page, and a
   card stripped of its own background so it sat directly on the page
   background too. The user asked for these to read as three clearly
   separate boxed sections with a small gap between each instead, so:
   the old "no separate card panel" override below is gone (the live
   page's form now gets the same boxed .survey-card look every other
   page here already uses), the ROUND 53 fade-to-background mask on the
   hero is gone too (a boxed section has a clean edge, not a blend), and
   the topbar just below gets its own boxed treatment to match. */
body.survey-dark-bg.survey-live .survey-topbar {
  background: rgba(24, 19, 16, 0.90);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  margin: 16px;
}

/* Standalone version of the same fade, for pages that DO keep a separate
   card panel below the hero (Loyalty's join/card pages) - the 40px gap
   before .thankyou-card already keeps the two from touching, but a hard
   photo edge right above a solid dark card panel still read as the photo
   getting clipped/"overlapping" the card, since both are similarly dark.
   Fading the bottom of the photo to transparent removes that hard edge
   instead of adding more empty space. Opt-in via this class (not tied to
   .survey-live, which also strips the card's own background - not wanted
   here). */
.survey-hero-fade {
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}

/* Loyalty's own join/card pages (views/public/loyalty-join.ejs,
   views/public/loyalty-card.ejs) want the hero photo and the card panel
   below it to read as two clearly separate, evenly-matched blocks rather
   than the survey pages' deliberate "touching, faded into each other" look
   above - same side inset as .survey-card (16px) so the two line up to the
   same width, rounded corners to match, and a real gap between them
   instead of relying on a fade to hide a hard edge. Used INSTEAD of
   .survey-hero-fade, not alongside it. */
.survey-hero-matched {
  margin: 0 16px 16px;
  border-radius: var(--radius);
}

.survey-card {
  background: var(--surface-1);
  margin: 0 16px;
  position: relative;
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.35);
}

/* ROUND 76 - a persistent top-right Logout for the customer portal, pinned
   to the viewport (not the card) so it reads the same regardless of where
   in a long page it happens to render in the DOM - see customer-portal/
   _nav.ejs (included on most portal pages) and landing.ejs/
   choose-restaurant.ejs (which don't include _nav but want the same
   control). Mirrors to the left in RTL rather than flipping which physical
   corner "top right" means - it's the CUSTOMER'S right hand that matters,
   not the logical start/end side. */
.portal-logout-fixed { position: fixed; top: 14px; right: 14px; z-index: 40; }
html[dir="rtl"] .portal-logout-fixed { right: auto; left: 14px; }
.portal-logout-fixed .btn { background: rgba(0,0,0,0.35); color: #fff; border-color: rgba(255,255,255,0.25); }

/* ROUND 76 - the customer portal Home page's brand logo was the same small
   42px size as every plain survey-form logo (.survey-logo) - bumped up
   specifically for Home's own bigger, more prominent placement rather than
   changing .survey-logo's base size everywhere else (login/signup/survey/
   thank-you pages, the guest-menu branch picker) that were sized
   deliberately smaller and unrelated to this ask. */
.portal-home-logo { height: 84px; }
.survey-logo { height: 42px; margin-bottom: 14px; }

/* ---------------- Marketing image gutters (Settings -> Marketing Images) ---------------- */
/* Fills the empty side margins either side of the centered 640px survey
   column with a slow bottom-to-top scrolling strip of up to 4 admin-uploaded
   images. Hidden below 1100px, where that side space is too tight to spare. */
.marketing-gutter {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 220px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.marketing-gutter-left { left: 0; }
.marketing-gutter-right { right: 0; }
.marketing-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  animation: marketing-scroll-up 36s linear infinite;
}
.marketing-track img {
  width: 100%;
  display: block;
  border-radius: 10px;
  opacity: 0.85;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
@keyframes marketing-scroll-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@media (min-width: 1100px) {
  .marketing-gutter { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .marketing-track { animation: none; }
}

/* ---------------- Per-brand "roaming" item images (Admin -> Brands -> Survey Page Identity) ---------------- */
/* Replaces the fixed vertical-scroll gutters above, when the current
   branch's Brand has its own item images uploaded (e.g. a burger/juice/steak
   icon) - see partials/marketing-gutters.ejs. Each image floats up the full
   page height on a loop (item-roam-rise) while independently swaying side to
   side (item-roam-sway), with per-image duration/delay/drift set inline so a
   handful of images read as freely drifting rather than moving in lockstep.
   Hidden below the same 1100px width the old gutters used - narrower than
   that, there's no side space to spare beside the centered survey card. */
.item-roam-field {
  display: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 1100px) {
  .item-roam-field { display: block; }
}
.item-roam-img {
  position: absolute;
  bottom: -18vh;
  opacity: 0.8;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
  animation-name: item-roam-rise, item-roam-sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-direction: normal, alternate;
}
@keyframes item-roam-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-136vh); }
}
@keyframes item-roam-sway {
  from { margin-left: calc(var(--roam-drift, 20px) * -1); }
  to { margin-left: var(--roam-drift, 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .item-roam-field { display: none; }
}

.question-block { margin-bottom: 18px; }

/* Star rating (replaces the old numbered-button scale) — 5 radios in reverse
   DOM order + row-reverse layout is the classic CSS-only star-rating trick:
   checking/hovering a star fills every star at-or-below it, no JS needed. */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.star-rating input { display: none; }
/* Extra-specific selectors here so this beats the generic
   "body.survey-dark-bg .survey-card label" text-color rule above. */
body.survey-dark-bg .survey-card .star-rating label,
.survey-card .star-rating label {
  font-size: 34px;
  line-height: 1;
  color: rgba(255,255,255,0.30);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}
body.survey-dark-bg .survey-card .star-rating input:checked ~ label,
body.survey-dark-bg .survey-card .star-rating label:hover,
body.survey-dark-bg .survey-card .star-rating label:hover ~ label,
.survey-card .star-rating input:checked ~ label,
.survey-card .star-rating label:hover,
.survey-card .star-rating label:hover ~ label {
  color: #f5a623;
}
.star-rating label:active { transform: scale(0.9); }

.yesno-scale { display: flex; gap: 10px; }
.yesno-option, .choice-option {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  flex: 1; font-weight: 500; cursor: pointer;
}
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.yesno-option input, .choice-option input { width: auto; }

.thankyou-card { text-align: center; margin-top: 40px; }
.thankyou-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--status-good); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.coupon-box {
  position: relative;
  overflow: hidden;
  margin: 20px 0;
  padding: 18px;
  border: 2px dashed var(--brand-red);
  border-radius: 12px;
  background: #fff7f6;
}
.coupon-box::before {
  content: '';
  position: absolute;
  top: -24px;
  inset-inline-end: -24px;
  width: 110px;
  height: 110px;
  background: url('/images/patterns/circle-medallion.png') no-repeat center / contain;
  opacity: 0.14;
}
.coupon-box > * { position: relative; z-index: 1; }
.coupon-reward { font-weight: 600; margin-bottom: 8px; }
.coupon-code { font-size: 28px; font-weight: 800; letter-spacing: 3px; color: var(--brand-red); font-family: monospace; }

.brand-divider { display: block; height: 26px; margin: 6px auto 14px; opacity: 0.85; }

@media (max-width: 480px) {
  .main-content { padding: 18px; }
  .sidebar { width: 210px; }
}

/* ---------------- WhatsApp template live preview (phone mockup) ---------------- */
.template-builder-layout { display: flex; gap: 24px; align-items: flex-start; }
.template-builder-form { flex: 1; min-width: 0; }
.template-preview-col { width: 300px; flex-shrink: 0; position: sticky; top: 20px; }
.template-preview-col h4 { margin-bottom: 10px; }
.phone-mock {
  background: #111;
  border-radius: 30px;
  padding: 14px 8px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.28);
}
.phone-mock-notch { width: 70px; height: 16px; background: #111; border-radius: 0 0 10px 10px; margin: 0 auto 8px; }
.phone-screen {
  background: #e5ddd5;
  border-radius: 16px;
  padding: 14px 10px;
  min-height: 340px;
}
.wa-bubble {
  background: #fff;
  border-radius: 8px;
  padding: 8px 9px;
  max-width: 100%;
  box-shadow: 0 1px 1px rgba(0,0,0,0.12);
  font-size: 13px;
  color: #111;
}
.wa-bubble-header-media {
  background: #d8d8d8;
  border-radius: 6px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8a8a;
  font-size: 12px;
  margin-bottom: 6px;
  overflow: hidden;
}
.wa-bubble-header-media img { width: 100%; height: 100%; object-fit: cover; }
.wa-bubble-header-text { font-weight: 700; margin-bottom: 4px; }
.wa-bubble-body { white-space: pre-wrap; word-break: break-word; }
.wa-bubble-footer { color: #8696a0; font-size: 11px; margin-top: 6px; }
.wa-bubble-time { text-align: right; color: #8696a0; font-size: 10px; margin-top: 4px; }
.wa-bubble-buttons { margin-top: 2px; }
.wa-bubble-button {
  display: block;
  text-align: center;
  padding: 8px 4px;
  color: #00a5f4;
  font-size: 13px;
  background: #fff;
  border-top: 1px solid #e9edef;
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
}
@media (max-width: 900px) {
  .template-builder-layout { flex-direction: column; }
  .template-preview-col { width: 100%; position: static; }
}

/* ---------------- Round 86 - Guest Menu Designer inline Live Preview -----------------
   Same two-column "form + sticky phone mockup" layout as the WhatsApp
   template editor above (.template-builder-layout/.phone-mock/.phone-mock-notch
   are reused as-is - a dark rounded frame with a notch has nothing
   WhatsApp-specific about it) - only the screen inside the frame differs,
   since this preview holds a real, scrollable page in an <iframe> rather
   than a single static bubble. */
.designer-layout { display: flex; gap: 24px; align-items: flex-start; }
.designer-form-col { flex: 1; min-width: 0; }
.designer-preview-col { width: 360px; flex-shrink: 0; position: sticky; top: 20px; }
.designer-preview-col h4 { margin-bottom: 4px; }
.designer-preview-branch-row { margin-bottom: 10px; }
.designer-preview-branch-row select { width: 100%; }
.device-frame-screen {
  background: #14100e;
  border-radius: 16px;
  overflow: hidden;
  height: 640px;
  position: relative;
}
.device-frame-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.designer-preview-updating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.designer-preview-updating.is-visible { opacity: 1; }
.designer-preview-note { margin-top: 8px; }
@media (max-width: 1000px) {
  .designer-layout { flex-direction: column; }
  .designer-preview-col { width: 100%; position: static; }
  .device-frame-screen { height: 70vh; }
}

/* ---------------- Round 58 - Public guest digital menu (routes/publicMenu.js) ----------------
   The new no-login "front door" (item 12): a public, brand-themed, view-only
   menu reached via /menu/:brandSlug(/:branchSlug) or a per-brand QR code.
   Shares the survey pages' dark-theme/hero/lang-switch chrome
   (body.survey-dark-bg, .survey-topbar, .survey-hero above) but needs its
   own wider page shell (a whole menu, not a short form) plus new tab strip/
   category strip/item card/account-panel styles below. */
/* ROUND 83 - shown only when routes/guestMenuDesigner.js's own preview
   route renders this same template with the current DRAFT's sections, so
   nobody mistakes an in-progress, unpublished edit for the live page. */
.guest-menu-preview-banner {
  position: sticky; top: 0; z-index: 30; text-align: center; padding: 8px 16px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; background: #ffcc00; color: #1c1613;
}
.guest-menu-page { max-width: 900px; margin: 0 auto; padding: 0 0 90px; }
/* ROUND 90 - "develop exactly same": the classic sections-based page's own
   top bar (lang switch + account avatar) now shares the SAME fixed chrome
   background as the header/hero/footer just below/around it (see
   --guest-chrome-color, set per-brand in partials/header.ejs from the
   Theme tab) - sits flush against .guest-menu-header-row below with no gap,
   so the two read as one continuous dark band, matching the reference. Only
   scoped here (.guest-menu-page .survey-topbar), never the bare
   .survey-topbar every other customer page also uses. */
.guest-menu-page .survey-topbar { background: var(--guest-chrome-color, #141414); margin: 0; padding: 12px 16px; }
/* ROUND 90 (follow-up) - segmented-pill language switch (matching the
   reference's own `.lang-toggle`), scoped to the guest menu's chrome only -
   never the bare `.lang-switch` every other customer page also uses. */
.guest-menu-page .survey-topbar .lang-switch, .canvas-lang-switch-bar .lang-switch {
  display: inline-flex; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; margin: 0;
}
.guest-menu-page .survey-topbar .lang-switch a, .canvas-lang-switch-bar .lang-switch a {
  border: none; border-radius: 0; margin: 0; padding: 6px 14px;
}
.guest-menu-page .survey-topbar .lang-switch a:first-child, .canvas-lang-switch-bar .lang-switch a:first-child {
  border-inline-end: 1px solid rgba(255,255,255,0.25);
}
/* ROUND 80 - the brand-name heading previously had an inline
   `style="color:#fff; margin:8px 0 2px;"` on the <h1> itself, which always
   beats any stylesheet rule regardless of specificity - moved here (as its
   own class, not a bare `.guest-menu-page h1`, so it doesn't also affect
   the item-detail page's own <h1>, which is the item's name, not the brand's)
   so the Brand admin's new Guest Menu Label Color/Font override in
   partials/header.ejs can actually compete for it via the normal cascade. */
/* ROUND 81 - margin trimmed for the new inline-beside-the-logo layout (see
   .guest-menu-header-row below) - the old 8px top margin was sized for
   sitting under a big centered logo, and looked misaligned next to a small
   inline one. */
.guest-menu-brand-name { color: #fff; margin: 0 0 1px; }
/* ROUND 79 - top bar's right-side cluster (Logout + the hamburger menu
   toggle, replacing the old bottom-corner account-panel button) and the
   bigger brand logo ("logo needs to be bigger" - was a hardcoded 64px inline
   style, same "give it its own class" precedent as .portal-home-logo). */
/* ROUND 90 (follow-up) - `position: relative` so .guest-account-panel below
   (now an anchored dropdown, not a full-screen sheet) positions itself
   relative to THIS wrapper rather than the nearest other positioned
   ancestor - see account-panel.ejs's own comment for why trigger+panel now
   render adjacent, inside this same element. */
.guest-menu-topbar-actions { display: flex; align-items: center; gap: 8px; position: relative; }
/* ROUND 81 - default logo size dropped from 96px to 56px: the logo now sits
   INLINE beside the brand name (see .guest-menu-header-row below) instead of
   centered above it, per the admin's reference screenshot - 96px only made
   sense for the old centered layout. Still fully overridable per-brand via
   the Guest Menu Branding "Logo Size" field (partials/header.ejs), whose own
   default also moved to match (services/brands.js's
   GUEST_MENU_LOGO_SIZE_DEFAULT). */
.guest-menu-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; flex: none; }
/* ROUND 80 - circular avatar trigger for the account panel, replacing the
   plain ☰ button - var(--brand-red) so it automatically follows whichever
   color this brand's own primaryColor sets (see views/partials/header.ejs's
   --brand-red override), rather than a fixed color unrelated to the brand. */
.guest-menu-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--brand-red); color: #fff;
  font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
/* ROUND 81 - social icons now sit left-aligned under the brand/branch name
   (inside .guest-menu-header-text) instead of centered full-width - smaller
   too, to match the reference's compact inline header. */
.guest-menu-social { display: flex; gap: 8px; justify-content: flex-start; padding: 6px 0 0; }
.guest-menu-social a {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.10); color: #fff; font-size: 12px; border: 1px solid rgba(255,255,255,0.18);
}
/* ROUND 81 - "its not similar design": the admin's reference shows the logo
   and brand/branch name/social row as ONE left column, with Reserve/Share
   Feedback/Change Branch as a stacked button column on the right - replacing
   the old fully-centered logo-above-name block entirely. */
/* ROUND 90 - fixed dark "chrome" band, same reasoning as .guest-menu-page
   .survey-topbar just above - var(--guest-chrome-color) instead of a bare
   hardcoded color so the Theme tab's Chrome Color field (and either of the
   two built-in Theme Presets) actually reaches it. */
.guest-menu-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 16px; background: var(--guest-chrome-color, #141414); }

/* ROUND 90 - hero eyebrow/heading/subtext text overlay (optional - see
   hero-widget.ejs's own comment) and dot pagination, replacing the plain
   cross-fade's own bare CTA button with the reference's fuller hero copy
   block. `.guest-menu-hero-band` also gets the SAME chrome color as a
   background fallback (visible only before a slide's own photo/video has
   painted, or if a brand somehow has an incomplete slide). */
.guest-menu-hero-band { background: var(--guest-chrome-color, #141414); }
.guest-menu-hero-copy {
  position: absolute; inset-inline-start: 20px; bottom: 64px; z-index: 2; max-width: 80%;
  color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}
.guest-menu-hero-heading { font-size: 24px; line-height: 1.2; margin: 0 0 6px; color: #fff; }
@media (min-width: 480px) { .guest-menu-hero-heading { font-size: 32px; } }
.guest-menu-hero-subtext { font-size: 13px; color: rgba(255,255,255,0.85); margin: 0; max-width: 40ch; }
.guest-menu-hero-cta { background: var(--brand-red); border-color: var(--brand-red); font-weight: 700; }
.guest-menu-hero-dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.guest-menu-hero-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.guest-menu-hero-dot.active { background: #fff; width: 18px; border-radius: 3px; transition: width 0.3s ease; }
.guest-menu-header-identity { display: flex; gap: 10px; align-items: flex-start; min-width: 0; flex: 1; }
.guest-menu-header-text { min-width: 0; }
.guest-menu-brand-name { font-size: 17px; line-height: 1.25; }
.guest-menu-branch-name { margin: 1px 0 0; }
.guest-menu-header-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: none; }
.guest-menu-header-btn {
  display: block; padding: 6px 12px; border-radius: var(--guest-btn-radius, 999px); font-size: 11px; font-weight: 600; text-align: center;
  white-space: nowrap; text-decoration: none; background: rgba(255,255,255,0.08); color: #f5f1ec;
  border: 1px solid rgba(255,255,255,0.20);
}
/* ROUND 85 - a Custom Button (services/guestMenuLayouts.js) rendered in this
   same header actions column reuses .guest-menu-header-btn for its shape/
   sizing; -secondary looks identical to the built-in Reserve/Feedback/Change
   Branch buttons, -primary borrows the brand-red treatment those get too. */
.guest-menu-header-btn-secondary { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.20); color: #f5f1ec; }
.guest-menu-header-btn:hover { background: rgba(255,255,255,0.14); text-decoration: none; }
.guest-menu-header-btn-primary { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.guest-menu-header-btn-primary:hover { background: var(--brand-red-dark); }

/* ROUND 90 - "develop exactly same": everything below - Menu Group tabs,
   category strip, item cards, grid/list toggle - now sits on the cream/
   white .guest-menu-content-body card instead of the old all-dark page, so
   every base color below flipped from light-on-dark to dark-on-light. All
   of it is still fully overridable via the Theme tab's Label/Text Color
   fields (see partials/header.ejs's inline <style>, scoped to
   .guest-menu-content-body's own descendants) exactly as before - only the
   BUILT-IN fallback (what shows before/without a theme override) changed. */
/* ROUND 90 - the one element that still reads the brand's Theme tab bg/
   label/text color+font (see partials/header.ejs's inline <style>, scoped
   to this class and its descendants) - shared by both the classic
   sections-based page and the Canvas builder since both render
   menu-widget.ejs, whose own root now carries this class. Rounded top
   corners + a slight negative margin let it visually overlap the hero
   band's bottom edge, same "content sits on top of the chrome" read as the
   reference. Falls back to the same cream default as
   guestMenuLayouts.js's DEFAULT_CONTENT_BG_COLOR when, for whatever reason,
   the inline theme <style> block isn't present (defaultTheme() itself
   never leaves this blank, so that should never happen in practice). */
.guest-menu-content-body {
  background: #F7F3EC;
  border-radius: 18px 18px 0 0;
  position: relative;
  z-index: 2;
  padding-bottom: 24px;
}
/* Only the classic sections-based page has hero/menu adjacent in normal
   document flow - pulling the content body up to overlap the hero's bottom
   edge here reads as intentional layering. The Canvas builder positions
   every block independently (explicit x/y, not necessarily adjacent), so
   this same trick there could just as easily overlap the WRONG block -
   left flat (no negative margin) for .canvas-page. */
.guest-menu-page .guest-menu-content-body { margin-top: -14px; }
.guest-menu-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-red); text-align: center; padding: 22px 16px 0; }
.guest-menu-choose-heading { font-size: 22px; text-align: center; margin: 4px 0 0; padding: 0 16px; color: #1C1613; }

/* Menu Group tabs (item 3's groups - Main Menu / Dinner Offer / Lunch Offer) -
   same pill-row visual language as .login-tabs/.lang-switch, sized for a
   primary navigation role on this page. ROUND 90 (follow-up) - sticky, like
   the Ember House reference's own `.menu-tabs-wrap` - `background-color:
   inherit` picks up whichever color .guest-menu-content-body is currently
   themed to (cream, burgundy, ...) rather than a second hardcoded value that
   could drift from it. */
.menu-group-tabs { display: flex; gap: 8px; padding: 18px 16px 12px; overflow-x: auto; justify-content: center; position: sticky; top: 0; z-index: 15; background-color: inherit; }
.menu-group-tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: var(--guest-btn-radius, 999px); border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04); color: #5B5049; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.menu-group-tab.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

/* ROUND 90 (follow-up) - "build Ember House's distinct layout for real": a
   two-column layout at desktop widths - a sticky category sidebar rail on
   the left (see .category-rail below), the category sections/item grid on
   the right - matching that reference's own `.layout`/`.cat-rail` structure.
   A phone-width screen keeps the original single-column flow with the
   horizontal .category-strip instead (see the @media block further down for
   which of the two nav groups is actually visible at any given width). */
.guest-menu-layout { display: block; }
.guest-menu-sections { min-width: 0; }

/* Category strip - horizontal row of icon+label buttons that scroll-jump to
   that category's section below (see the guest menu's own <script>). ROUND
   90 - `.active` (the first category by default, or whichever was last
   tapped - see menu-widget.ejs's own script) now reads as a filled dark
   circle vs. the others' plain outline, matching the reference. */
.category-strip { display: flex; gap: 14px; padding: 14px 16px; overflow-x: auto; }
.category-strip-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; text-align: center; cursor: pointer; background: none; border: none; }
.category-strip-icon {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,0.05); background-size: cover; background-position: center;
  border: 1px solid rgba(0,0,0,0.12);
}
.category-strip-item.active .category-strip-icon {
  background-color: #1C1613; border-color: #1C1613;
  background-size: cover; background-position: center;
}
.category-strip-item.active span { font-weight: 700; }
.category-strip-item span { font-size: 11px; color: #5B5049; line-height: 1.2; }

/* ROUND 90 (follow-up) - the desktop sidebar rail itself, hidden by default
   (phone-first) and switched on at the same 960px breakpoint the Canvas
   builder already uses as its own "phone vs. everything wider" line (see
   .canvas-viewport-desktop above) - one consistent cutoff app-wide rather
   than a second, different one just for this. */
.category-rail { display: none; }
.category-rail-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; color: #1C1613; font-size: 13px;
}
.category-rail-item:hover { background: rgba(127,127,127,0.10); }
.category-rail-item.active { background: rgba(127,127,127,0.14); border-color: var(--brand-red); font-weight: 700; }
.category-rail-icon {
  width: 32px; height: 32px; flex: none; border-radius: 8px; background: rgba(127,127,127,0.18); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.category-rail-name { flex: 1; min-width: 0; }
.category-rail-count { color: #8A7F73; font-size: 11px; }
@media (min-width: 768px) {
  .guest-menu-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; padding: 0 16px; }
  .category-rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 52px; padding-top: 16px; }
  .guest-menu-sections .category-strip { display: none; }
  .guest-menu-sections { padding-inline-start: 0; }
}

.guest-menu-category-section { padding: 8px 16px 4px; }
@media (min-width: 768px) { .guest-menu-category-section { padding: 8px 0 4px; } }
.guest-menu-category-section h2 { font-size: 17px; color: #1C1613; margin: var(--guest-section-gap, 18px) 0 10px; }

/* Grid/list view toggle - two small icon buttons above each category's item
   list (menu.outbacksaudi.com's own reference point). brand.guestMenuDefaultView
   only picks which one starts active - see routes/publicMenu.js. */
.guest-menu-view-toggle { display: flex; justify-content: flex-end; gap: 6px; padding: 4px 16px 0; }
.guest-menu-view-btn {
  width: 34px; height: 30px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.04); color: #6B5F55; font-size: 15px; cursor: pointer;
}
.guest-menu-view-btn.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

/* .guest-item-card is an <a> (tapping an item opens its detail page - see
   public-menu/item.ejs), so it needs its own reset since a real link
   otherwise renders underlined/blue. Two layouts share the same markup:
   "list" (default) is the original compact horizontal row; "grid" (item 4's
   "Photo Cards" option) stacks a full-width photo above the info, closer to
   menu.outbacksaudi.com's own default card. */
.guest-item-card {
  display: flex; gap: 12px; padding: var(--guest-card-gap, 10px) 0; border-bottom: 1px solid rgba(0,0,0,0.08);
  text-decoration: none; color: inherit; position: relative;
}
.guest-item-card img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--guest-card-radius, 8px); flex: 0 0 64px; }
/* ROUND 97 - "RTL not functioning properly, the page alignment not
   correct": a screenshot showed the photo pinned to one edge of the screen
   and the price/Add-to-Cart pill pinned to the OPPOSITE edge, with a huge
   empty gap between them - reproducing that live at every viewport this
   round couldn't recreate it (the flex-row-reverses-in-RTL mechanics below
   check out correctly in this build), which points at the page being viewed
   on an out-of-date deployment. Capping this column's width regardless is a
   safe hardening either way: `flex: 1` had NO ceiling, so if the outer
   `.guest-menu-page` (max-width: 900px above) is ever missing/overridden on
   a given deployment, this column would keep stretching to fill the entire
   remaining row - however wide that is - dragging the price along with it
   to whatever edge the row's other end lands on. 480px is comfortably wider
   than this column ever needs to be on a normal, correctly-constrained
   page, so nothing changes there; it only stops the worst-case stretch.
*/
.guest-item-card .guest-item-info { flex: 1 1 auto; min-width: 0; max-width: 480px; }
.guest-item-card .guest-item-info strong { color: #1C1613; font-size: 14px; }
.guest-item-card .guest-item-info p { margin: 2px 0 0; }
/* ROUND 97 - "make the list view similar to attached image": the reference
   card's price is a solid rounded badge (not plain inline text) - restyled
   as one here instead of just in the grid layout, now that list view uses
   this same photo-top card shape (see .guest-item-grid-list below). Solid
   var(--brand-red) + white text keeps this readable regardless of the
   card's own background or the active Theme Preset, so - unlike the plain
   text price this replaces - it no longer needs the separate "force dark
   ink" override a few lines down either. */
.guest-item-price {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: var(--brand-red); color: #fff; font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
}
/* ROUND 97 - "currency simble option required": a brand can now set a
   currency symbol (Brand form's Guest Menu Appearance section) that's
   appended after every price app-wide. One shared style for the symbol
   span covers all three places it's used (this badge, the item detail
   page's bigger price, and the staff/customer order picker's own price +
   cart totals) rather than three separate one-off rules. */
.guest-item-price-currency { font-weight: 600; opacity: 0.85; }
/* ROUND 80 - the price used to share this row with an "Add to Cart" pill
   (decorative only - this page stays view-only, see the view's own header
   comment) - ROUND 97 (follow-up) dropped that pill for being misleading
   rather than just decorative (it never added to a real cart, just
   navigated to the item's detail page - see menu-widget.ejs's own comment),
   leaving just the price here now. Kept as its own flex row (rather than
   folding straight into .guest-item-price) since a brand's Menu Designer
   could reasonably reintroduce a second element here later, and because
   .item-preview-card (menu-items/form.ejs) shares this exact class. */
.guest-item-cta { display: flex; flex-direction: row; align-items: center; gap: 8px; flex: none; }

.guest-item-grid-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* ROUND 90 (follow-up) - 3 columns at desktop widths, matching the reference's
   "3-column white item-card grid" - declared AFTER the base rule above (not
   inside the earlier @media (min-width: 960px) block near .category-rail) so
   it actually wins the cascade at equal specificity; source order matters
   here, not just the media query itself matching. */
@media (min-width: 960px) { .guest-item-grid-grid { grid-template-columns: repeat(3, 1fr); } }
/* ROUND 97 - "make the list view similar to attached image": list view
   used to be a compact horizontal row (image + text side by side - see the
   .guest-item-card base rule near the top of this section, still used as
   this card style's fallback for anything that isn't grid/list, though
   nothing renders that today). The reference card the admin attached
   (photo full-width on top, name/description/kcal below, a price badge at
   the bottom) is exactly what .guest-item-grid-grid already built for the
   "grid" toggle - rather than inventing a second, competing card design
   just for "list", both view modes now share that one card shape below;
   only the column COUNT differs (list stays one-per-row, grid goes to 2-3
   columns) so switching the view toggle no longer changes anything about
   an individual card's own look, only how many sit side by side. */
.guest-item-grid-list { display: flex; flex-direction: column; gap: 14px; }
.guest-item-grid-grid .guest-item-card,
.guest-item-grid-list .guest-item-card {
  flex-direction: column; gap: 8px; padding: 0 0 12px; border-bottom: none; border-radius: var(--guest-card-radius, 10px);
  background: #fff; overflow: hidden; box-shadow: 0 2px 10px rgba(28,22,19,0.08);
  border: 1px solid transparent; transition: border-color 0.15s ease;
}
/* ROUND 90 (follow-up) - hover border matching the Ember House reference's
   own `.item-card:hover { border-color: var(--brand-deep) }` - var(--brand-red)
   so it follows whichever accent color is actually active (brand's own, or
   either Theme Preset's). */
.guest-item-grid-grid .guest-item-card:hover,
.guest-item-grid-list .guest-item-card:hover { border-color: var(--brand-red); }
.guest-item-grid-grid .guest-item-card img { width: 100%; height: 110px; flex: none; border-radius: var(--guest-card-radius, 10px) var(--guest-card-radius, 10px) 0 0; }
/* ROUND 97 - list keeps a taller photo than grid's 2-3-column thumbnails
   (matching the reference's own proportions, and there's a full row's
   width to work with here instead of a half/third share of it). */
.guest-item-grid-list .guest-item-card img { width: 100%; height: 170px; flex: none; border-radius: var(--guest-card-radius, 10px) var(--guest-card-radius, 10px) 0 0; }
.guest-item-grid-grid .guest-item-card .guest-item-info,
.guest-item-grid-list .guest-item-card .guest-item-info {
  padding: 0 10px;
  /* Overrides this card style's OWN base .guest-item-info rule (flex: 1;
     max-width: 480px - see that rule's ROUND 97 comment) - that rule
     exists to cap a horizontal row's middle column, which doesn't apply
     here now that this card stacks its photo/info/cta vertically instead. */
  flex: none; max-width: none;
}
.guest-item-grid-grid .guest-item-cta,
.guest-item-grid-list .guest-item-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 10px; }
/* ROUND 90 - this card style's own white background (above) is NOT
   theme-tinted, so its text can't be either - caught live via a Playwright
   screenshot under the Ember House preset, where the page's cream/light
   labelColor/textColor (correct against the burgundy page background)
   rendered almost invisible against this card's always-white background.
   These extra-specific selectors (.guest-menu-content-body PLUS
   .guest-item-grid-grid/-list - one more class than partials/header.ejs's
   own inline theme rules use for these same elements) win the cascade
   regardless of source order, forcing these cards back to fixed dark-ink
   text no matter which Theme Preset or hand-picked colors are active.
   ROUND 97 - .guest-item-price dropped from this list: it's a solid
   var(--brand-red) badge with its own explicit white text now (see that
   rule's own ROUND 97 comment), so it no longer needs forcing either way. */
.guest-menu-content-body .guest-item-grid-grid .guest-item-card .guest-item-info strong,
.guest-menu-content-body .guest-item-grid-list .guest-item-card .guest-item-info strong {
  color: #1C1613;
}
.guest-menu-content-body .guest-item-grid-grid .guest-item-info p,
.guest-menu-content-body .guest-item-grid-grid .guest-item-calories,
.guest-menu-content-body .guest-item-grid-grid .guest-item-tag-pill,
.guest-menu-content-body .guest-item-grid-list .guest-item-info p,
.guest-menu-content-body .guest-item-grid-list .guest-item-calories,
.guest-menu-content-body .guest-item-grid-list .guest-item-tag-pill {
  color: #6B5F55;
}

/* ROUND 90 - corner "ribbon" badge (see menu-widget.ejs's own comment on
   reusing the item's first resolved Menu Tag rather than a new field),
   positioned over the top-left corner of the photo, matching the
   reference's "Chef Special"/"Best Seller" badges (one consistent accent
   color here, not per-tag custom colors - see that same comment for why).
   ROUND 97 - now shown in the list layout too, not just grid: list's cards
   have their own top photo to sit on now (see .guest-item-grid-list above),
   so there's no longer a "no photo corner for it to sit on" reason to hide
   it there. */
.guest-item-ribbon {
  display: none; position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  background: var(--brand-red); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.guest-item-grid-grid .guest-item-ribbon,
.guest-item-grid-list .guest-item-ribbon { display: inline-block; }

.guest-item-calories { color: #8A7F73; font-size: 11px; margin: 3px 0 0; }
.guest-item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.guest-item-tag-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; white-space: nowrap;
  background: rgba(0,0,0,0.05); color: #5B5049; border: 1px solid rgba(0,0,0,0.10);
}
.guest-item-tag-pill-lg { font-size: 12px; padding: 4px 12px; }
.guest-item-allergens { margin: 4px 0 0; }
.guest-item-allergen-pill { display: inline-block; margin-inline-end: 6px; }

/* Item detail page (public-menu/item.ejs) - reached by tapping any item
   card. Same dark/brand-themed chrome as the rest of the guest menu, sized
   for one item rather than a whole list. */
.guest-item-detail-page { padding-bottom: 40px; }
.guest-item-detail-back {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: #14100e; display: flex; align-items: center; justify-content: center;
  font-size: 18px; text-decoration: none;
}
.guest-item-detail-photo { width: 100%; height: 260px; background-size: cover; background-position: center; }
.guest-item-detail-body { padding: 18px 16px; }
/* ROUND 81 - see item.ejs's comment: keeps the back button from overlapping
   the item name when there's no photo underneath it to float over. */
.guest-item-detail-body-no-photo { padding-top: 54px; }
.guest-item-detail-body h1 { color: #1C1613; font-size: 20px; margin: 0 0 8px; }
.guest-item-detail-allergens { margin: 10px 0 0; }
.guest-item-detail-description { color: #5B5049; font-size: 14px; margin: 12px 0 0; line-height: 1.5; }
.guest-item-detail-price { color: var(--brand-red); font-weight: 700; font-size: 20px; margin-top: 16px; }

/* Floating action row (Reserve + the "grid"/account panel toggle) - fixed to
   the bottom of the viewport so both stay reachable no matter how long the
   menu list is. */
.guest-menu-fab-row {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 10px 16px;
  background: rgba(20,16,14,0.92); border-top: 1px solid rgba(255,255,255,0.10); backdrop-filter: blur(6px); z-index: 20;
}
.guest-menu-fab-row .btn-block { flex: 1; }
/* ROUND 85 - a Custom Button (services/guestMenuLayouts.js) placed in the
   bottomBar slot renders alongside the fixed Reserve CTA above - its own
   class rather than reusing .btn/.btn-block so it never picks up an
   unrelated change to those app-wide admin button styles. */
.guest-menu-fab-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px 16px; font-size: 14px;
  font-weight: 600; text-decoration: none; border-radius: var(--guest-btn-radius, 8px); text-align: center;
}
.guest-menu-fab-btn-secondary { background: rgba(255,255,255,0.08); color: #f5f1ec; border: 1px solid rgba(255,255,255,0.20); }
.guest-menu-fab-btn-primary { background: var(--brand-red); color: #fff; border: 1px solid var(--brand-red); }
.guest-menu-fab-btn-primary:hover { background: var(--brand-red-dark); }
.guest-menu-grid-btn {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
}

/* Account panel - a simple bottom sheet (not a fancy slide animation, this
   codebase's vanilla-JS convention favors functional over flashy) toggled
   via the [hidden] attribute, per this session's guidance to never toggle
   visibility with style.display.
   NOTE: `.guest-account-panel[hidden]` (not a bare `[hidden]` rule) is
   required here, not optional - a plain class selector like
   `.guest-account-panel { display: flex }` has the SAME specificity as the
   browser's own built-in `[hidden] { display: none }` rule, and an author
   stylesheet always wins a specificity tie against the user-agent
   stylesheet - so without this override the panel rendered OPEN on every
   page load regardless of the `hidden` attribute (caught via a live
   Playwright screenshot during Round 58 verification, not by inspection). */
/* ROUND 90 (follow-up) - "build Ember House's distinct layout for real":
   restyled from a full-screen bottom sheet into a small anchored dropdown
   flyout, matching that reference's own `.profile-menu` - positioned
   relative to .guest-menu-topbar-actions (see that class above), which now
   renders the trigger and this panel adjacent for exactly this reason. The
   `[hidden]` toggle mechanism itself (and the NOTE on why
   `.guest-account-panel[hidden]` must be its own rule) is unchanged from
   Round 58/87 - only the box's own position/size/look changed here. */
.guest-account-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 30;
  display: block; width: 220px;
}
.guest-account-panel[hidden] { display: none; }
.guest-account-panel-sheet {
  background: #1c1613; color: #f5f1ec; width: 100%; border-radius: 14px; padding: 8px;
  max-height: 70vh; overflow-y: auto; box-shadow: 0 18px 40px rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.10);
}
.guest-account-panel-head { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.10); margin-bottom: 6px; }
.guest-account-panel-head strong { color: #fff; font-size: 14px; }
.guest-account-panel-sheet a.guest-account-link {
  display: block; padding: 10px 12px; border-radius: 9px; color: #f5f1ec; font-size: 13px; text-decoration: none;
}
.guest-account-panel-sheet a.guest-account-link:hover { background: rgba(255,255,255,0.08); }
/* ROUND 79 - Logout lives in this same panel as a <button> (it posts a
   form, an <a> can't), so the shared `.guest-account-link` look above
   (scoped to `a.guest-account-link`) needs a `<button>`-specific twin that
   resets the browser's own button chrome and keeps text-align logical
   (`start`, not `left`) so it still reads correctly under RTL/Arabic. */
.guest-account-panel-sheet button.guest-account-link.guest-account-link-button {
  display: block; width: 100%; padding: 10px 12px; border: none; border-radius: 9px;
  background: none; color: #E8977C; font-size: 13px;
  font-family: inherit; text-align: start; cursor: pointer;
}
.guest-account-panel-sheet button.guest-account-link.guest-account-link-button:hover { background: rgba(255,255,255,0.08); }

/* ROUND 90 - the new footer (partials/guest-menu/footer-widget.ejs) - fixed
   page chrome like the header, same --guest-chrome-color background so the
   two dark bands bookend the cream/themed content body consistently. */
.guest-menu-footer { background: var(--guest-chrome-color, #141414); padding: 28px 16px 90px; text-align: center; }
.guest-menu-footer-inner { max-width: 480px; margin: 0 auto; }
.guest-menu-footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.guest-menu-footer-logo { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.guest-menu-footer-name { color: #fff; font-weight: 700; font-size: 15px; }
.guest-menu-footer-social { margin-bottom: 14px; }
.guest-menu-footer-follow { display: block; color: rgba(255,255,255,0.6); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.guest-menu-footer-social .guest-menu-social { justify-content: center; }
.guest-menu-footer-phone { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.85); font-size: 13px; text-decoration: none; margin-bottom: 14px; }
.guest-menu-footer-copyright { color: rgba(255,255,255,0.45); font-size: 11px; margin: 0; }

.guest-branch-picker-list a {
  display: block; padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15); color: #f5f1ec; text-decoration: none;
}

/* ROUND 59 - item 10: the POS-style item/modifier picker shared by the
   staff manual-reservation form (views/reservations/new.ejs, admin LIGHT
   theme) and the customer portal's own order screen (views/customer-portal/
   reserve-menu.ejs, dark theme). Rather than fighting two different host
   themes, `.pos-picker` is a self-contained dark panel wherever it's
   dropped - same "own little world" approach as `.item-preview-panel`
   (Item Master's live preview, added this same round) - so it looks and
   behaves identically in both places, matching the reference screenshot the
   admin attached. Visually modeled on the public guest digital menu's own
   group-tabs/category-strip (menu-group-tab/category-strip above) but
   interactive: tapping a card opens a modifier modal (if it has any) or adds
   straight to a running cart. See views/partials/menu-item-picker.ejs for
   the markup/JS. */
.pos-picker { background: #14100e; border-radius: 12px; padding: 14px; color: #f5f1ec; }
.pos-picker-groups { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.pos-picker-group-tab {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06); color: rgba(245,241,236,0.85); font-size: 13px; white-space: nowrap; cursor: pointer;
}
.pos-picker-group-tab.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.pos-picker-categories { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; }
.pos-picker-category-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; text-align: center; cursor: pointer; background: none; border: none; }
.pos-picker-category-icon {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.08); background-size: cover; background-position: center;
  border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.pos-picker-category-item span { font-size: 10px; color: rgba(245,241,236,0.85); line-height: 1.2; }
.pos-picker-category-section { padding: 6px 0; }
.pos-picker-category-section h4 { font-size: 14px; color: #fff; margin: 14px 0 8px; }
.pos-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pos-picker-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.pos-picker-card img, .pos-picker-thumb-placeholder {
  width: 100%; height: 76px; object-fit: cover; border-radius: 8px;
}
.pos-picker-thumb-placeholder { background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 24px; color: rgba(245,241,236,0.45); }
.pos-picker-card strong { font-size: 12px; color: #fff; line-height: 1.3; }
.pos-picker-price { color: var(--brand-red); font-weight: 600; font-size: 12px; }
.pos-picker-card-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pos-picker-qty-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08);
  color: #fff; font-size: 14px; cursor: pointer; line-height: 1;
}
.pos-picker-qty-value { min-width: 18px; text-align: center; font-size: 13px; }
.pos-picker-add-btn {
  padding: 6px 8px; border-radius: 6px; border: none; background: var(--brand-red); color: #fff; font-size: 12px; cursor: pointer;
}
.pos-picker-cart { margin-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 10px; }
.pos-picker-cart h4 { color: #fff; font-size: 14px; margin: 0 0 8px; }
.pos-picker-cart-empty { color: rgba(245,241,236,0.55); font-size: 13px; margin: 0; }
.pos-picker-cart-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.pos-picker-cart-row span:first-child { flex: 1; }
.pos-picker-cart-remove { background: none; border: none; color: rgba(245,241,236,0.55); cursor: pointer; font-size: 12px; }
.pos-picker-cart-total { margin-top: 8px; font-size: 14px; font-weight: 600; color: #fff; text-align: end; }

/* Modifier-selection modal (item 10's confirmed answer: modifiers show as a
   popup/modal, not a separate step). Fixed/centered overlay, same
   [hidden]-toggle convention as .guest-account-panel above - `[hidden]`
   alone is enough here since `.pos-picker-modal-backdrop` has no competing
   class-level `display` override (see that bug's own writeup on
   .guest-account-panel just above), but the rule is still declared
   explicitly for clarity/consistency. */
.pos-picker-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pos-picker-modal-backdrop[hidden] { display: none; }
.pos-picker-modal {
  background: #1c1613; color: #f5f1ec; border-radius: 12px; padding: 18px; max-width: 420px; width: 100%; max-height: 85vh; overflow-y: auto;
}
.pos-picker-modal h4 { color: #fff; margin: 0 0 10px; }
.pos-picker-modal-group { margin-top: 14px; }
.pos-picker-modal-group:first-of-type { margin-top: 0; }
.pos-picker-modal-group-title { font-weight: 600; font-size: 13px; color: #fff; }
.pos-picker-modal-group-rule { font-size: 11px; color: rgba(245,241,236,0.55); margin-bottom: 6px; }
.pos-picker-modal-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.pos-picker-modal-option input { width: auto; }
.pos-picker-modal-error { color: #ff8a80; font-size: 12px; margin-top: 10px; }
.pos-picker-modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

/* .checkbox-inline is a small generic label+checkbox pairing usable by any
   filter-bar. (The old WhatsApp Chat .wac-* rules that used to live in this
   block were removed in ROUND 146 - the chat UI now lives in wa-chat.css.) */
.checkbox-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.checkbox-inline input[type="checkbox"] { width: auto; }

/* ROUND 83 - Guest Menu Layout Designer's drag-to-reorder section list
   (admin-only, regular light theme page - not the dark guest menu itself).
   Plain HTML5 drag-and-drop, no library - see guest-menu-designer/index.ejs
   for the handful of lines of JS this drives. */
.designer-section-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.designer-section-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff;
}
.designer-section-row.dragging { opacity: 0.4; }
.designer-section-row-fixed { margin-top: 8px; background: #f7f6f4; }
.designer-drag-handle { cursor: grab; color: var(--text-secondary); font-size: 16px; line-height: 1; padding-top: 6px; user-select: none; }
.designer-drag-handle-disabled { cursor: default; opacity: 0.35; }
.designer-section-body { flex: 1; min-width: 0; }
.designer-section-body p { margin: 4px 0 0; }
.designer-subtoggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.designer-settings-link { font-size: 13px; white-space: nowrap; align-self: center; }

/* ROUND 87 - the freeform Guest Menu Canvas (public-menu/canvas.ejs), a
   Wix-style whole-page replacement rendered ONLY for a brand that has
   explicitly opted into Canvas Mode (brand.guestMenuCanvasEnabled). Every
   brand that hasn't touched this keeps rendering the classic sections-based
   page (all the .guest-menu-* / .survey-* rules above), completely
   unaffected by anything below.

   Both breakpoints' markup exist in the DOM at once (see canvas.ejs's own
   header comment for why) - this single media-query breakpoint decides
   which one is actually visible. 900px was picked as a plain, generic
   "phone vs. everything wider" cutoff, matching the same rough line every
   other responsive rule in this app already uses. */
.canvas-page { position: relative; width: 100%; }
.canvas-viewport { position: relative; width: 100%; overflow: hidden; }
.canvas-viewport-desktop { display: none; }
@media (min-width: 900px) {
  .canvas-viewport-mobile { display: none; }
  .canvas-viewport-desktop { display: block; }
}
/* `.canvas-surface` is the fixed-reference-pixel canvas itself (390 or 1280
   wide - see guestMenuCanvas.js's MOBILE_CANVAS_WIDTH/DESKTOP_CANVAS_WIDTH) -
   canvas.ejs's own inline <script> sets its `transform: scale()` and its
   `.canvas-viewport` parent's height at render time, once it knows the
   visitor's real, current viewport width. */
.canvas-surface { position: absolute; top: 0; left: 0; }
.canvas-block { position: absolute; overflow: visible; box-sizing: border-box; }
.canvas-text { width: 100%; height: 100%; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.canvas-image { display: block; width: 100%; height: 100%; }
.canvas-shape { width: 100%; height: 100%; }
.canvas-shape-circle { border-radius: 50%; }
.canvas-shape-line { position: relative; top: 50%; height: 2px; transform: translateY(-50%); }
.canvas-button-el {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center;
  text-decoration: none; box-sizing: border-box;
}
.canvas-button-el-disabled { opacity: 0.5; cursor: default; pointer-events: none; }
/* Any block saved with `sticky: 'bottom'` (the Reserve button's own seeded
   default - see defaultBlocksFor()) renders OUTSIDE the scaled
   `.canvas-surface` entirely, in this always-on-top fixed-to-viewport layer
   instead - preserving the one behavior that actually mattered from the old
   fixed Bottom Reserve Bar (Round 79/83) - everything else on the canvas
   scrolls normally. Its own breakpoint visibility mirrors `.canvas-viewport`
   above exactly, so only the currently-relevant copy is ever clickable. */
.canvas-sticky-layer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center;
  gap: 8px; padding: 12px 16px; pointer-events: none;
}
.canvas-sticky-layer > * { pointer-events: auto; }
.canvas-sticky-layer-desktop { display: none; }
@media (min-width: 900px) {
  .canvas-sticky-layer-mobile { display: none; }
  .canvas-sticky-layer-desktop { display: flex; }
}
.canvas-sticky-reserve-btn { max-width: 480px; width: 100%; }
/* ROUND 87 - the classic sections-based page's language switch lived in a
   fixed `.survey-topbar` strip that's simply gone on the Canvas page (that
   whole top bar was page chrome, not one of the sections the Canvas
   replaces block-by-block) - without this, a Canvas-Mode brand's guest menu
   would have no way to switch EN/AR at all. A real, in-flow bar ABOVE
   `.canvas-page` (not a floating fixed overlay) so it can never overlap a
   block's own content the way a corner-pinned overlay would (an admin's
   widgetHeader block, for instance, is free to start at y:0 and use the
   canvas's own full top-left corner) - it simply pushes the whole canvas
   down by its own small height instead, guaranteed collision-free no
   matter what an admin places at the very top of either breakpoint. */
/* ROUND 90 - solid --guest-chrome-color instead of a fixed translucent
   black, so this bar visually merges into the widgetHeader block's own
   chrome band right below it (both now read the same Theme tab field). */
/* ROUND 92 - "keep top the profile icon": this bar now also holds the
   avatar/account-panel trigger (see canvas.ejs), so it switches from a
   single-item bar (lang-switch only, RTL-flipped to the end) to the exact
   same two-item `justify-content: space-between` layout
   public-menu/menu.ejs's own `.survey-topbar` already uses for the identical
   lang-switch-left/avatar-right pairing - that pattern already reads
   correctly in both LTR and RTL with no extra per-direction override
   needed, so the old RTL-only single-item rule is retired rather than
   carried forward for a bar that no longer has just one item. */
.canvas-lang-switch-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--guest-chrome-color, #141414); position: relative; z-index: 60; }
body.survey-dark-bg .canvas-lang-switch-bar .lang-switch a { color: rgba(245,241,236,0.85); border-color: rgba(245,241,236,0.35); }
body.survey-dark-bg .canvas-lang-switch-bar .lang-switch a.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

/* ROUND 87 - the Canvas Editor admin screen (guest-menu-canvas-editor/
   index.ejs) - a regular light-theme admin page (like every other admin
   screen, NOT the dark guest-facing canvas it edits). Three columns: the
   add-block toolbar + status/publish/history controls on the left, the
   actual drag/resize editing surface in the middle, the selected block's
   properties on the right - stacking vertically below 1100px, same
   responsive convention as `.designer-layout` above. */
.canvas-editor-layout { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.canvas-editor-side-col { flex: 0 0 260px; display: flex; flex-direction: column; gap: 16px; }
.canvas-editor-main-col { flex: 1; min-width: 0; }
.canvas-editor-props-col { flex: 0 0 300px; }
@media (max-width: 1100px) {
  .canvas-editor-layout { flex-direction: column; }
  .canvas-editor-side-col, .canvas-editor-props-col { flex-basis: auto; width: 100%; }
}
.canvas-editor-breakpoint-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.canvas-editor-breakpoint-tabs button {
  flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px;
}
.canvas-editor-breakpoint-tabs button.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; font-weight: 600; }
.canvas-editor-add-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.canvas-editor-add-grid button { font-size: 12px; padding: 6px 10px; }
.canvas-editor-block-count { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
/* The editing surface itself - a scaled-down live-size replica of the real
   fixed-reference-pixel canvas (390 or 1280 wide, same MOBILE_CANVAS_WIDTH/
   DESKTOP_CANVAS_WIDTH the real public page scales - see canvas.ejs), so
   whatever an admin drags/resizes here lines up with what the real page
   will actually look like once scaled back up. `.canvas-editor-surface-wrap`
   is the fixed-size visible viewport; the editor's own script sets
   `.canvas-editor-surface`'s `transform: scale()` and the wrap's own height
   to match, the exact same technique the public page uses for real
   visitors. */
.canvas-editor-surface-wrap {
  position: relative; width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 10px;
  background: #14100e; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.canvas-editor-surface { position: relative; top: 0; left: 0; transform-origin: top left; }
.canvas-editor-block {
  position: absolute; box-sizing: border-box; border: 1px dashed rgba(255,255,255,0.4); border-radius: 4px;
  background: rgba(255,255,255,0.06); color: #f5f1ec; cursor: move; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; padding: 2px;
  user-select: none;
}
.canvas-editor-block.selected { border: 2px solid var(--brand-red); background: rgba(210,35,29,0.18); z-index: 999 !important; }
.canvas-editor-block-label { pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.canvas-editor-block img.canvas-editor-block-img-preview { max-width: 100%; max-height: 100%; pointer-events: none; }
.canvas-editor-resize-handle {
  position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand-red); border: 2px solid #fff; cursor: nwse-resize;
}
.canvas-editor-properties-panel .form-row { margin-bottom: 10px; }
.canvas-editor-properties-panel label { font-size: 12px; }
.canvas-editor-properties-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.canvas-editor-enable-status { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.canvas-editor-enable-status-on { background: #e7f6ec; color: #1c7a3c; }
.canvas-editor-enable-status-off { background: #f7f6f4; color: var(--text-secondary); }

/* ROUND 88 - the freeform Canvas's new `social` content block (a small
   clickable platform-icon badge - see
   views/partials/guest-menu/social-icon.ejs) and its own custom-icon-upload
   preview thumbnail in the Canvas Editor's properties panel. */
.guest-social-icon-badge {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  box-sizing: border-box; overflow: hidden;
}
.guest-social-icon-glyph { color: #fff; font-weight: 700; font-size: 60%; font-family: Georgia, 'Times New Roman', serif; line-height: 1; }
.guest-social-icon-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.canvas-editor-icon-upload-preview { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; margin: 6px 0; display: inline-block; }
.canvas-editor-icon-upload-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ROUND 137 - Card Release Log per-card "Update Expiry" dropdown. */
.expiry-edit { position: relative; display: inline-block; }
.expiry-edit > summary { list-style: none; cursor: pointer; }
.expiry-edit > summary::-webkit-details-marker { display: none; }
.expiry-edit-form {
  position: absolute; z-index: 20; inset-inline-end: 0; margin-top: 4px; min-width: 220px;
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* =====================================================================
   ROUND 139 - "Modern Ember" admin theme.
   Applies ONLY inside the logged-in admin shell (.app-shell): the public
   survey / menu / loyalty-card / login pages keep their own looks. It keeps
   the Outback red + dark sidebar, and adds: bundled Inter (English) + IBM
   Plex Sans Arabic (Arabic) fonts, softer shadows and rounder cards, sidebar
   icons, a gradient active menu item, cleaner tables, focus rings, and
   dashboard tiles with an icon chip + up/down trend.
   Fonts are bundled in /fonts (no CDN) so the app works offline; each
   @font-face is split by unicode-range so one font-family stack covers both
   scripts in either language direction.
===================================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/Inter-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/Inter-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/Inter-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/fonts/Inter-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexSansArabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexSansArabic-500.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 600; font-display: swap; src: url('/fonts/IBMPlexSansArabic-600.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url('/fonts/IBMPlexSansArabic-700.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

.app-shell {
  --page-plane: #f3f5f9;
  --surface-1: #ffffff;
  --text-primary: #161b26;
  --text-secondary: #4b5565;
  --text-muted: #7b8597;
  --gridline: #e8ebf1;
  --border: rgba(20, 28, 45, 0.09);
  --radius: 14px;
  --brand-red: #d2231d;
  --brand-red-dark: #a51a15;
  --ember-1: #e0342d;
  --ember-2: #b81d17;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.07);
  --font-ui: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
.app-shell input, .app-shell select, .app-shell textarea, .app-shell button { font-family: var(--font-ui); }
html[dir="rtl"] .app-shell, html[dir="rtl"] .app-shell input, html[dir="rtl"] .app-shell select,
html[dir="rtl"] .app-shell textarea, html[dir="rtl"] .app-shell button { font-family: 'IBM Plex Sans Arabic', 'Inter', 'ArbFONTSAGC', system-ui, sans-serif; }

/* ---- Sidebar ---- */
.app-shell .sidebar { background: linear-gradient(180deg, #1b1f2a 0%, #12151d 100%); border-inline-end: 1px solid rgba(255, 255, 255, 0.04); width: 244px; overflow-y: auto; }
.app-shell .sidebar-brand { padding-bottom: 18px; border-bottom-color: rgba(255, 255, 255, 0.08); }
.app-shell .sidebar-brand span { font-weight: 700; letter-spacing: -0.01em; }
.app-shell .sidebar-account { border-bottom-color: rgba(255, 255, 255, 0.08); }
.app-shell .sidebar-nav { gap: 3px; padding: 0 12px 16px; }
.app-shell .sidebar-nav a, .app-shell .sidebar-nav-group-toggle { border-radius: 10px; font-weight: 500; transition: background 0.15s ease, color 0.15s ease; }
.app-shell .sidebar-nav a { display: block; }
.app-shell .sidebar-nav a.sidebar-nav-top, .app-shell .sidebar-nav-label { display: flex; align-items: center; gap: 11px; }
.app-shell .sidebar-nav-label { min-width: 0; }
.app-shell .sidebar-nav-ico { display: inline-flex; flex: none; width: 20px; justify-content: center; opacity: 0.8; }
.app-shell .sidebar-nav-group-toggle:hover .sidebar-nav-ico, .app-shell .sidebar-nav-group-toggle.active-parent .sidebar-nav-ico, .app-shell .sidebar-nav a.active .sidebar-nav-ico { opacity: 1; }
.app-shell .sidebar-nav a.sidebar-nav-top.active { background: linear-gradient(135deg, var(--ember-1), var(--ember-2)); box-shadow: 0 4px 12px rgba(210, 35, 29, 0.35); color: #fff; }
.app-shell .sidebar-nav-group-toggle.active-parent { background: rgba(255, 255, 255, 0.06); }
.app-shell .sidebar-nav-group-items { margin: 2px 0 6px; padding-inline-start: 30px; border-inline-start: 1px solid rgba(255, 255, 255, 0.08); margin-inline-start: 21px; padding-inline-start: 10px; }
.app-shell .sidebar-nav-group-items a { padding: 7px 10px; font-size: 13px; }
.app-shell .sidebar-nav-group-items a.active { background: rgba(224, 52, 45, 0.2); color: #fff; font-weight: 600; box-shadow: none; }
.app-shell .lang-switch a.active { background: linear-gradient(135deg, var(--ember-1), var(--ember-2)); border-color: transparent; }

/* ---- Page frame ---- */
.app-shell .main-content { max-width: 1360px; min-width: 0; overflow-x: auto; padding: 28px 30px 48px; }
.app-shell .page-title { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 22px; }
.app-shell .page-head { margin-bottom: 22px; }
.app-shell .page-head .page-title { margin-bottom: 0; }
.app-shell h2 { letter-spacing: -0.01em; }

/* ---- Cards ---- */
.app-shell .card, .app-shell .form-card { border: 1px solid rgba(20, 28, 45, 0.06); box-shadow: var(--shadow-sm); padding: 22px; }
.app-shell .card > h2, .app-shell .form-card > h2 { font-size: 16px; font-weight: 650; margin-bottom: 14px; }
.app-shell .card > h3, .app-shell .form-card > h3 { font-size: 15px; font-weight: 650; }

/* ---- Tables ---- */
.app-shell .data-table { border-radius: var(--radius); border: 1px solid rgba(20, 28, 45, 0.06); box-shadow: var(--shadow-sm); }
.app-shell .data-table th { background: #f7f8fb; color: #6b7587; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; padding: 12px; }
.app-shell .data-table td { padding: 11px 12px; border-bottom-color: #eef0f5; }
.app-shell .data-table tbody tr { transition: background 0.12s ease; }
.app-shell .data-table tbody tr:hover td { background: #fafbfd; }

/* ---- Buttons / inputs ---- */
.app-shell .btn { border-radius: 10px; font-weight: 600; transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease; }
.app-shell .btn:active { transform: translateY(1px); }
.app-shell .btn-primary { background: linear-gradient(135deg, var(--ember-1), #c2201a); box-shadow: 0 2px 8px rgba(210, 35, 29, 0.28); }
.app-shell .btn-primary:hover { background: linear-gradient(135deg, #c92c26, var(--ember-2)); }
.app-shell .btn-ghost { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.app-shell .btn-ghost:hover { background: #f4f6fa; }
.app-shell input[type="text"], .app-shell input[type="email"], .app-shell input[type="password"], .app-shell input[type="tel"],
.app-shell input[type="number"], .app-shell input[type="date"], .app-shell input[type="search"], .app-shell select, .app-shell textarea { border-radius: 10px; background: #fbfcfe; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.app-shell input:focus, .app-shell select:focus, .app-shell textarea:focus { outline: none; border-color: var(--ember-1); box-shadow: 0 0 0 3px rgba(224, 52, 45, 0.14); background: #fff; }
.app-shell .badge { font-weight: 600; letter-spacing: 0.01em; }
.app-shell .alert { border-radius: 12px; }

/* ---- Dashboard tiles ---- */
.app-shell .stat-grid { gap: 16px; }
.app-shell .stat-tile { box-shadow: var(--shadow-sm); border: 1px solid rgba(20, 28, 45, 0.06); padding: 18px 20px; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.app-shell .stat-tile:has(> .stat-icon) { display: flex; align-items: flex-start; gap: 14px; }
.app-shell .stat-tile:has(> .stat-icon):hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.app-shell .stat-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.app-shell .stat-icon-blue { background: rgba(42, 120, 214, 0.12); color: #2a78d6; }
.app-shell .stat-icon-orange { background: rgba(235, 104, 52, 0.13); color: #e0592a; }
.app-shell .stat-icon-green { background: rgba(27, 175, 122, 0.13); color: #12906a; }
.app-shell .stat-icon-purple { background: rgba(74, 58, 167, 0.12); color: #4a3aa7; }
.app-shell .stat-icon-teal { background: rgba(15, 154, 168, 0.13); color: #0d8591; }
.app-shell .stat-icon-slate { background: rgba(91, 101, 119, 0.13); color: #5b6577; }
.app-shell .stat-body { min-width: 0; flex: 1; }
.app-shell .stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 4px; }
.app-shell .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.app-shell .stat-trend-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; }
.app-shell .stat-trend { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-shell .stat-trend-arrow { font-size: 8px; }
.app-shell .stat-trend-note { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.app-shell .stat-trend-up { background: rgba(27, 175, 122, 0.13); color: #0f7a58; }
.app-shell .stat-trend-down { background: rgba(208, 59, 59, 0.12); color: #b02a2a; }
.app-shell .stat-trend-flat { background: rgba(91, 101, 119, 0.12); color: #5b6577; }
.app-shell .dash-section-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; }

/* =====================================================================
   ROUND 140 - structured pages: page banner, section cards, pill tab strip,
   sidebar cluster labels, tinted alerts. Markup is produced by
   public/js/ui-enhance.js + views/partials/header.ejs. Admin shell only.
===================================================================== */
.app-shell .sidebar-nav-section {
  margin: 14px 12px 4px; padding: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.38);
}

/* ---- Page banner ---- */
.app-shell .ui-banner {
  display: flex; align-items: center; gap: 16px; margin: 0 0 20px; padding: 18px 22px;
  background: linear-gradient(135deg, #fff4f2 0%, #f7f8fc 60%, #ffffff 100%);
  border: 1px solid rgba(20, 28, 45, 0.07); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.app-shell .ui-banner-icon {
  flex: none; width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--ember-1), var(--ember-2)); box-shadow: 0 6px 14px rgba(210, 35, 29, 0.28);
}
.app-shell .ui-banner-main { flex: 1; min-width: 0; }
.app-shell .ui-banner-main .page-title, .app-shell .ui-banner-main h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.app-shell .ui-banner-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-inline-start: auto; }
.app-shell .ui-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12.5px; color: var(--text-muted); }
.app-shell .ui-crumb { color: var(--text-muted); }
.app-shell a.ui-crumb:hover { color: var(--brand-red); text-decoration: none; }
.app-shell .ui-crumb-current { color: var(--text-secondary); font-weight: 500; }
.app-shell .ui-crumb-sep { opacity: 0.55; }
html[dir="rtl"] .app-shell .ui-crumb-sep { display: inline-block; transform: scaleX(-1); }
.app-shell .ui-back { display: inline-flex; align-items: center; gap: 6px; }
html[dir="rtl"] .app-shell .ui-back .ui-icon { transform: scaleX(-1); }
.app-shell .page > .ui-banner + .ui-tabs { margin-top: 0; }

/* ---- Pill tab strip ---- */
.app-shell .ui-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 20px !important; padding: 6px;
  background: #fff; border: 1px solid rgba(20, 28, 45, 0.07); border-radius: 14px; box-shadow: var(--shadow-sm);
}
.app-shell .ui-tabs .ui-tab, .app-shell .ui-tabs .ui-tab.btn-ghost, .app-shell .ui-tabs .ui-tab.btn-primary {
  background: transparent; border: none; box-shadow: none; color: var(--text-secondary);
  padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
}
.app-shell .ui-tabs .ui-tab:hover { background: #f3f5f9; color: var(--text-primary); text-decoration: none; }
.app-shell .ui-tabs .ui-tab.active, .app-shell .ui-tabs .ui-tab.active:hover { background: rgba(210, 35, 29, 0.09); color: #b81d17; }

/* ---- Section cards ---- */
.app-shell .ui-card-multi { background: transparent; border: none; box-shadow: none; padding: 0; }
.app-shell .ui-card-multi > .ui-section { margin-bottom: 20px; }
.app-shell .ui-card { overflow: visible; }
.app-shell .ui-section-head {
  display: flex; align-items: center; gap: 14px; margin: 26px -22px 18px; padding: 16px 22px 14px;
  border-top: 1px solid var(--gridline); border-bottom: 1px solid var(--gridline); background: #fafbfd;
}
.app-shell .ui-section-head.ui-section-head-first { margin-top: -22px; border-top: none; border-radius: var(--radius) var(--radius) 0 0; }
.app-shell .ui-section-icon {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: #eef1f7; color: #4b5565;
}
.app-shell .ui-section-title { min-width: 0; }
.app-shell .ui-section-title h2, .app-shell .ui-section-title h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.app-shell .ui-section-desc { margin: 2px 0 0 !important; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.app-shell .ui-card > .ui-section-head + p, .app-shell .ui-section > .ui-section-head + p { margin-top: 0; }

/* ---- Alerts as tinted banners ---- */
.app-shell .alert { padding: 12px 16px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; }
.app-shell .alert-success { background: #eaf7f0; border-color: #c9ead8; color: #14633f; }
.app-shell .alert-error { background: #fdeeed; border-color: #f6cfcc; color: #8a1f1f; }
.app-shell .alert-warning, .app-shell .alert-info { background: #fff6e5; border-color: #f7e1b2; color: #7a5410; }

@media (max-width: 760px) {
  .app-shell .ui-banner { flex-wrap: wrap; padding: 14px 16px; }
  .app-shell .ui-banner-actions { width: 100%; justify-content: flex-start; margin-inline-start: 0; }
}

/* Arabic letters join - tracking would break the words apart. */
html[dir="rtl"] .app-shell .sidebar-nav-section, html[dir="rtl"] .app-shell .data-table th,
html[dir="rtl"] .app-shell .stat-label, html[dir="rtl"] .app-shell .dash-section-title,
html[dir="rtl"] .app-shell .stat-trend, html[dir="rtl"] .app-shell .badge { letter-spacing: 0; text-transform: none; }

/* ======================================================================
   ROUND 143 - mobile-friendly admin shell (README #156). Behaviour in
   public/js/app-nav.js. Everything is scoped under .app-shell, so the public
   customer pages are untouched.
   ====================================================================== */

/* Hidden on desktop; shown only inside the phone/tablet block below. */
.app-shell .mobile-topbar, .app-shell .sidebar-backdrop, .app-shell .sidebar-close-btn { display: none; }
.app-shell .sidebar-collapse-btn {
  margin-inline-start: auto; flex: none; width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.85); font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; font-family: inherit;
}
.app-shell .sidebar-collapse-btn:hover { background: rgba(255, 255, 255, 0.2); }
html[dir="rtl"] .app-shell .sidebar-collapse-btn span { display: inline-block; transform: scaleX(-1); }

/* ---- Desktop: collapsed icon rail (hover / keyboard focus opens it over the page) ---- */
@media (min-width: 901px) {
  html.sidebar-collapsed .app-shell .sidebar {
    width: 68px; position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow: hidden;
    z-index: 60; transition: width 0.18s ease;
  }
  html.sidebar-collapsed .app-shell .sidebar:hover,
  html.sidebar-collapsed .app-shell .sidebar:focus-within {
    width: 244px; margin-inline-end: -176px; overflow-y: auto; box-shadow: 8px 0 28px rgba(0, 0, 0, 0.28);
  }
  html[dir="rtl"].sidebar-collapsed .app-shell .sidebar:hover,
  html[dir="rtl"].sidebar-collapsed .app-shell .sidebar:focus-within { box-shadow: -8px 0 28px rgba(0, 0, 0, 0.28); }
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-brand { padding-inline: 0; justify-content: center; }
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-brand span,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-collapse-btn,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-account,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .dining-bell,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-section,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-group-arrow,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-group-items,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-label > span:not(.sidebar-nav-ico),
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav a.sidebar-nav-top > span:not(.sidebar-nav-ico) { display: none; }
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav { padding-inline: 8px; }
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav a.sidebar-nav-top,
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-group-toggle { justify-content: center; padding-inline: 0; }
  html.sidebar-collapsed .app-shell .sidebar:not(:hover):not(:focus-within) .sidebar-nav-label { justify-content: center; }
}

/* ---- Phones and tablets ---- */
@media (max-width: 900px) {
  .app-shell .mobile-topbar {
    display: flex; align-items: center; gap: 10px; position: fixed; top: 0; inset-inline: 0; z-index: 900;
    height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 12px 0;
    background: #fff; border-bottom: 1px solid var(--gridline); box-shadow: 0 1px 6px rgba(20, 28, 45, 0.06);
  }
  .app-shell .mobile-nav-toggle {
    flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--page-plane);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  }
  .app-shell .mobile-nav-toggle:active { background: #e8e5df; }
  .app-shell .burger-lines, .app-shell .burger-lines::before, .app-shell .burger-lines::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--brand-charcoal); content: ''; position: relative;
  }
  .app-shell .burger-lines::before { position: absolute; top: -6px; left: 0; }
  .app-shell .burger-lines::after { position: absolute; top: 6px; left: 0; }
  .app-shell .mobile-topbar-title {
    flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary);
  }
  .app-shell .mobile-topbar .lang-switch { margin: 0; flex: none; }
  .app-shell .mobile-topbar .lang-switch a {
    padding: 6px 10px; border: 1px solid var(--gridline); color: var(--text-secondary); border-radius: 8px; font-size: 12px; font-weight: 600;
  }
  .app-shell .mobile-topbar .lang-switch a.active { background: var(--brand-charcoal); border-color: var(--brand-charcoal); color: #fff; }

  /* The sidebar becomes a slide-in drawer. */
  .app-shell .sidebar {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 310px); height: 100vh; height: 100dvh;
    overflow-y: auto; overscroll-behavior: contain; z-index: 1100; transform: translateX(-105%); visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s; padding-bottom: 28px;
  }
  html[dir="rtl"] .app-shell .sidebar { transform: translateX(105%); }
  body.nav-open .app-shell .sidebar { transform: none; visibility: visible; transition: transform 0.22s ease, visibility 0s; box-shadow: 0 0 40px rgba(0, 0, 0, 0.45); }
  .app-shell .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1050; background: rgba(12, 14, 20, 0.55);
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  }
  body.nav-open .app-shell .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .app-shell .sidebar-close-btn {
    display: inline-flex; margin-inline-start: auto; flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px;
    background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 16px; align-items: center; justify-content: center; cursor: pointer; font-family: inherit;
  }
  .app-shell .sidebar-collapse-btn { display: none; }
  .app-shell .sidebar .lang-switch { display: none; } /* the top bar already has it */
  .app-shell .sidebar-nav a.sidebar-nav-top, .app-shell .sidebar-nav-group-toggle, .app-shell .sidebar-nav-group-items a { min-height: 44px; display: flex; align-items: center; }
  .app-shell .sidebar-nav-group-items a { min-height: 42px; }

  /* Page area */
  .app-shell .main-content {
    width: 100%; max-width: 100%; padding: calc(56px + env(safe-area-inset-top, 0px) + 14px) 14px 28px;
  }
  .app-shell .page-head { flex-wrap: wrap; gap: 10px; }
  .app-shell .ui-banner { padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .app-shell .ui-banner-icon { width: 38px; height: 38px; border-radius: 11px; }
  .app-shell .ui-banner-main .page-title, .app-shell .ui-banner-main h1 { font-size: 19px; }
  .app-shell .ui-crumbs { font-size: 11.5px; }
  .app-shell .card { padding: 14px; border-radius: 14px; }
  .app-shell .form-row { flex-direction: column; gap: 12px; margin-bottom: 8px; }
  .app-shell .form-row > div { flex: none; width: 100%; min-width: 0; }
  .app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]),
  .app-shell select, .app-shell textarea { font-size: 16px; min-height: 44px; max-width: 100%; }
  .app-shell .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .app-shell .btn-sm { min-height: 40px; padding: 8px 12px; }
  .app-shell .checkbox-pill { min-height: 40px; }
  .app-shell .ui-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .app-shell .ui-tabs::-webkit-scrollbar { display: none; }
  .app-shell .ui-tabs .ui-tab { flex: none; }
  .app-shell .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .app-shell .stat-tile { padding: 12px; }
  .app-shell .stat-tile:has(> .stat-icon) { gap: 10px; }
  .app-shell .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .app-shell .dash-grid { grid-template-columns: 1fr; }
  .app-shell .pagination-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .app-shell .pagination-controls { justify-content: center; }
  .app-shell img, .app-shell video, .app-shell pre { max-width: 100%; }
  .app-shell pre { overflow-x: auto; }

  /* Tables that could not become cards scroll sideways. */
  .app-shell table.data-table:not(.ui-cards) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---- Phones: list rows become cards ---- */
@media (max-width: 700px) {
  .app-shell .stat-tile:has(> .stat-icon) { flex-direction: column; align-items: flex-start; }
  .app-shell table.data-table.ui-cards, .app-shell table.data-table.ui-cards tbody,
  .app-shell table.data-table.ui-cards tr, .app-shell table.data-table.ui-cards td { display: block; width: 100%; }
  .app-shell table.data-table.ui-cards { background: transparent; border: 0; box-shadow: none; }
  .app-shell table.data-table.ui-cards thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app-shell table.data-table.ui-cards tbody tr {
    background: var(--surface-1); border: 1px solid rgba(20, 28, 45, 0.08); border-radius: 14px; margin: 0 0 12px; padding: 4px 14px; box-shadow: var(--shadow-sm);
  }
  .app-shell table.data-table.ui-cards td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; border: 0;
    border-top: 1px solid #f0eeea; text-align: end; overflow-wrap: anywhere; min-width: 0;
  }
  .app-shell table.data-table.ui-cards td:first-child { border-top: 0; }
  .app-shell table.data-table.ui-cards td::before {
    content: attr(data-label); flex: 0 0 38%; max-width: 45%; text-align: start; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding-top: 2px;
  }
  .app-shell table.data-table.ui-cards td[data-label=""]::before,
  .app-shell table.data-table.ui-cards td.ui-cell-actions::before,
  .app-shell table.data-table.ui-cards td.ui-cell-wide::before { display: none; }
  .app-shell table.data-table.ui-cards td.ui-cell-empty { display: none; }
  .app-shell table.data-table.ui-cards td.ui-cell-wide { text-align: center; justify-content: center; border-top: 0; }
  .app-shell table.data-table.ui-cards td.ui-cell-actions { flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 12px 0 10px; text-align: start; }
  .app-shell table.data-table.ui-cards td.ui-cell-actions > a, .app-shell table.data-table.ui-cards td.ui-cell-actions > form > button {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--gridline); border-radius: 10px; background: #fff; font-weight: 600;
  }
  .app-shell table.data-table.ui-cards td.ui-cell-actions .inline-form { display: inline-block; }
  .app-shell table.data-table.ui-cards td.ui-cell-actions a { text-decoration: none; }
  .app-shell table.data-table.ui-cards .ui-pipe { display: none; }
  .app-shell table.data-table.ui-cards td:first-child { font-weight: 700; }
  html[dir="rtl"] .app-shell table.data-table.ui-cards td { text-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .sidebar, .app-shell .sidebar-backdrop { transition: none; }
}

/* ROUND 144 - Card Release Log: action buttons in one line under each customer row. */
.data-table tr.member-main-row > td { border-bottom: 0; padding-bottom: 6px; }
.data-table tr.row-actions > td { background: #faf9f7; padding: 6px 12px 10px; border-bottom: 1px solid var(--gridline); }
.data-table tr.row-actions .member-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.data-table tr.row-actions .inline-form { display: inline-block; margin: 0; }
@media (max-width: 700px) {
  /* Phone cards: the button line stays inside the same card as its customer. */
  .app-shell table.data-table.ui-cards tbody tr.member-main-row { margin-bottom: 0; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
  .app-shell table.data-table.ui-cards tbody tr.row-actions {
    margin: 0 0 12px; padding: 0 14px 8px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; background: var(--surface-1);
  }
  .app-shell table.data-table.ui-cards tr.row-actions td { background: transparent; border-top: 0; border-bottom: 0; padding: 4px 0 6px; }
}
@media (max-width: 700px) {
  .app-shell table.data-table.ui-cards tr.row-actions td.ui-cell-wide { justify-content: flex-start; text-align: start; }
}

/* ROUND 145 - Knowledge Base rows: badge + notes stack in one block (also keeps mobile cards tidy) */
.kb-cell .badge { white-space: nowrap; }
.kb-cell .small { margin-top: 2px; }
@media (max-width: 700px) {
  .kb-cell { text-align: end; }
}

/* ROUND 164 - the small "order number + up/down arrows" cell used by the Menu
   Groups / Menu Categories / Item Master lists (partials/sort-arrows.ejs). */
.sort-arrows { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sort-arrows-num { min-width: 22px; text-align: center; }
.sort-arrows-form { display: inline-flex; }
.sort-arrow-btn {
  width: 24px; height: 24px; padding: 0; border-radius: 6px; border: 1px solid var(--border, #ccc); background: transparent;
  color: inherit; font-size: 10px; line-height: 1; cursor: pointer;
}
.sort-arrow-btn:hover:not(:disabled) { background: rgba(127,127,127,0.18); }
.sort-arrow-btn:disabled { opacity: 0.3; cursor: default; }

/* =====================================================================
   ROUND 164 - Guest menu upgrade (all screen sizes): banner shown whole,
   many Menu Group tabs, sticky category list with its own scroll, jump to
   the category title, lower footer, ordering "+" / View order, item sheet.
   ===================================================================== */

/* -- Banner: the whole picture (never cut) -------------------------------- */
.guest-menu-hero-band.guest-hero-whole,
.survey-hero.brand-hero-banner.guest-menu-hero-band.guest-hero-whole { height: auto; display: grid; }
.guest-hero-whole .survey-hero-slide { position: relative; inset: auto; grid-area: 1 / 1; background: none; }
.guest-hero-whole .guest-hero-img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; margin: 0 auto; }
.guest-hero-whole .survey-hero-video { position: static; width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; }
/* the photo is no longer a background, so the hero text / button sit on the
   slide itself (already position: relative above) */
.guest-hero-whole .guest-menu-hero-copy { bottom: 40px; }

/* -- Menu Group tabs: one sideways-scrolling sticky row with arrows --------- */
.guest-menu-group-panel, .guest-menu-layout, .guest-menu-sections { background-color: inherit; }
.menu-group-tabs-wrap {
  position: sticky; top: 0; z-index: 25; display: flex; align-items: center; background-color: inherit;
  box-shadow: 0 1px 0 rgba(127,127,127,0.18);
}
.menu-group-tabs-wrap .menu-group-tabs {
  position: static; z-index: auto; flex: 1; min-width: 0; justify-content: flex-start; padding: 12px 16px 10px;
  scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
}
.menu-group-tabs-wrap .menu-group-tabs::-webkit-scrollbar { display: none; }
/* centred while everything fits, starts at the edge once it overflows */
.menu-group-tabs-wrap .menu-group-tabs > :first-child { margin-inline-start: auto; }
.menu-group-tabs-wrap .menu-group-tabs > :last-child { margin-inline-end: auto; }
.menu-group-tabs-arrow {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(127,127,127,0.45);
  background: rgba(127,127,127,0.18); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; margin-inline: 6px;
}
.menu-group-tabs-arrow:hover { background: rgba(127,127,127,0.32); }
.menu-group-tabs-arrow[hidden] { display: none; }
html[dir="rtl"] .menu-group-tabs-arrow { transform: scaleX(-1); }
/* a single-tab menu has no tabs bar, so nothing sticks above the categories */
.menu-group-tab { scroll-margin-inline: 40px; }

/* -- Categories: sticky, own scroll, follow the page -------------------------- */
.category-strip {
  position: sticky; top: var(--gm-tabs-h, 0px); z-index: 20; background-color: inherit;
  scrollbar-width: none; scroll-behavior: smooth;
}
.category-strip::-webkit-scrollbar { display: none; }
.category-strip-icon, .category-rail-icon { color: rgba(127,127,127,0.95); display: flex; align-items: center; justify-content: center; }
.category-strip-item.active .category-strip-icon { color: #fff; }
.guest-menu-category-section { scroll-margin-top: calc(var(--gm-tabs-h, 0px) + var(--gm-strip-h, 0px) + 10px); }
@media (min-width: 768px) {
  .category-rail {
    position: sticky; top: calc(var(--gm-tabs-h, 0px) + 8px); align-self: start;
    max-height: calc(100vh - var(--gm-tabs-h, 0px) - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 6px 8px 0; scrollbar-width: thin; scroll-behavior: smooth;
  }
  html[dir="rtl"] .category-rail { padding: 8px 0 8px 6px; }
  .category-rail-item { gap: 12px; padding: 7px 10px; font-size: 14px; }
  .category-rail-icon { width: 54px; height: 54px; border-radius: 12px; }
  .category-rail-icon svg { width: 24px; height: 24px; }
  .category-rail-item.active .category-rail-icon { outline: 2px solid var(--brand-red); outline-offset: 0; }
}

/* -- Footer further down, content never hidden behind the fixed bars ---------- */
.guest-menu-page { padding-bottom: 0; }
.guest-menu-content-body { padding-bottom: 56px; }
.guest-menu-footer { padding-top: 14px; padding-bottom: 76px; }
.guest-menu-description-clamp, .guest-item-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* -- Ordering: "+" on cards, stepper, View order bar and sheet --------------- */
.guest-item-add { display: inline-flex; align-items: center; margin-inline-start: auto; }
.guest-item-add-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--brand-red); color: #fff;
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.guest-item-add-btn:hover { background: var(--brand-red-dark); }
.guest-item-stepper {
  display: inline-flex; align-items: center; gap: 2px; border-radius: 18px; background: rgba(127,127,127,0.16); padding: 2px;
}
.guest-item-stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--brand-red); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.guest-item-stepper b { min-width: 22px; text-align: center; font-size: 14px; color: inherit; }
.guest-item-grid-grid .guest-item-cta, .guest-item-grid-list .guest-item-cta { gap: 8px; }
.guest-order-bar { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 40; display: flex; justify-content: center; }
.guest-menu-fab-row ~ .guest-order-bar { bottom: 78px; }
.guest-item-card:hover { text-decoration: none; }
.guest-order-bar[hidden] { display: none; }
.guest-order-bar-btn {
  width: 100%; max-width: 520px; border: none; border-radius: 28px; background: var(--brand-red); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  font-size: 15px; font-weight: 700; box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.guest-order-bar-total { background: rgba(255,255,255,0.2); border-radius: 18px; padding: 4px 12px; white-space: nowrap; }
.guest-order-sheet { position: fixed; inset: 0; z-index: 70; }
.guest-order-sheet[hidden] { display: none; }
.guest-order-sheet-backdrop, .guest-item-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.guest-order-sheet-panel, .guest-item-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; max-height: 86vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 16px 16px 22px; z-index: 3;
}
.guest-order-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 17px; }
.guest-order-sheet-close, .guest-item-sheet-close {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(127,127,127,0.25); color: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.guest-order-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(127,127,127,0.25); }
.guest-order-line-name { flex: 1; min-width: 0; font-weight: 600; }
.guest-order-line-total { min-width: 60px; text-align: end; font-weight: 700; }
.guest-order-sum { display: flex; justify-content: space-between; padding: 14px 0 4px; font-size: 16px; }
.guest-order-hint { margin: 4px 0 12px; }
.guest-order-sheet-panel .btn-block { margin-top: 8px; }
.guest-item-sheet { position: fixed; inset: 0; z-index: 70; }
.guest-item-sheet-panel { padding: 0 0 18px; }
.guest-item-sheet-panel .guest-item-detail-photo { height: 220px; }
.guest-item-sheet-panel .guest-item-detail-body { padding: 16px; }
.guest-item-sheet-panel .guest-item-detail-body-no-photo { padding-top: 54px; }
.guest-item-sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 4; background: rgba(255,255,255,0.9); color: #14100e; }
.guest-item-sheet-foot { padding: 0 16px; }
html.guest-sheet-open { overflow: hidden; }
html.guest-has-order .guest-menu-footer { padding-bottom: 132px; }

/* ROUND 164 - the LAST category of a menu group is usually short, so the page
   ended before it could scroll up under the sticky bars and tapping it landed
   "in the middle". A minimum height lets even the last category land on its title. */
.guest-menu-sections > .guest-menu-category-section:last-child {
  min-height: calc(var(--gm-vh, 100vh) - var(--gm-tabs-h, 0px) - var(--gm-strip-h, 0px) - 190px);
}


/* ===== ROUND 165 (v2.27) ===== */
/* Footer: much smaller - one compact block (logo + name, follow-us + icons on one line, phone, copyright). */
.guest-menu-footer { padding-left: 16px; padding-right: 16px; }
.guest-menu-footer-inner { max-width: 520px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; }
.guest-menu-footer-brand { margin-bottom: 0; gap: 8px; }
.guest-menu-footer-logo { width: 26px; height: 26px; border-radius: 6px; }
.guest-menu-footer-name { font-size: 13px; }
.guest-menu-footer-social { margin-bottom: 0; display: inline-flex; align-items: center; gap: 8px; }
.guest-menu-footer-follow { display: inline; margin-bottom: 0; font-size: 10px; }
.guest-menu-footer-social .guest-menu-social { gap: 6px; }
.guest-menu-footer-social .guest-menu-social a, .guest-menu-footer-social .guest-menu-social svg { width: 24px; height: 24px; }
.guest-menu-footer-phone { margin-bottom: 0; font-size: 12px; }
.guest-menu-footer-copyright { flex-basis: 100%; font-size: 10px; margin-top: 2px; }

/* "All" chip + item count next to the category title */
.category-strip-all span { font-weight: 700; }
.guest-menu-cat-count {
  display: inline-block; margin-inline-start: 8px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(127,127,127,0.16); color: inherit; vertical-align: middle; opacity: 0.8;
}

/* Canvas pages: the menu lives inside a scaled + clipped surface where native
   `position: sticky` cannot work, so the bars stay in flow and a script moves
   them (see menu-widget.ejs pinBars()). */
.canvas-surface .menu-group-tabs-wrap, .canvas-surface .category-strip, .canvas-surface .category-rail { position: relative; top: auto; will-change: transform; }
.canvas-surface .menu-group-tabs-wrap { z-index: 25; }
.canvas-surface .category-strip { z-index: 20; }

/* ROUND 158 - searchable drop-down (public/js/search-select.js) */
.ss-wrap { position: relative; }
.ss-input { width: 100%; padding-inline-end: 28px; }
.ss-caret { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 11px; cursor: pointer; }
.ss-list { position: absolute; z-index: 40; top: calc(100% + 4px); inset-inline-start: 0; min-width: 100%; width: max-content; max-width: min(520px, 92vw); max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px; box-shadow: 0 8px 22px rgba(11,11,11,0.16); }
.ss-list[hidden] { display: none; }
.ss-opt { padding: 7px 10px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--text-primary); white-space: normal; }
.ss-opt:hover, .ss-opt.ss-active { background: var(--surface-2, #f1f1f1); }
.ss-opt.ss-sel { font-weight: 600; }
.ss-opt.ss-none { color: var(--text-muted); }
.ss-empty, .ss-more { padding: 8px 10px; font-size: 12px; color: var(--text-muted); }

/* v2.40 - item out of stock at this branch (Menu -> Branch Availability): greyed card + badge, no add controls */
.guest-item-card.guest-item-out > img,
.guest-item-card.guest-item-out .guest-item-info,
.pos-picker-card.pos-picker-out > img,
.pos-picker-card.pos-picker-out > strong,
.pos-picker-card.pos-picker-out .pos-picker-thumb-placeholder { opacity: .45; filter: grayscale(1); }
.guest-item-card.guest-item-out .guest-item-price,
.pos-picker-card.pos-picker-out .pos-picker-price { opacity: .5; text-decoration: line-through; }
.guest-item-out-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #8a1f1f; background: #fdecea; border: 1px solid #f3c1bb; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pos-picker-card.pos-picker-out { cursor: not-allowed; }

/* v2.44 - equal-width column grid for settings blocks (Brand -> Guest Digital Menu Appearance) */
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; align-items: start; margin-bottom: 8px; }
.form-grid-3 > div { min-width: 0; }
.form-grid-3 > .span-2 { grid-column: span 2; }
.form-grid-3 select, .form-grid-3 input[type=text] { width: 100%; box-sizing: border-box; }
.form-grid-3 .pill-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid-3 .pill-row .checkbox-pill { margin: 0; }
@media (max-width: 900px) { .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid-3 > .span-2 { grid-column: span 2; } }
@media (max-width: 560px) { .form-grid-3 { grid-template-columns: minmax(0, 1fr); } .form-grid-3 > .span-2 { grid-column: auto; } .form-grid-3 .pill-row { grid-template-columns: minmax(0, 1fr); } }

/* v2.60 - an author `display` (e.g. `label { display:block }`) beats the browser's [hidden] rule, so hidden labels / fields kept
   showing and pushed their column's input down ("columns not aligned"). Hidden always means hidden. */
[hidden] { display: none !important; }
/* Branch tick-list used on the Deals / Offers forms: tight rows, same top edge as the brand select beside it. */
.branch-box { max-height: 170px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: #fff; margin-top: 4px; }
.check-line { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 0; font-weight: 500; font-size: 13px; color: var(--text-primary); }
.check-line input { width: auto; margin: 0; }
#offerForm input[type="time"] { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text-primary); }

/* v2.61 - Takeaway order button on the freeform Canvas page (always visible, above the Reserve bar). */
.canvas-order-fab { position: fixed; z-index: 60; inset-inline-end: 16px; bottom: 84px; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.3); text-decoration: none; }
@media (min-width: 768px) { .canvas-order-fab { bottom: 24px; } }

/* v2.62 - Data Viewer (Setups): table list on the left, rows on the right */
.dv-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.dv-side { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; background: var(--card, #fff); padding: 10px; position: sticky; top: 8px; }
.dv-side-head { font-weight: 600; margin-bottom: 8px; }
.dv-find { width: 100%; margin-bottom: 8px; }
.dv-list { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; }
.dv-list a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: inherit; }
.dv-list a:hover { background: rgba(0,0,0,.05); }
.dv-list a.active { background: var(--primary, #b91c1c); color: #fff; }
.dv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-count { opacity: .75; font-size: 12px; }
.dv-empty { padding: 40px 16px; text-align: center; color: #6b7280; border: 1px dashed #d1d5db; border-radius: 8px; }
.dv-table-title { margin: 0 0 10px; font-size: 18px; }
.dv-scroll { overflow-x: auto; }
.dv-table td, .dv-table th { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-table .dv-id { font-family: monospace; font-size: 12px; }
.dv-sort { color: inherit; text-decoration: none; }
.dv-cols { position: relative; }
.dv-cols summary { list-style: none; cursor: pointer; }
.dv-cols-box { position: absolute; z-index: 20; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px; max-height: 280px; overflow: auto; min-width: 200px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.dv-cols-box label { display: block; }
.dv-dialog { width: min(760px, 94vw); max-height: 80vh; border: 1px solid #d1d5db; border-radius: 10px; padding: 12px; }
.dv-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dv-dialog pre { margin: 0; max-height: 60vh; overflow: auto; font-size: 12px; background: #f9fafb; padding: 10px; border-radius: 6px; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 800px) { .dv-wrap { grid-template-columns: 1fr; } .dv-side { position: static; } .dv-list { max-height: 200px; } }
.dv-filters { align-items: flex-end; }
.dv-filters > input[type=search] { flex: 1 1 220px; min-width: 200px; }
.dv-filters select { max-width: 200px; }
.dv-date { display: flex; flex-direction: column; font-size: 11px; color: #6b7280; margin: 0; }
.dv-date span { margin-bottom: 2px; font-weight: 500; }
.dv-table th { text-transform: none; }

/* v2.68 - ERP & Finance pages */
.erp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); }
.erp-bar-label { margin: 0; font-weight: 600; color: var(--text-secondary); }
.erp-bar-select { width: auto; min-width: 260px; }
.erp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
html[dir="rtl"] .erp-num { text-align: left; }
.erp-tot td { font-weight: 700; background: #faf9f6; }
.erp-sub td { font-weight: 600; }
.erp-msg { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px; }
.erp-msg.ok { background: #eaf7ea; color: #1e5c1e; }
.erp-msg.bad { background: #fdecea; color: #8a1f1f; }
.erp-hint { color: var(--text-muted); margin: 0 0 14px; }
.erp-filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 16px; }
.erp-filter > div { flex: 0 1 200px; min-width: 150px; }
.erp-filter select, .erp-filter input[type=date], .erp-filter input[type=search], .erp-filter input[type=text] { width: 100%; }
.erp-scroll { overflow-x: auto; }
.erp-filter > .erp-filter-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.erp-filter > div:first-child { flex-basis: 300px; }

/* v2.68 - POS printers / print helper */
.erp-helper { margin-bottom: 16px; }
.erp-helper-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.erp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); display: inline-block; flex: 0 0 auto; }
.erp-dot.on { background: #2e9d57; }
.erp-dot.off { background: #c0392b; }
.erp-helper-adv { margin-top: 10px; }
.erp-helper-adv summary { cursor: pointer; color: var(--text-secondary); }
.erp-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.erp-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.erp-report-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; }
.erp-report-card:hover { border-color: var(--brand-red); }
.erp-report-card strong { font-size: 1.02rem; }
.erp-report-card span { color: var(--text-secondary); font-size: .9rem; }

/* v2.68 - ERP pages on phones and tablets */
@media (max-width: 700px) {
  .erp-bar { padding: 10px 12px; }
  .erp-bar-select { width: 100%; min-width: 0; }
  .erp-filter > div, .erp-filter > div:first-child { flex: 1 1 100%; min-width: 0; }
  .erp-filter select, .erp-filter input { width: 100%; }
  .erp-test-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head > div { display: flex; flex-wrap: wrap; gap: 8px; }
  .erp-scroll { -webkit-overflow-scrolling: touch; }
}

/* v2.69 - Inventory, B2B sales and Finance integration pages */
.erp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.erp-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.erp-facts small, .erp-doc-totals small { color: var(--text-muted); font-size: .78rem; }
.erp-facts b { overflow-wrap: anywhere; }
.erp-doc-totals { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 14px 0; padding: 12px 16px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); }
.erp-doc-totals > span { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.erp-doc-totals b { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.erp-lines { margin: 4px 0 8px; }
.erp-line { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)) 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.erp-line .erp-cell { margin: 0; display: block; }
.erp-line input, .erp-line select { width: 100%; }
.erp-line-head { font-size: .78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.erp-line .erp-rm { padding: 4px 0; }
.erp-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; }
.erp-neg { color: #b42318; }
.erp-code { background: #1f2430; color: #e8ecf4; padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: .82rem; line-height: 1.5; white-space: pre; }
.erp-steps { margin: 0 0 0 1.2em; padding: 0; line-height: 1.7; }
.erp-journal > summary { cursor: pointer; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .erp-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-1); }
  .erp-line-head { display: none; }
  .erp-line .erp-cell::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
  .erp-line .erp-cell:first-child { grid-column: 1 / -1; }
  .erp-line .erp-rm { grid-column: 1 / -1; justify-self: end; }
  .erp-doc-totals { gap: 8px 16px; padding: 10px 12px; }
  .erp-doc-totals > span { min-width: 80px; }
  .erp-code { font-size: .74rem; }
}

/* v2.75 - sub-headings inside a sidebar group (Finance: General Ledger / Receivables / ..., ERP Setup: Organization / ...) */
.app-shell .sidebar-nav-subheading { margin: 8px 0 2px; padding: 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.app-shell .sidebar-nav-group-items .sidebar-nav-subheading:first-child { margin-top: 2px; }

/* v2.75 - ERP permission matrix on the Users screen */
.erp-perm-module { margin: 0 0 14px; border: 1px solid var(--border, #e5e0d8); border-radius: 10px; overflow: hidden; }
.erp-perm-module > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; background: var(--surface-2, #f6f3ee); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.erp-perm-module > summary .muted { font-weight: 400; }
.erp-perm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.erp-perm-table th, .erp-perm-table td { padding: 7px 10px; text-align: center; border-top: 1px solid var(--border, #e5e0d8); }
.erp-perm-table th:first-child, .erp-perm-table td:first-child { text-align: start; width: 46%; }
.erp-perm-table tr.erp-perm-sub td { text-align: start; background: rgba(0, 0, 0, 0.03); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.erp-perm-table input[type="checkbox"] { width: 17px; height: 17px; }
.erp-perm-table .na { color: #bbb; }
@media (max-width: 640px) {
  .erp-perm-table th, .erp-perm-table td { padding: 6px 4px; font-size: 12px; }
  .erp-perm-table th:first-child, .erp-perm-table td:first-child { width: 38%; }
}

/* v2.92 - Customer ordering block of the branch form: one 4-column grid so every service lines up
   (enable | auto-approve | cash / spare | preparation time) and every switch box has the same height */
.ord-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; margin: 10px 0 18px; align-items: start; }
.ord-grid .ord-cell > .checkbox-pill { min-height: 58px; box-sizing: border-box; width: 100%; }
.ord-grid .ord-cell > p { margin: 6px 2px 0; line-height: 1.45; }
.ord-grid .ord-wide { grid-column: 1 / -1; }
.ord-grid .ord-blank { display: none; }
.ord-grid .ord-num { justify-content: space-between; gap: 10px; }
.ord-grid .ord-num span { flex: 1; font-size: 13px; }
.ord-grid .ord-num input { width: 84px; flex: none; margin: 0; padding: 5px 8px; text-align: center; }
@media (min-width: 1101px) { .ord-grid .ord-blank { display: block; } }
@media (max-width: 1100px) { .ord-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ord-grid { grid-template-columns: 1fr; } }
