:root {
  --gold: #D8AE5F; --anthrazit: #4D4D4D; --dunkel: #212121;
  --grund: #171717; --flaeche: #212121; --linie: #333; --text: #EDEDED; --leise: #9A9A9A;
  --pv: #F2C230; --netz: #3B8BEB; --speicher: #3DBE6E; --auto: #9B6BDF; --waerme: #F07A3A;
  --gut: #3DBE6E; --warn: #E5A33B; --schlecht: #E2554B;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.45 Arial, Helvetica, sans-serif; }
header { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 2px solid var(--gold); background: var(--dunkel); flex-wrap: wrap; }
header h1 { margin: 0; font-size: 18px; font-weight: 700; }
header h1 span { color: var(--gold); }
header nav { margin-left: auto; display: flex; gap: 14px; }
header a { color: var(--leise); text-decoration: none; }
header a:hover, header a[aria-current] { color: var(--gold); }
main { padding: 20px; max-width: 1200px; margin: 0 auto; }
.status { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 12px 14px; min-width: 150px; }
.kachel .label { color: var(--leise); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kachel .zahl { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kachel .zahl small { font-size: 14px; color: var(--leise); font-weight: 400; }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--schlecht); vertical-align: 1px; }
.punkt.an { background: var(--gut); }
.warnung { background: #3a2d12; border: 1px solid var(--warn); color: #F3D49A; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--flaeche); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--linie); }
th { color: var(--leise); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.zahl { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
td.alt { color: var(--leise); text-align: right; font-variant-numeric: tabular-nums; }
tr.neu td.zahl { color: var(--gold); }
tr.leer td.zahl { color: var(--anthrazit); font-weight: 400; }
tr.ausserhalb td.zahl { color: var(--warn); }
code { font-family: Menlo, Consolas, monospace; font-size: 13px; color: #DCDCDC; }
.fluss { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.fluss .kachel { border-top: 4px solid var(--anthrazit); }
.fluss .pv { border-top-color: var(--pv); } .fluss .netz { border-top-color: var(--netz); }
.fluss .sp { border-top-color: var(--speicher); } .fluss .last { border-top-color: var(--waerme); }
form.vorgaben { display: grid; align-items: end; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
label { display: block; color: var(--leise); font-size: 13px; }
input { width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--grund); color: var(--text); border: 1px solid var(--linie); border-radius: 6px; font: inherit; }
button { background: var(--gold); color: var(--dunkel); border: 0; border-radius: 6px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; }
button.zweit { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
section { margin-bottom: 26px; }
h2 { font-size: 16px; color: var(--gold); margin: 0 0 10px; }
.schluessel { font-size: 18px; padding: 12px; background: var(--grund); border: 1px dashed var(--gold); border-radius: 6px; word-break: break-all; }
.leise { color: var(--leise); }
@media (max-width: 700px) {
  main { padding: 16px; }
  .fluss { grid-template-columns: repeat(2, 1fr); }
  td.alt, th.alt, td.einheit, th.einheit { display: none; }
}
@media (max-width: 700px) {
  th, td { padding: 7px 8px; }
  td code { font-size: 12px; word-break: break-all; }
  .status .kachel { min-width: 0; flex: 1 1 140px; }
}
