/* ============================================================================
   Butler & HOG — Catering App design system
   Palette rooted in the logo's periwinkle indigo (#363D8D darkest) on warm ivory.
   Display: Cormorant Garamond (editorial serif) · UI/body: Mulish (clean humanist)
   ========================================================================== */

/* ============================================================================
   Self-hosted fonts (Tenant Look and Feel §6.1, A3): Cormorant Garamond and
   Mulish, subset to Latin and Latin Extended (one file each, chosen by
   unicode-range, as Google served them), font-display: swap, and a system
   fallback tuned to each (size-adjust / ascent-override) so nothing jumps
   when the font arrives. Built by tools/fonts/build_fonts.py; licences in
   each folder's OFL.txt. No request leaves the app for a font.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond/CormorantGaramond-wght-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond/CormorantGaramond-wght-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond/CormorantGaramond-Italic-wght-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond/CormorantGaramond-Italic-wght-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Mulish"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/mulish/Mulish-wght-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Mulish"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/mulish/Mulish-wght-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond Fallback"; src: local("Times New Roman"), local("Times");
  size-adjust: 95.7%; ascent-override: 96.6%; descent-override: 30%; line-gap-override: 0%;
}

@font-face {
  font-family: "Mulish Fallback"; src: local("Arial"), local("Helvetica");
  size-adjust: 103.5%; ascent-override: 97.1%; descent-override: 24.2%; line-gap-override: 0%;
}

:root {
  /* — Brand colour, tweakable — */
  --accent: #3a3f8f;          /* logo indigo */
  --accent-deep: #2b2f6e;
  --accent-tint: #ecedf6;     /* pale indigo wash */
  --accent-line: #d4d6ec;

  /* — Neutrals (warm) — */
  --bg: #f4f0e8;              /* soft warm linen ground */
  --card: #ffffff;           /* crisp white card, like the site */
  --ink: #211f29;            /* warm near-black, faint indigo cast */
  --ink-soft: #4a4856;
  --muted: #837f8f;
  --line: #e6e0d3;           /* warm taupe hairline */
  --line-soft: #efeadf;

  /* — Status — */
  --danger: #9c3329;
  --danger-tint: #f6ebe9;
  --gold: #9a7b3f;           /* muted brass for accents */
  --good: #4e6b4a;
  --good-tint: #eaf0e7;

  /* — Type — */
  --serif: "Cormorant Garamond", "Cormorant Garamond Fallback", Georgia, "Times New Roman", serif;
  --sans: "Mulish", "Mulish Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* — Geometry (tweakable) — */
  --radius: 10px;
  --radius-sm: 7px;
  --tap: 48px;
  --density: 1;              /* scales vertical rhythm */
  --maxw: 1080px;

  --shadow-sm: 0 1px 2px rgba(33,31,41,.04), 0 1px 3px rgba(33,31,41,.05);
  --shadow-md: 0 2px 8px rgba(33,31,41,.06), 0 8px 28px rgba(43,47,110,.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* The `hidden` attribute ALWAYS hides. The browser's own [hidden]{display:none}
   is the weakest rule there is, so any author `display` beats it: `.btn` and
   bare `button` (inline-flex) made the quote's add-line Remove and Guest
   Planning's add-guest Delete render live while "hidden" - each deleting the
   last-edited row (WP0 audit X2/X3, 20 Nov 2026). This file is loaded by every
   base template (office, client portal, staff portal), so one rule covers all.
   An element that must keep its space while hidden says so with a MORE
   specific !important rule (see .photo-lb-foot [hidden]); never weaken this. */
[hidden] { display: none !important; }

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

/* faint paper texture on the ground */
.app-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(58,63,143,.05), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(154,123,63,.04), transparent 55%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .002em; color: var(--ink); }
h1 { font-size: 2.1rem; line-height: 1.08; margin: 0 0 .15em; }
h2 { font-size: 1.5rem; line-height: 1.15; margin: 0 0 .2em; }
h3 { font-size: 1.18rem; margin: 0 0 .25em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tnum { font-variant-numeric: tabular-nums; }

/* serif eyebrow / overline */
.eyebrow {
  font-family: var(--sans);
  font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .5em;
}

/* ============================================================================
   App shell + top bar
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 0 22px; height: 68px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word .name {
  font-family: var(--serif); font-size: 1.34rem; font-weight: 600; color: var(--ink);
  letter-spacing: .01em;
}
.brand-word .name b { font-weight: 600; }
.brand-word .name .amp { color: var(--accent); font-style: italic; }
.brand-word .sub {
  font-size: .6rem; font-weight: 800; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}

.mainnav { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.navlink {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 6px 16px; border-radius: var(--radius-sm);
  font-family: var(--serif); font-size: 1.18rem; font-weight: 600; line-height: 1.1; text-align: center;
  color: var(--ink-soft); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, color .15s;
}
.navlink svg { width: 18px; height: 18px; opacity: .7; }
.navlink:hover { background: var(--accent-tint); color: var(--accent-deep); }
.navlink.active { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }
.navlink.active svg { opacity: 1; }

.who { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--muted); }
.who .avatar {
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .82rem;
  font-family: var(--sans); letter-spacing: .02em;
}
.who .meta { display: flex; flex-direction: column; line-height: 1.15; }
.who .meta .uname { color: var(--ink); font-weight: 700; }
.linkbtn { background: none; border: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; opacity: .8; }
.linkbtn:hover { opacity: 1; }

/* ============================================================================
   Layout
   ========================================================================== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: calc(30px * var(--density)) 22px 80px; }
.container.narrow { max-width: 760px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: calc(22px * var(--density));
}
.page-head .titles { min-width: 0; }
.page-head h1 { margin-bottom: .12em; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); margin-bottom: .5em; }
.crumbs a { color: var(--muted); font-weight: 700; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }
.meta-line { color: var(--muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.meta-line .dot { width: 3px; height: 3px; border-radius: 999px; background: currentColor; opacity: .5; }

/* ============================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: calc(20px * var(--density)) 22px; }
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2, .card-head h3 { margin: 0; }
.section-label {
  font-family: var(--sans); font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}

/* event cards (list) */
.event-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden; }
.event-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-card .ec-body { padding: 20px 22px; display: flex; align-items: center; gap: 18px; }
.ec-date {
  flex: none; width: 64px; text-align: center; border-right: 1px solid var(--line-soft); padding-right: 16px;
}
.ec-date .mon { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ec-date .day { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--ink); }
.ec-date .yr { font-size: .72rem; color: var(--muted); }
.ec-main { flex: 1; min-width: 0; }
.ec-main .name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.ec-main .meta-line { font-size: .9rem; }
.ec-tail { flex: none; display: flex; align-items: center; gap: 18px; }
.ec-count { text-align: center; }
.ec-count .n { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); line-height: 1; }
.ec-count .l { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ============================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px;
  font-family: var(--sans); font-size: .95rem; font-weight: 800; line-height: 1;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg); color: var(--ink); border-color: var(--accent-line); }
.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--accent-tint); color: var(--accent-deep); }
.btn-danger { background: var(--card); color: var(--danger); border-color: #e2cfcc; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); border-color: #d8b8b4; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .85rem; }
.btn-icon { min-height: var(--tap); width: var(--tap); padding: 0; }
.btn-icon.btn-sm { width: 38px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ============================================================================
   Badges / chips
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep);
  border: 1px solid var(--accent-line);
}
.badge-soft { background: var(--bg); color: var(--muted); border-color: var(--line); }
.badge-gold { background: #f5efe2; color: var(--gold); border-color: #e6dcc4; }
.badge-good { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.type-chip {
  font-family: var(--sans); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================================
   Tabs (working lists)
   ========================================================================== */
.tab {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-weight: 800; font-size: .95rem; color: var(--ink-soft); cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.tab svg { width: 19px; height: 19px; opacity: .65; }
.tab:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-md); }
.tab.active svg { opacity: 1; }


/* ============================================================================
   Tick lists
   ========================================================================== */
.group { margin-top: calc(26px * var(--density)); }
.group:first-child { margin-top: 0; }
.group-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--accent);
}
.group-title .g-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.group-title .g-meta { font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.ticklist { list-style: none; margin: 0; padding: 0; }
.tickrow {
  display: flex; align-items: flex-start; gap: 14px;
  padding: calc(13px * var(--density)) 4px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.tickrow:last-child { border-bottom: none; }
.tickbox {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px;
  border: 1.5px solid var(--accent-line); background: var(--card);
  display: grid; place-items: center; transition: all .12s;
}
.tickbox svg { width: 17px; height: 17px; stroke: #fff; opacity: 0; transform: scale(.6); transition: all .12s; }
.tickrow:hover .tickbox { border-color: var(--accent); }
.tickrow.checked .tickbox { background: var(--accent); border-color: var(--accent); }
.tickrow.checked .tickbox svg { opacity: 1; transform: scale(1); }
.tick-main { flex: 1; min-width: 0; }
.tick-name { font-weight: 700; color: var(--ink); }
.tickrow.checked .tick-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-line); }
.tick-sub { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; margin-top: 2px; }
/* A single tick inside a form (the client form's "same as the default venue"):
   the tickrow pattern at a 44px touch target, without the form label's caps. */
label.form-tick { align-items: center; min-height: 44px; margin: 14px 0 0; padding: 6px 0;
  border-bottom: none; font-size: 1rem; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--ink); }
label.form-tick input { flex: none; width: 24px; height: 24px; min-height: 0; margin: 0;
  accent-color: var(--accent); }
.billing-preview { white-space: pre-line; margin: 6px 0 2px; color: var(--ink-soft); }
.bill-to { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.bill-to a { display: inline-block; padding: 8px 0; margin: -8px 0; }
.bill-note { margin: 10px 0 0; }

/* method list */
.method { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: step; }
.method li { position: relative; padding: 7px 0 7px 38px; color: var(--ink-soft); font-size: .95rem; border-bottom: 1px dashed var(--line-soft); }
.method li:last-child { border-bottom: none; }
.method li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 7px; width: 24px; height: 24px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-deep); font-family: var(--sans);
  font-weight: 800; font-size: .78rem; display: grid; place-items: center;
}

/* ============================================================================
   Forms
   ========================================================================== */
label.field-label { display: block; font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
/* The fields' tap height; a textarea's is its own (below), so it isn't set
   twice (register D3's override pair, merged in WP6 §6.3). */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], select { min-height: var(--tap); }
/* Search inputs styled via the shared rule above keep the app look, but drop the
   webkit decorations that don't fit it. (Inside .searchbar they're overridden.) */
input[type=search] { -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px; }
.field-row > div { flex: 1; min-width: 150px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.stepper button { width: 40px; min-height: 42px; border: none; background: var(--card); color: var(--accent); font-size: 1.3rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--accent-tint); }
.stepper input { width: 54px; min-height: 42px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0; }
.stepper input:focus { box-shadow: none; }

/* line editor (dish edit) */
.line-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.line-edit .grow { flex: 1 1 200px; min-width: 150px; }
.line-edit .narrow { flex: 0 1 150px; }

/* ============================================================================
   Tables
   ========================================================================== */
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-family: var(--sans); font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  padding: 0 10px 10px; border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-tint); }

/* ============================================================================
   Dish library
   ========================================================================== */
.dish-row { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.dish-row:last-child { border-bottom: none; }
.dish-row:hover .d-name { color: var(--accent-deep); }
.dish-thumb { flex: none; width: 56px; height: 56px; border-radius: 9px; overflow: hidden; background: var(--accent-tint); display: grid; place-items: center; }
.dish-thumb svg { width: 24px; height: 24px; color: var(--accent); opacity: .55; }
.d-main { flex: 1; min-width: 0; }
.d-name { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; color: var(--ink); }
.d-stats { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.d-stats b { color: var(--ink-soft); font-weight: 800; }

/* ============================================================================
   Login
   ========================================================================== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; background: var(--accent-deep); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
}
.login-art .art-bg { position: absolute; inset: 0; opacity: .14;
  background-image: radial-gradient(circle at 20% 30%, #fff 1px, transparent 1.5px);
  background-size: 26px 26px; }
.login-art .art-logo {
  box-sizing: content-box; height: 220px; width: auto; align-self: center; position: relative;
  background: #fff; padding: 26px 38px; border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.login-art .art-foot { position: relative; }
.login-art .art-quote { font-family: var(--serif); font-size: 1.7rem; font-style: italic; line-height: 1.3; max-width: 22ch; }
.login-art .art-by { margin-top: 12px; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.login-form-col { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .eyebrow { text-align: left; }

/* ============================================================================
   Misc
   ========================================================================== */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; background: var(--accent-tint); display: grid; place-items: center; color: var(--accent); }
.empty .ico svg { width: 28px; height: 28px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: none; }
.flash { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 700; font-size: .92rem; border: 1px solid; }
.flash svg { width: 18px; height: 18px; flex: none; }
.flash-success { background: var(--good-tint); border-color: #cdddc7; color: var(--good); }

.fade-in { animation: fadeIn .28s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================================================
   Expanded app — menus, modals, status, proposals, customers, hire, AI, help
   ========================================================================== */
.badge-amber { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.badge-danger { background: var(--danger-tint); color: var(--danger); border-color: #e2cfcc; }

/* avatar circle (used outside the top bar too — customer cards, users table) */
.avatar { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: .82rem; font-family: var(--sans); letter-spacing: .02em; flex: none; }

.menu-wrap { position: relative; display: inline-flex; }
.menu {
  position: absolute; top: calc(100% + 8px); min-width: 210px; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  animation: menuPop .14s ease both;
}
.menu.right { right: 0; } .menu.left { left: 0; }
@keyframes menuPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: none; border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: .92rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.menu-item svg { color: var(--muted); flex: none; }
.menu-item:hover { background: var(--accent-tint); color: var(--accent-deep); }
.menu-item:hover svg { color: var(--accent); }
.menu-item.on { background: var(--accent-tint); color: var(--accent-deep); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-tint); }
.menu-item.danger svg { color: var(--danger); }
.menu-div { height: 1px; background: var(--line-soft); margin: 5px 4px; }

/* ============================================================================
   COMBINED SHOPPING LIST — pickers, summary, three-state rows, breakdown
   ========================================================================== */
.btn.disabled { opacity: .5; pointer-events: none; }
.picker-grid { display: grid; grid-template-columns: 1.5fr 1px 1fr; }
.picker-div { background: var(--line-soft); }
.picker-col { padding: 20px 22px; min-width: 0; }
.picker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.picker-actions { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.picker-actions .linkbtn { font-weight: 700; }
.picker-subhead { font-family: var(--sans); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }

.ev-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ev-tile { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); transition: border-color .12s, background .12s; font-family: var(--sans); }
.ev-tile:hover { border-color: var(--accent-line); }
.ev-tile.on { border-color: var(--accent); background: var(--accent-tint); }
.ev-tile-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--accent-line); background: var(--card); display: grid; place-items: center; color: #fff; transition: all .12s; }
.ev-tile.on .ev-tile-box { background: var(--accent); border-color: var(--accent); }
.ev-tile-main { display: flex; flex-direction: column; min-width: 0; }
.ev-tile-name { font-weight: 700; color: var(--ink); line-height: 1.2; }
.ev-tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); margin-top: 2px; }

.past7 { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.past7 input { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); cursor: pointer; }

.sup-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 10px 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; transition: all .12s; font-family: var(--sans); }
.sup-pill:hover { border-color: var(--accent-line); }
.sup-pill.on { background: var(--accent); border-color: var(--accent); }
.sp-name { font-weight: 800; font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.sup-pill.on .sp-name { color: #fff; }
.sp-count { min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sup-pill.on .sp-count { background: rgba(255,255,255,.22); color: #fff; }

.combo-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 18px 0 14px; padding: 13px 18px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius); }
.cs-left { display: flex; flex-direction: column; gap: 1px; }
.cs-sup { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--accent-deep); line-height: 1.05; }
.cs-meta { font-size: .85rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.cs-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.cs-gen { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-hint { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }

.combo-list { margin-top: 2px; }
.combo-row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft); }
.combo-row:last-child { border-bottom: none; }
.combo-tick { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--accent-line); display: grid; place-items: center; color: #fff; }
.combo-tick.all { background: var(--accent); border-color: var(--accent); }
.combo-tick.some { background: linear-gradient(90deg, var(--accent) 0 50%, var(--card) 50% 100%); border-color: var(--accent); }
.combo-tick.none { background: var(--card); }
.combo-main { flex: 1; min-width: 0; }
.combo-headline { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.combo-name { font-weight: 700; color: var(--ink); }
.combo-row.state-all .combo-name { color: var(--ink-soft); }
.combo-variants { margin-left: 8px; font-size: .72rem; font-weight: 700; color: var(--muted); border-bottom: 1px dotted var(--line); cursor: help; }
.combo-qty { flex: none; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.combo-count { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.combo-count.some { background: #f6efe1; color: #876a2b; border: 1px solid #e6dcc4; }
.combo-count.all { background: var(--good-tint); color: var(--good); border: 1px solid #cdddc7; }
.combo-total { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.combo-total .cu { font-size: .8rem; color: var(--muted); }
.combo-unit { font-size: .92rem; font-weight: 700; color: var(--muted); }

.combo-breakdown { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }
.cb-event { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: .85rem; line-height: 1.45; }
.cb-dot { flex: none; width: 5px; height: 5px; border-radius: 999px; background: var(--accent); align-self: center; opacity: .65; }
.cb-ev-name { font-weight: 700; color: var(--ink); }
.cb-ev-date { font-size: .76rem; color: var(--muted); }
.cb-ev-qty { font-weight: 800; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.cb-dishes { color: var(--muted); display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cb-dish { color: var(--ink-soft); }
.cb-x { color: var(--muted); font-variant-numeric: tabular-nums; }
.cb-draft { margin-left: 4px; font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; background: #f6efe1; color: #876a2b; }
.cb-sep { color: var(--muted); opacity: .55; }
.cb-note { display: flex; align-items: flex-start; gap: 6px; font-size: .82rem; color: var(--gold); font-style: italic; line-height: 1.4; }
.cb-note svg { flex: none; margin-top: 2px; color: var(--gold); opacity: .8; }
.cb-note-ev { color: var(--muted); font-style: normal; }

@media (max-width: 760px) {
  .picker-grid { grid-template-columns: 1fr; }
  .picker-div { height: 1px; width: auto; }
  .combo-summary { flex-direction: column; align-items: flex-start; }
  .cs-right { align-items: flex-start; text-align: left; }
}

.menu-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px 9px;
  font-family: var(--sans); font-size: .8rem; font-weight: 800; color: var(--muted);
  border-bottom: 1px solid var(--line-soft); margin-bottom: 4px;
}
.menu-head svg { color: var(--accent); flex: none; }

/* Account button (top-right user chip is now a dropdown trigger). */
.who-btn {
  display: flex; align-items: center; gap: 12px; background: none; border: none;
  padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
}
.who-btn .meta span:last-child { display: inline-flex; align-items: center; gap: 4px; }

/* Padlock convention (spec §3.3): a coordinator-locked affordance is shown but
   muted, tagged with a padlock, and inert. */
.btn-locked {
  color: var(--muted) !important; background: var(--bg) !important;
  border-color: var(--line) !important; box-shadow: none !important;
  cursor: not-allowed; opacity: .85;
}
.btn-locked:hover { background: var(--bg) !important; color: var(--muted) !important; }
.btn-locked svg { color: var(--muted) !important; }
.menu-item.btn-locked { background: none !important; }
.menu-item.btn-locked svg:last-child { margin-left: auto; }

/* Actor chip (spec §6.3) — "who did this", user vs client. */
.actor-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .82rem; color: var(--muted); font-weight: 600;
}
.actor-chip svg { color: var(--muted); flex: none; }
.actor-chip.actor-client svg { color: var(--accent); }
.actor-line { color: var(--muted); font-size: .85rem; }
.actor-line .actor-chip { display: inline-flex; }

/* Modals are native <dialog>s opened with showModal() (WP6 §6.9, js/dialog.js).
   The dialog itself is the dim layer, as the old wrapper div was; the card is
   inside. display only when open - never on a closed dialog. */
dialog.modal-backdrop { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; border: 0; color: inherit; background: rgba(33,31,41,.42); backdrop-filter: blur(2px);
  align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto; }
dialog.modal-backdrop[open] { display: flex; animation: fadeIn .15s ease both; }
dialog.modal-backdrop::backdrop { background: transparent; }
/* MANDATORY (both): without them scrolling over the backdrop or inside the
   dialog scrolls the page behind it (the modern-web-guidance dialog guide). */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.modal-card { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 520px; box-shadow: 0 24px 60px rgba(33,31,41,.3); overflow: hidden; animation: menuPop .16s ease both; }
.modal-card.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--bg); }

.copyfield { position: relative; }
.copyfield textarea { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86rem; line-height: 1.5; color: var(--ink-soft); background: var(--bg); border-color: var(--line); white-space: pre; }
.copyfield .copy-btn { position: absolute; top: 10px; right: 10px; z-index: 2; min-height: 36px; }
.copyfield .copy-btn.ok { background: var(--good); border-color: var(--good); }


/* search bar (customers list, reusable) */
.searchbar { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; max-width: 480px; box-shadow: var(--shadow-sm); }
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.searchbar svg { color: var(--muted); flex: none; }
.searchbar input { flex: 1 1 auto; border: none; box-shadow: none; background: none; padding: 7px 0; min-height: 0; font-size: .95rem; }
.searchbar input:focus { outline: none; box-shadow: none; }
.searchbar .sb-clear { flex: none; min-height: 0; padding: 4px; border-radius: 999px; background: none; border: none; color: var(--muted); cursor: pointer; }
.searchbar .sb-clear:hover { background: var(--accent-tint); color: var(--accent-deep); }

/* sortable customer table */
.cust-table { width: 100%; border-collapse: collapse; }
.cust-table .sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
.cust-table .sort-th:hover { color: var(--accent-deep); }
.cust-table tbody td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cust-table tbody tr:last-child td { border-bottom: none; }
.cust-tr { cursor: pointer; transition: background .12s; }
.cust-tr:hover { background: var(--accent-tint); }
.ct-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); display: block; line-height: 1.15; }
.cust-tr:hover .ct-name { color: var(--accent-deep); }
.ct-sub { display: block; color: var(--muted); font-size: .84rem; }

.deflist { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.deflist dt { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.deflist dd { margin: 0; font-weight: 600; color: var(--ink); }

.row-card { display: flex; align-items: center; gap: 14px; padding: 15px 18px; }
.row-card .rc-main { flex: 1; min-width: 0; }
.row-card .rc-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.row-card a.rc-name:hover { color: var(--accent-deep); }
.row-card .rc-sub { color: var(--muted); font-size: .88rem; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }

.prop-section { margin-bottom: 16px; }
.prop-section .ps-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
/* Collapsible library sections — collapsed by default; the header stays live
   (compose checkbox + inline edit) while the dishes hide behind the chevron. */
.prop-section:has(.ps-body[hidden]) .ps-head { border-bottom: none; }
.ps-collapse { display: inline-flex; align-items: center; gap: 4px; flex: none; background: none;
  border: 1px solid var(--line-soft); border-radius: 8px; padding: 3px 7px; cursor: pointer;
  color: var(--ink-soft, #6b6b6b); }
.ps-collapse:hover { background: var(--line-soft); }
.ps-collapse svg { transition: transform .15s ease; }
.ps-collapse[aria-expanded="false"] svg { transform: rotate(-90deg); }
.ps-collapse .ps-count { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.prop-section .ps-body[hidden] { display: none; }
.prop-section .ps-head .ps-title-in { flex: 1; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.opt-row:last-of-type { border-bottom: none; }
.opt-row .drag { color: var(--muted); cursor: grab; display: grid; place-items: center; flex: none; opacity: .6; }
.opt-row:hover .drag { opacity: 1; }
.opt-row.dragging { opacity: .45; }
.opt-row .o-name { flex: 1; font-weight: 700; color: var(--ink); }
.opt-add { display: flex; gap: 10px; padding: 14px 18px; align-items: center; background: var(--bg); border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.opt-add input { flex: 1; min-width: 200px; }
.opt-add .dish-combo { flex: 1; min-width: 200px; }   /* §51 B — the shared picker */
.opt-add .dish-combo > input { min-width: 0; }
.ds-create .ds-name { font-weight: 600; color: var(--accent); }
.section-note-chip { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-tint); border: 1px solid var(--accent-line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

.lock-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid #e6dcc4; background: #f6efe1; color: #6f5a23; margin-bottom: 16px; font-weight: 600; }
.lock-banner svg { flex: none; color: #9a7b3f; }

.conf-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conf-list { list-style: none; margin: 8px 0 0; padding: 0; }
.conf-list li { display: flex; align-items: baseline; gap: 11px; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
.conf-list li:last-child { border-bottom: none; }
.conf-tag { flex: none; min-width: 74px; text-align: center; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 999px; }
.t-match { background: var(--good-tint); color: var(--good); }
.t-qty { background: #f6efe1; color: #876a2b; }
.t-missing { background: var(--danger-tint); color: var(--danger); }
.t-extra { background: #eef0f7; color: #4a5891; }
.t-price { background: var(--accent-tint); color: var(--accent-deep); }
.conf-flags { list-style: none; margin: 6px 0 14px; padding: 12px 14px; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: var(--radius-sm); }
.conf-flags li { display: flex; gap: 9px; align-items: flex-start; color: #6f5a23; font-size: .9rem; font-weight: 600; padding: 3px 0; }
.conf-flags li svg { flex: none; color: #9a7b3f; margin-top: 1px; }
/* price discrepancies read as a distinct (money) group, not the amber qty/date flags */
.conf-flags-price { background: var(--accent-tint); border-color: var(--accent-line); }
.conf-flags-price li { color: var(--accent-deep); }
.conf-flags-price li svg { color: var(--accent); }
/* "AI is thinking" band — shown while the confirmation check runs (sync, a few sec) */
.conf-thinking { display: flex; align-items: center; gap: 13px; margin-top: 8px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: var(--accent-tint); color: var(--accent-deep); font-weight: 700; font-size: .9rem; }
.conf-thinking[hidden] { display: none; }   /* [hidden] must beat display:flex */
.conf-dots { letter-spacing: 1px; }
.conf-dots i { font-style: normal; font-weight: 900; animation: confBlink 1.4s infinite both; }
.conf-dots i:nth-child(2) { animation-delay: .2s; }
.conf-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes confBlink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.dropzone { border: 1.5px dashed var(--accent-line); border-radius: var(--radius); background: var(--accent-tint); padding: 26px 20px; text-align: center; }
.dropzone .dz-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 13px; background: var(--card); display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-sm); }

.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 84%; }
.chat-msg.user { align-self: flex-end; }
.chat-msg.assistant { align-self: flex-start; }
.chat-who { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.chat-msg.user .chat-who { justify-content: flex-end; }
.chat-body { white-space: pre-wrap; border-radius: 14px; padding: 12px 15px; font-size: .95rem; line-height: 1.5; }
.chat-msg.assistant .chat-body { background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-body { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-who .ai-dot { width: 16px; height: 16px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { font-size: .85rem; font-weight: 600; color: var(--accent-deep); background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background .12s; text-align: left; }
.chip:hover { background: #e1e3f1; }

.ai-hero { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(180deg, var(--accent-tint), var(--card)); border: 1px solid var(--accent-line); margin-bottom: 16px; }
.ai-hero .ai-badge { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }

.event-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.event-tabs a { flex: 1; min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); font-weight: 800; font-size: .92rem; color: var(--ink-soft); cursor: pointer; text-decoration: none; transition: all .12s; }
.event-tabs a svg { opacity: .65; }
.event-tabs a:hover { background: var(--card); color: var(--accent-deep); }
.event-tabs a.active { background: var(--card); color: var(--accent-deep); box-shadow: var(--shadow-sm); border: 1px solid var(--accent-line); }
.event-tabs a.active svg { opacity: 1; color: var(--accent); }

.event-cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.event-cta .cta { display: flex; align-items: center; gap: 14px; min-height: 112px; text-decoration: none; color: inherit; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); transition: all .15s; }
.event-cta .cta:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-cta .cta .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deep); flex: none; }
.event-cta .cta h3 { margin: 0; font-size: 1.12rem; }
.event-cta .cta .sub { color: var(--muted); font-size: .85rem; }
.event-cta .cta .tail { margin-left: auto; color: var(--accent); flex: none; }

.equip-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.equip-row:last-child { border-bottom: none; }
.equip-row .eq-ico { width: 44px; height: 44px; border-radius: 9px; background: var(--accent-tint); display: grid; place-items: center; color: var(--accent); flex: none; opacity: .9; }
.equip-row .eq-main { flex: 1; min-width: 0; }
.equip-row .eq-name { font-weight: 700; color: var(--ink); }
.equip-row .eq-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 3px; font-size: .85rem; color: var(--muted); align-items: center; }
.basis-chip { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); }
/* imported hire-catalogue items shown on the equipment library page */
.cat-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); border: 1px solid var(--accent-line); vertical-align: middle; margin-left: 6px; }
.cat-badge svg { opacity: .85; }
.equip-row.is-catalogue { background: var(--bg); }

/* dish usage chips (Used in N templates / events) */
.usage { display: flex; gap: 6px; align-items: center; }
.use-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); border: 1px solid var(--accent-line); white-space: nowrap; }
.use-chip svg { opacity: .8; }
.use-chip.none { background: var(--bg); color: var(--muted); border-color: var(--line); }


/* dish detail "Goes to" cell */
.goesto { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.goesto svg { flex: none; }
.goesto.venue { color: var(--good); }
.goesto.prep { color: var(--ink-soft); }
.goesto.prep svg { color: var(--accent); }

/* allergens */
.alg-summary { display: flex; flex-direction: column; gap: 10px; }
.alg-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.alg-lbl { flex: none; width: 96px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.alg-lbl.mc { color: var(--muted); }
.alg-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.alg-chip { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #f3e7df; color: #7a3b1e; border: 1px solid #e6cdbd; }
.alg-chip.mc { background: var(--card); color: var(--muted); border: 1px dashed var(--line); font-weight: 500; font-style: italic; }
.alg-caveat { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: var(--radius-sm); color: #6f5a23; font-size: .82rem; line-height: 1.5; }
.alg-caveat svg { flex: none; color: #9a7b3f; margin-top: 1px; }
/* tap-to-toggle chips (dish editor) */
.alg-toggle-grid { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 2px; }
.alg-toggle { font-size: .8rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--card); color: var(--ink-soft); border: 1px solid var(--line); cursor: pointer; transition: all .12s; min-height: 34px; }
.alg-toggle:hover { border-color: var(--accent-line); }
.alg-toggle.on { background: #f3e7df; color: #7a3b1e; border-color: #d9a98c; }
.alg-toggle.on.mc { background: var(--card); color: var(--accent-deep); border-color: var(--accent); border-style: dashed; }
/* AI/seed-suggested allergen tags awaiting human review (verify against label). */
.alg-toggle.on.unconfirmed { background: #fdf3d6; color: #8a6d12; border-color: #e6c971; border-style: dashed; }
.alg-chip.unconfirmed { background: #fdf3d6; color: #8a6d12; border: 1px dashed #e6c971; font-style: normal; font-weight: 700; }
.alg-review { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; color: #8a6d12; }
.alg-review svg { color: #b8902a; flex: none; }
/* Allergen-memory row actions */
.alg-mem-actions { white-space: nowrap; text-align: right; vertical-align: middle; }
.alg-mem-actions .btn { margin-left: 6px; }
/* Per-event shopping supplier move + copy-list controls */
.section-tools { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
/* Category sub-headers within a supplier section on the shopping list */
.ticklist .cat-row { display: block; padding: 9px 0 1px; border: none; }
.ticklist .cat-row .cat-label { font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ticklist .cat-row:first-child { padding-top: 0; }
.alg-inline { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.alg-mini { font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: #f3e7df; color: #7a3b1e; }
.alg-mini.mc { background: var(--bg); color: var(--muted); font-style: italic; font-weight: 600; }

/* "where it's used" — light footer note on the dish page */
.usedin { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.usedin-line { display: flex; gap: 12px; font-size: .9rem; line-height: 1.5; }
.usedin-label { flex: none; width: 88px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.usedin-names { color: var(--ink-soft); }

.help-prose h2 { margin-top: 0; }
.help-prose h3 { font-size: 1.16rem; color: var(--accent-deep); margin-top: 1.2em; }
.help-prose ul { margin: .4em 0 1em; padding-left: 0; list-style: none; }
.help-prose ul li { position: relative; padding: 5px 0 5px 24px; color: var(--ink-soft); }
.help-prose ul li::before { content: ""; position: absolute; left: 6px; top: 13px; width: 6px; height: 6px; border-radius: 999px; background: var(--accent-line); }
.help-prose ul li strong { color: var(--ink); font-weight: 700; }
/* Who can do what (WP7 §7.3) - rendered from app/permissions.py. */
.help-table { width: 100%; border-collapse: collapse; margin: .6em 0 1em; }
.help-table th, .help-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.help-table th { color: var(--ink); font-weight: 700; }
.help-table td:last-child { width: 38%; color: var(--ink); }
@media (max-width: 600px) { .help-table td:last-child { width: auto; } }
/* Help — contents nav + search */
.help-toc .help-search { width: 100%; min-height: 46px; }
.help-toc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.help-toc-links a { font-size: .86rem; font-weight: 700; color: var(--accent-deep); text-decoration: none; padding: 6px 12px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-tint); transition: background .12s, color .12s, border-color .12s; }
.help-toc-links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.help-toc-links a[hidden] { display: none; }
.js-help-card { scroll-margin-top: 78px; }
.js-help-card[hidden] { display: none; }
.help-noresult { color: var(--muted); font-style: italic; margin: 4px 2px; }
.help-noresult[hidden] { display: none; }

.page-intro { color: var(--muted); font-size: 1rem; max-width: 70ch; margin: -8px 0 20px; }
.imeta { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 760px) {
  .event-cta { grid-template-columns: 1fr; }
  .deflist { grid-template-columns: 1fr; gap: 4px 0; }
  .deflist dd { margin-bottom: 10px; }
}




/* mobile nav toggle + drawer */
.nav-toggle { display: none; margin-left: auto; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.mobile-nav { display: none; }

/* iPad/responsive */
@media (max-width: 900px) {
.login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .brand-word .sub { display: none; }
}
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; position: relative; gap: 12px; }
  .mainnav { display: none; }
  .who { display: none; }
  .ec-tail { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav {
    display: none; flex-direction: column; gap: 2px;   /* .open shows it (below) */
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 8px;
    max-height: calc(100vh - 66px); overflow: auto;
    animation: menuPop .14s ease both;
  }
  .mobile-nav .m-link {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    min-height: 48px; padding: 0 14px; border: none; background: none; border-radius: var(--radius-sm);
    font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  }
  .mobile-nav .m-link svg { color: var(--muted); flex: none; }
  .mobile-nav .m-link.active { background: var(--accent-tint); color: var(--accent-deep); }
  .mobile-nav .m-link.active svg { color: var(--accent); }
  .mobile-nav .m-link:active { background: var(--accent-tint); }
  .mobile-nav .m-divider {
    font-family: var(--sans); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted); padding: 12px 14px 5px; border-top: 1px solid var(--line-soft); margin-top: 4px;
  }
  .mobile-nav .m-divider:first-child { border-top: none; margin-top: 0; }
}

/* ============================================================================
   PRINT PREVIEW — paginated A4 sheets (same look on screen and on paper)
   ========================================================================== */

.sheet {
  width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 14mm 16mm;
  background: #fff; color: #000; box-shadow: 0 6px 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column; font-family: var(--sans); font-size: 9.5pt; line-height: 1.34;
}
.sheet.measure { position: absolute; left: -99999px; top: 0; visibility: hidden; pointer-events: none; box-shadow: none; }


/* content */
.sheet .group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1.2px solid #000; margin: 10px 0 2px; padding-bottom: 3px; }
.sheet .g-name { font-family: var(--serif); font-size: 11.5pt; font-weight: 600; }
.sheet .g-meta { font-size: 7.5pt; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #666; }
.sheet .tickrow { display: flex; align-items: flex-start; gap: 9px; padding: 3px 2px; border-bottom: 1px solid #d6d6d6; }
.sheet .tickbox { flex: none; width: 12px; height: 12px; margin-top: 2px; border: 1.2px solid #000; border-radius: 2px; background: #fff; }
.sheet .tickbox svg { display: none; }
.sheet .tick-name { font-size: 9.5pt; font-weight: 700; color: #000; }
.sheet .tick-sub { display: block; font-size: 8pt; color: #555; margin-top: 0; }
.sheet .method { margin: 3px 0 0; padding: 0; list-style: none; counter-reset: step; }
.sheet .method li { position: relative; padding: 3px 0 3px 28px; font-size: 8.5pt; border-bottom: 1px dashed #ddd; color: #222; }
.sheet .method li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 999px; background: #eee; color: #000; font-family: var(--sans); font-weight: 800; font-size: 7pt; display: grid; place-items: center; }



/* ============================================================================
   PRINT — A4, black-on-white, empty boxes, no chrome
   ========================================================================== */
@media print {
  /* margin baked into content padding (below) so it survives Chrome's
     "Margins: None" dialog setting, which ignores @page margins. */
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; color: #000 !important; font-size: 9.5pt; line-height: 1.32; }

/* the live list view's own fallback chrome is redundant while previewing */
.app-bg, .topbar, .btn, .btn-row, .no-print, .flash, .crumbs { display: none !important; }
  .container { max-width: none; margin: 0; padding: 16mm 18mm; }
  .card { border: none; box-shadow: none; background: #fff; }
  .card-pad { padding: 0; }
  .card + .card { margin-top: 0; }
  a { color: #000; }

  h1 { font-size: 16pt; }
  h2 { font-size: 12pt; }

  /* printed header */

.group { margin-top: 0; }
  .group-title { border-bottom: 1.2px solid #000; break-after: avoid; margin-top: 12px; padding-bottom: 3px; margin-bottom: 2px; }
  .group-title .g-name { font-size: 11.5pt; }
  .group-title .g-meta { font-size: 7.5pt; }

  .ticklist { columns: 1; }
  .tickrow { border-bottom: 1px solid #d4d4d4 !important; padding: 3px 2px; gap: 9px; break-inside: avoid; cursor: auto; }
  .tickrow .tickbox { margin-top: 0; }
  .tick-name { font-size: 9.5pt; }
  .tickrow.checked .tick-name { color: #000; text-decoration: none; }
  .tickbox { width: 12px; height: 12px; border: 1.2px solid #000 !important; background: #fff !important; border-radius: 2px; }
  .tickbox svg { display: none; }
  .tick-sub { color: #555; font-size: 8pt; margin-top: 0; }
.method { margin-top: 2px; }
  .method li { padding: 3px 0 3px 30px; font-size: 8.5pt; }
  .method li::before { background: #eee; color: #000; width: 20px; height: 20px; top: 3px; font-size: 7pt; }

}

/* ============================================================================
   LEGACY COMPATIBILITY LAYER
   Carries over selectors the live Jinja templates still rely on (bare <button>
   and <input type=submit>, native-checkbox tick lists, old flash/badge/list-tab
   classes, etc.) so screens render correctly while they are ported one by one.
   As each template moves to the new markup these rules become unused; prune at
   the end of the redesign.
   ========================================================================== */

/* token aliases (old names used in a few places) */
:root { --accent-dark: var(--accent-deep); --warn: var(--gold); }

/* CSS-driven menu/drawer toggling (ui.js adds/removes .open) */
.menu-wrap > .menu { display: none; }
.menu-wrap.open > .menu { display: flex; }

/* The modal backdrop is display:flex, which would override the `hidden`
   attribute's display:none — so a [hidden] modal still showed (and couldn't be
   dismissed). Make `hidden` win. Same applies to badges/chip-forms (display:
   inline-flex) toggled via the `hidden` attribute (e.g. the run-sheet publish
   chips, the confirmed-only payment chip). */
.badge[hidden], .chip-form[hidden] { display: none !important; }

/* Collapsible page help (.page-intro): a small Hide button on the note and a
   'Show tips' pill when collapsed (ui.js wires it up; choice persists). */
.page-intro { position: relative; padding-right: 58px; }
.help-hide {
  position: absolute; top: -2px; right: 0; background: none; border: none;
  min-height: 0; padding: 2px 6px; cursor: pointer;
  font-family: var(--sans); font-size: .7rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.help-hide:hover { color: var(--accent-deep); background: none; }
.help-show {
  display: inline-flex; align-items: center; gap: 6px; background: none;
  border: 1px solid var(--line); border-radius: 999px; min-height: 0;
  padding: 4px 12px; margin: -6px 0 16px; cursor: pointer;
  font-family: var(--sans); font-size: .72rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.help-show:hover { border-color: var(--accent-line); color: var(--accent-deep); background: none; }
.help-show[hidden] { display: none; }
@media (max-width: 680px) {
  .mobile-nav.open { display: flex; }
}

/* bare buttons + submit inputs share the primary button look */
button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px;
  font-family: var(--sans); font-size: .95rem; font-weight: 800; line-height: 1;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
button:hover, input[type=submit]:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
button:disabled, .btn:disabled, input[type=submit]:disabled { opacity: .5; cursor: not-allowed; }
/* keep helper button variants overriding the bare-button default */
button.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
button.btn-secondary:hover { background: var(--bg); color: var(--ink); border-color: var(--accent-line); }
button.btn-danger { background: var(--card); color: var(--danger); border-color: #e2cfcc; }
button.btn-danger:hover { background: var(--danger-tint); color: var(--danger); border-color: #d8b8b4; }
button.btn-ghost, button.linkbtn { background: none; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .85rem; }

/* generic uppercase labels (templates use bare <label>) */
label { display: block; font-weight: 800; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 6px; }
.inline-form { display: inline; }
code { background: var(--accent-tint); color: var(--accent-deep); padding: 2px 6px; border-radius: 5px; font-size: .9em; }

/* generic tables (templates without thead/tbody) */
table.plain th, table.plain td, .card td, .card th { vertical-align: top; }
th { text-align: left; }

/* flash variants beyond success + wrapper */
.flashes { margin-bottom: 16px; }
.flash-danger  { background: var(--danger-tint); border-color: #e2cfcc; color: #8a201a; }
.flash-warning { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; }

/* legacy badges still referenced */
.badge-garnish { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.badge-muted { background: var(--line-soft); color: var(--muted); border-color: var(--line-soft); }
.badge.status-planning { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }
.badge.status-confirmed { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.badge.status-done { background: var(--line-soft); color: var(--muted); border-color: var(--line-soft); }
.badge.status-enquiry { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.badge.status-cancelled { background: #f7eaea; color: #9a3b3b; border-color: #e8cccc; }
.badge.status-sent { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }

/* Inline-editable chips (event status + payment) — a native <select> styled as
   a badge, so a click changes the value and it saves without a page reload. */
.chip-form { display: inline-flex; margin: 0; padding: 0; vertical-align: middle; }
.chip-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  font-family: var(--sans); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 25px 4px 12px; min-height: 0; line-height: 1.25; width: auto;
  border: 1px solid var(--line); background-color: var(--accent-tint); color: var(--accent-deep); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 9px; transition: box-shadow .15s, filter .12s;
}
.chip-select:hover { filter: brightness(.97); }
.chip-select:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.chip-select:disabled { opacity: .6; cursor: progress; }
.chip-select.status-enquiry,
.chip-select.pay-invoice_sent { background-color: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.chip-select.status-planning,
.chip-select.pay-deposit_paid { background-color: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }
.chip-select.status-confirmed,
.chip-select.pay-paid { background-color: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.chip-select.status-done { background-color: var(--line-soft); color: var(--muted); border-color: var(--line-soft); }
.chip-select.status-cancelled { background-color: #f7eaea; color: #9a3b3b; border-color: #e8cccc; }
.chip-select.pay-none { background-color: var(--card); color: var(--muted); border-color: var(--line); }
.chip-select.chip-saved { box-shadow: 0 0 0 3px var(--good-tint); }

/* big library search box (pre-port) */
#dish-search { font-size: 1.15rem; padding: 16px 16px; min-height: 56px; }

/* event card count: stack the number above the "dishes" label (they are spans) */
.ec-count .n, .ec-count .l { display: block; }

/* mobile hamburger: its SVG had no sizing rule, so as a flex child it shrank to
   ~2px wide (an empty box). Pin it. */
.nav-toggle svg { flex: none; width: 22px; height: 22px; }

/* Working lists (shopping / cook / pack): these cards are bare .card (no
   .card-pad), so give them side padding — otherwise the group header ("Booker"
   / "32 items") jams against the card edges. Rows then align to the same inset.
   Roomier rows too, with a gap between each item's name and its grey "for:"
   sub-line so rows read as distinct units (like the dishes view). */
[data-check-url] > .card { margin-bottom: 22px; padding: 14px 22px 16px; }
[data-check-url] .group-title { margin-top: 0; }
[data-check-url] .ticklist li { padding: 18px 0; }
[data-check-url] .ticklist li label { font-size: 1.02rem; line-height: 1.4; }
[data-check-url] .ticklist .line-sub { margin-top: 6px; line-height: 1.5; color: var(--muted); }

/* Admin edit rows (suppliers / categories) are .row-card forms, where the
   .grow/.narrow flex rules (scoped to .line-edit) don't apply — so the name
   field collapsed to a sliver while the select took its natural width. Let
   them wrap and keep the name usably wide. */
form.row-card { flex-wrap: wrap; row-gap: 8px; }
form.row-card .rc-main { flex: 1 1 220px; min-width: 180px; }
form.row-card .rc-main input { width: 100%; }
form.row-card select { flex: 0 1 200px; }

/* legacy group-title inner span */
.group-title > span:first-child { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.group-title .muted, .group-title .small { font-family: var(--sans); font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }

/* legacy native-checkbox tick lists (events list_view, before port) */
.ticklist li { display: flex; align-items: flex-start; gap: 14px; padding: 13px 6px; border-bottom: 1px solid var(--line-soft); }
.ticklist li:last-child { border-bottom: none; }
.ticklist li label { margin: 0; font-weight: 700; flex: 1; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); }
.ticklist input[type=checkbox] { width: 26px; height: 26px; min-height: 0; margin-top: 1px; flex: none; accent-color: var(--accent); cursor: pointer; }
.ticklist .line-sub { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; margin-top: 2px; }
.ticklist li.is-checked label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-line); }


/* legacy dish-edit pack toggle */
.line-edit .pack-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 0; }
.line-edit .pack-toggle input { width: 26px; height: 26px; min-height: 0; accent-color: var(--accent); }
.line-edit input[type=text], .line-edit select { min-height: 42px; }

/* legacy print rules for native-checkbox tick lists */
@media print {
  .topbar, .who, .nav-toggle, .mobile-nav{ display: none !important; }
  .ticklist li { border-bottom: 1px solid #d4d4d4; padding: 3px 2px; break-inside: avoid; gap: 9px; }
  .ticklist li.is-checked label { color: #000; text-decoration: none; }
  .ticklist li label { font-size: 9.7pt; }
  .ticklist input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border: 1.3px solid #000; border-radius: 2px; background: #fff; }
  .ticklist .line-sub { color: #444; font-size: 8pt; }
  .group-title > span:first-child { font-size: 12.5pt; }
}

/* ---- Client menu selection: internal UI (proposal panel + alert dots) ---- */
:root { --alert: #cf3b2d; }
.nav-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--alert); margin-left: 7px; flex: none; vertical-align: middle; display: inline-block; box-shadow: 0 0 0 3px rgba(207,59,45,.22); }
.alert-dot { display: inline-flex; align-items: center; gap: 7px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--alert); }
.alert-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--alert); flex: none; box-shadow: 0 0 0 3px rgba(207,59,45,.2); }
.tab-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--alert); flex: none; display: inline-block; margin-left: 4px; box-shadow: 0 0 0 3px rgba(207,59,45,.18); }
.client-glyph { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); vertical-align: middle; }
.client-glyph svg { width: 13px; height: 13px; }

.clink { border-color: var(--accent-line); }
.clink .card-head { background: linear-gradient(180deg, var(--accent-tint), var(--card)); border-bottom-color: var(--accent-line); }
.clink-url { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.clink-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.clink-note svg { flex: none; color: var(--accent); margin-top: 1px; }

/* ── Shared "link picker" (proposal ↔ event linking) ──────────────────────
   One searchable, labelled modal for linking a proposal to an event (both
   directions) and attaching a menu to an event. See _link_picker.html. */
.nolink-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.src-toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 12px; }
.src-toggle button { border: none; background: none; padding: 8px 14px; border-radius: 6px; min-height: 0; width: auto; font-family: var(--sans); font-weight: 800; font-size: .84rem; color: var(--ink-soft); cursor: pointer; transition: background .12s, color .12s; }
.src-toggle button:hover { background: none; color: var(--accent-deep); }
.src-toggle button.on, .src-toggle button.on:hover { background: var(--accent); color: #fff; }
.link-search { position: relative; margin-bottom: 12px; }
.link-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.link-search input { padding-left: 40px; }
.link-help { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px; padding: 11px 13px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--ink-soft); font-size: .86rem; line-height: 1.5; }
.link-help svg { flex: none; color: var(--accent); margin-top: 1px; }
.replace-note { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px; padding: 11px 13px; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: var(--radius-sm); color: #6f5824; font-size: .86rem; line-height: 1.5; }
.replace-note svg { flex: none; color: var(--gold); margin-top: 1px; }
.link-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; margin: 0; }
.link-row { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; font-family: var(--sans); transition: border-color .12s, background .12s; }
.link-row:hover { border-color: var(--accent-line); background: var(--accent-tint); }
.link-row .lr-ico { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deep); }
.link-row:hover .lr-ico { background: #fff; }
.link-row .lr-main { flex: 1; min-width: 0; }
.link-row .lr-name { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.link-row .lr-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: .84rem; color: var(--muted); }
.link-row .lr-tail { flex: none; color: var(--accent); display: inline-flex; }
.link-empty { padding: 18px 4px; color: var(--muted); font-size: .92rem; }
.lp-em { font-style: normal; color: var(--accent-deep); }

.choices-sec { margin-top: 14px; }
.choices-sec:first-child { margin-top: 0; }
.choices-sec .cs-head { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.choices-sec .cs-head .cs-note { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.choice-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.choice-row:last-child { border-bottom: none; }
.choice-row .cr-tick { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; flex: none; }
.choice-row .cr-tick svg { width: 14px; height: 14px; stroke: #fff; }
.choice-row .cr-name { font-weight: 700; color: var(--ink); }
.choice-row .cr-blurb { color: var(--muted); font-weight: 500; font-size: .86rem; }

/* ============================================================================
   Day plan (run sheet) + staff quote
   ========================================================================== */
input[type=time] {
  min-height: var(--tap); padding: 11px 14px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
input[type=time]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
/* 5-minute time picker (hour + minute selects → hidden HH:MM) */
.time-sel { display: inline-flex; align-items: center; gap: 5px; }
.time-sel select { min-width: 68px; padding-left: 12px; padding-right: 8px; font-variant-numeric: tabular-nums; text-align: center; }
.time-sel .ts-colon { color: var(--muted); font-weight: 800; }
.dish-qty { flex: none; font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* "All Menu Choices" per-dish usage chips (templates / proposals / final menus) */
.usage-chips { flex: none; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.usage-chips .uc { font-size: .7rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-chips .uc.on { color: var(--accent-deep); background: var(--accent-tint); border-color: var(--accent-line); }
.usage-chips .ucz { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--danger); background: var(--danger-tint); border: 1px solid #e2cfcc; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

/* Activity log (collapsible <details>) */
.activity-log > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 16px 22px; font-weight: 800; color: var(--ink-soft); }
.activity-log > summary::-webkit-details-marker { display: none; }
.activity-log > summary svg { transition: transform .15s; color: var(--muted); }
.activity-log[open] > summary svg { transform: rotate(180deg); }
.activity-log[open] > summary { border-bottom: 1px solid var(--line-soft); }
.activity-log .act-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.activity-log .act-row:last-of-type { border-bottom: none; }
.activity-log .act-ico { flex: none; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deep); }
.activity-log .act-main { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.activity-log .act-time { flex: none; font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }
.btn-disabled, a.btn-disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }
.flash-warn { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; }
.flash-warn svg { color: #9a7b3f; }
.flash-warn a { font-weight: 800; }
.badge-amber { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
/* Draft chip — a brighter, solid amber so an unbuilt dish stands out on the
   event menu (the soft badge-amber reads as just another muted tag). */
.badge-draft { background: #e8952f; color: #fff; border-color: #cf7d1c; font-weight: 700; }

.dp-times .dp-guests-pill {
  flex: 2 1 320px; display: flex; align-items: center; gap: 10px;
  min-height: var(--tap); padding: 10px 16px;
  background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
  color: var(--ink-soft); font-size: .9rem; line-height: 1.4;
}
.dp-times .dp-guests-pill svg { color: var(--accent); flex: none; }
.dp-times .dp-guests-pill b { color: var(--ink); }
.dp-prompt { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }

/* unscheduled holding strip */
.dp-unsched { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 22px; border-bottom: 1px dashed #e6dcc4; background: #f9f4e9; }
.dp-unsched-label { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #876a2b; }
.dp-uchip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 6px 5px 13px; border-radius: 999px; background: var(--card); border: 1px solid #e6dcc4; box-shadow: var(--shadow-sm); font-weight: 700; font-size: .9rem; color: var(--ink); }
.dp-uchip svg { color: #9a7b3f; }
.dp-uchip .set { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 800; font-size: .76rem; cursor: pointer; }
.dp-uchip .set:hover { background: var(--accent-deep); }
.dp-uchip .rm { display: grid; place-items: center; min-height: 28px; width: 28px; height: 28px; padding: 0; border-radius: 999px; border: none; background: none; color: var(--muted); }
.dp-uchip .rm:hover { background: var(--danger-tint); color: var(--danger); }
.dp-uchip form { display: inline-flex; }

/* the chronological timeline */
.dp-timeline { list-style: none; margin: 0; padding: 0; }
.dp-row { display: flex; align-items: stretch; }
.dp-time { flex: none; width: 96px; padding: 15px 12px 0 0; text-align: right; font-family: var(--serif); font-variant-numeric: tabular-nums; line-height: 1.12; }
.dp-time .t { display: block; font-size: 1.32rem; font-weight: 600; color: var(--ink); }
.dp-spine { flex: none; width: 34px; position: relative; }
.dp-spine::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.dp-row:first-child .dp-spine::before { top: 24px; }
.dp-row:last-child .dp-spine::before { bottom: auto; height: 24px; }
.dp-node { position: absolute; left: 50%; top: 20px; width: 11px; height: 11px; border-radius: 999px; background: var(--card); border: 2.5px solid var(--accent); transform: translateX(-50%); box-shadow: 0 0 0 3px var(--card); }
.dp-row.dp-guests .dp-node { background: var(--accent); }
.dp-row.noserve .dp-node { border-color: var(--danger); }
.dp-row.dp-interlude:not(.noserve) .dp-node { border-color: var(--gold); }
.dp-body { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 13px; margin: 5px 0; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.dp-row:hover .dp-body { background: var(--bg); }
.dp-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deep); margin-top: 1px; }
.dp-main { flex: 1; min-width: 0; padding-top: 2px; }
.dp-label { font-weight: 700; color: var(--ink); font-size: 1.02rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-count { font-family: var(--serif); font-size: 1.18rem; color: var(--accent); font-weight: 600; }
.dp-dur { font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dp-row:hover .dp-dur { background: var(--card); }
.dp-note { color: var(--muted); font-size: .88rem; margin-top: 2px; white-space: pre-line; }
#te-note { min-height: 0; }
.dp-tba { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 800; color: #876a2b; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.rsc-end { font-size: .78rem; font-weight: 700; color: var(--muted); margin-left: 6px; }
.dp-derived { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); }
.dp-actions { flex: none; display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.dp-actions form { display: inline-flex; }
.dp-row .dp-actions .btn-ghost { opacity: 0; transition: opacity .12s; }
.dp-row:hover .dp-actions .btn-ghost { opacity: 1; }
@media (hover: none) { .dp-row .dp-actions .btn-ghost { opacity: 1; } }
.dp-row.dp-guests .dp-body { background: var(--accent-tint); border-color: var(--accent-line); }
.dp-row.dp-guests .dp-ico { background: var(--card); }
.dp-row.dp-depart .dp-node { border-color: var(--accent-line); }
.dp-row.dp-depart.dp-staff .dp-ico { background: var(--bg); color: var(--muted); }
.dp-row.dp-depart.dp-staff .dp-label { color: var(--ink-soft); font-weight: 600; }
.dp-row.dp-depart.dp-staff .dp-count { color: var(--muted); }
.dp-row.dp-depart.dp-guests .dp-body { background: var(--card); border-color: var(--accent-line); }
.dp-row.dp-interlude .dp-body { background: #f8f5ec; border-color: #eee5d0; }
.dp-row.dp-interlude .dp-ico { background: #f1e9d6; color: #876a2b; }
.dp-row.noserve .dp-body { background: repeating-linear-gradient(135deg, var(--danger-tint) 0 10px, #fdf6f4 10px 20px); border-color: #e2cfcc; }
.dp-row.noserve .dp-ico { background: #fff; color: var(--danger); }
.dp-noserve-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--danger); border: 1px solid #ddb8b3; background: #fff; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.dp-warn { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; color: #876a2b; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.dp-warn svg { color: #9a7b3f; }

/* --- Grouped run sheet: one time marker per moment, people stacked beneath --- */
.dp-cluster { display: flex; align-items: stretch; }
.dp-time .t-sub { display: block; margin-top: 3px; font-family: var(--sans); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* the rail = the same full-height spine as .dp-spine, but per cluster */
.dp-rail { flex: none; width: 34px; position: relative; }
.dp-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.dp-cluster:first-child .dp-rail::before { top: 26px; }
.dp-cluster:last-child .dp-rail::before { bottom: auto; height: 26px; }
.dp-rail .dp-node { top: 21px; }
.dp-node.multi { width: 15px; height: 15px; top: 19px; background: var(--accent); }
.dp-node.depart { border-color: var(--accent-line); background: var(--card); }
.dp-node.guests { background: var(--accent); }
.dp-node.noserve { border-color: var(--danger); }
.dp-node.interlude:not(.noserve) { border-color: var(--gold); }
/* the stack of people sharing the time */
.dp-stack { list-style: none; flex: 1; min-width: 0; margin: 7px 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--radius-sm); border: 1px solid transparent; }
.dp-stack.grouped { background: var(--bg); border-color: var(--line); }
.dp-stack.guests { background: var(--accent-tint); border-color: var(--accent-line); }
.dp-item { display: flex; align-items: flex-start; gap: 13px; padding: 10px 14px; min-width: 0; border-radius: var(--radius-sm); }
.dp-stack.grouped .dp-item + .dp-item { border-top: 1px solid var(--line); border-radius: 0; }
.dp-stack:not(.grouped) .dp-item:not(.noserve):not(.dp-interlude):hover { background: var(--bg); }
.dp-stack.guests .dp-label { color: var(--accent-deep); }
.dp-stack.guests .dp-ico { background: var(--card); }
/* departures — lighter echo (staff only; guests/Carriages keep their accent) */
.dp-stack.depart .dp-staff .dp-ico { background: var(--bg); color: var(--muted); }
.dp-stack.depart .dp-staff .dp-label { color: var(--ink-soft); font-weight: 600; }
.dp-stack.depart .dp-staff .dp-count { color: var(--muted); }
/* food / interlude / no-serve single rows keep their distinctive treatment */
.dp-item.noserve { background: repeating-linear-gradient(135deg, var(--danger-tint) 0 10px, #fdf6f4 10px 20px); }
.dp-item.noserve .dp-ico { background: #fff; color: var(--danger); }
.dp-item.dp-interlude:not(.noserve) { background: #f8f5ec; }
.dp-item.dp-interlude:not(.noserve) .dp-ico { background: #f1e9d6; color: #876a2b; }
/* hover-reveal edit/delete per item (was per .dp-row) */
.dp-item .dp-actions .btn-ghost { opacity: 0; transition: opacity .12s; }
.dp-item:hover .dp-actions .btn-ghost { opacity: 1; }
@media (hover: none) { .dp-item .dp-actions .btn-ghost { opacity: 1; } }

.dp-card-foot { border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* publish to client page */
.dp-publish { display: flex; align-items: flex-start; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--accent-tint), var(--card)); }
.dp-pub-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card); color: var(--accent-deep); border: 1px solid var(--accent-line); }
.dp-pub-main { flex: 1; min-width: 0; }
.dp-pub-title { font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-pub-sub { color: var(--muted); font-size: .86rem; margin-top: 2px; max-width: 62ch; }
.dpswitch { flex: none; position: relative; width: 56px; height: 32px; min-height: 32px; margin-top: 3px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: background .15s, border-color .15s; }
.dpswitch:hover { background: var(--bg); border-color: var(--accent-line); }
.dpswitch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: left .15s; }
.dpswitch.on, .dpswitch.on:hover { background: var(--good); border-color: var(--good); }
.dpswitch.on .knob { left: 27px; border-color: var(--good); }
.dpswitch:disabled { opacity: .45; cursor: not-allowed; }

/* live readouts in the Add-time modal */
.dp-live { flex: 1 1 160px; display: flex; align-items: center; min-height: var(--tap); }
.dp-live-dur { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink-soft); }
.dp-live-dur svg { color: var(--accent); }
.dp-live-total { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--accent-deep); }
.dp-live-total em { font-family: var(--sans); font-style: normal; font-size: .76rem; font-weight: 700; color: var(--muted); margin-left: 6px; }

/* quote table */
.dp-qtable { width: 100%; border-collapse: collapse; }
.dp-qtable th { text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; border-bottom: 1.5px solid var(--ink); }
.dp-qtable td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.dp-qtable .num { text-align: right; font-variant-numeric: tabular-nums; }
.dp-qtable th.num { text-align: right; }
.dp-qtable tfoot td { padding: 14px 10px 4px; border-top: 2px solid var(--ink); border-bottom: none; font-weight: 800; }
.dp-qtable tfoot .num { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--accent-deep); }

@media (max-width: 760px) {
  .dp-time { width: 64px; padding-top: 13px; }
  .dp-time .t { font-size: 1.05rem; }
  .dp-spine, .dp-rail { width: 22px; }
  .dp-item { gap: 10px; padding: 9px 11px; }
  .dp-note { display: none; }
  .dp-actions .dp-warn { display: none; }
}

/* ===================== Batch recipes (brass theme) ===================== */
:root { --batch: #8a6d2f; --batch-deep: #6f5723; --batch-tint: #f6efe1; --batch-line: #e6dcc4; }

/* chip + header flag (dish view) + amount-cell pill (edit + view) */
.batch-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--batch-tint); color: var(--batch-deep); border: 1px solid var(--batch-line); white-space: nowrap; }
.batch-chip svg { width: 13px; height: 13px; opacity: .85; }
.batch-chip .by { font-variant-numeric: tabular-nums; }
.batch-flag { display: inline-flex; align-items: center; gap: 5px; color: var(--batch-deep); }
.batch-flag svg { color: var(--batch); }
.amt-basis { display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; margin-left: 6px; white-space: nowrap; vertical-align: middle; }
.amt-basis.batch { background: var(--batch-tint); color: var(--batch-deep); }
.amt-basis.serving { background: var(--bg); color: var(--muted); }
.batch-help { font-size: .82rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.batch-help b { color: var(--ink-soft); font-weight: 700; }

/* intro banner */
.batch-intro { display: flex; gap: 11px; align-items: flex-start; padding: 12px 15px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--batch-tint); border: 1px solid var(--batch-line); color: var(--batch-deep); font-size: .88rem; line-height: 1.5; }
.batch-intro svg { flex: none; color: var(--batch); margin-top: 1px; }
.batch-intro b { font-weight: 800; }

/* ---- dish editor · prep component rows (toggle direction) ---- */
.rb-toggle { position: relative; width: 42px; height: 24px; min-height: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; padding: 0; flex: none; transition: background .15s; }
.rb-toggle[data-on="1"] { background: var(--batch); }
.rb-toggle i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.rb-toggle[data-on="1"] i { transform: translateX(18px); }
.rb-switch-row { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); cursor: pointer; user-select: none; }
.rb-switch-row .rb-sr-sub { font-weight: 500; color: var(--muted); font-size: .82rem; }
.prep-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.prep-edit.is-batch { border-color: var(--batch-line); background: var(--batch-tint); }
.prep-edit .pe-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.prep-edit .pe-top .grow { flex: 1 1 220px; min-width: 160px; }
.prep-edit .pe-end { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; }
.prep-edit .pe-reveal { margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--batch-line); display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.prep-edit .pe-reveal[hidden] { display: none; }
.pe-yield label{ display: block; font-weight: 800; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; white-space: nowrap; }
.pe-yield label { color: var(--batch-deep); }
.pe-makes { display: inline-flex; align-items: center; border: 1px solid var(--batch-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.pe-makes .pem-pre { padding: 0 4px 0 13px; color: var(--batch-deep); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.pe-makes input { width: 74px; min-height: 44px; border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; padding: 0 4px; color: var(--batch-deep); background: transparent; }
.pe-makes input:focus { box-shadow: none; outline: none; }
.pe-makes .pem-post { padding: 0 13px 0 4px; color: var(--muted); font-weight: 700; font-size: .82rem; white-space: nowrap; }

/* ---- cook-in-advance · prep rows ---- */
.cook-prep { display: flex; align-items: flex-start; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.cook-prep:last-child { border-bottom: none; }
.cook-prep .cp-check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cook-prep .tickbox { cursor: pointer; }
.cook-prep:hover .tickbox { border-color: var(--accent); }
.cook-prep.is-checked .tickbox { background: var(--accent); border-color: var(--accent); }
.cook-prep.is-checked .tickbox svg { opacity: 1; transform: scale(1); }
.cook-prep.is-batch { background: linear-gradient(90deg, var(--batch-tint) 0%, transparent 70%); border-radius: var(--radius-sm); padding-left: 12px; margin-left: -8px; }
.cook-prep.is-batch .tickbox { border-color: var(--batch-line); }
.cook-prep.is-batch.is-checked .tickbox { background: var(--batch); border-color: var(--batch); }
.cp-main { flex: 1; min-width: 0; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cp-name { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cook-prep.is-checked .cp-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-line); }
.cp-plain-sub { color: var(--muted); font-size: .85rem; margin-top: 3px; display: block; }

.batch-ctl { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.batch-ctl .bc-stepper { display: inline-flex; align-items: center; border: 1px solid var(--batch-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.batch-ctl .bc-stepper button { width: 36px; min-height: 40px; border: none; background: var(--card); color: var(--batch); font-size: 1.3rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; padding: 0; }
.batch-ctl .bc-stepper button:hover { background: var(--batch-tint); }
.batch-ctl .bc-stepper button:disabled { color: var(--line); cursor: not-allowed; }
.batch-ctl .bc-val { min-width: 44px; text-align: center; border-left: 1px solid var(--batch-line); border-right: 1px solid var(--batch-line); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--batch-deep); font-variant-numeric: tabular-nums; line-height: 40px; }
.batch-ctl .bc-unit { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--batch-deep); }
.batch-ctl .bc-tag { font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; }
.batch-ctl .bc-tag.auto { background: var(--bg); color: var(--muted); border-color: var(--line); }
.batch-ctl .bc-tag.edited { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.batch-ctl .bc-tag.edited:hover { background: #efe4cd; }

.cp-gloss { margin-top: 7px; }
.cp-made { font-family: var(--serif); font-size: 1.05rem; color: var(--batch-deep); font-variant-numeric: tabular-nums; }
.cp-made b { font-weight: 700; }
.cp-made .cm-need { color: var(--ink-soft); font-family: var(--sans); font-size: .9rem; }
.cp-made .cm-over { color: var(--gold); font-family: var(--sans); font-size: .85rem; font-weight: 700; }
.cp-made .cm-exact { color: var(--muted); font-family: var(--sans); font-size: .85rem; font-weight: 700; }
.cp-made .cm-short { color: var(--danger); font-family: var(--sans); font-size: .85rem; font-weight: 700; }
.cp-ings { list-style: none; margin: 10px 0 2px; padding: 10px 0 0; border-top: 1px dashed var(--batch-line); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.cp-ing { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .88rem; line-height: 1.45; }
.cp-ing .ci-name { color: var(--ink-soft); }
.cp-ing .ci-calc { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-ing .ci-calc b { color: var(--batch-deep); font-weight: 800; }
.cp-ing .ci-per { color: var(--muted); }

@media (max-width: 760px) {
  .cp-ings { grid-template-columns: 1fr; }
  .batch-ctl { width: 100%; justify-content: space-between; margin-top: 8px; }
}

/* ===================================================================== */
/* Equipment & Hire Redesign (Layout B · ledger). Pack rounding reuses the
   brass "batch" palette; money uses the brand indigo + serif numerals. */
/* ===================================================================== */
.hire-summary { display: flex; align-items: stretch; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 18px 22px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius); }
.hs-left { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.hs-subs { display: flex; flex-wrap: wrap; gap: 7px; }
.hs-sub { display: inline-flex; align-items: baseline; gap: 7px; padding: 5px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--accent-line); font-size: .82rem; }
.hs-sub .n { font-weight: 800; color: var(--ink); }
.hs-sub .v { font-family: var(--serif); font-size: 1.02rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.hs-sub.zero .v { color: var(--muted); }
.hs-stale { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.hs-stale svg { color: var(--gold); }
.hs-right { text-align: right; display: flex; flex-direction: column; justify-content: center; min-width: 180px; }
.hs-right .hs-label { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hs-right .hs-total { font-family: var(--serif); font-size: 2.5rem; line-height: 1; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.hs-right .hs-vat { font-size: .8rem; color: var(--muted); margin-top: 3px; }

.eq-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.eq-hint { font-size: .82rem; color: var(--muted); }
.eq-toolbar.active { position: sticky; top: 12px; z-index: 25; padding: 9px 12px 9px 14px;
  background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: 999px; box-shadow: var(--shadow-md); margin-bottom: 12px; }
.ab-count { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-soft); }
.ab-count b { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--accent-deep); }
.ab-actions { display: inline-flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.ab-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ab-actions select { min-height: 38px; width: auto; padding: 6px 10px; }
.ab-clear { background: none; border: none; color: var(--muted); cursor: pointer; font-weight: 800; font-size: .85rem; padding: 6px 8px; }
.ab-clear:hover { color: var(--ink); }
.page-head .btn-row.ph-actions { align-self: flex-start; }

.group-title .g-sub { font-family: var(--serif); font-size: 1.2rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.group-title .g-sub.zero { color: var(--muted); font-size: .9rem; font-family: var(--sans); font-weight: 700; }
.src-flag { font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 8px; white-space: nowrap; }
.src-flag.woo { background: var(--good-tint); color: var(--good); border: 1px solid #cdddc7; }
.src-flag.manual { background: #f6efe1; color: #876a2b; border: 1px solid #e6dcc4; }
.src-flag.own { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* Ledger cards are bare .card elements (not .card-pad / [data-check-url]), so give
   them internal padding — otherwise the group header sits flush to the top-left
   edge and reads as squashed. The table cells keep their own 12px rhythm. */
#bulk-wrap .group { padding: 16px 16px 8px; }
#bulk-wrap .group .group-title { margin-bottom: 12px; }
/* pull the table flush with the header text (cancel the first/last cell padding) */
#bulk-wrap .eq-table th.sel-col, #bulk-wrap .eq-table td.sel-col { padding-left: 0; }
#bulk-wrap .eq-table thead th:last-child, #bulk-wrap .eq-table tbody td:last-child { padding-right: 0; }

.eq-table { width: 100%; border-collapse: collapse; }
.eq-table thead th { text-align: left; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  padding: 0 12px 9px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.eq-table th.num, .eq-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.eq-table th.sel-col { width: 34px; padding-left: 6px; }
.eq-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.eq-table tbody tr:last-child td { border-bottom: none; }
.eq-table tbody tr.sel { background: var(--accent-tint); }
.eqt-name { font-weight: 700; color: var(--ink); }
.eqt-for { font-size: .8rem; color: var(--muted); margin-top: 1px; }
.eqt-need { font-weight: 700; color: var(--ink-soft); }
.eqt-supplied b { font-weight: 800; color: var(--ink); }
.eqt-spare { font-size: .76rem; font-weight: 800; }
.eqt-spare.spare { color: var(--gold); } .eqt-spare.exact { color: var(--good); } .eqt-spare.short { color: var(--danger); }
.eqt-cost { font-family: var(--serif); font-size: 1.12rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.eqt-cost.muted { font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--muted); }

.minibox { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--accent-line); background: var(--card); display: grid; place-items: center; color: #fff; cursor: pointer; }
.minibox.on { background: var(--accent); border-color: var(--accent); }
.minibox svg { opacity: 0; } .minibox.on svg { opacity: 1; }
.minibox.some { background: var(--accent-line); border-color: var(--accent-line); }
.src-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); cursor: pointer; font-family: var(--sans); font-weight: 800; font-size: .82rem; color: var(--ink-soft); white-space: nowrap; transition: all .12s; box-shadow: var(--shadow-sm); }
.src-chip:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.src-chip:disabled { cursor: default; box-shadow: none; opacity: .8; }
.src-chip .sc-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.src-chip svg { color: var(--muted); }
.src-chip.own { color: var(--muted); }
.sc-dot.own { background: var(--muted); } .sc-dot.hire { background: var(--good); } .sc-dot.none { background: var(--line); }

.pk-gloss { font-family: var(--serif); font-size: 1rem; color: var(--batch-deep); font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pk-gloss .pk-eq { font-family: var(--sans); font-size: .8rem; color: var(--batch); font-weight: 700; }
.pk-stepper { display: inline-flex; align-items: center; border: 1px solid var(--batch-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.pk-stepper button { width: 30px; min-height: 32px; border: none; background: var(--card); color: var(--batch); font-size: 1.15rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.pk-stepper button:hover { background: var(--batch-tint); }
.pk-stepper button:disabled { color: var(--line); cursor: not-allowed; }
.pk-stepper .pks-val { min-width: 48px; text-align: center; border-left: 1px solid var(--batch-line); border-right: 1px solid var(--batch-line);
  font-weight: 800; font-size: .82rem; color: var(--batch-deep); font-variant-numeric: tabular-nums; line-height: 32px; padding: 0 4px; }

.line-flag { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.line-flag.noprice { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.line-flag.unconf { background: #f6efe1; color: #876a2b; border: 1px solid #e6dcc4; }
.line-flag svg { width: 12px; height: 12px; }

.extras-search { position: relative; margin-bottom: 12px; }
.extras-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.extras-search input { padding-left: 40px; }
.big-search svg { left: 16px; }
.big-search input { padding-left: 46px; min-height: 56px; font-size: 1.08rem; }
/* Add-dish combobox (§3b) — replaces the native <datalist>, which could only
   filter on the dish name and so missed accents and courses entirely. */
.dish-combo { position: relative; }
.dish-combo > input { width: 100%; }
.dish-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-md); }
.dish-suggest[hidden] { display: none; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ds-row:hover, .ds-row.on { background: var(--accent-tint); }
.ds-name { font-weight: 700; }
.ds-type { font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ds-empty { padding: 10px; color: var(--muted); font-size: .84rem; }

.cat-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
/* Everyday / rest subheadings — the shortlist still reads as a shortlist now
   that the Everyday and Full-catalogue tabs are one ranked list (§3a). */
.cat-head { position: sticky; top: 0; z-index: 1; background: var(--bg);
  padding: 6px 4px; font-family: var(--sans); font-size: .68rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); }
.cat-pick { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
.cat-pick:last-child { border-bottom: none; }
.cat-pick .cp-main { flex: 1; min-width: 0; }
.cat-pick .cp-name { font-weight: 700; color: var(--ink); }
.cat-pick .cp-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pick .cp-price { font-family: var(--serif); font-size: 1.05rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.cat-pick .cp-add { margin: 0; display: flex; align-items: center; gap: 8px; }
/* per-guest rate — modal "× N /guest" + the inline ledger editor */
.cp-pg { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cp-pg input{ width: 60px; padding: 4px 8px; text-align: center; font-weight: 800;
  border: 1px solid var(--line); border-radius: 7px; min-height: 0; }
/* extra NEED editor — number + basis (each / per guest) */
.need-edit { display: inline-flex; align-items: center; gap: 3px; margin: 4px 0 0; font-size: .72rem; font-weight: 800; color: var(--muted); }
.need-edit .pg-x { color: var(--muted); }
.need-edit .ne-val { width: 60px; padding: 4px 8px; text-align: center; font-weight: 800; border: 1px solid var(--line); border-radius: 7px; min-height: 0; }
.need-edit .ne-basis, .cp-pg select { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 3px 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); margin-left: 2px; }
/* one-off line's per-unit price — sits on its own line UNDER the line total (§3.5) */
.need-edit.ff-cost { display: flex; justify-content: flex-end; }
/* menu-row need override "edited · reset" tag (Equipment Per-Guest Scaling §7.2) */
.eqt-reset { display: inline-block; margin: 3px 0 0; padding: 0; border: none; background: none; cursor: pointer;
  font-family: var(--sans); font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: var(--accent); }
.eqt-reset:hover { color: var(--accent-deep); text-decoration: underline; }
/* need-cell provenance tag (Sourcing Simplification §7.3) */
.eqt-prov { display: block; margin-top: 3px; font-size: .66rem; font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted); }

/* ── per-event hire-company set (Sourcing Simplification §6) ─────────────── */
.eq-coset { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.eqc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); font-family: var(--sans); font-size: .82rem; font-weight: 700;
  color: var(--ink-soft); }
.eqc-chip svg { color: var(--muted); }
.eqc-chip .inline-form { display: inline-flex; margin: 0; }
.eqc-x { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: none;
  border-radius: 999px; background: none; cursor: pointer; color: var(--muted); }
.eqc-x:hover { background: var(--danger-tint); color: var(--danger); }
.eqc-add { position: relative; display: inline-block; }
.eqc-add > summary { list-style: none; cursor: pointer; }
.eqc-add > summary::-webkit-details-marker { display: none; }
.eqc-chip.add { border-style: dashed; color: var(--accent); }
.eqc-chip.add svg { color: var(--accent); }
.eqc-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 2px; }
.eqc-opt { display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 7px;
  background: none; cursor: pointer; font-family: var(--sans); font-size: .88rem; font-weight: 600; color: var(--ink); }
.eqc-opt:hover { background: var(--accent-tint); color: var(--accent-deep); }
/* remembered product row in the move picker */
.link-row.lp-remembered { border-color: var(--good); background: var(--good-tint); }
/* Where real matches end in the "pick this company's product" picker (event 11:
   a coat rail offered for a tray). Quiet on purpose — a divider, not a warning. */
.pk-tier-rule { display: flex; align-items: center; gap: 8px; margin: 10px 2px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); opacity: .8; }
.pk-tier-rule::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* Why a row resolved where it did (§38) — sits beside "via …" on the ledger. */
.src-why { font-weight: 600; color: var(--ink-soft); }
/* The global `button` rule makes every button a 44px inline-flex block, which
   pushed "change" / "forget" onto a line of their own. A <button> can't be truly
   inline (Chromium computes `inline` as `inline-block`), so padding would still
   open the line up — instead a transparent ::after widens the TAP area for the
   iPad without taking any layout space. */
.src-why .linkbtn { display: inline-block; min-height: 0; line-height: inherit; vertical-align: baseline;
  position: relative; padding: 0; color: var(--accent-deep); opacity: 1; font-weight: 700; }
.src-why .linkbtn::after { content: ""; position: absolute; inset: -12px -6px; }
.src-why .linkbtn:hover { background: none; color: var(--accent); }
.src-why form { display: inline; margin: 0; }
/* Add-extras category filter + flash the just-added row (scroll target) */
.extras-cat { font-size: .82rem; font-weight: 700; color: var(--ink-soft); padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.eq-table tr:target td { animation: eq-flash 2.4s ease; }
@keyframes eq-flash { 0%, 45% { background: var(--accent-tint); } 100% { background: transparent; } }
/* sub-group headings within a supplier group (by dish, then Extras by section) */
.eq-subhead td { background: var(--bg); font-weight: 800; font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); padding: 9px 14px 7px; border-top: 1px solid var(--line); }
.eq-subhead:first-child td { border-top: none; }
.eq-subhead svg { vertical-align: -2px; opacity: .65; margin-right: 5px; }
.eq-subhead.extras td { color: var(--accent-deep); }
.eq-subhead.extras svg { opacity: .9; color: var(--accent); }
.freeform-card { margin-top: 14px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.freeform-card .ff-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.cost-input { position: relative; }
.cost-input .ci-pound { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.cost-input input { padding-left: 26px; }

/* Hire-catalogue filters — Category / Company dropdowns + Shown-only */
.hc-filter-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.hc-field { display: flex; flex-direction: column; gap: 5px; }
.hc-flead { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hc-field select { min-width: 210px; }
.hc-shown { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; white-space: nowrap; margin-left: auto; padding-bottom: 9px; }
.hc-shown input { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pager-info { font-size: .85rem; color: var(--ink-soft); }
.pager-info b { color: var(--ink); }
.pager-ctl { display: inline-flex; align-items: center; gap: 12px; }
.pager-ctl a, .pager-ctl span.btn-dead { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font-family: var(--sans); font-weight: 800; font-size: .85rem; box-shadow: var(--shadow-sm); text-decoration: none; }
.pager-ctl a:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.pager-ctl span.btn-dead { opacity: .4; cursor: not-allowed; }
.pager-page { font-size: .82rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.vis-row { display: flex; align-items: center; gap: 14px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.vis-row:last-child { border-bottom: none; }
.vis-row .vr-name { font-weight: 700; color: var(--ink); flex: 0 0 auto; }
.vis-row .vr-meta { font-size: .8rem; color: var(--muted); flex: 1 1 auto; display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.vis-row .vr-sku { font-family: ui-monospace, Menlo, Consolas, monospace; }
.vis-row .vr-sep { opacity: .4; }
.mini-toggle { position: relative; width: 40px; height: 23px; min-height: 0; display: block; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; padding: 0; flex: none; transition: background .15s; }
.mini-toggle[data-on="1"] { background: var(--accent); }
.mini-toggle i { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.mini-toggle[data-on="1"] i { transform: translateX(17px); }

.quote-doc { max-width: 840px; }
.quote-grp { margin-bottom: 8px; }
.quote-grp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 8px; border-bottom: 2px solid var(--accent); }
.quote-grp-head .qg-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.quote-grp-head .qg-meta { font-size: .8rem; color: var(--muted); font-weight: 700; }
.quote-table { width: 100%; border-collapse: collapse; }
.quote-table td { padding: 9px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.quote-table .qt-name { font-weight: 700; color: var(--ink); }
.quote-table .qt-detail { font-size: .82rem; color: var(--muted); }
.quote-table .qt-cost { text-align: right; font-family: var(--serif); font-size: 1.1rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-sub { display: flex; justify-content: space-between; padding: 9px 4px; font-size: .9rem; color: var(--ink-soft); }
.quote-sub.delivery { border-bottom: 1px solid var(--line-soft); }
.quote-flagged { margin-top: 8px; padding: 11px 14px; background: #f6efe1; border: 1px solid #e6dcc4; border-radius: var(--radius-sm); color: #6f5a23; font-size: .85rem; }
.quote-flagged b { font-weight: 800; }
.quote-flagged ul { margin: 6px 0 0; padding-left: 18px; }
.quote-totals { margin-top: 18px; margin-left: auto; max-width: 340px; }
.quote-totals .qtot-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; color: var(--ink-soft); }
.quote-totals .qtot-row.grand { border-top: 2px solid var(--accent); margin-top: 6px; padding-top: 12px; }
.quote-totals .qtot-row.grand .v { font-family: var(--serif); font-size: 1.9rem; color: var(--accent-deep); line-height: 1; }
.quote-totals .v { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); }
.vat-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .85rem; color: var(--ink-soft); }
.vat-toggle input { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.combine-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius); color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.combine-note svg { flex: none; color: var(--accent); margin-top: 1px; }
.combine-note b { color: var(--ink); }

.admin-banner { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: var(--radius); background: var(--accent-deep); color: #cfd2f0; margin-bottom: 18px; }
.admin-banner svg { color: #b9bcec; flex: none; }
.admin-banner b { color: #fff; }
.admin-banner .ab-tag { margin-left: auto; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #b9bcec; border: 1px solid rgba(255,255,255,.25); padding: 3px 9px; border-radius: 999px; }
.src-card { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.src-card:last-child { border-bottom: none; }
.src-card .scd-main { flex: 1; min-width: 220px; }
.src-card .scd-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.psource { font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.psource.woocommerce { background: var(--good-tint); color: var(--good); border: 1px solid #cdddc7; }
.psource.manual, .psource.spreadsheet { background: #f6efe1; color: #876a2b; border: 1px solid #e6dcc4; }
.delta-list { list-style: none; margin: 8px 0 0; padding: 0; }
.delta-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; flex-wrap: wrap; }
.delta-row:last-child { border-bottom: none; }
.delta-row .dr-name { flex: 1; font-weight: 700; color: var(--ink); }
.delta-row .dr-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; color: var(--muted); }
.delta-row .dr-from { color: var(--muted); text-decoration: line-through; }
.delta-row .dr-to { font-weight: 800; color: var(--accent-deep); }
.review-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.review-row:last-child { border-bottom: none; }
.review-row .rr-main { flex: 1; min-width: 200px; }
.review-row .rr-name { font-weight: 700; color: var(--ink); }
.review-row .rr-guess { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.review-row .rr-guess b { color: var(--batch-deep); font-weight: 800; }
.review-ctl { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-ctl select { min-height: 38px; width: auto; padding: 6px 10px; }
.review-ctl input { width: 80px; min-height: 38px; text-align: center; font-weight: 800; }

@media (max-width: 760px) {
  .hire-summary { flex-direction: column; }
  .hs-right { text-align: left; }
  .eq-table thead { display: none; }
  .eq-table, .eq-table tbody, .eq-table tr, .eq-table td { display: block; width: 100%; }
  .eq-table tbody tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .eq-table td { border: none; padding: 3px 6px; }
  .eq-table td.num { text-align: left; }
}

/* ===================================================================== */
/* Equipment & Hire v2 (lifted verbatim from design_handoff_equipment_hire_v2/
   v2.css, sections 1–7 — section 8 .btn-locked/.lock-banner already exist).
   Brass = pack/own affordances; indigo = primary; amber = needs-a-choice. */
/* ===================================================================== */

/* 1 · Item photos — shared thumbnail + onerror placeholder (§14g) */
.hire-thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg);
  border: 1px solid var(--line-soft); cursor: zoom-in; display: block; }
.hire-thumb.sm { width: 34px; height: 34px; border-radius: 7px; }
.hire-thumb.lg { width: 56px; height: 56px; }
.thumb-ph { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--bg) 0 6px, #efe9df 6px 12px); cursor: default; }
.thumb-ph svg { width: 50%; height: 50%; opacity: .5; }
@keyframes thumbShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 2 · Lightbox (our own modal, NOT an iframe) (§14g) */
.lightbox-card { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 460px; overflow: hidden; box-shadow: 0 24px 60px rgba(33,31,41,.34); }
.lightbox-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); display: block; }
.lightbox-img.ph { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--bg) 0 9px, #efe9df 9px 18px); }
.lightbox-img.ph svg { width: 64px; height: 64px; opacity: .5; }
.lightbox-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.lightbox-meta .lb-name { font-weight: 700; color: var(--ink); }
.lightbox-meta .lb-sub { font-size: .82rem; color: var(--muted); }
.lb-ext { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; color: var(--accent); white-space: nowrap; }
.lb-ext:hover { color: var(--accent-deep); }

/* 3 · Cross-company product picker — reuses .link-row + a scope banner (§14d-iii) */
.picker-scope { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent-deep); font-size: .86rem; }
.picker-scope .sc-co { font-weight: 800; }
.picker-scope svg { flex: none; color: var(--accent); }
.picker-scope .sc-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--good); flex: none; }
.link-row .lr-thumb { flex: none; }
.link-row .lr-price { flex: none; font-family: var(--serif); font-size: 1.05rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-row .lr-pack { font-size: .76rem; color: var(--muted); }
.lr-remember { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.lr-remember input { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
.picker-escape { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* 4 · Bulk disambiguation modal (§14d-iv — the hard part) */
.dis-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.dis-progress .dp-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dis-progress .dp-fill { height: 100%; background: var(--good); border-radius: 999px; }
.dis-progress .dp-text { font-size: .85rem; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.dis-progress .dp-text b { color: var(--good); }
.dis-progress .dp-text .need { color: var(--batch-deep); }
.dis-auto { margin: 14px 0; border: 1px solid var(--good-tint); border-radius: var(--radius-sm); overflow: hidden; }
.dis-auto-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--good-tint); color: var(--good); cursor: pointer; }
.dis-auto-head .da-t { font-weight: 800; font-size: .9rem; flex: 1; }
.dis-auto-head .da-chev { transition: transform .15s; }
.dis-auto.open .da-chev { transform: rotate(180deg); }
.dis-auto-body { padding: 4px 14px 8px; }
.da-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.da-row:last-child { border-bottom: none; }
.da-row .da-from { color: var(--muted); }
.da-row .da-to { font-weight: 700; color: var(--ink); flex: 1; }
.da-row .da-arrow { color: var(--muted); flex: none; }
.da-row .da-undo { font-size: .76rem; font-weight: 800; color: var(--accent); background: none; border: none; cursor: pointer; }
.dis-need-label { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--batch-deep); margin: 16px 0 8px; }
.dis-row { border: 1px solid var(--batch-line); border-radius: var(--radius-sm); padding: 12px 13px; margin-bottom: 10px; background: var(--batch-tint); }
.dis-row.resolved { border-color: var(--good-tint); background: var(--good-tint); }
.dis-row.skipped { border-color: var(--line); background: var(--bg); }
.dis-row-head { display: flex; align-items: center; gap: 11px; }
.dis-row-head .drh-name { font-weight: 700; color: var(--ink); flex: 1; }
.dis-row-head .drh-q { font-size: .8rem; color: var(--muted); }
.dis-state { font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dis-state.choose { background: #fff; color: var(--batch-deep); border: 1px solid var(--batch-line); }
.dis-state.ok { background: var(--good); color: #fff; }
.dis-state.skip { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.dis-picker { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--batch-line); display: flex; flex-direction: column; gap: 7px; }
.dis-pick-row { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.dis-pick-row:hover { border-color: var(--accent-line); background: var(--accent-tint); }
.dis-pick-row.chosen { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.dis-pick-row .dpr-main { flex: 1; min-width: 0; }
.dis-pick-row .dpr-name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.dis-pick-row .dpr-meta { font-size: .76rem; color: var(--muted); }
.dis-pick-row .dpr-price { font-family: var(--serif); font-size: 1rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.dis-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dis-skip { background: none; border: none; color: var(--muted); font-weight: 800; font-size: .82rem; cursor: pointer; padding: 4px 2px; text-decoration: underline; }
.dis-skip:hover { color: var(--ink); }
.dis-foot-note { font-size: .82rem; color: var(--batch-deep); }

/* 5 · Catalogue company facet (§14c/d) — second filter row + row tag */
.co-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-deep); border: 1px solid var(--accent-line); white-space: nowrap; }
.co-tag .sc-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--good); flex: none; }

/* 6 · Activate hire company (§14d-ii, owner /admin) */
.activate-entry { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px dashed var(--accent-line); border-radius: var(--radius); background: var(--accent-tint); }
.activate-entry .ae-main { flex: 1; }
.activate-entry .ae-title { font-weight: 800; color: var(--accent-deep); }
.activate-entry .ae-sub { font-size: .85rem; color: var(--ink-soft); margin-top: 1px; }
.co-known { display: flex; flex-wrap: wrap; gap: 9px; margin: 4px 0 14px; }
.co-pick { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 800; font-size: .85rem; color: var(--ink-soft); }
.co-pick:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.co-pick.on { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent) inset; }
.co-pick .cp-logo { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--serif); font-weight: 700; font-size: .85rem; }
.co-pick.custom { border-style: dashed; }
.import-progress { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line-soft); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--accent-line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-progress .ip-main { flex: 1; }
.import-progress .ip-t { font-weight: 700; color: var(--ink); }

/* 7 · Delivery field + quote-issue gate (§14b) */
.delivery-line { display: flex; align-items: center; gap: 10px; padding: 9px 0 2px; flex-wrap: wrap; }
.delivery-line .dl-label { font-size: .82rem; font-weight: 800; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.delivery-line .dl-label svg { color: var(--muted); }
.delivery-line.unset .dl-label { color: var(--batch-deep); }
.delivery-box { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.delivery-box .db-pound { padding: 0 4px 0 11px; color: var(--muted); font-weight: 700; }
.delivery-box input { width: 104px; min-height: 38px; border: 0; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 10px 0 2px; background: transparent; }
.delivery-box.unset { border-color: var(--batch-line); background: var(--batch-tint); }
.quote-gate { display: flex; gap: 11px; align-items: flex-start; padding: 12px 15px; margin: 14px 0 0; border-radius: var(--radius-sm);
  background: var(--batch-tint); border: 1px solid var(--batch-line); color: var(--batch-deep); font-size: .87rem; line-height: 1.5; }
/* the [hidden] attribute must beat display:flex, else the gate never hides once
   delivery is entered (same fix as .cp-egs / .dz-uploading). */
.quote-gate[hidden] { display: none; }
.quote-gate svg { flex: none; color: var(--batch); margin-top: 1px; }
.quote-gate b { color: var(--ink); }

/* ============================================================
   Seating Plan v0 — new components (lifted from seating.css §1–6).
   No existing rule is redefined; seat-*/diet-* re-map existing tokens.
   ============================================================ */
/* 1 · Status chips — lifecycle (seat-*) + dietaries (diet-*) */
.chip-select.seat-in_progress,
.badge.seat-in_progress      { background-color: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.chip-select.seat-layout_created,
.badge.seat-layout_created   { background-color: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }
.chip-select.seat-seats_allocated,
.badge.seat-seats_allocated  { background-color: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.chip-select.diet-pending,
.badge.diet-pending          { background-color: var(--bg); color: var(--muted); border-color: var(--line); }
.chip-select.diet-added,
.badge.diet-added            { background-color: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.chip-pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 2 · Seating Plan CTA — drops into the existing .event-cta row (Lane A),
      left of Event Sheet; same .cta shell, sub-area carries live status. */
.cta.cta-seating { align-items: center; }
.cta-seating .cta-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.cta-seating .cta-body h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cta-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Compact the two status chips in the CTA so the card stays the same height as the
   other .event-cta cards even when they wrap onto two rows (sub-page chips keep the
   standard size). */
.cta-status .badge { font-size: .58rem; padding: 2px 7px; letter-spacing: .03em; }
.seat-statusline { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .88rem; color: var(--ink-soft); }
.seat-dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.seat-dot.amber { background: #b9892f; }
.seat-dot.good  { background: var(--good); }
.seat-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); border: 1px solid var(--accent-line); }
.seat-pill svg { width: 13px; height: 13px; }
.seat-foot-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; color: var(--accent); }
.seat-foot-link:hover { color: var(--accent-deep); }

/* 3 · Sub-page panels (/events/<id>/seating) */
.seat-needed { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.seat-needed .sn-main { flex: 1; }
.seat-needed .sn-title { font-weight: 800; color: var(--ink); }
.seat-needed .sn-sub { color: var(--muted); font-size: .86rem; margin-top: 2px; max-width: 64ch; }
.seat-off-explain { display: flex; gap: 13px; align-items: flex-start; padding: 22px 20px; border-radius: var(--radius);
  background: var(--bg); border: 1px dashed var(--line); color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }
.seat-off-explain svg { flex: none; color: var(--muted); margin-top: 1px; }
.seat-link-input { font-size: 1rem; min-height: 52px; padding: 12px 14px; }
.seat-link-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-tint); border: 1px solid var(--accent-line); }
.seat-link-saved a { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.seat-link-edit { background: none; border: none; color: var(--muted); font-weight: 800; font-size: .82rem; text-decoration: underline; cursor: pointer; padding: 4px 2px; }
.seat-link-edit:hover { color: var(--ink); }
.seat-pin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seat-pin .pin-val { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.05rem; letter-spacing: .12em; color: var(--ink); }
.seat-pin .pin-none { color: var(--muted); }
.seat-pin .pin-copy { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .82rem; color: var(--accent); background: none; border: none; cursor: pointer; }
.seat-pin .pin-copy:hover { color: var(--accent-deep); }
.seat-saved { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--good); background: var(--good-tint); border: 1px solid #cdddc7; padding: 4px 10px; border-radius: 999px; }
.seat-request { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.seat-request .sr-text { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.seat-request .sr-text b { color: var(--ink); }
/* one-shot: after sending, the button is replaced by this disabled confirmation */
.seat-sent { display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; min-height: var(--tap); border-radius: var(--radius-sm);
  background: var(--good-tint); border: 1px solid #cdddc7; color: var(--good); font-weight: 800; font-size: .9rem; cursor: not-allowed; }
.seat-sent.btn-sm { min-height: 38px; font-size: .85rem; }
.seat-request .sr-after { font-size: .8rem; color: var(--muted); }

/* 4 · Final-PDF upload zone — states (.dropzone reused from app.css) */
.dropzone.dragover { border-color: var(--accent); background: #e4e6f4; box-shadow: 0 0 0 3px var(--accent-tint); }
.dropzone .dz-hint { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.dropzone .dz-or { color: var(--muted); font-size: .78rem; margin: 10px 0 4px; }
.dz-file { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.dz-file .dzf-ico { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.dz-file .dzf-main { flex: 1; min-width: 0; }
.dz-file .dzf-name { font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-file .dzf-meta { font-size: .82rem; color: var(--muted); }
.dz-file .dzf-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.dz-uploading { display: flex; align-items: center; gap: 13px; padding: 16px 15px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: var(--accent-tint); }
/* the [hidden] attribute must win over the flex display above, else the
   "Uploading…" bar shows permanently (only meant to appear mid-upload). */
.dz-uploading[hidden] { display: none; }
.dz-uploading .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--accent-line); border-top-color: var(--accent); animation: seatspin .8s linear infinite; flex: none; }
@keyframes seatspin { to { transform: rotate(360deg); } }
.dz-uploading .dzu-main { flex: 1; }
.dz-uploading .dzu-bar { height: 6px; border-radius: 999px; background: #d4d6ec; overflow: hidden; margin-top: 7px; }
.dz-uploading .dzu-fill { height: 100%; background: var(--accent); border-radius: 999px; }


/* 6 · Event-sheet section-picker modal (checklist) */
.sec-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0; }
.sec-item { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 600; }
.sec-item:hover { background: var(--accent-tint); }
.sec-item .sec-box { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; color: #fff; }
.sec-item.on .sec-box { background: var(--accent); border-color: var(--accent); }
.sec-item .sec-name { font-weight: 700; color: var(--ink); flex: 1; }
.sec-item .sec-hint { font-size: .82rem; color: var(--muted); }
.sec-item.disabled { cursor: not-allowed; opacity: .6; }
.sec-item.disabled:hover { background: none; }
.sec-item.disabled .sec-box { background: var(--line-soft); border-color: var(--line); }
.sec-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.sec-note svg { flex: none; color: var(--muted); margin-top: 1px; }

/* ============================================================================
   Client Portal — tabbed event page (lifted from client-portal.css; prototype-
   only bits — .proto-*, .dev-phone, pill/sidebar tab modes, white-label vars —
   dropped). Production ships the UNDERLINE tab style + Overview home; mobile
   collapses to a fits-on-screen icon-over-label bar (@media max-width:560px).
   ========================================================================== */

/* compact brand header (replaces the big logo card when the portal is tabbed) */
.cp-head { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 24px 0 14px; padding: 22px 24px 20px; }
.cp-brand { display: flex; align-items: center; gap: 13px; }
.cp-brand img { height: 54px; width: auto; }
.cp-brand .cp-word { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1.04; white-space: nowrap; }
.cp-brand .cp-word .amp { color: var(--accent); font-style: italic; }
.cp-brand .cp-tag { font-size: .56rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.cp-event { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); width: 100%; }
.cp-event .cp-for { font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.cp-event h1 { font-size: 1.7rem; line-height: 1.1; margin: 0; }
.cp-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 10px; color: var(--ink-soft); font-size: .92rem; }
.cp-meta .im { display: inline-flex; align-items: center; gap: 6px; }
.cp-meta .im svg { opacity: .7; color: var(--accent); }
/* the portal shell hides the legacy big header (we render .cp-head instead) */
.cp-shell .client-head { display: none; }

/* ---- tab bar (underline) ---- */
.cp-portal { margin-bottom: 8px; }
.cp-tablist { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.cp-tablist::-webkit-scrollbar { display: none; }
.cp-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; border: none; background: none; cursor: pointer; font-family: var(--sans); color: var(--ink-soft); white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color .14s, background .14s; padding: 13px 14px 14px; font-size: .96rem; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; }
.cp-tab svg { flex: none; opacity: .8; }
.cp-tab .cp-tab-lbl { font-weight: 700; }
.cp-tab:hover { color: var(--ink); }
.cp-tab.on { color: var(--accent-deep); border-bottom-color: var(--accent); }
.cp-tab.on svg { opacity: 1; color: var(--accent); }
.cp-tab .cp-tab-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.cp-tab .cp-tab-dot.good { background: var(--good); }
.cp-tab .cp-tab-dot.amber { background: var(--gold); }
.cp-tab .cp-tab-dot.accent { background: var(--accent); }

/* ---- panel ---- */
.cp-panel { padding-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .cp-tabpanel { animation: cp-fade .26s ease both; }
}
@keyframes cp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cp-panel-head { margin-bottom: 14px; }
.cp-panel-head h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1.1; margin: 0; }
.cp-panel-head .cp-panel-sub { color: var(--muted); font-size: .95rem; margin-top: 3px; }

/* ---- friendly "not ready yet" empty state ---- */
.cp-empty { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 46px 28px 42px; margin-top: 4px; }
.cp-empty .ce-ico { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); background-image: repeating-linear-gradient(45deg, transparent 0 7px, rgba(58,63,143,.05) 7px 8px); }
.cp-empty h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin: 0 0 .3em; }
.cp-empty p { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; max-width: 38ch; margin: 0 auto; }
.cp-empty .ce-soon { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 7px 14px; border-radius: 999px; background: #f6efe1; border: 1px solid #e6dcc4; color: #6f5a23; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.cp-empty .ce-soon svg { color: var(--gold); }

/* ---- Notes for the team ---- */
.cp-notes { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cp-notes-band { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; background: var(--accent-tint); border-bottom: 1px solid var(--accent-line); }
.cp-notes-band .nb-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--card); display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-sm); }
.cp-notes-band .nb-main h3 { margin: 0 0 2px; font-size: 1.2rem; }
.cp-notes-band .nb-main p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.cp-notes-body { padding: 18px 20px 20px; }
.cp-notes-label { display: block; font-size: 1.02rem; color: var(--ink); font-weight: 700; margin-bottom: 4px; font-family: var(--serif); }
.cp-notes-label + .cp-notes-help { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.cp-notes-input { width: 100%; min-height: 150px; resize: vertical; font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background-color: var(--card); transition: border-color .14s, box-shadow .14s; }
.cp-notes-input::placeholder { color: var(--muted); }
.cp-notes-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.cp-notes-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cp-notes-vis { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .82rem; }
.cp-notes-vis svg { color: var(--accent); opacity: .8; flex: none; }
.cp-save-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 700; color: var(--good); }
.cp-save-flag.saving { color: var(--muted); }
.cp-save-flag.error { color: var(--danger); }   /* WP6: "Not saved" was shown in the saved green */
.cp-save-flag .sdot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.cp-save-flag.saving .sdot { animation: pulse 1s ease-in-out infinite; }
.cp-egs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cp-egs[hidden] { display: none; }   /* the hidden attr must beat display:flex */
.cp-egs .cp-eg-lbl { width: 100%; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cp-eg { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px dashed var(--accent-line); background: var(--card); color: var(--accent-deep); font-family: var(--sans); font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .12s; }
.cp-eg:hover { background: var(--accent-tint); border-style: solid; }
.cp-eg .plus { color: var(--accent); font-weight: 800; }

/* ---- Overview (status home) ---- */
.cp-ov-welcome { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 16px; }
.cp-ov-welcome p { margin: 0; color: var(--ink-soft); font-size: 1.06rem; line-height: 1.6; font-family: var(--serif); font-style: italic; }
.cp-status { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.cp-status-row { display: flex; align-items: center; gap: 15px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 15px 18px; cursor: pointer; font-family: var(--sans); transition: border-color .14s, box-shadow .14s, transform .04s; }
.cp-status-row:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.cp-status-row:active { transform: translateY(1px); }
.cp-status-row .sr-ico { flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.cp-status-row .sr-main { flex: 1; min-width: 0; }
.cp-status-row .sr-title { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.cp-status-row .sr-sub { display: block; color: var(--muted); font-size: .9rem; margin-top: 5px; line-height: 1.45; }
.cp-status-row .sr-go { flex: none; color: var(--muted); display: grid; place-items: center; }
.cp-status-row:hover .sr-go { color: var(--accent); }

/* shared status badge (overview + tab content) */
.cp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: 4px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.cp-badge svg { flex: none; }
.cp-badge.good { background: var(--good-tint); border-color: #cdddc7; color: #3c5238; }
.cp-badge.amber { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; }
.cp-badge.indigo { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-deep); }
.cp-badge.grey { background: var(--bg); border-color: var(--line); color: var(--muted); }
.cp-badge.gold { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; }

/* ---- Table plan (seating) ---- */
.cp-seat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cp-seat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.cp-seat-head h3 { margin: 0; font-size: 1.25rem; }
.cp-seat-status { display: flex; flex-wrap: wrap; gap: 7px; }
.cp-seat-body { padding: 20px; }
.cp-seat-open { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 56px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; text-decoration: none; transition: background .14s; }
.cp-seat-open:hover { background: var(--accent-deep); }
.cp-seat-open svg { flex: none; }
.cp-seat-pinrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.cp-pin-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cp-pin-val { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 600; letter-spacing: .22em; color: var(--ink); }
.cp-pin-none { font-style: italic; color: var(--muted); }
.cp-pin-copy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-family: var(--sans); font-size: .82rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.cp-pin-copy:hover { border-color: var(--accent-line); color: var(--accent-deep); background: var(--accent-tint); }
.cp-pin-copy.done { color: var(--good); border-color: #cdddc7; background: var(--good-tint); }
.cp-seat-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.cp-seat-note svg { flex: none; opacity: .7; margin-top: 1px; }

/* ---- download / print + schedule approval ---- */
.cp-dl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.cp-dl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; min-height: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft); font-family: var(--sans); font-size: .92rem; font-weight: 700; cursor: pointer; transition: all .14s; text-decoration: none; }
.cp-dl-btn:hover { border-color: var(--accent-line); color: var(--accent-deep); background: var(--accent-tint); }
.cp-dl-btn svg { color: var(--accent); flex: none; }
.cp-dl-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.cp-dl-btn.primary:hover { background: var(--accent-deep); }
.cp-dl-btn.primary svg { color: #fff; }
.cp-dl-hint { flex: 1 1 100%; text-align: center; font-size: .88rem; color: var(--ink-soft); }
.cp-approve { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cp-approve .ca-lead { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 240px; }
.cp-approve .ca-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); }
.cp-approve .ca-main { min-width: 0; }
.cp-approve .ca-title { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.cp-approve .ca-sub { color: var(--muted); font-size: .9rem; margin-top: 3px; line-height: 1.5; }
.cp-approve .ca-btn { flex: none; min-height: 48px; padding: 0 24px; }
.cp-approve.approved { background: var(--good-tint); border-color: #cdddc7; }
.cp-approve.approved .ca-ico { background: var(--good); color: #fff; }
.cp-approve.approved .ca-title { color: #3c5238; }
.cp-approve .ca-undo { background: none; border: none; padding: 0; color: var(--accent-deep); font-weight: 700; font-family: var(--sans); font-size: .9rem; cursor: pointer; text-decoration: underline; }
.cp-approve .ca-undo:hover { color: var(--accent); }

/* ---- mobile: every tab collapses to one fits-on-screen icon-over-label bar ---- */
@media (max-width: 560px) {
  .cp-head { padding: 18px 16px 16px; }
  .cp-brand img { height: 46px; }
  .cp-event h1 { font-size: 1.45rem; }
  .cp-panel-head h2 { font-size: 1.35rem; }
  .cp-portal { display: block; }
  .cp-portal .cp-tablist { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; position: static; overflow: visible; border-bottom: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 5px; box-shadow: var(--shadow-sm); }
  .cp-portal .cp-tab { flex-direction: column; gap: 5px; width: auto; margin: 0; justify-content: center; padding: 8px 3px; min-height: 60px; border: none; border-radius: 10px; font-size: .7rem; text-align: center; }
  .cp-portal .cp-tab .cp-tab-lbl { white-space: normal; line-height: 1.12; font-weight: 700; }
  .cp-portal .cp-tab.on { background: var(--accent); color: #fff; }
  .cp-portal .cp-tab.on svg { color: #fff; opacity: 1; }
  .cp-portal .cp-tab .cp-tab-dot { position: absolute; top: 6px; right: 10px; }
  .cp-portal .cp-tab.on .cp-tab-dot { background: #fff !important; }
}

/* ---- print: a clean menu / schedule sheet (strip the portal chrome) ---- */
@media print {
  .cp-tablist, .cp-dl, .cp-approve, .save-bar, .alg-bar, .site-foot, .client-banner { display: none !important; }
  .cp-panel { padding-top: 0 !important; }
  .client-wrap { max-width: none !important; padding: 0 !important; }
}

/* ============================================================================
   Event Quote — Surface A: menu food pricing (lifted from quote.css §A).
   ========================================================================== */
.price-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 34px; padding: 4px 11px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; border: 1px solid var(--accent-line); background: var(--accent-tint); color: var(--accent-deep); transition: border-color .12s, background .12s, color .12s; white-space: nowrap; }
.price-chip:hover { border-color: var(--accent); }
.price-chip .pc-edit { border: none; background: none; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 4px; padding: 0; min-height: 0; line-height: 1; }
.price-chip .pc-edit:hover { background: none; color: inherit; }
.price-chip .pc-head { font-weight: 700; font-size: .76rem; opacity: .75; }
.price-chip .pc-tag { font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.price-chip.is-auto { background: var(--bg); border-color: var(--line); color: var(--ink-soft); }
.price-chip.is-auto:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.price-chip.is-override { background: var(--accent); border-color: var(--accent); color: #fff; }
.price-chip.is-override .pc-reset { color: rgba(255,255,255,.78); }
.price-chip.is-unset { background: #f6efe1; border-color: #e6dcc4; color: #876a2b; }
.price-chip.is-unset:hover { border-color: #d8c69a; }
/* Not saved (be94cf2c): the database was busy and the price is still only in
   the browser. Deliberately louder than is-unset -- unset is a decision not yet
   made, this is work about to be lost. Dashed, so it survives greyscale. */
.price-chip.is-unsaved { background: #fdf1f1; border: 1px dashed #d98c8c; color: #9a3b3b; }
.price-chip.is-unsaved:hover { border-color: #c06a6a; }
.price-chip .pc-reset { display: inline-grid; place-items: center; width: 18px; height: 18px; min-height: 0; border-radius: 999px; margin-left: 1px; border: none; background: none; cursor: pointer; font-weight: 800; color: inherit; }
.price-chip .pc-reset:hover { background: rgba(255,255,255,.2); color: inherit; }
.price-edit { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.price-edit .pe-pound { font-weight: 800; color: var(--ink-soft); }
.price-edit input { width: 76px; min-height: 34px; padding: 4px 8px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }
.price-edit .pe-head { font-size: .76rem; color: var(--muted); font-weight: 700; }
.std-pill { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: .72rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); border: 1px dashed var(--line); background: var(--card); border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.std-pill:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.std-pill b { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
/* dish name on the event menu list — serif + dark ink (Design §3), not link-blue */
.line-edit .grow a.d-name { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.line-edit .grow a.d-name:hover { color: var(--accent-deep); text-decoration: none; }
.food-total-bar { position: sticky; bottom: 0; z-index: 20; margin-top: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border: 1px solid var(--accent-line); border-radius: var(--radius); background: linear-gradient(180deg, var(--card), var(--accent-tint)); box-shadow: 0 -2px 14px rgba(43,47,110,.07); }
.food-total-bar .ftb-label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.food-total-bar .ftb-total { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--accent-deep); line-height: 1; font-variant-numeric: tabular-nums; }
.food-total-bar .ftb-total .ftb-vatnote { font-family: var(--sans); font-size: .72rem; font-weight: 700; color: var(--muted); margin-left: 8px; }
.food-total-bar .ftb-warn { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: #876a2b; }
.food-total-bar .ftb-warn[hidden] { display: none; }
.food-total-bar .ftb-warn svg { color: #9a7b3f; }
.food-total-bar .ftb-spacer { flex: 1; }
.food-total-bar .ftb-open { font-weight: 800; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.food-total-bar .ftb-open:hover { color: var(--accent-deep); }
.vat-display { display: inline-flex; align-items: center; gap: 8px; }
.vat-display .vd-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.vat-display .vd-seg button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-size: .76rem; font-weight: 800; padding: 6px 12px; color: var(--muted); }
.vat-display .vd-seg button.on { background: var(--accent); color: #fff; }
.std-field { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 0 11px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.std-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.std-field .sf-pound { font-weight: 800; color: var(--ink-soft); }
.std-field input { width: 62px; min-height: 0; border: none; padding: 0; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; background: none; }
.std-field input:focus { box-shadow: none; outline: none; }
.std-field .sf-head { font-size: .8rem; color: var(--muted); font-weight: 700; }

/* ============================================================================
   Event Quote — Surface B: the Quote / Invoice page (lifted from quote.css §B).
   ========================================================================== */
.quote-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 18px 0; }
.quote-status { min-width: 0; }
.quote-status .qs-mode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote-status .qs-mode h1 { margin: 0; }
.quote-status .qs-sub { color: var(--muted); font-size: .92rem; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quote-status .qs-sub .linkbtn { font-weight: 800; color: var(--accent); }
.inv-frozen { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 800; letter-spacing: .03em; color: var(--gold); background: #f5efe2; border: 1px solid #e6dcc4; border-radius: 999px; padding: 4px 11px; }
.inv-frozen svg { color: var(--gold); }
.quote-exports { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.qv-switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; gap: 3px; }
.qv-switch button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-weight: 800; font-size: .88rem; color: var(--ink-soft); padding: 8px 16px; min-height: 40px; border-radius: 6px; white-space: nowrap; }
.qv-switch button:hover { color: var(--accent-deep); }
.qv-switch button[aria-selected="true"] { background: var(--card); color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.quote-doc { padding: 0; }
.quote-doc .qd-pad { padding: 22px 26px; }
.q-group { margin-top: 26px; }
.q-group:first-child { margin-top: 0; }
.q-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 4px; }
.q-group-head .qg-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--accent-deep); }
.q-group-head .qg-sub { font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.q-line { display: flex; align-items: flex-start; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.q-line:last-child { border-bottom: none; }
.q-line .ql-main { flex: 1; min-width: 0; }
.q-line .ql-name { font-weight: 700; color: var(--ink); }
.q-line .ql-detail { color: var(--muted); font-size: .85rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.q-line .ql-amt { flex: none; font-family: var(--serif); font-size: 1.18rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-line.is-edit { cursor: pointer; }
.q-line.is-edit:hover { background: var(--accent-tint); border-radius: var(--radius-sm); }
.q-line .ql-move { flex: none; opacity: 0; color: var(--muted); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: none; background: none; cursor: pointer; }
.q-line:hover .ql-move { opacity: .7; }
.q-line .ql-move:hover { opacity: 1; background: var(--accent-tint); color: var(--accent-deep); }
/* Quote Extras §1 — was flex; a 3-column grid so the add button sits in its OWN
   track. On a read-only quote the track is present and empty, so row height,
   baseline and the money column's right edge are identical in both states. */
.q-summary-row { display: grid; grid-template-columns: 1fr auto 38px; align-items: baseline; column-gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--line-soft); }
.q-summary-row .qsr-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.q-summary-row .qsr-sub { color: var(--muted); font-size: .85rem; font-weight: 600; margin-left: 10px; }
.q-summary-row .qsr-amt { font-family: var(--serif); font-size: 1.5rem; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.q-summary-row.muted-row .qsr-name, .q-summary-row.muted-row .qsr-amt { color: var(--muted); }
.qsr-add {
  grid-column: 3; justify-self: end; align-self: center;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: none; background: none; cursor: pointer; border-radius: 999px;
  color: var(--muted); opacity: .55; transition: opacity .12s, background .12s, color .12s;
}
.qsr-add:hover, .qsr-add:focus-visible { opacity: 1; background: var(--accent-tint); color: var(--accent-deep); }
.qsr-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Alexander works on an iPad — never hover-gate the only way in. */
@media (hover: none) { .qsr-add { opacity: .75; } }
/* the empty-Extras hint — a third line under the label, not a replacement for
   "nothing yet". Shown only while the stream has no lines. */
.q-summary-row .qsr-hint {
  grid-column: 1 / 2; display: block; margin-top: 3px;
  font-size: .82rem; font-weight: 600; color: var(--muted); opacity: .8;
}
/* The same slot, as a control — the hire estimate has to be reachable from the
   Summary view, which is where the caterer actually stands. */
.q-summary-row .qsr-estbtn {
  border: none; background: none; padding: 0; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--accent-deep); opacity: 1;
}
.q-summary-row .qsr-estbtn:hover, .q-summary-row .qsr-estbtn:focus-visible { text-decoration: underline; }

/* Quote Extras §2 — the ESTIMATED marker. NOT `badge badge-soft`: that tag
   reports provenance (added / deleted) and is internal; this one reports the
   confidence of a number and the client reads it. The DASHED border is the
   non-colour carrier, so it survives greyscale PDF, Word and a mono printer.
   Indigo, not amber — provisional is not a warning. */
.badge-est {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: 2px;
  font-family: var(--sans); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-tint);
  border: 1px dashed var(--accent-line); border-radius: 999px; padding: 3px 9px;
}
.badge-est::before { content: ""; width: 5px; height: 5px; border-radius: 999px; border: 1px dashed currentColor; opacity: .55; }
/* a per-guest line's arithmetic, in the existing .ql-detail slot */
.q-line .ql-detail .qld-basis { font-weight: 700; color: var(--ink-soft); }

/* Quote Extras §3 — a notice that carries an action. Built off .q-flagged (same
   ground, hairline and uppercase eyebrow) plus a button slot. Used for the hire
   double-count, and with .is-warn for the issue-with-estimates warning. */
.q-notice {
  display: flex; align-items: flex-start; gap: 13px; flex-wrap: wrap;
  margin-top: 14px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.q-notice > svg { flex: none; margin-top: 2px; color: var(--accent); }
.q-notice .qn-main { flex: 1 1 320px; min-width: 0; }
.q-notice .qn-head { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.q-notice .qn-body { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.q-notice .qn-body b { color: var(--ink); font-variant-numeric: tabular-nums; }
.q-notice .qn-act { flex: none; align-self: center; }
.q-notice.is-warn { background: #f6efe1; border-color: #e6dcc4; }
.q-notice.is-warn > svg { color: var(--gold); }
.q-notice.is-warn .qn-head { color: #876a2b; }

/* Quote Extras §4 — the estimate caveat. Sits with the terms, not above the
   totals: it is a note about the document, not a line in the sum. */
.q-caveat {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: .88rem; line-height: 1.55;
}
.q-caveat > svg { flex: none; margin-top: 2px; color: var(--accent); opacity: .8; }
.q-caveat b { color: var(--ink); }

/* Quote Extras §5 — the two new line-modal controls. */
.lm-guests {
  display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 13px;
  border: 1px dashed var(--accent-line); border-radius: var(--radius-sm);
  background: var(--accent-tint); color: var(--accent-deep);
  font-weight: 800; font-variant-numeric: tabular-nums;
}
.lm-guests .lmg-note { font-weight: 600; font-size: .82rem; color: var(--muted); }
.lm-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.lm-check[hidden] { display: none; }   /* A1b replace-estimate tick — [hidden] loses to flex */
.lm-check input { margin-top: 2px; flex: none; }
.lm-check .lmc-t { font-weight: 700; color: var(--ink); }
.lm-check .lmc-s { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.lm-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lm-total .lmt-l { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lm-total .lmt-v { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.q-add { display: flex; gap: 9px; align-items: center; padding: 10px 2px; flex-wrap: wrap; }
.q-add-btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sans); font-weight: 800; font-size: .84rem; color: var(--accent); background: none; border: 1px dashed var(--accent-line); border-radius: var(--radius-sm); padding: 8px 13px; cursor: pointer; min-height: 38px; }
.q-add-btn:hover { background: var(--accent-tint); }
.q-flagged { margin-top: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.q-flagged .qf-head { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #876a2b; display: flex; align-items: center; gap: 7px; }
.q-flagged ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.q-flagged li { display: flex; align-items: baseline; gap: 8px; font-size: .88rem; color: var(--ink-soft); }
.q-flagged li .qf-name { font-weight: 700; text-decoration: line-through; text-decoration-color: var(--line); color: var(--muted); }
.q-flagged li .qf-why { color: #876a2b; font-size: .82rem; }
.q-totals { margin-top: 22px; margin-left: auto; max-width: 420px; }
.q-totals .qt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 7px 0; font-size: .98rem; color: var(--ink-soft); }
.q-totals .qt-row .qt-v { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.q-totals .qt-row.is-discount .qt-v { color: var(--good); }
.q-totals .qt-row.grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; }
.q-totals .qt-row.grand .qt-l { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.q-totals .qt-row.grand .qt-v { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--accent-deep); }
.q-totals .qt-row.is-balance { border-top: 1.5px solid var(--accent-line); margin-top: 6px; padding-top: 10px; }
.q-totals .qt-row.is-balance .qt-l { font-weight: 800; color: var(--ink); }
.q-totals .qt-row.is-balance .qt-v { font-weight: 800; color: var(--accent-deep); font-size: 1.15rem; }
.q-totals .qt-row.is-deposit, .q-totals .qt-row.is-deposit .qt-v { color: var(--accent-deep); }
.adj-panel { margin-top: 16px; }
.adj-head { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 14px 20px; }
.adj-head .ah-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-tint); color: var(--accent-deep); display: grid; place-items: center; flex: none; }
.adj-head .ah-title { font-weight: 800; color: var(--ink); flex: 1; }
.adj-head .ah-summary { color: var(--muted); font-size: .85rem; font-weight: 600; }
.adj-body { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--line-soft); }
/* The panel was designed collapsed (aria-expanded="false", a toggle) but
   `display:flex` beat the [hidden] attribute, so it has always rendered open.
   Fixed 24 Oct 2026 alongside the deposit's read-only row (§46 D8). */
.adj-body[hidden] { display: none; }
/* §51 — food zero-rated switch: its own form above the adjustments. */
.adj-foodvat { padding-bottom: 0; }
.adj-foodvat + .adj-body { border-top: 0; }
.adj-switch-row { flex-direction: row; align-items: flex-start; gap: 12px; }
.adj-switch-row .dpswitch { flex: none; margin-top: 2px; }
.adj-foodvat-locked .adj-switch-row { padding: 14px 20px; }
.adj-field { display: flex; flex-direction: column; gap: 9px; }
/* §46 — the deposit invoice: read-only in Adjustments (D8), a card in the Issue block. */
.dep-readonly { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-weight: 600; color: var(--ink); }
.dep-readonly svg { color: var(--accent); }
.dep-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 14px; padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--accent-tint); border: 1px solid var(--accent-line); }
.dep-card .dc-main { display: flex; gap: 11px; align-items: flex-start; flex: 1 1 280px; }
.dep-card .dc-ico { color: var(--accent); margin-top: 2px; }
.dep-card .dc-title { font-weight: 800; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dep-card .dc-sub { color: var(--ink-soft); font-size: .88rem; margin-top: 3px; }
.dep-card .dc-act { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.dep-card .dc-act .inline-form { display: inline; }
.adj-field .af-label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.adj-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adj-controls .ac-result { margin-left: auto; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.adj-controls input[type=number] { width: 96px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.seg button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-weight: 800; font-size: .82rem; color: var(--muted); padding: 9px 14px; min-height: 42px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.staff-team { font-size: .82rem; font-weight: 700; color: var(--ink-soft); padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); flex: none; }
@media (max-width: 760px) { .q-totals { max-width: none; } .quote-exports { width: 100%; } }

/* ============================================================================
   Event Quote — Client Portal Quote/Invoice tab.
   ========================================================================== */
.cp-quote { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.cp-quote .cpq-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.cp-quote .cpq-row:last-child { border-bottom: none; }
.cp-quote .cpq-row > span:first-child { color: var(--ink-soft); font-weight: 600; }
.cp-quote .cpq-row > span:last-child { font-weight: 700; color: var(--ink); }
.cp-quote .cpq-sub { background: var(--bg); }
.cp-quote .cpq-sub > span:first-child { color: var(--muted); }
.cp-quote .cpq-grand { border-top: 2px solid var(--ink); background: var(--bg); }
.cp-quote .cpq-grand > span { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.cp-quote .cpq-grand > span:last-child { color: var(--accent-deep); }
/* detailed view: a stream header (Food / Staff / Hire) over its itemised lines */
.cp-quote .cpq-grouphead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 20px 8px; border-bottom: 1px solid var(--line-soft); font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.cp-quote .cpq-grouphead > span:last-child { font-family: var(--sans); font-size: .9rem; font-weight: 800; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.cp-quote .cpq-item { padding-left: 32px; }
.cp-quote .cpq-item > span:first-child { font-weight: 500; color: var(--ink-soft); }
/* Item 7 — the per-head breakdown under the menu line. Client-facing, unlike
   the internal per-line detail, which is stripped before it gets here. */
.cp-quote .cpq-detail { display: block; margin-top: 3px; font-size: .84rem; color: var(--muted); }
.cp-quote .cpq-item > span:last-child { font-weight: 600; }
.cp-pay { margin-top: 16px; border: 1px solid var(--accent-line); border-radius: var(--radius); background: linear-gradient(180deg, var(--accent-tint), var(--card)); padding: 16px 20px; }
.cp-pay .cpp-head { font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cp-pay .cpp-head svg { color: var(--accent); }
/* §46 D11 — the client's deposit invoice card on the Quote tab. */
.cp-depinv { margin: 4px 0 18px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cp-depinv .cdi-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cp-depinv .cdi-title { font-weight: 800; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.cp-depinv .cdi-title svg { color: var(--accent); }
.cp-depinv .cdi-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-top: 8px; border-top: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.cp-depinv .cdi-total > span { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.cp-depinv .cdi-total > span:first-child { color: var(--ink-soft); }
.cp-depinv .cdi-total > span:last-child { color: var(--accent-deep); }
.cp-depinv .cdi-split { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.cp-depinv .cp-dl { margin-top: 14px; }
.cp-pay .cpp-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; flex-wrap: wrap; }
.cp-pay .cpp-l { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 104px; }
.cp-pay .cpp-ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--accent-deep); background: var(--card); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 5px 10px; }

/* ============================================================================
   Surface C — Invoice & bank settings form (lifted from quote.css §Surface C).
   ========================================================================== */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.set-grid .full { grid-column: 1 / -1; }
.num-example { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--accent-deep); font-weight: 700; }
.set-hint { display: flex; gap: 9px; align-items: flex-start; font-size: .85rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.set-hint svg { color: var(--accent); flex: none; margin-top: 2px; }
.rate-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rate-row > div { flex: 1; min-width: 110px; }
.pct-field { position: relative; }
.pct-field .pct-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; pointer-events: none; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   Event notes — inline auto-save box shown on every top-level event tab.
   ========================================================================== */
.evnotes { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); padding: 13px 18px; margin-bottom: 16px; }
.evnotes-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.evnotes-ico { color: var(--accent); display: inline-flex; flex: none; }
.evnotes-title { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.evnotes-sub { font-weight: 500; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--muted); }
.evnotes-flag { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.evnotes-flag .sdot { width: 7px; height: 7px; border-radius: 999px; background: #2e9c6e; transition: background .15s; }
.evnotes-flag.saving .sdot { background: var(--accent); }
.evnotes-flag.error { color: var(--danger, #c0392b); }
.evnotes-flag.error .sdot { background: var(--danger, #c0392b); }
.evnotes-toggle { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink-soft); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.evnotes-toggle:hover { border-color: var(--accent-line); color: var(--accent-deep); background: var(--accent-tint); }
.evnotes-toggle .evt-contract { display: none; }
.evnotes-toggle[aria-expanded="true"] .evt-expand { display: none; }
.evnotes-toggle[aria-expanded="true"] .evt-contract { display: inline-flex; }
.evnotes-ta { width: 100%; min-height: 64px; height: 64px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-family: var(--sans); font-size: .92rem; line-height: 1.5; color: var(--ink); resize: vertical; overflow-y: auto; }
.evnotes-ta::placeholder { color: var(--muted); }
.evnotes-ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); outline: none; background: var(--card); }

/* Bonus fix (Guest Planning handoff): even out the event sub-nav tabs so they
   distribute across the row instead of left-packing. */
.event-tabs { justify-content: space-between; }

/* ============================================================================
   Guest Planning & Dietary Matrix (see 'Guest Planning & Dietary Matrix -
   Feature Spec.md' §8, design_handoff_guest_planning/dietary.css §1-9).
   ========================================================================== */

/* 1 · Diet badges — V / Ve / P  (dish view, menu pickers, client menu) */
.diet-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 21px;
  padding: 0 6px; border-radius: 6px; font-family: var(--sans); font-size: .7rem; font-weight: 800;
  letter-spacing: .02em; border: 1px solid transparent; vertical-align: middle; }
.diet-badge.ve { background: var(--good); color: #fff; border-color: var(--good); }
.diet-badge.v  { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.diet-badge.p  { background: #e6eff0; color: #2f6b73; border-color: #cfe2e3; }
.diet-badge.lg { height: 24px; font-size: .76rem; padding: 0 8px; }

.suit-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.suit-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; border: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.suit-pill .sp-dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; flex: none; }
.suit-pill.yes { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.suit-pill.adaptable { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.suit-pill.no { background: var(--bg); color: var(--muted); border-color: var(--line); }

/* 2 · Diet-class toggle chips — dish editor (mirror .alg-toggle) */
.diet-toggle-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.diet-toggle { font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: all .12s; min-height: 38px; }
.diet-toggle:hover { border-color: var(--good); color: var(--good); }
.diet-toggle.on { background: var(--good); border-color: var(--good); color: #fff; }
.diet-toggle.on:hover { background: var(--good); color: #fff; }
/* AI/seed/derived diet tags awaiting human review. */
.diet-toggle.on.unconfirmed { background: #fdf3d6; color: #8a6d12; border-color: #e6c971; border-style: dashed; }
details.diet-edit { margin-top: 6px; }
details.diet-edit summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); font-size: .88rem; }

/* 3 · Requirement chips — allergy / diet / religious / custom */
.req-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: .78rem;
  font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-soft); white-space: nowrap; }
.req-chip svg { width: 12px; height: 12px; }
.req-chip.allergy   { background: var(--danger-tint); color: var(--danger); border-color: #e2cfcc; }
.req-chip.diet      { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.req-chip.religious { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-line); }
.req-chip.custom    { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.req-chip.add { background: none; border-style: dashed; color: var(--muted); cursor: pointer; }
.req-chip.add:hover { border-color: var(--accent); color: var(--accent); }
/* "from client" provenance pill */
.from-client { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  background: #eef0f7; color: #4a5891; border: 1px solid #d6dcf0; }

/* 4 · Coverage / gaps engine — the headline */
.gap-banner { display: flex; gap: 13px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius);
  background: var(--danger-tint); border: 1px solid #e2cfcc; border-left: 4px solid var(--danger); }
.gap-banner.clear { background: var(--good-tint); border-color: #cdddc7; border-left-color: var(--good); }
.gap-banner .gb-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: #fff; color: var(--danger); box-shadow: var(--shadow-sm); }
.gap-banner.clear .gb-ico { color: var(--good); }
.gap-banner .gb-title { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.gap-banner .gb-sub { font-size: .88rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }
.gap-banner .gb-sub b { color: var(--danger); }

.cov-list { display: flex; flex-direction: column; gap: 0; }
.cov-row { border-top: 1px solid var(--line-soft); padding: 14px 2px; }
.cov-row:first-child { border-top: none; }
.cov-head { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.cov-head .cov-label { font-weight: 800; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; }
.cov-head .cov-n { font-size: .8rem; font-weight: 700; color: var(--muted); }
.cov-courses { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }
.cov-course { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); }
.cov-course svg { width: 13px; height: 13px; }
.cov-course .cc-course { color: var(--muted); font-weight: 700; }
.cov-course.ok    { background: var(--good-tint); color: var(--good); border-color: #cdddc7; }
.cov-course.adapt { background: #f6efe1; color: #876a2b; border-color: #e6dcc4; }
.cov-course.gap   { background: var(--danger-tint); color: var(--danger); border-color: #e2cfcc; font-weight: 800; }
.cov-chevron { color: var(--muted); transition: transform .15s; flex: none; }
.cov-row.open .cov-chevron { transform: rotate(90deg); }
.cov-detail { margin: 12px 0 2px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.cov-detail-row { display: flex; gap: 12px; align-items: baseline; padding: 5px 0; font-size: .88rem; }
.cov-detail-row .cdr-course { flex: 0 0 130px; font-weight: 800; color: var(--ink-soft); }
.cov-detail-row .cdr-dishes { color: var(--ink); }
.cov-detail-row .cdr-none { color: var(--danger); font-weight: 700; }
.cov-detail-row .cdr-adapt { color: #876a2b; font-style: italic; }

/* 4b · Coverage & gaps — List / Grid toggle + the dish x requirement grid
   (an alternative view to the rows above; shared markup for the caterer
   Guest Planning page and the client portal's Guests tab). */
.gp-viewbar { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
.gp-viewseg { display: inline-flex; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.gp-viewseg button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: .86rem; color: var(--muted); padding: 7px 13px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.gp-viewseg button:hover { color: var(--ink-soft); }
.gp-viewseg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.cov-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.cov-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-family: var(--sans); }
.cov-grid th, .cov-grid td { border-bottom: 1px solid var(--line-soft); }
.cov-grid thead th { position: sticky; top: 0; background: var(--card); z-index: 2; padding: 9px 5px; vertical-align: bottom; text-align: center; }
.cov-grid .cg-corner { text-align: left; padding-left: 16px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); position: sticky; left: 0; z-index: 3; background: var(--card); min-width: 150px; }
.cov-grid .cg-req { min-width: 47px; }
.cov-grid .cg-req-lbl { display: block; font-size: .74rem; font-weight: 800; color: var(--ink-soft); line-height: 1.15; }
.cov-grid .cg-req-n { display: inline-block; margin-top: 4px; font-size: .64rem; font-weight: 800; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; min-width: 18px; }
.cov-grid .cg-req.diet .cg-req-lbl { color: var(--good); }
.cov-grid .cg-req.allergy .cg-req-lbl { color: var(--danger); }
.cov-grid .cg-req.religious .cg-req-lbl { color: var(--accent-deep); }
.cov-grid .cg-req.gap { box-shadow: inset 0 -3px 0 var(--danger); }
.cov-grid .cg-excl-h { min-width: 50px; font-size: .64rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); line-height: 1.15; }

.cov-grid .cg-course-row td { background: var(--bg); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.cov-grid .cg-course-lbl { position: sticky; left: 16px; display: inline-block; }
.cov-grid .cg-corner, .cov-grid .cg-dish { border-right: 1px solid var(--line); }
.cov-grid .cg-dish { text-align: left; padding: 10px 10px 10px 16px; font-weight: 700; color: var(--ink); white-space: normal; line-height: 1.25; position: sticky; left: 0; background: var(--card); z-index: 1; max-width: 190px; }
.cov-grid .cg-dish .diet-badge { margin-left: 7px; }
.cov-grid tbody tr:hover td { background: var(--bg); }
.cov-grid tbody tr:hover .cg-dish { background: #f4f1ea; }
.cov-grid .cg-cell { text-align: center; padding: 9px 4px; }
.cov-grid .cg-cell svg { display: inline-block; vertical-align: middle; }
.cov-grid .cg-cell.ok { color: var(--good); background: var(--good-tint); }
.cov-grid .cg-cell.adapt { color: #876a2b; background: #f6efe1; }
.cov-grid .cg-cell.caution { color: #9a5a1e; background: #f7e6d2; }
.cov-grid .cg-cell.unsafe { color: var(--danger); background: var(--danger-tint); }
.cov-grid .cg-cell.check { color: #4a5891; background: #eef0f7; }
.cov-grid .cg-excl { text-align: center; font-weight: 800; font-size: .92rem; color: var(--muted); }
.cov-grid .cg-excl.has { color: #876a2b; }
.cov-grid .cg-excl.hot { color: var(--danger); }
.cov-grid tbody tr:last-child td { border-bottom: none; }

.cg-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }
.cg-legend > span:not(.cg-legend-note) { display: inline-flex; align-items: center; }
.cg-legend .cg-key { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; margin-right: 6px; }
.cg-legend .cg-key.ok { color: var(--good); background: var(--good-tint); }
.cg-legend .cg-key.adapt { color: #876a2b; background: #f6efe1; }
.cg-legend .cg-key.unsafe { color: var(--danger); background: var(--danger-tint); }
.cg-legend .cg-legend-note { color: var(--muted); display: inline; }

/* 5 · Requirement counts strip */
.count-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.count-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.count-chip .cc-label { font-weight: 700; color: var(--ink); font-size: .9rem; }
.count-chip .cc-num { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--accent-deep); }
.count-chip .cc-dot { width: 9px; height: 9px; border-radius: 999px; flex: none; display: inline-block; }
.count-chip .cc-dot.allergy, .cov-label .cc-dot.allergy { background: var(--danger); }
.count-chip .cc-dot.diet, .cov-label .cc-dot.diet { background: var(--good); }
.count-chip .cc-dot.religious, .cov-label .cc-dot.religious { background: var(--accent); }

/* 6 · Guest list + drill-down */
.guest-group { margin-top: 4px; }
.guest-group-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; }
.guest-group-head .gg-name { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink); }
.guest-group-head .gg-n { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.guest-group-head .gg-line { flex: 1; height: 1px; background: var(--line); }

.guest-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--card); cursor: pointer; transition: border-color .12s, box-shadow .12s; margin-bottom: 7px; flex-wrap: wrap; }
.guest-row:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.guest-row.open { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.guest-row .gr-name { font-weight: 800; color: var(--ink); flex: 0 0 auto; min-width: 150px; }
.guest-row .gr-reqs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.guest-row .gr-none { color: var(--muted); font-size: .86rem; font-style: italic; }
.guest-row .gr-status { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.guest-row .gr-chev { color: var(--muted); flex: none; transition: transform .15s; }
.guest-row.open .gr-chev { transform: rotate(90deg); }

.gr-flag { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.gr-flag.ok { background: var(--good-tint); color: var(--good); }
.gr-flag.warn { background: #f6efe1; color: #876a2b; }
.gr-flag.bad { background: var(--danger-tint); color: var(--danger); }

.drill { margin: -2px 0 12px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line-soft);
  border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.drill-course { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.drill-course:first-child { margin-top: 0; }
.vd-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.vd-row:first-of-type { border-top: none; }
.vd-row .vd-dish { font-weight: 700; color: var(--ink); flex: 0 0 200px; }
.vd-row .vd-reason { font-size: .84rem; color: var(--ink-soft); flex: 1; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; flex: none; }
.verdict svg { width: 13px; height: 13px; }
.verdict.ok        { background: var(--good-tint); color: var(--good); }
.verdict.adaptable  { background: #f6efe1; color: #876a2b; }
.verdict.caution   { background: #f7e6d2; color: #9a5a1e; }
.verdict.unsafe    { background: var(--danger-tint); color: var(--danger); }
.verdict.check     { background: #eef0f7; color: #4a5891; }

/* 7 · Import / paste → review */
.imp-tabs { display: inline-flex; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; margin-bottom: 14px; }
.imp-tabs button { border: none; background: none; cursor: pointer; font-family: var(--sans); font-weight: 700;
  font-size: .88rem; color: var(--muted); padding: 8px 16px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; }
.imp-tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.paste-area { width: 100%; min-height: 150px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.6; }
.imp-hint { font-size: .84rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.imp-hint code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: .82rem; color: #6f5723; }

.review-table { width: 100%; }
.review-table th { text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.review-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.unmatched { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: #f6efe1; color: #876a2b; border: 1px dashed #d9c79b; }
.review-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.review-foot .rf-count { font-size: .88rem; color: var(--ink-soft); }
.review-foot .rf-count b { color: var(--ink); }

/* 8 · Standing caveat + auto dietary note */
.diet-caveat { display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius-sm);
  background: #f6efe1; border: 1px solid #e6dcc4; color: #6f5723; font-size: .85rem; line-height: 1.55; }
.diet-caveat svg { flex: none; margin-top: 1px; color: #876a2b; }
.diet-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--accent-tint); border: 1px solid var(--accent-line); }
.diet-note .dn-ico { color: var(--accent); flex: none; margin-top: 1px; }
.diet-note .dn-body { flex: 1; }
.diet-note .dn-title { font-weight: 800; color: var(--accent-deep); margin-bottom: 4px; }
.diet-note textarea { background: var(--card); min-height: 44px; font-size: .88rem; width: 100%; }
.dn-save-flag { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; color: var(--muted); margin-top: 6px; }
.dn-save-flag .sdot { width: 7px; height: 7px; border-radius: 999px; background: #2e9c6e; }
.dn-save-flag.saving .sdot { background: var(--accent); }
.dn-save-flag.error { color: var(--danger, #c0392b); }
.dn-save-flag.error .sdot { background: var(--danger, #c0392b); }

/* 9 · Client-portal Guests & dietary tab */
.client-banner { display: flex; align-items: flex-start; gap: 13px; padding: 15px 18px; border-radius: var(--radius);
  margin-bottom: 18px; font-size: .96rem; line-height: 1.5; border: 1px solid; }
.client-banner svg { flex: none; margin-top: 1px; }
.client-banner .cb-title { font-weight: 800; }
.client-banner .cb-sub { display: block; margin-top: 3px; font-size: .92rem; opacity: .92; }
.client-banner.ok { background: var(--good-tint); border-color: #cdddc7; color: #3c5238; }
.client-banner.ok svg { color: var(--good); }
.client-banner.warn { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; }
.client-banner.warn svg { color: var(--gold); }

.gp-intro { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin: 0 0 18px; max-width: 60ch; }

.gp-group { margin-bottom: 8px; }
.gp-group-head { display: flex; align-items: center; gap: 11px; margin: 20px 0 9px; }
.gp-group-head .gh-name { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; color: var(--ink); }
.gp-group-head .gh-n { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gp-group-head .gh-line { flex: 1; height: 1px; background: var(--line); }

.gp-guest { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 14px 16px; margin-bottom: 9px; transition: border-color .13s, box-shadow .13s; }
.gp-guest:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.gp-guest .gpg-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gp-guest .gpg-name { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.gp-guest .gpg-reqs { display: flex; gap: 6px; flex-wrap: wrap; }
.gp-guest .gpg-none { color: var(--muted); font-style: italic; font-size: .9rem; }
.gp-guest .gpg-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent);
  font-weight: 700; font-size: .86rem; flex: none; background: none; border: none; cursor: pointer; font-family: var(--sans); }
.gp-guest .gpg-edit svg { flex: none; }
.gp-guest .gpg-eat { margin-top: 8px; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.gp-guest .gpg-eat .ea-lbl { font-weight: 700; color: var(--ink); }
.gp-guest .gpg-eat b { color: var(--accent-deep); font-weight: 700; }
.gp-guest .gpg-eat .ea-pending { color: var(--gold); font-weight: 700; }

.tag-you { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep);
  border: 1px solid var(--accent-line); }

.gp-morebtn { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer;
  color: var(--accent); font-family: var(--sans); font-weight: 700; font-size: .92rem; padding: 8px 2px; margin-top: 4px; }
.gp-morebtn svg { transition: transform .15s; }
.gp-morebtn.open svg { transform: rotate(90deg); }
.gp-add { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px;
  padding: 15px; border-radius: var(--radius); border: 1.5px dashed var(--accent-line); background: var(--accent-tint);
  color: var(--accent-deep); font-family: var(--sans); font-weight: 800; font-size: .98rem; cursor: pointer; transition: background .13s, border-color .13s; }
.gp-add:hover { background: #e4e6f3; border-color: var(--accent); }

.gp-privacy { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line-soft); color: var(--muted); font-size: .85rem; line-height: 1.55; }
.gp-privacy svg { flex: none; margin-top: 1px; color: var(--accent); }
.gp-privacy b { color: var(--ink-soft); font-weight: 700; }

/* guest editor modal (add / correct) — structured pickers, matches the design's
   cp-diet-tab GuestEditor. Reuses the shared .modal-* shell. */
.ge-field { margin-bottom: 18px; }
.ge-field > label { display: block; font-weight: 800; color: var(--ink); font-size: .92rem; margin-bottom: 8px; }
.ge-field .ge-help { font-weight: 500; color: var(--muted); font-size: .84rem; margin: -4px 0 9px; line-height: 1.5; }
.ge-field input, .ge-field textarea { width: 100%; }
.ge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ge-row > .ge-field { flex: 1; min-width: 0; margin-bottom: 0; }

.diet-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.diet-seg button { flex: 1; min-width: 88px; min-height: 46px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--card); font-family: var(--sans); font-weight: 700; font-size: .92rem;
  color: var(--ink-soft); cursor: pointer; transition: all .12s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.diet-seg button svg { display: none; }
.diet-seg button:hover { border-color: var(--good); color: var(--good); }
.diet-seg button.on { background: var(--good); border-color: var(--good); color: #fff; }
.diet-seg button.on svg { display: inline-block; }
.diet-seg button.on.none { background: var(--ink-soft); border-color: var(--ink-soft); }

.pick-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-chip { min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  font-family: var(--sans); font-weight: 700; font-size: .9rem; color: var(--ink-soft); cursor: pointer; transition: all .12s;
  display: inline-flex; align-items: center; gap: 7px; }
.pick-chip .pc-tick { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; }
.pick-chip.on .pc-tick { color: #fff; border-color: currentColor; }
.pick-chip.allergy:hover { border-color: var(--danger); color: var(--danger); }
.pick-chip.allergy.on { background: var(--danger-tint); border-color: #e2cfcc; color: var(--danger); }
.pick-chip.allergy.on .pc-tick { background: var(--danger); }
.pick-chip.religious:hover { border-color: var(--accent); color: var(--accent-deep); }
.pick-chip.religious.on { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-deep); }
.pick-chip.religious.on .pc-tick { background: var(--accent); }

/* misc — kitchen export rows, section reuse */
.export-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted-help { font-size: .85rem; color: var(--muted); line-height: 1.55; }
.evnotes-ta.is-expanded { overflow-y: hidden; }

/* Read-only "locked" form field — e.g. the message box when WhatsApp forces an
   approved template on the staff compose / broadcast screens. */
.locked-field {
  background: var(--line-soft);
  color: var(--muted);
  cursor: not-allowed;
}

/* ==========================================================================
   Staff hub — .sh-* (Staff Hub & Navigation spec §11; lifted from staff-hub.css).
   Layers on the tokens/components above. The Staff nav dot reuses .nav-dot;
   the Payroll tab count pill uses --alert to match.
   ========================================================================== */

/* ---- nav dot: gold "staff/pay" variant, distinct from the red client dot ---- */
.nav-dot.gold {
  background: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 24%, transparent);
}

/* ---- hub tab bar (a variant of .event-tabs) -------------------------------- */
.sh-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px; margin: 0 0 20px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.sh-tab {
  flex: 1; min-width: 134px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--ink-soft);
  transition: background .15s, color .15s, box-shadow .15s;
}
.sh-tab svg { opacity: .6; }
.sh-tab:hover { background: var(--card); color: var(--accent-deep); }
.sh-tab.active { background: var(--card); color: var(--accent-deep); border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.sh-tab.active svg { opacity: 1; color: var(--accent); }
.sh-tab-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--alert); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1;
}

/* ---- the "To pay" strip ---------------------------------------------------- */
.sh-topay {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.sh-topay-clear { grid-template-columns: 1fr; }

.sh-qcard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px 20px; box-shadow: var(--shadow-sm);
}
.sh-qcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted); }
.sh-q-corr::before { background: #b98f43; }
.sh-q-confirm::before { background: var(--accent); }
.sh-q-pay::before { background: var(--gold); }
.sh-q-clear::before { background: var(--good); }

.sh-qcard-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.sh-qcard-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.sh-q-corr .sh-qcard-ico { background: #f6efe1; color: #876a2b; }
.sh-q-confirm .sh-qcard-ico { background: var(--accent-tint); color: var(--accent); }
.sh-q-pay .sh-qcard-ico { background: #f5efe2; color: var(--gold); }
.sh-qcard-hero { font-family: var(--sans); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.7rem; line-height: 1; letter-spacing: -.01em; color: var(--ink); display: flex; align-items: baseline; gap: 7px; }
.sh-qcard-herosub { font-family: var(--sans); font-size: .78rem; font-weight: 700; color: var(--muted); }
.sh-qcard-title { font-family: var(--sans); font-size: .95rem; font-weight: 800; margin: 0 0 3px; color: var(--ink); }
.sh-qcard-blurb { font-size: .85rem; color: var(--muted); margin: 0 0 12px; line-height: 1.42; }
.sh-qcard-body { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }

.sh-qrow {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer; font-family: var(--sans);
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.sh-qrow:hover { background: var(--bg); border-color: var(--accent-line); }
.sh-qrow-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sh-qrow-label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.sh-qrow-meta { font-size: .78rem; color: var(--muted); }
.sh-qrow svg { color: var(--muted); flex: none; }
.sh-qrow:hover svg { color: var(--accent); }
.sh-qmore {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  margin-top: 2px; padding: 4px 2px; border: none; background: none; cursor: pointer;
  font-family: var(--sans); font-size: .82rem; font-weight: 800; color: var(--accent);
}
.sh-qmore:hover { color: var(--accent-deep); }
/* <details>-based "+N more": hide the extra rows until open, swap the label. */
.sh-qexpand > summary { list-style: none; }
.sh-qexpand > summary::-webkit-details-marker { display: none; }
.sh-qexpand[open] > summary .sh-qmore-more { display: none; }
.sh-qexpand:not([open]) > summary .sh-qmore-less { display: none; }

/* all-clear / nothing-yet card */
.sh-q-clear { flex-direction: row; align-items: center; gap: 16px; background: var(--good-tint); border-color: #cdddc7; padding: 18px 20px; }
.sh-q-clear .sh-clear-check { width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--good); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
.sh-q-clear .sh-qcard-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.sh-q-clear .sh-qcard-blurb { margin: 0; }

/* ---- payroll: encryption-key-missing note ---------------------------------- */
.sh-keymiss {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; margin-bottom: 18px; border-radius: var(--radius-sm);
  background: var(--danger-tint); border: 1px solid #ead4d0;
}
.sh-keymiss > svg { flex: none; margin-top: 1px; color: var(--danger); }
.sh-keymiss strong { color: var(--danger); }
.sh-keymiss div { color: #7a3128; font-size: .9rem; line-height: 1.45; }

/* ---- muted info note (WhatsApp not configured, etc.) ------------------------ */
.sh-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; margin-bottom: 18px; border-radius: var(--radius-sm);
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  color: var(--accent-deep); font-size: .9rem; line-height: 1.45;
}
.sh-note svg { flex: none; margin-top: 1px; color: var(--accent); }
.sh-note a { font-weight: 700; }


/* ---- Messages: compose ----------------------------------------------------- */
.sh-compose { display: flex; flex-direction: column; gap: 16px; }
.sh-field { display: flex; flex-direction: column; gap: 7px; }
.sh-field-lbl { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sh-textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--sans); font-size: .95rem; line-height: 1.5; resize: vertical; background: #fff;
}
.sh-textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sh-select {
  width: 100%; max-width: 340px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--sans); font-size: .95rem; font-weight: 600; background: #fff; color: var(--ink);
}
.sh-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sh-tpl-warn {
  display: flex; align-items: flex-start; gap: 8px; margin: 0;
  font-size: .84rem; font-weight: 600; line-height: 1.4; color: #6f5723;
}
.sh-tpl-warn[hidden] { display: none; }
.sh-tpl-warn svg { flex: none; margin-top: 1px; color: #876a2b; }
.sh-chan-fixed { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.sh-chan-fixed svg { color: var(--muted); }
/* Send-by segmented control (WhatsApp / Email / Both) */
.sh-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); flex-wrap: wrap; }
.sh-seg label { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.sh-seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.sh-seg label:hover { color: var(--accent-deep); }
.sh-seg input:checked + span { }
.sh-seg label:has(input:checked) { background: var(--card); color: var(--accent-deep); box-shadow: var(--shadow-sm); }

/* replies inbox — inbound WhatsApp replies to a broadcast */
.sh-inbox { display: flex; flex-direction: column; }
.sh-reply { display: flex; align-items: flex-start; gap: 13px; padding: 14px 22px; border-top: 1px solid var(--line-soft); transition: background .12s; }
.sh-reply:first-child { border-top: none; }
.sh-reply:hover { background: var(--line-soft); }
.sh-reply.unread { background: color-mix(in srgb, var(--accent-tint) 45%, transparent); }
.sh-reply.unread:hover { background: var(--accent-tint); }
.sh-reply-av { flex: none; width: 36px; height: 36px; font-size: .82rem; }
.sh-reply-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-reply-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sh-reply-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--gold); flex: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 22%, transparent); }
.sh-reply-name { font-weight: 800; color: var(--ink); }
.sh-reply-when { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); margin-left: auto; white-space: nowrap; }
.sh-reply-when svg { color: var(--muted); }
.sh-reply-re { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sh-reply-body { font-size: .92rem; color: var(--ink-soft); line-height: 1.45; }
.sh-reply-muted { color: var(--muted); font-style: italic; }
.sh-reply-btn { flex: none; align-self: center; }
.sh-ans { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; border: 1px solid; }
.sh-ans.yes { color: var(--good); background: var(--good-tint); border-color: #cdddc7; }
.sh-ans.no { color: var(--danger); background: var(--danger-tint); border-color: #e2cfcc; }
.sh-inbox-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--gold); color: #fff; font-size: .7rem; font-weight: 800; vertical-align: middle; margin-left: 8px; }

/* ---- Settings tab: WhatsApp card ------------------------------------------- */
.sh-wa { display: flex; flex-direction: column; gap: 8px; }
.sh-wa-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.sh-wa-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--good-tint); color: var(--good); display: grid; place-items: center; flex: none; }
.sh-wa-ico.off { background: var(--bg); color: var(--muted); }
.sh-wa-empty { display: flex; gap: 16px; align-items: flex-start; }

@media (max-width: 560px) {
  .sh-wa-empty { flex-direction: column; gap: 12px; }
}


/* ============================================================================
   Fixed-Price Menus & Portal Pricing (lifted from design_handoff_quote_extras/
   quote-extras.css §6-8 — the Part 4 portal work, unblocked — and from
   design_handoff_fixed_price_menus/fixed-price-menus.css in full). Every rule
   additive: a per-item menu, its portal and its quote are unchanged.
   ========================================================================== */
/* ============================================================ §6  WHAT THE CLIENT SEES
   Reports both independent switches AND sets them, using the same `.dpswitch`
   control as the quote page's publish row. One place to look, one place to
   change — the two switches still live apart in the model. */
.q-clientsees {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 11px 18px;
  border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--card);
}
.q-clientsees > svg { flex: none; color: var(--accent); }
.q-clientsees .qcs-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.q-clientsees .qcs-list { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; flex: 1; }
.q-clientsees .qcs-item { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-soft); }
.q-clientsees .qcs-item .qcs-txt { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.q-clientsees .qcs-state { font-weight: 800; }
.q-clientsees .qcs-state.on { color: var(--good); }
.q-clientsees .qcs-state.off { color: var(--muted); }
.q-clientsees .dpswitch { margin-top: 0; }

/* ============================================================ §7  PORTAL — prices on the menu
   Client-facing. Quiet metadata, never a price tag: no basket, no strike-
   through, no "from", no urgency. Uniform sections carry ONE price on the
   head; only a section whose options differ prints a price per option. */
.sec-head .sh-name { min-width: 0; }
.sec-head .sh-price {
  flex: none; font-family: var(--sans); font-size: .88rem; font-weight: 700;
  color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sec-head .sh-price .shp-unit { font-weight: 600; color: var(--muted); }
/* stack the price under a "Choose 4"-style note rather than fight it for room */
.sec-head.has-price { flex-wrap: wrap; }
.sec-head.has-price .sh-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }

.opt-pick .opt-price {
  display: block; margin-top: 6px;
  font-size: .9rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.opt-pick .opt-price .opp-unit { font-weight: 600; color: var(--muted); }
.opt-pick .opt-price.por { font-weight: 600; color: var(--muted); font-style: italic; }

/* ============================================================ §8  PORTAL — the running total
   It does NOT get its own sticky bar. The save bar already owns the bottom of
   the screen and already owns the Submit action, so the total moves INTO it —
   one bar, one action, no competition. `aria-live="polite"` on .sb-figure. */
.save-bar.has-total .save-inner { align-items: center; gap: 12px; }
.save-bar.has-total .btn { min-height: 48px; padding: 0 20px; font-size: .95rem; }
.sb-total { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sb-total .sb-figure { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; line-height: 1; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.sb-total .sb-basis { font-size: .82rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.35; }
.sb-total .sb-figure .sbf-unit { font-family: var(--sans); font-size: .82rem; font-weight: 800; color: var(--muted); margin-left: 7px; }
.sb-total .sb-basis b { color: var(--ink-soft); font-weight: 800; }
.sb-total .sb-basis .sdot { flex: none; }

/* the same figure, in flow, at the foot of the sections — so the total is also
   reachable without the bar (and survives print / screenshot). */
.cp-choices { border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); padding: 20px 22px; margin-top: 8px; }
.cp-choices h3 { margin: 0 0 3px; font-size: 1.3rem; }
.cp-choices .cpc-sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.cp-choices .cpc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
.cp-choices .cpc-row:last-of-type { border-bottom: none; }
.cp-choices .cpc-row .cpc-n { color: var(--ink-soft); min-width: 0; }
.cp-choices .cpc-row .cpc-n small { color: var(--muted); font-size: .84rem; margin-left: 9px; }
.cp-choices .cpc-row .cpc-v { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.cp-choices .cpc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--ink); }
.cp-choices .cpc-total .cpc-tl { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.cp-choices .cpc-total .cpc-tv { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
/* the food-only caveat. Present whenever the quote itself is not on the portal. */
.cp-choices .cpc-scope { margin-top: 12px; display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.cp-choices .cpc-scope svg { flex: none; margin-top: 2px; color: var(--accent); opacity: .8; }

/* the locked/fixed menu keeps the figure, as a record rather than a total */
.cp-foodline { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.cp-foodline .cpf-l { color: var(--ink-soft); font-weight: 700; }
.cp-foodline .cpf-l small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.cp-foodline .cpf-v { flex: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
/* per-dish price on the locked menu card (mixed-price sections only) */
.menu-card .mc-dish .mc-price { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; }

@media (max-width: 560px) {
  .save-bar.has-total .save-inner { flex-wrap: wrap; }
  .save-bar.has-total .btn { width: 100%; }
  .sec-head.has-price .sh-meta { align-items: flex-start; }
}

/* ============================================================ §A1  MENU PRICE BAR
   Proposal editor. Owns the pricing basis and the computed headline, directly
   under .page-head and above the first section. One slot, so "what basis is
   this menu on" and "what does that come to" are never in two places. */
.menu-price {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 15px 18px; margin-bottom: 16px;
  border: 1px solid var(--accent-line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--accent-tint));
}
.menu-price .mp-basis { display: flex; flex-direction: column; gap: 8px; flex: none; }
.menu-price .mp-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.menu-price .mp-spacer { flex: 1; min-width: 40px; }
.menu-price .mp-fig { text-align: right; min-width: 0; }
.menu-price .mp-head {
  font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1;
  color: var(--accent-deep); font-variant-numeric: tabular-nums;
}
.menu-price .mp-head .mph-unit { font-family: var(--sans); font-size: .82rem; font-weight: 800; color: var(--muted); margin-left: 8px; }
/* the course breakdown — CATERER-SIDE ONLY (D13). Never rendered on the
   portal, the quote, the invoice or any export. */
.menu-price .mp-courses { color: var(--muted); font-size: .85rem; margin-top: 5px; font-variant-numeric: tabular-nums; }
.menu-price .mp-note { color: var(--ink-soft); font-size: .85rem; margin-top: 3px; }
.menu-price .mp-note b { color: var(--ink); }
.menu-price .mp-byitem { font-size: .95rem; font-weight: 700; color: var(--ink-soft); }

/* §A2 — the switching moment. Shown when a basis holds figures it isn't using;
   names the parked figure and disappears on switching back. No dialog: the
   switch is non-destructive in both directions, so there is nothing to
   confirm. */
.menu-price .mp-dormant {
  display: inline-flex; align-items: flex-start; gap: 8px; text-align: left; max-width: 46ch;
  margin-top: 7px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: #f6efe1; border: 1px dashed #e6dcc4; color: #6f5a23; font-size: .84rem;
}
.menu-price .mp-dormant svg { flex: none; margin-top: 2px; color: var(--gold); }
.menu-price .mp-dormant b { color: #6f5a23; }

/* ============================================================ §A3  THE INTERNAL BAND
   Sits BETWEEN .ps-head and the first .opt-row, on the linen ground the
   .opt-add row already uses — so the section card reads as two layers: the
   menu the client sees (white) and Alexander's working (linen). The header row
   is untouched; heading, note, Save and the section menu keep their geometry. */
.ps-money {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--bg);
  border-top: 1px dashed var(--line); border-bottom: 1px solid var(--line-soft);
}
.ps-money .pm-hint { color: var(--muted); font-size: .84rem; }
/* £/head reuses .std-field verbatim (Food Settings). Focus ring included. */
.ps-money .std-field input { width: 62px; }

/* "Clients choose [5] dishes" — a sentence, not a bare number. D14: the
   allowance is NOT the service quantity, and "5" beside "£26.00" invites
   reading it as five per person. */
.choose-field {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 0 11px; min-height: 44px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
.choose-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.choose-field .cf-lbl { font-size: .8rem; color: var(--muted); font-weight: 700; }
.choose-field input {
  width: 34px; min-height: 0; border: none; padding: 0; text-align: center;
  font-weight: 800; font-variant-numeric: tabular-nums; background: none;
}
.choose-field input:focus { box-shadow: none; outline: none; }

/* the brass "internal" / "defaults for new menus" tag */
.pm-tag {
  flex: none; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); background: #f5efe2; border: 1px solid #e6dcc4;
  border-radius: 999px; padding: 4px 10px;
}

/* §A3b — WHAT THE ALLOWANCE MAY BE. NEW BEHAVIOUR, not in the build spec.
   choose_count ≤ options − 1 wherever options ≥ 2: an allowance that takes the
   whole section is a set menu with extra steps. The cap is stated at rest
   inside the field ("of 6 · max 5"), never enforced silently on blur — a field
   that rewrites what you typed is worse than one that never let you type it.
   At exactly one dish there is nothing to cap, so the field goes DORMANT
   (muted, empty, holding its place) and the band asks the question instead. */
.choose-field .cf-cap {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  padding-left: 3px; margin-left: 3px; border-left: 1px solid var(--line);
}
.choose-field.is-dormant { background: var(--bg); opacity: .6; }
.choose-field.is-over { border-color: #e6dcc4; background: #f6efe1; }
.choose-field.is-over .cf-lbl,
.choose-field.is-over input,
.choose-field.is-over .cf-cap { color: #876a2b; }
.choose-field.is-over .cf-cap { border-left-color: #e6dcc4; font-weight: 700; }

/* the band's flag row. Full-width child of .ps-money, so it wraps to its own
   line and the control row above it never moves.
   BRASS = a mistake in a menu about to go out (over the cap).
   INDIGO = a question, very often answered "yes, it's a set course" (one dish);
   stands down entirely when that dish carries a supplement. */
.ps-money .pm-flag {
  flex: 0 0 100%; display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .86rem; line-height: 1.5;
}
.ps-money .pm-flag > svg { flex: none; margin-top: 2px; }
.ps-money .pm-flag.is-warn { background: #f6efe1; border: 1px solid #e6dcc4; color: #6f5a23; }
.ps-money .pm-flag.is-warn > svg { color: var(--gold); }
.ps-money .pm-flag.is-ask { background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent-deep); }
.ps-money .pm-flag.is-ask > svg { color: var(--accent); }

/* §A3c — A £0 COURSE. REVERSES THE SPEC (§1, §2, §3.3, §5.4) — see the README.
   A blank price_per_head now means £0.00, not "unpriced": the course is part
   of the menu, renders to the client like any other, and adds nothing to the
   headline. It is a lever — a course thrown in without reopening the quoted
   figure. There is therefore no unpriced state to warn about, flag on the
   quote, or hide from the client, and .ps-money.is-unset is NOT needed. */
.ps-money .pm-zero b { color: var(--ink-soft); }

/* an unpriced course, flagged where it is fixed rather than only on the quote */
.ps-money.is-unset .std-field { border-color: #e6dcc4; background: #f6efe1; }
.ps-money.is-unset .std-field .sf-pound,
.ps-money.is-unset .std-field input{ color: #876a2b; }
.ps-money .pm-unpriced { display: inline-flex; align-items: center; gap: 8px; color: #876a2b; font-size: .86rem; font-weight: 700; }
.ps-money .pm-unpriced svg { flex: none; color: var(--gold); }

/* ============================================================ §A4  SUPPLEMENT ON AN OPTION ROW
   Q3's answer: the row, in the action cluster it already has. A fourth button
   beside up / down / remove — the SAME `.btn.btn-ghost.btn-icon.btn-sm` those
   three use, so it is a genuine peer of the cluster and not a quieter guest.
   Visible at rest, never hover-gated (iPad). Tap opens a number field in
   place; once set the row carries the chip and the button takes the tint. */
.opt-row .supp-btn.is-set { background: var(--accent-tint); color: var(--accent-deep); }

.supp-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 34px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; white-space: nowrap;
}
.supp-chip .sc-unit { font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }

/* inline editor, same shape as .price-edit on the event menu */
.supp-edit { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.supp-edit .se-pound { font-weight: 800; color: var(--ink-soft); }
.supp-edit input { width: 76px; min-height: 34px; padding: 4px 8px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }

/* two bases. A cheese board scales with the party; a birthday cake does not.
   supplement_basis: per_head | flat. The chip is COLOURED by its basis, so a
   row's basis is readable without opening the editor — indigo is the per-head
   colour used throughout, brass marks the one figure that isn't per head. */
.supp-chip.is-flat { border-color: var(--gold); background: var(--gold); }
.supp-chip.is-flat .sc-unit { opacity: .78; }
.opt-row .supp-btn.is-set.is-flat { background: #f5efe2; color: var(--gold); }
.supp-edit .seg { flex: none; }
.supp-edit .seg button.on.is-flat { background: var(--gold); }
.supp-edit .se-help { flex: 1 1 100%; color: var(--muted); font-size: .84rem; }

/* ============================================================ §B1  PORTAL — THE MENU PRICE CARD
   Client-facing, phone-first. The one figure, stated ABOVE the first section:
   per item the total is a consequence of choosing and belongs at the foot;
   per head it is a precondition and belongs where it is read first. */
.cp-menuprice {
  border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-sm); padding: 20px 22px; margin-top: 14px;
}
.cp-menuprice .cpm-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cp-menuprice .cpm-fig {
  font-family: var(--serif); font-size: 2.4rem; font-weight: 600; line-height: 1;
  color: var(--accent-deep); font-variant-numeric: tabular-nums; margin-top: 8px;
}
.cp-menuprice .cpm-fig .cpmf-unit { font-family: var(--sans); font-size: .9rem; font-weight: 800; color: var(--muted); margin-left: 9px; }
.cp-menuprice .cpm-covers { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; margin-top: 8px; }
/* a supplement in effect: two rows, so the arithmetic survives a screenshot */
.cp-menuprice .cpm-supp {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: .92rem;
}
.cp-menuprice .cpm-supp b { flex: none; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-menuprice .cpm-with {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-top: 10px; padding-top: 12px; border-top: 2px solid var(--ink);
}
.cp-menuprice .cpm-with .cpmw-l { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.cp-menuprice .cpm-with .cpmw-v { flex: none; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
/* a FIXED CHARGE in effect. Never folded into the per-head figure — dividing a cake
   by a hundred guests is a number nobody asked for, and it would move every
   time the headcount did. Its own row, plus a muted aside under the total. */
.cp-menuprice .cpm-oneoff {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: .92rem;
}
.cp-menuprice .cpm-oneoff small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.cp-menuprice .cpm-oneoff b { flex: none; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-menuprice .cpm-aside { text-align: right; color: var(--muted); font-size: .86rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
/* the scope sentence — same slot and voice as .cpc-scope on the per-item card */
/* Per-head breakdown (item 7) — section lines + the rolled-up remainder, then
   the total they add up to. Always reconciles; see MenuProposal.price_breakdown. */
.cp-menuprice .cpm-breakdown { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cp-menuprice .cpmb-row { display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 5px 0; color: var(--ink-soft); font-size: .95rem; }
.cp-menuprice .cpmb-row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-menuprice .cpmb-total { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 9px;
  color: var(--ink); font-weight: 800; }
.cp-menuprice .cpm-scope { margin-top: 12px; display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.cp-menuprice .cpm-scope svg { flex: none; margin-top: 2px; color: var(--accent); opacity: .8; }
.cp-menuprice .cpm-scope b { color: var(--ink); }

/* ============================================================ §B2  ALLOWANCE + LIVE COUNT
   "Canapés · choose 5 · 3 chosen". The allowance keeps the existing .sh-note
   pill; the count is plain muted text, NOT a second pill — two pills read as
   two labels of equal weight and the allowance is the agreed one.
   No per-course price appears here under any state (D13). */
.sec-head .sh-meta { display: flex; align-items: center; gap: 9px; flex: none; }
.sec-head .sh-count {
  font-size: .84rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.sec-head .sh-count.is-over { font-weight: 800; color: #876a2b; }

/* supplement badge on the option. Brass, not indigo: indigo on this page means
   "chosen", and the badge must stay legible on an already-indigo card. Inside
   .opt-main so it travels with the dish and can never read as a section price. */
.opt-pick .opt-supp {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 9px;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: #f5efe2; color: var(--gold); border: 1px solid #e6dcc4;
}
/* per-head and fixed share the badge — the WORDS carry the difference
   ("+£6.00 per person" vs "+£120.00 fixed"), not a second colour. The
   client-side page has one accent for money and shouldn't gain another. */

/* ============================================================ §B3  THE SAVE BAR, PER HEAD
   Reuses .save-bar.has-total / .sb-total / .sb-figure / .sb-basis unchanged.
   Under per head the figure is the PER-PERSON number, not the multiplied
   total: the per-person figure is what was sold, and it is the only thing a
   supplement moves. aria-live="polite" stays on .sb-figure. */
.save-bar.has-total .sb-total .sb-figure .sbf-unit { /* inherited — listed for the reader */ }

/* ============================================================ §C  OVER-ALLOWANCE (D15)
   Never red, never disabling, never blocking Submit. Brass ground and the
   INFO circle (not the warning triangle) — this is a caterer's heads-up, not a
   validation error. Renders under the section head whose count changed, and
   again in the choices card immediately above Submit.
   Copy is Danvers'/Alexander's, verbatim. */
.cp-headsup {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 16px; border-radius: var(--radius);
  background: #f6efe1; border: 1px solid #e6dcc4; color: #6f5a23;
  font-size: .93rem; line-height: 1.5;
}
.cp-headsup > svg { flex: none; margin-top: 1px; color: var(--gold); }
.cp-headsup b { font-weight: 800; }
.sec .cp-headsup { margin-bottom: 14px; }
.cp-choices .cp-headsup { margin-top: 14px; }

/* ============================================================ §C2  INCOMPLETE ALLOWANCE — SUBMIT HELD
   NEW BEHAVIOUR, not in the build spec — see the README. Over and under are
   different problems: an exceeded allowance is a decision Alexander can price,
   so it warns and lets them through (D10). An UNMET allowance is an unfinished
   form, so Submit is held until every section with a choose_count has met it.
   Two rules keep the disabled state legible: the bar always states what is
   outstanding, and nothing turns brass — on open every course reads "0 of 5",
   which is the normal starting state, not an error. */
.save-bar .btn:disabled,
.save-bar .btn[aria-disabled="true"] {
  background: var(--bg); color: var(--muted); border-color: var(--line);
  box-shadow: none; cursor: not-allowed;
}
.save-bar .btn:disabled:hover { background: var(--bg); color: var(--muted); border-color: var(--line); }

/* The bar's basis line carries the reason. It NAMES one outstanding course
   ("Still to choose: 2 puddings") and COUNTS more than one ("Still to choose:
   4 courses") — naming them all is three wrapped lines at 390px and appears
   the instant the page opens. The per-course rows in .cp-choices are the list.
   The green .sdot stays: their ticks are saved, only submitting is held. */
.sb-total .sb-basis .sb-todo { color: var(--ink-soft); font-weight: 700; }

/* the outstanding-work note in the choices card. Indigo, NOT brass — brass is
   reserved for the over-allowance heads-up, and this is guidance, not caution. */
.cp-todo {
  display: flex; align-items: flex-start; gap: 11px;
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent-deep);
  font-size: .93rem; line-height: 1.5;
}
.cp-todo > svg { flex: none; margin-top: 1px; color: var(--accent); }

/* the choices card, per head: counts where the per-item card shows money */
.cp-choices .cpc-of { flex: none; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-choices .cpc-of.is-over { color: #876a2b; }

@media (max-width: 560px) {
  .ps-money { gap: 10px 12px; }
  .menu-price .mp-fig { text-align: left; }
  .cp-menuprice { padding: 18px 16px; }
  .cp-menuprice .cpm-fig { font-size: 2.1rem; }
}


/* ---- Additions beyond the handoffs -----------------------------------------
   .opt-row must be allowed to wrap while the in-place supplement editor is open
   (the row is a no-wrap flex line at rest, and the editor carries a help line).
   .cp-preview-bar is §10.2's caterer-styled banner: deliberately NOT client
   chrome, so a screenshot of the preview can't be mistaken for the real page.
   -------------------------------------------------------------------------- */
.opt-row.supp-open { flex-wrap: wrap; }
.supp-edit { flex-wrap: wrap; }
/* [hidden] must beat the component's own display (the standing fix — an explicit
   display value overrides the UA's [hidden]{display:none}). Without this the
   in-place editor renders expanded on every row at rest. */
.supp-edit[hidden],
.cp-headsup[hidden],
.cp-todo[hidden],
.cp-choices .cpc-scope[hidden] { display: none; }
.cp-dl-btn.is-inert { opacity: .5; pointer-events: none; }

.cp-preview-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; margin-bottom: 14px;
  background: var(--ink); color: #fff; border-radius: var(--radius);
}
.cp-preview-bar .cpb-ico { flex: none; display: inline-flex; opacity: .8; }
.cp-preview-bar .cpb-main { flex: 1; min-width: 0; }
.cp-preview-bar .cpb-title { font-weight: 800; font-size: .95rem; }
.cp-preview-bar .cpb-state { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: .84rem; opacity: .85; margin-top: 2px; }
.cp-preview-bar .cpb-state b.on { color: #9fd39a; }
.cp-preview-bar .cpb-state b.off { color: #d8d2c6; }
.cp-preview-bar .cpb-nolink { font-style: italic; }
.cp-preview-bar .btn { flex: none; }

/* =========================================================================
   EVENT MENU EDITING — lifted wholesale from
   design_handoff_event_menu_editing/event-menu-editing.css. Every rule
   additive: the context strip (.mctx), the header rename (.h1-form),
   the dormant agreed treatments (.is-locked / .pm-reopen / .is-inert)
   and the collapsed Menu details (.mdetails).
   ========================================================================= */
/* ============================================================================
   EVENT MENU EDITING (Backlog §9) — the block to lift into app/static/css/app.css
   Every rule additive; no existing rule changes. Paste at the end of app.css.
   Design handoff: design_handoff_event_menu_editing/
   ========================================================================== */

/* ============================================================ §1  THE CONTEXT STRIP
   ONE strip replaces, on an ATTACHED menu only: the "This is the menu for
   {event}" lock-banner, the Client portal card's status badge + alert-dot +
   "managed on Menu Development" note, and the lifecycle banner the build spec
   would otherwise have added. Sits directly under .page-head, above .menu-price.

   Three rules keep it one strip at 1024 and 768:
     · identity + lifecycle share line one (name + badge, never two rows)
     · the message is ONE sentence on line two
     · AT MOST ONE action — Reopen while agreed, nothing in the other states
   The strip carries no navigation: a Menu Development link here read as a gate before editing,
   and both routes into the portal and the lifecycle already exist on the event page. */
.mctx {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.mctx-ico {
  flex: none; width: 38px; height: 38px; border-radius: 9px;
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  display: grid; place-items: center; color: var(--accent);
}
.mctx-ico svg { flex: none; }
.mctx-main { flex: 1 1 380px; min-width: 0; }
.mctx-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3px; }
.mctx-line strong { font-size: 1rem; color: var(--ink); }
.mctx-msg { font-size: .92rem; line-height: 1.5; }
/* the action group wraps as a WHOLE — used only by the agreed state's Reopen */
.mctx-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-left: auto; }

/* §1.1 — the two toned states. No modifier = quiet (draft / sent / no response):
   white ground, indigo tile, nothing demanding attention. */

/* CHOICES SUBMITTED — brass, the app's colour for "look at this before you
   send it" (over-allowance, dormant figures). Info circle, NOT the warning
   triangle; never red, nothing disabled (D10/D15 — warn, never block). */
.mctx.is-heads { background: #f6efe1; border-color: #e6dcc4; color: #6f5a23; box-shadow: none; }
.mctx.is-heads .mctx-line strong { color: #6f5a23; }
.mctx.is-heads .mctx-msg { font-weight: 600; }
.mctx.is-heads .mctx-ico { background: var(--card); border-color: #e6dcc4; color: var(--gold); }
.mctx.is-heads .badge { background: var(--card); border-color: #e6dcc4; color: #876a2b; }
.mctx.is-heads .btn-secondary { border-color: #e6dcc4; color: #6f5a23; }

/* AGREED — indigo tint. This state must read as SETTLED, not broken. */
.mctx.is-agreed { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-deep); box-shadow: none; }
.mctx.is-agreed .mctx-line strong { color: var(--accent-deep); }
.mctx.is-agreed .mctx-msg { font-weight: 600; }
.mctx.is-agreed .mctx-ico { background: var(--card); border-color: var(--accent-line); color: var(--accent); }
.mctx.is-agreed .btn-secondary { border-color: var(--accent-line); color: var(--accent-deep); }
.mctx.is-agreed .btn-ghost { color: var(--accent-deep); }

/* §1.2 — the client's choices, folded in from the portal card. Closed by
   default: the list is reference, the message above it is what must be read
   first. Reuses .choices-sec / .choice-row / .cr-* VERBATIM on a white panel. */
.mctx-choices { margin-top: 10px; }
.mctx-choices > summary {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: .85rem; font-weight: 800; color: #876a2b; list-style: none;
}
.mctx-choices > summary::-webkit-details-marker { display: none; }
.mctx-choices > summary svg { transition: transform .15s ease; transform: rotate(-90deg); }
.mctx-choices[open] > summary svg { transform: none; }

/* ============================================================ §2  INLINE RENAME IN THE HEADER
   The title is what the client sees (portal card, PDF, the quote's menu line)
   and it arrives auto-suffixed " — {event}". Renaming is therefore a
   header-level act, not a field buried in the Details card behind a whole-form
   Save. Visible at rest (iPad — nothing hover-only), live in EVERY lifecycle
   state including agreed (§2.2's words-are-free rule).
   ⚠ Requires the partial-form guard on edit_proposal (build spec §3): this
   form posts `title` alone. */
.h1-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
/* the input inherits the h1's serif at 2rem, so the name doesn't jump size */
.h1-form input[type=text] {
  flex: 1 1 320px; min-width: 0;
  font-family: var(--serif); font-size: 2rem; font-weight: 600; padding: 6px 14px;
}

/* ============================================================ §3  CALM-DISABLED MONEY (AGREED)
   The server guard (_agreed_block) is the enforcement; this is the courtesy.
   Values render as SPANS on the linen ground — legible for a phone call, with
   nothing to focus and nothing to type into and lose. Following .mp-dormant:
   dormant, not error-styled. Never `opacity:.45`, never red, never hidden. */
.ps-money.is-locked .pm-tag { color: var(--muted); background: var(--line-soft); border-color: var(--line); }
.ps-money.is-locked .std-field,
.ps-money.is-locked .choose-field { background: var(--bg); color: var(--muted); }
.ps-money.is-locked .std-field .sf-pound,
.ps-money.is-locked .std-field .sf-head,
.ps-money.is-locked .choose-field .cf-lbl { color: var(--muted); }
.ps-money.is-locked .pm-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-money.is-locked .pm-val.is-price { width: 62px; text-align: right; display: inline-block; }
.ps-money.is-locked .pm-val.is-count { width: 34px; text-align: center; display: inline-block; }
/* the false checkbox, at rest */
.ps-money.is-locked .pm-sep-off {
  display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--muted);
}
.ps-money.is-locked .pm-sep-off i {
  width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--line-soft);
}

/* the one-line reopen prompt — a LINK, not a button, so it answers the question
   without competing with the strip's Reopen. Also used on the closed add-dish
   row, where it replaces the dish input. */
.pm-reopen {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
  font-size: .85rem; color: var(--ink-soft);
}
.pm-reopen svg { flex: none; color: var(--muted); }
.pm-reopen a { font-weight: 800; }
.opt-add.is-locked { color: var(--ink-soft); font-size: .86rem; }
.opt-add.is-locked svg { flex: none; color: var(--muted); }

/* the price bar while agreed — the basis seg becomes the static label the
   view-only branch already renders, and the headline goes muted. */
.menu-price.is-locked { background: var(--bg); border-color: var(--line); }
.menu-price.is-locked .mp-head { color: var(--muted); }
.menu-price.is-locked .mp-basis .mp-byitem { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; color: var(--muted); }

/* what stays live, said out loud: the heading/note row and reorder keep full
   contrast, and the section head carries one green pill so "locked" is never
   read as "the whole card is dead". */
.ps-head .ps-live {
  flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  color: var(--good); background: var(--good-tint); border: 1px solid #cdddc7;
}
/* remove, while agreed: present, inert, explained by its title */
.opt-row .btn-icon.is-inert { color: #c9c3b6; pointer-events: none; }

/* ============================================================ §4  OPTION ROW TOOL GROUP — OPTIONAL (Q5)
   VISUAL ONLY. Five equal ghost buttons read as five decisions; one hairline
   box around supplement / top / up / down makes them one control, and leaves
   Remove — the only one you can't undo — outside it. Same routes, same forms,
   same 38px targets. Ship it with this pass or don't; nothing depends on it. */
.opt-tools {
  display: inline-flex; align-items: center; gap: 2px; flex: none; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
.opt-tools .btn { border-radius: 0; border-color: transparent; box-shadow: none; }
.opt-tools .inline-form + .inline-form .btn { border-left: 1px solid var(--line-soft); }
.opt-tools .supp-btn { border-right: 1px solid var(--line-soft); }

/* ============================================================ §5  ATTACHED-STATE HOUSEKEEPING
   The Details card becomes a closed <details> under the sections — the pattern
   already used by "Proposal selection" (events/view.html) and "Attached to
   events" (proposals/list.html). Not deleted: intro and closing notes are real
   client-facing copy with no other home. */
.card.mdetails > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; }
.card.mdetails > summary::-webkit-details-marker { display: none; }
.card.mdetails > summary svg:first-child { transition: transform .15s ease; transform: rotate(-90deg); color: var(--accent); }
.card.mdetails[open] > summary svg:first-child { transform: none; }
.card.mdetails > summary .badge { margin-left: auto; }

/* Rename-in-place (Event Menu v2). The swap is class-driven: the `hidden`
   attribute is only display:none at user-agent weight, so any display rule
   reaching the h1 beat it and the title and its form rendered together. */
.menu-title-wrap .h1-form { display: none; }
.menu-title-wrap.is-renaming > h1 { display: none; }
.menu-title-wrap.is-renaming .h1-form { display: flex; }
/* Attached: the event name is the page h1, so the menu's own name is a
   sub-heading. Serif kept — it is still the client-facing name. */
.menu-title-wrap.is-sub .menu-title { font-size: 1.6rem; margin: 0; }


/* ============================================================================
   DRINKS (Backlog §4 → fifth quote stream) — the block to lift into app/static/css/app.css
   Every rule additive. Paste at the end of app.css. Design handoff: design_handoff_drinks/
   ========================================================================== */

/* ============================================================ §1  THE DRINKS TAB — SLOT GROUPS
   Reuses .group / .group-title / .g-name / .g-meta verbatim. A slot with no lines
   collapses to ONE dashed add-row (.dk-empty) so the four slots keep their order
   without a void. Throughout sits LAST (a dinner's exception; a cocktail party's only slot). */
.dk-group { margin-top: 22px; }
.dk-body { padding-top: 6px; }   /* B7 — the head already has its bottom border */
.dk-body .dk-group:first-child { margin-top: 0; }
/* ...and the rows' own side padding would stack on .card-pad (the "double up"
   the spec warned of), so inside the body they take the Dishes rows' 4px, and the
   edit band's field indent follows the name column (4 + tick box + drag + gap). */
.dk-body .dk-row { padding-left: 4px; padding-right: 4px; }
.dk-body .dk-x { padding-left: 66px; }
/* B4 — bulk edit. A tick box leads each row (a 40px target around a 20px box);
   Select all sits in the slot header; the bar sticks to the foot of the screen
   while anything is ticked. (The band only renders for editors, who always
   have the box, so its field indent above already allows for it.) */
.dk-pick { flex: none; display: grid; place-items: center; width: 30px; height: 40px; margin: -8px -6px -8px -2px; cursor: pointer; }
.dk-pick input, .dk-pick-all input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }
.dk-pick-all { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: .72rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); cursor: pointer; }
.dk-bulkbar { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 16px; padding: 10px 14px; background: var(--card); border: 1px solid var(--accent-line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.dk-bulkbar .dk-bulk-n { font-size: .9rem; color: var(--ink-soft); }
.dk-bulkbar .dk-bulk-n b { color: var(--accent-deep); }
.dk-bulkbar select { min-height: 40px; width: auto; }
.dk-bulkbar .js-dk-clear { margin-left: auto; }
.dk-bulkbar[hidden] { display: none; }
/* The tick box costs the name column ~40px; on an iPad in portrait that left
   the "Client supplies" chip wider than its column, running into the quantity.
   The chip may wrap inside its pill rather than overflow, and the row's gaps
   tighten below iPad-landscape width. */
.dk-name .dk-client { max-width: 100%; white-space: normal; }
@media (max-width: 900px) { .dk-body .dk-row { gap: 8px; } }
/* B3 — the Glassware strip at the top of the Drinks card body. */
.dk-glassware { margin: 4px 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: .9rem; }
.dk-glassware .dkg-head { display: flex; align-items: center; gap: 8px; }
.dk-glassware .dkg-head svg { color: var(--accent); }
.dk-glassware .dkg-head a { margin-left: auto; font-size: .82rem; font-weight: 700; }
.dk-glassware .dkg-lede { margin: 8px 0 0; font-weight: 700; color: var(--ink); }
.dk-glassware .dkg-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dk-glassware .dkg-n { display: inline-block; min-width: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dk-glassware .dkg-name { font-weight: 700; }
.dk-glassware .dkg-for { color: var(--muted); }
.dk-glassware .dkg-warn { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; padding: 8px 11px; border: 1px solid #e6dcc4; border-radius: var(--radius-sm, 8px); background: #f6efe1; color: #6f5a23; font-weight: 700; }
.dk-glassware .dkg-warn svg { flex: none; margin-top: 2px; }
.dk-group .group-title { margin-bottom: 0; }
.dk-group .g-meta .dk-slot-time { color: var(--ink-soft); font-weight: 700; letter-spacing: 0; text-transform: none; margin-left: 8px; }
/* B5.2 — the slot's run-sheet moment, pickable in place of the plain time. */
.dk-group .g-meta .dk-anchor select { min-height: 36px; width: auto; max-width: 230px; padding-top: 4px; padding-bottom: 4px; font-size: .8rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.dk-empty {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 8px;
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted);
  font-size: .9rem; font-weight: 700; background: transparent; width: 100%; text-align: left; cursor: pointer; font-family: var(--sans);
}
.dk-empty:hover { border-color: var(--accent-line); color: var(--accent-deep); background: var(--card); }
.dk-empty svg { color: var(--accent); flex: none; }

/* ============================================================ §2  THE DRINK LINE
   Same grammar as .opt-row (menu editor) — grip · name block · facts · tools.
   ROW (always visible, fits 1024): name + type chip [+ client chip] on line one,
   glass · note on line two; the serves→units sentence; the price cell; the
   offer/response cell; the pencil. EXPANDED (.dk-x, linen band): slot,
   supplied-by, serves/head, units override + reset, glass, price basis, note. */
.dk-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.dk-row:last-of-type { border-bottom: none; }
.dk-row .drag { color: var(--muted); cursor: grab; display: grid; place-items: center; flex: none; opacity: .6; }
.dk-main { flex: 1 1 220px; min-width: 0; }
.dk-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--ink); }
.dk-name .type-chip { font-size: .66rem; }
.dk-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dk-sub .dk-glass { display: inline-flex; align-items: center; gap: 4px; }
.dk-sub .dk-glass svg { opacity: .7; }
.dk-sub .dk-note { font-style: italic; }
/* off-list line — no library record. Name editable in place; chip says so. */
.dk-offlist { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 2px 8px; }

/* client-supplied — a CHIP, and the price cell goes to "—". The row itself is NOT
   muted: what it is and how many are exactly what Alexander needs to read. */
.dk-client { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap; }
.dk-client svg { color: var(--muted); }

/* serves → units — a sentence with the arithmetic visible; the units box is the
   only input on the row (override), reusing .std-field geometry. */
.dk-qty { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-soft); white-space: nowrap; }
.dk-qty .dk-per { font-weight: 700; }
.dk-qty .dk-arrow { color: var(--muted); }
.dk-qty .std-field { min-height: 40px; padding: 0 10px; gap: 6px; }
.dk-qty .std-field input { width: 44px; text-align: center; }
.dk-qty .std-field .sf-head { font-size: .78rem; }
.dk-qty .std-field.is-over { border-color: #e6dcc4; background: #f6efe1; }
.dk-qty .std-field.is-over input { color: #876a2b; }
.dk-qty .dk-fixed { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* the price cell: £/unit chip (reuses .price-chip), the brass "in package" tag
   (reuses .pm-tag), or a dash for client-supplied. Fixed width so the column lines up. */
.dk-price { flex: none; width: 118px; display: flex; justify-content: flex-end; }
.dk-price .price-chip .pc-head { font-size: .72rem; color: var(--muted); font-weight: 700; }
.dk-price .dk-none { color: var(--muted); font-weight: 700; font-size: .9rem; }

/* offer-to-client cell — a labelled minibox before the client answers; a badge
   (Chosen / Not chosen) after. Fixed width so the column lines up. */
.dk-offer { flex: none; width: 104px; display: flex; justify-content: flex-end; }
.dk-offer label { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; color: var(--ink-soft); cursor: pointer; }
.dk-offer .badge { white-space: nowrap; }
.dk-offer .dk-na { font-size: .74rem; color: var(--muted); font-weight: 700; }

/* the expanded band — linen, like .ps-money / .opt-add. One per row, toggled by the pencil. */
.dk-x { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; padding: 14px 18px 16px 48px; background: var(--bg); border-top: 1px dashed var(--line); border-bottom: 1px solid var(--line-soft); }
.dk-x .dk-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dk-x .dk-f label { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dk-x .dk-f input[type=text], .dk-x .dk-f select { min-height: 42px; }
.dk-x .dk-f.grow { flex: 1 1 220px; }
.dk-x .dk-reset { background: none; border: none; color: #876a2b; font-size: .72rem; font-weight: 800; cursor: pointer; padding: 0; text-align: left; }
.dk-x .dk-x-foot { flex: 0 0 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.dk-x .dk-x-foot .btn-danger { margin-left: auto; }
/* B2.3 — the client's answer, taken by phone (a select beside Offer to client) */
.dk-x .dk-answer { display: inline-flex; align-items: center; gap: 8px; }
.dk-x .dk-answer label { white-space: nowrap; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dk-x .dk-answer select { min-height: 40px; }

/* ============================================================ §3  THE PACKAGE BAR
   Sibling of .menu-price — same gradient, same geometry. DORMANT (no package) keeps
   the box and the label with a muted "No package — every line prices on its own". */
.dk-pkg { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 15px 18px; margin-bottom: 16px; border: 1px solid var(--accent-line); border-radius: var(--radius); background: linear-gradient(180deg, var(--card), var(--accent-tint)); }
.dk-pkg .mp-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dk-pkg .dk-pkg-name { display: flex; flex-direction: column; gap: 6px; flex: none; }
.dk-pkg .dk-pkg-name input { width: 200px; min-height: 42px; font-weight: 700; }
.dk-pkg .dk-pkg-in { flex: 1 1 260px; min-width: 0; font-size: .86rem; color: var(--ink-soft); }
.dk-pkg .dk-pkg-in b { color: var(--ink); }
.dk-pkg .dk-pkg-fig { text-align: right; flex: none; }
.dk-pkg .dk-pkg-fig .std-field { min-height: 46px; }
.dk-pkg .dk-pkg-fig .std-field input { width: 74px; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--accent-deep); }
.dk-pkg .dk-pkg-client { flex: 0 0 100%; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--accent-line); font-size: .85rem; color: var(--ink-soft); }
.dk-pkg .dk-pkg-client b { color: var(--ink); }
.dk-pkg .dk-pkg-client .pm-tag { margin-left: auto; }
.dk-pkg.is-dormant { background: var(--bg); border-color: var(--line); }
.dk-pkg.is-dormant .dk-pkg-in { color: var(--muted); }

/* ============================================================ §4  ADD-A-DRINK
   One control: the library typeahead (.dish-combo / .dish-suggest, verbatim) whose
   LAST suggestion is always "Add “{typed}” off-list". Type filter chips inside the
   dropdown head; slot is preset by the group the row sits in. */
.dk-add { display: flex; gap: 10px; padding: 12px 18px; align-items: center; background: var(--bg); border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.dk-add .dish-combo { flex: 1 1 260px; }
.dk-add .dk-slot-preset { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; color: var(--muted); }
.dk-add .dk-slot-preset b { color: var(--ink-soft); }
.ds-head { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 6px 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.ds-head button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 10px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; font-family: var(--sans); }
.ds-head button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ds-row .ds-glass { font-size: .78rem; color: var(--muted); }
.ds-row.ds-offlist { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; color: var(--accent-deep); font-weight: 800; }
.ds-row.ds-offlist svg { color: var(--accent); }

/* ============================================================ §5  THE DRINKS CONTEXT STRIP
   .mctx VERBATIM (event-menu-editing.css) with one extra: the agreed state gets the
   ONE action (Reopen drinks) and the submitted state gets Mark drinks agreed — the
   drinks lifecycle has no Menu Development page of its own, so the strip acts. */
.mctx.mctx-drinks .mctx-act .btn-sm { min-height: 40px; }

/* agreed — lines and money calm-disabled; slot / wording / note stay live */
.dk-row.is-locked .dk-qty .std-field, .dk-row.is-locked .dk-price .price-chip { background: var(--bg); color: var(--muted); border-color: var(--line); pointer-events: none; }
.dk-row.is-locked .dk-offer label { color: var(--muted); pointer-events: none; }
.dk-pkg.is-locked { background: var(--bg); border-color: var(--line); }
.dk-pkg.is-locked .std-field { background: var(--bg); pointer-events: none; }
.dk-pkg.is-locked .std-field input { color: var(--muted); }

/* ============================================================ §6  LIBRARY + EDITOR
   Library rows reuse .dish-row / .dish-thumb / .d-name / .d-stats verbatim; the type
   filter reuses .sup-pills / .sup-pill. New: the batch check panel on the cocktail editor. */
.dk-check { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding: 14px 18px; border: 1px dashed var(--accent-line); border-radius: var(--radius); background: var(--accent-tint); }
.dk-check .dc-col { min-width: 0; }
.dk-check .dc-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dk-check .dc-fig { font-family: var(--serif); font-size: 1.3rem; color: var(--accent-deep); line-height: 1.15; }
.dk-check .dc-arrow { color: var(--accent); }
.dk-check .dc-lines { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; font-variant-numeric: tabular-nums; }
.dk-quick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dk-quick input, .dk-quick select { min-height: 44px; }
.dk-quick .q-name { flex: 2 1 200px; }
.dk-quick .q-type, .dk-quick .q-glass, .dk-quick .q-sup { flex: 1 1 130px; }
.dk-quick .q-serves { flex: 0 0 110px; }
.dk-quick .q-price .std-field { min-height: 44px; }

/* ============================================================ §7  DOWNSTREAM DELTAS
   Shopping / packing / cook-in-advance rows reuse .tickrow verbatim. The only new
   marks: the "from drinks" source pill on the ledger and the client-supplied
   sub-group head on the packing list. */
.dk-src { display: inline-flex; align-items: center; gap: 4px; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); border: 1px solid var(--accent-line); margin-left: 6px; vertical-align: middle; }
.dk-subgroup { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dk-subgroup::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tickrow.is-client .tickbox { border-style: dashed; background: var(--bg); }
.tickrow.is-client .tick-name { color: var(--ink-soft); }
/* run-sheet derived detail — a DETAIL LINE under the entry, not a new entry kind */
.rs-drinks { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-tint); border: 1px solid var(--accent-line); font-size: .86rem; color: var(--accent-deep); }
.rs-drinks svg { flex: none; margin-top: 2px; }
.rs-drinks b { color: var(--accent-deep); }

/* The standing [hidden]-beats-display companion (house rule). Every one of
   these sets an explicit `display`, which outranks the user-agent
   `[hidden]{display:none}` — without this the expanded band renders open on
   every drink row, the strip's quote shows with nothing quoted, and the portal
   submit rows appear before there is anything to submit. */
.dk-x[hidden], .dk-empty[hidden], .dk-add[hidden], .dk-check[hidden],
.dk-quick[hidden], .dk-client[hidden], .dk-src[hidden], .dk-subgroup[hidden],
.rs-drinks[hidden], .dk-qty[hidden], .dk-price[hidden], .dk-offer[hidden],
.dk-pkg[hidden], .dk-group[hidden], .dk-name[hidden], .dk-sub[hidden] { display: none !important; }

/* The expanded band's numeric fields. drinks.css sizes the band but not these,
   and a browser-default input width makes "1.5" look like a paragraph. */
.dk-x .dk-f input[type=number] { width: 120px; }
.dk-x .dk-f.grow input[type=text] { width: 100%; }
/* A price box the basis has made irrelevant reads as disabled rather than
   inviting a figure that will be discarded on save. */
.dk-x .std-field.is-off { background: var(--bg); border-color: var(--line); }
.dk-x .std-field.is-off input { color: var(--muted); }

/* The drinks add-row's suggestions are real <button>s (so they are reachable
   from the keyboard, unlike the <li> rows the dish combobox uses), which means
   they arrive wearing the app's primary-button styling. Reset them back to a
   row; the hover/selected states then come from .ds-row itself. */
.dish-suggest button.ds-row {
  width: 100%; border: none; background: none; box-shadow: none;
  font-family: var(--sans); font-size: .92rem; font-weight: 400;
  color: var(--ink); text-align: left; min-height: 0;
}
.dish-suggest button.ds-row:hover { background: var(--accent-tint); }
.dish-suggest button.ds-row > span:first-child { font-weight: 700; }
.dish-suggest button.ds-row.ds-offlist { color: var(--accent-deep); font-weight: 800; }

/* ── Users page: a coordinator's area add-ons (Coordinator Area Permissions §7,
   28 Sep 2026). "Can also edit: [ ] Food [ ] Drinks" under the role select;
   each box auto-submits its own form. ── */
.user-areas { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 6px; }
.user-areas[hidden] { display: none; }
.user-areas .inline-form { margin: 0; }
.user-area { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px;
  margin: 0; font-size: .95rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.user-areas > .muted { white-space: nowrap; }
.user-area input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }

/* A5 (24 Oct 2026) — the "← current event" quick return beside Events. */
.nav-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 210px; align-self: center;
  padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--accent-tint);
  border: 1px solid var(--accent-line); color: var(--accent-deep); font-size: .8rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; }
.nav-chip span { overflow: hidden; text-overflow: ellipsis; }
.nav-chip svg { flex: none; }
.nav-chip:hover { background: var(--card); }
.m-link.m-chip { color: var(--accent-deep); font-weight: 700; }
/* §51 E — the chip becomes a split control: the label goes back, the ▾ opens the tabs. */
.nav-chip-split { position: relative; display: inline-flex; align-items: center; align-self: center; }
.nav-chip-split .nav-chip { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 8px; }
.nav-chip-more { display: inline-grid; place-items: center; min-height: 0; height: auto; align-self: stretch;
  padding: 0 8px; margin: 0; border-radius: 0 999px 999px 0; border: 1px solid var(--accent-line); border-left: 0;
  background: var(--accent-tint); color: var(--accent-deep); cursor: pointer; }
.nav-chip-more:hover, .nav-chip-more[aria-expanded="true"] { background: var(--card); }
.nav-chip-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-chip-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px;
  display: flex; flex-direction: column; padding: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-md); }
.nav-chip-menu[hidden] { display: none; }
.nav-chip-menu a { padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: .88rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; }
.nav-chip-menu a:hover, .nav-chip-menu a:focus { background: var(--accent-tint); color: var(--accent-deep); outline: none; }
.m-link.m-chip-sub { padding-left: 52px; font-size: .92rem; color: var(--ink-soft); }

/* ============================================================================
   MENU SUB-HEADINGS (24 Oct 2026) — lift verbatim into app/static/css/app.css
   (§1–§4) and the two portal rules in §5 to the end of client.css (or app.css —
   both load on the portal; keep them together with the other .opt-list rules).
   Additive. Tokens only from app.css :root; the one tinted pair (#f5efe2 /
   #e6dcc4) is the existing brass badge pair. Prefix `sub-` (editor heading
   row), `opt-sub` / `mc-sub` (portal), `cg-sub-` (coverage grid), `gd-`
   (the Group-by-diet sheet). Reused verbatim, no new rules: .ps-head, .ps-money,
   .pm-tag, .opt-row, .opt-add, .btn.btn-ghost.btn-icon.btn-sm, .menu-wrap /
   .menu / .menu-item / .menu-div, .seg, .badge, .diet-badge, .flash,
   .sec-head / .sh-note / .sh-count, .opt-pick, .mc-head / .mc-dish.
   A section with no sub-headings emits none of these classes.
   ========================================================================== */

/* §1  THE HEADING ROW — a tier between .ps-head (card head, 14px pad, serif
   h3) and .opt-row (12px pad, sans 700). Linen ground + a 3px indigo-line
   edge say "this groups what follows" without a card inside the card. The
   name is a REAL input that looks like text at rest (transparent border) and
   becomes a field on focus — tap to edit, nothing hover-only. Same row in the
   editor and the library. Lifecycle: identical when agreed (wording + order
   are free), so there is NO .is-locked variant of this row by design. */
.sub-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 18px 7px 14px;
  background: var(--bg);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 3px 0 0 var(--accent-line);
}
.opt-row + .sub-row { border-top-color: var(--line); }
.sub-row .sr-glyph { flex: none; display: inline-flex; color: var(--accent); opacity: .85; }
.sub-row .sr-form { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.sub-row .sr-name {
  flex: 0 1 300px; min-width: 140px; min-height: 36px; padding: 2px 9px;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600; letter-spacing: .005em; color: var(--ink);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
}
.sub-row .sr-name:hover { border-color: var(--line); background: var(--card); }
.sub-row .sr-name:focus { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 3px var(--accent-tint); outline: none; }
.sub-row .sr-count { flex: none; font-size: .76rem; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Save appears only once the name has changed (JS adds .is-dirty on input;
   Enter submits regardless). At rest the row has no button noise. */
.sub-row .sr-save { display: none; }
.sub-row.is-dirty .sr-save { display: inline-flex; }
/* the same four-icon cluster as the dish rows; top/up/down move the GROUP
   (heading + its dishes) past the neighbouring group; × removes the heading
   only — its dishes fall to the heading above, or to the unheaded block. */
.sub-row .sr-tools { display: flex; align-items: center; gap: 0; margin-left: auto; flex: none; }

/* the inert marker shown ONLY when a section mixes unheaded dishes with
   headed ones. Not a heading: nothing to type, nothing to move. Never emitted
   when the section has no headings (byte-for-byte guard) or when every dish
   is under one. */
.sub-row.is-none { box-shadow: inset 3px 0 0 var(--line); background: var(--card); border-top-style: dashed; }
.sub-row.is-none .sr-glyph { color: var(--muted); }
.sub-row.is-none .sr-static { font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--muted); padding: 0 9px; }

/* §2  PER-ROW "MOVE TO…" — the drag substitute. A fifth .btn.btn-ghost
   .btn-icon.btn-sm in the dish row's cluster, rendered ONLY when the section
   has at least one heading. Opens the house .menu with one .menu-item per
   heading (the dish goes to the END of that group) plus "Above the headings".
   The label row is new. */
.menu .menu-lbl { padding: 6px 12px 3px; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.menu .menu-item .mi-count { margin-left: auto; font-size: .74rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu .menu-item.is-here { color: var(--muted); cursor: default; }
.menu .menu-item.is-here svg { color: var(--good); }

/* §3  ADD A HEADING — opened from the section ⋯ menu; a linen band in the
   .ps-money position (below the money band when present, else under the
   head). Name + the dish it goes ABOVE: a heading is born with the dishes
   from that dish down to the next heading, so it is never empty and nothing
   new is stored. */
.sub-add {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--bg);
  border-top: 1px dashed var(--line); border-bottom: 1px solid var(--line-soft);
}
.sub-add .sa-lbl { font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); flex: none; }
.sub-add input[name="sub_heading"] { flex: 1 1 220px; min-width: 180px; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.sub-add .sa-above { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-soft); font-weight: 700; }
.sub-add .sa-above select { max-width: 280px; }
.sub-add .sa-help { flex: 1 1 100%; color: var(--muted); font-size: .84rem; }

/* §4  GROUP BY DIET — the one-press helper's confirm sheet, same band
   geometry. The plan is shown as it will be written (counts live from
   diet_suitability()); the naming seg and the two toggles re-plan in place.
   After it runs, the ordinary .flash-success carries an Undo link. */
.gd-sheet {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 18px 16px; background: var(--bg);
  border-top: 1px dashed var(--line); border-bottom: 1px solid var(--line-soft);
}
.gd-sheet .gd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-sheet .gd-head h4 { margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.gd-sheet .gd-head .gd-sub { color: var(--ink-soft); font-size: .88rem; }
.gd-plan { display: flex; flex-direction: column; gap: 6px; }
.gd-plan .gd-grp { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.gd-plan .gd-grp .gd-name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; flex: none; min-width: 130px; }
.gd-plan .gd-grp .gd-n { font-size: .76rem; font-weight: 800; color: var(--muted); flex: none; }
.gd-plan .gd-grp .gd-dishes { color: var(--ink-soft); font-size: .86rem; min-width: 0; }
.gd-opts { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.gd-opts .gd-tog { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.gd-opts .gd-tog input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.gd-opts .gd-tog.is-off { color: var(--muted); font-weight: 600; }
.gd-flag { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: #f6efe1; border: 1px solid #e6dcc4; color: #6f5a23; font-size: .86rem; line-height: 1.45; }
.gd-flag svg { flex: none; color: var(--gold); margin-top: 1px; }
.gd-flag b { font-weight: 800; }
.gd-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-act .gd-note { color: var(--muted); font-size: .84rem; }

/* §6  COVERAGE GRID (Guests tab, Rows/Grid view) — a second label row under
   the course row, lighter. Same sticky-left trick as .cg-course-lbl so it
   stays readable when the table scrolls at phone width. */
.cov-grid .cg-sub-row td { background: var(--card); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding: 7px 0 3px; border-bottom: 1px solid var(--line-soft); }
.cov-grid .cg-sub-lbl { position: sticky; left: 16px; display: inline-block; }

/* the standing [hidden]-beats-display rule */
.sub-add[hidden], .gd-sheet[hidden], .sub-row .sr-save[hidden] { display: none !important; }

/* Additions beside the lift (CLAUDE.md §49): the event-item tier on the
   caterer's Menu tab / Menu Development preview (the client-PDF tier — same
   scale as .opt-sub), and the Group-by-diet flash's inline Undo. */
.menu-subhead { margin: 12px 0 2px; padding: 0 2px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.flash .flash-undo { display: inline; margin: 0 0 0 6px; }
.flash .flash-undo .linkbtn { font-weight: 800; }
/* the app's global `label` rule (caps, block margins) would otherwise reach the sheet's toggles */
.gd-opts .gd-tog { margin: 0; text-transform: none; letter-spacing: normal; }

/* §51 C — "Agreed with the client": the standing reminder on the edit card, and
   the read-only text wherever it's shown (line breaks kept, D-C6). */
.agreed-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px;
  padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: .86rem; }
.agreed-warn svg { flex: none; margin-top: 2px; color: var(--muted); }
.agreed-text { white-space: pre-line; }
.cp-agreed { margin-bottom: 16px; }
.cp-agreed .agreed-text { font-size: 1rem; line-height: 1.6; color: var(--ink); }

/* §51 D — photos on "Agreed with the client": a thumbnail strip (office, portal,
   staff), the office's label/delete controls and upload progress, and the viewer. */
.agreed-photos { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.agreed-photos .ap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.photo-strip.is-edit { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 0; margin-bottom: 12px; }
.ph-item { position: relative; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-thumb { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--bg); cursor: zoom-in; min-height: 0; }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-thumb.is-missing { cursor: default; display: grid; place-items: center; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--bg) 0 9px, #efe9df 9px 18px); }
.ph-label { font-size: .82rem; color: var(--ink-soft); line-height: 1.3; overflow-wrap: anywhere; }
.ph-edit { display: flex; flex-direction: column; gap: 6px; }
.ph-edit select, .ph-edit input { width: 100%; min-width: 0; font-size: .84rem; padding: 6px 8px; min-height: 36px; }
.ph-edit.is-bad select, .ph-edit.is-bad input { border-color: var(--danger, #b4232c); }
.ph-del { position: absolute; top: 6px; right: 6px; margin: 0; }
.ph-del .btn { background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }
.ph-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-progress { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.ph-progress[hidden] { display: none; }
.ph-progress li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.ph-progress .pp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ph-progress li.ok .pp-state { color: var(--good, #2f7a4f); font-weight: 700; }
.ph-progress li.bad .pp-state { color: var(--danger, #b4232c); font-weight: 700; text-align: right; }
.sp-photos { padding: 0 16px 14px; }
dialog.photo-lb { background: rgba(20, 18, 26, .86); }   /* beats dialog.modal-backdrop (WP6 §6.9) */
.photo-lb-card { position: relative; width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.photo-lb-card img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 10px; background: #111; display: block; }
.photo-lb-foot { display: flex; align-items: center; justify-content: center; gap: 16px; color: #fff; font-weight: 700; min-height: 44px; }
/* prev/next keep their place at the ends of the strip: more specific than the
   global [hidden] rule, so it wins over that one. */
.photo-lb-foot [hidden] { visibility: hidden; display: inline-flex !important; }
.photo-lb-x { position: absolute; top: -6px; right: 0; color: #fff; z-index: 2; }
@media (max-width: 560px) { .photo-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* ---- net.js in-page messages (WP6 §6.1) ------------------------------------
   "Not saved" and other short messages, in place of alert(). At the top so
   they never cover a sticky save bar; above everything else on the page. */
.net-msg {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 1000;
  width: max-content; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-md);
  font-size: 15px; line-height: 1.4; text-align: center;
}
.net-msg-alert { background: var(--danger); }

/* ---- drag to reorder (WP6 §6.8, js/reorder.js) ------------------------------
   The handle is a 44px button, visible at rest; touch-action:none on it only,
   so the page still scrolls under a finger everywhere else. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; }
.reorder-list { display: contents; }
.reorder-handle { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted);
  cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; box-shadow: none; }
.reorder-handle:is(:hover, :focus-visible) { background: var(--accent-tint); color: var(--accent-deep); }
.reorder-handle[aria-pressed="true"] { background: var(--accent); color: #fff; }
html.reorder-dragging, html.reorder-dragging * { cursor: grabbing !important; }
[data-reorder-key] { scroll-margin: 16px; }
[data-reorder-key].is-lifted { position: relative; z-index: 30; scale: 1.02; opacity: .96;
  background: var(--card); box-shadow: var(--shadow-md); pointer-events: none; }
[data-reorder-key].is-grabbed { position: relative; z-index: 5; background: var(--card);
  box-shadow: var(--shadow-md); }
[data-reorder-key]:has(> .reorder-handle:focus-visible, > .ps-head > .reorder-handle:focus-visible) {
  outline: 3px solid var(--accent); outline-offset: 2px; }
[data-reorder][data-drop]::after { content: ""; position: fixed; z-index: 40; pointer-events: none;
  left: var(--drop-x); top: calc(var(--drop-y) - 1.5px); width: var(--drop-w); height: 3px;
  border-radius: 3px; background: var(--drop-marker-color, var(--accent)); }
[data-reorder][data-drop]::before { content: ""; position: fixed; z-index: 41; pointer-events: none;
  left: calc(var(--drop-x) - 6px); top: calc(var(--drop-y) - 6px); width: 12px; height: 12px;
  box-sizing: border-box; border-radius: 50%; background: var(--card);
  border: 3px solid var(--drop-marker-color, var(--accent)); }
@media (forced-colors: active) {
  [data-reorder][data-drop]::after { background: Highlight; }
  [data-reorder][data-drop]::before { border-color: Highlight; }
}
@media (prefers-reduced-motion: reduce) { [data-reorder-key].is-lifted { scale: none; } }

/* Settings -> Look and feel (Tenant Look and Feel §8) */
.lf-logo-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.lf-logo-box { display: grid; place-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 22px; min-height: 96px; }
.lf-logo-box img { max-height: 72px; width: auto; height: auto; max-width: 260px; }
.lf-logo-tint { background: var(--accent-tint); }
.lf-upload input[type=file] { min-height: var(--tap); }
.lf-remove { margin-top: 12px; }
.lf-colour-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lf-colour-row .field-label { flex-basis: 100%; margin: 0; }
.lf-colour-row input[type=color] { width: 64px; height: var(--tap); padding: 2px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; }
.lf-hex { width: 9ch; min-height: var(--tap); font-family: ui-monospace, Menlo, monospace; }
.lf-swatches { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 14px 0 6px; }
.lf-swatches li { display: flex; align-items: center; gap: 8px; }
.lf-swatch { display: inline-block; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, .12); }
.lf-swatch-sm { width: 22px; height: 22px; vertical-align: middle; }
.lf-readable { margin: 8px 0; padding: 8px 12px; border-radius: var(--radius-sm); }
.lf-readable.ok { background: #e9f5ec; color: #1e5b2e; }
.lf-readable.bad { background: #fbeaea; color: #8a1f1f; }
.lf-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lf-fonts { border: 0; padding: 0; margin: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lf-font-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer; min-height: var(--tap); }
.lf-font-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-line); }
.lf-font-card input { position: absolute; opacity: 0; pointer-events: none; }
.lf-font-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.lf-font-name { font-weight: 700; font-size: .85rem; }
.lf-font-sample-h { font-size: 1.35rem; line-height: 1.2; font-weight: 600; }
.lf-font-sample-b { font-size: .95rem; }
.lf-grounds { border: 0; padding: 0; margin: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.lf-ground { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.lf-ground.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-line); }
.lf-ground input { position: absolute; opacity: 0; pointer-events: none; }
.lf-ground:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.lf-ground-swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); flex: none; }
.lf-ground-name { font-weight: 600; font-size: .9rem; }
.lf-pv-ground { --pv-bg: var(--bg); --pv-muted: var(--muted); --pv-line: var(--line);
  background: var(--pv-bg); padding: 18px; border-radius: var(--radius-sm); max-width: 560px; }
.lf-pv-muted { color: var(--pv-muted); font-size: .85rem; margin: 10px 0 0; }
.lf-pv-foot { text-align: center; }
.lf-preview { --pv-accent: var(--accent); --pv-accent-deep: var(--accent-deep); --pv-accent-tint: var(--accent-tint);
  --pv-accent-line: var(--accent-line); --pv-serif: var(--serif); --pv-sans: var(--sans);
  font-family: var(--pv-sans); border: 1px solid var(--pv-line); border-radius: var(--radius-sm);
  background: #fff; padding: 18px 20px; max-width: 520px; }
.lf-pv-head { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid var(--pv-accent); }
.lf-pv-head img { max-height: 48px; width: auto; height: auto; max-width: 220px; }
.lf-pv-brand { font-family: var(--pv-serif); font-size: 1.4rem; font-weight: 600; color: var(--pv-accent-deep); }
.lf-pv-eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--pv-accent); }
.lf-pv-title { margin: 2px 0 6px; font-family: var(--pv-serif); font-size: 1.6rem; font-weight: 600; color: var(--pv-accent-deep); }
.lf-pv-body { margin: 0 0 12px; }
.lf-pv-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--pv-accent-tint);
  color: var(--pv-accent); font-size: .8rem; font-weight: 700; margin-right: 8px; }
.lf-pv-btn { display: inline-block; padding: 9px 16px; border-radius: var(--radius-sm); background: var(--pv-accent);
  color: #fff; font-weight: 700; }
.lf-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 18px; }
.lf-actions { margin: 6px 0 12px; }
.lf-tick { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; }
.lf-tick input { width: 22px; height: 22px; accent-color: var(--accent); }
