/* ════════════════════════════════════════════════════════════════
   VIEWS · per-route components
═══════════════════════════════════════════════════════════════ */

/* ───── CARD primitive ───── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.card-pad-lg { padding: 22px 24px; }
.card-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.card-hd h3 { margin: 0; font-size: var(--fs-14); font-weight: 600; flex: 1; }
.card-hd .meta { font-size: var(--fs-11); color: var(--dim); font-family: var(--ff-mono); }

/* ═══════════════════════ BRIEF VIEW ═══════════════════════ */
.brief-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  padding: 32px 36px;
  margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.brief-hero::before {
  content: ""; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.brief-hero .eye {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-11); color: var(--accent);
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 16px;
}
.brief-hero .eye .i { animation: p-sparkle 2.4s ease-in-out infinite; }
.brief-hero h2 {
  font-family: var(--ff-serif);
  font-size: 26px; font-weight: 500;
  letter-spacing: -.015em; line-height: 1.3;
  margin: 0 0 14px;
  max-width: 760px;
  position: relative;
}
.brief-hero h2 em { font-style: italic; color: var(--accent); }
.brief-hero p {
  font-size: var(--fs-15); line-height: 1.6;
  color: var(--soft); max-width: 680px; margin: 0;
  position: relative;
}
.brief-hero p b { color: var(--text); font-weight: 600; }
.brief-hero .period-note {
  margin-top: 10px;
  color: var(--warn);
  font-size: var(--fs-11);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brief-stats {
  display: flex; align-items: center; gap: 22px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
  position: relative;
}
.brief-stats .st { display: flex; flex-direction: column; gap: 2px; }
.brief-stats .st .l { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 600; }
.brief-stats .st .v { font-family: var(--ff-serif); font-size: var(--fs-24); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--text); }
.brief-stats .st .v.bad { color: var(--bad); }
.brief-stats .st .v.good { color: var(--good); }
.brief-stats .st + .st {
  margin-left: 0; padding-left: 22px;
  border-left: 1px solid var(--line);
}

.brief-section { margin-top: 32px; }
.brief-section .sh {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px;
}
.brief-section .sh h2 {
  margin: 0; font-size: var(--fs-18); font-weight: 600; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.brief-section .sh h2 .i { color: var(--accent); }
.brief-section .sh small { color: var(--dim); font-size: var(--fs-12); }

/* today actions row */
.today-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.today-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  transition: all .18s cubic-bezier(.21,.61,.35,1);
}
.today-card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--sh-3); }
.today-card .top-r { display: flex; align-items: center; justify-content: space-between; }
.today-card h3 {
  margin: 0; font-size: var(--fs-15); font-weight: 600; line-height: 1.35;
}
.today-card .why { font-size: var(--fs-12); color: var(--soft); line-height: 1.5; }
.today-card .who { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-12); }
.today-card .who .arrow { margin-left: auto; color: var(--faint); transition: transform .15s, color .15s; }
.today-card:hover .who .arrow { transform: translateX(3px); color: var(--accent); }

/* KPI tiles grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 16px 18px;
  position: relative;
}
.kpi-card .ml { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.kpi-card .lbl { font-size: var(--fs-11); color: var(--dim); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.kpi-card .lbl .i { color: var(--muted); }
.kpi-card .big { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.kpi-card .big.bad { color: var(--bad); }
.kpi-card .big.good { color: var(--good); }
.kpi-card .big small { font-size: var(--fs-14); color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi-card .sub { font-size: var(--fs-12); color: var(--dim); }
.kpi-card svg.spark { display: block; margin-top: 10px; width: 100%; height: 36px; }

/* people row */
.people-card { padding: 6px 0; }
.people-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.people-row:last-child { border-bottom: 0; }
.people-row .av { width: 36px; height: 36px; font-size: var(--fs-13); }
.people-row .who-block { flex: 1; min-width: 0; }
.people-row .who-block .nm { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.people-row .who-block .meta { font-size: var(--fs-12); color: var(--dim); margin-top: 2px; }
.people-row .ring { width: 42px; height: 42px; flex-shrink: 0; position: relative; }
.people-row .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.people-row .ring .t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-11); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ═══════════════════════ DEAL DETAIL VIEW ═══════════════════════ */
.deal-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.deal-id { font-size: var(--fs-11); font-family: var(--ff-mono); color: var(--muted); letter-spacing: .05em; }
.deal-h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 3px 0 8px; }
.deal-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.deal-tags .tag {
  font-size: var(--fs-11); padding: 3px 9px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--soft); display: inline-flex; align-items: center; gap: 4px;
}
.deal-tags .tag .i { width: 11px; height: 11px; color: var(--dim); }
.deal-tags .tag.stage { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.deal-tags .tag.stage .i { color: var(--warn); }
.deal-amt { margin-left: auto; text-align: right; }
.deal-amt .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-family: var(--ff-mono); font-variant-numeric: tabular-nums; line-height: 1; }
.deal-amt .v small { font-size: var(--fs-15); color: var(--dim); font-weight: 400; margin-left: 4px; }
.deal-amt .s { font-size: var(--fs-11); color: var(--dim); font-family: var(--ff-mono); margin-top: 6px; }

/* signals grid */
.signals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sig {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px;
}
.sig .l { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.sig .l .i { color: var(--muted); }
.sig .v { font-size: var(--fs-20); font-weight: 700; font-family: var(--ff-mono); margin-top: 8px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sig .v.bad { color: var(--bad); }
.sig .v.good { color: var(--good); }
.sig .v.warn { color: var(--warn); }
.sig .b { font-size: var(--fs-11); color: var(--dim); margin-top: 6px; }
.sig .b b { color: var(--text); font-weight: 600; }

/* health breakdown */
.health-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.health-top h3 { margin: 0; font-size: var(--fs-14); font-weight: 600; }
.health-top .score { font-size: 28px; font-family: var(--ff-mono); font-weight: 700; color: var(--bad); letter-spacing: -.02em; }
.health-top .score small { font-size: var(--fs-13); color: var(--muted); }
.factors { display: flex; flex-direction: column; gap: 10px; }
.factor {
  display: grid; grid-template-columns: 180px 1fr 80px;
  align-items: center; gap: 12px;
}
.factor .nm { font-size: var(--fs-13); color: var(--text); }
.factor .nm small { display: block; font-size: var(--fs-11); color: var(--dim); margin-top: 1px; }
.factor .bar { height: 6px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.factor .fill { height: 100%; border-radius: 2px; transform-origin: left center; animation: p-grow-x .8s cubic-bezier(.21,.61,.35,1) backwards; animation-delay: calc(.1s + var(--i, 0) * 60ms); }
.factor .vv { text-align: right; font-size: var(--fs-12); font-family: var(--ff-mono); font-weight: 600; }
.factor.bad  .fill { background: var(--bad); }
.factor.bad  .vv { color: var(--bad); }
.factor.warn .fill { background: var(--warn); }
.factor.warn .vv { color: var(--warn); }
.factor.good .fill { background: var(--good); }
.factor.good .vv { color: var(--good); }

/* coaching panel */
.coach {
  background:
    radial-gradient(circle at top right, var(--accent-soft), transparent 60%),
    var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
}
.coach .h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.coach .ico {
  width: 36px; height: 36px; border-radius: var(--r-lg);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.coach .ico .i { width: 20px; height: 20px; }
.coach .h h3 { margin: 0; font-size: var(--fs-14); font-weight: 600; color: var(--accent); }
.coach .ai-tag { margin-left: auto; }
.coach p { margin: 0; color: var(--text); font-size: var(--fs-14); line-height: 1.6; }
.coach .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* timeline */
.timeline h3 { margin: 0 0 14px; font-size: var(--fs-14); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.timeline h3 small { color: var(--dim); font-weight: 400; font-size: var(--fs-11); font-family: var(--ff-mono); }
.tl-row { display: grid; grid-template-columns: 80px 12px 1fr; gap: 12px; padding: 8px 0; align-items: flex-start; }
.tl-date { font-size: var(--fs-11); color: var(--muted); font-family: var(--ff-mono); text-align: right; padding-top: 4px; }
.tl-bullet {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--faint); margin-top: 7px;
  justify-self: center; position: relative;
}
.tl-bullet.now { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 12px var(--accent); }
.tl-bullet.warn { background: var(--warn); }
.tl-bullet.bad  { background: var(--bad); }
.tl-bullet::before {
  content: ""; position: absolute;
  left: 50%; top: 14px; transform: translateX(-50%);
  width: 1px; height: 44px;
  background: var(--line);
}
.tl-row:last-child .tl-bullet::before { display: none; }
.tl-body { font-size: var(--fs-13); color: var(--text); }
.tl-body .what { font-weight: 500; }
.tl-body .who { font-size: var(--fs-11); color: var(--dim); margin-top: 2px; }

/* ═══════════════════════ DEALS LIST VIEW ═══════════════════════ */
.deals-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  padding: 5px 10px; border-radius: var(--r-full);
  font-size: var(--fs-11); color: var(--dim); font-weight: 500;
  border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; transition: all .12s;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.on { color: var(--text); background: var(--surface-3); border-color: var(--line-3); }
.chip.p1.on { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.chip.p2.on { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.chip .ct { font-family: var(--ff-mono); font-size: 10px; color: var(--muted); margin-left: 3px; }
.chip.reset {
  font-size: 10px;
  padding: 4px 8px;
}

.deals-filters {
  padding: 14px;
  border-radius: var(--r-xl);
  margin-bottom: 12px;
}
.deals-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.deals-filters-head h4 {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.deals-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
}
.deals-filters .fl {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.deals-filters .fl span {
  color: var(--dim);
  font-size: var(--fs-11);
}
.deals-filters .fl select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 7px 8px;
  color: var(--text);
  font-size: var(--fs-12);
}
.deals-filters .fl select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--sh-glow);
}
.deals-filters .fl.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.deals-filters .fl.check input {
  margin: 0;
}
.deals-filter-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: var(--fs-11);
}
.deals-filter-stats b {
  color: var(--text);
  font-family: var(--ff-mono);
}

.deals-list { display: flex; flex-direction: column; }
.deal-row {
  display: grid; grid-template-columns: 28px 1fr 200px 120px 120px;
  gap: 14px; align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .14s cubic-bezier(.21,.61,.35,1);
  animation: p-fade-up .4s cubic-bezier(.21,.61,.35,1) backwards;
}
.deal-row:hover { border-color: var(--line-3); transform: translateY(-1px); box-shadow: var(--sh-1); }
.deal-row .nm { font-size: var(--fs-13); font-weight: 500; min-width: 0; }
.deal-row .nm small { display: block; font-size: var(--fs-11); color: var(--dim); margin-top: 2px; font-family: var(--ff-mono); }
.deal-row .stage { font-size: var(--fs-12); color: var(--soft); }
.deal-row .age { text-align: right; font-size: var(--fs-12); font-family: var(--ff-mono); color: var(--dim); }
.deal-row .age.bad { color: var(--bad); font-weight: 600; }
.deal-row .age.warn { color: var(--warn); font-weight: 600; }
.deal-row .amt { text-align: right; font-size: var(--fs-14); font-weight: 700; font-family: var(--ff-mono); }
.deals-list .deal-row:nth-child(1) { animation-delay: .04s; }
.deals-list .deal-row:nth-child(2) { animation-delay: .07s; }
.deals-list .deal-row:nth-child(3) { animation-delay: .10s; }
.deals-list .deal-row:nth-child(4) { animation-delay: .13s; }
.deals-list .deal-row:nth-child(5) { animation-delay: .16s; }
.deals-list .deal-row:nth-child(6) { animation-delay: .19s; }
.deals-list .deal-row:nth-child(7) { animation-delay: .22s; }
.deals-list .deal-row:nth-child(8) { animation-delay: .25s; }
.deals-list .deal-row:nth-child(9) { animation-delay: .28s; }
.deals-list .deal-row:nth-child(10){ animation-delay: .31s; }

/* ═══════════════════════ FORECAST VIEW ═══════════════════════ */
.forecast-hero {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.forecast-hero .hc { padding: 18px 22px; border-right: 1px solid var(--line); }
.forecast-hero .hc:last-child { border-right: 0; }
.forecast-hero .l { font-size: var(--fs-11); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; }
.forecast-hero .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; font-family: var(--ff-mono); }
.forecast-hero .v .u { font-size: var(--fs-13); color: var(--muted); font-weight: 500; margin-left: 3px; }
.forecast-hero .s { font-size: var(--fs-12); color: var(--soft); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.forecast-hero .hc.commit .v { color: var(--good); }
.forecast-hero .hc.best   .v { color: var(--info); }
.forecast-hero .hc.cov    .v { color: var(--warn); }
.forecast-hero .hc.gap    .v { color: var(--bad); }

/* waterfall */
.wf { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; align-items: flex-end; height: 240px; margin-top: 14px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.wf-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 8px; position: relative; }
.wf-bar {
  width: 100%; border-radius: 3px 3px 0 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 6px; font-family: var(--ff-mono); font-size: var(--fs-11);
  font-weight: 600; color: #fff;
  transform-origin: bottom;
  animation: p-grow-y .7s cubic-bezier(.21,.61,.35,1) backwards;
}
.wf-bar.start { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.wf-bar.pos   { background: linear-gradient(180deg, #34d399, #0d9488); }
.wf-bar.neg   { background: linear-gradient(180deg, #fca5a5, #b91c1c); }
.wf-bar.end   { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.wf-bar.float { background: transparent; border-left: 2px dashed var(--line-2); border-right: 2px dashed var(--line-2); padding: 0; }
.wf-name { font-size: var(--fs-11); color: var(--soft); text-align: center; }
.wf-name b { display: block; color: var(--text); font-weight: 600; font-size: var(--fs-12); margin-bottom: 2px; }
.wf .wf-col:nth-child(1) .wf-bar { animation-delay: .10s; }
.wf .wf-col:nth-child(2) .wf-bar { animation-delay: .16s; }
.wf .wf-col:nth-child(3) .wf-bar { animation-delay: .22s; }
.wf .wf-col:nth-child(4) .wf-bar { animation-delay: .28s; }
.wf .wf-col:nth-child(5) .wf-bar { animation-delay: .34s; }
.wf .wf-col:nth-child(6) .wf-bar { animation-delay: .40s; }
.wf .wf-col:nth-child(7) .wf-bar { animation-delay: .46s; }
.wf .wf-col:nth-child(8) .wf-bar { animation-delay: .52s; }

/* generic revenue trend bars */
.rt { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: flex-end; height: 160px; }
.rt-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 8px; }
.rt-bar { width: 100%; background: linear-gradient(180deg, var(--accent-soft), var(--accent)); border-radius: 3px 3px 0 0; transform-origin: bottom; animation: p-grow-y .7s cubic-bezier(.21,.61,.35,1) backwards; }
.rt-bar.peak { background: linear-gradient(180deg, #fef3c7, var(--warn)); }
.rt-bar.mtd  { background: repeating-linear-gradient(45deg, var(--warn), var(--warn) 5px, var(--warn-soft) 5px, var(--warn-soft) 10px); }
.rt-lbl { font-size: 10px; color: var(--dim); text-align: center; font-family: var(--ff-mono); }
.rt-lbl b { display: block; color: var(--text); font-weight: 600; font-size: var(--fs-11); margin-top: 2px; }
.rt .rt-col:nth-child(1) .rt-bar  { animation-delay: .05s; }
.rt .rt-col:nth-child(2) .rt-bar  { animation-delay: .10s; }
.rt .rt-col:nth-child(3) .rt-bar  { animation-delay: .15s; }
.rt .rt-col:nth-child(4) .rt-bar  { animation-delay: .20s; }
.rt .rt-col:nth-child(5) .rt-bar  { animation-delay: .25s; }
.rt .rt-col:nth-child(6) .rt-bar  { animation-delay: .30s; }
.rt .rt-col:nth-child(7) .rt-bar  { animation-delay: .35s; }
.rt .rt-col:nth-child(8) .rt-bar  { animation-delay: .40s; }
.rt .rt-col:nth-child(9) .rt-bar  { animation-delay: .45s; }
.rt .rt-col:nth-child(10) .rt-bar { animation-delay: .50s; }
.rt .rt-col:nth-child(11) .rt-bar { animation-delay: .55s; }
.rt .rt-col:nth-child(12) .rt-bar { animation-delay: .60s; }

/* ═══════════════════════ AR aging ═══════════════════════ */
.bk { display: grid; grid-template-columns: 130px 1fr 100px; gap: 14px; align-items: center; margin-bottom: 10px; }
.bk .nm { font-size: var(--fs-13); font-weight: 500; }
.bk .nm small { display: block; color: var(--dim); font-size: var(--fs-11); margin-top: 1px; }
.bk .bar { height: 8px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.bk .fill { height: 100%; border-radius: 2px; transform-origin: left; animation: p-grow-x 1s cubic-bezier(.21,.61,.35,1) backwards; animation-delay: .2s; }
.bk .v { text-align: right; font-family: var(--ff-mono); font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; }
.bk.b1 .fill { background: var(--good); }
.bk.b2 .fill { background: var(--info); }
.bk.b3 .fill { background: var(--warn); }
.bk.b4 .fill { background: var(--bad); }
.bk-sum { padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.bk-sum .lab { font-size: var(--fs-11); text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; }
.bk-sum .val { font-family: var(--ff-mono); font-size: var(--fs-18); font-weight: 700; color: var(--text); }

/* funnel */
.fnl { display: flex; flex-direction: column; gap: 7px; }
.fnl-row { display: grid; grid-template-columns: 160px 1fr 80px; align-items: center; gap: 12px; }
.fnl-name { font-size: var(--fs-13); color: var(--text); }
.fnl-bar { height: 24px; background: var(--surface-3); border-radius: var(--r-sm); overflow: hidden; }
.fnl-fill { height: 100%; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); display: flex; align-items: center; padding: 0 12px; font-size: var(--fs-11); font-family: var(--ff-mono); color: #fff; font-weight: 600; border-radius: var(--r-sm); transform-origin: left; animation: p-grow-x 1s cubic-bezier(.21,.61,.35,1) backwards; animation-delay: .2s; }
.fnl-fill.warn { background: linear-gradient(90deg, var(--warn-soft), var(--warn)); }
.fnl-fill.good { background: linear-gradient(90deg, var(--good-soft), var(--good)); }
.fnl-pct { text-align: right; font-size: var(--fs-12); font-family: var(--ff-mono); color: var(--dim); }
.fnl-row.warn .fnl-pct { color: var(--warn); }
.fnl-row.good .fnl-pct { color: var(--good); }
.fnl-pct em { font-style: normal; font-size: 10px; margin-left: 3px; display: block; color: var(--bad); }

/* close reasons */
.cr-list { display: flex; flex-direction: column; gap: 9px; }
.cr-row { display: grid; grid-template-columns: 180px 1fr 90px; align-items: center; gap: 12px; }
.cr-row .nm { font-size: var(--fs-13); color: var(--text); }
.cr-row .b { height: 8px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.cr-row .f { height: 100%; border-radius: 2px; transform-origin: left; animation: p-grow-x 1s cubic-bezier(.21,.61,.35,1) backwards; animation-delay: .2s; }
.cr-row .f.bad { background: linear-gradient(90deg, #fca5a5, var(--bad)); }
.cr-row .f.warn { background: linear-gradient(90deg, #fde68a, var(--warn)); }
.cr-row .f.dim { background: var(--muted); }
.cr-row .v { text-align: right; font-family: var(--ff-mono); font-size: var(--fs-12); color: var(--text); font-weight: 600; }

/* table */
.dt-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
table.dt th {
  text-align: left; padding: 10px 12px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  position: sticky; top: 0;
}
table.dt td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
table.dt td.n { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
table.dt td.good { color: var(--good); font-weight: 600; }
table.dt td.warn { color: var(--warn); font-weight: 600; }
table.dt td.bad  { color: var(--bad);  font-weight: 600; }
table.dt tr:last-child td { border-bottom: 0; }
table.dt tr.hl td { background: var(--bad-soft); }
table.dt tr.tot td { background: var(--surface-2); font-weight: 700; }
table.dt tr:hover td { background: var(--surface-2); }

/* readiness chips */
.readiness { display: flex; gap: 8px; flex-wrap: wrap; }
.rd {
  padding: 9px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  font-size: var(--fs-12); display: flex; align-items: center; gap: 8px;
}
.rd .st {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 3px; font-family: var(--ff-mono);
  letter-spacing: .04em;
}
.rd .st.live { background: var(--good-soft); color: var(--good); }
.rd .st.est  { background: var(--warn-soft); color: var(--warn); }
.rd .st.blk  { background: var(--bad-soft);  color: var(--bad); }
.rd .st.setup{ background: var(--plum-soft); color: var(--plum); }
.rd b { font-weight: 600; }
.rd small { color: var(--dim); font-size: var(--fs-11); margin-left: 2px; }

/* empty state */
.empty {
  padding: 60px 20px; text-align: center; color: var(--dim);
  background: var(--surface); border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}
.empty .i { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--soft); margin-bottom: 6px; }

/* tiny bar inline (for sources, etc) */
.tinybar { width: 60px; height: 5px; background: var(--surface-3); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; }
.tinybar > div { height: 100%; border-radius: 2px; }

/* responsive */
@media (max-width: 900px) {
  .signals { grid-template-columns: repeat(2, 1fr); }
  .forecast-hero { grid-template-columns: 1fr 1fr; }
  .forecast-hero .hc { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
  .forecast-hero .hc:nth-child(2), .forecast-hero .hc:nth-child(4) { border-right: 0; }
  .forecast-hero .hc:nth-child(3), .forecast-hero .hc:nth-child(4) { border-bottom: 0; }
  .factor { grid-template-columns: 130px 1fr 60px; }
  .deals-filters-grid { grid-template-columns: 1fr; }
  .deal-row { grid-template-columns: 1fr 100px; }
  .deal-row .stage, .deal-row .age { display: none; }
  .wf { grid-template-columns: repeat(4, 1fr); height: auto; }
}
