/* ════════════ PERFORMANCE PAGE ════════════ */

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.perf-grid--wide { grid-column: 1 / -1; }

/* ── Velocity Chart ── */
.chart-scroll { width: 100%; overflow-x: auto; }
.chart-scroll::-webkit-scrollbar { height: 4px; }
svg.velocity-chart { min-width: 400px; width: 100%; }

/* ── Bar Chart ── */
.bar-chart { display: flex; flex-direction: column; gap: var(--space-sm); }
.bar-row { display: flex; align-items: center; gap: var(--space-md); }
.bar-label {
  font-size: 0.8rem;
  color: var(--text-soft);
  width: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-track {
  flex: 1;
  height: 10px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  min-width: 60px;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.bar-val { font-size: 0.8rem; font-weight: 700; width: 30px; text-align: right; flex-shrink: 0; }

/* ── Donut Chart ── */
.donut-container { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; }
svg.donut-chart { width: 130px; height: 130px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label { color: var(--text-soft); }
.legend-val { margin-left: auto; font-weight: 700; font-size: 0.8rem; }

/* ── Burndown SVG ── */
svg.burndown-chart { width: 100%; height: 170px; }

/* ── Member Table ── */
.member-table { width: 100%; }
.member-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--border);
}
.member-table th:not(:first-child) { text-align: center; }
.member-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.875rem;
  vertical-align: middle;
}
.member-table tr:last-child td { border-bottom: none; }
.member-table td:not(:first-child) { text-align: center; }

.member-cell { display: flex; align-items: center; gap: 10px; }
.member-info__name { font-weight: 600; font-size: 0.875rem; }
.member-info__role { font-size: 0.72rem; color: var(--muted); }

.score-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.score-high { background: var(--green-dim);  color: var(--green); }
.score-med  { background: var(--yellow-dim); color: var(--yellow); }
.score-low  { background: var(--red-dim);    color: var(--red); }

/* ── Sprint info panel ── */
.sprint-info { display: flex; flex-direction: column; gap: 10px; }
.sprint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.sprint-row:last-child { border-bottom: none; }
.sprint-row span:first-child { color: var(--muted); }
.sprint-row span:last-child  { font-weight: 600; }

/* ── Cycle time mini chart ── */
.cycle-bars { display: flex; gap: 6px; align-items: flex-end; height: 60px; }
.cycle-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  opacity: .7;
  transition: opacity var(--t);
}
.cycle-bar:hover { opacity: 1; }
.cycle-labels { display: flex; gap: 6px; margin-top: 4px; }
.cycle-label { flex: 1; text-align: center; font-size: 0.62rem; color: var(--muted); }

/* ── Activity feed ── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.activity-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--surface);
  flex-shrink: 0;
}
.activity-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
}
.activity-item:last-child .activity-line { display: none; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 0.82rem; line-height: 1.5; }
.activity-text strong { color: var(--text); }
.activity-time { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .perf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .donut-container { justify-content: center; }
  .bar-label { width: 70px; }
}
