/* =====================================================================
   minzi design system
   Tokens → base → layout shell → components → screens.
   Everything that repeats lives here once; templates only compose.
   ===================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #fff;
  --fill: #f4f4f5;          /* form fields, subtle surfaces */
  --hover: #f4f4f5;
  --selected: #ececee;
  --line: #ececee;
  --line-strong: #dcdce0;
  --text: #18181b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --accent: #18181b;
  --accent-hover: #3f3f46;
  --on-accent: #fff;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --focus: 0 0 0 2px #fff, 0 0 0 4px #18181b;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 12px 48px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.05);

  --h: 40px;                /* control height */
  --h-sm: 36px;             /* never smaller: minimum click area */
  --sidebar: 232px;
  --panel: 420px;
  --pad: 24px;

  /* One fixed colour per kind. -bg for blocks, -fg for text on -bg */
  --c-cafe: #f59e0b;  --c-cafe-bg: #fef3c7;  --c-cafe-fg: #78350f;
  --c-room: #3b82f6;  --c-room-bg: #dbeafe;  --c-room-fg: #1e3a8a;
  --c-party: #ec4899; --c-party-bg: #fce7f3; --c-party-fg: #831843;
  --c-event: #8b5cf6; --c-event-bg: #ede9fe; --c-event-fg: #4c1d95;
  --c-hold: #64748b;  --c-hold-bg: #f1f5f9;  --c-hold-fg: #334155;
  --c-voucher: #14b8a6;
  --c-google: #a1a1aa;

  --bunt: #d2b4e4;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 "Geist", system-ui, sans-serif;
  font-feature-settings: "ss02", "ss08";   /* round a, round dots */
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link, .prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
a.link:hover, .prose a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.icon { width: 18px; height: 18px; flex: none; stroke-width: 1.75; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack-lg { display: grid; gap: 24px; }
.row-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } /* always side by side, e.g. start | end */
.grid-pair > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; }

/* =====================================================================
   Layout shell: sidebar | main | panel
   Panel pushes main on wide screens, overlaps below 1280px,
   is a full sheet on phones.
   ===================================================================== */
.app { min-height: 100dvh; padding-left: var(--sidebar); transition: padding-right .2s ease; }
.panel-open .app { padding-right: var(--panel); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  display: flex; flex-direction: column; gap: 2px; padding: 14px 12px;
  background: var(--bg); border-right: 1px solid var(--line);
}
.brand-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; font-weight: 600; letter-spacing: -.01em; min-width: 0; }
.brand-row .nav-toggle { color: var(--muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: block;
  background: var(--bunt) url("../img/bunt.png") center / 135% no-repeat;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; height: var(--h); padding: 0 10px;
  border: 0; border-radius: var(--r); background: none; width: 100%; text-align: left;
  color: var(--muted); font-weight: 500; cursor: pointer; position: relative;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--selected); color: var(--text); }
.nav-item .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--text); color: #fff; font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar .spacer { flex: 1; }
.nav-item.more { display: none; }
.nav-toggle i { display: contents; font-style: normal; }
/* Booking pages: a menu that opens beside the sidebar */
.nav-links { display: flex; width: 100%; }
.nav-links .split-menu.links-pop { left: calc(100% + 8px); right: auto; bottom: 0; top: auto; }
.links-list .link-row { padding-left: 4px; }
.nav-toggle .when-closed, .nav-collapsed .nav-toggle .when-open { display: none; }
.nav-collapsed .nav-toggle .when-closed { display: contents; }

/* Collapsed menu on desktop: the same icon rail as on the iPad */
@media (min-width: 1101px) {
  .nav-collapsed { --sidebar: 68px; }
  .nav-collapsed .sidebar { align-items: center; padding: 14px 10px; }
  .nav-collapsed .brand-row { justify-content: center; }
  .nav-collapsed .brand { padding: 2px 0; }
  /* Collapsed: hovering the logo shows the expand button in its place */
  .nav-collapsed .brand-row .nav-toggle { position: absolute; left: 50%; top: 2px; transform: translateX(-50%);
    width: 36px; height: 36px; background: var(--hover); color: var(--text); opacity: 0; pointer-events: none; }
  .nav-collapsed .brand-row:hover .nav-toggle, .nav-collapsed .brand-row .nav-toggle:focus-visible { opacity: 1; pointer-events: auto; }
  .nav-collapsed .brand-row:hover .avatar { opacity: 0; }
  .nav-collapsed .nav-links { width: auto; }
  .nav-collapsed .brand span, .nav-collapsed .nav-item span:not(.count) { display: none; }
  .nav-collapsed .nav-item { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .nav-collapsed .nav-item .icon { width: 20px; height: 20px; }
  .nav-collapsed .nav-item .count { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
}
@media (max-width: 1100px) { .nav-toggle { display: none; } }

main.content { padding: 20px var(--pad) 64px; min-width: 0; }
main.content.flush { padding: 0; }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: var(--h); margin-bottom: 20px; }
.page-head h1 { margin-right: auto; }
.page-head .sub { color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
/* Everything in a toolbar is as tall as a compact field (48px) */
.toolbar .seg { padding: 4px; }
.toolbar .seg a, .toolbar .seg button, .toolbar .seg label { height: 40px; }
.toolbar > .btn, .toolbar > .icon-btn { height: 48px; }
.toolbar > .icon-btn { width: 48px; }
.search-f { flex: 1; min-width: 220px; max-width: 380px; }
.f.search-f > .icon { position: absolute; left: 12px; top: 15px; color: var(--faint); }
.f.search-f > input { padding-left: 40px; }
.f.search-f > .label { left: 40px; }
.select-sm { width: 160px; }
.panel-page { max-width: 560px; }
.panel-page .panel-head { padding-left: 0; border: 0; }
.panel-page .panel-body { padding: 0 0 20px; }
.panel-page .panel-foot { padding: 16px 0; }
details.history summary { cursor: pointer; list-style: none; min-height: var(--h-sm); margin: 0; }
details.history summary::-webkit-details-marker { display: none; }

/* ---------- Panel ---------- */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel); z-index: 30;
  background: var(--bg); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .2s ease, visibility 0s .2s;
}
.panel-open .panel { transform: none; visibility: visible; transition: transform .2s ease; }
.panel-head { display: flex; align-items: center; gap: 4px; padding: 12px 12px 12px 20px; min-height: 64px; border-bottom: 1px solid var(--line); }
.panel-head h2 { flex: 1; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { padding: 20px; overflow-y: auto; flex: 1; }
.panel-foot:not(:has(*)) { display: none; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { display: none; }

/* =====================================================================
   Components
   ===================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); border-color: #fecaca; }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { height: var(--h-sm); padding: 0 12px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--h); height: var(--h); border-radius: var(--r); border: 0; background: none;
  color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: var(--h-sm); height: var(--h-sm); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* ---------- Segmented tabs ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: var(--r); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg > * { flex: none; }
.seg a, .seg button {
  height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: none;
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; cursor: pointer;
}
.seg label { height: 32px; padding: 0 14px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) { box-shadow: var(--focus); }
.seg .active, .seg [aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Badges & kind dots ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--fill); color: #52525b;
}
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.tentative { background: var(--bg); color: var(--muted); border: 1px dashed #a1a1aa; }
.badge.confirmed, .badge.paid { background: #dcfce7; color: #166534; }
.badge.cancelled, .badge.expired, .badge.not_required, .badge.on_site { background: var(--fill); color: var(--muted); }
.badge.no_show, .badge.failed { background: #fee2e2; color: #991b1b; }
.badge.authorized { background: #e0f2fe; color: #075985; }
.badge.unpaid, .badge.partly_paid { background: #fff7ed; color: #9a3412; }
.badge.partially_refunded { background: #f3e8ff; color: #6b21a8; }
.badge.refunded { background: #f3e8ff; color: #6b21a8; }
.badge.waitlist { background: #ede9fe; color: #5b21b6; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k, var(--faint)); flex: none; }
.k-cafe  { --k: var(--c-cafe);  --k-bg: var(--c-cafe-bg);  --k-fg: var(--c-cafe-fg); }
.k-room, .k-rental { --k: var(--c-room); --k-bg: var(--c-room-bg); --k-fg: var(--c-room-fg); }
.k-party { --k: var(--c-party); --k-bg: var(--c-party-bg); --k-fg: var(--c-party-fg); }
.k-event, .k-ticket { --k: var(--c-event); --k-bg: var(--c-event-bg); --k-fg: var(--c-event-fg); }
.k-hold  { --k: var(--c-hold);  --k-bg: var(--c-hold-bg);  --k-fg: var(--c-hold-fg); }
.badge.kind { background: var(--k-bg); color: var(--k-fg); }

/* ---------- Floating-label fields ---------- */
.f {
  position: relative; display: block; background: var(--fill); border-radius: var(--r);
  min-height: 56px; cursor: text; transition: box-shadow .12s, background .12s;
}
.f:hover { background: #efeff1; }
.f:focus-within { box-shadow: inset 0 0 0 1.5px var(--text); background: var(--fill); }
.f.invalid { box-shadow: inset 0 0 0 1.5px var(--danger); }
.f > input, .f > select, .f > textarea {
  display: block; width: 100%; border: 0; background: transparent; outline: none; box-shadow: none;
  font: inherit; font-size: 15px; color: var(--text);
  height: 56px; padding: 24px 14px 6px; border-radius: var(--r); appearance: none; -webkit-appearance: none;
}
.f > textarea { height: auto; min-height: 96px; padding-top: 28px; resize: vertical; line-height: 1.45; }
.f > select { padding-right: 40px; cursor: pointer; }
.f > .label {
  position: absolute; left: 14px; right: 14px; top: 18px; pointer-events: none;
  font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform-origin: 0 0; transition: transform .15s ease, color .15s;
}
/* Float when focused, filled, or for inputs that always show a value */
.f > :focus ~ .label,
.f > input:not(:placeholder-shown) ~ .label,
.f > textarea:not(:placeholder-shown) ~ .label,
.f.fixed > .label { transform: translateY(-10px) scale(.8); }
.f > input::placeholder, .f > textarea::placeholder { color: transparent; }
.f.fixed > input::placeholder, .f > :focus::placeholder { color: var(--faint); }
.f .suffix { position: absolute; right: 12px; top: 0; height: 56px; display: flex; align-items: center; color: var(--muted); pointer-events: none; }
.f.has-suffix > input { padding-right: 44px; }
.f > select ~ .suffix .icon { width: 16px; height: 16px; }
.f.compact { min-height: 48px; }
.f.compact > input, .f.compact > select { height: 48px; padding-top: 20px; font-size: 14px; }
.f.compact > .label { top: 14px; font-size: 14px; }
.f.compact .suffix { height: 48px; }
.f-help { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.f-error { font-size: 12px; color: var(--danger); margin: 6px 2px 0; }
.field { margin: 0; }

/* Checkbox and switch: whole row is the click target */
.check {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; min-height: var(--h);
  cursor: pointer; line-height: 1.4;
}
.check input { appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--bg);
  display: grid; place-content: center; transition: background .12s, border-color .12s; }
.check input::after { content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: var(--h); }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer;
  width: 36px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }

/* ---------- Stepper (people) ---------- */
.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: var(--r); height: 56px; padding: 0 6px; gap: 4px; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: var(--r-sm); background: var(--bg); box-shadow: var(--shadow-sm); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: #fafafa; }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper output { min-width: 56px; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--fill); border-radius: var(--r); padding: 6px 6px 6px 14px; min-height: 56px; }
.stepper-field .stepper { height: 44px; background: none; padding: 0; }

/* ---------- Time chips ---------- */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.chip {
  height: 44px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 500; cursor: pointer;
  font-variant-numeric: tabular-nums; position: relative;
}
.chip:hover { border-color: var(--text); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked), .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:has(input:focus-visible) { box-shadow: var(--focus); }
.chip.few::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-cafe); }

/* ---------- Banner ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--fill); line-height: 1.45; }
.banner .icon { margin-top: 1px; }
.banner.info { background: #f5f0fa; }
.banner.warn { background: #fffbeb; color: #78350f; }
.banner p:last-child { margin: 0; }
.banner a { text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }

/* ---------- Lists ---------- */
.list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 52px;
  border-top: 1px solid var(--line); cursor: pointer; transition: background .1s;
}
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #fafafa; }
.list-row.static { cursor: default; }
.list-row.static:hover { background: none; }
.list-row .main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
.list-row .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .time { width: 92px; flex: none; font-variant-numeric: tabular-nums; }
.ev-row .time { width: 136px; white-space: nowrap; }
.list-row .dot { background: var(--k, var(--faint)); }
.list-row .end { display: flex; align-items: center; gap: 8px; color: var(--muted); flex: none; }
.section-label { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 8px 4px; display: flex; align-items: center; gap: 8px; }

/* ---------- Inline editable rows (e.g. opening hours) ---------- */
.edit-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; min-height: 60px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.edit-row:first-child { border-top: 0; }
.edit-row .label-col { width: 112px; font-weight: 500; flex: none; }
.edit-row .ranges { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.range-chip {
  display: inline-flex; align-items: center; height: var(--h-sm); border-radius: var(--r);
  background: var(--fill); font-variant-numeric: tabular-nums; font-weight: 500; overflow: hidden;
}
.range-chip > button.val { height: 100%; border: 0; background: none; padding: 0 4px 0 12px; cursor: pointer; }
.range-chip > .icon-btn { width: 32px; height: var(--h-sm); border-radius: 0; }
.range-chip.editing { background: none; gap: 6px; }
.range-chip.editing input[type=time] {
  height: var(--h-sm); border: 0; border-radius: var(--r-sm); background: var(--fill); padding: 0 8px; font: inherit; font-variant-numeric: tabular-nums;
}
.add-range { height: var(--h-sm); border: 1px dashed var(--line-strong); border-radius: var(--r); background: none; padding: 0 12px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.add-range:hover { border-color: var(--text); color: var(--text); }
.edit-row.closed .ranges { color: var(--faint); }

/* ---------- Customer lookup (combobox) ---------- */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
}
.combo-list[hidden] { display: none; }
.combo-opt { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; min-height: 48px; }
.combo-opt[aria-selected="true"], .combo-opt:hover { background: var(--hover); }
.combo-opt .who { min-width: 0; }
.combo-opt .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt mark { background: #fef08a; color: inherit; border-radius: 2px; }
.combo-opt.create { color: var(--text); font-weight: 500; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; }
.initials { width: 32px; height: 32px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.picked { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; background: var(--fill); border-radius: var(--r); min-height: 56px; }
.picked .who { flex: 1; min-width: 0; line-height: 1.3; }

/* ---------- Date picker ---------- */
.dp { user-select: none; width: 100%; max-width: 360px; }
.dp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.dp-head strong { flex: 1; font-size: 15px; padding-left: 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { height: 32px; display: grid; place-items: center; font-size: 12px; color: var(--muted); border: 0; background: none; border-radius: var(--r-sm); }
.dp[data-mode="multi"] .dp-wd { cursor: pointer; }
.dp[data-mode="multi"] .dp-wd:hover { background: var(--hover); color: var(--text); }
.dp-day {
  aspect-ratio: 1; min-height: 40px; border: 0; background: none; border-radius: var(--r); cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 500; position: relative;
}
.dp-day:hover { background: var(--hover); }
.dp-day.out { visibility: hidden; }
.dp-day.today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.dp-day.sel { background: var(--accent); color: #fff; }
.dp-day.sel.join-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.dp-day.sel.join-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.dp-day[disabled] { color: #d4d4d8; cursor: default; background: none; font-weight: 400; }
.dp-day.marked:not(.sel) { background: var(--fill); }
.dp-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: var(--h-sm); color: var(--muted); }

/* ---------- Card / section ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--bg); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.card-head h2 { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty > .icon { width: 28px; height: 28px; color: var(--faint); margin-bottom: 8px; }
.empty > .btn { margin-top: 16px; }
dl.facts { margin: 0; display: grid; grid-template-columns: 104px 1fr; gap: 10px 12px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Dialog & toast ---------- */
dialog.confirm {
  border: 0; border-radius: 16px; padding: 24px; width: min(400px, calc(100vw - 32px));
  box-shadow: var(--shadow); color: var(--text);
}
dialog.confirm::backdrop { background: rgba(24,24,27,.35); }
dialog.confirm h2 { margin-bottom: 6px; }
dialog.confirm .check { margin-top: 8px; }
dialog.confirm .f { margin-top: 12px; }
dialog.confirm .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 99px; box-shadow: var(--shadow); animation: toast 4.5s forwards; }
.toast.warning { background: #b45309; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 6%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* ---------- Settings layout: sub-menu + page ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.subnav { position: sticky; top: 20px; display: grid; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: 10px; height: var(--h); padding: 0 12px; border-radius: var(--r); color: var(--muted); font-weight: 500; }
.subnav a:hover { background: var(--hover); color: var(--text); }
.subnav a.active { background: var(--selected); color: var(--text); }
.subnav a svg { width: 18px; height: 18px; flex: none; }
.subnav a.active svg { color: var(--text); }
.settings-page { max-width: 760px; }
.settings-page > p.lead { color: var(--muted); margin: -12px 0 24px; }

/* =====================================================================
   Calendar home
   ===================================================================== */
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.cal > * { min-height: 0; }
.cal-main { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); container: calmain / inline-size; }
/* Header stays one row: tighten it when the panel or day column leaves little room, wrap only on small tablets */
@container calmain (max-width: 900px) {
  .cal-bar { gap: 6px; padding-inline: 16px; }
  .cal-bar .seg a { padding: 0 9px; }
  .cal-bar .cal-title { width: 196px; }
}
@container calmain (max-width: 740px) { .cal-bar { flex-wrap: wrap; } }
.cal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.cal-bar > * { flex: none; }
.cal-bar > .spacer { flex: 1 1 0; min-width: 0; }
.cal-bar h1 { font-size: 18px; margin: 0 8px; white-space: nowrap; }
.cal-bar .spacer { flex: 1; }
.cal-bar .nav { gap: 2px; }
.cal-scroll { flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; }
.cal-hint { margin: 0; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }

/* Head: one column per day, two lanes in each */
.cal-head, .cal-grid { display: grid; grid-template-columns: 56px repeat(var(--days, 1), minmax(0, 1fr)); }
.view-week .cal-head, .view-week .cal-grid { --days: 7; min-width: 880px; }
.cal-head { position: sticky; top: 0; z-index: 6; background: var(--bg); border-bottom: 1px solid var(--line); }
.col-head { border-left: 1px solid var(--line); min-width: 0; }
.col-head .date { display: flex; align-items: baseline; gap: 6px; padding: 8px 10px 2px; color: var(--muted); font-size: 12px; }
.col-head .date b { font-size: 16px; color: var(--text); font-weight: 600; }
.col-head .date:hover b { text-decoration: underline; }
.col-head.today .date b { background: var(--text); color: #fff; border-radius: 99px; padding: 0 7px; }
.lanes-head, .day-cell { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.lane-title { padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; flex-wrap: wrap; row-gap: 0; }
.lane-title + .lane-title { border-left: 1px dashed var(--line); }
.lane-title .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-title .sub { font-weight: 400; color: var(--muted); font-size: 12px; white-space: nowrap; }
.view-week .lane-title { padding: 2px 8px 8px; font-size: 11px; font-weight: 500; color: var(--muted); gap: 4px; }

.cal-grid { position: relative; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.day-cell { position: relative; border-left: 1px solid var(--line); }
.day-cell.today { background: #fcfcfd; }
.lane { position: relative; min-width: 0; touch-action: pan-x pan-y; cursor: cell;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#f6f6f7 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.lane + .lane { border-left: 1px dashed var(--line); }
.lane .closed { position: absolute; left: 0; right: 0; pointer-events: none; background: repeating-linear-gradient(-45deg, rgba(250,250,250,.8) 0 6px, rgba(240,240,242,.8) 6px 12px); }
.span-layer { position: absolute; inset: 0; pointer-events: none; }
.span-layer .ev { pointer-events: auto; }

.ev {
  position: absolute; border-radius: 8px; padding: 3px 7px; overflow: hidden; cursor: pointer; z-index: 1;
  background: var(--k-bg); color: var(--k-fg); border-left: 3px solid var(--k);
  font-size: 12px; line-height: 1.3; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 1px var(--bg); transition: box-shadow .1s;
}
.ev:hover { box-shadow: 0 0 0 1px var(--bg), 0 4px 16px rgba(0,0,0,.12); z-index: 3; }
.ev:focus-visible { outline: none; box-shadow: var(--focus); z-index: 3; }
.ev.active { box-shadow: 0 0 0 2px var(--text); z-index: 3; }
.ev[data-drag] { cursor: grab; }
.ev strong { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev strong .n { font-weight: 400; }
.ev .rep { margin-right: 3px; font-weight: 400; }
.ev .t { opacity: .8; font-variant-numeric: tabular-nums; white-space: nowrap; display: block; }
.ev.short { padding-top: 1px; padding-bottom: 1px; }
.ev.short .t { display: none; }
.ev.tentative { background: var(--bg) !important; border: 1.5px dashed var(--k, var(--faint)); border-left-width: 3px; border-left-style: solid; }
.m-ev.tentative .l::after { content: " · tentative"; color: var(--muted); }
.ev.pending { background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255,255,255,.55) 6px 12px); }
.ev.no_show { opacity: .5; text-decoration: line-through; }
.ev.span { z-index: 2; }
.ev .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev .rs::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: currentColor; opacity: 0; transition: opacity .1s; }
.ev:hover .rs::after { opacity: .35; }
.view-week .ev { font-size: 11px; padding: 2px 5px; border-left-width: 2px; }
/* while dragging */
.ev.dragging { opacity: .35; }
.ev.ghost { z-index: 20; pointer-events: none; opacity: .95; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: grabbing; }
.sel-ghost { position: absolute; left: 3px; right: 3px; z-index: 19; pointer-events: none; border-radius: 8px;
  background: rgba(24,24,27,.08); border: 1.5px dashed var(--text); font-size: 12px; font-weight: 500; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.cal.is-dragging, .cal.is-dragging * { cursor: grabbing !important; }
.cal.is-resizing, .cal.is-resizing * { cursor: ns-resize !important; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* Month */
.month { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.month-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.month-head div { padding: 8px 10px; font-size: 12px; color: var(--muted); font-weight: 500; }
.month-grid { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.m-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 6px 6px; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: cell; }
.m-day:nth-child(7n) { border-right: 0; }
.m-day.out { background: #fafafa; }
.m-day.out .num { color: var(--faint); }
.m-day.closed { background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(240,240,242,.7) 6px 12px); }
.m-day .num { align-self: flex-start; min-width: 26px; height: 26px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 13px; padding: 0 6px; }
.m-day .num:hover { background: var(--hover); }
.m-day.today .num { background: var(--text); color: #fff; }
.m-ev { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 4px; border-radius: 6px; font-size: 12px; text-align: left; cursor: pointer; min-width: 0; color: var(--text); }
.m-ev:hover { background: var(--k-bg); }
.m-ev .dot { background: var(--k); }
.m-ev .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.m-ev .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-ev.pending .l::after { content: " · pending"; color: #92400e; }
.m-ev.no_show { opacity: .5; }
.m-day .more { font-size: 12px; color: var(--muted); padding: 0 4px; }
.m-day .more:hover { color: var(--text); }

/* With details open, the panel takes the day column's place */
.panel-open .cal { grid-template-columns: minmax(0, 1fr) 0; }
.panel-open .cal .day-col { visibility: hidden; }
.phone-only { display: none; }
button.link { border: 0; background: none; padding: 0; color: var(--text); text-decoration: underline; cursor: pointer; font: inherit; }
.approval .why { color: var(--muted); }
.split.down .split-menu { top: calc(100% + 6px); bottom: auto; left: 0; right: auto; }
.toast .toast-action { margin-left: 12px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 4px; }

.day-col { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.day-col .scroll { overflow-y: auto; flex: 1; padding: 16px; }
.day-col .head { padding: 16px 16px 0; }
.approval { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; transition: border-color .1s; }
.approval:hover { border-color: var(--line-strong); }
.approval + .approval { margin-top: 8px; }
.approval .top { display: flex; align-items: center; gap: 8px; }
.approval .top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.approval .actions { display: flex; gap: 6px; margin-top: 4px; }
.hold-timer { font-size: 12px; color: #92400e; display: inline-flex; align-items: center; gap: 4px; }
.hold-timer .icon { width: 14px; height: 14px; }
.hold-timer.urgent { color: var(--danger); font-weight: 500; }
.agenda-item { display: flex; gap: 12px; padding: 10px 8px; border-radius: var(--r); cursor: pointer; align-items: flex-start; }
.agenda-item:hover { background: var(--hover); }
.agenda-item.active { background: var(--selected); }
.agenda-item .time { width: 44px; flex: none; font-variant-numeric: tabular-nums; font-weight: 500; }
.agenda-item .bar { width: 3px; height: auto; align-self: stretch; border-radius: 2px; background: var(--k); flex: none; }
.agenda-item .body { flex: 1; min-width: 0; }
.agenda-item .body div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item .where { font-size: 12px; color: var(--muted); }
.agenda-only { display: none; }
.day-toggle { display: none; }

/* =====================================================================
   Public checkout
   ===================================================================== */
.public { background: var(--bg); font-size: 15px; }
.public-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; max-width: 1040px; margin: 0 auto; }
.public-head .avatar { width: 44px; height: 44px; border-radius: 12px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; max-width: 1040px; margin: 0 auto; padding: 8px 24px 64px; align-items: start; }
.checkout h1 { font-size: 28px; margin-bottom: 4px; }
.step { border-top: 1px solid var(--line); padding: 20px 0; }
.step:first-of-type { border-top: 0; }
.step-head { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--fill); color: var(--muted); flex: none; }
.step.open .step-num { background: var(--accent); color: #fff; }
.step.done .step-num { background: #dcfce7; color: transparent; position: relative; }
.step.done .step-num::after { content: ""; position: absolute; width: 10px; height: 5px; border: solid #166534; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.step-head h2 { font-size: 18px; flex: 1; }
.step-sum { color: var(--muted); font-size: 14px; margin: 2px 0 0 42px; }
.step-body { display: none; padding: 20px 0 0 42px; }
.step.open .step-body { display: grid; gap: 20px; }
.step:not(.open):not(.done) .step-head h2 { color: var(--faint); }
.step.open .step-sum, .step:not(.done) .step-sum, .step.open .step-edit, .step:not(.done) .step-edit { display: none; }
.summary { position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.summary h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.summary .line { display: flex; gap: 12px; padding: 6px 0; align-items: flex-start; }
.summary .line .icon { color: var(--muted); margin-top: 2px; }
.summary .total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; font-weight: 600; font-size: 16px; }
.mobile-bar { display: none; }
.when-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 32px; align-items: start; }
.done-screen { max-width: 520px; margin: 40px auto; text-align: center; }
.done-screen .ok { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: #166534; display: grid; place-items: center; margin: 0 auto 16px; }
.done-screen .ok .icon { width: 30px; height: 30px; }

/* =====================================================================
   Responsive
   ===================================================================== */

/* Below 1280: panel overlaps instead of pushing */
@media (max-width: 1279px) {
  .panel-open .app { padding-right: 0; }
  .panel { box-shadow: var(--shadow); border-left: 0; }
  .panel-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(24,24,27,.12); }
}

/* iPad: icon sidebar, day column becomes a toggle */
@media (max-width: 1100px) {
  :root { --sidebar: 68px; }
  .sidebar { align-items: center; padding: 14px 10px; }
  .brand-row { justify-content: center; }
  .brand { padding: 2px 0; }
  .nav-links { width: auto; }
  .brand span, .nav-item span:not(.count) { display: none; }
  .nav-item { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .nav-item .icon { width: 20px; height: 20px; }
  .nav-item .count { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
  .cal { grid-template-columns: minmax(0, 1fr); }
  .day-col { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; z-index: 28; background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .day-open .day-col { transform: none; visibility: visible; transition: transform .2s; }
  .day-toggle { display: inline-flex; }
  .checkout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .settings { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
}

/* Phone: bottom tabs, agenda instead of grid, full-sheet panel */
@media (max-width: 700px) {
  :root { --h: 44px; --h-sm: 44px; --pad: 16px; --panel: 100vw; }
  body { font-size: 16px; }
  .app { padding-left: 0; padding-bottom: 72px; }
  .sidebar {
    inset: auto 0 0 0; width: auto; height: auto; flex-direction: row; justify-content: space-around; align-items: stretch; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .brand-row, .sidebar .spacer, .sidebar .logout, .nav-item.secondary, .sidebar .nav-links { display: none; }
  .nav-item.more { display: flex; }
  .hide-phone { display: none !important; }
  .day-col .head { display: none; }
  .nav-item { flex-direction: column; gap: 2px; width: auto; height: 52px; flex: 1; font-size: 11px; justify-content: center; border-radius: var(--r); }
  .nav-item span:not(.count) { display: block; }
  .nav-item.active { background: none; }
  .nav-item .icon { width: 22px; height: 22px; }
  .nav-item .count { top: 2px; left: 54%; right: auto; }
  h1 { font-size: 26px; }
  .panel { inset: 0; width: 100vw; transform: translateY(100%); border: 0; z-index: 50; }
  .panel-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  .scrim { display: none !important; }
  .list-row { min-height: 64px; padding: 10px 16px; }
  .list-row .main { flex-direction: column; align-items: flex-start; gap: 0; }
  .list-row .time { width: auto; }
  .list-row .main > * { max-width: 100%; }
  .toolbar .select-sm { width: auto; flex: 1; }
  .edit-row .label-col { width: 100%; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .subnav { position: static; display: flex; overflow-x: auto; gap: 4px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 4px; }
  .subnav a { white-space: nowrap; background: var(--fill); }
  .toasts { bottom: 92px; }

  /* calendar → agenda */
  .cal { height: auto; display: block; overflow: visible; }
  .cal-main { border: 0; }
  .cal-bar { flex-wrap: wrap; padding: 12px 16px; position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); z-index: 10; }
  .cal-bar h1 { font-size: 20px; margin: 0; }
  .cal-bar .cal-date { flex: 0 0 calc(100% - 104px); order: -3; margin-left: -10px; min-width: 0; }
  .cal-bar .cal-title { max-width: 100%; width: auto; justify-content: flex-start; }
  .cal-bar .cal-title h1 { overflow: hidden; text-overflow: ellipsis; }
  .cal-new { order: -1; width: var(--h); padding: 0; justify-content: center; }
  .cal-new > span { display: none; }
  .cal-bar .spacer { display: none; }
  .cal-bar [data-grid-toggle] { margin-left: auto; }
  .cal-bar .seg, .cal-bar .day-toggle, .cal-bar .hide-phone { display: none; }
  .cal-scroll, .cal-hint { display: none; }
  .phone-only { display: inline-flex; }
  .grid-on .cal-scroll { display: block; max-height: none; overflow: visible; }
  .grid-on .day-col { display: none; }
  .grid-on .cal-head { position: static; }
  .day-col { position: static; width: auto; transform: none; visibility: visible; box-shadow: none; border: 0; }
  .day-col .scroll { padding: 16px; overflow: visible; }
  .agenda-only { display: block; }
  .agenda-item { padding: 12px 8px; }

  /* checkout */
  .public-head { padding: 16px; }
  .checkout { grid-template-columns: 1fr; padding: 0 16px 120px; }
  .checkout h1 { font-size: 24px; }
  .step-body { padding-left: 0; }
  .when-grid { grid-template-columns: 1fr; gap: 20px; }
  .dp { max-width: none; }
  .step-next { display: none; }
  .step-sum { margin-left: 42px; }
  .summary { display: none; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .mobile-bar .btn { flex: 1; }
}

/* Private notes on a booking */
.notes-box .f > textarea { min-height: 72px; }
.pnote { padding: 10px 0; border-top: 1px solid var(--line); }
.pnote:first-of-type { border-top: 0; }
.pnote p { margin: 0 0 2px; white-space: pre-wrap; }
.pnote .meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.email-choice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.email-choice .check { padding: 0; min-height: var(--h); align-items: center; }

/* ---------- Login ---------- */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.login .avatar { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px; }
.login h1 { margin-bottom: 24px; }
.login > p.muted { margin: -12px 0 24px; }
.login-alt { margin-top: 20px; text-align: center; }
.subnav a.later { color: var(--faint); }

/* ---------- Colour picker (settings) ---------- */
.colour-row { border: 0; padding: 0; margin: 0; }
.colour-row legend { padding: 0; margin-bottom: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch-pick { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.swatch-pick input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-pick i { width: 24px; height: 24px; border-radius: 50%; background: var(--dot); }
.swatch-pick:hover { background: var(--hover); }
.swatch-pick:has(input:checked) { box-shadow: 0 0 0 2px var(--text) inset; }
.swatch-pick:has(input:focus-visible) { box-shadow: var(--focus); }
@media (pointer: coarse) { .swatch-pick { width: 44px; height: 44px; } }

/* ---------- Split button: main action + menu with the alternative ---------- */
.split { position: relative; display: inline-flex; }
.split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.split > .split-toggle { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 10px; margin-left: 1px; }
.split > .split-toggle svg { width: 16px; height: 16px; }
.split-menu {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; min-width: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 4px; display: flex; flex-direction: column;
}
.split-menu[hidden] { display: none; }
.split-menu button, .split-menu .menu-link {
  height: var(--h); padding: 0 12px; border: 0; background: none; border-radius: var(--r-sm); text-align: left;
  font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.split-menu button:hover, .split-menu button:focus-visible, .split-menu .menu-link:hover { background: var(--hover); outline: none; }

/* Panel foot with actions on the right, primary last */
.panel-foot .foot-end { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.panel-foot .foot-start { display: flex; gap: 8px; flex-wrap: wrap; }

/* Notes: edit in place */
.pnote .note-actions { display: flex; gap: 2px; }
.pnote form.note-edit { display: grid; gap: 8px; }
.pnote form.note-edit .row-flex { justify-content: flex-end; }

/* Read-only customer on the edit form */
.picked.static { cursor: default; }

/* Icon picker (settings) and kind icons */
.icon-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-pick { position: relative; width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick .icon { width: 18px; height: 18px; }
.icon-pick:hover { background: var(--hover); color: var(--text); }
.icon-pick:has(input:checked) { background: var(--text); color: #fff; }
.icon-pick:has(input:focus-visible) { box-shadow: var(--focus); }
@media (pointer: coarse) { .icon-pick { width: 44px; height: 44px; } }
.k-icon { width: 14px; height: 14px; flex: none; color: var(--k); }
.badge.kind .k-icon { color: currentColor; width: 13px; height: 13px; }
.ev .k-icon { width: 12px; height: 12px; color: var(--k); vertical-align: -2px; margin-right: 4px; }
.lane-title .k-icon { width: 16px; height: 16px; }
.view-week .lane-title .k-icon { width: 12px; height: 12px; }
.m-ev .k-icon { width: 12px; height: 12px; }
.agenda-item .k-icon, .list-row .k-icon { width: 15px; height: 15px; margin-top: 2px; }
.seg label .k-icon { width: 14px; height: 14px; }
.notes-box .note-add { margin-top: 12px; }
.notes-box .pnote + .note-add { margin-top: 12px; }

/* Badge that opens a menu (status, payment in the panel) */
.dropdown { position: relative; display: inline-flex; }
.dropdown .split-menu { top: calc(100% + 6px); bottom: auto; left: 0; right: auto; min-width: 200px; }
button.badge { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; gap: 4px; }
button.badge .icon { width: 13px; height: 13px; opacity: .6; }
button.badge:hover { filter: brightness(.96); }
button.badge:hover .icon { opacity: 1; }
button.badge:focus-visible { outline: none; box-shadow: var(--focus); }
@media (pointer: coarse) { button.badge { min-height: 32px; padding: 0 10px; } }
.split-menu .menu-label { font-size: 11px; color: var(--muted); padding: 6px 12px 4px; font-weight: 500; }
.split-menu .badge { pointer-events: none; }

/* Placeholder for the booking you're creating (panel open, not saved yet) */
.sel-ghost.draft { background: var(--k-bg); color: var(--k-fg); border: 1.5px dashed var(--k); border-left-width: 3px; z-index: 5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sel-ghost.draft.span { left: 3px; right: 3px; }
button.badge { position: relative; }
button.badge::after { content: ""; position: absolute; inset: -6px -3px; } /* bigger click area */
#warnings:empty { display: none; }
.edit-row .copy-to { margin-left: auto; }
.range-chip > button.val:hover { text-decoration: underline; }

/* Café capacity strip: booked seats against capacity, every 15 minutes */
.cap-strip { position: absolute; left: 2px; top: 0; bottom: 0; width: 5px; z-index: 2; pointer-events: none; }
.cap-strip i { position: absolute; left: 0; width: 5px; background: #e4e4e7; pointer-events: auto; }
.cap-strip i:hover { width: 10px; z-index: 3; }
.cap-strip .low, .cap-legend .low { background: #86efac; }
.cap-strip .mid, .cap-legend .mid { background: #fbbf24; }
.cap-strip .full, .cap-legend .full { background: #ef4444; }
.cap-strip .taken { background: repeating-linear-gradient(0deg, #a1a1aa 0 3px, #e4e4e7 3px 6px); }
.cap-legend { margin-left: 16px; white-space: nowrap; }
.cap-legend i { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin: 0 3px 0 8px; border-radius: 2px; background: #e4e4e7; }
.view-week .cap-strip { width: 3px; left: 1px; }
.view-week .cap-strip i { width: 3px; }
.add-cal { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }

/* hours list: let the Copy to… menu extend past the card */
#hours-list { overflow: visible; }
/* the confirmation/manage page always shows its details card, also on the phone */
.done-screen .summary { display: block; }

/* guest pay page: summary left, Stripe's form right; stacked on the phone */
.pay-page { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 32px; max-width: 1040px; margin: 16px auto 48px; padding: 0 16px; align-items: start; }
.pay-page h1 { font-size: 24px; margin: 12px 0 16px; }
.pay-main { min-height: 420px; }
@media (max-width: 760px) { .pay-page { grid-template-columns: 1fr; gap: 16px; } .pay-main { min-height: 0; } }
.pay-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: -8px 0 24px; text-align: left; }
.pay-page .summary { display: block; }
.banner.success { background: #f0fdf4; color: #166534; }
.toast.error { background: #b91c1c; }

/* ---------- Payments in the booking panel ---------- */
.split-menu .menu-link { text-decoration: none; }
dl.money { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
dl.money dt { color: var(--muted); }
dl.money dd { margin: 0; text-align: right; }
dl.money .open { font-weight: 600; color: var(--text); border-top: 1px solid var(--line); padding-top: 8px; }

/* Payments in the booking panel: header with actions, summary, one row per payment, invoices */
.pay-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pay-head .section-label { margin: 0; flex: none; }
.pay-head-actions { flex: 1; display: flex; gap: 8px; justify-content: flex-end; min-width: 0; }
.pay-summary { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pay-stats { display: flex; gap: 1px; background: var(--line); }
.pay-stats .pay-stat { flex: 1 1 0; min-width: 0; }
.pay-stat { background: var(--bg); padding: 10px 12px; display: grid; gap: 2px; }
.pay-stat span { font-size: 12px; color: var(--muted); }
.pay-stat b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-stat.open b { font-weight: 600; }
.pay-stat.due { background: #fffbeb; }
.pay-stat.due b { color: #92400e; }
.pay-summary .pay-how { margin: 0; padding: 8px 12px; background: var(--fill); border-top: 1px solid var(--line); }
.pay-list { margin-top: 12px; }
.pay-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pay-row:first-child { border-top: 0; padding-top: 4px; }
.pay-row.cancelled, .pay-row.failed { opacity: .55; }
.pay-icon { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--fill); display: grid; place-items: center; flex: none; }
.pay-icon .icon { width: 16px; height: 16px; }
.pay-body { min-width: 0; }
.pay-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-height: 24px; }
.pay-top .badge { flex: none; }
.pay-sub { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 13px; }
.pay-sub .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.pay-sub.refund { color: #6b21a8; }
.pay-body .pay-actions { justify-content: flex-start; margin-top: 10px; }
.pay-body .pay-form { margin-top: 10px; }
.payments-box .doc-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.pay-form { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border-radius: var(--r-lg); background: #fafafa; }
.pay-form[hidden] { display: none; }
/* Tab row used as a choice (payment method, refund method, room use) */
.seg.pay-sources, .seg.choice { display: flex; width: 100%; }
.seg.pay-sources label, .seg.choice label { flex: 1 1 0; justify-content: center; padding: 0 8px; }
.seg.pay-sources label:has(input:checked), .seg.choice label:has(input:checked) { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.choice label:has(input:checked) { background: var(--text); color: #fff; box-shadow: none; }
.seg.room-use label { height: auto; min-height: 36px; padding: 6px 8px; text-align: center; line-height: 1.25; }
@media (max-width: 520px) { .seg.room-use { flex-direction: column; } }
/* Room request: the description's label follows the chosen use (public is the default) */
.about-label .for-private, .about-label .for-promo { display: none; }
.steps:has([name=room_use][value=private]:checked) .about-label .for-public,
.steps:has([name=room_use][value=promo]:checked) .about-label .for-public { display: none; }
.steps:has([name=room_use][value=private]:checked) .about-label .for-private,
.steps:has([name=room_use][value=promo]:checked) .about-label .for-promo { display: inline; }

/* ---------- Public event pages ---------- */
.ev-hero { margin: 12px 0 8px; }
.ev-hero h1 { font-size: 28px; margin: 16px 0 10px; }
.ev-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 18px; display: block; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); margin-bottom: 12px; }
.ev-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ev-meta .icon { width: 16px; height: 16px; }
.ev-text { line-height: 1.6; margin: 0 0 12px; }
.few-left { display: flex; align-items: center; gap: 6px; color: #b45309; font-weight: 500; margin: 8px 0 0; }
.few-left .icon { width: 16px; height: 16px; }
.ev-list { max-width: 720px; margin: 16px auto 48px; padding: 0 16px; }
.ev-list h1 { font-size: 26px; margin-bottom: 16px; }
.ev-card { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; color: inherit; text-decoration: none; }
.ev-card:hover { border-color: var(--text); }
.ev-card img, .ev-date { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.ev-date { background: var(--fill); display: grid; place-items: center; align-content: center; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.ev-date strong { font-size: 24px; color: var(--text); line-height: 1; }
.ev-card-body { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }

/* ---------- Events in the backend ---------- */
.bar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--c-event, #8b5cf6); border-radius: 3px; max-width: 100%; }
.bar.lg { width: 100%; height: 8px; margin: 8px 0 6px; }
.ev-row .sold { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.ev-row .sold-n { width: 56px; text-align: right; white-space: nowrap; }
.ev-sold { margin-bottom: 16px; }
.ev-sold-num { display: flex; align-items: baseline; gap: 6px; }
.ev-sold-num strong { font-size: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.att-row:first-of-type { border-top: 0; }
.att-check { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--bg); color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; }
.att-check .icon { width: 18px; height: 18px; }
.att-check:hover { border-color: var(--text); color: var(--faint); }
.att-row.in .att-check { background: #16a34a; border-color: #16a34a; color: #fff; }
.att-pos { width: 36px; text-align: center; color: var(--muted); flex: none; }
.att-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; display: grid; gap: 2px; color: inherit; font: inherit; }
.att-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-end { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ev-thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--r-lg); margin-bottom: 8px; display: block; }
.file-input { font: inherit; }
@media (pointer: coarse) { .att-check { width: 44px; height: 44px; } }
.kind-seg .kind-event { height: 32px; padding: 0 14px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; cursor: pointer; border: 0; background: none; font: inherit; }
.kind-seg .kind-event:hover { color: var(--text); }
.kind-seg .kind-event .k-icon { width: 14px; height: 14px; }

/* ---------- Public pages: larger type, 18px body ---------- */
.public { font-size: 18px; line-height: 1.5; }
.public-logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.public-logo strong { font-size: 18px; }
.public-head, .checkout { max-width: 1160px; }
@media (min-width: 1101px) { .checkout { grid-template-columns: minmax(0, 1fr) 380px; } }
.public .small, .public .f-help, .public .f-error, .public .badge { font-size: 15px; }
.public .icon { width: 18px; height: 18px; }
.public .f { min-height: 58px; }
.public .f > input, .public .f > select { height: 58px; padding: 25px 14px 7px; font-size: 17px; }
.public .f > textarea { font-size: 17px; padding: 29px 14px 9px; }
.public .f > .label { left: 14px; top: 18px; font-size: 17px; }
.public .f > :focus ~ .label, .public .f > input:not(:placeholder-shown) ~ .label,
.public .f > textarea:not(:placeholder-shown) ~ .label, .public .f.fixed > .label { transform: translateY(-10px) scale(.76); }
.public .btn { font-size: 16px; }
.public .btn.lg { height: 54px; padding: 0 24px; font-size: 17px; }
.public .btn.sm { font-size: 15px; }
.public .check { gap: 12px; }
.public .check input { width: 22px; height: 22px; margin-top: 2px; }
.public .stepper-field { min-height: 58px; padding-left: 14px; }
.public .stepper output { font-size: 18px; }
.public .checkout h1, .public .ev-hero h1 { font-size: 36px; line-height: 1.15; }
.public .done-screen h1 { font-size: 28px; }
.public .step-head h2 { font-size: 22px; }
.public .step-num { width: 30px; height: 30px; font-size: 15px; }
.public .step-sum { font-size: 16px; margin-left: 44px; }
.public .step-body { padding-left: 44px; }
.public .step.single .step-head { display: none; }
.public .step.single .step-body { padding: 8px 0 0; }
.public .summary h3 { font-size: 15px; }
.public .summary .total { font-size: 18px; }
.public .ev-meta .icon, .public .few-left .icon { width: 18px; height: 18px; }
.public .ev-list { max-width: 820px; }
.public .ev-list h1 { font-size: 32px; }
.public .ev-date strong { font-size: 26px; }
.public .done-screen { max-width: 600px; }
.ev-side { position: sticky; top: 24px; display: grid; gap: 16px; }
.ev-side .summary { position: static; }
.ev-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.ev-photo.phone-only { display: none; }
.public .ev-meta { flex-direction: column; gap: 6px; }
@media (max-width: 700px) {
  .public { font-size: 17px; }
  .public .checkout h1, .public .ev-hero h1 { font-size: 28px; }
  .public .step-head h2 { font-size: 20px; }
  .public .step-body { padding-left: 0; }
  .ev-side { display: none; }
  .ev-photo.phone-only { display: block; margin-bottom: 16px; border-radius: 16px; }
}

/* ---------- Event form: publish switch and photo picker ---------- */
.publish-row { align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--fill); width: 100%; box-sizing: border-box; }
.publish-row input { margin-top: 2px; }
.publish-row > span { display: grid; gap: 2px; }
.publish-row [data-on], .publish-row:has(input:checked) [data-off] { display: none; }
.publish-row:has(input:checked) [data-on] { display: inline; }
.photo-pick { position: relative; }
.photo-pick img { display: none; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: var(--r-lg); }
.photo-pick.has-photo img { display: block; }
.photo-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 21 / 8; min-height: 120px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.photo-drop:hover, .photo-pick.drag .photo-drop { border-color: var(--text); color: var(--text); background: var(--fill); }
.photo-drop .icon { width: 24px; height: 24px; }
.photo-pick.has-photo .photo-drop { display: none; }
.photo-tools { display: none; position: absolute; right: 10px; bottom: 10px; gap: 6px; }
.photo-pick.has-photo .photo-tools { display: flex; }
.photo-tools .btn { background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); }
.photo-pick:focus-within .photo-drop { box-shadow: var(--focus); }

/* ---------- Private-event request: technique cards ---------- */
.offer-list { display: grid; gap: 8px; }
.offer { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.offer:hover { border-color: var(--text); }
.offer:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.offer input { position: absolute; opacity: 0; pointer-events: none; }
.offer img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.offer-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.offer-price { display: grid; justify-items: end; font-weight: 600; white-space: nowrap; }
.offer:focus-within { box-shadow: var(--focus); }
@media (max-width: 700px) { .offer { align-items: flex-start; } .offer-body .small { display: none; } }

/* ---------- Settings: private events and room prices ---------- */
.party-cat { margin-bottom: 28px; }
.party-cat .section-head { margin-bottom: 10px; }
button.list-row { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.toggle-row { padding: 0 12px 0 0; gap: 8px; }
.toggle-row .row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 12px 8px 12px 16px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.list-row.toggle-row:hover { background: #fafafa; }
.toggle-row.off .row-open { opacity: .5; }
.row-switch { min-height: 44px; padding: 0 4px; }
.split.solo > .split-toggle { border-radius: var(--r); margin-left: 0; padding: 0 14px; }
.split.solo .split-menu { left: 0; right: auto; }
.offer-row img, .offer-noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.offer-noimg { display: grid; place-items: center; background: var(--fill); color: var(--faint); }
.tier-row { gap: 24px; }
.tier-part { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.tier-part input {
  width: 96px; height: var(--h-sm); border: 0; border-radius: var(--r-sm); background: var(--fill);
  padding: 0 10px; font: inherit; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 500;
}
.tier-part input:focus { outline: 2px solid var(--text); outline-offset: 0; }
.tier-del { margin-left: auto; }

/* ---------- Start times: empty state next to the calendar (quiet) ---------- */
.times-empty {
  display: grid; justify-items: center; align-content: center; text-align: center; gap: 2px;
  min-height: 240px; padding: 24px; border-radius: var(--r-lg); border: 1px dashed var(--line); color: var(--muted);
}
.times-empty strong { font-weight: 500; color: var(--muted); }
.times-empty-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; margin-bottom: 8px; }
.times-empty-icon .icon { width: 20px; height: 20px; }
.times-empty .ghost-chips { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; margin-top: 16px; }
.times-empty .ghost-chips i { height: 32px; border-radius: var(--r); background: var(--fill); opacity: .7; }
.times-empty .ghost-chips i:nth-child(n+4) { opacity: .35; }
@media (max-width: 700px) {
  .times-empty { min-height: 0; padding: 20px; grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 14px; }
  .times-empty-icon { grid-row: span 2; margin: 0; width: 44px; height: 44px; }
  .times-empty .ghost-chips { display: none; }
}

/* ---------- Vouchers (public) ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.amount-chip {
  position: relative; display: grid; place-items: center; min-height: 72px; padding: 8px; border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); font-weight: 600; font-size: 1.15em; cursor: pointer; text-align: center; transition: border-color .12s, box-shadow .12s;
}
.amount-chip:last-child:not(:first-child) { font-size: 1em; font-weight: 500; }
.amount-chip:hover { border-color: var(--text); }
.amount-chip:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.amount-chip:focus-within { box-shadow: var(--focus); }
.amount-chip input { position: absolute; opacity: 0; pointer-events: none; }
.voucher-card { text-align: left; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; margin: 24px 0; display: grid; gap: 4px; padding-bottom: 16px; }
.voucher-card-top { display: flex; justify-content: space-between; align-items: baseline; padding: 20px; background: #e9dff3; margin-bottom: 12px; }
.voucher-card-top strong { font-size: 1.8em; }
.voucher-card-code, .voucher-card > .small { padding: 0 20px; }
.voucher-card-code { display: grid; gap: 2px; }
.voucher-card-code strong { font-size: 1.2em; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.voucher-apply { display: flex; gap: 8px; align-items: stretch; margin-top: 20px; }
.voucher-apply .f { flex: 1; }
.voucher-apply .btn { height: auto; }
.summary .voucher-line { align-items: center; }
.summary .voucher-line > div { flex: 1; }
.summary .voucher-line form { margin-left: auto; }

/* ---------- Vouchers (backend) ---------- */
.voucher-row .v-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #ede4f5; color: #6b4e8a; flex: none; }
.voucher-row .v-balance { display: inline-flex; align-items: center; gap: 10px; }
.voucher-row .v-amount { width: 120px; text-align: right; white-space: nowrap; }
.voucher-row .v-balance .bar, .v-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; display: inline-block; }
.voucher-row .v-balance .bar i, .v-bar i { display: block; height: 100%; background: #8b6bb0; border-radius: 3px; }
.v-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.v-big { font-size: 32px; font-weight: 600; line-height: 1.1; }
.v-bar { width: 100%; margin: 12px 0 20px; }
.v-uses { display: grid; gap: 2px; }
.v-use { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.v-use:first-child { border-top: 0; }
dl.facts dt.code-dt { align-self: center; }
dl.facts dd.code-dd { display: flex; align-items: center; gap: 4px; margin: -6px 0; }
.v-code { font-size: 14px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.amount-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.amount-tags:empty { display: none; }
.amount-tag { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px 0 14px; border-radius: 999px; background: var(--fill); font-weight: 500; }
.amount-tag .icon-btn { width: 32px; height: 32px; min-width: 32px; min-height: 32px; border-radius: 50%; color: var(--muted); }
.amount-tag .icon-btn:hover { color: var(--text); background: var(--hover); }
.amount-add { display: flex; gap: 8px; align-items: center; max-width: 360px; }
.amount-add .f { flex: 1; }
.amount-chips { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.pay-form .voucher-code-f { display: none; }
.pay-form:has(input[name=source][value=voucher]:checked) .voucher-code-f { display: block; }
.pay-form .refund-voucher-email { display: none; }
.pay-form .make-invoice, .pay-form .no-invoice, .pay-form .no-invoice-voucher { display: none; }
.pay-form:has(input[name=source][value=transfer]:checked) .make-invoice { display: inline-flex; }
.pay-form:has(input[name=source][value=cash]:checked) .no-invoice,
.pay-form:has(input[name=source][value=card]:checked) .no-invoice,
.pay-form:has(input[name=source][value=voucher]:checked) .no-invoice-voucher { display: flex; }
.pay-form .banner { padding: 10px 12px; font-size: 13px; }
.pay-form:has(input[name=method][value=voucher]:checked) .refund-voucher-email { display: flex; }
.tpl-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); flex-wrap: wrap; }
.tpl-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; color: var(--muted); }
.tpl-row label.btn input[type=file] { display: none; }

.public-notice { margin-bottom: 20px; }

/* Emails & texts */
.text-list .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.text-list .main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.text-list .title { white-space: nowrap; }
.text-editor .f textarea { min-height: 200px; resize: vertical; line-height: 1.5; }
.te-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.te-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.te-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.te-chip .icon { width: 14px; height: 14px; color: var(--muted); }
.te-chip:hover { border-color: var(--text); }
.text-preview { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; line-height: 1.55; }
.text-preview p { margin: 0 0 12px; }
.text-preview p:last-child { margin-bottom: 0; }
.text-preview a { color: var(--text); text-decoration: underline; overflow-wrap: anywhere; }
.tp-subject { font-weight: 600; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tp-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (pointer: coarse) { .te-chip { height: 40px; } }

/* Integrations */
.int-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; display: grid; gap: 14px; }
.int-head { display: flex; align-items: center; gap: 12px; }
.int-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; flex: none; }
.int-icon .icon { width: 20px; height: 20px; }
.int-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.int-row .f { min-width: 240px; }
.int-row > p { flex: 1 1 260px; }
.int-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.int-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--fill); border-radius: var(--r); }
.int-fail { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cal-pick .check-row { cursor: pointer; gap: 12px; }
.cal-pick .check-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.gdot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* Google entries in the calendar: own column after each day, outlined in the calendar's colour */
.with-google .cal-head, .with-google .cal-grid { grid-template-columns: 56px repeat(var(--days, 1), minmax(0, var(--dayw, 1fr)) minmax(0, var(--gw, .32fr))); }
/* Day view: café, Workshopraum and Google equally wide */
.view-day { --dayw: 2fr; --gw: 1fr; }
.view-day.hide-cafe, .view-day.hide-room { --dayw: 1fr; }
.g-head { border-left: 1px dashed var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding-bottom: 4px; }
.view-week .g-head .lane-title .name { display: none; }
.g-cell { position: relative; border-left: 1px dashed var(--line); min-width: 0; background-color: #fcfcfd;
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.g-cell.today { background-color: #f8f8fa; }
.gmark { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); font-size: 10px; font-weight: 700; color: var(--muted); flex: none; background: var(--bg); }
.ev.gev { background: var(--bg); color: var(--text); border: 1.5px solid var(--g); border-left-width: 3px; cursor: pointer; text-decoration: none; }
.ev.gev strong { font-weight: 500; }
.g-allday { display: block; margin: 0 4px; padding: 1px 6px; border-radius: 6px; border: 1.5px solid var(--g); font-size: 11px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-ev.g { text-decoration: none; }
.m-ev.g:hover { background: var(--hover); }
.m-ev .gdot, .agenda-item.g .gdot { width: 8px; height: 8px; border: 1.5px solid var(--g); background: transparent; }
.agenda-item.g { color: inherit; text-decoration: none; }
.agenda-item.g .bar { background: var(--g); opacity: .6; }
.agenda-item.g .time { font-size: 13px; }
.g-toggle .gmark { width: 20px; height: 20px; font-size: 11px; }
.g-toggle.on .gmark { background: var(--text); color: #fff; border-color: var(--text); }
.g-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.gev-bg { position: absolute; border: 1.5px dashed var(--g); border-radius: 8px; background: color-mix(in srgb, var(--g) 7%, transparent); }
.gev-bg span { position: absolute; right: 4px; bottom: 2px; font-size: 10px; color: var(--muted); white-space: nowrap; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; }
.g-allday-row { display: grid; gap: 2px; padding: 0 0 4px; }

/* ---- Statistics ---- */
.st-period { margin-bottom: 16px; }
.st-card { min-width: 0; }
.st-card + .st-card, .st-two { margin-top: 16px; }
.st-card .card-head .seg { flex: none; }
.st-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.st-two .st-card + .st-card { margin-top: 0; }
@media (max-width: 1100px) { .st-two { grid-template-columns: minmax(0, 1fr); } }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; margin-bottom: 20px; }
.st-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-label { color: var(--muted); font-size: 13px; }
.st-value { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.st-tile.hero .st-value { font-size: 32px; }
.st-note { color: var(--muted); font-size: 13px; }
.st-note b { color: var(--text); font-weight: 600; }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i, .kdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.kdot { margin-right: 8px; vertical-align: -1px; }
.st-chart { height: 240px; position: relative; margin-bottom: 16px; }
.st-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.st-chart .grid { stroke: var(--line); stroke-width: 1; }
.st-chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.st-chart .band { fill: var(--hover); opacity: 0; }
.st-chart .col:hover .band, .st-chart .col.on .band { opacity: 1; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table tfoot td { border-bottom: 0; font-weight: 500; }
.st-table .r { text-align: right; }
.st-table b { font-weight: 600; }
.empty-line { color: var(--muted); padding: 8px 0; }
.heat-wrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 360px; }
.heat th { font-weight: 400; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; padding: 0 2px; }
.heat thead th { text-align: left; }
.heat tbody th { text-align: left; padding-right: 6px; width: 1%; }
.heat td { height: 28px; border-radius: 4px; background: var(--fill); cursor: default; }
.heat td:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.h1 { background: #cde2fb !important; } .h2 { background: #9ec5f4 !important; } .h3 { background: #6da7ec !important; }
.h4 { background: #3987e5 !important; } .h5 { background: #256abf !important; } .h6 { background: #184f95 !important; }
.heat-scale { display: flex; align-items: center; gap: 2px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.heat-scale i { width: 22px; height: 10px; border-radius: 2px; }
.heat-scale span:first-child { margin-right: 4px; } .heat-scale span:last-child { margin-left: 4px; }
.st-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; min-width: 140px; max-width: 260px; }
.st-tip .t { font-weight: 600; margin-bottom: 4px; }
.st-tip .rw { display: flex; align-items: center; gap: 6px; } .st-tip .rw span:last-child { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.st-tip .rw i { width: 8px; height: 8px; border-radius: 2px; }
.st-tip .tot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.st-card .card-head { flex-wrap: wrap; }
@media (max-width: 700px) {
  .st-tiles { grid-template-columns: 1fr 1fr; gap: 16px; }
  .st-tile.hero { grid-column: 1 / -1; }
  .st-value { font-size: 20px; }
  .st-card { padding: 16px; }
  .st-chart { height: 200px; }
}
@media (min-width: 1101px) { .st-layout { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-layout .subnav { position: static; display: flex; gap: 4px; overflow-x: auto; }
  .st-layout .subnav a { white-space: nowrap; background: var(--fill); }
  .st-layout .subnav a.active { background: var(--text); color: var(--bg); }
}
.st-page { min-width: 0; }

/* Lane toggles: each lane can be hidden (remembered in the browser) */
.hide-cafe .lt-cafe, .hide-cafe .lane[data-lane=cafe],
.hide-room .lt-room, .hide-room .lane[data-lane=room] { display: none; }
.hide-cafe .lane[data-lane=room] { border-left: 0; }
.hide-cafe .lt-room { border-left: 0; }
.hide-cafe.hide-room .col-head, .hide-cafe.hide-room .day-cell { display: none; }
.hide-cafe.hide-room .with-google .cal-head, .hide-cafe.hide-room .with-google .cal-grid { grid-template-columns: 56px repeat(var(--days, 1), minmax(0, 1fr)); }
.hide-google .g-head, .hide-google .g-cell, .hide-google .g-layer, .hide-google .g-allday-row { display: none; }
.hide-google .with-google .cal-head, .hide-google .with-google .cal-grid { grid-template-columns: 56px repeat(var(--days, 1), minmax(0, 1fr)); }
.lane-toggles { display: flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: var(--r); }
.lane-toggle { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--faint); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.lane-toggle .k-icon { width: 14px; height: 14px; opacity: .45; }
.lane-toggle .gmark { opacity: .45; }
.lane-toggle[aria-pressed=true] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.lane-toggle[aria-pressed=true] .k-icon, .lane-toggle[aria-pressed=true] .gmark { opacity: 1; }
.lane-toggle:hover { color: var(--text); }

/* Calendar header: the date opens a month picker; links menu */
.cal-bar .split > .split-toggle { border-radius: var(--r); margin-left: 0; }
.cal-title { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; width: 212px; height: var(--h); padding: 0 10px !important; border: 0; background: none; cursor: pointer; color: var(--text); font: inherit; }
.cal-title:hover, .cal-title[aria-expanded=true] { background: var(--hover); }
.cal-title h1 { margin: 0 !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-title svg { color: var(--muted); }
.split-menu.date-pop { padding: 12px; min-width: 300px; }
.split-menu.links-pop { left: auto; right: 0; min-width: 300px; }
.link-row { display: flex; align-items: center; gap: 2px; padding: 0 4px 0 12px; border-radius: var(--r-sm); min-height: 40px; }
.link-row:hover { background: var(--hover); }
.link-row .grow { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; }
.split-menu .link-row button { height: 32px; width: 32px; padding: 0; justify-content: center; }
@media (max-width: 1599px) { .lane-toggle { padding: 0 9px; } .lane-toggle > span:last-child { display: none; } }
@media (min-width: 1100px) and (max-width: 1599px) { .cal-new { width: var(--h); padding: 0; justify-content: center; } .cal-new > span { display: none; } }

/* Email to all guests of an event */
.mail-route { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; background: var(--fill); border-radius: var(--r); }
.mail-route svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.guest-mail:has([name=notify]:not(:checked)) .mail-fields, .guest-mail:has([name=notify]:not(:checked)) .mail-route { display: none; }

/* Emails & texts: groups with who-sends-to-whom */
.text-group { margin-top: 36px; }
.text-group:first-of-type { margin-top: 24px; }
.text-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 4px 12px; }
.text-group h3 { font-size: 16px; font-weight: 600; margin: 0; }
.text-group-note { margin: -4px 4px 12px; }
.route { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; white-space: nowrap;
  background: color-mix(in srgb, var(--c-room) 12%, transparent); color: var(--text); }
.route .icon { width: 14px; height: 14px; color: var(--muted); }
.route > span { color: var(--muted); }
.route b { font-weight: 600; }
.route.to-you { background: color-mix(in srgb, var(--c-cafe) 18%, transparent); }
.route.on-form, .route.inside { background: var(--fill); }
.text-list .list-row { min-height: 64px; }
.text-list .end { display: flex; align-items: center; gap: 10px; flex: none; }
.text-list .route { min-width: 128px; }
.chev-space { width: 18px; }
@media (max-width: 700px) { .text-list .route { min-width: 0; } .text-list .route > span { display: none; } }
.text-route { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.text-route .small { margin: 0; }
.te-tabs { margin-bottom: 16px; }
.te-pane[hidden] { display: none; }

/* Bank transfer details (pay page) and how a booking is paid (panel) */
.bank-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.bank-box h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.bank-box dl { display: grid; grid-template-columns: max-content 1fr auto; gap: 6px 16px; align-items: center; margin: 0; }
.bank-box dt { color: var(--muted); }
.bank-box dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bank-box + .bank-box, #checkout + .bank-box { margin-top: 16px; }
.pay-how { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pay-how svg { width: 16px; height: 16px; }
.pay-how b { color: var(--text); font-weight: 500; }
.settings-sub { font-size: 16px; margin: 36px 0 6px; }
.tp-logo { display: block; width: 100%; height: auto; border-radius: 4px; margin-bottom: 10px; }
.tp-site { color: var(--text); text-decoration: underline; margin-top: 8px; }

/* Event status badge in the panel header: opens publish / cancel */
.split.down.end .split-menu { left: auto; right: 0; }
.split > .badge.state-badge { border-radius: 999px; margin: 0 4px 0 0; padding: 0 8px 0 10px; height: 28px; border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; gap: 4px; }
.state-badge svg { width: 14px; height: 14px; }
.split-menu button.danger { color: var(--danger); }

/* Exports */
.export-month { width: 220px; }
.export-range > summary { list-style: none; }
.export-range > summary::-webkit-details-marker { display: none; }
.export-range[open] { display: flex; align-items: center; gap: 8px; }
.export-range .f { width: 170px; }
.exp-icon { width: 36px; height: 36px; border-radius: var(--r); background: var(--fill); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.exp-icon .icon { width: 18px; height: 18px; }
.export-files .list-row > .icon:last-child, .export-files .list-row > svg:last-child { color: var(--muted); }
.inv-no { min-width: 120px; }
.inv-line { display: grid; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Public forms: folded invoice details */
.billing > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 500; list-style: none; min-height: 36px; }
.billing > summary::-webkit-details-marker { display: none; }
.billing > summary .icon { width: 16px; height: 16px; transition: transform .15s; }
.billing[open] > summary .icon { transform: rotate(90deg); }
.billing > summary:hover { color: var(--text); }
.billing-body { margin-top: 8px; }

/* Invoice / credit note downloads in a booking, voucher or customer panel */
.doc-block { margin: 12px 0 8px; }
.doc-block .section-label { margin-bottom: 8px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.doc-row:first-child { border-top: 0; padding-top: 0; }
.doc-main { flex: 1; min-width: 0; }
.doc-wait { display: inline-flex; align-items: center; gap: 6px; color: #92400e; flex-wrap: wrap; }
.doc-wait .icon { width: 14px; height: 14px; }
.v-docs { justify-content: flex-start; margin-top: 12px; }

/* Room form: date, Beginn, Ende, and a bar of the chosen day (static/js/room-picker.js) */
.room-picker { --free: #e3f3e9; --free-line: #9fd0b1; --free-ink: #2f6b47; --busy: #f1f1f3; }
.rp-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 640px) { .rp-fields { grid-template-columns: 1fr 1fr; } .rp-date-field { grid-column: 1 / -1; } }
.rp-date-field { position: relative; }
button.f { width: 100%; border: 0; text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 0; }
.rp-date-value { display: block; text-align: left; height: 58px; padding: 25px 44px 7px 14px; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-date-value.empty { color: var(--faint); }
.f > select:disabled { cursor: default; color: var(--faint); }
.f:has(> select:disabled) { cursor: default; }
.f:has(> select:disabled):hover { background: var(--fill); }
.rp-month { position: absolute; top: calc(100% + 6px); left: 0; z-index: 15; width: min(340px, 100%); min-width: 300px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px; }
.rp-month[hidden] { display: none; }
.rp-month .dp-day { min-height: 38px; }
.rp-month .dp-day:disabled { color: #c4c4cc; cursor: default; background: none; }
.rp-month .dp-day.free { background: var(--free); color: var(--free-ink); font-weight: 600; }
.rp-month .dp-day.free:hover { box-shadow: inset 0 0 0 1px var(--free-ink); }
.rp-month .dp-day.sel { background: var(--text); color: #fff; }
.rp-month .loading { opacity: .5; }
.rp-month-key { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rp-month-key i, .rp-key { width: 14px; height: 14px; border-radius: 4px; flex: none; display: inline-block; }
.rp-month-key i, .rp-key.free { background: var(--free); border: 1px solid var(--free-line); }
.rp-key.busy { background: repeating-linear-gradient(135deg, var(--busy) 0 3px, #e2e2e6 3px 4px); border: 1px solid var(--line); }
.rp-key.mine { background: var(--text); }

.rp-day { margin-top: 18px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.rp-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-bottom: 8px; }
.rp-day-nav { display: inline-flex; gap: 2px; flex: none; }
.rp-day-nav .icon-btn:disabled { opacity: .35; }
.rp-track { position: relative; height: 56px; border-radius: 10px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: repeating-linear-gradient(135deg, var(--busy) 0 6px, #e8e8eb 6px 7px); }
.rp-track.empty { background: var(--fill); }
.rp-track .hl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid rgba(255,255,255,.9); z-index: 2; pointer-events: none; }
.rp-free { position: absolute; top: 0; bottom: 0; background: var(--free); box-shadow: inset 0 0 0 1px var(--free-line); cursor: pointer; z-index: 1; }
.rp-free:hover { box-shadow: inset 0 0 0 1.5px var(--free-ink); }
.rp-sel { position: absolute; top: 4px; bottom: 4px; z-index: 3; border-radius: 8px; background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.rp-track.dragging .rp-sel { cursor: grabbing; }
.rp-sel-text { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; padding: 0 14px; pointer-events: none; }
.rp-grip { position: absolute; top: -4px; bottom: -4px; width: 22px; cursor: ew-resize; touch-action: none; display: flex; align-items: center; justify-content: center; }
.rp-grip.a { left: -11px; }
.rp-grip.b { right: -11px; }
.rp-grip::after { content: ""; width: 6px; height: 26px; border-radius: 3px; background: #fff; border: 1.5px solid var(--text); }
@media (pointer: coarse) { .rp-grip { width: 36px; } .rp-grip.a { left: -18px; } .rp-grip.b { right: -18px; } }
.rp-ticks { position: relative; height: 18px; margin-top: 4px; }
.rp-ticks span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-ticks span:first-child { transform: none; }
.rp-ticks span:last-child { transform: translateX(-100%); }
.rp-legend { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Settings → extra: where it shows up, one switch per place */
.place-list { display: flex; flex-direction: column; }
.place-list .section-label { margin-bottom: 2px; }
.place-row { justify-content: space-between; border-top: 1px solid var(--line); padding: 4px 0; }
.place-row:first-of-type { border-top: 0; }
.place-row > span { display: flex; flex-direction: column; }
.place-row .f-help { margin: 0; display: none; }
.place-row.off { cursor: default; color: var(--muted); }
.place-row.off .f-help { display: block; }
.rental-extras { margin-top: 20px; }
