:root {
  --navy: #273852;
  --line: #d8dee6;
  --muted: #5c6774;
  --surface: #fff;
  --page: #eef1f5;
  --text: #1c2430;
  --chip: #f3f5f8;
  --heizen: #198754;
  --halten: #dc3545;
  --geplant: #6c757d;
  --bereit: #fd7e14;
  --eingetroffen: #0d6efd;
  --parken: #ffc107;
}
@media (prefers-color-scheme: dark) {
  :root {
    --line: #3a4554;
    --muted: #9aa4b2;
    --surface: #1a222c;
    --page: #12181f;
    --text: #e8edf3;
    --chip: #243040;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
  min-height: 100dvh;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  min-height: 44px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mark {
  width: 22px; height: 14px; border: 1.6px solid #fff; border-radius: 2px; position: relative; flex: none;
}
.mark::after {
  content: ""; position: absolute; inset: 3px 5px; border: 1.4px solid #fff; border-radius: 1px;
}
.host { margin-left: auto; font-size: 12px; opacity: .78; }
.user {
  border: 0; background: rgba(255,255,255,.12); color: #fff;
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
main { padding: 10px; max-width: 1100px; margin: 0 auto; }
.login {
  max-width: 22rem; margin: 28px auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px;
}
.login h1 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; }
.login p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.login label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; }
.login input, .go {
  border: 1px solid var(--line); background: var(--page); color: var(--text);
  border-radius: 6px; padding: 8px 10px; font: inherit;
}
.go {
  width: 100%; border: 0; background: var(--navy); color: #fff; font-weight: 600; cursor: pointer;
}
.error { color: #dc3545; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.chip {
  border: 1px solid var(--line); background: var(--chip); color: var(--text);
  border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip b { font-variant-numeric: tabular-nums; }
.updated { margin-left: auto; font-size: 11px; color: var(--muted); }
.h { display: flex; align-items: baseline; gap: 8px; font-size: 11px; font-weight: 600; color: var(--muted); margin: 8px 2px 4px; }
.h i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cols, .row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 4px 10px;
  align-items: center; padding: 8px 10px;
}
.cols { display: none; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
.row {
  width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent;
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.list .row:first-of-type { border-top: 0; }
.row[aria-expanded="true"] { background: color-mix(in srgb, var(--navy) 8%, var(--surface)); }
.id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.box { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.temps { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; white-space: nowrap; }
.temps small { font-weight: 400; color: var(--muted); font-size: 11px; }
.temp-chip {
  display: inline-block;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 0.375rem;
  line-height: 1.3;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.temp-chip.temp-ok { border-color: #198754; }
.temp-chip.temp-warn { border-color: #fd7e14; }
.temp-chip.temp-over {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.badge { display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 600; color: #fff; }
.badge.heizen { background: var(--heizen); }
.badge.halten { background: var(--halten); }
.badge.geplant { background: var(--geplant); }
.badge.bereit { background: var(--bereit); }
.badge.eingetroffen { background: var(--eingetroffen); }
.badge.parken { background: var(--parken); color: #212529; }
.detail { display: none; grid-column: 1 / -1; font-size: 12px; color: var(--muted); padding-top: 4px; }
.row[aria-expanded="true"] .detail { display: block; }
.desk { display: none; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; color: var(--muted); }
@media (min-width: 640px) {
  .cols, .row {
    grid-template-columns: minmax(9rem, 1.4fr) minmax(5rem, .9fr) 5.6rem 4.4rem 3.8rem minmax(6.2rem, .9fr) 4.2rem;
  }
  .cols { display: grid; }
  .id { flex-direction: row; align-items: baseline; gap: 8px; }
  .right { display: none; }
  .desk {
    display: block;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .desk.num { font-variant-numeric: tabular-nums; text-align: right; overflow: visible; }
}
@media (max-width: 639px) {
  .host { display: none; }
  .updated { margin-left: 0; width: 100%; }
}
