:root {
  --bb-dusk: #2f4a75;
  --bb-ink: #1f2430;
  --bb-paper: #f7f7f9;
  --bb-card: #ffffff;
  --bb-line: #d8dae0;
  --bb-muted: #5d6474;
  --bb-bad: #b3261e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--bb-ink);
  background: var(--bb-paper);
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
/* First use (Task 6, door list): a live-region announcement and a form
   label that must exist for assistive tech but never take up visible layout. */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.topbar {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bb-dusk); color: #fff; padding: .75rem 1.25rem;
}
.topbar__brand { color: #fff; text-decoration: none; font-weight: 700; }
.topbar__venue { opacity: .85; font-size: .9375rem; }
.topbar__out { margin-left: auto; }
.topbar__out button {
  font: inherit; color: #fff; background: rgba(255, 255, 255, .18);
  border: 0; border-radius: 6px; padding: .4rem .85rem; cursor: pointer; min-height: 40px;
}
/* The venue sub-nav (Events · Bookings · Door · Rooms · People · Money ·
   Audit). At any width the list can outrun the viewport — a door-staff user
   sees one item, a platform admin sees seven — so it always scrolls
   horizontally WITHIN ITSELF (overflow-x here, not on any ancestor) rather
   than ever pushing the page itself wider than the viewport. Links keep the
   44px touch-target minimum used everywhere else in the staff app. */
.venuenav { background: var(--bb-card); border-bottom: 1px solid var(--bb-line); }
.venuenav__list {
  display: flex; gap: .25rem; list-style: none; margin: 0 auto; padding: 0 1.25rem;
  max-width: 72rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.venuenav__link {
  display: flex; align-items: center; min-height: 44px; padding: 0 .9rem;
  color: var(--bb-muted); font-weight: 600; font-size: .9375rem;
  text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent;
}
.venuenav__link:hover { color: var(--bb-ink); }
.venuenav__link[aria-current="page"] { color: var(--bb-dusk); border-bottom-color: var(--bb-dusk); }

.page { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.page__head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.page__head h1 { font-size: 1.5rem; margin: 0 0 1rem; }
.page__head .actions { margin-left: auto; display: flex; gap: .5rem; }
a.button, button.button {
  font: inherit; font-weight: 600; min-height: 44px; padding: .55rem 1.1rem;
  border: 1px solid var(--bb-dusk); border-radius: 6px; background: var(--bb-dusk);
  color: #fff; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center;
}
a.button--ghost, button.button--ghost { background: transparent; color: var(--bb-dusk); }
/* An action that cannot be undone (Plan 3b Task 9, "Cancel show"). The ghost
   form opens the confirm panel; the solid form is the act itself. */
a.button--danger, button.button--danger { background: var(--bb-bad); border-color: var(--bb-bad); color: #fff; }
a.button--danger.button--ghost, button.button--danger.button--ghost { background: transparent; color: var(--bb-bad); }
table.rows { width: 100%; border-collapse: collapse; background: var(--bb-card); border-radius: 8px; }
table.rows th, table.rows td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--bb-line); }
table.rows th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); }
/* At phone width there is no room for six columns before the action — the one
   thing this screen exists for — gets pushed off the edge. Size/Tables/Seats
   are detail a manager can open the room to see; Room, Used-by and the action
   are the three facts a phone visit needs, so those are what stay. */
@media (max-width: 30rem) {
  table.rows th:nth-child(2), table.rows td:nth-child(2),
  table.rows th:nth-child(3), table.rows td:nth-child(3),
  table.rows th:nth-child(4), table.rows td:nth-child(4) {
    display: none;
  }
  table.rows th, table.rows td { padding: .7rem .5rem; }
  table.rows td:first-child { overflow-wrap: anywhere; }
  table.rows td:last-child { white-space: normal; }
}
.notice { background: var(--bb-card); border: 1px solid var(--bb-line); border-left: 4px solid var(--bb-dusk);
          border-radius: 6px; padding: .8rem 1rem; margin: 0 0 1rem; }
.notice--bad { border-left-color: var(--bb-bad); }
label { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); margin: .9rem 0 .25rem; }
input, select { font: inherit; width: 100%; min-height: 44px; padding: .45rem .6rem;
                border: 1px solid var(--bb-line); border-radius: 6px; background: #fff; color: inherit; }
.signin { max-width: 26rem; margin: 12vh auto; padding: 0 1.25rem; }

.builder { display: grid; grid-template-columns: 13rem minmax(0, 1fr) 17rem; gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .builder { grid-template-columns: 1fr; } }
.builder__rail, .builder__inspector {
  background: var(--bb-card); border: 1px solid var(--bb-line); border-radius: 8px; padding: .9rem 1rem;
}
.builder__canvas { position: relative; background: var(--bb-card); border: 1px solid var(--bb-line); border-radius: 8px; padding: .75rem; }
#canvas { width: 100%; height: auto; display: block; touch-action: none; }
.label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bb-muted); margin: 0 0 .4rem; }
.chip {
  display: block; width: 100%; text-align: left; font: inherit; margin-bottom: .4rem; min-height: 44px;
  padding: .5rem .7rem; border: 1px solid var(--bb-line); border-radius: 6px; background: #fff; cursor: pointer;
}
.chip[aria-checked="true"] { border-color: var(--bb-dusk); background: rgba(47, 74, 117, .1); font-weight: 600; }
.cell { fill: none; }
.cell-dot { fill: var(--bb-line); }
.shape { cursor: grab; }
.shape--table { fill: rgba(47, 74, 117, .18); stroke: var(--bb-dusk); stroke-width: 2; }
.shape--stage { fill: rgba(47, 74, 117, .5); stroke: var(--bb-dusk); stroke-width: 2; }
.shape--feature { fill: #e7e9ee; stroke: #b6bbc6; stroke-width: 2; }
.shape--selected { stroke: #0a6cf0; stroke-width: 4; }
.preview { pointer-events: none; fill: rgba(47, 74, 117, .25); stroke: var(--bb-dusk); stroke-width: 2; stroke-dasharray: 5 4; }
.preview--blocked { fill: rgba(179, 38, 30, .25); stroke: var(--bb-bad); }
.shape-label { font-size: 22px; text-anchor: middle; dominant-baseline: middle; fill: var(--bb-ink); pointer-events: none; }
.shape-sub { font-size: 15px; text-anchor: middle; fill: var(--bb-muted); pointer-events: none; }
.muted { color: var(--bb-muted); }

/* Inspector size steppers — a real control replacing what used to be a
   read-only "3 × 2 cells" line, so resizing is discoverable and works on a
   touch screen. Reuses .button's 44px minimum, per the task's touch target. */
.stepper { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.stepper__btn.button { min-width: 44px; padding: 0; justify-content: center; font-size: 1.1rem; line-height: 1; }
.stepper__value { min-width: 1.5em; text-align: center; font-variant-numeric: tabular-nums; }

/* The canvas stepper pill (see room-builder.js positionPill). It floats over
   the SVG at a constant on-screen size — the SVG itself is scaled by the
   viewBox, so anything drawn *inside* it would be scaled too small or too
   large depending on the room's dimensions. Positioned in JS via
   getScreenCTM(), relative to .builder__canvas (position: relative above). */
.size-pill {
  position: absolute;
  top: 0; left: 0; /* overwritten by JS on every reposition */
  display: flex; align-items: center; gap: .2rem;
  background: var(--bb-ink); color: #fff;
  border-radius: 999px; padding: .15rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  transform: translateX(-50%);
  z-index: 2;
  /* The pill floats over the canvas but must never itself be a dead zone for
     a table underneath it — only its two buttons should catch a pointer. */
  pointer-events: none;
}
.size-pill[hidden] { display: none; }
.size-pill__btn {
  position: relative;
  font: inherit; font-weight: 700; font-size: .8rem; line-height: 1;
  width: 22px; height: 22px; min-width: 22px; min-height: 22px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer;
  pointer-events: auto;
}
/* Expands the tap target to the 44px minimum (this is the touch-first
   affordance of the three resize controls, so it is the one that cannot miss
   the target size) without growing the painted circle. Hit-testing for
   click/touch uses the element's box, not its paint, so a ::before sized to
   44px and centred over the button extends the hittable area while the pill
   stays visually as compact as before. */
.size-pill__btn::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.size-pill__btn:hover { background: rgba(255, 255, 255, .32); }
.size-pill__value {
  font-variant-numeric: tabular-nums; font-size: .85rem; padding: 0 .3rem; white-space: nowrap;
}

/* ---------- events list ---------- */
.statuschip {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--bb-line); color: var(--bb-muted);
}
.statuschip--published { background: rgba(47, 74, 117, .15); color: var(--bb-dusk); }

/* ---------- bookings (Task 4) ---------- */
.statuschip--confirmed { background: rgba(47, 74, 117, .15); color: var(--bb-dusk); }
.statuschip--held { background: rgba(93, 100, 116, .15); color: var(--bb-muted); }
.statuschip--expired, .statuschip--cancelled, .statuschip--no_show { background: rgba(179, 38, 30, .12); color: var(--bb-bad); }
.statuschip--refunded { background: var(--bb-line); color: var(--bb-muted); }

/* ---------- live-music import (Plan 6 Task 3) ---------- */
.statuschip--imported { background: rgba(47, 74, 117, .15); color: var(--bb-dusk); margin-left: .4rem; }
.statuschip--missing { background: rgba(179, 38, 30, .12); color: var(--bb-bad); margin-left: .4rem; }

.searchbar {
  display: flex; align-items: flex-end; gap: .8rem 1rem; flex-wrap: wrap;
  background: var(--bb-card); border: 1px solid var(--bb-line); border-radius: 8px;
  padding: 1rem 1.1rem; margin: 0 0 1.1rem;
}
.searchbar label { margin: 0 0 .25rem; }
.searchbar input, .searchbar select { min-width: 12rem; }
.searchbar label.inline { margin: 0 0 .55rem; }
.searchbar .button { margin-bottom: 0; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin: 0; }
.detail-grid dt { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); margin: 0 0 .2rem; }
.detail-grid dd { margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .6rem 0; border-bottom: 1px solid var(--bb-line); display: flex; flex-direction: column; gap: .15rem; }
.timeline li:last-child { border-bottom: 0; }

.disabled-action { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .5rem 0; }
.disabled-action .button[disabled] { opacity: .55; cursor: not-allowed; }
.disabled-action p { margin: 0; }

/* ---------- people (Task 7) ---------- */
/* A card list rather than `table.rows`: that table's own phone-width rule
   (above) hides columns 2–4 outright, which would drop the role control and
   the remove button — the one thing this screen is for — off a phone
   screen entirely. A card stacks instead, so nothing here is ever hidden. */
.plist { list-style: none; margin: 0; padding: 0; }
.plist > li {
  background: var(--bb-card); border: 1px solid var(--bb-line); border-radius: 8px;
  padding: .9rem 1rem; margin: 0 0 .75rem;
}
.pcard__head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pcard__head strong { font-size: 1.0625rem; }
.pcard p { margin: .15rem 0; }
.pcard__actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.pcard__actions select { width: auto; min-width: 11rem; margin: 0; }
.pcard__msg:not(:empty) { margin-top: .6rem; }

/* A confirm-before-you-act box, in the default (light) theme — the door
   list's own `.confirm` (further down) is scoped `body.door` and reads white
   text on a dark ground, so it cannot be reused here. */
.confirm {
  margin-top: .5rem; padding: .7rem .85rem; border-radius: 8px;
  background: rgba(179, 38, 30, .08); border: 1px solid var(--bb-bad);
}
.confirm p { margin: 0 0 .5rem; font-weight: 600; }
.confirm .actions { margin: 0; }

/* ---------- audit (Task 7) ---------- */
.timeline--audit li { gap: .3rem; }

/* ---------- event-edit form ---------- */
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
/* Was `fieldset.cardset` only — booking-detail-page.ts (Task 4) already used
   `<div class="cardset">` for the same card look and got no border/background
   at all, since a `<div>` never matches an element-qualified selector. The
   class alone is the contract; People and Audit (Task 7) use it on
   `<section>`s for the same reason. */
.cardset {
  border: 1px solid var(--bb-line); border-radius: 8px; background: var(--bb-card);
  padding: 1rem 1.1rem; margin: 0 0 1.1rem;
}
fieldset.cardset > legend { padding: 0; }
label.inline {
  display: inline-flex; align-items: center; gap: .45rem; margin: .5rem 1.2rem .5rem 0;
  font-size: 1rem; font-weight: 400; letter-spacing: normal; text-transform: none; color: inherit;
}
label.inline input { width: auto; min-height: 0; }
.radiogroup { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: .5rem 0; }
.field-note { font-size: .8125rem; margin: .15rem 0 .7rem; }
.field-note--bad { color: var(--bb-bad); }
.field-note--frozen { color: var(--bb-muted); font-style: italic; }

.priceline {
  display: grid; grid-template-columns: 1fr 10.5rem 8rem auto; gap: .5rem; align-items: center; margin-bottom: .5rem;
}
.priceline input, .priceline select { margin: 0; }
@media (max-width: 40rem) {
  .priceline { grid-template-columns: 1fr; }
}

/* ---------- the room map (Task 3) ---------- */
.mapwrap { max-width: 44rem; margin: 0 auto .5rem; }
#rm-map {
  width: 100%; height: auto; display: block; touch-action: manipulation;
  background: var(--bb-paper); border: 1px solid var(--bb-line); border-radius: 10px;
}
.rm-ground { fill: var(--bb-paper); }
.rm-stage { fill: rgba(47, 74, 117, .5); }
.rm-scenery { fill: #e7e9ee; stroke: #b6bbc6; stroke-width: 2; }
.rm-scenery-label {
  font-size: 13px; text-anchor: middle; dominant-baseline: middle; fill: var(--bb-muted);
  pointer-events: none; text-transform: capitalize;
}
#rm-hatch .rm-pat-bg { fill: color-mix(in srgb, var(--bb-ink) 12%, var(--bb-paper)); }
#rm-hatch .rm-pat-line { fill: color-mix(in srgb, var(--bb-ink) 28%, var(--bb-paper)); }
#rm-dots .rm-pat-walk-bg { fill: var(--bb-dusk); }
#rm-dots .rm-pat-walk-dot { fill: #fff; }

.rm-t { cursor: pointer; }
.rm-t text {
  font-size: 16px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; fill: var(--bb-ink);
}
.rm-t--sellable .rm-shape { fill: rgba(47, 74, 117, .18); stroke: var(--bb-dusk); stroke-width: 2; }
.rm-t--walkin .rm-shape { fill: url(#rm-dots); stroke: var(--bb-dusk); stroke-width: 2; }
.rm-t--walkin text { fill: #fff; paint-order: stroke; stroke: var(--bb-dusk); stroke-width: 5px; }
.rm-t--blocked .rm-shape { fill: url(#rm-hatch); stroke: var(--bb-muted); stroke-width: 2; }
.rm-t--taken { cursor: default; }
.rm-t--taken .rm-shape { fill: var(--bb-ink); opacity: .55; }
.rm-t--taken text { fill: #fff; }
.rm-t:focus { outline: 3px solid #0a6cf0; outline-offset: 2px; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; padding: 0; margin: .6rem 0 0; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.rmsw { width: 16px; height: 16px; border-radius: 4px; display: inline-block; flex: none; }
.rmsw--sellable { background: rgba(47, 74, 117, .18); border: 2px solid var(--bb-dusk); }
.rmsw--walkin {
  background-color: var(--bb-dusk);
  background-image: radial-gradient(circle, #fff 22%, transparent 23%);
  background-size: 6px 6px; border: 2px solid var(--bb-dusk);
}
.rmsw--blocked {
  background: repeating-linear-gradient(45deg, var(--bb-muted), var(--bb-muted) 2px, var(--bb-line) 2px, var(--bb-line) 6px);
  border: 1px solid var(--bb-line);
}
.rmsw--taken { background: var(--bb-ink); opacity: .55; }

/* ---------- door list (Task 6) — the DARK door theme ----------
   The approved mockup (docs/design/mockups/05-door-list.html + its door.css):
   a dark, loud room, big type, big targets, worked one-handed. Everything
   here is scoped under body.door (door-page.ts sets it) so no other staff
   screen changes. Palette copied from the mockup's tokens (Bougie Brand
   Library: charcoal, forest, gold, cream, mute, line). Every tap target is at
   least 44px tall; the search box lives in a thumb-reachable bottom dock. */
body.door {
  --d-charcoal: #2b2622; --d-forest: #1f2a24; --d-gold: #c9a35a; --d-cream: #f1e8d8;
  --d-mute: #d8cfc1; --d-line: #3a3330; --d-texture: #6a5848; --d-divider: #8a8176;
  --d-bg: #1b1815; --d-card: var(--d-charcoal);
  --d-ok: #7bd79b; --d-ok-bg: #173223; --d-warn: #f2c265; --d-warn-bg: #3a2c10; --d-bad: #ff9d8f; --d-bad-bg: #40201b;
  color-scheme: dark;
  background: var(--d-bg); color: var(--d-cream); font-size: 1.0625rem; line-height: 1.4;
}
body.door :focus-visible { outline: 3px solid var(--d-gold); outline-offset: 3px; }
body.door button, body.door input { font: inherit; color: inherit; }

/* The shared chrome, re-toned for the dark page — still the same nav. */
body.door .topbar { background: #14110f; border-bottom: 1px solid var(--d-line); }
body.door .topbar__brand { color: var(--d-gold); }
body.door .topbar__venue { color: var(--d-mute); opacity: 1; }
body.door .topbar__out button { background: rgba(241, 232, 216, .12); color: var(--d-cream); min-height: 44px; }
body.door .venuenav { background: var(--d-bg); border-bottom-color: var(--d-line); }
body.door .venuenav__link { color: var(--d-mute); }
body.door .venuenav__link:hover { color: var(--d-cream); }
body.door .venuenav__link[aria-current="page"] { color: var(--d-gold); border-bottom-color: var(--d-gold); }
body.door .page { max-width: 720px; padding: 1rem .75rem 10rem; }
body.door .page__head { align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: .6rem; }
body.door .page__head h1 { font-size: 1.25rem; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
body.door .notice { background: var(--d-card); border-color: var(--d-line); border-left-color: var(--d-gold); color: var(--d-cream); }
body.door .muted { color: var(--d-mute); }

body.door .doorwhen { color: var(--d-mute); font-weight: 600; font-size: .9375rem; margin: .3rem 0 .6rem; }

/* The sync pill — driven by door.js from real poll / in-flight state. */
body.door .sync {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin: 0;
  border-radius: 999px; font-size: .8125rem; font-weight: 700; border: 1.5px solid transparent; white-space: nowrap; flex: none;
}
body.door .sync i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
body.door .sync--ok { color: var(--d-ok); background: var(--d-ok-bg); border-color: #2c5a41; }
body.door .sync--off { color: var(--d-warn); background: var(--d-warn-bg); border-color: #7a5c1d; }
body.door .sync--busy { color: var(--d-cream); background: #2f3a4a; border-color: #51627a; }
body.door .sync--busy i { animation: door-blink .9s infinite; }
@keyframes door-blink { 50% { opacity: .25; } }

body.door .doorpicker { margin: 0 0 .8rem; }
body.door .doorpicker ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
body.door .doorpicker a {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: .4rem .9rem;
  border: 1.5px solid var(--d-line); border-radius: 12px; text-decoration: none; color: var(--d-cream);
  background: var(--d-card); font-weight: 700;
}
body.door .doorpicker a small { color: var(--d-mute); font-weight: 500; }
body.door .doorpicker a[aria-current="page"] { border-color: var(--d-gold); color: var(--d-gold); }

body.door .offline-banner {
  margin: .6rem 0; padding: 12px 14px; border-radius: 12px; background: var(--d-warn-bg);
  border: 1.5px solid #7a5c1d; color: #ffe2a8; font-size: .9375rem; font-weight: 600;
}
body.door .offline-banner a { color: #ffe2a8; text-decoration: underline; text-underline-offset: 3px; display: inline-block; min-height: 44px; line-height: 44px; }

body.door .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: .6rem 0 .3rem; }
body.door .stat { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 12px; padding: 10px 12px; }
body.door .stat b { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
body.door .stat span { font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--d-mute); }

/* ---- booking card ---- */
body.door .list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
body.door .bk { background: var(--d-card); border: 1.5px solid var(--d-line); border-radius: 16px; padding: 14px; }
body.door .bk.is-in { opacity: .92; }
body.door .bk.is-gone { opacity: .6; }
body.door .bk.is-gone .bk__name { text-decoration: line-through; }
body.door .bk__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
body.door .bk__name { font-size: 1.625rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; margin: 0; }
body.door .bk__meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 1rem; font-weight: 600; color: var(--d-mute); }
body.door .bk__meta b { color: var(--d-cream); font-weight: 800; }
body.door .tbl { min-width: 64px; text-align: center; background: var(--d-forest); border: 1.5px solid #3c5245; border-radius: 12px; padding: 6px 10px; line-height: 1.05; }
body.door .tbl span { display: block; font-size: .625rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--d-mute); }
body.door .tbl b { display: block; font-size: 1.75rem; font-weight: 800; }
body.door .bk__money { margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
body.door .bk__prepaid { font-size: 1.25rem; font-weight: 800; color: var(--d-gold); font-variant-numeric: tabular-nums; }
body.door .bk__prepaid small { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--d-mute); margin-left: 6px; }
body.door .bk__code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9375rem; letter-spacing: .08em; color: var(--d-mute); }
body.door .bk__status { margin: 8px 0 0; }

body.door .pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
body.door .pill--arriving { background: #2f3a4a; color: #cfe0f5; }
body.door .pill--in { background: var(--d-ok-bg); color: var(--d-ok); }
body.door .pill--gone { background: var(--d-bad-bg); color: var(--d-bad); }

/* The big gold check-in button — the mockup's 64px. */
body.door .checkin {
  width: 100%; min-height: 64px; margin-top: 12px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--d-gold); color: #1b1815; font-size: 1.25rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
body.door .checkin:active { transform: scale(.99); }
body.door .checkin[disabled] { background: #6b5a3a; color: #1b1815; cursor: default; }
body.door .checkin[aria-busy="true"] svg { animation: door-blink .9s infinite; }
body.door .inrow {
  margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px;
  padding: 0 12px; border-radius: 12px; background: var(--d-ok-bg); color: var(--d-ok); font-weight: 700;
}

/* ---- the F&B switch: at least the mockup's 76x46 ---- */
body.door .fnb { margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 12px; border: 1.5px solid var(--d-line); }
body.door .fnb.on { border-color: #2c5a41; background: #14241b; }
body.door .fnb.is-working { border-color: #51627a; background: #1e2633; }
body.door .fnb__label { font-weight: 700; line-height: 1.2; }
body.door .fnb__label small { display: block; font-size: .8125rem; font-weight: 500; color: var(--d-mute); margin-top: 2px; }
body.door .switch {
  position: relative; width: 76px; height: 46px; border-radius: 999px; border: 2px solid var(--d-divider);
  background: #15120f; cursor: pointer; padding: 0; flex: none;
}
body.door .switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--d-mute); transition: transform 160ms ease;
}
body.door .switch[aria-checked="true"] { background: var(--d-ok); border-color: var(--d-ok); }
body.door .switch[aria-checked="true"]::after { transform: translateX(30px); background: #10261a; }
/* Working: the knob sits mid-track and pulses — never mistakable for applied-and-locked. */
body.door .switch.is-working { background: #2f3a4a; border-color: #8aa2c4; cursor: progress; }
body.door .switch.is-working::after { transform: translateX(15px); background: #cfe0f5; animation: door-blink .9s infinite; }
/* Applied and locked (door staff cannot undo): solid, not greyed — it IS applied. */
body.door .switch.is-locked { cursor: not-allowed; }
body.door .switch.is-locked::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 8px; margin-top: -2px;
  border-radius: 2px; background: #10261a;
}
body.door .switch[disabled]:not(.is-working):not(.is-locked) { opacity: .5; cursor: not-allowed; }

body.door .confirm { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--d-warn-bg); border: 1.5px solid #7a5c1d; }
body.door .confirm p { margin: 0 0 8px; font-weight: 600; color: var(--d-warn); font-size: .9375rem; }
body.door .confirm .actions { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
body.door .cbtn {
  min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--d-texture);
  background: transparent; cursor: pointer; font-weight: 700; color: var(--d-cream);
}
body.door .cbtn--danger { border-color: var(--d-bad); color: var(--d-bad); }
body.door .cbtn[disabled] { border-color: #5a514b; color: #8f877d; cursor: not-allowed; background: rgba(0, 0, 0, .2); }

body.door .rowerr { margin: 8px 0 0; color: var(--d-bad); font-weight: 600; font-size: .9375rem; }

/* ---- manager extras: dashed gold frame + tag, never mistakable for a door-staff action ---- */
body.door .mgr { margin-top: 12px; padding: 10px; border: 2px dashed var(--d-gold); border-radius: 12px; background: rgba(201, 163, 90, .06); }
body.door .mgr__tag { display: block; font-size: .6875rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--d-gold); margin: 0 0 6px; }
body.door .mbtn {
  min-height: 48px; padding: 6px 14px; border-radius: 10px; border: 1.5px solid var(--d-gold); background: transparent;
  color: var(--d-cream); font-weight: 700; font-size: .9375rem; cursor: pointer; line-height: 1.15;
}
body.door .mbtn small { display: block; font-weight: 500; font-size: .75rem; color: var(--d-mute); }
body.door .mbtn[disabled] { border-color: #5a514b; color: #b9b0a4; cursor: not-allowed; }
body.door .mbtn[disabled] small { color: #b9b0a4; }
body.door .mbtn--danger { border-color: var(--d-bad); color: var(--d-bad); }
body.door .mgr p.note { margin: 0; font-size: .875rem; color: var(--d-mute); }

body.door .mgr-section { margin-top: 22px; }
body.door .walk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; }
body.door .walk + .walk { border-top: 1px solid var(--d-line); }
body.door .walk .tbl { min-width: 56px; }
body.door .walk p { font-weight: 700; margin: 0; line-height: 1.2; }

body.door .empty { text-align: center; padding: 36px 16px; color: var(--d-mute); margin: 0; }

/* ---- bottom dock: search lives under the thumb ---- */
body.door .dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(27, 24, 21, .97);
  border-top: 1px solid var(--d-line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
body.door .dock__inner { max-width: 696px; margin: 0 auto; }
body.door .filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
body.door .filters button {
  min-height: 46px; border-radius: 12px; border: 1.5px solid var(--d-line); background: var(--d-card);
  font-weight: 700; font-size: .9375rem; cursor: pointer; color: var(--d-mute);
}
body.door .filters button[aria-pressed="true"] { background: var(--d-cream); color: #1b1815; border-color: var(--d-cream); }
body.door .search { position: relative; }
body.door .search input {
  width: 100%; min-height: 58px; margin: 0; border-radius: 14px; border: 2px solid var(--d-divider); background: #120f0d;
  padding: 0 56px 0 48px; font-size: 1.1875rem; font-weight: 600; color: var(--d-cream);
}
body.door .search input::placeholder { color: #a79d90; font-weight: 500; }
body.door .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--d-mute); pointer-events: none; }
body.door .search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border: 0; background: transparent; cursor: pointer; border-radius: 10px; color: var(--d-mute); font-size: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  body.door *, body.door *::before, body.door *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- money (Task 8) ---------- */
/* Not `table.rows`: that table's phone-width rule hides columns 2–4, which
   here would drop Guests, F&B and fees — the figures this screen is for. The
   table keeps every column and scrolls sideways INSIDE .moneywrap, never the
   page; the event column stays pinned so a scrolled row keeps its label. */
.small { font-size: .875rem; }
.moneywrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem;
             border: 1px solid var(--bb-line); border-radius: 8px; background: var(--bb-card); }
table.money { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.money th, table.money td { padding: .6rem .75rem; border-bottom: 1px solid var(--bb-line); text-align: left; }
table.money thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); white-space: nowrap; }
table.money td.num, table.money thead th:not(:first-child) { text-align: right; white-space: nowrap; }
table.money tbody th, table.money tfoot th { font-weight: 600; min-width: 9rem; max-width: 14rem; overflow-wrap: anywhere; }
table.money th:first-child { position: sticky; left: 0; background: var(--bb-card); }
table.money tfoot th, table.money tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--bb-ink); }
.moneysec > h2 { font-size: 1.125rem; margin: 1.25rem 0 .6rem; }
table.money th .muted { font-weight: 400; }
