:root {
  --bg: #0d1117; --panel: #161b22; --line: #30363d; --text: #e6edf3; --muted: #8b949e;
  --accent: #58a6ff; --bad: #f85149;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.brand { font-weight: 700; color: var(--text); }
main { padding: 12px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 1.25rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
button, input {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px;
}
button { cursor: pointer; background: var(--panel); }
button:hover { border-color: var(--accent); }
.login { max-width: 320px; margin: 15vh auto 0; display: grid; gap: 8px; padding: 0 12px; }
.error { color: var(--bad); margin: 0; }

/* dashboard */
:root { --up: #3fb950; --down: #f85149; }
h2 { font-size: 1rem; margin: 18px 0 6px; }
.small { font-size: .85rem; }
.sp { flex: 1; }
.top .small { margin-left: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.row {
  display: grid; align-items: baseline; gap: 4px 10px; padding: 6px 10px;
  grid-template-columns: 2.2em minmax(0, 1fr) 7em 5em 5em 5em 4.5em 4.5em;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row.head { background: var(--panel); color: var(--muted); font-size: .8rem; }
.row:not(.head):hover { background: var(--panel); }
.rk, .lg { color: var(--muted); }
.n { text-align: right; }
.nm a:first-child { font-weight: 600; }
.gh { color: var(--muted); margin-left: 2px; }
.ds { display: block; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--up); }
.down { color: var(--down); }
.sc { color: var(--accent); font-weight: 600; }
.b { font-size: .7rem; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.b-nieuw { color: var(--up); border-color: var(--up); }
.b-warn { color: var(--down); border-color: var(--down); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.panel .line { display: flex; gap: 12px; align-items: baseline; }
.panel .line a { flex: 1; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-width: 7em; }
.stats span { display: block; font-size: .75rem; }
.chart { width: 100%; height: 160px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.bars { width: 100%; max-width: 600px; height: 40px; fill: var(--accent); }
.status { display: grid; gap: 8px; max-width: 480px; }
select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }

@media (max-width: 700px) {
  .row.head, .lg, .d1, .ac { display: none; }
  .row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "nm nm nm" "st d7 sc" "ds ds ds"; gap: 2px 10px;
    padding: 8px 10px;
  }
  .rk { display: none; }
  .nm { display: contents; }
  .nm > a:first-child { grid-area: nm; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row .n { text-align: left; }
  .nm .ds { grid-area: ds; }
  .nm > :not(.ds):not(a:first-child) { display: none; }
  .is-new .nm > a:first-child::before { content: "● "; color: var(--accent); }
  .st { grid-area: st; } .d7 { grid-area: d7; } .sc { grid-area: sc; }
  .n[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: .7rem; font-weight: 400; }
}

.kans { font-weight: 700; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; }
.k-hi { color: var(--up); border-color: var(--up); }
.k-mid { color: var(--accent); border-color: var(--accent); }
.k-lo { color: var(--muted); }
.opp > div { margin-top: 2px; }
.apps .row { grid-template-columns: 1fr 5em 4em 5em 6em; }
@media (max-width: 700px) { .apps .row { grid-template-columns: 1fr 1fr; } .apps .head { display: none; } }
