/* IMD Relations – Grundgestaltung, übernommen aus IMD Control (gleiche Farben). Zusätze für Relations am Ende. */
:root {
  --imd-dunkelblau: #003B6D;
  --imd-blau: #0064C2;
  --imd-hellblau: #389AE1;
  --imd-text: #303030;
  --imd-text-leise: #5F6670;
  --imd-hintergrund: #F4F6F9;
  --imd-flaeche: #FFFFFF;
  --imd-linie: #DDE2E8;
  --imd-hinweis: #FFF4CC;
  --imd-hinweis-text: #5C4300;
  --imd-fehler: #B42318;
  --imd-fehler-flaeche: #FDECEA;
  --imd-erfolg: #1E6B34;
  --imd-erfolg-flaeche: #E6F4EA;
  --imd-info-flaeche: #E8F1FB;
}

* { box-sizing: border-box; }

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

.env-banner {
  background: var(--imd-hinweis);
  color: var(--imd-hinweis-text);
  text-align: center;
  font-size: 14px;
  padding: 6px 16px;
  border-bottom: 1px solid #F0D98A;
}

.topbar {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  background: var(--imd-flaeche);
  border-bottom: 3px solid var(--imd-dunkelblau);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--imd-dunkelblau);
  text-decoration: none;
  font-size: 20px;
}

.brand-name strong { color: #000; letter-spacing: 0.5px; }

.page {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
}

.card {
  background: var(--imd-flaeche);
  border: 1px solid var(--imd-linie);
  border-radius: 8px;
  padding: 32px;
}

.hero {
  display: flex;
  gap: 32px;
  align-items: center;
}

.hero-logo { flex: 0 0 auto; height: 180px; width: auto; }

h1 {
  color: var(--imd-dunkelblau);
  font-size: 28px;
  margin: 0 0 8px;
}

.lead { font-size: 18px; margin-top: 0; }

/* Graue Hinweistexte in normaler Schriftgröße (Wunsch vom 10.11.2026, E-137): nur die Farbe unterscheidet sie. */
.muted { color: var(--imd-text-leise); }

.footer {
  text-align: center;
  color: var(--imd-text-leise);
  font-size: 13px;
  padding: 24px 16px 40px;
}

a { color: var(--imd-blau); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--imd-hellblau);
  outline-offset: 2px;
}
.env-banner a { color: var(--imd-hinweis-text); font-weight: 600; margin-left: 8px; }
.footer a { color: var(--imd-text-leise); }

/* Kopfzeile */
.topbar { justify-content: space-between; gap: 16px; }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.topnav a { color: var(--imd-dunkelblau); text-decoration: none; font-weight: 500; }
.topnav a:hover { text-decoration: underline; }
.topnav .nutzer { color: var(--imd-text-leise); }
.topnav .button { color: #fff; }

/* Schaltflächen */
.button {
  display: inline-block;
  background: var(--imd-blau);
  color: #fff;
  border: 1px solid var(--imd-blau);
  border-radius: 6px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--imd-dunkelblau); border-color: var(--imd-dunkelblau); }
.button-zweit { background: #fff; color: var(--imd-blau); }
.button-zweit:hover { background: var(--imd-info-flaeche); color: var(--imd-dunkelblau); }
.button-klein { padding: 6px 14px; font-size: 14px; }
.link-button {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--imd-blau); text-decoration: underline; cursor: pointer;
}
.topnav .link-button { color: var(--imd-dunkelblau); text-decoration: none; font-weight: 500; }
.topnav .link-button:hover { text-decoration: underline; }
form.inline { display: inline; }
.aktionen { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Karten und Text */
.card.schmal { max-width: 560px; margin: 0 auto; }
.card + .card { margin-top: 24px; }
.tabelle + h2, .tabelle + h3 { margin-top: 32px; }
h2 { color: var(--imd-dunkelblau); font-size: 20px; margin: 24px 0 8px; }
.kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px 48px; }
/* Spalten dürfen schmaler werden als ihr Inhalt, damit nichts in die Nachbarspalte ragt */
.raster > * { min-width: 0; }
dl.daten { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.daten dt { color: var(--imd-text-leise); }
dl.daten dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rechtstext, .mailtext { max-width: 75ch; }
.mailtext {
  background: var(--imd-hintergrund); border: 1px solid var(--imd-linie);
  border-radius: 6px; padding: 16px; margin-top: 16px; font-family: ui-monospace, Consolas, monospace; font-size: 14px;
  overflow-wrap: anywhere;
}
.rechtstext-kurz { background: var(--imd-hintergrund); padding: 12px 16px; border-radius: 6px; }

/* Meldungen */
.meldung { border-radius: 6px; padding: 12px 16px; margin: 0 0 16px; border: 1px solid transparent; }
.meldung p { margin: 0; }
.meldung-info { background: var(--imd-info-flaeche); border-color: #C5DCF4; }
.meldung-success { background: var(--imd-erfolg-flaeche); color: var(--imd-erfolg); border-color: #B7DFC2; }
.meldung-fehler, .meldung-error { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); border-color: #F5C2BD; }
.meldung-warning { background: var(--imd-hinweis); color: var(--imd-hinweis-text); }

/* Formulare */
fieldset { border: 1px solid var(--imd-linie); border-radius: 8px; padding: 16px 20px 4px; margin: 0 0 20px; }
legend { font-weight: 600; color: var(--imd-dunkelblau); padding: 0 6px; }
.feld { margin-bottom: 16px; }
.feld > label { display: block; font-weight: 500; margin-bottom: 4px; }
.feld input[type=text], .feld input[type=email], .feld input[type=password], .feld input[type=tel], .feld input[type=url], .feld select {
  width: 100%; max-width: 480px; padding: 9px 11px; font: inherit;
  border: 1px solid #B8C0CA; border-radius: 6px; background: #fff; color: var(--imd-text);
}
.feld-checkbox label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.feld-checkbox input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.feld-fehler input, .feld-fehler select { border-color: var(--imd-fehler); }
.fehler { color: var(--imd-fehler); font-size: 16px; margin-top: 4px; }
.fehler::before { content: "⚠ "; }
.hilfe { color: var(--imd-text-leise); font-size: 16px; margin-top: 4px; }
.pflicht { color: var(--imd-fehler); }
.zeile { display: flex; gap: 16px; flex-wrap: wrap; }
.spalte-plz { flex: 0 0 120px; }
.spalte-rest { flex: 1 1 240px; }
.spalte-halb { flex: 1 1 220px; }
.einrueckung { border-left: 3px solid var(--imd-linie); padding-left: 16px; margin-bottom: 8px; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.tabelle th, .tabelle td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--imd-linie); vertical-align: top; }
.tabelle th { color: var(--imd-text-leise); font-weight: 600; font-size: 14px; }
.tabelle tr.inaktiv td { color: var(--imd-text-leise); }

@media (max-width: 640px) {
  .hero { flex-direction: column; text-align: center; }
  .hero .aktionen { justify-content: center; }
  .card { padding: 24px 16px; }
  .topbar { padding: 8px 16px; height: auto; flex-wrap: wrap; }
  .tabelle { display: block; overflow-x: auto; }
  dl.daten { grid-template-columns: 1fr; }
  dl.daten dd { margin-bottom: 8px; }
}

/* Passwort anzeigen */
.passwort-huelle { position: relative; max-width: 480px; }
.passwort-huelle input { padding-right: 104px !important; }
.passwort-knopf {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: #fff; border: 1px solid var(--imd-linie); border-radius: 4px;
  color: var(--imd-blau); font: inherit; font-size: 14px; padding: 4px 10px; cursor: pointer;
}
.passwort-knopf:hover { background: var(--imd-info-flaeche); }
.countdown-anzeige { font-variant-numeric: tabular-nums; }

/* Zwei-Faktor */
.qr { background: #fff; display: inline-block; padding: 8px; border: 1px solid var(--imd-linie); border-radius: 8px; }
.qr svg { display: block; width: 260px; height: 260px; max-width: 100%; }
.geheimnis { font-family: ui-monospace, Consolas, monospace; font-size: 17px; letter-spacing: 1px; background: var(--imd-hintergrund); padding: 8px 12px; border-radius: 6px; overflow-wrap: anywhere; }
.feld input.code-feld { max-width: 200px; font-size: 22px; letter-spacing: 6px; font-variant-numeric: tabular-nums; }
.topnav a.nutzer { color: var(--imd-text-leise); font-weight: 400; }
/* Knopf „In Authenticator-App öffnen“ nur auf Touch-Geräten (Handy, Tablet) zeigen */
.nur-mobil { display: none; margin-top: 12px; }
@media (hover: none) and (pointer: coarse) { .nur-mobil { display: block; } }

/* Filter und Hervorhebungen */
.filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 0; }
.filter select { padding: 6px 10px; font: inherit; border: 1px solid #B8C0CA; border-radius: 6px; }
.text-fehler { color: var(--imd-fehler); }
.meldung .feld { margin-bottom: 4px; }

/* Aktiver Menüpunkt */
.topnav a.aktiv { font-weight: 700; color: var(--imd-blau); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.fehlerliste { margin: 6px 0 6px 20px; padding: 0; }
.fehlerliste li { margin: 2px 0; }
.feld.ausgegraut label { color: var(--imd-text-leise); }
.hinweis-hauptbenutzer { font-weight: 600; }

/* Datum und Uhrzeit in Tabellen deutlich getrennt */
.uhrzeit { margin-left: 1.4em; font-variant-numeric: tabular-nums; }
.datum { font-variant-numeric: tabular-nums; }

/* Konfiguration (Etappe 2a) */
.feld input[type=number], .feld input[type=date], .feld input[type=time], .feld textarea {
  width: 100%; max-width: 480px; padding: 9px 11px; font: inherit;
  border: 1px solid #B8C0CA; border-radius: 6px; background: #fff; color: var(--imd-text);
}
.feld input[type=number], .feld input[type=date], .feld input[type=time] { max-width: 220px; }
.feld-fehler textarea { border-color: var(--imd-fehler); }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.kachel { display: block; border: 1px solid var(--imd-linie); border-radius: 8px; padding: 16px; text-decoration: none; color: var(--imd-text); background: #fff; }
.kachel:hover { border-color: var(--imd-blau); background: var(--imd-info-flaeche); }
.kachel strong { display: block; color: var(--imd-dunkelblau); font-size: 17px; margin-bottom: 4px; }
.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.geplant { display: block; font-size: 13px; color: var(--imd-hinweis-text); background: var(--imd-hinweis); border-radius: 4px; padding: 1px 6px; margin-top: 4px; white-space: nowrap; width: fit-content; }
.anders { background: var(--imd-hinweis); font-weight: 600; }
.marke { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--imd-hintergrund); color: var(--imd-text-leise); border: 1px solid var(--imd-linie); }
.marke-gilt { background: var(--imd-erfolg-flaeche); color: var(--imd-erfolg); border-color: #B7DFC2; }
.marke-geplant { background: var(--imd-hinweis); color: var(--imd-hinweis-text); border-color: #EBD48A; }
.tabelle tr.zurueck td { color: var(--imd-text-leise); text-decoration: line-through; }
.tabelle tr.zeile-geloescht td { color: var(--imd-text-leise); background: var(--imd-hintergrund); }
.tabelle tr.zurueck td.ohne-strich { text-decoration: none; }
.tabelle-schmal { width: auto; min-width: 360px; max-width: 100%; }

.schmal-formular { max-width: 640px; }
.schmal-formular h2 { margin-top: 28px; }
.mail-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .mail-raster { grid-template-columns: 1fr; } }
.mail-raster .feld input[type=text] { max-width: 100%; }
.feld textarea.mailtext-eingabe { max-width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 14px; line-height: 1.5; }
.marke-sicherheit { background: #FDECEC; color: var(--imd-fehler); border-color: #F3C3C3; }
details summary { cursor: pointer; }
.wartung { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; background: #FDEBD3; color: #5A3300; border-bottom: 1px solid #F0C48A; border-left: 6px solid #D97706; padding: 10px 16px; font-size: 15px; }
.wartung-text { max-width: 110ch; }
.wartung-aus { color: #5A3300; font-size: 14px; white-space: nowrap; }
.feld div[id] > div { margin: 4px 0; }
.feld div[id] > div label { font-weight: normal; }

/* Rechtstexte und Vertragsänderungen (E-41, Etappe 2b Teil 4) */
.rechtstext h2 { margin-top: 28px; }
.rechtstext h3 { margin-top: 20px; font-size: 17px; }
.vergleich ins { background: var(--imd-erfolg-flaeche); color: var(--imd-erfolg); text-decoration: underline; }
.vergleich del { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); text-decoration: line-through; }
.vergleich .geaendert, .vergleich .neu, .vergleich .entfernt { border-left: 4px solid var(--imd-hellblau); padding-left: 10px; }
.vergleich .neu { border-left-color: var(--imd-erfolg); }
.vergleich .entfernt { border-left-color: var(--imd-fehler); }
.vergleich-legende { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 16px; font-size: 14px; }
.vergleich-legende ins { background: var(--imd-erfolg-flaeche); color: var(--imd-erfolg); padding: 0 4px; }
.vergleich-legende del { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); padding: 0 4px; }
.vertrag-box { border: 1px solid var(--imd-linie); border-left: 6px solid var(--imd-blau); border-radius: 6px; padding: 12px 16px; margin: 0 0 16px; }
.vertrag-box h2 { margin-top: 0; }
.vertrag-widerspruch { border-left-color: var(--imd-fehler); }
.vertrag-box .aktionen { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vertragsstreifen { background: var(--imd-info-flaeche); color: var(--imd-dunkelblau); border-bottom: 1px solid #C5DCF4; border-left: 6px solid var(--imd-blau); padding: 10px 16px; font-size: 15px; }
.vertragsstreifen-sperre { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); border-left-color: var(--imd-fehler); border-bottom-color: #F3C1BC; }
.vertragsstreifen a { font-weight: 600; margin-left: 6px; }
/* Arbeitslink: Chat-Adressen sind lang (Wunsch vom 09.11.2026) */
#arbeitslink-feld { max-width: 760px; }
/* Etappe 8c-2: „Was ist neu“ (E-122) */
.neu-streifen { margin: 0; }
.neu-streifen .link-button { font-weight: 600; margin-left: 10px; }
.neu-streifen .neu-schliessen { color: var(--imd-text-leise); font-weight: 400; }
.neuigkeit { border-left: 4px solid var(--imd-hellblau, #389AE1); padding: 2px 0 2px 12px; margin: 0 0 14px; }
.neuigkeit h3 { margin: 0 0 4px; font-size: 1.05em; }
.textfeld-gross { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* Etappe 3a: Credits */
.topnav a.guthaben-anzeige { border: 1px solid var(--imd-linie); border-radius: 999px; padding: 4px 12px; font-variant-numeric: tabular-nums; }
.topnav a.guthaben-anzeige.guthaben-niedrig, .guthaben-niedrig strong { background: var(--imd-hinweis); color: var(--imd-hinweis-text); border-color: #E8C95A; }
.topnav a.guthaben-anzeige.aktiv { text-decoration: none; border-color: var(--imd-blau); }
.guthaben-gross { font-size: 20px; margin: 8px 0 16px; }
.guthaben-gross strong { padding: 2px 8px; border-radius: 6px; }
.paketwahl { border: 0; padding: 0; margin: 0 0 16px; }
.paketwahl legend { font-weight: 500; margin-bottom: 8px; }
.paket { display: flex; gap: 12px; align-items: center; border: 1px solid var(--imd-linie); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; max-width: 520px; }
.paket input { width: 18px; height: 18px; flex: 0 0 auto; }
.paket .muted { margin-left: 8px; }
.paket:has(input:checked) { border-color: var(--imd-blau); background: var(--imd-info-flaeche); }
.tabelle tr.summe td { border-top: 2px solid var(--imd-text); }
.kaufhinweis { margin-top: 24px; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; background: var(--imd-hintergrund); }
.status-bezahlt { background: var(--imd-erfolg-flaeche); color: var(--imd-erfolg); }
.status-ausstehend { background: var(--imd-hinweis); color: var(--imd-hinweis-text); }
.status-fehlgeschlagen, .status-rueckgebucht { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); }
.stripe-kennung { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.seiten { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.tabelle th.zahl, .tabelle td.zahl { text-align: right; }

/* Etappe 4: Vorgänge – Entwurf und Uploads */
h3 { color: var(--imd-dunkelblau); font-size: 17px; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
fieldset.ohne-rahmen { border: 0; padding: 0; margin: 0; min-width: 0; }
.kopf h2 { margin-top: 0; }
.produkt-text { display: block; color: var(--imd-text-leise); font-size: 16px; margin-top: 2px; }
.paket.produkt { align-items: flex-start; max-width: 640px; }
.paket.produkt input { margin-top: 3px; }
.kostenbox { background: var(--imd-info-flaeche); border: 1px solid #C5DCF4; border-radius: 6px; padding: 12px 16px; margin-top: 16px; }
.kostenbox p { margin: 0; }
.kostenbox p + p { margin-top: 6px; }
.kostenbox-fehlt { background: var(--imd-hinweis); color: var(--imd-hinweis-text); border-color: #EBD48A; }
.uploadfeld { border: 1px solid var(--imd-linie); border-left: 4px solid var(--imd-linie); border-radius: 6px; padding: 14px 16px; margin-top: 16px; }
.uploadfeld-offen { border-left-color: #E3B341; }
.uploadfeld .hilfe { margin: 4px 0 8px; }
.dateiliste { list-style: none; margin: 8px 0; padding: 0; }
.dateiliste li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--imd-linie); overflow-wrap: anywhere; }
.dateiliste li:last-child { border-bottom: 0; }
.dateiliste .muted { font-size: 16px; }
.uploadformular { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.dateiwahl input[type=file] { font: inherit; font-size: 15px; max-width: 100%; }
.upload-status { flex: 1 1 100%; font-size: 16px; }
.upload-status:empty { display: none; }
.upload-status .ok { color: var(--imd-erfolg); }
.upload-status .nein { color: var(--imd-fehler); }
.upload-status progress { width: 100%; max-width: 360px; height: 10px; vertical-align: middle; margin-left: 8px; }
.nv-feld { margin: 10px 0 0; }
.button-gefahr { color: var(--imd-fehler); border-color: var(--imd-fehler); }
.button-gefahr:hover { background: var(--imd-fehler-flaeche); color: var(--imd-fehler); border-color: var(--imd-fehler); }
#speicherstand.fehler::before { content: ""; }
/* Auswahlknopf statt des unscheinbaren Browserfelds; das echte Feld bleibt für Tastatur und Bildschirmleser bedienbar */
.dateiwahl { position: relative; overflow: hidden; }
.dateiwahl input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; width: 100%; }
.dateiwahl:focus-within { outline: 3px solid var(--imd-hellblau); outline-offset: 2px; }
.uploadfeld.ziehen-aktiv { border-color: var(--imd-blau); border-style: dashed; background: var(--imd-info-flaeche); }
.entwurf-aktionen { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 16px; }
.entwurf-aktionen .hilfe { flex: 1 1 260px; margin: 0; }
.button-aus, .button-aus:hover { background: #E3E7EC; border-color: #E3E7EC; color: var(--imd-text-leise); cursor: not-allowed; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { border-left: 3px solid var(--imd-hellblau); padding: 6px 0 6px 12px; margin-bottom: 8px; }
.timeline li strong { margin: 0 8px 0 12px; }

/* Etappe 4a-2: Schwärzungsvorschau */
.vorschlaege { font-size: 16px; }
.seitenbild { position: relative; display: inline-block; max-width: 100%; border: 1px solid var(--imd-linie); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seitenbild img { display: block; max-width: 100%; height: auto; }
.kasten-muster { display: inline-block; width: 14px; height: 10px; margin-right: 6px; border: 2px solid; vertical-align: middle; }
.kasten { position: absolute; border: 2px solid; border-radius: 2px; background: rgba(214, 40, 40, 0.18); border-color: #D62828; }
.kasten-name { background: rgba(214, 40, 40, 0.22); border-color: #D62828; }
.kasten-anschrift { background: rgba(230, 120, 0, 0.22); border-color: #E67800; }
.kasten-telefon, .kasten-email { background: rgba(0, 100, 194, 0.20); border-color: #0064C2; }
.kasten-bank, .kasten-versicherung, .kasten-geburtsdatum { background: rgba(120, 60, 180, 0.20); border-color: #783CB4; }
.kasten-unterschrift { background: rgba(30, 107, 52, 0.18); border-color: #1E6B34; border-style: dashed; }
.legende { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.seitenkarte h2 { margin-top: 0; }
/* Etappe 4a-3: Schwärzen im Browser */
.seitenbild.bearbeiten { cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.seitenbild.bearbeiten img { pointer-events: none; }
button.vorschlag { padding: 0; margin: 0; cursor: pointer; font: inherit; }
button.vorschlag:hover, button.vorschlag:focus-visible { outline: 3px solid #111; outline-offset: 1px; }
.balken { position: absolute; background: rgba(0, 0, 0, 0.6); border: 1px solid #000; cursor: pointer; }
.balken:hover { background: rgba(160, 0, 0, 0.5); border-color: #A00000; }
.balken-neu { pointer-events: none; border: 1px dashed #000; background: rgba(0, 0, 0, 0.35); }
.werkzeugleiste { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.werkzeugleiste .hilfe { flex: 1 1 260px; margin: 0; }
.schwaerzen-leiste { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -2px 10px rgba(0,0,0,.12); }
.schwaerzen-leiste .haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.schwaerzen-leiste .haken input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.anleitung { margin: 4px 0 8px 20px; padding: 0; }
.schwaerzung-ok { color: var(--imd-erfolg); font-weight: 600; }
.schwaerzung-offen { color: var(--imd-fehler); font-weight: 600; }
.link-klein { font-size: 14px; }

/* Etappe 5: Vorgangslisten mit Suche, Filter, Sortierung, ungelesen (Konzept 4.5, 4.9) */
.listenfilter { margin: 16px 0 8px; padding: 16px; background: var(--imd-hintergrund); border: 1px solid var(--imd-linie); border-radius: 8px; display: grid; gap: 12px; }
.listenfilter-suche { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.listenfilter-suche input { flex: 1 1 280px; padding: 8px 10px; font: inherit; border: 1px solid #B8C0CA; border-radius: 6px; }
.listenfilter-felder { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: flex-end; }
.listenfilter-felder label { display: flex; flex-direction: column; gap: 4px; font-size: 16px; color: var(--imd-text-leise); }
.listenfilter-felder select, .listenfilter-felder input[type=date], .listenfilter-felder input[type=search] { padding: 6px 8px; font: inherit; color: var(--imd-text); border: 1px solid #B8C0CA; border-radius: 6px; background: var(--imd-flaeche); }
.listenfilter-felder .listenfilter-haken { flex-direction: row; align-items: center; color: var(--imd-text); padding-bottom: 6px; }
.listenfilter-knoepfe { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.listenfilter-knoepfe .hilfe { margin: 0; }
.treffer { margin: 8px 0 0; color: var(--imd-text-leise); font-size: 16px; }
.umschalter { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.umschalter a { padding: 6px 14px; border: 1px solid var(--imd-linie); border-radius: 18px; text-decoration: none; color: var(--imd-dunkelblau); background: var(--imd-flaeche); }
.umschalter a.aktiv { background: var(--imd-dunkelblau); border-color: var(--imd-dunkelblau); color: #fff; font-weight: 600; }
.tabelle a.sortieren { color: inherit; text-decoration: none; white-space: nowrap; }
.tabelle a.sortieren:hover, .tabelle a.sortieren:focus { text-decoration: underline; }
.tabelle tr.ungelesen td { font-weight: 700; color: var(--imd-text); }
.punkt { color: var(--imd-hellblau); margin-right: 6px; font-size: 12px; vertical-align: middle; }
.tabelle tr.eilig td { background: var(--imd-hinweis); }
.marke-eilig { background: var(--imd-hinweis); color: var(--imd-hinweis-text); border-color: #EBD48A; }
.kopf-aktion { margin-left: auto; }
.aktionszeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.inline-form select { padding: 6px 8px; font: inherit; border: 1px solid #B8C0CA; border-radius: 6px; }
.liste-schlicht { list-style: none; padding: 0; margin: 8px 0; }
.liste-schlicht li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--imd-linie); }

/* Auf dem Smartphone erscheinen die Zeilen als Karten statt als breite Tabelle (E-74 Nr. 5) */
@media (max-width: 640px) {
  .tabelle.tabelle-karten { display: block; overflow: visible; }
  .tabelle-karten thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabelle-karten tbody, .tabelle-karten tr, .tabelle-karten td { display: block; }
  .tabelle-karten tr { border: 1px solid var(--imd-linie); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
  .tabelle-karten td { border: none; padding: 4px 0; display: flex; gap: 12px; }
  .tabelle-karten td::before { content: attr(data-label); flex: 0 0 40%; color: var(--imd-text-leise); font-weight: 400; font-size: 14px; }
  .tabelle-karten td.zahl { text-align: left; }
}

/* Einheitliche Seitenbreite nach dem Anmelden (Wunsch vom 08.11.2026: Full-HD-Bildschirm ausnutzen, beim
   Durchklicken keine wechselnden Breiten). Formulare bleiben innen schmal (Eingabefelder höchstens 480 px).
   Vor dem Anmelden (Anmelden, Registrieren, Passwort vergessen) bleibt der schmale, mittige Kasten. */
.page.page-breit, body.angemeldet .page { max-width: 1760px; }
.page.page-breit .card, body.angemeldet .page .card { padding: 28px 32px; }
body.angemeldet .card.schmal { max-width: none; margin: 0; }
.tabellen-huelle { width: 100%; overflow-x: auto; }
.tabelle-liste { font-size: 14px; }
.tabelle-liste th, .tabelle-liste td { padding: 9px 10px; }
.tabelle-liste .uhrzeit { margin-left: 0.5em; color: var(--imd-text-leise); }
.tabelle-liste tr.ungelesen .uhrzeit { color: var(--imd-text); }

/* Etappe 5b-2: Hilfe (E-75, E-76, E-79) */
.hilfe-frage { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--imd-blau); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; vertical-align: middle; margin-left: 4px; }
.hilfe-frage:hover, .hilfe-frage:focus { background: var(--imd-dunkelblau); color: #fff; }
.mit-hilfe { display: flex; align-items: flex-start; gap: 6px; }
.mit-hilfe .hilfe-frage { margin-top: 32px; }
.hilfe-seite { max-width: none; }
.hilfe-seite .hilfe-abschnitt, .hilfe-seite .hilfe-inhalt, .hilfe-seite .lead, .hilfe-suche { max-width: 85ch; }
.hilfe-suche input { width: 100%; max-width: 480px; padding: 9px 11px; font: inherit; border: 1px solid var(--imd-linie); border-radius: 6px; }
.hilfe-inhalt { border: 1px solid var(--imd-linie); border-radius: 8px; padding: 12px 20px; margin: 20px 0; }
.hilfe-inhalt h2 { margin-top: 0; font-size: 18px; }
.hilfe-inhalt ol { margin: 0; padding-left: 20px; }
.hilfe-inhalt ul { margin: 4px 0 10px; padding-left: 18px; }
.hilfe-kapitel h2 { margin-top: 32px; border-bottom: 1px solid var(--imd-linie); padding-bottom: 6px; }
.hilfe-abschnitt { scroll-margin-top: 16px; }
.hilfe-abschnitt h3 { margin: 22px 0 6px; }
.hilfe-abschnitt:target { outline: 3px solid var(--imd-hellblau); outline-offset: 6px; border-radius: 4px; }
.topnav .kopf-knopf { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--imd-blau); border-radius: 6px;
  padding: 3px 9px; color: var(--imd-blau); }
.topnav .kopf-knopf:hover { background: var(--imd-info-flaeche); }

/* Etappe 6a: Fallseite und Timeline (E-84) */
.timeline li.von-imd { border-left-color: var(--imd-blau); }
.timeline li.eintrag-ergebnis { border-left-width: 5px; border-left-color: var(--imd-dunkelblau); }
.timeline li.eintrag-angefordert { border-left-color: #E0B000; }
.timeline li.eintrag-system { border-left-color: #C9CED6; color: #555; }
/* Interne Notizen: warmes Gelb, nie mit Kundennachrichten zu verwechseln (Konzept 10) */
.timeline li.eintrag-notiz { background: #FFF6D6; border-left: 5px solid #E0B000; border-radius: 4px; padding-right: 10px; }
.marke-notiz { background: #FFF0B3; color: #6B4E00; border-color: #E0B000; }
.eintrag-text { margin: 4px 0 0 12px; white-space: normal; overflow-wrap: anywhere; }
.timeline .dateiliste { margin: 6px 0 0 12px; }
.antwortform .arten { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
.antwortform .arten legend { font-weight: 600; margin-bottom: 6px; }
.art-wahl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.antwortform textarea { width: 100%; }
.nur-notiz { display: none; margin: 0 0 8px; }
.antwortform:has(input[name="art"][value="notiz"]:checked) { background: #FFF6D6; border-left: 5px solid #E0B000; padding: 8px 12px; border-radius: 4px; }
.antwortform:has(input[name="art"][value="notiz"]:checked) .nur-notiz { display: block; }
.nur-ergebnis { opacity: .55; }
.antwortform:has(input[name="art"][value="ergebnis"]:checked) .nur-ergebnis { opacity: 1; }
.anhaenge { margin-top: 12px; }
.aufklapper { margin-top: 12px; }
.aufklapper summary { cursor: pointer; color: var(--imd-blau); font-weight: 600; }
.aufklapper form { margin-top: 10px; }
.abschluss { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* E-87: offene Anforderung, Prüfergebnis und interne Notizen oben auf der Fallseite */
.kasten-anforderung { background: var(--imd-hinweis); border-left: 6px solid #E0B000; }
.kasten-anforderung h2 { color: var(--imd-hinweis-text); margin-top: 0; }
.kasten-anforderung .anforderung { margin-bottom: 10px; font-size: 1.05em; }
.kasten-ergebnis { background: var(--imd-info-flaeche); border-left: 6px solid var(--imd-blau); }
.kasten-ergebnis h2 { margin-top: 0; }
.kasten-notizen { background: #FFF6D6; border-left: 6px solid #E0B000; }
.kasten-notizen h2 { margin: 0; }
.notizliste { list-style: none; margin: 8px 0 0; padding: 0; }
.notizliste li { padding: 6px 0; border-bottom: 1px solid #F0DE9A; }
.notizliste li:last-child { border-bottom: 0; }

/* E-88: Neu vom Kunden eingegangen (intern, oben) */
.kasten-neu { background: var(--imd-erfolg-flaeche); border-left: 6px solid var(--imd-erfolg); }
.kasten-neu h2 { margin-top: 0; color: var(--imd-erfolg); }
.kasten-neu .neu-eintrag { padding: 6px 0 10px; border-bottom: 1px solid #B7DFC2; }
.kasten-neu .neu-eintrag:last-of-type { border-bottom: 0; }

/* Etappe 6b: Textbausteine, Kopfzeile mit Abwesenheit */
.bausteine { margin: 10px 0; }
.bausteinliste { list-style: none; margin: 6px 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--imd-linie); border-radius: 4px; }
.bausteinliste li { padding: 6px 10px; border-bottom: 1px solid var(--imd-linie); }
.bausteinliste li:last-child { border-bottom: 0; }
.baustein-vorschau { font-size: .9em; }
a.nutzer { color: inherit; text-decoration: none; }
a.nutzer:hover { text-decoration: underline; }

/* E-90: Zähler ungelesener Vorgänge am Menüpunkt (wie bei Handy-Apps) */
.zaehler { display: inline-block; min-width: 1.4em; padding: 1px 6px; margin-left: 4px; border-radius: 999px;
  background: #D92D20; color: #fff; font-size: .75em; font-weight: 700; line-height: 1.4; text-align: center; vertical-align: 1px; }

/* Etappe 8d: Übersicht und Statistik (E-50, E-110, E-123) – einfache Balken ohne Fremdbaustein */
.statistik-auswahl { margin-top: 12px; }
.statistik-blaettern { display: inline-flex; gap: 8px; margin-left: auto; }
.statistik-gewaehlt { margin: 12px 0 0; }
.statistik-kopf { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.statistik-kopf h2 { margin-bottom: 0; }
.statistik-tabelle th[scope="row"] { font-weight: 400; color: var(--imd-text); font-size: 15px; }
.statistik-tabelle tr.betont th[scope="row"], .statistik-tabelle tr.betont td { font-weight: 700; }
.statistik-tabelle tr.eingerueckt th[scope="row"] { padding-left: 28px; color: var(--imd-text-leise); }
.statistik-tabelle tr.eingerueckt td { color: var(--imd-text-leise); }
.statistik-tabelle td.zahl, .statistik-tabelle th.zahl { min-width: 120px; }
.statistik-diagramme { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 12px; }
.sdiag { margin: 0; min-width: 0; }
.sdiag figcaption { font-weight: 600; color: var(--imd-dunkelblau); margin-bottom: 8px; }
.sdiag-flaeche { display: flex; align-items: stretch; gap: 4px; height: 180px; border-bottom: 1px solid var(--imd-linie); }
.sdiag-spalte { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sdiag-saeule { display: block; width: 100%; max-width: 36px; background: var(--imd-blau); border-radius: 3px 3px 0 0; min-height: 1px; }
.sdiag-wert { font-size: 11px; color: var(--imd-text-leise); white-space: nowrap; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.sdiag-achse { display: flex; gap: 4px; margin-top: 4px; }
.sdiag-achse span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--imd-text-leise); white-space: nowrap; overflow: hidden; }
@media (max-width: 900px) { .sdiag-wert { display: none; } }
.uebersicht-zahl { font-size: 28px; font-weight: 700; color: var(--imd-dunkelblau); font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }
.uebersicht-zahl.warnung { color: var(--imd-fehler); }
.kachel .uebersicht-text { font-size: 16px; color: var(--imd-text-leise); }
/* E-125: Grafik je Tabellenzeile (Balken oder Torte), Umschalter */
.statistik-schalter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.umschalter-klein { margin: 0; }
.umschalter-klein a { padding: 3px 12px; font-size: 14px; }
.statistik-tabelle .grafik-spalte { width: 40%; min-width: 180px; vertical-align: middle; }
.statistik-tabelle td.torten-zelle { vertical-align: top; border-left: 1px solid var(--imd-linie); }
.torten { display: flex; gap: 24px 32px; flex-wrap: wrap; padding: 4px 0; }
.torte-figur { margin: 0; }
.torte-figur figcaption { font-size: 13px; color: var(--imd-text-leise); margin-bottom: 6px; font-weight: 600; }
.torte-mit-legende { display: flex; gap: 16px; align-items: center; }
/* Mit Vorjahr: Legende unter der Torte, damit beide Torten nebeneinander passen und die Zeilen nicht riesig werden */
.torte-mit-legende.untereinander { flex-direction: column; align-items: flex-start; gap: 8px; }
.torte-mit-legende.untereinander .torte { width: 130px; height: 130px; }
.torten { flex-wrap: nowrap; }
@media (max-width: 900px) { .torten { flex-wrap: wrap; } }
.torte { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; border: 1px solid var(--imd-linie); }
.torte-leer { background: var(--imd-hintergrund); color: var(--imd-text-leise); font-size: 13px; }
.torte-legende { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.7; }
.torte-legende strong { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .torte { width: 110px; height: 110px; } }
.zbalken { height: 12px; background: var(--imd-hintergrund); border-radius: 3px; overflow: hidden; }
.zbalken + .zbalken { margin-top: 3px; }
.zbalken-saeule { display: block; height: 100%; background: var(--imd-blau); border-radius: 3px; }
.zbalken-vorjahr { height: 8px; }
.zbalken-vorjahr .zbalken-saeule { background: #8FBCE6; }
.zbalken-saeule.negativ { background: var(--imd-fehler); }
.farbfeld { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.anteile { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--imd-text-leise); font-variant-numeric: tabular-nums; }
/* Etappe 8d-2: Reiter der Statistik, Kunden-Rangliste und Aufwand */
.statistik-reiter { margin: 4px 0 12px; }
.statistik-schnell { margin-top: 4px; }
.statistik-knoepfe { display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* Kurztest 10.11.2026: Listen passen ohne Laufleiste – Überschriften mehrzeilig und schmal, Namen in einer Zeile,
   sortierbare Überschriften sichtbar als Links */
.statistik-liste { font-size: 14px; }
.statistik-liste th, .statistik-liste td { padding: 8px 5px; }
.statistik-liste th[scope="col"] { vertical-align: bottom; font-size: 13px; line-height: 1.25; max-width: 7.5em; white-space: normal; hyphens: manual; }
.statistik-liste th[scope="row"] { white-space: nowrap; font-size: 14px; }
.statistik-liste td.zahl, .statistik-liste th.zahl { min-width: 0; white-space: nowrap; }
.statistik-liste th[scope="col"].zahl { white-space: normal; }
.statistik-liste a.sortieren { color: var(--imd-blau); white-space: normal; }
.statistik-liste .grafik-spalte { width: 130px; min-width: 110px; max-width: 160px; }
.statistik-liste th[scope="col"].grafik-spalte { max-width: none; }
.statistik-liste tr.grau th, .statistik-liste tr.grau td, .statistik-liste tr.grau a { color: var(--imd-text-leise); }
.statistik-liste tr.betont { background: var(--imd-flaeche); }
.zbalken.stapel { display: flex; height: 14px; }
.stapel-teil { display: block; height: 100%; }
.stapel-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.blaettern { display: flex; gap: 12px; align-items: center; margin-top: 12px; }

/* ---------------------------------------------------------------- IMD Relations */
/* Umschalter GmbH/LP in der Kopfzeile: deutlich sichtbar, damit immer klar ist, für welche Firma man arbeitet */
.firmen-umschalter { display: inline-flex; margin: 0 24px; border: 2px solid var(--imd-dunkelblau); border-radius: 8px; overflow: hidden; }
.firma-knopf { border: 0; background: var(--imd-flaeche); color: var(--imd-dunkelblau); font: inherit; font-weight: 700; padding: 6px 16px; cursor: pointer; letter-spacing: 0.5px; }
.firma-knopf + .firma-knopf { border-left: 2px solid var(--imd-dunkelblau); }
.firma-knopf:hover { background: var(--imd-info-flaeche); }
.firma-knopf.aktiv.firma-gmbh { background: var(--imd-dunkelblau); color: #fff; }
.firma-knopf.aktiv.firma-lp { background: #1E6B34; color: #fff; }
span.firma-knopf { cursor: default; }
.marke-firma.marke-gmbh { background: var(--imd-dunkelblau); color: #fff; border-color: var(--imd-dunkelblau); }
.marke-firma.marke-lp { background: #1E6B34; color: #fff; border-color: #1E6B34; }
fieldset.einrueckung { border-top: 0; border-right: 0; border-bottom: 0; margin: 0 0 20px; }
fieldset.einrueckung legend { font-weight: 600; padding: 0 0 6px; }

/* Verbindungsprüfung: roter Streifen auf jeder Seite, Ampel je Dienst */
.stoerung-streifen { background: var(--imd-fehler); color: #fff; padding: 12px 16px; font-size: 16px; border-bottom: 3px solid #7A1710; }
.stoerung-streifen a { color: #fff; font-weight: 700; margin-left: 8px; text-decoration: underline; }
.ampel-liste { list-style: none; padding: 0; margin: 16px 0; }
.ampel-zeile { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--imd-linie); }
.ampel { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; margin-top: 3px; vertical-align: -3px; border: 1px solid rgba(0, 0, 0, 0.2); }
.ampel-gruen { background: #2E9E4F; }
.ampel-rot { background: var(--imd-fehler); box-shadow: 0 0 0 3px var(--imd-fehler-flaeche); }
.ampel-grau { background: #C3C8CF; }

@media (max-width: 640px) {
  .firmen-umschalter { margin: 6px 0; }
}
