:root {
  color-scheme: dark;
  --bg: #14120e;
  --card: #1e1b16;
  --line: #3a342c;
  --text: #f3eadb;
  --muted: #b3a48e;
  --ok: #c6e27a;
  --hot: #e7a15a;
  --down: #e07a6a;
  --stale: #d6c36a;
  --accent: #e6b35a;
  font-family: "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
header, main { padding: 16px 24px; }
header { display: flex; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: 0.12em; }
form { display: flex; gap: 8px; }
input, button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
.machine { display: flex; gap: 16px; margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; justify-content: space-between; }
h1, h2 { font-weight: 600; font-size: 1.1rem; }
.realms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.card.selected { border-color: var(--accent); }
.card h3 { margin: 0 0 8px; font-size: 1rem; display: flex; justify-content: space-between; }
.meta { color: var(--muted); font-size: 0.9rem; line-height: 1.45; font-variant-numeric: tabular-nums; white-space: pre-line; }
.health { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.health.ok { color: var(--ok); }
.health.hot { color: var(--hot); }
.health.down { color: var(--down); }
.health.stale { color: var(--stale); }
.detail { margin-top: 20px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.actions { display: flex; gap: 8px; }
canvas { width: calc(100% - 48px); max-width: 960px; height: 160px; margin: 8px 24px; background: #100e0b; border: 1px solid var(--line); border-radius: 8px; }
#machine-graph { height: 90px; display: block; }
pre {
  white-space: pre-wrap;
  background: #100e0b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  font-size: 12px;
}
.error { color: var(--down); }
