/* ==========================================================================
   Bookrodera - one stylesheet for the whole application.

   No CSS framework and no CDN, so the panel works with no internet connection
   and there is one place to change how anything looks.

   Written mobile first: the base rules are the phone layout, and the media
   queries add the sidebar and wider grids for larger screens.
   ========================================================================== */

/* ------------------------------------------------ layout utilities -- */
/* Generated from the style="..." attributes that used to sit in the
   markup, so the Content-Security-Policy can refuse inline styles
   (style-src 'self'). !important keeps the precedence the inline style
   had; they come first in this file so its own !important rules (such
   as [hidden]) still win a tie, exactly as they beat inline styles. */
.u-accent-brand { accent-color: var(--brand) !important; }
.u-ai-center { align-items: center !important; }
.u-ai-flex-end { align-items: flex-end !important; }
.u-ai-flex-start { align-items: flex-start !important; }
.u-b-0 { border: 0 !important; }
.u-bg-surface-2 { background: var(--surface-2) !important; }
.u-bt-1px-solid-border { border-top: 1px solid var(--border) !important; }
.u-c-text-soft { color: var(--text-soft) !important; }
.u-cols-3338c1 { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)) !important; }
.u-cursor-pointer { cursor: pointer !important; }
.u-d-flex { display: flex !important; }
.u-d-inline { display: inline !important; }
.u-ff-monospace { font-family: monospace !important; }
.u-fit-cover { object-fit: cover !important; }
.u-flex-1 { flex: 1 !important; }
.u-fs-1_02rem { font-size: 1.02rem !important; }
.u-fs-1_1rem { font-size: 1.1rem !important; }
.u-fs-1_25rem { font-size: 1.25rem !important; }
.u-fs-1_2rem { font-size: 1.2rem !important; }
.u-fs-1_4rem { font-size: 1.4rem !important; }
.u-fs-1_5rem { font-size: 1.5rem !important; }
.u-fs-_85rem { font-size: .85rem !important; }
.u-fs-_8rem { font-size: .8rem !important; }
.u-fs-_92rem { font-size: .92rem !important; }
.u-fw-400 { font-weight: 400 !important; }
.u-fw-600 { font-weight: 600 !important; }
.u-gap-_35rem { gap: .35rem !important; }
.u-gap-_4rem { gap: .4rem !important; }
.u-gap-_5rem { gap: .5rem !important; }
.u-h-120px { height: 120px !important; }
.u-h-20px { height: 20px !important; }
.u-h-46px { height: 46px !important; }
.u-h-52px { height: 52px !important; }
.u-h-72px { height: 72px !important; }
.u-h-80px { height: 80px !important; }
.u-jc-center { justify-content: center !important; }
.u-jc-flex-end { justify-content: flex-end !important; }
.u-jc-space-between { justify-content: space-between !important; }
.u-m-0 { margin: 0 !important; }
.u-m-0-0-_35rem { margin: 0 0 .35rem !important; }
.u-m-0-0-_5rem { margin: 0 0 .5rem !important; }
.u-m-0-0-_75rem { margin: 0 0 .75rem !important; }
.u-m-1_25rem-0-0 { margin: 1.25rem 0 0 !important; }
.u-m-1_5rem-0-0 { margin: 1.5rem 0 0 !important; }
.u-m-1rem-0 { margin: 1rem 0 !important; }
.u-m-1rem-0-0 { margin: 1rem 0 0 !important; }
.u-m-_25rem-0-0 { margin: .25rem 0 0 !important; }
.u-m-_35rem-0-0 { margin: .35rem 0 0 !important; }
.u-m-_6rem-0-0 { margin: .6rem 0 0 !important; }
.u-m-_75rem-0-0 { margin: .75rem 0 0 !important; }
.u-maxh-60vh { max-height: 60vh !important; }
.u-maxw-120px { max-width: 120px !important; }
.u-maxw-130px { max-width: 130px !important; }
.u-maxw-220px { max-width: 220px !important; }
.u-maxw-260px { max-width: 260px !important; }
.u-maxw-420px { max-width: 420px !important; }
.u-maxw-440px { max-width: 440px !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-1_25rem { margin-bottom: 1.25rem !important; }
.u-mb-1rem { margin-bottom: 1rem !important; }
.u-mb-_5rem { margin-bottom: .5rem !important; }
.u-minh-38px { min-height: 38px !important; }
.u-minw-110px { min-width: 110px !important; }
.u-minw-150px { min-width: 150px !important; }
.u-minw-180px { min-width: 180px !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-1_25rem { margin-top: 1.25rem !important; }
.u-mt-_5rem { margin-top: .5rem !important; }
.u-oy-auto { overflow-y: auto !important; }
.u-p-0 { padding: 0 !important; }
.u-p-1rem { padding: 1rem !important; }
.u-p-1rem-1_15rem { padding: 1rem 1.15rem !important; }
.u-p-_15rem-0 { padding: .15rem 0 !important; }
.u-p-_25rem { padding: .25rem !important; }
.u-p-_25rem-0 { padding: .25rem 0 !important; }
.u-p-_5rem-0 { padding: .5rem 0 !important; }
.u-p-_5rem-1rem { padding: .5rem 1rem !important; }
.u-pl-0 { padding-left: 0 !important; }
.u-pr-0 { padding-right: 0 !important; }
.u-pt-1_15rem { padding-top: 1.15rem !important; }
.u-pt-_15rem { padding-top: .15rem !important; }
.u-r-12px { border-radius: 12px !important; }
.u-r-16px { border-radius: 16px !important; }
.u-r-radius { border-radius: var(--radius) !important; }
.u-shadow-none { box-shadow: none !important; }
.u-ta-center { text-align: center !important; }
.u-ta-right { text-align: right !important; }
.u-w-100pc { width: 100% !important; }
.u-w-120px { width: 120px !important; }
.u-w-20px { width: 20px !important; }
.u-w-2_5rem { width: 2.5rem !important; }
.u-w-72px { width: 72px !important; }
.u-w-80px { width: 80px !important; }
.u-w-92pc { width: 92% !important; }
.u-w-94pc { width: 94% !important; }
.u-w-auto { width: auto !important; }
.u-wrap-wrap { flex-wrap: wrap !important; }

:root {
  --brand:        #e4572e;
  --brand-dark:   #c6431e;
  --brand-soft:   #fdeee9;

  --bg:           #f4f5f7;
  --surface:      #ffffff;
  --surface-2:    #fafafa;

  --text:         #16191d;
  --text-soft:    #4b5563;
  --muted:        #6b7280;
  --border:       #e5e7eb;
  --border-dark:  #d1d5db;

  --green:        #15803d;  --green-bg:  #dcfce7;
  --amber:        #b45309;  --amber-bg:  #fef3c7;
  --red:          #b91c1c;  --red-bg:    #fee2e2;
  --blue:         #1d4ed8;  --blue-bg:   #dbeafe;
  --grey:         #4b5563;  --grey-bg:   #f3f4f6;
  --purple:       #6d28d9;  --purple-bg: #ede9fe;

  --radius:       14px;
  --radius-sm:    10px;
  --shadow:       0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --shadow-lg:    0 10px 30px rgba(16, 24, 40, .12);

  --sidebar-w:    248px;
  --bottom-nav-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand-dark); }
a:hover { color: var(--brand); }

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Anything focused by keyboard must be obvious. */
:focus-visible {
  outline: 3px solid rgba(228, 87, 46, .45);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- layout -- */

.app { min-height: 100vh; }

.app__main {
  padding: 1rem 1rem calc(var(--bottom-nav-h) + 1.5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }
.page-head__sub { color: var(--muted); font-size: .92rem; margin: .15rem 0 0; }

/* ------------------------------------------------------------- topbar --- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar__brand {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; letter-spacing: -.01em; color: var(--text);
  text-decoration: none; font-size: 1.05rem;
}
.topbar__logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: .95rem;
}
.topbar__spacer { flex: 1; }
.topbar__venue {
  font-size: .85rem; color: var(--muted);
  max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ------------------------------------------------------------ sidebar --- */

.sidebar { display: none; }

.sidebar__section {
  padding: .5rem .75rem .25rem;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700;
}

.sidebar a,
.sidebar__link {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 550;
}
/* Sign out is a POST form, so it is a button dressed as a sidebar link. */
.sidebar__form { margin: 0; }
.sidebar__link {
  width: 100%; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 550; text-align: left;
}
.sidebar a:hover,
.sidebar__link:hover { background: var(--surface-2); color: var(--text); }
.sidebar a.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.sidebar .ico { width: 20px; flex: none; display: inline-flex; justify-content: center; }
.sidebar .ico .icon { width: 20px; height: 20px; }
.topbar__form { margin: 0; display: flex; }
.sidebar__badge {
  margin-left: auto;
  background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 700;
  border-radius: 999px; padding: .05rem .45rem;
}

/* --------------------------------------------------------- bottom nav --- */
/* The phone navigation. Five destinations, thumb reachable. */

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: .5rem .25rem;
  min-height: var(--bottom-nav-h);
  font-size: .68rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.bottomnav a.is-active { color: var(--brand-dark); }
.bottomnav .ico { display: inline-flex; line-height: 1; }
.bottomnav .ico .icon { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- card -- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .9rem 1rem; border-bottom: 1px solid var(--border);
}
.card__head h2, .card__head h3 { margin: 0; font-size: 1rem; }
.card__body  { padding: 1rem; }
.card__foot  { padding: .75rem 1rem; border-top: 1px solid var(--border); background: var(--surface-2);
               border-radius: 0 0 var(--radius) var(--radius); }
.card--flat  { box-shadow: none; }

/* ---------------------------------------------------------------- stat -- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  text-decoration: none; color: inherit; display: block;
}
a.stat:hover { border-color: var(--border-dark); }
.stat__label { font-size: .78rem; color: var(--muted); font-weight: 600;
               text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; margin-top: .2rem;
               font-variant-numeric: tabular-nums; }
.stat__hint  { font-size: .8rem; color: var(--muted); }
.stat--brand .stat__value { color: var(--brand-dark); }

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.1rem;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--outline { border-color: var(--border-dark); background: var(--surface); }
.btn--outline:hover { background: var(--surface-2); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--success { background: var(--green); color: #fff; }
.btn--success:hover { background: #126c34; color: #fff; }

.btn--danger  { background: var(--red); color: #fff; }
.btn--danger:hover { background: #9c1717; color: #fff; }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: .4rem .7rem; font-size: .88rem; }
.btn--lg { min-height: 56px; font-size: 1.05rem; padding: .9rem 1.4rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Quick actions: the big buttons a busy restaurant taps most. */
.quick-actions {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 1.25rem;
}
.quick-actions .btn { min-height: 58px; font-size: 1rem; }

/* --------------------------------------------------------------- forms -- */

.field { margin-bottom: 1rem; }
.field > label,
.label {
  display: block;
  font-weight: 600; font-size: .9rem;
  margin-bottom: .3rem;
}
.field__hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.field__error { font-size: .85rem; color: var(--red); margin-top: .25rem; font-weight: 600; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=time], input[type=url],
input[type=search], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: .65rem .75rem;
  min-height: 46px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}
textarea { min-height: 90px; resize: vertical; }
/* A file picker is a tap target too: 46px tall, and 16px so iOS does not zoom. */
input[type=file] { max-width: 100%; min-height: 46px; padding: .55rem 0; font-size: 16px; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(228, 87, 46, .2);
  outline-offset: 0;
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--red);
}
input:disabled, select:disabled, textarea:disabled { background: var(--grey-bg); color: var(--muted); }

.field-row {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.check {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .6rem 0;
}
.check input[type=checkbox], .check input[type=radio] {
  width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand);
}
.check label { font-weight: 550; margin: 0; }
.check__hint { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; }

/* A large on/off row - the "Available" switch a restaurant uses all day. */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row__text strong { display: block; }
.toggle-row__text span { font-size: .85rem; color: var(--muted); }

.switch { position: relative; display: inline-block; width: 54px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__track {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border-dark); border-radius: 999px; transition: background .15s ease;
}
.switch__track::before {
  content: ""; position: absolute; height: 26px; width: 26px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::before { transform: translateX(22px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(228,87,46,.45); outline-offset: 2px; }

/* --------------------------------------------------------------- badge -- */

.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  white-space: nowrap;
}
.badge--green  { background: var(--green-bg);  color: var(--green); }
.badge--amber  { background: var(--amber-bg);  color: var(--amber); }
.badge--red    { background: var(--red-bg);    color: var(--red); }
.badge--blue   { background: var(--blue-bg);   color: var(--blue); }
.badge--grey   { background: var(--grey-bg);   color: var(--grey); }
.badge--purple { background: var(--purple-bg); color: var(--purple); }

/* --------------------------------------------------------------- alert -- */

.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-weight: 550;
}
.alert--success { background: var(--green-bg); color: var(--green); border-color: #bbf7d0; }
.alert--error   { background: var(--red-bg);   color: var(--red);   border-color: #fecaca; }
.alert--warning { background: var(--amber-bg); color: var(--amber); border-color: #fde68a; }
.alert--info    { background: var(--blue-bg);  color: var(--blue);  border-color: #bfdbfe; }
.alert span { flex: 1; }
.alert__close {
  background: none; border: 0; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: inherit; opacity: .6; padding: 0 .2rem;
}
.alert__close:hover { opacity: 1; }

/* --------------------------------------------------------------- table -- */

/* position: relative makes the wrapper the containing block of anything absolutely
   positioned inside the table (a visually-hidden label sits at its place in the row):
   without it such an element escapes the wrapper's scrolling and widens the page. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: .7rem .75rem; text-align: left; vertical-align: middle; }
.table thead th {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- empty/list -- */

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.empty__icon { opacity: .55; display: flex; justify-content: center; }
.empty__icon .icon { width: 40px; height: 40px; stroke-width: 1.6; }
.is-dim { opacity: .6; }

/* ------------------------------------------------------- payment step -- */
.pay-head { text-align: center; margin: 1.25rem 0 1rem; }
.pay-head__kicker { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .85rem; margin: 0 0 .25rem; }
.pay-card { padding: 1rem 1.15rem; margin-bottom: 1rem; }
.pay-items summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; padding: .25rem 0; }
.pay-element { min-height: 120px; margin-bottom: 1rem; }
.pay-element__loading { margin: 0; padding: 2.5rem 0; text-align: center; }
.pay-error { margin-bottom: 1rem; }
.pay-secure { display: flex; gap: .4rem; align-items: flex-start; margin: .75rem 0 0; }
.pay-secure .icon { margin-top: .15rem; }
.pay-cancel { margin-bottom: 2rem; }
.track-paying { margin-top: 1rem; }
.auth__card--wide { max-width: 520px; }
.signup-group { border: 0; padding: 0; margin: 0 0 1rem; }
.signup-group legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.preview-bar { background: #1e293b; color: #fff; text-align: center; font-size: .85rem; padding: .45rem 1rem; }
.setup-steps { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .6rem; }
.setup-step {
  display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem;
}
.setup-step > .btn, .setup-step > form { grid-column: 2; justify-self: start; }
@media (min-width: 720px) {
  .setup-step { grid-template-columns: 2rem 1fr auto; align-items: center; }
  .setup-step > .btn, .setup-step > form { grid-column: auto; }
}
.setup-step__num {
  width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-weight: 700; color: var(--muted);
}
.setup-step.is-done .setup-step__num { background: var(--green-bg, #dcfce7); color: var(--green, #15803d); }
.setup-step--live { border-color: var(--brand); }
.setup-step .badge { margin-left: .35rem; }
.plan-buy { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.finance-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 1000px) { .finance-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.refund-form { display: grid; gap: .25rem; }
.refund-form .field { margin-bottom: .5rem; }
@media (min-width: 720px) {
  .refund-form { grid-template-columns: 10rem 1fr 1fr auto; align-items: end; gap: .75rem; }
  .refund-form .field { margin-bottom: 0; }
}
.track-paying p { margin: 0 0 .75rem; }
.spinner {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.empty__icon--ok { opacity: 1; color: var(--success, #15803d); }
.list__ico { width: 28px; flex: none; display: inline-flex; justify-content: center; color: var(--muted); }
.list__ico .icon { width: 22px; height: 22px; }
.empty h3 { color: var(--text); margin-top: .5rem; }
.empty p { max-width: 24rem; margin: 0 auto 1rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex; flex-wrap: wrap; align-items: center; gap: .85rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.list > li:last-child { border-bottom: 0; }
.list__main { flex: 1 1 10rem; min-width: 0; }   /* never squeezed below a readable width: what follows wraps instead */
.list__title { font-weight: 650; }
.list__meta  { font-size: .86rem; color: var(--muted); }
.list__time  {
  font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: 1rem; min-width: 74px; flex: none;
}
/* A day's agenda on a phone (dashboard "Still to come today"): the time in
   its own column, the name and details beside it, status and Open on the
   right - instead of the badge and button wrapping under the time. */
@media (max-width: 600px) {
  .list--agenda > li {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "time main open" "time status open";
    column-gap: .75rem; row-gap: .3rem; align-items: center;
  }
  .list--agenda .list__time { grid-area: time; align-self: start; min-width: 0; padding-top: .05rem; }
  .list--agenda .list__main { grid-area: main; }
  .list--agenda > li > .badge { grid-area: status; justify-self: start; }
  .list--agenda > li > .btn { grid-area: open; }
}
/* After midnight in a late night: the day it falls on ("Sat"). */
.list__time-day { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

/* --------------------------------------------------------------- misc --- */

.muted     { color: var(--muted); }
.small     { font-size: .86rem; }
.strong    { font-weight: 700; }
.nowrap    { white-space: nowrap; }
.text-right{ text-align: right; }
.mt-0 { margin-top: 0; }    .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mb-1 { margin-bottom: .5rem; }
.mt-2 { margin-top: 1rem; }  .mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }.mb-3 { margin-bottom: 1.5rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-block; padding: .4rem .8rem;
  border: 1px solid var(--border-dark); border-radius: 999px;
  background: var(--surface); color: var(--text-soft);
  text-decoration: none; font-size: .88rem; font-weight: 600;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.divider-label {
  display: flex; align-items: center; gap: .75rem;
  color: var(--muted); font-size: .84rem; margin: 1.25rem 0;
}
.divider-label::before, .divider-label::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* -------------------------------------------------------------- auth ---- */

.auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.25rem;
  /* The same quiet, warm backdrop as the sign-in pages (site.css). */
  background: radial-gradient(900px 420px at 0% 0%, var(--brand-soft) 0%, transparent 65%), var(--bg);
}
.auth__card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 50px -30px rgba(16, 24, 40, .35);
  padding: 1.75rem 1.5rem;
}
@media (min-width: 480px) { .auth__card { padding: 2.25rem 2rem; } }
.auth__brand {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin-bottom: 1.25rem; font-weight: 800; font-size: 1.3rem;
}
.auth__brand .topbar__logo { width: 36px; height: 36px; font-size: 1.05rem; }
.auth__title { font-size: 1.25rem; text-align: center; }
.auth__lead { text-align: center; }
.auth__foot { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 1.25rem; }

/* --------------------------------------------------------- superadmin --- */
/* Deliberately a different colour from the restaurant panel, so nobody is
   ever confused about which product they are looking at. */

.is-superadmin {
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --brand-soft: #eef2ff;
}

/* ============================================================ public ====
   The customer's view of a restaurant.

   This is what a diner actually sees, usually on a phone, often from a QR
   code on a table or a link in a message. It has to feel like the
   restaurant's own product rather than somebody's admin panel, so the
   restaurant's colour and photography carry the page and Bookrodera stays
   out of the way.
   ====================================================================== */

.pub { background: var(--bg); min-height: 100vh; }

/* -------------------------------------------------------------- hero -- */

.pub-hero { position: relative; background: var(--surface); }

.pub-hero__cover {
  height: 200px;
  background-color: var(--brand);
  position: relative;
  overflow: hidden;
}
.pub-hero__cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}

/* A photograph has to darken towards the bottom or white text on it becomes
   unreadable in daylight - which is exactly when somebody is standing
   outside the restaurant looking at their phone. */
.pub-hero__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.45) 100%);
}

.pub-hero__body {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1rem 1.25rem;
  position: relative;
}

.pub-hero__logo {
  width: 88px; height: 88px;
  border-radius: 20px;
  object-fit: cover;
  background: var(--surface);
  border: 4px solid var(--surface);
  box-shadow: 0 6px 20px rgba(16,24,40,.16);
  margin-top: -44px;
  position: relative;
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: var(--brand);
}

.pub-hero h1 { font-size: 1.75rem; letter-spacing: -.02em; margin: .75rem 0 .25rem; }
.pub-hero__cuisine { color: var(--muted); font-size: .95rem; margin: 0 0 .75rem; }

/* Status and facts: the row a hungry person actually reads. */
.pub-facts {
  display: flex; flex-wrap: wrap; gap: .4rem .85rem; align-items: center;
  font-size: .88rem; color: var(--text-soft); margin-bottom: 1rem;
}
.pub-facts__item { display: inline-flex; align-items: center; gap: .3rem; }

.pub-status {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .85rem;
  padding: .25rem .7rem; border-radius: 999px;
}
.pub-status--open   { background: var(--green-bg); color: var(--green); }
.pub-status--closed { background: var(--grey-bg);  color: var(--grey); }
.pub-status__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ----------------------------------------------------------- actions -- */

.pub-actions { display: grid; gap: .6rem; }
@media (min-width: 560px) { .pub-actions { grid-template-columns: 1fr 1fr; } }

.pub-action {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 58px;
  border-radius: 14px;
  font-size: 1.05rem; font-weight: 650;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .08s ease, filter .12s ease;
}
.pub-action:active { transform: scale(.985); }
.pub-action--primary { background: var(--brand); color: #fff; }
.pub-action--primary:hover { color: #fff; filter: brightness(1.06); }
.pub-action--secondary { background: var(--surface); color: var(--text); border-color: var(--border-dark); }
.pub-action--secondary:hover { background: var(--surface-2); color: var(--text); }
.pub-action--off { background: var(--grey-bg); color: var(--muted); border-color: var(--border); }

/* ------------------------------------------------------------- cards -- */

.pub-wrap { max-width: 820px; margin: 0 auto; padding: 1rem 1rem 4rem; }

/* For pages that manage their own bars and full-bleed rails, the outer
   padding gets in the way. Flashes still need a gutter, so they keep one. */
.pub-wrap--flush { max-width: none; padding: 0; }
.pub-wrap--flush > .alert { margin: 1rem 1rem 0; }

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}
.pub-card__head { padding: 1rem 1.15rem .5rem; font-size: 1.05rem; font-weight: 700; }
.pub-card__body { padding: 0 1.15rem 1.15rem; }

/* ------------------------------------------------------------- hours -- */

.hours-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.hours-table td { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table tr.is-today td { font-weight: 700; color: var(--text); }
.hours-table tr:not(.is-today) td { color: var(--text-soft); }
/* The launch trial in plain words (includes/views/trial_summary.php). */
.trial-summary__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.trial-summary__all { margin: 0 0 .35rem; font-weight: 600; }
.trial-summary__after { margin: 0 0 .75rem; }
.trial-summary__label { margin: 0 0 .25rem; font-size: .88rem; font-weight: 650; color: var(--text-soft); }
.trial-summary__list { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--text-soft); font-size: .92rem; line-height: 1.55; }
.trial-summary__list li + li { margin-top: .2rem; }

/* Closed and special days of the next month, under the weekly hours. */
.hours-coming { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.hours-coming__head { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .4rem; }
.hours-coming__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .94rem; }
.hours-coming__list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .75rem; }
.hours-coming__date { font-weight: 650; color: var(--text); }
.hours-coming__hours { font-variant-numeric: tabular-nums; color: var(--text-soft); }
.hours-coming__note { flex-basis: 100%; color: var(--muted); font-size: .86rem; }

/* -------------------------------------------------------------- menu -- */

/* The name bar and the category rail stick as one block, so the rail never
   needs to know how tall the bar happens to be. */
.menu-head {
  position: sticky; top: 0; z-index: 30;
  margin: -1rem -1rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.menu-bar { background: var(--surface); }
.menu-bar__inner {
  max-width: 820px; margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.menu-bar__title {
  font-weight: 700; font-size: 1rem; flex: 1; min-width: 0; margin: 0;   /* the page's h1 on the menu */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* On a narrow phone the name and the Collection/Delivery switch cannot share
   a line without the name being cut to "The Turkis...". The switch drops to
   its own full-width row instead, which also makes it a far bigger target. */
@media (max-width: 480px) {
  .menu-bar__inner { flex-wrap: wrap; row-gap: .55rem; padding-bottom: .6rem; }
  .menu-bar__inner form { flex-basis: 100%; order: 3; }
  .menu-bar__inner .segmented { display: flex; width: 100%; }
  .menu-bar__inner .segmented button { flex: 1; }
}

/* Collection or delivery, as one segmented control rather than two radio
   buttons - it is the first choice a diner makes and it should read as a
   single switch. */
.segmented { display: inline-flex; padding: 3px; gap: 3px; background: var(--grey-bg); border-radius: 999px; }
.segmented button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 650; color: var(--text-soft);
  padding: .4rem .9rem; border-radius: 999px; white-space: nowrap;
}
.segmented .is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* The category rail: horizontal scroll on a phone, never wrapping.
   The mask fades the last chip out at the right edge, which is the only
   honest way to say "there is more this way" without a scrollbar. */
.menu-nav {
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.menu-nav::-webkit-scrollbar { display: none; }
/* Once the rail is scrolled to the end there is nothing more to hint at, so
   the fade would just dim a real chip. */
.menu-nav[data-at-end="1"] { -webkit-mask-image: none; mask-image: none; }
.menu-nav__inner {
  max-width: 820px; margin: 0 auto; display: flex; gap: .4rem;
  padding: .6rem 1rem; width: max-content; min-width: 100%;
}
.menu-nav a {
  white-space: nowrap; padding: .4rem .85rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  color: var(--text-soft); text-decoration: none; background: var(--grey-bg);
}
.menu-nav a:hover { background: var(--border); color: var(--text); }

/* Measured by the page script; the fallback is a deliberate over-estimate so
   a tapped category never lands underneath the header. */
.menu-section { scroll-margin-top: calc(var(--menu-head-h, 132px) + 8px); }
.menu-section__head { padding: 1.25rem 0 .5rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.menu-section__note { color: var(--muted); font-size: .9rem; margin: -.25rem 0 .5rem; }

/* A dish. Name, description and price on the left where the eye scans; a
   photograph on the right when there is one; nothing at all - not a grey
   box, not a broken-image icon - when there is not.

   The whole card is one big button (.dish__open, stretched over the card)
   that opens the dish's sheet. The + sits above it, so the two never fight:
   tapping the card looks, tapping + adds. */
.menu-wrap { padding-top: .25rem; }
.menu-facts { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: .9rem 0 .25rem; }
.menu-facts .icon { color: var(--brand); }

.menu-section__list { display: grid; gap: .6rem; }
@media (min-width: 900px) { .menu-section__list { grid-template-columns: 1fr 1fr; } }

.dish {
  position: relative;
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .9rem 1rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dish:hover { border-color: var(--border-dark); box-shadow: 0 2px 10px rgba(16,24,40,.05); }
.dish--off { opacity: .6; }

.dish__open {
  position: absolute; inset: 0; z-index: 1;
  border: 0; padding: 0; margin: 0; background: transparent;
  border-radius: inherit; cursor: pointer;
}
.dish__open:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.dish__open[aria-busy="true"], .dish__add[aria-busy="true"] { cursor: progress; }

/* A long menu (more than MENU_SHEETS_INLINE_UP_TO dishes): a dish far off
   screen is not laid out until it scrolls near. Its containment would clip
   a focus ring drawn outside the card, so the ring sits just inside. */
.menu-wrap--long .dish { content-visibility: auto; contain-intrinsic-size: auto 120px; }
.menu-wrap--long .dish__open:focus-visible { outline-offset: -3px; }

.dish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish__name {
  font-size: 1rem; font-weight: 650; line-height: 1.3; margin: 0 0 .15rem;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dish__desc {
  color: var(--muted); font-size: .88rem; line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dish__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.dish__foot { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; min-height: 40px; }
.dish__price { font-weight: 700; white-space: nowrap; }
.dish__soldout { margin-left: auto; }
.dish__allergens { font-size: .78rem; color: var(--muted); margin: .3rem 0 0; }

/* The +: above the card's own button, and a proper 40px target. */
.dish__addform { margin: 0 0 0 auto; position: relative; z-index: 2; }
.dish__add {
  position: relative; z-index: 2; margin-left: auto;
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--brand);
  border: 1.5px solid var(--brand);
  transition: background .12s ease, color .12s ease, transform .08s ease;
}
.dish__addform .dish__add { margin-left: 0; }
.dish__add .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.dish__add:hover { background: var(--brand); color: #fff; }
.dish__add:active { transform: scale(.94); }
.dish__add:disabled { opacity: .5; }

.dish__media { flex: none; position: relative; z-index: 0; }
.dish__img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; display: block; background: var(--grey-bg); }
@media (min-width: 380px) { .dish__img { width: 104px; height: 104px; } }
@media (min-width: 768px) { .dish__img { width: 120px; height: 120px; } }
/* No photo, on a menu that has photos: a quiet tile of the same size. */
.dish__img--none { display: grid; place-items: center; background: var(--surface-2, #f6f7f9); border: 1px dashed var(--border); color: var(--muted); }
.dish__img--none .icon { width: 26px; height: 26px; opacity: .45; }

/* ------------------------------------------------------ sticky basket -- */

.basket-bar {
  position: sticky; bottom: 0; z-index: 40;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(255,255,255,0));
}
.basket-bar__inner { max-width: 820px; margin: 0 auto; }
.basket-bar a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--brand); color: #fff;
  border-radius: 14px; padding: .95rem 1.15rem;
  font-weight: 650; text-decoration: none;
}
.basket-bar a:hover { color: #fff; filter: brightness(1.06); }
.basket-bar__count { background: rgba(255,255,255,.22); border-radius: 999px; padding: .1rem .55rem; font-size: .85rem; }

/* ------------------------------------------------------------ dialog -- */

/* The sheet is a column with three parts: a picture that does not move, the
   options that scroll, and the Add button that is always reachable.

   It used to cap the picture, the body and the sheet independently - 180px
   plus 55vh plus a footer, inside 92vh - and on a short phone, or once the
   browser's own toolbars were counted, the arithmetic ran past the bottom of
   the screen and took the Add button with it. Now only the body flexes, so
   whatever is left after the picture and the button is what scrolls, and the
   button cannot be pushed off. */
dialog.sheet {
  border: 0; padding: 0; border-radius: 18px;
  max-width: 460px; width: 94%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  max-height: 90vh;
  max-height: 90dvh;   /* dvh follows the phone's shrinking toolbars */
  overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(16,24,40,.5); }
/* display:flex above would otherwise override the browser's own rule that a
   closed dialog is not shown, leaving every dish sheet visible on the page. */
dialog.sheet:not([open]) { display: none; }

/* On a phone a dialog reads better as a sheet rising from the bottom. */
@media (max-width: 560px) {
  dialog.sheet {
    width: 100%; max-width: none; margin: auto auto 0;
    border-radius: 18px 18px 0 0;
  }
}

/* The options and the Add button live inside a <form>, so the form has to be
   part of the column too. A plain block here was quietly undoing all of it:
   the body's flex rules were being read against the form, which had no height
   of its own to give, so nothing shrank and the button fell off the bottom. */
dialog.sheet > form {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
}

.sheet__img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  flex: none;
}
/* Short screens give the photograph less room rather than eating the list. */
@media (max-height: 640px) {
  .sheet__img { height: 120px; }
}

.sheet__body {
  padding: 1.15rem;
  flex: 1 1 auto; min-height: 0;     /* min-height:0 is what lets it shrink */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;      /* scrolling the list must not scroll the menu behind it */
}
.sheet__foot {
  flex: none;
  padding: 1rem 1.15rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--surface);
}

.option-group { margin-bottom: 1.15rem; }
.option-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.option-group__name { font-weight: 650; }
.option-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.option-row:last-child { border-bottom: 0; }
.option-row input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
/* A tick box or radio alone in a table cell (allergen grid, import rows) has
   no label to widen it: 24px, the smallest comfortable target (WCAG 2.5.8). */
td > input[type=checkbox], td > input[type=radio], td > label > input[type=checkbox], td > label > input[type=radio] {
  width: 24px; height: 24px; accent-color: var(--brand); margin: 0;
}
.option-row__name { flex: 1; }
.option-row__price { color: var(--muted); font-size: .9rem; }

/* Every control a thumb lands on repeatedly. touch-action: manipulation tells
   the browser there is no double-tap gesture here, which stops a quick second
   tap - two dishes in a row, + pressed twice - being read as "zoom in" and
   leaving the diner on a magnified page they then have to pinch back out. */
.dish, .dish__add, .segmented button, .menu-nav a, .stepper button,
.bk-party a, .bk-day, .bk-time, .basket-bar a, .option-row {
  touch-action: manipulation;
}

/* A stepper, not a number field - far easier with a thumb. */
.stepper { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--border-dark); border-radius: 999px; padding: 2px; }
.stepper button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.2rem; line-height: 1; color: var(--text);
}
.stepper button:hover { background: var(--grey-bg); }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; }

/* --------------------------------------------------------------- icons -- */
/* Inline SVG line icons (includes/icons.php). They take the text colour, so
   they follow whatever they sit in - muted in a summary, brand on a button. */
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.bk-summary__row .icon { width: 18px; height: 18px; color: var(--muted); }
.bk-done__tick .icon  { width: 34px; height: 34px; stroke-width: 2.4; }
.bk-empty__icon .icon { width: 36px; height: 36px; color: var(--muted); }

/* ------------------------------------------------- service-desk pieces -- */
/* The walk-in strip and the booking drawer, both used standing up, mid
   service, on whatever device is behind the till. */

/* A button that reads as a link, for opening a drawer from inside a sentence. */
.linkish {
  border: 0; background: none; padding: 0; font: inherit; color: var(--text);
  cursor: pointer; text-align: left;
}
.linkish:hover { color: var(--brand); }

.walkin__row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.walkin__label { display: flex; flex-direction: column; min-width: 8rem; }
.walkin__name   { flex: 1; min-width: 10rem; }
.walkin__guests { width: 5rem; }
.walkin input {
  padding: .55rem .7rem; border: 1px solid var(--border-dark);
  border-radius: 10px; font: inherit; background: var(--surface); color: var(--text);
}

/* The drawer. On a phone it comes up from the bottom, because that is where
   the thumb is; on a desktop it sits in the middle like an ordinary dialog. */
dialog.drawer {
  border: 0; padding: 0; width: min(30rem, 100%);
  border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
dialog.drawer::backdrop { background: rgba(0, 0, 0, .45); }

@media (max-width: 560px) {
  dialog.drawer {
    margin: auto auto 0; width: 100%; max-width: none;
    border-radius: 18px 18px 0 0;
  }
}

.drawer__head {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--border);
}
.drawer__head > div:first-child { flex: 1; min-width: 0; }
.drawer__close {
  border: 0; background: transparent; cursor: pointer; font-size: 1.5rem;
  line-height: 1; color: var(--muted); width: 32px; height: 32px; flex: none;
  border-radius: 50%;
}
.drawer__close:hover { background: var(--grey-bg); color: var(--text); }

.drawer__body { padding: 1rem 1.15rem; }

.drawer__facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; margin: 0; }
.drawer__facts dt { color: var(--muted); font-size: .85rem; }
.drawer__facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.grid-2 > * { min-width: 0; }

.drawer__foot {
  display: flex; gap: .5rem; flex-wrap: wrap;
  padding: .85rem 1.15rem calc(.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--grey-bg);
}

/* ----------------------------------------------------------- booking -- */
/* The table-booking flow. Same design language as ordering - chips, cards,
   large targets, one decision per screen - but its own shapes, because
   choosing a time is not choosing a dish. */

.bk-bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.bk-bar__inner {
  max-width: 560px; margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.bk-bar__title { font-weight: 700; font-size: 1rem; line-height: inherit; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-back {
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.15rem; line-height: 1; color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; text-decoration: none;
}
.bk-back:hover { background: var(--grey-bg); color: var(--text); }

/* Four dots, not a percentage. A customer wants to know how much is left,
   not a number. */
.bk-steps { display: flex; gap: 4px; }
.bk-steps span { width: 22px; height: 4px; border-radius: 2px; background: var(--border); }
.bk-steps span.is-done { background: var(--brand); }

.bk-wrap { max-width: 560px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }

.bk-h {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em;
  margin: 0 0 .25rem;
}
.bk-sub { color: var(--muted); margin: 0 0 1.25rem; }

/* Party size: a grid of taps, not a dropdown. */
.bk-party {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem;
}
@media (min-width: 420px) { .bk-party { grid-template-columns: repeat(5, 1fr); } }

.bk-party a, .bk-party button {
  display: grid; place-items: center;
  aspect-ratio: 1; min-height: 62px;
  border: 1.5px solid var(--border-dark); border-radius: 14px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 1.25rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: transform .08s ease, border-color .12s ease;
}
.bk-party a:hover, .bk-party button:hover { border-color: var(--brand); color: var(--text); }
.bk-party a:active { transform: scale(.96); }
.bk-party .is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Dates: a rail of cards, weekday over number. */
.bk-days {
  display: flex; gap: .5rem; overflow-x: auto;
  padding-bottom: .5rem; margin: 0 -1rem; padding-inline: 1rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.bk-days::-webkit-scrollbar { display: none; }

.bk-day {
  flex: none; width: 74px;
  border: 1.5px solid var(--border-dark); border-radius: 14px;
  background: var(--surface); color: var(--text);
  padding: .6rem .3rem; text-align: center; text-decoration: none;
  transition: border-color .12s ease;
}
.bk-day:hover { border-color: var(--brand); color: var(--text); }
.bk-day__wd { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bk-day__n  { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.bk-day__mo { font-size: .72rem; color: var(--muted); }
.bk-day.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-day.is-on .bk-day__wd, .bk-day.is-on .bk-day__mo { color: rgba(255,255,255,.85); }
.bk-day.is-off {
  opacity: .45; pointer-events: none;
  background: var(--grey-bg); border-style: dashed;
}

/* Times: a grid, with the full ones shown but unusable so the customer can
   see the restaurant is busy rather than that the time never existed. */
.bk-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
@media (min-width: 420px) { .bk-times { grid-template-columns: repeat(4, 1fr); } }

.bk-time {
  display: grid; place-items: center; min-height: 48px;
  border: 1.5px solid var(--border-dark); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-weight: 650; text-decoration: none;
  transition: transform .08s ease, border-color .12s ease;
}
.bk-time:hover { border-color: var(--brand); color: var(--text); }
.bk-time:active { transform: scale(.96); }
.bk-time.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-time.is-off {
  color: var(--muted); background: var(--grey-bg);
  border-color: var(--border); border-style: dashed;
  pointer-events: none; text-decoration: line-through;
}
/* A late-night time on the next calendar day ("12:30 AM Sat"). */
.bk-time__day { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

.bk-period { font-weight: 700; margin: 1.25rem 0 .5rem; color: var(--text-soft); }
.bk-period:first-child { margin-top: 0; }

/* The running summary, so the customer always knows what they are booking. */
.bk-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1rem 1.15rem; margin-bottom: 1.25rem;
}
.bk-summary__name { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; }
.bk-summary__row { display: flex; gap: .5rem; align-items: center; color: var(--text-soft); font-size: .95rem; }
.bk-summary__row + .bk-summary__row { margin-top: .2rem; }
.bk-summary__edit { margin-left: auto; font-size: .85rem; }

/* Sticky action at the bottom of a step. */
.bk-action {
  position: sticky; bottom: 0;
  margin: 1.5rem -1rem 0;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(255,255,255,0));
}
.bk-action__inner { max-width: 560px; margin: 0 auto; }

/* Confirmation */
.bk-done { text-align: center; padding: .5rem 0 1rem; }
.bk-done__tick {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-bg); color: var(--green);
  display: grid; place-items: center; margin: 0 auto 1rem;
  font-size: 2rem;
}
.bk-ref {
  display: inline-block;
  font-size: 1.5rem; font-weight: 800; letter-spacing: .04em;
  background: var(--grey-bg); border-radius: 12px;
  padding: .5rem 1.1rem; margin: .35rem 0;
}

/* Empty and closed states get the same care as the happy path - they are
   where a customer decides whether to telephone or give up. */
.bk-empty {
  text-align: center; padding: 2rem 1rem;
  background: var(--surface); border: 1px dashed var(--border-dark); border-radius: 16px;
}
.bk-empty__icon { font-size: 2rem; opacity: .6; }

/* ------------------------------------------------ ordering, part two -- */

.menu-nav a.is-on { background: var(--brand); color: #fff; }

/* The basket bar: hidden when empty, a small bump when something is added. */
.basket-bar[hidden] { display: none; }
.basket-bar a { gap: .75rem; }
.basket-bar__left { display: inline-flex; align-items: center; gap: .45rem; }
.basket-bar.is-bumped a { animation: basket-bump .35s ease; }
@keyframes basket-bump { 40% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .basket-bar.is-bumped a { animation: none; } }

/* A toast: what just happened, above the basket bar, gone in three seconds. */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(5.4rem + env(safe-area-inset-bottom)); z-index: 60;
  max-width: min(92vw, 420px);
  background: #1d2433; color: #fff; border-radius: 12px;
  padding: .7rem 1rem; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast--error { background: #9b1c1c; }
.toast[hidden] { display: none; }

/* The sheet, finished. */
.sheet__close {
  position: absolute; top: .6rem; right: .6rem; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--text); box-shadow: var(--shadow);
}
.sheet__close .icon { width: 20px; height: 20px; }
dialog.sheet > form { position: relative; }
.sheet__title { font-size: 1.25rem; line-height: 1.25; margin: 0 2.6rem .35rem 0; overflow-wrap: anywhere; }
.sheet__img + .sheet__body .sheet__title { margin-right: 0; }
.sheet__desc { color: var(--text-soft); margin: 0 0 .5rem; line-height: 1.5; }
.sheet__price { font-weight: 700; font-size: 1.05rem; margin: 0 0 .75rem; }
.sheet__meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: 1rem; }
.sheet__allergens { flex-basis: 100%; margin: .15rem 0 0; font-size: .85rem; color: var(--text-soft); }
.sheet__note textarea { font-size: 16px; }   /* 16px: iOS zooms into anything smaller */
.sheet__error { color: #b42318; background: #fef3f2; border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0 0; font-weight: 600; }
.sheet__error[hidden] { display: none; }
.sheet__closed { margin: 0; color: var(--muted); text-align: center; width: 100%; }
.sheet__foot { display: flex; align-items: center; gap: .75rem; }
.sheet__add { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 50px; }
.sheet__add.is-incomplete { opacity: .6; }
.sheet__add-total { font-variant-numeric: tabular-nums; }
.sheet__add > span { white-space: nowrap; }
@media (max-width: 359px) { .sheet__add-long { display: none; } }

fieldset.option-group { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.option-group__head { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: .5rem; padding: 0; margin-bottom: .35rem; }
.option-group__rule { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--grey-bg); border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; }
.option-group__rule.is-required { color: #92400e; background: #fef3c7; }
.option-group.is-invalid .option-group__rule { color: #fff; background: #d92d20; }
.option-group.is-invalid { box-shadow: inset 3px 0 0 #d92d20; padding-left: .6rem; }
.option-row { min-height: 48px; }
.option-row.is-disabled { opacity: .45; cursor: not-allowed; }

.stepper .icon { width: 18px; height: 18px; }
.stepper button { display: grid; place-items: center; }
.stepper--sm { padding: 1px; }
.stepper--sm button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--text); }
.stepper--sm output { min-width: 2ch; text-align: center; font-weight: 700; }

/* Small helpers used by the basket and checkout. */
.inline-form { display: inline; margin: 0; }
.linkbtn {
  border: 0; background: none; padding: .35rem .2rem; font: inherit; font-size: .88rem;
  color: var(--text-soft); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
}
.linkbtn:hover { color: var(--brand); }
.linkbtn--danger:hover { color: #b42318; }
.linkbtn .icon { width: 16px; height: 16px; }
.segmented--wide { display: flex; width: 100%; }
.segmented--wide button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.segmented button .icon { width: 16px; height: 16px; }
.bk-bar__sub { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-back .icon { width: 22px; height: 22px; }

/* The basket. */
.basket__switch { margin-bottom: 1rem; }
.basket__lines { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.basket-line { display: flex; gap: .8rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.basket-line:last-child { border-bottom: 0; }
.basket-line--off { background: #fffbfa; }
.basket-line__img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.basket-line__main { flex: 1; min-width: 0; }
.basket-line__top { display: flex; gap: .75rem; justify-content: space-between; align-items: baseline; }
.basket-line__name { font-weight: 650; overflow-wrap: anywhere; }
.basket-line--off .basket-line__name { text-decoration: line-through; color: var(--muted); }
.basket-line__price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.basket-line__options { list-style: none; margin: .2rem 0 0; padding: 0; font-size: .86rem; color: var(--text-soft); }
.basket-line__note { font-size: .86rem; color: var(--text-soft); margin: .25rem 0 0; display: flex; gap: .3rem; align-items: flex-start; }
.basket-line__note .icon, .basket-line__problem .icon { width: 16px; height: 16px; margin-top: .1rem; }
.basket-line__problem { color: #b42318; font-size: .88rem; font-weight: 600; margin: .35rem 0 0; display: flex; gap: .3rem; }
.basket-line__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin-top: .55rem; }
.basket__more { display: inline-flex; align-items: center; gap: .35rem; margin: .9rem 0; font-weight: 600; }
.basket__more .icon { width: 18px; height: 18px; }
.basket__clear { text-align: center; margin-top: .5rem; }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 1.1rem; margin: .5rem 0 1rem; }
.summary--flat { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: .75rem -1.15rem -1rem; padding: .9rem 1.15rem; background: var(--grey-bg); }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; font-variant-numeric: tabular-nums; }
.summary__row--total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .55rem; }
.summary__hint { color: var(--muted); font-size: .85rem; margin: .3rem 0 0; display: flex; gap: .35rem; align-items: center; }
.summary__hint .icon { width: 16px; height: 16px; }

/* Checkout: four short sections, not one long form. */
.co-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.co-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.co-section__head h2 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: .55rem; }
.co-step { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; display: grid; place-items: center; flex: none; }
.co-items summary { cursor: pointer; color: var(--text-soft); }
.co-items ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.co-items li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-top: 1px dashed var(--border); font-size: .92rem; }
.co-switch { margin: 0 0 1rem; }
.co-note { color: var(--text-soft); font-size: .9rem; display: flex; gap: .35rem; align-items: flex-start; margin: 0 0 .75rem; }
.co-note .icon { width: 18px; height: 18px; color: var(--brand); margin-top: .1rem; }
.co-fields { margin-top: .75rem; }
.co-fields input, .co-fields textarea, .choice__select { font-size: 16px; }
.is-typing .co-form .bk-action { position: static; background: none; }
.co-legal { text-align: center; font-size: .78rem; color: var(--muted); margin: .5rem 0 0; }
.field__error { color: #b42318; font-size: .85rem; font-weight: 600; margin: .3rem 0 0; }
[aria-invalid="true"] { border-color: #d92d20 !important; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }

fieldset.choice-list { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; min-width: 0; }
.choice {
  display: flex; gap: .7rem; align-items: flex-start;
  border: 1.5px solid var(--border-dark); border-radius: 12px; padding: .75rem .85rem; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.choice.is-disabled { opacity: .55; cursor: not-allowed; }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin-top: .1rem; }
.choice__icon .icon { width: 22px; height: 22px; color: var(--text-soft); }
.choice__body { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.choice__title { font-weight: 650; }
.choice__hint { font-size: .85rem; color: var(--muted); }
.choice__select { margin-top: .35rem; width: 100%; }

/* Tracking. */
.track-hero { text-align: center; padding: 1.25rem 0 1rem; }
.track-hero__icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto .75rem; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.track-hero__icon .icon { width: 34px; height: 34px; stroke-width: 2; }
.track-hero--completed .track-hero__icon { background: var(--green-bg); color: var(--green); }
.track-hero--cancelled .track-hero__icon, .track-hero--rejected .track-hero__icon { background: #fef3f2; color: #b42318; }
.track-hero__kicker { color: var(--muted); margin: 0 0 .15rem; }
.track-hero__ref { color: var(--text-soft); margin: .25rem 0 0; overflow-wrap: anywhere; }
.track-hero__eta { display: inline-flex; gap: .35rem; align-items: center; margin: .6rem 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem; }
.track-hero__eta .icon { width: 18px; height: 18px; color: var(--brand); }
.track-hero__reason { color: #b42318; margin: .5rem 0 0; }
.track-steps { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .1rem; }
.track-steps li { display: flex; align-items: center; gap: .6rem; color: var(--muted); padding: .35rem 0; }
.track-steps__dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-dark); display: grid; place-items: center; flex: none; background: var(--surface); }
.track-steps__dot .icon { width: 13px; height: 13px; stroke-width: 3; }
.track-steps li.is-done { color: var(--text-soft); }
.track-steps li.is-done .track-steps__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.track-steps li.is-now { color: var(--text); font-weight: 700; }
.track-steps li.is-now .track-steps__dot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.track-card { padding: 1rem 1.15rem; margin-bottom: 1rem; }
.track-card__head { display: flex; justify-content: space-between; align-items: center; font-weight: 650; margin-bottom: .5rem; }
.track-card__head .icon { width: 18px; height: 18px; color: var(--brand); }
.track-items { list-style: none; margin: 0; padding: 0; }
.track-items li { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.track-items li:first-child { border-top: 0; }
.track-card a .icon, .track-card .muted .icon { width: 16px; height: 16px; vertical-align: -.2em; }

/* ------------------------------------------------------ kitchen orders -- */
/* The screen open all evening on a tablet by the pass. Big type, big
   buttons, and a NEW order that cannot be missed. */

.chip__count { display: inline-block; min-width: 1.4em; text-align: center; margin-left: .25rem; padding: 0 .35rem; border-radius: 999px; background: rgba(0,0,0,.08); font-size: .8rem; }
.chip.is-active .chip__count { background: rgba(255,255,255,.25); }
.chip--alert:not(.is-active) { border-color: #f59e0b; background: #fffbeb; color: #92400e; font-weight: 700; }

.ocards { display: grid; gap: .8rem; }
@media (min-width: 1100px) { .ocards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ocard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.ocard--new { border: 2px solid #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.ocard.is-arriving { animation: ocard-in .6s ease; }
@keyframes ocard-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ocard.is-arriving { animation: none; } }

.ocard__head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.ocard__flag { background: #d97706; color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: .2rem .5rem; }
.ocard__num { font-size: 1.35rem; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.ocard__time { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-type { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: .2rem .45rem; background: var(--grey-bg); }
.chip-type .icon { width: 15px; height: 15px; }
.chip-type--delivery { background: #eef4ff; color: #1d4ed8; }
.ocard__when { font-size: .85rem; font-weight: 600; color: var(--text-soft); }
.ocard__when.is-scheduled { color: #7c3aed; }

.ocard__customer { font-size: .95rem; }
.ocard__items { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ocard__items li { display: flex; gap: .5rem; font-size: 1rem; }
.ocard__qty { font-weight: 800; min-width: 2.2em; }
.ocard__opts { display: block; color: var(--text-soft); font-size: .88rem; }
.ocard__itemnote { display: flex; gap: .25rem; align-items: center; color: #b45309; font-size: .88rem; font-weight: 600; }
.ocard__itemnote .icon { width: 15px; height: 15px; }
.ocard__note { margin: 0; background: #fffbeb; border-radius: 10px; padding: .5rem .7rem; font-size: .92rem; }
.ocard__note strong { text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; margin-right: .35rem; color: #92400e; }
.ocard__money { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; border-top: 1px solid var(--border); padding-top: .55rem; }
.ocard__money strong { font-size: 1.15rem; }

.ocard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ocard__accept { flex-basis: 100%; display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.ocard__label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prep-choices { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.prep-choices .btn { min-width: 4.5rem; min-height: 44px; font-weight: 700; }
.prep-custom input { width: 5.5rem; min-height: 44px; padding: .4rem .5rem; border: 1px solid var(--border-dark); border-radius: 8px; font: inherit; }
.ocard__danger { color: #b42318; }
.ocard__actions > .inline-form .btn, .ocard__actions > .btn { min-height: 44px; }

.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.summary--plain { border: 0; padding: 0; margin: 0 0 .75rem; background: none; }
.summary--platform { border-top: 1px dashed var(--border-dark); padding-top: .6rem; }

.settings-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.4rem 0 .5rem; }
.settings-sub:first-child { margin-top: 0; }

.commission-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; }
.commission-row input, .commission-row select { width: auto; min-height: 38px; padding: .3rem .5rem; }

.menu-item { flex-wrap: wrap; }
/* The dish's name and description keep a readable width: on a phone the
   switch and buttons move to the next line instead of squeezing the text
   into one word per line. On a wide screen everything still fits on one. */
.menu-item > .list__main { flex: 1 1 14rem; }
.menu-item--off { background: var(--surface-2); }
.menu-item__img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; }
.menu-item__img--none { display: grid; place-items: center; background: var(--grey-bg); color: var(--muted); }
.menu-item__img--none .icon { width: 22px; height: 22px; }
.quick-edit { flex-basis: 100%; }
.quick-edit > summary { list-style: none; display: inline-flex; }
.quick-edit > summary::-webkit-details-marker { display: none; }
.quick-edit[open] > summary { margin-bottom: .5rem; }
.quick-edit__form { background: var(--grey-bg); border-radius: 12px; padding: .75rem; }
/* A long menu list (admin/menu, MENU_QUICK_EDIT_INLINE_UP_TO): rows far off
   screen are not laid out until they scroll near. */
.list--long > .menu-item { content-visibility: auto; contain-intrinsic-size: auto 76px; }

/* The hidden attribute always wins. Several components set display: flex or
   grid, which would otherwise quietly override it and show an empty box. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------ footer -- */

.pub-footer { text-align: center; padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: .85rem; }
.pub-footer a { color: var(--muted); }

/* ------------------------------------------------------- larger screens -- */

@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app__main { padding: 1.5rem; }
  h1 { font-size: 1.75rem; }
}

@media (min-width: 992px) {
  .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "sidebar topbar"
      "sidebar main";
  }
  .topbar  { grid-area: topbar; }
  .sidebar {
    grid-area: sidebar;
    display: block;
    position: sticky; top: 0; align-self: start;
    height: 100vh; overflow-y: auto;
    padding: 1rem .6rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
  }
  .app__main {
    grid-area: main;
    padding: 1.5rem 2rem 3rem;
    max-width: none;
    /* Fill the grid column. The phone rule's auto side margins would make
       the column shrink-wrap its content - narrow pages sat off-centre and a
       wide one (bookings, the import review) pushed past the screen edge. */
    margin: 0;
    min-width: 0;
  }
  .bottomnav { display: none; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .topbar__brand { display: none; }
}

@media (min-width: 1200px) {
  .app__main > * { max-width: 1180px; }
}

/* --------------------------------------------------------------- print -- */

@media print {
  .topbar, .sidebar, .bottomnav, .btn, .alert__close { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #999; }
}

/* ====================================================== onboarding wizard ===
   Onboarding wizard: admin/onboarding/*.php in layouts/onboarding_header.php.

   A new owner setting up on a phone, often between services. One calm
   column (560px at most), one job per screen, and the next step always under
   the thumb in a sticky bar that gets out of the way while they type. Tokens
   only; the classes are the contract the wizard pages share.
   ====================================================================== */

body.ob { background: var(--bg); min-height: 100vh; }

.ob-skiplink {
  position: absolute; left: .75rem; top: -4rem; z-index: 60;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
  font-weight: 700; text-decoration: none;
}
.ob-skiplink:focus { top: .75rem; }
.app__main:focus, .pub-wrap:focus { outline: none; }   /* the skip link's target, focused from script only */

/* --- the top bar: mark, save and exit, back, step N of M, progress ------ */

.ob-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.ob-bar__inner { max-width: 560px; margin: 0 auto; padding: .35rem 1rem .8rem; }
.ob-bar__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 46px; }
.ob-bar__brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.ob-bar__exit {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 .15rem;
  color: var(--text-soft); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ob-bar__exit:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.ob-bar__meta { display: flex; align-items: center; gap: .5rem; min-height: 40px; }
.ob-bar__back {
  display: inline-flex; align-items: center; gap: .15rem;
  min-height: 46px; min-width: 46px; margin-left: -.35rem; padding: 0 .5rem 0 .1rem;
  color: var(--text); font-weight: 600; text-decoration: none; border-radius: var(--radius-sm);
}
.ob-bar__back:hover { color: var(--brand-dark); background: var(--surface-2); }
.ob-bar__back .icon { width: 22px; height: 22px; }
.ob-bar__step { color: var(--muted); font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ob-bar__back + .ob-bar__step { margin-left: auto; }

.ob-progress {
  display: block; width: 100%; height: 6px; margin: .15rem 0 0;
  -webkit-appearance: none; appearance: none;
  border: 0; border-radius: 999px; overflow: hidden;
  background: var(--grey-bg); color: var(--brand);
}
.ob-progress::-webkit-progress-bar { background: var(--grey-bg); border-radius: 999px; }
.ob-progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.ob-progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .ob-progress::-webkit-progress-value { transition: none; } }

/* --- the page ------------------------------------------------------------ */

.ob-main {
  max-width: 560px; margin: 0 auto;
  padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
}
.ob-main:focus { outline: none; }
.ob-main input, .ob-main select, .ob-main textarea { font-size: 16px; }   /* 16px: iOS zooms into anything smaller */
.ob-main img, .ob-main iframe, .ob-main video { max-width: 100%; }
/* The sticky .ob-actions measures against .ob-main, not a form that only wraps the bar (launch, payments). */
.ob-main > form { display: contents; }

.ob-head { margin: .25rem 0 1.25rem; }
.ob-title { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .45rem; overflow-wrap: anywhere; }
.ob-lead { color: var(--text-soft); font-size: 1.02rem; margin: 0; }

.ob-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}
@media (min-width: 480px) { .ob-card { padding: 1.35rem 1.5rem; } }
.ob-card__title { font-size: 1.08rem; margin: 0 0 .8rem; }
.ob-card__text { color: var(--text-soft); font-size: .95rem; margin: -.4rem 0 .9rem; }
.ob-card > .field:last-child, .ob-card > .field-row:last-child > .field { margin-bottom: 0; }
.ob-optional { margin-left: .25rem; color: var(--muted); font-size: .82rem; font-weight: 500; }

.ob-note { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.ob-note .icon { width: 16px; height: 16px; vertical-align: -.2em; margin-right: .15rem; }

/* The form's first submit button, never seen: pressing Enter in a box saves
   instead of setting off the first secondary button (a copy or a suggestion). */
.ob-default-submit {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- the action bar: sticky on a phone, static while the keyboard is up -- */

.ob-actions {
  position: sticky; bottom: 0; z-index: 20;
  margin: 1.5rem -1rem 0;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 76%, rgba(244, 245, 247, 0));
}
.ob-actions__inner { display: flex; flex-direction: column; align-items: stretch; gap: .3rem; }
.ob-actions__hint { margin: .1rem 0 0; text-align: center; color: var(--muted); font-size: .86rem; }
.ob-skip {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 46px; padding: .5rem 1rem;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--text-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.ob-skip:hover { color: var(--text); }
/* Two rules, not one list: a browser without :has() drops a whole selector
   list it cannot read, and the .is-typing fallback must survive there. */
.is-typing .ob-actions { position: static; background: none; }
.ob-main:has(input[type=text]:not([readonly]):focus, input[type=email]:not([readonly]):focus, input[type=tel]:not([readonly]):focus,
             input[type=url]:not([readonly]):focus, input[type=number]:not([readonly]):focus, input[type=search]:not([readonly]):focus,
             input[type=password]:not([readonly]):focus, textarea:not([readonly]):focus) .ob-actions {
  position: static; background: none;
}

/* --- big tappable choices: plan cards, how to add the menu --------------- */

.ob-choices { display: grid; gap: .75rem; margin: 0 0 1.25rem; }
.ob-choice {
  display: flex; flex-direction: column; align-items: stretch; gap: .45rem;
  width: 100%; min-width: 0; min-height: 46px;
  padding: 1.1rem 1rem;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border-dark); border-radius: 16px; box-shadow: var(--shadow);
  font: inherit; text-align: left; text-decoration: none;
}
@media (min-width: 480px) { .ob-choice { padding: 1.25rem 1.35rem; } }
button.ob-choice, a.ob-choice, label.ob-choice {
  cursor: pointer; touch-action: manipulation;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
button.ob-choice:hover, a.ob-choice:hover, label.ob-choice:hover { border-color: var(--brand); color: var(--text); }
button.ob-choice:active, a.ob-choice:active, label.ob-choice:active { transform: scale(.99); }
.ob-choice.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.ob-choice.is-disabled { background: var(--surface-2); box-shadow: none; opacity: .65; cursor: not-allowed; }
.ob-choice.is-disabled:hover { border-color: var(--border-dark); }
.ob-choice__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .6rem; }
.ob-choice__title {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere;
}
.ob-choice__title .icon { width: 22px; height: 22px; color: var(--brand); }
.ob-choice__price { margin: 0; font-size: 1.3rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ob-choice__meta { display: block; margin: 0; color: var(--text-soft); font-size: .92rem; font-weight: 400; }
.ob-choice .btn { margin-top: .4rem; }
.ob-choice__unavailable { margin: .35rem 0 0; text-align: center; font-weight: 600; }
.ob-badge {
  display: inline-flex; align-items: center; padding: .2rem .6rem;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}

/* --- included / not included --------------------------------------------- */

.ob-features { list-style: none; margin: .2rem 0; padding: 0; display: grid; gap: .35rem; }
.ob-feature { display: flex; align-items: flex-start; gap: .5rem; font-size: .95rem; }
.ob-feature .icon { width: 18px; height: 18px; margin-top: .18rem; flex: none; stroke-width: 2.4; }
.ob-feature.is-on .icon { color: var(--green); }
.ob-feature.is-off { color: var(--muted); }
.ob-feature.is-off .icon { color: var(--border-dark); }
.ob-feature__note { display: inline-block; margin-left: .2rem; color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }

/* --- checklists (menu check, launch readiness) --------------------------- */

.ob-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ob-check {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: .65rem; align-items: start;
  padding: .75rem .85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.ob-check > .icon { grid-column: 1; grid-row: span 3; width: 22px; height: 22px; margin-top: .05rem; stroke-width: 2.3; }
.ob-check.is-ok > .icon { color: var(--green); }
.ob-check.is-bad { background: var(--surface); border-color: #fecaca; }
.ob-check.is-bad > .icon { color: var(--red); }
.ob-check.is-warn > .icon { color: var(--amber); }
.ob-check__label { grid-column: 2; font-weight: 600; overflow-wrap: anywhere; }
.ob-check__detail { grid-column: 2; margin-top: .15rem; color: var(--text-soft); font-size: .88rem; overflow-wrap: anywhere; }
.ob-check__fix {
  grid-column: 2; justify-self: start;
  display: inline-flex; align-items: center; min-height: 46px; margin-bottom: -.5rem;
  font-size: .92rem; font-weight: 600;
}

/* --- the customer link ---------------------------------------------------- */

.ob-link-box {
  display: flex; flex-direction: column; gap: .2rem;
  margin: .75rem 0; padding: .85rem .95rem;
  border: 1px dashed var(--border-dark); border-radius: 12px; background: var(--surface-2);
}
.ob-link-box__label { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ob-link-box__url { color: var(--text); font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }
.ob-link-box__url strong { color: var(--brand-dark); }
.ob-link-box input { font-weight: 600; background: var(--surface); }
.ob-link-box .btn-row { margin-top: .5rem; }
.ob-link-box .btn-row .btn { flex: 1 1 8rem; }

.ob-suggestions { margin: 0 0 .75rem; }
.ob-suggestions__label { margin: 0 0 .4rem; font-size: .9rem; font-weight: 600; }
.ob-suggestions__list { display: flex; flex-wrap: wrap; gap: .45rem; }
.ob-suggestion {
  max-width: 100%; min-height: 46px; padding: .45rem .95rem;
  border: 1.5px solid var(--border-dark); border-radius: 999px; background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; text-align: left; overflow-wrap: anywhere; cursor: pointer;
  touch-action: manipulation;
}
.ob-suggestion:hover { border-color: var(--brand); color: var(--brand-dark); }

/* --- the preview ----------------------------------------------------------- */

.ob-tabs {
  display: flex; gap: .25rem; margin: 0 0 .75rem; padding: 3px;
  background: var(--grey-bg); border-radius: 999px; overflow-x: auto;
}
.ob-tabs a {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 1rem; border-radius: 999px;
  color: var(--text-soft); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ob-tabs a:hover { color: var(--text); }
.ob-tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.ob-preview { margin: 0 0 1rem; background: var(--surface); overflow: hidden; }
.ob-preview__frame { display: block; width: 100%; max-width: 100%; height: min(680px, 72vh); border: 0; background: var(--surface); }
.ob-preview--mobile {
  max-width: 390px; margin-left: auto; margin-right: auto;
  border: 10px solid #1f2937; border-radius: 34px; box-shadow: var(--shadow-lg);
}
.ob-preview--desktop { border: 1px solid var(--border-dark); border-radius: 12px; box-shadow: var(--shadow-lg); }
/* On a phone or tablet the desktop frame keeps a real desktop width and scrolls
   sideways inside its own box, so the page really switches to its wide layout. */
@media (max-width: 899.98px) {
  .ob-preview--desktop { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ob-preview--desktop .ob-preview__frame { width: 1024px; max-width: none; }
}
@media (min-width: 900px) {
  /* Wider than the wizard's column, centred on it, never wider than the screen. */
  .ob-preview--desktop { width: min(1100px, calc(100vw - 3rem)); position: relative; left: 50%; transform: translateX(-50%); }
  .ob-preview--desktop .ob-preview__frame { height: min(760px, 75vh); }
}

/* --- opening hours ----------------------------------------------------------- */

/* The weekly editor (includes/views/hours_editor.php, assets/js/hours.js):
   admin/hours.php and the setup step. */
.he-day { border: 0; margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--border); min-width: 0; }
.he-day:last-of-type { border-bottom: 0; }
.he-day__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.he-day__name { font-weight: 700; }
.he-day.is-invalid .he-day__name { color: var(--red); }
.he-day__toggle {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; margin: 0;
  color: var(--text-soft); font-size: .92rem; font-weight: 600; cursor: pointer;
}
.he-day.is-closed .he-day__state { color: var(--muted); }
.he-day__periods { display: grid; gap: .5rem; margin-top: .35rem; }
.he-day.is-closed .he-day__periods, .he-day.is-closed .he-day__tools { display: none; }
.he-period {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .4rem .5rem;
}
.he-period input { min-width: 0; }
.he-period__to { color: var(--muted); font-size: .9rem; }
.he-period__next, .he-period__hint { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); margin-top: -.15rem; }
.he-period__next { color: var(--text-soft); font-weight: 600; }
.he-period__remove { grid-column: 1 / -1; justify-self: start; }
.he-period--spare input { border-style: dashed; }
.he-day__tools { margin-top: .35rem; }
.he-add { padding-left: .25rem; }
@media (min-width: 560px) {
  .he-period { grid-template-columns: 9rem auto 9rem auto auto; justify-content: start; }
  .he-period__next, .he-period__hint { grid-column: auto; margin-top: 0; }
  .he-period__remove { grid-column: auto; }
}
.he-copy { display: grid; gap: .5rem; padding: .25rem 0 .75rem; }
@media (min-width: 440px) { .he-copy { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .he-copy { display: flex; flex-wrap: wrap; } }

.ob-hours { padding-top: .35rem; padding-bottom: .35rem; }
.ob-hours__row { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.ob-hours__row:last-child { border-bottom: 0; }
.ob-hours__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ob-hours__day { font-weight: 700; }
.ob-hours__row.is-invalid .ob-hours__day { color: var(--red); }
.ob-hours__toggle {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; margin: 0;
  color: var(--text-soft); font-size: .92rem; font-weight: 600; cursor: pointer;
}
.ob-hours__times {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .5rem;
  margin-top: .35rem;
}
.ob-hours__times input { min-width: 0; }
.ob-hours__to { color: var(--muted); font-size: .9rem; }
.ob-hours__closed { display: none; margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
/* Closed days need no times. Browsers without :has() simply keep showing them. */
.ob-hours__row:has([data-ob-open]:not(:checked)) .ob-hours__times { display: none; }
.ob-hours__row:has([data-ob-open]:not(:checked)) .ob-hours__closed { display: block; }
.ob-hours__copy {
  display: grid; gap: .5rem; padding: .15rem 0 .9rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 440px) { .ob-hours__copy { grid-template-columns: 1fr 1fr; } }
.ob-hours__copy .btn { padding-left: .6rem; padding-right: .6rem; font-size: .92rem; }

/* --- the menu in numbers ------------------------------------------------------ */

.ob-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
@media (min-width: 480px) { .ob-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ob-stat {
  display: flex; flex-direction: column; gap: .1rem; min-width: 0;
  padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.ob-stat__value { font-size: 1.5rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ob-stat__label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.ob-stat.is-warn .ob-stat__value { color: var(--amber); }

/* --- status lines and the finish -------------------------------------------- */

.ob-status { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.ob-status .badge, .ob-status .spinner { flex: none; }
.ob-status-line {
  margin: 0 0 1rem; padding: .75rem .95rem; border-radius: var(--radius-sm);
  background: var(--blue-bg); color: var(--blue); font-weight: 550;
}
.ob-status-line:empty { display: none; }

.ob-celebrate { text-align: center; padding: 1.5rem 0 1rem; }

/* A list of links, each a full-width 46px tap row (preview's "Something to change?"). */
.ob-linklist { list-style: none; margin: 0; padding: 0; }
.ob-linklist li + li { border-top: 1px solid var(--border); }
.ob-linklist a { display: flex; align-items: center; min-height: 46px; padding: .35rem 0; font-weight: 600; }
.ob-celebrate__icon {
  width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-bg); color: var(--green);
}
.ob-celebrate__icon .icon { width: 40px; height: 40px; stroke-width: 2.4; }
.ob-celebrate .ob-title { font-size: 1.85rem; }
.ob-celebrate .ob-lead { max-width: 26rem; margin: 0 auto; }

/* --- branding: pictures and colour ------------------------------------------ */

.ob-images { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .75rem; }
.ob-images:not(:has(img:not([hidden]))) { display: none; }
.ob-image { border: 1px solid var(--border); border-radius: 12px; background: var(--grey-bg); object-fit: cover; }
.ob-image--logo { width: 88px; height: 88px; }
.ob-image--cover { width: 100%; height: auto; aspect-ratio: 16 / 7; }
.ob-main input[type=file] {
  display: block; width: 100%; max-width: 100%; min-height: 46px; padding: .55rem;
  border: 1.5px dashed var(--border-dark); border-radius: var(--radius-sm); background: var(--surface-2);
  color: var(--text-soft); font: inherit; font-size: 16px; cursor: pointer;
}
.ob-main input[type=file]::file-selector-button {
  min-height: 38px; margin-right: .75rem; padding: .45rem .9rem;
  border: 1px solid var(--border-dark); border-radius: 8px; background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.ob-colour { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: .75rem; }
.ob-colour .field { margin-bottom: 0; }
.ob-colour__input {
  display: block; width: 64px; height: 46px; padding: .2rem;
  border: 1px solid var(--border-dark); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
.ob-colour__sample { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem 0 0; }
.ob-colour__sample .ob-note { margin: 0; }
.ob-colour__button {
  display: inline-flex; align-items: center; min-height: 46px; padding: .6rem 1.2rem;
  border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700;
}

@media (min-width: 768px) {
  .ob-main { padding-top: 2rem; }
  .ob-title { font-size: 1.85rem; }
}

@media print {
  .ob-bar, .ob-actions, .ob-skiplink { display: none; }
}

/* Pricing v2: plan choices in the setup wizard, and switches a plan does not include. */
.ob-option { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ob-option.is-selected .ob-choice__price { color: var(--brand-dark); }
.switch input:disabled + .switch__track { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------ verified reviews --
   docs/reviews.md. Stars are text in a fixed amber (not the brand colour:
   a pale brand would fail contrast). Widths come from rv-w-N classes in 5%
   steps - the CSP allows no inline style. */
.pub-rating { color: inherit; text-decoration: none; min-height: 24px; font-weight: 600; }
.pub-rating:hover { color: var(--text); text-decoration: underline; }
.pub-rating__star { color: var(--amber); font-size: 1rem; line-height: 1; }

.rv-stars { display: inline-flex; letter-spacing: .05em; line-height: 1; font-size: 1rem; }
.rv-stars__on { color: var(--amber); }
.rv-stars__off { color: var(--border-dark); }

.rv-avg { position: relative; display: inline-block; line-height: 1; letter-spacing: .05em; white-space: nowrap; }
.rv-avg__base { color: var(--border-dark); }
.rv-avg__fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--amber); white-space: nowrap; }
.rv-avg--lg { font-size: 1.35rem; }
.rv-w-0 { width: 0%; }
.rv-w-5 { width: 5%; }
.rv-w-10 { width: 10%; }
.rv-w-15 { width: 15%; }
.rv-w-20 { width: 20%; }
.rv-w-25 { width: 25%; }
.rv-w-30 { width: 30%; }
.rv-w-35 { width: 35%; }
.rv-w-40 { width: 40%; }
.rv-w-45 { width: 45%; }
.rv-w-50 { width: 50%; }
.rv-w-55 { width: 55%; }
.rv-w-60 { width: 60%; }
.rv-w-65 { width: 65%; }
.rv-w-70 { width: 70%; }
.rv-w-75 { width: 75%; }
.rv-w-80 { width: 80%; }
.rv-w-85 { width: 85%; }
.rv-w-90 { width: 90%; }
.rv-w-95 { width: 95%; }
.rv-w-100 { width: 100%; }

.rv-summary { display: grid; gap: 1rem; align-items: center; margin-bottom: 1rem; }
@media (min-width: 560px) { .rv-summary { grid-template-columns: minmax(150px, 190px) 1fr; } }
.rv-summary__score { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.rv-summary__avg { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.rv-summary__count { color: var(--muted); font-size: .9rem; }
.rv-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.rv-dist__row { display: grid; grid-template-columns: 2.4rem 1fr 3rem; align-items: center; gap: .55rem; font-size: .88rem; color: var(--text-soft); }
.rv-dist__label { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-dist__bar { height: 8px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; }
.rv-dist__fill { display: block; height: 100%; background: var(--amber); border-radius: 999px; }
.rv-dist__n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.rv-subavg { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; color: var(--text-soft); }

.rv-sort { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.rv-sort__opt {
  display: inline-flex; align-items: center; min-height: 36px; padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--border-dark); color: var(--text-soft); background: var(--surface);
  font-size: .86rem; font-weight: 650; text-decoration: none; white-space: nowrap;
}
.rv-sort__opt:hover { color: var(--text); background: var(--surface-2); }
.rv-sort__opt.is-on { background: var(--text); border-color: var(--text); color: #fff; }

.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-item { padding: .95rem 0; border-top: 1px solid var(--border); }
.rv-list > .rv-item:first-child { border-top: 0; padding-top: .25rem; }
.rv-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.rv-item__name { font-weight: 650; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.rv-badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .74rem; }
.rv-badge__icon { width: 13px; height: 13px; stroke-width: 2.4; }
.rv-item__meta { margin: .2rem 0 0; color: var(--muted); font-size: .84rem; }
.rv-item__title { margin: .55rem 0 0; font-size: 1rem; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.rv-item__body { margin: .35rem 0 0; color: var(--text-soft); line-height: 1.55; overflow-wrap: anywhere; }
.rv-item__sub { margin: .4rem 0 0; color: var(--muted); font-size: .84rem; }
.rv-item__actions { margin: .5rem 0 0; font-size: .84rem; }
.rv-item__report { color: var(--muted); font-size: .8rem; text-decoration: none; }
.rv-item__report:hover { text-decoration: underline; color: var(--text-soft); }
.rv-reply { margin: .7rem 0 0; padding: .65rem .85rem; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-dark); border-radius: var(--radius-sm); }
.rv-reply__head { margin: 0; font-size: .84rem; color: var(--text-soft); }
.rv-reply__body { margin: .3rem 0 0; color: var(--text-soft); font-size: .94rem; line-height: 1.5; overflow-wrap: anywhere; }
.rv-empty { padding: 1rem .5rem; }
.rv-card [data-rv-more] { margin-top: .75rem; }
.rv-pager { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; }

/* The guest's form. Five radio buttons, drawn as stars, 1..5 in the markup
   as on screen (so arrow keys go the way they look). The chosen star and
   those before it light up; hovering previews up to the star under the
   pointer, in either direction. Without :has() only the chosen star lights. */
.rv-page .card { margin-bottom: 1rem; }
.rv-form__label { font-weight: 650; color: var(--text); }
.rv-req { font-weight: 400; color: var(--muted); font-size: .85rem; }
.rv-rate { border: 0; padding: 0; margin: 0 0 1rem; }
.rv-rate__stars { display: inline-flex; gap: .1rem; }
.rv-rate__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-rate__star {
  font-size: 2.3rem; line-height: 1; color: var(--border-dark); cursor: pointer;
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.rv-rate__input:checked + .rv-rate__star { color: var(--amber); }
.rv-rate__stars:has(.rv-rate__input:checked) .rv-rate__star { color: var(--amber); }
.rv-rate__input:checked + .rv-rate__star ~ .rv-rate__star { color: var(--border-dark); }
.rv-rate__stars:has(.rv-rate__star:hover) .rv-rate__star { color: var(--amber); }
.rv-rate__stars .rv-rate__star:hover ~ .rv-rate__star { color: var(--border-dark); }
.rv-rate__input:focus-visible + .rv-rate__star { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 8px; }
.rv-rate__words { margin: .15rem 0 0; }
.rv-subrate { margin: 0 0 1rem; }
.rv-subrate summary { cursor: pointer; font-size: .92rem; color: var(--text-soft); min-height: 32px; }
.rv-subrate__row { border: 0; padding: 0; margin: .6rem 0 0; }
.rv-subrate__row legend { font-size: .9rem; font-weight: 600; margin-bottom: .25rem; }
.rv-seg { flex-wrap: wrap; }
.rv-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-seg label { font-size: .88rem; font-weight: 650; color: var(--text-soft); padding: .45rem .8rem; border-radius: 999px; cursor: pointer; min-width: 40px; text-align: center; }
.rv-seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.rv-seg input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 1px; }
.rv-form__text { font-size: 16px; }
.rv-name { border: 0; padding: 0; margin: 0 0 1rem; }
.rv-name__opt { display: flex; align-items: center; gap: .55rem; min-height: 44px; font-size: .96rem; }
.rv-form__notice { margin: 0 0 1rem; line-height: 1.5; }
.rv-delete .check { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; }
.rv-edit > summary { cursor: pointer; list-style: none; }
.rv-page__foot { margin-top: 1.25rem; text-align: center; }

/* The review card on the guest's own order, booking and restaurant page. */
.rv-guest { margin: 1rem 0; }
.rv-guest__title { display: flex; align-items: center; gap: .4rem; margin: 0 0 .3rem; font-weight: 700; color: var(--text); }
.rv-guest__icon { width: 20px; height: 20px; color: var(--amber); fill: var(--amber); }
.rv-guest__elsewhere { margin-top: .75rem; font-size: .9rem; }
.rv-guest__elsewhere summary { cursor: pointer; color: var(--text-soft); min-height: 44px; padding: .7rem 0; }
/* Phone-sized tap targets (44px, as on the other guest pages) for the review controls. */
.rv-guest .btn, .rv-keep .btn, .rv-page .btn--sm { min-height: 44px; }
.rv-link { width: 100%; font-size: 16px; }
.rv-guest-note { margin: .75rem 0; text-align: center; }
.rv-mine .btn { margin-top: .15rem; }

/* Restaurant admin and Super Admin. */
.rv-list--admin { padding: .25rem 1rem; }
.rv-filter { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.rv-filter select, .rv-mod__form select { width: auto; flex: 0 0 auto; max-width: 100%; }
.rv-rules { margin: 0 0 .5rem; padding-left: 1.1rem; color: var(--text-soft); line-height: 1.5; }
.rv-history { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .25rem; color: var(--text-soft); }
.rv-mod__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: center; }
.rv-mod__form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.rv-mod__form input[type="text"] { flex: 1 1 14rem; min-width: 0; }
.rv-mod__report { margin: .6rem 0 0; padding: .55rem 0 0; border-top: 1px dashed var(--border); }
.rv-policy h2 { font-size: 1.05rem; margin: 1.25rem 0 .35rem; }
.rv-policy ul { padding-left: 1.1rem; line-height: 1.55; }

/* ==========================================================================
   Menu transfers from Just Eat (Super Admin: superadmin/menu-transfer*.php)
   ========================================================================== */
.mt-thumb { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.mt-bookmarklet { cursor: grab; border-style: dashed; }
.mt-rx { max-width: 720px; margin: 0 auto; padding: 1rem 16px 2rem; }
.mt-rx__title { font-size: 1.3rem; margin: .25rem 0 .75rem; }
.mt-rx__out p { line-height: 1.5; }
.mt-rx__facts { margin: .5rem 0 1rem; padding-left: 1.1rem; line-height: 1.55; overflow-wrap: anywhere; }
.mt-rx__facts .badge { margin-left: .25rem; }
.mt-rx__unit { margin: .75rem 0; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; }
.mt-rx__unit legend { font-weight: 600; padding: 0 .25rem; }
.mt-rx__bad { color: var(--red); }
.mt-rx__ok { color: var(--green); }
.mt-rx .btn { margin-top: .5rem; }
