/* VENDRA — design system shared by the member app and VENDRA OS */
:root {
  --bg: #f4f5f2; --surface: #ffffff; --surface-2: #f8f9f6; --surface-3: #eef0eb;
  --border: #e2e5df; --border-strong: #cbd1c8; --hair: rgba(15, 26, 22, .08);
  --text: #0f1a16; --text-2: #364640; --muted: #66746d; --faint: #8f9a94;
  --brand: #0b6e4f; --brand-hover: #085a40; --brand-soft: #e5f2ec; --brand-line: #a9d3c2; --brand-ink: #ffffff;
  --brand-deep: #0b2a22;
  --gold: #a36b00; --gold-soft: #fbf1dc;
  --nav: #0d1d18; --nav-2: #163029; --nav-3: #1d3d34; --nav-text: #c3d2cb; --nav-muted: #7b938a;
  --good: #0a7a35; --good-bg: #e7f5ec; --good-line: #a7dbb9;
  --warn: #965a00; --warn-bg: #fff4dc; --warn-line: #f0cd85;
  --bad: #b42318; --bad-bg: #fdecea; --bad-line: #f2b0a9;
  --info: #1d4ed8; --info-bg: #e9effd; --info-line: #b3c7f7;
  --action: #6d28d9; --action-bg: #f2ecfd; --action-line: #cdb8f6;
  --radius: 12px; --radius-sm: 8px; --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(15, 26, 22, .05), 0 1px 3px rgba(15, 26, 22, .06);
  --shadow-md: 0 4px 14px rgba(15, 26, 22, .08), 0 1px 3px rgba(15, 26, 22, .06);
  --shadow-lg: 0 18px 44px rgba(15, 26, 22, .18), 0 4px 10px rgba(15, 26, 22, .07);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16.5px; font-weight: 650; }
h3 { font-size: 14.5px; font-weight: 650; }
h4 { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-left: 20px; }
.mono { font-family: var(--mono); font-size: .92em; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .big { font-size: 16px; }
.strong, b { font-weight: 650; }
.good-text { color: var(--good); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); } .brand-text { color: var(--brand); }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { flex: none; vertical-align: -0.2em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- layout ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.sm { gap: 8px; } .stack.lg { gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .row.nowrap { flex-wrap: nowrap; white-space: normal; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1fr) 340px; }
.cols-main-wide { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main, .cols-main-wide { grid-template-columns: 1fr; } }
/* Layout follows the width of the content area, not the window: the ERP sidebar takes 244 px. */
.os-content, .mmain { container: page / inline-size; }
@container page (max-width: 1100px) { .cols-main, .cols-main-wide { grid-template-columns: minmax(0, 1fr); } .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container page (max-width: 1000px) { .cols-2.tables, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cols-4.keep, .cols-2.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { padding: 14px 18px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-head .sub { width: 100%; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.card-body { padding: 14px 18px 18px; }
.card-body.flush { padding: 8px 0 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card.pad { padding: 16px 18px; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.brand { background: linear-gradient(135deg, #0b6e4f, #0d5a43); color: #fff; border-color: transparent; }
.card.brand .muted { color: #bfe1d3; }
.card.link { transition: border-color .15s, transform .15s, box-shadow .15s; cursor: pointer; }
.card.link:hover { border-color: var(--brand-line); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
a.card { color: inherit; display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 560; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); border-color: #b9c1b6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); border-color: var(--bad-line); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--radius-xs); }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: inherit; position: relative; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn .dotcount { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.btn-group button { border: 0; background: var(--surface); padding: 0 12px; height: 32px; cursor: pointer; font-weight: 550; color: var(--text-2); border-right: 1px solid var(--border); }
.btn-group button:last-child { border-right: 0; }
.btn-group button.active { background: var(--brand-soft); color: var(--brand); }

/* ---------- chips, tiers, trust ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; border: 1px solid transparent; }
.chip.muted { background: var(--surface-3); color: var(--text-2); }
.chip.good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.chip.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.chip.action { background: var(--action-bg); color: var(--action); border-color: var(--action-line); }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.tier { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.tier.bronze { background: #f6e7da; color: #8a4b1c; }
.tier.silver { background: #eceff2; color: #4b5563; }
.tier.gold { background: #fbefcf; color: #8a5a00; }
.trust { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trust.good { background: var(--good-bg); color: var(--good); }
.trust.ok { background: var(--info-bg); color: var(--info); }
.trust.weak { background: var(--warn-bg); color: var(--warn); }
.trust.new { background: var(--surface-3); color: var(--muted); font-weight: 600; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; color: #fff; font-size: 13.5px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.kpi-value { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.good .kpi-value { color: var(--good); } .kpi.bad .kpi-value { color: var(--bad); } .kpi.warn .kpi-value { color: var(--warn); }
.kpi.brand { background: var(--brand); border-color: var(--brand); color: #fff; } .kpi.brand .kpi-label, .kpi.brand .kpi-sub { color: #c6e6d9; }
.hero-num { font-size: 44px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; }

/* ---------- progress, stepper ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.progress.warn { background: #fdecc8; } .progress.warn i { background: #c98500; }
.progress.bad { background: var(--bad-bg); } .progress.bad i { background: var(--bad); }
.progress.lg { height: 12px; }
.stepper { display: flex; gap: 0; overflow-x: auto; padding-bottom: 2px; }
.step { flex: 1; min-width: 92px; position: relative; padding-top: 22px; font-size: 12px; color: var(--muted); font-weight: 560; text-align: center; }
.step::before { content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--surface-3); }
.step:first-child::before { left: 50%; } .step:last-child::before { right: 50%; }
.step i { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border-strong); z-index: 1; }
.step.done::before { background: var(--brand); } .step.done i { background: var(--brand); border-color: var(--brand); } .step.done { color: var(--text-2); }
.step.current { color: var(--brand); font-weight: 700; } .step.current i { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); } .step.current::before { background: linear-gradient(90deg, var(--brand) 50%, var(--surface-3) 50%); }
.step.cancelled i { border-color: var(--bad); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch;
  /* edge fades show that a table continues sideways (macOS hides scrollbars until you scroll) */
  background: linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)) right center / 28px 100% no-repeat local,
    linear-gradient(to right, rgba(15, 26, 22, .13), rgba(15, 26, 22, 0)) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left, rgba(15, 26, 22, .13), rgba(15, 26, 22, 0)) right center / 12px 100% no-repeat scroll; }
.table-wrap > .table th { background: transparent; }
/* minimum widths so name and description columns never collapse to a word per line */
.table th.c-name { min-width: 190px; } .table th.c-mid { min-width: 140px; } .table th.c-wide { min-width: 240px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table.compact td { padding: 6px 10px; } .table.compact th { padding: 6px 10px; }
.table tfoot td { font-weight: 650; border-top: 1px solid var(--border-strong); border-bottom: 0; }
.table .sub { font-size: 12px; color: var(--muted); }
.table tr.muted td { color: var(--muted); }
.table tr.hl td { background: var(--brand-soft); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); width: 100%; min-width: 0; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.input.sm { height: 32px; font-size: 13px; padding: 0 9px; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.input-affix { display: flex; align-items: stretch; }
.input-affix > span { display: grid; place-items: center; padding: 0 10px; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.input-affix > span:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-affix > span:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-affix .input { border-radius: 0; } .input-affix .input:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .input-affix .input:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.choice input { accent-color: var(--brand); margin-top: 3px; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 9px 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { background: var(--surface-3); color: var(--text-2); border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.tab.active .count { background: var(--brand-soft); color: var(--brand); }

/* ---------- callouts ---------- */
.callout { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-size: 13.5px; }
.callout > .ic { margin-top: 2px; }
.callout.info { background: var(--info-bg); border-color: var(--info-line); } .callout.info > .ic { color: var(--info); }
.callout.good { background: var(--good-bg); border-color: var(--good-line); } .callout.good > .ic { color: var(--good); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); } .callout.warn > .ic { color: var(--warn); }
.callout.bad { background: var(--bad-bg); border-color: var(--bad-line); } .callout.bad > .ic { color: var(--bad); }
.callout.action { background: var(--action-bg); border-color: var(--action-line); } .callout.action > .ic { color: var(--action); }
.callout.brand { background: var(--brand-soft); border-color: var(--brand-line); } .callout.brand > .ic { color: var(--brand); }
.callout b { display: block; margin-bottom: 1px; }
.honest { border-left: 3px solid var(--gold); background: var(--gold-soft); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13px; color: #5c4300; }
.honest b { color: #3f2e00; }

/* ---------- definition list, timeline, lists ---------- */
.dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 7px 16px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; position: relative; }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 5px; top: 16px; bottom: -14px; width: 2px; background: var(--surface-3); }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-soft); border: 2px solid var(--brand); margin-top: 3px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); color: inherit; text-decoration: none !important; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { font-size: 12.5px; color: var(--muted); }
.ico-box { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.ico-box.action { background: var(--action-bg); color: var(--action); } .ico-box.warn { background: var(--warn-bg); color: var(--warn); } .ico-box.bad { background: var(--bad-bg); color: var(--bad); } .ico-box.info { background: var(--info-bg); color: var(--info); } .ico-box.good { background: var(--good-bg); color: var(--good); }

/* ---------- states ---------- */
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty .ic { color: var(--faint); margin-bottom: 6px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto 12px; }
.loading { padding: 60px; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: currentColor; }
.btn:not(.primary):not(.good):not(.bad) .spinner.sm { border-color: var(--border); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- overlay, modal, toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(11, 22, 18, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { width: min(860px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 4px 18px 16px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--brand-deep); color: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; }
.toast.good .ic { color: #6ee7a8; } .toast.bad { background: #5c130d; } .toast.bad .ic { color: #fca5a5; } .toast.info .ic { color: #93c5fd; }
@media (max-width: 760px) { #toasts { right: 12px; left: 12px; bottom: 76px; max-width: none; } }

/* ---------- page header ---------- */
.page-head { margin-bottom: 18px; }
.page-head .back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.page-head-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.page-head-row > div:first-child { flex: 1; min-width: 240px; }
.page-head .sub { color: var(--muted); margin: 3px 0 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 3px; }

/* ---------- charts ---------- */
.viz { position: relative; }
.viz-plot { position: relative; }
.viz-plot svg { display: block; overflow: visible; }
.viz-axis { font-size: 11px; fill: #898781; font-variant-numeric: tabular-nums; }
.viz-label { font-size: 12px; fill: var(--text-2); font-weight: 600; }
.viz-hit { cursor: crosshair; outline: none; }
.viz-hit.on { fill: rgba(15, 26, 22, .035); }
.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-tip { position: absolute; display: none; pointer-events: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md); padding: 8px 10px; font-size: 12.5px; z-index: 5; min-width: 140px; }
.viz-tip-title { font-weight: 650; margin-bottom: 4px; color: var(--text); }
.viz-tip-row { display: grid; grid-template-columns: 12px auto 1fr; gap: 6px; align-items: center; }
.viz-tip-row i { width: 12px; height: 2px; border-radius: 1px; }
.viz-tip-row b { font-variant-numeric: tabular-nums; }
.viz-tip-row span { color: var(--muted); }
.viz-table { margin-top: 6px; font-size: 12.5px; }
.viz-table summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px; width: max-content; }
.viz-table table { margin-top: 6px; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.hbar-note { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.hbar-track svg { display: block; }
.hbar-value { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.stackbar { display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; }
.stackbar i { display: block; min-width: 2px; }
.spark { display: block; }
