/* ===== Saga CRM design tokens ===== */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #16181d;
  --text-muted: #6b7280;
  --text-faint: #9aa1ac;
  --primary: #3366ee;
  --primary-hover: #2952c9;
  --primary-tint: #eaf1fe;
  --primary-tint-2: #d3e3fd;
  --accent: #1d4ed8;
  --accent-hover: #1741b0;
  --accent-tint: #dbe7fd;
  --success: #1b8a5a;
  --success-tint: #e3f6ee;
  --warning: #c8811e;
  --warning-tint: #fbf0dc;
  --critical: #c23b3b;
  --critical-tint: #fbe7e7;
  --shadow-sm: 0 1px 2px rgba(20, 21, 26, 0.06);
  --shadow-md: 0 6px 20px -6px rgba(20, 21, 26, 0.14);
  --shadow-lg: 0 16px 40px -12px rgba(20, 21, 26, 0.22);
  --font-display: "Arial Black", "Arial Bold", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --sidebar-w: 226px;
  --radius-sm: 6px;
  --radius-md: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214; --surface: #17191c; --surface-raised: #1c1f23; --surface-2: #23262b;
    --border: #2c3036; --border-strong: #3d4249;
    --text: #f2f3f5; --text-muted: #9aa1ac; --text-faint: #6b7280;
    --primary: #5b8def; --primary-hover: #79a3f2; --primary-tint: #1c2b47; --primary-tint-2: #223757;
    --accent: #79a3f2; --accent-hover: #93b6f5; --accent-tint: #1c2b47;
    --success: #3ac085; --success-tint: #103324;
    --warning: #e3a53f; --warning-tint: #3a2c10;
    --critical: #e6685f; --critical-tint: #3a1a18;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #101214; --surface: #17191c; --surface-raised: #1c1f23; --surface-2: #23262b;
  --border: #2c3036; --border-strong: #3d4249;
  --text: #f2f3f5; --text-muted: #9aa1ac; --text-faint: #6b7280;
  --primary: #5b8def; --primary-hover: #79a3f2; --primary-tint: #1c2b47; --primary-tint-2: #223757;
  --accent: #79a3f2; --accent-hover: #93b6f5; --accent-tint: #1c2b47;
  --success: #3ac085; --success-tint: #103324;
  --warning: #e3a53f; --warning-tint: #3a2c10;
  --critical: #e6685f; --critical-tint: #3a1a18;
}
:root[data-theme="light"] {
  --bg: #f7f8fa; --surface: #ffffff; --surface-raised: #ffffff; --surface-2: #f1f3f6;
  --border: #e5e7eb; --border-strong: #d1d5db;
  --text: #16181d; --text-muted: #6b7280; --text-faint: #9aa1ac;
  --primary: #3366ee; --primary-hover: #2952c9; --primary-tint: #eaf1fe; --primary-tint-2: #d3e3fd;
  --accent: #1d4ed8; --accent-hover: #1741b0; --accent-tint: #dbe7fd;
  --success: #1b8a5a; --success-tint: #e3f6ee;
  --warning: #c8811e; --warning-tint: #fbf0dc;
  --critical: #c23b3b; --critical-tint: #fbe7e7;
}

/* ===== reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; text-wrap: balance; }
a { color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--primary-tint-2); }
.num, .t-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ===== app shell ===== */
.app-shell { display: flex; min-height: 100vh; }
.app-side {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 6px 20px; }
.mark {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 17px;
  position: relative;
}
.mark::after { content: ""; position: absolute; width: 6px; height: 6px; background: var(--accent); right: -3px; bottom: -3px; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 14px; letter-spacing: 0.01em; color: var(--text); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600; font-size: 13px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--primary-tint); color: var(--primary); }
.side-nav .ic { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

.side-spacer { flex: 1; }
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 6px;
}
.side-user:hover .av { border-color: var(--primary); }
.side-user .av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-tint-2); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease;
  flex-shrink: 0;
}
.side-user .name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.side-user .switch { font-size: 10.5px; color: var(--text-faint); }

.app-main { flex: 1; min-width: 0; padding: 28px 32px 80px; max-width: 1280px; }

.mobile-nav { display: none; }

@media (max-width: 860px) {
  .app-side { display: none; }
  .app-main { padding: 18px 16px 90px; }
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 20;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; text-decoration: none; color: var(--text-faint);
    font-size: 10px; font-weight: 700;
  }
  .mobile-nav a.active { color: var(--primary); }
  .mobile-nav .ic { font-size: 17px; }
}

/* ===== page scaffolding ===== */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }
.page-head .sub { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.crumb { font-size: 12px; color: var(--text-faint); margin-bottom: 14px; }
.crumb a { text-decoration: none; color: var(--text-muted); font-weight: 600; }
.crumb a:hover { color: var(--primary); }
.section-label {
  font-family: var(--font-display); font-weight: 900; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between;
}
.section-label span.count { font-family: var(--font-mono); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-faint); }

.loading-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 13px; background: var(--bg);
}

/* ===== cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
}
a.card { text-decoration: none; color: inherit; display: block; transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease; }
a.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.kpi-card .ic {
  width: 36px; height: 36px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.kpi-card .ic.green { background: var(--success-tint); color: var(--success); }
.kpi-card .ic.coral { background: var(--accent-tint); color: var(--accent); }
.kpi-card .lbl { font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
.kpi-card .val { font-family: var(--font-mono); font-weight: 700; font-size: 17px; margin-top: 2px; }

@media (max-width: 700px) { .kpi-row { grid-template-columns: 1fr; } }

/* ===== buttons ===== */
.btn {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-faint); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--critical); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a52f2f; }
.btn-block { width: 100%; }

/* ===== chips / pills ===== */
.chip, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.chip .dot, .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-neutral { background: var(--surface-2); color: var(--text-muted); }
.pill-good { background: var(--success-tint); color: var(--success); }
.pill-warn { background: var(--warning-tint); color: var(--warning); }
.pill-bad { background: var(--critical-tint); color: var(--critical); }
.pill-cobalt { background: var(--primary-tint); color: var(--primary); }
.pill-coral { background: var(--accent-tint); color: var(--accent); }

.stage-chip-0 { background: var(--primary-tint); color: var(--primary); }
.stage-chip-1 { background: color-mix(in srgb, var(--primary-tint) 55%, var(--primary-tint-2)); color: var(--primary); }
.stage-chip-2 { background: var(--primary-tint-2); color: var(--primary-hover); }
.stage-chip-3 { background: var(--primary); color: #fff; opacity: 0.82; }
.stage-chip-4 { background: var(--primary); color: #fff; }
.stage-chip-won { background: var(--success-tint); color: var(--success); }
.stage-chip-lost { background: var(--critical-tint); color: var(--critical); }

/* ===== forms ===== */
.field { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input, select, textarea {
  padding: 9px 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.pin-input { text-align: center; letter-spacing: 0.3em; font-family: var(--font-mono); font-size: 18px; }
.form-error { font-size: 12px; font-weight: 600; color: var(--critical); background: var(--critical-tint); padding: 8px 11px; border-radius: var(--radius-sm); }
.hint { font-size: 12.5px; color: var(--text-faint); margin: 6px 0 18px; }

/* ===== auth screens ===== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 340px; padding: 30px 28px; text-align: center; }
.auth-card.wide { max-width: 420px; text-align: left; }
.auth-card h1 { font-family: var(--font-display); font-weight: 900; font-size: 20px; margin-bottom: 4px; }
.auth-mark {
  width: 48px; height: 48px; margin: 0 auto 18px;
  background: var(--primary); color: #fff; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 24px;
}
.auth-mark::after { content: ""; position: absolute; width: 9px; height: 9px; background: var(--accent); right: -4px; bottom: -4px; }
.auth-card.wide h1 { text-align: left; }

.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin: 16px 0; }
.picker-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.picker-btn:hover { border-color: var(--border-strong); }
.picker-btn.active { border-color: var(--primary); background: var(--primary-tint); }
.picker-btn .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-tint-2); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.picker-btn .nm { font-size: 12px; font-weight: 700; }
.pin-step { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

/* ===== kanban ===== */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol { flex-shrink: 0; width: 264px; }
.khead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; gap: 8px; }
.kname { font-family: var(--font-display); font-weight: 900; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.kname.stage-tapt { color: var(--critical); }
.ktotal { font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.kbody { display: flex; flex-direction: column; gap: 10px; min-height: 60px; padding: 4px; border-radius: var(--radius-md); transition: background 0.15s ease; }
.kbody.dropzone { background: var(--primary-tint); }
.kcol-empty { font-size: 11.5px; color: var(--text-faint); text-align: center; padding: 20px 8px; border: 1.5px dashed var(--border); border-radius: var(--radius-md); }

.deal-card { padding: 13px 14px 14px; cursor: grab; transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.15s ease; }
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: 0.4; }
.deal-card .co { font-size: 13.5px; font-weight: 700; text-decoration: none; color: var(--text); display: block; }
.deal-card .co:hover { color: var(--primary); }
.deal-card .contact { font-size: 11px; color: var(--text-faint); margin: 2px 0 10px; }
.deal-card .value { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
.deal-card .sub { font-size: 10.5px; color: var(--text-faint); margin-bottom: 10px; }
.deal-card .sub.overdue { color: var(--critical); font-weight: 700; }
.deal-card .foot { display: flex; align-items: center; justify-content: space-between; }
.avatars { display: flex; }
.avatar {
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--primary-tint-2); color: var(--primary-hover);
  font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface); margin-left: -7px;
}
.avatar:first-child { margin-left: 0; }
.probe { font-size: 10.5px; color: var(--text-faint); }

/* ===== leaderboard ===== */
.leader-list { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.leader-row {
  display: grid; grid-template-columns: 26px 1fr 130px 84px;
  align-items: center; gap: 12px; padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.leader-row:last-child { border-bottom: none; }
.leader-row.me { background: var(--primary-tint); }
.leader-rank { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.leader-rank.top { color: var(--accent); font-weight: 700; }
.leader-name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.leader-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.leader-bar-track { height: 6px; background: var(--primary-tint); border-radius: 99px; overflow: hidden; }
.leader-bar-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.4s ease; }
.leader-bar-fill.over { background: var(--success); }
.leader-value { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }

.tabs { display: inline-flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.tabs button {
  border: none; background: transparent; padding: 6px 13px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--text-muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabs button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

@media (max-width: 700px) {
  .leader-row { grid-template-columns: 22px 1fr 70px; }
  .leader-row .leader-bar-track { display: none; }
}

/* ===== followups ===== */
.followup-list { display: flex; flex-direction: column; gap: 8px; }
.followup-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none; color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
a.followup-item:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.followup-item.overdue { border-left-color: var(--critical); }
.followup-item.today { border-left-color: var(--warning); }
.followup-main { flex: 1; min-width: 0; }
.followup-name { font-size: 13px; font-weight: 700; }
.followup-note { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; text-align: right; }
.followup-time.overdue { color: var(--critical); font-weight: 700; }
.followup-time.today { color: var(--warning); font-weight: 700; }

/* ===== empty states ===== */
.empty {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: 50px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .empty-icon {
  width: 40px; height: 40px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; color: var(--text-faint); font-size: 16px;
}
.empty h3 { font-size: 14px; font-weight: 700; }
.empty p { font-size: 12.5px; color: var(--text-muted); max-width: 34ch; margin: 0; }

/* ===== modal ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 18, 20, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 22px 24px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  border: 1px solid var(--border);
  animation: modal-in 0.16s ease;
}
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal h3 { font-family: var(--font-display); font-weight: 900; font-size: 16px; margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ===== toast ===== */
.toast-error {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--critical); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 60;
}

/* ===== stepper (onboarding) ===== */
.progress-card { padding: 20px 22px; margin-bottom: 18px; }
.ptop { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.ptop h3 { font-size: 13px; font-weight: 700; }
.ptop .pct { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }
.stepper { display: flex; }
.step { flex: 1; position: relative; text-align: center; }
.step .connector { position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.step:first-child .connector { display: none; }
.step.done .connector { background: var(--success); }
.step .dot {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 8px; position: relative; z-index: 1;
  border: 2px solid var(--border); background: var(--surface); color: var(--text-faint);
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.step.done .dot { border-color: var(--success); background: var(--success); color: #fff; }
.step.current .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.step .label { font-size: 11px; font-weight: 700; }
.step .date { font-size: 10px; color: var(--text-faint); margin-top: 2px; }

/* ===== reports ===== */
.bar-row { padding: 8px 0; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.bar-row .top .nm { font-weight: 700; }
.bar-row .top .vl { color: var(--text-faint); }
.bar-track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--primary); transition: width 0.4s ease; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }

/* ===== misc ===== */
.row { display: flex; align-items: center; gap: 10px; }
.panel { padding: 18px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.panel-title { font-family: var(--font-display); font-weight: 900; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
dl.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12.5px; margin: 0; }
dl.meta-list dt { color: var(--text-faint); }
dl.meta-list dd { margin: 0; font-weight: 600; }

/* ===== toggle switch ===== */
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch .track {
  position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px;
  cursor: pointer; transition: background 0.15s ease;
}
.toggle-switch .track::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .track { background: var(--primary); }
.toggle-switch input:checked + .track::before { transform: translateX(16px); }
.toggle-switch input:disabled + .track { opacity: 0.5; cursor: not-allowed; }

/* ===== calculator ===== */
.calc-table { width: 100%; border-collapse: collapse; }
.calc-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); padding: 0 10px 8px; border-bottom: 1px solid var(--border);
}
.calc-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.calc-table tr:last-child td { border-bottom: none; }
.calc-table tr.inactive td { opacity: 0.45; }
.calc-table input[type="number"] { width: 90px; text-align: right; }
.calc-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--primary-tint); border-radius: var(--radius-md);
  margin-top: 16px;
}
.calc-summary .lbl { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.calc-summary .val { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--primary); }
