:root {
  --bg: #0f141b;
  --panel: #171e28;
  --panel-2: #1f2835;
  --line: #2b3646;
  --ink: #eaeef5;
  --muted: #93a0b4;
  --brand: #2563eb;
  --ok: #34c779;
  --warn: #f5a524;
  --danger: #ff6b61;
  --free: #3a4558;
  --focus: #93c5fd;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; cursor: pointer;
}
button:hover { border-color: #46556b; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.danger { color: var(--danger); }
button.ghost { background: transparent; border-color: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
input, select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.loading { padding: 40px; color: var(--muted); }

#app { height: 100%; display: grid; grid-template-rows: auto 1fr; }
header.top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; margin-right: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--brand); color: #fff; }
.spacer { flex: 1; }
.pill { padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.pill.live { border-color: var(--ok); color: var(--ok); }

.body { min-height: 0; display: grid; grid-template-columns: 330px 1fr; }
.body.with-drawer { grid-template-columns: 330px 1fr 360px; }
.body.single { grid-template-columns: 1fr; }
.body.single.with-drawer { grid-template-columns: 1fr 360px; }

aside.lists { border-right: 1px solid var(--line); overflow: auto; background: var(--panel); }
.group { border-bottom: 1px solid var(--line); }
.group > h3 {
  margin: 0; padding: 8px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); display: flex; justify-content: space-between; cursor: pointer;
}
.party {
  display: grid; grid-template-columns: 4px 52px 1fr auto; gap: 8px; align-items: center;
  padding: 7px 12px; border-top: 1px solid var(--line); cursor: pointer;
}
.party:hover { background: var(--panel-2); }
.party[aria-pressed="true"] { background: #1e2c44; }
.party .bar { align-self: stretch; border-radius: 3px; }
.party .t { font-variant-numeric: tabular-nums; }
.party .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party .s { color: var(--muted); font-size: 12px; }
.party .tbl {
  min-width: 34px; text-align: center; padding: 3px 6px; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--line); font-weight: 700;
}
.late { color: var(--warn); }
.over { color: var(--danger); font-weight: 700; }

main.stage { position: relative; overflow: auto; min-width: 0; }
.floor { position: relative; margin: 18px; min-width: 320px; min-height: 240px; }
.tbl-box {
  position: absolute; border-radius: 10px; background: var(--free); border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; cursor: pointer; user-select: none; text-align: center; line-height: 1.15;
}
.tbl-box.round { border-radius: 999px; }
.tbl-box.diamond { transform: rotate(0deg); border-radius: 18px; }
.tbl-box .lab { font-size: 15px; }
.tbl-box .sub { font-size: 11px; font-weight: 500; opacity: .92; }
.tbl-box.sel { border-color: #fff; }
.tbl-box.target { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(52, 199, 121, .35); }
.tbl-box.blocked { background: repeating-linear-gradient(45deg, #2a2f3a, #2a2f3a 6px, #1f242d 6px, #1f242d 12px); color: var(--muted); }
.tbl-box.held { outline: 2px dashed var(--warn); }
.tbl-box.soon::after {
  content: attr(data-next); position: absolute; bottom: -9px; background: #000; color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 600;
}
.tbl-box .srv {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px; color: #101418; font-weight: 800;
}
.tbl-box .prog { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: rgba(0,0,0,.35); border-radius: 2px; }
.tbl-box .prog i { display: block; height: 100%; background: rgba(255,255,255,.85); border-radius: 2px; }
.banner {
  position: sticky; top: 0; z-index: 4; padding: 8px 14px; background: #123524; border-bottom: 1px solid #1e5a3c;
  color: #c8f2da; display: flex; gap: 10px; align-items: center;
}

aside.drawer { border-left: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 14px; }
aside.drawer h2 { margin: 0 0 2px; font-size: 18px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); margin: 0 4px 4px 0; }

.cols { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; padding: 14px; min-width: 1150px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.col > h3 { margin: 0; padding: 10px 12px; font-size: 13px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }

.tl { min-width: 1000px; padding-bottom: 8px; }
.tl-head, .tl-row { display: grid; grid-template-columns: 96px 1fr; }
.tl-head { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--line); }
.tl-axis { position: relative; height: 30px; }
.tl-axis span { position: absolute; top: 6px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.tl-row { border-bottom: 1px solid var(--line); min-height: 38px; }
.tl-label { padding: 8px 10px; font-weight: 700; background: var(--panel); position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); }
.tl-label small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.tl-track {
  position: relative;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
}
.tl-bar {
  position: absolute; top: 5px; height: 28px; border-radius: 7px; padding: 0 8px;
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff;
  overflow: hidden; white-space: nowrap; cursor: pointer; border: 1px solid rgba(0,0,0,.25);
}
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ok); z-index: 1; }
.tl-foot { display: grid; grid-template-columns: 96px 1fr; border-top: 1px solid var(--line); background: var(--panel); position: sticky; bottom: 0; }
.tl-foot .cells { position: relative; height: 40px; }
.tl-foot .cell { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; text-align: center; color: var(--muted); }
.tl-foot .cell.full { color: var(--danger); font-weight: 700; }

.overview { padding: 18px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hbar { display: grid; grid-template-columns: 70px 1fr 40px; gap: 8px; align-items: center; margin: 6px 0; }
.hbar .track { height: 12px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--brand); border-radius: 6px; }

#modal-root:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 12px; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.times { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.times button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.warn-box { background: #3a2a12; border: 1px solid #6a4a16; padding: 8px 10px; border-radius: 8px; margin: 10px 0; }
#toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  background: #000; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0;
  pointer-events: none; transition: opacity .2s; max-width: 90vw;
}
#toast.show { opacity: 1; }
#toast.err { background: #5b1b17; border: 1px solid #a8352c; }
@media (max-width: 900px) {
  .body, .body.with-drawer { grid-template-columns: 1fr; }
  aside.lists { max-height: 36vh; border-right: 0; border-bottom: 1px solid var(--line); }
  aside.drawer { border-left: 0; border-top: 1px solid var(--line); }
  body { overflow: auto; }
}
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* sign-in */
main.login { height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px;
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.user { white-space: nowrap; }
table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
details > summary { cursor: pointer; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* security dialogs */
.info-box { background: #11283f; border: 1px solid #1f4a78; padding: 8px 10px; border-radius: 8px; margin: 10px 0; }
.warn-box { background: #3a1a17; border: 1px solid #7a2b24; padding: 8px 10px; border-radius: 8px; margin: 10px 0; }
a.btn-link {
  display: block; text-align: center; padding: 9px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
}
a.btn-link:hover, a.btn-link:focus-visible { border-color: var(--brand); }
button.link { background: none; border: none; color: var(--focus); padding: 2px; text-decoration: underline; cursor: pointer; }
.key {
  font: 600 18px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; word-break: break-all;
}
pre.codes {
  font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; columns: 2;
}

/* ---- configuration screen ---- */
body.cfg-open { overflow: hidden; }
.cfg-root { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
.cfg-bar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.cfg-bar .spacer { flex: 1; }
.cfg-body { flex: 1; display: grid; grid-template-columns: 160px minmax(0, 1fr) 320px; min-height: 0; }
.cfg-body:not(:has(.cfg-review)) { grid-template-columns: 160px minmax(0, 1fr); }
.cfg-nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-right: 1px solid var(--line); }
.cfg-nav button[aria-selected="true"] { background: var(--panel-2); border-color: var(--accent, #4aa3df); }
.cfg-main { padding: 16px; overflow: auto; }
.cfg-review { padding: 14px; border-left: 1px solid var(--line); overflow: auto; background: var(--panel); }
.cfg-review ul { padding-left: 18px; margin: 6px 0; font-size: 13px; }
.cfg-review .d-added { color: #5ec27b; }
.cfg-review .d-removed { color: var(--danger); }
.cfg-bad { color: var(--danger); }
.cfg-warn { color: var(--warn); }
.cfg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.cfg-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.cfg-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted, #9aa6b5); }
.cfg-label { font-size: 12px; color: var(--muted, #9aa6b5); min-width: 80px; }
.cfg-check { flex-direction: row !important; align-items: center; gap: 6px !important; color: var(--ink) !important; font-size: 13px !important; }
.cfg-check input { width: auto; }
.cfg-wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.cfg-table th { text-align: left; font-weight: 600; color: var(--muted, #9aa6b5); padding: 4px 6px; }
.cfg-table td { padding: 3px 6px; }
.cfg-root input[type="color"] { padding: 0; height: 32px; width: 44px; }
.cfg-root details { margin: 6px 0; }
.cfg-root summary { cursor: pointer; padding: 4px 0; }
@media (max-width: 900px) {
  .cfg-body, .cfg-body:not(:has(.cfg-review)) { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: start; overflow: auto; }
  .cfg-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .cfg-nav button { flex: 0 0 auto; }
  .cfg-main { overflow: visible; }
  .cfg-review { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---- floor plan editor ---- */
.lay-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.lay-bar .spacer { flex: 1; }
.lay-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; align-items: start; }
.lay-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.lay-canvas { position: relative; outline: none; touch-action: none; user-select: none;
  background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 12px 12px; }
.lay-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent, #4aa3df); }
.lay-t { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 5px solid #8b95a5; border-radius: 10px; cursor: grab; touch-action: none; }
.lay-t:active { cursor: grabbing; }
.lay-t.round { border-radius: 999px; border-left-width: 1px; border-top: 5px solid #8b95a5; }
.lay-t .lab { font-weight: 700; font-size: 14px; pointer-events: none; }
.lay-t .sub { font-size: 11px; opacity: .8; pointer-events: none; }
.lay-t.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); z-index: 2; }
.lay-t.bad { outline: 2px solid var(--danger); }
.lay-insp { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lay-insp h3 { margin: 0 0 4px; font-size: 14px; }
.lay-insp label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted, #9aa6b5); }
.lay-insp .cfg-row { margin: 0; }
.lay-insp input[type="number"] { width: 84px; }
.lay-key { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; }
.lay-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 900px) { .lay-wrap { grid-template-columns: 1fr; } }
@media (min-width: 901px) {
  .cfg-body.cfg-wide { grid-template-columns: 160px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .cfg-body.cfg-wide .cfg-review { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 180px; }
  .cfg-body.cfg-wide .cfg-nav { grid-row: 1 / span 2; }
  .cfg-body.cfg-wide .lay-scroll { max-height: calc(100vh - 360px); }
}

/* ---- fixtures: walls, doors, windows (host stand and editor) ---- */
.fx { position: absolute; pointer-events: none; box-sizing: border-box; }
.fx-wall { background: #4b5667; border-radius: 2px; }
.fx-door { background: transparent; border-top: 2px dashed #7aa7d9; }
.fx-door i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.fx-window { background: repeating-linear-gradient(90deg, #5c93c9 0 8px, #3a5f86 8px 10px); opacity: .85; }
.fx-pillar { background: #5a6474; border-radius: 4px; }
.fx-label { display: grid; place-items: center; color: var(--muted, #9aa6b5); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.tbl-box .txt, .lay-t .txt { display: flex; flex-direction: column; align-items: center; pointer-events: none; }

.lay-f { position: absolute; box-sizing: border-box; cursor: grab; touch-action: none; }
.lay-f:active { cursor: grabbing; }
.lay-f.f-wall { background: #4b5667; border-radius: 2px; }
.lay-f.f-door { background: rgba(122, 167, 217, .18); border-top: 2px dashed #7aa7d9; }
.lay-f.f-window { background: repeating-linear-gradient(90deg, #5c93c9 0 8px, #3a5f86 8px 10px); }
.lay-f.f-pillar { background: #5a6474; border-radius: 4px; }
.lay-f.f-label { display: grid; place-items: center; color: var(--muted, #9aa6b5); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.03); border: 1px dashed var(--line); }
.lay-f.sel { outline: 2px solid #fff; outline-offset: 2px; z-index: 3; }
.lay-f::after { content: ''; position: absolute; inset: -6px; }       /* easier to grab thin walls */
.lay-h, .lay-r { position: absolute; z-index: 5; box-sizing: border-box; }
.lay-h { width: 20px; height: 20px; background: #fff; border: 2px solid var(--panel); border-radius: 4px; cursor: nwse-resize; }
.lay-r { width: 18px; height: 18px; background: var(--accent, #4aa3df); border: 2px solid #fff; border-radius: 50%; cursor: grab; }
.lay-sizer { position: relative; }
.lay-marquee { position: absolute; border: 1px dashed #fff; background: rgba(74, 163, 223, .15); pointer-events: none; z-index: 6; }
.lay-marquee.wall { background: #4b5667; border: 0; opacity: .8; }
.lay-scroll.drawing .lay-canvas { cursor: crosshair; }
.lay-bar button[aria-pressed="true"] { background: var(--accent, #4aa3df); color: #fff; }

/* ---- table combinations on the canvas ---- */
.lay-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.lay-link { stroke: #8fb4ff; stroke-width: 2; stroke-dasharray: 6 5; opacity: .7; }
.lay-link.on { stroke: #fff; stroke-width: 3; opacity: 1; }
.lay-combo { position: absolute; transform: translate(-50%, -50%); z-index: 4; padding: 2px 8px; font-size: 12px; border-radius: 999px;
  background: #2a4a7d; border: 1px solid #8fb4ff; color: #fff; cursor: pointer; }
.lay-combo.on { background: #fff; color: #10233f; }
.lay-t.member { box-shadow: 0 0 0 2px #8fb4ff; }
.lay-insp .chip { display: inline-flex; align-items: center; gap: 4px; }
.lay-insp .chip button { padding: 0 4px; line-height: 1; }

/* ---- language picker, email preview ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.langpick select { padding: 4px 8px; font-size: 13px; }
.login-card .langpick { display: block; text-align: right; margin-bottom: 8px; }
.email-preview { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel); }
.email-frame { width: 100%; height: 480px; border: 0; background: #f4f5f7; border-radius: 8px; }
.cfg-card textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg, #0f141b); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* ---- logo upload and booking page editor ---- */
.logo-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 4px 0 12px; }
.logo-thumb { width: 180px; min-height: 90px; display: flex; align-items: center; justify-content: center; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: repeating-conic-gradient(#0000000d 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.logo-thumb img { max-width: 100%; max-height: 80px; object-fit: contain; }
.logo-actions { flex: 1 1 260px; min-width: 0; }
.logo-actions label { display: flex; flex-direction: column; gap: 3px; }
.wp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1180px) { .wp-grid { grid-template-columns: minmax(0, 1fr) 420px; } }
.wp-preview { position: sticky; top: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel); }
.wp-preview iframe { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.wp-color { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.wp-color .cfg-label { min-width: 130px; }
.wp-css { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.wp-code { overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* ---- ready-made looks ---- */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.look-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.look-card button { margin-top: auto; }
.look-sw { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); height: 64px; }
.look-h { font-size: 22px; font-weight: 700; }
.look-p { flex: 1; height: 28px; border: 1px solid #0002; }
.look-b { width: 34px; height: 20px; }

/* ---- floor plan tabs on the host stand ---- */
.plan-tabs { display: flex; gap: 6px; padding: 10px 18px 0; flex-wrap: wrap; position: sticky; left: 0; }
.plan-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- floor plan page (light work surface, as in the reference design) ---- */
.fp { --fp-bg: #ffffff; --fp-panel: #ffffff; --fp-line: #dfe2e7; --fp-ink: #1d2430; --fp-muted: #6b7280; --fp-accent: #0f6bff;
  background: var(--fp-bg); color: var(--fp-ink); border: 1px solid var(--fp-line); border-radius: 12px; padding: 16px; }
.fp .muted { color: var(--fp-muted); }
.fp-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fp-head h2 { margin: 0; font-size: 20px; }
.fp-plan { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fp select { background: #fff; color: var(--fp-ink); border: 1px solid #c8ccd4; border-radius: 6px; padding: 7px 10px; min-width: 160px; width: auto; }
.fp button { background: #fff; color: var(--fp-ink); border: 1px solid transparent; border-radius: 6px; }
.fp button:hover:not(:disabled) { background: #f1f3f6; }
.fp button.fp-text { color: var(--fp-accent); padding: 6px 8px; background: transparent; }
.fp button:disabled { opacity: .4; }
.fp-grid { display: grid; grid-template-columns: 176px minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.fp-elements { border: 1px solid var(--fp-line); border-radius: 8px; padding: 10px; background: var(--fp-panel); }
.fp h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.fp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-bottom: 12px; }
.fp-tile svg { max-width: 100%; height: auto; }
.fp-tiles.room { grid-template-columns: repeat(2, 1fr); }
.fp-tile { display: grid; place-items: center; padding: 4px; border: 1px solid transparent; border-radius: 6px; cursor: grab; min-height: 50px; }
.fp-tile:hover { border-color: #c8ccd4; background: #f6f7f9; }
.fp-tile.fp-room { font-size: 11px; gap: 2px; padding: 6px 2px; cursor: pointer; }
.fp-tile.fp-room[aria-pressed="true"] { background: #e6efff; border-color: var(--fp-accent); }
.fp-center { min-width: 0; }
.fp-toolbar { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.fp-group { display: inline-flex; align-items: center; background: #f1f3f6; border-radius: 8px; padding: 2px; gap: 1px; }
.fp-tb { display: inline-grid; place-items: center; width: 32px; height: 30px; padding: 0; color: #2b3340; background: transparent; border-radius: 6px; cursor: pointer; }
.fp-tb[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 1.5px var(--fp-accent) inset; color: var(--fp-accent); }
.fp-pct { font-size: 12px; color: var(--fp-muted); padding: 0 6px; min-width: 42px; text-align: center; }
.fp-snap { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--fp-muted); }
.fp .lay-scroll { background: #fff; border: 1px solid var(--fp-line); border-radius: 8px; max-height: calc(100vh - 330px); min-height: 360px; }
.fp .lay-scroll.panning .lay-canvas { cursor: grab; }
.fp .lay-canvas { background-color: #fff;
  background-image: linear-gradient(to right, #e7e9ee 1px, transparent 1px), linear-gradient(to bottom, #e7e9ee 1px, transparent 1px),
    linear-gradient(to right, #f3f4f7 1px, transparent 1px), linear-gradient(to bottom, #f3f4f7 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 12px 12px, 12px 12px; }
.fp .lay-t { background: #cfd2d7; border: 0; color: #20252d; border-radius: 6px; overflow: visible; }
.fp .lay-t.round { border-radius: 999px; border-top: 0; }
.fp .lay-t.diamond { border-radius: 14px; }
.fp .lay-t .lab { font-size: 14px; font-weight: 600; color: #3b4048; }
.fp .lay-t.sel { box-shadow: 0 0 0 2px var(--fp-accent); }
.fp .lay-t.member { box-shadow: 0 0 0 2px #7aa7ff; }
.fp .lay-t.bad { outline: 2px solid #d92d20; }
.fp .chair { position: absolute; width: 22px; height: 8px; background: #3b3f46; border-radius: 4px; pointer-events: none; }
.fp .adot { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; }
.fp .lay-f.f-wall { background: #5b6472; }
.fp .lay-f.f-label { color: #6b7280; border-color: #c8ccd4; background: transparent; }
.fp .lay-f.f-pillar { background: #8d95a1; }
.fp .lay-f.f-door { background: rgba(15, 107, 255, .08); border-top-color: var(--fp-accent); }
.fp .lay-f.f-window { background: repeating-linear-gradient(90deg, #7aa7ff 0 8px, #bcd2ff 8px 10px); }
.fp .lay-f.sel { outline-color: var(--fp-accent); }
.fp .lay-h { background: #fff; border-color: var(--fp-accent); }
.fp .lay-r { background: var(--fp-accent); border-color: #fff; }
.fp .lay-link { stroke: var(--fp-accent); }
.fp .lay-combo { background: #e6efff; color: #0b3b99; border-color: #7aa7ff; }
.fp-right { display: flex; flex-direction: column; gap: 12px; }
.fp-card { border: 1px solid var(--fp-line); border-radius: 8px; padding: 10px 12px; background: var(--fp-panel); }
.fp-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fp-card header h3 { margin: 0; font-size: 14px; }
.fp-count { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--fp-line); border-radius: 6px; padding: 0 0 0 8px; font-weight: 600; }
.fp-row { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 8px 4px !important; border-bottom: 1px solid #eef0f3 !important; border-radius: 0 !important; }
.fp-row.on { background: #eef4ff !important; }
.fp-row .adot { position: static; flex: none; }
.fp .lay-insp { background: transparent; border: 0; padding: 0; color: var(--fp-ink); }
.fp .lay-insp label { color: var(--fp-muted); }
.fp .lay-insp input, .fp .lay-insp select { background: #fff; color: var(--fp-ink); border: 1px solid #c8ccd4; border-radius: 6px; padding: 6px 8px; min-width: 0; }
.fp .lay-insp button { border-color: #c8ccd4; }
.fp .lay-insp .primary { background: var(--fp-accent); color: #fff; border-color: var(--fp-accent); }
.fp .lay-insp .danger { color: #d92d20; }
.fp .chip { background: #eef0f3; color: #20252d; border-radius: 999px; padding: 1px 8px; }
@media (max-width: 1100px) { .fp-grid { grid-template-columns: 176px minmax(0, 1fr); } .fp-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } .fp-card { flex: 1 1 240px; } }
@media (max-width: 700px) { .fp-grid { grid-template-columns: 1fr; } }

/* ---- host stand: search, wait quotes, table strip, guest book, reports ---- */
.finder { padding: 8px 10px 4px; position: relative; }
.finder input { width: 100%; }
.search-results { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; }
.search-results:not(:empty) { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--panel); }
.search-results button { text-align: left; display: flex; flex-direction: column; gap: 1px; border: 0; background: transparent; padding: 6px 8px; }
.search-results button:hover { background: var(--panel-2); }
.quotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 4px 10px 8px; }
.quotes button { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; line-height: 1.1; }
.quotes button small { color: var(--muted); }
.inline-edit { width: 100%; padding: 4px 8px; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin: 6px 0; }
.counters span { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.counters strong { font-size: 18px; color: var(--ink); }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tagchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--c, var(--line)); border-radius: 999px; font-size: 12px; margin: 0; color: var(--ink); cursor: pointer; }
.tagchip input { width: auto; }
.quick-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.quick-status button { border-left: 4px solid var(--c, var(--line)); padding: 6px 10px; }
.quick-status button[aria-pressed="true"] { background: var(--panel-2); font-weight: 700; }
.strip { margin: 12px 0 4px; }
.strip .bar { position: relative; height: 18px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.strip .bar i { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; opacity: .9; }
.strip .bar b { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.strip .ticks { position: relative; height: 14px; font-size: 10px; color: var(--muted); }
.strip .ticks span { position: absolute; transform: translateX(-50%); }
.guest-find { margin: 10px 0; }
.size-list { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; max-height: 50vh; overflow: auto; }
.size-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; text-align: left; }
.size-row.warn { background: rgba(245, 165, 36, .12); }
.note-card { margin: 8px 0; padding: 10px; }
.note-row { padding: 2px 0; }
.gb-body { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; flex: 1; }
.gb-body.with-detail { grid-template-columns: minmax(0, 1fr) 380px; }
.gb-detail { margin: 16px 16px 16px 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.gb-bar { padding: 0 16px; align-items: flex-end; }
.gb-bar input[type="search"] { min-width: 260px; }
.gb-table tbody tr { cursor: pointer; }
.gb-table .num, .cfg-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.btn { display: inline-block; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink); text-decoration: none; }
.rp-controls { padding: 0 16px; align-items: flex-end; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.kpi strong { font-size: 24px; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.daybars { display: flex; align-items: flex-end; gap: 3px; height: 150px; overflow-x: auto; padding-bottom: 4px; }
.daybar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 22px; flex: 1; }
.daybar .stack { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 120px; }
.daybar i.r { background: var(--brand); } .daybar i.w { background: #7aa7ff; }
.daybar small { font-size: 9px; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); height: 28px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; }
.key.r { background: var(--brand); } .key.w { background: #7aa7ff; }

/* ---- wave 2: schedule grid, calendar, feed, pickers ---- */
.sg { display: grid; grid-template-columns: 44px repeat(7, minmax(90px, 1fr)); gap: 4px; margin: 10px 0 14px; overflow-x: auto; }
.sg-hours { position: relative; font-size: 10px; color: var(--muted); }
.sg-hours span { position: absolute; right: 4px; transform: translateY(-50%); }
.sg-head { text-align: center; font-weight: 600; padding: 4px 0; }
.sg-track { position: relative; background: repeating-linear-gradient(to bottom, var(--panel) 0 30.25px, var(--line) 30.25px 31.25px); border-radius: 8px; }
.sg-block { position: absolute; left: 3px; right: 3px; border-radius: 6px; color: #fff; padding: 3px 6px; font-size: 11px; line-height: 1.2; cursor: grab; touch-action: none; overflow: hidden; user-select: none; box-shadow: 0 1px 3px #0005; }
.sg-block strong, .sg-block span { display: block; pointer-events: none; }
.sg-block.sel { outline: 2px solid #fff; z-index: 2; }
.sg-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; background: rgba(255,255,255,.35); }
.hol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; margin: 8px 0; }
.qr-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; }
.qr-row figure { margin: 0; text-align: center; max-width: 220px; }
.qr-row img { background: #fff; padding: 6px; border-radius: 8px; }
.calendar { padding: 16px; max-width: 980px; }
.cal-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); }
.cal-cell { min-height: 76px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.cal-cell.empty { visibility: hidden; }
.cal-cell.closed { background: repeating-linear-gradient(45deg, var(--panel) 0 8px, var(--panel-2) 8px 16px); color: var(--muted); }
.cal-cell.today { border-color: var(--brand); }
.cal-cell.sel { box-shadow: 0 0 0 2px var(--brand) inset; }
.cal-cell .dn { font-size: 12px; color: var(--muted); }
.cal-cell strong { font-size: 20px; }
.cal-cell .tag { font-size: 10px; color: var(--warn); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; margin: 8px 0; }
.feed-row { display: grid; gap: 1px; text-align: left; padding: 8px 10px; }
.feed-row.cancel { border-left: 3px solid var(--danger); }
.pick-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; }
.pick-row i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pick-row .tick { margin-left: auto; color: var(--ok); }
.chips-row { display: flex; gap: 6px; margin: 8px 0; }
.chips-row button { flex: 1; padding: 6px; }
.status-btn { border-left: 5px solid var(--c, var(--line)); }
.times button small.load { display: block; font-size: 10px; color: var(--muted); }
.times button small.load.high { color: var(--warn); }
.asof-btn { position: absolute; right: 14px; bottom: 14px; z-index: 5; }
.asof-btn.on { border-color: var(--warn); color: var(--warn); }
main.stage { position: relative; }
.next-seat { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-left: 14px; }
.next-seat .ns i { display: inline-block; min-width: 22px; text-align: center; border-radius: 4px; color: #fff; font-style: normal; font-size: 10px; padding: 1px 3px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.photo { width: 150px; }
.photo img { width: 150px; height: 100px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 4px; }

/* ---- side menu */
.menu-btn { font-size: 18px; padding: 4px 10px; }
.side-scrim { position: fixed; inset: 0; background: rgba(5, 8, 12, .55); z-index: 40; }
.side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 41; display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
}
.side-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.side-switch { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-size: 13px; }
.side-switch select { width: auto; padding: 4px 8px; }
.side-id { display: flex; gap: 12px; align-items: center; padding: 6px 16px 16px; border-bottom: 1px solid var(--line); }
.side-logo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; flex: none; }
.side-nav { flex: 1; overflow: auto; padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 9px 10px; font-size: 14px; }
.nav-item:hover { background: var(--panel-2); }
.nav-ico { width: 20px; text-align: center; opacity: .85; }
.side-head { margin: 14px 10px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.side-foot { padding: 10px 16px; border-top: 1px solid var(--line); }

/* ---- section pages (More) */
.xpage { max-width: 960px; margin: 0 auto; width: 100%; padding: 20px 20px 60px; }
.xsec { margin-bottom: 28px; }
.xsec h2 { font-size: 18px; margin: 0 0 6px; }
.xcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; display: grid; gap: 8px; }
.xhead { display: flex; align-items: center; gap: 6px; }
.xfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.xfields .wide { grid-column: span 2; }
.xact { display: flex; gap: 8px; justify-content: flex-end; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; background: var(--panel-2); }
/* pages without a section list: use the whole width */
.cfg-body.cfg-solo, .cfg-body.cfg-solo:not(:has(.cfg-review)) { grid-template-columns: minmax(0, 1fr); }
.cfg-body.gb-body { grid-template-columns: minmax(0, 1fr); }
.cfg-body.gb-body.with-detail { grid-template-columns: minmax(0, 1fr) 380px; }

.email-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.email-side { position: sticky; top: 0; }
.email-subject { display: grid; gap: 2px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.email-subject strong { font-size: 15px; word-break: break-word; }
@media (max-width: 1100px) { .email-split { grid-template-columns: 1fr; } .email-side { position: static; } }

.xline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.xs-confirmed { border-color: var(--ok); color: var(--ok); }
.xs-quoted { border-color: var(--warn); color: var(--warn); }
