/* rüting. CRM – Oberfläche nach CI „rüting.“ (Manrope, Navy/Sand/Koralle). Keine Verläufe, keine Randstreifen-Karten.
   Ab 0.51.0: 14-px-Raster, Haarlinien und feine Tiefe statt Flächen, Koralle nur für die Hauptaktion und für Dringendes. */

/* Manrope als variable Schrift (200–800, OFL): eine Datei für alle Stärken; „ext“ lädt nur bei Zeichen wie ž, ł, ő */
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-style: normal; font-display: swap; src: url('fonts/Manrope-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-style: normal; font-display: swap; src: url('fonts/Manrope-var-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
/* Ebenen: Seite (100) < Fläche (200, Karten) < erhöht (300, Hinweis-/Auswahlflächen); Seitenleiste und Felder liegen tiefer.
   --coral: Schrift, Symbole, Fokus · --coral-fill: gefüllte Knöpfe mit weißer Schrift · --brand: Marke (Punkt, Logo).
   Schrift und Knöpfe sind in beiden Modi auf Kontrast ≥ 4,5:1 gegen ihre Flächen gerechnet (0.51.0). */
:root, :root[data-theme="dark"] {
  --bg-100: #081726; --bg-200: #0e2236; --bg-300: #172e46; --bg-side: #06121f; --field: #071422;
  --ink: #f5f2ec; --ink-soft: #b9c2ce; --ink-muted: #8a97a7;
  --brand: #ff4f2e;
  --coral: #ff6a4d; --coral-deep: #ff4f2e; --coral-fill: #d93d1a; --coral-fill-hover: #c9300f;
  --coral-tint: rgba(255, 106, 77, 0.13); --coral-line: rgba(255, 106, 77, 0.32);
  --line: #1b3046; --line-strong: #2c445d; --field-line: #36506a;
  --hover: rgba(245, 242, 236, 0.045); --active: rgba(245, 242, 236, 0.085);
  --on-ink: #0b1f33; --on-coral: #ffffff;
  --ok: #4cc48a; --warn: #ecbd52; --danger: #ff6a4d; --info: #8fb8e8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 72px -12px rgba(0, 0, 0, 0.65);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.035);   /* feine Lichtkante oben auf Flächen */
  --backdrop: rgba(3, 10, 18, 0.62);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg-100: #f5f2ec; --bg-200: #ffffff; --bg-300: #f1ede5; --bg-side: #efebe3; --field: #ffffff;
  --ink: #0b1f33; --ink-soft: #46525f; --ink-muted: #5d6977;
  --brand: #ff4f2e;
  --coral: #c62f0e; --coral-deep: #c9300f; --coral-fill: #c9300f; --coral-fill-hover: #b3290b;
  --coral-tint: rgba(198, 47, 14, 0.08); --coral-line: rgba(198, 47, 14, 0.28);
  --line: #e6e1d7; --line-strong: #cdc6b8; --field-line: #bdb5a6;
  --hover: rgba(98, 82, 48, 0.06); --active: rgba(98, 82, 48, 0.115);   /* warm getönt, passend zum Sand */
  --on-ink: #ffffff; --on-coral: #ffffff;
  --ok: #16704a; --warn: #7d5600; --danger: #b3220c; --info: #1f5a99;
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.05);
  --shadow-md: 0 1px 2px rgba(11, 31, 51, 0.06), 0 10px 28px -8px rgba(11, 31, 51, 0.14);
  --shadow-lg: 0 2px 4px rgba(11, 31, 51, 0.06), 0 28px 72px -16px rgba(11, 31, 51, 0.26);
  --edge: 0 0 0 0 transparent;
  --backdrop: rgba(11, 31, 51, 0.38);
  color-scheme: light;
}
:root {
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 32px; --s7: 40px; --s8: 64px; --s9: 96px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --side: 236px;
  --ease: 0.14s ease;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0; background: var(--bg-100); color: var(--ink);
  font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--coral) 30%, transparent); }
a { color: inherit; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--coral); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.008em; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 var(--s3); }
strong, b { font-weight: 650; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.nowrap { white-space: nowrap; }
.label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; stroke-width: 1.6; }
.ic.lg { width: 20px; height: 20px; }
.ic.sm { width: 14px; height: 14px; vertical-align: -2px; }
[hidden] { display: none !important; }
:root[data-theme="light"] .only-dark, :root:not([data-theme="light"]) .only-light { display: none; }

/* ---------- Marke ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo { display: block; height: 36px; width: auto; flex: none; color: var(--ink); }
.brand .tag {
  align-self: flex-end; margin-bottom: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 2px 6px 2px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--ink-muted); line-height: 1.3;
}
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; line-height: 1; }
.wordmark .dot, .dot-coral { color: var(--brand); }
.brand .sub { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 2.5px; background: var(--brand); display: block; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  background: var(--bg-side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 12px;
}
.side .brand { padding: 0 10px 16px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 32px;
  border-radius: var(--r-md); text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 13.5px; line-height: 1.3;
  transition: background-color var(--ease), color var(--ease);
}
.nav a .ic { color: var(--ink-muted); transition: color var(--ease); }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a:hover .ic { color: var(--ink-soft); }
.nav a.active { background: var(--active); color: var(--ink); font-weight: 650; }
.nav a.active .ic { color: var(--coral); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.nav-sep { height: 1px; background: var(--line); margin: var(--s4) var(--s2); }
.side-foot { margin-top: auto; padding-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.side-foot::before { content: ''; height: 1px; background: var(--line); margin: var(--s4) -12px var(--s1); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px var(--s2); border-radius: var(--r-md); text-decoration: none; transition: background-color var(--ease); }
.side-user:hover { background: var(--hover); color: var(--ink); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--active); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong);
  display: grid; place-items: center; font-weight: 700; font-size: 11px; letter-spacing: 0.02em; flex: none;
}
.side-user .who { line-height: 1.3; min-width: 0; }
.side-user .who strong { display: block; font-size: 13px; font-weight: 650; }
.side-user .who span { font-size: 11.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.side-actions { display: flex; gap: var(--s2); }
.side-actions form { flex: 1; display: flex; }
.side-actions .btn { flex: 1; }

.main { min-width: 0; width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px var(--s7) 72px; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: 24px; }
.page-head .crumbs { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.page-head .crumbs a { text-decoration: none; }
.page-head .crumbs .ic { width: 12px; height: 12px; opacity: 0.7; }
.page-head .meta { margin-top: var(--s2); display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--ink-soft); }
.page-head .meta.prose { display: block; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

/* ---------- Karten ---------- */
.card { background: var(--bg-200); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--edge), var(--shadow-sm); padding: var(--s5); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: var(--s2); }
.card-head h2 > .ic { color: var(--ink-muted); }
.card-head .head-links { display: inline-flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.card.flush { padding: 0; }
.card.flush .card-head { padding: var(--s4) var(--s5) 0; margin-bottom: var(--s3); }
.card.flush > .table-wrap, .card.flush form > .table-wrap { padding: 0; }
.card.flush > .table-wrap:last-child, .card.flush > form:last-child > .table-wrap:last-child { border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }
.card.flush > .table-wrap:first-child { border-radius: calc(var(--r-lg) - 1px); }
.card.flush > .empty { padding: 0 var(--s5) var(--s5); }
.grid { display: grid; gap: var(--s5); }
.grid > *, .stack > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.section { margin-top: var(--s5); }

/* Kennzahlen: ein Band mit Haarlinien statt einzelner Kacheln (die Linien rechts/unten schneidet der Rahmen ab) */
.grid.kpis {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); gap: 0; overflow: hidden;
  background: var(--bg-200); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--edge), var(--shadow-sm);
}
.grid.kpis > .kpi { background: transparent; border: 0; border-radius: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); padding: 16px var(--s5) 18px; }
.kpi { display: flex; flex-direction: column; gap: 6px; text-decoration: none; min-width: 0; transition: background-color var(--ease); }
a.kpi:hover { color: inherit; background: var(--hover); }
a.kpi:focus-visible { outline-offset: -2px; border-radius: var(--r-md); }
.kpi .value { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .value.coral { color: var(--coral); }
.kpi .hint { font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }
/* lange Bezeichnungen (z. B. „Annahmequote“) in schmalen Karten umbrechen statt abschneiden */
.kpi .label { overflow-wrap: anywhere; }

/* Fortschritt (§ 19 UStG) */
.meter { height: 6px; border-radius: var(--r-pill); background: var(--active); overflow: hidden; margin: var(--s2) 0; }
.meter > span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: var(--r-pill); }
.meter.warn > span { background: var(--warn); }
.meter.danger > span { background: var(--danger); }
.limit-row + .limit-row { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.limit-row .top { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; position: relative; scrollbar-width: thin; }   /* auch absolut positionierte Kinder (sr-only) bleiben im Rollbereich */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted);
  text-align: left; padding: 9px var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.t td { padding: 10px var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; transition: background-color 0.08s ease; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--hover); }
.t tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 650; padding-top: var(--s3); }
.t a { text-decoration: none; }
.t a:hover { text-decoration: underline; }
.t td.main-col a { font-weight: 650; }
.t .sub { display: block; font-size: 12.5px; color: var(--ink-muted); }
.t th .kz { display: block; font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0; margin-top: 2px; }
.t tr.dim td { color: var(--ink-muted); }
.t tr.text-row td { color: var(--ink-soft); font-style: italic; }
.t td.icon-col { width: 1%; white-space: nowrap; }
.t.compact td { padding: 7px var(--s3); }
.t td > .ic:first-child { color: var(--ink-muted); margin-right: 3px; }
/* in randlosen Karten laufen die Zeilen bis zum Kartenrand, der Text steht bündig mit der Kartenüberschrift */
.card.flush .t th:first-child, .card.flush .t td:first-child { padding-left: var(--s5); }
.card.flush .t th:last-child, .card.flush .t td:last-child { padding-right: var(--s5); }
.card.flush > .card-head + .table-wrap .t thead th, .card.flush > .card-head + form .t thead th { border-top: 1px solid var(--line); }
.empty { color: var(--ink-muted); padding: var(--s4) 0; font-size: 13.5px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line-strong);
  font-size: 11.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; letter-spacing: 0.005em;
  background: var(--hover); color: var(--ink-soft);
}
.kv dd .badge { white-space: normal; max-width: 100%; }   /* lange Hinweise (z. B. „Startpasswort – …“) umbrechen statt die Seite zu verbreitern */
.badge.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 13%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); color: var(--warn); }
.badge.danger { background: var(--coral-tint); border-color: var(--coral-line); color: var(--danger); }
.badge.info { background: color-mix(in srgb, var(--info) 12%, transparent); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.badge.coral { background: var(--coral-tint); border-color: var(--coral-line); color: var(--coral); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-md); border: 0; cursor: pointer;
  font: 600 13.5px/1.4 var(--font); letter-spacing: 0.002em; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-sm);
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease), filter var(--ease), transform 0.06s ease;
}
.btn:hover { color: var(--on-ink); filter: brightness(1.08); }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: var(--coral-fill); color: var(--on-coral); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(0, 0, 0, 0.08), var(--shadow-sm); }
.btn.primary:hover { background: var(--coral-fill-hover); color: var(--on-coral); filter: none; }
.btn.ghost { background: var(--bg-200); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-sm); }
.btn.ghost:hover { background: var(--bg-300); color: var(--ink); filter: none; box-shadow: inset 0 0 0 1px var(--ink-muted), var(--shadow-sm); }
.btn.quiet { background: transparent; color: var(--ink-soft); padding: 7px 9px; box-shadow: none; }
.btn.quiet:hover { background: var(--hover); color: var(--ink); filter: none; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--coral-line); }
.btn.danger:hover { background: var(--coral-tint); color: var(--danger); filter: none; box-shadow: inset 0 0 0 1px currentColor; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; gap: 5px; border-radius: 7px; }
.btn.icon { padding: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); text-decoration: none; font-size: 12.5px; font-weight: 600; }
.icon-link:hover { color: var(--coral); }

/* ---------- Formulare ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px var(--s4); }
.f { grid-column: span 12; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f.w6 { grid-column: span 6; } .f.w4 { grid-column: span 4; } .f.w3 { grid-column: span 3; } .f.w8 { grid-column: span 8; } .f.w2 { grid-column: span 2; } .f.w9 { grid-column: span 9; }
.f > label, .f > .flabel { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.f .help { font-size: 12px; color: var(--ink-muted); line-height: 1.45; }
.f .err { font-size: 12.5px; color: var(--danger); font-weight: 600; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], input[type=datetime-local], input[type=search], input[type=number], select, textarea {
  width: 100%; font: 400 13.5px/1.4 var(--font); color: var(--ink);
  background-color: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-md);
  padding: 7px 11px; min-height: 36px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
input[type=text]:hover, input[type=email]:hover, input[type=url]:hover, input[type=password]:hover, input[type=date]:hover, input[type=datetime-local]:hover, input[type=search]:hover, input[type=number]:hover, select:hover, textarea:hover {
  border-color: var(--ink-muted);
}
/* Auswahlfelder: eigener Pfeil statt des Systempfeils (nicht bei Listen mit mehreren Zeilen) */
select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; padding-right: 32px; background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97a7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: .75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 24%, transparent); }
@media (forced-colors: active) { input:focus, select:focus, textarea:focus { outline: 2px solid; } }
.f.invalid input, .f.invalid select, .f.invalid textarea { border-color: var(--danger); }
input.num-in { text-align: right; font-variant-numeric: tabular-nums; }
input[type=file] { font: 400 13px/1.4 var(--font); color: var(--ink-soft); }
input[type=file]::file-selector-button {
  font: 600 12.5px/1.4 var(--font); color: var(--ink); background: var(--bg-200); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 5px 10px; margin-right: 10px; cursor: pointer;
}
.check { display: flex; align-items: flex-start; gap: var(--s2); font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--coral-fill); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section + .form-section { margin-top: 24px; padding-top: var(--s5); border-top: 1px solid var(--line); }
.form-section > .label { display: block; margin-bottom: var(--s3); }
.form-actions { display: flex; gap: var(--s2); justify-content: flex-end; align-items: center; margin-top: var(--s5); flex-wrap: wrap; }
/* „PDF mit KI auslesen“ steht im Quelltext hinter „Speichern“ (Enter speichert), wird aber links gezeigt */
.form-actions .ki-read { order: -1; margin-right: auto; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.filters .search { position: relative; flex: 1 1 260px; max-width: 400px; }
.filters .search .ic { position: absolute; left: 11px; top: 10px; color: var(--ink-muted); pointer-events: none; }
.filters .search input { padding-left: 34px; }
.filters select { width: auto; min-width: 132px; }
.seg { display: inline-flex; background: var(--active); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 4px 11px; border-radius: 6px; text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); transition: color var(--ease), background-color var(--ease); }
.seg a:hover { color: var(--ink); }
.seg a.on { background: var(--bg-200); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
:root:not([data-theme="light"]) .seg a.on { background: var(--bg-300); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm); }

/* ---------- Definitionslisten ---------- */
dl.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 7px var(--s4); margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--ink-muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.address { font-style: normal; line-height: 1.55; }
.notes { white-space: pre-wrap; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Meldungen ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; margin-bottom: var(--s5); font-weight: 600; font-size: 13.5px; }
.flash > .ic { margin-top: 2px; }
a.flash { text-decoration: none; }
a.flash:hover { filter: brightness(1.1); }
.flash.ok { background: color-mix(in srgb, var(--ok) 11%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.flash.info { background: color-mix(in srgb, var(--info) 11%, transparent); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.flash.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); color: var(--warn); }
.flash.danger { background: var(--coral-tint); border-color: var(--coral-line); color: var(--danger); }
.notice { background: var(--hover); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; color: var(--ink-soft); }
.notice.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--ink); }
.notice + .check, .check + .notice { margin-top: var(--s3); }
.secret {
  font: 600 22px/1.2 var(--mono); letter-spacing: 0.06em; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: var(--s4) var(--s5); text-align: center; user-select: all; margin: var(--s4) 0;
}

/* ---------- Aktivität ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 88px 1fr; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--ink-muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.feed .msg { overflow-wrap: anywhere; }
details.changes summary { cursor: pointer; color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
details.changes ul { margin: var(--s2) 0 0; padding-left: var(--s4); font-size: 12.5px; color: var(--ink-soft); }
details.changes del { color: var(--ink-muted); }

/* ---------- Seitenwechsel ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); font-size: 13px; color: var(--ink-muted); flex-wrap: wrap; }
.pager .actions { gap: var(--s1); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s5) var(--s4); }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-200); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--edge), var(--shadow-lg); padding: 36px var(--s6) 28px; }
.auth-card .brand { margin-bottom: var(--s6); }
.auth-card .brand .logo { height: 44px; }
.auth-card .brand .tag { margin-bottom: 8px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .lead { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 24px; }
.auth-card form { display: flex; flex-direction: column; gap: var(--s4); }
.auth-card .btn { width: 100%; padding: 10px 14px; }
.auth-card input { min-height: 40px; }
.auth-foot { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; color: var(--ink-muted); font-size: 12px; }
/* Anmeldeseiten zweigeteilt: links die Marke auf Navy (in beiden Modi), rechts das Formular ohne Karte */
.auth.auth-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); place-items: stretch; padding: 0; }
.auth-aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 44px 52px 40px; background: #0b1f33; color: #f5f2ec; border-right: 1px solid var(--line);
}
.auth-aside .brand, .auth-aside .brand .logo { color: #f5f2ec; }
.auth-aside .brand .logo { height: 44px; }
.auth-aside .brand .tag { margin-bottom: 8px; border-color: rgba(245, 242, 236, 0.28); color: rgba(245, 242, 236, 0.7); }
.auth-claim { position: relative; z-index: 1; max-width: 520px; margin-top: auto; padding-top: var(--s6); }
.auth-claim .label { display: block; margin-bottom: var(--s4); color: rgba(245, 242, 236, 0.6); }
.auth-headline { margin: 0; font-size: clamp(32px, 3.4vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; }
.auth-sub { margin: var(--s4) 0 0; max-width: 400px; font-size: 15px; line-height: 1.55; color: rgba(245, 242, 236, 0.7); }
.auth-aside-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s3); margin-top: 44px; font-size: 12px; color: rgba(245, 242, 236, 0.55); }
/* die beiden Punkte des „ü“ als großes Zeichen in der oberen Ecke, Ton in Ton, von den Rändern angeschnitten */
.auth-mark { position: absolute; right: -150px; top: -84px; display: flex; gap: 132px; pointer-events: none; }
.auth-mark i { display: block; width: 264px; height: 264px; border-radius: 28%; background: rgba(245, 242, 236, 0.04); box-shadow: inset 0 0 0 1px rgba(245, 242, 236, 0.05); }
.auth-main { display: grid; place-items: center; padding: var(--s7) var(--s5); }
.auth.auth-split .auth-card { max-width: 360px; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.auth.auth-split .auth-card h1 { font-size: 26px; }
@media (min-width: 901px) {
  /* Marke und Firmenname stehen links – rechts bleibt nur ein Link (z. B. „Abbrechen“) im Fuß */
  .auth.auth-split .auth-card > .brand, .auth.auth-split .auth-foot .dots, .auth.auth-split .auth-foot > span, .auth.auth-split .auth-foot:not(:has(a)) { display: none; }
}
@media (max-width: 900px) {
  .auth.auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
}

/* ---------- Fehlerseite ---------- */
.error-box { max-width: 560px; }
.error-box .code { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; color: var(--coral); line-height: 1; margin-bottom: var(--s3); }

/* ---------- Responsiv ---------- */
@media (max-width: 1180px) {
  .grid.side-r { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(288px, 86vw); z-index: 30; transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.2, .7, .2, 1); box-shadow: var(--shadow-lg);
  }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { position: fixed; inset: 0; background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 20; display: block; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    position: sticky; top: 0; z-index: 10; padding: 10px var(--s4);
    background: color-mix(in srgb, var(--bg-100) 84%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand .logo { height: 30px; }
  .topbar .brand .tag { margin-bottom: 4px; }
  .nav a { min-height: 38px; font-size: 14.5px; }
  .main { padding: var(--s5) var(--s4) var(--s7); }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .f.w6, .f.w4, .f.w3, .f.w8, .f.w2, .f.w9 { grid-column: span 12; }
  .f.w3.keep, .f.w4.keep, .f.w2.keep { grid-column: span 6; }
  .t .hide-sm { display: none; }
  .t td .only-sm { display: block; }
  .t th .only-sm { display: inline; }
  .card.flush .t th:first-child, .card.flush .t td:first-child { padding-left: var(--s4); }
  .card.flush .t th:last-child, .card.flush .t td:last-child { padding-right: var(--s4); }
  /* ab 16 px zoomt iOS beim Antippen eines Felds nicht mehr in die Seite */
  input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], input[type=datetime-local], input[type=search], input[type=number], select, textarea { font-size: 16px; min-height: 42px; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 7px 11px; }
  .btn.icon, .btn.quiet { padding: 9px; }
}
.t .only-sm { display: none; }
.scrim { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }
@media print {
  .side, .topbar, .actions, .filters, .pager, .form-actions { display: none !important; }
  .shell { display: block; } .main { padding: 0; max-width: none; } .card, .grid.kpis { box-shadow: none; }
}
.card-pad { padding: var(--s3) var(--s5) var(--s5); margin: 0; }
.card-foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s4) var(--s5) var(--s5); border-top: 1px solid var(--line); }
input.date-sm { width: auto; min-height: 32px; padding: 5px 9px; font-size: 13px; }
.row-check { width: 16px; height: 16px; accent-color: var(--coral-fill); }
.line-rows .line-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 120px; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.line-rows .line-row > .f { grid-column: auto; }
.line-rows.with-tax .line-row { grid-template-columns: minmax(0, 1fr) 90px 120px 170px; }
.line-rows .line-row textarea { min-height: 36px; }
.line-rows .line-row.extra { display: none; }
.line-rows.show-all .line-row.extra { display: grid; }
@media (max-width: 960px) { .line-rows .line-row, .line-rows.with-tax .line-row { grid-template-columns: 1fr 1fr; } .line-rows .line-row > .f:first-child { grid-column: span 2; } .line-rows.with-tax .line-row > .f:nth-child(4) { grid-column: span 2; } }
.split { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.section-b { margin-bottom: var(--s5); }

/* ---------- Stufe 3: Lastschrift, Kontoabgleich, Mahnwesen ---------- */
form.inline { display: inline; }
button.icon-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.icon-col .icon-link + form.inline, .icon-col form.inline + .icon-link { margin-left: var(--s3); }
ol.steps { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s2); font-size: 13.5px; color: var(--ink-soft); }
ol.steps strong { color: var(--ink); }
.flash.inset { margin: 0 var(--s5) var(--s4); }
.t tr.sub-row td { padding-top: 0; border-top: 0; }
.t tbody tr.sub-row:hover td { background: transparent; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary.card-head { border-bottom: 0; }
details[open] > summary.card-head { border-bottom: 1px solid var(--line); }
.upload-row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.upload-row input[type="file"] { flex: 1 1 260px; min-width: 0; padding: 7px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--field); color: var(--ink-soft); }
td.assign { min-width: 260px; }
td.assign select { width: 100%; }
.ok-text { color: var(--ok) !important; }
.warn-text { color: var(--warn) !important; }
.danger-text { color: var(--danger) !important; }
.settings-grid input { max-width: 150px; }
.todo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s2); }
.todo-item { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3) 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--hover); color: var(--ink);
  text-decoration: none; font-weight: 550; font-size: 13px; line-height: 1.45; transition: background-color var(--ease), border-color var(--ease); }
.todo-item .ic:first-child { color: var(--ink-muted); }
.todo-item .ic:last-child { color: var(--ink-muted); opacity: 0.7; transition: transform var(--ease), opacity var(--ease); }
.todo-item span { flex: 1; min-width: 0; }
.todo-item:hover { color: var(--ink); background: var(--active); border-color: var(--line-strong); }
.todo-item:hover .ic:last-child { transform: translateX(2px); opacity: 1; }
.todo-item.warn .ic:first-child { color: var(--warn); }

/* ---------- Export ---------- */
.export-period { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; }
.export-period .f { flex: 1 1 170px; max-width: 240px; margin: 0; }
.export-list { list-style: none; margin: 0; padding: 0; }
.export-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.export-list li:first-child { border-top: 0; }
.export-list strong { display: block; }
.export-list .sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.export-list .actions { flex: none; }
.export-list li > div:first-child { flex: 1 1 240px; min-width: 0; }   /* lange Texte: Knopf bleibt rechts */
.gap-list .badge { margin-right: 4px; }
.gap-list .inline-details { display: block; margin-top: 2px; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
/* ---------- Artikel ---------- */
.price-old { text-decoration: line-through; color: var(--ink-muted); }
.price-plan { color: var(--coral); font-weight: 600; }
.price-change-form .form-grid { align-items: end; }
.card-pad { padding: var(--s4) var(--s5) var(--s5); }
.check-f { display: flex; align-items: flex-end; padding-bottom: 10px; }
.t tr.group-row td { background: transparent; padding-top: var(--s4); border-bottom: 0; }

/* ---------- Zwei-Faktor-Anmeldung ---------- */
.qr-box { display: inline-block; padding: var(--s3); background: #fff; border-radius: var(--r-md); margin: var(--s3) 0; }
.qr-box img { display: block; width: 220px; height: 220px; image-rendering: pixelated; }
.secret-key { font-size: 15.5px; font-weight: 600; letter-spacing: 0.08em; word-spacing: 0.3em; user-select: all; }
.code-in { font-size: 18px; letter-spacing: 0.25em; font-variant-numeric: tabular-nums; text-align: center; }
.recovery-codes { columns: 2; column-gap: var(--s6); font-size: 15.5px; font-weight: 600; letter-spacing: 0.06em; padding-left: 1.6em; margin: var(--s5) 0; }
.recovery-codes li { padding: 6px 0; }
.narrow-card { max-width: 640px; }

/* ---------- Domains, Wiedervorlagen, Kündigung ---------- */
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral-tint); box-shadow: inset 0 0 0 1px var(--coral-line); color: var(--danger);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
/* Ticket: Textbaustein einsetzen (über dem Antwortfeld) */
.snippet-bar { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin: 0 0 var(--s3); }
.snippet-bar select { width: auto; min-width: 0; max-width: 100%; flex: 1 1 12rem; }
/* Wiedervorlage: Schnellwahl für das Fälligkeitsdatum */
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* unsichtbarer erster Absende-Knopf: Enter im Formular löst ihn aus statt eines Schnellwahl-Knopfs */
.default-submit { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline-details { display: inline-block; }
.inline-details[open] { display: block; margin-top: var(--s2); }
.stack-form { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; margin-top: var(--s2); }
.stack-form label { display: flex; flex-direction: column; gap: 4px; }
.domain-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
input.input-sm, select.input-sm { min-height: 30px; padding: 4px 9px; font-size: 12.5px; width: auto; max-width: 100%; }
.fu-list { list-style: none; margin: 0; padding: 0; }
.card.flush > .fu-list { padding: 0 var(--s5) var(--s3); }
.fu-list.compact .fu-item { padding: 8px 0; }
.fu-item { display: flex; gap: var(--s3); align-items: flex-start; justify-content: space-between; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.fu-item:last-child { border-bottom: 0; }
.fu-main { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.fu-note { margin-top: 4px; white-space: pre-line; }
.fu-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.dom-box { margin-top: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--bg-300); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dom-box label.check { font-size: 12.5px; }
.cancel-table td input[type=date] { width: auto; min-height: 32px; padding: 5px 9px; font-size: 13px; }
.mail-body { margin: 0; padding: var(--s3) var(--s4); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.f.align-end { justify-content: flex-end; }
@media (max-width: 960px) { .fu-item { flex-direction: column; } .fu-actions { justify-content: flex-start; } }
.kv dd .sub { display: block; font-size: 12.5px; color: var(--ink-muted); }

/* ---------- Tickets ---------- */
.ticket-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ticket-thread li { padding: var(--s3) var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--hover); max-width: 92%; }
.ticket-thread li.msg-team { align-self: flex-end; background: var(--bg-300); border-color: var(--line-strong); }
.ticket-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; font-size: 13.5px; line-height: 1.5; }
code { font-size: 0.92em; }

/* ---------- Rundmail ---------- */
fieldset.f { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.label-like { padding: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 2px; }
progress.progress { display: block; width: 100%; height: 10px; margin: var(--s2) 0; border: 0; border-radius: 999px; overflow: hidden; background: var(--bg-300); accent-color: var(--coral-deep); appearance: none; }
progress.progress::-webkit-progress-bar { background: var(--bg-300); border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--coral-deep); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--coral-deep); border-radius: 999px; }
.stat-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; }

/* ---------- Navigation in Gruppen, Schnellsuche ---------- */
.nav-group { margin: 18px 0 5px; padding: 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); opacity: 0.85; }
.nav-search {
  display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); padding: 0 8px 0 10px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--hover);
  color: var(--ink-muted); text-decoration: none; font-size: 13px; transition: border-color var(--ease), color var(--ease), background-color var(--ease);
}
.nav-search:hover, .nav-search:focus-visible { color: var(--ink); border-color: var(--line-strong); background: var(--active); }
.nav-search span { flex: 1; }
kbd {
  display: inline-block; min-width: 1.7em; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-strong); box-shadow: 0 1px 0 var(--line-strong);
  background: var(--bg-200); color: var(--ink-soft); font: 600 10.5px/1.6 var(--font); letter-spacing: 0.02em; text-align: center; white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 2px; }
dialog.qs {
  width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 620px); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-200); color: var(--ink);
  box-shadow: var(--edge), var(--shadow-lg); overflow: hidden;
}
dialog.qs[open] { display: flex; flex-direction: column; }
dialog.qs::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qs-form { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.qs-ic { color: var(--ink-muted); display: inline-flex; }
.qs-form input, .qs-form input:focus { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 16px/1.4 var(--font); padding: 6px 0; outline: none; box-shadow: none; }
.qs-form input::-webkit-search-cancel-button { display: none; }
.qs-body { overflow-y: auto; padding: var(--s2); flex: 1; }
.qs-group { padding: var(--s3) var(--s3) 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.qs-item, .qs-item:visited { color: var(--ink); }
.qs-item { display: flex; flex-direction: column; gap: 1px; padding: 8px var(--s3); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.qs-item strong { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.qs-item .sub { font-size: 12.5px; color: var(--ink-muted); }
.qs-item.on { background: var(--active); box-shadow: inset 0 0 0 1px var(--line-strong); }
.qs-item.on strong { color: var(--ink); }
.qs-all { margin-top: var(--s2); font-size: 13px; color: var(--ink-soft); }
.qs-hint { margin: 0; padding: var(--s4) var(--s3); color: var(--ink-muted); font-size: 13px; }
.qs-foot { display: flex; flex-wrap: wrap; gap: var(--s4); padding: var(--s2) var(--s4); border-top: 1px solid var(--line); }
.qs-foot kbd { margin-right: 2px; }
@media (max-width: 960px) { .qs-foot { display: none; } dialog.qs { margin-top: var(--s4); max-height: calc(100vh - 32px); } }
.search-list { list-style: none; margin: 0; padding: 0 var(--s3) var(--s3); }
.search-list a { display: flex; flex-direction: column; padding: 9px var(--s3); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.search-list a:hover { background: var(--hover); }
.search-list .sub { font-size: 12.5px; color: var(--ink-muted); }

/* ---------- Angebote ---------- */
.seg-radio { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.offer-rows { display: flex; flex-direction: column; }
.offer-row { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s3); padding: var(--s4) 0 var(--s4) 40px; border-bottom: 1px solid var(--line); }
.offer-row > .f { grid-column: span 12; }
.offer-row > .f.w2 { grid-column: span 2; } .offer-row > .f.w3 { grid-column: span 3; } .offer-row > .f.w4 { grid-column: span 4; } .offer-row > .f.w8 { grid-column: span 8; }
.offer-row textarea { min-height: 36px; }
.offer-row .pos { position: absolute; left: 0; top: calc(var(--s4) + 24px); width: 28px; height: 28px; border-radius: 999px; background: var(--bg-300); color: var(--ink-soft); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.offer-row.extra { display: none; }
.offer-rows.show-all .offer-row.extra { display: grid; }
@media (max-width: 960px) {
  .offer-row { padding-left: 0; padding-top: 44px; }
  .offer-row .pos { top: var(--s3); }
  .offer-row > .f.w2, .offer-row > .f.w3, .offer-row > .f.w4, .offer-row > .f.w8 { grid-column: span 12; }
  .offer-row > .f.w2, .offer-row > .f.w3 { grid-column: span 6; }
}
.offer-items td.num { white-space: nowrap; }
.offer-total { display: grid; grid-template-columns: max-content auto; gap: 4px var(--s5); justify-content: end; padding: var(--s3) var(--s5) var(--s4); font-size: 13.5px; }
.offer-total dt { color: var(--ink-muted); text-align: right; }
.offer-total dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.offer-total dd .sub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.convert-row { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.convert-row:last-child { border-bottom: 0; }
.pre-line { white-space: pre-line; }
.plain-list { margin: 0; padding-left: 1.2em; } .plain-list li { margin: 2px 0; }
.todo-item.ok .ic:first-child { color: var(--ok); }

/* Läufe nach Zeitplan */
.run-list { list-style: none; margin: 0; padding: 0; }
.run-list > li { border-top: 1px solid var(--line); }
.run-list > li:first-child { border-top: 0; }
.run-list summary { cursor: pointer; padding: var(--s3) var(--s5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); list-style: none; }
.run-list summary::-webkit-details-marker { display: none; }
.run-list summary::before { content: '▸'; color: var(--ink-muted); font-size: 11.5px; width: 12px; }
.run-list details[open] summary::before { content: '▾'; }
.run-body { padding: 0 var(--s5) var(--s4) calc(var(--s5) + 20px); }
.run-sec { margin-top: var(--s2); font-size: 13px; }
.run-sec ul { margin: 4px 0 0; padding-left: 18px; }
.run-sec li { margin: 2px 0; }
.run-sec .err { color: var(--danger); }
.wrap-any { word-break: break-all; }

/* Diagramme (Auswertungen): eine Reihe in Blau, laufender/erwarteter Teil heller, Haarlinien-Raster */
:root, :root[data-theme="dark"] { --viz-2: #d95926; --viz-2-soft: #9a3f1b; --viz-1: #3987e5; --viz-1-soft: #1c5cab; --viz-track: #0d366b; --viz-grid: #1b3046; --viz-base: #2c445d; --viz-surface: #0e2236; }
:root[data-theme="light"] { --viz-2: #eb6834; --viz-2-soft: #f5b195; --viz-1: #2a78d6; --viz-1-soft: #86b6ef; --viz-track: #cde2fb; --viz-grid: #ebe7de; --viz-base: #cdc6b8; --viz-surface: #ffffff; }
.viz-fig { margin: 0; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-narrow { display: none; }
@media (max-width: 640px) { .viz-wide { display: none; } .viz-narrow { display: block; } }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-grid.base { stroke: var(--viz-base); }
.viz-tick, .viz-xl, .viz-yl, .viz-vl, .viz-endl { font: 600 11.5px var(--font); fill: var(--ink-muted); font-variant-numeric: tabular-nums; }
.viz-yl { fill: var(--ink-soft); }
.viz-vl, .viz-endl { fill: var(--ink); }
.viz-bar { fill: var(--viz-1); }
.viz-bar.partial { fill: var(--viz-1-soft); }
.viz-bar2 { fill: var(--viz-2); }                     /* zweite Reihe (Abgänge), ab 0.25.0 – geprüft gegen beide Flächen */
.viz-bar2.partial { fill: var(--viz-2-soft); }
.viz-hit:hover .viz-bar2, .viz-hit:focus-visible .viz-bar2 { filter: brightness(1.18); }
.viz-legend .key.up { background: var(--viz-1); }
.viz-legend .key.down { background: var(--viz-2); }
.viz-hit-area { fill: transparent; }
.viz-hit { outline: none; }
.viz-hit:hover .viz-bar, .viz-hit:focus-visible .viz-bar { filter: brightness(1.18); }
.viz-hit:focus-visible .viz-hit-area { stroke: var(--coral); stroke-width: 2; }
.viz-line { fill: none; stroke: var(--viz-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-area { fill: var(--viz-1); opacity: 0.1; }
.viz-xhair { stroke: var(--ink-muted); stroke-width: 1; opacity: 0; }
.viz-dot { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 2; opacity: 0; }
.viz-hit:hover .viz-xhair, .viz-hit:focus-visible .viz-xhair, .viz-hit:hover .viz-dot, .viz-hit:focus-visible .viz-dot { opacity: 1; }
.viz-end { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 2; }
.viz-track { fill: var(--viz-track); }
.viz-done { fill: var(--viz-1); }
.viz-planned { fill: var(--viz-1-soft); }
.viz-limit { stroke: var(--ink); stroke-width: 2; }
.viz-thresh { stroke: var(--ink-muted); stroke-width: 1.5; stroke-dasharray: 5 4; }   /* Warnschwelle (Liquiditätsvorschau, ab 0.26.0) */
.viz-table { margin-top: var(--s3); }
.viz-table summary { cursor: pointer; font-size: 12.5px; color: var(--ink-soft); }
.viz-meter + .viz-meter { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.viz-meter-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.viz-meter-head .badge { margin-left: auto; }
.viz-legend { list-style: none; padding: 0; margin: var(--s2) 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: 12.5px; color: var(--ink-soft); }
.viz-legend .key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; }
.viz-legend .key.done { background: var(--viz-1); }
.viz-legend .key.planned { background: var(--viz-1-soft); }
.viz-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--bg-300); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 8px 10px; box-shadow: var(--shadow-md); font-size: 12.5px; line-height: 1.4; max-width: 280px; }
.viz-tip strong { display: block; font-size: 13.5px; font-weight: 800; }
.viz-tip .t { color: var(--ink-soft); display: block; }
.viz-tip .s { color: var(--ink-muted); font-size: 12px; display: block; }
.kpi .value.prop { font-variant-numeric: normal; }
.section-pad { padding: 0 var(--s5) var(--s4); }

/* Eingänge: Vorschläge zum Zuordnen (schmale Spalte – untereinander statt nebeneinander) */
.req-sugs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.req-sug { display: grid; gap: 6px; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--bg-300); min-width: 0; overflow-wrap: anywhere; }
.req-sug-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* Zeiterfassung: laufender Timer oben auf jeder Seite */
.timer-bar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 6px 8px 6px 14px; margin-bottom: var(--s4); border-radius: 10px;
  background: color-mix(in srgb, var(--info) 11%, transparent); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); color: var(--ink); font-size: 13px; }
.timer-bar > span { flex: 1; min-width: 0; }
.timer-bar form { margin: 0; }

/* Belegeingang (Belegpostfach) */
.inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.inbox-item { display: grid; gap: 6px; overflow-wrap: anywhere; }
.inbox-item.is-problem { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.inbox-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.inbox-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.inbox-file a { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.inbox-actions { margin-top: var(--s2); }
.inbox-actions select { max-width: 100%; min-width: 0; }
.datev-exp { margin-top: var(--s3); }
.datev-exp > summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); margin-bottom: var(--s3); }

/* AGB-Zustimmung: Schnellerfassung */
.agb-list { list-style: none; margin: 0; padding: 0; }
.agb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s5); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.agb-row:first-child { border-top: 0; }
.agb-who { min-width: 0; flex: 1 1 220px; }
.agb-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.agb-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.agb-form input[type=date] { width: auto; }
.agb-form select { width: auto; max-width: 100%; }

/* ---------- Kundenportal (0.13.0) ---------- */
.stack-sm { display: flex; flex-direction: column; gap: var(--s3); }
.check .help { display: block; font-weight: 400; }

/* ---------- Verträge übertragen / Kunden zusammenführen (0.14.0) ---------- */
.t .check-col { width: 44px; }
.t .check-col input { width: 16px; height: 16px; accent-color: var(--coral-fill); }
.merge-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); }
.merge-cols ul { margin: var(--s2) 0 0; padding-left: 1.1em; }
.merge-cols li { margin: 2px 0; }

/* 0.14.0: Abruf per FinTS, Verträge übertragen, Preise zum Stichtag */
#abruf details summary { color: var(--ink-soft); text-decoration: underline dotted; text-underline-offset: 3px; }
#abruf details[open] summary { margin-bottom: var(--s2); }
#abruf input[type="date"] { width: auto; }
.fetch-card { max-width: 720px; }
.fetch-state { display: flex; gap: var(--s3); align-items: flex-start; }
.fetch-state strong { display: block; font-size: 14.5px; }
.fetch-state .sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.fetch-dot { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--info); animation: fetch-pulse 1.4s ease-in-out infinite; }
.fetch-dot.warn { background: var(--warn); }
@keyframes fetch-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .fetch-dot { animation: none; } }
.price-sum { margin: var(--s2) 0 0; }
.merge-cols .sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.flash .flash-list { margin: 0; padding-left: 1.1em; }
.flash .flash-list li + li { margin-top: 4px; }
/* Anlagen am Angebot (0.23.0) */
.stack.tight { gap: var(--s2); }
.att-list { list-style: none; padding-left: 0; }
.att-list .att-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.att-list .att-row:last-child { border-bottom: 0; }
.att-list .att-row a { min-width: 0; }
.att-list .att-row .inline-form { margin-left: auto; }
.att-pick .sub { display: block; margin-top: 2px; }
.att-reuse summary { cursor: pointer; color: var(--ink-soft); }

/* Kundenchronik (ab 0.25.0): Zeitleiste mit Notizen, Tickets, Mails, Rechnungen, Protokoll */
.chron { list-style: none; margin: 0; padding: 0; }
.chron-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.chron-item:last-child { border-bottom: 0; }
.chron-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--active); color: var(--ink-soft); display: grid; place-items: center; }
.chron-item.t-note .chron-ic { background: var(--coral-tint); box-shadow: inset 0 0 0 1px var(--coral-line); color: var(--coral); }
.chron-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chron-title { font-weight: 600; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
a.chron-title { text-decoration: none; }
a.chron-title:hover { text-decoration: underline; }
.chron-item.t-log .chron-title { font-weight: 400; color: var(--ink-soft); }
.chron-body { margin-top: 4px; overflow-wrap: anywhere; }
.chron-date { color: var(--ink-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 5px; }
.chron-new > summary { margin-bottom: 0; }
@media (max-width: 640px) {
  .chron-item { grid-template-columns: 30px minmax(0, 1fr); row-gap: 2px; }
  .chron-ic { grid-row: 1 / span 2; }
  .chron-date { grid-column: 2; grid-row: 1; padding-top: 0; font-size: 12px; }
  .chron-main { grid-column: 2; grid-row: 2; }
}

/* Liquiditätsvorschau (ab 0.26.0): Einzelposten je Monat aufklappbar */
.month-block > summary { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.month-block > summary::before { content: '▸'; color: var(--ink-muted); }
.month-block[open] > summary::before { content: '▾'; }
.month-block .t { border-top: 1px solid var(--line); }
.t tr.warn-row td { color: var(--warn); }

/* ---------- 0.27.1: Einstellungen in zugeklappten Abschnitten ---------- */
.fold-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin: 28px 0 10px; }
.settings-form > .fold-group:first-of-type { margin-top: 0; }
.card.fold { padding: 0; scroll-margin-top: 84px; }
.card.fold + .card.fold { margin-top: var(--s2); }
.fold > summary.fold-head {
  display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) auto 14px; align-items: center; gap: var(--s3);
  padding: 14px var(--s5); border-radius: var(--r-lg); transition: background-color var(--ease);
}
.fold > summary.fold-head:hover { background: var(--hover); }
.fold[open] > summary.fold-head { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fold > summary.fold-head::after {
  content: ''; width: 7px; height: 7px; justify-self: end; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted);
  transform: rotate(-45deg); transition: transform 0.15s ease;
}
.fold[open] > summary.fold-head::after { transform: rotate(45deg); }
.fold-title { display: flex; align-items: center; gap: var(--s2); font-weight: 650; font-size: 14px; color: var(--ink); min-width: 0; }
.fold-title .ic { color: var(--ink-muted); }
.fold-sum { color: var(--ink-soft); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-flags { display: inline-flex; gap: var(--s2); }
.fold-body { padding: var(--s5); }
.save-bar {
  position: sticky; bottom: var(--s3); z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s5); padding: 10px var(--s3) 10px var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  background: color-mix(in srgb, var(--bg-200) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
}
#system { margin-top: var(--s6); }
.save-bar > span { flex: 1 1 180px; min-width: 0; text-align: right; }
@media (max-width: 720px) {
  .fold > summary.fold-head { grid-template-columns: minmax(0, 1fr) auto 14px; padding: var(--s3) var(--s4); row-gap: 2px; }
  .fold-sum { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .fold-body { padding: var(--s4); }
}
@media print { .save-bar { display: none; } }
/* Plesk-Abgleich (0.27.1) */
.plesk-mini { padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); }
.plesk-mini > .label { display: block; margin-bottom: var(--s2); }
.plesk-act { min-width: 300px; }
.plesk-act form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; margin: 0; }
.plesk-act form + form { margin-top: 6px; }
.plesk-act select, .plesk-act input { min-width: 0; }
#kostenlos-ohne-webspace > summary .xsmall { margin-left: var(--s2); }

/* Mailverlauf (ab 0.27.3) */
.mh-list { list-style: none; margin: 0; padding: 0 var(--s5); }
.mh-list > li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.mh-list > li:last-child { border-bottom: 0; }
.mh-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--active); color: var(--ink-soft); display: grid; place-items: center; }
.mh-main { min-width: 0; display: grid; gap: 2px; }
.mh-subject { font-weight: 600; overflow-wrap: anywhere; }
.mh-snippet { overflow-wrap: anywhere; }
.mh-side { display: grid; justify-items: end; gap: var(--s2); }
.kpi .value.small-value { font-size: 15.5px; font-weight: 700; letter-spacing: 0; }
.mh-body { margin: 0; padding: var(--s3) var(--s4); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; max-height: 70vh; overflow: auto; }
.mh-head dd { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mh-list { padding: 0 var(--s4); }
  .mh-list > li { grid-template-columns: 30px minmax(0, 1fr); }
  .mh-side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
}
.mh-links { list-style: none; margin: 0; padding: 0; }
.mh-links > li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); }
.mh-links > li:last-child { border-bottom: 0; }
.mh-links .sub { display: block; }

/* ---------- Autopilot-Übersicht (ab 0.28.3) ---------- */
.auto-list { list-style: none; margin: 0; padding: 0 var(--s5) var(--s3); }
.auto-item { display: flex; gap: var(--s3); align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.auto-item:last-child { border-bottom: 0; }
.auto-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); opacity: 0.5; }
.auto-item.on .auto-dot { background: var(--ok); opacity: 1; }
.auto-main { min-width: 0; flex: 1; font-size: 13px; }
.auto-main a { text-decoration: none; font-weight: 600; }
.auto-main .sub { display: block; font-size: 12px; color: var(--ink-muted); }
.badge.grey { background: transparent; border-color: var(--line); color: var(--ink-muted); }
.auto-foot { padding: 0 var(--s5) var(--s4); margin: 0; }

/* Jahreswechsel-Cockpit (ab 0.28.7) */
.yearend-item .card-head h2, #in-ordnung .card-head h2 { flex-wrap: wrap; row-gap: 4px; }
.yearend-item .card-head .badge, #in-ordnung .card-head .badge { font-size: 11.5px; }
.yearend-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.yearend-more { margin-top: var(--s2); }
.yearend-more[open] summary { margin-bottom: 4px; }
.yearend-fine { list-style: none; margin: 0; padding: 0; display: grid; }
.yearend-fine li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.yearend-fine li:first-child { border-top: 0; padding-top: 0; }
.yearend-fine li > div:first-child { flex: 1 1 280px; min-width: 0; font-size: 13px; }
.yearend-fine .sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.yearend-fine .yearend-actions { margin-top: 0; }
.yearend-list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.yearend-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; }
.yearend-list li > a, .yearend-list li > span:not(.badge):not(.sub) { overflow-wrap: anywhere; min-width: 0; }
.yearend-list .sub { flex-basis: 100%; font-size: 12.5px; color: var(--ink-soft); }
.yearend-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: 13px; }
.yearend-dates li { display: grid; grid-template-columns: 92px 1fr; gap: var(--s2); }
.yearend-dates strong { font-variant-numeric: tabular-nums; }
/* Portal-Mails (ab 0.30.0) */
.pm-vars { margin: var(--s3) 0 var(--s4); }
.pm-form { border-top: 1px solid var(--line); padding-top: var(--s4); margin-top: var(--s4); }
.pm-form h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 var(--s3); }
.pm-form textarea { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.5; }

/* Tickets: Anhänge je Nachricht (ab 0.31.0) */
.ticket-files { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.ticket-thread .ticket-files li { padding: 0; background: none; border: 0; border-radius: 0; max-width: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ticket-files a { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.ticket-files .tf-thumb { display: block; flex-basis: 100%; }
.ticket-files .tf-thumb img { display: block; max-width: min(320px, 100%); max-height: 200px; border-radius: var(--r-sm, 6px); border: 1px solid var(--line, rgba(0,0,0,.1)); background: var(--bg-100, #fff); }
.ticket-files .inline-form .btn { padding: 2px 6px; }
.ticket-files li.removed { opacity: .75; }

/* Server (ab 0.32.0): Verlauf, Tresor-Anzeige */
.viz-dot.solo { opacity: 1; }
.viz-block > .label { display: block; margin-bottom: var(--s2); }
.secret-box { display: grid; gap: var(--s3); }
.secret-box pre { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--bg-300); border: 1px solid var(--line-strong);
  font: 600 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.secret-box.hidden-now pre { filter: blur(6px); user-select: none; }
.secret-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* Offene Posten nach Alter (ab 0.34.0): eine Farbe, je älter desto kräftiger (Ordinal-Stufen, geprüft gegen die Kartenfläche
   beider Modi); 2 px Abstand zwischen den Stufen; Breite per data-pct (app.js) */
:root, :root[data-theme="dark"] { --age-0: #256abf; --age-1: #3987e5; --age-2: #6da7ec; --age-3: #9ec5f4; --age-4: #cde2fb; }
:root[data-theme="light"] { --age-0: #86b6ef; --age-1: #5598e7; --age-2: #2a78d6; --age-3: #1c5cab; --age-4: #104281; }
.age-bar { display: flex; gap: 2px; height: 22px; margin: var(--s2) 0 var(--s3); }
.age-seg { display: block; min-width: 6px; height: 100%; border-radius: 4px; outline-offset: 2px; }
.age-seg:hover, .age-seg:focus-visible { filter: brightness(1.12); }
.age-seg.on { box-shadow: 0 0 0 2px var(--viz-surface), 0 0 0 4px var(--ink); }
.age-0 { background: var(--age-0); } .age-1 { background: var(--age-1); } .age-2 { background: var(--age-2); } .age-3 { background: var(--age-3); } .age-4 { background: var(--age-4); }
.age-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 12.5px; color: var(--ink-soft); }
.age-legend li { display: flex; align-items: baseline; gap: 6px; }
.age-legend li.on { color: var(--ink); font-weight: 700; }
.age-legend li.none { opacity: .6; }
.age-legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.age-legend strong { color: var(--ink); font-weight: 700; }
/* Kundenseite (ab 0.34.0): Zahlungsverhalten und Vertrags-Zeitstrahl */
.viz-pt { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 1.5; }
.viz-ring { fill: var(--viz-surface); stroke: var(--viz-2); stroke-width: 2.5; }
.viz-hit:hover .viz-pt, .viz-hit:focus-visible .viz-pt, .viz-hit:hover .viz-ring, .viz-hit:focus-visible .viz-ring { filter: brightness(1.18); stroke-width: 3; }
.viz-span { fill: var(--viz-1); }
.viz-span.ended { fill: var(--viz-1-soft); }
.viz-span-open { fill: var(--viz-1); }
.viz-mark { fill: var(--viz-2); stroke: var(--viz-surface); stroke-width: 1.5; }
.viz-today { stroke: var(--ink-muted); stroke-width: 1.5; stroke-dasharray: 3 3; }
.viz-hit:hover .viz-span, .viz-hit:focus-visible .viz-span { filter: brightness(1.15); }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
@media (max-width: 900px) { .insight-grid { grid-template-columns: 1fr; } }
.insight-grid .label { display: block; margin-bottom: var(--s2); }

/* Preisrunden-Rechner (ab 0.34.0): Balken Mehrumsatz (Reihe 1) und entgeht (Reihe 2), 2 px Abstand; Grenze als Strich */
.pc-all { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: 12.5px; color: var(--ink-soft); }
.pc-all input { width: 4.5em; }
.pc-table .pc-price { min-width: 9.5em; }
.pc-in { width: 7.5em; }
.pc-in.invalid { border-color: var(--danger); }
.pc-price .sub, .pc-price .err { display: block; }
.pc-price .err { font-size: 12px; color: var(--danger); font-weight: 600; white-space: normal; }
.pc-table td:first-child { min-width: 13em; }
.pc-bar-c { width: 14%; min-width: 90px; }
.pc-bar { display: flex; gap: 2px; height: 12px; }
.pc-bar span { display: block; height: 100%; width: 0; flex: none; }
.pc-bar .pc-gain { background: var(--viz-1); border-radius: 0 4px 4px 0; }
.pc-bar .pc-lost { background: var(--viz-2); border-radius: 0 4px 4px 0; }
.viz-legend .key.pc-key-gain { background: var(--viz-1); }
.viz-legend .key.pc-key-lost { background: var(--viz-2); }
.pc-sb .value { margin-bottom: 2px; }
.pc-meter { position: relative; display: flex; gap: 2px; height: 14px; border-radius: 4px; background: var(--viz-track); margin: var(--s2) 0 var(--s1); }
.pc-meter span { display: block; height: 100%; flex: none; width: 0; }
.pc-meter .pc-meter-base { background: var(--viz-1); border-radius: 4px 0 0 4px; }
.pc-meter .pc-meter-delta { background: var(--viz-2); border-radius: 0 4px 4px 0; }
.pc-meter .pc-meter-limit { position: absolute; left: 0; top: -4px; height: auto; bottom: -4px; border-right: 2px solid var(--ink); pointer-events: none; }
.pc-meter.over .pc-meter-limit { border-right-color: var(--danger); }
.pc-preview-subs { margin: var(--s2) 0 0; padding-left: 1.2em; font-size: 12.5px; }
.pc-preview-subs li { margin: 2px 0; }

/* Preisrunden-Rechner schmal: Kennzahlen untereinander, je Artikel ein Block (Artikel, Listenpreis | neuer Preis, mehr im Jahr) */
@media (max-width: 640px) {
  .pricecalc .grid.kpis { grid-template-columns: 1fr; }
  .pc-table, .pc-table tbody { display: block; }
  .pc-table thead { display: none; }
  .pc-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .pc-table tbody tr:last-child { border-bottom: 0; }
  .pc-table td { display: block; padding: 0; border: 0; text-align: left; }
  .pc-table td:first-child { grid-column: 1 / -1; min-width: 0; margin-bottom: var(--s2); }
  .pc-table td.pc-list { grid-column: 1; grid-row: 2; }
  .pc-table td.pc-price { grid-column: 2; grid-row: 2 / span 2; min-width: 0; text-align: right; }
  .pc-table td.pc-gain-c { grid-column: 1; grid-row: 3; }
  .pc-table td.pc-list::before, .pc-table td.pc-gain-c::before { content: attr(data-label) " "; color: var(--ink-soft); font-size: 12.5px; }
  .pc-table .hide-sm { display: none; }
}
/* 0.35.0: Monitoring – E-Mail-Schutz, gut geschützte/nicht prüfbare Domains zugeklappt */
details.mail-more { border-top: 1px solid var(--line); }
details.mail-more > summary { color: var(--ink-soft); padding: 2px 0; }
details.mail-more > summary::before { content: "▸ "; }
details.mail-more[open] > summary::before { content: "▾ "; }
details.mail-more .table-wrap { margin: var(--s2) calc(-1 * var(--s5)) 0; }

/* ab 0.38.0: weitere Portal-Zugänge in der Kundenkarte */
.pu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pu-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
.pu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pu-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Projekte (ab 0.39.0) */
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-top: var(--s1); }
.row-actions form { margin: 0; }
.ms-list .fu-item { align-items: flex-start; }
.ms-list details summary { cursor: pointer; color: var(--ink-muted); }
.card.flush > .flush-pad { padding: 0 var(--s5) var(--s5); }
select.select-sm { width: auto; min-width: 0; padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }

/* 0.40.0 KI liest Belege */
.ki-line .badge { display: inline-flex; align-items: center; gap: 3px; }
.ki-problems { margin: 4px 0 0; padding-left: 18px; color: var(--warn); }
.ki-problems li + li { margin-top: 2px; }
.ki-cands { list-style: none; margin: 0 0 var(--s2); padding: 0; }
.ki-cands li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px var(--s2); padding: 8px 0; border-top: 1px solid var(--line); }
.ki-cands .ki-cand { flex: 1 1 160px; min-width: 0; }
.ki-cands .ki-why { display: block; margin-top: 2px; }
.ki-cands li:first-child { border-top: 0; }
.ki-summary p { margin: 0 0 var(--s2); }
.ki-summary ul { margin: 0 0 var(--s2); padding-left: 18px; }
.ki-bank-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.ki-hint { display: block; margin-top: 4px; }

/* Passkeys (ab 0.46.0) */
.passkey-login { display: grid; gap: var(--s3); }
.passkey-login .btn { justify-content: center; }
.or-line { display: flex; align-items: center; gap: var(--s3); }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }

/* ---------- 0.51.0: Feinschliff ---------- */
.side-actions [data-theme-toggle] { flex: 0 0 auto; padding-left: 9px; padding-right: 9px; }
.side-actions .btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); }
.side-actions .btn.ghost:hover { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.nav-search kbd { background: transparent; box-shadow: none; border-color: var(--line-strong); color: var(--ink-muted); }
.card-head .icon-link, .card-head a.small { color: var(--ink-muted); }
.card-head .icon-link:hover, .card-head a.small:hover { color: var(--coral); }
.card-foot { padding: var(--s3) var(--s5); }
.fu-item strong, .fu-main > a > strong { font-weight: 650; }
.qs-item { transition: background-color 0.08s ease; }
.qs-form .qs-ic .ic { width: 18px; height: 18px; }
.auto-item.on .auto-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
/* Abo-Dienste: ersetzt eingebettete style-Angaben, die die Inhaltsrichtlinie (style-src 'self') verwirft */
.logo-preview { max-height: 48px; max-width: 220px; background: #fff; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.secret-inline { word-break: break-all; user-select: all; }
input.upper-in { text-transform: uppercase; }
input.upper-in::placeholder { text-transform: none; }
