:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --border: #c8c8c8;
  /* Colour is reserved for states (SPEC 13.5). */
  --state-ok: #1e7b34;
  --state-warning: #a15c00;
  --state-critical: #b3261e;
  --state-unknown: #5c5c5c;
  --state-offline: #44475a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --fg: #e6e6e6;
    --muted: #a0a0a0;
    --border: #3a3d44;
    --state-ok: #5fc27a;
    --state-warning: #e0a040;
    --state-critical: #f2776f;
    --state-unknown: #a0a0a0;
    --state-offline: #8a8fa8;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.app-header,
.app-footer {
  padding: 6px 12px;
  border: 0 solid var(--border);
}

.app-header {
  border-bottom-width: 1px;
}

.app-footer {
  border-top-width: 1px;
  color: var(--muted);
  font-size: 12px;
}

.app-title {
  font-weight: 600;
}

main {
  flex: 1;
  padding: 12px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.error {
  color: var(--state-critical);
}
