:root { color-scheme:dark;
  --bg:#0b0d12; --surface:#12161f; --surface-2:#181d29; --border:#1f2533;
  --text:#e6e8ee; --text-2:#b4bccd; --muted:#7d869b;
  --accent:#3987e5; --accent-soft:rgba(57,135,229,.14);
  --good:#0ca30c; --warn:#fab219; --bad:#d03b3b;
  --radius:16px;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; }
.wrap { max-width:1200px; margin:0 auto; padding:24px 16px 64px; }
header { display:flex; flex-wrap:wrap; align-items:center; gap:16px; justify-content:space-between; margin-bottom:24px; }
.brand { display:flex; align-items:center; gap:12px; font-weight:700; font-size:20px; }
.logo { width:36px; height:36px; border-radius:10px; background:linear-gradient(135deg,#3987e5,#7c5cff); display:grid; place-items:center; font-size:18px; }
nav a { color:var(--muted); text-decoration:none; margin-left:16px; font-size:14px; }
nav a.on { color:var(--text); }
.pill { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--border); font-size:14px; }
.dot { width:8px; height:8px; border-radius:50%; background:var(--muted); }
.pill.good .dot { background:var(--good); box-shadow:0 0 0 4px rgba(12,163,12,.18); }
.pill.warn .dot { background:var(--warn); }
.pill.bad .dot { background:var(--bad); box-shadow:0 0 0 4px rgba(208,59,59,.2); }
.bar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.muted { color:var(--muted); font-size:13px; }
button, .btn { background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:8px 14px; font:inherit; font-size:14px; cursor:pointer; }
button:hover { border-color:#2d3548; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
button:disabled { opacity:.5; cursor:wait; }
.banner { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:12px 16px; border-radius:12px; margin-bottom:16px; background:rgba(250,178,25,.08); border:1px solid rgba(250,178,25,.3); font-size:14px; }
.banner.bad { background:rgba(208,59,59,.08); border-color:rgba(208,59,59,.35); }
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; margin-bottom:16px; }
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; min-width:0; }
.kpi .label { color:var(--muted); font-size:13px; }
.kpi .value { font-size:28px; font-weight:700; letter-spacing:-.02em; margin-top:4px; font-variant-numeric:tabular-nums; }
.kpi .sub { color:var(--text-2); font-size:13px; margin-top:2px; }
.kpi.accent { background:linear-gradient(160deg,rgba(57,135,229,.18),var(--surface) 70%); border-color:rgba(57,135,229,.35); }
.grid2 { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-bottom:16px; }
@media (max-width:900px) { .grid2 { grid-template-columns:1fr; } }
h2 { font-size:16px; margin:0; font-weight:600; }
.card-head { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; margin-bottom:16px; }
.seg { display:inline-flex; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:2px; }
.seg button { border:0; background:none; padding:4px 10px; border-radius:8px; color:var(--muted); }
.seg button.on { background:var(--bg); color:var(--text); }
#chart { position:relative; height:220px; }
#chart svg { display:block; }
.tip { position:absolute; pointer-events:none; background:#0b0d12; border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:13px; white-space:nowrap; transform:translate(-50%,-100%); display:none; }
.list { display:flex; flex-direction:column; gap:10px; }
.row { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:10px 12px; border-radius:10px; background:var(--surface-2); }
.row .t { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sys { display:flex; justify-content:space-between; gap:8px; padding:8px 0; border-bottom:1px solid var(--border); font-size:14px; }
.sys:last-child { border-bottom:0; }
.ok { color:var(--good); } .bad { color:var(--bad); } .warn { color:var(--warn); }
.tablewrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; color:var(--muted); font-weight:500; font-size:12px; text-transform:uppercase; letter-spacing:.04em; padding:8px 10px; border-bottom:1px solid var(--border); }
td { padding:10px; border-bottom:1px solid var(--border); white-space:nowrap; }
td.title { white-space:normal; min-width:180px; }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; }
.badge { display:inline-flex; gap:4px; align-items:center; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid var(--border); color:var(--text-2); }
.badge.open { color:var(--warn); border-color:rgba(250,178,25,.4); }
.badge.done { color:var(--good); border-color:rgba(12,163,12,.4); }
.badge.cancel { color:var(--muted); text-decoration:line-through; }
.badge.test { color:#a78bfa; border-color:rgba(167,139,250,.4); }
input, select { background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:8px 12px; font:inherit; font-size:14px; }
.empty { color:var(--muted); text-align:center; padding:24px; font-size:14px; }
#ebconnect input { width:100%; margin:8px 0; }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--surface-2); border:1px solid var(--border); padding:10px 16px; border-radius:10px; display:none; max-width:calc(100% - 32px); }

/* Einstellungen */
.narrow { max-width:760px; }
.section { margin-bottom:16px; }
.section p.hint { color:var(--muted); font-size:13px; margin:4px 0 0; }
.field { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--border); }
.field:last-child { border-bottom:0; padding-bottom:0; }
.field .lab { flex:1 1 220px; min-width:0; }
.field .lab small { display:block; color:var(--muted); font-size:13px; }
.field .ctl { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.switch { position:relative; width:44px; height:24px; flex:none; }
.switch input { opacity:0; width:0; height:0; }
.switch span { position:absolute; inset:0; background:var(--surface-2); border:1px solid var(--border); border-radius:999px; cursor:pointer; transition:.2s; }
.switch span::after { content:""; position:absolute; width:18px; height:18px; left:2px; top:2px; background:var(--muted); border-radius:50%; transition:.2s; }
.switch input:checked + span { background:var(--accent); border-color:var(--accent); }
.switch input:checked + span::after { transform:translateX(20px); background:#fff; }
.info { background:var(--accent-soft); border:1px solid rgba(57,135,229,.3); border-radius:12px; padding:12px 14px; font-size:14px; color:var(--text-2); }
.info ol { margin:6px 0 0; padding-left:20px; }
.plat { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 0; border-bottom:1px solid var(--border); }
.plat:last-child { border-bottom:0; }
.plat .soon { color:var(--muted); font-size:13px; }

/* Kosten-Fenster */
tr.click { cursor:pointer; }
tr.click:hover td { background:var(--surface-2); }
dialog { background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:var(--radius); padding:24px; width:min(440px, calc(100% - 32px)); }
dialog::backdrop { background:rgba(0,0,0,.6); }
.crow { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; }
.crow small { display:block; color:var(--muted); font-size:12px; }
.crow input { width:140px; text-align:right; }
.calc { margin-top:12px; padding:12px; border-radius:10px; background:var(--surface-2); font-size:13px; color:var(--text-2); line-height:1.7; }
