/* Häkchen und Radios portalweit im Grün des Portals */
/* Auswahlfelder zeichnen wir selbst. Nativ sind sie nur 13px klein
   und der grüne Punkt geht auf dem grünen Grund einer gewählten
   Option beinahe unter – man sah die Auswahl, aber nicht das
   Häkchen. Jetzt: gleiche Farbwelt, klar erkennbar, Hell und
   Dunkel. Der helle Ring setzt das Feld vom Untergrund ab.        */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex: none;
  display: inline-grid; place-content: center;
  border: 1.5px solid var(--tiara); background: var(--white);
  vertical-align: -3px; cursor: pointer; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: 3px; }
input[type="checkbox"]::before, input[type="radio"]::before { content: ''; display: block; }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  border-color: var(--shadow-green-d); background: var(--shadow-green-d);
  box-shadow: 0 0 0 2px var(--white); }
/* Feste Maße: im zentrierten Grid hätten Prozente keinen Bezug. */
input[type="radio"]:checked::before {
  width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
input[type="checkbox"]:checked::before {
  width: 9px; height: 5px; border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white); transform: rotate(-45deg) translate(1px, -1px); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: default; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: 2px solid var(--shadow-green); outline-offset: 1px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 500;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
  vertical-align: middle;   /* eine Mittellinie mit .btn-icon – sonst steht das × tiefer */
}
.btn-primary { background: var(--monza); color: #fff; }
.btn-primary:hover { background: var(--monza-dark); }
.btn-ghost { background: var(--white); border-color: var(--geyser); color: var(--ink); }
.btn-ghost:hover { background: var(--porcelain); }
.btn-sm { padding: 5px 10px; font-size: var(--fs-xs); }
/* Icon-Aktionen (Löschen, Bearbeiten, Pfeile) mit Rahmen – wie die
   übrigen kleinen Knöpfe. Schließen-Kreuze in Dialogköpfen bleiben
   rahmenlos (Ausnahme darunter).                                   */
.btn-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white);
  color: var(--ink-mute); font-size: 13px; vertical-align: middle; }
.btn-icon:hover { background: var(--porcelain); border-color: var(--tiara); color: var(--ink); }
.modal-head .btn-icon { width: auto; height: auto; padding: 5px 8px; border: 0; background: none; font-size: inherit; }
.modal-head .btn-icon:hover { background: var(--porcelain); }

.nowrap { white-space: nowrap; }

/* Auf breiten Schirmen bleiben reine Lesetexte in Lesebreite,
   Tabellen und Karten dürfen die Fläche nutzen.                    */
.note > div, .empty, .field-hint, .ad-text { max-width: 110ch; }

/* SAP-Infozeile im Prozessdialog + Zuordnungszeile der Matrix */
.np-sapinfo { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-3);
  font-size: var(--fs-xs); color: var(--ink-soft); }
.au-ort th { padding: 4px 2px; }
.au-ort-wahl { max-width: 92px; font-size: 10px; padding: 2px 2px; border: 1px solid var(--geyser);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink-soft); }

/* Durchsuchbare Einfachauswahl (SuchWahl.vue) */
.sw { position: relative; }
.sw-knopf { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  width: 100%; padding: 8px 10px; border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--white); font-size: var(--fs-sm); color: var(--ink); text-align: left; }
.sw-knopf:hover { border-color: var(--tiara); }
.sw-knopf.leer { color: var(--ink-mute); }
.sw-knopf .sw-pfeil { color: var(--ink-mute); font-size: 13px; line-height: 0; flex: none; }
.sw-feld { width: 100%; padding: 8px 10px; border: 1px solid var(--shadow-green-d);
  border-radius: var(--radius-sm); font-size: var(--fs-sm); outline: none; }
/* Position/Breite setzt die Komponente inline (position:fixed) –
   z-index muss über dem Modal (50) liegen.                         */
.sw-liste { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 80;
  max-height: 240px; overflow: auto; padding: var(--space-2);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--white); box-shadow: var(--shadow-2); }
.sw-zeile { display: block; width: 100%; padding: 6px 8px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); color: var(--ink); text-align: left; }
.sw-zeile.marke { background: var(--porcelain); }
.sw-zeile.an { color: var(--shadow-green-d); font-weight: 600; }
.sw-leer { padding: 6px 8px; font-size: var(--fs-xs); color: var(--ink-mute); }

/* Phase ohne Eintrag: sichtbar offen */
.np-phase.offen { border-color: var(--warn); background: var(--warn-bg); }
.np-phase > .cap { display: flex; align-items: center; gap: var(--space-2); }

/* Mehrfachauswahl-Dropdown (MehrfachWahl.vue) */
.mw { position: relative; }
.mw-knopf { display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 7px 10px; border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--white); font-size: var(--fs-sm); color: var(--ink);
  white-space: nowrap; max-width: 220px; overflow: hidden; }
.mw-knopf:hover { border-color: var(--tiara); }
.mw-knopf.aktiv { border-color: var(--shadow-green-d); color: var(--shadow-green-d); font-weight: 600; }
.mw-pfeil { color: var(--ink-mute); font-size: 13px; line-height: 0; }
.mw-liste { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 220px; max-height: 300px; overflow: auto; padding: var(--space-2);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--white); box-shadow: var(--shadow-1); }
.mw-zeile { display: flex; align-items: center; gap: var(--space-2);
  padding: 5px 6px; border-radius: var(--radius-sm); font-size: var(--fs-sm); cursor: pointer; }
.mw-zeile:hover { background: var(--porcelain); }
.mw-zeile input { width: 15px; height: 15px; margin: 0; flex: none; }

/* Bündige Tabellen (Rückmeldungen/Formulare teilen die Spalten) */
.tbl-wrap table.buendig { table-layout: fixed; }
.tbl-wrap table.buendig td { overflow-wrap: anywhere; }

/* Matrix: Titelzelle mit Modus-Badge (Rückmeldung/Formular) */
.mx-zelle { display: flex; align-items: center; gap: 6px; }
.mx-zelle .mx-titel, .mx-zelle .mx-text { flex: 1; min-width: 0; }
.mx-zelle .mx-modus { flex: none; }

/* ---------- Karten ---------- */
.card { background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--geyser); }
.card-head h3 { font-size: var(--fs-md); }
.card-head .spacer { flex: 1; }
.card-body { padding: var(--space-5); }
.card-body.tight { padding: var(--space-3) var(--space-5); }
.grid { display: grid; gap: var(--space-4); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

/* ---------- Kacheln ---------- */
/* Vier Kacheln über zwei Karten: derselbe Abstand wie im Raster
   darunter, damit die Kante der zweiten Kachel genau auf der
   Kartengrenze sitzt (siehe .dash-grid).                          */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.tile { background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md); padding: var(--space-4); text-align: left; transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--shadow-green); box-shadow: var(--shadow-2); }
.tile .num { font-family: var(--font-head); font-size: 1.75rem; line-height: 1; }
.tile .cap { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 6px; }
.tile.accent .num { color: var(--shadow-green-d); }
.tile.late .num { color: var(--late); }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; }
table th {
  text-align: left; font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute); padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--geyser); white-space: nowrap;
}
table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--porcelain); font-size: var(--fs-sm); vertical-align: middle; }
table tbody tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--shadow-green-l); }
td .strong { font-weight: 500; color: var(--ink); }
td .muted { color: var(--ink-mute); font-size: var(--fs-xs); }
.num-cell { text-align: right; white-space: nowrap; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; white-space: nowrap;
  background: var(--porcelain); color: var(--ink-soft);
}
.badge-hr  { background: var(--shadow-green-l); color: var(--shadow-green-d); }
.badge-it  { background: #E7EDF5; color: #3B5A82; }
.badge-fbl { background: #F3EAF6; color: #6E4680; }
.badge-ok   { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-late { background: var(--late-bg); color: var(--late); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Fortschritt ---------- */
.progress { display: flex; align-items: center; gap: var(--space-3); min-width: 150px; }
.progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--geyser); overflow: hidden; }
.progress .bar > span { display: block; height: 100%; background: var(--shadow-green-d); border-radius: 3px; transition: width .3s; }
.progress .val { font-size: var(--fs-xs); color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--geyser); margin-bottom: var(--space-5); }
.tabs button { padding: var(--space-3) var(--space-4); font-size: var(--fs-sm); color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--monza); font-weight: 500; }

/* ---------- Aufgabenliste ---------- */
.phase { margin-bottom: var(--space-5); }
.phase-head { display: flex; align-items: center; gap: var(--space-3); padding: 0 0 var(--space-2); }
.phase-head h4 { font-size: var(--fs-md); }
.phase-head .count { font-size: var(--fs-xs); color: var(--ink-mute); }
.phase-head .line { flex: 1; height: 1px; background: var(--geyser); }

.task {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.task.done { background: #FBFCFC; }
.task.done .t-title { color: var(--ink-mute); text-decoration: line-through; }
.task .chk {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1.5px solid var(--tiara); border-radius: 4px; background: var(--white);
  display: grid; place-items: center; color: transparent; font-size: 11px;
}
.task .chk:hover { border-color: var(--shadow-green-d); }
.task.done .chk { background: var(--shadow-green-d); border-color: var(--shadow-green-d); color: #fff; }
.task .t-main { flex: 1; min-width: 0; }
.task .t-title { font-size: var(--fs-sm); }
.task .t-meta { display: flex; align-items: center; gap: var(--space-3); margin-top: 5px; flex-wrap: wrap; }
.task .t-meta span { font-size: var(--fs-xs); color: var(--ink-mute); }
.task .t-side { display: flex; align-items: center; gap: var(--space-3); flex: none; }

/* ---------- Strukturbaum ---------- */
.tree { font-size: var(--fs-sm); }
.tree .node { display: flex; align-items: center; gap: var(--space-2); padding: 7px var(--space-3); border-radius: var(--radius-sm); }
.tree .node:hover { background: var(--porcelain); }
.tree .node .spacer { flex: 1; }
.tree .group { font-weight: 500; margin-top: var(--space-3); }
.tree .group:first-child { margin-top: 0; }
.tree .children { margin-left: var(--space-4); padding-left: var(--space-3); border-left: 1px solid var(--geyser); }
.tree .person { color: var(--ink-soft); }

/* ---------- Berechtigungsmatrix ---------- */
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix input { width: 16px; height: 16px; accent-color: var(--shadow-green-d); }

/* ---------- Formulare ---------- */
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--white); font-size: var(--fs-sm);
}
.field input:focus, .field select:focus { outline: 2px solid var(--shadow-green); outline-offset: -1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.field-hint { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--porcelain); border: 1px solid var(--geyser); font-size: var(--fs-xs); }
.chip button { color: var(--ink-mute); font-size: 13px; line-height: 1; }

/* ---------- Bausteine der Administration ----------
   Jede Verwaltungsseite folgt demselben Aufbau: Kopf mit Titel,
   Hilfeknopf und höchstens einer Hauptaktion; darunter optional
   Reiter und eine Werkzeugzeile; dann Karten oder eine Tabelle.
   Die Klassen hier gelten für alle Seiten – Ausnahmen in einzelnen
   Views sind Absicht, keine Kopie.                                */
.karte-kopf { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.karte-kopf h3 { font-size: var(--fs-md); }
.karte-text { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--space-3); line-height: 1.55; }
.karte-text.leise { color: var(--ink-mute); font-size: var(--fs-xs); }
/* Werkzeugzeile: Aktionen, die zum Inhalt gehören, nicht zum Kopf */
.werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3); }
.werkzeuge .spacer { flex: 1; }
/* Beschriftete Werte in Karten (letzter Lauf, Größe, Stand …) */
.stand-liste { font-size: var(--fs-sm); color: var(--ink-soft); display: grid; gap: 2px;
  margin-bottom: var(--space-3); }
.stand-liste .leise { font-size: var(--fs-xs); color: var(--ink-mute); }
/* Statuszeile statt Hinweiskasten: Punkt plus Text */
.status-zeile { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm);
  color: var(--ink-soft); margin-bottom: var(--space-4); }
.status-zeile .ampel { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.status-zeile.warn .ampel { background: var(--warn); }
.status-zeile.warn { color: #6B4400; }
/* Zahlenfeld in Formularzeilen (Monate, Stunden …) */
.num-feld { width: 90px; }
/* Aktionsspalte in Verwaltungstabellen */
th.akt-spalte { width: 150px; }
td.akt-spalte { white-space: nowrap; }

/* Deadline-Baukasten */
.deadline-builder { display: grid; grid-template-columns: 70px 1fr 1fr 1.4fr; gap: var(--space-2); }
.deadline-preview { margin-top: var(--space-3); padding: var(--space-3); background: var(--shadow-green-l); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.deadline-preview strong { font-weight: 600; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(30,42,46,.45); display: grid; place-items: center; padding: var(--space-4); }
/* Kopf und Fuss stehen, nur der Rumpf scrollt – sonst wandert der
   Hauptknopf bei niedrigen Fenstern aus dem Bild.                  */
.modal { width: min(680px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  overflow: hidden; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); }
.modal > .modal-head { flex: none; }
.modal > .modal-body { flex: 1; min-height: 0; overflow-y: auto; }
.modal > .modal-foot { flex: none; }
.modal-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--geyser); position: sticky; top: 0; background: var(--white); }
.modal-head h3 { font-size: var(--fs-lg); flex: 1; }
.modal-body { padding: var(--space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--geyser); background: var(--porcelain); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: var(--space-5); left: 50%; transform: translate(-50%, 20px); z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm); font-size: var(--fs-sm);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Diverses ---------- */
.empty { padding: var(--space-6); text-align: center; color: var(--ink-mute); font-size: var(--fs-sm); }
/* In einer Tabelle sitzt der Leerzustand MITTIG über der ganzen
   Breite – die Lesebreite (110ch) würde ihn nach links ziehen.    */
td > .empty, th > .empty { max-width: none; margin-inline: auto; }

/* Ein Knopf, der bewusst nicht wirkt: sichtbar, aber zurückgenommen.
   Der Klick erklärt im Toast, was noch am Datensatz hängt.         */
.btn-icon.gesperrt { color: var(--tiara); cursor: not-allowed; }

/* Aufgeklappte Zeile in der Formularliste: wo wird der Bogen
   verlangt? Jede Fundstelle springt in die Vorlage.                */
tr.fm-wo > td { background: var(--porcelain); }
.fm-wo-liste { list-style: none; margin: var(--space-2) 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px; }
.fm-wo-liste li { display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-sm); }

/* Hinweis im Dialog: der Eintrag gehört zu genau einem Standort.
   Keine Frage, sondern eine Feststellung – deshalb farbig statt
   als Eingabefeld.                                                */
.nur-standort { display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-4); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--shadow-green);
  background: var(--shadow-green-l); color: var(--ink); font-size: var(--fs-sm); }
.empty strong { display: block; color: var(--ink-soft); font-weight: 500; margin-bottom: 4px; }
.note { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--warn-bg); border-left: 3px solid var(--warn); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: #6B4400; margin-bottom: var(--space-5); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-4); font-size: var(--fs-sm); }
.kv dt { color: var(--ink-mute); font-size: var(--fs-xs); }
.dummy-flag { font-size: var(--fs-xs); color: var(--ink-mute); font-style: italic; }

/* ---------- Berechtigungen: Aufgabenempfänger & Mitglieder ---------- */
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4);
  background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); margin-bottom: var(--space-5); }
.legend .item { display: flex; gap: var(--space-3); align-items: flex-start; }
.legend .item .txt { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.5; }
.legend .item .txt b { display: block; color: var(--ink); font-size: var(--fs-sm); font-weight: 500; margin-bottom: 2px; }

.unit { background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md);
  box-shadow: var(--shadow-1); margin-bottom: var(--space-4); overflow: hidden; }
.unit-head { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); border-left: 4px solid var(--shadow-green-d); }
.unit.it  .unit-head { border-left-color: #3B5A82; }
.unit.fbl .unit-head { border-left-color: #6E4680; }
.unit.admin .unit-head { border-left-color: #8A6A17; }
.unit-ico { flex: none; width: 34px; height: 34px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--shadow-green-l); color: var(--shadow-green-d); font-size: 15px; }
.unit.it  .unit-ico { background: #E7EDF5; color: #3B5A82; }
.unit.fbl .unit-ico { background: #F3EAF6; color: #6E4680; }
.unit.admin .unit-ico { background: #F6EFDC; color: #8A6A17; }
.unit-title { font-family: var(--font-head); font-size: var(--fs-md); }
.unit-sub { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 1px; }
.unit-head .spacer { flex: 1; }
.cnt { font-size: var(--fs-xs); color: var(--ink-soft); background: var(--porcelain); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

.members { padding: var(--space-3) var(--space-5) var(--space-4) 63px;
  background: #FBFCFC; border-top: 1px dashed var(--geyser); }
.members .cap { font-size: var(--fs-xs); color: var(--ink-mute); margin-bottom: var(--space-2); }
.member { display: flex; align-items: center; gap: var(--space-3); padding: 7px 0;
  font-size: var(--fs-sm); color: var(--ink-soft); border-bottom: 1px solid var(--porcelain); }
.member:last-child { border-bottom: 0; }
.member .spacer { flex: 1; }
.member .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--porcelain);
  display: grid; place-items: center; font-size: var(--fs-xs); color: var(--ink-mute); }
.self-note { padding: var(--space-3) var(--space-5) var(--space-3) 63px; background: #FBFCFC;
  border-top: 1px dashed var(--geyser); font-size: var(--fs-xs); color: var(--ink-mute); }
.badge-target { background: var(--ink); color: #fff; }
.badge-admin  { background: #F6EFDC; color: #8A6A17; }
.task .t-desc { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 4px; line-height: 1.5; max-width: 70ch; }
.task.done .t-desc { color: var(--ink-mute); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.field textarea.autogrow { min-height: 38px; resize: none; overflow: hidden; }


/* ---------- Transfer-Liste (Aufgaben je Phase) ---------- */
.tcap { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.tlist { border: 1px solid var(--geyser); border-radius: var(--radius-sm); max-height: 300px; overflow-y: auto; background: var(--white); }
.titem { display: flex; align-items: center; gap: var(--space-2); padding: 8px var(--space-3);
  border-bottom: 1px solid var(--porcelain); font-size: var(--fs-sm); }
.titem:last-child { border-bottom: 0; }
.titem:hover { background: var(--porcelain); }
.titem .muted { color: var(--ink-mute); font-size: var(--fs-xs); }

/* ---------- SAP-Ermittlung ---------- */
.sap-note { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
  background: var(--ok-bg); border-left: 3px solid var(--ok); border-radius: var(--radius-sm);
  font-size: var(--fs-xs); color: #1F5A42; }
.sap-note.manual { background: var(--warn-bg); border-left-color: var(--warn); color: #6B4400; }
.note.ok { background: var(--ok-bg); border-left-color: var(--ok); color: #1F5A42; }
/* Deutliche Warnung (z. B. Personalnummer nicht im SAP gefunden) */
.note.warn { background: var(--late-bg); border-left-color: var(--late); color: var(--late); }
fieldset:disabled input, fieldset:disabled select { background: var(--porcelain); color: var(--ink-mute); cursor: not-allowed; }
fieldset:disabled label { color: var(--ink-mute); }

/* ---------- Filterleiste (Aufgaben) ---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  padding: var(--space-3); margin-bottom: var(--space-4);
  background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.filterbar .search { position: relative; flex: 1 1 260px; min-width: 220px; display: flex; align-items: center; }
.filterbar .search .ico { position: absolute; left: 10px; font-size: 13px; color: var(--ink-mute); pointer-events: none; }
.filterbar .search input { width: 100%; padding: 7px 10px 7px 30px; font: inherit; font-size: var(--fs-sm);
  color: var(--ink); background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-sm); }
.filterbar .search input::placeholder { color: var(--ink-mute); }
.filterbar .search input::-webkit-search-cancel-button { cursor: pointer; }
.filterbar select { padding: 7px 10px; font: inherit; font-size: var(--fs-sm); color: var(--ink);
  background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-sm); max-width: 210px; }
.filterbar input:focus, .filterbar select:focus { outline: 2px solid var(--shadow-green); outline-offset: -1px; }
.filterbar .btn { flex: none; }

.tabs .tab-info { font-size: var(--fs-xs); color: var(--ink-mute); padding: var(--space-3) 0; white-space: nowrap; }

table th.sortable { cursor: pointer; user-select: none; }
table th.sortable:hover { color: var(--ink); }
table th.sortable .arrow { margin-left: 5px; font-size: 9px; color: var(--tiara); }
table th.sortable:hover .arrow { color: var(--ink-soft); }
table th.sortable.sorted { color: var(--ink); }
table th.sortable.sorted .arrow { color: var(--monza); }

/* ---------- Breites Modal: Prozessvorlage ---------- */
.modal.wide { width: min(1280px, 100%); }
.modal-foot .foot-note { flex: 1; text-align: left; font-size: var(--fs-xs); color: var(--ink-soft); }

.pv-grid { display: grid; grid-template-columns: 268px 1fr; gap: var(--space-4); align-items: start; }
.pv-grid > section { display: grid; gap: var(--space-4); min-width: 0; }

/* Phasen-Navigation */
.pv-phase { border: 1px solid var(--geyser); border-left: 3px solid var(--geyser); border-radius: var(--radius-sm);
  padding: 8px var(--space-3); margin-bottom: 6px; cursor: pointer; background: var(--white); transition: border-color .15s, background .15s; }
.pv-phase:hover { background: var(--porcelain); }
.pv-phase.active { border-left-color: var(--monza); background: var(--porcelain); }
.pv-phase .row { display: flex; align-items: center; gap: 6px; }
.pv-phase .row .spacer { flex: 1; }
.pv-phase .nm { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.pv-phase .mt { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; line-height: 1.45; }
.pv-phase .flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.pv-phase .flags:empty { display: none; }

/* Karten im rechten Bereich */
.pv-card { border: 1px solid var(--geyser); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.pv-card-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--porcelain); border-bottom: 1px solid var(--geyser); }
.pv-card-head h4 { font-size: var(--fs-sm); font-weight: 500; }
.pv-card-head .spacer { flex: 1; }
.pv-card-head .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.pv-card-body { padding: var(--space-4); }
.pv-card-body .field:last-child, .pv-card-body .field-row:last-child { margin-bottom: 0; }
.pv-card-foot { display: flex; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--geyser); background: var(--porcelain); }

/* Phasenfenster: Zahl, Einheit, feststehender Bezug */
.pv-offset { display: flex; align-items: center; gap: var(--space-2); }
.pv-offset input { width: 72px; }
.pv-offset select { width: auto; }
.pv-offset input, .pv-offset select { padding: 7px 10px; font: inherit; font-size: var(--fs-sm); color: var(--ink);
  background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-sm); }
.pv-offset input:focus, .pv-offset select:focus { outline: 2px solid var(--shadow-green); outline-offset: -1px; }
.pv-offset span { font-size: var(--fs-sm); color: var(--ink-soft); white-space: nowrap; }

/* Tabs über der rechten Spalte */
.pv-tabs { margin-bottom: 0; border-bottom: 0; }
.pv-tabs button { padding: var(--space-2) var(--space-4); }

/* Aufgabenliste der Phase */
.pv-tasks { max-height: 420px; overflow-y: auto; }
.pv-task { border-bottom: 1px solid var(--porcelain); }
.pv-task:last-child { border-bottom: 0; }
.pv-task > .row { display: flex; align-items: center; gap: var(--space-2); padding: 9px var(--space-4); }
.pv-task:hover > .row { background: var(--porcelain); }
.pv-task.broken { border-left: 3px solid var(--warn); }
.pv-task.open > .row { background: var(--porcelain); }
.pv-task .main { flex: 1; min-width: 0; }
.pv-task .tt { font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.pv-task .muted { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; }
.pv-task .desc { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 4px; line-height: 1.5; max-width: 80ch; }

/* Formular für Ausprägung / eigene Aufgabe */
.pv-form { border-top: 1px solid var(--geyser); background: #FBFCFC; padding: var(--space-4); }
.pv-form-head { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: var(--space-3); }
.pv-form-foot { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
.pv-form-foot .spacer { flex: 1; }

/* Pool-Auswahl innerhalb der Phase */
.pv-pool { border-top: 1px solid var(--geyser); }
.pv-pool .search { position: relative; display: flex; align-items: center; }
.pv-pool .search .ico { position: absolute; left: 10px; font-size: 13px; color: var(--ink-mute); pointer-events: none; }
.pv-pool .search input { width: 100%; padding: 6px 10px 6px 28px; font: inherit; font-size: var(--fs-sm);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white); }
.pv-pool .tlist { border: 0; border-radius: 0; max-height: 260px; }

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

/* Trefferzeile über der Prozessliste */
.list-info { font-size: var(--fs-xs); color: var(--ink-mute); margin-bottom: var(--space-2); }

/* ---------- Texte in mehreren Sprachen ---------- */
.ml-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--geyser); }
.ml-head .cap { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .05em; }
.ml-head .spacer { flex: 1; }
.ml-head .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.mlang { display: flex; gap: 2px; background: var(--porcelain); border: 1px solid var(--geyser);
  border-radius: var(--radius-sm); padding: 2px; }
.mlang button { padding: 3px 9px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-mute);
  border-radius: 3px; }
.mlang button:hover { color: var(--ink); }
.mlang button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- Hilfe ---------- */
.btn-hilfe { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid var(--tiara);
  color: var(--ink-mute); background: var(--white); font-size: 12px; font-weight: 600; line-height: 1;
  display: inline-grid; place-items: center; vertical-align: middle; margin-left: 6px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; }
.btn-hilfe:hover { border-color: var(--shadow-green-d); color: var(--shadow-green-d); background: var(--shadow-green-l); }
.modal-head .btn-hilfe { margin-left: 0; }
.help-intro { font-size: var(--fs-sm); color: var(--ink); line-height: 1.6; margin-bottom: var(--space-4); }
.help-list { list-style: none; display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.help-list li { position: relative; padding-left: var(--space-5); font-size: var(--fs-sm);
  color: var(--ink-soft); line-height: 1.6; }
.help-list li::before { content: ''; position: absolute; left: var(--space-3); top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--monza); }
.help-list li strong { color: var(--ink); font-weight: 500; }
.help-back { z-index: 60; }

/* ---------- Startseite: Mein Überblick ---------- */
button.tile { cursor: pointer; text-align: left; width: 100%; }
button.tile:hover { border-color: var(--shadow-green); box-shadow: var(--shadow-2); }

/* Gleich breite Spalten und derselbe Abstand wie bei .tiles – so
   fluchtet die Kartengrenze mit der Kante der zweiten Kachel.      */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.dash-grid > section { display: grid; gap: var(--space-4); min-width: 0; }
.dash-card { background: var(--white); border: 1px solid var(--geyser); border-radius: var(--radius-md);
  box-shadow: var(--shadow-1); overflow: hidden; }
.dash-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--geyser); }
.dash-head h3 { font-size: var(--fs-sm); font-weight: 500; }
.dash-head .spacer { flex: 1; }
.dash-head .muted { font-size: var(--fs-xs); color: var(--ink-mute); }

/* Als Nächstes */
.dash-task { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-4);
  border-bottom: 1px solid var(--porcelain); }
.dash-task:last-child { border-bottom: 0; }
.dash-task:hover { background: var(--porcelain); }
.dash-task.late { border-left: 3px solid var(--late); }
.dash-task .chk { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--tiara); border-radius: 4px;
  display: grid; place-items: center; font-size: 11px; color: transparent; background: var(--white); }
.dash-task .chk:hover { border-color: var(--shadow-green-d); color: var(--shadow-green-d); }
.dash-task .main { flex: 1; min-width: 0; }
.dash-task .tt { font-size: var(--fs-sm); }
.dash-task .muted { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; }
.dash-task .when { text-align: right; flex: none; }
.dash-task .rel { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.dash-task .rel.bad { color: var(--late); }

/* 14-Tage-Leiste */
.dash-bars { display: flex; align-items: flex-end; gap: 4px; padding: var(--space-4); height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.bar-col .bar-wrap { flex: 1; display: flex; align-items: flex-end; }
.bar-col .bar { width: 100%; min-height: 2px; background: var(--shadow-green-d); border-radius: 3px 3px 0 0;
  transition: height .3s; }
.bar-col.we .bar { background: var(--geyser); }
.bar-col.today .bar { background: var(--monza); }
.bar-col .bar-n { font-size: var(--fs-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; min-height: 14px; }
.bar-col .bar-d { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.bar-col.we .bar-d { color: var(--tiara); }
.bar-col.today .bar-d { color: var(--monza); font-weight: 600; }

/* Prozesskarten */
.dash-proc { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--porcelain); cursor: pointer; }
.dash-proc:last-child { border-bottom: 0; }
.dash-proc:hover { background: var(--porcelain); }
.dash-proc.late { border-left: 3px solid var(--late); }
.dash-proc .row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 3px; }
.dash-proc .row .spacer { flex: 1; }
.dash-proc .nm { font-size: var(--fs-sm); font-weight: 500; }
.dash-proc .muted { font-size: var(--fs-xs); color: var(--ink-mute); line-height: 1.5; }
.dash-proc .progress { margin: 5px 0; }

/* Braucht Aufmerksamkeit */
.dash-notes { display: grid; }
.dash-note { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--porcelain); font-size: var(--fs-sm); }
.dash-note:last-child { border-bottom: 0; }
.dash-note .badge { flex: none; }
.dash-note .muted { color: var(--ink-mute); font-size: var(--fs-xs); }

/* Empfänger (Admin) */
.dash-rec { display: flex; align-items: center; gap: var(--space-2); padding: 9px var(--space-4);
  border-bottom: 1px solid var(--porcelain); cursor: pointer; font-size: var(--fs-sm); }
.dash-rec:last-child { border-bottom: 0; }
.dash-rec:hover { background: var(--porcelain); }
.dash-rec .spacer { flex: 1; }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
/* Umbruch der Kacheln festlegen, statt auto-fit 3+1 zu überlassen –
   so füllt jede Reihe die Breite und die Kanten bleiben bündig.    */
@media (max-width: 1100px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.bar-col.late .bar { background: var(--late); }
.bar-col.late .bar-d { color: var(--late); }
.bar-sep { width: 1px; align-self: stretch; background: var(--geyser); margin: 0 4px 18px; flex: none; }

/* ---------- Größeres Vorlagen-Modal, Modus-Umschalter ---------- */
.modal.wide { width: min(1600px, 100%); }
.segmented { display: flex; gap: 2px; background: var(--porcelain); border: 1px solid var(--geyser);
  border-radius: var(--radius-sm); padding: 2px; flex: none; }
.segmented button { padding: 4px 12px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-mute);
  border-radius: 3px; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }
.ml-inline { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs);
  color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }
.deadline-builder.aus { opacity: .5; }
.pv-newcat { border: 1px solid var(--geyser); border-left: 3px solid var(--monza); border-radius: var(--radius-sm);
  padding: var(--space-4); margin-bottom: var(--space-4); background: var(--porcelain); }
.pv-newcat .cap { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); margin-bottom: var(--space-3); }
.pv-newcat input { width: 100%; padding: 7px 10px; font: inherit; font-size: var(--fs-sm);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white); }
.pv-newcat label { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- Zeitansicht ---------- */
.zl-wrap { min-width: 0; }
.zl-kopf { display: flex; align-items: flex-end; gap: var(--space-5); padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--geyser); margin-bottom: var(--space-4); flex-wrap: wrap; }
.zl-kopf .spacer { flex: 1; }
.zl-kopf .cap { font-size: var(--fs-xs); color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }
.zl-kopf .wert { font-family: var(--font-head); font-size: var(--fs-md); margin-top: 2px; }
.zl-legende { display: flex; gap: var(--space-4); font-size: var(--fs-xs); color: var(--ink-soft); }
.zl-legende span { display: inline-flex; align-items: center; gap: 6px; }
.zl-legende i { display: inline-block; }
.zl-legende i.bar { width: 18px; height: 8px; border-radius: 2px; background: var(--shadow-green); }
.zl-legende i.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--shadow-green-d); }
.zl-legende i.chip { width: 14px; height: 14px; border-radius: 3px; background: var(--warn); }

.zl-hint { font-size: var(--fs-xs); color: var(--ink-mute); margin-bottom: var(--space-3); }
.zl-achse { position: relative; height: 20px; margin-left: 200px; margin-right: 130px;
  border-bottom: 1px solid var(--geyser); }
.zl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--geyser); }
.zl-tick span { position: absolute; top: 1px; left: 4px; font-size: var(--fs-xs); color: var(--ink-mute);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.zl-tick.null { border-left-style: solid; border-left-color: var(--tiara); }
.zl-marke { position: absolute; top: -20px; bottom: 0; border-left: 2px solid var(--monza); z-index: 2; }
.zl-marke span { position: absolute; top: 0; left: 5px; font-size: var(--fs-xs); color: var(--monza);
  font-weight: 500; white-space: nowrap; background: var(--white); padding: 0 3px; }
/* Marke am rechten Rand: Beschriftung nach innen, sonst ragt sie heraus */
.zl-marke.links span { left: auto; right: 5px; text-align: right; }
.zl-marke.heute { border-left-color: var(--ink); }
.zl-marke.heute span { color: var(--ink); }

.zl-tracks { position: relative; }
.zl-zeile { display: grid; grid-template-columns: 200px 1fr 130px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--porcelain); cursor: pointer; }
.zl-zeile:hover { background: var(--porcelain); }
.zl-zeile.offen { background: var(--porcelain); border-bottom-color: transparent; }
.zl-name { padding-right: var(--space-3); min-width: 0; }
.zl-name .nm { font-size: var(--fs-sm); font-weight: 500; }
.zl-name .pfeil { color: var(--ink-mute); font-size: 10px; }
.zl-name .muted { font-size: var(--fs-xs); color: var(--ink-mute); font-variant-numeric: tabular-nums;
  padding-left: 14px; }
.zl-track { position: relative; height: 30px; background: linear-gradient(var(--porcelain), var(--porcelain))
  center/100% 2px no-repeat; }
.zl-bar { position: absolute; top: 9px; height: 12px; border-radius: 6px; background: var(--shadow-green);
  min-width: 3px; }
.zl-punkt { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--shadow-green-d); border: 2px solid var(--white); display: grid; place-items: center; z-index: 3; }
.zl-punkt.late { background: var(--late); }
.zl-punkt .n { font-size: 9px; font-weight: 700; color: #fff; }
.zl-phasenchip { position: absolute; top: 7px; width: 16px; height: 16px; margin-left: -8px; border-radius: 3px;
  background: var(--warn); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; z-index: 4; }
.zl-zahl { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.zl-zahl .badge { white-space: nowrap; }

/* Aufgaben der angeklickten Phase */
.zl-detail { padding: var(--space-3) var(--space-4) var(--space-4) 200px; background: var(--porcelain);
  border-bottom: 1px solid var(--geyser); display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-4) var(--space-5); }
.zl-gruppe .cap { font-size: var(--fs-xs); color: var(--ink-mute); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .04em; }
.zl-item { display: flex; align-items: center; gap: var(--space-2); padding: 5px 0; font-size: var(--fs-sm);
  border-bottom: 1px solid var(--geyser); }
.zl-item:last-child { border-bottom: 0; }
/* Kugel und Liste zeigen aufeinander: was oben überfahren wird,
   leuchtet unten auf – und umgekehrt.                             */
.zl-punkt.hervor { transform: scale(1.45); box-shadow: 0 0 0 3px var(--shadow-green-l); cursor: pointer; }
.zl-phasenchip.hervor { transform: scale(1.35); box-shadow: 0 0 0 3px var(--warn-bg); cursor: pointer; }
.zl-item.hervor { background: var(--shadow-green-l); box-shadow: inset 3px 0 0 var(--shadow-green-d);
  padding-left: 8px; margin-left: -8px; border-radius: 2px; }
.zl-item.hervor .d { color: var(--ink); }
.zl-item { transition: background .12s; }
.zl-punkt, .zl-phasenchip { transition: transform .12s, box-shadow .12s; }
.zl-item .tt { flex: 1; min-width: 0; }
.zl-item .d { flex: none; font-size: var(--fs-xs); color: var(--ink-mute); font-variant-numeric: tabular-nums;
  min-width: 88px; }

@media (max-width: 900px) {
  .zl-achse { margin-left: 0; margin-right: 0; }
  .zl-zeile { grid-template-columns: 1fr; }
  .zl-zahl { align-items: flex-start; flex-direction: row; }
  .zl-detail { padding-left: var(--space-4); }
}

/* ---------- Ziele einer Aufgabe ---------- */
.ziele { display: grid; gap: 2px; margin: 6px 0 2px; }
.ziel { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-sm);
  color: var(--ink-soft); padding: 3px 0; cursor: pointer; }
.ziel:hover { color: var(--ink); }
.ziel input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--shadow-green-d); flex: none; }
.ziel.done span { text-decoration: line-through; color: var(--ink-mute); }
.task .t-title { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* Tabelle der Unteraufgaben */
.ziel-tabelle { border: 1px solid var(--geyser); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.ziel-tabelle table { width: 100%; table-layout: fixed; }
.ziel-tabelle th { padding: var(--space-2) var(--space-3); font-size: var(--fs-xs); vertical-align: middle; }
.ziel-tabelle td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--porcelain);
  vertical-align: middle; }
.ziel-tabelle tr:last-child td { border-bottom: 0; }
.ziel-tabelle td.mid, .ziel-tabelle th.mid { text-align: center; }
.ziel-tabelle input { width: 100%; padding: 6px 9px; font: inherit; font-size: var(--fs-sm);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white); }
.ziel-tabelle input:focus { outline: 2px solid var(--shadow-green); outline-offset: -1px; }
.ziel-fuss { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); flex-wrap: wrap; }
.ziel-fuss .field-hint { margin: 0; }
.form-tabs { margin-bottom: var(--space-4); }

/* ---------- Vorschau vor dem Anlegen ---------- */
.vs-kopf { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4);
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--geyser); margin-bottom: var(--space-4); }
.vs-kopf .cap { font-size: var(--fs-xs); color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }
.vs-kopf .wert { font-family: var(--font-head); font-size: var(--fs-md); margin-top: 2px; }
/* Vorschau: je Phase eine Spalte fester Breite – die Leiste rollt
   waagerecht, lange Phasen rollen in der Spalte senkrecht.         */
.vs-liste { display: flex; gap: var(--space-4); overflow-x: auto;
  padding-bottom: var(--space-2); align-items: flex-start; }
.vs-phase { flex: 0 0 380px; min-width: 0; display: flex; flex-direction: column;
  max-height: 56vh; padding: var(--space-3);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white); }
.vs-phase .vs-tasks { overflow-y: auto; min-height: 0; }
.vs-phase-head { display: flex; align-items: baseline; gap: var(--space-2); padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--geyser); margin-bottom: var(--space-2); }
.vs-phase-head .spacer { flex: 1; }
.vs-phase-head .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.vs-task { padding: 6px 0; border-bottom: 1px solid var(--porcelain); }
.vs-task:last-child { border-bottom: 0; }
.vs-task .row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); }
.vs-task .row .tt { min-width: 0; }
.vs-task .row .spacer { flex: 1; }
.vs-task .row .muted { font-size: var(--fs-xs); color: var(--ink-mute); white-space: nowrap; }
.vs-ziele { list-style: none; margin: 3px 0 0 var(--space-3); display: grid; gap: 1px; }
.vs-ziele li { position: relative; padding-left: var(--space-4); font-size: var(--fs-xs); color: var(--ink-soft); }
.vs-ziele li::before { content: '\2713'; position: absolute; left: 2px; color: var(--shadow-green-d); }
.vs-ziele li.weg { color: var(--ink-mute); font-style: italic; }
.vs-ziele li.weg::before { content: '\2013'; color: var(--tiara); }
.zl-punkt.fertig { background: var(--white); border-color: var(--shadow-green-d); }
.zl-item.erledigt .tt { color: var(--ink-mute); text-decoration: line-through; }

/* ---------- Zeitleiste „Terminierung“ (ZeitSkala.vue) ---------- */
.zs { margin-top: var(--space-3); user-select: none; }
.zs-spur { position: relative; height: 44px; border: 1px solid var(--geyser);
  border-radius: var(--radius-sm); background: var(--porcelain); overflow: hidden; }
.zs-proz { position: absolute; top: 0; bottom: 0; background: var(--white);
  border-left: 1px solid var(--geyser); border-right: 1px solid var(--geyser); }
.zs-phase { position: absolute; top: 8px; bottom: 8px; border-radius: 3px;
  background: var(--tiara); opacity: .35; overflow: hidden; }
.zs-phase span { font-size: 10px; color: var(--ink-soft); padding: 2px 4px;
  display: block; white-space: nowrap; }
.zs-phase.aktiv { opacity: .9; background: var(--shadow-green); }
.zs-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--geyser); }
.zs-null { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--monza); z-index: 2; }
.zs-null span { position: absolute; top: 1px; left: 4px; font-size: 9px; color: var(--monza);
  text-transform: uppercase; letter-spacing: .04em; }
.zs-band { position: absolute; top: 6px; bottom: 6px; border-radius: 4px; z-index: 3;
  background: var(--shadow-green); opacity: .85; cursor: grab; touch-action: none; }
.zs-band:active { cursor: grabbing; }
.zs-griff { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize;
  touch-action: none; }
.zs-griff.links { left: -2px; border-left: 3px solid var(--shadow-green-d); border-radius: 4px 0 0 4px; }
.zs-griff.rechts { right: -2px; border-right: 3px solid var(--shadow-green-d); border-radius: 0 4px 4px 0; }
.zs-marker { position: absolute; top: 2px; bottom: 2px; width: 12px; margin-left: -6px;
  z-index: 4; cursor: ew-resize; touch-action: none; }
.zs-marker::after { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 4px;
  border-radius: 2px; background: var(--monza-dark); }
.zs-achse { position: relative; height: 16px; font-size: 10px; color: var(--ink-mute); }
.zs-achse span { position: absolute; transform: translateX(-50%); }
.zs-achse span.null { color: var(--monza); font-weight: 600; }
.zs-legende { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; }

/* Auf-/Zuklapper für den Terminierungs-Bereich: sichtbar als
   klickbares, aufklappbares Element gestaltet                      */
.zs-toggle { display: flex; align-items: center; gap: var(--space-2); width: 100%;
  padding: 8px 12px; margin: var(--space-2) 0;
  border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  background: var(--porcelain); font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s; }
.zs-toggle:hover { background: var(--white); border-color: var(--tiara); }
.zs-toggle .pfeil { color: var(--shadow-green-d); font-size: 12px; width: 14px; flex: none; }
.zs-toggle .muted { font-weight: 400; }
.zs-toggle::after { content: '\2304'; margin-left: auto; color: var(--ink-mute);
  font-size: 14px; line-height: 0; }
.zs-klapp { margin-top: var(--space-3); }

/* ---------- Editorseiten (Vorlage, Pool-Aufgabe) ---------- */
.edit-page { padding-bottom: var(--space-6); }
.edit-page .pv-tasks { max-height: none; }
.edit-page .pv-grid { grid-template-columns: 300px 1fr; }
.edit-schmal { max-width: none; }     /* Editor-Reiter nutzen die volle Breite */
.page-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center;
  gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--white);
  border: 1px solid var(--geyser); border-radius: var(--radius-md);
  box-shadow: 0 -2px 10px rgba(30,42,46,.08); }
.page-actions .foot-note { flex: 1; font-size: var(--fs-xs); color: var(--ink-soft); }
.page-head .ml-inline { flex: none; }
.page-head .segmented { flex: none; }

/* ---------- Gruppen als Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; row-gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px;
  background: var(--porcelain); border: 1px solid var(--geyser); font-size: var(--fs-xs); color: var(--ink); }
.tag.alle { background: var(--shadow-green-l); border-color: var(--shadow-green); color: var(--shadow-green-d); }
.tag button { color: var(--ink-mute); font-size: 13px; line-height: 1; }
.tag button:hover { color: var(--late); }
.tag-add { width: auto; max-width: 150px; padding: 3px 6px; font-size: var(--fs-xs);
  border: 1px dashed var(--tiara); border-radius: 999px; background: var(--white); color: var(--ink-mute); }
.tag-add:hover { border-color: var(--shadow-green-d); color: var(--ink); }
.gr-abgeleitet { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.gr-abgeleitet .muted { font-size: var(--fs-xs); color: var(--ink-mute); }

/* ---------- Phasenliste der Vorlagenseite ---------- */
.ph-liste { display: grid; gap: var(--space-2); }
.ph-karte { border: 1px solid var(--geyser); border-radius: var(--radius-md); background: var(--white);
  overflow: hidden; }
.ph-karte.offen { border-color: var(--shadow-green); box-shadow: var(--shadow-1); }
.ph-kopf { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4);
  cursor: pointer; }
.ph-kopf:hover { background: var(--porcelain); }
.ph-karte.offen .ph-kopf { background: var(--porcelain); border-bottom: 1px solid var(--geyser); }
.ph-kopf .pfeil { color: var(--ink-mute); font-size: 10px; flex: none; }
.ph-kopf .nm { font-size: var(--fs-md); font-family: var(--font-head); }
.ph-kopf .nm .muted { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--ink-mute);
  margin-left: var(--space-2); }
.ph-kopf .spacer { flex: 1; }
.ph-kopf > .muted { font-size: var(--fs-xs); color: var(--ink-mute); white-space: nowrap; }
.ph-body { padding: var(--space-4); }
.ph-body .pv-card { border: 0; }
.ph-body .pv-card-body { padding: 0; }
.kv-karte { margin-top: var(--space-4); padding: var(--space-4); border: 1px solid var(--geyser);
  border-radius: var(--radius-md); background: var(--white); }

/* ---------- Matrix der Phasenaufgaben ---------- */
.pa-hinweis { font-size: var(--fs-xs); color: var(--ink-mute); margin-bottom: var(--space-3); }
.pa-wrap { border: 1px solid var(--geyser); border-radius: var(--radius-sm); }
.pa-tabelle { width: 100%; }
.pa-tabelle th { padding: var(--space-2) var(--space-3); vertical-align: bottom; }
.pa-tabelle th.mid, .pa-tabelle td.mid { text-align: center; }
.pa-tabelle th.dreh { height: 200px; vertical-align: bottom; }
.pa-tabelle th.dreh span { display: inline-block; font-size: var(--fs-xs); line-height: 1.2;
  writing-mode: vertical-rl; transform: rotate(180deg);
  max-height: 190px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-tabelle td { padding: 6px var(--space-3); }
.pa-tabelle .nowrap { white-space: nowrap; }
.pa-aufgabe > td { border-top: 1px solid var(--geyser); background: var(--porcelain); }
.pa-aufgabe.offen > td { background: var(--shadow-green-l); }
.pa-aufgabe .tt { font-size: var(--fs-sm); font-weight: 500; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.pa-aufgabe .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.pa-ziel td { font-size: var(--fs-sm); color: var(--ink-soft); border-bottom: 1px solid var(--porcelain); }
.pa-ziel td:nth-child(2) { padding-left: var(--space-5); }
.pa-tabelle .hk { color: var(--shadow-green-d); font-weight: 700; }
.pa-form > td { padding: 0; background: #FBFCFC; }
.pa-aktionen { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }

/* ---------- Sehr grosse Dialoge (Vorlage, Aufgabe, Phase) ---------- */
/* Die drei großen Dialoge haben immer dieselbe Geometrie – das beruhigt */
.modal.full { width: min(1800px, 96vw); height: 94vh; display: flex; flex-direction: column;
  overflow: hidden; }
.modal.full > .modal-head { flex: none; }
.modal.full > .modal-body { flex: 1; min-height: 0; overflow-y: auto; }
.modal.full > .modal-foot { flex: none; }

/* Pfad im Modalkopf */
.modal-pfad { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px;
  font-size: var(--fs-xs); color: var(--ink-mute); }
.modal-pfad button { color: var(--shadow-green-d); text-decoration: underline; }
.modal-pfad button:hover { color: var(--ink); }
.modal-pfad i { color: var(--tiara); font-style: normal; }
.modal-head .titel { min-width: 0; }
.modal-head .spacer { flex: 1; }
.modal-head .titel h3 { font-size: var(--fs-lg); }
.modal-head .titel .sub { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; }
.modal-back.ebene2 { z-index: 65; background: rgba(30,42,46,.35); }
.help-back { z-index: 80; }
.modal.full .edit-page { padding-bottom: 0; }

/* ---------- Prozessverwaltung: Aufgaben je Phase ---------- */
.kopf-aktionen { display: flex; gap: var(--space-2); flex: none; }
.af-phase { margin-bottom: var(--space-5); }
.af-kopf { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--geyser); }
.af-kopf strong { font-family: var(--font-head); font-size: var(--fs-md); }
.af-kopf .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.af-kopf .spacer { flex: 1; }
.ph-kopf .nr { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--porcelain);
  border: 1px solid var(--geyser); font-size: 10px; display: grid; place-items: center; color: var(--ink-soft); }

/* ---------- Matrix-Schnellbearbeitung ---------- */
.modal.full > .modal-body.flach { overflow: hidden; display: flex; flex-direction: column; }
.modal-body.flach .pa-hinweis { flex: none; }
.mx-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--geyser);
  border-radius: var(--radius-sm); background: var(--white); }
.mx-tabelle { border-collapse: separate; border-spacing: 0; }
.mx-tabelle th { padding: var(--space-2) var(--space-3); vertical-align: bottom; background: var(--white);
  position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--geyser); }
.mx-tabelle th.mid, .mx-tabelle td.mid { text-align: center; }
.mx-tabelle th.dreh { height: 200px; vertical-align: bottom; }
.mx-tabelle th.dreh span { display: inline-block; font-size: var(--fs-xs); line-height: 1.2;
  writing-mode: vertical-rl; transform: rotate(180deg);
  max-height: 190px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-tabelle td { padding: 4px var(--space-3); border-bottom: 1px solid var(--porcelain); background: var(--white); }
.mx-tabelle .nowrap { white-space: nowrap; }

/* Titel, Zuständigkeit und Aktionen bleiben stehen */
.mx-tabelle .fix { position: sticky; z-index: 2; }
.mx-tabelle th.fix { z-index: 4; }
.mx-tabelle .fix1 { left: 0; width: 360px; min-width: 360px; }
.mx-tabelle .fix2 { left: 360px; width: 160px; min-width: 160px; }
.mx-tabelle .fix3 { left: 520px; width: 96px; min-width: 96px;
  box-shadow: 1px 0 0 var(--geyser); }

.mx-phase td { background: var(--porcelain); border-top: 1px solid var(--geyser);
  border-bottom: 1px solid var(--geyser); padding: var(--space-2) var(--space-3); }
.mx-phase .fix { background: var(--porcelain); }
.mx-phase strong { font-family: var(--font-head); font-size: var(--fs-sm); margin-right: var(--space-3); }
.mx-phase .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.mx-aufgabe td, .mx-ziel td { font-size: var(--fs-sm); }
.mx-ziel .fix1 { padding-left: var(--space-5); }

.mx-titel { width: 100%; padding: 5px 8px; font: inherit; font-size: var(--fs-sm); color: var(--ink);
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; }
.mx-titel:hover { border-color: var(--geyser); }
.mx-titel:focus { border-color: var(--shadow-green); outline: 2px solid var(--shadow-green); outline-offset: -1px;
  background: var(--white); }
.mx-titel::placeholder { color: var(--tiara); font-style: italic; }
.mx-rolle { width: 100%; padding: 4px 6px; font: inherit; font-size: var(--fs-xs); color: var(--ink-soft);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); background: var(--white); }

/* Häkchen exakt mittig */
.mx-box { width: 18px; height: 18px; padding: 0; border: 1.5px solid var(--tiara); border-radius: 4px;
  background: var(--white); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; text-align: center; color: transparent; cursor: pointer; }
.mx-box:hover { border-color: var(--shadow-green-d); color: var(--tiara); }
.mx-box.an { background: var(--shadow-green-d); border-color: var(--shadow-green-d); color: #fff; }
.mx-box.gedimmt { opacity: .35; }
.mx-box.fest { cursor: default; }
.mx-box.fest.an { background: var(--shadow-green-d); border-color: var(--shadow-green-d); color: #fff; }
.mx-text { display: inline-block; padding: 5px 0; font-size: var(--fs-sm); }
.mx-text.ein { padding-left: var(--space-4); color: var(--ink-soft); }
.mx-box.gedimmt:hover { opacity: .7; }
.mx-tabelle .muted { color: var(--ink-mute); font-size: var(--fs-xs); }

.tag.leer { background: var(--late-bg); border-color: var(--late); color: var(--late); }

/* ---------- Aufgabenkarte im Kontext ---------- */
.modal.info { width: min(720px, 100%); }
.ai-kopf .spacer { flex: 1; }
.ai-kopf { display: flex; align-items: flex-start; gap: var(--space-2); flex-wrap: wrap;
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--geyser); }
.ai-frist { text-align: right; flex: none; }
.ai-frist .rel { font-size: var(--fs-md); font-weight: 500; white-space: nowrap; }
.ai-frist .rel.bad { color: var(--late); }
.ai-frist .muted { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: 2px; white-space: nowrap; }
.ai-desc { margin-top: var(--space-4); font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.55; }
.ai-block { margin-top: var(--space-4); padding: var(--space-4); background: var(--porcelain);
  border: 1px solid var(--geyser); border-radius: var(--radius-sm); }
.ai-block .cap { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute); margin-bottom: var(--space-3); }
.ai-block .kv dd { word-break: break-word; }
.ai-ziele .cap { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute); margin-bottom: var(--space-2); }
.ai-ziele .ziel { padding: 5px 0; }
.ai-ziele .ziel input { width: 17px; height: 17px; }
.ai-ziele .field-hint { margin-top: var(--space-2); }
.ai-haken { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-md); cursor: pointer; }
.ai-haken input { width: 19px; height: 19px; flex: none; }
/* Größeres Feld, größeres Häkchen – sonst wirkt es verloren. */
.ai-haken input[type="checkbox"]:checked::before { width: 11px; height: 6px; }
.ai-haken.an span { color: var(--ink-soft); }
.ai-link { padding: 0; text-align: left; color: var(--shadow-green-d); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-color: var(--tiara); }
.ai-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.ai-link.strong { font-weight: 500; color: var(--ink); }
.ai-link.strong:hover { color: var(--shadow-green-d); }
.dash-task { cursor: pointer; }

/* ---------- Phasentermine ---------- */
.pt-info { display: grid; gap: 6px; margin-top: var(--space-4); padding: var(--space-4);
  background: var(--porcelain); border: 1px solid var(--geyser); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); }
.pt-info .cap { display: inline-block; min-width: 130px; font-size: var(--fs-xs); color: var(--ink-mute); }
.phase-head .btn-icon { padding: 2px 6px; }
.phase-head .btn-sm { flex: none; }

/* ---------- Karte am Zeiger über der Lastleiste ---------- */
.dash-card.offen { overflow: visible; }
.bar-col { position: relative; }
#barpop { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
#barpop:empty { display: none; }
.bar-pop { position: fixed; width: 320px; text-align: left; padding: var(--space-3);
  background: var(--white); border: 1px solid var(--tiara); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-3); cursor: default; }
.bar-pop .kopf { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); padding-bottom: 4px; }
.bar-pop .zeile { display: flex; align-items: baseline; gap: var(--space-3);
  font-size: var(--fs-xs); padding: 4px 0; border-top: 1px solid var(--porcelain); }
.bar-pop .zeile .tt { flex: 1; min-width: 0; color: var(--ink); }
.bar-pop .zeile .wen { display: block; color: var(--ink-mute); }
.bar-pop .zeile .wer { flex: none; color: var(--ink-soft); white-space: nowrap; }
.bar-pop .zeile.leer { color: var(--ink-mute); }
.bar-pop .mehr { font-size: var(--fs-xs); color: var(--ink-mute); padding-top: 5px;
  border-top: 1px solid var(--porcelain); }

/* ---------- Gruppenauswahl im Startdialog ---------- */
.gr-zeile { display: flex; flex-wrap: wrap; gap: 4px var(--space-4); }
/* Schalter (Checkbox + Wort) in einem Feld: die 100%-Breite der
   Feldeingaben und das Block-Label gelten hier nicht – sonst streckt
   sich die Checkbox über die ganze Zeile (Muster wie .gr-box).     */
.field .fm-schalter {
  display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.field .fm-schalter input {
  width: 15px; height: 15px; margin: 0; accent-color: var(--shadow-green-d); flex: none; }

.field .gr-box { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0;
  min-width: 200px; padding: 3px 0; font-size: var(--fs-sm); font-weight: 400; color: var(--ink);
  cursor: pointer; }
.field .gr-box input { width: 15px; height: 15px; margin: 0; accent-color: var(--shadow-green-d); flex: none; }
.field .gr-box.fest { color: var(--ink-soft); cursor: default; }

/* Vorschauzeile der Fälligkeit */
.deadline-preview .ok-line { margin-top: 4px; color: var(--shadow-green-d); }

/* ---------- Demo-Anmeldung ---------- */
.login-card { width: min(430px, 92vw); }
#login-benutzer { margin-top: var(--space-5); }
.login-demo { text-align: left; border-top: 1px solid var(--geyser); padding-top: var(--space-4); }
.login-demo .cap { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute); margin-bottom: var(--space-2); }
.login-user { display: flex; align-items: center; gap: var(--space-3); width: 100%;
  padding: 7px var(--space-3); border-radius: var(--radius-sm); text-align: left; }
.login-user:hover { background: var(--porcelain); }
.login-user .txt { display: flex; flex-direction: column; line-height: 1.25; }
.login-user .muted { font-size: var(--fs-xs); color: var(--ink-mute); }
.login-user .strong { font-size: var(--fs-sm); }

/* Zweistufiges Entfernen: scharf gestellt */
.btn.gefahr { border-color: var(--late); color: var(--late); }
.btn.gefahr:hover { background: var(--late-bg); }


/* ---------- Kalenderansicht der Fälligkeiten ---------- */
.dash-head .segmented.klein button { padding: 3px 10px; font-size: var(--fs-xs); }
.kal { padding: var(--space-3) var(--space-4) var(--space-4); }
.kal-kopf { display: flex; align-items: center; gap: var(--space-2); padding-bottom: var(--space-2); }
.kal-titel { font-size: var(--fs-sm); font-weight: 500; min-width: 150px; text-align: center; }
.kal-gitter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.kal-wd { text-align: center; font-size: 10px; color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 0; }
.kal-tag { position: relative; min-height: 46px; padding: 3px 5px;
  border: 1px solid var(--porcelain); border-radius: var(--radius-sm); background: var(--white); }
.kal-tag.frei { border-color: transparent; background: transparent; }
.kal-tag.we { background: var(--porcelain); }
.kal-tag .d { font-size: var(--fs-xs); color: var(--ink-mute); }
.kal-tag.heute { outline: 2px solid var(--shadow-green-d); outline-offset: -1px; }
.kal-tag.heute .d { color: var(--shadow-green-d); font-weight: 600; }
.kal-tag .n { position: absolute; right: 4px; bottom: 4px; min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--shadow-green-d); color: #fff; border-radius: 10px;
  font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.kal-tag.spaet { border-color: var(--late); }
.kal-tag.spaet .n { background: var(--late); }
.kal-tag.hat { cursor: default; }
.kal-tag.hat:hover { border-color: var(--shadow-green); box-shadow: var(--shadow-1); }


/* ---------- Dunkles Design: die wenigen festen Farben ---------- */
html[data-theme="dunkel"] .badge-it  { background: #223244; color: #9FBEE8; }
html[data-theme="dunkel"] .badge-fbl { background: #322940; color: #CBA6DC; }
html[data-theme="dunkel"] .badge-admin,
html[data-theme="dunkel"] .unit.admin .unit-ico { background: #332B12; color: #D9B45A; }
html[data-theme="dunkel"] .unit.it  .unit-ico { background: #223244; color: #9FBEE8; }
html[data-theme="dunkel"] .unit.fbl .unit-ico { background: #322940; color: #CBA6DC; }
html[data-theme="dunkel"] .task.done,
html[data-theme="dunkel"] .pa-form > td { background: #1A2529; }
html[data-theme="dunkel"] .modal-back { background: rgba(0,0,0,.55); }
html[data-theme="dunkel"] .modal-back.ebene2 { background: rgba(0,0,0,.45); }
