/* Desigix Cal design system. Dark first, black and white, one accent (white). */
@font-face { font-family: 'Cal Sans'; src: url('/fonts/cal-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg-app: #0a0a0a;
  --bg-main: #0e0e0e;
  --bg-card: #131313;
  --bg-subtle: #181818;
  --bg-muted: #1d1d1d;
  --bg-emphasis: #262626;
  --bg-day: #252525;
  --bg-day-hover: #333;
  --border: #1e1e1e;
  --border-strong: #2a2a2a;
  --border-focus: #5a5a5a;
  --text: #ededed;
  --text-muted: #a3a3a3;
  --text-subtle: #6e6e6e;
  --brand: #ffffff;
  --brand-text: #0a0a0a;
  --brand-hover: #e5e5e5;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, .12);
  --danger: #f05252;
  --danger-bg: rgba(240, 82, 82, .12);
  --warning: #f5a524;
  --warning-bg: rgba(245, 165, 36, .12);
  --info: #5b8def;
  --info-bg: rgba(91, 141, 239, .14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cal Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --sidebar: 256px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f4f4f5;
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f6f6f7;
  --bg-muted: #ededee;
  --bg-emphasis: #e4e4e7;
  --bg-day: #ececee;
  --bg-day-hover: #dedee2;
  --border: #e7e7ea;
  --border-strong: #d6d6db;
  --border-focus: #a1a1aa;
  --text: #111113;
  --text-muted: #5b5b63;
  --text-subtle: #8e8e96;
  --brand: #111111;
  --brand-text: #ffffff;
  --brand-hover: #2b2b2b;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg-app); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 20px; line-height: 28px; }
h2 { font-size: 16px; line-height: 24px; }
h3 { font-size: 14px; line-height: 20px; }
p { margin: 0; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.sm { width: 14px; height: 14px; }
svg.icon.lg { width: 20px; height: 20px; }
::selection { background: rgba(255,255,255,.18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-emphasis); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent; background: none; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, opacity .12s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-text); }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn.secondary { background: var(--bg-card); border-color: var(--border-strong); color: var(--text); }
.btn.secondary:hover:not(:disabled) { background: var(--bg-muted); }
.btn.ghost { color: var(--text); }
.btn.ghost:hover:not(:disabled) { background: var(--bg-muted); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn.danger-ghost { color: var(--danger); }
.btn.danger-ghost:hover:not(:disabled) { background: var(--danger-bg); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.icon-only { width: 36px; padding: 0; }
.btn.sm.icon-only { width: 30px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.btn-group .btn { border-radius: 0; height: 32px; border: 0; }
.btn-group .btn + .btn { border-left: 1px solid var(--border-strong); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 500; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-subtle); }
.field .error { font-size: 12px; color: var(--danger); }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 12px; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--border-focus); }
.input:focus { border-color: var(--text-muted); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.input::placeholder { color: var(--text-subtle); }
.input[aria-invalid="true"] { border-color: var(--danger); }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.input-group { display: flex; align-items: stretch; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.input-group:focus-within { border-color: var(--text-muted); }
.input-group .addon { display: flex; align-items: center; padding: 0 10px; color: var(--text-subtle); white-space: nowrap; font-size: 14px; }
.input-group .input { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.input-group .addon.right { border-left: 0; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.toggle { position: relative; display: inline-flex; width: 36px; height: 20px; flex: none; cursor: pointer; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle .track { position: absolute; inset: 0; border-radius: 20px; background: var(--bg-emphasis); border: 1px solid var(--border-strong); transition: background .15s; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-subtle); transition: transform .15s, background .15s; }
.toggle input:checked + .track { background: var(--brand); border-color: var(--brand); }
.toggle input:checked + .track + .knob { transform: translateX(16px); background: var(--brand-text); }
.toggle input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle input:disabled { cursor: not-allowed; }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.segmented { display: inline-flex; padding: 2px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); }
.segmented button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500; }
.segmented button[aria-pressed="true"] { background: var(--bg-emphasis); color: var(--text); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--bg-muted); color: var(--text-muted); white-space: nowrap; }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.outline { background: none; border: 1px solid var(--border-strong); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }

/* ---------- Cards / lists ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.stack > * + * { border-top: 1px solid var(--border); }
.list-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; transition: background .12s; }
a.list-row:hover, .list-row.clickable:hover { background: var(--bg-subtle); cursor: pointer; }
.section { display: flex; flex-direction: column; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: 0; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 24px; }
.empty .glyph { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-muted); display: grid; place-items: center; margin-bottom: 4px; color: var(--text-muted); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--bg-subtle); font-size: 13px; }
.alert.warning { border-color: rgba(245,165,36,.35); background: var(--warning-bg); color: var(--warning); }
.alert.danger { border-color: rgba(240,82,82,.35); background: var(--danger-bg); color: var(--danger); }
.alert.info { border-color: rgba(91,141,239,.35); background: var(--info-bg); color: var(--info); }
.alert .alert-text { color: var(--text); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 14px 16px; font-size: 14px; }
.kv dt { color: var(--text-muted); font-weight: 500; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--text-subtle); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.skeleton { background: linear-gradient(90deg, var(--bg-subtle), var(--bg-muted), var(--bg-subtle)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 12px; gap: 4px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 14px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); color: var(--brand-text); display: grid; place-items: center; font-size: 13px; font-family: var(--font-display); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-text); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; font-family: var(--font-display); }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.md { width: 40px; height: 40px; font-size: 15px; }
.nav-group { font-size: 12px; color: var(--text-subtle); padding: 14px 10px 4px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: var(--radius); border: 0; background: none; color: var(--text-muted); font-weight: 500; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--bg-subtle); color: var(--text); }
.nav a[aria-current="page"] { background: var(--bg-muted); color: var(--text); }
.nav .count { margin-left: auto; font-size: 11px; background: var(--brand); color: var(--brand-text); border-radius: 10px; padding: 0 6px; line-height: 18px; }
.sidebar .spacer { flex: 1; }
.sidebar-foot { font-size: 11px; color: var(--text-subtle); padding: 10px 10px 0; }
.main { flex: 1; min-width: 0; margin: 8px 8px 8px 0; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius-lg); min-height: calc(100vh - 16px); display: flex; flex-direction: column; }
.page { padding: 32px 40px 48px; max-width: 1280px; width: 100%; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--text-muted); margin-top: 2px; }
.topbar { display: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 8px 12px; color: var(--text-muted); font-weight: 500; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a[aria-current="page"], .tabs button[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.tabs a:hover { color: var(--text); }

/* Editor (event type / settings) with secondary nav */
.editor { display: flex; min-height: 100vh; }
.editor-nav { width: var(--sidebar); flex: none; padding: 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.editor-main { flex: 1; min-width: 0; margin: 8px 8px 8px 0; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: calc(100vh - 16px); }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-main); z-index: 5; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.editor-body { display: flex; flex: 1; min-height: 0; }
.editor-form { width: 560px; flex: none; border-right: 1px solid var(--border); padding: 4px 20px 40px; }
.editor-preview { flex: 1; min-width: 0; display: flex; align-items: flex-start; justify-content: center; padding: 48px 24px; background: var(--bg-app); border-radius: 0 0 var(--radius-lg) 0; overflow: hidden; }
.editor-preview .preview-scale .booker { max-width: none; }

/* ---------- Overlays ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .12s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: pop .14s; }
.modal.wide { max-width: 860px; }
.modal-head { padding: 20px 24px 0; }
.modal-head p { color: var(--text-muted); margin-top: 4px; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; padding: 4px; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 40; }
.menu button, .menu a { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; color: var(--text); font-size: 13px; }
.menu button:hover, .menu a:hover { background: var(--bg-muted); }
.menu .danger { color: var(--danger); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--brand); color: var(--brand-text); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 500; animation: pop .15s; max-width: 90vw; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Event type rows ---------- */
.et-row { display: flex; align-items: center; gap: 16px; padding: 18px 24px; }
.et-row:hover { background: var(--bg-subtle); }
.et-title { font-weight: 600; }
.et-slug { color: var(--text-subtle); font-size: 13px; }
.icon-bar { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.icon-bar > * { width: 32px; height: 30px; display: grid; place-items: center; background: none; border: 0; color: var(--text-muted); cursor: pointer; }
.icon-bar > * + * { border-left: 1px solid var(--border-strong); }
.icon-bar > *:hover { background: var(--bg-muted); color: var(--text); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; }
.stat .num { font-family: var(--font-display); font-size: 28px; line-height: 1.2; margin-top: 6px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-track { height: 6px; border-radius: 6px; background: var(--bg-muted); overflow: hidden; }
.bar-fill { height: 100%; background: var(--text); border-radius: 6px; }

/* ---------- Bookings list ---------- */
.date-head { padding: 10px 20px; font-size: 12px; font-weight: 600; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .04em; background: var(--bg-subtle); }
.bk-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 16px; padding: 16px 20px; align-items: start; }
.bk-row:hover { background: var(--bg-subtle); }
.bk-when { font-weight: 500; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { width: auto; min-width: 160px; height: 34px; }

/* ---------- Availability ---------- */
.day-row { display: flex; gap: 16px; padding: 16px 20px; align-items: flex-start; }
.day-row .day-name { width: 150px; display: flex; align-items: center; gap: 12px; height: 34px; font-weight: 500; flex: none; }
.ranges { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.range { display: flex; align-items: center; gap: 8px; }
.range select.input { width: 128px; height: 34px; }
.day-actions { display: flex; gap: 4px; }

/* ---------- Calendar week view ---------- */
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card); }
.week-head { position: sticky; top: 0; z-index: 2; display: contents; }
.week-headcell { position: sticky; top: 0; z-index: 3; padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); font-size: 12px; color: var(--text-muted); background: var(--bg-card); }
.week-headcell .n { font-family: var(--font-display); font-size: 20px; color: var(--text); display: block; }
.week-headcell.today .n { background: var(--brand); color: var(--brand-text); border-radius: 8px; display: inline-block; padding: 0 8px; }
.week-body { display: contents; }
.week-times { position: relative; }
.week-time { height: 48px; font-size: 11px; color: var(--text-subtle); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.week-col { position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0 47px, var(--border) 47px 48px); }
.week-event { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 4px 6px; font-size: 12px; line-height: 1.3; background: var(--bg-emphasis); border-left: 3px solid var(--brand); overflow: hidden; cursor: pointer; }
.week-event:hover { background: var(--bg-day-hover); }
.week-event.pending { border-left-color: var(--warning); background: var(--warning-bg); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 1; }

/* ---------- Booker (public booking widget) ---------- */
.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 16px; background: var(--bg-app); }
.public-foot { margin-top: 28px; font-size: 12px; color: var(--text-subtle); display: flex; gap: 6px; align-items: center; }
.public-foot .logo { font-size: 13px; }
.public-foot .logo-mark { width: 16px; height: 16px; font-size: 10px; border-radius: 4px; }
.booker { display: grid; grid-template-columns: 280px minmax(0, 1fr) 0; background: var(--bg-main); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); transition: grid-template-columns .2s; width: 100%; max-width: 760px; box-shadow: var(--shadow); }
.booker.with-slots { grid-template-columns: 280px minmax(0, 1fr) 240px; max-width: 1000px; }
.booker.form-step { grid-template-columns: 280px minmax(0, 1fr); max-width: 760px; }
.booker-info { padding: 24px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.booker-info .host { color: var(--text-muted); font-weight: 500; }
.booker-info h1 { font-size: 22px; line-height: 1.25; }
.booker-meta { display: flex; flex-direction: column; gap: 10px; color: var(--text); font-weight: 500; font-size: 14px; }
.booker-meta .row { gap: 10px; align-items: flex-start; }
.booker-meta svg { margin-top: 2px; color: var(--text-muted); }
.booker-desc { color: var(--text-muted); white-space: pre-wrap; font-size: 14px; }
.tz-select { background: none; border: 0; padding: 0; color: var(--text); font-weight: 500; cursor: pointer; max-width: 210px; }
.tz-select:focus-visible { outline: 2px solid var(--brand); }
.booker-cal { padding: 24px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-head .display { font-size: 16px; }
.cal-head .display span { color: var(--text-muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: .04em; padding-bottom: 6px; text-transform: uppercase; }
.cal-day { aspect-ratio: 1; max-height: 64px; border-radius: var(--radius); border: 0; background: none; color: var(--text-subtle); font-weight: 600; font-size: 14px; position: relative; display: grid; place-items: center; }
.cal-day.available { background: var(--bg-day); color: var(--text); cursor: pointer; }
.cal-day.available:hover { background: var(--bg-day-hover); }
.cal-day.selected { background: var(--brand); color: var(--brand-text); }
.cal-day.today::after { content: ''; position: absolute; bottom: 7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.booker-slots { padding: 24px 16px 24px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow: hidden; }
.booker-slots .slots-head { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.slot-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 440px; padding-right: 6px; }
.slot { height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-card); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; cursor: pointer; flex: none; }
.slot:hover { border-color: var(--text-muted); }
.booker-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.booker-loading { position: absolute; inset: 0; }
.success-card { width: 100%; max-width: 640px; background: var(--bg-main); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.success-top { padding: 40px 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.success-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); }
.success-icon.cancel { background: var(--danger-bg); color: var(--danger); }
.success-icon.pending { background: var(--warning-bg); color: var(--warning); }
.success-top h1 { font-size: 24px; }
.success-body { padding: 28px 32px; }
.success-foot { padding: 18px 32px; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 13px; }
.success-foot a, .linkish { text-decoration: underline; text-underline-offset: 3px; color: var(--text); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.profile { width: 100%; max-width: 680px; }
.profile-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.profile-head h1 { font-size: 24px; }
.event-link { display: block; padding: 20px 24px; transition: background .12s; }
.event-link:hover { background: var(--bg-subtle); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: var(--bg-app); background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 14px 14px; }
.auth-card { width: 100%; max-width: 400px; padding: 28px; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.auth-card .logo { justify-content: center; font-size: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .editor-preview { display: none; }
  .editor-form { width: auto; flex: 1; border-right: 0; }
  .booker.with-slots { grid-template-columns: 240px minmax(0, 1fr) 210px; }
  .booker { grid-template-columns: 240px minmax(0, 1fr) 0; }
  .booker.form-step { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell, .editor { flex-direction: column; }
  .sidebar, .editor-nav { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; height: 100%; background: var(--bg-app); transform: translateX(-100%); transition: transform .2s; border-right: 1px solid var(--border); }
  .shell.nav-open .sidebar, .editor.nav-open .editor-nav { transform: none; }
  .topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; position: sticky; top: 0; z-index: 20; background: var(--bg-app); border-bottom: 1px solid var(--border); }
  .main, .editor-main { margin: 0; border-radius: 0; border-width: 0; min-height: auto; }
  .editor-bar { border-radius: 0; flex-wrap: wrap; }
  .page { padding: 20px 16px 40px; }
  .bk-row { grid-template-columns: 1fr; gap: 8px; }
  .kv { grid-template-columns: 1fr; gap: 4px 0; }
  .kv dd { margin-bottom: 10px; }
  .day-row { flex-direction: column; gap: 8px; }
  .range select.input { width: 110px; }
  .booker, .booker.with-slots, .booker.form-step { grid-template-columns: 1fr; max-width: 520px; }
  .booker-info { border-right: 0; border-bottom: 1px solid var(--border); }
  .booker-slots { padding: 0 24px 24px; }
  .slot-list { max-height: none; }
  .public { padding: 16px 12px; }
  .success-top, .success-body, .success-foot { padding-left: 20px; padding-right: 20px; }
  .et-row { flex-wrap: wrap; padding: 16px; }
  .week { grid-template-columns: 44px repeat(7, minmax(44px, 1fr)); overflow-x: auto; }
  .nav-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 44; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
