/* ==========================================================================
   SwiftByte Studio — design system v2
   Brand: SwiftByte blue #1400FF (from the logo) on white.
   One bold moment per screen (the blue hero); everything else quiet and precise.
   ========================================================================== */
:root {
  --brand: #1400ff;
  --brand-600: #1100d4;
  --brand-700: #0c00a3;
  --brand-50: #f2f1ff;
  --brand-100: #e4e2ff;
  --brand-200: #c9c5ff;
  --ink: #0b0d2b;
  --ink-2: #474b6b;
  --ink-3: #868aa6;
  --ink-4: #b4b7cc;
  --line: #e8e9f1;
  --line-2: #f0f1f6;
  --canvas: #f7f7fb;
  --white: #ffffff;
  --ok: #067a52;   --ok-bg: #e7f7ef;   --ok-dot: #12b76a;
  --warn: #8a5300; --warn-bg: #fff5e1; --warn-dot: #f5a524;
  --bad: #b42335;  --bad-bg: #fdecee;  --bad-dot: #f04461;
  --info: var(--brand); --info-bg: var(--brand-50);
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(11,13,43,0.05);
  --sh-2: 0 1px 2px rgba(11,13,43,0.04), 0 6px 20px -8px rgba(11,13,43,0.10);
  --sh-3: 0 2px 4px rgba(11,13,43,0.04), 0 18px 48px -16px rgba(11,13,43,0.22);
  --sh-brand: 0 1px 1px rgba(20,0,255,0.25), 0 6px 16px -6px rgba(20,0,255,0.55);
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --rail: 264px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--canvas); font-feature-settings: "ss01", "cv11"; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-100); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.018em; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.84em; background: var(--brand-50); color: var(--brand-700); padding: 2px 6px; border-radius: 5px; word-break: break-all; }
small { font-size: 0.82rem; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: 0.84rem; line-height: 1.5; }
.hidden { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; color: var(--ink); }
.neg { color: var(--bad); }
.pad { padding: 18px 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 40;
  background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); padding: 4px 10px 22px; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: var(--sh-brand); display: block; }
.brand-text { font-weight: 700; font-size: 1.04rem; letter-spacing: -0.02em; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; font-size: 0.76rem; color: var(--ink-3); letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: 0.74rem; font-weight: 600; color: var(--ink-3); padding: 16px 12px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 0.93rem; transition: background .15s var(--ease), color .15s; }
.nav a .ic { color: var(--ink-3); transition: color .15s; }
.nav a:hover { background: var(--canvas); color: var(--ink); }
.nav a:hover .ic { color: var(--ink-2); }
.nav a.on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.nav a.on .ic { color: var(--brand); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-grid; place-items: center; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.status-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: linear-gradient(180deg, #fff, var(--canvas)); display: flex; flex-direction: column; gap: 4px; }
.conn { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 0.85rem; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(18,183,106,0.18); }
.conn.off i { background: var(--warn-dot); box-shadow: 0 0 0 3px rgba(245,165,36,0.2); }
.status-card small { color: var(--ink-3); }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.who .avatar { width: 32px; height: 32px; font-size: 0.78rem; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who-text strong { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text a { color: var(--ink-3); font-size: 0.8rem; }
.who-text a:hover { color: var(--brand); }

.main { flex: 1; margin-left: var(--rail); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(247,247,251,0.82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  display: flex; align-items: center; gap: 14px; padding: calc(16px + env(safe-area-inset-top, 0px)) 36px 16px; border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 1.36rem; font-weight: 650; letter-spacing: -0.025em; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 10px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; box-shadow: var(--sh-1); }
.menu-btn span { width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; }
.content { padding: 8px 36px calc(56px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 22px; max-width: 1320px; width: 100%; }

/* ---------- Surfaces ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; box-shadow: var(--sh-1); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.012em; }
.cols { display: flex; gap: 22px; align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.side-stack { width: 350px; flex: none; display: flex; flex-direction: column; gap: 22px; }
.side-stack.wide-side { width: 430px; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { color: var(--ink-3); font-size: 0.86rem; display: flex; align-items: center; gap: 2px; }
.crumbs a { color: var(--ink-2); font-weight: 500; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; color: var(--ink-4); }
.h-sm { font-size: 0.94rem; font-weight: 600; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 0.875rem; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), box-shadow .15s, border-color .15s, transform .08s, color .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn.primary:hover { background: var(--brand-600); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--sh-1); }
.btn.ghost:hover { border-color: var(--brand-200); color: var(--brand-700); background: #fff; }
.btn.danger-ghost { background: #fff; color: var(--bad); border-color: #f5cfd5; }
.btn.danger-ghost:hover { background: var(--bad-bg); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 0.82rem; border-radius: 8px; }
.btn.lg { height: 46px; font-size: 0.95rem; border-radius: 12px; }
.btn[disabled], .btn.busy { opacity: 0.55; cursor: not-allowed; transform: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }
form.inline { display: inline; }

/* ---------- Chips & status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); vertical-align: middle; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.ok::before { background: var(--ok-dot); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.warn::before { background: var(--warn-dot); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.bad::before { background: var(--bad-dot); }
.chip.info { background: var(--brand-50); color: var(--brand-700); }
.chip.info::before { background: var(--brand); }
a.chip:hover { filter: brightness(0.97); }

.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 650; font-size: 0.82rem; letter-spacing: 0.01em; color: var(--brand-700); background: var(--brand-50); box-shadow: inset 0 0 0 1px rgba(20,0,255,0.08); }
.avatar.h1 { background: #eef4ff; color: #1d4ed8; }
.avatar.h2 { background: #f1f0ff; color: #4b2bd6; }
.avatar.h3 { background: #ecfbf4; color: #067a52; }
.avatar.h4 { background: #fff4e8; color: #a14d00; }
.avatar.h5 { background: #fdf0f6; color: #a3195b; }
.avatar svg { width: 16px; height: 16px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.person strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Notices & empty states ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); border: 1px solid; font-weight: 500; font-size: 0.9rem; animation: fadein .25s var(--ease); }
.notice::before { content: ""; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; flex: none; }
.notice.ok { background: var(--ok-bg); border-color: #c4ead7; color: #05583b; }
.notice.ok::before { background: var(--ok-dot); }
.notice.warn { background: var(--warn-bg); border-color: #f4dfae; color: #6a4000; }
.notice.warn::before { background: var(--warn-dot); }
.notice.error { background: var(--bad-bg); border-color: #f6c7ce; color: #8c1a2a; }
.notice.error::before { background: var(--bad-dot); }
.notice a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.panel .notice { margin: 16px 22px 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.empty { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: var(--sh-1); }
.empty::before { content: ""; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 8px; background: var(--brand-50) url("logo-mark-blue.png") center / 22px no-repeat; box-shadow: inset 0 0 0 1px var(--brand-100); }
.empty h3 { font-size: 1.08rem; font-weight: 600; }
.empty p { color: var(--ink-2); max-width: 50ch; margin-bottom: 8px; }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-weight: 550; font-size: 0.86rem; color: var(--ink); min-width: 0; }
label small { font-weight: 450; }
input, select, textarea { font: inherit; font-size: 0.92rem; font-weight: 450; color: var(--ink); background: #fff; border: 1px solid #dfe1eb; border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; box-shadow: var(--sh-1); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:hover, select:hover, textarea:hover { border-color: #cfd2e0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20,0,255,0.12); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868aa6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea { resize: vertical; line-height: 1.6; }
textarea.mono-soft { font-size: 0.9rem; }
textarea.code { font-family: var(--mono); font-size: 0.8rem; line-height: 1.55; white-space: pre; tab-size: 2; background: #fbfbfe; }
input[type=range] { padding: 0; border: 0; box-shadow: none; accent-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); flex: none; margin: 0; box-shadow: none; }
input:disabled, select:disabled { background: var(--canvas); color: var(--ink-3); box-shadow: none; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 450; line-height: 1.45; }
label.check input { margin-top: 2px; }
label.invalid input, label.invalid textarea, label.invalid select { border-color: var(--bad-dot); box-shadow: 0 0 0 4px rgba(240,68,97,0.1); }
.field-err, label em { color: var(--bad); font-style: normal; font-size: 0.8rem; font-weight: 550; }
output { font-weight: 650; color: var(--brand); font-variant-numeric: tabular-nums; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.align-end { align-items: end; }
fieldset.group { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 18px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; background: #fff; }
fieldset.group legend { font-weight: 650; font-size: 0.9rem; padding: 0 6px; letter-spacing: -0.01em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { flex-direction: row; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; font-weight: 550; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.seg label:hover { border-color: var(--brand-200); }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); box-shadow: 0 0 0 3px rgba(20,0,255,0.08); }
.inline-form { display: flex; gap: 8px; }
.inline-form input, .inline-form select { flex: 1; }
.inline-edit { display: flex; gap: 6px; align-items: center; }
.inline-edit input { padding: 5px 9px; font-size: 0.85rem; max-width: 170px; box-shadow: none; border-color: transparent; background: transparent; }
.inline-edit input:hover { border-color: var(--line); background: #fff; }
.inline-edit input:focus { background: #fff; }
.inline-edit .btn { visibility: hidden; }
.inline-edit:focus-within .btn { visibility: visible; }
.copy-row { display: flex; align-items: center; gap: 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px 9px 14px; }
.copy-row code { flex: 1; background: none; padding: 0; color: var(--ink); font-size: 0.8rem; }
.consent { background: var(--brand-50); border-radius: 10px; padding: 11px 13px; box-shadow: inset 0 0 0 1px var(--brand-100); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: none; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.89rem; }
.table th { text-align: left; font-size: 0.76rem; font-weight: 600; color: var(--ink-3); padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfe; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions > * { margin-left: 4px; }
.rowlink { cursor: pointer; transition: background .12s; }
.rowlink:hover td { background: #fafaff; }
.row-on td { background: var(--brand-50); }
.summary-cell { max-width: 440px; color: var(--ink-2); line-height: 1.5; }
.err-text { color: var(--bad); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--ink-2); font-size: 0.88rem; }

/* ---------- Overview hero: the one bold moment ---------- */
.hero-strip {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(260px, 1fr) 1.6fr; gap: 32px; align-items: end;
  border-radius: var(--r-xl); padding: 30px 32px 26px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #2f22ff 0%, var(--brand) 42%, #0b00a8 100%);
  box-shadow: 0 24px 60px -28px rgba(20,0,255,0.65), inset 0 1px 0 rgba(255,255,255,0.15);
}
.hero-strip::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(80% 90% at 85% 10%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(80% 90% at 85% 10%, #000 20%, transparent 75%); }
.hero-strip::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 300px; height: 300px; z-index: -1; background: url("logo-mark-white.png") center / contain no-repeat; opacity: 0.06; transform: rotate(-8deg); }
.hero-label { color: rgba(255,255,255,0.78); font-weight: 550; font-size: 0.92rem; }
.hero-num { font-size: 5rem; font-weight: 650; line-height: 0.95; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; margin: 10px 0 14px; color: #fff; }
.hero-sub { color: rgba(255,255,255,0.82); font-size: 0.9rem; }
.hero-strip .linkish { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.5); }
.hero-chart svg { width: 100%; height: 140px; display: block; overflow: visible; }
.hero-chart .bar { fill: rgba(255,255,255,0.22); transition: fill .15s; }
.hero-chart .bar:hover { fill: rgba(255,255,255,0.5); }
.hero-chart .bar.today { fill: #fff; }
.hero-chart .axis { fill: rgba(255,255,255,0.6); font-size: 9px; font-family: var(--font); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s; }
.kpi:hover { box-shadow: var(--sh-2); }
.kpi > span { color: var(--ink-2); font-size: 0.83rem; line-height: 1.3; font-weight: 550; display: flex; align-items: center; gap: 9px; }
.kpi-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi-ic svg { width: 15px; height: 15px; }
.kpi strong { font-size: 1.95rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; margin-top: 8px; line-height: 1.1; }
.kpi strong.attn { color: #c26a00; }
.kpi small { color: var(--ink-3); }
.kpi.save { background: linear-gradient(160deg, #fff 0%, var(--brand-50) 100%); border-color: var(--brand-100); }
.kpi.save strong { color: var(--brand); }
.kpi .of { font-size: 1rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.cb-row { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); color: var(--ink); transition: background .12s; }
.cb-row:last-child { border-bottom: 0; }
.cb-row:hover { background: #fafaff; color: var(--ink); }
.cb-row small { color: var(--ink-2); line-height: 1.45; }
.setup { list-style: none; margin: 0; padding: 6px 22px 12px; }
.setup li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.setup li:last-child { border-bottom: 0; }
.setup a { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }

/* ---------- Agent editor ---------- */
.builder { border-color: var(--brand-100); box-shadow: var(--sh-2); }
.tabs { display: flex; gap: 4px; padding: 4px; background: #eef0f6; border-radius: 12px; overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; border-radius: 9px; padding: 8px 14px; font: inherit; font-weight: 550; font-size: 0.87rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11,13,43,0.08), 0 2px 8px -2px rgba(11,13,43,0.08); }
.tabpane { display: none; flex-direction: column; gap: 18px; animation: fadein .2s var(--ease); }
.tabpane.on { display: flex; }
.agent-form { display: flex; flex-direction: column; gap: 18px; }
.agent-form > .tabpane { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-1); }
.savebar { position: sticky; bottom: 14px; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 10px 10px 10px 18px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-2); }
.savebar [data-dirty-msg] { margin-right: auto; font-size: 0.88rem; }
.savebar.dirty { border-color: var(--brand-200); box-shadow: var(--sh-3); }
.savebar.dirty [data-dirty-msg] { color: var(--brand-700); font-weight: 600; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-item { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.row-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fcfcfe; }
.row-card > .btn { align-self: flex-start; }
.char-count { align-self: flex-end; color: var(--ink-3); font-size: 0.76rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Chat test */
.chat { height: 400px; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #fbfbfe, #f6f6fb); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.chat .msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 0.91rem; white-space: pre-wrap; line-height: 1.5; animation: fadein .2s var(--ease); }
.chat .msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; box-shadow: var(--sh-brand); }
.chat .msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--sh-1); }
.chat .msg.err { align-self: center; background: var(--bad-bg); color: #8c1a2a; font-size: 0.84rem; }
.chat .msg.typing { color: var(--ink-3); }
.chat-input { display: flex; gap: 8px; padding: 14px 22px 18px; }

/* Transcript */
.transcript { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.t-msg { max-width: 80%; display: flex; flex-direction: column; gap: 4px; }
.t-msg p { padding: 11px 15px; border-radius: 16px; font-size: 0.92rem; line-height: 1.55; }
.t-who { font-size: 0.72rem; font-weight: 600; color: var(--ink-3); padding: 0 8px; }
.t-msg.agent { align-self: flex-start; }
.t-msg.agent p { background: var(--brand-50); color: var(--ink); border-top-left-radius: 5px; box-shadow: inset 0 0 0 1px var(--brand-100); }
.t-msg.caller { align-self: flex-end; text-align: right; }
.t-msg.caller p { background: #fff; border: 1px solid var(--line); border-top-right-radius: 5px; text-align: left; box-shadow: var(--sh-1); }
.t-msg.sys { align-self: center; max-width: 92%; }
.t-msg.sys p { background: var(--canvas); font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); }
.t-tool { align-self: center; font-size: 0.76rem; font-weight: 600; color: var(--brand-700); background: var(--brand-50); border-radius: 999px; padding: 4px 12px; box-shadow: inset 0 0 0 1px var(--brand-100); }
.summary-lead { font-size: 1.06rem; line-height: 1.65; margin-bottom: 14px; max-width: 72ch; color: var(--ink); letter-spacing: -0.005em; }
audio { width: 100%; height: 44px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; padding: 18px 22px; margin: 0; font-size: 0.89rem; }
.facts dt { color: var(--ink-3); font-weight: 500; }
.facts dd { margin: 0; font-weight: 550; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.filters input[type=search] { flex: 1 1 240px; padding-left: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23868aa6' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat; }
.filters select { width: auto; flex: 0 1 180px; }
.filters label.mini { flex-direction: row; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink-2); font-weight: 500; }
.filters label.mini input[type=date] { width: auto; padding: 7px 8px; }

/* Usage */
.usage-cell { min-width: 170px; }
.meter { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 5px 0; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #5a4dff, var(--brand)); border-radius: 99px; transition: width .6s var(--ease); }
.meter.near i { background: linear-gradient(90deg, #f7c04a, #f59e0b); }
.meter.over i { background: linear-gradient(90deg, #f4728a, var(--bad-dot)); }
.meter.light { background: rgba(255,255,255,0.22); }
.meter.light i { background: #fff; }
.meter.big { height: 12px; }

/* Number search */
.num-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.num-card { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.num-card:hover { border-color: var(--brand-200); box-shadow: var(--sh-2); }
.num-card strong { display: block; font-variant-numeric: tabular-nums; font-size: 1rem; }

.settings { display: flex; flex-direction: column; gap: 22px; max-width: 1000px; }
.portal-access { border-top: 1px solid var(--line-2); }

/* Voice gallery */
.voice-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.voice-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 14px 62px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--sh-1); }
.voice-card::before { content: ""; position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231400ff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 10v4M8 7v10M12 4v16M16 8v8M20 11v2'/%3E%3C/svg%3E") center no-repeat; }
.voice-card:hover { border-color: var(--brand-200); box-shadow: var(--sh-2); }
.voice-card > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.voice-card strong { font-weight: 600; }
.voice-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,0,255,0.12); }
.voice-card.on::before { background-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 10v4M8 7v10M12 4v16M16 8v8M20 11v2'/%3E%3C/svg%3E"); }
.voice-pick { display: flex; align-items: flex-end; gap: 8px; }
.voice-pick label { flex: 1; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px) scale(0.98); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 550; font-size: 0.88rem; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 100; max-width: min(560px, 92vw); text-align: center; box-shadow: var(--sh-3); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { background: #8c1a2a; }

/* ---------- Auth: split screen ---------- */
.auth-page { min-height: 100vh; margin: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.auth-side { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 120% at 0% 0%, #2f22ff 0%, var(--brand) 45%, #0a0096 100%); }
.auth-side::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(70% 70% at 70% 40%, #000 10%, transparent 75%); -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000 10%, transparent 75%); }
.auth-side::after { content: ""; position: absolute; right: -80px; bottom: -60px; width: 420px; height: 420px; z-index: -1; background: url("logo-mark-white.png") center / contain no-repeat; opacity: 0.08; transform: rotate(-10deg); }
.auth-side-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.auth-side-brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.auth-side h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; max-width: 16ch; }
.auth-side p { color: rgba(255,255,255,0.8); font-size: 1.02rem; max-width: 42ch; margin-top: 14px; line-height: 1.6; }
.auth-quote { display: flex; gap: 14px; align-items: center; color: rgba(255,255,255,0.85); font-size: 0.88rem; }
.auth-quote .dots { display: flex; gap: 4px; }
.auth-quote .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.auth-quote .dots i:first-child { background: #7dffc1; box-shadow: 0 0 0 3px rgba(125,255,193,0.25); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.auth-card.wide { max-width: 760px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 650; letter-spacing: -0.03em; }
.auth-card > .muted { margin-top: -8px; }
.auth-brand { display: none; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.auth-brand img { width: 34px; height: 34px; border-radius: 10px; }
.auth-foot { color: var(--ink-3); font-size: 0.84rem; text-align: center; }
.auth-page.single { display: block; background: var(--canvas); padding: 40px 20px; }
.auth-page.single .auth-card { margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 34px; box-shadow: var(--sh-3); }
.auth-page.single .auth-brand { display: flex; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; flex-direction: column; padding: 9px 12px 9px 36px; border-radius: 10px; position: relative; background: var(--canvas); font-size: 0.88rem; }
.checklist li::before { position: absolute; left: 13px; top: 9px; font-weight: 700; }
.checklist li.pass::before { content: "✓"; color: var(--ok-dot); }
.checklist li.fail { background: var(--bad-bg); }
.checklist li.fail::before { content: "✕"; color: var(--bad); }
.checklist li.soft { background: var(--warn-bg); }
.checklist li.soft::before { content: "!"; color: var(--warn); }
.checklist li span { color: var(--ink-2); font-size: 0.82rem; }

/* ==========================================================================
   Customer portal
   ========================================================================== */
body.portal { background: var(--canvas); }
.p-top { background: rgba(255,255,255,0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); }
.p-top-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.p-brand:hover { color: var(--ink); }
.p-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--sh-brand); }
.p-brand > span { display: flex; flex-direction: column; line-height: 1.2; }
.p-brand strong { font-size: 1rem; font-weight: 650; letter-spacing: -0.02em; }
.p-brand small { color: var(--ink-3); font-weight: 500; }
.p-user { display: flex; align-items: center; gap: 10px; }
.p-signout { color: var(--ink-2); font-weight: 550; font-size: 0.86rem; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
.p-signout:hover { border-color: var(--brand-200); color: var(--brand-700); }
.p-nav { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.p-nav::-webkit-scrollbar { display: none; }
.p-nav a { position: relative; color: var(--ink-2); font-weight: 550; font-size: 0.9rem; padding: 12px 12px 14px; white-space: nowrap; transition: color .15s; }
.p-nav a:hover { color: var(--ink); }
.p-nav a.on { color: var(--brand-700); }
.p-nav a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand); }
.p-main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.p-foot { max-width: 1120px; margin: 0 auto; padding: 0 24px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: 0.84rem; display: flex; align-items: center; gap: 10px; }
.p-foot img { width: 18px; height: 18px; border-radius: 5px; }
.p-hello { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); padding: 32px 32px 30px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #2f22ff 0%, var(--brand) 42%, #0b00a8 100%); box-shadow: 0 24px 60px -30px rgba(20,0,255,0.65); }
.p-hello::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(70% 100% at 90% 0%, #000 15%, transparent 70%); -webkit-mask-image: radial-gradient(70% 100% at 90% 0%, #000 15%, transparent 70%); }
.p-hello::after { content: ""; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px; z-index: -1; background: url("logo-mark-white.png") center / contain no-repeat; opacity: 0.08; transform: rotate(-8deg); }
.p-hello h1 { font-size: 2rem; font-weight: 650; letter-spacing: -0.035em; margin-bottom: 8px; }
.p-hello .muted { color: rgba(255,255,255,0.82); font-size: 1rem; max-width: 60ch; }
.p-live { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 5px 12px 5px 10px; border-radius: 99px; background: rgba(255,255,255,0.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); font-size: 0.8rem; font-weight: 600; }
.p-live i { width: 7px; height: 7px; border-radius: 50%; background: #7dffc1; box-shadow: 0 0 0 0 rgba(125,255,193,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(125,255,193,0.55); } 70% { box-shadow: 0 0 0 8px rgba(125,255,193,0); } 100% { box-shadow: 0 0 0 0 rgba(125,255,193,0); } }
.p-title { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.03em; }
.p-lead { max-width: 70ch; }
.p-back { font-weight: 600; font-size: 0.88rem; color: var(--ink-2); }
.p-back::before { content: "← "; }
.p-callbacks { border-color: #f4dfae; box-shadow: 0 10px 30px -18px rgba(245,165,36,0.5); }
.p-callbacks .panel-head { background: linear-gradient(180deg, #fff9ec, #fff); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.p-cb { display: flex; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.p-cb:last-child { border-bottom: 0; }
.p-cb p { margin: 3px 0; max-width: 70ch; }
.p-cb-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.p-call { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 22px; border-bottom: 1px solid var(--line-2); color: var(--ink); transition: background .12s; }
.p-call:last-child { border-bottom: 0; }
.p-call:hover { background: #fafaff; color: var(--ink); }
.p-call-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.p-call-main .chip { margin-left: 6px; }
.p-call-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; text-align: right; }
.p-numbers { list-style: none; margin: 0; padding: 6px 22px; }
.p-numbers li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.p-numbers li:last-child { border-bottom: 0; }
.p-numbers strong { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-right: auto; }
.p-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-steps > div { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #fcfcfe; }
.p-steps h3 { font-size: 0.96rem; margin-bottom: 4px; }
.facts.wide { grid-template-columns: minmax(170px, auto) 1fr; padding: 0; }
.seg.compact { gap: 4px; padding: 4px; background: #eef0f6; border-radius: 11px; }
.seg.compact a { border-radius: 8px; padding: 6px 12px; font-weight: 550; font-size: 0.85rem; color: var(--ink-2); }
.seg.compact a:hover { color: var(--ink); }
.seg.compact a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11,13,43,0.08), 0 2px 8px -2px rgba(11,13,43,0.08); }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .cols { flex-direction: column; }
  .side-stack, .side-stack.wide-side { width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rail { transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--sh-3); }
  .rail.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .content { padding: 8px 16px calc(44px + env(safe-area-inset-bottom, 0px)); }
  .hero-strip { grid-template-columns: 1fr; padding: 24px; }
  .hero-num { font-size: 3.8rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-brand { display: flex; }
}
@media (max-width: 600px) {
  .kpis, .grid-4 { grid-template-columns: 1fr; }
  .row-item { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .p-cb, .p-call { flex-direction: column; align-items: flex-start; }
  .p-cb-actions { flex-direction: row; flex-wrap: wrap; }
  .p-call-meta { align-items: flex-start; flex-direction: row; gap: 8px; }
  .p-steps { grid-template-columns: 1fr; }
  .facts.wide { grid-template-columns: 1fr; }
  .p-hello { padding: 24px; }
  .p-hello h1 { font-size: 1.55rem; }
  .p-main { padding: 18px 16px 40px; }
  .agent-form > .tabpane { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.pkg-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .pkg-edit-grid { grid-template-columns: 1fr; } }

/* ---------- Launch pipeline (admin + portal) ---------- */
.launch-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.launch-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--canvas); color: var(--ink-3); font-weight: 600; font-size: 0.88rem; }
.launch-steps li span { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: 0.8rem; flex: none; }
.launch-steps li div { display: flex; flex-direction: column; line-height: 1.25; }
.launch-steps li small { font-weight: 500; color: var(--ink-3); font-size: 0.76rem; }
.launch-steps li.done { color: var(--ink-2); }
.launch-steps li.done span { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.launch-steps li.on { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-100); }
.launch-steps li.on span { background: var(--brand); border-color: var(--brand); color: #fff; }
.launch-steps li.warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.launch-steps li.warn span { background: var(--warn-dot); border-color: var(--warn-dot); }
.ready-list { display: grid; gap: 8px; }
.ready-list > div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ready-list > div > b { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--canvas); color: var(--ink-3); font-size: 0.8rem; flex: none; }
.ready-list > div.ok > b { background: var(--ok-bg); color: var(--ok); }
.ready-list > div > span { flex: 1; }
.launch { border-color: var(--brand-100); box-shadow: var(--sh-2); }
details.hint summary { cursor: pointer; }
.launch-card { box-shadow: var(--sh-2); }
.launch-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 4px; }
.launch-cta h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 4px; }
.p-hello.compact { padding: 26px 30px; }
.test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.test-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.test-card.wide { grid-column: 1 / -1; align-items: stretch; }
.test-card h2 { font-size: 1.1rem; font-weight: 650; }
.test-card .chat { border: 1px solid var(--line-2); border-radius: 12px; height: 320px; }
.test-card .chat-input { padding: 0; }
.test-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.test-ic svg { width: 20px; height: 20px; }
.test-number { font-size: 1.25rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.try-list { margin: 0; padding: 8px 22px 16px 44px; display: grid; gap: 10px; }
.try-list li { padding-left: 4px; }
.try-list li strong { display: block; font-weight: 600; }
.try-list li span { color: var(--ink-2); font-size: 0.9rem; }
.decide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.decide-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.decide-card h2 { font-size: 1.2rem; font-weight: 650; }
.decide-card.ok { border-color: #bfe8d6; background: linear-gradient(180deg, #f3fcf8, #fff); }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chips label { flex-direction: row; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-weight: 500; font-size: 0.86rem; cursor: pointer; background: #fff; }
.area-chips label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.area-chips input { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .launch-steps { grid-template-columns: 1fr 1fr; }
  .test-grid, .decide { grid-template-columns: 1fr; }
}
.test-share { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fcfcfe; }
.test-share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mail-log td { font-size: 0.84rem; }
.fix-box { border: 1px solid #f4dfae; background: var(--warn-bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.fix-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fix-options form { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; gap: 8px; }
@media (max-width: 900px) { .fix-options { grid-template-columns: 1fr; } }
.live-bar { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; border: 0; cursor: pointer; background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 0.88rem; padding: 10px 18px; border-radius: 99px; box-shadow: var(--sh-brand); animation: fadein .25s var(--ease); }
.xfer-check { display: grid; gap: 8px; margin-bottom: 6px; }
.xfer-check > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--canvas); font-size: 0.88rem; }
.xfer-check > div > b { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; font-size: 0.76rem; background: #fff; }
.xfer-check > div > span { flex: 1; }
.xfer-check .ok > b { background: var(--ok-bg); color: var(--ok); }
.xfer-check .warn { background: var(--warn-bg); } .xfer-check .warn > b { color: var(--warn); }
.xfer-check .bad { background: var(--bad-bg); } .xfer-check .bad > b { color: var(--bad); }

/* Revenue */
.row-dim td { opacity: .55; }
details.row-more { display: inline-block; position: relative; }
details.row-more > summary { list-style: none; }
details.row-more > summary::-webkit-details-marker { display: none; }
.row-menu { position: absolute; right: 0; top: 38px; z-index: 30; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 14px; display: grid; gap: 14px; text-align: left; white-space: normal; }
.rev-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 180px; align-items: end; }
.rev-chart > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.rev-chart span { width: 100%; max-width: 42px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #5a4dff, var(--brand)); }
.rev-chart b { font-size: .74rem; font-variant-numeric: tabular-nums; }
.rev-chart small { color: var(--ink-3); font-size: .74rem; }
.auto-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; color: var(--ink-2); }
.del-opts { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid #f6c7ce; background: var(--bad-bg); border-radius: 12px; }
.bill-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--canvas); border-radius: 12px; }
.renew-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); }
.renew-box > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.renew-box.overdue { border-color: #f6c7ce; background: var(--bad-bg); }

/* Prospects */
.pr-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.pr-step { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: var(--sh-1); transition: border-color .15s, box-shadow .15s; }
.pr-step:hover { border-color: var(--brand-200); color: var(--ink); }
.pr-step b { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--canvas); color: var(--ink-3); flex: none; font-size: .9rem; }
.pr-step span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pr-step small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-step.done b { background: var(--ok-bg); color: var(--ok); }
.pr-step.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,0,255,.1); }
.pr-step.on b { background: var(--brand); color: #fff; }
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 10px 22px; background: var(--brand-50); border-bottom: 1px solid var(--brand-100); }
.bulk-bar span { margin-right: auto; font-weight: 600; color: var(--brand-700); }
.bulk-bar[hidden] { display: none; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--brand-200); border-radius: 16px; background: var(--brand-50); cursor: pointer; text-align: center; }
.dropzone input { display: none; }
.dropzone span { font-size: 2rem; }
.dropzone small { color: var(--ink-3); font-weight: 400; }
.send-status { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.send-status > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn { border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: .78rem; cursor: pointer; font-family: var(--mono); }
.tag-btn:hover { background: var(--brand-100); }
.mail-preview { font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.55; color: #1d1d1d; }
.mp-subj { font-weight: 700; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.mp-body a { color: #1a5cff; text-decoration: underline; }
.mp-foot { margin-top: 16px; color: #8a8a8a; font-size: 12px; }
@media (max-width: 900px) { .pr-steps, .send-status { grid-template-columns: 1fr 1fr; } }
/* SwiftReach */
.setup-list { display: grid; }
.setup-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line-2); color: var(--ink); }
.setup-item:hover { background: var(--canvas); color: var(--ink); }
.setup-item b { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--canvas); color: var(--ink-3); flex: none; }
.setup-item span { flex: 1; display: flex; flex-direction: column; }
.setup-item small { color: var(--ink-3); }
.setup-item i { font-style: normal; color: var(--ink-3); font-size: 1.3rem; }
.setup-item.done b { background: var(--ok-bg); color: var(--ok); }
.setup-item.done strong { color: var(--ink-3); }
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 16px 22px 20px; }
.mb { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.mb.paused, .mb.error { background: var(--warn-bg); border-color: #f4dfae; }
.mb-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mb-top strong { font-size: .9rem; word-break: break-all; }
.dns { display: inline-flex; gap: 6px; }
.dns i { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); }
.dns i.ok { background: var(--ok-bg); color: var(--ok); }
.plan-box { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.plan-box > div { background: var(--canvas); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.plan-box strong { font-size: 1.4rem; letter-spacing: -.02em; }
.reply-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line-2); color: var(--ink); }
.reply-row:hover { background: var(--canvas); color: var(--ink); }
.reply-row.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: 2px; }
.reply-body { white-space: pre-wrap; background: var(--canvas); border-radius: 12px; padding: 16px; font-size: .92rem; line-height: 1.6; }
@media (max-width: 900px) { .plan-box { grid-template-columns: 1fr; } }
