/* ============================================================
   W6 - Web | Stylesheet
   Gestaltung nach Vorlage: rote Kopf-/Fußzeile, helle Fläche,
   weiße Karten mit weichen Rändern, rote Akzente.
   ============================================================ */

:root {
  --rot: #c30b0c;
  --rot-dunkel: #9c0809;
  --rot-hell: #fceaea;
  --rot-rand: #f5d4d4;
  --flaeche: #f6f6f7;
  --karte: #ffffff;
  --rand: #ebebee;
  --rand-stark: #e1e1e6;
  --text: #1a1a1e;
  --text-grau: #8c8c94;
  --text-mittel: #55555c;
  --gruen: #1d8a4b;
  --schatten: 0 1px 2px rgba(20, 20, 25, .05), 0 6px 18px rgba(20, 20, 25, .05);
  --radius: 14px;
  --fokus: 0 0 0 3px rgba(195, 11, 12, .22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--flaeche);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 14px;
}

button { font-family: inherit; }

:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Kopfzeile ---------------- */

.kopf {
  background: var(--rot);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  min-height: 62px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.kopf-links { display: flex; align-items: center; gap: 13px; min-width: 0; }

.w6-badge {
  width: 42px; height: 42px;
  border: 2.5px solid rgba(255, 255, 255, .95);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; letter-spacing: .3px;
  background: rgba(255, 255, 255, .06);
  flex-shrink: 0;
}

.kopf-name { font-size: 17px; font-weight: 700; line-height: 1.2; }
.kopf-unter { font-size: 11.5px; font-weight: 600; opacity: .92; line-height: 1.3; }

.kopf-rechts { position: relative; display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--rot-dunkel);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.avatar:hover { transform: translateY(-1px); }

.benutzer-menue {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: 10px;
  box-shadow: var(--schatten);
  min-width: 185px;
  padding: 6px;
  z-index: 60;
}

.benutzer-menue .menue-kopf {
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 5px;
}
.benutzer-menue .menue-kopf .mk-name { font-weight: 700; font-size: 13px; }
.benutzer-menue .menue-kopf .mk-rolle { font-size: 11px; color: var(--text-grau); margin-top: 1px; }

.benutzer-menue button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  background: none; border: none;
  text-align: left;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text);
}
.benutzer-menue button:hover { background: #f4f4f6; }
.benutzer-menue button.gefahr { color: var(--rot); }
.benutzer-menue button svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------------- Inhalt ---------------- */

.inhalt {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 24px 44px;
}

/* Willkommens-Karte */
.willkommen {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  text-align: center;
  padding: 34px 28px;
  margin-bottom: 26px;
}
.willkommen h1 {
  margin: 0;
  font-size: clamp(20px, 3.2vw, 29px);
  font-weight: 800;
  letter-spacing: -.2px;
}

/* Modul-Karten */
.modul-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 20px;
}

.modul-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 15px 15px 14px;
  cursor: pointer;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  font: inherit;
  color: inherit;
}
.modul-karte:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(20, 20, 25, .06), 0 14px 30px rgba(20, 20, 25, .09);
  border-color: var(--rand-stark);
}

.modul-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--rot-hell);
  border: 1px solid var(--rot-rand);
  display: flex; align-items: center; justify-content: center;
  color: var(--rot);
}
.modul-icon svg { width: 21px; height: 21px; }

.modul-pill {
  position: absolute;
  top: 15px; right: 15px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--rot);
  color: #fff;
  letter-spacing: .2px;
}

.modul-titel { font-size: 15.5px; font-weight: 800; margin-top: 14px; }
.modul-text { font-size: 11.5px; color: var(--text-grau); line-height: 1.45; margin-top: 4px; min-height: 33px; }

.modul-vorschau {
  margin-top: 13px;
  background: #f7f7f8;
  border: 1px solid #efeff2;
  border-radius: 11px;
  height: 88px;
  display: flex; align-items: center; justify-content: center;
}
.modul-nr {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(20, 20, 25, .06);
  padding: 8px 15px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-mittel);
}

/* ---------------- Anmeldung ---------------- */

.anmelde-flaeche {
  min-height: calc(100vh - 220px);
  display: flex; align-items: center; justify-content: center;
}

.anmelde-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 16px;
  box-shadow: var(--schatten);
  width: 100%;
  max-width: 392px;
  padding: 34px 32px 30px;
  text-align: center;
}

.anmelde-badge {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  background: var(--rot);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, .85), 0 6px 16px rgba(195, 11, 12, .28);
}

.anmelde-karte h1 { font-size: 21px; font-weight: 800; margin: 0 0 4px; }
.anmelde-karte .anmelde-unter { color: var(--text-grau); font-size: 12.5px; margin-bottom: 22px; }
.anmelde-karte form { text-align: left; }

.anmelde-fehler {
  background: var(--rot-hell);
  border: 1px solid var(--rot-rand);
  color: var(--rot-dunkel);
  font-size: 12.5px;
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 14px;
}

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

.feld { margin-bottom: 14px; }
.feld label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-mittel);
  margin-bottom: 5px;
  letter-spacing: .2px;
}
.feld .feld-hinweis { font-size: 10.5px; color: var(--text-grau); margin-top: 4px; }

.eingabe, select.eingabe, textarea.eingabe {
  width: 100%;
  border: 1px solid var(--rand-stark);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.eingabe:focus { outline: none; border-color: var(--rot); box-shadow: var(--fokus); }
.eingabe:disabled { background: #f4f4f6; color: var(--text-grau); cursor: not-allowed; }
textarea.eingabe { resize: vertical; min-height: 74px; }

.kontrollfeld { display: flex; align-items: center; gap: 9px; padding: 8px 0 2px; }
.kontrollfeld input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--rot); cursor: pointer; }
.kontrollfeld span { font-size: 13px; }

/* ---------------- Schaltflächen ---------------- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s ease, transform .1s ease, border-color .12s ease;
  white-space: nowrap;
}
.knopf svg { width: 15px; height: 15px; }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .55; cursor: not-allowed; }

.knopf-rot { background: var(--rot); color: #fff; }
.knopf-rot:hover:not(:disabled) { background: var(--rot-dunkel); }

.knopf-hell { background: #fff; border-color: var(--rand-stark); color: var(--text-mittel); }
.knopf-hell:hover:not(:disabled) { background: #f5f5f7; }

.knopf-breit { width: 100%; padding: 11px 16px; font-size: 14px; }

.symbol-knopf {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-grau);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.symbol-knopf svg { width: 15.5px; height: 15.5px; }
.symbol-knopf:hover { background: #f1f1f4; color: var(--text); }
.symbol-knopf.gefahr:hover { background: var(--rot-hell); color: var(--rot); }

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

.zurueck-zeile { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.zurueck-knopf {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff;
  border: 1px solid var(--rand-stark);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-mittel);
  cursor: pointer;
}
.zurueck-knopf:hover { background: #f5f5f7; }
.zurueck-knopf svg { width: 14px; height: 14px; }

.tab-kopfzeile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tab-kopf-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--rot-hell);
  border: 1px solid var(--rot-rand);
  color: var(--rot);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tab-kopf-icon svg { width: 18px; height: 18px; }
.tab-kopf-titel { font-size: 17px; font-weight: 800; line-height: 1.2; }
.tab-kopf-sub { font-size: 11.5px; color: var(--text-grau); }

.werkzeuge {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 13px 15px;
  display: flex;
  align-items: flex-end;
  gap: 11px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.werkzeuge .feld { margin: 0; }
.werkzeuge .feld label { margin-bottom: 4px; font-size: 10.5px; }
.werkzeuge .eingabe { padding: 8px 11px; font-size: 13px; }
.wz-spalte { width: 195px; }
.wz-wert { width: 215px; }
.wz-top { width: 92px; }
.wz-strecker { flex: 1; }

.tabellen-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  overflow: hidden;
}

.tabellen-rahmen { overflow: auto; max-height: calc(100vh - 330px); min-height: 160px; }

table.daten {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.8px;
}
table.daten th, table.daten td {
  padding: 9px 13px;
  border-bottom: 1px solid #f1f1f4;
  text-align: left;
  white-space: nowrap;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.daten th {
  position: sticky; top: 0;
  background: #fafafb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text-mittel);
  border-bottom: 1px solid var(--rand);
  cursor: pointer;
  user-select: none;
  z-index: 5;
}
table.daten th:hover { background: #f3f3f5; }
table.daten th .sortier { color: var(--rot); margin-left: 4px; font-size: 9px; }
table.daten tbody tr:hover td { background: #fcf8f8; }
table.daten td.leer { color: #c2c2c8; }
table.daten td.zahl { font-variant-numeric: tabular-nums; }
table.daten th.aktionen, table.daten td.aktionen {
  position: sticky; right: 0;
  background: var(--karte);
  border-left: 1px solid #f1f1f4;
  text-align: right;
  width: 86px;
  cursor: default;
  z-index: 4;
}
table.daten th.aktionen { background: #fafafb; z-index: 6; }
table.daten tbody tr:hover td.aktionen { background: #fcf8f8; }

/* Deaktivierte Projekte: ausgegraut */
table.daten tr.zeile-inaktiv td { color: #b4b4bc; }
table.daten tr.zeile-inaktiv td.aktionen { color: inherit; }

.tab-fusszeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 15px;
  border-top: 1px solid var(--rand);
  font-size: 11.8px;
  color: var(--text-grau);
  flex-wrap: wrap;
}

.leer-hinweis { padding: 44px 20px; text-align: center; color: var(--text-grau); font-size: 13px; }
.leer-hinweis .gross { font-size: 15px; font-weight: 700; color: var(--text-mittel); margin-bottom: 5px; }

.laden { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 48px 20px; color: var(--text-grau); font-size: 13px; }
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--rot-hell);
  border-top-color: var(--rot);
  border-radius: 50%;
  animation: drehen .75s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.filter-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--rot-hell);
  border: 1px solid var(--rot-rand);
  color: var(--rot-dunkel);
  font-size: 11.5px; font-weight: 700;
  border-radius: 999px;
  padding: 4px 11px;
}
.filter-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }

/* ---------------- Modale ---------------- */

.modal-hintergrund {
  position: fixed; inset: 0;
  background: rgba(18, 18, 22, .46);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  z-index: 100;
  animation: einblenden .14s ease;
}
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 15, 20, .3);
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: hochkommen .16s ease;
}
@keyframes hochkommen { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.schmal { max-width: 448px; }

.modal-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 20px 14px;
  border-bottom: 1px solid var(--rand);
}
.modal-kopf .modal-titel { font-size: 15.5px; font-weight: 800; }
.modal-kopf .modal-sub { font-size: 11.5px; color: var(--text-grau); margin-top: 2px; }

.modal-koerper { padding: 18px 20px; overflow: auto; }

.formular-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 13px 16px;
}
.formular-raster .feld { margin: 0; }
.formular-raster .feld.voll { grid-column: 1 / -1; }

.modal-fuss {
  display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  padding: 13px 20px 16px;
  border-top: 1px solid var(--rand);
}
.modal-fuss .links { margin-right: auto; font-size: 11.5px; color: var(--text-grau); }

/* ---------------- Toasts ---------------- */

.toasts {
  position: fixed;
  top: 76px; right: 18px;
  display: flex; flex-direction: column; gap: 9px;
  z-index: 200;
  max-width: 360px;
}
.toast {
  background: #fff;
  border: 1px solid var(--rand);
  border-left: 4px solid var(--gruen);
  border-radius: 11px;
  box-shadow: var(--schatten);
  padding: 11px 14px;
  font-size: 12.8px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: toast-rein .18s ease;
  word-break: break-word;
}
.toast.fehler { border-left-color: var(--rot); }
.toast .toast-titel { font-weight: 700; margin-bottom: 1px; }
.toast .toast-text { color: var(--text-mittel); }
@keyframes toast-rein { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- Fußzeile ---------------- */

.fuss {
  background: var(--rot);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 13px 16px;
  flex-shrink: 0;
}

/* ---------------- Modul-Gruppen (Startseite) ---------------- */

.gruppen-raster { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.gruppen-karte .modul-icon { width: 54px; height: 54px; border-radius: 15px; }
.gruppen-karte .modul-icon svg { width: 25px; height: 25px; }
.gruppen-karte .modul-titel { font-size: 18px; }
.gruppen-karte .modul-text { font-size: 12.5px; min-height: 36px; }
.gruppen-karte .modul-vorschau {
  height: auto;
  min-height: 88px;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
}
.gruppen-karte .modul-inhalt {
  font-size: 11px;
  color: var(--text-grau);
  text-align: center;
  line-height: 1.5;
}

/* ---------------- Auswertung (Dashboards) ---------------- */

.aw-werkzeuge .feld { width: 150px; }
.aw-schnell { display: flex; gap: 7px; flex-wrap: wrap; }
.aw-schnell .knopf { padding: 8px 12px; font-size: 12px; }

.aw-tabs {
  display: flex;
  gap: 4px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 5px;
  margin-bottom: 18px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.aw-tab {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mittel);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.aw-tab:hover { background: #f4f4f6; }
.aw-tab.aktiv { background: var(--rot); color: #fff; }

.aw-kpi-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.aw-kpi {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 15px 17px 13px;
  min-width: 0;
}
.aw-kpi-wert {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--rot);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-kpi-label { font-size: 12px; font-weight: 700; color: var(--text-mittel); margin-top: 3px; }
.aw-kpi-sub { font-size: 10.5px; color: var(--text-grau); margin-top: 2px; }

.aw-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.aw-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 16px 18px;
  min-width: 0;
}
.aw-karte.breit { grid-column: 1 / -1; }
.aw-karte-titel {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 13px;
  letter-spacing: .2px;
}
.aw-leer { color: var(--text-grau); font-size: 12.5px; padding: 18px 0; }

/* Säulendiagramm */
.aw-saeulen {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 200px;
  padding-top: 6px;
}
.aw-saeule {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: default;
}
.aw-saeule-stapel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  background: linear-gradient(to top, #f6f6f8, #fbfbfc);
}
.aw-sa { background: var(--rot); border-radius: 3px 3px 0 0; min-height: 0; transition: height .25s ease; }
.aw-sp { background: #1d8a4b; opacity: .85; min-height: 0; }
.aw-saeule:hover .aw-sa { background: var(--rot-dunkel); }
.aw-saeule-label {
  font-size: 9.5px;
  color: var(--text-grau);
  text-align: center;
  margin-top: 4px;
  height: 13px;
  white-space: nowrap;
  overflow: visible;
}
.aw-legende { display: flex; gap: 16px; margin-top: 10px; }
.aw-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-mittel); font-weight: 600; }
.aw-lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Donut */
.aw-donut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.aw-donut svg { width: 158px; height: 158px; flex-shrink: 0; transform: rotate(0deg); }
.aw-donut circle { transition: stroke-width .12s ease; }
.aw-donut circle:hover { stroke-width: 6.4; }
.aw-donut-zahl {
  font-size: 5.4px;
  font-weight: 800;
  fill: var(--text);
  text-anchor: middle;
}
.aw-donut-text {
  font-size: 2.8px;
  font-weight: 700;
  fill: var(--text-grau);
  text-anchor: middle;
  letter-spacing: .1px;
}
.aw-donut-legende { flex: 1; min-width: 175px; display: flex; flex-direction: column; gap: 7px; }
.aw-donut-lg { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.aw-donut-lg i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.aw-donut-lg .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.aw-donut-lg .w { color: var(--text-grau); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Horizontale Balkenliste */
.aw-balken-liste { display: flex; flex-direction: column; gap: 12px; }
.aw-bl { min-width: 0; }
.aw-bl-kopf { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.aw-bl-name { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aw-bl-wert { font-size: 11.5px; color: var(--text-mittel); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aw-bl-track { background: #f1f1f4; border-radius: 99px; height: 9px; overflow: hidden; }
.aw-bl-fuell { height: 100%; border-radius: 99px; transition: width .25s ease; }
.aw-bl-sub { font-size: 10.5px; color: var(--text-grau); margin-top: 3px; }

/* Heatmap */
.aw-hm-rahmen { overflow-x: auto; }
.aw-heatmap { border-collapse: separate; border-spacing: 3px; width: 100%; }
.aw-heatmap th {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-mittel);
  text-align: left;
  padding: 2px 6px 2px 0;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-heatmap thead th, .aw-heatmap tr:first-child th { text-align: center; padding: 0 0 3px; }
.aw-hm-zelle {
  min-width: 34px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mittel);
  background: #f4f4f6;
}
.aw-hm-zelle.hell { color: #fff; }

.aw-detail-wahl { max-width: 360px; margin-bottom: 14px; }

/* ---------------- Zuordnungen ---------------- */

.zu-hinweis { font-size: 12.5px; color: var(--text-mittel); line-height: 1.55; }

.zu-raster {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) { .zu-raster { grid-template-columns: 1fr; } }

.zu-zaehler { font-size: 12px; color: var(--text-grau); margin-top: 2px; }

.zu-liste {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 420px);
  min-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.zu-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--rand);
  border-radius: 9px;
  cursor: pointer;
  transition: background .1s ease, border-color .1s ease;
  font-size: 13px;
}
.zu-zeile:hover { background: #f8f8fa; }
.zu-zeile.aktiv { background: var(--rot-hell); border-color: var(--rot-rand); }
.zu-zeile input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--rot); cursor: pointer; flex-shrink: 0; }
.zu-zeile .zu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.zu-zeile .zu-zusatz { font-size: 10.5px; color: var(--text-grau); white-space: nowrap; }

/* Zuordnungen: Tab "Gesamt" */
.zu-gkopf, .zu-gzeile {
  display: grid;
  grid-template-columns: 1fr 78px 76px 96px;
  gap: 8px;
  align-items: center;
}
.zu-gkopf {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-grau);
  letter-spacing: .2px;
  padding: 0 11px 5px;
  text-align: center;
}
.zu-gkopf span:first-child { text-align: left; }
.zu-gzeile {
  border: 1px solid var(--rand);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 13px;
}
.zu-gzeile.an { background: #f3faf5; border-color: #cdead6; }
.zu-gzeile .zu-gname { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zu-gzeile .zu-mini { display: flex; justify-content: center; }
.zu-gzeile .zu-mini input { width: 16px; height: 16px; accent-color: var(--rot); cursor: pointer; }
.zu-status {
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  padding: 3px 0;
  background: #f1f1f4;
  color: var(--text-grau);
}
.zu-status.gruen { background: #d9f2e1; color: #1d8a4b; }

/* ---------------- Responsiv ---------------- */

@media (max-width: 640px) {
  .inhalt { padding: 18px 14px 34px; }
  .willkommen { padding: 24px 18px; }
  .wz-spalte, .wz-wert { width: 100%; }
  .toasts { left: 14px; right: 14px; max-width: none; }
  .tabellen-rahmen { max-height: calc(100vh - 380px); }
  .aw-werkzeuge .feld { width: calc(50% - 6px); }
  .aw-saeulen { height: 150px; }
  .aw-donut svg { width: 130px; height: 130px; }
}
