.kpis {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
}

.label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.arrow {
  font-size: 0.6875rem;
  font-weight: 700;
}

.good {
  color: var(--success);
}

.bad {
  color: var(--error);
}

.flat {
  color: var(--text-muted);
}

/* ── Tooltip ─────────────────────────────────────── */

/* Override DS tooltip bubble: use themed surface instead of inverted style */
.tooltipWrap [role="tooltip"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  white-space: normal;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  left: 0;
  transform: none;
}

/* Right-align tooltip for items near the edge to prevent overflow */
.tooltipEnd [role="tooltip"] {
  left: auto;
  right: 0;
  transform: none;
}

.tooltipBody {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.tooltipTitle {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.tooltipRows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tooltipRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tooltipPeriod {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tooltipDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.tooltipDotPrev {
  background: var(--text-muted);
  opacity: 0.4;
}

.tooltipPeriodLabel {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.tooltipTime {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tooltipValue {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.tooltipValuePrev {
  font-weight: 500;
  color: var(--text-muted);
}

.tooltipChange {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  text-align: right;
}
