:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #8a94a6;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --side: #0f1a2b;
  --side-ink: #aab4c5;
  --accent: #1f5bd8;
  --accent-soft: #eaf0fd;
  --accent-ink: #1847ad;

  --o-interested: #d9480f;
  --o-registered: #2b8a3e;
  --o-callback: #c28800;
  --o-whatsapp: #1c7ed6;
  --o-noanswer: #7a8494;
  --o-joined: #c46a00;
  --o-notinterested: #c92a2a;
  --o-dnc: #1f2937;
  --o-invalid: #98a2b3;

  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .18);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--side);
  color: var(--side-ink);
  padding: 18px 12px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: #fff; color: var(--side);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: -.02em;
}
.brand-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--side-ink); }
.nav-group { font-size: 11.5px; color: #6b778c; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--side-ink); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.on svg { color: #7fa6ff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count {
  margin-left: auto; font-size: 11.5px; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: #dfe6f3;
  padding: 1px 7px; border-radius: 10px;
}
.nav a.on .count { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.side-foot b { color: #fff; font-weight: 600; display: block; font-size: 13px; }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px;
  display: flex; align-items: center; gap: 16px;
}
.top h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.top .crumb { font-size: 12.5px; color: var(--ink-3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--o-registered);
  background: #ebf7ee; padding: 5px 10px; border-radius: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; }
.live .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid currentColor; opacity: .5; animation: ping 1.8s infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
.tag-sample { font-size: 12px; color: #8a5a00; background: #fff6e0; border: 1px solid #f5dfa8; padding: 3px 8px; border-radius: 5px; }
.date-chip { font-size: 12.5px; color: var(--ink-2); }
.exam-chip { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 10px; border-radius: 6px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #dfe7f7; color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 12.5px;
}

.page { padding: 24px 28px 48px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; margin: 0; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-h .sub { color: var(--ink-3); font-size: 12.5px; }
.card-h .right { margin-left: auto; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.kpi { background: var(--surface); padding: 16px 18px 15px; }
.kpi .k { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.kpi .v { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi .up { color: var(--o-registered); font-weight: 600; background: #ebf7ee; padding: 0 6px; border-radius: 4px; }
.kpi.accent { background: var(--accent); }
.kpi.accent .k, .kpi.accent .s { color: #d6e2ff; }
.kpi.accent .v { color: #fff; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.f-row { display: grid; grid-template-columns: 118px 1fr 64px; align-items: center; gap: 12px; }
.f-label { font-size: 13px; color: var(--ink-2); }
.f-track { height: 26px; background: var(--surface-2); border-radius: 4px; position: relative; }
.f-bar {
  height: 100%; border-radius: 4px; background: var(--accent);
  display: flex; align-items: center; padding-left: 10px;
  color: #fff; font-weight: 600; font-size: 13px; min-width: 56px;
  transition: width .8s cubic-bezier(.2, .7, .2, 1);
}
.f-row:nth-child(n+5) .f-bar { background: #3f75e6; }
.f-row:last-child .f-bar { background: var(--o-registered); }
.f-conv { font-size: 12px; color: var(--ink-3); text-align: right; }
.f-conv b { color: var(--ink-2); font-weight: 600; }

/* Today list */
.today-list { list-style: none; padding: 0; margin: 0; }
.today-list li { display: flex; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.today-list li:last-child { border-bottom: 0; }
.today-list li.sub { padding: 5px 0 5px 16px; color: var(--ink-2); font-size: 13px; border-bottom: 0; }
.today-list li.sub + li:not(.sub) { border-top: 1px dashed var(--line); }
.today-list .n { margin-left: auto; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.today-list li.sub .n { font-size: 13.5px; font-weight: 600; }

/* Mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .col { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .col.dim { background: var(--line); }
.bars .col.hi { background: var(--o-registered); }
.bars .lb { font-size: 11px; color: var(--ink-3); }
.bars .vl { font-size: 11px; color: var(--ink-2); font-weight: 600; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  padding: 2px 9px 2px 7px; border-radius: 20px;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, white);
}
.pill .dot { width: 7px; height: 7px; }
.pill.o-interested { --c: var(--o-interested); }
.pill.o-registered { --c: var(--o-registered); }
.pill.o-callback { --c: var(--o-callback); }
.pill.o-whatsapp { --c: var(--o-whatsapp); }
.pill.o-noanswer { --c: var(--o-noanswer); }
.pill.o-joined { --c: var(--o-joined); }
.pill.o-notinterested { --c: var(--o-notinterested); }
.pill.o-dnc { --c: var(--o-dnc); }
.pill.o-invalid { --c: var(--o-invalid); }

.lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.lvl i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lvl-High i { background: var(--o-interested); }
.lvl-Good i { background: var(--o-registered); }
.lvl-Warm i { background: #e8a800; }
.lvl-New i { background: transparent; border: 2px solid #b8c0cc; }
.lvl-No i { background: var(--o-notinterested); }
.flame { width: 14px; height: 14px; color: var(--o-interested); vertical-align: -2px; }

.stream { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.stream.MPC { color: #1847ad; background: #eef3fe; border-color: #d7e2fb; }
.stream.BiPC { color: #0b7a61; background: #e9f7f2; border-color: #c9ebdf; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface);
  padding: 7px 13px; border-radius: 6px; font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow);
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.btn:hover { border-color: #cfd4dc; background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.green { background: var(--o-registered); border-color: var(--o-registered); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.ghost { box-shadow: none; }
.link { color: var(--accent); font-weight: 600; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- Table ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  padding: 5px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.chip:hover { border-color: #c5ccd6; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.search { position: relative; margin-left: auto; }
.search input {
  width: 280px; padding: 7px 12px 7px 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.search input:focus, .filters select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.filters select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; color: var(--ink-2);
}
.filters .clear { margin-left: auto; font-size: 12.5px; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3);
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap;
}
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: #f7f9fd; }
.t tbody tr.sel td { background: var(--accent-soft); }
.t .who b { display: block; font-weight: 600; }
.t .who span { color: var(--ink-3); font-size: 12.5px; }
.t .muted { color: var(--ink-3); }
.t td.wrap { white-space: normal; min-width: 180px; }
.t .next { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.t .next svg { width: 14px; height: 14px; color: var(--ink-3); }
.table-foot { display: flex; align-items: center; padding: 10px 16px; color: var(--ink-3); font-size: 12.5px; }
.table-foot .pager { margin-left: auto; display: flex; gap: 6px; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }

/* ---------- Drawer / profile ---------- */
.scrim { position: fixed; inset: 0; background: rgba(16, 24, 40, .38); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%);
  background: var(--bg); z-index: 50; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.d-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 24px 16px; }
.d-top { display: flex; align-items: flex-start; gap: 12px; }
.d-top h2 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.d-meta { color: var(--ink-2); margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-meta .sep { width: 3px; height: 3px; background: var(--ink-3); border-radius: 50%; }
.d-id { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.d-close { margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 32px; height: 32px; display: grid; place-items: center; }
.d-close svg { width: 16px; height: 16px; }
.hot-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 6px; color: #fff; background: var(--o-interested); }
.hot-badge.Good { background: var(--o-registered); }
.hot-badge.Warm { background: #d69a00; }
.hot-badge.New { background: var(--o-noanswer); }
.hot-badge.No { background: var(--o-notinterested); }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.d-body { overflow-y: auto; padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 14px; }

/* Stepper */
.stepper { display: grid; grid-template-columns: repeat(9, 1fr); padding: 16px 12px 12px; }
.step { text-align: center; position: relative; font-size: 11.5px; color: var(--ink-3); }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step .c {
  width: 24px; height: 24px; border-radius: 50%; margin: 0 auto 6px; position: relative; z-index: 1;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line);
}
.step .c svg { width: 13px; height: 13px; }
.step.done { color: var(--ink-2); }
.step.done .c { background: var(--o-registered); border-color: var(--o-registered); color: #fff; }
.step.done::before, .step.cur::before { background: var(--o-registered); }
.step.cur { color: var(--accent-ink); font-weight: 600; }
.step.cur .c { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.cur .c::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.kv { display: grid; grid-template-columns: 124px 1fr; row-gap: 7px; column-gap: 12px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; }
.section-t { font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 0 0 10px; }

.ai-card { border-color: #cfdcf8; }
.ai-card .card-h { background: linear-gradient(0deg, #fff, #f5f8ff); }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 4px; }
.ai-badge svg { width: 13px; height: 13px; }
.quote { font-size: 15.5px; line-height: 1.55; margin: 0 0 14px; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--ink); }
.ai-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; }
.fact .k { font-size: 11.5px; color: var(--ink-3); }
.fact .v { font-weight: 600; }

.xf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.xf div { padding: 8px 10px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surface); }
.xf div:nth-child(3n) { border-right: 0; }
.xf .k { font-size: 11px; color: var(--ink-3); display: block; }
.xf .v { font-weight: 600; font-size: 13.5px; }
.xf .v.yes { color: var(--o-registered); }
.xf .v.unk { color: var(--ink-3); font-weight: 500; }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 0 0 18px 46px; }
.tl li:last-child { padding-bottom: 0; }
.tl .ic {
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.tl .ic svg { width: 15px; height: 15px; }
.tl .ai .ic { background: var(--accent-soft); border-color: #cfdcf8; color: var(--accent); }
.tl .wa .ic { background: #e9f8ef; border-color: #c4ebd2; color: #1f9d55; }
.tl .ok .ic { background: #ebf7ee; border-color: #c7e8cf; color: var(--o-registered); }
.tl .plan .ic { background: #fff7e0; border-color: #f3dfa3; color: #a87400; }
.tl .warn .ic { background: #fff1e8; border-color: #f7d3bd; color: var(--o-interested); }
.tl .stop .ic { background: #f1f2f4; color: var(--o-dnc); }
.tl .when { font-size: 12px; color: var(--ink-3); }
.tl .what { font-weight: 600; }
.tl .body { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.tl .chain { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 13px; }
.tl .chain svg { width: 12px; height: 12px; color: var(--ink-3); }

.player { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 8px 8px; max-width: 520px; }
.play { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.play svg { width: 14px; height: 14px; }
.wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.wave i { flex: 1; background: #c9d4e8; border-radius: 1px; }
.wave i.p { background: var(--accent); }
.player .tm { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.tx-toggle { margin-top: 8px; font-size: 13px; }
.tx { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; max-width: 560px; display: none; }
.tx.on { display: block; }
.tx p { margin: 6px 0; font-size: 13px; }
.tx b { display: inline-block; min-width: 54px; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.tx .ai b { color: var(--accent); }

/* ---------- Lead cards ---------- */
.bucket { margin-bottom: 22px; }
.bucket-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.bucket-h h3 { margin: 0; font-size: 15px; }
.bucket-h .why { color: var(--ink-3); font-size: 13px; }
.bucket-h .tot { margin-left: auto; font-weight: 700; font-size: 15px; }
.bk-now { --bk: var(--o-interested); }
.bk-high { --bk: #e8590c; }
.bk-follow { --bk: var(--o-whatsapp); }
.bk-low { --bk: var(--o-noanswer); }
.bucket-h .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--bk); align-self: center; }
.leads { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; border-top: 3px solid var(--bk, var(--line)); display: flex; flex-direction: column; }
.lead:hover { border-color: #c9d1dc; border-top-color: var(--bk); }
.lead h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.lead .meta { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.lead dl { display: grid; grid-template-columns: 88px 1fr; gap: 4px 8px; margin: 10px 0 12px; font-size: 13px; }
.lead dt { color: var(--ink-3); }
.lead dd { margin: 0; font-weight: 500; }
.lead .says { font-size: 13px; background: var(--surface-2); border-radius: 6px; padding: 7px 10px; color: var(--ink); margin-bottom: 12px; }
.lead .row { display: flex; gap: 8px; margin-top: auto; }
.more { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* Follow-up queue */
.q-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.q-tab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: left; box-shadow: var(--shadow); }
.q-tab .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; display: block; }
.q-tab .l { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.q-tab.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.q-list .qi { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.q-list .qi:hover { background: #f7f9fd; }
.q-list .qi:last-child { border-bottom: 0; }
.qi .pair { font-weight: 600; font-size: 15px; }
.qi .pair span { color: var(--ink-3); font-weight: 400; margin: 0 6px; }
.qi .meta { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.qi .says { font-size: 13.5px; margin-top: 6px; }
.qi .when { font-weight: 600; color: #a87400; font-size: 13px; margin-top: 4px; }
.qi .act { display: flex; gap: 8px; align-items: center; }
.done-row { opacity: .5; }

/* Campaigns */
.camp { padding: 18px; cursor: pointer; }
.camp:hover { border-color: #c9d1dc; }
.camp.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.camp h3 { margin: 0; font-size: 16px; }
.camp .date { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.prog { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin: 14px 0 6px; }
.prog i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.camp .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.camp .stats .n { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.camp .stats .l { font-size: 12px; color: var(--ink-3); }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: #ebf7ee; color: var(--o-registered); }
.status.Completed { background: var(--line-2); color: var(--ink-2); }
.rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rate { border: 1px solid var(--line-2); border-radius: 6px; padding: 12px; }
.rate .n { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.rate .l { font-size: 12.5px; color: var(--ink-3); }

/* AI Agent */
.script {
  font-size: 15px; line-height: 1.7; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 14px 16px; margin: 0;
}
.var { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; background: #eef3fe; color: var(--accent-ink); padding: 1px 5px; border-radius: 4px; border: 1px solid #d7e2fb; white-space: nowrap; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.checks li:last-child { border-bottom: 0; }
.cb { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #c2c9d4; display: grid; place-items: center; flex: none; background: #fff; padding: 0; }
.cb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cb svg { width: 12px; height: 12px; }
.nots li { color: var(--ink); }
.nots .x { width: 18px; height: 18px; border-radius: 4px; background: #fdecec; color: var(--o-notinterested); display: grid; place-items: center; flex: none; }
.nots .x svg { width: 12px; height: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.field select, .field input { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: #fff; }
.outcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Analytics */
.hbar { display: grid; grid-template-columns: 220px 1fr 48px; gap: 12px; align-items: center; padding: 6px 0; }
.hbar .l { font-size: 13.5px; }
.hbar .tr { height: 12px; background: var(--line-2); border-radius: 3px; }
.hbar .tr i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.hbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar.first .tr i { background: var(--o-interested); }
.stack { display: flex; height: 36px; border-radius: 6px; overflow: hidden; margin: 6px 0 12px; }
.stack div { display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 700; font-size: 13px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.qs { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.qs li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-2); counter-increment: q; }
.qs li::before { content: counter(q); color: var(--ink-3); font-weight: 600; width: 16px; }
.qs li span { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.insight { background: #f5f8ff; border: 1px solid #d7e2fb; border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--accent-ink); margin-top: 12px; }

/* Live calls */
.lc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.lc:last-child { border-bottom: 0; }
.lc .eq { display: flex; gap: 2px; align-items: flex-end; height: 18px; width: 22px; }
.lc .eq i { flex: 1; background: var(--o-registered); border-radius: 1px; animation: eq 1s infinite ease-in-out; }
.lc .eq i:nth-child(2) { animation-delay: .2s; }
.lc .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.lc .nm { font-weight: 600; }
.lc .st { font-size: 12.5px; color: var(--ink-3); }
.lc .tm { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }

/* Toast */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); font-weight: 500; display: flex; align-items: center; gap: 8px; animation: tin .25s ease-out; }
.toast svg { width: 16px; height: 16px; color: #7ee2a0; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

.note { font-size: 12.5px; color: var(--ink-3); }
.mt { margin-top: 16px; }
.hide-sm { }

@media (max-width: 1180px) {
  .g-main, .g-2 { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .q-tabs { grid-template-columns: repeat(2, 1fr); }
  .rates { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
  .brand, .nav-group, .side-foot { display: none; }
  .nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .page { padding: 16px; }
  .g-3 { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .search { width: 100%; }
  .hide-sm { display: none; }
  .hbar { grid-template-columns: 1fr 1fr 40px; }
  .xf { grid-template-columns: 1fr 1fr; }
  .xf div:nth-child(3n) { border-right: 1px solid var(--line-2); }
  .stepper { grid-template-columns: repeat(9, 64px); overflow-x: auto; }
}
