/* ============================================================
   KPI CARDS — Top metrics row
   ============================================================ */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s;
  animation: fadeInUp 0.4s ease both;
}
.kpi-card:hover { border-color: var(--border2); }

/* Colored top accent line per card variant */
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.kpi-card.green::before  { background: var(--green); }
.kpi-card.blue::before   { background: var(--blue); }
.kpi-card.yellow::before { background: var(--yellow); }
.kpi-card.red::before    { background: var(--red); }
.kpi-card.purple::before { background: var(--purple); }

/* Staggered entrance for each card */
.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.10s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.20s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }

.kpi-label { font-size: 11.5px; color: var(--text2); margin-bottom: 8px; font-weight: 500; }

.kpi-icon {
  position: absolute; right: 16px; top: 16px;
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.kpi-icon.green  { background: rgba(63, 185, 80,  0.15); }
.kpi-icon.blue   { background: rgba(56, 139, 253, 0.15); }
.kpi-icon.yellow { background: rgba(227, 179, 65, 0.15); }
.kpi-icon.red    { background: rgba(248, 81,  73, 0.15); }
.kpi-icon.purple { background: rgba(188, 140, 255,0.15); }

.kpi-value {
  font-size: 28px; font-weight: 700; line-height: 1;
  font-family: var(--font-mono); margin-bottom: 8px;
}

.kpi-delta {
  font-size: 11.5px; display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
}
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta span { color: var(--text3); font-family: var(--font-sans); }
