/* AnlagenPilot Designsystem v2.
   Leitmotiv "Ampel": Grün=gemeldet, Gelb=Frist läuft, Rot=überfällig.
   Token-basiert (CSS Custom Properties), keine Build-Pipeline nötig. */

:root {
  /* Marke/Primärfarbe – bewusst NICHT grün/gelb/rot, da diese drei Farben
     ausschließlich für die Ampel-/Status-Semantik reserviert bleiben (sonst
     verwechselt ein Nutzer einen Primär-Button leicht mit einem Warnhinweis). */
  --primary: #2954a3;
  --primary-hover: #1f4180;
  --primary-light: #e8eefb;

  /* Ampel-/Statusfarben */
  --gruen: #2e8b57;
  --gruen-hell: #e4f2ea;
  --amber: #de9a2e;
  --amber-hell: #fbf0dd;
  --rot: #c1443b;
  --rot-hell: #fbe9e8;

  /* Neutrale Skala */
  --ink: #16211d;
  --gray-900: #16211d;
  --gray-700: #3f4a45;
  --gray-600: #5b655f;
  --gray-500: #7c857f;
  --gray-400: #a4aca6;
  --gray-300: #cdd3ce;
  --gray-200: #e3e7e2;
  --gray-100: #eef1ed;
  --gray-50: #f6f7f5;
  --grau: var(--gray-500);
  --grau-hell: var(--gray-200);
  --paper: var(--gray-50);
  --weiss: #ffffff;

  /* Typografie */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* Radius / Schatten / Abstand */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --schatten: 0 1px 2px rgba(22, 33, 29, 0.06), 0 4px 12px rgba(22, 33, 29, 0.06);
  --schatten-lg: 0 8px 24px rgba(22, 33, 29, 0.1), 0 2px 6px rgba(22, 33, 29, 0.06);
  --sidebar-breite: 248px;

  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: var(--text-base);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

p.hinweis,
.hinweis {
  color: var(--gray-600);
  font-size: var(--text-sm);
}

small,
.caption {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* ---------- Layout: öffentliche Seiten (kein Sidebar-Kontext) ---------- */

.oeffentlich-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--weiss);
  border-bottom: 1px solid var(--gray-200);
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

main.main--breit {
  max-width: 1180px;
}

/* ---------- Layout: eingeloggter Bereich (Sidebar) ---------- */

.app-rahmen {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

.sidebar {
  width: var(--sidebar-breite);
  flex-shrink: 0;
  background: var(--weiss);
  border-right: 1px solid var(--gray-200);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}

.sidebar__marke {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1rem;
  font-weight: 700;
  font-size: var(--text-lg);
  text-decoration: none;
  color: var(--ink);
}

.sidebar__marke:hover {
  color: var(--ink);
}

.sidebar__marke svg {
  color: var(--primary);
  flex-shrink: 0;
}

.sidebar__firma {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem 1rem;
  font-size: var(--text-sm);
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 0.75rem;
}

.sidebar__firma span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__gruppe {
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
}

.sidebar__gruppen-titel {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  font-weight: 700;
  padding: 0.4rem 0.75rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.sidebar__link svg {
  flex-shrink: 0;
  color: var(--gray-500);
}

.sidebar__link:hover {
  background: var(--gray-100);
  color: var(--ink);
}

.sidebar__link--aktiv {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar__link--aktiv svg {
  color: var(--primary);
}

.sidebar__fuss {
  margin-top: auto;
  padding: 0.75rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.5rem;
}

.sidebar__fuss form {
  flex: 1;
  margin: 0;
}

.sidebar__mobil-leiste {
  display: none;
}

.app-inhalt {
  flex: 1;
  min-width: 0;
  max-width: 920px;
  /* Überschreibt `margin: 0 auto` vom generischen main-Selektor oben: Auto-
     Margins auf einem Flex-Item deaktivieren dessen Stretch-Verhalten
     (CSS-Flexbox-Spezifikation) – ohne dieses Override schrumpft `main` auf
     die bevorzugte Breite seines breitesten Inhalts (z. B. einer Tabelle)
     statt auf die verfügbare Sidebar-Layout-Breite, was auf schmalen
     Bildschirmen zu horizontalem Overflow der gesamten Seite führt. */
  margin: 0;
  padding: 2rem 2.5rem 3rem;
}

.app-inhalt.app-inhalt--breit,
.app-inhalt.main--breit {
  max-width: 1180px;
}

@media (max-width: 960px) {
  .sidebar__mobil-leiste {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--weiss);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .sidebar__mobil-leiste .sidebar__marke {
    padding: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 60;
    width: min(280px, 85vw);
    box-shadow: var(--schatten-lg);
    transition: left 0.2s ease;
  }

  .sidebar--offen {
    left: 0;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(22, 33, 29, 0.4);
  }

  .sidebar-backdrop--sichtbar {
    display: block;
  }

  .app-inhalt {
    padding: 1.25rem 1.25rem 2.5rem;
  }
}

@media (min-width: 961px) {
  /* Backdrop existiert nur für die mobile Off-Canvas-Sidebar; auf breiten
     Bildschirmen ist die Sidebar immer sichtbar, ein Backdrop wäre falsch. */
  .sidebar-backdrop {
    display: none !important;
  }
}

/* ---------- Ampel & Badges ---------- */

.ampel-punkt {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.ampel-punkt--gruen {
  background: var(--gruen);
}

.ampel-punkt--gelb {
  background: var(--amber);
}

.ampel-punkt--rot {
  background: var(--rot);
}

.ampel-punkt--grau {
  background: var(--gray-300);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge__punkt {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge--gruen {
  background: var(--gruen-hell);
  color: #1f6b41;
}

.badge--gruen .badge__punkt {
  background: var(--gruen);
}

.badge--gelb {
  background: var(--amber-hell);
  color: #8a5a12;
}

.badge--gelb .badge__punkt {
  background: var(--amber);
}

.badge--rot {
  background: var(--rot-hell);
  color: #96322a;
}

.badge--rot .badge__punkt {
  background: var(--rot);
}

.badge--grau {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge--grau .badge__punkt {
  background: var(--gray-400);
}

.fortschrittsbalken {
  height: 10px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.fortschrittsbalken__fuellung {
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.fortschrittsbalken__fuellung--gruen {
  background: var(--gruen);
}

.fortschrittsbalken__fuellung--gelb {
  background: var(--amber);
}

.fortschrittsbalken__fuellung--rot {
  background: var(--rot);
}

/* ---------- Cards ---------- */

.karte {
  background: var(--weiss);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--schatten);
  padding: 1.75rem;
}

.karte + .karte {
  margin-top: 1.25rem;
}

.karte__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.karte__kopf h1,
.karte__kopf h2 {
  margin: 0;
}

/* "Danger Zone" – für kritische, folgenreiche Aktionen (Vorbild: Mandant
   löschen). Wiederverwendbares Muster statt Einzelfall. */
.zone-gefahr {
  border-left: 4px solid var(--rot);
  background: var(--rot-hell);
}

.zone-gefahr h1,
.zone-gefahr h2 {
  color: #7a2820;
}

/* ---------- Formulare ---------- */

form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.feld {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.feld-reihe {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.feld-reihe .feld {
  flex: 1 1 200px;
}

/* Für Aktions-/Button-Felder in einer .feld-reihe: nicht auf gleiche Breite
   strecken, sondern nur so breit wie nötig (behebt das "leere Spalte"-
   Problem bei Reihen aus einem Eingabefeld + einem Button). */
.feld-reihe .feld--aktion {
  flex: 0 0 auto;
}

label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

input,
select,
textarea {
  font: inherit;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--weiss);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.feld--fehler input,
.feld--fehler select,
.feld--fehler textarea {
  border-color: var(--rot);
}

.feld--fehler input:focus,
.feld--fehler select:focus,
.feld--fehler textarea:focus {
  box-shadow: 0 0 0 3px var(--rot-hell);
}

.feld__fehlertext {
  color: var(--rot);
  font-size: var(--text-xs);
}

.checkbox-feld {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.checkbox-feld input {
  width: auto;
}

.checkbox-feld label {
  font-weight: 400;
  color: var(--ink);
}

button,
.knopf {
  font: inherit;
  cursor: pointer;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--weiss);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

button:hover,
.knopf:hover {
  background: var(--primary-hover);
  color: var(--weiss);
}

.knopf--sekundaer {
  background: var(--weiss);
  color: var(--ink);
  border-color: var(--gray-300);
}

.knopf--sekundaer:hover {
  background: var(--gray-50);
  color: var(--ink);
}

.knopf--gefahr {
  background: var(--rot);
}

.knopf--gefahr:hover {
  background: #9c352d;
}

.knopf--voll {
  width: 100%;
}

.knopf-icon {
  font: inherit;
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  background: var(--weiss);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.knopf-icon:hover {
  background: var(--gray-50);
}

.meldung {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.meldung--erfolg {
  background: var(--gruen-hell);
  color: #1f6b41;
  border-color: rgba(46, 139, 87, 0.25);
}

.meldung--fehler {
  background: var(--rot-hell);
  color: #96322a;
  border-color: rgba(193, 68, 59, 0.25);
}

.fehlerliste {
  color: var(--rot);
  font-size: var(--text-sm);
  margin: 0;
  padding-left: 1.1rem;
}

.fusszeile-hinweis {
  text-align: center;
  margin-top: 1.25rem;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.fachbegriff-hinweis {
  display: inline-block;
}

.fachbegriff-hinweis a {
  text-decoration: none;
  border-bottom: 1px dotted var(--gray-500);
  color: var(--gray-500);
}

/* ---------- Wizard (Onboarding) ---------- */

.wizard-schritte {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.wizard-schritt {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--gray-200);
}

.wizard-schritt--aktiv,
.wizard-schritt--erledigt {
  background: var(--primary);
}

/* ---------- Empty States ---------- */

.leerzustand {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-600);
}

.leerzustand svg {
  color: var(--gray-300);
  margin-bottom: 0.75rem;
}

.leerzustand p {
  margin: 0 0 1rem;
}

.leerzustand .knopf,
.leerzustand .knopf--sekundaer {
  display: inline-flex;
}

/* ---------- Tabellen ---------- */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  font-size: var(--text-sm);
}

th {
  color: var(--gray-500);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--gray-200);
}

td {
  border-bottom: 1px solid var(--gray-100);
}

tbody tr:nth-child(even) td {
  background: var(--gray-50);
}

tbody tr:hover td {
  background: var(--primary-light);
}

/* ---------- Rechtstexte / Markdown-Inhalte ---------- */

.rechtstext-inhalt {
  line-height: 1.75;
}

.rechtstext-inhalt h1,
.rechtstext-inhalt h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 1.5rem;
}

.rechtstext-inhalt blockquote {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--amber-hell);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
}

.rechtstext-inhalt table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.rechtstext-inhalt th,
.rechtstext-inhalt td {
  border: 1px solid var(--gray-200);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.inhaltsverzeichnis {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
}

.inhaltsverzeichnis__titel {
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.inhaltsverzeichnis ol,
.inhaltsverzeichnis ul {
  margin: 0;
  padding-left: 1.2rem;
  list-style: decimal;
}

.inhaltsverzeichnis ul ul {
  list-style: none;
  padding-left: 1rem;
}

.inhaltsverzeichnis li {
  padding: 0.15rem 0;
}

.inhaltsverzeichnis a {
  color: var(--ink);
  text-decoration: none;
}

.inhaltsverzeichnis a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.fusszeile {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.fusszeile a {
  color: var(--gray-500);
}

/* ---------- Auth-Seiten (Login/Registrieren/Passwort) ---------- */

.auth-rahmen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--primary) 0%, #17305e 100%);
  padding: 2rem 1rem;
}

.auth-karte {
  width: 100%;
  max-width: 420px;
  background: var(--weiss);
  border-radius: var(--radius-lg);
  box-shadow: var(--schatten-lg);
  padding: 2.25rem 2rem;
}

.auth-karte__marke {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.auth-karte__marke svg {
  color: var(--primary);
}

/* ---------- Hilfe-Panel (Stufe 8): rechts angedocktes Slide-in-Panel ---------- */

.hilfe-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(380px, 100vw);
  height: 100vh;
  background: var(--weiss);
  box-shadow: -2px 0 12px rgba(22, 33, 29, 0.14);
  transition: right 0.2s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.hilfe-panel--offen {
  right: 0;
}

.hilfe-panel__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.hilfe-panel__inhalt {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.hilfe-panel__inhalt input[type="search"] {
  width: 100%;
  margin-bottom: 1rem;
}

.hilfe-panel__artikel-liste {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.hilfe-panel__artikel-liste li a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--ink);
  text-decoration: none;
}

.hilfe-panel__artikel-liste li a:hover {
  color: var(--primary);
}

.hilfe-panel__kategorie {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-500);
  margin: 1rem 0 0.3rem;
  font-weight: 700;
}

.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;
}

/* ---------- Landingpage ---------- */

.hero {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.hero h1 {
  font-size: var(--text-3xl);
  margin-bottom: 0.75rem;
}

.ampel-erklaerung {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.ampel-erklaerung__punkt {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
}

@media (max-width: 640px) {
  .ampel-erklaerung {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.tarif-karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.tarif-karte {
  position: relative;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.tarif-karte--empfohlen {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tarif-karte__abzeichen {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--weiss);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tarif-karte__preis {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0.5rem 0;
}

.tarif-karte__preis span {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--gray-500);
}

.tarif-karte__merkmale {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  text-align: left;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.tarif-karte__merkmale li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.3rem 0;
}

.tarif-karte__merkmale svg {
  color: var(--gruen);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ---------- Backoffice: KPI-Kacheln, Diagramme, Anfragen-Board ---------- */

.backoffice-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--weiss);
  border-bottom: 1px solid var(--gray-200);
}

.backoffice-kopf__marke {
  font-weight: 700;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.backoffice-kopf__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.backoffice-kopf__nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.backoffice-kopf__nav a:hover,
.backoffice-kopf__nav a.aktiv {
  color: var(--primary);
}

.kpi-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-karte__label {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.kpi-karte__wert {
  margin: 0.15rem 0 0;
  font-size: var(--text-2xl);
  font-weight: 700;
}

.diagramm-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.diagramm-karte svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.diagramm-mit-legende {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.legende {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
}

.legende li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.legende__punkt {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

/* Anfragen-Board: 3 Status-Spalten, kein Drag&Drop (Statuswechsel über
   Buttons – robuster/barrierefreier als eine DnD-Interaktion, und ohne
   zusätzliche JS-Abhängigkeit umsetzbar). */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: 1fr;
  }
}

.board__spalte {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 120px;
}

.board__spalten-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.board__spalten-titel {
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-600);
}

.board__karte {
  background: var(--weiss);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.board__karte:hover {
  box-shadow: var(--schatten);
  border-color: var(--primary);
}

.board__karte-titel {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.board__karte-meta {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.board__karte--risiko {
  border-left: 3px solid var(--rot);
}

.notiz-liste {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.notiz {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
}

.notiz--nachricht {
  background: var(--primary-light);
  border-color: rgba(41, 84, 163, 0.25);
}

.notiz__kopf {
  display: flex;
  justify-content: space-between;
  color: var(--gray-500);
  font-size: var(--text-xs);
  margin-bottom: 0.35rem;
}
