/* Painel: one white-label admin panel for every niche (restaurant, hotel, barbershop, gym, car rental, cleaning).
   Tokens first; every value below spends from them. Brand colours (--brand, --accent) are set per tenant from JS. */

:root {
  /* spacing, 4/8 scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  /* type */
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --t-xs: 12px; --t-sm: 13px; --t-base: 14px; --t-md: 16px; --t-lg: 18px; --t-xl: 20px; --t-2xl: 24px; --t-3xl: 30px; --t-4xl: 40px; --t-5xl: 52px;
  /* radius */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1); --fast: 140ms; --med: 220ms;
  /* layout */
  --side-w: 256px; --top-h: 64px; --page-w: 90%; --page-gutter: 5%; /* content and top bar share the same 90% width */

  /* light theme (default) */
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #F3F0EA;
  --surface-3: #EAE6DE;
  --line: #E6E1D7;
  --line-strong: #D5CEC1;
  --text: #1B1915;
  --text-2: #5C564D;
  --text-3: #7D766B;
  --overlay: rgba(20, 17, 12, .44);
  --shadow-xs: 0 1px 2px rgba(40, 30, 15, .05);
  --shadow-sm: 0 1px 2px rgba(40, 30, 15, .05), 0 2px 8px -2px rgba(40, 30, 15, .06);
  --shadow-md: 0 2px 4px rgba(40, 30, 15, .04), 0 12px 32px -12px rgba(40, 30, 15, .18);
  --shadow-lg: 0 24px 64px -16px rgba(30, 20, 8, .32);
  --success: #1E7A4C; --warn: #94570A; --danger: #BE2A22; --info: #1D5FA6; --violet: #6A43B8;
  --side-bg: #15130F; --side-2: #1F1C17; --side-line: #2C2822; --side-text: #EFEAE1; --side-muted: #A39B8E;

  /* brand defaults (overwritten per tenant) */
  --brand: #B8322A; --brand-ink: #FFFFFF; --brand-text: #B8322A; --accent: #C9A24A; --accent-text: #8A6A1F;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand-text) 35%, transparent);
  --focus: var(--brand-text);
}

[data-theme="dark"] {
  --bg: #0E0D0B;
  --surface: #171512;
  --surface-2: #1F1C18;
  --surface-3: #2A2620;
  --line: #2B2722;
  --line-strong: #3B352E;
  --text: #F2EEE7;
  --text-2: #B9B1A4;
  --text-3: #8F887C;
  --overlay: rgba(0, 0, 0, .6);
  --shadow-xs: none;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-md: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 40px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
  --success: #5DC490; --warn: #E6AE4E; --danger: #F2786B; --info: #7FB2F0; --violet: #BBA3F2;
  --side-bg: #0A0908; --side-2: #15130F; --side-line: #24201B;
  --brand-soft: color-mix(in srgb, var(--brand) 18%, var(--surface));
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-base)/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01' on; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-xs { width: 14px; height: 14px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 28px; height: 28px; stroke-width: 1.5; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.app[data-side="rail"] { --side-w: 76px; }

.side { position: sticky; top: 0; height: 100dvh; background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; border-right: 1px solid var(--side-line); z-index: 30; }
.side-brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s5) var(--s5) var(--s4); min-height: 76px; }
.side-logo { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--side-2) center/contain no-repeat; flex: none; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--side-line); }
.side-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.side-logo.mono { background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: var(--t-sm); border: 0; }
.side-name { min-width: 0; }
.side-name b { display: block; font-weight: 600; font-size: var(--t-md); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-name span { display: block; font-size: var(--t-xs); color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav { flex: 1; overflow-y: auto; padding: var(--s2) var(--s3) var(--s4); scrollbar-width: thin; scrollbar-color: var(--side-line) transparent; }
.side-group { margin-top: var(--s4); }
.side-group:first-child { margin-top: 0; }
.side-label { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: var(--s2) var(--s3); }
.nav-item { position: relative; display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--side-muted); font-weight: 500; transition: background var(--fast), color var(--fast); text-align: left; }
.nav-item:hover { background: var(--side-2); color: var(--side-text); }
.nav-item[aria-current="page"] { background: var(--side-2); color: var(--side-text); }
.nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item[aria-current="page"] .i { color: var(--brand-on-dark, var(--accent)); }
.nav-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.side-foot { padding: var(--s3); border-top: 1px solid var(--side-line); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.side-site { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-sm); background: var(--side-2); color: var(--side-text); font-size: var(--t-sm); }
.side-site:hover { background: var(--side-line); }
.side-site .lbl { flex: 1; min-width: 0; }
.side-site small { display: block; color: var(--side-muted); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-credit { font-size: 11px; color: var(--side-muted); padding: var(--s1) var(--s3) 0; }
.side-credit a { color: var(--side-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--side-line); }
.app[data-side="rail"] .side-name, .app[data-side="rail"] .side-label, .app[data-side="rail"] .nav-item .lbl, .app[data-side="rail"] .side-site .lbl, .app[data-side="rail"] .side-credit { display: none; }
.app[data-side="rail"] .side-brand { padding: var(--s5) 0 var(--s4); justify-content: center; }
.app[data-side="rail"] .nav-item { justify-content: center; padding: 0; }
.app[data-side="rail"] .nav-count { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
.app[data-side="rail"] .side-site { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--page-gutter); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-bottom: 1px solid var(--line); }
.top-title { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--t-md); letter-spacing: -.01em; }
.top-title .crumb { color: var(--text-3); font-weight: 500; }
.top-spacer { flex: 1; }
.cmdk { display: flex; align-items: center; gap: var(--s2); height: 40px; flex: 0 1 340px; min-width: 150px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text-3); transition: border-color var(--fast), box-shadow var(--fast); }
.cmdk:hover { border-color: var(--line-strong); }
.cmdk span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11px/1 var(--font); padding: 4px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); }
.content { width: var(--page-w); max-width: none; margin: 0 auto; padding: var(--s6) 0 var(--s8); flex: 1; }

/* ---------- buttons ---------- */
.btn { --bh: 40px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--bh); padding: 0 var(--s4); border-radius: var(--r-sm); font-weight: 500; font-size: var(--t-base); white-space: nowrap; border: 1px solid transparent; transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast); user-select: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 1px 2px rgba(0, 0, 0, .12); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--brand-soft); color: var(--brand-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.btn-success { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); border-color: color-mix(in srgb, var(--success) 28%, transparent); }
.btn-success:hover { background: color-mix(in srgb, var(--success) 20%, var(--surface)); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.btn-sm { --bh: 32px; padding: 0 var(--s3); font-size: var(--t-sm); border-radius: var(--r-xs); gap: 6px; }
.btn-lg { --bh: 48px; padding: 0 var(--s5); font-size: var(--t-md); }
.btn-block { width: 100%; }
.icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); border: 1px solid transparent; transition: background var(--fast), color var(--fast), border-color var(--fast); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.bordered { border-color: var(--line); background: var(--surface); }
.icon-btn.bordered:hover { border-color: var(--line-strong); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: var(--r-xs); }
.dot-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }

/* ---------- form controls ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); transition: border-color var(--fast), box-shadow var(--fast); font-size: var(--t-base); }
.textarea { padding: 10px var(--s3); min-height: 88px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input[type="date"], .input[type="time"] { height: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-right: 40px; }
.input-affix .affix { position: absolute; right: 12px; color: var(--text-3); font-size: var(--t-sm); pointer-events: none; }
.input-affix.lead .input { padding-left: 38px; padding-right: var(--s3); }
.input-affix.lead .affix { left: 12px; right: auto; }
.field-err { color: var(--danger); font-size: var(--t-sm); }
.field-err:empty { display: none; }
.input[aria-invalid="true"] { border-color: var(--danger); }
@media (pointer: coarse) { .input, .select, .textarea { font-size: 16px; } }

.switch { position: relative; width: 40px; height: 24px; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--line-strong); transition: background var(--fast), border-color var(--fast); flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--med) var(--ease); }
.switch[aria-checked="true"] { background: var(--success); border-color: var(--success); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch.brand[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 var(--s3); border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: var(--t-sm); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background var(--fast), color var(--fast); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--surface-3); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--s3); border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: var(--t-sm); font-weight: 500; white-space: nowrap; transition: all var(--fast); }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); }
.chip .x { margin-right: -4px; opacity: .7; }
.chip-n { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- status pill / tags ---------- */
.pill { --tone: var(--text-2); display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--tone); background: color-mix(in srgb, var(--tone) 11%, var(--surface)); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.tone-violet { --tone: var(--violet); } .tone-warn { --tone: var(--warn); } .tone-success { --tone: var(--success); } .tone-danger { --tone: var(--danger); } .tone-brand { --tone: var(--brand-text); } .tone-info { --tone: var(--info); } .tone-muted { --tone: var(--text-3); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag .i { width: 13px; height: 13px; }
.tag.vip { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-text); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); min-width: 0; }
.card-h { display: flex; align-items: center; gap: var(--s3); padding: var(--s5) var(--s5) var(--s4); }
.card-h h2, .h2 { font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; }
.card-h p { color: var(--text-2); font-size: var(--t-sm); margin-top: 2px; }
.card-h .grow { flex: 1; min-width: 0; }
.card-b { padding: 0 var(--s5) var(--s5); }
.card-f { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-full); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 6px; vertical-align: 2px; }
.count.hot { background: var(--brand); color: var(--brand-ink); }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.ph .grow { flex: 1; min-width: 240px; }
.ph-eyebrow { font-size: var(--t-sm); color: var(--text-2); margin-bottom: var(--s1); display: flex; align-items: center; gap: var(--s2); }
.ph h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-4xl); line-height: 1.05; letter-spacing: -.01em; }
.ph h1 em { font-style: italic; color: var(--brand-text); }
.ph-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-width: 0; max-width: 100%; }
.toolbar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.toolbar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 var(--s1); }
.filter-chips { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

/* ---------- hero (overview) ---------- */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 248px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s5); padding: var(--s6); color: #fff; isolation: isolate; box-shadow: var(--shadow-md); }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 8, 5, .82) 0%, rgba(10, 8, 5, .55) 45%, rgba(10, 8, 5, .15) 100%), linear-gradient(0deg, rgba(10, 8, 5, .55) 0%, rgba(10, 8, 5, 0) 60%); }
.hero-date { font-size: var(--t-sm); color: rgba(255, 255, 255, .78); display: flex; align-items: center; gap: var(--s2); }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-5xl); line-height: 1; letter-spacing: -.01em; margin: var(--s2) 0 var(--s4); text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--hero-accent, #F3D9A4); }
.hero-pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero-pill { display: inline-flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s3); border-radius: var(--r-full); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: var(--t-sm); font-weight: 500; color: #fff; }
button.hero-pill:hover { background: rgba(255, 255, 255, .2); }
.hero-pill .live { width: 8px; height: 8px; border-radius: 50%; background: #5DE19B; box-shadow: 0 0 0 3px rgba(93, 225, 155, .25); }
.hero-pill .live.off { background: #F2786B; box-shadow: 0 0 0 3px rgba(242, 120, 107, .25); }
.hero-next { width: 300px; padding: var(--s4); border-radius: var(--r-md); background: rgba(16, 13, 9, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.hero-next .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .66); }
.hero-next .v { font-size: var(--t-lg); font-weight: 600; margin-top: 4px; letter-spacing: -.01em; }
.hero-next .s { font-size: var(--t-sm); color: rgba(255, 255, 255, .74); margin-top: 2px; }
.hero-next .row { display: flex; gap: var(--s2); margin-top: var(--s3); }
.hero-next .btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.hero-next .btn-glass:hover { background: rgba(255, 255, 255, .22); }
.hero-credit { position: absolute; right: var(--s4); top: var(--s3); font-size: 11px; color: rgba(255, 255, 255, .6); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.kpi { position: relative; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--t-sm); font-weight: 500; }
.kpi-top .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.kpi-top .grow { flex: 1; }
.kpi-v { font-size: var(--t-3xl); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-v small { font-size: var(--t-md); font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-left: 2px; }
.kpi-s { font-size: var(--t-sm); color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); } .delta.flat { color: var(--text-3); }
.kpi-spark { width: 72px; height: 26px; flex: none; opacity: .9; }
.bar { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width var(--med) var(--ease); }
.bar.stack { display: flex; }
.bar.stack > i { border-radius: 0; }

/* ---------- grid helpers ---------- */
.grid { display: grid; gap: var(--s5); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-content: start; min-width: 0; }
.mt { margin-top: var(--s5); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }

/* ---------- timeline (today) ---------- */
.tl { position: relative; }
.tl-slot { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s4); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); position: relative; }
.tl-slot.past { opacity: .62; }
.tl-slot.now { background: linear-gradient(90deg, var(--brand-soft), transparent 70%); }
.tl-time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--t-md); letter-spacing: -.01em; padding-top: 6px; }
.tl-time small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); letter-spacing: 0; margin-top: 2px; }
.tl-now { position: absolute; left: 0; right: 0; top: 0; height: 0; border-top: 2px solid var(--brand); z-index: 1; }
.tl-now span { position: absolute; left: var(--s5); top: -11px; height: 20px; padding: 0 8px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.tl-items { display: grid; gap: var(--s2); }

/* booking row (shared by timeline, lists, attention) */
.bk { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 6px var(--s2) 6px 6px; border-radius: var(--r-sm); transition: background var(--fast); cursor: pointer; }
.bk:hover { background: var(--surface-2); }
.bk-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; color: var(--av-fg, var(--text)); background: var(--av-bg, var(--surface-3)); }
.bk-main { flex: 1; min-width: 0; }
.bk-name { font-weight: 500; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bk-name .n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-meta { font-size: var(--t-sm); color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bk-meta .i { width: 14px; height: 14px; color: var(--text-3); }
.bk-meta .sep::before { content: '·'; color: var(--text-3); }
.bk-acts { display: flex; align-items: center; gap: var(--s2); flex: none; }

/* attention list */
.att { display: grid; grid-template-columns: minmax(0, 1fr); }
.tl-items, .hist, .rank { grid-template-columns: minmax(0, 1fr); }
.att-item { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.att-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, var(--surface)); }
.att-item .bk-main { cursor: pointer; }

/* quick actions */
.quick { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: 0 var(--s5) var(--s5); }
.quick button { display: flex; flex-direction: row; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color var(--fast), background var(--fast), transform var(--fast); }
.quick button:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.quick .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-text); }
.quick b { font-weight: 600; font-size: var(--t-sm); display: block; }
.quick small { color: var(--text-2); font-size: var(--t-xs); display: block; line-height: 1.35; margin-top: 2px; }

/* 14-day strip */
.days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; padding: 0 var(--s5) var(--s5); }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s2) 0; border-radius: var(--r-sm); border: 1px solid transparent; transition: background var(--fast), border-color var(--fast); }
.day:hover { background: var(--surface-2); }
.day[aria-current="date"] { border-color: var(--text); }
.day .wd { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.day .dn { font-weight: 600; font-variant-numeric: tabular-nums; }
.day .col { width: 100%; max-width: 30px; height: 56px; border-radius: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.day .col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--brand); border-radius: 6px 6px 0 0; opacity: .85; }
.day .col.hot i { background: color-mix(in srgb, var(--brand) 100%, #000 10%); opacity: 1; }
.day .col.closed { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface-3) 5px 7px); }
.day .pc { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* photo tiles (catalog highlights) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); padding: 0 var(--s5) var(--s5); }
.tile { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 55%); }
.tile-cap { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); color: #fff; z-index: 1; }
.tile-cap b { display: block; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-cap span { font-size: var(--t-xs); color: rgba(255, 255, 255, .8); }
.tile-badge { position: absolute; top: var(--s2); left: var(--s2); z-index: 1; }

/* ---------- tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-base); }
.t th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: var(--s3) var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background var(--fast); cursor: pointer; }
.t tbody tr:hover td { background: var(--surface-2); }
.t tbody tr.sel td { background: var(--brand-soft); }
.t tbody tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.t tbody tr.dim { opacity: .55; }
.t .r { text-align: right; }
.t th:first-child, .t td:first-child { padding-left: var(--s5); }
.t th:last-child, .t td:last-child { padding-right: var(--s5); }
.chk { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.bulkbar { position: sticky; bottom: var(--s4); z-index: 5; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4); margin: var(--s4) auto 0; width: max-content; max-width: 100%; border-radius: var(--r-md); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: rise var(--med) var(--ease); flex-wrap: wrap; }
.bulkbar .btn-ghost { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.bulkbar .btn-ghost:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); color: var(--bg); }

/* ---------- planning (resource x time) ---------- */
.plan { --lane: 44px; --col: 64px; --head: 200px; overflow: auto; border-top: 1px solid var(--line); max-height: calc(100dvh - 300px); }
.plan-grid { position: relative; display: grid; grid-template-columns: var(--head) repeat(var(--cols), var(--col)); min-width: max-content; }
.plan-hd { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); height: 44px; display: flex; align-items: center; padding: 0 var(--s2); font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); }
.plan-hd.today { color: var(--brand-text); font-weight: 600; }
.plan-hd.corner { position: sticky; left: 0; z-index: 4; border-left: 0; padding-left: var(--s5); font-weight: 500; color: var(--text-2); }
.plan-res { position: sticky; left: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s2) var(--s5); min-height: var(--rowh); }
.plan-res .thumb { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2); }
.plan-res b { display: block; font-weight: 500; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-res small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-cell { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); min-height: var(--rowh); }
.plan-cell.off { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 8px); }
.plan-cell.wkend { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.plan-cell.today { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.plan-bars { position: absolute; left: var(--head); top: 44px; right: 0; pointer-events: none; }
.pbar { position: absolute; height: calc(var(--lane) - 8px); border-radius: 9px; padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; overflow: hidden; white-space: nowrap; pointer-events: auto; cursor: pointer; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); transition: transform var(--fast), box-shadow var(--fast); }
.pbar:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); z-index: 2; }
.pbar b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.pbar .q { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pbar.solid { background: var(--tone); color: #fff; border-color: transparent; }
.pbar.solid b, .pbar.solid .q { color: #fff; }
.plan-nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); z-index: 1; pointer-events: none; }

.legend { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--t-sm); color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: var(--s4); overflow-x: auto; padding-bottom: var(--s3); align-items: start; scroll-snap-type: x proximity; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); display: grid; gap: var(--s3); align-content: start; min-height: 200px; scroll-snap-align: start; transition: background var(--fast), border-color var(--fast); }
.kcol.drop { border-color: var(--brand-text); background: var(--brand-soft); }
.kcol-h { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s1) 0; font-weight: 600; font-size: var(--t-sm); }
.kcol-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.kcol-h .sum { margin-left: auto; font-weight: 500; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); display: grid; gap: var(--s2); cursor: grab; box-shadow: var(--shadow-xs); transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast); text-align: left; width: 100%; }
.kcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.kcard.dragging { opacity: .5; }
.kcard .t1 { font-weight: 600; font-size: var(--t-sm); line-height: 1.35; }
.kcard .t2 { color: var(--text-2); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .ft { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.kcard .ft .right { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.due.late { color: var(--danger); }
.due.today { color: var(--warn); }

/* ---------- catalog ---------- */
.cat-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.cat-nav { position: sticky; top: calc(var(--top-h) + var(--s5)); display: grid; gap: 2px; }
.cat-nav button { display: flex; align-items: center; gap: var(--s2); min-height: 38px; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; text-align: left; }
.cat-nav button:hover { background: var(--surface); color: var(--text); }
.cat-nav button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.item-cat { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 2px; }
.cat-nav .n { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.item { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow var(--fast), border-color var(--fast); }
.item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.item-ph { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.item-ph img { width: 100%; height: 100%; object-fit: cover; }
.item-ph .none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); gap: 4px; align-content: center; justify-items: center; font-size: 12px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, color-mix(in srgb, var(--surface-3) 60%, transparent) 8px 10px); }
.item-ph .badges { position: absolute; top: var(--s2); left: var(--s2); right: var(--s2); display: flex; gap: 6px; flex-wrap: wrap; }
.item-ph .badges .tag { background: rgba(255, 255, 255, .92); color: #2a251e; backdrop-filter: blur(6px); }
.item.off .item-ph img { filter: grayscale(1) brightness(.85); }
.item.off .item-ph::after { content: attr(data-off); position: absolute; inset: auto var(--s2) var(--s2) auto; height: 24px; padding: 0 10px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.item-b { padding: var(--s4); display: grid; gap: var(--s3); flex: 1; align-content: start; }
.item-b h3 { font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.item-b p { color: var(--text-2); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: center; gap: var(--s2); }
.price-row .vl { font-size: 12px; color: var(--text-3); min-width: 72px; }
.price-in { width: 100%; height: 36px; border: 1px solid transparent; border-radius: var(--r-xs); background: var(--surface-2); padding: 0 40px 0 var(--s3); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; transition: border-color var(--fast), background var(--fast), box-shadow var(--fast); }
.price-in:hover { border-color: var(--line-strong); }
.price-in:focus { outline: none; background: var(--surface); border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.price-in.changed { background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.item-f { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--text-2); }
.live-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); font-weight: 500; }
.live-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.feature { display: grid; grid-template-columns: 200px minmax(0, 1fr); overflow: hidden; }
.feature-ph { position: relative; min-height: 160px; background: var(--surface-2); }
.feature-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-b { padding: var(--s4) var(--s5); display: grid; gap: var(--s3); align-content: start; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) 160px auto; gap: var(--s3); align-items: end; }
@media (max-width: 1180px) { .feature-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 0 var(--s5) var(--s5); }
.cal-wd { font-size: 12px; color: var(--text-3); text-align: center; padding-bottom: var(--s1); font-weight: 500; }
.cal-d { position: relative; min-height: 92px; padding: var(--s2) var(--s2) var(--s2) var(--s3); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 4px; transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.cal-d:hover { border-color: var(--line-strong); }
.cal-d.other { opacity: .38; }
.cal-d.past { background: var(--surface-2); }
.cal-d[aria-pressed="true"] { border-color: var(--brand-text); box-shadow: 0 0 0 1px var(--brand-text); }
.cal-d.closed { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--surface-2) 7px 9px); }
.cal-d .dn { font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.cal-d .dn .today { height: 20px; padding: 0 7px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-ink); font-size: 11px; display: grid; place-items: center; }
.cal-d .oc { margin-top: auto; display: grid; gap: 4px; }
.cal-d .oc .bar { display: block; height: 4px; }
.cal-d .oc small { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-d .why { font-size: 11px; font-weight: 600; color: var(--danger); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.slot { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); text-align: left; transition: all var(--fast); }
.slot:hover { border-color: var(--line-strong); }
.slot b { font-variant-numeric: tabular-nums; font-weight: 600; }
.slot small { font-size: 11px; color: var(--text-2); }
.slot.blocked { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.slot.blocked small { color: var(--warn); font-weight: 600; }
.slot.extra { border-style: dashed; border-color: var(--brand-line); }
.hours { display: grid; }
.hours-row { display: grid; grid-template-columns: 140px 52px minmax(0, 1fr) 120px; gap: var(--s4); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.hours-row.off { color: var(--text-3); }
.hours-row .ranges { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.range { display: inline-flex; align-items: center; gap: 6px; }
.range .input { width: 92px; min-height: 36px; padding: 0 var(--s2); font-variant-numeric: tabular-nums; }

/* ---------- clients ---------- */
.cl-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.cl-list { max-height: calc(100dvh - 230px); overflow-y: auto; }
.cl-item { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); width: 100%; text-align: left; transition: background var(--fast); }
.cl-item:hover { background: var(--surface-2); }
.cl-item[aria-pressed="true"] { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.profile-h { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; padding: var(--s5); }
.profile-h > .grow { min-width: 220px; }
.profile-av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-xl); font-weight: 600; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat small { display: block; font-size: 12px; color: var(--text-2); }
.stat b { display: block; font-size: var(--t-xl); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hist { display: grid; }
.bleed { margin: 0 calc(-1 * var(--s5)); } /* a list that runs to the edges of its card */
.hist-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); font-size: var(--t-sm); }

/* ---------- analytics ---------- */
.chart { width: 100%; height: 280px; display: block; overflow: visible; }
.chart text { font: 500 11px var(--font); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--text); color: var(--bg); font-size: 12px; box-shadow: var(--shadow-md); white-space: nowrap; transform: translate(-50%, -110%); }
.chart-wrap { position: relative; padding: 0 var(--s5) var(--s5); }
.heat { display: grid; gap: 3px; padding: 0 var(--s5) var(--s5); }
.heat-row { display: grid; grid-template-columns: 40px repeat(var(--hc), minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat-row span { font-size: 11px; color: var(--text-3); }
.heat-c { height: 26px; border-radius: 5px; background: color-mix(in srgb, var(--brand) var(--v), var(--surface-2)); }
.hbars { display: grid; gap: var(--s3); padding: 0 var(--s5) var(--s5); }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 52px; gap: var(--s3); align-items: center; font-size: var(--t-sm); }
.hbar .bar { height: 10px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.funnel { display: grid; gap: var(--s2); padding: 0 var(--s5) var(--s5); }
.funnel-s { display: grid; grid-template-columns: 140px minmax(0, 1fr) 60px; gap: var(--s3); align-items: center; font-size: var(--t-sm); }
.funnel-s .f { height: 30px; border-radius: 7px; background: color-mix(in srgb, var(--brand) var(--o), var(--surface-2)); display: flex; align-items: center; padding: 0 10px; color: var(--brand-ink); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; }
.rank { display: grid; }
.rank-row { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s5); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.rank-row img, .rank-row .ph0 { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
.rank-row .pos { color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- settings ---------- */
.set-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.set-sec { padding: var(--s5); display: grid; gap: var(--s5); }
.set-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: var(--s5); align-items: start; padding: var(--s5); border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row h3 { font-size: var(--t-base); font-weight: 600; }
.set-row p { color: var(--text-2); font-size: var(--t-sm); margin-top: 2px; }
.swatches { display: flex; gap: var(--s2); flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.color-in { display: flex; align-items: center; gap: var(--s2); }
.color-in input[type="color"] { width: 44px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.logo-drop { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.logo-box { width: 72px; height: 72px; border-radius: var(--r-sm); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.preview { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: color-mix(in srgb, var(--tone, var(--info)) 9%, var(--surface)); color: var(--text); font-size: var(--t-sm); border: 1px solid color-mix(in srgb, var(--tone, var(--info)) 25%, transparent); }
.notice .i { color: var(--tone, var(--info)); margin-top: 1px; }
.user-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 140px 120px 40px; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text); flex: none; }
.avatar.brand { background: var(--brand); color: var(--brand-ink); }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--overlay); animation: fade var(--med) var(--ease); display: flex; }
.drawer { margin-left: auto; width: min(520px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein var(--med) var(--ease); }
.drawer-h { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s5); border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s5); display: grid; gap: var(--s5); align-content: start; }
.drawer-f { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: flex; gap: var(--s2); flex-wrap: wrap; background: var(--surface); }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s3) var(--s4); font-size: var(--t-sm); }
.dl dt { color: var(--text-2); }
.dl dd { margin: 0; font-weight: 500; }
.modal-wrap { margin: auto; padding: var(--s5); width: 100%; display: grid; place-items: center; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 48px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop var(--med) var(--ease); }
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s5) var(--s5) var(--s3); }
.modal-h h2 { font-size: var(--t-xl); font-weight: 600; letter-spacing: -.01em; }
.modal-h p { color: var(--text-2); font-size: var(--t-sm); margin-top: 4px; }
.modal-b { padding: var(--s2) var(--s5) var(--s5); display: grid; gap: var(--s4); }
.modal-f { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.form-grid .full { grid-column: 1 / -1; }
.pop { position: absolute; z-index: 50; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: pop var(--fast) var(--ease); overflow: hidden; }
.pop-h { display: flex; align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); font-weight: 600; }
.menu-i { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3) var(--s4); text-align: left; font-size: var(--t-sm); transition: background var(--fast); }
.menu-i:hover { background: var(--surface-2); }
.menu-i small { display: block; color: var(--text-2); font-size: 12px; }
.anchor { position: relative; }

.toast { position: fixed; left: 50%; bottom: var(--s5); z-index: 80; transform: translateX(-50%); display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); min-height: 48px; max-width: calc(100vw - 32px); border-radius: var(--r-md); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: rise var(--med) var(--ease); font-size: var(--t-sm); }
.toast .i { color: color-mix(in srgb, var(--success) 70%, var(--bg)); }
.toast .btn { height: 32px; color: var(--bg); }
.toast .btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.toast .undo { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* command palette */
.cmd { margin: 12vh auto auto; width: min(640px, calc(100% - 32px)); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop var(--med) var(--ease); }
.cmd-in { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5); border-bottom: 1px solid var(--line); }
.cmd-in input { flex: 1; height: 60px; border: 0; background: none; font-size: var(--t-lg); outline: none; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: var(--s2); }
.cmd-g { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: var(--s3) var(--s3) var(--s1); }
.cmd-i { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s2) var(--s3); border-radius: var(--r-sm); text-align: left; }
.cmd-i:hover, .cmd-i[aria-selected="true"] { background: var(--surface-2); }
.cmd-i .ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; overflow: hidden; }
.cmd-i .ico img { width: 100%; height: 100%; object-fit: cover; }
.cmd-i small { display: block; color: var(--text-2); font-size: 12px; }
.cmd-empty { padding: var(--s6); text-align: center; color: var(--text-2); }

/* demo switcher */
.side-demo { background: transparent; border: 1px dashed var(--side-line); width: 100%; text-align: left; }
.side-demo .i { color: var(--accent); }
.demo-fab { display: none; position: fixed; right: var(--s5); bottom: var(--s5); z-index: 40; align-items: center; gap: var(--s2); height: 44px; padding: 0 var(--s4) 0 var(--s3); border-radius: var(--r-full); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; font-size: var(--t-sm); }
.demo-fab:hover { transform: translateY(-1px); }
.demo-fab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.demo { margin-left: auto; width: min(460px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein var(--med) var(--ease); }
.demo-set { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); justify-content: start; gap: var(--s4); }
.demo-g { display: grid; gap: var(--s3); }
.demo-gh { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.niches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.niche { position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-md); overflow: hidden; text-align: left; color: #fff; isolation: isolate; outline-offset: 3px; }
.niche img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms var(--ease); }
.niche::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .05) 70%); }
.niche:hover img { transform: scale(1.05); }
.niche .cap { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); }
.niche .cap b { display: block; font-weight: 600; line-height: 1.25; }
.niche .cap span { display: block; font-size: 12px; color: rgba(255, 255, 255, .82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.niche[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand); }
.niche[aria-pressed="true"]::after { content: ''; position: absolute; top: var(--s2); right: var(--s2); width: 22px; height: 22px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; }

/* empty / skeleton */
.empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s7) var(--s5); text-align: center; color: var(--text-2); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); margin-bottom: var(--s2); }
.empty b { color: var(--text); font-weight: 600; }
.sk { border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 600px 100%; animation: shimmer 1.2s linear infinite; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(400px, 1fr); background: var(--bg); }
.login-art { position: relative; margin: var(--s3); border-radius: var(--r-lg); overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--s7); isolation: isolate; }
.login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.login-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 6, 4, .86) 0%, rgba(8, 6, 4, .25) 55%, rgba(8, 6, 4, .1) 100%); }
.login-art .logo { width: 64px; height: 64px; border-radius: var(--r-md); display: grid; place-items: center; overflow: hidden; margin-bottom: var(--s5); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.login-art .logo img { position: static; width: 100%; height: 100%; object-fit: contain; z-index: 0; }
.login-art .logo.mono { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.login-art h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-5xl); line-height: 1.02; max-width: 560px; }
.login-art p { color: rgba(255, 255, 255, .78); margin-top: var(--s3); max-width: 460px; font-size: var(--t-md); }
.login-form { display: flex; align-items: center; justify-content: center; padding: var(--s6); }
.login-card { width: min(380px, 100%); display: grid; gap: var(--s5); }
.login-card h1 { font-size: var(--t-2xl); font-weight: 600; letter-spacing: -.02em; }
.pin-dots { display: flex; justify-content: center; gap: var(--s4); padding: var(--s2) 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all var(--fast); }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.pin-dots.shake { animation: shake 360ms var(--ease); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.key { height: 64px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-size: var(--t-2xl); font-weight: 500; font-variant-numeric: tabular-nums; transition: background var(--fast), transform var(--fast), border-color var(--fast); display: grid; place-items: center; }
.key:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.key:active:not(:disabled) { transform: scale(.97); }
.key.ghost { border-color: transparent; background: none; }

/* ---------- bottom nav (mobile) ---------- */
.bnav { display: none; }

/* ---------- animations ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bulkbar { animation-name: fadeup; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -600px 0; } to { background-position: 600px 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.enter { animation: fadeup 320ms var(--ease) both; }
.enter-2 { animation-delay: 40ms; } .enter-3 { animation-delay: 80ms; } .enter-4 { animation-delay: 120ms; }

/* ---------- responsive ---------- */
@media (max-width: 1520px) { .top-title .crumb { display: none; } }
@media (max-width: 1360px) {
  .g-main { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles .tile:nth-child(4) { display: none; }
}
@media (max-width: 1180px) {
  .app { --side-w: 76px; }
  .app .side-name, .app .side-label, .app .nav-item .lbl, .app .side-site .lbl, .app .side-credit { display: none; }
  .app .side-brand { padding: var(--s5) 0 var(--s4); justify-content: center; }
  .app .nav-item { justify-content: center; padding: 0; }
  .app .nav-count { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
  .app .side-site { justify-content: center; }
  .side-toggle { display: none; }
  .top { padding: 0 var(--page-gutter); }
  .content { padding: var(--s5) 0 var(--s8); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .hero-next { width: 260px; }
  .cat-layout, .set-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-nav { position: static; display: flex; overflow-x: auto; gap: var(--s2); }
  .cat-nav button { flex: none; background: var(--surface); border: 1px solid var(--line); }
  .cmdk { flex: none; width: 40px; min-width: 40px; padding: 0; justify-content: center; }
  .cmdk span, .cmdk kbd { display: none; }
}
@media (max-width: 860px) {
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .cl-layout { grid-template-columns: minmax(0, 1fr); }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-ph { min-height: 180px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-next { width: 100%; }
}
@media (max-width: 700px) {
  .demo-set { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: 0 var(--page-gutter); gap: var(--s2); }
  .top .hide-m { display: none; }
  [data-show-m] { display: inline-grid !important; }
  .hide-mobile { display: none !important; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar .sep { display: none; }
  .card-h { flex-wrap: wrap; }
  .card-h .grow { flex-basis: 60%; }
  .card-h .btn-ghost { padding: 0 var(--s2); }
  .content { padding: var(--s4) 0 112px; }
  .ph h1 { font-size: var(--t-3xl); }
  .hero { padding: var(--s5); min-height: 0; border-radius: var(--r-md); }
  .hero h1 { font-size: var(--t-4xl); }
  .kpis { gap: var(--s3); }
  .kpi { padding: var(--s4); }
  .kpi-v { font-size: var(--t-2xl); }
  .kpi-spark { display: none; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .quick button { flex-direction: row; align-items: center; }
  .days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:nth-child(n+3) { display: none; }
  .tl-slot { grid-template-columns: 56px minmax(0, 1fr); padding: var(--s3) var(--s4); gap: var(--s3); }
  .bk { flex-wrap: wrap; }
  .bk-acts { width: 100%; padding-left: 48px; }
  .card-h { padding: var(--s4) var(--s4) var(--s3); }
  .card-b { padding: 0 var(--s4) var(--s4); }
  .bleed { margin: 0 calc(-1 * var(--s4)); }
  .att-item { padding: var(--s3) var(--s4); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .hours-row { grid-template-columns: 1fr auto; }
  .hours-row .ranges { grid-column: 1 / -1; }
  .hours-row .cap { grid-column: 1 / -1; }
  .user-row { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .user-row .hide-m { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .cal-d { min-height: 64px; padding: 6px; }
  .cal-d .oc small, .cal-d .why { display: none; }
  .cal { gap: 4px; padding: 0 var(--s3) var(--s4); }
  .plan { --head: 132px; }
  .bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bnav button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 52px; border-radius: var(--r-sm); color: var(--text-3); font-size: 11px; font-weight: 500; }
  .bnav button[aria-current="page"] { color: var(--brand-text); }
  .bnav .nav-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
  .demo-fab { display: inline-flex; bottom: 84px; right: var(--s4); height: 40px; }
  .demo-fab .lbl { display: none; }
  .toast { bottom: 88px; }
  .bulkbar { bottom: 84px; }
  .drawer, .demo { width: 100%; }
  .modal-wrap { padding: 0; align-self: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 88dvh; width: 100%; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { min-height: 260px; padding: var(--s5); }
  .login-art h2 { font-size: var(--t-3xl); }
  .login-art p { display: none; }
  .login-art .logo { width: 56px; height: 56px; margin-bottom: var(--s3); }
  .login-form { padding: var(--s5) var(--s4) var(--s6); align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* ---------- planning board v2: a sticky name column and one positioned track per resource ---------- */
.plan2 { overflow: auto; max-height: calc(100dvh - 260px); border-top: 1px solid var(--line); }
.p-row { display: flex; min-width: max-content; border-bottom: 1px solid var(--line); }
.p-row:last-child { border-bottom: 0; }
.p-name { position: sticky; left: 0; z-index: 2; width: 220px; flex: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s2) var(--s5); background: var(--surface); border-right: 1px solid var(--line); }
.p-name .thumb { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2); }
.p-name b { display: block; font-weight: 500; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-name small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-track { position: relative; flex: none; min-height: 52px; background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--col)); }
.p-head { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.p-head .p-name { font-size: 12px; font-weight: 500; color: var(--text-3); min-height: 40px; }
.p-head .p-track { min-height: 40px; height: 40px; background: none; }
.p-lab { position: absolute; top: 0; height: 40px; display: flex; align-items: center; padding-left: 8px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; border-left: 1px solid var(--line); }
.p-lab:empty { border-left-color: transparent; }
.p-lab.today { color: var(--brand-text); font-weight: 600; }
.p-off, .p-wk, .p-today, .p-blk { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.p-off { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 8px); }
.p-wk { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.p-today { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.p-blk { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--warn) 14%, transparent) 0 6px, transparent 6px 10px); border-left: 2px solid color-mix(in srgb, var(--warn) 50%, transparent); }
.p-track .pbar { position: absolute; height: 36px; }
@media (max-width: 700px) { .p-name { width: 132px; padding-left: var(--s3); } .p-name .thumb { display: none; } }

/* ======================================================================
   Shared pieces of the new settings and restaurant screens
   ====================================================================== */
.unit-sw { position: relative; display: inline-flex; align-items: center; }
.unit-sw .i { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.unit-sw .select { padding-left: 36px; min-width: 180px; }
.acting { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s5); border-radius: var(--r-sm); background: color-mix(in srgb, var(--violet) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--violet) 30%, transparent); color: var(--text); font-size: var(--t-sm); }
.acting .i { color: var(--violet); }
.acting.ro-note { background: var(--surface-2); border-color: var(--line); }
.acting.ro-note .i { color: var(--text-3); }
.ro [data-a="setStatus"], .ro [data-a="agBulk"], .ro [data-a="openNova"], .ro .switch, .ro .price-in, .ro [data-a="ctEdit"], .ro [data-a="ctBulk"],
.ro [data-a="openQuick"], .ro [data-a="slotToggle"], .ro [data-a="slotAdd"], .ro [data-a="dayClose"], .ro [data-a="resDayToggle"], .ro [data-a="leadStage"], .ro [data-a="leadConvert"],
.ro [data-a="encNext"], .ro [data-a="encCancel"], .ro [data-a="qdSet"], .ro [data-a="evNew"], .ro [data-a="evDel"], .ro [data-a="evDateState"], .ro [data-a="evState"], .ro [data-a="pdNew"], .ro [data-a="encNew"],
.ro [data-a="hrAdd"], .ro [data-a="hrDel"], .ro [data-a="askDelete"], .ro [data-a="rtCharge"], .ro [data-a="bzPublish"], .ro [data-a="bzAddUnit"], .ro [data-a="ueOpen"],
.ro [data-a="ctFeatLive"], .ro [data-a="ctAvail"], .ro [data-a="ctPhoto"], .ro [data-a="ctFeatPhoto"], .ro [data-a="evRecLive"], .ro [data-a="evLive"], .ro [data-a="resOnline"], .ro [data-a="ruleOn"], .ro [data-a="hrDay"],
.ro [data-a="clVip"], .ro [data-a="clNova"], .ro [data-a="clPrefDel"], .ro [data-a="defPreset"], .ro [data-a="defLogo"], .ro [data-a="defReset"], .ro [data-a="setVersion"], .ro [data-a="defNotif"], .ro [data-a="defVar"], .ro [data-a="secT"], .ro [data-a="ueToggle"], .ro [data-a="ueDel"], .ro [data-a="ueActAs"], .ro [data-a="bzDelUnit"], .ro [data-a="bzReset"], .ro [data-a="leadLog"], .ro [data-a="pdNew"],
.ro input:not([data-in="agQ"]):not([data-in="pdQ"]):not([data-in="clQ"]):not([data-in="ctQ"]), .ro textarea, .ro select { pointer-events: none; opacity: .45; }
.no-export [data-a="agCsv"], .no-export [data-a="clCsv"] { display: none !important; }
.no-prices .price-in { pointer-events: none; opacity: .55; }
.no-prices [data-a="ctBulk"] { display: none !important; }

.biz { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); padding: var(--s5); align-items: start; }
.biz-prev { position: sticky; top: calc(var(--top-h) + var(--s5)); }
.site-foot { display: grid; gap: var(--s4); padding: var(--s5); border-radius: var(--r-md); background: #15130F; color: #EFEAE1; font-size: var(--t-sm); }
.site-foot a, .site-foot span { display: flex; align-items: center; gap: 8px; color: rgba(239, 234, 225, .82); }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-foot .i { color: var(--accent); flex: none; }
.sf-name { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.01em; }
.sf-unit { display: grid; gap: 6px; padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .1); }
.sf-unit b { color: #fff; font-weight: 600; }
.sf-social { display: flex; gap: var(--s4); flex-wrap: wrap; }
.sf-social a { font-weight: 500; }
.team-head { display: flex; align-items: flex-start; gap: var(--s4); padding: var(--s5); flex-wrap: wrap; }
.team-head h3 { font-size: var(--t-base); font-weight: 600; }
.team-head p { color: var(--text-2); font-size: var(--t-sm); margin-top: 2px; max-width: 70ch; }
.team-list { margin: 0 var(--s5) var(--s5); }
.team-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 80px 120px auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.team-row.off { background: var(--surface-2); }
.team-row.off b, .team-row.off .avatar { opacity: .55; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s4); border-top: 1px solid var(--line); flex-wrap: wrap; }
.perm-row .seg button { height: 28px; font-size: 12px; }
.pin-show { font-size: var(--t-xl); font-weight: 600; letter-spacing: .2em; padding: 0 var(--s3); border-radius: var(--r-xs); background: var(--surface-2); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter i { height: 5px; border-radius: 3px; background: var(--surface-3); }
.pw-meter i.on.s1 { background: var(--danger); }
.pw-meter i.on.s2 { background: var(--warn); }
.pw-meter i.on.s3, .pw-meter i.on.s4 { background: var(--success); }
.versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.ver-card { display: grid; gap: 6px; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; transition: border-color var(--fast), box-shadow var(--fast); }
.ver-card:hover { border-color: var(--line-strong); }
.ver-card[aria-pressed="true"] { border-color: var(--brand-text); box-shadow: 0 0 0 1px var(--brand-text); }
.ver-card b { font-weight: 600; }
.ver-card small { color: var(--text-2); font-size: 12px; line-height: 1.4; }
.ver-mock { position: relative; display: block; height: 96px; border-radius: var(--r-sm); overflow: hidden; background: #F5F3EF; border: 1px solid var(--line); margin-bottom: 4px; }
.ver-mock i { position: absolute; display: block; border-radius: 4px; }
.ver-a i:nth-child(1) { left: 0; top: 0; bottom: 0; width: 26%; border-radius: 0; background: #15130F; }
.ver-a i:nth-child(2) { left: 32%; right: 6%; top: 12%; height: 34%; background: linear-gradient(120deg, #6b4a2b, #c08a4a); }
.ver-a i:nth-child(3) { left: 32%; width: 28%; top: 54%; height: 30%; background: #fff; border: 1px solid #e6e1d7; }
.ver-a i:nth-child(4) { left: 64%; right: 6%; top: 54%; height: 30%; background: #fff; border: 1px solid #e6e1d7; }
.ev-date { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; align-content: center; flex: none; line-height: 1.1; }
.ev-date b { font-size: var(--t-lg); font-weight: 700; }
.ev-date span { font-size: 11px; text-transform: uppercase; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }
.live-dot.off { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); }
@media (max-width: 1180px) { .biz { grid-template-columns: minmax(0, 1fr); } .biz-prev { position: static; } .versions { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .team-row { grid-template-columns: 40px minmax(0, 1fr) auto; } .biz { padding: var(--s4); } .unit-sw { display: none; } }

@media (max-width: 1600px) { .top .online-txt { display: none; } .unit-sw .select { min-width: 150px; } }

/* page footer for phones: the site link and the credit (the side menus carry them on bigger screens) */
.pfoot { display: none; width: var(--page-w); margin: 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); padding: var(--s5) 0 96px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--text-3); }
.pfoot a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (max-width: 700px) { .pfoot { display: flex; } .content { padding-bottom: var(--s6); } }

/* ======================================================================
   Version B · Moderna: a light floating side menu on a soft frame, the work on one white sheet, colour per status,
   numbers in tinted blocks, squircle avatars. Own shell (sidebarB + sheetTop in app.js) and own overview
   (moderna() in views/overview.js); every other page keeps its markup and is restyled below.
   ====================================================================== */
[data-version="b"] {
  --font: 'Figtree', 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --r-xs: 8px; --r-sm: 12px; --r-md: 18px; --r-lg: 24px;
  --frame: #ECEEF2;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F4F5F8; --surface-3: #E8EAEF; --line: #E6E8EE; --line-strong: #D2D6DE;
  --text: #14161B; --text-2: #4D5361; --text-3: #687080;
  --info: #2462C8; --violet: #6B47CF; --success: #17804A; --warn: #9E5A06; --danger: #C42B23;
  --shadow-xs: 0 1px 2px rgba(20, 22, 27, .05);
  --shadow-sm: 0 1px 2px rgba(20, 22, 27, .05), 0 3px 8px -3px rgba(20, 22, 27, .08);
  --shadow-md: 0 4px 10px -4px rgba(20, 22, 27, .08), 0 18px 40px -18px rgba(20, 22, 27, .24);
  --shadow-lg: 0 30px 70px -20px rgba(20, 22, 27, .35);
  --side-w: 268px; --top-h: 68px;
}
[data-version="b"][data-theme="dark"] {
  --frame: #090A0D;
  --bg: #121419; --surface: #171A20; --surface-2: #1E222A; --surface-3: #292E37; --line: #262A33; --line-strong: #363C47;
  --text: #EEF0F4; --text-2: #A8AFBB; --text-3: #8A92A0;
  --info: #7DB0F5; --violet: #B9A2F5; --success: #5BC98F; --warn: #E9B25A; --danger: #F27D70;
  --shadow-xs: none; --shadow-sm: none; --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85);
  --brand-soft: color-mix(in srgb, var(--brand) 18%, var(--surface));
}
[data-version="b"] body { background: var(--frame); }

/* shell: side menu on the frame, the page on a sheet that scrolls on its own */
.app-m { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100dvh; padding: var(--s3) var(--s3) var(--s3) 0; background: var(--frame); }
.app-m[data-side="rail"] { --side-w: 84px; }
.sb { position: relative; z-index: 30; display: flex; flex-direction: column; gap: var(--s3); min-height: 0; padding: var(--s1) var(--s4) 0; }
.sb-brand { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s1) 0; }
.sb-brand .side-logo { width: 40px; height: 40px; border-radius: 12px; border: 0; }
.sb-name { min-width: 0; }
.sb-name b { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .unit-sw { display: flex; }
.sb .unit-sw .select { width: 100%; min-width: 0; background-color: var(--surface); }
.sb-new { width: 100%; }
.sb-nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: grid; align-content: start; gap: 2px; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1) var(--s2); }
.sb-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: var(--s4) var(--s3) var(--s2); }
.sb-label:first-child { padding-top: var(--s2); }
.sb-item { position: relative; display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 42px; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; text-align: left; transition: background var(--fast), color var(--fast), box-shadow var(--fast); }
.sb-item:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); color: var(--text); }
.sb-item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.sb-item[aria-current="page"] .i { color: var(--brand-text); }
.sb-item .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item .nav-count { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-text); }
.sb-live { display: grid; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-xs); font-size: var(--t-sm); }
.sb-open { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); }
.sb-open .live-dot { width: 8px; height: 8px; flex: none; }
.sb-sw { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-weight: 600; color: var(--text); }
.sb-foot { display: grid; gap: var(--s1); padding-bottom: var(--s2); }
.sb-user { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s2); border-radius: var(--r-md); text-align: left; color: var(--text-3); transition: background var(--fast); }
.sb-user:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.sb-user .who { flex: 1; min-width: 0; }
.sb-user b { display: block; font-weight: 600; font-size: var(--t-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user small { display: block; font-size: 12px; color: var(--text-3); }
.sb-links { display: flex; flex-wrap: wrap; gap: 2px var(--s3); padding: 0 var(--s2); font-size: 12px; color: var(--text-3); }
.sb-links a, .sb-links button { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12px; min-height: 24px; }
.sb-links a:hover, .sb-links button:hover { color: var(--text); }
.sb-links span a { display: inline; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.sb .pop { left: 0 !important; right: auto !important; top: auto !important; bottom: calc(100% + 8px); }
.sheet { min-width: 0; height: 100%; overflow-y: auto; overflow-x: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sh-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2); height: var(--top-h); padding: 0 var(--page-gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--line); }
.sh-top .cmdk { flex: 0 1 440px; background: var(--surface-2); border-color: transparent; }
.sh-top .cmdk:hover { border-color: var(--line-strong); }
.sh-logo, .sh-m { display: none; }
.sh-logo .side-logo { width: 36px; height: 36px; border-radius: 11px; border: 0; }
.app-m .content { padding-top: var(--s6); }
.app-m + .demo-fab { display: none; }

/* the side menu folds to icons: on request, and by itself on smaller screens */
.app-m[data-side="rail"] :is(.sb-name, .sb-label, .sb-item .lbl, .sb .unit-sw, .sb-live .txt, .sb-user .who, .sb-user > .i, .sb-links, .sb-new .lbl) { display: none; }
.app-m[data-side="rail"] .sb { padding: var(--s1) var(--s3) 0; }
.app-m[data-side="rail"] .sb-brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app-m[data-side="rail"] .sb-item { justify-content: center; padding: 0; }
.app-m[data-side="rail"] .sb-item .nav-count { position: absolute; top: 1px; right: 2px; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
.app-m[data-side="rail"] .sb-new { padding: 0; }
.app-m[data-side="rail"] .sb-live { padding: var(--s3) 0; justify-items: center; }
.app-m[data-side="rail"] .sb-sw { justify-content: center; }
.app-m[data-side="rail"] .sb-user { justify-content: center; }

/* type */
[data-version="b"] .ph { align-items: flex-end; }
[data-version="b"] .ph-eyebrow { font-weight: 500; color: var(--text-3); }
[data-version="b"] .ph h1, [data-version="b"] .login-art h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; }
[data-version="b"] .ph h1 { font-size: 36px; line-height: 1.1; }
[data-version="b"] .ph h1 em { font-style: normal; color: var(--brand-text); }
[data-version="b"] :is(.card-h h2, .h2, .modal-h h2, .drawer-h h2) { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
[data-version="b"] .card-h h2, [data-version="b"] .h2 { font-size: var(--t-lg); }

/* surfaces */
[data-version="b"] .card { border-radius: var(--r-md); box-shadow: none; }
[data-version="b"] .notice, [data-version="b"] .acting { border-radius: var(--r-md); }
[data-version="b"] .modal, [data-version="b"] .cmd { border-radius: var(--r-lg); }
[data-version="b"] .drawer, [data-version="b"] .demo { border-radius: var(--r-lg) 0 0 var(--r-lg); overflow: hidden; }
[data-version="b"] .pop { border-radius: var(--r-md); }
[data-version="b"] .toast { border-radius: var(--r-md); }

/* controls */
[data-version="b"] .btn { border-radius: var(--r-sm); font-weight: 600; }
[data-version="b"] .btn-sm { border-radius: 10px; }
[data-version="b"] .btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 8px 18px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
[data-version="b"] .icon-btn { border-radius: var(--r-sm); }
[data-version="b"] .seg { background: var(--surface-2); border-color: transparent; border-radius: var(--r-sm); }
[data-version="b"] .seg button { border-radius: 9px; font-weight: 600; }
[data-version="b"] .seg button[aria-pressed="true"], [data-version="b"][data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--surface); color: var(--brand-text); box-shadow: var(--shadow-sm); }
[data-version="b"][data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--surface-3); }
[data-version="b"] .chip { border-radius: var(--r-sm); font-weight: 600; }
[data-version="b"] .chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
[data-version="b"] .chip[aria-pressed="true"] .chip-n { color: inherit; opacity: .75; }
[data-version="b"] .pill { height: 24px; padding: 0 8px; border-radius: 8px; font-weight: 600; background: color-mix(in srgb, var(--tone) 13%, var(--surface)); }
[data-version="b"] .pill::before { display: none; }
[data-version="b"] .tag { border-radius: 8px; }
[data-version="b"] :is(.input, .select, .textarea) { border-radius: var(--r-sm); }
[data-version="b"] .switch[aria-checked="true"] { background: var(--success); }
[data-version="b"] .cat-nav button { border-radius: var(--r-sm); font-weight: 600; }
[data-version="b"] .cat-nav button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); box-shadow: none; }

/* avatars as rounded squares */
[data-version="b"] .bk-av { border-radius: 11px; }
[data-version="b"] .avatar { border-radius: 12px; }
[data-version="b"] .profile-av { border-radius: 20px; }

/* numbers: each block in its own soft colour */
[data-version="b"] .kpi { --k: var(--info); border: 0; background: color-mix(in srgb, var(--k) 8%, var(--surface)); }
[data-version="b"] .kpi:nth-of-type(4n+2) { --k: var(--violet); }
[data-version="b"] .kpi:nth-of-type(4n+3) { --k: var(--warn); }
[data-version="b"] .kpi:nth-of-type(4n) { --k: var(--success); }
[data-version="b"] .kpi-top { font-weight: 600; color: var(--text-2); }
[data-version="b"] .kpi-top .ico { border-radius: 10px; background: color-mix(in srgb, var(--k) 16%, var(--surface)); color: var(--k); }
[data-version="b"] .kpi-v { font-family: var(--font-display); font-weight: 700; font-size: 36px; letter-spacing: -.035em; }
[data-version="b"] .kpi .bar { background: color-mix(in srgb, var(--k) 16%, transparent); }
[data-version="b"] .kpi .bar > i { background: var(--k); }

/* every booking carries its status colour on the left */
[data-version="b"] .bk { position: relative; padding-left: 16px; }
[data-version="b"] .bk::before { content: ''; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 4px; border-radius: 4px; background: var(--tone, var(--line-strong)); }
[data-version="b"] .tl-slot.now { background: color-mix(in srgb, var(--brand) 6%, transparent); }
[data-version="b"] .tl-time { font-family: var(--font-display); font-weight: 700; }
[data-version="b"] .att-ico { border-radius: 12px; }
[data-version="b"] .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-version="b"] .quick button { flex-direction: column; align-items: flex-start; gap: var(--s3); border: 0; border-radius: var(--r-md); background: var(--surface-2); }
[data-version="b"] .quick button:hover { background: var(--brand-soft); }
[data-version="b"] .quick .ico { background: var(--surface); }
[data-version="b"] .day { border-radius: var(--r-sm); }
[data-version="b"] .day[aria-current="date"] { border-color: transparent; background: var(--brand-soft); }
[data-version="b"] .day .col { border-radius: 8px; }
[data-version="b"] .tile { border-radius: var(--r-md); }

/* boards and tables */
[data-version="b"] .kcol { background: var(--surface-2); border: 0; border-radius: var(--r-lg); }
[data-version="b"] .kcol-h .dot { width: 10px; height: 10px; border-radius: 4px; }
[data-version="b"] .kcol.drop { background: var(--brand-soft); outline: 2px dashed var(--brand-line); outline-offset: -2px; }
[data-version="b"] .kcard { border-color: transparent; border-radius: var(--r-md); box-shadow: var(--shadow-xs); }
[data-version="b"] .kcard:hover { border-color: transparent; box-shadow: var(--shadow-md); }
[data-version="b"] .t th { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
[data-version="b"] .cal-d { border-radius: var(--r-sm); }
[data-version="b"] .cal-d[aria-pressed="true"] { border-color: var(--brand-text); box-shadow: 0 0 0 3px var(--brand-soft); }
[data-version="b"] .slot { border-radius: var(--r-sm); }

/* overview: a bento of the business photo and the numbers, then the day hour by hour */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.bt-hero { position: relative; grid-column: span 2; grid-row: span 2; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s5); padding: var(--s5); border-radius: var(--r-lg); overflow: hidden; color: #fff; isolation: isolate; }
.bt-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.bt-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 8, 10, .5) 0%, rgba(8, 8, 10, 0) 40%, rgba(8, 8, 10, .55) 100%); }
.bt-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.bt-chip { display: inline-flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s3); border-radius: var(--r-full); background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: var(--t-sm); font-weight: 600; color: #fff; }
button.bt-chip:hover { background: rgba(255, 255, 255, .26); }
.bt-chip .live-dot { width: 8px; height: 8px; }
.bt-hero .hero-next { width: 100%; max-width: 400px; }
.bt-credit { margin-left: auto; font-size: 11px; color: rgba(255, 255, 255, .75); }
.rib { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--s2); align-items: end; padding: 0 var(--s5) var(--s5); }
.rib-c { display: grid; justify-items: center; gap: 6px; }
.rib-b { width: 100%; max-width: 56px; height: 96px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.rib-b i { display: block; width: 100%; border-radius: 10px; background: color-mix(in srgb, var(--brand) 45%, var(--surface)); }
.rib-c.past .rib-b i { background: var(--surface-3); }
.rib-c.now .rib-b { box-shadow: 0 0 0 2px var(--brand); }
.rib-c.now .rib-b i { background: var(--brand); }
.rib-v { min-height: 18px; font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rib-h { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rib-c.now .rib-h { color: var(--brand-text); font-weight: 700; }

/* the version picker's small pictures */
.ver-b { background: #ECEEF2; border-color: #DADDE3; }
.ver-b i:nth-child(1) { left: 4%; top: 9%; bottom: 9%; width: 20%; border-radius: 3px; background: linear-gradient(var(--brand), var(--brand)) 0 0 / 100% 16% no-repeat, linear-gradient(#FFFFFF, #FFFFFF) 0 38% / 100% 12% no-repeat, repeating-linear-gradient(180deg, transparent 0 7px, #D2D6DE 7px 9px) 0 100% / 70% 40% no-repeat; }
.ver-b i:nth-child(2) { left: 28%; right: 3%; top: 6%; bottom: 6%; border-radius: 7px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(20, 22, 27, .12); }
.ver-b i:nth-child(3) { left: 33%; width: 30%; top: 18%; height: 44%; border-radius: 5px; background: linear-gradient(120deg, #6b4a2b, #c08a4a); }
.ver-b i:nth-child(4) { left: 66%; right: 7%; top: 18%; height: 44%; border-radius: 5px; background: linear-gradient(90deg, #DCE7FB 0 46%, transparent 46% 54%, #E9E2FA 54%); }

@media (max-width: 1360px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-hero { grid-column: 1 / -1; grid-row: auto; min-height: 280px; }
}
@media (max-width: 1180px) {
  .app-m { --side-w: 84px; }
  .app-m :is(.sb-name, .sb-label, .sb-item .lbl, .sb .unit-sw, .sb-live .txt, .sb-user .who, .sb-user > .i, .sb-links, .sb-new .lbl) { display: none; }
  .app-m .sb { padding: var(--s1) var(--s3) 0; }
  .app-m .sb-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .app-m .sb-item { justify-content: center; padding: 0; }
  .app-m .sb-item .nav-count { position: absolute; top: 1px; right: 2px; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
  .app-m .sb-new { padding: 0; }
  .app-m .sb-live { padding: var(--s3) 0; justify-items: center; }
  .app-m .sb-sw { justify-content: center; }
  .app-m .sb-user { justify-content: center; }
  .sh-rail { display: none; }
}
@media (min-width: 701px) and (max-width: 1180px) {
  .sh-top .cmdk { width: auto; justify-content: flex-start; padding: 0 var(--s3); }
  .sh-top .cmdk span { display: block; }
  .sh-top .cmdk kbd { display: inline-block; }
}
@media (max-width: 700px) {
  [data-version="b"] body { background: var(--bg); }
  .app-m { display: block; height: auto; padding: 0; background: var(--bg); }
  .sb { display: none; }
  .sheet { height: auto; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .sh-top { gap: var(--s1); }
  .sh-logo { display: inline-flex; margin-right: auto; }
  .sh-m { display: inline-grid; }
  .sh-top .cmdk { flex: none; }
  .app-m + .demo-fab { display: inline-flex; }
  .app-m .content { padding-top: var(--s4); }
  [data-version="b"] .ph h1 { font-size: 28px; }
  [data-version="b"] .kpi-v { font-size: 28px; }
  .bt-hero { padding: var(--s4); min-height: 0; gap: var(--s4); }
  .bt-credit { display: none; }
  .rib { gap: 3px; padding: 0 var(--s4) var(--s4); }
  .rib-b { height: 72px; border-radius: 6px; }
  .rib-b i { border-radius: 6px; }
  .rib-v, .rib-h { font-size: 10px; }
}
