/* ── Stat cards (Home overview) ──────────────────────────────────────── */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.3rem; }
.stat-card.healthy .stat-value { color: #6ee7a8; }
.stat-card.warning .stat-value { color: #f6c76a; }

/* ── Service cards ───────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
}
.card .count { font-size: 1.4rem; font-weight: 600; }
.card .label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.1rem; }
.card.total { border-color: var(--accent); }
.card.total .count { color: var(--accent); }

/* ── Status bar chart ────────────────────────────────────────────────── */

.status-bars { display: flex; flex-direction: column; gap: 0.5rem; }

.status-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.status-bar-row .bar-label { color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-bar-track {
  background: var(--border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s ease;
  min-width: 4px;
}
.status-bar-fill.healthy { background: #6ee7a8; }
.status-bar-fill.degraded { background: #f6c76a; }
.status-bar-fill.failed { background: #ff7a7a; }
.status-bar-row .bar-count { color: var(--muted); font-size: 0.8rem; }

/* H.9 — Compliance by Framework */
.home-fw-sub {
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
}
.home-fw-row {
  display: grid;
  grid-template-columns: 130px 1fr 50px auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.home-fw-row:last-child { border-bottom: none; }
.home-fw-name {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.home-fw-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}
.home-fw-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.home-fw-bar-fill.ok   { background: #6ee7a8; }
.home-fw-bar-fill.warn { background: #f6c76a; }
.home-fw-bar-fill.bad  { background: #ff7a7a; }
.home-fw-pct {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}
.home-fw-pct.ok   { color: #6ee7a8; }
.home-fw-pct.warn { color: #f6c76a; }
.home-fw-pct.bad  { color: #ff7a7a; }
.home-fw-counts { font-size: 0.78rem; }
.home-fw-breach {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 122, 122, 0.18);
  color: #ff9a9a;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-fw-sev {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(246, 199, 106, 0.14);
  color: #f6c76a;
  font-size: 0.7rem;
  font-weight: 600;
}
