:root {
  --ink: #14262b; --ink-2: #1f363c; --plum: #5c1a33; --plum-2: #7a2547; --brass: #c9973f; --brass-soft: #f1e2c2;
  --bg: #f4f3f0; --card: #fff; --line: #dedad2; --text: #1e2528; --muted: #5d686d;
  --ok: #2f7a52; --ok-bg: #e3f1e9; --warn: #8a5a00; --warn-bg: #fbefd2; --bad: #9b2335; --bad-bg: #f8e3e6;
  --radius: 6px;
  --head-bg: #14262b; --head-fg: #ffffff; --head-muted: #b9c3c4; --head-hover: #1f363c; --head-line: #3a5157; --head-border: transparent; --hi-on-head: #c9973f;
  --on-dark: #ffffff; --on-accent: #ffffff; --accent-tint: #f8eef2; --link: #5c1a33;
  --table-fill: #efe8db; --table-line: #cfc5b3; --table-label: #8a7d66;
  --seat-free: #ffffff; --seat-free-line: #14262b; --seat-hover: #f1e2c2; --seat-sel: #c9973f; --seat-sel-line: #14262b;
  --seat-sold: #7d878b; --seat-sold-line: #5d686d; --seat-res: #d9a3b8; --seat-res-line: #7a2547; --seat-held: #d6dadb; --seat-held-line: #9aa3a6; --disabled: #b9aab0; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--sans); }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { font-size: .92em; letter-spacing: .04em; }

.bar { background: var(--head-bg); color: var(--head-fg); border-bottom: 1px solid var(--head-border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 8px 16px; position: sticky; top: 0; z-index: 5; }
.brand { color: var(--head-fg); text-decoration: none; font: 600 1.15rem/1 Georgia, serif; white-space: nowrap; }
.brand span { font: 500 .8rem var(--sans); color: var(--head-muted); margin-left: 4px; }
.bar nav { display: flex; flex-wrap: wrap; gap: 2px; }
.bar nav a { color: var(--head-fg); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); }
.bar nav a:hover, .bar nav a[aria-current] { background: var(--head-hover); color: var(--head-fg); }
.bar nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--hi-on-head); }
.badge { background: var(--brass); color: var(--ink); border-radius: 999px; padding: 0 6px; font-size: .78rem; font-weight: 700; }
.find { flex: 1; min-width: 200px; max-width: 340px; }
.find input { width: 100%; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--head-line); background: var(--head-hover); color: var(--head-fg); font: inherit; }
.find input::placeholder { color: var(--head-muted); }
.who { font-size: .85rem; margin-left: auto; }
.who a { color: var(--head-fg); }
.main { padding: 20px 16px 60px; max-width: 1280px; margin: 0 auto; }
@media (min-width: 900px) { .main { padding: 24px 28px 60px; } }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 16px; }
.page-head p { margin: 0; }
.ref { font: 600 1rem var(--sans); color: var(--muted); letter-spacing: .06em; margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.cols { display: grid; gap: 16px; }
@media (min-width: 1000px) { .cols { grid-template-columns: 1.6fr 1fr; align-items: start; } .cols .card { margin-bottom: 0; } .cols { margin-bottom: 16px; } }
.narrow { max-width: 460px; }
.attention { border-left: 4px solid var(--brass); }
ul.plain { margin: 0; padding-left: 1.1em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem/1 var(--sans); padding: 10px 14px; min-height: 40px;
  border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #b8b1a5; }
.btn-primary { background: var(--plum); border-color: var(--plum); color: var(--on-accent); }
.btn-primary:hover { background: var(--plum-2); }
.btn-primary:disabled { background: var(--disabled); border-color: var(--disabled); cursor: not-allowed; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.btn-quiet { border-color: transparent; color: var(--muted); }
.btn-sm { padding: 6px 10px; min-height: 32px; font-size: .88rem; }
.btn-block { width: 100%; }
form.inline { display: inline; }

.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-muted { background: #eceae5; color: var(--muted); }

.flash { padding: 10px 14px; border-radius: var(--radius); background: var(--ok-bg); border-left: 4px solid var(--ok); margin: 0 0 14px; }
.flash-error { background: var(--bad-bg); border-left-color: var(--bad); }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap { border: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #faf9f7; }
.data td { padding: 10px 12px; border-bottom: 1px solid #eeebe5; vertical-align: middle; }
.data tfoot td { border-top: 2px solid var(--line); border-bottom: 0; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.data tr.today td { background: #fdf7e9; }
.data tr.void td { color: var(--muted); text-decoration: line-through; }
.data tr.void td:last-child, .data tr.void td:nth-last-child(2) { text-decoration: none; }
.data tr.past td, .data tr.done td { color: var(--muted); }
.data td.actions { justify-content: flex-end; }
.data.edit input:not([type=checkbox]), .data.edit select { width: 100%; min-width: 120px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.data .w-money { min-width: 80px !important; max-width: 110px; } .data .w-num { min-width: 50px !important; max-width: 70px; }
.data .new-row td { background: #faf9f7; }
.meter { height: 4px; background: #eceae5; border-radius: 2px; margin-top: 4px; min-width: 60px; }
.meter span { display: block; height: 100%; background: var(--plum); border-radius: 2px; }

label { display: block; }
.grid-form { display: grid; gap: 14px 20px; }
@media (min-width: 760px) { .grid-form { grid-template-columns: 1fr 1fr; } .grid-form .full { grid-column: 1 / -1; } }
.grid-form label, .stack label, .booker-side label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.stack { display: grid; gap: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea { font: inherit; }
.grid-form input:not([type=checkbox]):not([type=radio]), .grid-form select, .grid-form textarea,
.stack input, .booker-side input:not([type=checkbox]):not([type=radio]), .booker-side textarea, .row-form input, .row-form select {
  padding: 9px 10px; border: 1px solid #c9c2b6; border-radius: var(--radius); background: #fff; width: 100%; }
.check, label.check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 20px; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.row-form input, .row-form select { width: auto; min-width: 160px; }
.row-form label { font-size: .85rem; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.inline-label { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 16px 8px 0; font-weight: 400 !important; }
.image-field { display: flex; gap: 16px; align-items: flex-start; }
.image-field img { width: 90px; aspect-ratio: 4/5; object-fit: cover; border-radius: 45px 45px 0 0; }
.image-field > div { flex: 1; display: grid; gap: 12px; }
details.danger { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.danger summary { cursor: pointer; color: var(--bad); font-weight: 600; }
details.danger form { display: grid; gap: 12px; margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: .92rem; margin: 4px 0; }
details.more[open] { display: grid; gap: 10px; }
.msg.handled { opacity: .6; }

/* Sell screen */
.booker { display: grid; gap: 20px; }
@media (min-width: 1000px) { .booker { grid-template-columns: 1fr 360px; align-items: start; } .booker-side { position: sticky; top: 76px; } }
.booker-map { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.booker-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.side-h { margin: 0; }
.booker-side p { margin: 0; }
.seatmap { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; touch-action: manipulation; }
.seatmap .stage { fill: var(--ink); }
.seatmap .stage-label { fill: var(--on-dark); font: 600 11px var(--sans); }
.seatmap .row-label { fill: var(--muted); font: 600 11px var(--sans); }
.seatmap .table { fill: var(--table-fill); stroke: var(--table-line); }
.seatmap .table-label { fill: var(--table-label); font: 600 8px var(--sans); pointer-events: none; }
.seat { stroke-width: 1.5; }
.seat-free { fill: var(--seat-free); stroke: var(--seat-free-line); cursor: pointer; }
.seat-free:hover { fill: var(--seat-hover); }
.seat-selected, .seat-selected:hover { fill: var(--seat-sel); stroke: var(--seat-sel-line); }
.seat-sold { fill: var(--seat-sold); stroke: var(--seat-sold-line); cursor: pointer; }
.seat-comp { fill: #9fb3a8; stroke: #6c8577; cursor: pointer; }
.seat-reserved { fill: var(--seat-res); stroke: var(--seat-res-line); cursor: pointer; }
.seat-held { fill: var(--seat-held); stroke: var(--seat-held-line); stroke-dasharray: 2 2; cursor: pointer; }
.legend { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-block; }
.key-free { background: var(--seat-free); border-color: var(--seat-free-line); } .key-selected { background: var(--seat-sel); border-color: var(--seat-sel-line); } .key-sold { background: var(--seat-sold); border-color: var(--seat-sold-line); }
.key-reserved { background: var(--seat-res); border-color: var(--seat-res-line); } .key-held { background: var(--seat-held); border: 1.5px dashed var(--seat-held-line); }
.map-note { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.gallery-pick { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.gp-h { font-weight: 600; margin: 0; } .gp-sub { margin: 0; font-size: .85rem; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; font-size: 1.4rem; border: 1px solid var(--line); background: #faf9f7; border-radius: var(--radius); cursor: pointer; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.1rem; }
.lines { list-style: none; padding: 0; margin: 0; max-height: 40vh; overflow: auto; }
.lines li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eeebe5; flex-wrap: wrap; font-size: .92rem; }
.lines li > span:first-child { flex: 1; min-width: 8em; }
.lines select { padding: 5px; border: 1px solid var(--line); border-radius: 4px; max-width: 100%; font-size: .88rem; }
.line-x { width: 30px; height: 30px; border: 0; background: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; }
.total-row { display: flex; justify-content: space-between; font-size: 1.2rem; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pay legend { grid-column: 1 / -1; }
.radio { display: flex !important; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 500 !important; font-size: .9rem; }
.radio:has(input:checked) { border-color: var(--plum); background: var(--accent-tint); }

/* Door */
.scan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.scan label { font-weight: 600; margin-bottom: 6px; }
.scan input { font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; min-width: 240px; }
.scan-result { font-size: 1.25rem; font-weight: 600; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 14px; }
.scan-ok { background: var(--ok-bg); color: var(--ok); }
.scan-warn { background: var(--warn-bg); color: var(--warn); }
.scan-bad { background: var(--bad-bg); color: var(--bad); }
.filter-label { margin: 0 0 10px; font-weight: 600; font-size: .9rem; }
.filter-label input { display: block; margin-top: 4px; padding: 9px 10px; border: 1px solid #c9c2b6; border-radius: var(--radius); width: 100%; max-width: 360px; }

/* Sign in / install */
body.auth { display: grid; place-items: center; min-height: 100vh; background: var(--ink); padding: 16px; }
.auth-box { background: #fff; padding: 28px; border-radius: 10px; width: 100%; max-width: 400px; }
.auth-box form { display: grid; gap: 14px; }
.auth-box label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.auth-box input:not([type=checkbox]) { padding: 11px; border: 1px solid #c9c2b6; border-radius: var(--radius); font: inherit; }
.brand-lg { font: 600 1.5rem Georgia, serif; margin: 0 0 18px; }
.brand-lg span { font: 500 .9rem var(--sans); color: var(--link); }

@media print {
  .bar, .no-print, .btn { display: none !important; }
  body { background: #fff; } .main { padding: 0; } .table-wrap { border: 0; }
  .data tr { break-inside: avoid; }
}
.map-scroll { overflow-x: auto; }
@media (max-width: 600px) { .map-scroll .seatmap { width: 560px; max-width: none; } }

/* Uploaded logo */
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-logo img { display: block; max-height: 32px; max-width: 160px; width: auto; }
.auth-logo-band { background: var(--head-bg); margin: -28px -28px 18px; padding: 20px 28px; border-radius: 10px 10px 0 0; }
.auth-logo { display: block; max-height: 64px; max-width: 260px; width: auto; }

/* Look and feel settings */
.look-grid { display: grid; gap: 24px; }
@media (min-width: 1100px) { .look-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; } .look-preview { position: sticky; top: 76px; } }
.look-controls { display: grid; gap: 22px; min-width: 0; }
.look fieldset legend { font-size: 1rem; margin-bottom: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 500 .88rem var(--sans); cursor: pointer; }
.preset:hover { border-color: #b8b1a5; }
.preset[aria-pressed="true"] { border-color: var(--plum); box-shadow: 0 0 0 1px var(--plum); }
.swatches { display: flex; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatches span { width: 18px; height: 18px; }
.colour-grid { display: grid; gap: 14px 20px; }
@media (min-width: 700px) { .colour-grid { grid-template-columns: 1fr 1fr; } }
.colour-field { display: flex; gap: 10px; align-items: flex-start; }
.colour-field input[type=color] { flex: 0 0 48px; width: 48px; height: 48px; padding: 2px; border: 1px solid #c9c2b6; border-radius: var(--radius); background: #fff; cursor: pointer; margin-top: 2px; }
.colour-field label { display: grid; gap: 3px; font-weight: 600; font-size: .92rem; flex: 1; min-width: 0; }
.colour-field .hex { font: 500 .95rem ui-monospace, Menlo, Consolas, monospace; padding: 7px 9px; border: 1px solid #c9c2b6; border-radius: var(--radius); width: 7.5em; text-transform: lowercase; }
.colour-field .hex:invalid { border-color: var(--bad); }
.preview-label { font-weight: 600; margin: 0 0 8px; }
.preview-label .hint { display: block; }
.tp-problems { margin: 10px 0 0; padding: 10px 12px 10px 28px; background: var(--bad-bg); color: var(--bad); border-radius: var(--radius); font-size: .9rem; }

/* The preview mini-site uses the theme's own tokens, set on .tp */
.tp { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
.tp p { margin: 0; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--head-bg); color: var(--head-fg); border-bottom: 1px solid var(--head-border); }
.tp-logo img { display: block; max-height: 32px; max-width: 150px; width: auto; }
.tp-wm { font: 400 1.3rem/1 var(--serif); }
.tp-wm em { color: var(--hi-on-head); }
.tp-nav { display: flex; gap: 10px; font-size: .8rem; }
.tp-nav .on { box-shadow: inset 0 -2px 0 var(--hi-on-head); }
.tp-hero { background: var(--ink); color: var(--on-dark); padding: 20px 16px; }
.tp-tag { font: italic 400 .95rem/1.2 var(--serif); color: var(--hi-on-dark); margin-bottom: 4px !important; }
.tp-h1 { font: 400 1.8rem/1.1 var(--serif); margin-bottom: 12px !important; }
.tp-btn { display: inline-block; background: var(--plum); color: var(--on-accent); padding: 8px 12px; border-radius: 5px; font-weight: 600; font-size: .85rem; }
.tp-body { padding: 16px; }
.tp-cat { color: var(--link); font-weight: 600; font-size: .8rem; }
.tp-h2 { font: 400 1.35rem/1.15 var(--serif); margin: 2px 0 6px !important; }
.tp-h3 { font: 400 1.1rem/1.15 var(--serif); margin-bottom: 4px !important; }
.tp-text { color: var(--text); }
.tp a { color: var(--link); }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tp-seats { width: 110px; height: 60px; }
.tp-table { fill: var(--table-fill); stroke: var(--table-line); }
.tp-tlabel { fill: var(--table-label); font: 600 8px var(--sans); }
.tp-seat { fill: var(--seat-free); stroke: var(--seat-free-line); stroke-width: 1.5; }
.tp-seat.sel { fill: var(--seat-sel); stroke: var(--seat-sel-line); }
.tp-seat.taken { fill: var(--seat-sold); stroke: var(--seat-sold-line); }
.tp-seat.res { fill: var(--seat-res); stroke: var(--seat-res-line); }
.tp-seat.held { fill: var(--seat-held); stroke: var(--seat-held-line); stroke-dasharray: 2 2; }
.tp-band { background: var(--brass-soft); color: var(--on-highlight-soft); padding: 14px 16px; }
.tp-band .tp-text { color: inherit; }
.tp-foot { background: var(--ink); color: var(--on-dark-muted); padding: 12px 16px; font-size: .8rem; }
.tp-foot-link { color: var(--on-dark); text-decoration: underline; }
.tp-hero-logo { display: block; margin-bottom: 12px; }
.tp-hero-logo[hidden] { display: none; }
.tp-hero-logo img { display: block; max-height: 64px; max-width: 100%; width: auto; }
.tp-warnings { margin: 10px 0 0; padding: 10px 12px 10px 28px; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); font-size: .9rem; }
.logo-slots { display: grid; gap: 12px; }
@media (min-width: 700px) { .logo-slots { grid-template-columns: 1fr 1fr; } }
.logo-slot { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.logo-slot label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.logo-slot input[type=file] { font-size: .85rem; max-width: 100%; }
.logo-thumb { display: flex; align-items: center; justify-content: center; height: 96px; border-radius: 4px; }
.logo-thumb img { max-height: 76px; max-width: 90%; width: auto; }
.logo-thumb span { font-size: .85rem; opacity: .7; }
.logo-slot-dark .logo-thumb { background: #14262b; color: #fff; }
.logo-slot-light .logo-thumb { background: #fff; color: var(--text); border: 1px solid var(--line); }
.move-count { font-weight: 600; color: var(--warn); }
.move-count.done { color: var(--ok); }
.move-date { margin-bottom: 12px; }
.bulk-delete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-left: 4px solid var(--bad); }
.bulk-delete p { margin: 0; flex: 1; min-width: 240px; }
.email-help { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.email-help .hint { flex: 1; min-width: 220px; }
.seat-setting { display: grid; gap: 16px; }
@media (min-width: 800px) { .seat-setting { grid-template-columns: 1fr 170px; align-items: start; } }
.seat-input { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 400; }
.seat-sample { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-align: center; }
.seat-sample svg { width: 140px; height: 140px; }
.seat-sample figcaption { font-size: .78rem; color: var(--muted); text-align: left; }
