:root {
  color-scheme: light;
  --surface-0: #f4f4f2;
  --surface-1: #fcfcfb;
  --border: #e3e2de;
  --grid: #ecebe7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7a7974;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --neutral: #7a7974;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --accent-bg: #e8f0fb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-0: #111110;
    --surface-1: #1a1a19;
    --border: #2f2f2c;
    --grid: #2a2a27;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #94938b;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --neutral: #94938b;
    --accent-bg: #1d2a3b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0: #111110;
  --surface-1: #1a1a19;
  --border: #2f2f2c;
  --grid: #2a2a27;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #94938b;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --neutral: #94938b;
  --accent-bg: #1d2a3b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--surface-0); color: var(--text-primary);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 2px; font-weight: 600; }
.sub { color: var(--text-secondary); font-size: 13px; }
.muted { color: var(--text-muted); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-1); }
.seg button { border: 0; background: none; color: var(--text-secondary); padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--accent-bg); color: var(--text-primary); font-weight: 600; }
select, input, .btn {
  font: inherit; font-size: 14px; color: var(--text-primary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
}
.btn { cursor: pointer; }
.banner { border: 1px solid var(--border); border-left: 4px solid var(--warning); background: var(--surface-1);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.banner.err { border-left-color: var(--critical); }
.section-title { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.tile .label { font-size: 12.5px; color: var(--text-secondary); }
.tile .value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .value small { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.tile .hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.insight { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; }
.insight .icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; margin-top: 1px; }
.insight.ok .icon { background: var(--good); }
.insight.warning .icon { background: var(--warning); color: #0b0b0b; }
.insight.info .icon { background: var(--neutral); }
.insight .lvl { font-size: 12px; color: var(--text-muted); }
.insight p { margin: 2px 0 0; font-size: 14px; color: var(--text-secondary); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 12px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.chart { position: relative; height: 280px; margin-top: 10px; }
.card.wide .chart { height: 320px; }
.empty { display: grid; place-items: center; height: 100%; color: var(--text-muted); font-size: 14px; text-align: center; padding: 0 20px; }
details { margin-top: 8px; font-size: 13px; }
summary { cursor: pointer; color: var(--text-secondary); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 13px; margin-top: 6px; }
th, td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--text-secondary); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; }
.legend i.dash { height: 0; border-top: 2px dashed; background: none !important; border-radius: 0; }
.legend i.dot { border-radius: 50%; width: 9px; height: 9px; }
.legend i.ring { border-radius: 50%; width: 9px; height: 9px; background: none !important; border: 2px solid; }
.note { margin-top: 10px; display: grid; gap: 8px; font-size: 13.5px; }
.note .assess { display: flex; gap: 10px; border-radius: 8px; padding: 8px 10px; background: var(--surface-0); }
.note .assess .icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }
.note .assess.ok .icon { background: var(--good); }
.note .assess.warning .icon { background: var(--warning); color: #0b0b0b; }
.note .assess.info .icon { background: var(--neutral); }
.note .assess b { color: var(--text-primary); }
.note .assess span { color: var(--text-secondary); }
.note .about { color: var(--text-secondary); margin: 0; }
.note .about b { color: var(--text-primary); font-weight: 600; }
footer { margin-top: 28px; font-size: 12.5px; color: var(--text-muted); }
.hidden { display: none !important; }
@media (max-width: 560px) {
  .controls { margin-left: 0; }
  .tile .value { font-size: 20px; }
  .chart, .card.wide .chart { height: 240px; }
}
/* Navigation und Formulare (alle Seiten) */
.topnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.topnav .brand { font-weight: 650; color: var(--text-primary); margin-right: 8px; text-decoration: none; }
.topnav a { color: var(--text-secondary); text-decoration: none; padding: 4px 2px; }
.topnav a[aria-current="page"] { color: var(--text-primary); font-weight: 600; border-bottom: 2px solid var(--series-1); }
.topnav .spacer { flex: 1; }
.topnav .who { color: var(--text-muted); font-size: 13px; }
.linkbtn { background: none; border: 0; color: var(--text-secondary); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 2px; }
.narrow { max-width: 460px; margin: 8vh auto 0; }
label { display: block; font-size: 13.5px; color: var(--text-secondary); margin: 12px 0 4px; }
input[type=email], input[type=password], input[type=text], select.full { width: 100%; padding: 9px 11px; }
.btn.primary { background: var(--series-1); border-color: var(--series-1); color: #fff; font-weight: 600; }
.btn.danger { color: var(--critical); }
.btn:disabled { opacity: .6; cursor: default; }
.msg { margin-top: 14px; font-size: 14px; }
.msg.err { color: var(--critical); }
.msg.ok { color: var(--text-primary); }
.badge { display: inline-block; font-size: 12px; border-radius: 999px; padding: 1px 9px; border: 1px solid var(--border); color: var(--text-secondary); }
.badge.ok { border-color: var(--good); color: var(--text-primary); }
.badge.warn { border-color: var(--warning); color: var(--text-primary); }
.badge.err { border-color: var(--critical); color: var(--text-primary); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.legalnav { margin-top: 28px; font-size: 12.5px; color: var(--text-muted); display: flex; gap: 14px; }
.legalnav a { color: var(--text-muted); }
a.btn { display: inline-block; text-decoration: none; color: inherit; }
.tile .sub { margin: 4px 0 0; font-size: 12px; }
#problems ul { margin: 6px 0 0; padding-left: 18px; }
