/*!
 * DashTemplate.com — Sales Pipeline Dashboard · Template Styles
 * © 2025 DashTemplate.com. All Rights Reserved.
 * License: https://dashtemplate.com/license
 */

/* ─── Template accent override ─────────────── */
:root {
  --dt-template-primary: #3B82F6;
  --dt-template-accent:  #6366F1;
}

/* ─── Stage legend ─────────────────────────── */
.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.stage-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--dt-text-3);
}
.stage-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── Velocity metrics panel ───────────────── */
.vel-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--dt-border);
}
.vel-metric:last-of-type {
  border-bottom: none;
}
.vel-label {
  font-size: 10px;
  color: var(--dt-text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.vel-value {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.vel-sub {
  font-size: 10.5px;
  color: var(--dt-text-3);
}

/* ─── Gauge row ────────────────────────────── */
.gauge-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-around;
}

/* ─── Sub-screen nav bar ───────────────────── */
.sub-screens-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ─── Forecast hero cards ──────────────────── */
.forecast-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.fh-card {
  background: var(--dt-surface-2);
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.fh-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--fh-color, var(--dt-primary));
}
.fh-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--dt-text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fh-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: var(--fh-color, var(--dt-primary));
}

/* Right-aligned cell in rep-forecast-row */
.rep-forecast-row span:not(:nth-child(1)):not(:nth-child(2)) { text-align: right; }
.fh-pct { font-size: 12px; color: var(--dt-text-3); margin-top: 2px; }
.fh-bar { height: 4px; background: var(--dt-surface-3); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.fh-bar-fill { height: 100%; border-radius: 2px; background: var(--fh-color, var(--dt-primary)); transition: width 1.2s ease; }

/* ─── Rep commit table rows ────────────────── */
.rep-forecast-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px 80px 80px 80px 60px;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--dt-border);
  font-size: 11.5px;
}
.rep-forecast-row:last-child { border-bottom: none; }
.rep-forecast-row.header {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--dt-text-3);
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--dt-surface-2);
  border-radius: 8px 8px 0 0;
}
.attain-bar { height: 6px; background: var(--dt-surface-3); border-radius: 3px; overflow: hidden; }
.attain-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.trend-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  text-align: center;
}

/* ─── Rep card grid (rep-performance.html) ─── */
.rep-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.rep-card {
  background: var(--dt-surface);
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t-fast), transform var(--t-fast);
  cursor: default;
}
.rep-card:hover {
  border-color: var(--dt-border-active);
  transform: translateY(-2px);
}
.rep-card__top { display: flex; align-items: center; gap: 10px; }
.rep-card__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rep-card__name { font-size: 12.5px; font-weight: 700; color: var(--dt-text); }
.rep-card__role { font-size: 10.5px; color: var(--dt-text-3); margin-top: 1px; }
.rep-card__pct {
  font-size: 30px; font-weight: 800;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.rep-card__bar { height: 6px; background: var(--dt-surface-3); border-radius: 3px; overflow: hidden; }
.rep-card__bar-fill { height: 100%; border-radius: 3px; transition: width 1.2s ease; }
.rep-card__stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  padding-top: 8px; border-top: 1px solid var(--dt-border);
}
.rep-stat { display: flex; flex-direction: column; gap: 2px; }
.rep-stat__val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rep-stat__lbl {
  font-size: 9.5px; color: var(--dt-text-3);
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.rep-card__territory {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--dt-text-3);
}

/* ─── Leaderboard table rows ───────────────── */
.lb-row {
  display: grid;
  grid-template-columns: 30px 170px 1fr 72px 72px 72px 64px;
  gap: 12px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--dt-border);
  font-size: 12px;
  transition: background var(--t-fast);
}
.lb-row:hover { background: var(--dt-surface-2); }
.lb-row:last-child { border-bottom: none; }
.lb-row.hdr {
  font-size: 9.5px; font-weight: 700;
  color: var(--dt-text-3); letter-spacing: .07em;
  text-transform: uppercase; background: var(--dt-surface-2);
}
.rnk {
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Deal inspector table ─────────────────── */
.deal-row {
  display: grid;
  grid-template-columns: 90px 1fr 120px 90px 80px 70px 90px 80px;
  gap: 10px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--dt-border);
  font-size: 11.5px;
  transition: background var(--t-fast);
}
.deal-row:hover { background: var(--dt-surface-2); }
.deal-row:last-child { border-bottom: none; }
.deal-row.hdr {
  font-size: 9.5px; font-weight: 700;
  color: var(--dt-text-3); letter-spacing: .07em;
  text-transform: uppercase; background: var(--dt-surface-2);
}
.company-name { font-size: 12px; font-weight: 600; color: var(--dt-text); }
.deal-amount { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--dt-text); }
.deal-days { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
