/* Verwaltung: gemeinsame Bausteine für Listen- und Verwaltungsbereiche (Textbausteine, Bewerbungen, Abmeldungstexte,
   Filialabgleich: Dokumentübertragung / Fallkonflikte / Änderungsanträge, Fristen). Nur Bildschirm.
   Baut auf den Lila-Tokens (--compact-*) und den vorhandenen Bausteinen panel/panel-head, status, data-table, button,
   field/form-grid, table-toolbar/filter-*, admin-metrics und empty auf; hier stehen nur Ergänzungen dazu.
   Wurzelklasse je Bereich: .wm (workspace module). Dark Mode über html[data-workspace-theme="dark"] und die Tokens. */
@media screen {
  .wm { --wm-surface:var(--compact-surface,#fff); --wm-soft:var(--compact-soft,#f4f1f6); --wm-text:var(--compact-text,#28212e); --wm-muted:var(--compact-muted,#6e6576); --wm-line:var(--compact-line,#e3dce8); --wm-tint:var(--compact-tint,#f2ecf6); --wm-accent:var(--compact-accent,#643182); --wm-border:var(--lila-border,#dccfe4); --wm-heading:var(--lila-heading,#faf7fc); --wm-fill:#643182; --wm-shadow:0 1px 2px rgba(43,36,50,.05); --wm-danger:#9a2c22; --wm-warning:#8c520b; --wm-success:#21683f;
    display:grid; gap:16px; min-width:0; max-width:100%; color:var(--wm-text); }
  html[data-workspace-theme="dark"] .wm { --wm-shadow:none; --wm-danger:#f19b96; --wm-warning:#e9c27b; --wm-success:#99d5b3; }
  .wm > * { min-width:0; max-width:100%; }
  .wm svg { width:16px; height:16px; flex-shrink:0; }
  .wm .button { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
  .wm :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline:2px solid var(--wm-accent); outline-offset:2px; box-shadow:none; }
  .wm .muted { color:var(--wm-muted); }
  .wm p[role="status"], .wm p[role="alert"] { margin:0; }

  /* Kopfzeile eigener Seiten (Bewerbungen, Fristen): Eyebrow über dem Titel, Beschreibung, Aktionen rechts. */
  .wm-page-head { padding-bottom:14px; border-bottom:2px solid var(--wm-line); }
  .wm-eyebrow { display:block; margin-bottom:4px; font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--wm-accent); }
  .wm-page-head .head-actions { flex-wrap:wrap; justify-content:flex-end; gap:8px; }

  /* Kennzahlen: admin-metrics, wahlweise als Filterschalter (button). */
  .wm .admin-metrics { margin:0; border-color:var(--wm-line); border-radius:10px; background:var(--wm-surface); box-shadow:var(--wm-shadow); overflow:hidden; }
  .wm .admin-metrics > * { min-width:0; border-right:1px solid var(--wm-line); }
  .wm .admin-metrics > :last-child { border-right:0; }
  .wm .admin-metrics > button { display:flex; flex-direction:column; justify-content:center; min-height:68px; padding:10px 16px; border-top:0; border-bottom:0; border-left:0; background:transparent; font:inherit; color:inherit; text-align:left; cursor:pointer; transition:background .15s; }
  .wm .admin-metrics > button:hover { background:var(--wm-soft); }
  .wm .admin-metrics > .active { background:var(--wm-tint); box-shadow:inset 0 -3px 0 var(--wm-fill); }
  .wm .admin-metrics span { color:var(--wm-muted); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
  .wm .admin-metrics strong { margin-top:4px; font-size:22px; font-weight:650; line-height:1.15; color:var(--wm-text); font-variant-numeric:tabular-nums; }
  .wm .admin-metrics small { margin-top:3px; font-size:11.5px; color:var(--wm-muted); }
  .wm .admin-metrics .danger strong { color:var(--wm-danger); }
  .wm .admin-metrics .warning strong { color:var(--wm-warning); }
  .wm .admin-metrics .success strong { color:var(--wm-success); }
  .wm .admin-metrics .accent strong { color:var(--wm-accent); }

  /* Filter-/Suchleiste: table-toolbar mit filter-wrap/filter-input/filter-select als eigenständige Karte. */
  .wm .table-toolbar { flex-wrap:wrap; align-items:center; gap:10px 12px; margin:0; padding:12px 14px; border:1px solid var(--wm-line); border-radius:10px; background:var(--wm-surface); box-shadow:var(--wm-shadow); }
  .wm .table-toolbar .filter-group { flex-wrap:wrap; gap:10px 12px; flex:1 1 auto; min-width:0; }
  .wm .table-toolbar .filter-wrap { flex:1 1 240px; min-width:0; }
  .wm .table-toolbar .filter-wrap svg { top:10px; left:10px; width:15px; height:15px; color:var(--wm-muted); }
  .wm .table-toolbar .filter-input { width:100%; min-height:36px; height:auto; padding:0 10px 0 32px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-surface); color:var(--wm-text); font:inherit; font-size:13.5px; }
  .wm .table-toolbar .filter-select { min-height:36px; height:auto; padding:0 28px 0 10px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-surface); color:var(--wm-text); font:inherit; font-size:13.5px; max-width:100%; }
  .wm .table-toolbar :is(.filter-input,.filter-select):focus { border-color:var(--wm-accent); box-shadow:0 0 0 3px rgba(100,49,130,.12); }
  .wm-check { display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 10px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-surface); font-size:13px; color:var(--wm-text); cursor:pointer; white-space:nowrap; }
  .wm-check input { width:16px; height:16px; margin:0; accent-color:#643182; }
  .wm-check:has(input:checked) { background:var(--wm-tint); border-color:var(--wm-accent); }
  .wm-toolbar-note { margin-left:auto; font-size:12.5px; color:var(--wm-muted); white-space:nowrap; }

  /* Filterchips */
  .wm-chips { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12.5px; color:var(--wm-muted); }
  .wm-chips > span:first-child { margin-right:4px; }
  .wm-chip { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:0 11px; border:1px solid var(--wm-border); border-radius:999px; background:var(--wm-surface); font:inherit; font-size:12.5px; color:var(--wm-text); cursor:pointer; transition:background .15s,border-color .15s; }
  .wm-chip:hover { background:var(--wm-tint); }
  .wm-chip b { font-weight:700; color:var(--wm-accent); }
  .wm-chip.active { background:var(--wm-fill); border-color:var(--wm-fill); color:#fff; }
  .wm-chip.active b { color:#fff; }
  .wm-chip.clear { color:var(--wm-danger); }

  /* Karten: panel/panel-head aus der Verwaltung, Inhalte ohne Innenabstand (Tabelle/Liste) oder mit .wm-body. */
  .wm .panel { margin:0; border-color:var(--wm-line); border-radius:10px; background:var(--wm-surface); box-shadow:var(--wm-shadow); overflow:hidden; }
  .wm .panel-head { min-height:52px; padding:14px 18px; background:var(--wm-heading); border-bottom:1px solid var(--wm-line); gap:10px 16px; flex-wrap:wrap; }
  .wm .panel-head h2 { margin:0; font-size:15px; font-weight:650; color:var(--wm-text); line-height:1.35; }
  .wm .panel-head > div > span { display:block; margin-top:3px; font-size:12px; color:var(--wm-muted); line-height:1.45; }
  .wm .panel-head .status { flex:none; }
  .wm .panel-head-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-left:auto; }
  .wm-body { padding:16px 18px; display:grid; gap:12px; }
  .wm-body p { margin:0; line-height:1.55; }
  .wm-note { padding:10px 14px; border-radius:8px; background:var(--wm-tint); color:var(--wm-text); font-size:12.5px; line-height:1.5; }
  .wm-note.warning { background:#fff1db; color:#6b4a12; }
  .wm-note.danger { background:#fbe9e7; color:#7d2019; }
  html[data-workspace-theme="dark"] .wm-note.warning { background:#403728; color:#e9c27b; }
  html[data-workspace-theme="dark"] .wm-note.danger { background:#4b2e2d; color:#f6b9b2; }
  .wm-note svg { vertical-align:-3px; margin-right:6px; color:currentColor; }

  /* Tabellen: data-table admin-table, Kopf in Kapitälchen, Zebra, Zeilen ohne Zeiger, Aktionsspalte rechts. */
  .wm .table-scroll { overflow-x:auto; }
  .wm .data-table { border:0; background:transparent; }
  .wm .data-table th { height:auto; padding:11px 14px; background:var(--wm-soft); color:var(--wm-muted); font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; border-bottom:1px solid var(--wm-line); white-space:nowrap; }
  .wm .data-table td { height:auto; padding:12px 14px; border-bottom:1px solid var(--wm-line); vertical-align:top; font-size:13px; line-height:1.45; color:var(--wm-text); }
  .wm .data-table tbody tr { cursor:default; }
  .wm .data-table tbody tr:nth-child(even) { background:var(--wm-soft); }
  .wm .data-table tbody tr:hover { background:var(--wm-tint); }
  .wm .data-table tbody tr:last-child td { border-bottom:0; }
  .wm .data-table td small, .wm-list small, .wm-cell small { display:block; margin-top:2px; font-size:11.5px; color:var(--wm-muted); line-height:1.4; }
  .wm .data-table td strong { color:var(--wm-text); }
  .wm .data-table .status { white-space:nowrap; }
  .wm .data-table th[scope="row"] { background:transparent; text-transform:none; letter-spacing:0; font-size:12.5px; color:var(--wm-muted); vertical-align:top; padding:12px 14px; white-space:normal; }
  .wm .data-table tr.wm-group-row td { padding:8px 14px; background:var(--wm-tint); font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--wm-accent); }
  .wm .data-table tr.wm-group-row td span { margin-left:8px; font-weight:500; letter-spacing:0; text-transform:none; color:var(--wm-muted); }
  .wm-actions, .wm .data-table td.wm-actions { text-align:right; white-space:nowrap; }
  .wm-actions .button, .wm-row-actions .button { min-height:32px; padding:0 10px; font-size:13px; }
  .wm-row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; flex:0 0 auto; }
  .wm .data-table td .icon-button { width:30px; height:30px; color:var(--wm-muted); }
  .wm .data-table td .icon-button:hover { background:var(--wm-tint); color:var(--wm-accent); }
  .wm-nowrap { white-space:nowrap; }
  .wm-diff { background:#fbefd9; color:#6b4a12; border-radius:4px; padding:1px 4px; }
  html[data-workspace-theme="dark"] .wm-diff { background:#403728; color:#e9c27b; }

  /* Ampel */
  .wm-dot { display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:50%; background:#3f7654; box-shadow:0 0 0 3px rgba(63,118,84,.18); vertical-align:-1px; }
  .wm-dot.danger { background:#c0392b; box-shadow:0 0 0 3px rgba(192,57,43,.18); }
  .wm-dot.warning { background:#e0862b; box-shadow:0 0 0 3px rgba(224,134,43,.2); }
  .wm-dot.purple { background:#9b6cb5; box-shadow:0 0 0 3px rgba(155,108,181,.22); }

  /* Listen aus Zeilen (Bewerbungen, Textbausteine): Zeile mit Haupttext, Meta, Chips und Aktionen. */
  .wm-list { margin:0; padding:0; list-style:none; }
  .wm-list > li, .wm-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px 16px; padding:13px 18px; border-bottom:1px solid var(--wm-line); }
  .wm-list > li:last-child, .wm-row:last-child { border-bottom:0; }
  .wm-list > li:nth-child(even), .wm-row:nth-child(even) { background:var(--wm-soft); }
  .wm-row-main { display:grid; gap:3px; min-width:0; flex:1 1 auto; }
  .wm-row-main strong { font-size:14px; color:var(--wm-text); overflow-wrap:anywhere; }
  .wm-row-main > span { font-size:12.5px; color:var(--wm-muted); overflow-wrap:anywhere; }
  .wm-tags { display:flex; flex-wrap:wrap; gap:4px 6px; margin-top:2px; }
  .wm-tags .status { min-height:20px; padding:1px 8px; font-size:11px; }
  .wm .status.info, .wm-tags .status.info, #modal-root .status.info { background:#e3eff5; color:#376781; }
  html[data-workspace-theme="dark"] :is(.wm .status.info, .wm-tags .status.info) { background:#233a44; color:#a9d3e6; }
  .wm-tags .status.tint { background:var(--wm-tint); color:var(--wm-accent); }

  /* Leerzustand und Fehler */
  .wm-empty { display:grid; justify-items:center; gap:6px; padding:36px 20px; text-align:center; color:var(--wm-muted); font-size:13.5px; line-height:1.55; }
  .wm-empty.framed { border:1px dashed var(--wm-border); border-radius:10px; background:var(--wm-surface); }
  .wm-empty svg { width:30px; height:30px; margin-bottom:4px; color:var(--wm-accent); opacity:.85; }
  .wm-empty strong { color:var(--wm-text); font-size:14.5px; }
  .wm-empty .button { margin-top:8px; }
  .wm-error { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border:1px solid #e3b8b4; border-left:4px solid #bd4a40; border-radius:10px; background:#fdf3f2; color:#6b2b25; font-size:13.5px; line-height:1.5; }
  .wm-error svg { width:20px; height:20px; flex:none; margin-top:1px; color:#bd4a40; }
  .wm-error strong { display:block; color:#7d2019; }
  .wm-error p { margin:4px 0 0; }
  .wm-error .button { margin-top:10px; }
  html[data-workspace-theme="dark"] .wm-error { background:#3b2a29; border-color:#875851; color:#f6c8c2; }
  html[data-workspace-theme="dark"] .wm-error strong { color:#f6b9b2; }

  /* Formulare: field/form-grid aus der Verwaltung, gruppiert in .wm-form */
  .wm-form { display:grid; gap:14px; }
  .wm-form .field { margin:0; }
  .wm-form .field > label, .wm-form .wm-label { display:block; margin-bottom:5px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--wm-muted); }
  .wm-form :is(input,select,textarea):not([type="checkbox"]):not(.switch) { width:100%; min-height:38px; padding:8px 10px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-surface); color:var(--wm-text); font:inherit; font-size:14px; }
  .wm-form textarea { min-height:120px; line-height:1.5; resize:vertical; }
  .wm-form :is(input,select,textarea):focus { border-color:var(--wm-accent); box-shadow:0 0 0 3px rgba(100,49,130,.12); outline:none; }
  .wm-form .toggle-row { border-color:var(--wm-line); border-radius:8px; background:var(--wm-soft); }
  .wm-choices { display:flex; flex-wrap:wrap; gap:6px 8px; }
  .wm-choices label { display:inline-flex; align-items:center; gap:6px; min-height:32px; margin:0; padding:0 10px; border:1px solid var(--wm-border); border-radius:999px; background:var(--wm-surface); font-size:13px; font-weight:500; letter-spacing:0; text-transform:none; color:var(--wm-text); cursor:pointer; }
  .wm-choices label:has(input:checked) { background:var(--wm-tint); border-color:var(--wm-accent); color:var(--wm-accent); }
  .wm-choices input { width:15px; height:15px; margin:0; accent-color:#643182; }
  .wm-form-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; padding-top:12px; border-top:1px solid var(--wm-line); font-size:12.5px; color:var(--wm-muted); }
  .wm-form-foot > div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
  .wm-placeholder-bar { display:flex; flex-wrap:wrap; gap:6px; }
  .wm-placeholder-bar .button { min-height:32px; }
  .wm-placeholder-bar .button[data-deregistration-placeholder], .wm-placeholder-bar .button[data-new-deregistration-placeholder] { padding:0 9px; font:600 12px Consolas,ui-monospace,monospace; color:var(--wm-accent); background:var(--wm-tint); border-color:transparent; }
  .wm-placeholder-bar .button[data-deregistration-placeholder]:hover, .wm-placeholder-bar .button[data-new-deregistration-placeholder]:hover { background:var(--wm-fill); color:#fff; }
  .wm-placeholder-bar select { flex:1 1 220px; }
  .wm-confirm { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-tint); font-size:13.5px; line-height:1.5; color:var(--wm-text); }
  .wm-confirm input { width:18px; height:18px; flex:none; margin:2px 0 0; accent-color:#643182; }
  .wm-code { font-family:Consolas,ui-monospace,monospace; font-size:12px; padding:1px 5px; border-radius:4px; background:var(--wm-tint); color:var(--wm-accent); }
  .wm-pre { margin:0; padding:14px 16px; border:1px solid var(--wm-line); border-radius:8px; background:var(--wm-soft); font:inherit; font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--wm-text); max-height:56vh; overflow:auto; }

  /* Aufklappbare Hilfe (Platzhalterliste u. a.): Kopfzeile ohne harten Rahmen, Gruppen als gleichmäßige Kacheln,
     je Platzhalter eine Zeile mit Bezeichnung oben und Code darunter in voller Breite (Klick kopiert, Häkchen als Rückmeldung).
     Gilt überall, wo die Hilfe eingebettet ist (Textbausteine, Kurzbrief, Meine Dokumente, Mahnwesen). */
  .wm-help { border:1px solid var(--wm-line); border-radius:10px; background:var(--wm-surface); box-shadow:var(--wm-shadow); overflow:hidden; }
  .wm-help > summary { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; padding:12px 16px; font-weight:600; color:var(--wm-accent); cursor:pointer; list-style:none; }
  .wm-help > summary:hover { background:var(--wm-heading); }
  .wm-help[open] > summary { border-bottom:1px solid var(--wm-line); background:var(--wm-heading); }
  .wm-help > summary::-webkit-details-marker { display:none; }
  .wm-help > summary::before { content:"+"; display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:var(--wm-tint); color:var(--wm-accent); font-weight:700; flex:none; }
  .wm-help[open] > summary::before { content:"–"; }
  .wm-help > summary small { font-weight:400; color:var(--wm-muted); font-size:12px; }
  .wm-help-body { padding:14px 16px 16px; display:grid; gap:12px; }
  .wm-help-body p { margin:0; font-size:13px; color:var(--wm-muted); line-height:1.5; }
  .wm-help-search { display:flex; align-items:center; gap:8px; min-height:36px; padding:0 10px; border:1px solid var(--wm-border); border-radius:8px; background:var(--wm-surface); }
  .wm-help-search:focus-within { border-color:var(--wm-accent); box-shadow:0 0 0 3px rgba(100,49,130,.12); }
  .wm-help-search svg { width:15px; height:15px; color:var(--wm-muted); }
  .wm-help-search input { flex:1; min-width:0; min-height:0; height:auto; padding:0; border:0; background:transparent; box-shadow:none; outline:0; font:inherit; font-size:13.5px; color:var(--wm-text); }
  .wm-placeholder-groups { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; align-items:start; }
  .wm-placeholder-group { display:grid; gap:2px; align-content:start; min-width:0; padding:10px 12px 12px; border:1px solid var(--wm-line); border-radius:8px; background:var(--wm-soft); }
  .wm-placeholder-group h4 { margin:0 0 6px; font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--wm-accent); }
  .wm-placeholder-group button { position:relative; display:grid; gap:2px; width:100%; min-width:0; padding:6px 30px 6px 8px; border:0; border-radius:6px; background:transparent; font:inherit; font-size:12.5px; color:var(--wm-text); text-align:left; cursor:pointer; }
  .wm-placeholder-group button:hover { background:var(--wm-tint); }
  .wm-placeholder-group button > span { font-size:11.5px; line-height:1.35; color:var(--wm-muted); overflow-wrap:anywhere; }
  .wm-placeholder-group button > code, .wm-placeholder-group button .wm-code { display:block; width:fit-content; max-width:100%; font-family:Consolas,ui-monospace,monospace; font-size:12px; line-height:1.4; color:var(--wm-accent); white-space:normal; overflow-wrap:anywhere; }
  .wm-placeholder-group button::after { content:"✓"; position:absolute; top:50%; right:8px; display:grid; place-items:center; width:18px; height:18px; margin-top:-9px; border-radius:50%; background:var(--wm-success); color:#fff; font-size:11px; font-weight:700; opacity:0; transform:scale(.6); transition:opacity .15s, transform .15s; }
  html[data-workspace-theme="dark"] .wm-placeholder-group button::after { color:#1d1420; }
  .wm-placeholder-group button[data-copied]::after { opacity:1; transform:scale(1); }
  .wm-placeholder-group button[data-copied] { background:var(--wm-tint); }
  .wm-placeholder-group[hidden], .wm-placeholder-group button[hidden] { display:none; }
  .wm-placeholder-empty { margin:0; font-size:13px; color:var(--wm-muted); }

  /* Seitennavigation */
  .wm-pagination { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:10px 18px; border-top:1px solid var(--wm-line); background:var(--wm-heading); font-size:12.5px; color:var(--wm-muted); }
  .wm-pagination[hidden] { display:none; }
  .wm-pagination span { margin-right:auto; }
  .wm-pagination .button { width:34px; min-height:34px; padding:0; }
  .wm-pagination [data-prev] svg, .wm-pagination [data-review-prev] svg { transform:rotate(180deg); }

  /* Tabs (Standard-Tabs der Verwaltung) ohne Unterrand innerhalb der Module */
  .wm .tabs { margin:0; }

  /* Reiterförmige Segmentwahl (System/Eigene, Gruppierung) */
  .wm-segments { display:inline-flex; flex-wrap:wrap; gap:2px; padding:3px; border:1px solid var(--wm-line); border-radius:9px; background:var(--wm-soft); }
  .wm-segments button { min-height:30px; padding:0 11px; border:0; border-radius:7px; background:transparent; font:inherit; font-size:12.5px; font-weight:600; color:var(--wm-muted); cursor:pointer; }
  .wm-segments button.active { background:var(--wm-surface); color:var(--wm-accent); box-shadow:0 1px 3px rgba(43,36,50,.12); }

  /* Zwei Spalten (Liste + Detail, Navigation + Editor) */
  .wm-split { display:grid; grid-template-columns:minmax(260px,2fr) minmax(0,3fr); gap:16px; align-items:start; }
  .wm-split.narrow-left { grid-template-columns:260px minmax(0,1fr); }
  .wm-split > * { min-width:0; }

  /* Fakten (Bezeichnung/Wert) */
  .wm-facts { display:grid; grid-template-columns:minmax(130px,170px) minmax(0,1fr); gap:8px 14px; margin:0; font-size:13.5px; }
  .wm-facts dt { color:var(--wm-muted); font-weight:600; }
  .wm-facts dd { margin:0; overflow-wrap:anywhere; }
  .wm-facts a { color:var(--wm-accent); }
  .wm-section h3 { margin:0 0 8px; font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--wm-muted); }

  /* Dateiliste */
  .wm-files { margin:0; padding:0; list-style:none; display:grid; gap:6px; }
  .wm-files li { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; padding:8px 12px; border:1px solid var(--wm-line); border-radius:8px; background:var(--wm-surface); }
  .wm-files li > svg { color:var(--wm-accent); }
  .wm-files .wm-file-name { flex:1 1 160px; display:grid; min-width:0; }
  .wm-files .wm-file-name strong { font-size:13px; overflow-wrap:anywhere; }

  /* Verlauf */
  .wm-history { margin:0; padding:0; list-style:none; display:grid; gap:0; font-size:13px; }
  .wm-history li { display:grid; grid-template-columns:130px minmax(0,1fr) auto; gap:10px; padding:7px 0; border-bottom:1px solid var(--wm-line); }
  .wm-history li:last-child { border-bottom:0; }
  .wm-history time, .wm-history small { color:var(--wm-muted); white-space:nowrap; font-size:12px; }

  /* Vergleichstabellen (Fallkonflikte, Änderungsanträge): mobil als Kartenstapel */
  @media (max-width:700px) {
    .wm-page-head { padding-bottom:10px; }
    .wm .table-toolbar { padding:10px 12px; }
    .wm .table-toolbar .filter-wrap, .wm .table-toolbar .filter-select, .wm-check, .wm .table-toolbar .filter-group > label { flex:1 1 100%; width:100%; }
    .wm-toolbar-note { margin-left:0; white-space:normal; }
    .wm .admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .wm .admin-metrics > * { border-right:0; border-bottom:1px solid var(--wm-line); }
    .wm .admin-metrics > :nth-child(odd) { border-right:1px solid var(--wm-line); }
    .wm .admin-metrics > :nth-last-child(-n+2) { border-bottom:0; }
    .wm .admin-metrics > :nth-last-child(-n+2):nth-child(even) { border-bottom:0; }
    .wm-split, .wm-split.narrow-left { grid-template-columns:minmax(0,1fr); }
    .wm-list > li, .wm-row { flex-direction:column; align-items:stretch; padding:12px 14px; }
    .wm-row-actions { justify-content:flex-start; }
    .wm .panel-head { padding:12px 14px; }
    .wm-body { padding:14px; }
    .wm-facts { grid-template-columns:minmax(0,1fr); gap:2px; }
    .wm-facts dd { margin-bottom:8px; }
    .wm-history li { grid-template-columns:minmax(0,1fr); gap:2px; }
    .wm-form-foot { flex-direction:column; align-items:stretch; }
    .wm-form-foot > div { justify-content:stretch; }
    .wm-form-foot .button { flex:1 1 auto; justify-content:center; }
    .wm-form .form-grid, .wm-form .form-grid.three { grid-template-columns:minmax(0,1fr); }
    .wm-placeholder-groups { grid-template-columns:minmax(0,1fr); }
    .wm-stack thead { display:none; }
    .wm-stack, .wm-stack tbody, .wm-stack tr, .wm-stack th, .wm-stack td { display:block; width:100%; box-sizing:border-box; }
    .wm-stack tr { padding:6px 0; border-bottom:1px solid var(--wm-line); }
    .wm-stack tr:last-child { border-bottom:0; }
    .wm-stack tr.wm-group-row { padding:0; }
    .wm-stack td, .wm-stack th[scope="row"] { padding:5px 14px; border-bottom:0 !important; }
    .wm-stack th[scope="row"] { padding-top:10px; font-weight:700; color:var(--wm-text); }
    .wm-stack td[data-label]::before { content:attr(data-label); display:block; margin-bottom:2px; font-size:10.5px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--wm-muted); }
    .wm-stack td.wm-actions { text-align:left; white-space:normal; padding-bottom:12px; }
    .wm-stack td:empty { display:none; }
  }
}

/* Abmeldungstexte (Einstellungen › Stammdaten & Vorlagen): Vorlagenliste links, Editor rechts – Markup in app.js, Darstellung hier. */
@media screen {
  .dereg-texts .deregistration-template-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dereg-texts .deregistration-template-summary > div { min-height:68px; padding:10px 16px; border-right:1px solid var(--wm-line); border-bottom:0; }
  .dereg-texts .deregistration-template-summary > div:last-child { border-right:0; }
  .dereg-texts .deregistration-template-summary strong { margin-top:4px; color:var(--wm-text); font-size:22px; }
  .dereg-texts .deregistration-template-nav { display:grid; gap:2px; padding:8px; border:1px solid var(--wm-line); border-radius:10px; background:var(--wm-surface); box-shadow:var(--wm-shadow); }
  .dereg-texts .deregistration-template-nav-item { min-width:0; padding:10px 12px; border:0; border-left:3px solid transparent; border-radius:8px; background:transparent; color:var(--wm-text); text-align:left; cursor:pointer; font:inherit; transition:background .15s; }
  .dereg-texts .deregistration-template-nav-item:hover { background:var(--wm-tint); }
  .dereg-texts .deregistration-template-nav-item.active { border-left-color:var(--wm-fill); background:var(--wm-tint); color:var(--wm-accent); }
  .dereg-texts .deregistration-template-nav-item.inactive:not(.active) { opacity:.62; }
  .dereg-texts .deregistration-template-nav-item strong, .dereg-texts .deregistration-template-nav-item span { display:block; }
  .dereg-texts .deregistration-template-nav-item strong { font-size:13.5px; }
  .dereg-texts .deregistration-template-nav-item span { margin-top:2px; font-size:12px; color:var(--wm-muted); }
  .dereg-texts .deregistration-template-editor form { padding:16px 18px; }
  .dereg-texts .deregistration-template-meta .toggle-row > span { min-width:0; display:grid; gap:3px; }
  .dereg-texts .deregistration-template-editor textarea { min-height:300px; line-height:1.55; }
  .dereg-texts .deregistration-template-footer > span { font-size:12.5px; }
  @media (max-width:700px) { .dereg-texts .deregistration-template-summary { grid-template-columns:1fr; } .dereg-texts .deregistration-template-summary > div { border-right:0; border-bottom:1px solid var(--wm-line); } .dereg-texts .deregistration-template-summary > div:last-child { border-bottom:0; } }
}
