/* ============================================================
   InvoiceFlow – Einstellungsseite (Paket 1, 02.10.2026)
   Aufbau nach einstellungen3.html (Personio-Vorbild): Startseite mit Kacheln + Suche,
   Detailseiten mit Reitern, Unternavigation und Abschnitten. Keine farbigen Ränder.
   Ruhe-Paket Schritt 9 (13.10.2026): Grundraster nach docs/ux-ruhe/regelwerk.md –
   Tokens, Seitenkopf mit einer Primäraktion, Gruppen auf der Startseite, Formularzeilen,
   Hinweise als .note, leere/Lade-/Fehlerzustände, Handy: erst Liste, dann Seite.
   ============================================================ */
.st-wrap { max-width: 1200px; margin: 0 auto; }
.st-a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.st-a:hover { color: var(--accent-text); }
.st-wrap .small, .st-wrap .muted.small { font-size: var(--fs-sm); }
.st-wrap .spacer { flex: 1; }
.st-wrap .st-crit { color: var(--st-crit); }

/* ---- Seitenkopf (Start- und Detailseiten) ---- */
.st-head { display: flex; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; margin: 0 0 var(--sp-6); }
.st-head-t { flex: 1 1 420px; min-width: 0; }
.st-head h1 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: 1.25; letter-spacing: -.01em; margin: 0; color: var(--text); }
.st-desc { margin: var(--sp-1) 0 0; color: var(--text-2); font-size: var(--fs-base); line-height: 1.5; max-width: 720px; }
.st-ctx { display: flex; align-items: flex-start; gap: 6px; margin: var(--sp-2) 0 0; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.45; }
.st-ctx svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--text-3); }
.st-ctx b { color: var(--text-2); font-weight: var(--fw-medium); }
.st-head-a { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; padding-top: 2px; }
.st-head-a [hidden] { display: none !important; }
.st-hstate { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; margin-right: var(--sp-1); }
.st-hstate.dirty { color: var(--st-warn); font-weight: var(--fw-medium); display: inline-flex; align-items: center; gap: 6px; }
.st-hstate.dirty::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- Startseite ---- */
.st-start { padding-top: var(--sp-1); }
.st-firmwrap { vertical-align: baseline; }
.st-firmbtn { border: 0; background: transparent; font: inherit; font-weight: var(--fw-semibold); color: var(--text); cursor: pointer; border-radius: var(--r-sm); padding: 0 4px; margin: 0 -2px; display: inline-flex; align-items: center; gap: 4px; }
.st-firmbtn:hover { background: var(--surface-2); }
.st-firmbtn:focus-visible { outline: none; box-shadow: var(--ring); }
.st-firmbtn svg { color: var(--text-3); width: 16px; height: 16px; }
.st-firmmenu { left: 0; right: auto; top: calc(100% + 6px); min-width: 280px; font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0; line-height: 1.4; }
.st-firmmenu .xmenu-i { white-space: normal; }
.st-search { max-width: 480px; margin: 0 0 var(--sp-6); display: flex; align-items: center; gap: var(--sp-2); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 0 var(--sp-4); min-height: 40px; color: var(--text-3); }
.st-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.st-search input { border: 0; background: transparent; font: inherit; font-size: var(--fs-base); flex: 1; outline: none; color: var(--text); min-width: 0; padding: 8px 0; }
.st-clr { border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: none; padding: 4px; border-radius: var(--r-sm); }
.st-clr:focus-visible { outline: none; box-shadow: var(--ring); }
.st-search.has .st-clr { display: inline-flex; }
.st-state { background: var(--surface-2); border-radius: var(--r); margin-bottom: var(--sp-6); }
.st-state-h { display: flex; align-items: center; gap: 10px; padding: 10px var(--sp-4); cursor: pointer; flex-wrap: wrap; user-select: none; }
.st-state.ok .st-state-h { cursor: default; }
.st-state-h .t { font-weight: var(--fw-medium); color: var(--text); }
.st-teaser { min-width: 0; color: var(--text-3); }
.st-chev { color: var(--text-3); transition: transform .15s; }
.st-state.open .st-chev { transform: rotate(180deg); }
.st-state-list { display: none; padding: 0 var(--sp-4) var(--sp-2); }
.st-state.open .st-state-list { display: block; }
.st-todo { display: flex; align-items: center; gap: 10px; padding: var(--sp-2) 0; border-top: 1px solid var(--border); font-size: var(--fs-base); }
.st-todo .w { flex: 1; min-width: 0; }
.st-group { margin: 0 0 var(--sp-8); }
.st-group-h { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; margin: 0 0 var(--sp-3); }
.st-group-h h2 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); margin: 0; color: var(--text); }
.st-group-s { display: block; font-size: var(--fs-sm); color: var(--text-3); margin: 0; }
.st-group-s > svg { width: 14px; height: 14px; color: var(--text-3); vertical-align: -2px; margin-right: 6px; }
.st-group-s b, .st-group-s .st-firmbtn { color: var(--text-2); font-weight: var(--fw-medium); }
.st-group-s .st-firmbtn { margin-right: -4px; }
.st-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
@media (max-width: 1180px) { .st-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-4) var(--sp-2); box-shadow: none; min-width: 0; }
.st-tile h3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin: 0 0 var(--sp-2); color: var(--text); }
.st-tile a { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); margin: 0 calc(-1 * var(--sp-2)); min-height: 34px; border-radius: var(--r); font-weight: var(--fw-regular); color: var(--text); text-decoration: none; cursor: pointer; font-size: var(--fs-base); }
.st-tile a:hover { background: var(--surface-2); text-decoration: none; }
.st-tile a:focus-visible { outline: none; box-shadow: var(--ring); }
.st-tile a .tx { min-width: 0; }
.st-tile a .hit { display: block; font-size: var(--fs-xs); color: var(--text-3); font-weight: 400; }
.st-tile a .ext { color: var(--text-3); }
.st-tile a .dot { margin-left: auto; }
.st-tile a .st-lchev { display: none; color: var(--text-3); margin-left: auto; flex: none; }
.st-tile a .dot + .st-lchev { margin-left: 0; }
.st-tile mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.st-scope { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--text-2); background: var(--surface-2); border-radius: var(--r-pill); padding: 2px 9px 2px 7px; margin-bottom: var(--sp-2); }
.st-scope svg { width: 13px; height: 13px; color: var(--text-3); }
/* Merkmal („Neu“, „Gruppe“, „empfohlen“): .badge neutral ohne Punkt */
.st-badge { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: 1px 8px; border-radius: var(--r-pill); background: var(--st-neutral-bg); color: var(--st-neutral); white-space: nowrap; vertical-align: 1px; line-height: 1.5; }
.st-badge.grp { background: var(--surface-2); color: var(--text-2); }
.st-empty .t { font-weight: var(--fw-medium); color: var(--text); margin-bottom: 4px; }
.st-errstate { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-top: var(--sp-6); }

/* ---- Laden: Skelett ---- */
.st-skelwrap { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-1); }
.st-skel { display: block; height: 14px; border-radius: var(--r-sm); background: var(--surface-2); animation: st-pulse 1.2s ease-in-out infinite; }
.st-skel-h { width: 220px; height: 26px; }
.st-skel-p { width: 420px; max-width: 80%; margin-bottom: var(--sp-4); }
.st-skel-row { display: flex; justify-content: space-between; gap: var(--sp-6); padding: var(--sp-4) 0; }
.st-skel-row + .st-skel-row { border-top: 1px solid var(--border); }
.st-skelwrap .st-grid .st-skel-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); flex-direction: column; }
@keyframes st-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .st-skel { animation: none; } }

/* ---- Detailseiten ---- */
.st-crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-3); margin: 0 0 var(--sp-2); }
.st-crumbs .sl { color: var(--border-strong); }
.st-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none; border-radius: var(--r-sm); }
.st-back svg { width: 14px; height: 14px; }
.st-back:hover { color: var(--text); text-decoration: none; }
.st-back:focus-visible { outline: none; box-shadow: var(--ring); }
/* Reiter der Kachel als Pills (Regelwerk 4.2: .st-tabs → Pill-Reiter) */
.st-tabs { display: flex; gap: var(--sp-1); overflow-x: auto; margin: 0 0 var(--sp-6); scrollbar-width: none; align-items: center; flex-wrap: wrap; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs a { flex: none; padding: 6px 13px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.st-tabs a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.st-tabs a.on { background: var(--accent-soft); color: var(--accent-text); }
.st-tabs a:focus-visible { outline: none; box-shadow: var(--ring); }
.st-tabs a .ext { color: var(--text-3); }
.st-tabs .sp { flex: 1; min-width: 8px; }
.st-detail { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
/* Abschnitts-Navigation links: ruhig, ohne Schatten; aktiv = weiße Fläche */
.st-subnav { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 2px; }
.st-subnav a { padding: 7px var(--sp-3); border-radius: var(--r); color: var(--text-3); font-weight: var(--fw-regular); font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-subnav a:hover { color: var(--text); background: var(--surface-2); }
.st-subnav a.on { background: var(--surface); color: var(--text); font-weight: var(--fw-medium); }
.st-subnav.one { visibility: hidden; }
.st-page { max-width: 820px; min-width: 0; }
.st-detail.wide .st-page { max-width: 1180px; }
.st-h2row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.st-h2row h2 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); margin: 0; color: var(--text); }
.st-h2row .r { margin-left: auto; display: flex; gap: 8px; }
/* Hinweis: Grundklasse .note (ui.css); hier nur Abstände */
.st-info { margin: 0 0 var(--sp-3); }
.st-info svg { flex: none; }
.st-box .st-info { margin: 0; }
.st-box + .st-info, .st-more + .st-info, .st-sec + .st-info { margin-top: var(--sp-3); }
.st-alert { align-items: center; margin: 0 0 var(--sp-3); }
.st-alert .w { flex: 1; min-width: 0; }
.st-alert .b { font-weight: var(--fw-semibold); color: var(--text); }
.st-alert .s { font-size: var(--fs-sm); color: var(--text-2); }
.st-sec { padding-top: var(--sp-6); scroll-margin-top: 76px; }
.st-page > .st-sec:first-child, .st-page > .st-info:first-child + .st-sec { padding-top: 0; }
.st-page > .st-info:first-child { margin-bottom: var(--sp-6); }
.st-sec h3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin: 0 0 var(--sp-1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text); }
.st-sec > p { margin: 0 0 var(--sp-3); color: var(--text-2); max-width: 680px; font-size: var(--fs-base); line-height: 1.5; }
.st-now { font-size: var(--fs-xs); color: var(--text-3); font-weight: 400; }
.st-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: none; padding: 0 var(--sp-4); }
.st-box.st-pad { padding: var(--sp-3) var(--sp-3) var(--sp-1); }
/* Formularzeile: Label und Hilfetext links, Feld rechts, Fehler direkt unter dem Feld */
.st-row { display: flex; gap: var(--sp-6); align-items: center; padding: var(--sp-3) 0; min-height: 56px; }
.st-row + .st-row { border-top: 1px solid var(--border); }
.st-row.top { align-items: flex-start; }
.st-row.block { display: block; }
.st-row .l { flex: 1; min-width: 0; }
.st-row .l .t { font-weight: var(--fw-medium); color: var(--text); font-size: var(--fs-base); }
.st-row .l .d { font-size: var(--fs-sm); color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.st-row .c { flex: 0 1 340px; min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.st-row .c > .input, .st-row .c > select.input { width: 100%; max-width: 340px; }
.st-row .c .input.st-in-n { width: 96px; }
.st-row .c .input.st-in-s { width: 96px; }
.st-row.st-dim { opacity: .55; }
/* Ungespeichert geänderte Zeile: kleines neutrales Merkmal am Label */
.st-row.st-chg > .l > .t::after { content: "geändert"; display: inline-flex; margin-left: 8px; padding: 0 7px; border-radius: var(--r-pill); background: var(--st-warn-bg); color: var(--st-warn); font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: 1.6; vertical-align: 1px; }
tr.st-chg > td { background: var(--st-warn-bg); }
.st-unit { color: var(--text-3); font-size: var(--fs-sm); }
.st-warn { color: var(--st-warn); }
.st-err { width: 100%; font-size: var(--fs-sm); color: var(--st-crit); text-align: left; display: none; }
.st-row .c > .st-err { max-width: 340px; }
td .st-err { text-align: left; }
/* Fehlerhaftes Feld: crit-Rahmen ist die einzige erlaubte farbige Linie (Formularzustand) */
.input.st-bad, .input.st-bad:focus { border-color: var(--st-crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-crit) 18%, transparent); }
.st-ro { color: var(--text-2); word-break: break-word; text-align: right; }
.st-res { width: 100%; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.st-row .c .st-res { text-align: right; }
.st-stat { display: inline-flex; align-items: center; gap: 7px; font-weight: var(--fw-medium); }
.st-stat.small { font-weight: 400; font-size: var(--fs-sm); }
.st-pill { display: inline-flex; align-items: center; font-size: var(--fs-sm); font-weight: var(--fw-medium); padding: 1px 10px; border-radius: var(--r-pill); background: var(--st-neutral-bg); color: var(--st-neutral); white-space: nowrap; }
.st-pill.role-tenant_admin { background: var(--accent-soft); color: var(--accent-text); }
.st-pill.role-project_lead { background: var(--st-neutral-bg); color: var(--text); }
.st-chip { display: inline-block; font-size: var(--fs-xs); padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); margin: 1px 4px 1px 0; white-space: nowrap; }
.st-danger, .st-danger svg { color: var(--st-crit) !important; }

/* Schalter, Segmente, Auswahlkarten */
.st-sw { border: 0; background: transparent; padding: 0; cursor: pointer; flex: none; display: inline-flex; border-radius: 99px; }
.st-sw .tr { width: 36px; height: 21px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; }
.st-sw .tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.st-sw.on .tr { background: var(--accent); }
.st-sw.on .tr::after { left: 17px; }
.st-sw.dis, .st-sw:disabled { cursor: default; opacity: .5; }
.st-sw:focus-visible { outline: none; }
.st-sw:focus-visible .tr { box-shadow: var(--ring); }
.st-seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; flex-wrap: wrap; }
.st-seg button { border: 0; background: transparent; padding: 5px 13px; min-height: 30px; border-radius: var(--r-pill); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.st-seg button:hover { color: var(--text); }
.st-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.st-seg button:focus-visible { outline: none; box-shadow: var(--ring); }
.st-opt { display: flex; gap: 12px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; margin-bottom: var(--sp-2); }
.st-opt:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--border)); }
.st-opt.on { background: var(--accent-soft); }
.st-opt .rd { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--border-strong); flex: none; margin-top: 2px; }
.st-opt.on .rd { box-shadow: inset 0 0 0 5px var(--accent); }
.st-opt .t { font-weight: var(--fw-semibold); color: var(--text); }
.st-opt .d { font-size: var(--fs-sm); color: var(--text-2); }
.st-optl { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-size: var(--fs-base); }
.st-optl input { margin-top: 3px; accent-color: var(--accent); }
.st-optl .d { display: block; font-size: var(--fs-sm); color: var(--text-3); }
.st-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.st-more { margin-top: 2px; }
.st-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); font-weight: var(--fw-medium); padding: 6px 0 10px; border-radius: var(--r-sm); }
.st-more > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.st-more > summary svg { transition: transform .15s; color: var(--text-3); }
.st-more[open] > summary svg { transform: rotate(90deg); }
.st-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.st-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.st-swatches button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text-2); }
.st-swatches button:disabled { opacity: .4; cursor: default; }
.st-swatches button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* Hintergrundfarbe (Darstellung): Farbfeld mit Namen, Farbe trägt nie allein Bedeutung */
.st-bgsw { gap: var(--sp-2); justify-content: flex-end; }
.st-bgsw button { width: auto; height: auto; border-radius: var(--r); box-shadow: none; background: transparent; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 6px; font: inherit; font-size: var(--fs-xs); color: var(--text-2); min-width: 56px; }
.st-bgsw button .sw { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--border-strong); }
.st-bgsw button.on { box-shadow: none; color: var(--text); font-weight: var(--fw-semibold); }
.st-bgsw button.on .sw { box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 2px var(--surface), 0 0 0 4px var(--text-2); }
.st-bgsw button:hover { background: var(--surface-2); }
.st-bgsw button:focus-visible { box-shadow: var(--ring); }
.st-logo { min-height: 56px; display: flex; align-items: center; }
.st-logo img { max-height: 60px; max-width: 220px; background: #fff; border-radius: var(--r); padding: 6px; box-shadow: inset 0 0 0 1px var(--border); }

/* Tabellen */
.st-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--sp-4)); }
.st-t { width: 100%; border-collapse: collapse; font-size: var(--fs-base); min-width: 560px; }
.st-t th { text-align: left; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-3); padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.st-t td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.st-t tr:first-child td { border-top: 0; }
.st-t th:first-child, .st-t td:first-child { padding-left: var(--sp-4); }
.st-t th:last-child, .st-t td:last-child { padding-right: var(--sp-4); }
.st-t .sub { display: block; font-size: var(--fs-xs); color: var(--text-3); font-weight: 400; }
.st-t td.act { text-align: right; white-space: nowrap; }
.st-t td.y svg { color: var(--st-ok); }
.st-t td.n svg { color: var(--text-3); opacity: .6; }
.st-t .input { width: 100%; }
.st-tablerow { padding-top: 0 !important; }
.st-box > .st-scroll:first-child .st-t th:first-child { border-top-left-radius: var(--r-lg); }
.st-box > .st-scroll:first-child .st-t th:last-child { border-top-right-radius: var(--r-lg); }

/* Zahlung, DATEV, Mail */
.st-dun { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); }
.st-step { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-weight: var(--fw-medium); white-space: nowrap; }
.st-step.rem { background: var(--st-warn-bg); color: var(--st-warn); }
.st-step.mah { background: var(--st-crit-bg); color: var(--st-crit); }
.st-dun .gap { color: var(--text-3); font-size: var(--fs-xs); }
.st-route { display: grid; grid-template-columns: minmax(0, 1.2fr) 24px minmax(0, 1fr); gap: 8px; align-items: center; padding: 10px 0; font-size: var(--fs-base); }
.st-route + .st-route { border-top: 1px solid var(--border); }
.st-route .ar { color: var(--text-3); text-align: center; }
.st-route .s { font-size: var(--fs-sm); color: var(--text-3); }
.st-mailprev { background: var(--surface-2); border-radius: var(--r); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); line-height: 1.7; color: var(--text); word-break: break-word; }
.st-mailprev .k { color: var(--text-3); display: inline-block; width: 86px; }

/* Vorschau Belegaussehen (Papier-Simulation: eigene Größen, bleibt) */
.st-withpv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); align-items: start; }
.st-pvcol { position: sticky; top: 72px; padding-top: 0; }
.st-pv-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.st-pv-h .xmenu { right: 0; }
.st-pv { background: #fff; color: #1a1a1a; border-radius: 6px; box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(20,28,24,.08); aspect-ratio: 210 / 297; padding: 18px 18px 14px; position: relative; overflow: hidden; line-height: 1.35; display: flex; flex-direction: column; }
.st-pv.bg { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 6px, transparent 6px 12px); }
.st-pv .hd { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.st-pv .snd { font-size: .78em; color: #666; border-bottom: 1px solid #ddd; padding-bottom: 2px; margin-bottom: 4px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-pv .rcp { font-size: .95em; }
.st-pv .rt { text-align: right; max-width: 48%; }
.st-pv .lg img { max-width: 80px; max-height: 26px; object-fit: contain; }
.st-pv .lg .nm { font-weight: 700; font-size: 1.1em; }
.st-pv .ib { margin-top: 6px; text-align: left; background: #f4f4f4; border-radius: 3px; padding: 4px 6px; font-size: .85em; }
.st-pv .ib div { display: flex; justify-content: space-between; gap: 8px; }
.st-pv .cs { margin-top: 6px; font-size: .82em; color: #444; }
.st-pv .ti { font-weight: 700; font-size: 1.3em; margin-bottom: 6px; }
.st-pv table { width: 100%; border-collapse: collapse; font-size: .9em; }
.st-pv th { text-align: left; border-bottom: 1px solid #999; font-weight: 600; padding: 2px 3px; }
.st-pv td { padding: 2px 3px; border-bottom: 1px solid #eee; }
.st-pv .r { text-align: right; }
.st-pv tr.tt td { font-weight: 700; }
.st-pv .ft { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: .68em; color: #555; border-top: 1px solid #ddd; padding-top: 4px; }
.st-pv .ftl { margin-top: auto; font-size: .7em; color: #555; border-top: 1px solid #ddd; padding-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Logogröße: Schieberegler mit Wert, darunter Standard und PDF-Vorschau */
.st-range { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.st-range input[type=range] { flex: 1; accent-color: var(--accent); min-width: 140px; }
.st-range input[type=range]:disabled { opacity: .45; }
.st-range-v { font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.st-range-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 8px; }
.st-pv-hint { font-size: var(--fs-sm); color: var(--text-3); margin-top: 8px; }

/* Speichern-Leiste: nur sichtbar, wenn der Kopf mit „Speichern“ aus dem Blick ist (.headvis) */
.st-savebar { position: sticky; bottom: 0; z-index: 40; display: none; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; box-shadow: var(--shadow-md); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--sp-3) var(--sp-4); margin: var(--sp-6) 0 0; color: var(--text); }
.st-savebar.show { display: flex; }
.st-savebar.show.headvis { display: none; }
.st-savebar .small { font-size: var(--fs-sm); color: var(--st-warn); font-weight: var(--fw-medium); }

@media (max-width: 1320px) { .st-withpv { grid-template-columns: minmax(0, 1fr); } .st-pvcol { position: static; max-width: 340px; } }

/* ---- Handy: erst die Liste, dann die Seite ---- */
@media (max-width: 760px) {
  .st-head { margin-bottom: var(--sp-4); gap: var(--sp-3); }
  .st-head h1 { font-size: 22px; }
  .st-head-t { flex-basis: 100%; }
  .st-head-a { justify-content: flex-start; width: 100%; }
  .st-head-a .st-hstate { flex-basis: 100%; }
  .st-search { max-width: none; }
  /* Startseite: Kacheln werden Listen mit ganzen Zeilen als Tippziel */
  .st-group { margin-bottom: var(--sp-6); }
  .st-group-h { flex-direction: column; gap: 2px; margin-bottom: var(--sp-2); }
  .st-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .st-tile { padding: 0; overflow: visible; }
  .st-tile h3 { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-3); padding: var(--sp-3) var(--sp-4) var(--sp-1); margin: 0; }
  .st-tile .st-scope { margin: 0 var(--sp-4) var(--sp-2); }
  .st-tile a { margin: 0; padding: var(--sp-3) var(--sp-4); min-height: 48px; border-radius: 0; border-top: 1px solid var(--border); font-size: var(--fs-md); }
  .st-tile a:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .st-tile a .st-lchev { display: inline-block; }
  /* Detailseite: keine Reiterleiste, zurück führt zur Liste */
  .st-crumbs { margin-bottom: var(--sp-3); }
  .st-crumbs .st-back { min-height: 32px; font-size: var(--fs-base); color: var(--text-2); }
  .st-crumbs .sl, .st-crumbs > span:last-child { display: none; }
  .st-tabs { display: none; }
  .st-detail { display: block; }
  .st-subnav { position: sticky; top: 52px; z-index: 15; flex-direction: row; gap: 6px; overflow-x: auto; background: var(--bg); margin: 0 -12px var(--sp-3); padding: 8px 12px; scrollbar-width: none; }
  .st-subnav::-webkit-scrollbar { display: none; }
  .st-subnav a { flex: none; border-radius: var(--r-pill); background: transparent; padding: 6px 12px; font-size: var(--fs-sm); box-shadow: inset 0 0 0 1px var(--border); }
  .st-subnav a.on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
  .st-subnav.one { display: none; }
  .st-h2row h2 { font-size: var(--fs-lg); }
  .st-box { padding: 0 var(--sp-4); }
  .st-row { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .st-row .c { flex: none; justify-content: flex-start; }
  .st-row .c > .input, .st-row .c > select.input, .st-row .c > .st-err { max-width: none; }
  .st-row.sw-row { flex-direction: row; align-items: center; }
  .st-row.sw-row .c { justify-content: flex-end; flex: none; }
  .st-ro, .st-row .c .st-res, .st-err { text-align: left; }
  .st-scroll { margin: 0 calc(-1 * var(--sp-4)); }
  .st-t th:first-child, .st-t td:first-child { padding-left: var(--sp-4); }
  .st-route { grid-template-columns: 1fr; gap: 2px; }
  .st-route .ar { text-align: left; }
  .st-alert { flex-wrap: wrap; }
  .st-bgsw { justify-content: flex-start; }
  /* Speichern-Leiste fest unten, volle Breite */
  .st-savebar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; flex-wrap: wrap; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .st-savebar .small { flex-basis: 100%; }
  .st-savebar .btn { flex: 1; }
  body.st-dirty .st-wrap { padding-bottom: 96px; }
  .st-h2row .r { margin-left: 0; }
}
@media (max-width: 480px) {
  .st-subnav { margin: 0 -8px var(--sp-3); padding: 8px; }
}
/* Touch: Tippziele mindestens 44 px (Regelwerk 3.10) */
@media (pointer: coarse) {
  .st-tabs a, .st-subnav a, .st-seg button, .st-back { min-height: 44px; }
  .st-sw { position: relative; }
  .st-sw::before { content: ""; position: absolute; inset: -12px -6px; }  /* größere Trefferfläche ohne Layoutänderung */
  .st-clr { min-width: 44px; min-height: 44px; justify-content: center; }
}


/* ---------- Paket 2: Absender-Domain (DNS-Einträge), Änderungsverlauf ---------- */
.st-dns { min-width: 640px; }
.st-dns td { vertical-align: top; }
.st-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2, rgba(0,0,0,.04)); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.st-code.v { display: inline-block; max-width: 300px; }
.st-copy { padding: 2px 5px; margin-left: 4px; vertical-align: middle; }
.st-log { display: flex; flex-direction: column; }
.st-log-i { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; }
.st-log-i + .st-log-i { border-top: 1px solid var(--border); }
.st-log-i .ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2, rgba(0,0,0,.05)); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.st-log-i .w { min-width: 0; }
.st-log-i .tx { color: var(--text); font-size: var(--fs-base); word-break: break-word; }
.st-log-i .mt { color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; }
@media (max-width: 760px) { .st-code.v { max-width: 200px; } }

/* Generik G1: Akzentfarbe, Module, Anbindungen */
.st-swatches .st-acc { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.st-swatches .st-acc.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text-2); }
.st-int { margin-bottom: 14px; }
.st-int-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.st-int-h .nm { font-weight: 600; color: var(--text); }
.st-int-h .sp { flex: 1; }
.st-int-res { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.st-int-res details { margin-top: 6px; }
.st-int-res summary { cursor: pointer; }
.st-int-res table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
.st-int-res td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.st-int-note { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.st-int-res pre { white-space: pre-wrap; font-size: var(--fs-xs); max-height: 260px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; }

/* ---------- G3: Einrichtung (Assistent ohne Seitenleiste, Checkliste, Sperr-Dialog) ---------- */
.ob-wrap { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.ob-head { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--surface); box-shadow: 0 1px 0 var(--border); position: sticky; top: 0; z-index: 5; }
.ob-head .spacer, .ob-foot .spacer, .ob-check-h .spacer, .ob-check-f .spacer { flex: 1; }
.ob-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 600; color: var(--text-2); }
.ob-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ob-title { display: flex; flex-direction: column; line-height: 1.25; }
.ob-title b { color: var(--text); font-size: 15px; }
.ob-title span { color: var(--text-3); font-size: 12.5px; }
.ob-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; padding: 24px; max-width: 1240px; width: 100%; margin: 0 auto; }
.ob-body.has-pv { grid-template-columns: 250px minmax(0, 1fr) 300px; }
.ob-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; align-self: start; }
.ob-step { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 0; border-radius: var(--r-lg); background: none; cursor: pointer; text-align: left; font: inherit; color: var(--text-2); }
.ob-step:hover { background: var(--surface-2); }
.ob-step.cur { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.06)); }
.ob-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.ob-step.cur .ob-num { background: var(--accent); color: var(--on-accent, #fff); }
.ob-step.done .ob-num { background: var(--accent-soft); color: var(--accent-text); }
.ob-st { display: flex; flex-direction: column; gap: 2px; }
.ob-st .t { font-weight: 500; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ob-pill { font-size: var(--fs-xs); font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); }
.ob-pill.p { background: var(--accent-soft); color: var(--accent-text); }
.ob-open { font-size: 12px; color: var(--red, #dc2626); }
.ob-prog { margin-top: 14px; padding: 12px 10px 0; font-size: 12.5px; color: var(--text-2); box-shadow: 0 -1px 0 var(--border); }
.ob-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.ob-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ob-main h1 { font-size: 22px; margin: 0 0 4px; color: var(--text); }
.ob-lead { color: var(--text-2); margin: 0 0 4px; font-size: 14px; }
.ob-main .st-sec:first-of-type { padding-top: 16px; }
.ob-main .st-box { padding: 0 16px; }
.ob-main .st-box.st-pad { padding: 14px 16px; }
.ob-main .st-row .c { min-width: 260px; }
.ob-main .st-row .c .input { width: 100%; }
.ob-hint { font-size: 12px; min-height: 0; margin-top: 3px; }
.ob-miss { color: var(--red, #dc2626); }
.ob-reg { margin-top: 18px; }
.ob-reg > summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 14px; }
.ob-reg .st-sec { padding-top: 10px; }
.ob-cont { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.ob-cont label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.ob-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-pills .chip.on { background: var(--accent-soft); color: var(--accent-text); }
.ob-inv { display: grid; grid-template-columns: 1fr 1.3fr 150px auto; gap: 8px; width: 100%; }
.ob-foot { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 16px; box-shadow: 0 -1px 0 var(--border); }
.ob-pv { position: sticky; top: 90px; align-self: start; background: var(--surface); border-radius: var(--r-lg); padding: 16px; font-size: 12px; color: var(--text-2); }
.ob-pv-h { font-weight: 600; color: var(--text); margin-bottom: 10px; font-size: 12.5px; }
.ob-pv-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; line-height: 1.45; font-size: 11px; }
.ob-pv-text { line-height: 1.55; }
.ob-pv-miss { color: var(--text-3); }
.ob-pv-note { margin-top: 10px; font-size: 11px; }
.ob-logoimg { max-height: 48px; max-width: 160px; }
.ob-end h2 { font-size: 20px; margin: 8px 0 6px; color: var(--text); }
.ob-h3 { font-size: 14px; margin: 22px 0 8px; color: var(--text); }
.ob-mobile { display: none; padding: 10px 16px; font-size: 13px; color: var(--text-2); background: var(--surface); }
.ob-check { margin-bottom: 16px; padding: 16px 18px; }
.ob-check.ok { padding: 12px 18px; }
.ob-check-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-check .ob-bar { margin: 10px 0 6px; }
.ob-check-r { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.ob-check-r + .ob-check-r { box-shadow: 0 -1px 0 var(--border); }
.ob-check-r .w { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text); }
.ob-check-r.done .w { color: var(--text-3); }
.ob-check-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ob-note { display: flex; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.ob-dlg-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--text); }
@media (max-width: 1100px) { .ob-body.has-pv { grid-template-columns: 220px minmax(0, 1fr); } .ob-body.has-pv .ob-pv { grid-column: 2; position: static; } }
@media (max-width: 760px) {
  .ob-body, .ob-body.has-pv { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .ob-nav { display: none; }
  .ob-mobile { display: block; }
  .ob-body.has-pv .ob-pv { grid-column: 1; }
  .ob-head { padding: 12px 16px; }
  .ob-inv, .ob-cont { grid-template-columns: 1fr; }
  .ob-main .st-row .c { min-width: 0; }
}
.ob-main .st-row.block .c.ob-pills { width: 100%; justify-content: flex-start; }

/* Eigene Schriften (Belegaussehen) */
.st-fslots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.st-fslot { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-fslot .h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 600; color: var(--text); }
.st-fslot .nm { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fslot .muted.small { overflow-wrap: anywhere; }
.st-fslot .a { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.st-fspec { background: #fff; color: #1a1a1a; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--border); padding: 14px 16px; font-size: 14px; line-height: 1.5; font-synthesis: none; width: 100%; }
.st-fspec .b { font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.st-fspec .i { font-style: italic; }
.st-fspec .g { color: #555; letter-spacing: .02em; }
.st-row.block.st-flic { display: flex; flex-direction: row; align-items: center; gap: 9px; color: var(--text-2); font-size: var(--fs-sm); flex-wrap: wrap; }
.st-flic > div { flex: 1; min-width: 200px; }
.st-flic svg { color: var(--text-3); flex: none; }
/* Akzentfarbe: Farbwähler, Kontrast, Vorschau */
.st-accin { display: flex; gap: 8px; align-items: center; }
.st-accin input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.st-accin .input { width: 110px; font-variant-numeric: tabular-nums; }
.st-acchk { margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.st-accdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin: 0 3px 0 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.st-accpv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.st-accpv > div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.st-accpv .b { display: inline-block; padding: 6px 12px; border-radius: var(--r); font-weight: 600; font-size: 12.5px; }
.st-accpv .lk { font-weight: 500; font-size: 13px; }
.st-accpv .ch { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.st-accpv .pg { background: #fff; color: #1a1a1a; border-radius: 6px; box-shadow: var(--shadow-sm); padding: 12px 14px; width: 100%; font-family: Helvetica, Arial, sans-serif; }
.st-accpv .pg .t { font-weight: 700; font-size: 17px; line-height: 1.2; margin-bottom: 6px; }
.st-accpv .pg .r { font-weight: 700; font-size: 10px; letter-spacing: .07em; margin-bottom: 8px; }
.st-accpv .pg .bx { border-radius: 6px; padding: 7px 10px; font-weight: 700; font-size: 12px; text-align: right; }
@media (max-width: 760px) { .st-fslots, .st-accpv { grid-template-columns: 1fr; } }
.st-row[hidden] { display: none; }
.st-opt.dis { opacity: .6; cursor: default; }
.st-opt.dis .st-a { pointer-events: auto; }
.st-pre { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre; margin: 0 0 8px; font-family: ui-monospace, Consolas, monospace; }
