:root {
  --bg: #0e1116;
  --card: #171b22;
  --line: #2a3140;
  --text: #e8edf5;
  --muted: #8b95a8;
  --accent: #5ee0c0;
  --warn: #f0b429;
  --bad: #f07178;
  --ok: #7fd99a;
  --reboot: #c4a6ff;
  --motion: #5b8def;
  --font: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
.top, footer, .meta, #table-wrap, #charts { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; padding-top: 24px; padding-bottom: 8px; }
h1 { margin: 0; font-size: 1.6rem; letter-spacing: 0.02em; }
.sub, .hint, footer, .meta p { color: var(--muted); margin: 4px 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ranges { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ranges button, .ghost, .login button {
  background: transparent; color: var(--text); border: 0; padding: 8px 12px; cursor: pointer; font: inherit;
}
.ranges button + button { border-left: 1px solid var(--line); }
.ranges button.active { background: #22302e; color: var(--accent); }
.ghost { border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.presence-toggle { display: flex; gap: 8px; align-items: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 16px 0 24px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.online::before { background: var(--ok); }
.status.offline::before { background: var(--bad); }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 8px; margin: 0 0 20px; }
.chart-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.chart-card h2 { margin: 0; font-size: 1.05rem; }
.chart-card .stats { color: var(--muted); font-size: 0.9rem; }
.chart-wrap { position: relative; height: 280px; }
footer { padding: 12px 20px 32px; font-size: 0.85rem; }
code { background: #11151c; padding: 1px 5px; border-radius: 4px; }
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
form.login { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; width: min(360px, 92vw); display: grid; gap: 12px; }
form.login label { display: grid; gap: 4px; color: var(--muted); }
form.login input { background: #0e1116; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
form.login button { background: #1c3b34; color: var(--accent); border-radius: 8px; padding: 10px; }
form.login .error:empty { display: none; }
form.login .error { color: var(--bad); margin: 0; }
@media (max-width: 720px) {
  .chart-wrap { height: 220px; }
  th:nth-child(5), td:nth-child(5), th:nth-child(6), td:nth-child(6) { display: none; }
}
