/* ============================================================================
   SKB — styles
   Diner palette matches restaurant brand:
   - Black (#000) + White (#fff) base
   - Gold accent (#e3bf3d)
   - Fira Sans typography
   Host palette (at bottom) uses a slightly different neutral set for contrast.
   ============================================================================ */

:root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #4d4c4c;
    --accent: #e3bf3d;
    --accent-dark: #b89624;
    --accent-fg: #111111;
    --card: #ffffff;
    --border: #eaeaea;
    --divider: #f3f3f3;
    --surface-alt: #fafafa;
    --ok: #15803d;
    --danger: #b91c1c;
    --row-hover: #fafafa;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,.14);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--fg);
}

/* ---------- Diner page ---------- */
.diner { background: var(--surface-alt); }
.diner header {
    background: #000;
    color: #fff;
    padding: 24px 16px 20px;
    text-align: center;
    border-bottom: 4px solid var(--accent);
}
.diner header .mark {
    display: inline-block;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 6px;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 4px 14px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.diner header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.diner header .sub {
    color: #cfcbba;
    font-size: 13px;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.diner main { padding: 20px 16px; max-width: 1080px; margin: 0 auto; }
.queue-panel > .card,
.queue-panel > .public-list {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.queue-panel > .order-card,
.queue-panel > .payment-card {
    max-width: none;
}
.queue-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.queue-tab {
    flex: 1 1 0;
    min-height: 42px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.queue-tab.is-active {
    background: #111;
    color: #fff;
}
.queue-tab:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}
.queue-panel[hidden] { display: none !important; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.status { text-align: center; }
.status .line-len {
    font-size: 56px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}
.status .line-label {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}
.status .eta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--divider);
    color: var(--muted);
    font-size: 14px;
}
.queue-menu-cta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
    text-align: center;
}
.queue-menu-cta-copy {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}
.queue-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--fg);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.queue-menu-link:hover {
    border-color: var(--accent);
    background: var(--card);
    color: var(--fg);
}
/* Stacked form-label styling — scoped to .card (login + queue join form)
   so it doesn't bleed into flex-laid-out labels in the topbar, admin
   filters, visit config, site config, etc. (issue #50 bugs 2/4/6). */
.card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 14px 0 6px;
}
.card label:first-child { margin-top: 0; }
input[type=text], input[type=tel], input[type=number], input[type=password] {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--fg);
}
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227,191,61,0.25);
}
button.primary {
    display: block;
    width: 100%;
    margin-top: 20px;
    min-height: 48px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s;
}
button.primary:hover { background: #333; }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Ghost button: inline, low-weight companion to the primary. Used for
   "+ Add item", "+ Add section", and similar additive actions where
   we don't want a heavy solid-black call-to-action. */
button.secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 36px;
    background: #fff;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
button.secondary:hover {
    border-color: var(--accent, #c0872e);
    color: var(--accent, #c0872e);
    background: #fffdf7;
}
button.secondary:active { background: #fdf6e4; }
button.secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Destructive companion to .primary. Used for Disconnect, Revoke,
   Delete buttons where a destructive action needs confirmation weight
   without shouting in the default state. */
button.admin-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    min-height: 40px;
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
button.admin-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}
button.admin-danger:active { background: #fee2e2; }
button.admin-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.confirmation { text-align: center; padding: 24px 20px; }
.confirmation .pos-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}
.confirmation .pos {
    font-size: 84px;
    font-weight: 700;
    color: #111;
    line-height: 1;
    margin: 4px 0 8px;
}
.confirmation .code {
    display: inline-block;
    margin: 6px 0 14px;
    padding: 10px 18px;
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}
.confirmation .eta-time { font-size: 17px; color: var(--fg); }
.confirmation .eta-mins { color: var(--muted); font-size: 15px; font-weight: 500; }
.confirmation .hint { color: var(--muted); font-size: 13px; margin: 14px 0 4px; line-height: 1.5; }
.repeat-guest-note {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(227, 191, 61, 0.45);
    border-radius: 10px;
    background: #fff9e8;
    color: #5b4a0a;
    font-size: 13px;
    line-height: 1.45;
}
.repeat-guest-save {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
}
.repeat-guest-save .secondary {
    justify-content: center;
}
.repeat-guest-save-status {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.confirmation.next-up {
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.25);
    animation: next-up-pulse 2s ease-in-out infinite;
}
@keyframes next-up-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.25); }
    50%      { box-shadow: 0 0 0 8px rgba(227, 191, 61, 0.10); }
}
.callout {
    background: var(--accent);
    color: var(--accent-fg);
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 600;
    text-align: center;
}
.callout .called-times {
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    color: #2a2305;
}
/* Diner chat card — shown on the queue page while the party is live
   (issue #50 bug 1). Renders the same thread the host sees, plus a send
   form that POSTs to /queue/chat/:code. */
/* Diner chat card — compact, only visible after the host initiates. */
.chat-card {
    margin-top: 12px;
    padding: 14px 14px 12px;
    border-color: var(--accent, #e3bf3d);
}
.chat-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.chat-head::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(224, 138, 46, 0.15);
}
.chat-head strong { font-size: 12px; font-weight: 600; }
.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 2px 8px;
}
.chat-row { display: flex; flex-direction: column; max-width: 82%; }
.chat-row.from-host { align-self: flex-start; align-items: flex-start; }
.chat-row.from-me { align-self: flex-end; align-items: flex-end; }
.chat-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.chat-row.from-host .chat-bubble {
    background: #fbf5e6;
    color: #2a2305;
    border: 1px solid #f0e3b8;
    border-bottom-left-radius: 6px;
}
.chat-row.from-me .chat-bubble {
    background: var(--accent, #e3bf3d);
    color: var(--accent-fg);
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 6px rgba(224, 138, 46, 0.25);
}
.chat-who { display: none; }
.chat-body { white-space: pre-wrap; }
.chat-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
    padding: 0 6px;
    letter-spacing: 0.2px;
}
.chat-row.from-me .chat-meta { text-align: right; }
.chat-row.from-host .chat-meta { text-align: left; }
.chat-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.chat-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg, #fff);
    color: var(--fg);
    min-height: 44px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-form input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(224, 138, 46, 0.18);
}
.chat-form button {
    /* The diner Send button has class="primary" which forces width:100% + margin-top:20px
       via the baseline button.primary rule. Override both so the button sits as a
       compact, auto-width peer next to the expanding text input. */
    width: auto;
    margin: 0;
    padding: 10px 18px;
    min-height: 44px;
    min-width: 72px;
    white-space: nowrap;
    border-radius: 22px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chat-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Renotify banner — shown when the host calls a diner a second+ time while
   they're already in the called state. More visual weight than the regular
   callout so it can't be missed (issue #50 bug 3). */
.renotify-banner {
    background: #dc2626;
    color: #fff;
    padding: 12px 14px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
    animation: renotify-pulse 1.5s ease-in-out infinite;
}
@keyframes renotify-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.45); }
}
.error { color: var(--danger); font-size: 13px; margin-top: 6px; }
footer {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    padding: 20px 16px;
    letter-spacing: 0.3px;
}

/* ---------- Host page ---------- */
.host { background: #f5f5f4; }
.host .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--border);
    flex-wrap: wrap; gap: 12px;
}
.host .brand { font-weight: 700; letter-spacing: 0.5px; }
.host .counts { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.host .counts strong { color: var(--fg); font-size: 18px; }
.host .turn { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.host .turn label { display: flex; align-items: center; gap: 6px; }
.host .turn input { width: 72px; min-height: 44px; padding: 8px 10px; font-size: 15px; border: 1px solid var(--border); border-radius: 6px; }
.host .turn input[readonly] { background: var(--surface-alt); color: var(--fg); cursor: default; }
.host .turn select { min-height: 44px; padding: 8px 10px; font-size: 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--fg); }
.host .turn .turn-info { font-size: 12px; color: var(--muted); font-style: italic; }
.host .turn .eta-health { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; padding:2px 8px; border-radius:4px; letter-spacing:.02em; }
.host .turn .eta-health::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.host .turn .eta-health.eta-health--green  { background:rgba(50,215,75,.12); color:#1a8f30; border:1px solid rgba(50,215,75,.3); }
.host .turn .eta-health.eta-health--green::before  { background:#32d74b; }
.host .turn .eta-health.eta-health--yellow { background:rgba(180,130,0,.10); color:#7a5900; border:1px solid rgba(180,130,0,.25); }
.host .turn .eta-health.eta-health--yellow::before { background:#c89400; }
.host .turn .eta-health.eta-health--red    { background:rgba(255,69,58,.10); color:#c0392b; border:1px solid rgba(255,69,58,.25); }
.host .turn .eta-health.eta-health--red::before    { background:#ff453a; }
.host .logout { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 13px; }
.host main { padding: 20px 24px; }
.admin-main { padding: 20px 24px; display: grid; gap: 20px; }
.admin-tabs { display: flex; gap: 4px; margin: 16px 24px 0; padding: 4px; background: var(--surface-alt, #faf6ee); border: 1px solid var(--border); border-radius: 10px; width: fit-content; }
.admin-tab { background: transparent; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.admin-tab.active { background: var(--accent, #1f6a5d); color: #fff; }
.admin-tab:focus-visible { outline: 2px solid var(--accent, #1f6a5d); outline-offset: 2px; }
.admin-topbar { align-items: flex-start; }
.admin-brand-block { display: flex; flex-direction: column; gap: 4px; min-width: 240px; }
.admin-subhead { color: var(--muted); font-size: 13px; max-width: 360px; }
.admin-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
/* Accordion: every admin-card is a <details> element. Summary acts as the
   clickable header row; the caret in ::before flips when open. Collapsed
   by default so each tab loads as a clean list of section titles. */
details.admin-card { padding: 0; }
details.admin-card > summary.admin-card-head {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px 16px 48px;
    margin: 0;
    position: relative;
    border-radius: 12px;
    user-select: none;
}
details.admin-card > summary.admin-card-head::-webkit-details-marker { display: none; }
details.admin-card > summary.admin-card-head::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #78716c;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 120ms ease;
}
details.admin-card[open] > summary.admin-card-head::before { transform: translateY(-40%) rotate(0deg); }
details.admin-card[open] > summary.admin-card-head { border-radius: 12px 12px 0 0; }
details.admin-card > summary.admin-card-head:hover { background: #fafaf9; }
details.admin-card > summary.admin-card-head > h2 { display: inline-block; vertical-align: middle; }
details.admin-card > *:not(summary) { padding: 0 20px; }
details.admin-card > *:not(summary):last-child { padding-bottom: 20px; }
.admin-card-head { margin-bottom: 16px; }
.admin-card-head h2 { margin: 0 0 4px; font-size: 20px; }
.admin-card-head p { margin: 0; color: var(--muted); font-size: 14px; }
.admin-ops-summary-grid { margin-top: 4px; }
.admin-ops-incidents {
    display: grid;
    gap: 12px;
}
.admin-ops-incident {
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 10px;
    background: #fff;
    padding: 14px 16px;
}
.admin-ops-incident-error { border-left-color: #b42318; background: #fff7f7; }
.admin-ops-incident-warning { border-left-color: #b89624; background: #fffaf0; }
.admin-ops-incident-info { border-left-color: #1f6a5d; background: #f6fbfa; }
.admin-ops-incident-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.admin-ops-incident-meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}
.admin-ops-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.06);
    color: var(--fg);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-ops-incident-body {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}
.admin-ops-incident-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-ops-incident-context span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.05);
    color: var(--muted);
    font-size: 12px;
}

/* Flat save-strip card (e.g. at the bottom of Website / Profile tabs).
   Shares admin-card background but has no accordion affordance, and
   tightens vertical padding since there's no header. */
.admin-card.admin-card-saverow { padding: 14px 20px; }

/* Menu builder styling. <details> per section, item rows inside. Keep
   dense but readable: section numbers subtly count up, items have a
   hover lift, delete actions are muted until hovered, placeholders
   guide first-time use. */
.menu-sections-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    counter-reset: menu-section;
}
.menu-empty-state {
    color: var(--muted);
    padding: 32px 24px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: #fafaf9;
    font-size: 14px;
}
details.menu-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafaf9;
    padding: 0;
    counter-increment: menu-section;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
details.menu-section:hover { border-color: #d6d3d1; }
details.menu-section[open] { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
details.menu-section > summary.menu-section-head {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}
details.menu-section > summary.menu-section-head::-webkit-details-marker { display: none; }
details.menu-section > summary.menu-section-head::before {
    content: "";
    flex-shrink: 0;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid #57534e;
    transform: rotate(-90deg);
    transition: transform 120ms ease;
}
details.menu-section[open] > summary.menu-section-head::before { transform: rotate(0); }
details.menu-section > summary.menu-section-head::after {
    content: "Section " counter(menu-section);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}
details.menu-section input.menu-section-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 10px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    color: var(--fg);
}
details.menu-section input.menu-section-title::placeholder { color: #a8a29e; font-weight: 500; }
details.menu-section input.menu-section-title:hover,
details.menu-section input.menu-section-title:focus {
    background: #fff;
    border-color: var(--border);
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 135, 46, 0.12);
}
.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 14px;
}
.menu-item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.menu-item:hover { border-color: #d6d3d1; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.menu-item-image-stack { width: 132px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.menu-item-image-frame { width: 132px; height: 132px; border-radius: 8px; overflow: hidden; background: #f5f5f4; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.menu-item-image-preview { width: 100%; height: 100%; object-fit: cover; color: var(--muted); font-size: 13px; }
.menu-item-image-empty { padding: 16px; text-align: center; }
.menu-item-image-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-item-image-note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.menu-item-grid {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 132px;
    gap: 12px 14px;
    min-width: 0;
    align-items: start;
}
.menu-item-price-field { grid-column: 2; }
.menu-item-availability-field { grid-column: 3; }
.menu-item-grid .visit-field-full { grid-column: 1 / -1; }
.menu-item-row-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}
.menu-item-grid input,
.menu-item-grid select,
.menu-item-grid textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}
.menu-item-grid textarea { resize: vertical; min-height: 44px; }
@media (max-width: 640px) {
    .menu-item { flex-direction: column; align-items: stretch; }
    .menu-item-grid { grid-template-columns: 1fr; }
    .menu-item-price-field,
    .menu-item-availability-field { grid-column: 1; }
    .menu-item-image-stack, .menu-item-image-frame { width: 100%; }
}
.menu-section-actions {
    padding: 0 16px 16px;
    border-top: 1px dashed var(--border);
    margin: 0 16px;
    padding-top: 14px;
}
.menu-section-actions .menu-item-add {
    font-size: 13px;
    padding: 6px 12px;
}
.admin-danger-inline {
    background: transparent;
    color: #78716c;
    border: 1px solid transparent;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    font-weight: 500;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.menu-item .admin-danger-inline { align-self: flex-start; margin-top: 0; }
.admin-danger-inline:hover {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}
/* Save strip pinned bottom-right looks cleaner when its container is flat. */
.admin-card.admin-card-saverow { padding: 14px 20px; background: #fafaf9; border-color: var(--border); }
.order-card { display: flex; flex-direction: column; gap: 18px; }
.order-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.order-card-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.order-badge { padding: 6px 10px; border-radius: 8px; background: rgba(192, 135, 46, 0.14); color: var(--fg); font-size: 13px; font-weight: 600; }
.order-lock, .order-empty { color: var(--muted); font-size: 14px; }
.order-menu { display: flex; flex-direction: column; gap: 18px; order: 2; }
.order-section-nav {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    background: linear-gradient(to bottom, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
}
.order-section-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fafaf9;
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}
.order-section-link:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}
.order-section-link-cart {
    background: rgba(192, 135, 46, 0.14);
    border-color: rgba(192, 135, 46, 0.28);
}
.order-section { display: flex; flex-direction: column; gap: 12px; }
.order-section h3 { margin: 0; font-size: 18px; }
.order-item-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.order-item-card { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.order-item-card.is-sold-out { opacity: 0.7; }
.order-item-image { width: 100%; height: 160px; object-fit: cover; display: block; }
.order-item-image-empty { height: 160px; display: flex; align-items: center; justify-content: center; background: #f5f5f4; color: var(--muted); }
.order-item-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.order-item-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.order-item-meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.order-tags, .order-options { display: flex; flex-wrap: wrap; gap: 8px; }
.order-tag { padding: 4px 8px; border-radius: 6px; background: #f5f5f4; color: var(--fg); }
.order-card label {
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}
.order-options label {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafaf9;
    font-size: 13px;
    color: var(--fg);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.order-item-controls { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: start; }
.order-item-controls label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.order-item-controls input, .order-item-controls textarea { width: 100%; box-sizing: border-box; }
.order-item-actions { display: flex; gap: 8px; }
.order-remove-btn { background: transparent; border: 1px solid transparent; color: #b91c1c; padding: 8px 10px; }
.order-sold-out { color: #b91c1c; font-size: 13px; font-weight: 600; }
.order-cart {
    order: 1;
    position: sticky;
    top: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: var(--shadow-sm);
    max-height: min(52vh, 460px);
    overflow: auto;
}
.order-cart-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-cart-lines { display: flex; flex-direction: column; gap: 10px; }
.order-cart-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.order-cart-line:last-child { border-bottom: none; }
.order-cart-line-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.order-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.order-actions .primary,
.order-actions .secondary {
    width: auto;
    margin: 0;
}
.payment-card { display: flex; flex-direction: column; gap: 16px; }
.payment-guidance {
    border: 1px solid rgba(227, 191, 61, 0.28);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff9ea 0%, #fffdf8 100%);
    padding: 16px 18px;
}
.payment-guidance-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
}
.payment-guidance-body {
    margin-top: 8px;
    color: var(--fg);
    font-size: 14px;
    line-height: 1.55;
}
.payment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.payment-stat {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
    padding: 14px;
}
.payment-stat-k {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.payment-stat-v {
    color: var(--fg);
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}
.payment-progress {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.payment-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}
.payment-progress-head strong {
    font-size: 16px;
}
.payment-progress-head span {
    color: var(--muted);
    font-weight: 600;
}
.payment-progress-bar {
    margin-top: 12px;
    height: 10px;
    border-radius: 999px;
    background: #efe6cd;
    overflow: hidden;
}
.payment-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}
.payment-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}
.payment-progress-callout {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff9ea;
    color: var(--fg);
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid rgba(227, 191, 61, 0.24);
}
.payment-progress-callout.is-paid {
    background: #effaf3;
    border-color: rgba(34, 197, 94, 0.24);
}
.payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 16px;
}
.payment-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.payment-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}
.payment-panel-head strong {
    font-size: 16px;
}
.payment-panel-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
}
.payment-lines,
.payment-splits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.payment-line,
.payment-split {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.payment-line-meta,
.payment-split-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.payment-split {
    align-items: center;
    cursor: pointer;
}
.payment-split-main,
.payment-split-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.payment-split-side {
    align-items: flex-end;
    text-align: right;
}
.payment-split-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.payment-split-status.open {
    background: #fef3c7;
    color: #92400e;
}
.payment-split-status.paid {
    background: #dcfce7;
    color: #166534;
}
.payment-split.selected {
    border-color: var(--accent);
    background: #fff9ea;
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.16);
}
.payment-split.is-paid {
    background: #f7fbf7;
}
.payment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.payment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
.payment-actions .primary,
.payment-actions .secondary {
    width: auto;
    margin: 0;
}
.payment-actions .visit-status {
    margin-right: auto;
    flex: 1 1 180px;
}
.payment-departure-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.timeline-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.host-order-detail { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: #fff; }
.host-order-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.host-order-sub, .host-order-line-meta { color: var(--muted); font-size: 13px; }
.host-order-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.host-order-line { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.host-order-line:first-child { border-top: none; padding-top: 0; }
@media (max-width: 900px) {
    .timeline-detail-grid { grid-template-columns: 1fr; }
    .operations-layout { grid-template-columns: 1fr; }
    .payment-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .order-item-controls { grid-template-columns: 1fr; }
    .order-cart {
        top: 8px;
        max-height: 40vh;
    }
    .payment-form-grid { grid-template-columns: 1fr; }
    .payment-panel-head,
    .payment-progress-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .payment-panel-note { text-align: left; }
    .check-summary-grid,
    .check-form-grid { grid-template-columns: 1fr; }
}
.admin-grid-2up { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.admin-stats-grid { grid-template-columns: repeat(3, 1fr); }
.admin-counts-compact {
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
}
.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}
.admin-filters label,
.visit-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}
.admin-filters select,
.visit-grid select,
.visit-grid input {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    color: var(--fg);
    background: #fff;
}
.admin-histograms {
    padding: 0;
    max-width: none;
    margin: 0;
    display: block;
}
.hist-card {
    background: var(--surface-alt, #faf9f7);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.hist-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.3;
}
.hist-card .hist-meta {
    font-size: 12px;
    color: var(--muted);
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.hist-empty {
    color: var(--muted);
    font-style: italic;
    font-size: 13px;
    padding: 20px 16px;
    background: var(--surface-alt, #faf9f7);
    border: 1px dashed var(--border);
    border-radius: 8px;
    text-align: center;
    grid-column: 1 / -1;
}
/* Vertical bar chart inside each .hist-card */
.vbar-chart {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 6px;
    align-items: stretch;
    margin-top: 2px;
}
.vbar-y-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: center;
    justify-self: center;
}
.vbar-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-height: 200px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.vbar-col {
    flex: 1 1 auto;
    min-width: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.vbar-value {
    font-size: 10px;
    color: var(--muted);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-weight: 600;
    min-height: 12px;
}
.vbar-track {
    position: relative;
    width: 100%;
    max-width: 36px;
    /* height is set inline via style="height:180px" */
    display: flex;
    align-items: flex-end;
}
.vbar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--accent, #e3bf3d) 0%, #b8922a 100%);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.3s ease-out;
}
.vbar-label {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    margin-top: 4px;
    white-space: nowrap;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.vbar-x-label {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    padding-left: 30px;
}

/* QR preview inside the Door QR admin card (issue #50 bug 7) */
.qr-preview-block {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px;
    background: var(--surface-alt, #faf9f7);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
}
.qr-preview {
    width: 160px;
    height: 160px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    flex-shrink: 0;
}
.qr-matrix {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.qr-matrix-row {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
}
.qr-matrix-cell {
    flex: 1 1 auto;
    height: 100%;
}
.qr-matrix-cell.on { background: #000; }
.qr-matrix-cell.off { background: #fff; }
.qr-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.qr-target-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.qr-target-url {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--fg);
    word-break: break-all;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.qr-download-link {
    align-self: flex-start;
    font-size: 13px;
    color: var(--accent-dark, #b45309);
    text-decoration: none;
    padding: 6px 0;
}
.qr-download-link:hover { text-decoration: underline; }
.qr-preview-link {
    display: inline-block;
    line-height: 0;
    border-radius: 8px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.qr-preview-link:hover { box-shadow: 0 0 0 3px var(--accent-dark, #b45309); transform: translateY(-1px); }
.qr-preview-link:focus-visible { outline: 2px solid var(--accent-dark, #b45309); outline-offset: 2px; }
.qr-preview-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) {
    .qr-preview-block { flex-direction: column; align-items: center; text-align: center; }
    .qr-preview-meta { align-items: center; }
    .qr-target-url { width: 100%; text-align: center; }
}
.host-settings-panel {
    display: grid;
    gap: 16px;
}
.host-settings-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.host-settings-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}
.host-settings-card p {
    margin: 0 0 14px;
    color: var(--muted);
}
.host-settings-card .qr-preview-block {
    margin-bottom: 0;
}
.host-settings-note {
    color: var(--muted);
    font-size: 14px;
}
.host-account-name {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
}
.host-account-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
    text-transform: capitalize;
}
.admin-counts { flex-wrap: wrap; }
.admin-actions-row {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-actions-row button.primary {
    width: auto;
    min-width: 180px;
    margin: 0;
}
table {
    width: 100%; background: #fff;
    border-collapse: separate; border-spacing: 0;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #fafaf9; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
tr:last-child td { border-bottom: none; }
tr:hover { background: var(--row-hover); }
td.num { font-weight: 700; color: var(--fg); font-size: 18px; width: 56px; }
td.size { text-align: center; width: 60px; }
td.phone { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); width: 80px; }
td.eta { width: 100px; font-weight: 600; }
td.wait { width: 90px; color: var(--muted); }
td.actions { min-width: 340px; text-align: right; white-space: nowrap; }
/* Host waiting-table actions — on narrow viewports (phone + iPad-portrait),
   hide the icon-only "more" buttons (custom SMS + custom Call). Their
   functionality overlaps Chat/Call which remain visible. No-show becomes
   a text-only tertiary so hosts can reach it without scrolling. */
@media (max-width: 900px) {
    .host td.actions button.more-btn { display: none; }
    .host td.actions { min-width: 0; }
    .host table.waiting-table,
    .host #tab-waiting table { font-size: 13px; }
}
/* Final safety net: if the table is still wider than its container at any
   breakpoint, let the tab-content container scroll horizontally rather than
   force the whole page to scroll. */
.host .tab-content { overflow-x: auto; }
tr.row-called td { background: #fff8e1; }
.badge-called {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
button.call-btn {
    background: #111; color: #fff;
    border: 1px solid #111;
    padding: 10px 14px; border-radius: 8px;
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; margin-right: 6px;
}
button.call-btn:hover { background: #333; }
button.remove {
    background: #fff; color: var(--danger);
    border: 1px solid var(--danger);
    padding: 10px 14px; border-radius: 8px;
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; margin-left: 6px;
}
button.remove:hover { background: var(--danger); color: #fff; }
/* ---------- Stats card ---------- */
.stats-card {
    margin: 16px 24px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.stats-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    min-height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: 0.3px;
}
.stats-toggle:hover { background: var(--surface-alt); }
.stats-toggle-arrow {
    font-size: 12px;
    color: var(--muted);
    transition: transform 0.2s;
}
.stats-card.collapsed .stats-toggle-arrow { transform: rotate(-90deg); }
.stats-body {
    padding: 0 20px 18px;
    transition: max-height 0.25s ease, padding 0.25s ease;
    max-height: 300px;
    overflow: hidden;
}
.stats-card.collapsed .stats-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.stat-item {
    text-align: center;
    padding: 10px 6px;
    background: var(--surface-alt);
    border-radius: 8px;
}
.stat-item-wide {
    grid-column: 1 / -1;
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.2;
}
.stat-vs {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
}
.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-top: 4px;
}
.stats-empty {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 12px 0;
    margin: 0;
}
.caller-stats-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.caller-stats-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.caller-range-group {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
}
.caller-range-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    min-height: 40px;
}
.caller-range-btn.is-active {
    background: var(--accent);
    color: var(--accent-fg);
}
.caller-coverage-note,
.caller-inline-state {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.caller-inline-state {
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: #fafaf9;
}
.caller-funnel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.caller-funnel-card,
.caller-detail-card,
.caller-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.caller-funnel-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}
.caller-kicker {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.caller-funnel-card strong,
.caller-detail-metrics strong {
    font-size: 30px;
    line-height: 1;
    color: var(--fg);
}
.caller-funnel-card span:last-child {
    color: var(--muted);
    font-size: 13px;
}
.caller-stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 14px;
}
.caller-panel,
.caller-detail-card {
    padding: 16px;
}
.caller-panel-wide {
    grid-column: 1 / -1;
}
.caller-panel-head h3,
.caller-detail-card h3 {
    margin: 0;
    font-size: 18px;
}
.caller-panel-head p,
.caller-detail-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.caller-detail-intro {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.caller-outcome-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.caller-outcome-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafaf9;
    color: var(--fg);
    font: inherit;
    cursor: pointer;
}
.caller-outcome-chip.is-active {
    border-color: var(--accent);
    background: #fff7db;
}
.caller-outcome-chip span {
    font-size: 13px;
    color: var(--muted);
}
.caller-outcome-chip strong {
    font-size: 18px;
}
.caller-detail-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 14px;
}
.caller-detail-metrics div {
    padding: 12px;
    border-radius: 10px;
    background: #fafaf9;
}
.caller-detail-metrics span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}
.caller-choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.caller-choice-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafaf9;
}
.caller-choice-row strong {
    font-size: 18px;
}
.caller-choice-row em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}
.caller-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}
.caller-table td,
.caller-table th {
    white-space: nowrap;
}
.caller-table-empty {
    text-align: center;
    color: var(--muted);
    padding: 18px 14px;
}
.caller-session-row {
    cursor: pointer;
}
.caller-session-row:hover td,
.caller-session-row:focus-visible td,
.caller-session-row.is-active td {
    background: #fff7db;
}
.caller-session-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.caller-journey-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.caller-journey-step {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafaf9;
}
.caller-journey-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--fg);
}
.caller-journey-copy {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}
@media (max-width: 600px) {
    .stats-card { margin: 12px 12px 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 22px; }
    .admin-grid-2up { grid-template-columns: 1fr; }
    .admin-filters { grid-template-columns: 1fr; }
    .admin-main { padding: 16px; }
    .admin-topbar { align-items: stretch; }
    .admin-actions { width: 100%; margin-left: 0; }
    .admin-actions .logout { flex: 1; text-align: center; }
    .admin-counts-compact { width: 100%; justify-content: space-between; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .visit-grid { grid-template-columns: 1fr; }
    .admin-actions-row { flex-direction: column; align-items: stretch; }
    .admin-actions-row button.primary { width: 100%; min-width: 0; }
    .caller-funnel-grid { grid-template-columns: repeat(2, 1fr); }
    .caller-stats-grid { grid-template-columns: 1fr; }
    .caller-range-group { width: 100%; justify-content: space-between; }
    .caller-range-btn { flex: 1; padding-inline: 10px; }
    .caller-outcome-chip { min-width: 0; width: 100%; }
    .caller-choice-row { grid-template-columns: 1fr auto; }
    .caller-choice-row em { grid-column: 1 / -1; }
    .caller-journey-step { grid-template-columns: 1fr; }
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.tab {
    padding: 12px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    min-height: 44px;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); border-bottom-color: var(--accent); }
.tab-badge {
    display: inline-block;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 4px;
}
.tab.active .tab-badge { background: var(--accent); color: var(--accent-fg); }
.tab-badge-warn { background: var(--danger, #ef4444); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- State badges ---------- */
.state-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.state-seated { background: #dbeafe; color: #1e40af; }
.state-ordered { background: #fef3c7; color: #854d0e; }
.state-served { background: #d1fae5; color: #065f46; }
.state-checkout { background: #ede9fe; color: #5b21b6; }
.state-departed { background: #f3f4f6; color: #6b7280; }
.state-no_show { background: #fee2e2; color: #b91c1c; }

/* ---------- Dining action buttons ---------- */
button.advance-btn {
    background: #111; color: #fff;
    border: 1px solid #111;
    padding: 8px 14px; border-radius: 8px;
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; margin-right: 6px;
}
button.advance-btn:hover { background: #333; }
button.depart-btn {
    background: #fff; color: var(--muted);
    border: 1px solid var(--border);
    padding: 8px 14px; border-radius: 8px;
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; margin-left: 4px;
}
button.depart-btn:hover { background: var(--surface-alt); }

/* ---------- Timeline detail ---------- */
.timeline-detail {
    padding: 12px 24px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
}
.timeline-detail .timeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted);
}
.timeline-detail .timeline-step .timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.timeline-detail .timeline-step .timeline-label {
    font-weight: 600;
    color: var(--fg);
    min-width: 80px;
}
.timeline-detail .timeline-step .timeline-time {
    color: var(--muted);
}
tr.expandable { cursor: pointer; }
tr.expandable:hover { background: var(--surface-alt); }

/* ---------- Complete tab summary ---------- */
.complete-summary {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--muted);
}
.complete-summary strong { color: var(--fg); }
.completed-name-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.completed-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--muted);
}
.completed-context span {
    white-space: nowrap;
}
.completed-actions {
    min-width: 280px;
}
.completed-recoverable-row {
    background: rgba(251, 191, 36, 0.08);
}
.completed-restore-btn {
    white-space: nowrap;
}

.empty { text-align: center; color: var(--muted); padding: 40px; }
/* Polished admin login card. Two sign-in paths (PIN, email+password);
   the body carries a subtle wordmark, the swap link is saffron-accented,
   and the two blocks stack with a soft divider so mode changes feel
   intentional instead of replace-in-place. */
.login-card {
    max-width: 420px;
    margin: 96px auto 40px;
    padding: 32px 28px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.login-card h2 {
    font-size: 24px;
    letter-spacing: 0.3px;
    margin: 0 0 4px;
}
.login-card .login-wordmark-sub {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.login-card label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.login-card input[type="password"],
.login-card input[type="email"],
.login-card input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    box-sizing: border-box;
}
.login-card input:focus {
    outline: none;
    border-color: var(--accent, #c0872e);
    box-shadow: 0 0 0 3px rgba(192, 135, 46, 0.15);
}
.login-card .primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 16px;
    border-radius: 8px;
}
.login-card .error {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
}
.login-card .login-swap-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}
.login-card .login-swap-link a {
    color: var(--accent, #c0872e);
    text-decoration: none;
    font-weight: 600;
}
.login-card .login-swap-link a:hover { text-decoration: underline; }

/* ============================================================================
   Issue #37 — waitlist transparency, host chat/call, table on seat
   ============================================================================ */

/* ---------- Diner: FOUC guard ---------------------
   Before queue.js decides which card to show, keep all three cards hidden
   so a deep-link arrival doesn't flash the join form for ~500ms on top of
   a seated/called user. queue.js removes .queue-boot once loadStatus
   returns, and from that point forward individual card visibility is
   managed via style.display on each card element. */
body.queue-boot main > .queue-tabs,
body.queue-boot .queue-panel > .card,
body.queue-boot .queue-panel > .public-list { visibility: hidden; }
/* Tiny in-card spinner shown during the first-load flicker window so the
   page isn't visually empty. Positioned absolutely so it doesn't reserve
   layout space. */
body.queue-boot::before {
    content: "Loading…";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: var(--muted);
    font-family: inherit;
    pointer-events: none;
}

/* ---------- Host stand: Visit Page admin card ---------- */
.visit-mode-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
}
.visit-mode-badge.mode-closed {
    background: rgba(185, 28, 28, 0.12);
    color: var(--danger);
    border-color: rgba(185, 28, 28, 0.35);
}
.visit-mode-badge.mode-menu {
    background: rgba(227, 191, 61, 0.15);
    color: var(--accent-dark);
    border-color: rgba(227, 191, 61, 0.4);
}
.visit-mode-badge.mode-queue {
    background: rgba(21, 128, 61, 0.12);
    color: var(--ok);
    border-color: rgba(21, 128, 61, 0.35);
}
.visit-body { padding: 16px 20px 20px; }
.visit-help {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.visit-help code {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--fg);
}
.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 14px;
}
.visit-field { display: flex; flex-direction: column; gap: 4px; }
.visit-field-full { grid-column: 1 / -1; }
.guest-feature-grid { align-items: start; }
.guest-feature-field {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafaf9;
}
.guest-feature-help {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}
.floor-plan-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}
.floor-plan-help {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.floor-plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.floor-plan-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 120px 120px auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafaf9;
}
.floor-plan-row .visit-field {
    margin: 0;
}
.floor-plan-row .admin-danger {
    min-height: 40px;
    white-space: nowrap;
}
.visit-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}
.visit-field select,
.visit-field input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--fg);
    width: 100%;
}
.visit-field select:focus,
.visit-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.18);
}
.visit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.visit-status {
    font-size: 12px;
    color: var(--muted);
    transition: color 0.2s;
}
.visit-status.success { color: var(--ok); }
.visit-status.error { color: var(--danger); }
.visit-actions button.primary {
    width: auto;
    margin: 0;
    min-height: 36px;
    padding: 8px 18px;
    font-size: 13px;
}

/* Small metadata pill (e.g. "19 / 30") that floats to the right of the
   visit-label. Issue #69 messaging tab; reusable elsewhere if a field
   needs an inline character counter or hint. */
.visit-label-meta {
    float: right;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--muted);
}
.visit-label-meta.over-limit { color: var(--danger); font-weight: 600; }

/* Hint text shown under a visit-field input, smaller and lighter than the
   field content. */
.visit-hint {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

/* ---------- Messaging tab SMS preview (issue #69) ---------- */
.sms-preview {
    background: #f5f3ee;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}
.sms-preview-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 12px;
}
.sms-preview-bubble {
    max-width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
}
.sms-preview-bubble + .sms-preview-bubble { margin-top: 8px; }
.sms-preview-from {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}
.sms-preview-sender { font-weight: 600; color: var(--fg); }
.sms-preview-body { word-break: break-word; }

/* Responsive: collapse admin tabs on narrow viewports so the admin surface
   doesn't overflow horizontally on a phone. Generic collapse — affects
   all admin panels, not just messaging. */
@media (max-width: 720px) {
    .admin-tabs-workspace {
        flex-wrap: wrap;
        gap: 4px;
    }
    .visit-grid {
        grid-template-columns: 1fr;
    }
    .sms-preview-bubble {
        max-width: 100%;
    }
}

/* ---------- Host admin: location & hours subsections (issue #45) ---------- */
.visit-subhead {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 0 10px;
    border-top: 1px dashed var(--border);
    padding-top: 16px;
}
.visit-sub-help {
    color: var(--muted);
    font-weight: normal;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}
.visit-address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 120px 160px;
    gap: 12px;
    margin-bottom: 4px;
}
.visit-field-small input { max-width: 120px; }
.visit-hours-grid {
    display: grid;
    gap: 6px;
    margin-bottom: 4px;
}
.visit-hours-row {
    display: grid;
    grid-template-columns: 110px 80px minmax(0, 1fr) 110px;
    gap: 12px;
    align-items: start;
    padding: 6px 0;
    border-bottom: 1px dotted var(--border);
}
.visit-hours-day { font-weight: 600; font-size: 13px; }
.visit-hours-closed-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
}
.visit-hours-window {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}
.visit-hours-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}
.visit-hours-actions {
    display: flex;
    justify-content: flex-end;
}
.visit-hours-copy-btn,
.wiz-hours-copy {
    white-space: nowrap;
}
.visit-hours-window span {
    width: 70px;
    text-align: right;
    color: var(--fg);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
}
.visit-hours-window input[type="time"] {
    width: 90px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg);
    color: var(--fg);
    font-size: 12px;
}
.visit-hours-window input[type="time"]:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
@media (max-width: 900px) {
    .visit-address-grid { grid-template-columns: 1fr 1fr; }
    .visit-hours-row {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }
    .visit-hours-day { grid-column: 1; }
    .visit-hours-closed-label { grid-column: 1; }
    .visit-hours-services { grid-template-columns: 1fr; }
    .visit-hours-actions { justify-content: flex-start; }
    .visit-hours-window { flex-wrap: wrap; }
    .visit-hours-window input[type="time"] { width: 72px; }
    .visit-hours-window span { width: 72px; text-align: left; }
    .floor-plan-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .floor-plan-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .floor-plan-row { grid-template-columns: 1fr; }
}

/* ---------- Diner: seated terminal card ---------- */
.seated-caption {
    margin-top: 6px;
    font-size: 15px;
    color: var(--muted);
    font-style: italic;
}
.is-seated .pos { color: var(--ok); }

/* State-flip pulse — fires when the diner's status transitions into 'called'
   so a user whose phone just woke up has an obvious visual that something
   changed. 1.2s, 3 pulses, then back to normal. */
@keyframes skb-state-flip {
    0%   { box-shadow: 0 0 0 0 rgba(227,191,61,0.55); }
    40%  { box-shadow: 0 0 0 12px rgba(227,191,61,0); }
    100% { box-shadow: 0 0 0 0 rgba(227,191,61,0); }
}
.state-flip {
    animation: skb-state-flip 1.2s ease-out 3;
}

/* ---------- Diner: live waiting counter + public list ---------- */
.wait-elapsed {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
}
.wait-elapsed strong {
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}
.public-list {
    margin-top: 14px;
    padding: 16px;
}
.public-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.public-list-heading strong { color: var(--fg); }
.public-list-sub { font-size: 12px; }
.public-list-rows { display: flex; flex-direction: column; }
.pqr {
    display: grid;
    /* Tight tracks — the name column (1fr) needs the most room on narrow
       phones. `minmax(0, 1fr)` lets the track actually shrink past its
       content-min-size so an overflowing long name doesn't steal width from
       the other columns. */
    grid-template-columns: 28px minmax(0, 1fr) 26px 58px 52px;
    gap: 6px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--divider);
    font-size: 14px;
}
.pqr:last-child { border-bottom: none; }
.pqr-pos { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.pqr-name {
    font-weight: 600;
    /* Let the name wrap if needed rather than eliding the "(you)" marker. */
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.pqr-size { color: var(--muted); font-variant-numeric: tabular-nums; }
.pqr-eta { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }
.pqr-wait { color: var(--fg); font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; font-size: 13px; }
.pqr-me {
    background: rgba(227, 191, 61, 0.08);
    border-left: 3px solid var(--accent);
    padding-left: 4px;
    margin-left: -7px;
    border-radius: 4px;
}
.pqr-you {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 12px;
}
.public-list-footer {
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

/* ============================================================================
   Host row actions — one consistent button system
   ============================================================================
   All buttons in a waiting-row action cell share the same height / border /
   font. Only the *color* differentiates them (primary seat, secondary
   neutrals, quiet danger). No more gold "new" outline — the buttons sit as
   peers, which matches the spec's intent of Chat/Call being additive, not
   attention-grabbing. */
.host td.actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    padding-right: 14px;
}
.host td.actions button,
.host td.actions a.rowbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 36px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--fg);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    /* override form-button defaults (margin-top etc.) */
    margin: 0;
    min-height: 0;
    width: auto;
    line-height: 1;
}
.host td.actions button:hover,
.host td.actions a.rowbtn:hover {
    background: var(--surface-alt);
    border-color: #d4d4d4;
}
.host td.actions button[disabled],
.host td.actions a.rowbtn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary action: Seat. Black fill, gold on hover. */
.host td.actions button.seat-btn {
    background: #111;
    color: #fff;
    border-color: #111;
}
.host td.actions button.seat-btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #111;
}

/* Notify uses the neutral baseline. `.row-called` flips the label to
   "Re-notify" in JS; we emphasize it slightly with a warning tone so the
   host sees at a glance who still hasn't turned up. */
.host tr.row-called td.actions button.notify-btn {
    background: var(--accent);
    border-color: var(--accent-dark);
    color: var(--accent-fg);
}

/* Chat + Call: neutral peers. Chat carries the unread dot; Call is an
   anchor (<a>) that opens the device dialer via tel:. */
.host td.actions a.call-dial-btn::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 2px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.35 1.9.65 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.3 1.85.52 2.81.65A2 2 0 0 1 22 16.92z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.35 1.9.65 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.3 1.85.52 2.81.65A2 2 0 0 1 22 16.92z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}
.host td.actions button.chat-btn::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 2px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* Custom SMS / Custom Call are "more" actions — icon-only square buttons
   to keep the row tight. Tooltip provides the labeled meaning. */
.host td.actions button.more-btn {
    width: 36px;
    padding: 0;
    font-size: 15px;
    color: var(--muted);
}
.host td.actions button.more-btn:hover {
    color: var(--fg);
    background: var(--surface-alt);
}

/* No-show sits visually quieter — text-only tertiary so it never competes
   with the primary Seat action at a glance. */
.host td.actions button.remove {
    background: transparent;
    border-color: transparent;
    color: var(--danger);
    padding: 0 8px;
}
.host td.actions button.remove:hover {
    background: rgba(185, 28, 28, 0.08);
    border-color: transparent;
}

.badge-on-way {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(21, 128, 61, 0.12);
    color: var(--ok);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}
.sentiment-badge.sentiment-happy {
    background: #dcfce7;
    color: #166534;
}
.sentiment-badge.sentiment-neutral {
    background: #fef3c7;
    color: #92400e;
}
.sentiment-badge.sentiment-upset {
    background: #fee2e2;
    color: #b91c1c;
}
.sentiment-emoji {
    line-height: 1;
}
.sentiment-select {
    height: 36px;
    min-width: 108px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--fg);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}
.sentiment-select:hover {
    border-color: #d4d4d4;
}
.sentiment-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
.unread-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: content-box;
}

/* ---------- Seated + Complete tabs: per-transition duration columns ----------
   These columns show the time between state transitions as small, right-
   aligned numeric cells. Filled cells render in the normal foreground
   color; unfilled cells render dimmed so the row still visually aligns
   without drawing attention to data that isn't there yet. */
th.transit {
    font-size: 10px;
    text-align: right;
    width: 72px;
    letter-spacing: 0.04em;
}
td.transit-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    width: 72px;
    padding-right: 12px;
}
td.transit-cell.filled {
    color: var(--fg);
    font-weight: 600;
}
td.transit-cell.empty {
    color: var(--border);
}

/* Tighter table padding on the dining/completed tabs so the extra
   transition columns don't push the actions cell off-screen at 1280. */
.host .dining-table th,
.host .dining-table td,
.host .completed-table th,
.host .completed-table td {
    padding-left: 10px;
    padding-right: 10px;
}

/* Seated tab table-number column */
td.table-num {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 60px;
    color: var(--accent-dark);
}
.seated-workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.seated-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.seated-head h2 {
    margin: 0;
    font-size: 22px;
}
.seated-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 720px;
}
.seated-view-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-alt);
}
.seated-view-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 9px;
    cursor: pointer;
}
.seated-view-btn.is-active {
    background: #111;
    color: #fff;
}
.seated-view[hidden] {
    display: none !important;
}
.operations-layout-single {
    grid-template-columns: 1fr;
}

/* ---------- Seat Party dialog ---------- */
.seat-dialog {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    width: 440px;
    max-width: 92vw;
    box-shadow: var(--shadow-md);
    background: var(--card);
    color: var(--fg);
}
.seat-dialog::backdrop { background: rgba(0,0,0,0.5); }
.seat-dialog form { padding: 0; margin: 0; }
.seat-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
}
.seat-dialog-header h2 { margin: 0; font-size: 18px; }
.seat-dialog-close {
    background: transparent; border: none; font-size: 24px;
    color: var(--muted); cursor: pointer; line-height: 1;
}
.seat-dialog-party {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 14px 20px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--divider);
}
.seat-dialog-party .k {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.seat-dialog-party .v {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-top: 2px;
}
.seat-dialog-label {
    display: block;
    margin: 16px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
/* input.seat-dialog-input raises specificity above the global
   `input[type=number]` rule at line 110 so width / padding / font-size
   are honored (otherwise the input overflows the modal). */
input.seat-dialog-input {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: 'Fira Sans', sans-serif;
    background: var(--bg);
    color: var(--fg);
    box-sizing: border-box;
}
input.seat-dialog-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.25);
}
.seat-dialog-chips-label {
    margin: 12px 20px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.seat-dialog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 20px;
    min-height: 32px;
}
.seat-dialog-chips .chip {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.seat-dialog-chips .chip-occupied {
    opacity: 0.5;
    text-decoration: line-through;
    cursor: not-allowed;
}
.seat-dialog-alert {
    margin: 10px 20px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid rgba(185, 28, 28, 0.35);
    color: var(--danger);
    font-size: 13px;
}
.seat-dialog-alert .override-btn {
    margin-left: 8px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.seat-dialog-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    margin-top: 14px;
    border-top: 1px solid var(--divider);
}
.operations-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}
.operations-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.operations-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.operations-head h2,
.check-section h3 {
    margin: 0;
    font-size: 18px;
}
.operations-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.operations-floor-meta {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}
.operations-floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.operations-table-tile {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.operations-table-tile.available { background: #f0fdf4; }
.operations-table-tile.checkout { background: #fff7ed; }
.operations-table-tile.paid { background: #eff6ff; }
.operations-table-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg);
}
.operations-table-meta,
.operations-closeout-sub,
.check-muted {
    color: var(--muted);
    font-size: 13px;
}
.operations-closeout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.operations-closeout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.operations-closeout-stat {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    padding: 12px;
}
.operations-closeout-label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.operations-closeout-value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}
@media (max-width: 900px) {
    .operations-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .operations-head {
        flex-direction: column;
        align-items: stretch;
    }
    .seated-head {
        flex-direction: column;
        align-items: stretch;
    }
    .operations-head .secondary {
        align-self: flex-start;
    }
    .operations-closeout-grid {
        grid-template-columns: 1fr;
    }
}
.check-dialog-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 72vh;
    overflow: auto;
}
.check-summary-grid,
.check-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.check-summary-stat,
.check-line,
.check-split,
.check-payment {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}
.check-summary-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.check-summary-value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}
.check-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.check-lines,
.check-splits,
.check-payments {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.check-line,
.check-split,
.check-payment {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.check-split.selected,
.check-payment.selected {
    border-color: var(--accent);
    background: #fff9ea;
}
.check-actions-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.check-actions-row .primary,
.check-actions-row .secondary,
.check-actions-row .admin-danger {
    width: auto;
    margin: 0;
}

/* Quiet, well-shaped Cancel button. Pairs with .primary inside dialog
   footers — keeps the footer balanced without competing for attention.
   Bordered ghost over surface-alt so it reads as "secondary, dismissive",
   not "wimpy default <button>". */
button.dialog-cancel,
.seat-dialog-footer button[type="button"]:not(.primary):not(.dialog-cancel) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    background: var(--surface-alt, #f6f3ec);
    color: var(--fg);
    border: 1px solid var(--border, #d8d2c2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
button.dialog-cancel:hover,
.seat-dialog-footer button[type="button"]:not(.primary):not(.dialog-cancel):hover {
    border-color: var(--accent, #c0872e);
    color: var(--accent, #c0872e);
    background: #fffdf7;
}
button.dialog-cancel:active { background: #fdf6e4; }
button.dialog-cancel:focus-visible {
    outline: 2px solid var(--accent, #c0872e);
    outline-offset: 2px;
}

/* ---------- Custom SMS dialog ---------- */
.custom-sms-dialog,
.custom-call-dialog {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    width: 480px;
    max-width: 92vw;
    box-shadow: var(--shadow-md);
    background: var(--card);
    color: var(--fg);
}
.custom-sms-dialog::backdrop,
.custom-call-dialog::backdrop { background: rgba(0,0,0,0.5); }
.custom-sms-dialog form,
.custom-call-dialog form { padding: 0; margin: 0; }
.custom-sms-to {
    padding: 14px 20px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.custom-sms-to .k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.custom-sms-to .v {
    font-size: 16px;
    font-weight: 700;
}
.custom-sms-to .v-phone {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--muted);
    font-size: 13px;
}
textarea.custom-sms-textarea {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    min-height: 96px;
    background: var(--bg);
    color: var(--fg);
    box-sizing: border-box;
}
textarea.custom-sms-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.25);
}
.custom-sms-charcount {
    margin: 6px 20px 0;
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- Custom Call dialog ---------- */
.custom-call-body {
    padding: 20px 24px;
    text-align: center;
}
.custom-call-body strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}
.custom-call-phone {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 14px;
}
.custom-call-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}
a#custom-call-confirm.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    text-decoration: none;
    background: #111;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}
a#custom-call-confirm.primary:hover { background: var(--accent-dark); color: var(--accent-fg); }
a#custom-call-confirm[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Chat drawer ---------- */
.chat-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 50;
}
.chat-drawer-backdrop.open { display: block; }
.chat-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    z-index: 60;
    transform: translateX(100%);
    transition: transform 0.2s ease;
}
.chat-drawer[hidden] { display: none; }
.chat-drawer.open { transform: translateX(0); }
.chat-drawer-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-drawer-who { font-weight: 700; }
.chat-drawer-who small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}
.chat-drawer-mode {
    margin: 12px 18px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.chat-drawer-close {
    background: transparent;
    border: none;
    font-size: 26px;
    color: var(--muted);
    cursor: pointer;
}
.chat-drawer-thread {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-empty {
    color: var(--muted);
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
.chat-msg {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.35;
}
.chat-msg .chat-ts {
    display: block;
    font-size: 10px;
    margin-top: 4px;
}
.chat-msg-in {
    align-self: flex-start;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-msg-in .chat-ts { color: var(--muted); }
.chat-msg-out {
    align-self: flex-end;
    background: var(--accent);
    color: var(--accent-fg);
    border-bottom-right-radius: 4px;
}
.chat-msg-out .chat-ts { color: rgba(17,17,17,0.6); }
.chat-status-ok { color: var(--ok); }
.chat-status-fail { color: var(--danger); }
.chat-status-note { color: inherit; font-weight: 600; }
.chat-drawer-quicks {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--divider);
    flex-wrap: wrap;
}
.chat-drawer-quicks button {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}
.chat-drawer-composer {
    display: flex;
    gap: 8px;
    padding: 12px 14px 16px;
    border-top: 1px solid var(--divider);
}
.chat-drawer-composer input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
}
.chat-drawer-composer button {
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .chat-drawer { width: 100vw; }
}

/* ============================================================================
   Theme toggle button — appears in topbars / diner header.
   ============================================================================ */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    padding: 0;
}
.theme-toggle-btn:hover {
    background: var(--surface-alt);
    border-color: var(--accent);
}
.diner header .theme-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.diner header .theme-toggle-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: var(--accent);
    color: var(--accent);
}
@media (max-width: 360px) {
    .diner header .theme-toggle-btn { width: 28px; height: 28px; font-size: 12px; }
}
.diner header { position: relative; }

/* SMS consent checkbox under the join form — Twilio TFV 30513 requires
   that SMS consent NOT be a prerequisite for the waitlist service. The
   checkbox is unchecked by default and optional; diners can still join
   without opting in and use the live-updating status card. */
.sms-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #4d4c4c;
    margin-top: 10px;
    padding: 10px 12px;
    background: #faf5e8;
    border: 1px solid #eadfbf;
    border-radius: 6px;
    cursor: pointer;
}
.sms-consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent-dark, #b45309);
    cursor: pointer;
}
.sms-consent-checkbox strong { font-weight: 700; color: #2a2a2a; }
.sms-consent-checkbox a {
    color: var(--accent-dark, #b45309);
    text-decoration: underline;
}
.sms-consent-note {
    font-size: 11px;
    color: #6d6660;
    margin-top: 6px;
    line-height: 1.4;
    font-style: italic;
}
.theme-dark .sms-consent-checkbox {
    background: rgba(244, 207, 75, 0.06);
    border-color: rgba(244, 207, 75, 0.25);
    color: var(--muted);
}
.theme-dark .sms-consent-checkbox strong { color: var(--fg); }
.theme-dark .sms-consent-note { color: var(--muted); }

/* Host login-view toggle — floats top-right of the full-bleed login view
   (there's no topbar until after authentication). */
#login-view { position: relative; }
.login-theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
}

/* ============================================================================
   Dark mode — activated by `.theme-dark` class on <html>.
   theme.js handles prefers-color-scheme + manual toggle + localStorage.
   ============================================================================ */
.theme-dark {
    color-scheme: dark;
    --bg: #0b0b0c;
    --fg: #f4f4f5;
    --muted: #b4b4bb;
    --accent: #f4cf4b;
    --accent-dark: #e3bf3d;
    --accent-fg: #111111;
    --card: #1e1e24;
    --border: #3a3a42;
    --divider: #27272e;
    --surface-alt: #141418;
    --ok: #4ade80;
    --danger: #f87171;
    --row-hover: #26262d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
    --shadow-md: 0 8px 24px rgba(0,0,0,.7);
}

/* Diner header: keep dark-on-dark with slightly warmer black */
.theme-dark .diner { background: var(--bg); }
.theme-dark .diner header {
    background: #000;
    color: #fff;
}
.theme-dark .diner header .sub { color: #8a857a; }
.theme-dark .card {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.theme-dark .status .line-len { color: var(--fg); }
.theme-dark .card .line-len,
.theme-dark .card h1,
.theme-dark .card h2,
.theme-dark .card h3 { color: var(--fg); }
.theme-dark input,
.theme-dark textarea,
.theme-dark select {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}
.theme-dark input::placeholder,
.theme-dark textarea::placeholder { color: var(--muted); }
.theme-dark button.primary { background: var(--accent); color: var(--accent-fg); }
.theme-dark button.primary:hover { background: var(--accent-dark); }
.theme-dark button.secondary { background: var(--surface-alt); color: var(--fg); border-color: var(--border); }
.theme-dark button.secondary:hover { background: var(--card); border-color: var(--accent); color: var(--accent); }
.theme-dark button.secondary:active { background: var(--card); }

/* Chat bubbles — warmer palette so the host bubble doesn't disappear into
   the card bg. Soft warm-neutral for host (brand-tinted), saffron glow for me. */
.theme-dark .chat-row.from-host .chat-bubble {
    background: #3d3630;
    color: #f5ead1;
    border-color: #4f463d;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.theme-dark .chat-row.from-me .chat-bubble {
    background: var(--accent);
    color: var(--accent-fg);
    box-shadow: 0 2px 8px rgba(244, 207, 75, 0.25);
}
.theme-dark .chat-row.from-me .chat-meta { color: #b8a57f; }
.theme-dark .chat-row.from-host .chat-meta { color: var(--muted); }
.theme-dark .chat-thread { background: transparent; }
.theme-dark .chat-head { color: var(--muted); }
.theme-dark .chat-form input[type="text"] {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .chat-form input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(244, 207, 75, 0.22);
}
.theme-dark .order-section-nav {
    background: linear-gradient(to bottom, rgba(20,20,24,0.98), rgba(20,20,24,0.92));
}
.theme-dark .order-section-link {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .order-section-link-cart {
    background: rgba(244, 207, 75, 0.16);
    border-color: rgba(244, 207, 75, 0.28);
}
.theme-dark .queue-tabs {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .queue-tab {
    color: var(--muted);
}
.theme-dark .queue-tab.is-active {
    background: var(--accent);
    color: var(--accent-fg);
}
.theme-dark .order-item-card,
.theme-dark .order-cart,
.theme-dark .host-order-detail {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .payment-panel,
.theme-dark .payment-progress,
.theme-dark .payment-stat,
.theme-dark .payment-line,
.theme-dark .payment-split,
.theme-dark .seated-view-toggle {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .payment-guidance {
    background: linear-gradient(135deg, rgba(244, 207, 75, 0.12) 0%, rgba(30, 30, 36, 0.96) 100%);
    border-color: rgba(244, 207, 75, 0.24);
}
.theme-dark .payment-guidance-title {
    color: #fde68a;
}
.theme-dark .payment-progress-bar {
    background: #2c2c33;
}
.theme-dark .payment-progress-callout {
    background: rgba(244, 207, 75, 0.1);
    border-color: rgba(244, 207, 75, 0.2);
}
.theme-dark .payment-progress-callout.is-paid {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.2);
}
.theme-dark .payment-split.selected {
    background: rgba(244, 207, 75, 0.14);
    border-color: rgba(244, 207, 75, 0.42);
    box-shadow: 0 0 0 3px rgba(244, 207, 75, 0.12);
}
.theme-dark .payment-split.is-paid {
    background: rgba(74, 222, 128, 0.08);
}
.theme-dark .payment-split-status.open {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}
.theme-dark .payment-split-status.paid {
    background: rgba(34, 197, 94, 0.22);
    color: #bbf7d0;
}
.theme-dark .payment-departure-note,
.theme-dark .payment-panel-note {
    color: var(--muted);
}
.theme-dark .seated-view-btn {
    color: var(--muted);
}
.theme-dark .seated-view-btn.is-active {
    background: var(--accent);
    color: var(--accent-fg);
}
.theme-dark .order-tag,
.theme-dark .order-item-image-empty,
.theme-dark .order-options label {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}

/* Renotify banner stays vivid in dark mode */
.theme-dark .renotify-banner { color: #fff; }

/* Host stand */
.theme-dark.host,
.theme-dark .host { background: var(--bg); }
.theme-dark .topbar {
    background: var(--card);
    border-bottom-color: var(--border);
    color: var(--fg);
}
.theme-dark .host .turn select { background: var(--surface-alt); color: var(--fg); border-color: var(--border); }
.theme-dark .tabs { background: var(--card); border-color: var(--border); }
.theme-dark .tab { color: var(--muted); }
.theme-dark .tab.active { color: var(--fg); }
.theme-dark .tab.active .tab-badge { background: var(--accent); color: var(--accent-fg); }
.theme-dark main,
.theme-dark .tab-content { color: var(--fg); }
.theme-dark table { background: var(--card); color: var(--fg); }
.theme-dark th { background: var(--surface-alt); color: var(--muted); border-color: var(--border); }
.theme-dark td { border-color: var(--border); }
.theme-dark tr.row-called td { background: #3a3012; }
.theme-dark tr:hover td { background: var(--row-hover); }

/* State badges */
.theme-dark .state-seated { background: #1e3a8a; color: #dbeafe; }
.theme-dark .state-ordered { background: #854d0e; color: #fef3c7; }
.theme-dark .state-served { background: #065f46; color: #d1fae5; }
.theme-dark .state-checkout { background: #5b21b6; color: #ede9fe; }
.theme-dark .state-departed { background: #27272a; color: #a1a1aa; }
.theme-dark .state-no_show { background: #7f1d1d; color: #fee2e2; }
.theme-dark .completed-recoverable-row { background: rgba(245, 158, 11, 0.12); }

/* Host action buttons — dark mode hierarchy
   Baseline first: the light-mode rule `.host td.actions button { background:#fff }` has
   specificity (0,2,2), beating any bare `.theme-dark button.some-class` at (0,2,1).
   The baseline below shares that same scope so it wins, then individual overrides appear
   later in the file at equal specificity — last declaration wins cleanly.
   - Default (check-btn, depart-btn, etc.): surface-alt background, fg text
   - Primary filled (Seat, Advance, Call): saffron background, dark text
   - Secondary outlined (Notify, Chat, Re-notify base): surface-alt bg, saffron text
   - Destructive text (Remove/No-show): transparent, red text (matches light)
   - Topbar (Log out, Open Admin, theme toggle): fg-color text for legibility */
.theme-dark .host td.actions button,
.theme-dark .host td.actions a.rowbtn {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}
.theme-dark .host td.actions button:hover,
.theme-dark .host td.actions a.rowbtn:hover {
    background: var(--card);
    border-color: var(--border);
}

.theme-dark .host td.actions button.seat-btn,
.theme-dark .host td.actions button.call-btn,
.theme-dark .host td.actions button.advance-btn,
.theme-dark .host td.actions a.call-dial-btn {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
}
.theme-dark .host td.actions button.seat-btn:hover,
.theme-dark .host td.actions button.call-btn:hover,
.theme-dark .host td.actions button.advance-btn:hover,
.theme-dark .host td.actions a.call-dial-btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.theme-dark .host td.actions button.notify-btn,
.theme-dark .host td.actions button.chat-btn,
.theme-dark .host td.actions button.more-btn {
    background: var(--surface-alt);
    color: var(--accent);
    border-color: var(--border);
}
.theme-dark .host td.actions button.notify-btn:hover,
.theme-dark .host td.actions button.chat-btn:hover,
.theme-dark .host td.actions button.more-btn:hover {
    background: var(--card);
    border-color: var(--accent);
    color: var(--accent);
}
/* Re-notify (row-called) stays emphasized — filled saffron */
.theme-dark .host tr.row-called td.actions button.notify-btn {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
}

.theme-dark .host td.actions button.remove {
    background: transparent;
    color: var(--danger);
    border-color: transparent;
}
.theme-dark .host td.actions button.remove:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: transparent;
    color: var(--danger);
}
.theme-dark .sentiment-badge.sentiment-happy {
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
}
.theme-dark .sentiment-badge.sentiment-neutral {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}
.theme-dark .sentiment-badge.sentiment-upset {
    background: rgba(220, 38, 38, 0.18);
    color: #fecaca;
}
.theme-dark .sentiment-select {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}
.theme-dark .sentiment-select:hover {
    border-color: var(--accent);
}
.theme-dark .operations-table-tile {
    background: var(--surface-alt);
    border-color: var(--border);
    box-shadow: none;
}
.theme-dark .operations-table-tile.available {
    background: rgba(74, 222, 128, 0.12);
}
.theme-dark .operations-table-tile.checkout {
    background: rgba(251, 191, 36, 0.14);
}
.theme-dark .operations-table-tile.paid {
    background: rgba(96, 165, 250, 0.16);
}
.theme-dark .operations-closeout-stat {
    background: var(--surface-alt);
    border-color: var(--border);
}

/* Topbar / logout-style buttons: bump to fg so they're readable, not muted */
.theme-dark .host .logout,
.theme-dark .topbar .logout,
.theme-dark .admin-actions .logout {
    color: var(--fg);
    border-color: var(--border);
    background: var(--surface-alt);
}
.theme-dark .host .logout:hover,
.theme-dark .topbar .logout:hover,
.theme-dark .admin-actions .logout:hover {
    border-color: var(--accent);
    color: var(--accent);
}
/* Compact "+ Add party" CTA in the host topbar. Overrides the baseline
   button.primary full-width styling so it sits nicely between the
   counts and the admin/logout buttons. */
.host .topbar-add-btn,
.host button.primary.topbar-add-btn {
    display: inline-flex;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 8px 16px;
    min-height: 40px;
    font-size: 14px;
    border-radius: 8px;
}

.theme-dark .theme-toggle-btn {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}
.theme-dark .theme-toggle-btn:hover {
    background: var(--card);
    border-color: var(--accent);
    color: var(--accent);
}

/* Row-called highlight (a party has been notified but not seated yet) —
   in light mode it's #fff8e1 (pale yellow). Dark mode needs a visible
   warm tone without washing out the row text. */
.theme-dark tr.row-called td { background: rgba(244, 207, 75, 0.10); }

/* Admin panel surfaces — many admin rules hard-code `background: #fff`.
   Re-map them to the dark card token so panels aren't white on black. */
.theme-dark .admin-card,
.theme-dark .stats-card,
.theme-dark .host-settings-card,
.theme-dark .qr-preview {
    background: var(--card);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .guest-feature-field {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .floor-plan-row {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .admin-card-head h2,
.theme-dark .admin-card-head h3,
.theme-dark .admin-card-head h4 { color: var(--fg); }
.theme-dark .admin-card-head p { color: var(--muted); }
.theme-dark details.admin-card > summary.admin-card-head:hover {
    background: var(--surface-alt);
}
.theme-dark details.admin-card > summary.admin-card-head::before {
    border-top-color: var(--muted);
}

/* Admin accordions in the Menu tab have their own light-mode surfaces.
   Re-map each layer so the empty state, nested section card, and item rows
   inherit the dark palette instead of flashing white. */
.theme-dark .menu-empty-state {
    background: var(--surface-alt);
    color: var(--muted);
    border-color: var(--border);
}
.theme-dark details.menu-section {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark details.menu-section:hover {
    border-color: #52525b;
}
.theme-dark details.menu-section[open] {
    background: var(--card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.theme-dark details.menu-section > summary.menu-section-head::before {
    border-top-color: var(--muted);
}
.theme-dark details.menu-section > summary.menu-section-head::after {
    color: var(--muted);
}
.theme-dark details.menu-section input.menu-section-title {
    color: var(--fg);
}
.theme-dark details.menu-section input.menu-section-title::placeholder {
    color: #8a857a;
}
.theme-dark details.menu-section input.menu-section-title:hover,
.theme-dark details.menu-section input.menu-section-title:focus {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 0 0 3px rgba(227, 191, 61, 0.18);
}
.theme-dark .menu-item {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .menu-item:hover {
    border-color: #52525b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.theme-dark .menu-item-image-frame {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .menu-item-image-empty,
.theme-dark .menu-item-image-note {
    color: var(--muted);
}

/* QR preview must stay white so the SVG's dark modules remain visible.
   The SVG uses black on white internally — if we darken the host box,
   the QR reads as low contrast. Keep it white but add a subtle frame. */
.theme-dark .qr-preview {
    background: #ffffff;
    border-color: var(--border);
    padding: 4px;
}

/* Admin filter selects, URL display boxes, misc inputs that use `#fff` directly */
.theme-dark .admin-filters select,
.theme-dark .admin-filters input,
.theme-dark code.url-display,
.theme-dark .site-config input,
.theme-dark .site-config textarea {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}

/* Stats tiles inside the Service Debrief card */
.theme-dark .stat-item {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .stat-value { color: var(--fg); }
.theme-dark .stat-label { color: var(--muted); }

/* QR matrix dark mode — invert the pixel palette so the code stays scannable */
.theme-dark .qr-matrix-cell.on { background: #f4f4f5; }
.theme-dark .qr-matrix-cell.off { background: #1e1e24; }

/* Diner confirmation card: the big "#N of M" place number and related
   copy hard-code `color: #111` which disappears on a dark card. */
.theme-dark .confirmation .pos,
.theme-dark .confirmation .eta-time,
.theme-dark .confirmation .eta-time strong,
.theme-dark .confirmation .wait-elapsed,
.theme-dark .confirmation .wait-elapsed strong { color: var(--fg); }
.theme-dark .confirmation .hint,
.theme-dark .confirmation .pos-label,
.theme-dark .confirmation .seated-caption { color: var(--muted); }
.theme-dark .confirmation .eta-mins { color: var(--accent); }
.theme-dark .repeat-guest-note {
    background: rgba(227, 191, 61, 0.1);
    border-color: rgba(227, 191, 61, 0.35);
    color: #f3e2a0;
}
.theme-dark .repeat-guest-save-status { color: var(--muted); }

/* Seat + SMS + Call dialogs */
.theme-dark .seat-dialog,
.theme-dark .custom-sms-dialog,
.theme-dark .custom-call-dialog { background: var(--card); color: var(--fg); border-color: var(--border); }
.theme-dark .seat-dialog-footer button,
.theme-dark button.dialog-cancel {
    background: var(--surface-alt); color: var(--fg); border-color: var(--border);
}
.theme-dark button.dialog-cancel:hover {
    border-color: var(--accent); color: var(--accent); background: var(--surface-alt);
}
.theme-dark .seat-dialog-footer button.primary { background: var(--accent); color: var(--accent-fg); }
.theme-dark .seat-dialog-chips .chip { background: var(--surface-alt); color: var(--fg); border-color: var(--border); }
.theme-dark .seat-dialog-chips .chip:hover,
.theme-dark .seat-dialog-chips .chip.selected { border-color: var(--accent); color: var(--accent); }
.theme-dark a#custom-call-confirm.primary { background: var(--accent); color: var(--accent-fg); }

/* Chat drawer */
.theme-dark .chat-drawer { background: var(--card); border-color: var(--border); }
.theme-dark .chat-drawer-header { border-bottom-color: var(--border); }
.theme-dark .chat-drawer-thread { background: var(--surface-alt); }
.theme-dark .chat-drawer-composer input { background: var(--surface-alt); color: var(--fg); border-color: var(--border); }

/* Analytics histograms */
.theme-dark .hist-card { background: var(--card); border-color: var(--border); }
.theme-dark .hist-empty { color: var(--muted); }
.theme-dark .vbar-track { background: var(--surface-alt); }
.theme-dark .vbar-fill { background: var(--accent); }
.theme-dark .vbar-value,
.theme-dark .vbar-x-label,
.theme-dark .vbar-y-label,
.theme-dark .vbar-label { color: var(--muted); }

/* Login card */
.theme-dark .login-card { background: var(--card); border-color: var(--border); }

/* ────────────────────────────────────────────────────────────────────────
   Website tab (issue #56) — template picker + content editor
   ──────────────────────────────────────────────────────────────────────── */
.website-template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.website-template-card {
    background: var(--card, #fff);
    border: 2px solid var(--border, #dfd6c6);
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    position: relative;
    transition: border-color 0.1s, box-shadow 0.1s;
}
.website-template-card:hover { border-color: #9ab8b0; }
.website-template-card.is-selected {
    border-color: #1f6a5d;
    box-shadow: 0 0 0 3px rgba(31, 106, 93, 0.14);
}
.website-template-card .website-template-current {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1f6a5d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: none;
}
.website-template-card.is-selected .website-template-current { display: inline-block; }
.website-template-swatch {
    display: block;
    height: 110px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    line-height: 110px;
    color: #fff;
}
.website-swatch-saffron {
    background: linear-gradient(135deg, #fef3d9 0%, #e08a2e 100%);
    color: #2a2a2a;
}
.website-swatch-slate {
    background: linear-gradient(135deg, #e4ece9 0%, #1f6a5d 100%);
    font-family: 'Archivo SemiCondensed', 'IBM Plex Sans', sans-serif;
    letter-spacing: -0.01em;
}
.website-template-name {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 2px;
}
.website-template-sub {
    color: var(--muted, #6a6258);
    font-size: 13px;
}
.admin-website-preview {
    color: var(--accent, #1f6a5d);
    font-weight: 600;
    text-decoration: none;
    margin-right: 12px;
    align-self: center;
}
.admin-website-preview:hover { text-decoration: underline; }
#admin-website-about { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border, #dfd6c6); font: 14px inherit; resize: vertical; min-height: 90px; }

@media (max-width: 720px) {
    .website-template-grid { grid-template-columns: 1fr; }
}


/* ============================================================================
 * Owner onboarding wizard (issue #54, spec §6.2)
 * Overlay modal + Setup pill. Designed to coexist with the existing admin
 * shell; sits above the admin topbar via position: fixed + high z-index.
 * ============================================================================ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 90;
    padding: 40px 20px;
    overflow-y: auto;
}
.onboarding-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(24, 20, 14, 0.42);
    backdrop-filter: blur(4px);
    z-index: -1;
}
.onboarding-modal {
    background: #fffdf8;
    color: #1d1b19;
    border: 1px solid #dfd6c6;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 22px 60px rgba(37, 26, 15, 0.18);
    max-width: 640px;
    width: 100%;
    font-family: 'Fira Sans', 'IBM Plex Sans', sans-serif;
}
.onboarding-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.onboarding-head h2 {
    margin: 0 0 6px;
    font: 700 22px/1.2 'Archivo SemiCondensed', 'Fira Sans', sans-serif;
}
.onboarding-head p {
    color: #6a6258;
    font-size: 14px;
    margin: 0;
}
.onboarding-dismiss {
    background: none;
    border: none;
    color: #6a6258;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.onboarding-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}
.onboarding-step {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #ede4d1;
    margin-bottom: 10px;
    background: #fffdf8;
}
.onboarding-step.done {
    background: #eef8f2;
    border-color: #bae1cd;
}
.onboarding-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #efe8da;
    color: #6a6258;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.onboarding-step.done .onboarding-badge {
    background: #1f8f5f;
    color: #fff;
}
.onboarding-step.done .onboarding-badge::after { content: '\2713'; }
.onboarding-step.done .onboarding-badge { font-size: 16px; }
.onboarding-step.done .onboarding-badge-number { display: none; }
.onboarding-step-body { flex: 1; }
.onboarding-step h4 {
    margin: 0 0 4px;
    font: 600 16px 'IBM Plex Sans', 'Fira Sans', sans-serif;
}
.onboarding-step p {
    margin: 0;
    color: #6a6258;
    font-size: 13px;
}
.onboarding-step-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.onboarding-jump {
    color: #1f6a5d;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.onboarding-jump:hover { text-decoration: underline; }
.onboarding-done {
    background: #1f6a5d;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font: 600 13px 'IBM Plex Sans', 'Fira Sans', sans-serif;
    cursor: pointer;
}
.onboarding-done:hover { background: #185246; }
.onboarding-done:disabled {
    background: #b5c8c3;
    cursor: default;
}
.onboarding-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    color: #6a6258;
    font-size: 13px;
}
.onboarding-dismiss-inline {
    background: transparent;
    border: none;
    color: #6a6258;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.onboarding-pill {
    background: rgba(31, 106, 93, 0.12);
    color: #1f6a5d;
    border: 1px solid rgba(31, 106, 93, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font: 600 13px 'IBM Plex Sans', 'Fira Sans', sans-serif;
    cursor: pointer;
}
.onboarding-pill:hover {
    background: rgba(31, 106, 93, 0.2);
}

/* ============================================================================
   Onboarding wizard — issue #51 Phase C
   Inline 6-step embedded-form flow with a clickable progress rail on the left,
   the active step's form in the middle, and a phone-framed live iframe preview
   on the right. Collapses to a single column (preview becomes a toggle) under
   860px. Palette mirrors docs/feature-specs/mocks/51-owner-onboarding.html:
   off-white panels, teal accents, warm orange highlights.
   ============================================================================ */
.onboarding-wizard {
    align-items: flex-start;
    padding: 24px;
}
.onboarding-wiz-modal {
    background: #fffdf8;
    color: #1d1b19;
    border: 1px solid #dfd6c6;
    border-radius: 28px;
    padding: 24px 26px;
    box-shadow: 0 22px 60px rgba(37, 26, 15, 0.18);
    max-width: 1280px;
    width: 100%;
    font-family: 'Fira Sans', 'IBM Plex Sans', sans-serif;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.onboarding-wiz-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    margin-top: 18px;
}

/* Left rail: step list ------------------------------------------------------ */
.onboarding-wiz-nav { position: sticky; top: 0; }
.onboarding-wiz-steps { list-style: none; padding: 0; margin: 0; }
.onboarding-wiz-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    margin-bottom: 6px;
    cursor: pointer;
    background: transparent;
}
.onboarding-wiz-step:hover { background: rgba(31, 106, 93, 0.05); }
.onboarding-wiz-step.current {
    background: rgba(31, 106, 93, 0.08);
    border-color: rgba(31, 106, 93, 0.25);
}
.onboarding-wiz-step.current .onboarding-badge { background: #1f6a5d; color: #fff; }
.onboarding-wiz-step.done .onboarding-badge { background: #1f8f5f; color: #fff; }
.onboarding-wiz-step.done .onboarding-badge::before { content: '\2713'; }
.onboarding-wiz-step.done .onboarding-badge-number { display: none; }
.onboarding-wiz-step-meta h4 {
    margin: 0 0 2px;
    font: 600 14px 'IBM Plex Sans', sans-serif;
}
.onboarding-wiz-step-meta p {
    margin: 0;
    color: #6a6258;
    font-size: 12px;
}
.onboarding-wiz-progress {
    margin-top: 14px;
    font-size: 12px;
    color: #6a6258;
    padding: 8px 12px;
    border-top: 1px solid #ede4d1;
    padding-top: 12px;
}

/* Middle column: active step panel ----------------------------------------- */
.onboarding-wiz-main { min-width: 0; }
.onboarding-wiz-panel h3 {
    margin: 0 0 6px;
    font: 700 22px/1.15 'Archivo SemiCondensed', 'Fira Sans', sans-serif;
}
.onboarding-wiz-lead {
    margin: 0 0 16px;
    color: #6a6258;
    font-size: 14px;
}
.onboarding-wiz-form { display: flex; flex-direction: column; gap: 14px; }
.wiz-field label, .wiz-field legend {
    display: block;
    font-size: 12px;
    color: #6a6258;
    font-weight: 500;
    margin-bottom: 4px;
}
.wiz-field input[type="text"],
.wiz-field input[type="email"],
.wiz-field input[type="tel"],
.wiz-field input[type="url"],
.wiz-field input[type="time"],
.wiz-field textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #dfd6c6;
    background: #fff;
    font: 14px 'IBM Plex Sans', 'Fira Sans', sans-serif;
    color: #1d1b19;
}
.wiz-field textarea { resize: vertical; min-height: 72px; }
.wiz-help { font-size: 12px; color: #6a6258; margin: 4px 0 0; }
.wiz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wiz-grid-3 { display: grid; grid-template-columns: 1.2fr 0.6fr 1fr; gap: 12px; }

/* Weekly hours grid */
.wiz-hours { border: 1px solid #ede4d1; border-radius: 12px; padding: 12px; background: #fffdf8; }
.wiz-hours legend { padding: 0 6px; }
.wiz-hours-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.wiz-hours-grid th, .wiz-hours-grid td { padding: 5px 6px; text-align: left; vertical-align: middle; }
.wiz-hours-grid thead th { color: #6a6258; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.wiz-hours-grid input[type="time"] { padding: 5px 8px; }
.wiz-hours-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.wiz-hours-window { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wiz-hours-window span { min-width: 70px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #4f463d; }
@media (max-width: 860px) {
    .wiz-hours-services { grid-template-columns: 1fr; }
}

/* Template cards */
.wiz-template-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wiz-template-card {
    display: block;
    padding: 14px;
    border-radius: 16px;
    border: 2px solid #ede4d1;
    background: #fffdf8;
    cursor: pointer;
    transition: border-color .15s;
}
.wiz-template-card:hover { border-color: #c9b78e; }
.wiz-template-card.selected { border-color: #1f6a5d; background: rgba(31,106,93,.04); }
.wiz-template-card input { position: absolute; opacity: 0; pointer-events: none; }
.wiz-template-card h4 { margin: 10px 0 4px; font: 700 16px 'Archivo SemiCondensed', sans-serif; }
.wiz-template-card p { margin: 0; color: #6a6258; font-size: 13px; }
.wiz-template-swatch { height: 72px; border-radius: 10px; }
.wiz-template-swatch-saffron { background: linear-gradient(135deg, #f7f1e8 0%, #e5a23a 60%, #cb6a34 100%); }
.wiz-template-swatch-slate { background: linear-gradient(135deg, #2a3540 0%, #1f6a5d 100%); }

/* Dishes */
.wiz-dish-rows { display: flex; flex-direction: column; gap: 12px; }
.wiz-dish-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid #ede4d1;
    border-radius: 14px;
    background: #fffdf8;
}
.wiz-dish-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    width: 160px;
    height: 120px;
    border: 1px dashed #c9b78e;
    border-radius: 10px;
    background: #f7f1e8;
    overflow: hidden;
}
.wiz-dish-preview { width: 100%; height: 100%; object-fit: cover; display: none; }
.wiz-dish-upload {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #6a6258; font-size: 12px; font-weight: 500; cursor: pointer;
    background: rgba(255, 253, 248, 0);
    transition: background .15s;
}
.wiz-dish-upload:hover { background: rgba(255, 253, 248, 0.6); }
.wiz-dish-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wiz-dish-preview[src]:not([src=""]) + .wiz-dish-upload { background: transparent; }
.wiz-dish-preview[src]:not([src=""]) { display: block; }
.wiz-dish-preview[src]:not([src=""]) ~ .wiz-dish-upload span { background: rgba(29,27,25,.6); color:#fff; padding: 4px 10px; border-radius: 999px; }
.wiz-dish-meta { display: flex; flex-direction: column; gap: 8px; }
.wiz-dish-title, .wiz-dish-desc {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #dfd6c6;
    background: #fff;
    font: 14px 'IBM Plex Sans', sans-serif;
    color: #1d1b19;
}
.wiz-dish-desc { resize: vertical; min-height: 56px; }

/* Staff queue */
.wiz-role-radios { display: flex; gap: 12px; padding-top: 6px; font-size: 13px; }
.wiz-role-radios label { display: inline-flex; align-items: center; gap: 4px; color: #1d1b19; font-weight: 500; }
.wiz-actions-staff-add { justify-content: flex-start; margin-top: -6px; }
.wiz-staff-queue {
    background: rgba(31, 106, 93, 0.1);
    color: #1f6a5d;
    border: 1px solid rgba(31, 106, 93, 0.3);
    padding: 7px 14px;
    border-radius: 10px;
    font: 600 13px 'IBM Plex Sans', sans-serif;
    cursor: pointer;
}
.wiz-staff-queue:hover { background: rgba(31, 106, 93, 0.18); }
.wiz-staff-queue-list { font-size: 13px; }
.wiz-staff-queue-empty { color: #6a6258; margin: 0; font-size: 13px; }
.wiz-staff-queue-ul { list-style: none; padding: 0; margin: 0; }
.wiz-staff-queue-ul li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #ede4d1;
    border-radius: 10px;
    margin-bottom: 6px;
    background: #fffdf8;
}
.wiz-staff-queue-role { text-transform: capitalize; }
.wiz-staff-queue-email { color: #6a6258; font-size: 12px; }
.wiz-staff-queue-remove {
    background: transparent; border: none; color: #6a6258; cursor: pointer;
    font-size: 16px; line-height: 1; padding: 4px 8px;
}

/* Action bar (save / cancel / back / skip / next) */
.wiz-actions {
    display: flex; align-items: center; gap: 10px; padding-top: 6px;
    border-top: 1px solid #ede4d1; margin-top: 10px;
}
.wiz-actions .wiz-actions-spacer { flex: 1; }
.wiz-save, .wiz-cancel, .wiz-back, .wiz-next, .wiz-skip, .wiz-finish {
    padding: 8px 16px;
    border-radius: 10px;
    font: 600 13px 'IBM Plex Sans', 'Fira Sans', sans-serif;
    cursor: pointer;
    border: none;
}
.wiz-save { background: #1f6a5d; color: #fff; }
.wiz-save:hover:not(:disabled) { background: #185246; }
.wiz-save:disabled { background: #c2d3ce; color: #fff; cursor: not-allowed; opacity: .7; }
.wiz-cancel {
    background: transparent; color: #6a6258; border: 1px solid #dfd6c6;
}
.wiz-cancel:hover:not(:disabled) { background: #f7f3ec; }
.wiz-cancel:disabled { color: #c2bdb1; cursor: not-allowed; border-color: #ede4d1; }
.wiz-back { background: #f7f3ec; color: #6a6258; }
.wiz-back:hover:not(:disabled) { background: #ede4d1; }
.wiz-back:disabled { opacity: .4; cursor: not-allowed; }
.wiz-next, .wiz-finish { background: #cb6a34; color: #fff; }
.wiz-next:hover, .wiz-finish:hover { background: #a8531f; }
.wiz-skip { background: transparent; color: #6a6258; text-decoration: underline; }

.wiz-validation { color: #a8531f; font-size: 13px; display: none; }

/* Live iframe preview */
.onboarding-wiz-preview {
    background: #fffdf8;
    border: 1px solid #dfd6c6;
    border-radius: 18px;
    padding: 14px;
    position: sticky; top: 0;
}
.onboarding-wiz-preview-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.onboarding-wiz-preview-head h4 {
    margin: 0; font: 600 12px 'IBM Plex Sans', sans-serif;
    text-transform: uppercase; letter-spacing: .08em; color: #6a6258;
}
.onboarding-wiz-preview-actions { display: flex; align-items: center; gap: 8px; }
.wiz-preview-refresh {
    background: transparent; border: 1px solid #dfd6c6; color: #6a6258;
    padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer;
}
.wiz-preview-refresh:hover { background: #f7f3ec; }
.wiz-preview-open { color: #1f6a5d; font-size: 12px; font-weight: 600; text-decoration: none; }
.onboarding-wiz-preview-frame {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 560px;
    border-radius: 24px;
    overflow: hidden;
    background: #222;
    padding: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.onboarding-wiz-preview-frame iframe {
    width: 100%; height: 100%; border: 0; border-radius: 18px; background: #faf7f2;
}
.onboarding-wiz-preview-hint {
    font-size: 12px; color: #6a6258; margin: 10px 0 0; text-align: center;
}

/* Mobile preview toggle */
.onboarding-wiz-preview-toggle {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: #1f6a5d;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px;
    font: 600 13px 'IBM Plex Sans', sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.16);
    z-index: 120;
}

/* "You're live" celebration */
.onboarding-wiz-celebrate h3 { color: #1f6a5d; }
.onboarding-wiz-live-block {
    background: rgba(31, 106, 93, 0.06);
    border: 1px solid rgba(31, 106, 93, 0.2);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.wiz-live-field { display: flex; flex-direction: column; gap: 2px; }
.wiz-live-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6a6258; font-weight: 600; }
.wiz-live-value { font: 600 16px 'IBM Plex Sans', sans-serif; color: #1d1b19; text-decoration: none; }
.wiz-live-value:hover { text-decoration: underline; }
.wiz-live-hint { font-size: 12px; color: #6a6258; }

/* Responsive: under 860px, stack + show the preview toggle */
@media (max-width: 860px) {
    .onboarding-wiz-body { grid-template-columns: 1fr; }
    .onboarding-wiz-nav { position: static; }
    .onboarding-wiz-steps { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
    .onboarding-wiz-step { min-width: 140px; }
    .onboarding-wiz-preview {
        position: fixed;
        inset: 0;
        z-index: 110;
        border-radius: 0;
        display: none;
    }
    .onboarding-wiz-preview.open { display: block; overflow-y: auto; }
    .onboarding-wiz-preview-toggle { display: inline-flex; }
    .wiz-grid-2, .wiz-grid-3 { grid-template-columns: 1fr; }
    .wiz-template-cards { grid-template-columns: 1fr; }
    .wiz-dish-row { grid-template-columns: 1fr; }
    .wiz-dish-photo { width: 100%; height: 180px; }
}

/* ============================================================================
   Staff tab — role pills + role-aware avatar tints (issue #51 polish)
   ----------------------------------------------------------------------------
   Mock (docs/feature-specs/mocks/51-admin-brand-staff.html) renders the Role
   column as colored pills and uses a distinct avatar tint per role so the
   owner/admin/host mix reads at a glance. admin.js writes the `role-pill` +
   `staff-avatar-<role>` classes against `row.role` so the CSS here is the
   single source of truth for the visual vocabulary.
   ============================================================================ */
.role-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}
.role-pill.owner { background: rgba(203, 106, 52, 0.16); color: #cb6a34; }
.role-pill.admin { background: rgba(31, 106, 93, 0.14); color: #1f6a5d; }
.role-pill.host { background: #eee6d4; color: #6a6258; }
.role-pill.pending { background: #fff2c5; color: #8b6914; }

.staff-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1f6a5d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.staff-avatar.avatar-owner { background: #1f6a5d; }
.staff-avatar.avatar-admin { background: #cb6a34; }
.staff-avatar.avatar-host { background: #78716c; }
.staff-avatar.avatar-pending { background: #b8b0a3; }

/* Invite form role radio — click to fill a card; selected state uses the
   teal accent border so the picker reads as a segmented control. Matches
   mock .role-radio label:has(input:checked) rule. */
.role-radio-option {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid #dfd6c6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.1s, background 0.1s;
}
.role-radio-option:has(input:checked) {
    border-color: #1f6a5d;
    background: rgba(31, 106, 93, 0.06);
}
.role-radio-option:has(input:checked) strong { color: #1f6a5d; }

/* Admin topbar brand expansion — "OSH · OS for Hospitality · Admin — {restaurant}" */
.admin-topbar .brand .brand-mark { font: inherit; }
.admin-topbar .brand .brand-expand {
    font: 500 11px/1 'IBM Plex Sans', system-ui, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted, #78716c);
    margin-left: 6px;
    margin-right: 2px;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .admin-topbar .brand .brand-expand { display: none; }
}

/* ============================================================================
 * "Ask OSH" MCP setup card (admin)
 * Purpose: give owners a copy-paste setup path for plugging Claude / ChatGPT
 * into their restaurant's MCP endpoint. Visual language matches admin cards.
 * ============================================================================ */
#admin-mcp-card .admin-card-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #1f6a5d;
    background: rgba(31,106,93,.12);
    border-radius: 999px;
    vertical-align: middle;
    font-weight: 700;
}
.mcp-ask-samples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin: 14px 0 20px;
}
.mcp-ask-sample {
    background: #fffdf8;
    border: 1px solid #ede4d1;
    border-radius: 10px;
    padding: 10px 14px;
    color: #4a4238;
    font-style: italic;
    font-size: 13px;
}
.mcp-config-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}
.mcp-config-field .visit-label code {
    background: rgba(31,106,93,.08);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
}
.mcp-config-input-row {
    display: flex;
    gap: 6px;
}
.mcp-config-input-row input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border, #dfd6c6);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 13px;
    background: #fffdf8;
}
.mcp-copy-btn,
.mcp-reveal-btn {
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border, #dfd6c6);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #1f6a5d;
    cursor: pointer;
    white-space: nowrap;
}
.mcp-copy-btn:hover,
.mcp-reveal-btn:hover { background: rgba(31,106,93,.06); }
.mcp-setup-tabs {
    display: flex;
    gap: 4px;
    margin: 8px 0 14px;
    border-bottom: 1px solid #ede4d1;
    padding-bottom: 0;
}
.mcp-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #78716c;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.mcp-tab-btn:hover { color: #1f6a5d; }
.mcp-tab-btn.is-selected {
    color: #1f6a5d;
    border-bottom-color: #1f6a5d;
}
.mcp-tab-panel { display: none; }
.mcp-tab-panel.is-selected { display: block; }
.mcp-panel-blurb,
.mcp-panel-followup {
    color: #4a4238;
    font-size: 14px;
    margin: 4px 0 10px;
}
.mcp-panel-followup em { color: #1f6a5d; }
.mcp-snippet {
    position: relative;
    background: #1d1b19;
    color: #f7f1e8;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 10px 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre;
}
.mcp-snippet code {
    display: block;
    white-space: pre;
    font: inherit;
    color: inherit;
    background: none;
    padding: 0;
}
.mcp-snippet-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 12px;
    background: rgba(255,255,255,.08);
    color: #f7f1e8;
    border-color: rgba(255,255,255,.2);
}
.mcp-snippet-copy:hover { background: rgba(255,255,255,.16); }
.mcp-safety {
    margin-top: 14px;
    padding: 10px 14px;
    background: #fff7ec;
    border: 1px solid #f4d8a4;
    border-radius: 10px;
    font-size: 13px;
    color: #6e4f10;
}

/* ═══════════════════════════════════════════════════════════════════════
   Admin 7-tab workspace (issue #51 Phase B)
   ═══════════════════════════════════════════════════════════════════════ */

/* Widen the tab row to accommodate 7 labels. On wide screens the flex
   row fits; at <=640px we switch to a horizontal-scroll strip so the
   tabs never wrap or truncate. */
.admin-tabs-workspace {
    width: auto;
    max-width: calc(100% - 48px);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.admin-tabs-workspace .admin-tab {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .admin-tabs-workspace {
        margin: 12px 12px 0;
        max-width: calc(100% - 24px);
        border-radius: 8px;
    }
    .admin-tabs-workspace .admin-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Signature-dish editor grid — 3 rows stacked, each row is fields-on-left
   + media-on-right at >=640px, stacked at <640px. */
.signature-dish-grid {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}
.signature-dish-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border, #dfd6c6);
    border-radius: 12px;
    background: var(--surface-alt, #faf6ee);
}
.signature-dish-fields { display: grid; gap: 10px; }
.signature-dish-media {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.signature-dish-preview {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border, #dfd6c6);
    background: #fff;
    align-self: center;
}
.signature-dish-preview-placeholder {
    width: 160px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border, #dfd6c6);
    border-radius: 8px;
    color: var(--muted, #78716c);
    font-size: 12px;
    background: #fff;
    align-self: center;
}
.signature-dish-filebtn {
    display: inline-flex;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border, #dfd6c6);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: var(--fg);
}
.signature-dish-filebtn:hover { background: var(--surface-alt, #faf6ee); }
/* Visually hide the file input but keep it interactable. Using the
   standard sr-only pattern: clip + 1px + negative margin. Avoids
   display:none / visibility:hidden, which some browsers refuse to
   click through from a label. */
.signature-dish-filebtn input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.signature-dish-clear {
    background: none;
    border: none;
    color: #b42318;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    align-self: center;
}
.signature-dish-clear:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .signature-dish-row { grid-template-columns: 1fr; }
    .signature-dish-media { flex-direction: row; flex-wrap: wrap; }
    .signature-dish-preview,
    .signature-dish-preview-placeholder { width: 140px; height: 106px; }
}

/* Lightweight toast (Device-PIN "coming soon" and friends). */
.admin-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 999px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    z-index: 2000;
    max-width: 80vw;
    text-align: center;
}
.admin-toast-success { background: #166534; }
.admin-toast-info { background: #1f2937; }

/* ============================================================================
   Issue #103 — mobile usability (operator feedback)
   ============================================================================
   Two-block responsive uplift driven by spec
   docs/feature-specs/103-mobile-usability-waitlist-and-host.md.

     1. Diner waitlist block (<=480px): trims the .diner header and replaces
        the .status card with a slim strip so the join form sits above the
        667 px fold (R1). Adds the .form-2up grid for size+phone (R3).
        Compacts #conf-card so the post-join public list stays in viewport
        (R11).

     2. Host stand block (<=720px): table-to-card transform via display
        swaps; column labels via td::before { content: attr(data-label) }
        (R5); >=44 px tap targets (R6); sticky bottom action bar replaces
        the topbar add-party + ETA controls (R7); compact topbar icons
        (R8); zero horizontal overflow (R9). Same DOM as desktop, full
        feature parity per R12 / Validation §2a.

   Order matters: this block is at the end of styles.css so its rules win
   over any earlier @media (max-width: 640|600|360) blocks targeting the
   same elements.
   ============================================================================ */

/* ----- 1. Diner waitlist mobile (R1, R3, R11) ----- */

/* Form 2-up grid (size + phone share a row at 321-480 px). At >480 px the
   wrapper is a no-op block, so the inputs render full-width as before. */
.form-2up {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 10px;
}
.form-2up .form-2up-cell label { margin-top: 0; }

/* Below 320 px (older Android budget devices) the 2-up cramps the phone
   input. Fall back to a single column. */
@media (max-width: 320px) {
    .form-2up { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    /* Compact diner header — trims ~70 px from the top of the page so the
       join form lands above the 667 px fold. Brand mark is inlined with
       the name to drop the second visual row entirely; "Place in Line"
       sub is hidden on this breakpoint per spec OQ-1 default. */
    .diner header {
        padding: 10px 16px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .diner header .mark {
        font-size: 14px;
        letter-spacing: 4px;
        padding: 2px 8px;
        margin-bottom: 0;
        border-width: 1.5px;
    }
    .diner header h1 { font-size: 15px; }
    .diner header .sub { display: none; }
    .diner header .theme-toggle-btn {
        position: absolute;
        right: 10px;
        top: 8px;
    }

    .diner main { padding: 12px 16px; }

    /* Status card -> slim horizontal strip. We keep the card class names
       (queue.js writes to #line-len, #eta-new) but reshape the visual
       container into a one-line summary. */
    .diner .card.status {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }
    .status .line-len {
        font-size: 22px;
        line-height: 1;
    }
    .status .line-label {
        font-size: 11px;
        margin-top: 0;
    }
    .status .eta {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        font-size: 13px;
        margin-left: auto;
    }

    /* Join card padding tightens so the form fits in the remaining space
       above the fold. Submit-button min-height stays at the existing
       48 px (set on button.primary at the top of this file) for tap. */
    .diner .card { padding: 14px; }
    .card label { margin-top: 8px; }
    input[type=text], input[type=tel], input[type=number], input[type=password] {
        padding: 10px 12px;
    }

    /* Compact post-join confirmation card — keeps #public-list-card's
       first row inside the 667 px viewport (R11). We DO NOT hide any of
       the post-join surfaces (callout, chat-card, public-list-card);
       only the visual chrome of #conf-card shrinks. */
    .card.confirmation {
        padding: 16px;
    }
    .confirmation .pos {
        font-size: 44px;
        line-height: 1;
    }
    .confirmation .pos-label {
        font-size: 10px;
    }
    .confirmation .code {
        font-size: 12px;
    }
    .confirmation .eta-time {
        margin-top: 8px;
        font-size: 13px;
    }
    .confirmation .hint {
        margin-top: 6px;
        font-size: 11px;
    }
}

/* ----- 2. Host stand mobile (R4, R5, R6, R7, R8, R9, R12) ----- */

/* Mobile sticky action bar wrapper. Hidden on tablet/desktop where the
   topbar already carries these controls. Uses position:fixed so it stays
   thumb-reachable regardless of card-list scroll. */
body.host:not(.admin-page) .mobile-action-bar { display: none; }

@media (max-width: 720px) {
    /* Reserve space at the bottom of the host page so the sticky action
       bar doesn't cover the last party card. */
    body.host:not(.admin-page) { padding-bottom: 96px; }

    /* Topbar collapse — icons only for theme/admin/logout, brand
       truncated. Counts stay readable; turn-time + add-party MOVE to the
       sticky bottom bar via display:none here. */
    body.host:not(.admin-page) .topbar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 10px;
    }
    body.host:not(.admin-page) .topbar .brand {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.host:not(.admin-page) .topbar .counts {
        flex: 1 1 100%;
        order: 2;
        gap: 6px;
        font-size: 12px;
        padding: 4px 0;
    }
    body.host:not(.admin-page) .topbar .counts > div {
        flex: 1;
        text-align: center;
    }
    /* The topbar's add-party button + ETA wrapper are duplicated in the
       sticky mobile-action-bar at this breakpoint; hide the originals so
       the host doesn't see two of each. */
    body.host:not(.admin-page) .topbar .turn,
    body.host:not(.admin-page) .topbar-add-btn,
    body.host:not(.admin-page) #open-admin-link {
        display: none;
    }
    body.host:not(.admin-page) .topbar .logout,
    body.host:not(.admin-page) .topbar .theme-toggle-btn {
        min-height: 36px;
        min-width: 36px;
    }

    /* Tab strip — full-width 44 px tap targets. */
    body.host:not(.admin-page) .tabs .tab {
        min-height: 44px;
        font-size: 13px;
        padding: 10px 6px;
    }
    body.host:not(.admin-page) .host-settings-card {
        padding: 14px;
    }

    /* Table -> card-stack transform. Each <tr> becomes a card; each <td>
       becomes a labelled row inside it. The label is sourced from
       data-label which host.js attaches to every td (parity with the
       desktop <th> cells). This pattern preserves the ENTIRE existing
       DOM and JS — no parallel renderer, full feature parity (R12). */
    body.host:not(.admin-page) main { padding: 10px 12px; }
    body.host:not(.admin-page) table { display: block; width: 100%; }
    body.host:not(.admin-page) thead { display: none; }
    body.host:not(.admin-page) tbody { display: block; }
    body.host:not(.admin-page) tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    body.host:not(.admin-page) tr.row-called {
        border-color: var(--accent);
        background: #fffdf3;
    }
    body.host:not(.admin-page) tr.timeline-row {
        padding: 0;
        margin-top: -8px;
        margin-bottom: 10px;
    }
    body.host:not(.admin-page) td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px solid var(--divider);
        text-align: left;
    }
    body.host:not(.admin-page) td:last-child { border-bottom: none; }
    body.host:not(.admin-page) td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--muted);
    }
    /* Empty data-label still suppresses ::before — `td.actions` and other
       chromeless cells use data-label="" so they don't print "ACTIONS:". */
    body.host:not(.admin-page) td[data-label=""]::before { content: none; }

    /* td.empty (the "No completed parties." placeholder) needs to look
       like a card body, not a labelled row. */
    body.host:not(.admin-page) td.empty {
        justify-content: center;
        padding: 16px;
        color: var(--muted);
        border-bottom: none;
    }

    /* Number / table cell — accent-coloured, full row when paired with name. */
    body.host:not(.admin-page) td.num,
    body.host:not(.admin-page) td.table-num {
        font-size: 14px;
        font-weight: 700;
        color: var(--accent);
    }

    /* Actions cell wraps and lays out buttons in a 4-up grid so all 8
       Waiting actions remain visible without overflow. justify-content
       changes from space-between to flex-start for actions because the
       row-buttons themselves do the spacing. */
    body.host:not(.admin-page) td.actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        padding-top: 10px;
    }
    body.host:not(.admin-page) td.actions::before { content: none; }
    body.host:not(.admin-page) td.actions > * {
        flex: 1 1 calc(25% - 6px);
        min-height: 44px;
        min-width: 44px;
        font-size: 12px;
        padding: 8px 6px;
    }
    /* The notify button gets the gold accent in card mode so the
       highest-frequency host action stands out. */
    body.host:not(.admin-page) td.actions > .notify-btn {
        background: var(--accent);
        color: #111;
        border-color: var(--accent);
    }
    /* The sentiment select takes a full row to keep the dropdown
       readable on a narrow screen. */
    body.host:not(.admin-page) td.actions > .sentiment-select {
        flex: 1 1 100%;
        min-height: 44px;
    }

    /* Transit cells — render as inline metric pills inside the labelled
       row, not as the desktop's separate columns. */
    body.host:not(.admin-page) td.transit-cell .filled,
    body.host:not(.admin-page) td.transit-cell.filled,
    body.host:not(.admin-page) td.transit-cell.empty {
        font-weight: 700;
    }

    /* Sticky bottom action bar — visible only at <720px (display: flex
       overrides the body.host:not(.admin-page) .mobile-action-bar { display: none } above). */
    body.host:not(.admin-page) .mobile-action-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(255,255,255,0.96);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
        z-index: 10;
    }
    body.host:not(.admin-page) .mobile-action-bar .mobile-add-btn {
        flex: 1.4;
        min-height: 48px;
        margin-top: 0;
        background: var(--accent);
        color: #111;
        border: none;
        border-radius: 10px;
        font-weight: 700;
    }
    body.host:not(.admin-page) .mobile-action-bar .mobile-eta {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--surface-alt);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 6px 10px;
        min-height: 48px;
    }
    body.host:not(.admin-page) .mobile-action-bar .mobile-eta-label {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: var(--muted);
    }
    body.host:not(.admin-page) .mobile-action-bar select,
    body.host:not(.admin-page) .mobile-action-bar input {
        background: transparent;
        border: none;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        color: #111;
        padding: 0;
        min-width: 0;
    }
    body.host:not(.admin-page) .mobile-action-bar input { width: 36px; text-align: center; }

    /* Dialog tightening at narrow phone widths. The seat/add-party/
       custom-sms dialogs already respond to viewport via earlier media
       blocks, but the buttons inside the footer benefit from full-width
       layout below 480 px. */
    body.host:not(.admin-page) .seat-dialog .seat-dialog-footer button {
        flex: 1;
        min-height: 44px;
    }

    /* Theme toggle stays compact in the topbar, not full-width. */
    body.host:not(.admin-page) .theme-toggle-btn { width: 36px; height: 36px; padding: 0; }
}

/* End of issue-#103 block. */
.admin-toast-error { background: #b42318; }

.inventory-toolbar,
.inventory-summary-grid,
.inventory-adjust-inline,
.inventory-row-head,
.inventory-row-actions,
.host-inventory-risk-row {
    display: flex;
    gap: 12px;
}

.inventory-toolbar,
.inventory-summary-grid {
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.inventory-summary-pill {
    min-width: 120px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    display: grid;
    gap: 4px;
}

.inventory-summary-pill span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.inventory-summary-pill strong {
    font-size: 24px;
}

.inventory-list,
.inventory-history-list {
    display: grid;
    gap: 12px;
}

.inventory-row,
.inventory-history-row,
.host-inventory-risk-row {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    padding: 14px;
}

.inventory-row-head {
    justify-content: space-between;
    align-items: flex-start;
}

.inventory-row h3 {
    margin: 0 0 6px;
}

.inventory-row p,
.inventory-history-row,
.inventory-notes {
    margin: 0;
    color: var(--muted);
}

.inventory-row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.inventory-adjust-inline {
    flex-wrap: wrap;
    margin-top: 12px;
}

.inventory-adjust-inline input,
.inventory-adjust-inline select {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
}

.inventory-empty {
    color: var(--muted);
    padding: 12px 0;
}

.inventory-status-low { color: #b45309; font-weight: 700; }
.inventory-status-out { color: #b42318; font-weight: 700; }
.inventory-status-healthy { color: #0f766e; font-weight: 700; }

.host-inventory-risk-row {
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .inventory-row-head,
    .host-inventory-risk-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .inventory-row-actions {
        justify-content: flex-start;
    }
}

/* Reservation slot grid (issue #146) */
.reserve-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.reserve-slot-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.reserve-slot-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

.reserve-slot-unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

.reserve-selected-slot {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 15px;
}

/* Host reservation cards (issue #146) */
.host-res-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--bg);
}

.host-res-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.source-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}
.source-reserved { background: rgba(227, 191, 61, 0.15); color: var(--accent-dark, #b45309); border: 1px solid rgba(227, 191, 61, 0.35); }
.source-walkin { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); }

.host-res-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

/* Uniform compact action button for reservation cards.
   Overrides button.primary's block/full-width defaults so all
   action buttons sit at the same height in the flex row. */
.host-res-actions .res-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 34px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-alt, #f5f5f4);
    color: var(--fg);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    white-space: nowrap;
}
.host-res-actions .res-action-btn:hover {
    border-color: var(--accent, #c0872e);
    color: var(--accent, #c0872e);
}
.host-res-actions .res-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.host-res-actions .res-action-primary {
    background: var(--accent, #e3bf3d);
    color: #111;
    border-color: transparent;
}
.host-res-actions .res-action-primary:hover {
    background: var(--accent-dark, #c0872e);
    color: #fff;
    border-color: transparent;
}
.theme-dark .host-res-actions .res-action-btn {
    background: var(--surface-alt);
    color: var(--fg);
    border-color: var(--border);
}
.theme-dark .host-res-actions .res-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--card);
}
.theme-dark .host-res-actions .res-action-primary {
    background: var(--accent);
    color: #111;
    border-color: transparent;
}
.theme-dark .host-res-actions .res-action-primary:hover {
    background: var(--accent-dark);
    color: #fff;
    border-color: transparent;
}

.reserve-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.reserve-form-actions .secondary {
    white-space: nowrap;
}

.reserve-form-actions button.primary {
    width: auto;
    margin: 0;
    flex: 1;
}

@media (max-width: 600px) {
    .host-res-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .host-res-actions {
        flex-wrap: wrap;
    }
}

/* ══════════════════════════════════════════════════════════════════
   Dark mode — component-level overrides
   (messaging preview, ops incidents, caller funnel, MCP/integrations,
    host-settings QR, staff invite, admin-danger)
   ══════════════════════════════════════════════════════════════════ */

/* Messaging tab: SMS preview */
.theme-dark .sms-preview {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .sms-preview-bubble {
    background: var(--card);
    border-color: var(--border);
}

/* Ops dashboard: incident cards */
.theme-dark .admin-ops-incident {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .admin-ops-incident-error {
    background: rgba(180, 35, 24, 0.14);
    border-left-color: #f87171;
}
.theme-dark .admin-ops-incident-warning {
    background: rgba(184, 150, 36, 0.14);
    border-left-color: #fbbf24;
}
.theme-dark .admin-ops-incident-info {
    background: rgba(31, 106, 93, 0.14);
    border-left-color: #4ade80;
}
.theme-dark .admin-ops-pill {
    background: rgba(255, 255, 255, 0.08);
}
.theme-dark .admin-ops-incident-context span {
    background: rgba(255, 255, 255, 0.06);
}

/* Caller funnel */
.theme-dark .caller-range-group {
    background: var(--surface-alt);
    border-color: var(--border);
}
.theme-dark .caller-inline-state {
    background: var(--surface-alt);
}
.theme-dark .caller-funnel-card,
.theme-dark .caller-detail-card,
.theme-dark .caller-panel {
    background: var(--card);
    border-color: var(--border);
}
.theme-dark .caller-funnel-card {
    background: linear-gradient(180deg, rgba(244, 207, 75, 0.06) 0%, var(--card) 100%);
}
.theme-dark .caller-outcome-chip {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .caller-outcome-chip.is-active {
    background: rgba(244, 207, 75, 0.12);
    border-color: var(--accent);
}
.theme-dark .caller-detail-metrics div,
.theme-dark .caller-choice-row,
.theme-dark .caller-journey-step {
    background: var(--surface-alt);
}
.theme-dark .caller-session-row:hover td,
.theme-dark .caller-session-row:focus-visible td,
.theme-dark .caller-session-row.is-active td {
    background: rgba(244, 207, 75, 0.10);
}

/* MCP / Ask OSH (Integrations tab) */
.theme-dark .mcp-ask-sample {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .mcp-config-input-row input {
    background: var(--surface-alt);
}
.theme-dark .mcp-copy-btn,
.theme-dark .mcp-reveal-btn {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--accent);
}
.theme-dark .mcp-copy-btn:hover,
.theme-dark .mcp-reveal-btn:hover {
    background: var(--card);
    border-color: var(--accent);
}
.theme-dark .mcp-setup-tabs {
    border-bottom-color: var(--border);
}
.theme-dark .mcp-tab-btn {
    color: var(--muted);
}
.theme-dark .mcp-tab-btn:hover,
.theme-dark .mcp-tab-btn.is-selected {
    color: var(--accent);
}
.theme-dark .mcp-tab-btn.is-selected {
    border-bottom-color: var(--accent);
}
.theme-dark .mcp-panel-blurb,
.theme-dark .mcp-panel-followup {
    color: var(--muted);
}
.theme-dark .mcp-panel-followup em {
    color: var(--accent);
}
.theme-dark .mcp-safety {
    background: rgba(244, 207, 75, 0.08);
    border-color: rgba(244, 207, 75, 0.25);
    color: #fde68a;
}
.theme-dark #admin-mcp-card .admin-card-tag {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

/* Host settings: QR target URL box */
.theme-dark .qr-target-url {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}

/* Admin danger button (Disconnect, etc.) */
.theme-dark button.admin-danger {
    background: var(--surface-alt);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.3);
}
.theme-dark button.admin-danger:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Staff invite form — !important needed to beat inline-style colors */
.theme-dark .invite-form {
    background: var(--surface-alt) !important;
    border-color: var(--border) !important;
}
.theme-dark .invite-form h4 {
    color: var(--muted) !important;
}
.theme-dark .invite-form label {
    color: var(--muted) !important;
}
.theme-dark .invite-form input[type="text"] {
    background: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--fg) !important;
}
.theme-dark #admin-panel-staff h3 {
    color: var(--muted) !important;
}
.theme-dark #staff-table th,
.theme-dark #pending-table th {
    color: var(--muted) !important;
    border-bottom-color: var(--border) !important;
}
.theme-dark .role-radio-option {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--fg);
}
.theme-dark .role-radio-option span span {
    color: var(--muted) !important;
}
.theme-dark .role-radio-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(244, 207, 75, 0.08);
}
.theme-dark .role-radio-option:has(input:checked) strong {
    color: var(--accent);
}

/* Integrations: inline-color loading/status text */
.theme-dark #admin-gbp-loading,
.theme-dark #admin-gbp-last-sync,
.theme-dark #admin-google-provider-body > div,
.theme-dark #admin-google-provider-last-export {
    color: var(--muted) !important;
}
