/* ZENTRIO Management Support System
   Nuechterne Oberflaeche fuer die Geschaeftsleitung: hohe Informationsdichte,
   ruhige Farben, Ampellogik als einziges kraeftiges Gestaltungsmittel. */

:root {
  --grund: #eef1f5;
  --flaeche: #ffffff;
  --flaeche-gedaempft: #f7f9fb;
  --rand: #dde3ea;
  --rand-stark: #c4ced9;

  --text: #17212e;
  --text-gedaempft: #5b6b7c;
  --text-schwach: #8a98a8;

  --marke: #12395f;
  --marke-hell: #1d5a92;
  --marke-kontrast: #ffffff;

  --seitenleiste: #14202e;
  --seitenleiste-hell: #1e2f42;
  --seitenleiste-text: #b9c6d4;
  --seitenleiste-aktiv: #ffffff;

  --rot: #b3261e;
  --rot-flaeche: #fdecea;
  --rot-rand: #f2c3bf;
  --gelb: #9a6100;
  --gelb-flaeche: #fdf4e3;
  --gelb-rand: #f0dcb4;
  --gruen: #1f6b46;
  --gruen-flaeche: #e9f5ee;
  --gruen-rand: #bcdfca;
  --blau-flaeche: #eaf1f8;
  --blau-rand: #c3d7ea;

  --radius: 6px;
  --radius-klein: 4px;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --schrift-zahl: "Segoe UI", ui-monospace, SFMono-Regular, Menlo, monospace;
  --breite-seitenleiste: 236px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
}

a { color: var(--marke-hell); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 21px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

/* ---------- Grundgeruest ---------- */
.huelle { display: flex; min-height: 100vh; }

.seitenleiste {
  width: var(--breite-seitenleiste);
  flex: 0 0 var(--breite-seitenleiste);
  background: var(--seitenleiste);
  color: var(--seitenleiste-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.marke {
  display: block;
  padding: 20px 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.marke:hover { text-decoration: none; }
.marke:focus-visible { outline: 2px solid #7fb2ff; outline-offset: -4px; border-radius: 4px; }
/* Bildmarke mit Schriftzug; Grafik liegt in doppelter Auflösung vor (480 px). */
.marke__logo {
  display: block;
  width: 100%;
  max-width: 208px;
  height: auto;
}

.navigation { padding: 10px 0 24px; flex: 1; }
.navigation__gruppe {
  padding: 14px 18px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7f94;
  font-weight: 600;
}
.navigation a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 18px;
  color: var(--seitenleiste-text);
  font-size: 13.5px;
  border-left: 3px solid transparent;
}
.navigation a:hover { background: var(--seitenleiste-hell); text-decoration: none; color: #fff; }
.navigation a.aktiv {
  background: var(--seitenleiste-hell);
  color: var(--seitenleiste-aktiv);
  border-left-color: #4a90d9;
  font-weight: 600;
}
.navigation__zahl {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.navigation__zahl--rot { background: var(--rot); color: #fff; }

/* ---------- Kopfzeile ---------- */
.inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.kopfzeile {
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.kopfzeile__titel { flex: 1; min-width: 0; }
.kopfzeile__titel p {
  margin: 2px 0 0;
  color: var(--text-gedaempft);
  font-size: 12.5px;
}

/* Angemeldete Person: Name über der Funktion, daneben Passwort und Abmelden. */
.konto {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
}
.konto__person { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.konto__name { font-weight: 600; color: var(--text); }
.konto__funktion { color: var(--text-gedaempft); }
.konto__aktionen { display: flex; align-items: center; gap: 10px; }
.konto__aktionen form { margin: 0; }

/* Anmeldeseiten ohne Navigation: eine Karte mittig auf dunklem Grund. */
.anmeldung {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 16px;
  background: var(--seitenleiste);
}
.anmeldung__firma {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--seitenleiste-text);
}
.anmeldung__karte {
  width: 100%;
  max-width: 400px;
  background: var(--flaeche);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.anmeldung__logo { display: block; width: 100%; max-width: 300px; height: auto; }
.anmeldung h1 { font-size: 18px; margin-bottom: 4px; }
.anmeldung__hinweis { color: var(--text-gedaempft); font-size: 13px; margin: 0 0 18px; }
.anmeldung .feld input { width: 100%; }
.anmeldung .knopf--stark { width: 100%; justify-content: center; margin-top: 6px; }
.anmeldung__fuss { margin-top: 18px; font-size: 12px; color: var(--text-gedaempft); text-align: center; }

/* Übergangspasswort: einmal sichtbar, gut abzulesen. */
.uebergangspasswort {
  font-family: var(--schrift-zahl, ui-monospace, monospace);
  font-size: 20px;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  background: var(--grund);
  border: 1px dashed var(--rand-stark);
  border-radius: var(--radius-klein);
  display: inline-block;
  user-select: all;
}
/* Einmal-Link: lang - klein genug und umbrechbar, damit er auch am Telefon lesbar bleibt. */
.uebergangspasswort.zugangslink { font-size: 13px; letter-spacing: 0; word-break: break-all; max-width: 100%; }

/* Firmenname ganz rechts in der Kopfzeile - dezent, durch eine Linie abgesetzt. */
.kopfzeile__firma {
  flex: none;
  padding-left: 18px;
  border-left: 1px solid var(--rand);
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-schwach);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  max-width: 190px;
  text-align: right;
}

.hauptbereich { padding: 22px 26px 60px; flex: 1; }

/* ---------- Karten ---------- */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.karte__kopf {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.karte__kopf p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-gedaempft); }
.karte__inhalt { padding: 16px; }
.karte__inhalt--eng { padding: 0; }
.karte__fuss {
  padding: 10px 16px;
  border-top: 1px solid var(--rand);
  background: var(--flaeche-gedaempft);
  font-size: 12.5px;
  color: var(--text-gedaempft);
}

/* ---------- Kennzahlen ---------- */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kennzahl {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 13px 15px;
  display: block;
  color: inherit;
}
a.kennzahl:hover { border-color: var(--rand-stark); text-decoration: none; }
.kennzahl__titel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-schwach);
  font-weight: 600;
}
.kennzahl__wert {
  font-size: 27px;
  font-weight: 600;
  font-family: var(--schrift-zahl);
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
  line-height: 1.15;
}
.kennzahl__zusatz { font-size: 12px; color: var(--text-gedaempft); margin-top: 3px; }
.kennzahl--rot .kennzahl__wert { color: var(--rot); }
.kennzahl--gelb .kennzahl__wert { color: var(--gelb); }
.kennzahl--gruen .kennzahl__wert { color: var(--gruen); }

/* ---------- Tabellen ---------- */
/* position: relative hält absolut gesetzte Inhalte (etwa .sr-only) im Scrollbereich der Tabelle. */
.tabellen-huelle { overflow-x: auto; position: relative; }
table.liste {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.liste th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-schwach);
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rand);
  background: var(--flaeche-gedaempft);
  white-space: nowrap;
}
table.liste td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rand);
  vertical-align: top;
}
table.liste tbody tr:last-child td { border-bottom: none; }
table.liste tbody tr:hover { background: var(--flaeche-gedaempft); }
table.liste td.zahl,
table.liste th.zahl {
  text-align: right;
  font-family: var(--schrift-zahl);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.liste td.schmal, table.liste th.schmal { white-space: nowrap; width: 1%; }
.leer {
  padding: 34px 16px;
  text-align: center;
  color: var(--text-schwach);
  font-size: 13px;
}

/* ---------- Ampel und Abzeichen ---------- */
.ampel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px 2px 7px;
  border-radius: 11px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.ampel::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ampel--rot { color: var(--rot); background: var(--rot-flaeche); border-color: var(--rot-rand); }
.ampel--gelb { color: var(--gelb); background: var(--gelb-flaeche); border-color: var(--gelb-rand); }
.ampel--gruen { color: var(--gruen); background: var(--gruen-flaeche); border-color: var(--gruen-rand); }
/* „Läuft" - weder Handlungsbedarf noch erledigt. */
.ampel--neutral { color: var(--text-gedaempft); background: var(--flaeche-gedaempft); border-color: var(--rand); }

/* Zwischenüberschrift zwischen Kachelreihen */
.abschnitt-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 6px 0 10px;
}
.abschnitt-kopf h2 { font-size: 15px; }

/* Zeilen mit roter Ampel in Listen */
table.liste tr.zeile--rot td:first-child { box-shadow: inset 3px 0 0 var(--rot); }
table.liste tr.zeile--gelb td:first-child { box-shadow: inset 3px 0 0 var(--gelb); }

/* Formularfehler */
/* Spezifischer als „.feld input[type=…]" weiter unten - sonst überstimmt die Grundregel den roten Rahmen. */
.feld.feld--fehler input[type], .feld.feld--fehler select, .feld.feld--fehler textarea { border-color: var(--rot); }
.feld__fehler { font-size: 12px; color: var(--rot); margin-top: 3px; }
.pflicht::after { content: " *"; color: var(--rot); }

/* Berechnete Werte im Formular */
.berechnet {
  background: var(--blau-flaeche); border: 1px solid var(--blau-rand); border-radius: var(--radius-klein);
  padding: 9px 12px; font-size: 13px; display: grid; gap: 4px;
}
.berechnet strong { font-family: var(--schrift-zahl); font-variant-numeric: tabular-nums; }

.abzeichen {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 11px;
  background: var(--flaeche-gedaempft);
  border: 1px solid var(--rand);
  color: var(--text-gedaempft);
  white-space: nowrap;
}
.abzeichen--blau { background: var(--blau-flaeche); border-color: var(--blau-rand); color: var(--marke); }
.abzeichen--gruen { background: var(--gruen-flaeche); border-color: var(--gruen-rand); color: var(--gruen); }
.abzeichen--rot { background: var(--rot-flaeche); border-color: var(--rot-rand); color: var(--rot); }
.abzeichen--gelb { background: var(--gelb-flaeche); border-color: var(--gelb-rand); color: var(--gelb); }
.abzeichen--ki {
  background: #f0ecfa;
  border-color: #d9cff2;
  color: #5b3fa8;
}

.regelmarke {
  display: inline-block;
  font-family: var(--schrift-zahl);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-klein);
  background: var(--marke);
  color: #fff;
  letter-spacing: 0.02em;
}

/* ---------- Handlungsbedarf ---------- */
.befund {
  border: 1px solid var(--rand);
  border-left: 4px solid var(--rand-stark);
  border-radius: var(--radius);
  background: var(--flaeche);
  padding: 13px 15px;
  margin-bottom: 10px;
}
.befund--rot { border-left-color: var(--rot); }
.befund--gelb { border-left-color: var(--gelb); }
.befund--gruen { border-left-color: var(--gruen); }
.befund__kopf {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.befund__titel { font-weight: 600; font-size: 14px; }
.befund__text { color: var(--text-gedaempft); font-size: 13px; margin: 0 0 9px; }
.befund__zeilen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 4px 18px;
  font-size: 12.5px;
  border-top: 1px solid var(--rand);
  padding-top: 9px;
}
.befund__zeile { display: flex; gap: 6px; }
.befund__marke {
  color: var(--text-schwach);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding-top: 1px;
  flex: none;
}
.befund__massnahme {
  margin-top: 9px;
  padding: 8px 11px;
  background: var(--blau-flaeche);
  border: 1px solid var(--blau-rand);
  border-radius: var(--radius-klein);
  font-size: 12.5px;
}
.befund__aktionen { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Schaltflaechen ---------- */
.knopf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-klein);
  border: 1px solid var(--rand-stark);
  background: var(--flaeche);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.knopf:hover { background: var(--flaeche-gedaempft); text-decoration: none; }
.knopf--stark { background: var(--marke); border-color: var(--marke); color: #fff; }
.knopf--stark:hover { background: #0d2c4a; }
.knopf--gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.knopf--gruen:hover { background: #185536; }
.knopf--gefahr { color: var(--rot); border-color: var(--rot-rand); }
.knopf--gefahr:hover { background: var(--rot-flaeche); }
.knopf--klein { font-size: 12px; padding: 4px 10px; }
.knopf[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Formulare ---------- */
.feld { margin-bottom: 13px; }
.feld label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gedaempft);
  margin-bottom: 4px;
}
.feld input[type="text"],
.feld input[type="email"],
.feld input[type="password"],
.feld input[type="number"],
.feld input[type="date"],
.feld input[type="month"],
.feld input[type="file"],
.feld select,
.feld textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  padding: 7px 10px;
  border: 1px solid var(--rand-stark);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--text);
}
.feld textarea { min-height: 190px; resize: vertical; line-height: 1.6; }
.feld__hinweis { font-size: 11.5px; color: var(--text-schwach); margin-top: 3px; }

/* Auswahl aus festen Moeglichkeiten (Grund einer Klaerung): jede Zeile ein Ziel,
   auch mit dem Finger - deshalb ist die ganze Zeile anklickbar. */
.wahlliste { border: 0; padding: 0; margin: 0 0 13px; display: grid; gap: 6px; }
.wahlliste legend {
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gedaempft);
  margin-bottom: 4px;
}
.wahl {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin: 0;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  cursor: pointer;
}
.wahl:hover { background: var(--flaeche-gedaempft); }
.wahl:focus-within { border-color: var(--marke-hell); }
.wahl input { margin: 0; flex: none; }
.wahl .klein { display: block; }

/* Anmerkung statt Aufsatz: ein paar Zeilen genuegen. */
.feld--kurz textarea { min-height: 62px; }

/* Kurze Aufzaehlung in einem Hinweiskasten oder einer Seitenkarte. */
.kompakt { margin: 6px 0 0; padding-left: 18px; }
.kompakt li { margin: 2px 0; }
.feldreihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 14px;
  align-items: end;
}

/* Felder mit Hinweistext darunter: an der Beschriftung ausrichten, nicht am unteren Rand. */
.feldreihe--oben { align-items: start; }

/* ---------- Filterleiste ---------- */
.filter {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter .feld { margin-bottom: 0; min-width: 155px; }

/* ---------- Meldungen ---------- */
.meldung {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gruen-rand);
  background: var(--gruen-flaeche);
  color: var(--gruen);
  margin-bottom: 16px;
  font-size: 13px;
}
/* Dezent: eine Zeile, kein Kasten - das Dashboard bleibt ruhig. */
.demohinweis {
  margin: 0 0 14px;
  padding: 2px 0 2px 10px;
  border-left: 3px solid var(--gelb);
  color: var(--text-gedaempft);
  font-size: 12.5px;
}
.demohinweis strong { color: var(--gelb); font-weight: 600; }
.meldung--info { border-color: var(--blau-rand); background: var(--blau-flaeche); color: var(--marke); }
.meldung--warnung { border-color: var(--gelb-rand); background: var(--gelb-flaeche); color: var(--gelb); }
.meldung--fehler { border-color: var(--rot-rand); background: var(--rot-flaeche); color: var(--rot); }

/* ---------- Detailansicht ---------- */
.spalten {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1080px) { .spalten { grid-template-columns: 1fr; } }

.stammdaten { display: grid; grid-template-columns: 168px 1fr; gap: 7px 14px; font-size: 13px; }
.stammdaten dt { color: var(--text-schwach); font-size: 12px; padding-top: 1px; }
.stammdaten dd { margin: 0; }

/* ---------- Historie ---------- */
.historie { list-style: none; margin: 0; padding: 0; }
.historie li {
  position: relative;
  padding: 0 0 15px 21px;
  border-left: 2px solid var(--rand);
  margin-left: 5px;
}
.historie li:last-child { border-left-color: transparent; padding-bottom: 0; }
.historie li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--flaeche);
  border: 2px solid var(--rand-stark);
}
.historie li.historie--anlage::before { border-color: var(--gruen); }
.historie li.historie--loeschung::before { border-color: var(--rot); }
.historie li.historie--ki::before { border-color: #7b5cc4; }
.historie__zeit { font-size: 11.5px; color: var(--text-schwach); font-variant-numeric: tabular-nums; }
.historie__text { font-size: 13px; margin-top: 1px; }
.historie__wert {
  font-family: var(--schrift-zahl);
  font-size: 12px;
  background: var(--flaeche-gedaempft);
  border: 1px solid var(--rand);
  border-radius: 3px;
  padding: 0 4px;
}
.historie__wert--alt { color: var(--text-schwach); text-decoration: line-through; }
.historie__vermerk {
  font-size: 11.5px;
  color: #5b3fa8;
  margin-top: 2px;
}

/* ---------- Mailentwurf ---------- */
.entwurf {
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche-gedaempft);
}
.entwurf__kopf {
  padding: 9px 13px;
  border-bottom: 1px solid var(--rand);
  font-size: 12.5px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 3px 8px;
}
.entwurf__kopf dt { color: var(--text-schwach); }
.entwurf__kopf dd { margin: 0; font-weight: 500; }
.entwurf__text {
  padding: 13px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.62;
  font-family: var(--schrift);
  margin: 0;
  background: var(--flaeche);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* ---------- Sonstiges ---------- */
.hilfetext { font-size: 12.5px; color: var(--text-gedaempft); }
.gedaempft { color: var(--text-gedaempft); }
.schwach { color: var(--text-schwach); }
.klein { font-size: 12px; }
.zahl { font-family: var(--schrift-zahl); font-variant-numeric: tabular-nums; }
.rechts { text-align: right; }
.nowrap { white-space: nowrap; }
.abstand-oben { margin-top: 18px; }
.reihe { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
/* Knopfpaare in einer Tabellenzelle - eng, aber noch mit Abstand zum Nachbarn. */
.reihe--eng { gap: 5px; margin-bottom: 4px; }
.loeschen__bestaetigung input[type="text"],
.reihe--eng input[type="text"] {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 8px;
  width: 100%;
  border: 1px solid var(--rand-stark);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--text);
}
/* Zahlungsvorschlag: Zeilen, die das Budget nicht mehr hergibt. */
table.liste tr.zeile--zurueck td { color: var(--text-gedaempft); background: var(--flaeche-gedaempft); }
.trenner { height: 1px; background: var(--rand); margin: 14px 0; border: 0; }

.reiter {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.reiter a {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-gedaempft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.reiter a:hover { color: var(--text); text-decoration: none; }
.reiter a.aktiv { color: var(--marke); border-bottom-color: var(--marke); font-weight: 600; }

/* ---------- Umsätze & Kennzahlen ---------- */
.diagramm-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
@media (max-width: 1180px) { .diagramm-raster { grid-template-columns: minmax(0, 1fr); } }
.diagramm { position: relative; height: 290px; }
.umschalter { display: inline-flex; gap: 4px; }
.umschalter .knopf[aria-pressed="true"] { background: var(--marke); border-color: var(--marke); color: #fff; }
.knopf:focus-visible, .reiter a:focus-visible { outline: 2px solid var(--marke-hell); outline-offset: 2px; }

.hinweisliste { margin: 4px 0 0; padding-left: 18px; }
.hinweisliste li + li { margin-top: 2px; }
.hinweisliste--eingerueckt { margin: 10px 16px 14px 32px; padding-left: 0; }

.wert--positiv { color: var(--gruen); }
.wert--negativ { color: var(--rot); font-weight: 600; }
.geschaetzt { color: var(--gelb); font-weight: 600; margin-right: 3px; cursor: help; }

/* Mit BV-Filter gelten Rohertrag und Werte je Stunde nur firmenweit - zurücktreten lassen. */
.karte.ausgegraut .diagramm { opacity: 0.45; }
.kennzahlen-ausgegraut .kennzahl-spalte { opacity: 0.45; }

/* Zeilenköpfe (Monat, Summe) wie Zellen lesen - nicht als kleine Spaltenüberschrift. */
table.liste tbody th[scope="row"],
table.liste tfoot th[scope="row"] {
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;
  color: var(--text);
  background: transparent;
  white-space: nowrap;
}
/* Beträge in Kacheln: kleiner und ohne Umbruch vor „EUR". */
.kennzahlen--betraege { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kennzahlen--betraege .kennzahl__wert { font-size: 22px; white-space: nowrap; }

/* Forderungen & Verbindlichkeiten: zwei gleich breite Spalten, Anteil als schmaler Balken. */
.spalten--gleich { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1080px) { .spalten--gleich { grid-template-columns: 1fr; } }
.anteil-spalte { width: 34%; white-space: nowrap; }
.anteilbalken {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 44px);
  max-width: 180px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background:
    linear-gradient(to right, var(--balken, var(--marke-hell)) var(--anteil, 0%), var(--flaeche-gedaempft) var(--anteil, 0%));
  box-shadow: inset 0 0 0 1px var(--rand);
}
.anteilbalken--gelb { --balken: #c98a1b; }
.anteilbalken--rot { --balken: var(--rot); }
/* Auswahlfeld in einer Tabellenzeile: Aussehen wie im Formular, ohne Abstand darunter. */
.feld--eingebettet { margin-bottom: 0; flex: 1; min-width: 200px; max-width: 360px; }

table.monatstabelle { font-size: 12.5px; }
table.monatstabelle th, table.monatstabelle td { padding: 7px 10px; }
table.monatstabelle tbody th, table.monatstabelle tfoot th { text-align: left; font-weight: 600; }
/* Die Monatsspalte bleibt beim waagerechten Scrollen stehen. */
table.monatstabelle thead th:first-child,
table.monatstabelle tbody th,
table.monatstabelle tfoot th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--flaeche);
  box-shadow: inset -1px 0 0 var(--rand);
}
table.monatstabelle thead th:first-child { background: var(--flaeche-gedaempft); }
table.monatstabelle tfoot td, table.monatstabelle tfoot th {
  border-top: 2px solid var(--rand-stark);
  background: var(--flaeche-gedaempft);
  font-weight: 600;
}
table.monatstabelle tfoot tr + tr td, table.monatstabelle tfoot tr + tr th {
  border-top: 1px solid var(--rand);
  font-weight: 500;
  color: var(--text-gedaempft);
}
table.monatstabelle tr.zeile--zukunft td, table.monatstabelle tr.zeile--zukunft th { color: var(--text-schwach); }
table.monatstabelle.optional-verborgen .spalte-optional { display: none; }

/* Nebeninformation ganz unten: schmaler, ruhiger. */
.karte--nebeninfo { max-width: 760px; }
.karte--nebeninfo .karte__kopf h2 { font-size: 14px; }
.karte--nebeninfo table.liste { font-size: 12.5px; }

/* Nur für Vorleseprogramme sichtbar. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.feld--inaktiv { opacity: 0.55; }

/* Löschen in zwei Schritten ohne Skript: erst aufklappen, dann bestätigen. */
.loeschen { display: inline-block; }
.loeschen summary { list-style: none; cursor: pointer; }
.loeschen summary::-webkit-details-marker { display: none; }
.loeschen[open] summary { margin-bottom: 8px; }
.loeschen__bestaetigung {
  padding: 10px 12px;
  border: 1px solid var(--rot-rand);
  background: var(--rot-flaeche);
  border-radius: var(--radius-klein);
  font-size: 12.5px;
  display: grid;
  gap: 8px;
  max-width: 360px;
}

.fusszeile {
  padding: 14px 26px;
  border-top: 1px solid var(--rand);
  color: var(--text-schwach);
  font-size: 11.5px;
  background: var(--flaeche);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .huelle { flex-direction: column; }
  .seitenleiste { width: 100%; flex: none; height: auto; position: static; }
  .navigation { display: flex; flex-wrap: wrap; padding: 6px; }
  .navigation__gruppe { display: none; }
  .navigation a { border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; }
  .navigation a.aktiv { border-left: none; border-bottom-color: #4a90d9; }
  .kopfzeile { flex-wrap: wrap; }
  /* Titel über die volle Breite, Konto darunter - sonst überlagern sich Untertitel und Name. */
  .kopfzeile__titel { flex-basis: 100%; }
  .konto__person { text-align: left; }
  .kopfzeile__firma { border-left: none; padding-left: 0; max-width: none; text-align: left; }
}
