/* Status page; builds on app.css's tokens. */
.home { color: inherit; text-decoration: none; }
.status { max-width: 1400px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 32px; }
.status h2 { font-size: 1.1rem; margin: 0 0 12px; }
.status h2 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.controls input[type=search] { width: 220px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem;
  background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.ok, .pill.running { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pill.ok::before, .pill.running::before { background: var(--accent); }
.pill.running::before { animation: pulse 1.2s ease-in-out infinite; }
.pill.degraded, .pill.stale, .pill.never { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill.degraded::before, .pill.stale::before, .pill.never::before { background: var(--warn); }
.pill.down, .pill.failing { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.pill.down::before, .pill.failing::before { background: var(--danger); }
.pill.disabled { color: var(--muted); }
#health { font-size: 1rem; padding: 6px 16px; }
@keyframes pulse { 50% { opacity: .3; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.tiles div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; min-width: 0; }
.tiles dt { color: var(--muted); font-size: .8rem; }
.tiles dd { margin: 2px 0 0; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tiles dd small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { white-space: normal; min-width: 72px; }
td:first-child { min-width: 210px; }
td:nth-child(2) { min-width: 130px; }
td:nth-child(3) { white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: .8rem; }
td.run { min-width: 260px; max-width: 420px; }
tr.disabled td { color: var(--muted); }
.zero { color: var(--muted); }
.hot { color: var(--accent); font-weight: 700; }
.bad { color: var(--danger); font-weight: 700; }

.live { font-size: .85rem; color: var(--muted); }
.live.on { color: var(--accent); }
.live.on::before { content: "● "; animation: pulse 2s ease-in-out infinite; }
.audit { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.audit li { display: grid; grid-template-columns: 9.5em 11em 1fr; gap: 4px 12px; padding: 8px 12px; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent; font-size: .88rem; }
.audit li:last-child { border-bottom: none; }
.audit li.warning { border-left-color: var(--warn); }
.audit li.error { border-left-color: var(--danger); }
.audit li.new { animation: flash 2s ease-out; }
.audit time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit .type { font-weight: 600; }
.audit .council { color: var(--accent); font-weight: 600; margin-right: 6px; }
.audit .details { grid-column: 3; display: flex; flex-wrap: wrap; gap: 6px; }
.audit .empty { border: none; }
@keyframes flash { from { background: var(--accent-soft); } }

:root { --danger-soft: #fbe4e2; }
@media (prefers-color-scheme: dark) { :root { --danger-soft: #3b1d1b; } }

@media (max-width: 800px) {
  .status { padding: 16px; gap: 24px; }
  .controls input[type=search] { width: 100%; }
  .audit li { grid-template-columns: 1fr; }
  .audit .details { grid-column: 1; }
}
