        /* Warnungen: Spaltenköpfe im fixen Kopf (Walter 22.07.2026, fh-Muster). */
        #page-warnungen .wc-page-head {
            background:
                radial-gradient(ellipse 70% 50% at 85% -5%, rgba(255, 255, 255, 0.70) 0%, transparent 55%),
                linear-gradient(160deg, #f6f3ee 0%, #efebe3 48%, #faf8f5 100%);
        }
        body.theme-dark #page-warnungen .wc-page-head {
            background: rgba(26, 36, 51, 0.96) !important;
        }
        #page-warnungen .fh-cols-head-wrap {
            background: #f6f3ee;
            border-color: #ece7df;
        }
        body.theme-dark #page-warnungen .fh-cols-head-wrap { background: #2a3340; }
        #page-warnungen .wc-hint {
            flex: 0 0 auto;
            margin: 8px 0 0;
            font-size: 12px;
            color: #8b8b8b;
            line-height: 1.45;
        }

        /* Moments-Texte: Titel + Emotionsgrade + Vorlagen-Toolbar fix;
           nur Vorlagen-Liste scrollt (Walter 21.07.2026). */
        .main:has(#page-moment-texte.active) { overflow: hidden !important; }
        #page-moment-texte.active {
            height: 100% !important; max-height: 100% !important;
            overflow: hidden !important; min-height: 0 !important;
            display: flex !important; flex-direction: column !important;
        }
        #page-moment-texte .mom-texte-head {
            flex: 0 0 auto;
            background: #f8fafc;
            box-shadow: 0 6px 8px -6px rgba(0, 0, 0, 0.14);
            z-index: 5;
        }
        body.theme-dark #page-moment-texte .mom-texte-head {
            background: rgba(26, 36, 51, 0.96) !important;
            border-bottom: 1px solid var(--dlg-glass-border);
        }
        #page-moment-texte .mom-texte-title {
            margin-bottom: 0;
            padding: 8px 32px 0;
        }
        #page-moment-texte .mom-texte-title .page-title { font-size: 18px; line-height: 1.2; }
        #page-moment-texte .mom-texte-title .page-sub { margin-top: 1px; font-size: 12.5px; }
        #page-moment-texte .mom-texte-head-body {
            padding: 6px 32px 8px;
            max-width: 840px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        #page-moment-texte .mom-texte-card {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 8px 12px;
        }
        #page-moment-texte .mom-texte-card-title {
            font-weight: 700;
            font-size: 13.5px;
            color: #0f172a;
            margin-bottom: 4px;
        }
        #page-moment-texte .mom-texte-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 0;
        }
        #page-moment-texte .mom-texte-toolbar .mom-texte-card-title {
            margin-bottom: 0;
            margin-right: 4px;
        }
        #page-moment-texte .mom-tone-list > div {
            padding: 3px 0 !important;
        }
        #page-moment-texte .mom-tone-add {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            align-items: flex-end;
            margin-top: 4px;
        }
        #page-moment-texte .mom-tone-add .f-label { margin-bottom: 2px; }
        #page-moment-texte .mom-texte-scroll {
            flex: 1 1 auto; min-height: 0; overflow: auto;
            padding: 6px 32px 24px !important;
            max-width: 840px;
        }
        #page-moment-texte .mom-texte-list-card {
            padding: 10px 12px;
        }
        body.theme-dark #page-moment-texte .mom-texte-card {
            background: rgba(255,255,255,0.06);
            border-color: var(--dlg-glass-border);
        }

        /* Zweizeilige Sticky-Toolbar (Walter-Vorgabe 01.06.2026, programmweit):
           Titel-/Modus-Zeile UND Action-/Status-Zeile bleiben beim Scrollen
           oben kleben. Pattern: .sticky-top-bars umschließt beide Zeilen,
           .sticky-status-bar wird auf die zweite Zeile (oder einzelne Status-
           bars) angewendet, wenn sie NICHT direktes Geschwister von
           .sticky-top-bars ist (z.B. in Sub-Views). */
        .sticky-top-bars {
            position: sticky; top: 0; z-index: 20;
            background: #f8fafc;
            padding-top: 4px;
            padding-bottom: 6px;
            box-shadow: 0 6px 8px -6px rgba(0, 0, 0, 0.18);
        }
        body.theme-dark .sticky-top-bars {
            background: rgba(26, 36, 51, 0.90) !important;
            border-bottom: 1px solid var(--dlg-glass-border);
            backdrop-filter: blur(18px) saturate(130%);
            -webkit-backdrop-filter: blur(18px) saturate(130%);
        }
        /* Status-/Aktions-Zeile, die in einer Sub-View liegt, aber direkt
           unter der sticky-top-bars kleben soll (z.B. lohnDefinitivStatusBar
           / akontoStatusBar in den dynamisch geswitchten Views). Wird via
           CSS-Variable --sticky-top-bars-height angesteuert; Default 60px
           fängt den Standardfall ab, kann pro Seite überschrieben werden. */
        .sticky-status-bar {
            position: sticky;
            top: var(--sticky-top-bars-height, 60px);
            z-index: 15;
            background: #f8fafc;
            padding: 6px 0;
            margin-bottom: 0 !important;
        }
        body.theme-dark .sticky-status-bar {
            background: rgba(26, 36, 51, 0.88) !important;
            border-bottom: 1px solid var(--dlg-glass-border);
            backdrop-filter: blur(16px) saturate(130%);
            -webkit-backdrop-filter: blur(16px) saturate(130%);
        }

        /* Filial-Einstellungen: Themen-Gruppen + lesbare Karten
           (Walter 17.09.2026 — nicht mehr alles in einer flachen Akkordeon-Liste). */
        #fil-tab-f-einstellungen .ein-tab-lead {
            margin: 0 0 16px; padding: 0 2px;
            font-size: 13px; color: #8a8074; line-height: 1.45;
        }
        #fil-tab-f-einstellungen .ein-group { margin: 0 0 22px; }
        #fil-tab-f-einstellungen .ein-group:last-child { margin-bottom: 8px; }
        #fil-tab-f-einstellungen .ein-group-title {
            display: block; margin: 0 0 10px; padding: 0 2px;
            font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
            text-transform: uppercase; color: #8a8074;
            border: none; background: none; border-radius: 0;
        }
        #fil-tab-f-einstellungen .ein-group-body { display: flex; flex-direction: column; gap: 8px; }

        #fil-tab-f-einstellungen .emp-field-grid {
            grid-template-columns: 1fr 1fr;
            gap: 12px 16px; padding: 4px 0 8px; margin-bottom: 2px;
        }
        #fil-tab-f-einstellungen .emp-field-grid .emp-field:only-child { grid-column: 1 / -1; }
        #fil-tab-f-einstellungen .emp-field-label {
            font-size: 11px; letter-spacing: 0.04em; margin-bottom: 5px; color: #5c564c;
        }
        #fil-tab-f-einstellungen .emp-field-value {
            min-height: 38px; padding: 6px 12px;
        }
        /* Select sitzt in der weissen Wert-Box — inneren Liquid-Button nicht
           noch einmal einrahmen, sonst wirkt «Wer bestätigt» leer. */
        #fil-tab-f-einstellungen .emp-field-value:has(select),
        #fil-tab-f-einstellungen .emp-field-value:has(.lqsel-wrap) {
            background: transparent; border: none; box-shadow: none;
            padding: 0; min-height: 0; display: block;
        }
        #fil-tab-f-einstellungen .emp-field-value .lqsel-wrap {
            display: block; width: 100%; min-width: 0; max-width: none;
        }
        #fil-tab-f-einstellungen .emp-field-value .lqsel-btn {
            background: #fff; min-height: 38px; font-size: 13.5px; font-weight: 500;
            color: #3f3f3f; border: 1px solid #e2ddd3; border-radius: 9px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
        }

        /* ── Einstellungen-Tab: aufklappbare Abschnitte (Walter 08.09.2026) ── */
        .ein-sec { border: 1px solid rgba(60,55,48,0.12); border-radius: 14px; background: rgba(255,255,255,0.62);
            margin: 0; overflow: hidden;
            box-shadow: 0 1px 3px rgba(60,55,48,0.05); }
        .ein-sec > summary { list-style: none; cursor: pointer;
            display: grid; grid-template-columns: minmax(0, 1fr) auto;
            align-items: center; gap: 8px 16px;
            padding: 14px 16px; user-select: none; }
        .ein-sec > summary::-webkit-details-marker { display: none; }
        .ein-sec > summary:hover { background: rgba(60,55,48,0.04); }
        .ein-sec-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
        .ein-sec-title { font-size: 14.5px; font-weight: 700; color: #3f3f3f;
            text-transform: none; letter-spacing: 0; line-height: 1.25; }
        .ein-sec-zweck { font-size: 12.5px; font-weight: 400; color: #8a8074; line-height: 1.35; }
        .ein-sec-aside { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
        .ein-sec-sum { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px;
            max-width: 420px; }
        .ein-chip { font-size: 11.5px; font-weight: 500; color: #5c564c; white-space: nowrap;
            background: rgba(60,55,48,0.06); border: 1px solid rgba(60,55,48,0.08);
            border-radius: 999px; padding: 3px 9px; }
        .ein-sec[open] .ein-sec-sum { display: none; }
        .ein-sec-chev { font-size: 18px; color: #a39b8f; transform: rotate(90deg);
            transition: transform .15s; line-height: 1; }
        .ein-sec[open] .ein-sec-chev { transform: rotate(-90deg); }
        .ein-sec-body { padding: 6px 16px 16px; border-top: 1px solid rgba(60,55,48,0.08); }
        .ein-sec-body .emp-field-grid { margin-top: 10px; }
        .ein-hint { font-weight: 400; text-transform: none; color: #94a3b8; letter-spacing: 0; font-size: 11.5px; }
        .ein-sub { margin-top: 8px; }
        .ein-sub > summary { cursor: pointer; font-size: 12px; color: #6b6152; font-weight: 600; }
        .ein-rules { margin-top: 6px; padding: 8px 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px;
            font-size: 11.5px; color: #78350f; line-height: 1.45; }
        .ein-akonto-termine {
            margin-top: 12px; padding: 12px 14px;
            background: rgba(255,255,255,0.55); border: 1px solid rgba(60,55,48,0.10);
            border-radius: 12px;
        }
        .ein-akonto-termine-head { display: flex; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 10px; }
        .ein-akonto-termine-title { font-size: 13.5px; font-weight: 700; color: #3f3f3f; }
        .ein-akonto-termine-sub { font-size: 12px; color: #8a8074; flex: 1 1 180px; padding-top: 2px; }
        .ein-akonto-termine-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
        .ein-akonto-termine-actions label { font-size: 11.5px; color: #6b6152; font-weight: 600; }
        body.theme-dark .ein-sec { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
        body.theme-dark .ein-sec-title { color: #e2e8f0; }
        body.theme-dark .ein-sec-zweck { color: #94a3b8; }
        body.theme-dark .ein-sec-sum { color: #cbd5e1; }
        body.theme-dark .ein-chip { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: #cbd5e1; }
        body.theme-dark .ein-sec > summary:hover { background: rgba(255,255,255,0.05); }
        body.theme-dark .ein-sec-body { border-top-color: rgba(255,255,255,0.08); }
        body.theme-dark .ein-rules { background: #292524; border-color: #78350f; color: #fde68a; }
        body.theme-dark #fil-tab-f-einstellungen .ein-group-title { color: #94a3b8; }
        body.theme-dark #fil-tab-f-einstellungen .emp-field-value .lqsel-btn {
            background: rgba(255,255,255,0.06); color: #e2e8f0; border-color: rgba(255,255,255,0.12);
        }
        body.theme-dark .ein-akonto-termine { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
        body.theme-dark .ein-akonto-termine-title { color: #e2e8f0; }

        /* ── Dokumentenverwaltung ─────────────────────────────────────── */
        .dok-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; gap:12px; flex-wrap:wrap; }
        .dok-search { flex:1; padding:7px 12px; border:1px solid #e2e8f0; border-radius:8px; font-size:13px; max-width:280px; }
        .dok-upload-btn { padding:8px 16px; background:#3f3f3f; color:white; border:none; border-radius:8px;
            font-size:13px; font-weight:600; cursor:pointer; }
        .dok-upload-btn:hover { background:#1a1a1a; }
        .dok-layout { display:grid; grid-template-columns: 215px 1fr; gap:10px; min-height:400px; }
        .dok-tree {
            background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:6px;
            font-size:12.5px; overflow-y:auto; max-height:600px;
        }
        .dok-tree-node {
            padding:5px 6px; cursor:pointer; border-radius:6px; user-select:none;
            display:flex; align-items:center; justify-content:space-between;
        }
        .dok-tree-node:hover { background:#f6f3ee; }
        .dok-tree-node.active { background:#ece9e2; color:#6b7280; font-weight:600; }
        .dok-tree-cat { font-weight:600; color:#0f172a; margin-top:4px; }
        .dok-tree-typ { padding-left:18px; color:#475569; font-size:12.5px; }
        .dok-tree-count { font-size:11px; color:#94a3b8; background:#f1f5f9; padding:1px 7px; border-radius:9px; }
        .dok-tree-node.active .dok-tree-count { background:#e5e0d6; color:#6b7280; }
        .dok-tree-chevron { font-size:10px; color:#94a3b8; width:12px; display:inline-block; }

        /* Kategorie-Farbakzent als 3px-Linke-Border in der Sidebar.
           Padding-left wird kompensiert, damit die Texte trotz Border
           bündig stehen. Hue-Codes synchron zu .dok-cat-pill. */
        .dok-tree-cat[class*="cat-"] { border-left: 3px solid transparent; padding-left: 5px; }
        .dok-tree-cat.cat-persoenliche-angaben      { border-left-color: #6b6152; }
        .dok-tree-cat.cat-vertragsunterlagen        { border-left-color: #166534; }
        .dok-tree-cat.cat-lohn-arbeitszeit          { border-left-color: #92400e; }
        .dok-tree-cat.cat-absenzen                  { border-left-color: #991b1b; }
        .dok-tree-cat.cat-mitarbeiterentwicklung    { border-left-color: #6d28d9; }
        .dok-tree-cat.cat-aemter-behoerden          { border-left-color: #5a5348; }
        /* Untertypen erben Eltern-Kategoriefarbe als zarte 2-px-Connection-Line.
           Wirkt wie ein Tree-View Schienen-Strich, der das Kind visuell mit der
           Eltern-Kategorie verbindet — ohne dass jeder Typ seinen eigenen
           Farbton braucht. Padding-Anpassung kompensiert die Border. */
        .dok-tree-typ[class*="cat-"] { border-left: 2px solid; margin-left: 7px; padding-left: 16px; }
        .dok-tree-typ.cat-persoenliche-angaben      { border-left-color: rgba(30,64,175,0.35); }
        .dok-tree-typ.cat-vertragsunterlagen        { border-left-color: rgba(22,101,52,0.35); }
        .dok-tree-typ.cat-lohn-arbeitszeit          { border-left-color: rgba(146,64,14,0.35); }
        .dok-tree-typ.cat-absenzen                  { border-left-color: rgba(153,27,27,0.35); }
        .dok-tree-typ.cat-mitarbeiterentwicklung    { border-left-color: rgba(109,40,217,0.35); }
        .dok-tree-typ.cat-aemter-behoerden          { border-left-color: rgba(7,89,133,0.35); }

        .dok-list { background:white; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; display:flex; flex-direction:column; min-height:0; }
        .dok-list-header {
            padding:10px 16px; font-size:13px; font-weight:600; color:#0f172a;
            background:#f8fafc; border-bottom:1px solid #e2e8f0; flex:0 0 auto;
        }
        .dok-list-cols {
            flex:0 0 auto; overflow:hidden; background:#f8fafc;
            border-bottom:1px solid #e2e8f0;
        }
        .dok-list-cols .dok-table thead th { position:static; background:#f8fafc; }
        .dok-list-scroll {
            flex:1 1 auto; min-height:0; overflow:auto;
            overscroll-behavior:none;
        }
        .dok-list-scroll .dok-table {
            border-collapse:separate; border-spacing:0;
        }
        .dok-list-empty {
            padding:36px; text-align:center; color:#cbd5e1; font-size:13px;
        }
        /* width:max-content — Tabelle folgt dem Inhalt, nicht der Panel-Breite.
           border-collapse:separate nötig für stabiles sticky-thead (Walter 19.07.2026). */
        .dok-table { width:max-content; max-width:none; border-collapse:separate; border-spacing:0; font-size:12.5px; }
        .dok-table thead th {
            background:#f8fafc; color:#64748b; font-weight:600;
            text-transform:uppercase; font-size:10px; letter-spacing:0.03em;
            padding:6px 8px; text-align:left; border-bottom:1px solid #e2e8f0;
            white-space:nowrap;
        }
        .dok-table tbody td {
            padding:5px 8px; border-bottom:1px solid #f1f5f9; vertical-align:middle;
            color:#0f172a; line-height:1.25;
        }
        /* Datumszeile dichter an den Dateinamen rücken (Walter 24.05.2026) */
        .dok-table tbody td .dok-meta-inline { display:inline-block; margin-top:1px; }
        .dok-table tbody tr:hover td { background:#f8fafc; }
        .dok-table tbody tr:last-child td { border-bottom:none; }
        .dok-cat-pill {
            display:inline-block; background:#f6f3ee; color:#6b7280;
            font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:6px;
            white-space:nowrap;
        }
        /* Kategorie-spezifische Farben — Slug-Klasse wird in
           renderDokTableRow() generiert. Light-Mode hier, Dark-Mode
           weiter unten. Idee: jede Kategorie bekommt eine ruhige
           Pastellfarbe, die im Sehfeld sofort als "anders" wahrnehmbar
           ist, ohne den Überblick zu erschlagen. */
        .dok-cat-pill.cat-persoenliche-angaben     { background:#ece9e2; color:#6b6152; }
        .dok-cat-pill.cat-vertragsunterlagen       { background:#dcfce7; color:#166534; }
        .dok-cat-pill.cat-lohn-arbeitszeit         { background:#fef3c7; color:#92400e; }
        .dok-cat-pill.cat-absenzen                 { background:#fee2e2; color:#991b1b; }
        .dok-cat-pill.cat-mitarbeiterentwicklung   { background:#ede9fe; color:#6d28d9; }
        .dok-cat-pill.cat-aemter-behoerden         { background:#efece5; color:#5a5348; }
        .dok-meta-inline { font-size:11.5px; color:#64748b; }
        /* Dateiname/Beschreibung: immer EINE Zeile, abschneiden mit … (Walter 24.05.2026)
           max-width in rem (nicht vw) — sonst wirkt die Liste auf breiten Panels
           wie auseinandergezogen (Walter 19.07.2026). */
        .dok-name-line { display:inline-block; max-width:28rem; overflow:hidden;
                         text-overflow:ellipsis; white-space:nowrap; vertical-align:middle;
                         font-size:12.5px; }
        .dok-bemerkung-line { font-size:11.5px; color:#64748b; font-style:italic; margin-top:3px; }
        .dok-td-date { white-space:nowrap; color:#475569; font-size:12px; }
        /* Aktionen rechts nach den Datumsspalten (Tabelle max-content). */
        .dok-td-actions,
        .dok-th-actions {
            white-space:nowrap; text-align:center; width:1%;
            padding-left:8px !important; padding-right:12px !important;
            vertical-align:middle;
        }
        /* Feste Datums-Spaltenbreite — Header und Werte stehen übereinander,
           eng aneinander, ohne Lücke zur Beschreibung. */
        .dok-date-cell {
            white-space:nowrap; color:#475569; font-size:11.5px;
            font-variant-numeric:tabular-nums; padding:5px 6px !important;
            width:4.6rem; min-width:4.6rem; max-width:4.6rem;
            text-align:right; box-sizing:border-box;
        }
        .dok-table thead th.dok-sort-th[onclick*="erstellt"],
        .dok-table thead th.dok-sort-th[onclick*="geaendert"] {
            text-align:right; padding:6px 6px !important;
            width:4.6rem; min-width:4.6rem; max-width:4.6rem;
            box-sizing:border-box;
        }
        /* Sanfte ⋯ (Liquid Glass) — runde Pille, drei Punkte horizontal */
        .dok-menu-btn.dok-menu-btn-soft {
            width: 30px; height: 30px; min-width: 30px; padding: 0;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.55);
            border: 1px solid rgba(90, 80, 65, 0.14);
            color: #8b8b8b;
            box-shadow: 0 1px 2px rgba(60, 55, 48, 0.06);
            letter-spacing: 0;
            font-size: 0;
        }
        .dok-menu-btn.dok-menu-btn-soft:hover {
            background: rgba(255, 255, 255, 0.95);
            border-color: rgba(90, 80, 65, 0.28);
            color: #3f3f3f;
            box-shadow: 0 2px 8px rgba(60, 55, 48, 0.10);
        }
        .dok-menu-dots {
            display: block;
            width: 3.5px; height: 3.5px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: -6px 0 0 currentColor, 6px 0 0 currentColor;
        }
        .dok-table thead th.dok-sort-th:hover { background:#f6f3ee; color:#6b7280; }
        .dok-icon { font-size:16px; margin-right:6px; vertical-align:middle; }
        /* Walter-Vorgabe 06.06.2026: farbige Dateityp-Pille im d.velop-Stil —
           statt Emoji ein klares Format-Badge mit Typ-spezifischer Farbe. */
        .dok-ft {
            display:inline-block; font-family:monospace; font-size:9.5px;
            font-weight:700; color:#fff; background:#94a3b8;
            padding:2px 5px; border-radius:3px; margin-right:7px;
            vertical-align:middle; letter-spacing:0.04em;
            min-width:30px; text-align:center;
        }
        .dok-ft.ft-pdf   { background:#dc2626; }
        .dok-ft.ft-doc   { background:#6b7280; }
        .dok-ft.ft-xls   { background:#15803d; }
        .dok-ft.ft-ppt   { background:#d97706; }
        .dok-ft.ft-img   { background:#6b6152; }
        .dok-ft.ft-zip   { background:#475569; }
        .dok-ft.ft-other { background:#94a3b8; }
        body.theme-dark .dok-ft.ft-other { background: rgba(255,255,255,.10); }

        /* Walter-Vorgabe 09.06.2026: einheitlicher Icon-Button-Standard für ALLE
           Tabellen — gleiche Größe, gleiche Farben, sofort sichtbar (nicht erst
           bei Hover). Edit = blau-getönt mit blauem Icon, ⋮-Menü = grau mit
           dunkleren Punkten. Auf Höhe der btn-emp-edit/btn-emp-delete im Rest
           des Programms. */
        .dok-menu-wrap { position:relative; display:inline-block; }
        .dok-action-btn,
        .dok-menu-btn  {
            border:1px solid #cbd5e1; background:white; padding:4px 8px;
            border-radius:6px; cursor:pointer; line-height:1;
            display:inline-flex; align-items:center; justify-content:center;
            transition: all .12s; min-width:28px; height:28px;
        }
        .dok-action-btn { color:#1a1a1a; border-color:#e5e0d6; background:#f6f3ee; }
        .dok-action-btn:hover { background:#ece9e2; border-color:#d0c8b8; }
        /* Walter 09.06.2026: rote „Danger"-Variante für direkten Löschen-Button
           (gleicher Stil wie Edit, aber rot). Standard bleibt: Löschen im ⋮-Menü;
           Danger-Variante nur, wenn Löschen in der Zeile häufig gebraucht wird
           (z.B. Absenzen, Familie). */
        .dok-action-btn.danger { color:#dc2626; border-color:#fecaca; background:#fef2f2; }
        .dok-action-btn.danger:hover { background:#fee2e2; border-color:#fca5a5; }
        /* Walter-Vorgabe 02.09.2026 (final): fuer «Dokument ansehen» gibt es im
           Programm bereits eine Form — die gruene «Doku ✓»-Pille, wie sie bei
           den Bewilligungen und den Lohn-Abtretungen steht. Ein quadratischer
           Icon-Knopf daneben waere eine zweite Form fuer dieselbe Sache; darum
           erbt die Filial-Dokumenten-Zeile hier die Pille statt eine eigene
           Variante von .dok-action-btn zu bekommen.

           Werte 1:1 aus employees.js/permitDocBtn uebernommen, damit die beiden
           nicht auseinanderlaufen: #dcfce7 / #86efac / #15803d, Radius 6,
           Polsterung 2/7, Schrift 11px/600. */
        /* Walter-Vorgabe 02.09.2026: die Kategorie-Titel in den Filial-Dokumenten
           («ONBOARDING (VERTRAGS-LINK)», «VERSICHERUNGEN» …) waren nur grauer
           Kleintext und gingen zwischen den Dateinamen unter — man sah nicht,
           wo ein Block anfaengt. Jetzt weisse Schrift auf Kohle (#3f3f3f, das
           bestehende Dunkel der aktiven Filter-Pille und des Hochladen-Knopfs),
           damit die Blockgrenze auf einen Blick sichtbar ist. */
        .cdok-kat-titel {
            display:block; margin:18px 0 8px; padding:6px 12px;
            background:#3f3f3f; color:#fff; border-radius:8px;
            font-size:11.5px; font-weight:700;
            text-transform:uppercase; letter-spacing:.6px;
            box-shadow:0 1px 3px rgba(60,55,48,0.18);
        }
        .cdok-kat-titel:first-child { margin-top:2px; }
        body.theme-dark .cdok-kat-titel {
            background: rgba(255,255,255,.14); color:#f1f5f9; box-shadow:none;
        }

        .doku-pille {
            display:inline-flex; align-items:center; gap:3px;
            background:#dcfce7; border:1px solid #86efac; border-radius:6px;
            padding:2px 7px; cursor:pointer; color:#15803d;
            font-size:11px; font-weight:600; line-height:1;
            text-transform:none; letter-spacing:0; white-space:nowrap;
            transition: all .12s;
        }
        .doku-pille:hover { background:#bbf7d0; border-color:#4ade80; }
        body.theme-dark .doku-pille {
            background:#14532d !important; color:#bbf7d0 !important; border-color:#15803d !important;
        }
        body.theme-dark .doku-pille:hover { background:#166534 !important; }
        /* Walter 09.06.2026 (Schärfung): die ⋮-Buttons waren in der Tabelle zu
           dezent — heller Hintergrund + dünner Rand + helle Punkte. Jetzt
           dunkler Rand (#94a3b8), grauer Hintergrund (#f1f5f9), kräftigere
           Punkte (#1e293b, 19px). Damit klar als klickbarer Button erkennbar. */
        .dok-menu-btn  {
            color:#1e293b; font-size:19px; font-weight:900; line-height:1;
            background:#f1f5f9; border-color:#94a3b8;
            letter-spacing:1px;
        }
        .dok-menu-btn:hover { background:#cbd5e1; color:#0f172a; border-color:#475569; }
        body.theme-dark .dok-action-btn {
            background:#5a5348 !important; color:#ece9e2 !important; border-color:#3f3f3f !important;
        }
        body.theme-dark .dok-action-btn:hover { background:#6b6152 !important; }
        body.theme-dark .dok-action-btn.danger {
            background:#7f1d1d !important; color:#fecaca !important; border-color:#dc2626 !important;
        }
        body.theme-dark .dok-action-btn.danger:hover { background:#991b1b !important; }
        body.theme-dark .dok-menu-btn { background: var(--dlg-glass-strong) !important; color:#cbd5e1 !important; border-color: var(--dlg-glass-border) !important; }
        body.theme-dark .dok-menu-btn:hover { background: rgba(255,255,255,.10) !important; color:#f1f5f9 !important; }
        .dok-menu {
            display:none; position:absolute; top:calc(100% + 4px); right:0; min-width:140px;
            background:white; border:1px solid #e2e8f0; border-radius:8px;
            box-shadow:0 8px 24px rgba(15,23,42,0.12); z-index:200; overflow:hidden;
        }
        .dok-menu.show { display:block; }
        /* Drop-up wenn unten kein Platz mehr ist (Walter-Vorgabe 14.06.2026):
           dokToggleMenu hängt die Klasse .up dynamisch ran. */
        .dok-menu.up { top:auto; bottom:calc(100% + 4px); }
        .dok-menu-item {
            display:block; width:100%; padding:9px 14px; border:none; background:white;
            text-align:left; cursor:pointer; font-size:13px; color:#0f172a;
        }
        .dok-menu-item:hover { background:#f8fafc; }
        .dok-menu-item.danger { color:#b91c1c; border-top:1px solid #f1f5f9; }
        .dok-menu-item.danger:hover { background:#fef2f2; }
        .dok-menu-locked {
            display:block; width:100%; padding:9px 14px; border-top:1px solid #f1f5f9;
            text-align:left; font-size:12px; color:#94a3b8; cursor:default; background:#f8fafc;
        }
        body.theme-dark .dok-menu-locked { color:#64748b; background: var(--dlg-glass); border-top-color: var(--dlg-glass-border); }

        /* Walter-Vorgabe 14.06.2026: Lohnpositionen-Tabellenzeilen mit
           Theme-fähigem Hover. Vorher gab es gar keinen Hover-Effekt, im
           Dark Mode war die Liste optisch tot. */
        tr.lp-row { transition: background 0.12s; }
        tr.lp-row:hover { background: #f0f9ff; }
        body.theme-dark tr.lp-row:hover { background: #5a5348; }

        /* Massen-Import Tabelle */
        .dok-bulk-table { width:100%; border-collapse:collapse; font-size:12.5px; margin-top:10px; }
        .dok-bulk-table th { background:#f8fafc; font-weight:600; color:#64748b;
            text-transform:uppercase; font-size:10.5px; padding:6px 10px; text-align:left;
            border-bottom:1px solid #e2e8f0; position:sticky; top:0; z-index:1; }
        .dok-bulk-table td { padding:5px 8px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
        .dok-bulk-table tr.row-ok        { background:#f0fdf4; }
        .dok-bulk-table tr.row-warn      { background:#fffbeb; }
        .dok-bulk-table tr.row-error     { background:#fef2f2; }
        .dok-bulk-table tr.row-uploading { background:#f6f3ee; }
        .dok-bulk-table tr.row-done      { background:#f0fdf4; opacity:0.6; }
        .dok-bulk-table tr.row-duplicate { background:#f1f5f9; opacity:0.7; }
        .dok-bulk-status {
            display:inline-block; font-size:10.5px; font-weight:600;
            padding:1px 7px; border-radius:8px;
        }
        .dok-bulk-status.ok       { background:#dcfce7; color:#15803d; }
        .dok-bulk-status.warn     { background:#fef3c7; color:#a16207; }
        .dok-bulk-status.error    { background:#fee2e2; color:#b91c1c; }
        .dok-bulk-status.uploading { background:#ece9e2; color:#6b7280; }
        .dok-bulk-status.done     { background:#dcfce7; color:#15803d; }
        .dok-bulk-status.duplicate { background:#e2e8f0; color:#475569; }
        .dok-bulk-table select {
            padding:3px 6px; font-size:11.5px; border:1px solid #e2e8f0;
            border-radius:5px; background:white; max-width:160px;
        }
        .dok-bulk-table .filename {
            font-size:11.5px; color:#475569; max-width:280px;
            overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
        }
        .dok-bulk-progress {
            height:8px; background:#e2e8f0; border-radius:4px; overflow:hidden;
            margin:8px 0;
        }
        .dok-bulk-progress-bar {
            height:100%; background:#3f3f3f; transition:width 0.2s;
        }

        /* Dokument-Struktur Admin */
        .dokstruktur-row {
            display:flex; align-items:center; gap:10px;
            padding:10px 14px; border-bottom:1px solid #f1f5f9; cursor:pointer;
        }
        .dokstruktur-row:hover { background:#f8fafc; }
        .dokstruktur-row.active { background:#f6f3ee; border-left:3px solid #3f3f3f; padding-left:11px; }
        .dokstruktur-row:last-child { border-bottom:none; }
        .dokstruktur-actions { display:flex; gap:4px; }
        .dokstruktur-actions button:disabled {
            opacity:0.4; cursor:not-allowed;
        }
        .dok-expiry-badge { display:inline-block; font-size:10.5px; font-weight:600;
            padding:1px 7px; border-radius:8px; margin-left:6px; }
        .dok-expiry-ok      { background:#dcfce7; color:#15803d; }
        .dok-expiry-warn    { background:#fef3c7; color:#a16207; }
        .dok-expiry-expired { background:#fee2e2; color:#b91c1c; }
        .dok-actions { display:flex; gap:3px; justify-content:flex-end; }
        .dok-action {
            border:1px solid #e2e8f0; background:white; padding:5px 10px; border-radius:6px;
            font-size:11.5px; font-weight:500; color:#475569; cursor:pointer; white-space:nowrap;
        }
        .dok-action:hover { background:#f1f5f9; }
        .dok-action.danger:hover { background:#fef2f2; color:#b91c1c; border-color:#fecaca; }

        /* Upload-Modal */
        .dok-upload-form { display:flex; flex-direction:column; gap:12px; }
        .dok-upload-form label { font-size:12px; font-weight:600; color:#475569; display:block; margin-bottom:4px; }
        .dok-upload-form input, .dok-upload-form select, .dok-upload-form textarea {
            width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:7px; font-size:13px;
            font-family:inherit;
        }
        .dok-upload-form textarea { resize:vertical; min-height:60px; }
        .dok-upload-dropzone {
            border:2px dashed #cbd5e1; border-radius:10px; padding:24px; text-align:center;
            background:#f8fafc; transition:all 0.15s; cursor:pointer;
        }
        .dok-upload-dropzone:hover, .dok-upload-dropzone.dragover {
            border-color:#3f3f3f; background:#f6f3ee;
        }
        .dok-upload-dropzone-text { color:#64748b; font-size:13px; }
        .dok-upload-dropzone-file { color:#0f172a; font-weight:600; font-size:13.5px; word-break:break-all; }

        .emp-placeholder {
            display: flex; align-items: center; justify-content: center;
            height: 100%; color: #cbd5e1; font-size: 14px; flex-direction: column; gap: 8px;
        }
        /* Familie: Leerzeile mit Text + Button in einer Zeile (Walter 27.07.2026). */
        .emp-familie-empty-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            padding: 18px 4px 10px;
            min-height: 56px;
        }
        .emp-familie-empty-msg {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #8b8b8b;
            font-size: 14px;
            font-weight: 500;
        }
        .emp-familie-empty-msg svg { color: #cbd5e1; flex-shrink: 0; }
        body.theme-dark .emp-familie-empty-msg { color: #94a3b8; }
        body.theme-dark .emp-familie-empty-msg svg { color: #64748b; }
        /* Tab-Toolbars (Bank, Permit, Zulagen etc.) — sticky oben. */
        .emp-familie-toolbar,
        .emp-tab-toolbar {
            display: flex; justify-content: flex-end; margin-bottom: 16px;
            position: sticky; top: 0; z-index: 5;
            background: white; padding: 6px 0;
        }
        body.theme-dark .emp-familie-toolbar,
        body.theme-dark .emp-tab-toolbar { background: var(--dlg-glass); }
        .btn-emp-add {
            display: flex; align-items: center; gap: 6px;
            padding: 7px 14px; background: #3f3f3f; color: white;
            border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
            cursor: pointer; font-family: inherit; transition: background 0.2s;
        }
        .btn-emp-add:hover { background: #1a1a1a; }
        .btn-emp-edit {
            padding: 4px 10px; background: transparent; border: 1px solid #e2e8f0;
            border-radius: 6px; font-size: 12px; color: #64748b; cursor: pointer;
            font-family: inherit; transition: all 0.15s;
        }
        .btn-emp-edit:hover { background: #f1f5f9; color: #0f172a; }
        .btn-emp-del {
            padding: 4px 10px; background: transparent; border: 1px solid #fecaca;
            border-radius: 6px; font-size: 12px; color: #ef4444; cursor: pointer;
            font-family: inherit; transition: all 0.15s;
        }
        .btn-emp-del:hover { background: #fef2f2; }

        /* Edit-Modus Inputs — sitzen IM .emp-field-Container (der hat Border
           + Background), daher transparent + ohne eigenen Rahmen. So sind
           Felder im Edit- und Read-Modus optisch deckungsgleich gross. */
        .ef-input {
            width: 100%; padding: 0; border: none; border-radius: 0;
            font-size: 13px; font-weight: 500; font-family: inherit;
            color: #0f172a; background: transparent;
            box-sizing: border-box; transition: background .15s;
            line-height: 1.3; min-height: 18px;
        }
        .ef-input:focus { outline: none; background: #f6f3ee; }
        .ef-input:hover { background: #f1f5f9; }
        select.ef-input { appearance: auto; padding-right: 18px; }
        /* Date-Inputs zeigen den Calendar-Picker-Knopf rechts — kompakt halten */
        input[type="date"].ef-input { padding-right: 0; }
        /* Gruppen-Zwischentitel im Filial-Einstellungen-Tab (Arbeitszeit,
           Karenz, L-GAV …) — gleicher Stil wie .emp-section-title in der
           MA-Maske (Walter-Vorgabe 27.05.2026). */
        .ein-group-title {
            font-size: 10.5px; font-weight: 800; color: #5a5348; text-transform: uppercase;
            letter-spacing: 0.08em; margin: 12px 0 0;
            padding: 4px 0 4px 10px;
            border-left: 4px solid #1a1a1a;
            background: linear-gradient(to right, #ece9e2 0%, #f6f3ee 60%, transparent 90%);
            border-radius: 3px 3px 0 0;
        }
        body.theme-dark .ein-group-title {
            color: #e2e8f0 !important;
            border-left-color: #3f3f3f !important;
            background: linear-gradient(to right, #1e293b 0%, transparent 70%) !important;
        }
        /* Primär-Button = ruhige Kohle-Pille (Walter-Vorgabe: kein grelles #3f3f3f mehr) */
        .btn-primary {
            background: #3f3f3f; color: #fff; border: none; border-radius: 10px;
            font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 600;
            box-shadow: 0 5px 14px rgba(60,55,48,.16);
            transition: background .15s, box-shadow .15s;
        }
        .btn-primary:hover { background: #1a1a1a; box-shadow: 0 7px 18px rgba(60,55,48,.22); }
        .btn-secondary {
            background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; border-radius: 7px;
            font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 500;
            transition: background .15s;
        }
        .btn-secondary:hover { background: #e2e8f0; }

        /* Saldi-Vortrag — Felder im Modal (Light Mode) */
        .sv-field label {
            display:block; font-size:12px; font-weight:600;
            color:#475569; margin-bottom:5px;
        }
        .sv-field .sv-unit { color:#94a3b8; font-weight:400; }
        .sv-field input {
            width:100%; padding:8px 12px;
            border:1.5px solid #e2e8f0; border-radius:8px;
            font-size:14px; font-family:monospace; background:white;
        }
        .sv-field input:focus {
            outline:none; border-color:#3f3f3f;
            box-shadow:0 0 0 3px rgba(63,63,63,0.12);
        }
        .sv-field .sv-hint { font-size:11px; color:#94a3b8; margin-top:3px; }
        /* Vertragstyp-spezifische Hervorhebung */
        .sv-field.sv-active label { color:#0f172a; }
        .sv-field.sv-active input { border-color:#3f3f3f; background:#f6f3ee; }
        .sv-field.sv-inactive { opacity:0.45; }
        .sv-field.sv-inactive .sv-hint::before {
            content:'⊘ '; color:#94a3b8;
        }
        /* Saldi-Vortrag — Vertragstyp-Badge (Modal-Header und List-Row) */
        .sv-vertrag-badge {
            display:inline-block;
            padding:2px 9px; border-radius:10px;
            font-size:11px; font-weight:700; letter-spacing:0.04em;
            min-width:42px; text-align:center;
        }
        /* Im Modal-Header braucht's Abstand zum vorherigen Text */
        #svModalSubtitle .sv-vertrag-badge { margin-left:10px; }
        .sv-vertrag-badge.utp   { background:#fef3c7; color:#92400e; }
        .sv-vertrag-badge.mtp   { background:#d1fae5; color:#065f46; }
        .sv-vertrag-badge.fix   { background:#ece9e2; color:#6b7280; }
        .sv-vertrag-badge.fix-m { background:#ede9fe; color:#6d28d9; }
        .sv-vertrag-badge.none  { background:#fee2e2; color:#991b1b; }

        /* Saldi-Vortrag — Felder im Modal (Dark Mode) */
        body.theme-dark .sv-field label    { color:#cbd5e1 !important; }
        body.theme-dark .sv-field .sv-unit { color:#94a3b8 !important; }
        body.theme-dark .sv-field input    {
            background: var(--dlg-glass-strong) !important;
            color:#f1f5f9 !important;
            border-color: var(--dlg-glass-border) !important;
        }
        body.theme-dark .sv-field .sv-hint { color:#94a3b8 !important; }
        body.theme-dark .sv-field.sv-active label { color:#f1f5f9 !important; }
        body.theme-dark .sv-field.sv-active input {
            border-color:#3f3f3f !important;
            background: var(--dlg-active) !important;
        }
        body.theme-dark .sv-vertrag-badge.utp   { background:#422006 !important; color:#fcd34d !important; }
        body.theme-dark .sv-vertrag-badge.mtp   { background:#064e3b !important; color:#6ee7b7 !important; }
        body.theme-dark .sv-vertrag-badge.fix   { background: var(--dlg-active) !important; color:#d0c8b8 !important; }
        body.theme-dark .sv-vertrag-badge.fix-m { background:#2e1065 !important; color:#c4b5fd !important; }
        body.theme-dark .sv-vertrag-badge.none  { background:#450a0a !important; color:#fca5a5 !important; }

        /* Saldi-Vortrag-Liste — Light Mode */
        .sv-list-row {
            display:flex; align-items:center; gap:12px;
            padding:10px 14px; border-bottom:1px solid #f1f5f9;
            cursor:pointer; background:white; transition:background .12s;
        }
        .sv-list-row:hover { background:#f8fafc; }
        .sv-list-row:last-child { border-bottom:none; }
        .sv-avatar {
            width:34px; height:34px; border-radius:50%;
            background:#e2e8f0; color:#475569;
            display:flex; align-items:center; justify-content:center;
            font-weight:700; font-size:12px; flex-shrink:0;
        }
        .sv-row-text { flex:1; min-width:0; }
        .sv-row-name { font-weight:600; font-size:13px; color:#0f172a; }
        .sv-row-nr   { font-size:11px; color:#94a3b8; }
        .sv-status-ok {
            background:#dcfce7; color:#15803d;
            padding:2px 9px; border-radius:10px;
            font-size:11px; font-weight:600;
        }
        .sv-status-open {
            background:#fef3c7; color:#92400e;
            padding:2px 9px; border-radius:10px;
            font-size:11px; font-weight:600;
        }
        /* Saldi-Vortrag-Liste — Dark Mode Overrides */
        body.theme-dark .sv-list-row {
            background:transparent !important;
            border-bottom-color: var(--dlg-glass-border) !important;
        }
        body.theme-dark .sv-list-row:hover {
            background: var(--dlg-active) !important;
        }
        body.theme-dark .sv-avatar {
            background: var(--dlg-glass-strong) !important;
            color:#cbd5e1 !important;
        }
        body.theme-dark .sv-row-name { color:#f1f5f9 !important; }
        body.theme-dark .sv-row-nr   { color:#94a3b8 !important; }
        body.theme-dark .sv-status-ok {
            background:#064e3b !important;
            color:#6ee7b7 !important;
        }
        body.theme-dark .sv-status-open {
            background:#422006 !important;
            color:#fcd34d !important;
        }

        /* Import */
        .import-drop-zone {
            border: 2px dashed #cbd5e1; border-radius: 12px; padding: 36px 24px;
            text-align: center; cursor: pointer; transition: all .2s;
        }
        .import-drop-zone:hover, .import-drop-zone.drag-over {
            border-color: #3f3f3f; background: #f6f3ee;
        }
        .import-spinner {
            width: 18px; height: 18px; border: 2.5px solid #e5e0d6;
            border-top-color: #3f3f3f; border-radius: 50%;
            animation: spin .7s linear infinite; flex-shrink: 0;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .import-result-ok {
            background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
            padding: 16px 20px; color: #166534;
        }
        .import-result-warn {
            background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
            padding: 16px 20px; color: #92400e; margin-top: 10px;
        }
        .import-result-err {
            background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
            padding: 16px 20px; color: #991b1b;
        }

        /* Stempelzeiten */
        .stamp-toolbar {
            display: flex; align-items: center; gap: 12px;
            flex-wrap: wrap;
            position: sticky; top: 0; z-index: 20;
            background: white;
            margin: 0 -24px; padding: 14px 24px 12px;
            border-bottom: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        .stamp-nav { display: flex; align-items: center; gap: 8px; }
        .btn-stamp-nav {
            background: #f1f5f9; border: none; border-radius: 6px;
            width: 28px; height: 28px; cursor: pointer; font-size: 16px;
            display: flex; align-items: center; justify-content: center; color: #475569;
        }
        .btn-stamp-nav:hover { background: #e2e8f0; }
        .stamp-month-label { font-weight: 600; font-size: 14px; color: #1e293b; min-width: 140px; text-align: center; }
        .stamp-summary { margin-left: auto; font-size: 13px; color: #64748b; }
        .stamp-hours-summary {
            display: flex; align-items: center; gap: 20px;
            margin-left: auto; background: #f8fafc;
            border: 1px solid #e2e8f0; border-radius: 10px;
            padding: 8px 16px;
        }
        .stamp-hours-item { display: flex; flex-direction: column; align-items: center; gap: 1px; }
        .stamp-hours-sep { border-left: 1px solid #e2e8f0; padding-left: 16px; margin-left: 4px; }
        .stamp-hours-label { font-size: 10px; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.05em; color: #94a3b8; }
        .stamp-hours-value { font-size: 14px; font-weight: 700; color: #1e293b; }
        .stamp-diff-pos { color: #16a34a; }
        .stamp-diff-neg { color: #dc2626; }
        .stamp-model-badge {
            display: inline-block; font-size: 11px; font-weight: 700;
            padding: 2px 8px; border-radius: 99px; letter-spacing: 0.06em;
            text-transform: uppercase; margin-left: 6px; vertical-align: middle;
        }
        .stamp-model-fix   { background: #ece9e2; color: #6b7280; }
        .stamp-model-fix-m { background: #ede9fe; color: #6d28d9; }
        .stamp-model-mtp   { background: #d1fae5; color: #065f46; }
        .stamp-model-utp   { background: #fef3c7; color: #92400e; }

        /* ── Absenzen ─────────────────────────────────────────────── */
        .abs-toolbar { display:flex; align-items:center; justify-content:flex-end; padding:12px 0 10px; }
        .abs-table { width:100%; border-collapse:collapse; font-size:13px; }
        .abs-table th { background:#f8fafc; color:#64748b; font-weight:600;
            padding:8px 10px; text-align:left; border-bottom:1px solid #e2e8f0;
            font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
        .abs-table td { padding:8px 10px; border-bottom:1px solid #f1f5f9; vertical-align:top; }
        .abs-days-cell { font-size:12px; color:#475569; max-width:260px; line-height:1.5; }
        .abs-notes { font-size:12px; color:#64748b; }
        /* Walter-Vorgabe 09.06.2026: Aktions-Buttons rechtsbündig in der Zeile
           — gleiche Position wie in der Doku-Tabelle. */
        .abs-actions {
            white-space:nowrap; text-align:right; width:1%;
            padding-right:14px !important;
        }
        .abs-actions > * { vertical-align:middle; }
        .abs-actions > * + * { margin-left:6px; }
        .abs-type-badge { display:inline-block; font-size:11px; font-weight:700;
            padding:2px 9px; border-radius:99px; letter-spacing:.05em; white-space:nowrap; }
        .abs-type-krank    { background:#fee2e2; color:#991b1b; }
        .abs-type-unfall   { background:#ffedd5; color:#9a3412; }
        .abs-type-schulung { background:#ece9e2; color:#6b6152; }
        .abs-type-ferien   { background:#d1fae5; color:#065f46; }
        .abs-type-feiertag { background:#fef3c7; color:#92400e; }
        .abs-type-nacht    { background:#ede9fe; color:#5b21b6; }
        .abs-hours-pos   { color:#16a34a; font-weight:700; }
        .abs-hours-neg   { color:#dc2626; font-weight:700; }
        .abs-hours-label { font-size:11px; color:#64748b; margin-left:4px; }

        /* Kritische Bestands-Absenzen: Überlappung / AU-Unterbrechung (Walter 26.07.2026) */
        .abs-critical-banner {
            margin: 0 0 10px;
            padding: 10px 12px;
            border-radius: 12px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #7f1d1d;
            font-size: 12.5px;
            line-height: 1.45;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .abs-critical-banner strong { font-size: 13px; font-weight: 700; }
        .abs-critical-banner span { color: #991b1b; }
        .abs-table-body tr.abs-row-critical td {
            background: #fef2f2 !important;
            box-shadow: inset 3px 0 0 #dc2626;
        }
        .abs-critical-badge {
            display: inline-block;
            margin-left: 6px;
            margin-top: 3px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: .04em;
            text-transform: uppercase;
            color: #fff;
            background: #b91c1c;
            padding: 2px 7px;
            border-radius: 99px;
            vertical-align: middle;
        }
        .abs-critical-hint {
            margin-top: 4px;
            font-size: 11px;
            font-weight: 600;
            color: #b91c1c;
            line-height: 1.35;
        }
        body.theme-dark .abs-critical-banner {
            background: rgba(127, 29, 29, 0.35);
            border-color: rgba(248, 113, 113, 0.45);
            color: #fecaca;
        }
        body.theme-dark .abs-critical-banner span { color: #fca5a5; }
        body.theme-dark .abs-table-body tr.abs-row-critical td {
            background: rgba(127, 29, 29, 0.28) !important;
            box-shadow: inset 3px 0 0 #f87171;
        }
        body.theme-dark .abs-critical-hint { color: #fca5a5; }

        /* Absenz-Modal */
        .abs-modal-box { background:#fff; border-radius:12px; width:100%; max-width:560px;
            box-shadow:0 20px 60px rgba(0,0,0,.2); }
        .abs-hours-preview-box { background:#f8fafc; border:1px solid #e2e8f0;
            border-radius:8px; padding:12px 16px; display:flex; align-items:center; gap:10px; }
        .abs-hours-preview-title { font-size:12px; font-weight:600; color:#64748b;
            text-transform:uppercase; letter-spacing:.05em; white-space:nowrap; }
        .abs-day-label { font-size:12px; font-weight:600; color:#475569; margin-bottom:8px; }
        .abs-day-info  { font-size:13px; color:#64748b; padding:8px 0; }
        /* Walter-Vorgabe 28.05.2026: 7-Spalten-Wochenraster Mo-So.
           Leere Vor-Zellen für den Wochen-Versatz halten die Spalten ausgerichtet. */
        .abs-day-grid  { display:grid; grid-template-columns:repeat(7, 1fr); gap:8px; }
        .abs-day-item  { display:flex; flex-direction:column; align-items:center;
            border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; cursor:pointer;
            background:#f8fafc; gap:3px; transition:background .15s; min-width:0; }
        /* Walter-Vorgabe 13.08.2026: MARKANTE Unterscheidung — gewählte
           («hätte gearbeitet», zählt ×WoStd÷5) Tage = dunkle Kohle-Kachel mit ✓,
           nicht gewählte (zählen 0 h) = hell und gedimmt. */
        .abs-day-item:has(input:checked) { background:#6b6152; border-color:#5a5348;
            box-shadow:0 2px 8px rgba(60,55,48,0.20); }
        .abs-day-item:has(input:checked) .abs-day-name { color:#fff; }
        .abs-day-item:has(input:checked) .abs-day-date { color:#e8e4dc; }
        .abs-day-item:has(input:checked) .abs-day-name::before { content:'✓ '; }
        .abs-day-item:not(:has(input:checked)) { opacity:0.55; }
        .abs-day-item:not(:has(input:checked)):hover { opacity:0.85; }
        /* Walter-Vorgabe 30.05.2026: Sa+So sind in der Gastro normale Arbeitstage —
           sie sollen visuell GLEICHWERTIG aussehen, nicht ausgegraut. Eine dezente
           gelbliche Tönung kennzeichnet sie nur als "Wochenende", ohne Disabled-Look. */
        .abs-day-weekend:not(:has(input:checked)) { background:#fefce8; }
        .abs-day-weekend:has(input:checked) { background:#6b6152; }
        .abs-day-empty { /* unsichtbarer Platzhalter für Tage vor Mo der ersten Woche */
            background:transparent; border:none; cursor:default; visibility:hidden; }
        /* Schnellauswahl-Buttons (Mo-Fr / 5-2-Muster / Alle / Keine) */
        .abs-day-quick { display:flex; gap:6px; margin-bottom:8px; flex-wrap:wrap; }
        .abs-day-quick button {
            font-size:11px; padding:4px 10px; border:1px solid #cbd5e1; border-radius:6px;
            background:#fff; color:#475569; cursor:pointer; font-weight:500;
        }
        .abs-day-quick button:hover { background:#f1f5f9; border-color:#94a3b8; }
        .abs-day-name  { font-size:12px; font-weight:600; color:#1e293b; }
        .abs-day-date  { font-size:11px; color:#64748b; }
        /* Zeitraum-Kalender im Absenz-Fenster (Walter 13.10.2026) */
        .abs-cal { margin:2px 0 14px; padding:10px 14px 12px; border-radius:14px;
            background:rgba(255,255,255,0.38); border:1px solid rgba(255,255,255,0.62);
            box-shadow:0 2px 10px rgba(60,55,48,0.10); }
        .abs-cal-kopf { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
        .abs-cal-status { flex:1; text-align:center; font-size:12.5px; color:#646464; font-weight:600; }
        .abs-cal-nav { width:30px; height:30px; border-radius:10px; border:1px solid rgba(60,55,48,0.18);
            background:rgba(255,255,255,0.7); color:#3f3f3f; font-size:17px; line-height:1; cursor:pointer; }
        .abs-cal-nav:hover { background:#fff; }
        .abs-cal-monate { display:flex; gap:24px; flex-wrap:wrap; justify-content:center; }
        .abs-cal-monat { flex:1 1 240px; max-width:320px; }
        .abs-cal-titel { text-align:center; font-size:13px; font-weight:700; color:#3f3f3f; margin-bottom:4px; }
        .abs-cal-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:2px 0; }
        .abs-cal-wt { text-align:center; font-size:10.5px; font-weight:700; color:#8b8b8b; padding:2px 0 4px; }
        .abs-cal-tag { height:30px; border:none; background:transparent; font-size:12.5px; color:#3f3f3f;
            cursor:pointer; border-radius:8px; font-variant-numeric:tabular-nums; }
        .abs-cal-tag.we { color:#8b8b8b; }
        .abs-cal-tag:hover { background:rgba(60,55,48,0.10); }
        .abs-cal-tag.heute { box-shadow:inset 0 0 0 1.5px rgba(60,55,48,0.35); }
        .abs-cal-tag.in, .abs-cal-tag.vorschau { background:rgba(107,97,82,0.18); border-radius:0; }
        .abs-cal-tag.start, .abs-cal-tag.ende { background:#6b6152; color:#fff; font-weight:700; }
        .abs-cal-tag.start { border-radius:8px 0 0 8px; }
        .abs-cal-tag.ende { border-radius:0 8px 8px 0; }
        .abs-cal-tag.start.ende { border-radius:8px; }
        body.theme-dark .abs-cal { background:rgba(30,41,59,0.55); border-color:rgba(255,255,255,0.08); }
        body.theme-dark .abs-cal-tag, body.theme-dark .abs-cal-titel, body.theme-dark .abs-cal-nav { color:#e2e8f0; }
        body.theme-dark .abs-cal-nav { background:#334155; }
        .abs-day-item input { display:none; }
        /* Mini-Header-Zeile mit Wochentag-Buchstaben (Mo Di Mi Do Fr Sa So) */
        .abs-day-grid-head {
            display:grid; grid-template-columns:repeat(7, 1fr); gap:8px;
            font-size:10px; font-weight:700; color:#94a3b8; text-transform:uppercase;
            letter-spacing:.06em; text-align:center; margin-bottom:4px;
        }

        /* Vertragstypen-Tabs */
        .vt-tab { padding:10px 18px; border:none; background:none; font-size:14px; font-weight:600;
            color:#64748b; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px;
            transition:color .15s, border-color .15s; }
        .vt-tab:hover { color:#334155; }
        .vt-tab.active { color:#9d174d; border-bottom-color:#9d174d; }

        .stamp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
        .stamp-table th {
            background: #f8fafc; color: #64748b; font-weight: 600;
            padding: 8px 10px; text-align: left;
            border-bottom: 2px solid #e2e8f0; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
            position: sticky; top: var(--stamp-thead-top, 62px); z-index: 10;
        }
        .stamp-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
        .stamp-day-first td { border-top: 2px solid #e2e8f0; }
        .stamp-date-cell { white-space: nowrap; min-width: 80px; }
        .stamp-weekday { font-size: 11px; color: #94a3b8; text-transform: uppercase; }
        .stamp-date { font-weight: 600; font-size: 13px; color: #1e293b; }
        .stamp-day-total { font-size: 11px; color: #3f3f3f; margin-top: 2px; }
        .stamp-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
        .stamp-hrs { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
        .stamp-night { font-size: 11px; color: #7c3aed; margin-left: 6px; }
        .stamp-comment { font-size: 12px; color: #f59e0b; font-style: italic; }
        .stamp-actions { text-align: right; white-space: nowrap; }
        .stamp-abs-row td { background: #f0fdf4; }
        /* Audit: geänderte Zeilen */
        .stamp-row-edited td { background: #fff7ed; }
        .stamp-row-edited .stamp-time,
        .stamp-row-edited .stamp-hrs { color: #c2410c; }
        .stamp-audit-info {
            font-size: 11px; color: #9a3412; margin-top: 3px;
            font-style: italic; opacity: 0.85;
        }
        .stamp-abs-cell { padding: 5px 10px; }

        /* ── Lohnabrechnung ─────────────────────────────────── */
        .lohn-emp-row { display:flex;align-items:center;gap:10px;padding:6px 14px;cursor:pointer;border-bottom:1px solid #f8fafc;transition:background .12s; }
        .lohn-emp-row:hover { background:#f8fafc; }
        /* Auswahl klar sichtbar auch auf hellen Monitoren (Walter 02.08.2026) */
        .lohn-emp-active {
            background: #ddd5c8 !important;
            border-left: 3px solid #3f3f3f !important;
            padding-left: 11px !important;
            box-shadow: inset 0 0 0 1px rgba(60,55,48,0.10);
        }
        /* Akonto-Modus: Definitivlauf-spezifische Elemente hart verstecken.
           Walter-Bug-Fix 16.05.2026 — die Definitivlauf-Loader (loadLohnSlip,
           loadLohnPeriodBanner) laufen async parallel zum Akonto-Init und
           re-aktivieren ihre Elemente via inline display:block/flex. Diese
           CSS-Regel überschreibt das mit !important, solange die Body-Klasse
           lohn-mode-akonto gesetzt ist (von setLohnMode in akonto-workflow.js). */
        body.lohn-mode-akonto #lohnPeriodBanner,
        body.lohn-mode-akonto #lohnTopActions,
        body.lohn-mode-akonto #lohnDefinitivView {
            display: none !important;
        }
        /* Kompakt-Modus: Schriften wie im Original, aber Padding/Margins
           und Line-Heights deutlich reduziert. Macht den Lohnzettel
           kompakter ohne Lesbarkeit zu opfern. */
        /* Walter 19.05.2026: enger als Original, aber Schrift wieder etwas
           grösser (Walter-Update: MA-Name aus Header ist raus → mehr Platz
           → Lesbarkeit über Kompaktheit). */
        .ls-wrap { padding:6px 18px 4px;font-size:13px;color:#1e293b;max-width:860px;line-height:1.25; }
        .ls-header { display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:6px; }
        .ls-company { font-size:12px;line-height:1.3;color:#334155; }
        .ls-title-center { font-size:15px;font-weight:700;color:#1e293b;text-align:right; }
        .ls-recipient { font-size:13px;line-height:1.3;margin-bottom:5px; }
        .ls-date-line { font-size:13px;margin-bottom:1px; }
        .ls-period-label { font-size:13px;font-weight:600;margin-bottom:4px; }
        /* Walter-Vorgabe 27.05.2026: Lohnzettel-Tabelle muss IMMER in den
           Card-Container passen — die Spalten werden kompakter (kleineres
           Padding, kleinere Schrift in den Zahlen-Spalten), Description-
           Spalte darf umbrechen wenn zu lang. ls-wrap clipped horizontal. */
        .ls-wrap { max-width:100%; overflow-x:hidden; }
        /* Walter-Vorgabe 01.06.2026: Schriftgröße angehoben für bessere
           Lesbarkeit auf dem Bildschirm. Beim PDF-Export greifen separate
           Layout-Regeln im PayrollPdfService — diese Anpassung wirkt nur
           in der Web-Anzeige des Lohnzettels. */
        .ls-table { width:100%;border-collapse:collapse;font-size:13.5px;table-layout:auto; }
        .ls-table th { text-align:left;border-bottom:1px solid #1e293b;padding:3px 4px;font-size:12px;font-weight:600;color:#475569; }
        .ls-table th.ls-num, .ls-table th.ls-amt { text-align:right; }
        .ls-table td { padding:2px 4px;vertical-align:top;line-height:1.35; }
        .ls-desc { width:auto;white-space:normal;word-break:break-word; }
        /* Nummer in fester Spalte, Text bündig links (Walter 28.11.2026) */
        .ls-wrap .ls-lp { display:inline-block;vertical-align:top;width:58px;box-sizing:border-box;padding:2px 8px 0 0;font-size:11px;font-style:italic;font-variant-numeric:tabular-nums;white-space:nowrap; }
        .ls-wrap .ls-lp-text { display:inline-block;vertical-align:top;width:calc(100% - 58px); }
        /* Berechnung Tagessatz unten (Walter 28.11.2026): Herleitung unter der Bezeichnung */
        .ls-wrap .ls-tagessatz-formel { display:block;font-size:12.5px;color:var(--oc-text-2);margin-top:1px; }
        .ls-num  { width:1%;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;padding-left:6px;font-size:13px; }
        .ls-amt  { width:1%;text-align:right;font-variant-numeric:tabular-nums;font-weight:500;white-space:nowrap;padding-left:6px;font-size:13px; }
        .ls-section-hd td { font-weight:600;padding-top:3px;padding-bottom:1px;color:#1e293b; }
        .ls-total-row td { font-weight:700;border-top:1px solid #e2e8f0;padding-top:2px; }
        .ls-netto-row td { font-weight:700;font-size:14px;border-top:2px solid #1e293b;padding-top:3px;padding-bottom:2px; }
        .ls-col-hd th { border-bottom:1px solid #e2e8f0;padding:3px 5px 1px;font-size:10.5px;font-weight:500;color:#94a3b8;text-transform:uppercase;letter-spacing:.4px; }
        .ls-hours-box { margin-top:6px;background:#f8fafc;border-radius:6px;padding:6px 10px;font-size:12px; }
        .ls-hours-row { display:flex;justify-content:space-between;padding:1px 0;color:#475569; }
        .ls-thirteenth { margin-top:5px;border-top:1px solid #e2e8f0;padding-top:4px;font-size:12px;line-height:1.4;color:#475569; }
        .stamp-abs-hours { font-size: 12px; font-weight: 600; color: #16a34a; margin-left: 8px; }
        .btn-stamp-edit, .btn-stamp-del {
            border: none; border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 13px;
            transition: background .15s;
        }
        .btn-stamp-edit { background: #f1f5f9; color: #475569; }
        .btn-stamp-edit:hover { background: #e2e8f0; }
        .btn-stamp-del  { background: #fff0f0; color: #dc2626; margin-left: 4px; }
        .btn-stamp-del:hover { background: #fecaca; }

        /* ── Abzüge-Drawer ──────────────────────────────────── */
        #deductionDrawer { position:fixed;inset:0;z-index:1500;display:none; }
        #deductionDrawer.open { display:flex; }
        .ded-overlay { position:absolute;inset:0;background:rgba(0,0,0,0.35); }
        .ded-panel { position:absolute;right:0;top:0;bottom:0;width:720px;max-width:100vw;background:#fff;
                     box-shadow:-4px 0 32px rgba(0,0,0,0.14);display:flex;flex-direction:column;overflow:hidden; }
        .ded-head { padding:22px 28px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0; }
        .ded-head-title { font-size:16px;font-weight:700;color:#1e293b; }
        .ded-head-sub   { font-size:12px;color:#94a3b8;margin-top:2px; }
        .ded-body { flex:1;overflow-y:auto;padding:20px 28px; }
        .ded-foot { padding:16px 28px;border-top:1px solid #f1f5f9;display:flex;gap:10px;justify-content:flex-end;flex-shrink:0; }

        /* Kategorie-Karten */
        .ded-cat { margin-bottom:14px;border:1.5px solid #e2e8f0;border-radius:10px;overflow:hidden; }
        .ded-cat-head { padding:12px 16px;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;cursor:pointer;user-select:none; }
        .ded-cat-head:hover { background:#f1f5f9; }
        .ded-cat-code { font-size:11px;font-weight:700;color:#64748b;min-width:36px; }
        .ded-cat-name { font-size:13px;font-weight:600;color:#1e293b;flex:1;margin-left:10px; }
        .ded-cat-chevron { font-size:13px;color:#94a3b8;transition:transform .2s; }
        .ded-cat.collapsed .ded-cat-chevron { transform:rotate(-90deg); }
        .ded-cat-body { border-top:1px solid #e2e8f0; }
        .ded-cat.collapsed .ded-cat-body { display:none; }

        /* Regel-Zeilen */
        .ded-rule { display:flex;align-items:center;gap:8px;padding:9px 16px;border-bottom:1px solid #f8fafc;font-size:12.5px; }
        .ded-rule:last-child { border-bottom:none; }
        .ded-rule-name { flex:1;color:#334155; }
        .ded-rule-rate { width:90px;text-align:right;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums; }
        .ded-rule-basis { width:100px;color:#64748b;font-size:11.5px; }
        .ded-rule-age   { width:80px;color:#64748b;font-size:11.5px; }
        .ded-rule-acts  { display:flex;gap:6px; }
        .ded-rule-add   { display:flex;align-items:center;padding:8px 16px;border-top:1px solid #f1f5f9; }

        /* Abzugs-Edit-Modal */
        #dedEditModal { position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:2500;display:none;align-items:center;justify-content:center; }
        #dedEditModal.open { display:flex; }
        .ded-edit-box { background:#fff;border-radius:14px;width:520px;max-width:96vw;max-height:90vh;overflow-y:auto;box-shadow:0 8px 40px rgba(0,0,0,0.2); }
        .ded-edit-hd { padding:20px 24px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f1f5f9;padding-bottom:16px; }
        .ded-edit-body { padding:20px 24px;display:grid;grid-template-columns:1fr 1fr;gap:14px; }
        .ded-edit-full { grid-column:1/-1; }
        .ded-edit-ft   { padding:16px 24px;border-top:1px solid #f1f5f9;display:flex;justify-content:flex-end;gap:10px; }

        /* Stempel-Modal */
        #timeEntryModal {
            position: fixed; inset: 0; background: rgba(0,0,0,0.45);
            display: none; align-items: center; justify-content: center; z-index: 2000;
        }
        .stamp-modal-box {
            background: white; border-radius: 16px; width: 440px;
            display: flex; flex-direction: column; box-shadow: 0 24px 48px rgba(0,0,0,0.25); overflow: hidden;
        }
        .stamp-modal-head {
            padding: 20px 24px 16px; border-bottom: 1px solid #f1f5f9;
            display: flex; align-items: center; justify-content: space-between;
        }
        .stamp-modal-title { font-weight: 700; font-size: 16px; color: #1e293b; }
        .stamp-modal-close { background: none; border: none; cursor: pointer; font-size: 18px; color: #94a3b8; padding: 4px 8px; border-radius: 6px; }
        .stamp-modal-close:hover { background: #f1f5f9; }
        .stamp-modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
        .stamp-modal-foot { padding: 16px 24px; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 10px; }
        .stamp-field { display: flex; flex-direction: column; gap: 5px; }
        .stamp-label { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
        .stamp-input { border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 9px 12px; font-size: 14px; color: #1e293b; outline: none; transition: border-color .15s; }
        .stamp-input:focus { border-color: #3f3f3f; }
        .stamp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

        /* Familien-Modal */
        #familyModal {
            position: fixed; inset: 0; background: rgba(0,0,0,0.45);
            display: flex; align-items: center; justify-content: center;
            z-index: 2000; display: none;
        }
        #familyModal.open { display: flex; }
        .family-modal-box {
            /* OneCrew-Standard (Walter 12.08.2026): warmer Verlauf statt Weiss. */
            background: linear-gradient(165deg, #eeece4 0%, #e7e4db 50%, #dfdcd1 100%); border-radius: 16px;
            width: min(1280px, calc(100vw - 32px)); max-height: 94vh;
            display: flex; flex-direction: column; box-shadow: 0 24px 48px rgba(0,0,0,0.25);
        }
        .family-modal-head {
            padding: 20px 24px 16px; border-bottom: 1px solid #f1f5f9;
            display: flex; align-items: center; justify-content: space-between;
        }
        .family-modal-title { font-size: 16px; font-weight: 700; color: #0f172a; }
        .family-modal-close {
            width: 28px; height: 28px; border-radius: 50%; border: none;
            background: #f1f5f9; cursor: pointer; font-size: 16px; color: #64748b;
            display: flex; align-items: center; justify-content: center;
        }
        .family-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
        .family-modal-foot {
            padding: 14px 24px; border-top: 1px solid #f1f5f9;
            display: flex; justify-content: flex-end; gap: 10px;
        }
        .fmf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
        .fmf-row.single { grid-template-columns: 1fr; }
        .fmf-row.triple { grid-template-columns: 1fr 1fr 1fr; }
        .fmf-field { display: flex; flex-direction: column; gap: 5px; }
        .fmf-label { font-size: 12px; font-weight: 600; color: #374151; }
        .fmf-input, .fmf-select {
            padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
            font-size: 13px; font-family: inherit; outline: none; transition: border-color 0.2s;
        }
        .fmf-input:focus, .fmf-select:focus { border-color: #3f3f3f; }

        /* ── Familien-Modal im neuen warmen Look (Walter 27.06.2026) ──────
           Kein Blau mehr: Sektions-Köpfe neutral, Feld-/Adress-Boxen warm
           statt blau-grau (#e2e8f0), warmer Fokus statt Blau. */
        #familyModal .emp-section-title {
            background: transparent !important;
            border-left: none !important;
            border-radius: 0 !important;
            color: #364152 !important;
            text-transform: none !important;
            letter-spacing: -.01em !important;
            font-size: 12px !important;
            font-weight: 760 !important;
            padding: 0 0 0 3px !important;
            margin: 14px 0 5px !important;
        }
        #familyModal .emp-field-grid,
        #familyModal .emp-field-grid-3,
        #familyModal .fmf-addr-card {
            background: #f6f3ee !important;
            border: 1px solid #e7e1d8 !important;
            border-radius: 14px !important;
        }
        #familyModal .fmf-input,
        #familyModal .fmf-select {
            border: 1px solid #e2ddd3 !important;
            border-radius: 9px !important;
        }
        #familyModal .fmf-input:focus,
        #familyModal .fmf-select:focus {
            border-color: #c9bfb0 !important;
            box-shadow: 0 0 0 3px rgba(180,165,140,.14) !important;
        }
        .fmf-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; margin-bottom: 14px; }
        .fmf-section { font-size: 11px; font-weight: 700; color: #3f3f3f; text-transform: uppercase;
            letter-spacing: 0.08em; margin: 18px 0 10px; padding-bottom: 5px; border-bottom: 1px solid #e2e8f0; }

        /* Walter-Vorgabe 27.05.2026: Familien-Modal nutzt MA-Maske-Look
           (emp-field-grid-3 + emp-section-title). Inputs innerhalb der
           grauen Card werden zur weissen Wert-Box passend gestylt. */
        /* Einheitliche Feldhöhe (Walter 08.10.2026): Select, Datum, Text gleich. */
        #familyModal .emp-field-grid-3 .fmf-input,
        #familyModal .emp-field-grid-3 .fmf-select,
        #familyModal .emp-field-grid-2 .fmf-input,
        #familyModal .emp-field-grid-2 .fmf-select,
        #familyModal .emp-field-grid   .fmf-input,
        #familyModal .emp-field-grid   .fmf-select,
        #familyModal .fmf-field .fmf-input,
        #familyModal .fmf-field .fmf-select,
        #familyModal .fmf-field .lqsel-btn,
        #familyModal .fmf-field .yp-text,
        #familyModal .fmf-field .yp-field-wrap {
            background: #fff;
            border: 1px solid #e2ddd3;
            border-radius: 9px;
            padding: 0 10px;
            height: 36px;
            min-height: 36px;
            max-height: 36px;
            box-sizing: border-box;
            font-size: 13px;
            color: #0f172a;
            font-weight: 500;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
            transition: border-color .12s, box-shadow .12s;
        }
        #familyModal .fmf-field .lqsel-wrap { width: 100%; display: block; }
        #familyModal .fmf-field .lqsel-btn {
            display: flex; align-items: center; width: 100%;
            padding: 0 10px !important; border-radius: 9px !important;
        }
        #familyModal .fmf-field .yp-field-wrap {
            display: flex; align-items: stretch; padding: 0; gap: 0; overflow: hidden;
        }
        #familyModal .fmf-field .yp-field-wrap .yp-text {
            flex: 1; min-width: 0; border: none !important; box-shadow: none !important;
            height: 34px; min-height: 34px; max-height: 34px; border-radius: 0;
        }
        #familyModal .fmf-field .yp-cal-btn {
            flex-shrink: 0; width: 34px; height: 34px; border: none; background: transparent;
            display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
        }
        #familyModal .emp-field-grid-3 .fmf-input:hover,
        #familyModal .emp-field-grid-3 .fmf-select:hover,
        #familyModal .emp-field-grid-2 .fmf-input:hover,
        #familyModal .emp-field-grid-2 .fmf-select:hover,
        #familyModal .emp-field-grid   .fmf-input:hover,
        #familyModal .emp-field-grid   .fmf-select:hover,
        #familyModal .fmf-field .lqsel-btn:hover { border-color: #1a1a1a; box-shadow: 0 2px 4px rgba(60,55,48, 0.15); }
        #familyModal .emp-field-grid-3 .fmf-input:focus,
        #familyModal .emp-field-grid-3 .fmf-select:focus,
        #familyModal .emp-field-grid-2 .fmf-input:focus,
        #familyModal .emp-field-grid-2 .fmf-select:focus,
        #familyModal .emp-field-grid   .fmf-input:focus,
        #familyModal .emp-field-grid   .fmf-select:focus,
        #familyModal .fmf-field .lqsel-btn:focus { border-color: #1a1a1a; box-shadow: 0 0 0 3px rgba(60,55,48, 0.15); }
        #familyModal .emp-field-grid-3 .fmf-label,
        #familyModal .emp-field-grid-2 .fmf-label,
        #familyModal .emp-field-grid   .fmf-label,
        #familyModal .fmf-field > .fmf-label {
            font-size: 9.5px; font-weight: 700; color: #475569;
            text-transform: uppercase; letter-spacing: 0.06em;
            padding-left: 2px; line-height: 1.2;
            min-height: 14px;
        }
        #familyModal .fmf-checkbox-card {
            background: #fff; border: 1px solid #e2ddd3; border-radius: 9px;
            padding: 0 10px; height: 36px; min-height: 36px; max-height: 36px;
            box-sizing: border-box;
            display: flex; align-items: center; gap: 8px;
            font-size: 13px; color: #0f172a;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
        }
        #familyModal .fmf-checkbox-text {
            font-size: 12px; color: #475569; font-weight: 500;
        }
        #familyModal .fmf-addr-card {
            background: #f6f3ee; border: 1px solid #e7e1d8; border-radius: 14px;
            padding: 9px 12px 11px; margin-bottom: 6px;
            display: flex; flex-direction: column; gap: 8px;
        }
        /* Adress-Wahl: eigene Klassen statt Inline-Farben (Dark Mode bricht Inline) */
        #familyModal .fmf-radio-row {
            display: flex; align-items: flex-start; gap: 10px;
            cursor: pointer; margin: 0;
            padding: 10px 12px; border-radius: 10px;
            /* Walter 18.08.2026: nur EINGABEFELDER weiss — Auswahl-Kacheln warm-transparent */
            background: rgba(255, 255, 255, 0.28); border: 1px solid rgba(60, 55, 48, 0.14);
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
            transition: border-color .12s, box-shadow .12s, background .12s;
        }
        #familyModal .fmf-radio-row:hover {
            border-color: #c9bfb0;
            box-shadow: 0 2px 6px rgba(60, 55, 48, 0.10);
        }
        #familyModal .fmf-radio-row:has(input:checked) {
            border-color: #3f3f3f;
            background: rgba(255, 255, 255, 0.45);
            box-shadow: 0 0 0 1px #3f3f3f inset;
        }
        #familyModal .fmf-radio-row > input[type="radio"] {
            margin-top: 3px; flex: none; accent-color: #3f3f3f;
        }
        #familyModal .fmf-radio-body { flex: 1; min-width: 0; }
        #familyModal .fmf-radio-title {
            display: block; font-weight: 650; font-size: 13px;
            color: #0f172a; line-height: 1.3;
        }
        #familyModal .fmf-radio-hint {
            display: block; color: #64748b; font-size: 11.5px;
            margin-top: 2px; line-height: 1.35;
        }
        #familyModal .fmf-addr-alt-box { padding: 2px 2px 2px 8px; }
        #familyModal .fmf-addr-alt-row {
            display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
        }
        #familyModal .fmf-addr-select {
            flex: 1; min-width: 180px;
            background: #fff; border: 1px solid #e2ddd3; border-radius: 9px;
            padding: 4px 9px; font-size: 13px; min-height: 27px;
            color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
        }
        #familyModal .fmf-addr-add-btn {
            font-size: 11.5px; padding: 6px 12px; border-radius: 8px;
            border: 1px solid #cbd5e1; background: #fff; color: #1e293b;
            cursor: pointer; font-weight: 600; white-space: nowrap;
        }
        #familyModal .fmf-addr-add-btn:hover {
            background: #f8fafc; border-color: #94a3b8;
        }
        #familyModal .fmf-addr-alt-hint {
            font-size: 11.5px; color: #94a3b8; margin-top: 5px; line-height: 1.35;
        }


/* Soeben hochgeladenes Dokument kurz hervorheben (Walter 17.11.2026) */
.dok-table tr.dok-neu-markiert > td { background: var(--oc-ok-bg) !important; transition: background 0.6s; }
