/* ─────────────────────────────────────────────────────────────────
   Sisu-inspired Solo Agent Dashboard
   ───────────────────────────────────────────────────────────────── */

:root {
  --bg:            #F5F3EE;      /* warm off-white */
  --bg-panel:     #FBFAF6;
  --card:          #FFFFFF;
  --ink:           #0F1115;
  --ink-2:         #3A3730;
  --ink-3:         #6B665C;
  --ink-4:         #9A968D;
  --line:          #E8E5DD;
  --line-2:        #EDEBE5;
  --line-strong:   #D8D4C8;

  --brand:         #3A6BF0;
  --brand-2:       #1E3FB0;
  --brand-tint:    #EEF1FE;
  --brand-tint-2:  #DDE4FC;

  --pos:           #0A6E44;
  --pos-tint:      #E4F1EA;
  --neg:           #B23A2A;
  --neg-tint:      #F6E5E1;
  --warn:          #B57A0B;
  --warn-tint:     #F6ECD4;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  --sh-sm: 0 1px 2px rgba(15,17,21,.04);
  --sh:    0 1px 2px rgba(15,17,21,.04), 0 4px 12px rgba(15,17,21,.03);
}

* { box-sizing: border-box; }

body, html {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-feature-settings: "tnum" 1, "cv11" 1;
  letter-spacing: -0.01em;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ─── Frame ─── */
.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
}

/* ─── Sidebar ─── */
.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-2);
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  color: #F5F3EE;
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.02em;
}
.brand-text { line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.brand-dot { color: var(--brand); }
.brand-sub { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  padding: 12px 10px 6px;
  font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: rgba(15,17,21,.04); color: var(--ink); }
.nav-item.is-active {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--sh-sm);
}
.nav-item.is-active::before {
  content: "";
  position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 3px; background: var(--brand); border-radius: 3px;
}
.nav-count {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  background: var(--brand-tint);
  color: var(--brand-2);
  padding: 1px 7px;
  border-radius: 999px;
}
.nav-dot {
  margin-left: auto;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--brand);
}

.sidebar-goal {
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh-sm);
}
.sg-label { font-size: 11px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.sg-bar {
  height: 6px;
  background: var(--line-2);
  border-radius: 999px;
  margin: 8px 0 6px;
  overflow: hidden;
}
.sg-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
}
.sg-meta { display: flex; align-items: baseline; gap: 6px; }
.sg-pct { font-weight: 700; font-size: 15px; }
.sg-note { font-size: 11.5px; color: var(--ink-4); }

.user-card {
  margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
}
.user-card:hover { background: rgba(15,17,21,.04); cursor: pointer; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3A6BF0, #1E3FB0);
  color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
}
.user-meta { flex: 1; line-height: 1.15; }
.user-name { font-weight: 600; font-size: 13px; }
.user-sub { font-size: 11px; color: var(--ink-4); margin-top: 1px; }

/* ─── Topbar ─── */
.main {
  min-width: 0;
  padding: 20px 24px 40px;
}
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}
.tb-right { flex-wrap: nowrap; }
.tb-left { min-width: 0; }
.crumbs { display: flex; gap: 6px; font-size: 12px; }
.crumb-muted { color: var(--ink-4); }
.crumb-sep { color: var(--ink-4); }
.crumb-active { color: var(--ink-2); font-weight: 500; }
.page-title {
  margin: 4px 0 2px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-sub { color: var(--ink-3); font-size: 13px; }

.tb-right {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.tb-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-4);
  font-size: 13px;
  min-width: 280px;
  transition: border-color .15s;
}
.tb-search:hover { border-color: var(--line-strong); }
.tb-search span { flex: 1; text-align: left; }
.tb-search kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink-3);
}

.tb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  transition: background .15s, border-color .15s;
  position: relative;
}
.tb-btn:hover { border-color: var(--line-strong); }
.tb-btn.ghost { background: var(--card); }
.tb-btn.icon { padding: 8px; }
.tb-btn.primary {
  background: var(--ink);
  color: #F5F3EE;
  border-color: var(--ink);
}
.tb-btn.primary:hover { background: var(--ink-2); }
.tb-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--neg);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px; height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  display: grid; place-items: center;
  line-height: 1;
}

/* ─── Cards ─── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh-sm);
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.card-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 3px;
}
.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-cta {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--ink-2);
}
.card-cta:hover { background: var(--bg); }

/* ─── KPI strip ─── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 1.3fr;
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh-sm);
  transition: border-color .15s, box-shadow .15s;
}
.kpi:hover { border-color: var(--line-strong); box-shadow: var(--sh); }
.kpi-big { grid-column: span 1; }
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 8px;
}
.kpi-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 8px;
  font-feature-settings: "tnum" 1;
}
.kpi-big .kpi-value { font-size: 26px; }
.kpi-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.kpi-delta.pos { background: var(--pos-tint); color: var(--pos); }
.kpi-delta.neg { background: var(--neg-tint); color: var(--neg); }
.kpi-delta svg { width: 10px; height: 10px; }
.kpi-sub { font-size: 11.5px; color: var(--ink-4); }

/* Pace ring card */
.pace-card {
  background: var(--ink);
  color: #F5F3EE;
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.pace-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(58,107,240,.25), transparent 60%);
  pointer-events: none;
}
.pace-left { flex: 1; position: relative; z-index: 1; }
.pace-left .kpi-label { color: rgba(245,243,238,.6); }
.pace-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.pace-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-bottom: 10px; }
.pace-strong { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px; color: white; }
.pace-of { font-size: 11.5px; color: rgba(245,243,238,.55); font-family: 'JetBrains Mono', monospace; }
.pace-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245,243,238,.1);
  color: rgba(245,243,238,.9);
}
.chip svg { width: 10px; height: 10px; }
.chip-pos { background: rgba(10,110,68,.25); color: #7FE1B0; }
.chip-mono { font-family: 'JetBrains Mono', monospace; background: rgba(245,243,238,.08); }

.pace-ring { position: relative; flex-shrink: 0; z-index: 1; }
.pace-ring-inner {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.prin-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.prin-big span { font-size: 14px; font-weight: 500; opacity: 0.6; }
.prin-lbl { font-size: 10px; color: rgba(245,243,238,.55); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

/* ─── Layout rows ─── */
.row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.row.two-thirds { grid-template-columns: 2fr 1fr; }
.row.half { grid-template-columns: 1fr 1fr; }
.row.log-actions { grid-template-columns: 1.4fr 1fr; }

/* ─── Trend chart ─── */
.trend-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}
.ts-item {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}
.ts-item:last-child { border-right: none; }
.ts-lbl {
  font-size: 10.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 4px;
}
.ts-val { font-size: 16px; font-weight: 600; }
.ts-val.pos { color: var(--pos); }
.ts-val.neg { color: var(--neg); }
.ts-goal { background: var(--bg); }

.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.seg button {
  background: transparent;
  border: none;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); }
.seg button.is-on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--sh-sm);
}

.trend-chart svg { display: block; }
.trend-legend {
  display: flex; gap: 16px;
  margin-top: 10px;
  padding-left: 48px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-swatch {
  width: 12px; height: 8px;
  border-radius: 2px;
}
.lg-line { height: 2px; background: var(--ink); }
.lg-dash { height: 0; border-top: 1.5px dashed var(--ink); background: transparent; opacity: 0.5;}

/* ─── Reverse goal calculator ─── */
.reverse-goal {
  display: flex;
  flex-direction: column;
}
.rg-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.rg-field { display: flex; flex-direction: column; gap: 4px; }
.rg-field > span {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.rg-input-wrap {
  display: flex; align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  transition: border-color .15s, box-shadow .15s;
}
.rg-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.rg-prefix {
  color: var(--ink-4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding-right: 6px;
  border-right: 1px solid var(--line-2);
  margin-right: 8px;
}
.rg-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 9px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  min-width: 0;
}

.rg-rates {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--r);
}
.rate { display: flex; flex-direction: column; gap: 4px; }
.rate-head { display: flex; justify-content: space-between; font-size: 11.5px; }
.rate-lbl { color: var(--ink-3); font-weight: 500; }
.rate-val { color: var(--ink); font-weight: 700; font-size: 12px; }
.rate input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand) var(--v), var(--line-strong) var(--v), var(--line-strong) 100%);
  border-radius: 999px;
  outline: none;
}
.rate input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--brand);
  box-shadow: 0 1px 3px rgba(15,17,21,.15);
  cursor: pointer;
}
.rate input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--brand);
  cursor: pointer;
}

.rg-table {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.rg-table-head, .rg-row {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr .8fr .9fr;
  padding: 8px 12px;
  font-size: 12px;
}
.rg-table-head {
  background: var(--bg);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.rg-row { border-bottom: 1px solid var(--line-2); }
.rg-row:last-child { border-bottom: none; }
.rg-row.is-primary { background: var(--brand-tint); }
.rg-row.is-primary .rg-row-label { color: var(--brand-2); font-weight: 600; }
.rg-row-label { color: var(--ink-2); font-weight: 500; }
.ta-right { text-align: right; }
.rg-row .mono { color: var(--ink-2); }
.rg-row.is-primary .mono { color: var(--brand-2); }
.rg-row .strong { font-weight: 700; color: var(--ink); }
.rg-row.is-primary .strong { color: var(--brand-2); }

.rg-summary {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  background: var(--bg);
}
.rg-sum-row {
  display: flex; justify-content: space-between; align-items: baseline;
}
.rg-sum-row.muted { font-size: 11px; color: var(--ink-4); margin-top: 4px; }
.rg-sum-lbl { font-size: 12px; font-weight: 500; }
.rg-sum-val { font-size: 22px; font-weight: 700; color: var(--brand); }

/* ─── Funnel ─── */
.funnel-total { display: flex; align-items: baseline; gap: 8px; }
.ft-lbl { font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.ft-val { font-size: 20px; font-weight: 700; color: var(--pos); }

.funnel-body { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { position: relative; }
.fs-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.fs-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fs-nums { display: flex; align-items: baseline; gap: 12px; }
.fs-value { font-size: 15px; font-weight: 700; color: var(--ink); }
.fs-conv {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--line-2);
  color: var(--ink-3);
}
.fs-conv.pos { background: var(--pos-tint); color: var(--pos); }
.fs-conv.neg { background: var(--neg-tint); color: var(--neg); }

.fs-bar-track {
  height: 30px;
  background: var(--bg);
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
}
.fs-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 10px;
  transition: width .5s cubic-bezier(.2,.9,.3,1.1);
  min-width: 60px;
}
.fs-bar-pct {
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.funnel-step:nth-child(1) .fs-bar { background: linear-gradient(90deg, #6B665C, #3A3730); }
.funnel-step:nth-child(2) .fs-bar { background: linear-gradient(90deg, #4E6BC4, #3A6BF0); }
.funnel-step:nth-child(3) .fs-bar { background: linear-gradient(90deg, #3A6BF0, #1E3FB0); }
.funnel-step:nth-child(4) .fs-bar { background: linear-gradient(90deg, #1E3FB0, #142B7A); }
.funnel-step:nth-child(5) .fs-bar { background: linear-gradient(90deg, #0F8A56, #0A6E44); }

.fs-drop {
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-4);
  padding-right: 4px;
  margin-top: 2px;
}

/* ─── Pipeline / Kanban ─── */
.pipe-summary {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
}
.ps-item { display: inline-flex; align-items: baseline; gap: 6px; }
.ps-lbl { color: var(--ink-4); font-size: 11px; }
.ps-val { font-weight: 700; }
.ps-sep { width: 1px; height: 12px; background: var(--line-strong); }

.kanban {
  display: grid;
  grid-template-columns: repeat(8, minmax(180px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.kanban-col {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.kanban-col.col-Closed, .kanban-col.col-UnderContract { background: linear-gradient(180deg, #E4F1EA, var(--bg) 40%); }
.kanban-col.col-Lost { background: linear-gradient(180deg, #F6E5E1, var(--bg) 40%); }

.kc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.kc-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--ink);
}
.kc-dot { width: 8px; height: 8px; border-radius: 999px; }
.kc-count {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0px 6px;
  font-size: 10.5px;
  border-radius: 4px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.kc-value {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}
.kc-body {
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.kc-empty {
  padding: 20px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-4);
}

.lead {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  cursor: grab;
}
.lead:hover {
  box-shadow: var(--sh);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.lead-closed { border-left: 3px solid var(--pos); }
.lead-lost { opacity: 0.65; border-left: 3px solid var(--neg); }

.lead-top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 6px; margin-bottom: 4px;
}
.lead-name { font-weight: 600; font-size: 12.5px; color: var(--ink); line-height: 1.25; }
.lead-price { font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

.lead-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.ltag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink-3);
  border: 1px solid var(--line-2);
}
.ltag-buyer { background: var(--brand-tint); color: var(--brand-2); border-color: var(--brand-tint-2); }
.ltag-seller { background: #FCF1DE; color: #7A5000; border-color: #F5E1B8; }
.ltag-1st { background: #F5EAFC; color: #611E9E; border-color: #E7D3F5; }
.ltag-src { background: transparent; color: var(--ink-4); border: none; padding-left: 2px; }

.lead-note {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.35;
  padding: 4px 6px;
  background: var(--bg);
  border-radius: 4px;
  margin-bottom: 4px;
}
.lead-meta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 4px;
}
.lead-meta svg { width: 10px; height: 10px; }
.lead-meta.pos { color: var(--pos); }

.lead-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line-2);
}
.lead-age { font-size: 10.5px; color: var(--ink-4); }
.lead-actions { display: flex; gap: 2px; }
.lead-actions button {
  background: transparent;
  border: none;
  padding: 3px;
  color: var(--ink-4);
  border-radius: 3px;
}
.lead-actions button:hover { background: var(--bg); color: var(--brand); }

/* ─── Daily KPI log ─── */
.daily-log { display: flex; flex-direction: column; }
.dl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.dl-field {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.dl-revenue {
  grid-column: span 4;
  background: linear-gradient(90deg, var(--brand-tint) 0%, var(--bg) 60%);
}
.dl-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 6px;
}
.dl-target { color: var(--ink-4); font-size: 10.5px; font-weight: 500; }

.dl-input-row {
  display: flex; align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.dl-input-row:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.dl-step {
  background: transparent;
  border: none;
  padding: 0 10px;
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.dl-step:hover { background: var(--bg); color: var(--brand); }
.dl-input {
  flex: 1;
  border: none;
  outline: none;
  text-align: center;
  padding: 7px 4px;
  font-size: 15px;
  font-weight: 700;
  background: transparent;
  width: 100%;
  min-width: 0;
}
.dl-input-lg { text-align: left; padding-left: 4px; font-size: 18px; }
.dl-prefix {
  color: var(--ink-4);
  padding: 0 4px 0 12px;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
}

.dl-progress {
  height: 3px;
  background: var(--line-2);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.dl-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
}

.dl-notes { }
.dl-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  background: var(--card);
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  color: var(--ink-2);
}
.dl-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.dl-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.dl-summary { font-size: 12px; color: var(--ink-3); }
.dl-summary strong { color: var(--brand); font-weight: 700; }
.dl-sep { margin: 0 8px; color: var(--line-strong); }
.dl-actions { display: flex; gap: 8px; }

/* ─── Next actions ─── */
.next-actions { display: flex; flex-direction: column; }
.seg-mini {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
}
.seg-mini button {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 4px;
}
.seg-mini button.is-on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--sh-sm);
}

.na-section { margin-bottom: 14px; }
.na-section:last-child { margin-bottom: 0; }
.na-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-2);
}
.na-section-lbl {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 700;
}
.na-section-lbl svg { color: var(--ink-4); width: 12px; height: 12px; }
.na-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
}
.na-count-warn { background: var(--neg-tint); color: var(--neg); }

.na-list { list-style: none; margin: 0; padding: 0; }
.na-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-2);
}
.na-item:last-child { border-bottom: none; }

.na-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  padding: 0;
  margin-top: 1px;
  transition: border-color .15s;
}
.na-check:hover { border-color: var(--brand); }
.na-check span { display: block; }

.na-body { flex: 1; min-width: 0; }
.na-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
.na-meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  display: flex; gap: 6px; align-items: center;
}
.na-sep { color: var(--line-strong); }
.na-who { font-weight: 500; }
.na-due { font-weight: 700; color: var(--neg); }

.na-item.overdue { background: linear-gradient(90deg, rgba(178,58,42,.04), transparent 60%); }
.na-item.overdue::before {
  content: "";
  width: 3px;
  align-self: stretch;
  background: var(--neg);
  border-radius: 3px;
  margin-right: 6px;
  margin-left: -4px;
}
.na-item.overdue.prio-med::before { background: var(--warn); }
.na-item.overdue.prio-med .na-due { color: var(--warn); }

.na-btn {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 6px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.na-btn:hover { background: var(--brand); color: white; border-color: var(--brand); }

.na-time {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  padding: 3px 7px;
  background: var(--bg);
  border-radius: 5px;
  min-width: 54px;
  text-align: center;
  border: 1px solid var(--line-2);
}
.na-day {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  min-width: 74px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.na-list-compact .na-item { padding: 6px 4px; }

/* ─── Scrollbars ─── */
.kanban::-webkit-scrollbar,
.sidebar::-webkit-scrollbar { height: 8px; width: 8px; }
.kanban::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.kanban::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track { background: transparent; }

/* Number input arrows off */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* ─── Responsive ─── */
@media (max-width: 1400px) {
  .kanban { grid-template-columns: repeat(8, minmax(160px, 1fr)); }
}
@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .row.two-thirds { grid-template-columns: 1fr; }
  .row.log-actions { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .tb-search { min-width: 0; flex: 1; }
  .topbar { flex-wrap: wrap; }
}

/* ─── Command palette / notification dropdown / modal stubs ─── */
.overlay-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,17,21,.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  z-index: 50;
}
.overlay-backdrop.hidden { display: none; }
.cmdk-panel {
  width: 560px; max-width: 92vw;
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(15,17,21,.25);
  overflow: hidden;
}
.cmdk-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}
.cmdk-input-row svg { color: var(--ink-4); flex-shrink: 0; }
.cmdk-input-row input {
  flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--ink);
}
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 10px; border-radius: 7px; font-size: 13px; cursor: pointer;
}
.cmdk-item:hover { background: var(--bg); }
.cmdk-item-meta { font-size: 11px; color: var(--ink-4); }
.cmdk-empty { padding: 24px 12px; text-align: center; color: var(--ink-4); font-size: 12.5px; }

.dropdown-panel {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  width: 300px;
  z-index: 40;
  overflow: hidden;
}
.dropdown-panel.hidden { display: none; }
.dropdown-head {
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
}
.dropdown-item {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  line-height: 1.4;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item .dd-time { color: var(--ink-4); font-size: 10.5px; margin-top: 2px; display: block; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #F5F3EE;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--sh);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast svg { color: #7FE1B0; }

.na-item.done .na-title { text-decoration: line-through; color: var(--ink-4); }
.na-check.checked { background: var(--pos); border-color: var(--pos); }
.na-check.checked span { display: block; width: 100%; height: 100%; }

.lead.drag-over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.kanban-col.drop-target .kc-body { background: var(--brand-tint); }

