/* Monitoring: schlichter Darkmode im Stil von greengoon, keine externen Ressourcen */
:root {
  color-scheme: dark;
  --bg: #131513;
  --text: #e4e7e2;
  --muted: #9aa097;
  --panel: #1b1e1a;
  --line: #2c302b;
  --accent: #6fcf7f;
  --warn: #e0a458;
  --gefahr: #e07a6f;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5;
}
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { color: var(--accent); margin: 0 0 1.25rem; font-size: 1.75rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
a { color: var(--accent); }

/* Kopfleiste */
.kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.logo { color: var(--accent); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.kopf nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.kopf nav a { color: var(--text); text-decoration: none; padding: .25rem 0; }
.kopf nav a:hover { color: var(--accent); }

section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem; margin-bottom: 1.25rem;
}
section.schmal { max-width: 460px; margin: 2rem auto; }

/* Formulare */
label { display: block; margin: .75rem 0 .35rem; color: var(--muted); }
input:not([type=hidden]), select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: .55rem .7rem; font: inherit;
}
input[type=checkbox] { width: auto; margin-right: .5rem; }
label.wahl { color: var(--text); }
button, .button {
  display: inline-block; background: var(--accent); color: #0d1a0f; border: 0;
  border-radius: 6px; padding: .5rem 1rem; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; margin-top: 1rem;
}
button:hover, .button:hover { filter: brightness(1.1); }
button.zweit, .button.zweit { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
button.gefahr, .button.gefahr { background: var(--gefahr); color: #200d0a; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.button:focus-visible, button:focus-visible { outline-color: var(--text); }
.aktionen { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.aktionen form { margin: 0; }
.aktionen button, .aktionen .button { margin-top: 0; }
.abstand { margin-top: 1rem; }

/* Meldungen */
.msg { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--panel);
  border-radius: 6px; padding: .75rem 1rem; margin: 0 0 1.25rem; }
.msg.error { border-left-color: var(--warn); }

/* Tabellen: auf dem Handy seitlich scrollbar */
.tabelle { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-weight: 600; }
.meta, .leer { color: var(--muted); font-size: .875rem; }

dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
dl.daten dt { color: var(--muted); }
dl.daten dd { margin: 0; overflow-wrap: anywhere; }
.geheim {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; letter-spacing: .05em;
  background: var(--bg); border: 1px dashed var(--accent); border-radius: 6px; padding: .75rem;
  overflow-wrap: anywhere; user-select: all;
}

/* Dashboard */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kachel { margin: 0; }
.kachel h2 { color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.kachel .gross { font-size: 1.9rem; font-weight: 700; margin: 0; }
.kachel .meta { margin: .15rem 0 0; overflow-wrap: anywhere; }
.diagrammkopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.diagrammkopf h2 { margin: 0; }
.umschalter { display: flex; gap: .4rem; flex-wrap: wrap; }
.umschalter button { margin: 0; padding: .35rem .8rem; }
.umschalter button.aktiv { background: var(--accent); color: #0d1a0f; border-color: var(--accent); }
.diagramme { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 1.25rem; }
.diagramm { margin: 0; }
.diagramm figcaption { color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }
.flaeche { position: relative; min-height: 190px; }
.flaeche svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.gitter { stroke: var(--line); stroke-width: 1; }
.achse { fill: var(--muted); font-size: 11px; }
.linie { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.linie.s0 { stroke: var(--accent); }
.linie.s1 { stroke: #6fa8dc; }
.fadenkreuz { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tipp { position: absolute; top: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: .2rem .5rem; font-size: .8rem; white-space: nowrap; pointer-events: none; }
.zweispaltig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 1.25rem; align-items: start; }
.zweispaltig > section { margin-bottom: 0; }
td.ok, dd.ok { color: var(--accent); }
td.warnung, dd.warnung { color: var(--warn); font-weight: 600; }
.warnbanner { border-left-width: 6px; font-weight: 600; }
