:root {
  --flaeche: #f4f5f7;
  --karte: #ffffff;
  --rand: #e2e5ea;
  --text: #1c2430;
  --leise: #667085;
  --akzent: #0f6e84;
  --akzent-dunkel: #0b5466;
  --akzent-hell: #e3f1f4;
  --seite: #17212b;
  --seite-text: #c5ced8;
  --gut: #1f7a4d;
  --gut-hell: #e4f3ea;
  --warn: #a15c07;
  --warn-hell: #fdf1dc;
  --schlecht: #b3261e;
  --schlecht-hell: #fbe6e4;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { font-size: 15px; }

body {
  margin: 0;
  background: var(--flaeche);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--akzent); text-decoration: none; }
a:hover { color: var(--akzent-dunkel); text-decoration: underline; }

h1 { font-size: 1.55rem; margin: 0 0 4px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 0.95rem; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 10px; }

.geruest { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

.seitenleiste {
  background: var(--seite);
  color: var(--seite-text);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.marke { color: #fff; font-weight: 700; font-size: 1.12rem; padding: 0 10px 18px; letter-spacing: -0.01em; }
.marke span { display: block; font-weight: 400; font-size: 0.78rem; color: #8b98a8; margin-top: 2px; }
.seitenleiste a {
  color: var(--seite-text);
  padding: 9px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.seitenleiste a:hover { background: #223040; color: #fff; text-decoration: none; }
.seitenleiste a.aktiv { background: var(--akzent); color: #fff; }
.seitenleiste .unten { margin-top: auto; }
.zaehler { background: #e0902b; color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 1px 8px; font-weight: 650; }

.inhalt { padding: 28px 34px 60px; max-width: 1280px; width: 100%; }
.kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.kopf .unter { color: var(--leise); }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.karte.eng { padding: 0; overflow-x: auto; }
.raster { display: grid; gap: 16px; }
.raster.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.breit-schmal { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.kennzahl { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 16px 18px; }
.kennzahl .wert { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kennzahl .name { color: var(--leise); font-size: 0.86rem; margin-top: 4px; }
.kennzahl.warn .wert { color: var(--warn); }
.kennzahl.schlecht .wert { color: var(--schlecht); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--leise); font-weight: 650; padding: 11px 14px; border-bottom: 1px solid var(--rand); background: #fafbfc; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfd; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
td.schmal { width: 1%; white-space: nowrap; }
.klein { font-size: 0.85rem; }
.leise { color: var(--leise); }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 0.86rem; }
.umbruch { word-break: break-all; }

.marke-klein { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 0.76rem; font-weight: 650; background: #eceff3; color: #475467; white-space: nowrap; }
.marke-klein.gut { background: var(--gut-hell); color: var(--gut); }
.marke-klein.warn { background: var(--warn-hell); color: var(--warn); }
.marke-klein.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.marke-klein.akzent { background: var(--akzent-hell); color: var(--akzent-dunkel); }

.knopf {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rand); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; white-space: nowrap;
}
.knopf:hover { border-color: #c5ccd6; background: #f8f9fb; text-decoration: none; color: var(--text); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.haupt:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; }
.knopf.gefahr { color: var(--schlecht); border-color: #f0c4c0; }
.knopf.gefahr:hover { background: var(--schlecht-hell); }
.knopf.klein { padding: 5px 10px; font-size: 0.82rem; }
form.inline { display: inline; }

label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 5px; }
.hinweis { color: var(--leise); font-size: 0.82rem; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; border: 1px solid #cfd5dd; border-radius: 8px; padding: 8px 11px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
textarea.hoch { min-height: 340px; }
.feld { margin-bottom: 14px; }
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.felder.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.haken { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.haken input { width: 16px; height: 16px; }
.suchzeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suchzeile input[type=search], .suchzeile select { width: auto; min-width: 190px; }

.meldung { border-radius: 8px; padding: 11px 15px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.meldung.ok { background: var(--gut-hell); border-color: #bfe2cd; color: var(--gut); }
.meldung.warn { background: var(--warn-hell); border-color: #f2d7a6; color: var(--warn); }
.meldung.fehler { background: var(--schlecht-hell); border-color: #f0c4c0; color: var(--schlecht); }

.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 18px; }
.reiter a { padding: 9px 14px; color: var(--leise); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.reiter a:hover { color: var(--text); text-decoration: none; }
.reiter a.aktiv { color: var(--akzent-dunkel); border-bottom-color: var(--akzent); }

.wochenkopf { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.wochenkopf:first-child { margin-top: 0; }
.newszeile { display: grid; grid-template-columns: 132px 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eef0f3; }
.newszeile:last-child { border-bottom: 0; }
.newszeile img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: #e9edf1; display: block; }
.newszeile .titel { font-weight: 650; }
.newszeile.gestoppt { opacity: 0.55; }
.newszeile.luecke { color: var(--warn); background: #fffaf0; }
.tag { font-weight: 650; }

.bildraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.bildkachel { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.bildkachel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: #e9edf1; }
.bildkachel .unter { padding: 9px 11px; font-size: 0.82rem; }
.bildkachel.aus { opacity: 0.5; }

.vorschau { border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; background: #fff; }
.vorschau img { max-width: 100%; display: block; }
.liste-schlicht { list-style: none; margin: 0; padding: 0; }
.liste-schlicht li { padding: 8px 0; border-bottom: 1px solid #eef0f3; display: flex; justify-content: space-between; gap: 12px; }
.liste-schlicht li:last-child { border-bottom: 0; }
.blaettern { display: flex; gap: 6px; justify-content: flex-end; padding: 12px 14px; align-items: center; }
.leer { padding: 28px; text-align: center; color: var(--leise); }

.anmeldung { min-height: 100vh; display: grid; place-items: center; background: var(--seite); }
.anmeldung .karte { width: 360px; padding: 28px; }

@media (max-width: 1000px) {
  .geruest { grid-template-columns: 1fr; }
  .seitenleiste { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .seitenleiste .unten { margin-top: 0; }
  .raster.vier, .raster.drei, .raster.zwei, .raster.breit-schmal, .felder, .felder.drei { grid-template-columns: 1fr; }
  .inhalt { padding: 18px 16px 40px; }
  .newszeile { grid-template-columns: 1fr; }
}

.raster.kennzahlen { margin-bottom: 22px; }
a.kennzahl { color: inherit; display: block; }
a.kennzahl:hover { color: inherit; text-decoration: none; border-color: #c5ccd6; }
.suchzeile label { margin-bottom: 0; }
.suchzeile input[type=date], .suchzeile input[type=text] { width: auto; }
.suchzeile input[type=text] { min-width: 280px; }
.angaben { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.angaben dt { color: var(--leise); font-size: 0.86rem; }
.angaben dd { margin: 0; }
.vorformatiert { white-space: pre-wrap; overflow-wrap: anywhere; }
.schluessel-einmal { margin-top: 8px; }
.anmeldung .karte.verbinden { width: 460px; max-width: calc(100vw - 32px); }

td .suchzeile { flex-wrap: nowrap; }
.suchzeile input[type=url] { width: auto; min-width: 320px; }
.suchzeile.pruefung { margin-top: 14px; }
