/* ============================================================
   ChairPilot Pro design system — themeable via [data-theme] + brand vars
   ============================================================ */
:root {
  --brand: #ff5c8a;
  --brand-2: #7c5cff;
  --brand-ink: #fff;

  --bg: #fbf7fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #ffe6f0 0%, transparent 55%),
             radial-gradient(900px 500px at -10% 0%, #ece6ff 0%, transparent 50%);
  --surface: #ffffff;
  --surface-2: #f6f1f8;
  --surface-3: #efe9f3;
  --text: #271a2e;
  --text-muted: #8a7f93;
  --border: #efe3ef;
  --border-strong: #e2d4e4;

  --success: #18b26b;
  --success-soft: #def4e8;
  --warn: #e69b1a;
  --warn-soft: #fdf0d8;
  --danger: #e5484d;
  --danger-soft: #fbe1e2;
  --info: #3b82f6;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 6px 24px -10px rgba(80, 30, 70, 0.22);
  --shadow-lg: 0 24px 60px -24px rgba(80, 30, 70, 0.35);
  --ring: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --sidebar-w: 256px;
}

[data-theme="dark"] {
  --brand: #22d3ee;
  --brand-2: #a855f7;
  --brand-ink: #04121a;
  --bg: #0b0f1a;
  --bg-grad: radial-gradient(1000px 600px at 100% -10%, rgba(168,85,247,.22) 0%, transparent 55%),
             radial-gradient(900px 500px at -10% 10%, rgba(34,211,238,.18) 0%, transparent 50%);
  --surface: #131a2a;
  --surface-2: #1a2336;
  --surface-3: #222d44;
  --text: #e9eefb;
  --text-muted: #91a0bd;
  --border: #243049;
  --border-strong: #314064;
  --success-soft: rgba(24,178,107,.18);
  --warn-soft: rgba(230,155,26,.18);
  --danger-soft: rgba(229,72,77,.2);
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.7);
}

[data-theme="spa"] {
  --brand: #2bb6a3;
  --brand-2: #7bd0c1;
  --brand-ink: #06302a;
  --bg: #f4f7f3;
  --bg-grad: radial-gradient(1100px 600px at 100% -10%, #dcefe6 0%, transparent 55%),
             radial-gradient(800px 500px at -5% 5%, #eef3e4 0%, transparent 50%);
  --surface: #ffffff;
  --surface-2: #f0f5ef;
  --surface-3: #e6efe6;
  --text: #243029;
  --text-muted: #7d8a7f;
  --border: #e3ece2;
  --border-strong: #d2e0d2;
  --font-display: "Fraunces", Georgia, serif;
}

[data-theme="barber"] {
  --brand: #d4a24e;
  --brand-2: #2b2b2f;
  --brand-ink: #1c1206;
  --bg: #f3efe7;
  --bg-grad: radial-gradient(1100px 600px at 100% -10%, #efe2c6 0%, transparent 55%),
             radial-gradient(800px 500px at -5% 5%, #e7e2d8 0%, transparent 50%);
  --surface: #fffdf8;
  --surface-2: #f1ebdd;
  --surface-3: #e7dfcc;
  --text: #2a2520;
  --text-muted: #8b8170;
  --border: #e6dcc7;
  --border-strong: #d8caab;
  --font-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 2px solid var(--bg); }

/* ---- boot screen ---- */
.boot-screen { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); background-image: var(--bg-grad); }
.boot-logo { font-size: 54px; width: 96px; height: 96px; display: grid; place-content: center; border-radius: 28px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--shadow-lg); }
.boot-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.boot-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ SHELL ============================ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
}
.brand-block { display: flex; align-items: center; gap: 11px; padding: 8px 8px 14px; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; display: grid; place-content: center; font-size: 22px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow); flex: none; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-muted); font-weight: 700; padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--text-muted); font-weight: 600; font-size: 13.5px; transition: .15s; border: 1px solid transparent; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, transparent), color-mix(in srgb, var(--brand-2) 16%, transparent)); color: var(--text); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.nav-item.active svg { color: var(--brand); }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-badge { margin-left: auto; background: var(--brand); color: var(--brand-ink); font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 20px; }
.nav-item.locked { opacity: .55; }
.nav-item.locked:hover { opacity: .85; }
.nav-lock { margin-left: auto; display: inline-flex; opacity: .75; }
.plan-card { border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 24px; position: relative; transition: .18s; display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--brand); box-shadow: var(--ring); }
.plan-card.popular { border-color: color-mix(in srgb, var(--brand) 55%, transparent); }
.plan-card .price { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -.03em; }
.plan-card ul { list-style: none; padding: 0; margin: 14px 0; flex: 1; }
.plan-card li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; padding: 5px 0; color: var(--text); }
.plan-card li svg { color: var(--success); flex: none; margin-top: 2px; }
.plan-pop-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); font-size: 11px; font-weight: 800; padding: 4px 14px; border-radius: 20px; box-shadow: var(--shadow); }
.nav-spacer { flex: 1; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.page-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.page-sub { color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 24px 26px 60px; max-width: 1400px; width: 100%; }

.org-switcher { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }
.org-switcher .dot { width: 26px; height: 26px; border-radius: 9px; display: grid; place-content: center; font-size: 15px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 30px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }

/* ============================ COMPONENTS ============================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.pad-sm { padding: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-title { font-weight: 700; font-size: 15.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.muted { color: var(--text-muted); }
.section-head { display: flex; align-items: center; margin: 4px 0 16px; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: 13.5px; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); border: none; box-shadow: var(--shadow); }
.btn-primary:hover { color: var(--brand-ink); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn-icon { padding: 8px; width: 36px; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: color-mix(in srgb, var(--brand) 16%, transparent); color: color-mix(in srgb, var(--brand) 75%, var(--text)); }
.dot-status { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.chip { padding: 4px 11px; border-radius: 30px; background: var(--surface-2); font-size: 12px; font-weight: 600; border: 1px solid var(--border); cursor: pointer; }
.chip.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-content: center; font-weight: 800; color: #fff; font-size: 14px; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }

/* inputs */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.input, .select, textarea.input { width: 100%; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; transition: .15s; }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 72px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

/* grids */
.grid { display: grid; gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.split-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.split-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 1080px) { .split-2, .split-3, .cols-2, .cols-3 { grid-template-columns: 1fr; } }

/* KPI card */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .kpi-ico { position: absolute; right: -8px; top: -8px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-content: center; opacity: .12; }
.kpi-label { color: var(--text-muted); font-size: 12.5px; font-weight: 700; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; font-family: var(--font-display); }
.kpi-delta { font-size: 12px; font-weight: 700; margin-top: 6px; display: inline-flex; gap: 4px; align-items: center; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }

/* progress bar */
.bar { height: 8px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* tabs */
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; width: fit-content; }
.tab { padding: 7px 15px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text-muted); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* toast */
#toast-host { position: fixed; bottom: 22px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; min-width: 220px; animation: toastIn .25s ease; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* modal */
#modal-host:empty { display: none; }
.modal-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(20,8,24,.45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; animation: toastIn .2s ease; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-head h3 { font-family: var(--font-display); font-size: 19px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

/* misc utils */
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .col { flex-direction: column; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mb-0{margin-bottom:0}
.right { margin-left: auto; } .tnum { font-variant-numeric: tabular-nums; }
.t-strong { font-weight: 800; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-18 { font-size: 18px; }
.pill { font-variant-numeric: tabular-nums; }
.hide-sm { }
hr.div { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ============================ LOGIN ============================ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }
.auth-art { background: linear-gradient(150deg, var(--brand), var(--brand-2)); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .25; background: #fff; }
.auth-art h1 { font-family: var(--font-display); font-size: 42px; line-height: 1.05; max-width: 460px; }
.auth-art .feat { display: flex; gap: 10px; align-items: center; margin: 9px 0; font-weight: 600; opacity: .95; }
.auth-form-side { display: grid; place-items: center; padding: 40px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-family: var(--font-display); font-size: 28px; margin-bottom: 4px; }
.demo-creds { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 14px; padding: 12px 14px; font-size: 12.5px; margin-top: 18px; }
.demo-creds b { color: var(--brand); }
.demo-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.demo-pick button { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; font-weight: 600; display: flex; justify-content: space-between; }
.demo-pick button:hover { border-color: var(--brand); }

/* ============================ CALENDAR ============================ */
.cal-grid { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.cal-head { display: grid; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 5; }
.cal-head .cell { padding: 10px 8px; text-align: center; border-left: 1px solid var(--border); }
.cal-head .cell:first-child { border-left: none; }
.cal-head .dow { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.cal-head .dnum { font-size: 18px; font-weight: 800; font-family: var(--font-display); }
.cal-head .today .dnum { color: var(--brand); }
.cal-body { position: relative; display: grid; max-height: 70vh; overflow-y: auto; }
.cal-row { display: grid; border-bottom: 1px solid var(--border); min-height: 52px; }
.cal-time { font-size: 11px; color: var(--text-muted); padding: 4px 8px; text-align: right; font-weight: 600; border-right: 1px solid var(--border); }
.cal-cell { border-left: 1px solid var(--border); position: relative; padding: 2px; }
.cal-cell:hover { background: var(--surface-2); cursor: pointer; }
.appt { border-radius: 9px; padding: 5px 8px; font-size: 11.5px; color: #fff; font-weight: 600; margin-bottom: 2px; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(0,0,0,.3); cursor: pointer; }
.appt .a-name { font-weight: 800; }
.appt .a-svc { opacity: .92; font-size: 10.5px; }
.appt.cancelled { opacity: .5; text-decoration: line-through; }

/* ============================ POS ============================ */
.pos-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .pos-layout { grid-template-columns: 1fr; } }
.pos-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .12s; background: var(--surface); }
.pos-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.pos-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pos-tile { border: 1px solid var(--border); border-radius: 14px; padding: 12px; cursor: pointer; background: var(--surface); transition: .12s; }
.pos-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.pos-tile .nm { font-weight: 700; font-size: 13px; }
.pos-tile .pr { color: var(--brand); font-weight: 800; margin-top: 4px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13.5px; }
.cart-total-row.grand { font-size: 20px; font-weight: 800; font-family: var(--font-display); border-top: 2px solid var(--border-strong); margin-top: 8px; padding-top: 12px; }

/* booking (public) */
.book-wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 80px; }
.book-hero { border-radius: var(--radius-lg); padding: 40px; background: linear-gradient(150deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--shadow-lg); margin-bottom: 22px; }
.book-hero h1 { font-family: var(--font-display); font-size: 38px; }
.book-steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.book-step { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--text-muted); }
.book-step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-content: center; background: var(--surface-3); font-size: 12px; }
.book-step.active .n { background: var(--brand); color: var(--brand-ink); }
.book-step.done .n { background: var(--success); color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.slot { padding: 10px; border: 1px solid var(--border-strong); border-radius: 11px; text-align: center; font-weight: 700; font-size: 12.5px; cursor: pointer; background: var(--surface); }
.slot:hover, .slot.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }

/* theme preview swatch */
.theme-card { border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .15s; }
.theme-card.active { border-color: var(--brand); box-shadow: var(--ring); }
.theme-swatch { height: 70px; display: flex; }
.theme-swatch span { flex: 1; }
.theme-card .tc-body { padding: 10px 12px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }

.star { color: #f5b301; }
.rating-num { font-weight: 800; font-family: var(--font-display); font-size: 30px; }

/* responsive sidebar collapse */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-100%); transition: .2s; width: 250px; }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}
.menu-toggle { display: none; }
@media (max-width: 860px) { .menu-toggle { display: inline-flex; } }

/* ---- What's New / changelog ---- */
.wn-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.wn-hero { display: flex; align-items: center; gap: 16px; }
.wn-hero-logo { flex: none; line-height: 0; }
.wn-release { }
.wn-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wn-ver { font-variant-numeric: tabular-nums; }
.wn-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wn-note { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.wn-tag { flex: none; margin-top: 1px; }
.wn-foot { text-align: center; padding: 6px 0 10px; }

/* ---- demo mode + 2FA setup ---- */
.demo-banner { background: linear-gradient(135deg, color-mix(in srgb,var(--brand) 16%,transparent), color-mix(in srgb,var(--brand-2) 16%,transparent)); color: var(--text); border-bottom: 1px solid var(--border); padding: 9px 26px; font-size: 13.5px; text-align: center; }
.demo-banner a { color: var(--brand); font-weight: 700; }
.btn.demo-tour { border: 1.5px dashed color-mix(in srgb,var(--brand) 45%,transparent); background: color-mix(in srgb,var(--brand) 7%,transparent); font-weight: 700; }
.btn.demo-tour:hover { background: color-mix(in srgb,var(--brand) 14%,transparent); border-color: var(--brand); }
.qr-box { display: grid; place-content: center; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 208px; margin: 12px auto; }
.qr-box img, .qr-box canvas { display: block; }
.secret-box { font-family: ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: 1px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; text-align: center; margin: 6px 0 4px; word-break: break-all; }

/* ---- platform console extras ---- */
.card.pad-0 { padding: 0; overflow: hidden; }
.card.pad-0 .table { margin: 0; }
.input-sm { padding: 5px 8px; font-size: 13px; }
.notice-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 10px; font-size: 13.5px; box-shadow: var(--shadow); }
.notice-x { background: none; border: none; color: var(--text-muted); display: inline-flex; padding: 2px; border-radius: 6px; }
.notice-x:hover { background: var(--surface-2); color: var(--text); }
.support-banner { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--text); padding: 9px 26px; font-size: 13.5px; text-align: center; border-bottom: 1px solid var(--border); }
.support-banner a { color: var(--brand); font-weight: 700; }
