:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f2f2ef;
  --border: #e6e5e0;
  --border-strong: #d4d3cc;
  --ink: #12131a;
  --ink-2: #4a4b55;
  --muted: #7a7b85;
  --accent: #4f46e5;
  --accent-2: #6d5dfc;
  --accent-soft: #eeedff;
  --good: #0f7a55;
  --good-soft: #e3f5ec;
  --warn: #a35c00;
  --warn-soft: #fff3df;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --inflow: #1a9e77;
  --outflow: #5b5bd6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(18, 19, 26, 0.04), 0 4px 16px rgba(18, 19, 26, 0.05);
  --shadow-lg: 0 2px 4px rgba(18, 19, 26, 0.04), 0 24px 48px -12px rgba(18, 19, 26, 0.18);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 550; font-size: 14px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2c38; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .6); }
.btn-accent:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-approve { background: var(--good); border-color: var(--good); color: #fff; }
.btn-approve:hover { background: #0b6646; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-violet { background: #f0edff; color: #5a3fd6; }
.chip-amber { background: #fff3df; color: #9a5800; }
.chip-sky { background: #e6f4fd; color: #0b6aa2; }
.chip-emerald { background: #e3f5ec; color: #0f7a55; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.chip-ai { background: var(--accent-soft); color: var(--accent); }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; letter-spacing: -0.02em; text-decoration: none; font-size: 17px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .7); }
.logo span.tld { color: var(--muted); font-weight: 600; }

/* ======================================================================
   LANDING
   ====================================================================== */
.landing { background: var(--surface); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(12px); background: rgba(255, 255, 255, .82); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--ink-2); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 760px; background: radial-gradient(closest-side, rgba(109, 93, 252, .16), transparent 70%), radial-gradient(closest-side at 80% 40%, rgba(26, 158, 119, .10), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.03; letter-spacing: -0.035em; margin: 18px 0 18px; font-weight: 780; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), #a855f7 60%, #1a9e77); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 19px; color: var(--ink-2); max-width: 540px; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.hero-visual { position: relative; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 18px; }
.mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mock-head b { font-size: 15px; }
.mock-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; background: #fff; }
.mock-item .t { font-weight: 600; font-size: 14px; }
.mock-item .s { font-size: 12.5px; color: var(--muted); }
.mock-item .approve { background: var(--good); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; }
.mock-item.done { opacity: .55; }
.mock-item.done .approve { background: var(--good-soft); color: var(--good); }
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 13px; }
.float-card b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.float-a { left: -34px; bottom: -28px; }
.float-b { right: -28px; top: -70px; }

.logos { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; color: var(--muted); font-size: 14px; }
.logos .wrap { display: flex; gap: 34px; align-items: center; justify-content: center; flex-wrap: wrap; }
.logos strong { color: var(--ink-2); font-weight: 650; }

section.block { padding: 96px 0; }
section.alt { background: var(--bg); }
.section-head { max-width: 700px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0 14px; }
.section-head p { color: var(--ink-2); font-size: 17px; margin: 0; }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step .n { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.step h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-2); }

.agents-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.agent-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.agent-card .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.agent-card h3 { font-size: 16px; margin: 0 0 6px; }
.agent-card p { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.agent-card ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.agent-card li { padding: 3px 0 3px 20px; position: relative; }
.agent-card li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 9px; height: 5px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.stat b { display: block; font-size: 44px; letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px; }
.stat span { color: var(--ink-2); }
.stat small { display: block; color: var(--muted); margin-top: 8px; font-size: 12.5px; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.compare td:first-child { font-weight: 650; }
.compare tr.us td { background: var(--accent-soft); }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); box-shadow: 0 20px 48px -20px rgba(79, 70, 229, .45); position: relative; }
.plan.featured::before { content: 'Most popular'; position: absolute; top: -13px; left: 30px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan .who { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
.plan .price { font-size: 46px; font-weight: 760; letter-spacing: -0.04em; line-height: 1; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.plan li { padding: 6px 0 6px 24px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 3px; top: 13px; width: 10px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { justify-content: center; }

.cta-band { background: var(--ink); color: #fff; border-radius: 24px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background-image: radial-gradient(circle at 85% 20%, rgba(109, 93, 252, .55), transparent 45%); }
.cta-band h2 { margin: 0 0 8px; font-size: 32px; letter-spacing: -0.03em; }
.cta-band p { margin: 0; color: #c9cad6; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band.waitlist { align-items: flex-start; gap: 40px; }
.waitlist-copy { flex: 1 1 320px; max-width: 460px; }
.waitlist-copy .demo-link { display: inline-block; margin-top: 20px; color: #fff; font-weight: 550; font-size: 14px; text-underline-offset: 3px; }
.waitlist-form { flex: 1 1 340px; max-width: 460px; display: grid; gap: 14px; }
.waitlist-form .field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #c9cad6; }
.waitlist-form .field i { font-style: normal; font-weight: 400; color: #8f90a0; }
.waitlist-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.waitlist-form input, .waitlist-form select { font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid transparent; border-radius: 10px; padding: 11px 12px; width: 100%; box-sizing: border-box; }
.waitlist-form input:focus, .waitlist-form select:focus { outline: 3px solid rgba(109, 93, 252, .6); outline-offset: 1px; }
.waitlist-form .btn { justify-content: center; }
.waitlist-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.waitlist-form .form-msg { margin: 0; min-height: 1.5em; font-size: 14px; font-weight: 550; }
.waitlist-form .form-msg[data-kind="good"] { color: #7ee2b8; }
.waitlist-form .form-msg[data-kind="bad"] { color: #ffb4ab; }
footer.site { padding: 40px 0 56px; color: var(--muted); font-size: 13.5px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .float-a, .float-b { display: none; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .stats, .pricing { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .agents-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
  .waitlist-form .field-row { grid-template-columns: 1fr; }
  section.block { padding: 64px 0; }
}

/* ======================================================================
   APP
   ====================================================================== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.company { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.company .av { width: 34px; height: 34px; border-radius: 9px; background: #1f3b2e; color: #e8d9b5; display: grid; place-items: center; font-weight: 750; font-size: 13px; flex: none; }
.company b { display: block; font-size: 13.5px; line-height: 1.25; }
.company small { color: var(--muted); font-size: 12px; }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.navlist a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: 14px; }
.navlist a:hover { background: var(--surface-2); color: var(--ink); }
.navlist a.active { background: var(--accent-soft); color: var(--accent); }
.navlist a .badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.navlist svg { flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--muted); }
.ai-pill { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.ai-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(15, 122, 85, .5); animation: pulse 2s infinite; }
.ai-pill.mock .pulse { background: #c08400; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(15, 122, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 122, 85, 0); } }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 32px 0; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; letter-spacing: -0.025em; margin: 0; }
.topbar .sub { color: var(--muted); font-size: 14px; }
.topbar .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.content { padding: 22px 32px 64px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 27px; font-weight: 720; letter-spacing: -0.03em; margin-top: 4px; }
.kpi .delta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--bad); }
.kpi.hl { background: linear-gradient(135deg, #1b1c27, #2b2650); color: #fff; border-color: transparent; }
.kpi.hl .label, .kpi.hl .delta { color: #b9b8d6; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; margin: 0; letter-spacing: -0.01em; }
.panel-head .hint { color: var(--muted); font-size: 13px; }
.panel-body { padding: 18px 20px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

/* Action inbox */
.inbox-list { display: flex; flex-direction: column; gap: 12px; }
.action { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: opacity .3s, transform .3s, max-height .4s; overflow: hidden; }
.action.leaving { opacity: 0; transform: translateX(24px); }
.action-main { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 18px; align-items: center; }
.action-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.action h3 { margin: 0 0 3px; font-size: 15.5px; letter-spacing: -0.01em; }
.action p.summary { margin: 0; color: var(--ink-2); font-size: 14px; }
.action-btns { display: flex; gap: 6px; align-items: center; }
.action-detail { border-top: 1px solid var(--border); background: #fbfbfa; padding: 16px 18px; display: none; }
.action.open .action-detail { display: block; }
.action.open .toggle-detail { background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea, select.cat { border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; background: #fff; }
.field textarea { min-height: 210px; resize: vertical; line-height: 1.55; font-size: 14px; }
.field input:focus, .field textarea:focus, select.cat:focus, .rewrite input:focus { outline: 2px solid rgba(79, 70, 229, .35); border-color: var(--accent); }
.rewrite { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 12px; }
.rewrite input { flex: 1; min-width: 180px; border: 1px solid #d7d4ff; border-radius: 8px; padding: 7px 10px; background: #fff; }
.rewrite .lbl { font-size: 13px; font-weight: 650; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid #d7d4ff; background: #fff; color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.quick button:hover { background: #f7f6ff; }
.detail-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.original { border-left: 3px solid var(--border-strong); padding: 6px 12px; margin: 0 0 14px; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; background: #fff; border-radius: 0 8px 8px 0; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.amt, table.data th.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .pos { color: var(--good); font-weight: 600; }
table.data .desc { color: var(--muted); font-size: 12.5px; }
table.data tr.flag td { background: #fffaf0; }
select.cat { padding: 5px 8px; font-size: 13.5px; max-width: 200px; }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.conf .bar { width: 56px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.conf .bar i { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.conf.low .bar i { background: #d18a00; }

.checklist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checklist label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fff; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; font-size: 14px; }
.checklist input { width: 16px; height: 16px; accent-color: var(--accent); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 40px; }
.empty h3 { color: var(--ink); margin: 8px 0 4px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .who { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.feed .who.owner { background: var(--good-soft); color: var(--good); }
.feed .who.agent { background: var(--accent-soft); color: var(--accent); }
.feed .who.system { background: var(--surface-2); color: var(--muted); }
.feed time { display: block; color: var(--muted); font-size: 12px; }
.feed .fx { color: var(--good); font-size: 12.5px; }

.done-list .row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.done-list .row:last-child { border-bottom: 0; }
.done-list .row span.t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Chart */
.chart-wrap { position: relative; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; z-index: 5; }
.tooltip.show { opacity: 1; }
.grid-2.wide-side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.hbar { display: grid; grid-template-columns: 120px 1fr 76px; gap: 10px; align-items: center; font-size: 13.5px; padding: 5px 0; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.hbar .fill { height: 100%; background: var(--outflow); border-radius: 0 4px 4px 0; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
details.tbl summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 10px; }

.toast-host { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 380px; animation: toastIn .25s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast .ok { color: #6ee7b7; font-weight: 800; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-nav { display: none; }

@media (max-width: 1180px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
  .mobile-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
  .mobile-nav a.active { background: var(--accent-soft); color: var(--accent); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .action-main { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 110px 1fr 80px; }
}
.grid-2 > *, .action-main > * { min-width: 0; }
@media (max-width: 560px) {
  .kpi .value { font-size: 22px; }
  .kpi .label { font-size: 11px; }
  .action-btns { flex-wrap: wrap; }
}
