/* EHRG Änderungsübersicht · Oberfläche
   Farben nach Markenhandbuch, Version 1.0 */

:root {
  --rot: #DC2626;
  --rot-700: #B91C1C;
  --rot-100: #FEE2E2;
  --navy: #1D283D;
  --carbon: #2B2A2B;
  --hellgrau: #DDE2EB;
  --offwhite: #F5F6F9;
  --weiss: #FFFFFF;
  --gruen: #16A34A;
  --orange: #F59E0B;

  --ink: #2B2A2B;
  --ink-2: #55606F;
  --ink-3: #8A94A3;

  /* Kategoriale Reihenfolge, mit dem Validator geprüft */
  --k1: #2563EB;
  --k2: #DC2626;
  --k3: #0D9488;
  --k4: #7C3AED;
  --k5: #B45309;

  --radius: 10px;
  --kopfhoehe: 64px;
  --schatten: 0 1px 2px rgba(29, 40, 61, .06), 0 8px 24px rgba(29, 40, 61, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
a { color: var(--rot); }

.seitenkopf {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.seitenkopf .knopf { flex: none; }
.kopfknoepfe { display: flex; gap: 8px; flex: none; align-items: flex-start; }

/* Ausklappbare Spalten- und Feldauswahl */
.auswahl { position: relative; }
.auswahl > summary { list-style: none; cursor: pointer; user-select: none; }
.auswahl > summary::-webkit-details-marker { display: none; }
.auswahl > summary::after { content: " ▾"; color: var(--ink-3); }
.auswahl[open] > summary { border-color: var(--ink-3); }
.popover {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--weiss); border: 1px solid var(--hellgrau); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(29,40,61,.16); padding: 12px 14px; min-width: 232px;
}
.popover-kopf {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 600; margin-bottom: 8px;
}
label.haken {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 13.5px; cursor: pointer;
}
label.haken input { width: auto; accent-color: var(--rot); }
.popover .zuruecksetzen {
  margin-top: 10px; background: none; border: 0; padding: 0;
  color: var(--rot); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}

/* Schnellwahl für Datumsabstände */
.schnellwahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.schnellwahl button {
  background: var(--offwhite); border: 1px solid var(--hellgrau); border-radius: 999px;
  padding: 3px 11px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.schnellwahl button:hover { border-color: var(--navy); color: var(--navy); }
.schnellwahl button.loeschen { margin-left: auto; }
.schnellwahl button.loeschen:hover { border-color: var(--rot); color: var(--rot); }
.seitenhinweis { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }

/* ------------------------------------------------------------------ Kopf */
header.top {
  background: var(--weiss);
  border-bottom: 1px solid var(--hellgrau);
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: var(--kopfhoehe);
}
.logo { height: 26px; width: auto; display: block; flex: none; }
.logo.gross { height: 34px; margin: 0 auto 14px; }

/* Bereichsumschalter, die obere Ebene. Bewusst als gefüllte Schaltfläche und
   nicht als Reiter mit Unterlinie: so ist auf einen Blick unterscheidbar, ob
   der Bereich gewechselt wird oder nur die Seite darin. */
nav.bereiche { display: flex; gap: 4px; margin-left: 24px; align-items: center; }
nav.bereiche button {
  background: none; border: 0; border-radius: 7px;
  color: var(--ink-2); padding: 7px 14px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1;
}
nav.bereiche button:hover { background: var(--offwhite); color: var(--navy); }
nav.bereiche button[aria-current="true"] {
  background: var(--navy); color: var(--weiss); font-weight: 600;
}

/* Untere Ebene: die Module des gewählten Bereichs. */
.top-module { border-top: 1px solid var(--hellgrau); }
.top-module-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: stretch; height: 44px;
}

nav.haupt { display: flex; gap: 2px; align-items: stretch; height: 100%; }
nav.haupt button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-2); padding: 0 14px; cursor: pointer;
  font: inherit; font-size: 14px; line-height: 1;
}
nav.haupt button:hover { color: var(--navy); background: var(--offwhite); }
nav.haupt button[aria-current="page"] {
  color: var(--navy); font-weight: 600; border-bottom-color: var(--rot); background: none;
}
/* Schiebt den Nutzerblock nach rechts. Das übernahm vorher die
   Modulnavigation, die jetzt eine Ebene tiefer sitzt. */
.nutzer { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-left: auto; }
.nutzer .abmelden {
  background: none; border: 1px solid var(--hellgrau); color: var(--ink-2);
  border-radius: 7px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 12px;
}
.nutzer .abmelden:hover { border-color: var(--ink-3); color: var(--navy); }

@media (max-width: 860px) {
  .top-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 12px; }
  nav.bereiche { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .top-module-inner { padding: 0 16px; }
  nav.haupt { width: 100%; overflow-x: auto; }
  nav.haupt button { padding: 8px 12px; }
}

/* Platzhalter für Bereiche, die noch keinen Inhalt haben. */
.leerhinweis { text-align: center; padding: 56px 24px; }
.leerhinweis h2 { color: var(--navy); margin-bottom: 8px; }
.leerhinweis p { color: var(--ink-2); margin: 0 auto; max-width: 460px; }

main { max-width: 1360px; margin: 0 auto; padding: 24px 20px 64px; }

.hinweis-demo {
  background: #FEF3C7; border: 1px solid #FCD34D; color: #78350F;
  border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 20px;
}

/* --------------------------------------------------------------- Bausteine */
.karte {
  background: var(--weiss); border: 1px solid var(--hellgrau);
  border-radius: var(--radius); box-shadow: var(--schatten);
}
.karte-kopf {
  padding: 14px 18px; border-bottom: 1px solid var(--hellgrau);
  display: flex; align-items: center; gap: 12px;
}
.karte-koerper { padding: 18px; }

.raster { display: grid; gap: 16px; align-items: start; }
.raster.k2 { grid-template-columns: 1fr 1fr; }
.raster.k3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .raster.k2, .raster.k3 { grid-template-columns: 1fr; } }

/* Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.kacheln.k4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .kacheln, .kacheln.k4 { grid-template-columns: repeat(2, 1fr); } }
.kachel {
  background: var(--weiss); border: 1px solid var(--hellgrau);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten);
}
.kachel .beschriftung { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.kachel .wert { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kachel .wert.klein { font-size: 17px; line-height: 1.3; margin-top: 8px; }
.kachel.warn { border-top-color: var(--orange); } .kachel.warn .wert { color: var(--orange); }
.kachel.gut  { border-top-color: var(--gruen); }  .kachel.gut .wert  { color: var(--gruen); }
.kachel.akz  { border-top-color: var(--rot); }    .kachel.akz .wert  { color: var(--rot); }

/* Formularelemente */
label.feld { display: block; margin-bottom: 14px; }
label.feld > span {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 5px; letter-spacing: .01em;
}
label.feld > span .pflicht { color: var(--rot); }
input[type="text"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px;
  border: 1px solid var(--hellgrau); border-radius: 8px; background: var(--weiss); color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,40,61,.10);
}
select:disabled { background: var(--offwhite); color: var(--ink-3); }
.hilfe { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* Gilt auch für <summary class="knopf">, deshalb ohne Elementnamen. */
.knopf {
  display: inline-block;
  background: var(--rot); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.knopf:hover { background: var(--rot-700); }
.knopf:disabled { background: var(--ink-3); cursor: default; }
.knopf.stil-2 { background: var(--weiss); color: var(--navy); border: 1px solid var(--hellgrau); }
.knopf.stil-2:hover { background: var(--offwhite); }

/* Tabelle
   Der Rahmen scrollt in beide Richtungen selbst. Dadurch bleibt die Kopfzeile
   oben stehen und die Nummernspalte links, ohne mit dem Seitenkopf zu kollidieren. */
.tabellenrahmen {
  overflow: auto;
  max-height: calc(100vh - var(--kopfhoehe) - 250px);
  min-height: 260px;
  border-radius: var(--radius);
  overscroll-behavior: contain;
}
table.liste { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.liste th {
  text-align: left; background: var(--navy); color: #fff; font-weight: 600; font-size: 12px;
  padding: 10px 12px; white-space: nowrap;
  position: sticky; top: 0; z-index: 5;
}
table.liste th.sp-nr { left: 0; z-index: 6; }
/* Die Pfeilspalte bleibt beim Wischen nach rechts stehen. */
table.liste th.sp-pfeil { right: 0; z-index: 6; }
table.liste td.sp-pfeil {
  position: sticky; right: 0; z-index: 2; box-shadow: -1px 0 0 var(--hellgrau);
}
/* Eine Zeile je Eintrag. Lange Texte werden abgeschnitten, alles Weitere
   steht in der Detailansicht hinter einem Klick auf die Zeile. */
table.liste td {
  padding: 9px 12px; border-bottom: 1px solid var(--hellgrau);
  background: var(--weiss); vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px;
}
table.liste td.eng { max-width: none; width: 1%; }
table.liste tr:hover td { background: var(--offwhite); }
table.liste tr.klickbar { cursor: pointer; }
table.liste tr.klickbar:focus { outline: none; }
table.liste tr.klickbar:focus td { background: #EEF2F8; }
table.liste td.sp-pfeil, table.liste th.sp-pfeil {
  width: 1%; text-align: right; color: var(--ink-3); font-size: 17px; padding-left: 0;
}
table.liste tr:hover td.sp-pfeil { color: var(--rot); }
table.liste .nr {
  color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap;
  position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--hellgrau);
}
table.liste .datum { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.liste td.leer { text-align: center; color: var(--ink-3); padding: 40px; }
td.text { max-width: 230px; }
.tabellenrahmen::-webkit-scrollbar { width: 10px; height: 10px; }
.tabellenrahmen::-webkit-scrollbar-thumb { background: #C7CEDA; border-radius: 6px; border: 2px solid var(--weiss); }
.tabellenrahmen::-webkit-scrollbar-track { background: var(--weiss); }

.marke-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }
.karte-zeile .marke-punkt { margin-right: 6px; vertical-align: middle; }

.schild {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.schild.laeuft   { background: var(--offwhite); color: var(--ink-2); }
.schild.faellig  { background: #FEF3C7; color: #78350F; }
.schild.bewertet { background: #E8EDF5; color: var(--navy); }
.schild.abgeschlossen { background: #DCFCE7; color: #14532D; }
.schild.gut      { background: #DCFCE7; color: #14532D; }
.schild.schlecht { background: var(--rot-100); color: #7F1D1D; }
.schild.neutral  { background: var(--offwhite); color: var(--ink-2); }

/* Eine Filterzeile für Dashboard, Verlauf und Einträge. Immer gleich aufgebaut. */
.filterzeile {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--hellgrau);
}
.filterzeile label.feld { margin-bottom: 0; flex: 1 1 150px; }
.filterzeile .weit { flex: 1 1 200px; min-width: 180px; }
.filterzeile .knopf { flex: none; }

/* Umschalter Fluss / Monate */
.umschalter { display: flex; border: 1px solid var(--hellgrau); border-radius: 8px; overflow: hidden; background: var(--weiss); flex: none; }
.umschalter button {
  background: none; border: 0; padding: 10px 14px; font: inherit; font-size: 14px;
  color: var(--ink-2); cursor: pointer;
}
.umschalter button + button { border-left: 1px solid var(--hellgrau); }
.umschalter button:hover { background: var(--offwhite); }
.umschalter button.an { background: var(--navy); color: #fff; font-weight: 600; }

/* ------------------------------------------------------------- Flussbild
   Ein Strang je Kampagne, waagerecht scrollbar. */
.strangrahmen {
  background: var(--weiss); border: 1px solid var(--hellgrau); border-radius: var(--radius);
  box-shadow: var(--schatten); margin-bottom: 14px; padding: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
}
.strang { display: flex; align-items: stretch; gap: 0; min-width: min-content; }

.wurzel {
  flex: none; width: 190px; align-self: center;
  background: var(--navy); color: #fff; border-left: 4px solid var(--akzent, var(--rot));
  border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.wurzel-titel { font-weight: 700; font-size: 14px; line-height: 1.25; }
.wurzel-unter { font-size: 11.5px; color: rgba(255,255,255,.66); }

.pfeil {
  flex: none; width: 46px; align-self: center; position: relative;
  height: 2px; background: var(--hellgrau);
}
.pfeil::after {
  content: ""; position: absolute; right: 0; top: -4px;
  border: 5px solid transparent; border-left-color: #C7CEDA; border-right: 0;
}
.pfeil .abstand {
  position: absolute; left: 50%; transform: translate(-50%, -100%); top: -4px;
  font-size: 10.5px; color: var(--ink-3); white-space: nowrap;
}
.pfeil.start { width: 30px; }

.knoten {
  flex: none; width: 208px;
  background: var(--weiss); border: 1px solid var(--hellgrau);
  border-top: 3px solid var(--akzent, var(--navy));
  border-radius: var(--radius); padding: 11px 13px;
  display: flex; flex-direction: column;
}
.karte-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.karte-zeile .tag { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.knoten h3, .ereignis h3 { font-size: 13.5px; line-height: 1.3; margin: 0; }
.knoten h3 + *, .ereignis h3 + * { margin-top: 8px; }
.knoten .beschreibung {
  font-size: 12.5px; margin: 8px 0 0; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.knoten .pruefzeile { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-2); }
.knoten .nebentext, .ereignis .nebentext {
  font-size: 11.5px; color: var(--ink-2); margin: 7px 0 0;
}
.knoten .nebentext b, .ereignis .nebentext b {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3);
}
.knoten .fuss { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hellgrau);
  display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--ink-3); }
.knoten.klickbar { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.knoten.klickbar:hover { box-shadow: 0 10px 24px rgba(29,40,61,.14); transform: translateY(-2px); }
.knoten.klickbar:focus { outline: 2px solid var(--navy); outline-offset: 2px; }
.strangrahmen::-webkit-scrollbar { height: 10px; }
.strangrahmen::-webkit-scrollbar-thumb { background: #C7CEDA; border-radius: 6px; border: 2px solid var(--weiss); }

/* ---------------------------------------------------------------- Verlauf */
.verlauf-monat { margin-bottom: 24px; }
.monatskopf {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--hellgrau);
}
.monatskopf h2 { font-size: 15px; }
.monatskopf .anzahl { font-size: 12px; color: var(--ink-3); }
.monatskopf .balken { width: 3px; height: 15px; background: var(--rot); align-self: center; }

.kachelraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

.ereignis {
  background: var(--weiss);
  border: 1px solid var(--hellgrau);
  border-left: 3px solid var(--akzent, var(--navy));
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 13px;
  box-shadow: var(--schatten);
  display: flex; flex-direction: column;
}
.knoten .quelle, .ereignis .quelle {
  font-size: 12px; color: var(--ink-2); margin: 8px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ereignis .beschreibung { font-size: 12.5px; margin: 8px 0 0; color: var(--ink-2); }
.ereignis .aufklappen {
  background: none; border: 0; padding: 0; margin-top: 9px; align-self: flex-start;
  color: var(--rot); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.ereignis .details {
  border-top: 1px solid var(--hellgrau); margin-top: 10px; padding-top: 9px;
  font-size: 12.5px; color: var(--ink-2);
}
.ereignis .details p { margin: 0 0 7px; }
.ereignis .details p:last-child { margin-bottom: 0; }
.ereignis .details b { color: var(--navy); display: block; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.ereignis .fuss {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hellgrau);
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--ink-3);
}

.luecke {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-3); margin: 0 0 24px;
}
.luecke::after { content: ""; flex: 1; height: 1px; background: var(--hellgrau); }

.ereignis.dringend { border-left-color: var(--rot); }
.kopfzahl { font-size: 12px; color: var(--ink-3); }
.ereignis.klickbar { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.ereignis.klickbar:hover {
  box-shadow: 0 2px 4px rgba(29,40,61,.08), 0 12px 28px rgba(29,40,61,.12);
  transform: translateY(-1px);
}
.ereignis.klickbar:focus { outline: 2px solid var(--navy); outline-offset: 2px; }
.ereignis .beschreibung {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ereignis .pruefzeile { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-2); }
.frist { color: var(--ink-3); }
.frist.faellig { color: var(--rot); font-weight: 600; }
button.bearbeiten {
  background: none; border: 1px solid var(--hellgrau); border-radius: 7px;
  padding: 3px 11px; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy); cursor: pointer; white-space: nowrap;
}
button.bearbeiten:hover { border-color: var(--rot); color: var(--rot); }
td.sp-aktion { white-space: nowrap; }

/* Bearbeiten-Dialog */
body.kein-scroll { overflow: hidden; }
.ueberlagerung {
  position: fixed; inset: 0; z-index: 70; background: rgba(29, 40, 61, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 20px 40px; overflow-y: auto;
}
.dialog-karte { width: 100%; max-width: 620px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.dialog-karte .karte-kopf { justify-content: space-between; }
.schliessen {
  background: none; border: 0; font-size: 24px; line-height: 1; color: var(--ink-3);
  cursor: pointer; padding: 0 4px;
}
.schliessen:hover { color: var(--navy); }
.dialog-kopfzeile {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--hellgrau);
}
.dialog-kopfzeile + .dialog-kopfzeile { margin-top: -6px; }
.dialog-kopfzeile .beschriftung {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 600; margin-bottom: 3px;
}
.dialog-kopfzeile b { font-size: 13.5px; color: var(--navy); }
.dialog-lesen { margin-bottom: 16px; }
.dialog-lesen p { margin: 0 0 10px; font-size: 13.5px; }
.dialog-lesen b {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); margin-bottom: 2px;
}
.abschnitt {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--navy); margin: 4px 0 12px; padding-top: 14px;
  border-top: 1px solid var(--hellgrau);
}
.dialog-fuss { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
@media (max-width: 620px) { .dialog-kopfzeile { grid-template-columns: repeat(2, 1fr); } }

.leerhinweis {
  background: var(--weiss); border: 1px dashed var(--hellgrau); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px;
}

/* Diagramme */
.diagramm { width: 100%; }
.diagramm text { font-family: inherit; }
.achsentext { font-size: 11px; fill: var(--ink-3); }
.wertetext  { font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.gitter { stroke: var(--hellgrau); stroke-width: 1; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legende span.eintrag { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.tipp {
  position: fixed; pointer-events: none; z-index: 60; background: var(--navy); color: #fff;
  padding: 7px 10px; border-radius: 7px; font-size: 12px; line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); opacity: 0; transition: opacity .1s;
}
.tipp.an { opacity: 1; }
.tipp b { font-weight: 600; }

/* Anmeldung */
.anmeldung { max-width: 420px; margin: 12vh auto; }
.anmeldung .karte-koerper { text-align: center; padding: 32px; }
.anmeldung p { color: var(--ink-2); font-size: 14px; }
.anmeldung button.knopf { width: 100%; margin-top: 18px; }

.fehler { background: var(--rot-100); border: 1px solid #FCA5A5; color: #7F1D1D;
          border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.erfolg { background: #DCFCE7; border: 1px solid #86EFAC; color: #14532D;
          border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }

.verborgen { display: none !important; }
.rechts { margin-left: auto; }
.tabellenhinweis { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
