:root {
    --bg: #1c1c1e; --flaeche: #242427; --flaeche2: #2c2c31; --rand: #3a3a40;
    --text: #ececf0; --dim: #9a9aa4; --akzent: #409cff; --gruen: #50c878; --rot: #eb5a50; --gelb: #f5a032;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-weight: 300; font-size: 28px; margin: 0 0 16px; }
h2 { font-weight: 400; font-size: 19px; margin: 24px 0 10px; }
.kopf { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--flaeche); border-bottom: 1px solid var(--rand); flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.marke:hover { text-decoration: none; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--dim); padding: 6px 12px; border-radius: 6px; }
nav a.aktiv, nav a:hover { color: var(--text); background: var(--flaeche2); text-decoration: none; }
.konto { margin-left: auto; display: flex; gap: 14px; align-items: center; color: var(--dim); }
main { padding: 24px; max-width: 1300px; margin: 0 auto; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.schmal { max-width: 460px; margin: 40px auto; }
label { display: block; color: var(--dim); font-size: 13px; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], select {
    width: 100%; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--rand); border-radius: 6px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.reihe { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.reihe > * { flex: 1 1 160px; }
button, .knopf { display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--rand); background: var(--flaeche2); color: var(--text); font: inherit; cursor: pointer; }
button.primaer, .knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
button.gefahr { background: transparent; border-color: var(--rot); color: var(--rot); }
button.link { background: none; border: none; padding: 0; color: var(--akzent); }
button:hover, .knopf:hover { filter: brightness(1.15); text-decoration: none; }
form.inline { display: inline; margin: 0; }
.fehler { background: rgba(235,90,80,.12); border: 1px solid var(--rot); color: #ffb3ad; padding: 10px 12px; border-radius: 6px; margin: 12px 0; }
.erfolg { background: rgba(80,200,120,.12); border: 1px solid var(--gruen); color: #b6f0c8; padding: 10px 12px; border-radius: 6px; margin: 12px 0; }
.hinweis { color: var(--dim); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--dim); font-weight: 400; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--rand); }
td { padding: 10px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
tr:hover td { background: var(--flaeche2); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.punkt.online { background: var(--gruen); } .punkt.offline { background: #666; }
.etikett { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--rand); color: var(--dim); }
.etikett.server { border-color: var(--gelb); color: var(--gelb); }
.balken { position: relative; height: 8px; background: var(--bg); border-radius: 4px; min-width: 70px; overflow: hidden; }
.balken > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--akzent); border-radius: 4px; }
.balken.warn > span { background: var(--gelb); } .balken.krit > span { background: var(--rot); }
.wert { display: flex; align-items: center; gap: 8px; } .wert .zahl { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; }
.raster .k { color: var(--dim); font-size: 13px; } .raster .v { font-size: 18px; }
.code { font: 600 30px/1 Consolas, monospace; letter-spacing: 3px; text-align: center; }
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter > * { flex: 0 1 200px; }
.leer { text-align: center; color: var(--dim); padding: 40px 10px; }
.fehlerfarbe { color: var(--rot); }

/* Status (fest, nie fuer Datenreihen): immer mit Symbol + Text */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status::before { font-size: 12px; }
td .status { white-space: normal; align-items: baseline; max-width: 240px; }
td.name { white-space: nowrap; }
.status.ok::before { content: "●"; color: #0ca30c; }
.status.warnung::before { content: "▲"; color: #fab219; }
.status.kritisch::before { content: "■"; color: #e66767; }
.status.offline::before { content: "○"; color: #9a9aa4; }

/* Zeitraum-Auswahl */
.zeitraum { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; }
.zeitraum button { border: none; border-radius: 0; background: transparent; color: var(--dim); padding: 6px 14px; }
.zeitraum button[aria-pressed="true"] { background: var(--flaeche2); color: var(--text); }

/* Diagramme */
.diagramme { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px 24px; }
@media (max-width: 520px) { .diagramme { grid-template-columns: 1fr; } }
.diagramm { position: relative; min-width: 0; }
.diag-kopf { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.diag-kopf h3 { font-size: 14px; font-weight: 600; margin: 0; }
.diag-legende { display: flex; gap: 12px; font-size: 12px; color: var(--dim); }
.diag-legende i, .diag-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.diagramm svg { display: block; max-width: 100%; height: auto; }
.diagramm .raster { stroke: #34343a; stroke-width: 1; }
.diagramm .achse { stroke: #55555d; stroke-width: 1; }
.diagramm .beschr { fill: var(--dim); font-size: 11px; }
.diagramm .endbeschr { fill: var(--text); font-size: 12px; }
.diagramm .kreuz { stroke: #8a8a94; stroke-width: 1; stroke-dasharray: 3 3; }
.diag-tip { position: absolute; pointer-events: none; background: #111114; border: 1px solid var(--rand); border-radius: 6px; padding: 6px 10px; font-size: 12px; white-space: nowrap; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.diag-tip .t { color: var(--dim); margin-bottom: 2px; }
.diag-leer { color: var(--dim); font-size: 13px; padding: 50px 0; text-align: center; border: 1px dashed var(--rand); border-radius: 6px; }

/* Uebersicht / Ampel */
.kacheln { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.kachel { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 12px 16px; min-width: 150px; }
.kachel .zahl { font-size: 28px; font-weight: 300; line-height: 1.1; }
.kachel .k { color: var(--dim); font-size: 13px; }
.ampel { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ampel a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--rand); border-radius: 20px; color: var(--text); background: var(--flaeche); }
.ampel a:hover { text-decoration: none; background: var(--flaeche2); }
.ampel .anz { color: var(--dim); font-size: 13px; }
pre { background: var(--bg); padding: 12px; border-radius: 6px; overflow-x: auto; }
@media (max-width: 760px) { .tabelle-breit th:nth-child(n+6), .tabelle-breit td:nth-child(n+6) { display: none; } main { padding: 14px; } }
