/* Atlas Portal – Portal-eigene Klassen. Tokens und Bausteine (Schrift, Farben,
   Abstände, Atlas-Shell, Knöpfe, Felder, Meldungen, Karten, Tabellen,
   Schrittleiste, Dialog) kommen aus atlas-ui.css (UI-Regelwerk,
   docs/ui/UI-REGELN.md, seit 2026-09-16). Hier steht nur, was das Portal
   zusätzlich braucht – ausschließlich über die Tokens, keine freien Werte. */

/* Karten-Titel, der ohne .karte-kopf direkt in der Karte steht: Abstand zum Inhalt
   wie unter dem Karten-Kopf (A-02) */
.karte > .karte-titel { margin-bottom: var(--space-4); }

/* ---------- Betriebs-Hub: WJ-Auswahl (das Jahr steht allem voran) ----------
   Schlichte Zeile ohne Karte: Beschriftung + Chips auf einer Mittellinie. */

.wj-wahl {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    min-height: var(--hoehe-chip);
    margin: 0 0 var(--space-6);
}

.wj-wahl-label {
    font-size: 12px;
    line-height: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-right: var(--space-2);
}

.wj-wahl-hinweis { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* ---------- Betriebs-Hub: Modul-Raster ----------
   Sechs Spalten: Zeile 1 = die drei Werkzeuge (je 2 Spalten), Zeile 2 = die zwei
   Sichten (je 3 Spalten) – beide Zeilen füllen die volle Breite, nichts bleibt leer.
   Die Werkstatt nutzt dasselbe Raster mit drei Kacheln (eine Zeile). */

.modul-raster {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-4);
}

.modul-kachel {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    min-height: 96px;
    padding: var(--space-4);
    background: var(--komponente);
    border: 1px solid var(--linie);
    border-radius: var(--radius-l);
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: border-color 0.12s ease;
}
.modul-kachel:nth-child(n+4) { grid-column: span 3; }

@media (max-width: 640px) {
    .modul-raster { grid-template-columns: minmax(0, 1fr); }
    .modul-kachel, .modul-kachel:nth-child(n+4) { grid-column: auto; }
}

a.modul-kachel:hover { border-color: var(--atlas-blau-60); color: var(--text); }
a.modul-kachel:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }

.modul-kachel.inaktiv { color: var(--zurueck); cursor: default; }
.modul-kachel-zusatz { font-size: 12px; line-height: 17px; font-weight: 400; color: var(--text-2); }

/* ---------- Analyse-Seite ---------- */

.analyse-abschnitt + .analyse-abschnitt { margin-top: var(--space-6); }

.analyse-modul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    background: var(--subtil);
}
.analyse-modul-name { font-weight: 600; font-size: 16px; line-height: 24px; display: block; }
.analyse-modul-stand { font-size: 12px; line-height: 17px; color: var(--text-2); }

/* ---------- Kompakte Kundenübersicht (viele Kunden, 2026-08-13) ---------- */

.kunden-werkzeuge {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.kunden-suche { flex: 1 1 260px; max-width: 420px; }

.kunde-anlegen-klappe { margin-left: auto; position: relative; }
.kunde-anlegen-klappe summary,
.betrieb-anlegen-klappe summary,
.loesch-klappe summary { list-style: none; display: inline-flex; }
.kunde-anlegen-klappe summary::-webkit-details-marker,
.betrieb-anlegen-klappe summary::-webkit-details-marker,
.loesch-klappe summary::-webkit-details-marker { display: none; }

.klapp-formular, .inline-formular {
    margin-top: var(--space-2);
    padding: var(--space-4);
    background: var(--komponente);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
}
.kunde-anlegen-klappe[open] .klapp-formular {
    position: absolute;
    right: 0;
    z-index: 5;
    min-width: 360px;
    box-shadow: var(--schatten-hoch);       /* schwebt über der Liste = echte Höhe */
}
.loesch-klappe .inline-formular {
    border-color: var(--fehler-rand);
    background: var(--fehler-flaeche);
}
.inline-formular form { margin: 0; }

.kunden-liste { display: flex; flex-direction: column; gap: var(--space-2); }

.kunden-zeile {
    background: var(--komponente);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
}

.kunden-zeile summary {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--hoehe);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    list-style: none;
}

.kunden-zeile summary::-webkit-details-marker { display: none; }
.kunden-zeile summary::before { content: "▸"; color: var(--text-2); font-size: 12px; }
.kunden-zeile[open] summary::before { content: "▾"; }
.kunden-zeile[open] { border-color: var(--atlas-blau-60); }

.kunden-name { font-weight: 600; font-size: 14px; line-height: 20px; }
.kunden-name[title] { cursor: help; }
.kunden-key { font-size: 12px; line-height: 17px; color: var(--text-2); font-weight: 400; }
.kunden-info { font-size: 12px; line-height: 17px; color: var(--text-2); margin-left: auto; white-space: nowrap; }
.kunden-info + .kunden-info, .kunden-info + .tag { margin-left: var(--space-3); }

.kunden-detail { padding: var(--space-1) var(--space-4) var(--space-4) var(--space-8); }

.betriebs-zeilen { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }

.betriebs-zeile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--hoehe);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    text-decoration: none;
    color: var(--text);
    background: var(--subtil);
}

a.betriebs-zeile:hover { border-color: var(--atlas-blau-60); }
a.betriebs-zeile:hover .betriebs-name { color: var(--atlas-blau-hover); }
.betriebs-zeile .betriebs-name { font-weight: 400; font-size: 14px; line-height: 20px; }
.betriebs-zeile .betriebs-ort { font-size: 12px; line-height: 17px; color: var(--text-2); }

.betriebs-zeile-umschlag { display: flex; align-items: flex-start; gap: var(--space-2); flex-wrap: wrap; }
.betriebs-zeile-umschlag .betriebs-zeile { flex: 1 1 260px; }

.kunden-aktionen { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.kunden-aktionen .inline-formular { margin: 0; }
/* Formular, das nur aus einem Knopf besteht („Container provisionieren“,
   „Kunden-Adresse ergänzen“, 2026-10-15): ohne Kasten – sitzt wie die
   übrigen Knöpfe der Zeile. Link auf Knopfhöhe mittig (B-05). */
.knopf-formular { margin: 0; }
.kunden-aktionen .verwaltungs-link { display: inline-flex; align-items: center; min-height: var(--hoehe); }

.verwaltungs-link {
    color: var(--atlas-blau);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-decoration: none;
}
.verwaltungs-link:hover { color: var(--atlas-blau-hover); text-decoration: underline; }

/* Wartung (Betreiber 2026-09-26, „Der Knopf muss weniger präsent sein“): seltene
   Sammel-Aktionen eingeklappt unter der Kundenliste – kleine graue Überschrift statt
   Knopf-Optik (F-04 Sekundärgrau, T-03 14 px für Bedienelemente, B-05 44 px Fläche);
   Abstand zur Liste über den Baustein .bereich-abstand. */
.wartung-klappe summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--hoehe);
    font-size: 14px;
    line-height: 20px;
    color: var(--text-2);
    cursor: pointer;
    list-style: none;
}
.wartung-klappe summary::-webkit-details-marker { display: none; }
.wartung-klappe summary::before { content: "▸"; font-size: 12px; }
.wartung-klappe[open] summary::before { content: "▾"; }
.wartung-klappe summary:hover { color: var(--text); }
.wartung-klappe > form { margin-top: var(--space-2); }

/* ---------- Wirtschaftsjahre / Stammdaten ---------- */

.wj-liste { display: flex; flex-direction: column; gap: var(--space-3); margin: var(--space-6) 0; }

.wj-karte {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.wj-karte form { margin: 0; }

.wj-info { display: flex; flex-direction: column; gap: 2px; }
.wj-name { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.wj-name[title] { cursor: help; }
.wj-zeitraum { font-size: 14px; line-height: 20px; color: var(--text); }
.wj-detail { font-size: 12px; line-height: 17px; color: var(--text-2); }
.wj-leer { color: var(--text-2); font-size: 14px; line-height: 20px; }

.wj-paar { display: flex; gap: var(--space-2); }
/* Vorschläge KJ/WJ über dem Anlege-Formular (2026-10-08) */
.wj-art { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.wj-vorschlaege { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.wj-vorschlaege .wahl-chip:disabled { background: var(--seite); border-color: var(--linie); color: var(--deaktiviert); cursor: default; }
.wj-paar select { min-width: 0; }

.wj-fussnote { margin: var(--space-3) 0 0; font-size: 12px; line-height: 17px; color: var(--text-2); }

.stammdaten-logo {
    max-height: 90px;
    max-width: 280px;
    background: var(--komponente);
    padding: var(--space-2);
    border: 1px solid var(--linie);
    border-radius: var(--radius-s);
}

/* ---------- Nutzerverwaltung (Betreiber-Auth Stufe 2) ---------- */

.nutzer-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }

/* Berater aus dem CRM (2026-11-20 III): eine Karte je Firma. Gleiche Spalten
   auf einer Linie über beide Karten (A-07); der Schalter ist hier ein An/Aus –
   „aus“ in Grau, damit der Stand nicht nur an der Knopfposition hängt (F-08). */
.crm-beratung { margin-bottom: var(--space-6); }
.crm-beratung .tabelle { table-layout: fixed; }
.crm-beratung .tabelle th:nth-child(1) { width: 40%; }
.crm-beratung .tabelle th:nth-child(2) { width: 45%; }
.crm-beratung .tabelle td { overflow-wrap: anywhere; }
.crm-beratung .schalter[aria-checked="false"] { background: var(--zurueck); }
.crm-beratung .schalter[aria-checked="false"]:hover { background: var(--text-2); }
.crm-beratung .schalter:disabled { cursor: not-allowed; opacity: 0.6; }

/* Rechte-Matrix (Betreiber-Schema 2026-08-27): Spalten = Bereiche,
   Zeilen = Nutzer, Zellen = Checkboxen (speichern sofort). */
.nutzer-tabelle-umschlag {
    background: var(--komponente);
    border: 1px solid var(--linie);
    border-radius: var(--radius-l);
    overflow-x: auto;
    margin-bottom: var(--space-6);
}
.nutzer-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.nutzer-tabelle th {
    text-align: center;
    font-size: 12px;
    line-height: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-2);
    background: var(--subtil);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--linie);
    white-space: nowrap;
}
/* Fünf Rechte-Spalten müssen OHNE Quer-Scrollbalken passen: Kopfzellen
   dürfen umbrechen, Polster schmaler. */
.nutzer-tabelle th.recht-spalte {
    width: 13%; cursor: help;
    white-space: normal; padding: var(--space-2); line-height: 17px;
}
.nutzer-tabelle td { padding: var(--space-2); border-bottom: 1px solid var(--linie); vertical-align: middle; }
.nutzer-tabelle tbody tr:last-child td { border-bottom: none; }
.nutzer-tabelle tbody tr:hover td { background: var(--subtil); }
.nutzer-tabelle .spalte-nutzer { text-align: left; padding-left: var(--space-4); }
.nutzer-tabelle td.spalte-nutzer { min-width: 170px; }
.nutzer-tabelle .recht-zelle { text-align: center; }
.nutzer-tabelle .recht-zelle input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: var(--atlas-blau);
    cursor: pointer; vertical-align: middle;
}
.nutzer-tabelle .spalte-aktionen { text-align: right; white-space: nowrap; width: 1%; padding-right: var(--space-4); }
.nutzer-tabelle tr.inaktiv td { color: var(--zurueck); }
.nutzer-zeile-kopf { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.nutzer-anzeigename { font-weight: 400; color: var(--text); }
.nutzer-benutzername { font-size: 12px; line-height: 17px; color: var(--text-2); }

/* „…"-Menü am Zeilenende: Passwort setzen, deaktivieren/aktivieren */
.spalte-aktionen .nutzer-aktionen-klappe { position: relative; display: inline-block; }
.nutzer-aktionen-klappe[open] summary { background: var(--atlas-blau-20); }
.nutzer-aktionen-menue {
    position: absolute;
    right: 0;
    margin-top: var(--space-1);
    z-index: 5;
    min-width: 290px;
    background: var(--komponente);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    box-shadow: var(--schatten-hoch);       /* schwebendes Menü = echte Höhe */
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    text-align: left;
}
.nutzer-passwort-formular label {
    display: block;
    margin-bottom: var(--space-1);
    font-size: 12px;
    line-height: 17px;
    font-weight: 600;
    color: var(--text-2);
}
.nutzer-passwort-zeile { display: flex; gap: var(--space-2); }
/* Bearbeiten (2026-10-15): zweites Feld im selben Formular mit Luft darüber */
.nutzer-passwort-zeile + label { margin-top: var(--space-2); }
.nutzer-passwort-zeile input {
    flex: 1;
    min-width: 0;
    min-height: var(--hoehe-klein);
    border: 1px solid var(--zurueck);
    border-radius: var(--radius-m);
    padding: var(--space-1) var(--space-3);
    font-size: 14px;
    color: var(--text);
}
.nutzer-passwort-zeile input:focus { outline: 2px solid var(--fokus); outline-offset: 1px; border-color: var(--atlas-blau); }
.nutzer-aktiv-formular {
    border-top: 1px solid var(--linie);
    padding-top: var(--space-3);
}
.nutzer-aktiv-formular .knopf { width: 100%; }

/* Formular „Nutzer erstellen": eine Feldzeile, darunter Bereiche + Knopf */
.nutzer-formular { display: flex; flex-direction: column; gap: var(--space-4); }
.nutzer-formular-felder {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}
.nutzer-formular label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: 12px;
    line-height: 17px;
    color: var(--text-2);
    font-weight: 600;
}
.nutzer-formular input,
.nutzer-formular select {
    min-height: var(--hoehe);
    border: 1px solid var(--zurueck);
    border-radius: var(--radius-m);
    padding: var(--space-2) var(--space-3);
    font-size: 14px;
    color: var(--text);
    background: var(--komponente);
}
.nutzer-formular input:focus,
.nutzer-formular select:focus { outline: 2px solid var(--fokus); outline-offset: 1px; border-color: var(--atlas-blau); }
.nutzer-formular-fuss {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.nutzer-formular-fuss .knopf { align-self: flex-end; }
.rechte-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-6);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    padding: var(--space-3) var(--space-4);
    margin: 0;
}
.rechte-cluster legend {
    float: left;
    margin-right: var(--space-4);
    padding: 0;
    font-size: 12px;
    line-height: 17px;
    font-weight: 600;
    color: var(--text-2);
}
.rechte-cluster .recht {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--hoehe-klein);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
}
.rechte-cluster input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--atlas-blau); cursor: pointer;
}
@media (max-width: 900px) {
    .nutzer-formular-felder { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .nutzer-formular-felder { grid-template-columns: 1fr; }
}

/* Register-Vollverwaltung (Supervisor, 2026-08-27) */
.register-seite .kunden-zeile.inaktiv > summary { color: var(--zurueck); }
.register-seite .betriebs-zeile.inaktiv { color: var(--zurueck); }
.register-seite .betriebs-zeile.inaktiv .betriebs-name { color: var(--zurueck); }
.register-seite .betriebs-zeile { cursor: default; }
.register-protokoll .tabelle td { text-align: left; }

/* Berater-Freigaben je Kunde (Nutzerverwaltung, Rubrik Kunden, 2026-09-08) */
.freigabe-kunde { border-top: 1px solid var(--linie); }
.freigabe-kunde summary {
    display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
    min-height: var(--hoehe); padding: var(--space-2) var(--space-1); cursor: pointer; list-style: none;
}
.freigabe-kunde summary::-webkit-details-marker { display: none; }
.freigabe-kunde summary::before { content: "▸"; font-size: 12px; color: var(--text-2); }
.freigabe-kunde[open] summary::before { content: "▾"; }
.freigabe-kunde-name { font-weight: 600; }
.freigabe-anzahl { margin-left: auto; font-size: 12px; line-height: 17px; color: var(--text-2); }
.freigabe-berater {
    display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding: var(--space-1) var(--space-1) var(--space-3) var(--space-6);
}
.freigabe-berater .recht { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe-klein); cursor: pointer; }
.freigabe-berater .recht input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--atlas-blau); }
.freigabe-berater .recht.ohne-analytics { color: var(--zurueck); }

/* ---------- Analyse · Modul „Aufteilung" (2026-09-15) ---------- */

/* Untertabs: ein Reiter je Topf */
.topf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0 0 var(--space-4);
}

.topf-tab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 128px;
    min-height: var(--hoehe);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    background: var(--komponente);
    color: var(--text);
    text-decoration: none;
}

.topf-tab:hover { border-color: var(--atlas-blau-60); color: var(--text); }
.topf-tab.aktiv { background: var(--atlas-blau); border-color: var(--atlas-blau); color: #fff; }
.topf-tab.leer { color: var(--zurueck); }
.topf-tab.leer.aktiv { color: #fff; }
.topf-tab.uebersicht { border-style: dashed; }
.topf-tab-name { font-size: 14px; line-height: 20px; font-weight: 600; }
.topf-tab-wert { font-size: 12px; line-height: 17px; color: var(--text-2); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.topf-tab.aktiv .topf-tab-wert { color: var(--auf-dunkel); }
.topf-haken { color: var(--erfolg); font-weight: 600; }
.topf-tab.aktiv .topf-haken { color: #fff; }

/* Blatt-Kopf */
.topf-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.topf-kopf-titel { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.topf-kopf-titel .karte-titel { margin: 0; }
.topf-code { font-variant-numeric:tabular-nums; font-size: 12px; line-height: 17px; color: var(--text-2); cursor: help; }

.topf-gebucht {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--linie);
    border-radius: var(--radius-m);
    background: var(--subtil);
    min-width: 200px;
}

.topf-gebucht-label { font-size: 12px; line-height: 17px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.topf-gebucht-wert { font-size: 24px; line-height: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }   /* Kennzahl (T-02) */

.ist-zeilen { margin: var(--space-2) 0 var(--space-4); font-size: 14px; line-height: 20px; }
.ist-zeilen summary { cursor: pointer; color: var(--atlas-blau); font-weight: 600; min-height: var(--hoehe-klein); display: flex; align-items: center; }
.ist-tabelle { border-collapse: collapse; font-size: 14px; margin-top: var(--space-2); width: 100%; }
.ist-tabelle td { padding: var(--space-1) var(--space-3) var(--space-1) 0; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.ist-tabelle td.code { color: var(--text-2); font-variant-numeric:tabular-nums; white-space: nowrap; }
.ist-tabelle td.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Verteilungs-Tabelle */
.verteilung-umschlag { overflow-x: auto; }

.verteilungs-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
/* Kopf wie der Baustein .tabelle (T-05): 12 px Großbuchstaben, Sekundärgrau, ruhiges Band */
.verteilungs-tabelle th {
    text-align: right;
    font-size: 12px;
    line-height: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-2);
    background: var(--subtil);
    padding: var(--space-2);
    border-bottom: 1px solid var(--linie);
    white-space: nowrap;
}
.verteilungs-tabelle th.links, .verteilungs-tabelle td.links { text-align: left; }
.verteilungs-tabelle th a { color: var(--atlas-blau); text-decoration: none; }
.verteilungs-tabelle th a:hover { text-decoration: underline; }
/* Jede Zeile trägt ihre Linie OBEN (nicht unten): so gewinnt die dunklere Linie einer Summenzeile
   sicher gegen die helle der Zeile darüber, und aufgeklappte Unterzeilen hängen ohne Linie an ihrer
   Hauptzeile. Zeilen mittig (Achsen), Zeilen-Beschriftungen 400 – nur Summen/Ergebnis 600 (T-02). */
.verteilungs-tabelle td { padding: var(--space-2); border-top: 1px solid var(--linie); vertical-align: middle; }
.verteilungs-tabelle th:first-child, .verteilungs-tabelle td:first-child { padding-left: var(--space-3); }   /* Kante des Karten-Titels */
.verteilungs-tabelle td.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.verteilungs-tabelle .einheit { font-size: 12px; line-height: 17px; color: var(--text-2); font-weight: 400; }
.verteilungs-tabelle td.aktion { text-align: right; white-space: nowrap; width: 1%; }
.verteilungs-tabelle td.aktion form { margin: 0; }
.verteilungs-tabelle tbody tr.zweig-zeile:hover td { background: var(--subtil); }
/* Festgeschrieben = Warnfläche (orange) – Farbe + Text „fest“ (F-08) */
.verteilungs-tabelle tr.fest td, .verteilungs-tabelle td.fest { background: var(--warnung-flaeche); }
.verteilungs-tabelle tr.kein-ansatz td, .verteilungs-tabelle td.kein-ansatz { color: var(--zurueck); }
.verteilungs-tabelle tr.kein-ansatz .zweig-name { color: var(--text); }
.verteilungs-tabelle tr.warnung td.links .zweig-name { color: var(--fehler); }
/* Summenzeile: 600, Linie in --zurueck darüber (wie der Baustein .tabelle tfoot) */
.verteilungs-tabelle tfoot td { font-weight: 600; }
.verteilungs-tabelle tfoot tr.summe td { border-top-color: var(--zurueck); }
.verteilungs-tabelle tfoot tr.nicht-zugeordnet td { color: var(--fehler); font-weight: 400; }
.verteilungs-tabelle tfoot tr.nicht-zugeordnet td.betrag { font-weight: 600; }
/* „Nicht zugeordnet“ aufklappbar (2026-09-22): je Blatt/Topf der Weg zur Lösung als leiser Zusatz */
.verteilungs-tabelle tfoot tr.nicht-zugeordnet .ergebnis-auf .zweig-name { color: var(--fehler); }
.verteilungs-tabelle tfoot tr.offen-detail td { border-top: none; font-weight: 400; }
.verteilungs-tabelle tfoot tr.offen-detail td.zahl { color: var(--fehler); }
.offen-weg { display: block; font-size: 12px; line-height: 17px; color: var(--text-2); }
/* Kontrollzeile „Gebucht“ der Ergebnis-Seite (2026-09-22): leise, ohne Trennlinie; bei Abweichung rot (F-08) */
.verteilungs-tabelle tfoot tr.gebucht td { color: var(--text-2); font-weight: 400; border-top: none; }
.verteilungs-tabelle tfoot tr.gebucht.abweichung td.zahl[title] { color: var(--fehler); font-weight: 600; }
.verteilungs-tabelle.uebersicht td.zahl { line-height: 17px; }   /* zwei Zeilen je Zelle: Betrag + Standard */

.zweig-name { display: block; }
a.zweig-name { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--atlas-blau-60); display: inline-block; }
a.zweig-name:hover { color: var(--atlas-blau-hover); border-bottom-style: solid; }
.zweig-note { display: block; font-size: 12px; line-height: 17px; color: var(--text-2); }
.verteilungs-tabelle td.abweichung { font-size: 12px; line-height: 17px; color: var(--text-2); font-weight: 400; white-space: nowrap; }
.verteilungs-tabelle td.abweichung strong { color: var(--text); font-weight: 600; }
.zweig-warnung { display: block; font-size: 12px; line-height: 17px; color: var(--fehler); }
.fussmarke { color: var(--atlas-blau); font-size: 12px; margin-left: 2px; vertical-align: super; }

/* Modul „Ergebnis" (2026-09-18): Zweig-Zeile klappt ihre Erlös-/Kosten-Zeilen auf */
.ergebnis-auf { border: none; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 0; text-align: left; }
.ergebnis-auf .zweig-name { border-bottom: 1px dotted var(--atlas-blau-60); display: inline-block; }
.ergebnis-auf:hover .zweig-name { color: var(--atlas-blau-hover); border-bottom-style: solid; }
.ergebnis-tabelle tr.ergebnis-detail td { border-top: none; padding-top: var(--space-1); padding-bottom: var(--space-1); }
.ergebnis-tabelle tr.ergebnis-detail td.links { padding-left: var(--space-8); }
.ergebnis-tabelle tr.ergebnis-detail a { color: var(--text-2); }
.ergebnis-tabelle td.negativ { color: var(--fehler); }
/* Menge fehlt (2026-09-24): Text „fehlt“ + Farbe (F-08), Sprung in den Naturalbericht (S-02), Grund per Hover (T-06) */
.ergebnis-tabelle a.menge-fehlt { color: var(--fehler); font-weight: 600; text-decoration: none; border-bottom: 1px dotted var(--fehler); }
.ergebnis-tabelle a.menge-fehlt:hover { border-bottom-style: solid; }
/* Vergleich mit der Vergleichs-DB (2026-10-07): Pfeil am Ende der Zweig-Zeile – Textbutton in der kleinen
   Bedienhöhe, ohne die Zeile zu strecken (B-05, I-05), Hover in Blau 20 % (F-05/F-06), Rundung 10 px (A-04) */
.ergebnis-tabelle th.aktion, .ergebnis-tabelle td.aktion { width: 1%; padding-top: 0; padding-bottom: 0; }
.vergleich-pfeil {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--hoehe-klein); height: var(--hoehe-klein);
    border-radius: var(--radius-m); color: var(--atlas-blau); text-decoration: none;
    font-size: 18px; line-height: 1; font-weight: 600; vertical-align: middle;
}
.vergleich-pfeil:hover { background: var(--atlas-blau-20); color: var(--atlas-blau-hover); }
.vergleich-pfeil:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
/* Vergleichs-Seite: Zweig-Wahl als Chips, Summen- und DB-Zeilen wie die Lotus-Blätter abgesetzt */
.vergleich-zweige { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.vergleich-tabelle tr.vergleich-teil td { border-top: none; padding-top: var(--space-1); padding-bottom: var(--space-1); }
.vergleich-tabelle tr.vergleich-teil td.links { padding-left: var(--space-6); }
.vergleich-tabelle tr.vergleich-teil a { color: var(--text-2); }
.vergleich-tabelle tr.vergleich-weitergabe td { color: var(--text-2); }
.vergleich-tabelle tr.vergleich-summe td { border-top: 1px solid var(--linie); font-weight: 600; }
.vergleich-tabelle tr.vergleich-db td { border-top: 1px solid var(--zurueck); font-weight: 600; }
.vergleich-tabelle td.negativ { color: var(--fehler); }
/* Abweichung = Betrieb − Vergleich; die Farbe sagt, ob es dem Betrieb hilft: grün besser, rot schlechter – bei Kosten
   ist ein Plus also rot (Betreiber 2026-10-07 III). Statusfarben F-07, Vorzeichen + Hover-Text daneben (F-08). */
.vergleich-tabelle td.besser { color: var(--erfolg); }
.vergleich-tabelle td.schlechter { color: var(--fehler); }
/* Eigener Betrieb als graues Band über die ganze Spalte, Kopf = Betriebsname (neutral, F-01/F-04);
   fett sind nur die Summen- und DB-Zeilen (T-02) */
.vergleich-tabelle th.eigen, .vergleich-tabelle td.eigen { background: var(--hinweis-flaeche); }
.vergleich-tabelle td.eigen { font-weight: 600; }   /* Betreiber 2026-10-07: die Zahlen des eigenen Betriebs fett */
.vergleich-tabelle th.eigen { color: var(--text); border-radius: var(--radius-s) var(--radius-s) 0 0; }
.vergleich-seite .karte-kopf { max-width: 720px; align-items: center; }   /* Schalter über dem rechten Tabellenrand */
.ergebnis-seite .karte-kopf { align-items: center; }
.vergleich-tabelle { max-width: 720px; }
/* Lotus-Blöcke im Vergleich (2026-10-07 IV): Abschnitts-Kopf wie der Tabellenkopf (Berechnungsgrundlagen · Erlöse und
   Kosten · Leistungsmerkmale), Kennzahl mit kleiner Einheit dahinter; „fehlt noch“ = die Maske steht, Atlas rechnet es
   noch nicht – gedämpft, kein Fehlerrot (F-08 bleibt dem echten „fehlt“ vorbehalten) */
.vergleich-tabelle tr.vergleich-abschnitt td {
    padding-top: var(--space-6);
    font-size: 12px; line-height: 17px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--text-2); border-top: none; border-bottom: 1px solid var(--linie);
}
.vergleich-tabelle tbody:first-of-type tr.vergleich-abschnitt td { padding-top: var(--space-2); }
.vergleich-tabelle tr.vergleich-kennzahl td.links .einheit { margin-left: var(--space-1); }
.vergleich-tabelle .fehlt-noch { color: var(--text-2); font-style: italic; font-weight: 400; }
/* Umschalter DB I | DB II (2026-10-07 II, seit III Baustein .schalter): beide Stufen stehen in der Seite, die
   Tabelle zeigt per zeige-db1 / zeige-db2 genau eine davon (db-stufe.js schaltet ohne Neuladen) */
.db-stufen-tabelle.zeige-db1 .nur-db2, .db-stufen-tabelle.zeige-db2 .nur-db1 { display: none; }
/* Gewinnberechnung (2026-09-24): Zeilen klappen bis zum Original-Konto auf; Summen 600 mit Linie in --zurueck,
   der Gesamt-Deckungsbeitrag als erste Zwischensumme ebenfalls 600 */
.gewinn-tabelle { max-width: 720px; }
.gewinn-tabelle tr.gewinn-summe td { border-top: 1px solid var(--zurueck); font-weight: 600; }
.gewinn-tabelle tr.gewinn-db td { font-weight: 600; }
.gewinn-tabelle tbody tr.gebucht td { color: var(--text-2); font-weight: 400; border-top: none; }   /* Kontrollzeile Gewinn mitten in der Tabelle (G6) */
.gewinn-tabelle tbody tr.gebucht.abweichung td.zahl[title] { color: var(--fehler); font-weight: 600; }
.gewinn-tabelle tr.ergebnis-detail td.posten-tiefe-1 { padding-left: var(--space-8); }
.gewinn-tabelle tr.ergebnis-detail td.posten-tiefe-2 { padding-left: var(--space-12); }
/* Konten eines Postens: eigene Zeile, Betrag in der Betragsspalte (2026-09-24), Klick = Sprung in die Eingabe */
.gewinn-tabelle tr.konto-detail td { border-top: none; padding-top: 0; padding-bottom: 0; font-size: 12px; line-height: 20px; color: var(--text-2); font-weight: 400; }
.gewinn-tabelle tr.konto-detail td.konto-tiefe-1 { padding-left: var(--space-12); }
.gewinn-tabelle tr.konto-detail td.konto-tiefe-2 { padding-left: var(--space-16); }
.gewinn-tabelle tr.konto-detail a { color: var(--text-2); text-decoration: none; }
.gewinn-tabelle tr.konto-detail a:hover { color: var(--atlas-blau-hover); text-decoration: underline; }
.gewinn-tabelle tr.konto-detail:hover td { background: var(--subtil); }
.posten-auf { border: none; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; text-align: left; }
.posten-auf .posten-name { border-bottom: 1px dotted var(--atlas-blau-60); }
.posten-auf:hover .posten-name { color: var(--atlas-blau-hover); border-bottom-style: solid; }

.betrag-knopf {
    border: none;
    background: none;
    font: inherit;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    border-bottom: 1px dashed transparent;
}
.betrag-knopf:hover { color: var(--atlas-blau-hover); border-bottom-color: var(--atlas-blau-60); }
.fest-info { display: block; font-size: 12px; line-height: 17px; font-weight: 400; color: var(--warnung); white-space: normal; max-width: 240px; cursor: help; }

/* Formular-Zeile zum Festschreiben */
.fest-formular td { background: var(--warnung-flaeche); border-bottom: 1px solid var(--warnung-rand); }
.fest-form { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; margin: 0; }
.fest-form-titel { font-weight: 600; align-self: center; }
.fest-form label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 12px; line-height: 17px; font-weight: 600; color: var(--text-2); }   /* wie .feld > label */
.fest-form label.breit { flex: 1 1 260px; }
.fest-form input, .fest-form select {
    font: inherit; font-size: 14px; line-height: 20px; min-height: var(--hoehe); padding: var(--space-2) var(--space-3);
    border: 1px solid var(--zurueck); border-radius: var(--radius-m); background: var(--komponente); color: var(--text);
}
.fest-form input:focus, .fest-form select:focus { outline: 2px solid var(--fokus); outline-offset: 1px; border-color: var(--atlas-blau); }
.fest-form input[name="wert"] { width: 140px; text-align: right; font-variant-numeric: tabular-nums; }

.blatt-hinweise ul { margin: var(--space-1) 0; padding-left: var(--space-6); }

.topf-abschluss { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.topf-abschluss form { margin: 0; }

.fest-historie { margin-top: var(--space-4); font-size: 14px; line-height: 20px; }
.fest-historie summary { cursor: pointer; color: var(--text-2); min-height: var(--hoehe-klein); display: flex; align-items: center; }

/* Zweig-Kreis: Drag & Drop zwischen „Verteilt auf" und „Nicht in der Verteilung" (2026-09-15) */
.zweig-kreis { margin: var(--space-1) 0 var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.zweig-zone {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
    min-height: var(--hoehe); padding: var(--space-2) var(--space-3);
    border: 1px dashed var(--deaktiviert); border-radius: var(--radius-m); background: var(--subtil);
}
.zweig-zone.ziel { border-color: var(--atlas-blau); background: var(--atlas-blau-20); }
.zweig-zone-label { font-size: 12px; line-height: 17px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-right: var(--space-1); }
.zweig-versteckt summary { cursor: pointer; font-size: 14px; line-height: 20px; color: var(--text-2); min-height: var(--hoehe-klein); display: flex; align-items: center; }
.zweig-versteckt .zweig-zone { margin-top: var(--space-1); }
.zweig-chip {
    display: inline-flex; align-items: center; gap: var(--space-2);
    min-height: var(--hoehe-chip); padding: 0 var(--space-1) 0 var(--space-3); border-radius: var(--radius-m);
    border: 1px solid var(--deaktiviert); background: var(--komponente); color: var(--text);
    font-size: 14px; line-height: 20px; font-weight: 400; cursor: grab;
}
.zweig-chip[draggable="false"] { cursor: default; }
.zweig-chip.zieht { opacity: 0.5; }
.zweig-chip.fest { background: var(--warnung-flaeche); border-color: var(--warnung-rand); }
.zweig-chip.ohne-ansatz { border-style: dashed; }
.zweig-chip.aus { border-color: var(--linie); color: var(--text-2); }
.chip-note { font-size: 12px; line-height: 17px; font-weight: 400; color: var(--text-2); }
.chip-knopf {
    border: 1px solid var(--linie); background: var(--subtil); color: var(--text-2);
    border-radius: var(--radius-s); min-height: 28px; padding: 0 var(--space-2); font: inherit; font-size: 12px; line-height: 17px; cursor: pointer;
}
.chip-knopf:hover { border-color: var(--atlas-blau-60); color: var(--atlas-blau-hover); }

/* Einzelpositionen mit Zweig-Schaltern */
.ist-tabelle.positionen td { vertical-align: middle; }
.ist-tabelle td.pos-konten { font-size: 14px; line-height: 20px; }
.ist-tabelle td.code { width: 1%; }
.ist-tabelle td.code span { cursor: help; }
.konto { display: block; white-space: nowrap; }
.konto b { font-weight: 600; }
.konto-nr { font-variant-numeric:tabular-nums; color: var(--text-2); margin-right: var(--space-1); }
.konto-betrag { font-size: 12px; line-height: 17px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ist-tabelle td.pos-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-left: var(--space-3); border-bottom: none; }
.ist-tabelle.positionen tr { border-bottom: 1px solid var(--linie); }
/* Aufteilung je Kammer-Zeile (zugekauft/eigen, 2026-09-17c): reine Anzeige, Berater-Wert wie Festlegung markiert */
.aufteilung-tabelle + .aufteilung-tabelle { margin-top: var(--space-3); }
.aufteilung-tabelle th { font-size: 12px; line-height: 17px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); text-align: right; padding: var(--space-1) var(--space-3) var(--space-1) 0; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.aufteilung-tabelle th.links { text-align: left; color: var(--text); font-size: 14px; line-height: 20px; letter-spacing: 0; text-transform: none; }   /* Name der Gruppe, kein Spaltenkopf */
.aufteilung-tabelle th.links span { cursor: help; }
.aufteilung-tabelle td.auft-prozent { padding-right: var(--space-1); }
.aufteilung-tabelle td.auft-betrag { color: var(--text-2); }
.aufteilung-tabelle tr.fest td { background: var(--warnung-flaeche); }
.aufteilung-tabelle td.aktion form { margin: 0; }
.chip-form { margin: 0; display: inline; }
/* Aktiver Zweig-Schalter = Produktfarbe (ATLAS-Blau, nicht Nachtblau – F-02) */
.pos-chip {
    display: inline-flex; align-items: center; gap: var(--space-1);
    min-height: var(--hoehe-chip); padding: 0 var(--space-3); border-radius: var(--radius-s);
    border: 1px solid var(--atlas-blau); background: var(--atlas-blau); color: #fff;
    font: inherit; font-size: 14px; line-height: 20px; font-weight: 400; cursor: pointer;
}
.pos-chip:hover { background: var(--atlas-blau-hover); border-color: var(--atlas-blau-hover); }
.pos-chip .chip-note { color: var(--auf-dunkel); }
.pos-chip.abgewaehlt { background: var(--komponente); color: var(--text-2); border-color: var(--linie); text-decoration: line-through; }
.pos-chip.abgewaehlt:hover { border-color: var(--atlas-blau-60); color: var(--atlas-blau-hover); text-decoration: none; }
/* bekommt an dieser Position 0 € (kein Kammer-Wert) – sieht aus wie abgewählt, ist aber keine Regel (2026-10-06) */
.pos-chip.null, .pos-chip.null:hover { cursor: default; border-color: var(--linie); color: var(--text-2); text-decoration: line-through; }
.pos-chip.fest { background: var(--warnung-flaeche); border-color: var(--warnung-rand); color: var(--warnung); cursor: default; }
.pos-chip.fest .chip-note { color: var(--warnung); }
.pos-chip.offen { background: var(--fehler-flaeche); border-color: var(--fehler-rand); color: var(--fehler); cursor: default; }
/* Zuordnung am Konto (2026-10-06): roter Chip öffnet die Auswahl, zugeordnete Konten tragen die Art als Knopf */
.pos-chip.offen.fest-oeffnen { cursor: pointer; }
.pos-chip.offen.fest-oeffnen:hover { border-color: var(--fehler); }
.pos-chip.zugeordnet { background: var(--komponente); border-color: var(--warnung-rand); color: var(--warnung); }
.pos-chip.zugeordnet:hover { background: var(--warnung-flaeche); border-color: var(--warnung); }
.fest-form.zuordnen-form { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.fest-form.zuordnen-form > * { flex: none; }
.fest-form.zuordnen-form .fest-form-titel { align-self: flex-start; }
.zuordnen-fuss { display: flex; align-items: flex-end; gap: var(--space-3); }
.fest-form .zuordnen-fuss label.breit { flex: 1 1 auto; }
.zuordnen-wahl { display: flex; flex-direction: column; gap: var(--space-1); }
.fest-form .zuordnen-wahl label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 400; font-size: 14px; line-height: 20px; color: var(--text); min-height: var(--hoehe-klein); }
.fest-form .zuordnen-wahl input[type="radio"] { min-height: 0; width: 16px; height: 16px; margin: 0; }
.zuordnen-prozente { display: inline-flex; flex-wrap: wrap; gap: var(--space-3); }
.fest-form input.zuordnen-prozent { width: 72px; min-height: var(--hoehe-klein); text-align: right; font-variant-numeric: tabular-nums; }
.zuordnen-zurueck { margin: var(--space-2) 0 0; }

/* Fluss-Ansicht der Aufteilung (2026-10-06): je Topf von oben nach unten – Topf-Karte mit der Liste der
   gebuchten Konten, darunter die Zweige, dazwischen Bänder so breit wie der Betrag (nur die Bänder sind SVG).
   Zweig-Farben = Diagrammfarben in fester Reihenfolge (F-10), Nuancen 20 % Fläche / 60 % Rand / 100 % aktiv
   (F-05), Rundungen 10/16 (A-04). Texte brechen um, nichts wird abgeschnitten. */
/* „Automatisch verteilen" (2026-10-06): Rückfrage mit konkreter Folge (S-05), Festlegungen bleiben */
.auto-bestaetigen { margin-top: var(--space-3); }
.auto-bestaetigen .meldung { flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.auto-bestaetigen form { margin: 0; }
.fluss-auto-text { flex: 1 1 260px; }
.fluss-topf-zeile .fluss-auto-knopf { margin-left: auto; }
/* Umschalter Topf | Fluss oben auf der Aufteilung (Baustein .reiter aus atlas-ui.css, hier als Links) */
.aufteilung-ansicht .reiter-knopf { text-decoration: none; }
.fz-1 { --fz: var(--dia-1); } .fz-2 { --fz: var(--dia-2); } .fz-3 { --fz: var(--dia-3); } .fz-4 { --fz: var(--dia-4); }
.fz-5 { --fz: var(--dia-5); } .fz-6 { --fz: var(--dia-6); } .fz-7 { --fz: var(--dia-7); } .fz-8 { --fz: var(--dia-8); }
.fluss-chronik { display: flex; flex-direction: column; gap: var(--space-12); }
.fluss-inhalt { position: relative; }
.fluss-baender { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.fluss-kopf { position: relative; z-index: 1; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: var(--space-2); align-items: start; }
/* Nummer des Topfs: blauer Kreis, groß die laufende Nummer, klein „/17" (Betreiber 2026-10-06) */
.fluss-nummer { padding-top: var(--space-2); }
.fluss-nummer-kreis {
    display: inline-flex; align-items: baseline; justify-content: center; width: 56px; height: 56px; padding-top: 12px;
    border-radius: 50%; background: var(--atlas-blau); color: #fff; font-variant-numeric: tabular-nums;
}
.fluss-nummer-kreis .gross { font-size: 24px; line-height: 30px; font-weight: 600; }
.fluss-nummer-kreis .klein { font-size: 12px; line-height: 17px; font-weight: 600; color: var(--auf-dunkel); }
/* Mitte: Topf-Karte mit dem „+" direkt daneben; die rechte Spalte bleibt leer, damit die Karte mittig sitzt */
.fluss-mitte { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.fluss-inhalt.liste .fluss-mitte { justify-content: flex-start; }
.fluss-topf-karte {
    flex: 0 1 480px; min-width: 0; padding: var(--space-4);
    border: 1.5px dashed var(--zurueck); border-radius: var(--radius-l); background: var(--komponente);
}
.fluss-topf-karte.vorschau { border-style: solid; border-color: var(--text-2); }
.fluss-topf-name { display: block; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); text-decoration: none; hyphens: auto; overflow-wrap: break-word; }
.fluss-topf-name:hover { color: var(--atlas-blau-hover); text-decoration: underline; }
.fluss-topf-name:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.fluss-topf-zeile { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.fluss-topf-summe { font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fluss-konten { width: 100%; border-collapse: collapse; margin-top: var(--space-3); font-size: 14px; line-height: 20px; }
.fluss-konten td { padding: var(--space-1) 0; border-top: 1px solid var(--linie); vertical-align: top; }
.fluss-konten td.name { hyphens: auto; overflow-wrap: break-word; }
.fluss-konten tr.konto-zeile[role="button"] { cursor: pointer; }
.fluss-konten tr.konto-zeile[role="button"]:hover td, .fluss-konten tr.konto-zeile.auf td { background: var(--atlas-blau-20); }
.fluss-konten tr.konto-zeile:focus { outline: none; }
.fluss-konten tr.konto-zeile:focus-visible td { box-shadow: inset 0 2px 0 var(--fokus), inset 0 -2px 0 var(--fokus); }
.fluss-konten td.punkte { width: 1%; padding-left: var(--space-2); white-space: nowrap; vertical-align: middle; }
/* Punkt je Zweig: gefüllt = bekommt etwas von diesem Konto, hohl = abgewählt */
.fluss-punkt { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--fz); border: 1.5px solid var(--fz); }
.fluss-punkt.ab { background: transparent; border-color: var(--deaktiviert); }
.fluss-konten tr.konto-schalter td { padding: var(--space-2) 0 var(--space-3); border-top: none; }
.fluss-konto-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fluss-konto-chip {
    display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--hoehe-chip); padding: 0 var(--space-3);
    border-radius: var(--radius-s); font: inherit; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text); cursor: pointer;
    border: 1.5px solid var(--fz); background: color-mix(in srgb, var(--fz) 20%, var(--komponente));
}
.fluss-konto-chip:hover { background: color-mix(in srgb, var(--fz) 60%, var(--komponente)); }
.fluss-konto-chip:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.fluss-konto-chip.ab { background: var(--komponente); border-color: var(--linie); color: var(--text-2); text-decoration: line-through; }
.fluss-konto-chip.ab:hover { border-color: var(--fz); color: var(--text); text-decoration: none; }
/* „null": bekommt bei diesem Konto 0 € (kein Kammer-Wert) – wie abgewählt, aber ohne Klick-Wirkung */
.fluss-konto-chip.null, .fluss-konto-chip.null:hover { cursor: default; border-color: var(--linie); color: var(--text-2); text-decoration: line-through; background: var(--komponente); }
.fluss-konto-chip.fest { cursor: default; background: var(--warnung-flaeche); border-color: var(--warnung-rand); color: var(--warnung); }
.fluss-konto-chip.offen { cursor: default; background: var(--fehler-flaeche); border-color: var(--fehler-rand); color: var(--fehler); }
.fluss-konten td.betrag { width: 1%; padding-left: var(--space-3); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.fluss-konten tr.eigen td.name::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); border-radius: 50%; background: var(--fz);
}
.fluss-konten tr.vorschau td { font-weight: 600; }
.fluss-plus-zelle { flex: none; padding-top: var(--space-3); }
.fluss-plus-knopf {
    display: inline-flex; align-items: center; justify-content: center; width: var(--hoehe); height: var(--hoehe); padding: 0;
    border: 1.5px solid var(--atlas-blau); border-radius: 50%; background: var(--komponente); color: var(--atlas-blau); cursor: pointer;
}
.fluss-plus-knopf:hover { background: var(--atlas-blau-20); color: var(--atlas-blau-hover); }
.fluss-plus-knopf:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.fluss-plus-knopf svg { width: 20px; height: 20px; }
/* Zweige: nebeneinander, auf schmalen Bildschirmen untereinander (Klasse .liste am Inhalt) */
.fluss-zweige { position: relative; z-index: 1; display: flex; justify-content: center; gap: var(--space-2); margin-top: 96px; }
.fluss-inhalt.liste .fluss-zweige { flex-direction: column; margin-top: var(--space-6); }
.fluss-zweig {
    position: relative; flex: 1 1 0; min-width: 0; max-width: 220px; padding: var(--space-3);
    border: 1.5px dashed color-mix(in srgb, var(--fz) 60%, transparent); border-radius: var(--radius-m);
    background: color-mix(in srgb, var(--fz) 20%, var(--komponente)); cursor: pointer;
}
/* Platz fürs × nur in der ersten Zeile – die Zeilen darunter nutzen die volle Breite */
.fluss-zweig::before { content: ""; float: right; width: 24px; height: 20px; }
.fluss-inhalt.liste .fluss-zweig { flex: none; max-width: none; display: flex; flex-direction: column; justify-content: center; padding-right: var(--space-12); }
.fluss-inhalt.liste .fluss-zweig::before { display: none; }
.fluss-zweig:hover, .fluss-zweig.aktiv, .fluss-zweig.vorschau { border-style: solid; border-color: var(--fz); }
.fluss-zweig:focus { outline: none; }
.fluss-zweig:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.fluss-zweig.fest { border-color: var(--warnung); }
.fluss-zweig.offen { --fz: var(--fehler); cursor: default; }
.fluss-zweig.offen .fluss-zweig-name { color: var(--fehler); }
/* Trennen mit Bindestrich (Seite ist lang="de"), nur notfalls hart umbrechen – nie abschneiden */
.fluss-zweig-name { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); hyphens: auto; overflow-wrap: break-word; }
.fluss-zweig-wert { display: block; margin-top: var(--space-1); font-size: 12px; line-height: 17px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fluss-zweig-wert .fest-marke { color: var(--warnung); font-weight: 600; }
/* × oben rechts am Zweig: erscheint beim Darüberfahren bzw. mit Tastatur-Fokus, auf Touch-Geräten immer */
.fluss-weg {
    position: absolute; top: var(--space-1); right: var(--space-1); display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0; border: 1.5px solid var(--text-2); border-radius: 50%;
    background: var(--komponente); color: var(--text); cursor: pointer; opacity: 0; pointer-events: none;
}
.fluss-weg::before { content: ""; position: absolute; inset: -8px; }
.fluss-zweig:hover .fluss-weg, .fluss-zweig:focus-within .fluss-weg { opacity: 1; pointer-events: auto; }
@media (hover: none) { .fluss-weg { opacity: 1; pointer-events: auto; } }
.fluss-weg:hover { border-color: var(--text); background: var(--subtil); }
.fluss-weg:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.fluss-weg svg { width: 14px; height: 14px; }
/* Bänder Topf → Zweig: transparente Fläche, gestrichelte Ränder in Zweigfarbe */
.fluss-band .flaeche { fill: color-mix(in srgb, var(--fz) 20%, transparent); }
.fluss-band .rand { fill: none; stroke: color-mix(in srgb, var(--fz) 60%, transparent); stroke-width: 1.5; stroke-dasharray: 6 4; }
.fluss-band.fest .rand { stroke: var(--warnung); }
.fluss-band.vorschau .rand { stroke: var(--fz); stroke-width: 2; stroke-dasharray: none; }
.fluss-band.offen { --fz: var(--fehler); }
/* Regler und „+"-Auswahl unter dem Topf */
.fluss-editor {
    margin-top: var(--space-4); padding: var(--space-4);
    border: 1px dashed var(--warnung-rand); border-radius: var(--radius-m); background: var(--warnung-flaeche);
}
.fluss-form input[type="range"] { width: 240px; padding: 0; border: none; background: transparent; accent-color: var(--atlas-blau); }
.fluss-form input[name="wert"] { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.fluss-vorschau { min-height: var(--hoehe); display: flex; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.fluss-zurueck { margin: var(--space-3) 0 0; }
.fluss-plus {
    margin-top: var(--space-4); padding: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
    border: 1px solid var(--linie); border-radius: var(--radius-m); background: var(--subtil);
}
.fluss-plus[hidden] { display: none; }
.fluss-plus-liste { display: flex; flex-wrap: wrap; gap: var(--space-2); flex: 1 1 auto; }
.fluss-plus-wahl {
    display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); padding: 0 var(--space-3);
    border-radius: var(--radius-m); font: inherit; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text); cursor: pointer;
    border: 1.5px dashed color-mix(in srgb, var(--fz) 60%, transparent); background: color-mix(in srgb, var(--fz) 20%, var(--komponente));
}
.fluss-plus-wahl:hover { border-style: solid; border-color: var(--fz); }
.fluss-plus-wahl:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
/* Ende: Summe je Zweig */
.fluss-ende { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.fluss-summe {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
    min-height: 48px; padding: var(--space-2) var(--space-3);
    border: 1px solid var(--linie); border-radius: var(--radius-m);
}
.fluss-summe-titel { font-weight: 600; margin-right: var(--space-2); }
.fluss-summe-chip {
    display: inline-flex; align-items: center; gap: var(--space-2); min-height: 32px; padding: 0 var(--space-3);
    border-radius: var(--radius-m); font-size: 14px; line-height: 20px;
    border: 1.5px dashed color-mix(in srgb, var(--fz) 60%, transparent); background: color-mix(in srgb, var(--fz) 20%, transparent);
}
.fluss-summe-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Atlas-Code-Version des Betriebs (Update-Maske, W2 2026-09-22) – nur Anordnung,
   Farben/Abstände aus atlas-ui.css (A-01, F-07) */
.version-zeile { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-size: 14px; line-height: 20px; }
.version-stand { font-size: 12px; line-height: 17px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.version-ok { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--erfolg); font-weight: 600; }
.version-folgen { margin: 0 0 var(--space-4); padding-left: var(--space-6); font-size: 14px; line-height: 20px; }
.version-folgen li + li { margin-top: var(--space-1); }
.version-folgen b { font-weight: 600; font-variant-numeric: tabular-nums; }
.version-folgen .version-warnung { color: var(--warnung); }
.version-grund { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-size: 14px; line-height: 20px; }
.version-details { margin-top: var(--space-3); }
.version-details summary { cursor: pointer; font-weight: 600; font-size: 14px; line-height: 20px; padding: var(--space-2) 0; }

/* Werkstatt – Atlas-Code (Etappe W3, 2026-09-22): nur Anordnung, Farben/Abstände/
   Rundungen aus atlas-ui.css (A-01, F-07). Baum links, gewählte Position rechts. */
/* Feedback-Register (W4): Rangliste, Aufklappen zeigt die Ziele */
.fb-zeile summary { display: grid; grid-template-columns: 1fr auto auto; gap: var(--space-3); align-items: center; min-height: var(--hoehe); cursor: pointer; padding: var(--space-2) 0; list-style: none; }
.fb-zeile summary::-webkit-details-marker { display: none; }
.fb-zeile { border-bottom: 1px solid var(--linie); }
.fb-konto { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.fb-konto .tag { font-variant-numeric:tabular-nums; }
.fb-konto b { font-weight: 600; }
.fb-zahlen { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); font-size: 14px; line-height: 20px; }
.fb-zahlen b { color: var(--text); font-weight: 600; }
.fb-ziele { margin: var(--space-1) 0 var(--space-3) var(--space-4); font-size: 14px; line-height: 20px; }
.fb-ziel { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-2); align-items: baseline; padding: 2px 0; }
.fb-ziel .n { font-variant-numeric: tabular-nums; }
.fb-ziel .pfad { color: var(--text-2); font-size: 12px; line-height: 17px; }
.fb-heute { margin: 0 0 var(--space-2) var(--space-4); font-size: 14px; line-height: 20px; color: var(--text-2); }
.fb-aktionen { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-1) 0 var(--space-2) var(--space-4); align-items: center; }
.fb-aktionen form { display: inline; }
.wk-flaeche { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
@media (max-width: 1100px) { .wk-flaeche { grid-template-columns: 1fr; } }
.wk-baum-karte { position: sticky; top: calc(var(--kopf-hoehe) + var(--space-4)); }
.wk-suche { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.wk-suche input { flex: 1; min-width: 0; }
.wk-baum { max-height: calc(100vh - var(--kopf-hoehe) - 160px); overflow: auto; font-size: 14px; line-height: 20px; }
.wk-knoten { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2) var(--space-1) calc(var(--space-2) + var(--tiefe, 0) * var(--space-4)); border-radius: var(--radius-s); cursor: pointer; line-height: 20px; min-height: 28px; }
/* Farben je Bilanzebene wie im Eingabe-Modul (Betreiber 2026-09-22: „so sieht unser Atlas-Code
   aus – und beim Aufklappen ein hellerer Ton derselben Farbe“): die zentralen Bilanzebenen-Tokens
   aus atlas-ui.css (--guv/--aktiva/--passiva/--sonst je mit -2, -3, -k – dieselben Werte wie in der
   Eingabe), tiefere Ebenen heller, Schrift in der Kennfarbe. */
.wk-baum { --b-1: var(--guv); --b-2: var(--guv-2); --b-3: var(--guv-3); --b-k: var(--guv-k); }
.wk-knoten.b-A { --b-1: var(--aktiva); --b-2: var(--aktiva-2); --b-3: var(--aktiva-3); --b-k: var(--aktiva-k); }
.wk-knoten.b-P { --b-1: var(--passiva); --b-2: var(--passiva-2); --b-3: var(--passiva-3); --b-k: var(--passiva-k); }
.wk-knoten.b-PK { --b-1: var(--sonst); --b-2: var(--sonst-2); --b-3: var(--sonst-3); --b-k: var(--sonst-k); }
.wk-knoten { color: var(--b-k); background: transparent; margin-bottom: 1px; }
.wk-knoten.e1 { background: var(--b-1); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; margin-top: var(--space-2); }
.wk-knoten.e2 { background: var(--b-2); }
.wk-knoten.e3 { background: var(--b-3); }
.wk-knoten.e4 { font-weight: 600; }
.wk-knoten.e5 { color: var(--text); }
.wk-knoten:hover { background: var(--subtil); }
.wk-knoten.gewaehlt { box-shadow: inset 0 0 0 2px var(--atlas-blau); font-weight: 600; }
.wk-knoten.ziel { box-shadow: inset 0 0 0 2px var(--leuchtblau); }
.wk-knoten.ziehen { opacity: 0.5; }
.wk-knoten.blatt:not(.uebrige) { cursor: grab; }
.wk-knoten.uebrige .wk-name { color: var(--text-2); font-style: italic; }
.wk-knoten.ordner .wk-name { font-weight: 600; }
.wk-knoten.gewaehlt.ordner .wk-name { font-weight: 600; }
.wk-pfeil { width: 16px; flex: 0 0 16px; text-align: center; color: var(--text-2); transition: transform 0.12s; font-size: 16px; }
.wk-knoten.offen > .wk-pfeil { transform: rotate(90deg); }
.wk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-meta { color: var(--text-2); font-size: 12px; line-height: 17px; font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.wk-entwurf-marke { font-size: 12px; }
.wk-treffer { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; margin-bottom: var(--space-2); }
.wk-treffer-zeile { display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; padding: var(--space-1) var(--space-2); border: 1px solid var(--linie); border-radius: var(--radius-s); background: var(--komponente); cursor: pointer; font: inherit; color: var(--text); }
.wk-treffer-zeile:hover { border-color: var(--atlas-blau-60); background: var(--atlas-blau-20); }
.wk-treffer-zeile .wk-name { font-size: 14px; line-height: 20px; white-space: normal; }
.wk-treffer-zeile.ordner .wk-name { font-weight: 600; }
.wk-treffer-zeile .wk-pfad { font-size: 12px; line-height: 17px; color: var(--text-2); }
.wk-detail-kopf { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.wk-detail-kopf .karte-titel { margin: 0; }
.wk-d-pfad { margin: var(--space-1) 0 var(--space-3); font-size: 14px; line-height: 20px; }
.wk-d-zahlen { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.wk-handgriffe { margin-bottom: var(--space-3); }
.wk-form { border-top: 1px solid var(--linie); padding-top: var(--space-3); }
.wk-form-titel { margin: 0 0 var(--space-2); font-size: 16px; line-height: 24px; }
.wk-zieltreffer { margin-top: var(--space-1); max-height: 220px; }
.wk-zielwahl { margin-top: var(--space-1); font-size: 14px; line-height: 20px; }
.wk-zuordnungen td { font-size: 14px; }
.wk-zuordnungen tr.wk-konto { cursor: grab; }
.wk-zuordnungen tr.wk-konto:hover td { background: var(--atlas-blau-20); }
.wk-zuordnungen tr.ziehen td { opacity: 0.5; }
.wk-f-kontozeile { margin-bottom: var(--space-2); font-size: 14px; }
.wk-treffer-zeile.konto .wk-name { font-weight: 400; }
#wk-f-konto-felder[hidden] { display: none; }
.wk-f-bez { flex: 2 1 200px; }
.wk-veroeffentlichen { margin-top: var(--space-4); border-top: 1px solid var(--linie); padding-top: var(--space-3); }
.wk-code-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--atlas-blau-60); }
.wk-code-link:hover { color: var(--atlas-blau-hover); }

/* Mein Konto (2026-10-15): Avatar (Bild oder Initialen) im Seitenleisten-Fuß
   und auf der Kontoseite; Name + Avatar als Link zur Kontoseite. Der Eintrag sitzt
   wie die übrigen Einträge im Fuß (.seitenleiste-fuss .knopf im Master): Höhe der
   kleinen Bedienelemente (B-05), Polster wie die Navigation, Hover Nachtblau-hell. */
.seitenleiste-fuss .nutzer-konto {
    display: flex; align-items: center; gap: var(--space-3);
    min-height: var(--hoehe-klein); padding: 0 var(--space-3);
    color: var(--auf-dunkel); text-decoration: none; border-radius: var(--radius-m);
    transition: background-color 0.12s;
}
.seitenleiste-fuss .nutzer-konto:hover { background: var(--nachtblau-hell); color: var(--auf-dunkel); }
.seitenleiste-fuss .nutzer-konto:focus-visible { outline: 2px solid var(--leuchtblau); outline-offset: -2px; }
.nutzer-konto-name { min-width: 0; overflow-wrap: anywhere; }
.konto-avatar {
    flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px;
    border-radius: 50%; overflow: hidden; font-size: 12px; line-height: 17px; font-weight: 600; letter-spacing: 0.02em;
    background: var(--leuchtblau-20); color: #fff;
}
/* 24-px-Avatar auf der Achse der 20-px-Symbole: je 2 px Feinversatz, der Name beginnt wie die Einträge darunter */
.seitenleiste-fuss .konto-avatar { margin: 0 -2px; }
.konto-avatar img { width: 100%; height: 100%; object-fit: cover; }
.konto-avatar-gross { width: 64px; height: 64px; font-size: 24px; line-height: 30px; background: var(--atlas-blau-20); color: var(--atlas-blau-hover); }
.konto-bild-zeile { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.konto-bild-zeile form { margin: 0; display: flex; align-items: center; gap: var(--space-3); }

/* Nutzerverwaltung (2026-10-15, Betreiber „echt unübersichtlich“):
   „gespeichert“ nur nach einem Klick – der Baustein .tag überschrieb hidden.
   Rubrik „Kunden“ je Kunde gebündelt (Zeilen wie die Kundenübersicht),
   darin drei Blöcke Zugänge · Bereiche · Berater. */
.speicher-hinweis[hidden] { display: none; }
.nk-detail { display: flex; flex-direction: column; gap: var(--space-4); }
.nk-block { border-top: 1px solid var(--linie); padding-top: var(--space-3); }
.nk-block-kopf { display: flex; align-items: center; gap: var(--space-3); min-height: 24px; margin-bottom: var(--space-2); }
.nk-titel { margin: 0; font-size: 12px; line-height: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.nk-zugang {
    display: flex; align-items: center; gap: var(--space-3); min-height: var(--hoehe);
    padding: var(--space-1) var(--space-3); border: 1px solid var(--linie);
    border-radius: var(--radius-m); background: var(--subtil); margin-bottom: var(--space-1);
}
.nk-zugang.inaktiv, .nk-zugang.inaktiv .nutzer-anzeigename, .nk-zugang.inaktiv .nutzer-benutzername { color: var(--zurueck); }   /* Farbe statt Deckkraft (F-05) */
.nk-zugang-name { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.nk-zugang-login { white-space: nowrap; }
.nk-leer { margin: 0 0 var(--space-2); }
.nk-anlegen { margin-top: var(--space-2); }
.nk-haken { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); }
.nk-haken .recht { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe-klein); cursor: pointer; }
.nk-haken .recht input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--atlas-blau); }
.nk-haken .recht.ohne-analytics { color: var(--zurueck); }
.nk-verwaist { margin-top: var(--space-4); }
.nk-nutzer-anlegen { margin-top: var(--space-4); }
.nk-nutzer-anlegen > summary { list-style: none; display: inline-flex; }
.nk-nutzer-anlegen > summary::-webkit-details-marker { display: none; }
/* Knöpfe in der aufgeklappten Kundenzeile: die Regeln von .kunden-zeile summary
   (volle Breite, Innenabstand, Aufklapp-Dreieck) gelten nur für die Kopfzeile. */
.nk-kunde .nk-block summary.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: var(--hoehe); padding: 0 var(--space-4);
}
.nk-kunde .nk-block summary.knopf.klein { min-height: var(--hoehe-klein); padding: 0 var(--space-3); }
.nk-kunde .nk-block summary::before { content: none; }

/* ---------------------------------------------------------------------------
   Planung · Übersicht der Planszenarien (2026-11-17, Register-Knoten PLANUNG).
   Je Szenario eine lange Kachel, untereinander: links das IST, daneben die
   Planjahre (Bild aus dem Artefakt). Darunter das gestrichelte Feld zum
   Hinzufügen. Nur Tokens aus atlas-ui.css. Das Planband: static/planband.css.
   --------------------------------------------------------------------------- */
.planung-liste { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.planung-liste .karte { margin: 0; display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto; gap: var(--space-4) var(--space-6); align-items: center; }
.planung-liste .karte + .karte { margin-top: 0; }
.planung-kachel-kopf { display: grid; gap: var(--space-2); justify-items: start; min-width: 0; }
.planung-kachel-titel { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.planung-kachel-titel a { color: var(--text); text-decoration: none; }
.planung-kachel-titel a:hover { color: var(--atlas-blau-hover); }
.planung-jahre { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-2); min-width: 0; color: var(--text); text-decoration: none; }
.planung-jahr { display: grid; gap: var(--space-1); padding: var(--space-2); border-radius: var(--radius-s); background: var(--atlas-blau-20); min-width: 0; }
.planung-jahr.ist { background: var(--seite); color: var(--text-2); }
.planung-jahr.unter { background: var(--fehler-flaeche); }
.planung-jahre:hover .planung-jahr:not(.ist):not(.unter) { background: var(--leuchtblau-60); }
.planung-jahr-name { font-size: 12px; line-height: 17px; font-weight: 400; color: var(--text-2); }
.planung-jahr-wert { font-size: 14px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.planung-jahr-wert.minus { color: var(--fehler); }
.planung-aktionen { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; justify-content: flex-end; max-width: 480px; }   /* vier Knöpfe in EINER Reihe; das aufgeklappte Formular bricht darunter um */
.planung-aktionen details > summary { list-style: none; cursor: pointer; }
.planung-aktionen details > summary::-webkit-details-marker { display: none; }
.planung-aktionen details[open] { flex: 1 1 100%; }
.planung-aktionen details form { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; justify-content: flex-end; margin-top: var(--space-2); }
.planung-aktionen details .feld { flex: 1 1 180px; margin: 0; }
.planung-neu { margin: 0; }
/* Steckbrief eines Betriebszweigs (planzweig.html): Bestand · eine Einheit · Ergebnis je Planjahr */
.planzweig .karte + .karte, .planzweig + .karte { margin-top: var(--space-6); }
.planzweig-bestand { max-width: 640px; }
.planzweig-bestand .eingabe, .planzweig-steckbrief .eingabe { width: 100%; min-width: 0; }
.planzweig-bestand td:nth-child(2), .planzweig-steckbrief td:nth-child(4) { width: 260px; }
.planzweig-bestand td:nth-child(3), .planzweig-steckbrief td:nth-child(5) { width: 180px; }
.planzweig-steckbrief td, .planzweig-bestand td { vertical-align: middle; }
.planzweig-mal { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-2); align-items: center; }
.planzweig-mal select.eingabe { min-width: 0; }
.planzweig-steckbrief td:nth-child(4) { width: 360px; }
/* Stück im Mengenplan lassen sich in einen anderen Monat ziehen (planzweig.js) */
.planzweig-raster input.planzweig-zieh { cursor: grab; }
body.planzweig-zieht, body.planzweig-zieht input { cursor: grabbing; user-select: none; }
.planzweig-raster input.planzweig-quelle { opacity: 0.45; }
.planzweig-raster input.planzweig-ziel { outline: 2px solid var(--fokus); outline-offset: 1px; background: var(--atlas-blau-20); }
.planzweig-einheit { font-size: 12px; line-height: 17px; color: var(--text-2); white-space: nowrap; }
.planzweig-ergebnis .planzweig-ist { background: var(--seite); color: var(--text-2); }
/* Mengenplan: ein Planjahr Monat für Monat (Vorbild Lotus „Mengenplan“). Eingabezeilen weiß, was daraus
   folgt (Menge, Geld) getönt; ein leeres Feld zeigt blass, was dort gilt. */
.planzweig-jahre { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.planzweig-raster { min-width: 1180px; table-layout: fixed; }
.planzweig-raster th:first-child, .planzweig-raster td:first-child { width: 230px; }
.planzweig-raster th.zahl, .planzweig-raster td.zahl { padding-left: var(--space-1); padding-right: var(--space-1); }
.planzweig-raster td { vertical-align: middle; }
.planzweig-raster .eingabe { width: 100%; min-width: 0; padding-left: var(--space-1); padding-right: var(--space-1); }
.planzweig-raster tr.planzweig-kopf td { padding-top: var(--space-4); font-weight: 600; border-bottom: 0; }
.planzweig-raster tr.planzweig-folge td { background: var(--seite); }
.planzweig-raster tr.planzweig-folge td.geplant { background: var(--atlas-blau-20); font-weight: 600; }
.planzweig-raster td:last-child, .planzweig-raster th:last-child { width: 96px; font-weight: 600; }
.planzweig-raster .planzweig-einheit { margin-left: var(--space-1); }
.planung-neu-preise { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; color: var(--text-2); }
.planung-neu-preise label { white-space: nowrap; }
.planung-neu-preise select.eingabe { width: auto; min-width: 180px; flex: 0 0 auto; }
/* Preisverlauf als Kurve (planpreis.html, static/planpreis.js): Zeit nach rechts, Preis nach oben */
.planpreis-bild { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.planpreis-bild text { font-family: var(--schrift); font-size: 14px; fill: var(--text-2); }
.planpreis-bild .pk-gitter { stroke: var(--linie); stroke-width: 1; }
.planpreis-bild .pk-jahr { stroke: var(--deaktiviert); stroke-width: 1; }
.planpreis-bild .pk-band { fill: var(--subtil); }
.planpreis-bild .pk-vergleich { fill: none; stroke: var(--zurueck); stroke-width: 1.5; stroke-dasharray: 6 5; }
.planpreis-bild .pk-linie { fill: none; stroke: var(--atlas-blau); stroke-width: 2.5; stroke-linejoin: round; }
.planpreis-bild .pk-greif { fill: none; stroke: transparent; stroke-width: 18; cursor: ns-resize; }
.planpreis-bild .pk-punkt { fill: var(--komponente); stroke: var(--atlas-blau); stroke-width: 2.5; cursor: grab; }
.planpreis-bild .pk-punkt:hover, .planpreis-bild .pk-punkt.aktiv { fill: var(--atlas-blau-20); stroke: var(--fokus); }
.planpreis-bild .pk-flaeche { fill: transparent; cursor: crosshair; }
.planpreis-bild .pk-wert { fill: var(--text); font-weight: 600; }
.planpreis-legende { display: flex; gap: var(--space-4); font-size: 12px; line-height: 17px; color: var(--text-2); }
.planpreis-legende span::before { content: ""; display: inline-block; width: 24px; margin-right: var(--space-1); vertical-align: middle; border-top: 2.5px solid var(--atlas-blau); }
.planpreis-legende span.vergleich::before { border-top: 1.5px dashed var(--zurueck); }
.planpreis-punkte { max-width: 420px; }
.planpreis-punkte .eingabe { width: 100%; min-width: 0; }
.planpreis-unten { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: flex-start; margin-top: var(--space-4); }
.planung-neu-knopf {
    display: block; width: 100%; min-height: 64px; padding: var(--space-4);
    border: 1px dashed var(--zurueck); border-radius: var(--radius-l); background: none; cursor: pointer;
    font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-2);
}
.planung-neu-knopf:hover { border-color: var(--atlas-blau-60); color: var(--atlas-blau-hover); background: var(--komponente); }
.planung-neu-knopf:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
@media (max-width: 1100px) {
    .planung-liste .karte { grid-template-columns: minmax(0, 1fr); }
    .planung-aktionen { justify-content: flex-start; max-width: none; }
}

/* Planung · Masken hinter dem Planband (2026-11-17 XIII: Investition, Darlehen, übrige Positionen) – eigene Seite,
   links die Maske, rechts die Liste zum Wechseln (Register-Knoten PLANUNG) */
.planmaske { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: var(--space-4); align-items: start; }
.planmaske-haupt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; }
.planmaske-haupt > * { min-width: 0; }
.planmaske-haupt > .karte, .planmaske > .karte { margin: 0; }
.planmaske-neben { display: grid; gap: var(--space-3); align-content: start; }
.planmaske-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.planmaske-liste a { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-m); color: var(--text); text-decoration: none; }
.planmaske-liste a:hover { background: var(--subtil); }
.planmaske-liste li.aktiv a { background: var(--atlas-blau-20); }
.planmaske-liste-name { font-weight: 400; overflow-wrap: anywhere; }
.planmaske-liste li.aktiv .planmaske-liste-name { font-weight: 600; }   /* nur der gewählte Eintrag (T-02) */
.planmaske-liste-info { font-size: 12px; line-height: 17px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.planmaske-null { color: var(--deaktiviert); }
/* Zeilen-Beschriftung (th scope=row) ist kein Spaltenkopf: normale Zeilenschrift statt Kopf-Band des Bausteins .tabelle */
.planmaske-tabelle th[scope="row"] {
    text-align: left; white-space: nowrap;
    font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; text-transform: none;
    color: var(--text); background: none;
}
.planmaske-tabelle tbody tr:hover th[scope="row"] { background: var(--subtil); }
@media (max-width: 1000px) { .planmaske { grid-template-columns: minmax(0, 1fr); } }
.planmaske [hidden] { display: none !important; }
.planmaske-eckdaten { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3) var(--space-4); margin: 0; }
.planmaske-eckdaten dt { font-size: 12px; line-height: 17px; font-weight: 600; color: var(--text-2); }
.planmaske-eckdaten dd { margin: 2px 0 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.planmaske-eingriffe { list-style: none; margin: 0; padding: 0; display: grid; }
.planmaske-eingriffe > li { border-top: 1px solid var(--linie); }
.planmaske-eingriffe > li:last-child { border-bottom: 1px solid var(--linie); }
.planmaske-eingriffe summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--hoehe); padding: var(--space-2) 0; cursor: pointer; list-style: none; }
.planmaske-eingriffe summary::-webkit-details-marker { display: none; }
.planmaske-eingriff-text { flex: 1 1 260px; min-width: 0; }
.planmaske-aendern { color: var(--atlas-blau); font-weight: 600; }
.planmaske-eingriffe details[open] .planmaske-aendern { color: var(--text-2); }
.planmaske-eingriffe form { padding: 0 0 var(--space-4); }
.planmaske-wahl { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-3) 0 0; padding: 0; border: 0; }
.planmaske-wahl legend { width: 100%; margin-bottom: var(--space-1); }
.planmaske-wahl label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe-klein); cursor: pointer; }
.planmaske-leer { margin: 0; color: var(--text-2); }
.planmaske-tabelle .planmaske-summe > *, .planmaske-tabelle .planmaske-summe > th[scope="row"] { font-weight: 600; background: var(--subtil); }
.planmaske-tabelle .planmaske-klein > *, .planmaske-tabelle .planmaske-klein > th[scope="row"] { font-size: 12px; line-height: 17px; color: var(--text-2); }
