:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2330;
  --border: #263041;
  --fg: #e6edf3;
  --fg-dim: #8b949e;
  --accent: #4f9cf9;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ── Kopfzeile ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.brand { display: flex; align-items: baseline; gap: 10px; }
.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: middle;
}
.host { color: var(--fg-dim); font-size: 15px; }

.live {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-dim);
  box-shadow: 0 0 0 0 rgba(63,185,80,.6);
}
.dot.up   { background: var(--green); animation: pulse 2.4s infinite; }
.dot.down { background: var(--red); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,185,80,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(63,185,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); }
}

/* ── Überschriften ── */
h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--fg-dim);
  font-weight: 600;
  margin: 32px 0 12px;
}
.count { color: var(--fg-dim); font-weight: 400; }

/* ── Kennzahlen-Karten ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-dim);
}
.card .value {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}
.card .sub { font-size: 12.5px; color: var(--fg-dim); }

.bar {
  height: 5px;
  background: #0b0f16;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: 999px;
  transition: width .5s ease, background .3s;
}
.bar > i.warn { background: var(--yellow); }
.bar > i.crit { background: var(--red); }

/* ── Dienst-Kacheln ── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: background .15s, border-color .15s, transform .15s;
}
.tile:hover {
  background: var(--bg-hover);
  border-color: #33405a;
  transform: translateY(-1px);
}
.tile-icon { font-size: 24px; line-height: 1; }
.tile-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile-name { font-weight: 600; }
.tile-desc { font-size: 12.5px; color: var(--fg-dim); }
.tile-arrow { color: var(--fg-dim); font-size: 15px; }

/* ── Container-Tabelle ── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--fg-dim);
  font-weight: 600;
  background: #12171f;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}
.pill.running { color: var(--green); background: rgba(63,185,80,.12); border-color: rgba(63,185,80,.3); }
.pill.exited  { color: var(--red);   background: rgba(248,81,73,.12);  border-color: rgba(248,81,73,.3); }
.pill.other   { color: var(--yellow);background: rgba(210,153,34,.12); border-color: rgba(210,153,34,.3); }

/* ── Systemliste ── */
.sys dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
}
.sys dl > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
}
.sys dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-dim); }
.sys dd { margin: 3px 0 0; font-size: 14px; }

/* ── Fußzeile ── */
footer {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--fg-dim);
  display: flex;
  gap: 6px;
}
.muted { color: var(--fg-dim); }

@media (max-width: 520px) {
  body { padding: 16px 14px 40px; }
  .card .value { font-size: 22px; }
  th, td { padding: 9px 12px; }
}
