/* =============================================================================
   wp_settings – Einstellungen wie Close (SPEC_UI_CLOSE_1ZU1 C-13, C-19, C-20), Paket WP7.
   Maße an Marvins Bildern nachgemessen (0.1: die Aufnahme gilt):
   M06 Konto: Navigation 258 px + 1 px Linie, Titelzone 80 px, Formular 592 px (2 × 288 + 16), Feld 32 px,
              Label 14/20 600 mit 4 px Abstand zum Feld, Zeilenabstand 16 px, Abschnittslinie mit je 24 px.
   M08 Team:  Titelzone mit Reitern 84 px (Titel ab 13 px, Reiterzeile 38 px), Werkzeugzeile 32 px mit je 24 px,
              Tabelle im Rahmen (Kopf 40 px #f9f9f9, Zeilen ab 56 px, Zellen 12 px), Avatar 32 px im 40-px-Feld.
   M10 Navi:  Gruppenkopf 24 px (Icon 14 px #919191 bei x = 16, Label 11/600 bei x = 36), Einträge 28 px mit 13 px Schrift,
              16 px zwischen den Gruppen, Führungslinie 2 px #efefef bei x = 21, aktiv #245bc6 mit 16-px-Balken.
   Bausteine: .settings-page/-nav/-main/-head/-body · .settings-toolbar/-search · .settings-table ·
              .settings-form/-section/-grid/-field/-info/-hint · .settings-sub · .yn · .settings-list (Status).
   Dazu: Nutzerverwaltung, Einladungen, Zwei-Faktor, Passwort- und Anmeldeseiten (Paket security).
   ============================================================================= */

/* ---------- Layout: zwei Spalten, jede scrollt für sich (B.1 „page-settings“) ---------- */
.settings-page {
  display: grid; grid-template-columns: calc(var(--settings-nav-w) + 1px) minmax(0, 1fr); height: 100%; min-height: 0; background: var(--surface);
}
.settings-nav {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 0 24px; background: var(--settings-nav-bg);
  border-right: 1px solid var(--border-default); scrollbar-width: thin; scrollbar-color: var(--gray-30) transparent;
}
.settings-main { position: relative; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface); }

/* ---------- Navigation (M10) ---------- */
.settings-nav__group + .settings-nav__group { margin-top: 16px; }
.settings-nav__head {
  display: flex; align-items: center; gap: 6px; height: 24px; margin: 0; padding: 0 12px 0 16px;
  font: 600 11px/16px var(--font-sans); letter-spacing: .02em; text-transform: uppercase; color: var(--text-default); white-space: nowrap;
}   /* 11 px: „GENERAL“ 48 px, „ORGANIZATION“ 82 px Tintenbreite [M M10] */
.settings-nav__head .icon { width: 14px; height: 14px; color: var(--gray-40); flex: none; }
.settings-nav__list { position: relative; margin: 0; padding: 0; list-style: none; }
.settings-nav__list::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: #efefef; }
:root[data-theme="dark"] .settings-nav__list::before { background: var(--gray-10); }
.settings-nav__item {
  position: relative; display: flex; align-items: center; height: 28px; padding: 0 12px 0 36px;
  font: 400 13px/18px var(--font-sans); color: var(--text-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}   /* 13 px: „Account“ 47 px, „Custom Objects“ 92 px [M M10] */
.settings-nav__item:hover { color: var(--text-default); text-decoration: none; }
.settings-nav__item:hover::before, .settings-nav__item.is-active::before {
  content: ""; position: absolute; left: 21px; top: 6px; width: 2px; height: 16px; border-radius: 1px; background: var(--gray-50);
}   /* Hover: dunkler Text + grauer Balken auf der Führungslinie [M M10 „Templates & Snippets“] */
.settings-nav__item.is-active, .settings-nav__item.is-active:hover { color: var(--link); font-weight: 600; }   /* aktiv: blau und halbfett [M M10 „Phone & Voicemail“] */
.settings-nav__item.is-active::before, .settings-nav__item.is-active:hover::before { background: var(--link); }
.settings-nav__item:focus-visible { outline-offset: -2px; }

/* ---------- Titelzone (M06: 80 px; M08 mit Reitern: 84 px) ---------- */
.settings-head {
  display: flex; flex-direction: column; justify-content: center; min-height: 81px; padding: 0 24px; background: var(--surface);
  border-bottom: 1px solid var(--border-default);
}
.settings-head__row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.settings-title { flex: 1; min-width: 0; margin: 0; font: 700 24px/32px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-head__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.settings-head__tools:empty { display: none; }
.settings-head__tools form { display: contents; }   /* Aktion als Formular (Papierkorb „Alles wiederherstellen“) steht wie ein Knopf in der Reihe */
/* Unterseite (Close E355/E378): über dem Titel klein grau „← Elternseite“ 13 px, der Titel rückt nach unten */
.settings-head__back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 0 0 2px; font-size: 13px; line-height: 18px; color: var(--text-light); white-space: nowrap; }
.settings-head__back:hover { color: var(--text-default); text-decoration: none; }
.settings-head__back .icon { width: 14px; height: 14px; }
.settings-head:has(> .settings-head__back) { padding-top: 12px; padding-bottom: 12px; }
.settings-head:has(> .settings-head__back):has(> .page-tabs) { padding: 8px 24px 1px; }
.settings-head:has(> .page-tabs) { justify-content: flex-start; min-height: 85px; padding: 13px 24px 1px; }
.settings-head > .page-tabs { height: 38px; border-bottom: 0; overflow: visible; flex-wrap: wrap; }
.settings-head > .page-tabs .page-tab { height: 38px; font-size: 13px; line-height: 18px; }   /* „Users“ 32 px, „Groups“ 43 px [M M08] */
.settings-head > .page-tabs .page-tab.is-active::after { bottom: -2px; }   /* Unterstrich liegt auf der Linie der Titelzone [M M08: y 136–137] */
.settings-body { padding: 24px; min-width: 0; }
.settings-body code { overflow-wrap: anywhere; }   /* lange Adressen/Schlüssel (auch auf Seiten anderer Pakete) verbreitern die Seite nicht */
/* Reiter als erstes Element des Inhalts (Seiten anderer Pakete, die von settings/base.html erben): an die Titelzone andocken */
.settings-main:has(.settings-body > .page-tabs:first-child) .settings-head { min-height: 46px; padding: 13px 24px 1px; border-bottom: 0; justify-content: flex-start; }
.settings-body > .page-tabs:first-child { height: 39px; margin: -24px -24px 24px; padding: 0 24px; }
/* ---- übernommen aus completion.css (WP0, einmalig verschoben; Eigentum WP7): .settings-tabs ist jetzt die
        Reiterzeile der Titelzone ({% page_tabs tabs "settings-tabs" %}); die Kachel-Übersicht (.settings-tile) entfällt. ---- */
.settings-tabs { margin: 0; }

/* ---------- Abschnittskopf IM Inhalt (z. B. „Felder“ auf der Seite eines Typs, E378). Rückweg und Name einer Unterseite
   stehen in der Titelzone (.settings-head__back + Titel, siehe oben) – nicht hier. ---------- */
.settings-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; min-height: 32px; }
.settings-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-medium); font-size: 14px; line-height: 20px; white-space: nowrap; }
.settings-back:hover { color: var(--text-default); text-decoration: none; }
.settings-back .icon { color: var(--icon-default); }
.settings-sub__title { margin: 0; font: 700 16px/24px var(--font-sans); color: var(--text-default); min-width: 0; overflow-wrap: anywhere; }
.settings-sub__title--lg { font-size: 20px; line-height: 28px; }   /* Close „Fields“ auf der Seite eines Typs (E378) */
.settings-sub__meta { color: var(--text-light); font-size: 14px; line-height: 20px; }
.settings-sub__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------- Werkzeugzeile (M08, M09): 32 px, darunter 24 px ---------- */
.settings-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; margin: 0 0 24px; }
.settings-toolbar form { display: contents; }
.settings-toolbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.settings-toolbar__count { font-size: 14px; line-height: 20px; color: var(--text-light); white-space: nowrap; }
.settings-search { position: relative; width: 278px; max-width: 100%; flex: none; }
.settings-search--wide { width: 350px; }
.settings-search > .icon { position: absolute; left: 12px; top: 8px; color: var(--icon-default); pointer-events: none; }
.settings-search > .input { padding-left: 36px; background: var(--gray-5); border-color: transparent; }   /* in Ruhe grau gefüllt ohne Rand (E344, E352, E389) */
.settings-search > .input:focus { background: var(--surface); border-color: var(--blue-20); }   /* mit Fokus weiß mit Rand (M08) */
.settings-search > .input::-webkit-search-cancel-button { cursor: pointer; }
/* Filter in der Werkzeugzeile: natives Auswahlfeld in Knopf-Optik (wirkt sofort, kein „Anwenden“) */
.settings-toolbar .select, .settings-filter .select { width: auto; min-width: 0; max-width: 180px; border-radius: 6px; padding: 0 28px 0 12px; cursor: pointer; }
.settings-toolbar .input[type="date"], .settings-filter .input[type="date"] { width: 148px; }
.settings-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-filter__label { font-size: 14px; line-height: 20px; color: var(--text-light); white-space: nowrap; }
.settings-toolbar .btn .count-badge, .settings-toolbar .btn .tab-count { margin-left: 2px; }
.settings-note { margin: -8px 0 16px; font-size: 14px; line-height: 20px; color: var(--text-light); max-width: 960px; }
.settings-note--top { margin-top: 0; }   /* erste Zeile einer Unterseite (E-Mail · Rolle · Stand) direkt unter der Titelzone */
/* Pillen-Umschalter neben dem Filterfeld wie Close „Active │ Archived“ (E375): 24 px hoch, Radius 6, aktiv blau gefüllt */
.seg-pills { display: inline-flex; align-items: center; gap: 4px; }
.seg-pill { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; font: 600 13px/18px var(--font-sans); color: var(--link); cursor: pointer; }
.seg-pill:hover { background: var(--bg-hover); }
.seg-pill.is-active, .seg-pill.is-active:hover { background: var(--bg-active); color: #fff; }
/* graue Variante (Close Webhooks „Active │ Paused“, E496): aktive Pille grau gefüllt #e2e2e2, dunkler Text */
.seg-pills--gray .seg-pill { display: inline-flex; align-items: center; gap: 4px; color: var(--text-medium); font-weight: 400; text-decoration: none; }
.seg-pills--gray .seg-pill.is-active, .seg-pills--gray .seg-pill.is-active:hover { background: var(--gray-10); color: var(--text-default); font-weight: 600; }
/* Hinweisband ohne Icon über die volle Breite (Close Developer, E493): #e5f3ff, ein Satz */
.settings-alert--plain { background: var(--cyan-5); color: var(--cyan-70); margin-bottom: 24px; }
/* Entwickler: API-Schlüssel (E493) – Zeile 64 px zweizeilig, Schlüssel immer verdeckt; Webhooks (E496) – Ereignisse als Pillen */
.keys-table col.keys-col-name { width: 46%; } .keys-table col.keys-col-key { width: 22%; } .keys-table col.keys-col-limit { width: 18%; }
/* Unter 1400 px (Kasten 747 px bei 1280): Name schmaler, Schlüssel und Beschränkung fest – „Zuletzt benutzt“ bleibt ganz lesbar,
   der verdeckte Schlüssel bleibt in seiner Spalte, nichts rollt waagerecht (Nachprüfung der Gesamtabnahme NP-02) */
@media (max-width: 1399px) { .keys-table col.keys-col-name { width: 34%; } .keys-table col.keys-col-key { width: 196px; } .keys-table col.keys-col-limit { width: 134px; } }
.settings-table.keys-table td, .settings-table.keys-table tbody th { height: 64px; }   /* 64 px einschließlich Linie (border-box); mit .settings-table davor, sonst gewinnt deren spätere 40-px-Regel */
.keys-id { font-size: 12px; line-height: 16px; }
.keys-secret { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); }
.keys-secret .icon { color: var(--gray-40); }
.keys-secret code { font-size: 13px; color: var(--text-light); }
.hook-events { display: flex; flex-wrap: wrap; gap: 4px; }
.hook-event { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--cyan-5); color: var(--cyan-70); font: 400 12px/20px var(--font-sans); white-space: nowrap; }
.hook-author { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-medium); }
.hook-author .avatar { flex: none; width: 16px; height: 16px; font-size: 7px; line-height: 16px; }
.settings-text-section { margin: 24px 0 0; max-width: 720px; }
.settings-text-section p { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-default); }
.settings-text-section a { color: var(--link); }
/* Aktivitätstypen (E375): eine Spalte, Zeile 58 px – Name, darunter „Zuletzt geändert am …“ */
.settings-table.atype-table td, .settings-table.atype-table tbody th { height: 58px; }   /* 58 px einschließlich Linie (border-box) */
.row-actions form { display: contents; }
/* Leerzustand im Kasten wie Close „Integration Links“ (E406): Rand, Radius 8, grauer Kreis 96 px mit Icon, Titel 16/24 700,
   ein Satz, blauer Knopf; keine Werkzeugzeile darüber */
.settings-empty-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 420px; padding: 32px 24px; border: 1px solid var(--border-default); border-radius: 8px; text-align: center; }
.settings-empty-box__icon { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; margin-bottom: 12px; border-radius: 50%; background: var(--gray-5); color: var(--gray-40); }
.settings-empty-box__icon .icon { width: 40px; height: 40px; }
.settings-empty-box__title { margin: 0; font: 700 16px/24px var(--font-sans); color: var(--text-default); }
.settings-empty-box__text { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--text-medium); max-width: 480px; }
.settings-empty-box__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.settings-empty-box__actions form { margin: 0; }
/* Integrations-Links (E407): blaues Ketten-Icon im Kreis 16 px vor dem Namen */
.link-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-name__icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--bg-active); color: #fff; }
.link-name__icon .icon { width: 10px; height: 10px; }
/* Link mittig unter einer Tabelle – an der Stelle, an der Close „Learn more about … ↗“ zeigt (E389) */
.settings-foot-link { margin: 16px 0 0; text-align: center; font-size: 14px; line-height: 20px; }
.settings-foot-link a { display: inline-flex; align-items: center; gap: 4px; color: var(--link); }
.settings-note a { color: var(--link); }

/* Hinweiszeilen über Tabellen (B.6.12): flach, einzeilig mit Aktion rechts */
.settings-alert {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: 8px;
  background: var(--gold-5); color: var(--gold-70); font-size: 14px; line-height: 20px;
}
.settings-alert > .icon { flex: none; margin-top: 2px; color: var(--gold-50); }
.settings-alert--danger { background: var(--red-5); color: var(--red-70); }
.settings-alert--danger > .icon { color: var(--red-50); }
.settings-alert--info { background: var(--cyan-5); color: var(--cyan-70); }
.settings-alert--info > .icon { color: var(--cyan-60); }
.settings-alert--ok { background: var(--green-5); color: var(--green-70); }
.settings-alert--ok > .icon { color: var(--green-50); }
.settings-alert__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.settings-alert__text p { margin: 0; }
.settings-alert__text p + p { margin-top: 4px; }
.settings-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.settings-alert .btn { flex: none; }
.settings-alert form { margin: 0; flex: none; }

/* ---------- Tabelle im Rahmen (M08, M09) ---------- */
/* position:relative – absolut gesetzte Kinder (.sr-only im Tabellenkopf) bleiben im eigenen Scrollbereich der Tabelle */
.settings-body .table-wrap { position: relative; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.settings-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--font-sans); }
.settings-table thead th {
  position: static; height: 41px; padding: 0 12px; background: var(--table-header); border-bottom: 1px solid var(--border-default);
  font-weight: 600; color: var(--text-default); text-align: left; white-space: nowrap;
}
.settings-table thead th:first-child { border-top-left-radius: 7px; }
.settings-table thead th:last-child { border-top-right-radius: 7px; }
.settings-table td, .settings-table tbody th {
  height: 41px; padding: 8px 12px; border-bottom: 1px solid var(--border-default); background: transparent; vertical-align: middle;   /* einzeilig 40 + 1 px Linie = 41 px wie Close (E339; E389: zwölf Zeilen = 451 px im Original) – bei border-box zählt die Linie zur Höhe; Nutzerzeilen wachsen mit Avatar/Zeilen auf 57/71 px (M08) */
  font-weight: 400; color: var(--text-default); text-align: left; white-space: normal; overflow-wrap: break-word;
}
.settings-table tbody tr:last-child > * { border-bottom: 0; }
.settings-table tbody tr:hover > * { background: var(--table-cell-hover); }
.settings-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.settings-table .nowrap { white-space: nowrap; overflow-wrap: normal; }
.settings-table .col-menu { width: 48px; padding: 4px 12px 4px 0; text-align: right; white-space: nowrap; }
.settings-table .col-menu .menu { white-space: normal; }   /* Menütexte brechen um, die Zelle selbst nicht */
.settings-table .col-actions { width: 1%; padding-top: 4px; padding-bottom: 4px; text-align: right; white-space: nowrap; }
.settings-table .col-grip { width: 28px; padding-right: 0; }
/* Laufende Nummer in der ersten Spalte, beim Überfahren der Griff (Close „Custom Fields“ E389/E390). Die Nummer zählt per
   CSS-Zähler je Gruppe und stimmt deshalb auch nach dem Ziehen und beim Filtern ohne Skript. */
.settings-table--numbered tbody, .settings-table--numbered tr.settings-group { counter-reset: setrow; }
.settings-table--numbered tbody tr[data-group] { counter-increment: setrow; }
.settings-table--numbered .col-grip { width: 48px; padding: 0; text-align: center; }   /* Nummer mittig bei 24 px (E389) */
/* Eigene Felder wie Close (E389/E390): Typ ab 60 % der Breite, „Pflichtfeld“ grau hinter dem Namen, Pille „Geteilt“
   weiß auf #007ebf am rechten Ende der Namensspalte, Typ-Zusatz („Mehrfach“) nur beim Überfahren als grauer Chip */
.cf-table--close thead th:nth-child(3) { width: 40%; }
.cf-table--close .col-menu { width: 72px; }
.field-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field-name__text { flex: 1; min-width: 0; }
.field-required { margin-left: 4px; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-light); }
.status-pill.pill-shared { flex: none; margin-right: 12px; background: var(--bg-info); color: #fff; }
.status-pill.type-extra { background: var(--gray-5); font-weight: 400; }
@media (hover: hover) { .settings-table tbody tr:not(:hover):not(:focus-within) .type-extra { visibility: hidden; } }
.settings-table--numbered .row-num::before { content: counter(setrow); font-size: 13px; line-height: 18px; color: var(--text-light); font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .settings-table--numbered tbody tr:not(:hover):not(:focus-within) .drag-handle { position: absolute; opacity: 0; pointer-events: none; }
  .settings-table--numbered tbody tr:hover .row-num:not(:only-child), .settings-table--numbered tbody tr:focus-within .row-num:not(:only-child) { display: none; }
}
@media (hover: none) { .settings-table--numbered .row-num:not(:only-child) { display: none; } }
.settings-table .cell-main { font-weight: 600; }
.settings-table .cell-sub { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--text-light); }
/* Beschreibung eines Feldes: grau 12 px, immer EINE Zeile mit „…“, Volltext im Tooltip (Regel 6; Zeile 49 px wie Close).
   Zeilen-Klemme statt white-space:nowrap – so verbreitert langer Text die Spalte im automatischen Tabellen-Layout nicht. */
.settings-table .cell-sub--line { font-size: 12px; line-height: 16px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; overflow-wrap: anywhere; }
.settings-table .cell-sm { font-size: 13px; line-height: 18px; }
.settings-table .cell-muted { color: var(--text-light); }
.settings-table a.cell-link { color: var(--link); }
.settings-table .cell-ellipsis { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-table code, .settings-form code, .settings-info code { font-size: 12.5px; overflow-wrap: anywhere; }
.settings-table--compact td, .settings-table--compact tbody th { height: 41px; padding: 6px 12px; }
.settings-table--fixed { table-layout: fixed; }
.settings-table col.col-w-48 { width: 48px; } .settings-table col.col-w-120 { width: 120px; } .settings-table col.col-w-160 { width: 160px; }
.settings-table col.col-w-200 { width: 200px; } .settings-table col.col-w-25p { width: 25%; } .settings-table col.col-w-40p { width: 40%; }
.settings-table tr.is-dim > * { color: var(--text-light); }
.settings-table tr.is-dim .cell-main { color: var(--text-medium); }
.settings-table tr.is-problem > * { background: var(--red-1); }
.settings-table tr[hidden] { display: none; }
.settings-body .btn.text-danger, .settings-body .btn.text-danger:hover { color: var(--text-danger); }
/* Gruppen-Zwischenzeile (Eigene Felder, archivierte Einträge): 32 px #f9f9f9, Großbuchstaben-Label, einklappbar */
.settings-table tr.settings-group > * { height: 32px; padding: 0 12px; background: var(--surface-medium); }
.settings-table tr.settings-group:hover > * { background: var(--surface-medium); }
.settings-group__toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 12px/16px var(--font-sans); letter-spacing: 0; text-transform: uppercase; color: var(--text-default);
}
.settings-group__toggle .icon { color: var(--icon-default); transition: transform var(--dur-quick) var(--ease); }
.settings-group__toggle[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.settings-group__toggle .tab-count { text-transform: none; }
.settings-table-empty td { height: 72px; text-align: center; color: var(--text-medium); }
/* Zeilenmenü ⋯ */
.row-menu-btn { width: 28px; height: 28px; padding: 0; border-color: transparent; background: transparent; }
.row-menu-btn:hover, .row-menu-btn[aria-expanded="true"] { background: var(--bg-hover); }
/* Zeilenaktionen wie Close (E345/E347): Stift, Papierkorb und ⋯ erscheinen erst, wenn die Zeile unter der Maus liegt,
   den Fokus hat oder ihr Menü offen ist; ohne Maus (Touch) stehen sie immer da. Randlose Knöpfe 24×24, Abstand 4 (80_settings §1.5). */
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; vertical-align: middle; }
.row-actions .row-action, .row-actions .row-menu-btn { width: 24px; height: 24px; min-width: 0; padding: 0; border-color: transparent; background: transparent; color: var(--icon-default); }
.row-actions .row-action:hover, .row-actions .row-menu-btn:hover, .row-actions .row-menu-btn[aria-expanded="true"] { background: var(--bg-hover); color: var(--text-default); }
@media (hover: hover) {
  .settings-table tbody tr:not(:hover):not(:focus-within) .row-menu-btn:not([aria-expanded="true"]),
  .settings-table tbody tr:not(:hover):not(:focus-within) .row-action { opacity: 0; }
  .settings-table tbody tr .row-actions:has([aria-expanded="true"]) .row-action { opacity: 1; }
}
/* Ziehgriff (Reihenfolge) */
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 28px; padding: 0; border: 0; background: none;
  color: var(--gray-20); cursor: grab; border-radius: 4px;
}
.drag-handle:hover { color: var(--gray-50); }
.drag-handle:active { cursor: grabbing; }
.is-dragging > * { opacity: .4; }
.is-drop-before > * { box-shadow: inset 0 2px 0 var(--blue-50); }
.is-drop-after > * { box-shadow: inset 0 -2px 0 var(--blue-50); }
/* Ja/Nein-Werte: Text 13 px #767676 + gefülltes Icon (M08 „2FA ✕“) */
.yn { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 18px; color: var(--text-light); white-space: nowrap; }
.yn .icon { width: 16px; height: 16px; color: #fff; flex: none; }
.yn--no .icon circle { fill: var(--gray-40); stroke: var(--gray-40); }
.yn--yes { color: var(--text-default); }
.yn--yes .icon { --icon-duo: var(--green-40); }
.yn--yes .icon circle { stroke: var(--green-40); }
/* Nutzer-Zelle: Avatar 32 px im 40-px-Feld + Name 14/600 (M08) */
.user-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-cell__avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; }
.user-cell__avatar.is-faded .avatar { opacity: var(--faded-opacity); }
/* Anwesenheit wie Close (M08, gemessen an FH/MJ/NL; crm/online.py): Ring 2 px #4cb24d im Abstand von 2 px um den
   32-px-Avatar, außen 40 px. Grün = online, Gelb = abwesend („Sleep mode“, über 5 min keine Eingabe), offline = ohne
   Ring und blass (50 % wie die blassen Avatare in M08). Nur die Nutzerliste trägt data-online. */
.user-cell__avatar[data-online] { position: relative; border-radius: 50%; }
.user-cell__avatar[data-online=online] { box-shadow: inset 0 0 0 2px var(--green-40); }
.user-cell__avatar[data-online=away] { box-shadow: inset 0 0 0 2px var(--gold-20); }
:root[data-theme="dark"] .user-cell__avatar[data-online=away] { box-shadow: inset 0 0 0 2px var(--gold-70); }   /* Gelb bleibt Gelb */
.user-cell__avatar[data-online=offline] .avatar { opacity: var(--faded-opacity); }
.user-cell__avatar[data-online=online] .avatar, .user-cell__avatar[data-online=away] .avatar { opacity: 1; }   /* wer da ist, ist nie blass */
/* Erklärung unter der Nutzerliste (Marvin 15.10.2026): kleine Ringe in denselben Farben wie am Avatar */
.user-cell__text { min-width: 0; }
.user-cell__name { display: block; font-weight: 600; color: var(--text-default); }
.user-cell__sub { display: block; font-size: 13px; line-height: 18px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.contact-lines { font-size: 12px; line-height: 18px; white-space: nowrap; }   /* E-Mail 12 px: „finn@marvinjeske.de“ 110 px [M M08] */
.contact-lines a { color: var(--link); }
.contact-lines .more { color: var(--text-light); }
/* Tooltip der weiteren Nummern: eine Nummer je Zeile wie Close (80 Z. 176) – Zeilenumbrüche im Tooltip-Text gelten */
body:has(.settings-page) .tooltip { white-space: pre-line; }
.contact-lines .more u { text-decoration: underline dashed 1px; text-decoration-color: var(--gray-40, currentColor); text-underline-offset: 4px; cursor: default; }
.pill-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.status-pill[data-color=red] { background: var(--red-10); color: var(--red-70); }
a.status-pill { text-decoration: none; }
.avatar-row { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.avatar-row__item { display: inline-flex; }
.avatar-row__item.is-faded .avatar { opacity: var(--faded-opacity); }
/* Dunkelmodus: blass heißt grau (kaum durchsichtig), damit die Initialen lesbar bleiben */
:root[data-theme="dark"] :is(.user-cell__avatar.is-faded, .user-cell__avatar[data-online=offline], .avatar-row__item.is-faded) .avatar { filter: grayscale(1); }
.avatar-row__count { margin-left: 4px; white-space: nowrap; }
.avatar-row--stack { gap: 0; flex-wrap: nowrap; }
.avatar-row--stack .avatar-row__item + .avatar-row__item { margin-left: -2px; }   /* leicht überlappend wie Close „Groups“ (E352) */
.avatar-row--stack .avatar-row__item .avatar { box-shadow: 0 0 0 1.5px var(--surface); }
.avatar-row--stack .avatar-row__count { margin-left: 8px; }
/* Gruppen wie Close (E352): Namensspalte 200 px, Mitglieder als 16-px-Avatare ohne Zähltext, Zeile 41 px */
.groups-table th:first-child { width: 200px; }
.groups-table .avatar-row--stack .avatar { width: 16px; height: 16px; font-size: 7px; line-height: 16px; }
/* Gruppen-Dialog wie Close „New Group“ (E354): Suchfeld, darunter die Nutzerliste (270 px, eigener Scroll) – je Zeile
   56 px: Checkbox · Avatar 24 · Name 14/20 · grau die E-Mail 12/16 */
.member-pick { max-height: 270px; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.member-pick__row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px; border-radius: 6px; cursor: pointer; }
.member-pick__row:hover { background: var(--bg-hover); }
.member-pick__row[hidden] { display: none; }
.member-pick__row > input { flex: none; margin: 0; }
.member-pick__row > .avatar { flex: none; }
.member-pick__text { display: flex; flex-direction: column; min-width: 0; }
.member-pick__name { font: 400 14px/20px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-pick__mail { font: 400 12px/16px var(--font-sans); color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-pick__empty { margin: 12px 8px; font-size: 14px; line-height: 20px; color: var(--text-light); }
.settings-table a.cell-main.cell-link { font-weight: 600; text-decoration: none; }
.settings-table a.cell-main.cell-link:hover { text-decoration: underline; }
/* Kasten mit Knopf rechts (Konto › Sicherheit, Close E334): Rand, Radius 8, Padding 16 */
.settings-box { padding: 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.settings-box__head { display: flex; align-items: flex-start; gap: 16px; }
.settings-box__text { flex: 1; min-width: 0; }
.settings-box__text p { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.settings-box__text .settings-box__title { font-weight: 600; color: var(--text-default); }
.settings-box__head .btn { flex: none; }
.settings-box__note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--blue-5); font-size: 14px; line-height: 20px; color: var(--text-default); }
.settings-box__note--ok { background: var(--gray-1); }

/* ---------- Formulare (M06) ---------- */
.settings-form { max-width: var(--settings-form-w); }
.settings-form--wide { max-width: 760px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.settings-grid > .settings-field--full { grid-column: 1 / -1; }
.settings-grid--wide-first { grid-template-columns: minmax(0, 1fr) 168px; }   /* Name breit, daneben der Typ (Close E423) */
.settings-field { display: flex; flex-direction: column; min-width: 0; margin: 0 0 16px; }
.settings-field--half { max-width: 288px; }
.settings-label, .settings-field > label:not(.checkbox):not(.switch):where(:not(.radio)) {
  display: block; margin: -2px 0 6px; font: 600 14px/20px var(--font-sans); color: var(--text-default);   /* [M M06: Label 2 px höher, 6 px zum Feld] */
}
.settings-field .input, .settings-field .select, .settings-field textarea, .settings-field select,
.settings-field input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=color]) {
  width: 100%; min-height: 32px; padding: 0 12px; border: 1px solid var(--form-border); border-radius: 8px; background: var(--form-bg);
  font: 400 14px/20px var(--font-sans); color: var(--text-default); outline: 0;
}
.settings-field textarea { padding: 6px 12px; resize: vertical; min-height: 64px; }
.settings-field select:not([multiple]) {
  appearance: none; -webkit-appearance: none; height: 32px; padding-right: 30px; background-repeat: no-repeat; background-position: right 8px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.settings-field .input:focus, .settings-field textarea:focus, .settings-field select:focus, .settings-field input:focus { border-color: var(--form-border-focus); }
.settings-field input:disabled, .settings-field input[readonly].is-readonly { background: var(--form-bg-disabled); color: var(--text-light); }
.settings-field.has-error .input, .settings-field.has-error input:not([type=checkbox]):not([type=radio]), .settings-field.has-error textarea, .settings-field.has-error select { border-color: var(--border-danger); }
.settings-field.has-error .settings-label, .settings-field.has-error > label:not(.checkbox):not(.switch):where(:not(.radio)) { color: var(--text-danger); }   /* Fehlerbild wie Close (E387): Label rot */
.settings-field .swatches { margin-top: 4px; }
.settings-field .field-error { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--text-danger); }
.settings-hint { margin: 4px 0 0; font: 400 14px/20px var(--font-sans); color: var(--text-light); }
.settings-hint a { color: var(--link); }
.settings-hint--block { margin: 0 0 16px; }
/* Django-Listen (RadioSelect, CheckboxSelectMultiple): <div id><div><label><input> Text</label></div></div> */
.settings-field > div[id] { display: flex; flex-direction: column; gap: 6px; }
.settings-field > div[id] label, .settings-field label.checkbox, .settings-check {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; font: 400 14px/20px var(--font-sans); color: var(--text-default); cursor: pointer;
}
.settings-field > div[id] label input, .settings-field label.checkbox input, .settings-check input { position: relative; top: 3px; flex: none; }
.settings-field--cols > div[id] { flex-direction: row; flex-wrap: wrap; gap: 6px 20px; }
.settings-field--cols2 > div[id] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.settings-grid > .settings-grid { margin: 0; }
.settings-grid [hidden] { display: none; }
/* Einklappbare Zeile im Dialog wie Close „Options“ (E385): Trennlinie, Titel halbfett, Pfeil rechts */
.settings-more { margin: 0; border-top: 1px solid var(--border-default); }
.settings-more > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.settings-more > summary::-webkit-details-marker { display: none; }
.settings-more > summary .icon { margin-left: auto; color: var(--icon-default); transition: transform var(--dur-quick) var(--ease); }
.settings-more[open] > summary .icon { transform: rotate(180deg); }
.settings-more__hint { font-weight: 400; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-more[open] > summary { margin-bottom: 8px; }
.settings-modal .modal-content:has(> .settings-more:last-child:not([open])) { padding-bottom: 0; }
/* Feld-Dialog (Close E384/E386): Chip „Optional“ am Label, ⓘ mit Tooltip, Auswahlwerte nur beim Typ „Auswahl“ */
.chip-optional { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: var(--gray-5); font: 400 12px/18px var(--font-sans); color: var(--text-medium); vertical-align: 1px; }
.field-form__info { display: inline-flex; vertical-align: -2px; color: var(--gray-40); cursor: help; }
.field-form__note { margin: -8px 0 16px; font-size: 13px; line-height: 18px; }
.field-form__choices { margin: 0 0 16px; padding-top: 16px; border-top: 1px solid var(--border-default); }
.field-form__choices[hidden] { display: none; }
.field-form__choices > .settings-field:last-child { margin-bottom: 0; }
.field-form__usage { margin: 12px 0 0; }
.modal-footer .modal-footer-left { margin-right: auto; }
/* Nutzer-Dialog (Close „New User“, E350): E-Mail und Rolle nebeneinander, Rollen-Erklärung darunter über die ganze Breite –
   mit Skript nur die gewählte Rolle (data-show-when), ohne Skript alle vier als Liste; darunter „Rollen & Rechte ansehen“ */
.user-form__roles { margin: -8px 0 16px; font-size: 13px; line-height: 18px; }
.role-help { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.role-help__item[hidden] { display: none; }
.role-help__item strong { font-weight: 600; color: var(--text-default); }
.role-help__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--link); }
.role-help__link .icon { width: 14px; height: 14px; flex: none; }
/* Organisation › Rollen & Rechte (Close „Roles & Permissions“ E361/E362): Rollen-Karten, darunter die Tabelle Recht × Rolle */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 32px; }
.role-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.role-card__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-card__name { margin: 0; font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.role-card__own { background: var(--blue-10); color: var(--blue-70); }
.role-card__summary { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.role-card__members, .role-card__note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 18px; color: var(--text-default); overflow-wrap: anywhere; }
.role-card__members { margin-top: auto; padding-top: 6px; }
.role-card__members strong { font-weight: 600; }
.role-card__members .icon, .role-card__note .icon { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--icon-default); }
.role-card__note { color: var(--text-light); }
.role-matrix__title { margin-top: 0; }
.role-matrix { min-width: 640px; }
.role-matrix col.role-matrix__col { width: 112px; }
.role-matrix thead th.role-matrix__role, .role-matrix td.role-matrix__cell { text-align: center; }
.role-matrix thead th.is-own { color: var(--link); }
.role-matrix tr.role-matrix__group > th { font: 600 13px/18px var(--font-sans); color: var(--text-default); }
.role-matrix .yn { justify-content: center; }
.role-matrix__scope { display: block; font-size: 12px; line-height: 16px; color: var(--text-light); }
.role-matrix__no { color: var(--gray-40); }
.role-deviations { max-width: 760px; }
.role-deviations__list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 20px; color: var(--text-default); }
.role-deviations__list li + li { margin-top: 4px; }
.users-table .role-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--gray-40); }
.users-table .role-link:hover { color: var(--link); border-bottom-color: currentColor; }
/* Konto › Ihre Rolle: ein Satz, darunter eingeklappt je Bereich erlaubt (✓) und nicht erlaubt (–) */
.role-own__more { margin-top: 12px; border-bottom: 1px solid var(--border-default); }
.role-own__list { margin: 0 0 12px; }
.role-own__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 16px; padding: 8px 0; }
.role-own__row + .role-own__row { border-top: 1px solid var(--border-default); }
.role-own__row dt { font: 600 13px/18px var(--font-sans); color: var(--text-default); }
.role-own__row dd { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.role-own__item { font-size: 13px; line-height: 18px; }
.role-own__item.yn--text { font-size: 13px; line-height: 18px; }
.role-own__item--no { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--text-light); }
.role-own__item--no .role-matrix__no { width: 16px; flex: none; text-align: center; }
.role-own__foot { margin: 12px 0 0; }
@media (max-width: 640px) { .role-own__row { grid-template-columns: minmax(0, 1fr); } }
.settings-section { margin: 0; min-width: 0; }
.settings-section + .settings-section, .settings-section--line { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-default); }
.settings-section + .settings-actions { margin-top: 24px; }
.settings-section > .settings-field:last-child { margin-bottom: 0; }
.settings-section > .settings-grid:last-child { margin-bottom: -16px; }
.settings-section__title { margin: 0 0 12px; font: 700 16px/24px var(--font-sans); color: var(--text-default); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-section__head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; min-height: 32px; flex-wrap: wrap; }
.settings-section__head .settings-section__title { margin: 0; }
.settings-section__head .settings-toolbar__right { margin-left: auto; }
.settings-section > p, .settings-text { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--text-default); max-width: 760px; }
.settings-section > p.settings-hint { color: var(--text-light); }
.settings-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 0; }
.settings-field + .settings-actions, .settings-grid + .settings-actions { margin-top: 0; }
.settings-info { margin: 16px 0 0; padding: 16px; border: 1px solid var(--gray-5); border-radius: 8px; background: var(--gray-1); }
.settings-info:first-child { margin-top: 0; }
.settings-info__title { margin: 0 0 8px; font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.settings-info p, .settings-info li { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.settings-info p + p { margin-top: 8px; }
.settings-info a { color: var(--link); }
.settings-info ul, .settings-info ol, .settings-steps { margin: 8px 0 0; padding-left: 20px; }
.settings-info__row { display: flex; align-items: center; gap: 8px; }
.settings-info__row > .avatar { flex: none; }  /* Konto › Profilbild (M06): Avatar 40 px bündig links, 8 px bis zum Text */
.settings-info__row > .avatar-preview { flex: none; display: inline-flex; }  /* Vorschau der eigenen Farbe (data-avatar-preview) */
/* Konto › Profilbild wie Close M06 (gemessen): Kasten 100 px = Titel 20 (#2e2e2e 600) + 4 + Zeile 42 (Text 2 × 21 px) + 2 × 16 + Rand */
.settings-info--profile > .settings-info__title { margin-bottom: 4px; color: var(--text-default); }
.settings-info--profile .settings-info__row p { line-height: 21px; }
.settings-kv { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; line-height: 20px; }
.settings-kv dt { color: var(--text-medium); }
.settings-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.settings-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 0 0 24px; }
.settings-card { padding: 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); min-width: 0; }
.settings-card__title { margin: 0 0 12px; font: 600 14px/20px var(--font-sans); color: var(--text-default); display: flex; align-items: center; gap: 8px; }
.settings-list-plain { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 20px; }
.settings-list-plain li { margin: 4px 0; }
.signature-preview { padding: 16px; border: 1px solid var(--gray-5); border-radius: 8px; background: var(--gray-1); overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
.signature-preview img { max-width: 100%; height: auto; }

/* Farbwahl: Statusfarben (8 Felder, 20 px) und die eigene Profilbildfarbe im Konto (10 Felder + „Automatisch“). */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.swatch { position: relative; display: inline-flex; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch__dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--sw-bg, var(--gray-2)); border: 1px solid var(--sw-bd, var(--gray-10)); box-shadow: 0 0 0 2px var(--surface); }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue-50); }
.swatch input:focus-visible + .swatch__dot { outline: 2px solid var(--blue-40); outline-offset: 3px; }
/* Statusfarben wie Close (E416/E417): acht Kreise 20 px in einer Reihe, der gewählte trägt einen Haken */
.swatch--status .swatch__dot { width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--gray-10); box-shadow: none; }
.swatch--status input:checked + .swatch__dot {
  box-shadow: none; background-repeat: no-repeat; background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232e2e2e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.swatch--status:hover .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gray-30); }
/* Dunkelmodus: „Grau“ ist dunkel wie seine Pill – der Haken darauf hell (die Pastell-Farben behalten den dunklen Haken) */
:root[data-theme="dark"] .swatch--status[data-color=gray] input:checked + .swatch__dot {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8e8ea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.swatch--status[data-color=blue] .swatch__dot { background: #d4e3ff; } .swatch--status[data-color=green] .swatch__dot { background: #c9f4c5; }
.swatch--status[data-color=yellow] .swatch__dot { background: #f9e9a1; } .swatch--status[data-color=orange] .swatch__dot { background: #ffdbc1; }
.swatch--status[data-color=purple] .swatch__dot { background: #e4ddff; } .swatch--status[data-color=magenta] .swatch__dot { background: #ffd6e1; }
.swatch--status[data-color=teal] .swatch__dot { background: #b3f4f1; }
/* Konto › Profilbild: eigene Farbe (Marvin 12.10.2026). Feld = Avatar im Kleinen: Grund der Randstufe, Rand in der
   Schriftfarbe der Palette (crm_tags.AVATAR_PALETTE). „Automatisch“ als Pille mit dem Punkt der Close-Regel. */
.swatches--avatar { align-items: center; gap: 10px; }
.swatches--avatar .swatch__dot { width: 24px; height: 24px; border-width: 1.5px; }
.swatches--avatar .swatch:hover .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gray-30); }
.swatches--avatar .swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue-50); }
.swatch[data-c=blue] { --sw-bg:#d4e3ff; --sw-bd:#245bc6; } .swatch[data-c=cyan] { --sw-bg:#c9e7ff; --sw-bd:#007ebf; }
.swatch[data-c=gold] { --sw-bg:#f9e9a1; --sw-bd:#907400; } .swatch[data-c=gray] { --sw-bg:#e2e2e2; --sw-bd:#767676; }
.swatch[data-c=green] { --sw-bg:#c9f4c5; --sw-bd:#418a42; } .swatch[data-c=magenta] { --sw-bg:#ffd6e1; --sw-bd:#ac0057; }
.swatch[data-c=orange] { --sw-bg:#ffdbc1; --sw-bd:#b25d00; } .swatch[data-c=purple] { --sw-bg:#e4ddff; --sw-bd:#854beb; }
.swatch[data-c=red] { --sw-bg:#ffd8d3; --sw-bd:#a62927; } .swatch[data-c=teal] { --sw-bg:#b3f4f1; --sw-bd:#008987; }
.swatch--auto { align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 3px; border: 1px solid var(--border-default); border-radius: 14px; background: var(--surface); font-size: 13px; line-height: 20px; color: var(--text-default); }
.swatches--avatar .swatch--auto .swatch__dot, .swatches--avatar .swatch--auto:hover .swatch__dot, .swatches--avatar .swatch--auto input:checked + .swatch__dot { width: 20px; height: 20px; box-shadow: none; }
.swatch--auto:hover { border-color: var(--gray-30); }
.swatch--auto:has(input:checked) { border-color: var(--blue-50); box-shadow: 0 0 0 1px var(--blue-50); }
.swatch--auto:has(input:focus-visible) { outline: 2px solid var(--blue-40); outline-offset: 2px; }
.settings-actions--avatar { margin-top: 12px; }
.user-form__avatar { display: flex; align-items: center; gap: 8px; margin: 0; }   /* Nutzer bearbeiten: Profilbildfarbe zur Ansicht */
.user-form__avatar > .avatar { flex: none; }

/* Tags am Konto (Marvin 13.11.): Chips zum Anklicken, gesetzt mit Haken und Fläche, daneben „+ Tag“ als Feld. In der Nutzerliste ruhig neben dem Namen */
.user-tags__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.user-tag { position: relative; display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.user-tag__wahl { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.user-tag__text { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border: 1px solid var(--border-default); border-radius: 14px; background: var(--surface); font: 400 13px/18px var(--font-sans); color: var(--text-medium); user-select: none; }
.user-tag__haken { display: none; }
.user-tag:hover .user-tag__text { border-color: var(--border-hover); color: var(--text-default); }
.user-tag__wahl:checked + .user-tag__text { background: var(--bg-active-muted); border-color: var(--border-active-muted); color: var(--text-default); font-weight: 600; padding-left: 9px; }
.user-tag__wahl:checked + .user-tag__text .user-tag__haken { display: inline-block; color: var(--bg-active); }
.user-tag__wahl:focus-visible + .user-tag__text { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.user-tag--neu input { width: 120px; height: 28px; padding: 0 12px; border: 1px dashed var(--border-default); border-radius: 14px; background: transparent; font: 400 13px/18px var(--font-sans); color: var(--text-default); }
.user-tag--neu input:focus { width: 180px; border-style: solid; border-color: var(--border-focus); outline: none; }
.user-tag--neu input::placeholder { color: var(--text-medium); }
.user-cell__tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.user-cell__tag { display: inline-block; padding: 0 7px; border-radius: 9px; background: var(--gray-5); font: 400 12px/18px var(--font-sans); color: var(--text-medium); }

/* Passwort-Stärke: 5 Segmente je 52 × 3 px, #e2e2e2 → #4cb24d (M06) */
.pw-meter { display: flex; gap: 4px; width: 288px; max-width: 100%; margin: -4px 0 8px; }   /* 5 × 54 px + 4 px = 288 px wie das Passwortfeld [M M06] */
.pw-meter span { flex: 1; height: 3px; border-radius: 2px; background: var(--gray-5); transition: background var(--dur-quick) var(--ease); }
.pw-meter[data-level="1"] span:nth-child(-n+1), .pw-meter[data-level="2"] span:nth-child(-n+2), .pw-meter[data-level="3"] span:nth-child(-n+3),
.pw-meter[data-level="4"] span:nth-child(-n+4), .pw-meter[data-level="5"] span:nth-child(-n+5) { background: var(--green-40); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: var(--red-40); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: var(--orange-30); }

/* ---------- Listen im Rahmen (Migration, Papierkorb-Vorgang) ---------- */
.settings-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.settings-list__row {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--border-default); min-width: 0;
}
.settings-list__row:last-child { border-bottom: 0; }
.settings-list__row:hover { background: var(--table-cell-hover); }
.settings-list__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-list__meta { margin-left: auto; color: var(--text-light); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.settings-list-group { margin-top: 16px; }
.settings-list-group > summary { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; cursor: pointer; list-style: none; font: 600 12px/16px var(--font-sans); text-transform: uppercase; color: var(--text-default); }
.settings-list-group > summary::-webkit-details-marker { display: none; }
.settings-list-group > summary .icon { transition: transform var(--dur-quick) var(--ease); transform: rotate(-90deg); color: var(--icon-default); }
.settings-list-group[open] > summary .icon { transform: none; }

/* ---------- Status & Pipelines wie Close (close-erkundung 82 §7, E414–E424) ----------
   Eine Spalte 560 px; je Abschnitt Überschrift 16/24 700 + grauer Satz; Kasten (Rand, Radius 8) mit hellblauer
   Anlege-Zeile (~65 px, Padding 16) und Statuszeilen 48 px: Nummer (Spalte 44 px, beim Überfahren der Ziehgriff),
   Status, rechts die Aktionen (nur beim Überfahren). Pipelines: Kopfzeile 40 px, Typ-Pill rechts vor den Aktionen. */
.status-col { max-width: 560px; padding-top: 14px; }   /* Linie der Titelzone → erste Überschrift ~38 px (E414) */
.status-sec { margin: 0; min-width: 0; }
.status-sec--line { margin-top: 26px; padding-top: 38px; border-top: 1px solid var(--gray-5); }   /* Linie heller als der Kastenrand, spaltenbreit */
.status-sec__title { margin: 0; font: 700 16px/24px var(--font-sans); color: var(--text-default); }
.status-sec__hint { margin: 10px 0 22px; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.status-sec__note { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-light); }
.status-box { border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.status-box + .status-box { margin-top: 24px; }
.status-box__head { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border-default); }
.status-box__title { flex: 1; min-width: 0; margin: 0; font: 700 14px/20px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-box__empty { margin: 0; padding: 14px 16px; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.status-box__empty--plain { padding: 0 0 16px; }
.status-add { display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px; background: var(--cyan-5); border-bottom: 1px solid var(--border-default); border-radius: 7px 7px 0 0; }   /* #e5f3ff, in E414 gemessen */
.status-box__head + .status-add { border-radius: 0; }
.status-add:last-child { border-bottom: 0; border-radius: 7px; }
.status-add__field { position: relative; flex: 1; min-width: 0; }
.status-add__field .input { width: 100%; }
.status-add__field .color-dot { position: absolute; left: 8px; top: 6px; z-index: 1; }
.status-add__field .color-dot + .input { padding-left: 36px; }
.status-add__type { flex: none; min-width: 113px; justify-content: flex-start; gap: 6px; background: var(--surface); font-weight: 400; }
.status-add__type .caret { margin-left: auto; }
/* Punkt in der Typfarbe eines Opportunity-Status: Aktiv gelb, Gewonnen grün, Verloren grau (E421). .type-dot heißt auch der
   Punkt im Typ-Filter des Verlaufs der Lead-Seite (wp_detail.css) – beide Regeln stehen deshalb unter ihrem Bauteil */
.status-add .type-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #fccc0b; }
.status-add .type-dot[data-type=won] { background: #4cb24d; }
.status-add .type-dot[data-type=lost] { background: #919191; }
.status-add .btn { flex: none; }
.color-dot { display: inline-block; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: var(--gray-10); cursor: pointer; }   /* 20 px (E415) */
.color-dot:hover, .color-dot[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gray-30); }
.color-dot[data-color=blue] { background: #d4e3ff; } .color-dot[data-color=green] { background: #c9f4c5; }
.color-dot[data-color=yellow] { background: #f9e9a1; } .color-dot[data-color=orange] { background: #ffdbc1; }
.color-dot[data-color=purple] { background: #e4ddff; } .color-dot[data-color=magenta] { background: #ffd6e1; }
.color-dot[data-color=teal] { background: #b3f4f1; }
.color-pop { min-width: 0; width: auto; padding: 12px; }
.color-pop .swatches { margin: 0; flex-wrap: nowrap; }
.status-rows { margin: 0; padding: 0; list-style: none; }
.status-row { display: flex; align-items: center; gap: 0; min-height: 48px; padding: 0 12px 0 0; border-bottom: 1px solid var(--border-default); min-width: 0; }
.status-row:last-child { border-bottom: 0; border-radius: 0 0 7px 7px; }
.status-row:hover, .status-row:focus-within { background: var(--table-cell-hover); }
.status-row__num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; font-size: 13px; line-height: 18px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.status-row__main { display: flex; align-items: center; flex: 1; min-width: 0; }
.status-row__main .status-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; height: auto; padding: 2px 6px; }
.status-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Typ-Pille rechtsbündig, rechte Kante 108 px vor der Kastenkante, kräftige Farben wie A.3 für Opportunity-Status (E419) */
.status-row__type { display: flex; justify-content: flex-end; flex: none; margin: 0 16px 0 12px; }
.status-row__type .status-pill[data-color=yellow] { background: var(--gold-20); }
.status-row__type .status-pill[data-color=green] { background: var(--green-20); }
.status-row__type .status-pill[data-color=gray] { background: var(--gray-10); }
.status-row .row-actions { flex: none; width: 80px; }
.status-row.is-dim .status-row__name, .status-row.is-dim .status-pill { opacity: .6; }
.status-row.is-drop-before { box-shadow: inset 0 2px 0 var(--blue-50); }
.status-row.is-drop-after { box-shadow: inset 0 -2px 0 var(--blue-50); }
.status-row.is-dragging { opacity: .4; }
.status-row .row-actions form { display: contents; }
.row-action.is-disabled { opacity: .35; cursor: default; }
@media (hover: hover) {
  .status-row:not(:hover):not(:focus-within) .drag-handle { position: absolute; opacity: 0; pointer-events: none; }
  .status-row:hover .row-num:not(:only-child), .status-row:focus-within .row-num:not(:only-child) { display: none; }
  .status-row:not(:hover):not(:focus-within) .row-action, .status-row:not(:hover):not(:focus-within) .row-menu-btn:not([aria-expanded="true"]),
  .status-box__head:not(:hover):not(:focus-within) .row-action, .status-box__head:not(:hover):not(:focus-within) .row-menu-btn:not([aria-expanded="true"]) { opacity: 0; }
  .status-row .row-actions:has([aria-expanded="true"]) .row-action, .status-box__head .row-actions:has([aria-expanded="true"]) .row-action { opacity: 1; }
}
@media (hover: none) { .status-row .row-num:not(:only-child) { display: none; } }
.status-new-pipeline { margin-top: 24px; }

/* ---------- Dialoge der Einstellungen wie Close (close-erkundung 80 §1.5, E348/E350/E417) ----------
   560 px breit (große Formulare 800 px), Radius 12, Kopf 57 px mit Titel 16/700, Fuß #f9f9f9 mit „Abbrechen“ als
   Textknopf ohne Rand + blauem Hauptknopf. Gilt für jeden Dialog, der auf einer Einstellungsseite geöffnet wird. */
body:has(.settings-page) .modal:not(.modal-wide):not(.modal-narrow) .modal-dialog { max-width: 560px; }
body:has(.settings-page) .modal.modal-wide .modal-dialog { max-width: 800px; }
body:has(.settings-page) .modal { padding-top: 10vh; }   /* Oberkante bei ~10 % der Fensterhöhe (E348: y 124 von 1249) */
body:has(.settings-page) .modal-dialog { border-radius: 12px; }
body:has(.settings-page) .modal-title { font-size: 16px; font-weight: 700; }
body:has(.settings-page) .modal-footer { min-height: 61px; border-radius: 0 0 12px 12px; }
body:has(.settings-page) .modal-footer .btn:not(.btn-primary):not(.btn-danger) { border-color: transparent; background: transparent; }
body:has(.settings-page) .modal-footer .btn:not(.btn-primary):not(.btn-danger):hover { background: var(--bg-hover); }
@media (max-width: 640px) { body:has(.settings-page) .modal-dialog { max-width: none !important; border-radius: 12px 12px 0 0; } }
/* Hohe Dialoge passen immer ins Fenster wie in Close (E395): Kopf und Fuß stehen fest, es rollt nur der Inhalt dazwischen – nie die ganze
   Überlagerung. Der Dialog ist dafür eine Spalte, höchstens so hoch wie der Platz unter den 10 % Abstand; Menüs im Dialog sind fixiert
   (app.js: positionMenu) und werden nicht abgeschnitten. Hat ein Dialog den Aufbau Kopf/Inhalt/Fuß nicht, rollt ersatzweise sein Körper.
   Die Spalte gilt nur für ein Formular, das den Inhalt umschließt – ein Formular, das selbst der Fuß ist (Papierkorb „Endgültig löschen?“),
   bleibt eine Zeile. Am Telefon bleibt das Blatt von unten aus app.css [Abnahme ET-02] */
@media (min-width: 641px) {
  body:has(.settings-page) .modal { overflow: hidden; }
  body:has(.settings-page) .modal-dialog { display: flex; flex-direction: column; max-height: 100%; }
  body:has(.settings-page) .modal-body { display: flex; flex-direction: column; flex: 1 1 auto; overflow-y: auto; }
  body:has(.settings-page) .modal-body > form:has(> .modal-content) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  body:has(.settings-page) .modal-header, body:has(.settings-page) .modal-footer { flex: none; }
  body:has(.settings-page) .modal-body > .modal-content, body:has(.settings-page) .modal-body > form > .modal-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

/* Reiter im Dialogkopf wie Close „New │ Shared“ (E386/E388): Unterstrich-Reiter unter dem Titel, auf der Kopflinie */
.modal-header--tabs { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 0; }
.modal-tabs { display: flex; gap: 20px; }
.modal-tab { position: relative; display: inline-flex; align-items: center; height: 32px; font: 400 14px/20px var(--font-sans); color: var(--text-light); text-decoration: none; }
.modal-tab:hover { color: var(--text-default); text-decoration: none; }
.modal-tab.is-active { color: var(--text-default); }
.modal-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text-default); }
/* Liste zum Anklicken im Dialog (Reiter „Vorhanden“, E388): Suchfeld über die volle Breite, Zeilen mit Name links, Typ rechts */
.settings-search--full { display: block; width: 100%; margin: 0 0 8px; }
.pick-list { margin: 0; max-height: 360px; overflow-y: auto; border: 1px solid var(--border-default); border-radius: 8px; }
.pick-list__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pick-list__table td { padding: 0; border-bottom: 1px solid var(--border-default); }
.pick-list__table tr:last-child td, .pick-list__table tr:nth-last-child(2) td { border-bottom: 0; }
.pick-list__table tr[hidden] { display: none; }
.pick-list__empty { padding: 12px !important; color: var(--text-medium); font-size: 14px; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 6px 12px; border: 0; background: none; font: 400 14px/20px var(--font-sans); color: var(--text-default); text-align: left; cursor: pointer; }
.pick-row:hover, .pick-row:focus-visible { background: var(--table-cell-hover); }
.pick-row__main { flex: 1; min-width: 0; }
.pick-row__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row__sub { display: block; font-size: 12px; line-height: 16px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row__type { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--text-medium); white-space: nowrap; }

/* ---------- Modal-Formulare der Einstellungen (B.6.10) ---------- */
.settings-modal .modal-content > .settings-field:last-child, .settings-modal .modal-content > p:last-child { margin-bottom: 0; }
.settings-modal__object { margin: 0 0 12px; font-weight: 600; }
.settings-modal .alert { margin-bottom: 16px; }
.settings-modal .modal-content > p { margin: 0 0 12px; }

/* ---------- Nutzerverwaltung, Einladungen, Zwei-Faktor, Passwort (Paket security) ---------- */
.security-narrow { max-width: 592px; }
.security-help { margin: 0 0 16px; padding-left: 18px; font-size: 13px; line-height: 18px; color: var(--text-light); }
.security-help li { margin: 2px 0; }
.security-badges { white-space: normal; }
.users-table tr.row-inactive .user-cell__name { color: var(--text-medium); }
/* Spalten wie in Close gemessen [M M08, 1920 px: Tabellenkante x 605, Kopftexte „User“ 617, „Role“ 869, „Email & Phone“ 934, „2FA“ 1093,
   nächste Spalte 1262 – je 12 px Zelleninnenabstand]: Nutzer 252, Rolle 65, E-Mail & Telefon 159, 2FA 169 px; der Rest gehört „Anmeldung“.
   Die Breiten sind Wunschbreiten der automatischen Tabelle: längerer Inhalt (lange Adresse, Rolle „Super User“) macht seine Spalte breiter,
   in schmalen Fenstern gibt die Tabelle nach. Unter 1700 px ist „2FA“ nur so breit wie ihr Inhalt und „Nutzer“ 220 px – der Platz geht an
   „Anmeldung“, deren zwei Marken bei 1440 px so nebeneinander bleiben (Zeile 71 px wie in Close) [Abnahme ET-05] */
.users-table th:nth-child(1) { width: 252px; }
.users-table th:nth-child(2) { width: 65px; } .users-table th:nth-child(3) { width: 159px; } .users-table th:nth-child(4) { width: 169px; }
.users-table td:nth-child(2), .users-table td:nth-child(3), .users-table td:nth-child(4) { white-space: nowrap; }
@media (max-width: 1700px) { .users-table th:nth-child(1) { width: 220px; } .users-table th:nth-child(4) { width: 1%; } }
/* Gruppen unter dem Namen: nehmen die Breite der Spalte, bestimmen sie aber nicht (Ellipse statt breiter Tabelle) */
.users-table .user-cell__text { flex: 1; }
.users-table .user-cell__sub { width: 0; min-width: 100%; max-width: none; }
.users-table .col-menu { width: 100px; padding-right: 12px; }
.yn--text { font-size: 14px; line-height: 20px; white-space: normal; color: var(--text-default); align-items: flex-start; }
.yn--text .icon { margin-top: 2px; }
p.pw-rules, .pw-rules { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 288px; margin: 0 0 16px; font-size: 14px; line-height: 20px; color: var(--text-light); }   /* „Hinweise“ rechtsbündig am Feldende [M M06] */
.pw-rules__link { padding: 0; border: 0; background: none; font: inherit; color: var(--link); cursor: pointer; }
.pw-rules__link:hover { text-decoration: underline; }
.pw-guidance .security-help { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-default); }
.pw-guidance .security-help li { margin: 4px 0; }
.input-code { font-family: var(--font-mono); letter-spacing: .2em; font-size: 18px; max-width: 220px; }
.twofa-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.twofa-qr { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border-default); border-radius: 8px; padding: 8px; }
.twofa-steps { flex: 1 1 320px; min-width: 0; max-width: 592px; }
.twofa-steps ol { padding-left: 20px; margin: 0 0 16px; }
.twofa-steps li { margin-bottom: 8px; }
.twofa-secret { display: inline-block; margin-top: 4px; font-size: 15px; letter-spacing: .08em; word-break: break-all; user-select: all; }
.qr-code { width: 200px; height: 200px; display: block; }
.qr-code path { fill: var(--gray-90); }
/* Dunkelmodus: QR-Codes lesen viele Authenticator-Apps nur dunkel auf hell – Kachel hellgrau (Leuchtdichte 0,66, kein weißer
   Fleck), Punkte schwarz (14 : 1) */
:root[data-theme="dark"] .twofa-qr { background: #d4d4d4; border-color: transparent; }
:root[data-theme="dark"] .qr-code path { fill: #191919; }
.invite-result .input-group { display: flex; gap: 8px; }
.invite-result .input-group .input, .secret-row .input { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 13px; }
.secret-row { display: flex; gap: 8px; align-items: stretch; }
.secret-row .btn { flex: none; }
.invite-qr { display: flex; align-items: center; gap: 16px; margin: 16px 0 0; flex-wrap: wrap; }
.invite-qr .qr-code { width: 160px; height: 160px; }
.invite-qr p { margin: 0; }
.recovery-codes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; max-width: 420px; }
.recovery-codes code { font-size: 16px; letter-spacing: .08em; }
.onboarding-manual { margin: 0; padding-left: 20px; }
.onboarding-manual li { margin: 4px 0; font-size: 13px; line-height: 18px; }

/* ---------- Migration ---------- */
.migration-check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-bottom: 1px solid var(--border-default); margin: 0; }
.migration-check:last-child { border-bottom: 0; }
.migration-check__text { flex: 1; min-width: 0; }
.migration-check.is-done .migration-check__text { color: var(--text-light); text-decoration: line-through; }
.migration-report { max-height: 480px; overflow: auto; padding: 16px; border: 1px solid var(--gray-5); border-radius: 8px; background: var(--gray-1); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.migration-report h1, .migration-report h2, .migration-report h3 { font-size: 14px; line-height: 20px; margin: 12px 0 4px; }
.migration-report table { border-collapse: collapse; } .migration-report td, .migration-report th { border: 1px solid var(--border-default); padding: 2px 8px; }

/* ---------- Anmeldeseiten (C-20): Karte 400 px auf #f9f9f9, Titel 24/700, Knopf blau ---------- */
.auth-page .app-content { background: var(--surface-medium); overflow: auto; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; margin: auto; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); box-shadow: none; }
.auth-brand { display: block; margin: 0 0 20px; }
.auth-brand .brand-mark { display: none; }
.auth-title { margin: 0; font: 700 24px/32px var(--font-sans); color: var(--text-default); }
.auth-subtitle { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--text-light); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .label { font: 600 14px/20px var(--font-sans); margin-bottom: 0; }
.auth-form .btn-lg { height: 40px; }
.auth-card > p { margin: 0 0 16px; font-size: 14px; line-height: 20px; }
.auth-card .alert { margin-bottom: 16px; }
.auth-hint { margin: 16px 0 0; font-size: 13px; line-height: 18px; text-align: left; color: var(--text-light); }
.auth-hint a { color: var(--link); }

@media (max-width: 1100px) {
  .settings-page { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .settings-page { display: block; height: auto; }
  .app-content.page-settings { overflow: auto; }
  .settings-nav { border-right: 0; border-bottom: 1px solid var(--border-default); max-height: 40vh; }
  .settings-main { overflow: visible; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-search { width: 100%; }
}
@media (max-width: 640px) {
  .twofa-setup { flex-direction: column; }
  .recovery-codes { grid-template-columns: 1fr; }
}
@media print {
  .settings-nav, .settings-toolbar, .settings-head .page-tabs, .settings-actions, .form-actions, .toolbar, .row-menu-btn, .row-actions { display: none !important; }
  .settings-page { display: block; height: auto; }
  .settings-main { overflow: visible; }
  .recovery-codes code { font-size: 14pt; }
}

/* ---------- Allgemein › Darstellung wie Close „Appearance › Theme“ (close-erkundung 80 Abschnitt 3; E336, E337) ----------
   Vier Karten 168 px: Vorschau 152 × 96 (Seitenleiste + Inhalt in den echten Farben des Schemas – unabhängig vom gerade
   aktiven Schema, daher feste Werte), darunter Icon + Name. Gewählt: hellblau mit blauem Rand. */
.theme-cards { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.theme-card {
  display: flex; flex-direction: column; gap: 8px; width: 168px; padding: 8px; border: 1px solid var(--border-default); border-radius: 8px;
  background: var(--surface); color: var(--text-default); font: 600 13px/18px var(--font-sans); text-align: left; cursor: pointer;
}
.theme-card:hover { border-color: var(--border-hover); }
.theme-card:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.theme-card.is-selected, .theme-card[aria-checked="true"] { background: var(--blue-5); border-color: var(--blue-50); }
.theme-card__preview { position: relative; display: flex; height: 96px; overflow: hidden; border: 1px solid var(--border-default); border-radius: 6px; }
.theme-card__side { flex: none; width: 36px; background: #191919; }
.theme-card__side--hell, .theme-card__side--system { background: #f7f7f8; box-shadow: inset -1px 0 0 #e2e2e2; }
.theme-card__side--dunkel { background: #161719; }
.theme-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 10px; background: #fff; }
.theme-card__body--dunkel { background: #202124; }
/* System: schräg geteilt – oben links hell, unten rechts dunkel */
.theme-card__preview--system::after { content: ""; position: absolute; inset: 0; background: #202124; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.theme-card__bar { display: block; height: 6px; border-radius: 3px; background: #e2e2e2; }
.theme-card__body--dunkel .theme-card__bar { background: #36383d; }
.theme-card__bar--short { width: 60%; }
.theme-card__bar--accent { width: 36%; background: #2b6cf0; }
/* Dunkelmodus: die hellen Vorschauen bleiben als hell erkennbar, aber gedimmt – kein weißer Fleck auf der dunklen Seite */
:root[data-theme="dark"] .theme-card__preview:not(.theme-card__preview--dunkel) { filter: brightness(.8); }
.theme-card__body--dunkel .theme-card__bar--accent { background: #2b6cf0; }
.theme-card__label { display: inline-flex; align-items: center; gap: 6px; }
.theme-card__label .icon { color: var(--icon-default); }
/* Einstellungen › Konto › Sprachprofil (Souffleur, crm/templates/crm/souffleur/speech_profile.html): Profiltext wie eine Antwort
   des Assistenten (Überschriften, Listen), Beispielsätze als Liste */
.speech-profile__text { margin: 8px 0 16px; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.speech-profile__text h1, .speech-profile__text h2, .speech-profile__text h3 { margin: 12px 0 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.speech-profile__text p, .speech-profile__text ul, .speech-profile__text ol { margin: 0 0 8px; }
.speech-profile__text ul, .speech-profile__text ol, .speech-profile__examples { padding-left: 20px; }
.speech-profile__examples { margin: 4px 0 12px; }
.speech-profile__examples li { margin: 2px 0; }
/* Einstellungen › Konto › Benachrichtigungen per E-Mail (crm/benachrichtigung_mail, crm/templates/crm/auth/profile.html): ein Feld,
   ein Knopf; am Handy beide als 44-px-Ziele und das Adressfeld in voller Breite */
@media (max-width: 640px) {
  .notify-mail .btn { min-height: 44px; }
  .notify-mail .input { height: 44px; }   /* height, nicht min-height: „.settings-field input:not(…)“ setzt min-height stärker */
  .notify-mail .settings-field--half { max-width: none; }
}
