/*
 * Verwaltung (GME) und Team (Mandant) im Stil der macOS-Systemeinstellungen (Konzept 8.5):
 * links die Bereiche, rechts gruppierte Listen mit Haarlinien und 14 px Radius; Anlegen und Bearbeiten
 * in Sheets. Dieselbe Hülle wie der Chat. Animiert werden nur transform und opacity.
 */

:root {
  /* Systemschriften mit fester Breite für Variablennamen, Links und Tokens (keine externen Schriften). */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Gruppen heben sich leicht von ihrer Fläche ab: im Hauptbereich getönt, in der Seitenleiste weiß. */
.main { --group-bg: var(--bg-side); }
.sidebar { --group-bg: var(--bg); }
.sheet { --group-bg: var(--surface); }
@media (prefers-color-scheme: dark) {
  .main { --group-bg: color-mix(in srgb, var(--ink) 6%, var(--bg)); }
  .sidebar { --group-bg: color-mix(in srgb, var(--ink) 6%, var(--bg-side)); }
  /* Auf der getönten Gruppe im Dunkeln braucht der Daumen mehr Abstand zur Spur. */
  .group .segmented, .field-group .segmented { --thumb: color-mix(in srgb, var(--ink) 28%, var(--bg)); }
}

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

.settings-page {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.page-lead { flex: none; }
.page-titles { flex: 1 1 14rem; min-width: 0; }
.page-title {
  font-size: 1.625rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.page-sub {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.375rem;
}
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }

/* Zurück: unter 640 px zur Bereichsliste; im Mandanten-Detail immer. */
.page-bar { display: none; }
.page-bar-always {
  display: flex;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 14px 32px 0;
}
.page-bar-always + .settings-page { padding-top: 6px; }
.page-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  margin-left: -10px;
  padding: 0 10px 0 2px;
  border-radius: 10px;
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.375rem;
  text-decoration: none;
  transition: transform var(--dur-press) var(--ease-out);
}
.page-back .icon { width: 26px; height: 26px; }
.page-back:active { transform: scale(0.97); }

/* ---------- Gruppen und Zeilen ---------- */

.group { margin-top: 28px; }
.page-head + .group, .page-head + .callout, .page-head + .settings-empty { margin-top: 24px; }
.group-title {
  padding: 0 4px 8px;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.group-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--group-bg);
  border-radius: var(--radius-card);
}
.group-item { position: relative; }
/* Haarlinie unter jeder Zeile außer der letzten, eingerückt bis zu ihrem Text (wie in iOS). */
.group-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--inset, 16px);
  right: 0;
  z-index: 3;
  border-bottom: 1px solid var(--hairline);
  pointer-events: none;
}
.group-item:has(> .row > .row-lead) { --inset: 60px; }
.group-item:first-child > .row, .group-box > .row:first-child, .access > .row { border-top-left-radius: var(--radius-card); border-top-right-radius: var(--radius-card); }
.group-item:last-child > .row, .group-box > .row:last-child, .access > .row { border-bottom-left-radius: var(--radius-card); border-bottom-right-radius: var(--radius-card); }

.group-foot {
  padding: 8px 4px 0;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.group-foot p + p { margin-top: 4px; }
.group-foot .steps { margin-top: 6px; }

.row {
  /* Nebentexte: auf getönten (gedrückten) Zeilen kräftiger, damit sie 4,5 : 1 halten. */
  --row-ink-2: var(--ink-2);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.row-link, .row-button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.row-link:focus-visible, .row-button:focus-visible { z-index: 4; outline-offset: -2px; }
.row-link:active, .row-button:active {
  --row-ink-2: color-mix(in srgb, var(--ink) 76%, transparent);
  background: color-mix(in srgb, var(--ink) 7%, var(--group-bg));
}
.row-lead { flex: none; display: grid; place-items: center; }
.row-text { flex: 1 1 11rem; min-width: 0; display: grid; gap: 1px; }
.row-title { font-size: 0.9375rem; line-height: 1.25rem; font-weight: 500; overflow-wrap: anywhere; }
.row-sub {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  letter-spacing: 0.01em;
  color: var(--row-ink-2);
  overflow-wrap: anywhere;
}
.row-trail { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; margin-left: auto; }
.row-value { color: var(--row-ink-2); font-size: 0.9375rem; line-height: 1.25rem; font-variant-numeric: tabular-nums; }
.row-chevron { width: 18px; height: 18px; margin-right: -4px; color: var(--ink-3); }
.row-self { color: var(--row-ink-2); font-weight: 400; }
.nowrap { white-space: nowrap; }
.row-note { min-height: 48px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.25rem; }
.row-action { color: var(--accent); }
.row-action .row-lead { width: 32px; }
.row-action .icon { width: 20px; height: 20px; }
.row-action .row-title { color: var(--accent); }
.row-stack { flex-direction: column; align-items: stretch; gap: 8px; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.row-steps { padding-block: 14px; }

@media (hover: hover) and (pointer: fine) {
  .row-link:hover, .row-button:hover {
    --row-ink-2: color-mix(in srgb, var(--ink) 74%, transparent);
    background: color-mix(in srgb, var(--ink) 4%, var(--group-bg));
  }
  .group-item:has(> :is(.row-link, .row-button):hover)::after,
  .group-item:has(+ .group-item > :is(.row-link, .row-button):hover)::after { border-bottom-color: transparent; }
}
.group-item:has(> :is(.row-link, .row-button):active)::after,
.group-item:has(+ .group-item > :is(.row-link, .row-button):active)::after { border-bottom-color: transparent; }

/* ---------- Kacheln, Zustände ---------- */

.tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}
.tile .icon { width: 18px; height: 18px; }
.tile-sm { width: 28px; height: 28px; border-radius: 7px; }
.tile-sm .icon { width: 17px; height: 17px; }
.tile-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 1.125rem; }
.group-item:has(> .row > .row-lead > .tile-sm) { --inset: 56px; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* „fehlt“, „Eingeladen“: Hinweisfarbe (Funktionsfarbe Notiz), kein Fehlerrot. */
.pill-warn { background: var(--note-bg); color: var(--note-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--note-ink) 18%, transparent); }
.pill-muted { background: color-mix(in srgb, var(--ink) 10%, transparent); color: color-mix(in srgb, var(--ink) 82%, transparent); }

.state-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--row-ink-2, var(--ink-2)); font-size: 0.875rem; line-height: 1.25rem; white-space: nowrap; }
.state-ok .icon { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Knöpfe ---------- */

.button-small {
  position: relative;
  min-height: 32px;
  padding: 0 12px;
  gap: 6px;
  border-radius: 9px;
  font-size: 0.875rem;
  line-height: 1.125rem;
  white-space: nowrap;
}
/* Trefferfläche 44 px, ohne das Bild zu ändern. */
.button-small::after { content: ''; position: absolute; inset: -6px -2px; }
.button-small .icon { width: 16px; height: 16px; }
.button-plain { color: var(--accent); padding-inline: 10px; }
/* Wartezustand beim Absenden (erst nach 150 ms gesetzt): gedämpft, Text „Wird … “. */
.button.is-pending { opacity: 0.72; cursor: progress; transition: opacity var(--dur-press) var(--ease-out); }
.button.button-secondary.button-small { background: color-mix(in srgb, var(--ink) 9%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .button-plain:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .button.button-secondary.button-small:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
}

/* ---------- Kopieren ---------- */

.copy-label { font-size: 0.8125rem; line-height: 1.125rem; font-weight: 500; letter-spacing: 0.01em; color: var(--row-ink-2); }
.copy-value, .secret-name {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
.copy-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 16rem;
  color: var(--accent);
  font-size: 0.8125rem;
  line-height: 1.125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--dur-out) var(--ease-out);
}
.copy-status[data-shown] { opacity: 1; transition-duration: var(--dur-in); }
/* Einblenden aus dem verborgenen Zustand (vorher display: none wegen :empty). */
@starting-style {
  .copy-status[data-shown] { opacity: 0; }
}
.copy-status:empty { display: none; }
.copy-status .icon { width: 16px; height: 16px; }

/* ---------- Schritte, Hinweise, leere Zustände ---------- */

.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 32px;
  counter-increment: step;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.callout {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--danger) 8%, var(--bg));
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.callout > .icon { width: 22px; height: 22px; margin-top: -1px; color: var(--danger); }
.callout-title { color: var(--ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.25rem; }
.callout p + p { margin-top: 2px; color: color-mix(in srgb, var(--ink) 78%, transparent); }

.settings-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 32px;
  padding: 36px 24px;
  border-radius: var(--radius-card);
  background: var(--group-bg);
  text-align: center;
}
.settings-empty h3 { font-size: 1.0625rem; line-height: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.settings-empty p { max-width: 26rem; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.375rem; }
.settings-empty .button { margin-top: 10px; }

/* Erscheint nur, wenn das Laden länger dauert (kein Flackern bei schnellen Antworten). */
.settings-loading {
  margin-top: 40px;
  color: var(--ink-2);
  text-align: center;
  animation: settings-appear var(--dur-in) var(--ease-out) 400ms both;
}
@keyframes settings-appear { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Seitenleiste ---------- */

.settings-nav ul { display: grid; gap: 2px; margin: 0; padding: 2px 10px 16px; list-style: none; }
.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--hit);
  padding: 6px 10px 6px 8px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-label { flex: 1; min-width: 0; }
.nav-row:focus-visible { position: relative; z-index: 1; outline-offset: 1px; }
.nav-row:active { background: color-mix(in srgb, var(--ink) 7%, var(--bg-side)); }
/* Auswahl in Markenblau wie im Chat; die Kachel wird zur hellen Fläche, damit sie nicht verschwindet. */
.nav-row[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.nav-row[aria-current="page"]:active { background: var(--brand-press); }
.nav-row[aria-current="page"] .tile { background: rgb(255 255 255 / .2); }
.nav-row[aria-current="page"]:focus-visible { box-shadow: inset 0 0 0 2px var(--on-brand); }
.nav-badge {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--note-bg);
  color: var(--note-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.nav-row[aria-current="page"] .nav-badge { background: var(--on-brand); color: var(--brand); }
@media (hover: hover) and (pointer: fine) {
  .nav-row:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--ink) 5%, var(--bg-side)); }
}

.tenant-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 16px 0;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--group-bg);
}
.tenant-card-text { display: grid; min-width: 0; }
.tenant-card-name { font-size: 1.0625rem; line-height: 1.375rem; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tenant-card-sub { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.125rem; letter-spacing: 0.01em; }
.sidebar-group { margin: 24px 16px 16px; }

/* ---------- Formulare und Ergebnisse im Sheet ---------- */

.sheet-lead { margin: 0 0 16px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.375rem; }
.sheet .group { margin-top: 22px; }
.sheet .result-head + .group { margin-top: 18px; }

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 4px;
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.125rem;
}
.field-error:empty { display: none; }
.field-error .icon { width: 15px; height: 15px; margin-top: 1.5px; }
.field-note { margin-top: 3px; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.125rem; letter-spacing: 0.01em; }
.field-control { display: flex; align-items: baseline; min-width: 0; }
.field-prefix { flex: none; color: var(--ink-2); font-family: var(--mono); font-size: 1rem; line-height: 1.5rem; }
.field-mono input { font-family: var(--mono); font-size: 1rem; }
/* Platzhalter sind Beispiele und Fundorte: lesbar (4,5 : 1), aber leiser als Eingaben. */
.sheet .field input::placeholder { color: var(--ink-2); }
.field-fullname { display: none; }
.field-label { font-size: 0.8125rem; font-weight: 500; line-height: 1rem; letter-spacing: 0.01em; color: var(--ink-2); }
.field-segmented { cursor: default; padding-bottom: 12px; }
.field-segmented .segmented { margin-top: 8px; }
.field:has(> :is(input, select, .field-control > input, .segmented)[aria-invalid="true"]) :is(label, .field-label) { color: var(--danger); }
.field-select { cursor: pointer; }
.field-select select {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 0 28px 0 0;
  border: 0;
  background: transparent;
  font-size: 1.0625rem;
  line-height: 1.5rem;
  color: var(--ink);
  outline: none;
  appearance: none;
  cursor: pointer;
}
.field-select::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
  pointer-events: none;
}
.field:has(select:focus-visible), .field:has(.segmented input:focus-visible) { z-index: 1; outline: 2px solid var(--focus); outline-offset: -2px; }
.field:has(.segmented input:focus-visible) .segment:has(input:focus-visible) { outline: none; }
.field:has(select:focus-visible)::before, .field:has(select:focus-visible) + .field::before { border-top-color: transparent; }

.result-head { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; }
.result-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
}
.result-icon .icon { width: 18px; height: 18px; }
.result-title { font-size: 1.0625rem; line-height: 1.375rem; overflow-wrap: anywhere; }
.result-text { margin-top: 2px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.25rem; overflow-wrap: anywhere; }

/* Etwas breiter als das Grund-Sheet, damit Variablennamen und Adressen selten umbrechen. */
.sheet-settings { width: min(100% - 32px, 560px); }
.sheet-confirm { width: min(100% - 32px, 420px); }
.confirm-text { font-size: 0.9375rem; line-height: 1.375rem; }

.member-head { display: flex; align-items: center; gap: 12px; }
.member-mail { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.375rem; overflow-wrap: anywhere; }
.inline-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding-inline: 4px;
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.125rem;
}
.row .inline-error { margin-top: 0; padding-inline: 0; }
.inline-error:empty, .inline-status:empty { display: none; }
.inline-error .icon { width: 16px; height: 16px; margin-top: 1px; }
.inline-status { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.125rem; }
.inline-status .icon { width: 16px; height: 16px; color: var(--accent); }
.list-message { margin-top: 10px; padding-inline: 4px; }
.access-status { margin-top: 8px; padding-inline: 4px; }
.link-title { margin-top: 22px; padding-inline: 4px; font-size: 0.9375rem; line-height: 1.25rem; }
.link-area .group { margin-top: 8px; }

/* ---------- Unter 640 px: wie die Einstellungen auf dem iPhone ---------- */

@media (max-width: 639px) {
  .settings-page { padding: 6px 16px calc(40px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 1.75rem; line-height: 2.125rem; }
  .page-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    max-width: none;
    min-height: calc(48px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
    background: var(--material);
    -webkit-backdrop-filter: var(--material-filter);
    backdrop-filter: var(--material-filter);
  }
  /* Haarlinie nur, wenn Inhalt unter der Leiste liegt. */
  .main[data-scrolled] .page-bar { box-shadow: 0 1px 0 var(--hairline); }
  .page-bar-always + .settings-page { padding-top: 6px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; min-height: var(--hit); }
  .page-actions .button-small::after { display: none; }

  /* Bereiche als gruppierte Liste mit Pfeilen. */
  .settings-nav ul { gap: 0; margin: 4px 16px 24px; padding: 0; border-radius: var(--radius-card); background: var(--bg); }
  .settings-nav li { position: relative; }
  .settings-nav li + li::before { content: ''; position: absolute; top: 0; left: 56px; right: 0; z-index: 1; border-top: 1px solid var(--hairline); }
  .nav-row { min-height: 52px; padding: 8px 14px 8px 14px; border-radius: 0; gap: 14px; font-size: 1.0625rem; }
  .settings-nav li:first-child .nav-row { border-radius: var(--radius-card) var(--radius-card) 0 0; }
  .settings-nav li:last-child .nav-row { border-radius: 0 0 var(--radius-card) var(--radius-card); }
  .nav-row::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-right: 2px solid var(--ink-3);
    border-top: 2px solid var(--ink-3);
    transform: rotate(45deg);
  }
  .nav-row:active { background: color-mix(in srgb, var(--ink) 7%, var(--bg)); }
  .row { padding-inline: 14px; }
  .sheet-settings, .sheet-confirm { width: 100%; }

  /* Lange Zeilen: Zustand und Knöpfe unter den Text (wie die Untertitel-Zellen in iOS). */
  .row-stack-narrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "text chev" "trail chev";
    align-items: center;
    gap: 6px 12px;
  }
  .row-stack-narrow:has(> .row-lead) { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "lead text chev" "lead trail chev"; }
  .row-stack-narrow > .row-lead { grid-area: lead; }
  .row-stack-narrow > .row-text { grid-area: text; }
  .row-stack-narrow > .row-trail { grid-area: trail; justify-content: flex-start; margin-left: 0; }
  .row-stack-narrow > .row-chevron { grid-area: chev; }
  .row-stack-narrow > .row-trail .row-actions { justify-content: flex-start; }
  .row-stack-narrow > .row-trail .row-value { font-size: 0.8125rem; line-height: 1.125rem; }
  .row-stack-narrow > .row-trail .button-plain:first-child { margin-left: -10px; }
  .copy-field.row-stack-narrow > .row-trail { flex-direction: row-reverse; justify-content: flex-end; }

  .copy-value, .secret-name { font-size: 0.8125rem; line-height: 1.1875rem; }
  /* Der Präfix passt nicht neben das Feld: der vollständige Name steht darunter. */
  .field-prefix { display: none; }
  .field-fullname {
    display: block;
    margin-top: 2px;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.125rem;
    overflow-wrap: anywhere;
  }
  .group-item:has(> .row > .row-lead) { --inset: 58px; }
}
@media (max-width: 639px) and (prefers-color-scheme: dark) {
  .settings-nav ul { background: color-mix(in srgb, var(--ink) 6%, var(--bg-side)); }
}

/* ---------- Mehr Kontrast, weniger Bewegung ---------- */

@media (prefers-contrast: more) {
  .group-list, .settings-empty, .tenant-card { box-shadow: inset 0 0 0 1px var(--hairline); }
  .pill-muted { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .page-back { transition: opacity var(--dur-press) ease; }
  .page-back:active { transform: none; opacity: 0.7; }
  .settings-loading { animation-name: settings-appear; }
}
