/* MemberLoop — static theme. Visual match for the NewTheme app. */
:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.003 250);
  --foreground: oklch(0.22 0.025 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.22 0.025 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.22 0.025 260);
  --primary: oklch(0.54 0.17 256);
  --primary-foreground: oklch(0.99 0 0);
  --primary-soft: oklch(0.96 0.025 256);
  --secondary: oklch(0.965 0.006 250);
  --secondary-foreground: oklch(0.3 0.025 260);
  --muted: oklch(0.965 0.006 250);
  --muted-foreground: oklch(0.52 0.02 258);
  --accent: oklch(0.955 0.012 252);
  --accent-foreground: oklch(0.25 0.03 260);
  --destructive: oklch(0.57 0.2 25);
  --destructive-foreground: oklch(0.99 0 0);
  --destructive-soft: oklch(0.965 0.02 25);
  --success: oklch(0.56 0.13 158);
  --success-soft: oklch(0.96 0.03 158);
  --warning: oklch(0.66 0.14 70);
  --warning-soft: oklch(0.97 0.035 80);
  --discord: oklch(0.58 0.2 275);
  --note: oklch(0.6 0.12 85);
  --note-soft: oklch(0.975 0.04 92);
  --border: oklch(0.92 0.007 255);
  --input: oklch(0.9 0.008 255);
  --ring: oklch(0.54 0.17 256);
  --chart-1: oklch(0.54 0.17 256);
  --chart-2: oklch(0.72 0.11 230);
  --chart-3: oklch(0.56 0.13 158);
  --chart-4: oklch(0.66 0.14 70);
  --chart-5: oklch(0.7 0.03 258);
  --sidebar: oklch(0.99 0.002 250);
  --sidebar-foreground: oklch(0.3 0.02 260);
  --sidebar-accent: oklch(0.955 0.012 252);
  --sidebar-accent-foreground: oklch(0.22 0.03 260);
  --sidebar-border: oklch(0.92 0.007 255);
  --admin: oklch(0.27 0.03 260);
  --admin-foreground: oklch(0.97 0.005 250);
  --shadow-soft: 0 1px 2px oklch(0.22 0.025 260 / 0.04), 0 4px 16px -4px oklch(0.22 0.025 260 / 0.06);
  --shadow-float: 0 1px 2px oklch(0.22 0.025 260 / 0.05), 0 24px 60px -16px oklch(0.3 0.08 256 / 0.22);
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.06);
  --shadow: 0 1px 3px 0 oklch(0.2 0.02 260 / 0.1), 0 1px 2px -1px oklch(0.2 0.02 260 / 0.1);
  --gradient-hero: radial-gradient(1200px 500px at 70% -10%, oklch(0.93 0.05 256 / 0.7), transparent 60%), radial-gradient(800px 400px at 0% 10%, oklch(0.96 0.03 220 / 0.8), transparent 60%);
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Instrument Sans", "Geist", ui-sans-serif, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --sidebar-w: 15rem;
  --header-h: 3.5rem;
  --max: 1400px;
  --max-landing: 80rem;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }
.font-mono { font-family: var(--font-mono); }
.mono { font-family: var(--font-mono); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.ico { display: block; width: 1rem; height: 1rem; min-width: 1rem; max-width: 1rem; min-height: 1rem; max-height: 1rem; flex: 0 0 1rem; pointer-events: none; overflow: hidden; }
.ico-sm { width: 0.875rem; height: 0.875rem; }
.ico-xs { width: 0.75rem; height: 0.75rem; }
.ico-lg { width: 1.25rem; height: 1.25rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.25rem; padding: 0.5rem 1rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground);
  font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  box-shadow: var(--shadow); transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:hover { background: color-mix(in oklch, var(--primary) 90%, black); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--ring); }
.btn:disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--input); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); box-shadow: none; }
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-destructive:hover { background: color-mix(in oklch, var(--destructive) 90%, black); }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.75rem; }
.btn-lg { height: 2.5rem; padding: 0 2rem; border-radius: calc(var(--radius) - 2px); }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; }
.btn-block { width: 100%; }
.btn .ico { width: 1rem; height: 1rem; }

/* Fields */
.label { display: block; font-size: 0.875rem; font-weight: 500; line-height: 1; }
.label-xs { font-size: 0.75rem; }
.input, .textarea, .select-trigger {
  display: flex; width: 100%; height: 2.25rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--input); background: transparent; padding: 0.25rem 0.75rem;
  font-size: 0.875rem; box-shadow: var(--shadow-sm); outline: none;
}
.textarea { height: auto; min-height: 60px; padding: 0.5rem 0.75rem; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select-trigger:focus, .select.open .select-trigger { box-shadow: 0 0 0 1px var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.input:disabled, .textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; left: 0.65rem; top: 0.6rem; color: var(--muted-foreground); }
.input-icon .input { padding-left: 2rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.color-row { display: flex; gap: 0.5rem; align-items: center; }
.color-row input[type="color"] { width: 3rem; height: 2.25rem; padding: 0.15rem; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: transparent; cursor: pointer; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 0.375rem; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground);
  padding: 0.125rem 0.5rem; font-size: 11px; font-weight: 500; line-height: 1.4;
}
.pill .dot, .pill-dot::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 999px; background: currentColor; display: inline-block; }
.pill-primary { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in oklch, var(--primary) 20%, transparent); }
.pill-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in oklch, var(--success) 20%, transparent); }
.pill-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in oklch, var(--warning) 25%, transparent); }
.pill-danger { background: var(--destructive-soft); color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 20%, transparent); }
.pill-note { background: var(--note-soft); color: var(--note); border-color: color-mix(in oklch, var(--note) 25%, transparent); }
.sim {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border: 1px dashed color-mix(in oklch, var(--warning) 40%, transparent);
  background: var(--warning-soft); color: var(--warning);
  border-radius: calc(var(--radius) - 2px); padding: 0.125rem 0.375rem;
  font-size: 10px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
}
.app-badge { border-radius: 2px; background: var(--discord); color: var(--primary-foreground); padding: 0 0.25rem; font-size: 9px; font-weight: 600; letter-spacing: 0.02em; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 16rem; flex: 0 0 auto; font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.logo-mark { display: grid; place-items: center; flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; min-width: 1.75rem; max-width: 1.75rem; min-height: 1.75rem; max-height: 1.75rem; overflow: hidden; border-radius: 0.5rem; background: var(--primary); color: var(--primary-foreground); }
.logo-mark svg { display: block; width: 16px; height: 16px; min-width: 16px; max-width: 16px; min-height: 16px; max-height: 16px; }
.logo.inverted .logo-mark { background: var(--admin-foreground); color: var(--admin); }
.initials { display: grid; place-items: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 999px; background: var(--accent); color: var(--accent-foreground); font-size: 11px; font-weight: 600; }
.initials.lg { width: 2.5rem; height: 2.5rem; }
.initials.xl { width: 2.75rem; height: 2.75rem; font-size: 13px; }

/* Surfaces */
.surface, .panel {
  background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-soft);
}
.panel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; border-bottom: 1px solid var(--border); padding: 0.875rem 1.25rem; }
.panel-h h3 { font-size: 0.875rem; }
.panel-h p, .panel-sub { margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted-foreground); font-family: var(--font-sans); letter-spacing: 0; font-weight: 400; }
.panel-b { padding: 1.25rem; }
.panel-b.flush { padding: 0; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-soft); padding: 1rem; }
.stat-label { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.stat-label .ico { opacity: 0.7; }
.stat-value { margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted-foreground); }
.stat-sub.success { color: var(--success); }
.stat-sub.warning { color: var(--warning); }
.stat-sub.danger { color: var(--destructive); }

.page-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; }
.page-desc { margin-top: 0.25rem; max-width: 42rem; font-size: 0.875rem; color: var(--muted-foreground); font-family: var(--font-sans); letter-spacing: 0; font-weight: 400; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.eyebrow { margin-bottom: 0.375rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: calc(var(--radius) + 4px); padding: 3rem 1.5rem; text-align: center; }
.empty .ico { width: 1.5rem; height: 1.5rem; color: var(--muted-foreground); margin-bottom: 0.75rem; }
.empty strong { font-size: 0.875rem; font-weight: 500; }
.empty p { margin-top: 0.25rem; max-width: 24rem; font-size: 0.75rem; color: var(--muted-foreground); }

.callout { display: flex; align-items: flex-start; gap: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--border); background: color-mix(in oklch, var(--muted) 40%, transparent); padding: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.callout.warning { border-color: color-mix(in oklch, var(--warning) 30%, transparent); background: var(--warning-soft); color: var(--foreground); }
.callout.danger { border-color: color-mix(in oklch, var(--destructive) 30%, transparent); background: var(--destructive-soft); }
.callout.success { border-color: color-mix(in oklch, var(--success) 25%, transparent); background: var(--success-soft); color: var(--foreground); }
.callout.info-primary { border-color: color-mix(in oklch, var(--primary) 20%, transparent); background: var(--primary-soft); color: var(--foreground); }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { padding: 0.625rem 1rem; text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-foreground); }
.data-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.data-table thead tr { border-bottom: 1px solid var(--border); }
.data-table thead.muted { background: color-mix(in oklch, var(--muted) 40%, transparent); }
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: 0; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover, .hover-row:hover { background: color-mix(in oklch, var(--accent) 40%, transparent); }
.data-table .muted, .muted { color: var(--muted-foreground); }
.data-table .right { text-align: right; }
.min-900 { min-width: 900px; }
.min-800 { min-width: 800px; }
.min-720 { min-width: 720px; }
.min-700 { min-width: 700px; }

/* Segmented */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; border-radius: 0.5rem; border: 1px solid var(--border); background: color-mix(in oklch, var(--muted) 60%, transparent); padding: 0.25rem; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 0.375rem; border: 0; background: transparent;
  border-radius: calc(var(--radius) - 2px); padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground);
}
.seg-btn:hover { color: var(--foreground); }
.seg-btn.on { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-soft); }
.seg-count { font-variant-numeric: tabular-nums; border-radius: 0.25rem; background: var(--muted); padding: 0 0.25rem; font-size: 10px; color: var(--muted-foreground); }

/* Progress */
.progress { position: relative; height: 0.5rem; width: 100%; overflow: hidden; border-radius: 999px; background: color-mix(in oklch, var(--primary) 20%, transparent); }
.progress > span { display: block; height: 100%; background: var(--primary); }
.progress.thin { height: 0.375rem; }
.meter { height: 0.5rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }

/* Switch */
.switch {
  position: relative; width: 2.25rem; height: 1.25rem; flex-shrink: 0; border: 0; border-radius: 999px;
  background: var(--input); padding: 0; transition: background 0.15s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 999px;
  background: var(--background); box-shadow: 0 1px 2px oklch(0.2 0.02 260 / 0.2); transition: transform 0.15s;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(1rem); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Checkbox */
.check {
  display: grid; place-content: center; width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 0.15rem;
  border-radius: 0.125rem; border: 1px solid var(--primary); background: transparent; box-shadow: var(--shadow-sm); padding: 0; color: var(--primary-foreground);
}
.check.on { background: var(--primary); }
.check .ico { width: 0.85rem; height: 0.85rem; display: none; }
.check.on .ico { display: block; }

/* Menus, dialogs, sheets */
.menu {
  position: absolute; z-index: 50; min-width: 12rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: var(--popover); color: var(--popover-foreground);
  padding: 0.25rem; box-shadow: var(--shadow-float); 
}
.menu[hidden] { display: none; }
.menu-label { padding: 0.375rem 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.menu-item {
  display: flex; width: 100%; align-items: center; gap: 0.5rem; border: 0; background: transparent;
  border-radius: calc(var(--radius) - 4px); padding: 0.375rem 0.5rem; text-align: left; font-size: 0.875rem;
}
.menu-item:hover, .menu-item:focus { background: var(--accent); outline: none; }
.menu-item.danger { color: var(--destructive); }
.menu-sep { height: 1px; margin: 0.25rem 0; background: var(--border); }
.menu-item .grow { flex: 1; }
.menu-item small { display: block; font-size: 11px; color: var(--muted-foreground); font-weight: 400; }

.overlay { position: fixed; inset: 0; z-index: 50; background: oklch(0 0 0 / 0.8); }
.overlay[hidden], .dialog[hidden], .sheet[hidden] { display: none; }
.dialog {
  position: fixed; left: 50%; top: 50%; z-index: 51; width: min(32rem, calc(100% - 2rem));
  transform: translate(-50%, -50%); display: grid; gap: 1rem;
  border: 1px solid var(--border); background: var(--background); padding: 1.5rem;
  border-radius: 0.5rem; box-shadow: var(--shadow-float);
}
.dialog.sm { width: min(28rem, calc(100% - 2rem)); }
.dialog-x { position: absolute; right: 1rem; top: 1rem; border: 0; background: transparent; opacity: 0.7; padding: 0.15rem; border-radius: 0.25rem; }
.dialog-x:hover { opacity: 1; }
.dialog h3, .sheet h3 { font-size: 1.125rem; letter-spacing: -0.02em; }
.dialog .sub, .sheet .sub { font-size: 0.875rem; color: var(--muted-foreground); font-family: var(--font-sans); font-weight: 400; letter-spacing: 0; }
.dialog-actions { display: flex; flex-direction: column-reverse; gap: 0.5rem; }
@media (min-width: 640px) { .dialog-actions { flex-direction: row; justify-content: flex-end; } }

.sheet {
  position: fixed; z-index: 51; top: 0; bottom: 0; right: 0; width: min(36rem, 92vw);
  background: var(--background); border-left: 1px solid var(--border); box-shadow: var(--shadow-float);
  overflow-y: auto; padding: 1.5rem;
}
.sheet.left { right: auto; left: 0; width: 16rem; padding: 0; border-left: 0; border-right: 1px solid var(--border); background: var(--sidebar); }
.sheet.left.admin { background: var(--admin); color: var(--admin-foreground); border: 0; }

.toast-root { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  min-width: 16rem; max-width: 22rem; border-radius: 0.5rem; border: 1px solid var(--border);
  background: var(--card); padding: 0.75rem 0.9rem; font-size: 0.8125rem; box-shadow: var(--shadow-float);
}
.toast.success { border-color: color-mix(in oklch, var(--success) 30%, transparent); }
.toast.error { border-color: color-mix(in oklch, var(--destructive) 30%, transparent); }

/* Select */
.select { position: relative; }
.select-trigger { justify-content: space-between; align-items: center; gap: 0.5rem; text-align: left; background: transparent; cursor: pointer; }
.select-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-menu {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; min-width: 100%;
  max-height: 16rem; overflow: auto; border-radius: calc(var(--radius) - 2px); border: 1px solid var(--border);
  background: var(--popover); padding: 0.25rem; box-shadow: var(--shadow);
}
.select-menu[hidden] { display: none; }
.select-opt { display: flex; width: 100%; align-items: center; gap: 0.5rem; border: 0; background: transparent; border-radius: 0.25rem; padding: 0.4rem 0.5rem; text-align: left; font-size: 0.875rem; }
.select-opt:hover, .select-opt[aria-selected="true"] { background: var(--accent); }
.select.w-40 { width: 10rem; }
.select.w-48 { width: 12rem; }
.select.w-52 { width: 13rem; }
.select.w-56 { width: 14rem; }
.select.w-36 { width: 9rem; }
.select.w-32 { width: 8rem; }

/* Tabs */
.tabs { display: inline-flex; height: 2.25rem; align-items: center; border-radius: 0.5rem; background: var(--muted); padding: 0.25rem; color: var(--muted-foreground); gap: 0; flex-wrap: wrap; height: auto; }
.tab {
  border: 0; background: transparent; border-radius: calc(var(--radius) - 2px); padding: 0.25rem 0.75rem;
  font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); white-space: nowrap;
}
.tab.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.tab-panel { margin-top: 0.5rem; }
.tab-panel[hidden] { display: none; }

/* Accordion */
.acc-item { border-bottom: 1px solid var(--border); }
.acc-trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
  border: 0; background: transparent; padding: 1rem 0; text-align: left; font-size: 0.875rem; font-weight: 500;
}
.acc-trigger .ico { color: var(--muted-foreground); transition: transform 0.2s; }
.acc-item.open .acc-trigger .ico { transform: rotate(180deg); }
.acc-panel { display: none; padding-bottom: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.acc-item.open .acc-panel { display: block; }

/* App shell */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); border-right: 1px solid var(--border);
  background: var(--sidebar); display: none; flex-direction: column; z-index: 30;
}
.sidebar-brand { display: flex; height: var(--header-h); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0 1rem; }
.side-nav { flex: 1; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.125rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.625rem; border-radius: calc(var(--radius) - 2px);
  padding: 0.375rem 0.625rem; font-size: 13px; color: color-mix(in oklch, var(--sidebar-foreground) 80%, transparent);
}
.nav-link:hover { background: color-mix(in oklch, var(--sidebar-accent) 60%, transparent); }
.nav-link.active { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 500; }
.nav-link .ico { opacity: 0.8; }
.nav-badge { margin-left: auto; border-radius: 999px; background: var(--warning-soft); color: var(--warning); padding: 0 0.375rem; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.side-foot { border-top: 1px solid var(--border); padding: 0.75rem; }
.setup-banner {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; border-radius: 0.5rem;
  border: 1px solid color-mix(in oklch, var(--primary) 25%, transparent); background: var(--primary-soft);
  padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 500; color: var(--primary);
}
.shell-main { min-height: 100vh; }
.support-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--admin); color: var(--admin-foreground); padding: 0.5rem 1rem; font-size: 0.75rem;
}
.support-bar a { border: 1px solid color-mix(in oklch, var(--admin-foreground) 30%, transparent); border-radius: 0.25rem; padding: 0.125rem 0.5rem; }
.support-bar a:hover { background: color-mix(in oklch, var(--admin-foreground) 10%, transparent); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; height: var(--header-h); align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--background) 85%, transparent);
  backdrop-filter: blur(8px); padding: 0 1rem;
}
.shell.support .topbar { top: 2rem; }
.topbar .spacer { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.ws-btn {
  display: flex; align-items: center; gap: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--border);
  background: var(--card); padding: 0.375rem 0.625rem; text-align: left; font-size: 0.875rem; box-shadow: var(--shadow-soft);
}
.ws-btn:hover { background: var(--accent); }
.ws-mark { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: calc(var(--radius) - 2px); background: var(--primary); color: var(--primary-foreground); font-size: 10px; font-weight: 600; }
.ws-mark.soft { background: var(--accent); color: var(--foreground); }
.content { max-width: var(--max); margin: 0 auto; padding: 1rem; }
.bell { position: relative; }
.bell .ping { position: absolute; right: 0.5rem; top: 0.5rem; width: 0.375rem; height: 0.375rem; border-radius: 999px; background: var(--primary); }
.only-lg { display: none; }
.only-md { display: none; }
.hide-lg { display: inline-flex; }

/* Admin shell */
.sidebar.admin { background: var(--admin); color: var(--admin-foreground); border-right: 0; }
.sidebar.admin .sidebar-brand { border-bottom-color: color-mix(in oklch, var(--admin-foreground) 10%, transparent); }
.sidebar.admin .side-foot { border-top-color: color-mix(in oklch, var(--admin-foreground) 10%, transparent); }
.admin-tag { border-radius: 0.25rem; background: color-mix(in oklch, var(--admin-foreground) 10%, transparent); padding: 0.125rem 0.375rem; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-link.admin { color: var(--admin-foreground); opacity: 0.75; }
.nav-link.admin:hover { background: color-mix(in oklch, var(--admin-foreground) 5%, transparent); opacity: 1; }
.nav-link.admin.active { background: color-mix(in oklch, var(--admin-foreground) 12%, transparent); opacity: 1; font-weight: 500; }
.nav-link.admin .ico { opacity: 1; }
.user-chip { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.user-chip small { display: block; font-size: 11px; color: var(--muted-foreground); }

/* Grids */
.g-2 { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
.g-3 { display: grid; gap: 1rem; }
.g-4 { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
.g-6 { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
.g-5, .g-8 { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
.search { position: relative; }
.search > .ico { position: absolute; left: 0.65rem; top: 0.65rem; color: var(--muted-foreground); pointer-events: none; }
.search .input { padding-left: 2.1rem; }
.g-main { display: grid; gap: 1rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.wrap { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.split { display: grid; gap: 1rem; }
.filters { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.filters > .table-wrap, .filters > .surface { flex: 1 0 100%; }
.w-72 { width: 100%; }
.right { margin-left: auto; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--destructive); }
.primary { color: var(--primary); }
.capitalize { text-transform: capitalize; }
.pre { white-space: pre-wrap; }
.divide > * + * { border-top: 1px solid var(--border); }
.linkish { color: var(--primary); }
.linkish:hover { text-decoration: underline; }
.choice {
  display: block; width: 100%; text-align: left; border-radius: 0.75rem; border: 1px solid var(--border);
  background: var(--card); padding: 0.875rem 1rem; transition: background 0.15s;
}
.choice:hover { background: color-mix(in oklch, var(--accent) 50%, transparent); }
.choice.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 15%, transparent); }
.choice-row { display: flex; align-items: flex-start; gap: 0.75rem; border-radius: 0.75rem; border: 1px solid var(--border); padding: 1rem; cursor: pointer; }
.mini-card { border-radius: 0.5rem; border: 1px solid var(--border); padding: 0.75rem; }
.ring-current { box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 20%, transparent); }
.kpi-hero { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.list-btn { display: flex; width: 100%; gap: 0.75rem; border: 0; background: transparent; text-align: left; padding: 0.75rem; }
.list-btn:hover, .list-btn.on { background: color-mix(in oklch, var(--accent) 50%, transparent); }
.list-btn.on { background: var(--accent); }
.msg-system { display: flex; align-items: center; gap: 0.75rem; font-size: 11px; color: var(--muted-foreground); }
.msg-system .line { height: 1px; flex: 1; background: var(--border); }
.msg-system span { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 0.125rem 0.625rem; }
.bubble { display: flex; gap: 0.75rem; }
.bubble.out { flex-direction: row-reverse; }
.bubble .body { max-width: 75%; }
.bubble.out .body { text-align: right; }
.bubble .meta { display: flex; align-items: center; gap: 0.375rem; font-size: 11px; color: var(--muted-foreground); }
.bubble.out .meta { justify-content: flex-end; }
.bubble .text { margin-top: 0.25rem; display: inline-block; border-radius: 1rem; padding: 0.5rem 0.875rem; text-align: left; font-size: 0.875rem; }
.bubble.in .text { border-top-left-radius: 0.25rem; border: 1px solid var(--border); background: var(--card); }
.bubble.bot .text { border-top-right-radius: 0.25rem; background: var(--primary-soft); }
.bubble.staff .text { border-top-right-radius: 0.25rem; background: var(--success-soft); }
.bot-avatar { display: grid; place-items: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); }
.note-card { margin-left: 2.5rem; border-radius: 0.5rem; border: 1px solid color-mix(in oklch, var(--note) 30%, transparent); background: var(--note-soft); padding: 0.75rem; font-size: 0.875rem; }
.note-card .meta { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.25rem; font-size: 11px; font-weight: 500; color: var(--note); }
.inbox { display: flex; height: calc(100vh - var(--header-h)); margin: -1rem; }
.inbox-list { display: flex; width: 100%; flex-direction: column; border-right: 1px solid var(--border); background: var(--card); min-height: 0; }
.inbox-list .head { padding: 0.75rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.inbox-list ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.inbox-list li + li { border-top: 1px solid var(--border); }
.inbox-main { display: none; min-width: 0; flex: 1; flex-direction: column; background: var(--background); }
.conv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.inbox-main.show { display: flex; }
.inbox-side { display: none; width: 20rem; flex-shrink: 0; overflow-y: auto; border-left: 1px solid var(--border); background: var(--card); padding: 1.25rem; }
.conv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border); background: var(--card); padding: 0.625rem 1rem; }
.transcript { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.composer { border-top: 1px solid var(--border); background: var(--card); padding: 0.75rem; }
.composer.note { background: var(--note-soft); }
.sim-box { margin-top: 1.5rem; border-radius: 0.75rem; border: 1px dashed color-mix(in oklch, var(--warning) 40%, transparent); background: color-mix(in oklch, var(--warning-soft) 50%, transparent); padding: 1rem; }
.dl dt { font-size: 0.75rem; color: var(--muted-foreground); }
.dl dd { margin: 0.125rem 0 0; }
.dl > div + div { margin-top: 0.75rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.timeline li { position: relative; font-size: 0.875rem; }
.timeline li::before { content: ""; position: absolute; left: -1.3rem; top: 0.4rem; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--primary); }
.cal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.cal-day { min-height: 7rem; padding: 0.625rem; }
.cal-day.today { box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 30%, transparent); }
.cal-chip { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-radius: 0.25rem; padding: 0.25rem 0.375rem; text-align: left; font-size: 11px; margin-top: 0.25rem; }
.cal-chip.soon { background: var(--primary-soft); color: var(--primary); }
.cal-chip.late { background: var(--warning-soft); color: var(--warning); }
.steps { display: flex; gap: 0.25rem; overflow-x: auto; margin-bottom: 1.25rem; }
.step-tab { display: flex; flex-shrink: 0; align-items: center; gap: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--border); background: var(--card); padding: 0.375rem 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.step-tab.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.step-tab.done { color: var(--foreground); }
.step-n { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; border: 1px solid var(--border); font-size: 10px; }
.step-tab.done .step-n { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.wizard { display: grid; gap: 1.5rem; }
.wizard-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.wizard-nav button { display: flex; width: 100%; align-items: center; gap: 0.75rem; border: 0; background: transparent; border-radius: 0.5rem; padding: 0.5rem 0.75rem; text-align: left; font-size: 0.875rem; color: var(--muted-foreground); }
.wizard-nav button.on { background: var(--accent); font-weight: 500; color: var(--foreground); }
.wizard-nav button.done { color: var(--foreground); }
.discord {
  overflow: hidden; border-radius: 0.75rem; border: 1px solid var(--border); background: var(--admin); color: var(--admin-foreground); box-shadow: var(--shadow-float);
}
.discord-h { border-bottom: 1px solid color-mix(in oklch, var(--admin-foreground) 10%, transparent); padding: 0.625rem 1rem; font-size: 0.75rem; opacity: 0.7; }
.discord-b { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.discord-msg { display: flex; gap: 0.75rem; }
.discord-av { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: 999px; color: white; font-weight: 600; }
.offer-embed { margin-left: 3rem; border-radius: calc(var(--radius) - 2px); border-left: 4px solid var(--primary); background: color-mix(in oklch, var(--admin-foreground) 5%, transparent); padding: 0.75rem; font-size: 0.75rem; }
.chart { width: 100%; height: 16rem; }
.chart.sm { height: 13rem; }
.funnel-row { margin-bottom: 0.75rem; }
.funnel-row .top { display: flex; justify-content: space-between; font-size: 0.75rem; }
.attn { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow-y: auto; }
.attn a, .activity li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1.25rem; font-size: 0.875rem; }
.attn a { justify-content: space-between; }
.attn a:hover { background: color-mix(in oklch, var(--accent) 50%, transparent); }
.dot-s { width: 0.375rem; height: 0.375rem; border-radius: 999px; margin-top: 0.4rem; flex-shrink: 0; }
.dot-s.success { background: var(--success); } .dot-s.warning { background: var(--warning); } .dot-s.danger { background: var(--destructive); } .dot-s.primary { background: var(--primary); } .dot-s.muted { background: var(--muted-foreground); }
.cards-3 { display: grid; gap: 0.75rem; }
.icon-tile { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: var(--primary-soft); color: var(--primary); }
.icon-tile.line { background: transparent; border: 1px solid var(--border); }
.res-ico { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.5rem; background: var(--primary-soft); color: var(--primary); }
.sticky-preview { }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }
.ws-block[hidden] { display: none !important; }
fieldset.locked { pointer-events: none; opacity: 0.72; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Landing */
.site-header { position: sticky; top: 0; z-index: 40; overflow: hidden; border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--background) 80%, transparent); backdrop-filter: blur(10px); }
.site-header .inner, .land, .foot-inner { max-width: var(--max-landing); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.site-header .inner { display: flex; height: 4rem; align-items: center; justify-content: space-between; }
.site-nav { display: none; align-items: center; gap: 1.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.site-nav a:hover { color: var(--foreground); }
.hero { position: relative; overflow: hidden; background-image: var(--gradient-hero); }
.hero-grid {
  pointer-events: none; position: absolute; inset: 0; opacity: 0.6;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-inner { position: relative; padding: 5rem 0 5rem; text-align: center; }
.hero h1 { font-size: 3rem; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.hero h1 span { color: var(--primary); }
.hero .lead { margin: 1.5rem auto 0; max-width: 42rem; font-size: 1.125rem; color: var(--muted-foreground); text-wrap: pretty; }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.hero-stage { position: relative; margin: 4rem auto 0; max-width: 72rem; }
.preview { overflow: hidden; box-shadow: var(--shadow-float); }
.preview-bar { display: flex; align-items: center; gap: 0.375rem; border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--muted) 50%, transparent); padding: 0.625rem 1rem; }
.win-dot { width: 0.625rem; height: 0.625rem; border-radius: 999px; background: var(--border); }
.preview-side { display: none; }
.preview-main { padding: 1.25rem; }
.float-card { display: none; position: absolute; box-shadow: var(--shadow-float); }
.compat { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--card); }
.compat .inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2rem 1.25rem; max-width: var(--max-landing); margin: 0 auto; }
.brand-row { display: flex; align-items: center; gap: 2.5rem; color: var(--muted-foreground); font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.section { padding: 6rem 0; }
.section-y { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--card); }
.section-head { margin: 0 auto; max-width: 42rem; text-align: center; }
.kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); font-family: var(--font-sans); }
.section-head h2, .feature h2 { font-size: 1.875rem; text-wrap: balance; margin-top: 0.75rem; }
.benefits { margin-top: 3rem; display: grid; gap: 1px; overflow: hidden; border-radius: 1rem; border: 1px solid var(--border); background: var(--border); }
.benefit { background: var(--card); padding: 2rem; }
.benefit h3 { margin-top: 1.25rem; font-size: 1.25rem; }
.benefit p, .step p, .feature .body { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: var(--muted-foreground); }
.steps { display: grid; gap: 1.5rem; margin-top: 3rem; }
.step { border-radius: 1rem; border: 1px solid var(--border); padding: 1.75rem; }
.step h3 { margin-top: 1.5rem; font-size: 1.125rem; }
.feature { padding: 5rem 0; }
.feature-grid { display: grid; align-items: center; gap: 3rem; }
.feature ul { margin: 1.5rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.feature li { display: flex; gap: 0.625rem; font-size: 0.875rem; }
.feature li .ico { margin-top: 0.125rem; color: var(--primary); }
.chat { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.875rem; }
.chat-row { display: flex; gap: 0.625rem; }
.chat-av { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 999px; font-size: 10px; font-weight: 600; }
.chat-av.bot { background: var(--primary); color: var(--primary-foreground); }
.chat-av.mem { background: var(--accent); color: var(--accent-foreground); }
.chat-row .who { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 600; }
.chat-row .say { margin-top: 0.125rem; font-size: 13px; line-height: 1.35; color: color-mix(in oklch, var(--foreground) 85%, transparent); }
.sys-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; font-size: 11px; color: var(--muted-foreground); }
.sys-line i { height: 1px; flex: 1; background: var(--border); font-style: normal; }
.pair { display: grid; gap: 1.5rem; }
.price-grid { display: grid; gap: 1rem; max-width: 48rem; margin: 3rem auto 0; }
.price { border-radius: 1rem; border: 1px solid var(--border); padding: 2rem; }
.price.featured { border-color: color-mix(in oklch, var(--primary) 40%, transparent); background: color-mix(in oklch, var(--primary-soft) 40%, transparent); box-shadow: 0 0 0 1px color-mix(in oklch, var(--primary) 20%, transparent); }
.price .amt { margin-top: 1.5rem; font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; }
.pay-grid { display: grid; gap: 1rem; margin-top: 2.5rem; }
.pay { border-radius: 1rem; border: 1px solid var(--border); background: var(--background); padding: 1.5rem; }
.pay h4 { margin-top: 1rem; font-size: 1rem; }
.pay p { margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.6; color: var(--muted-foreground); }
.include { margin: 3.5rem auto 0; max-width: 64rem; border-radius: 1rem; border: 1px solid var(--border); padding: 2rem; }
.include ul { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; font-size: 0.875rem; }
.include li { display: flex; align-items: flex-start; gap: 0.625rem; }
.cta { position: relative; overflow: hidden; border-radius: 1.5rem; border: 1px solid var(--border); background-image: var(--gradient-hero); padding: 4rem 2rem; text-align: center; }
.cta h2 { font-size: 2.25rem; text-wrap: balance; }
.site-footer { border-top: 1px solid var(--border); background: var(--card); }
.foot-inner { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.foot-links a:hover { color: var(--foreground); }
.center { text-align: center; }
.balance { text-wrap: balance; }

@media (min-width: 640px) {
  .g-4.md, .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .include ul { grid-template-columns: repeat(2, 1fr); }
  .cal { grid-template-columns: repeat(4, 1fr); }
  .dialog-actions { flex-direction: row; }
}
@media (min-width: 768px) {
  .only-md { display: block; }
  .site-nav { display: flex; }
  .hero h1 { font-size: 3.75rem; }
  .hero-inner { padding-top: 7rem; }
  .compat .inner { flex-direction: row; }
  .benefits, .steps, .feature-grid, .pair, .price-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(3, 1fr); }
  .feature.flip .feature-copy { order: 2; }
  .section-head h2 { font-size: 2.25rem; }
  .preview-grid { display: grid; grid-template-columns: 180px 1fr; }
  .preview-side { display: block; border-right: 1px solid var(--border); padding: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
  .preview-side div { border-radius: calc(var(--radius) - 2px); padding: 0.375rem 0.625rem; }
  .preview-side div.on { background: var(--accent); font-weight: 500; color: var(--foreground); }
  .float-card { display: block; padding: 1rem; }
  .float-left { left: -1rem; bottom: -2.5rem; width: 20rem; }
  .float-right { right: -1rem; top: -2rem; width: 18rem; }
  .page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .content { padding: 1.5rem; }
  .topbar { padding: 0 1.5rem; }
  .inbox { margin: -1.5rem; height: calc(100vh - var(--header-h)); }
  .inbox-list { width: 20rem; flex-shrink: 0; }
  .inbox.has-conv .inbox-list { display: flex; }
  .inbox-main { display: flex; }
  .inbox:not(.has-conv) .inbox-empty { display: flex; }
  .transcript { padding: 1.5rem; }
  .filters { flex-direction: row; align-items: center; justify-content: space-between; }
  .w-72 { width: 18rem; }
  .g-4 { grid-template-columns: repeat(4, 1fr); }
  .foot-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}
@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .shell-main { padding-left: var(--sidebar-w); }
  .hide-lg { display: none !important; }
  .only-lg { display: revert; }
  .g-5 { grid-template-columns: repeat(5, 1fr); }
  .g-6 { grid-template-columns: repeat(6, 1fr); }
  .g-8 { grid-template-columns: repeat(4, 1fr); }
  .split.xl, .g-main { grid-template-columns: 2fr 1fr; }
  .split.half { grid-template-columns: 1fr 1fr; }
  .wizard { grid-template-columns: 240px 1fr; }
  .builder { display: grid; grid-template-columns: 1fr 380px; gap: 1.25rem; align-items: start; }
  .brand-layout { display: grid; grid-template-columns: 1fr 400px; gap: 1rem; align-items: start; }
  .know-layout { display: grid; grid-template-columns: 1fr 400px; gap: 1rem; align-items: start; }
  .float-left { left: -2.5rem; }
  .float-right { right: -2.5rem; }
  .include ul { grid-template-columns: repeat(3, 1fr); }
  .cal { grid-template-columns: repeat(7, 1fr); }
  .g-3.lg { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .g-8 { grid-template-columns: repeat(8, 1fr); }
  .inbox-side { display: block; }
  .g-main.three, .split.three { grid-template-columns: 1fr 1fr 1fr; }
  .sticky-preview { position: sticky; top: 5rem; }
}
@media (max-width: 767px) {
  .inbox.has-conv .inbox-list { display: none; }
  .inbox.has-conv .inbox-main { display: flex; }
  .inbox-empty { display: none; }
  .ws-name { display: none; }
}
.inbox-empty { display: none; flex: 1; align-items: center; justify-content: center; }
.form-3 { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .form-3.sm3 { grid-template-columns: repeat(3, 1fr); } .form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; } }
.bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 8rem; margin-top: 1rem; }
.bars i { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 0.25rem 0.25rem 0 0; background: color-mix(in oklch, var(--primary) 15%, transparent); font-style: normal; }
.bars i span { display: block; border-radius: 0.25rem 0.25rem 0 0; background: var(--primary); }
.legend { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; }
.legend b { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 2px; margin-right: 0.35rem; }
.reason-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; font-size: 0.875rem; }
.crm-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0.875rem 1.25rem; }
.crm-row:last-of-type { border-bottom: 0; }
.footer-note { display: flex; align-items: center; gap: 0.5rem; background: color-mix(in oklch, var(--muted) 50%, transparent); padding: 0.75rem 1.25rem; font-size: 0.75rem; color: var(--muted-foreground); }
.three-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; text-align: center; }
.three-mini div { border-radius: 0.75rem; border: 1px solid var(--border); background: var(--background); padding: 0.75rem; }
.bot-card { display: flex; align-items: center; gap: 0.75rem; border-radius: 0.75rem; border: 1px solid var(--border); background: var(--background); padding: 1rem; margin-top: 1.5rem; }
.avatar-letter { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-size: 0.875rem; font-weight: 600; }
.error { font-size: 0.75rem; color: var(--destructive); }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 0.25rem; margin-bottom: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.back-link:hover { color: var(--foreground); }
.qa { border-bottom: 1px solid var(--border); padding: 0.5rem 0; }
.qa .q { font-size: 0.75rem; color: var(--muted-foreground); }
.test-log { height: 24rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.ask { margin-left: auto; width: fit-content; max-width: 85%; border-radius: 0.75rem; border: 1px solid var(--border); padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.reply { display: flex; gap: 0.5rem; font-size: 0.875rem; }
.reply .bubble-t { border-radius: 0.75rem; background: var(--primary-soft); padding: 0.5rem 0.75rem; }
.src { margin-top: 0.25rem; display: flex; align-items: center; gap: 0.375rem; font-size: 11px; color: var(--muted-foreground); }
.upload { border: 1px dashed var(--border); border-radius: 0.5rem; padding: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.perm-yes { color: var(--primary); } .perm-no { color: color-mix(in oklch, var(--muted-foreground) 40%, transparent); }
.server-row { display: flex; align-items: center; justify-content: space-between; border-radius: 0.5rem; border: 1px solid var(--border); padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.issue { display: flex; gap: 0.5rem; border-radius: 0.5rem; border: 1px solid color-mix(in oklch, var(--warning) 30%, transparent); background: var(--warning-soft); padding: 0.625rem; font-size: 0.75rem; }
.integ { display: flex; flex-direction: column; padding: 1.25rem; }
.span-2 { grid-column: span 2; }
@media (max-width: 1023px) { .span-2 { grid-column: auto; } }
