/* Oberfläche (SPA) nach dem CI-Briefing V2.0: hell als Normalfall, Violett als Highlight, der Verlauf als seltenes Gewicht.
   Farbwerte nur in tokens.css; Schriften in fonts.css. */
@import url('tokens.css');
@import url('fonts.css');

/* Maße des Rahmens */
:root { --side-w: 240px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
body { font-family: var(--fs); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--fd); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h3, h4 { font-family: var(--fs); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 15.5px; } h4 { font-size: 14.5px; }
p { margin: 0 0 .8em; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--tint); color: var(--ink); }
code, pre, .mono, kbd { font-family: var(--fm); font-size: 12.5px; }
code { background: var(--soft); padding: 1px 6px; border-radius: 5px; color: var(--ink); overflow-wrap: anywhere; }
small, .muted { color: var(--muted); }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
/* Kennungen (Beleg-, Kundennummern, Datum in Tabellen) */
.ident { font-family: var(--fm); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.boot { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); gap: 18px; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Wortmarke und Icon (Abschnitt 04): „pipe“ 400, „lein“ 700, einfarbig ---------- */
.wm { font-family: var(--fd); letter-spacing: -.035em; line-height: 1; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; }
.wm .a { font-weight: 400; } .wm .b { font-weight: 700; }
a.wm:hover { text-decoration: none; }
.wm-ico { width: 1.16em; height: 1.16em; border-radius: .3em; background: var(--grad-btn); display: inline-grid; place-items: center; flex: none; margin-right: .38em; }
.wm-ico svg { width: 68%; height: 68%; display: block; }
.wm-side { font-size: 21px; } .wm-auth { font-size: 30px; } .wm-boot { font-size: 34px; }

/* ---------- App-Rahmen (Abschnitt 11; 0.62.0): Streifen links, Seitenleiste weiß mit aufklappbaren Bereichen, Kopfleiste mit
   Suche, „Neu“ und Namensmenü, Arbeitsbereich auf dem Grund ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; padding-left: 4px; }
.shell::before { content: ''; position: fixed; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-rail); z-index: 30; }
.side { background: var(--surface); border-right: 1px solid var(--hair); padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 16px; text-decoration: none; }
.side .brand:hover { text-decoration: none; }
/* Firmenname unter der Wortmarke in normaler Schrift (0.78.0; bis 0.77.2 Mono-Versalien) */
.side .brand .tagline { font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1 0 auto; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font: inherit; font-size: 13.5px; font-weight: 500; border: 0; background: none; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--tint); color: var(--violet-deep); font-weight: 600; }
.nav .ico { width: 19px; height: 19px; flex: none; }
.nav .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .nav-head.cur { color: var(--ink); font-weight: 600; }
.nav .chev { width: 15px; height: 15px; flex: none; color: var(--muted); transition: transform .15s; }
.nav .nav-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav .nav-sub { display: flex; flex-direction: column; gap: 1px; padding: 1px 0 6px; }
.nav .nav-sub[hidden], .nav .head-mark[hidden] { display: none; }
.nav a.sub { min-height: 34px; padding: 6px 10px 6px 39px; }
.nav .nav-end { margin-top: auto; padding-top: 10px; }
.nav .nav-end::before { content: ''; display: block; height: 1px; background: var(--hair); margin: 0 8px 10px; }
/* Favoriten (0.116.0, Plan 4.69): Block oben, Stern am Eintrag beim Überfahren (auf Touch-Geräten immer), nicht in der Symbolleiste */
.nav .nav-item { position: relative; }
.nav .nav-item > a { padding-right: 32px; }
.nav .nav-star { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; min-height: 26px; padding: 0; border-radius: var(--r-sm); color: var(--muted); opacity: 0; transition: opacity .12s; }
.nav .nav-star .star { width: 15px; height: 15px; }
.nav .nav-star.on { color: var(--violet-deep); }
.nav .nav-star.on .star path { fill: currentColor; }
.nav .nav-item:hover > .nav-star, .nav .nav-star:focus-visible { opacity: 1; }
@media (hover: none) { .nav .nav-star { opacity: .75; } }
.nav .nav-favs { margin: 6px 0; padding: 6px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 1px; }
.nav .nav-fav-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.nav .nav-fav-head .nav-fav-edit { width: auto; min-height: 0; padding: 0 2px; font-size: 11.5px; color: var(--muted); }
.nav .nav-fav-head .nav-fav-edit:hover { color: var(--ink); background: none; text-decoration: underline; }
.fav-order, .fav-add { list-style: none; margin: 0 0 14px; padding: 0; }
.fav-order li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.fav-order .actions { display: inline-flex; gap: 4px; }
.fav-add li { padding: 2px 0; }
.nav a.disabled { color: var(--muted); cursor: default; }
.nav a.disabled:hover { background: none; }
/* Bereich nicht im Paket (0.54.0): zurückgenommen, bleibt erreichbar (nur lesen) */
.nav a.nopkg:not(.active) { color: var(--muted); }
.nav .soon { font-family: var(--fm); font-size: 10px; color: var(--violet-deep); background: var(--tint); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
/* Verwaltung (0.78.0): eigener Streifen in Graphit und ein Kennzeichen unter der Wortmarke – nie mit der App zu verwechseln */
.admin-shell::before { background: linear-gradient(180deg, #16141B 0%, #4A4653 100%); }
.side .brand .tagline.admin-tag { display: inline-block; width: max-content; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--surface); font-family: var(--fm); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.side .foot { margin-top: 10px; padding: 12px 10px 0; border-top: 1px solid var(--hair); font-size: 12.5px; color: var(--muted); display: grid; gap: 2px; }
.side .foot .ident { font-size: 10.5px; }
.side .foot a.trial { color: inherit; text-decoration: none; }
.side .foot a.trial:hover, .side .foot a.trial:focus-visible { color: var(--violet-deep); text-decoration: underline; }
.tabbar { display: none; }
.work { min-width: 0; display: flex; flex-direction: column; }
.main { padding: 0 36px 64px; max-width: 1220px; width: 100%; min-width: 0; }

/* Kopfleiste (0.62.0): Suche (Strg K), „Neu“, Namensmenü; scrollt mit (Editoren haben eigene klebende Spalten) */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 11px 36px; background: var(--surface); border-bottom: 1px solid var(--hair); }
.top-brand, .top-test { display: none; }
.top-brand:hover { text-decoration: none; }
.searchbar { flex: 1 1 320px; max-width: 520px; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.searchbar:hover { border-color: var(--line-strong); }
.searchbar .ico { width: 18px; height: 18px; flex: none; }
.searchbar .ph { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchbar kbd, .pal-foot kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-new .ico { width: 18px; height: 18px; }
.menu-wrap { position: relative; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--tint); color: var(--violet-deep); font-family: var(--fd); font-weight: 700; font-size: 14px; letter-spacing: 0; cursor: pointer; flex: none; }
.avatar:hover, .avatar.active, .avatar[aria-expanded="true"] { border-color: var(--violet); }
.menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: flex; flex-direction: column; min-width: 270px; max-width: calc(100vw - 32px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-float); }
.menu[hidden] { display: none; }
/* Hilfe-Knopf unten rechts (0.142.0): rund, über dem Inhalt, unter Meldungen und Dialogen; das Menü öffnet nach oben. Auf dem
   Handy ausgeblendet – dort stehen „Hilfe zu dieser Seite“ und „Rückmeldung geben“ im Namensmenü */
.help-fab-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 22; }
.help-fab { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 18px/1 var(--fs); cursor: pointer; box-shadow: var(--sh-float); padding: 0; }
.help-fab:hover, .help-fab[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.help-fab:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.help-fab-wrap .menu { top: auto; bottom: calc(100% + 8px); }
body:has(.help-fab-wrap) #toasts { bottom: 72px; }
/* über der Speicherleiste (Durchsicht 0.142.0): der Knopf verdeckte sonst auf breiten Bildschirmen den rechten Rand von „Speichern“ */
body:has(.savebar) .help-fab-wrap { bottom: 84px; }
body:has(.savebar):has(.help-fab-wrap) #toasts { bottom: 136px; }
/* Formbuilder: Griff erst ab zwei Feldern (wie Positionen, Abschnitte, eigene Felder) */
.fb-field:only-child .drag-handle { visibility: hidden; }
@media (max-width: 640px) { .help-fab-wrap { display: none; } }
@media print { .help-fab-wrap { display: none; } }
/* Bildschirmfoto für die Rückmeldung (0.142.0): Dialoge treten kurz zurück */
html.is-capturing dialog[open], html.is-capturing dialog[open]::backdrop, html.is-capturing .help-fab-wrap { opacity: 0 !important; transition: none !important; }
.fb-shot { margin: 6px 0 10px; }
.fb-shot-img { display: block; max-width: 100%; max-height: 240px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 6px; }
.fb-context { margin: 4px 0 8px; font-size: 13px; }
.fb-context summary { cursor: pointer; color: var(--muted); }
.fb-context dl { margin-top: 6px; }
.menu:focus { outline: none; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--soft); text-decoration: none; }
.menu .ico { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.menu .sep { height: 1px; background: var(--hair); margin: 6px 4px; }
.menu-who { display: grid; gap: 2px; padding: 8px 12px 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.menu-who b { color: var(--ink); font-size: 14px; }
.menu-who .role { color: var(--violet-deep); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 4px 12px; font-size: 14px; font-weight: 500; }
.menu-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--soft); border-radius: 99px; }
.menu .menu-seg button { width: auto; min-height: 30px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; color: var(--ink-2); }
.menu .menu-seg button[aria-checked="true"] { background: var(--surface); color: var(--violet-deep); font-weight: 600; box-shadow: var(--sh); }
.menu .two, .sheet-a .two { display: grid; gap: 1px; }
.menu .two small, .sheet-a .two small { color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* Suche (Strg K) */
dialog.palette { width: min(660px, calc(100vw - 32px)); max-height: min(580px, calc(100vh - 120px)); margin: 88px auto auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--sh-float); }
dialog.palette[open] { display: flex; flex-direction: column; }
dialog.palette::backdrop, dialog.sheet::backdrop { background: var(--overlay); }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--hair); }
.pal-head > .ico { width: 18px; height: 18px; flex: none; color: var(--muted); }
.pal-head input.pal-q { flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; }
.pal-head input.pal-q:focus, .pal-head input.pal-q:focus-visible { box-shadow: none; outline: none; }
.pal-list { flex: 1 1 auto; overflow-y: auto; padding: 4px 0 8px; }
.pal-label { padding: 10px 16px 4px; font-family: var(--fm); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.pal-opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 16px; color: var(--ink); text-decoration: none; }
.pal-opt:hover, .pal-opt[aria-selected="true"] { background: var(--soft); text-decoration: none; }
.pal-opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--violet); }
.pal-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.pal-main b, .pal-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-main b { font-weight: 600; }
.pal-main small { color: var(--muted); font-size: 12.5px; }
.pal-right { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pal-kind { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pal-kind:empty { display: none; }
.pal-group.stale { opacity: .55; }
.pal-status { margin: 0; color: var(--muted); font-size: 13px; }
.pal-status:not(:empty) { padding: 4px 16px 12px; }
/* Hinweis auf die Anweisungen (0.103.0), solange das Suchfeld leer ist */
.pal-hint { margin: 0; padding: 8px 16px 12px; color: var(--muted); font-size: 12.5px; }
.pal-foot { display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 12px; }
@media (max-width: 600px) { .pal-right .chip { display: none; } dialog.palette { margin-top: 16px; max-height: calc(100vh - 32px); } .pal-foot { display: none; } }

/* Blatt „Neu“ (Mobil) */
dialog.sheet { width: 100%; max-width: 100%; max-height: calc(100vh - 40px); margin: auto 0 0; padding: 6px 0 calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--sh-float); }
dialog.sheet h2 { margin: 0; padding: 4px 18px 6px; font-size: 17px; }
dialog.sheet h2:focus { outline: none; }
.sheet-grip { width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 99px; background: var(--line-strong); }
.sheet-list { display: grid; }
.sheet-a { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 6px 18px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.sheet-a:hover { background: var(--soft); text-decoration: none; }
.sheet-a .ico { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--soft); color: var(--ink-2); flex: none; }
.sheet-a[data-neu="foto"] .ico { background: var(--tint); color: var(--violet-deep); }
.sheet-foot { padding: 10px 18px 0; }
.sheet-foot .btn { width: 100%; }

/* Kopfzeile: Name der Ansicht links, die eine Hauptaktion rechts */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 20px; margin: 0 -36px 24px; padding: 26px 36px 20px; background: var(--surface); border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { color: var(--ink-2); margin: 4px 0 0; max-width: 72ch; }
.page-head .actions, .page-head .page-actions { margin-left: auto; }
.eyebrow { font-family: var(--fm); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--violet-deep); font-weight: 500; margin-bottom: 8px; }
a.eyebrow { display: inline-block; text-decoration: none; }
a.eyebrow:hover { text-decoration: underline; text-underline-offset: 3px; }
/* ohne Kopfzeile: Abstand nach oben */
.main > :first-child:not(.view):not(.page-head):not(.role-bar):not(:has(> .page-head:first-child)),
.view > :first-child:not(.page-head):not(:has(> .page-head:first-child)) { margin-top: 26px; }

/* ---------- Drei Stufen des Rahmens (0.78.0): Breit ab 1.101 Pixel (Seitenleiste mit Beschriftung), Schmal 641–1.100 Pixel
   (Seitenleiste als Symbolleiste, aufgeklappt über dem Inhalt), Handy bis 640 Pixel (Leiste unten). Bausteine haben eigene
   Umbrüche nach ihrem Platzbedarf; was zum Rahmen gehört (Leiste unten, Speicherleiste, Hinweise, Rollenleiste), folgt 640. ---------- */
@media (min-width: 641px) and (max-width: 1100px) {
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .side { padding: 14px 8px 12px; }
  .side .brand { padding: 2px 0 12px; align-items: center; }
  .work { grid-column: 2; }
  .side .brand .tagline, .side .brand .tagline.admin-tag, .side .wm .a, .side .wm .b, .side > .test-badge, .side .foot,
  .nav .lbl, .nav .chev, .nav .soon, .nav .count, .nav .live, .nav .beta, .nav .head-mark, .nav .nav-sub, .nav .nav-end::before { display: none; }
  .nav .nav-star, .nav .nav-fav-head { display: none; }
  .nav .nav-item > a { padding-right: 0; }
  .side .wm-ico { margin-right: 0; }
  .nav a, .nav button { justify-content: center; width: 48px; min-height: 44px; padding: 7px 0; margin: 0 auto; }
  .nav a.sub { padding-left: 0; }
  .nav .nav-end { padding-top: 8px; }
  /* aufgeklappt (Klick auf einen Bereich oder das Zeichen): volle Seitenleiste über dem Inhalt, abgedunkelter Grund */
  .side.open { position: fixed; top: 0; bottom: 0; left: 4px; width: var(--side-w); z-index: 26; padding: 18px 12px 14px; box-shadow: var(--sh-float); }
  .side.open .brand { padding: 4px 10px 16px; align-items: stretch; }
  .side.open .brand .tagline, .side.open .wm .a, .side.open .wm .b, .side.open .nav .lbl, .side.open .nav .chev, .side.open .nav .soon, .side.open .nav .count, .side.open .nav .live, .side.open .nav .beta, .side.open .nav .head-mark:not([hidden]) { display: revert; }
  .side.open .brand .tagline.admin-tag { display: inline-block; }
  .side.open > .test-badge { display: inline-block; }
  .side.open .foot { display: grid; }
  .side.open .nav .nav-end::before { display: block; }
  .side.open .nav .nav-sub:not([hidden]) { display: flex; }
  .side.open .wm-ico { margin-right: .38em; }
  .side.open .nav a, .side.open .nav button { justify-content: flex-start; width: 100%; min-height: 38px; padding: 7px 10px; margin: 0; }
  .side.open .nav a.sub { min-height: 34px; padding: 6px 10px 6px 39px; }
  .side.open .nav .nav-star { display: grid; width: 26px; min-height: 26px; margin: 0; padding: 0; }
  .side.open .nav .nav-fav-head { display: flex; }
  .side.open .nav .nav-item > a { padding-right: 32px; }
  /* abgedunkelter Grund rechts neben der aufgeklappten Leiste (sie selbst bleibt hell) */
  .side.open::before { content: ''; position: fixed; inset: 0 0 0 calc(var(--side-w) + 4px); background: var(--overlay); z-index: -1; }
  .main { padding: 0 24px 56px; }
  .topbar { padding: 11px 24px; }
  .page-head { margin: 0 -24px 22px; padding: 22px 24px 18px; }
  .top-test { display: inline-flex; }
  /* Listen: Status darf umbrechen, Betreff weicht (bis 0.77.2 lief die Rechnungsliste bei 1.100 Pixel seitlich aus dem Fenster) */
  table.list td.status { white-space: normal; }
  table.list.docs .subj, table.list.docs td.status .badge { display: none; }
  table.list td .sub.ident { white-space: normal; }
  .role-bar { margin: 0 -24px; padding: 9px 24px; }
}

/* ---------- Handy: Kopfleiste kompakt, Leiste unten (Übersicht, Rechnungen, „+“, Geld, Mehr), Streifen oben; „Mehr“ öffnet die
   Navigation als Blatt ---------- */
@media (max-width: 640px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-left: 0; padding-top: 3px; padding-bottom: 64px; }
  .shell::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 3px; background: var(--grad-rail-x); }
  .admin-shell::before { background: linear-gradient(90deg, #16141B 0%, #4A4653 100%); }
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 25; padding: 0; border-right: 0; border-top: 1px solid var(--line); overflow: visible; gap: 0; }
  .side .brand, .side .foot, .side > .test-badge { display: none; }
  .side > .nav { display: none; }
  .side.open > .nav { display: flex; position: fixed; left: 0; right: 0; bottom: 57px; max-height: calc(100vh - 110px); overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--sh-float); padding: 8px 12px 14px; }
  .side.open > .nav .nav-end { margin-top: 6px; }
  .side.open::before { content: ''; position: fixed; inset: 0 0 57px; background: var(--overlay); z-index: -1; }
  .tabbar { display: flex; width: 100%; background: var(--surface); }
  .tabbar .tab { flex: 1 1 0; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 56px; padding: 6px 1px; font: inherit; font-size: 10.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: center; min-width: 0; }
  .tabbar .tab > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .tab .ico { width: 22px; height: 22px; }
  @media (max-width: 360px) { .tabbar .tab { font-size: 9.6px; letter-spacing: -.02em; } }
  .tabbar .tab:hover { text-decoration: none; background: var(--soft); }
  .tabbar .tab.active, .side.open .tab.more { color: var(--violet-deep); background: var(--tint); font-weight: 600; }
  .tabbar .tab.plus { align-content: start; padding-top: 0; }
  .tabbar .tab.plus:hover { background: none; }
  .tabbar .plus-in { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -16px; border-radius: 50%; border: 3px solid var(--surface); background: var(--grad-btn); color: var(--on-grad); box-shadow: var(--sh-v); }
  .tabbar .tab.plus .ico { width: 24px; height: 24px; }
  .topbar { min-height: 56px; padding: 8px 12px 8px 16px; gap: 10px; }
  .top-brand { display: inline-flex; font-size: 25px; }
  .top-brand .wm-ico { margin-right: 0; }
  .top-test { display: inline-flex; }
  .searchbar { flex: 1 1 auto; max-width: none; }
  .searchbar kbd, .topbar .top-new { display: none; }
  .main { padding: 0 16px 40px; }
  .page-head { margin: 0 -16px 18px; padding: 16px 16px 14px; gap: 10px 12px; }
  .page-head .actions, .page-head .page-actions { margin-left: 0; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  /* die Hauptaktion bleibt in der Kopfzeile unter dem Titel (bis 0.77.2 schwebte sie rechts unten und verdeckte Listenzeilen;
     „Neu“ gibt es ohnehin über das Plus der Leiste unten) */
  .page-head .actions .btn, .page-head .page-actions .btn { min-height: 42px; }
  .page-head .actions .btn.primary, .page-head .page-actions .btn.primary { order: -1; }
  /* Speicherleiste über der Leiste unten */
  .savebar { bottom: 57px; }
  h1 { font-size: 24px; }
  .eyebrow { margin-bottom: 4px; }
}
/* Chip „Testbetrieb“ in der Kopfleiste (Schmal und Handy – die Seitenleiste zeigt ihn dann nicht) */
.top-test { align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--due-bg); color: var(--due); font-family: var(--fm); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; flex: none; }
.top-test:hover { text-decoration: none; }

/* Erklärabsätze in Karten hinter „Mehr dazu“ (polish.js) */
.card > p.more-row { margin: -4px 0 10px; font-size: 13px; }
.card > p.more-text { font-size: 13.5px; }
.card > p.more-text[hidden] { display: none; }

/* ---------- Bausteine (Abschnitt 10) ---------- */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sh); margin-bottom: var(--gap-ui); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
/* Sprungziel „Zahlung erfassen“: Überschrift mit Luft über der Karte (oben läuft nur die Ladeanzeige) */
#pay-card { scroll-margin-top: 20px; }
.card h2 { font-size: 18px; }
.grid { display: grid; gap: var(--gap-ui); }
.grid > *, .card, .row > * { min-width: 0; }
.tabs, .seg { max-width: 100%; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
@media (max-width: 360px) { .grid.four { grid-template-columns: 1fr; } }
/* Kennzahl mit Einordnung: Label gedämpft, Zahl in Inter 600, darunter der Chip */
.stat { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh); }
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value { font-family: var(--fs); font-size: 26px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .value small { color: var(--num-dim); font-size: inherit; font-weight: inherit; }
.stat .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 600px) { .stat { padding: 12px 14px; } .stat .value { font-size: 22px; } .stat .hint { font-size: 12px; } .stat .hint .chip { white-space: normal; } }

/* Buttons: primär im Verlauf (genau einer je Ansicht), sekundär weiß mit Haarlinie, tertiär auf der Highlight-Fläche */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 17px; border-radius: var(--r-pill); font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; border: 1px solid transparent; background: var(--tint); color: var(--violet-deep); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
/* Knopf-Rangfolge (0.18.2): Hauptaktion im Verlauf, Zweitaktionen getönt („tint“), Nebenaktionen (ghost) weiß mit kräftiger Kontur */
.btn:hover { background: color-mix(in srgb, var(--violet) 24%, var(--surface)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad-btn); border-color: transparent; color: var(--on-grad); box-shadow: var(--sh-v); }
.btn.primary:hover { background: var(--grad-btn-hover); }
.btn.tertiary { background: var(--tint); border-color: transparent; color: var(--violet-deep); }
.btn.tertiary:hover { background: color-mix(in srgb, var(--violet) 24%, var(--surface)); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--soft); border-color: var(--violet); }
.btn.small { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.btn.link { background: none; border: 0; color: var(--violet); padding: 0; min-height: 0; font-weight: 500; box-shadow: none; }
.btn.link:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }
.btn.danger { background: var(--surface); color: var(--over); border-color: var(--line-strong); }
/* auf getönten bzw. grauen Flächen (Hinweis, einmalige Anzeige, Hinweiskasten, eingerückte Karte) bleiben Zweitaktionen weiß */
:is(.alert.info, .secret-once, .hint-box, .card.inset) .btn:not(.primary):not(.link):not(.ghost):not(.danger) { background: var(--surface); border-color: var(--line-strong); }
:is(.alert.info, .secret-once, .hint-box, .card.inset) .btn:not(.primary):not(.link):not(.ghost):not(.danger):hover { background: var(--soft); border-color: var(--violet); }
.btn.danger:hover { background: var(--over-bg); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
label.field > small { display: block; margin-top: 4px; }
/* Eingaben in Tabellenzellen (Module der Verwaltung, 0.66.1): label.field nur für die Markierung am Feld, ohne Abstand */
.modules-table label.field { margin-bottom: 0; }
/* Einladungscode mit „Code prüfen“ (0.61.3) – der Knopf steht neben dem Feld, der Hinweis darunter */
.code-row { display: flex; gap: 8px; align-items: flex-end; }
.code-row > label.field { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.code-row > .btn { flex: none; white-space: nowrap; }
small.code-hint { display: block; margin: 4px 0 14px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input[type=tel], input[type=date], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 40px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 22%, transparent); }
input[readonly], textarea[readonly] { background: var(--soft); }
/* gesperrte Felder (0.67.1, Rückmeldung zu Schritt 22: „Gültig bis“ bei Inhabern war gesperrt, sah aber änderbar aus) */
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted); -webkit-text-fill-color: var(--muted); cursor: not-allowed; }
/* Eigene Adresse der Buchungsseite (0.37.0) */
.slug-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slug-row .slug-prefix { font-family: var(--fm); font-size: 13px; color: var(--muted); white-space: nowrap; }
.slug-row input { flex: 1 1 200px; max-width: 320px; font-family: var(--fm); }
.small.err { color: var(--over); }
/* Hinweise in Listen (0.69.1, Rückmeldung vom 30.10.2026: „gerade nicht möglich“ bei einer Terminart stand schwarz) */
.sub.err, table.list td .err { color: var(--over); }
/* Buchungsseite: was zum Einschalten fehlt (0.69.1) */
.booking-needs { margin: 4px 0 12px 28px; padding: 10px 14px; border-radius: 10px; background: var(--soft); font-size: 13px; }
.booking-needs ul { margin: 6px 0 0; padding-left: 18px; }
.booking-needs li + li { margin-top: 4px; }
.booking-needs .btn.link { font-size: inherit; padding: 0; }
.booking-needs .off-types { list-style: none; padding-left: 0; margin-top: 8px; }
.booking-needs .off-types li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
/* Telefonfeld mit Länderauswahl (0.37.0); im <label class="field"> gilt sonst „label.field > span“ (Block, fett) – 0.40.1, Rückmeldung 18 */
.phone-wrap, label.field > span.phone-wrap { display: flex; gap: 6px; align-items: stretch; font-size: inherit; font-weight: inherit; margin-bottom: 0; }
.phone-wrap select.phone-cc { flex: 0 0 auto; width: auto; max-width: 8.5em; padding-left: 8px; padding-right: 26px; font-variant-numeric: tabular-nums; }
.phone-wrap input { flex: 1 1 auto; min-width: 0; }
input.code { font-family: var(--fm); font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; max-width: 260px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; } }

/* Hinweise: deckende helle Flächen, keine Rahmenstapel */
.alert { border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 14px; border: 0; border-left: 3px solid; font-size: 14px; color: var(--ink); background: var(--soft); }
.alert.error { background: var(--over-bg); border-color: var(--over); }
.alert.ok { background: var(--paid-bg); border-color: var(--paid); }
.alert.warn { background: var(--due-bg); border-color: var(--due); }
.alert.info { background: var(--tint); border-color: var(--violet); }

/* Chips: Punkt plus Wort (Abschnitt 09); Farbe nur für Geld und Zeit – und harte Fehler.
   .badge ist ein neutraler Hinweis ohne Punkt (Rolle, Quelle, „versendet“ …); .badge.err markiert einen Fehler. */
.badge, .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 1px 10px; border-radius: var(--r-pill); background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.chip::before, .badge.err::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.paid { background: var(--paid-bg); color: var(--paid); }
.badge.err, .chip.over { background: var(--over-bg); color: var(--over); }
.chip.due { background: var(--due-bg); color: var(--due); }
.chip.open { background: var(--tint); color: var(--violet-deep); }
.chip.draft { background: var(--soft); color: var(--ink-2); }

/* Beträge: ganze Euro in Tinte, Komma, Cent und Einheit zurückgenommen */
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount small { font-size: inherit; font-weight: inherit; color: var(--muted); }
.chip .amount small, .badge .amount small { color: inherit; }
.more-link { margin: 10px 0 0; font-size: 13.5px; }
.login-note { font-size: 12.5px; margin: 4px 0 0; }
/* Verweise, die nicht in sich umbrechen (Häkchen der Registrierung, 0.91.0) */
.nobreak { white-space: nowrap; }

/* Listen: Zeilen 44 px, Trennung durch Haarlinien, keine Zebrastreifen */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-family: var(--fm); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td.num { font-weight: 600; }
table.list tr.over > td:first-child { box-shadow: inset 3px 0 0 var(--over); }
/* Offene Posten: Zeile je Geschäftspartner mit Zwischensumme (0.20.0) */
table.list tr.group > td { padding-top: 16px; border-bottom-color: var(--hair); }
/* Auswertungen: aufgeklappte Konten einer Zeile */
table.list tr.sub-row > td { font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
table.list tr.sub-row > td:first-child { padding-left: 22px; }
table.list tr[aria-expanded] > td:first-child::before { content: '›'; display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
table.list tr[aria-expanded="true"] > td:first-child::before { transform: rotate(90deg); }
table.list td.status { white-space: nowrap; }
table.list td.status .chip, table.list td.status .badge { margin: 0 4px 3px 0; }
.table-wrap { overflow-x: auto; }
/* Belegnummern und Kennungen in Plex Mono (stellenweise vergleichbar) */
.docno { font-family: var(--fm); font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; letter-spacing: .01em; }
.stat .value .docno { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
td.ident, .sub.ident { font-family: var(--fm); font-size: 11.5px; letter-spacing: .01em; white-space: nowrap; }
td.ident { font-size: 12px; color: var(--ink-2); padding-top: 13px; }
/* Rechnungszeile: Kunde (Inter 500) mit Nummer und Datum, Betreff, Frist, Status, Betrag */
table.list.docs td.party .name { font-weight: 500; }
table.list.docs td.num .amount { font-size: 14.5px; }
@media (max-width: 1000px) { table.list.docs .subj { display: none; } }
/* Telefon: die Zeile wird zweizeilig – Name und Betrag oben, Nummer und Status darunter */
@media (max-width: 700px) {
  table.list.docs thead { display: none; }
  table.list.docs, table.list.docs tbody { display: block; }
  table.list.docs tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; grid-template-areas: 'party num menu' 'party status menu'; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hair); min-height: var(--row-h); }
  table.list.docs tr:last-child { border-bottom: 0; }
  table.list.docs td { border: 0; padding: 0; }
  table.list.docs td.party { grid-area: party; padding-left: 8px; }
  table.list.docs td.num { grid-area: num; }
  table.list.docs td.num .sub { display: none; }
  table.list.docs td.status { grid-area: status; text-align: right; }
  table.list.docs td.status .badge { display: none; }
  table.list.docs td.row-menu-cell { grid-area: menu; align-self: center; }
  table.list.docs td.date, table.list.docs td.subj { display: none; }
  table.list.docs tr.over { box-shadow: inset 3px 0 0 var(--over); }
  table.list.docs tr.over > td:first-child { box-shadow: none; }
}
/* Kontakte (0.78.0): Name mit Nummer darunter, wie die Rechnungsliste */
table.list.contacts td.party .name { font-weight: 500; }
/* Handy (0.78.0): Tabellen ohne eigene Handy-Form werden Listenzeilen – `app.js` setzt `stack` und je Zelle die Spaltenbeschriftung
   als `data-label`; die erste Spalte steht fett als Zeile, Beträge rechts oben, die übrigen Zellen als „Beschriftung · Wert“ */
@media (max-width: 640px) {
  table.list.stack, table.list.stack tbody, table.list.stack tfoot { display: block; width: 100%; min-width: 0; }
  table.list.stack thead { display: none; }
  table.list.stack tfoot { border-top: 2px solid var(--line); }
  table.list.stack tfoot td.lead { font-weight: 600; }
  table.list.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.stack tr:last-child { border-bottom: 0; }
  table.list.stack td { display: block; grid-column: 1 / -1; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  table.list.stack td.lead { font-weight: 500; }
  table.list.stack td.num { text-align: left; }
  table.list.stack td.stack-amount { grid-column: 2; grid-row: 1; align-self: start; text-align: right; white-space: nowrap; }
  table.list.stack td[data-label]:not(.lead)::before { content: attr(data-label); display: inline; margin-right: 8px; font-family: var(--fm); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.list.stack td.stack-amount[data-label]::before { display: none; }
  table.list.stack td:empty, table.list.stack td.blank { display: none; }
  table.list.stack td.row-menu-cell { grid-column: 2; grid-row: 1; justify-self: end; }
  /* Liste mit „kopieren“ je Zeile (0.176.0, Prüfrunde H-1): der Posten links neben dem Knopf, nicht darunter */
  table.list.stack[data-copy-list] td.lead { grid-column: 1; grid-row: 1; align-self: center; }
  table.list.stack[data-copy-list] td.stack-amount { align-self: center; }
  table.list.stack td .sub { display: inline; margin-left: 6px; }
  table.list.contacts td.party .sub { display: block; margin-left: 0; }
}
/* Berührflächen (0.78.0): Zeilenmenüs und Chips mit Klick mindestens 44 Pixel auf Touch-Geräten */
@media (pointer: coarse) {
  details.row-menu > summary { width: 44px; height: 44px; }
  button.chip, a.chip, .btn.small { min-height: 44px; }
  .btn.link { padding: 8px 0; }
}

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.checklist .mark.ok { background: var(--paid-bg); color: var(--paid); }
.checklist .mark.err { background: var(--over-bg); color: var(--over); }
.checklist .mark.warn { background: var(--due-bg); color: var(--due); }
.checklist .mark.run { background: var(--soft); color: var(--muted); }
.checklist .detail { color: var(--muted); font-size: 13px; }

/* ---------- Anmeldung: hell, Lockup oben, eine Hauptaktion ---------- */
.auth-wrap { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px 20px; background: var(--bg); position: relative; }
.auth-wrap::before { content: ''; position: fixed; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-rail); }
.auth-panel { width: 100%; display: grid; place-items: center; }
.auth-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 30px 30px 26px; box-shadow: var(--sh); }
.auth-box .wm { margin-bottom: 6px; }
.auth-claim { margin: 0 0 22px; font-size: 13.5px; color: var(--muted); letter-spacing: -.01em; }
.auth-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.auth-foot a:hover { color: var(--violet-deep); }
.auth-box h2 { font-size: 24px; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
pre.cmd { background: var(--soft); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; word-break: break-all; margin: 12px 0; }
/* schmale Bildschirme: oben ausrichten statt mittig – mit Tastatur oder ein- und ausgeblendeter Adressleiste ändert sich die Höhe, und der Inhalt soll dabei nicht springen (0.36.1) */
@media (max-width: 520px) { .auth-box { padding: 22px 18px; border-radius: var(--r); } .auth-wrap { place-items: start center; align-content: start; padding-top: 28px; } .auth-wrap::before { width: auto; right: 0; bottom: auto; height: 3px; background: var(--grad-rail-x); } }
.qr-box { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.qr-box svg { width: 190px; height: 190px; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
/* Handy einrichten (0.176.0, Plan 4.90): Wert mit „Kopieren“, Schritte mit schematischer Abbildung (am Handy darunter), kleiner QR-Code */
.copy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.copy-line code { font-size: 14px; background: var(--soft); border-radius: 8px; padding: 6px 10px; word-break: break-all; }
.handy-step { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 22px; align-items: start; padding: 14px 0; border-top: 1px solid var(--hair); }
.handy-step:first-of-type { border-top: 0; }
.handy-step h3 { margin: 6px 0 6px; font-size: 15px; }
.qr-box.qr-small svg { width: 132px; height: 132px; }
.phone-sketch { width: 120px; height: 200px; }
.phone-sketch .frame { fill: var(--surface); stroke: var(--ink-2); stroke-width: 2; }
.phone-sketch .screen { fill: var(--soft); }
.phone-sketch .paper, .phone-sketch .sheet { fill: var(--surface); stroke: var(--line); }
.phone-sketch .ink { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.phone-sketch .ink-fill { fill: var(--muted); }
.phone-sketch .tile { fill: var(--surface); stroke: var(--line); }
.phone-sketch .accent { fill: var(--violet); }
.phone-sketch .accent-line, .phone-sketch .accent-ring { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linecap: round; }
.phone-sketch .shutter { fill: var(--surface); stroke: var(--violet); stroke-width: 4; }
.phone-sketch .plus { stroke: var(--on-grad); stroke-width: 2.5; stroke-linecap: round; }
.phone-sketch .lbl { font: 600 9px var(--fs, sans-serif); fill: var(--ink-2); }
.phone-sketch .lbl.muted { fill: var(--muted); font-weight: 400; }
@media (max-width: 640px) { .handy-step { grid-template-columns: 1fr; } .handy-step .phone-sketch { justify-self: center; } }
.secret { font-family: var(--fm); font-size: 14px; letter-spacing: .08em; background: var(--soft); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.codes code { font-size: 15px; background: var(--soft); border-radius: 8px; padding: 8px 10px; text-align: center; letter-spacing: .06em; }

/* ---------- Belegkern ---------- */
.preview { width: 100%; height: 860px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); }
/* Belegdesign (0.81.0): Akzentfarben als Farbfelder, Vorschau neben den Einstellungen */
.design-grid { align-items: start; }
.field-group { display: block; margin-bottom: 14px; }
.field-group > .field-title { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field-group > small { display: block; margin-top: 4px; }
.swatch-custom .hex.invalid { border-color: var(--over); }
.design-grid .preview { height: 640px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--sw, var(--ink)); cursor: pointer; padding: 0; font: 600 12px/1 var(--fs); color: #fff; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.swatch-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.swatch-custom .hex { width: 96px; font-family: var(--fm); text-transform: uppercase; }
@media (max-width: 900px) { .design-grid .preview { height: 480px; } }
.preview-wait { display: flex; align-items: center; justify-content: center; }
pre.xml { max-height: 640px; overflow: auto; background: var(--soft); color: var(--ink); border: 1px solid var(--hair); padding: 16px; border-radius: var(--r-sm); font-size: 12px; line-height: 1.6; }
.msg-list { margin: 0; padding-left: 18px; }
.msg-list li { margin-bottom: 4px; }
/* Bezeichnungen höchstens 45 % breit, sonst umbrechen – mit max-content blieb neben langen Bezeichnungen für den Wert 0 px (Prüfrunde F-P) */
.kv { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.kv.stacked { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kv.stacked dt { margin-top: 8px; } .kv.stacked dt:first-child { margin-top: 0; } .kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* Meldungen: schweben über dem Inhalt (Bewegung nur als Quittung) */
/* Meldungen fangen keine Klicks ab (darunter liegende Knöpfe bleiben bedienbar); als Popover auch über Dialogen */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 50; pointer-events: none; }
#toasts[popover] { inset: auto 20px 20px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; width: auto; height: auto; color: inherit; }
/* Meldung mit Handlungen über einem Dialog (0.87.0): im Dialog selbst, sonst wäre sie nicht bedienbar */
.toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 60; pointer-events: none; }
.toast-host[popover] { inset: auto 20px 20px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; width: auto; height: auto; color: inherit; }
.toast { pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--violet); padding: 11px 15px; border-radius: var(--r-sm); box-shadow: var(--sh-float); max-width: 380px; font-size: 14px; animation: in .2s ease-out; }
.toast.error { border-left-color: var(--over); }
.toast.ok { border-left-color: var(--paid); }
.toast.actionable { pointer-events: auto; }
.toast .toast-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.toast .toast-close { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; }
.toast .toast-close:hover { color: var(--ink); }
.toast .toast-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 640px) { #toasts, #toasts[popover], .toast-host, .toast-host[popover] { left: 12px; right: 12px; top: 12px; bottom: auto !important; } .toast { max-width: none; } }
.hidden { display: none !important; }

/* ---------- Stammdaten (Etappe 2) ---------- */
textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
label.field.invalid input, label.field.invalid select, label.field.invalid textarea { border-color: var(--over); box-shadow: 0 0 0 3px color-mix(in srgb, var(--over) 14%, transparent); }
.field-error { display: block; color: var(--over); font-size: 12.5px; margin-top: 4px; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; cursor: pointer; font-size: 14.5px; }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--violet); flex: none; }
label.check small { display: block; color: var(--muted); font-size: 12.5px; }
/* Fehler an Kästchen (0.30.1): eigene Zeile unter dem Text, in der Farbe für Fehler; das Kästchen bekommt einen roten Rand */
label.check:has(> small.field-error) { flex-wrap: wrap; }
label.check:has(> small.field-error) > span { flex: 1 1 0; min-width: 0; }
label.check small.field-error { flex-basis: 100%; margin: 2px 0 0 28px; color: var(--over); }
label.check.invalid input { outline: 2px solid var(--over); outline-offset: 1px; }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.addr { grid-template-columns: 130px minmax(0, 1fr) 220px; }
.row.person { grid-template-columns: 170px 150px minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .row.person { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .row.three, .row.addr, .row.person { grid-template-columns: 1fr; } }
.sal-preview { font-size: 13px; margin: -4px 0 12px; }
.sal-preview code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 460px; }
.toolbar .spacer { flex: 1; }
/* Reiter und Segmente: eine Zeile; passt sie nicht, lässt sie sich waagerecht wischen */
.tabs, .seg { display: inline-flex; background: var(--soft); border-radius: 99px; padding: 3px; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
.tabs button, .seg button { flex: none; white-space: nowrap; border: 0; background: none; font: inherit; font-size: 13.5px; padding: 6px 14px; border-radius: 99px; cursor: pointer; color: var(--ink-2); }
.tabs button.active, .seg button.active { background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-weight: 600; color: var(--ink); }
.tabs .count { font-size: 11.5px; color: var(--muted); margin-left: 4px; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--soft); }
table.list tr.click:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
table.list td .sub { display: block; font-size: 12.5px; color: var(--muted); }
table.list .badge { margin: 0 4px 2px 0; }
/* Leere Zustände (Abschnitt 08): gestrichelte Fläche, ein Satz Tatsache, ein Satz Ton, eine Aktion */
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 30px 20px; text-align: center; color: var(--muted); display: grid; gap: 4px; justify-items: center; }
.empty .fact { font-weight: 600; color: var(--ink); margin: 0; }
.empty .tone { color: var(--muted); margin: 0; max-width: 60ch; }
.empty .actions { margin-top: 12px; justify-content: center; }
td > .empty, .card > .empty:only-child { margin: 0; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 12px 0; margin-top: 4px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.savebar .state { margin-right: auto; font-size: 13.5px; color: var(--muted); }
.savebar .state.dirty { color: var(--due); font-weight: 600; }
/* Smartphone: Speicherleiste über der Leiste unten (die Regel oben im Block für schmale Bildschirme wurde hiervon überschrieben) */
@media (max-width: 640px) { .savebar { bottom: 57px; } }
.preview-line { font-size: 13px; color: var(--ink-2); white-space: pre-line; background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: -6px 0 16px; }
.preview-line::before { content: 'Vorschau: '; color: var(--muted); font-weight: 600; }
/* Bezeichnungen höchstens halb so breit wie die Zeile, sonst bleibt dem Wert am Handy kaum Platz (Durchsicht 0.173.0, wie .kv) */
.placeholders { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); gap: 4px 14px; font-size: 13px; margin: 0 0 16px; }
.placeholders dt { min-width: 0; overflow-wrap: anywhere; }
.placeholders dt code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.placeholders dd { margin: 0; color: var(--muted); }
.check-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.check-list li { padding: 5px 0 5px 24px; position: relative; }
.check-list li::before { position: absolute; left: 0; top: 5px; font-weight: 700; }
.check-list li.err::before { content: '✕'; color: var(--over); }
.check-list li.warn::before { content: '!'; color: var(--due); left: 5px; }
.check-list li.ok::before { content: '✓'; color: var(--paid); }
dialog.modal { border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 0; width: min(960px, calc(100% - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--sh-float); color: var(--ink); background: var(--surface); }
dialog.modal::backdrop { background: var(--overlay); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--hair); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 20px 24px; overflow: auto; max-height: calc(100vh - 210px); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--hair); background: var(--bg); }
.modal-foot > .grow { flex: 1; }
/* 0.51.0: Kopf, Inhalt, Fuß als Spalte – bricht der Fuß auf schmalen Bildschirmen um (lange Beschriftung), schrumpft der Inhalt
   statt den Fuß aus dem Dialog zu schieben */
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal > .modal-head, dialog.modal > .modal-foot { flex: none; }
dialog.modal > .modal-body { flex: 0 1 auto; min-height: 0; }
.modal-foot > .actions { margin: 0; }
.mapping { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.mapping span { font-size: 12.5px; border-radius: 99px; padding: 2px 10px; background: var(--paid-bg); color: var(--paid); }
.mapping span.ignored { background: var(--soft); color: var(--muted); text-decoration: line-through; }
table.list.compact td, table.list.compact th { padding: 5px 8px; font-size: 13px; }
table.list tr.bad td { background: var(--over-bg); }
input[type=file] { font: inherit; font-size: 14px; }
/* Auswahl mit Erklärung (z. B. Rechnung korrigieren): je Weg Titel, wann er passt, was er bewirkt */
.choices > p { margin: 0 0 12px; }
.choice { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 10px; }
.choice p { margin: 4px 0 0; font-size: 14px; }
.choice .btn { flex: none; }
.choice.off { background: var(--soft); }
/* Anfrageformular (0.70.0): Zusatzfragen im Dialog, je Frage ein Block */
.inq-question { border-top: 1px solid var(--hair); padding-top: 10px; margin-top: 4px; }
.inq-question label.check { margin-top: 0; }
/* Assistent „Rechnung berichtigen“ (0.70.0): Antworten als Auswahl, darunter der Weg mit Schritten */
.fix-result:not(:empty) { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); }
.fix-result h3 { margin: 0 0 6px; font-size: 15px; }
.fix-result p { margin: 0 0 8px; font-size: 14px; }
.fix-steps { margin: 0 0 10px; padding-left: 20px; font-size: 14px; }
.fix-steps li { margin: 3px 0; }
.fix-note { font-size: 13px; }
.fix-result .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 640px) { .choice { flex-direction: column; align-items: stretch; } }
.auth-box .choice { flex-direction: column; align-items: stretch; gap: 10px; }
.auth-box .choice .btn { align-self: flex-start; }
.hint-box { font-size: 13.5px; color: var(--ink-2); background: var(--soft); border-radius: var(--r-sm); padding: 10px 14px; margin: 0 0 14px; }

/* ---------- Belege (Etappe 3) ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.editor-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.editor-side .card { margin-bottom: 0; }
@media (max-width: 1150px) { .editor-grid { grid-template-columns: minmax(0, 1fr); } .editor-side { position: static; } }
/* Editor in zwei Ebenen (0.79.0): Karte „Kunde“ mit Art, Betreff, Leistungsdatum bzw. Vorlage; Karte „Positionen“ mit den Texten dahinter;
   Optionen als Chips; Seitenspalte mit Summe, Prüfung, Festschreiben und den Formaten als Zeile */
.h2-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.h2-row h2 { margin: 0; }
.h2-row label.inline { font-size: 13.5px; color: var(--ink-2); }
.party-row { align-items: start; }
.party-side label.field:last-child { margin-bottom: 0; }
.party-side div.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.fixed-value { padding: 8px 0; font-size: 15px; }
.svc-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.svc-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.svc-label { font-size: 13px; font-weight: 600; }
.svc-fields label.field { margin-bottom: 0; }
.svc-note { font-size: 13px; margin: 8px 0 0; }
.tpl-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tpl-row small.muted { display: block; margin-top: 6px; }
.lines-card .lines { margin-top: 2px; }
details.texts { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
details.texts > summary { cursor: pointer; list-style: none; font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
details.texts > summary::-webkit-details-marker { display: none; }
details.texts > summary::before { content: '▸'; display: inline-block; width: 14px; color: var(--violet-deep); transition: transform .15s; }
details.texts[open] > summary::before { transform: rotate(90deg); }
details.texts > summary strong { color: var(--ink); }
details.texts .texts-preview { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
details.texts .texts-body { margin-top: 14px; }
details.texts .texts-body label.field:last-child { margin-bottom: 0; }
.editor-options { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 var(--gap-ui); }
.opt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px 4px 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.opt-chip .plus { font-weight: 700; color: var(--violet); font-size: 16px; line-height: 1; }
.opt-chip:hover, .opt-chip:focus-visible { border-color: var(--violet); color: var(--violet-deep); background: var(--tint); outline: none; }
.opt > .card { position: relative; }
.opt-hide { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.opt-hide:hover, .opt-hide:focus-visible { background: var(--soft); color: var(--ink); outline: none; }
.side-card .sum-rows { gap: 4px 16px; }
.side-card .sum-rows dt.sum-main { font-size: 13.5px; font-variant-caps: all-small-caps; letter-spacing: .05em; font-weight: 600; color: var(--ink-2); align-self: center; }
.side-card .sum-rows dd.sum-main { text-align: right; white-space: nowrap; overflow-wrap: normal; line-height: 1.15; margin-bottom: 6px; }
.side-card .sum-rows dd.sum-main strong { font-size: 26px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.side-card .sum-rows dt:not(.sum-main), .side-card .sum-rows dd:not(.sum-main) { font-size: 13px; }
.side-card .sum-rows dd:not(.sum-main) { text-align: right; }
.side-checks { margin-top: 14px; }
.side-checks .alert { margin-bottom: 0; }
.side-checks .alert + .alert { margin-top: 8px; }
.check-neutral { font-size: 13.5px; margin: 0; padding: 10px 12px; background: var(--soft); border-radius: var(--r-sm); }
.side-actions { margin-top: 14px; }
.side-actions .btn { flex: 1 1 auto; justify-content: center; }
.side-actions-2 { margin-top: 10px; gap: 6px 14px; }
.side-actions-2 .btn.ghost { border: 0; background: none; color: var(--violet); padding: 0; min-height: 0; font-weight: 500; box-shadow: none; }
.side-actions-2 .btn.ghost:hover { text-decoration: underline; }
.format-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.format-line { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: baseline; }
.format-label { font-weight: 600; }
.format-box .format-line small.muted { display: inline; margin: 0; font-size: 13px; }
.format-box .format-sels { margin-top: 8px; }
.side-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.editor-bar { display: none; }
@media (max-width: 640px) {
  .editor-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 57px; z-index: 24; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
  .editor-bar .bar-text { display: grid; line-height: 1.2; font-size: 12px; }
  .editor-bar .bar-sum { font-size: 18px; font-variant-numeric: tabular-nums; }
  .editor-grid { padding-bottom: 72px; }
  .side-actions > .btn.primary { display: none; } /* die Leiste unten ist die Hauptaktion */
  .party-row > div { min-width: 0; }
  .side-card .sum-rows { grid-template-columns: fit-content(55%) minmax(0, 1fr); gap: 4px 16px; }
  .side-card .sum-rows dt { min-width: 0; overflow-wrap: break-word; }
  .side-card .sum-rows dt { margin-top: 0; }
}
.picker .picked { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14.5px; line-height: 1.45; }
.picker .picked .actions { flex-direction: column; align-items: flex-end; gap: 6px; }
.suggest-wrap { position: relative; flex: 1; max-width: 520px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-float); max-height: 320px; overflow: auto; }
.suggest.static { position: static; box-shadow: none; margin-top: 6px; max-height: 260px; }
.suggest[hidden] { display: none; }
.suggest-label { padding: 6px 12px 2px; font-family: var(--fm); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 14px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover, .suggest button:focus { background: var(--soft); outline: none; }
/* Position: Zeile 1 = Bezeichnung und Werkzeuge, Zeile 2 = Menge, Einheit, Preis, Rabatt, USt., Gesamt */
.lines .line { display: grid; grid-template-columns: 26px 88px minmax(0, 1.3fr) minmax(0, 1.1fr) 96px minmax(0, 1.3fr) minmax(96px, 1fr); gap: 6px 8px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lines .line > .line-pos { grid-column: 1; grid-row: 1 / span 2; }
.lines .line > .line-main { grid-column: 2 / 7; grid-row: 1; }
.lines .line > .line-tools { grid-column: 7; grid-row: 1; }
.lines .line > .line-f { display: block; margin: 0; }
.lines .line > .line-f > span { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.lines .line input, .lines .line select { padding: 7px 8px; font-size: 14px; }
.lines .line input.num { text-align: right; font-variant-numeric: tabular-nums; }
.lines .line-pos { padding-top: 9px; font-weight: 700; color: var(--muted); font-size: 13px; }
.lines .line-main { padding-top: 0; }
.lines .line-name { font-weight: 600; }
.lines .line-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; margin-top: 3px; }
/* Arbeitskosten nach § 35a je Position (0.75.0) */
.lines .line-labor { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); cursor: pointer; white-space: nowrap; }
.lines .line .line-labor input { padding: 0; margin: 0; width: auto; }
.lines .line-desc { margin-top: 6px; font-size: 13.5px; min-height: 52px; }
.lines .line-total { padding: 8px 0 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lines .line-tools { display: flex; gap: 3px; padding-top: 4px; justify-content: flex-end; }
.lines .line-add { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.lines.locked .line-tools, .lines.locked .line-add { display: none; }
.lines.locked select:disabled, .lines.locked .disc-unit:disabled { background: var(--soft); color: var(--ink); opacity: 1; cursor: default; }
button.icon { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 24px; height: 28px; font-size: 13px; cursor: pointer; color: var(--ink-2); padding: 0; }
button.icon:hover { background: var(--soft); }
button.icon.danger { color: var(--over); }
.btn.link.small { font-size: 12.5px; }
@media (max-width: 800px) { .lines .line { grid-template-columns: 1fr 1fr; } .lines .line > .line-pos { display: none; } .lines .line > .line-main { grid-column: 1 / -1; } .lines .line > .line-tools { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; } }
.stat.alert-stat .value { color: var(--over); }
.legal-preview { font-size: 12.5px; background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; color: var(--ink-2); margin: 0; }
.tpl { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
details summary { cursor: pointer; font-size: 13.5px; color: var(--muted); margin: 8px 0; }
.stat-link { text-decoration: none; color: inherit; display: block; } .stat-link:hover .stat { border-color: var(--violet); }
/* Textbausteine: Auswahl rechts neben der Feldbeschriftung */
.with-picker { position: relative; }
.with-picker > select.block-pick { position: absolute; right: 0; top: -6px; width: auto; max-width: 60%; padding: 4px 28px 4px 8px; font-size: 12.5px; z-index: 1; }
.block-list .block { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 4px; margin-bottom: 12px; }
.block-list .block .row { align-items: end; }
.sig-preview { white-space: pre-wrap; font-size: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 0 0 12px; }
.runs li { font-size: 13.5px; }
.cron-url { display: flex; gap: 8px; align-items: center; }
.cron-url input { flex: 1; font-family: var(--fm); font-size: 12.5px; }
/* Weitere Angaben (zugeklappt) */
details.card.more { padding: 16px 26px; }
details.card.more > summary { cursor: pointer; list-style: none; font-size: 15px; }
details.card.more > summary::-webkit-details-marker { display: none; }
details.card.more > summary::before { content: '▸'; display: inline-block; width: 16px; color: var(--violet-deep); transition: transform .15s; }
details.card.more[open] > summary::before { transform: rotate(90deg); }
details.card.more .more-body { margin-top: 16px; }

/* ---------- Eingangsrechnungen, Übergabe (Etappe 5) ---------- */
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: var(--soft); padding: 26px 20px; text-align: center; cursor: pointer; display: grid; gap: 4px; justify-items: center; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: var(--violet); background: var(--tint); outline: none; }
.dropzone strong { font-size: 16px; } .dropzone span { color: var(--ink-2); } .dropzone small { color: var(--muted); font-size: 12.5px; }
.dropzone.compact { padding: 14px 16px; gap: 2px; } .dropzone.compact strong { font-size: 14.5px; }
.dropzone .dz-state { font-style: normal; font-size: 13px; color: var(--ink-2); } .dropzone .dz-state:empty { display: none; }
.dropzone.busy { cursor: progress; opacity: .75; }
.upload-results { margin-top: 14px; }
.inbox-bar { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
/* Belegfoto (0.32.0): Knopf unter dem Feld zum Hochladen, Hinweisdialog mit Vorschau */
.photo-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
/* Chips „Was ist das?“ über dem Feld (0.36.1) */
.hint-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.chip-btn { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.chip-btn:hover { border-color: var(--line-strong); }
.chip-btn.active { background: var(--tint); border-color: var(--violet); color: var(--ink); font-weight: 600; }
.dropzone .dz-cam { margin: 4px 0; }
.photo-bar .muted { flex: 1 1 260px; }
.photo-check { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; align-items: start; }
.photo-preview { width: 100%; height: auto; border: 1px solid var(--hair); border-radius: var(--r-sm, 6px); background: var(--soft); }
@media (max-width: 600px) { .photo-check { grid-template-columns: minmax(0, 1fr); } .photo-preview { max-height: 240px; object-fit: contain; } }
.inbox-bar:empty { display: none; }
.inbox-addr { font-weight: 600; color: var(--ink); }
.inbox-addr::before { content: '✉'; margin-right: 6px; color: var(--violet); }
.err-text { color: var(--over); }
.mail-origin { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.rec-low input, .rec-low textarea, .rec-low select { border-color: var(--due); background: var(--due-bg); }
.rec-low input[type=checkbox] { outline: 2px solid var(--due); outline-offset: 1px; }
.plain-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
/* Auftragsverarbeitung (0.78.0): die zugestimmte Fassung mit ihrer PDF, frühere zugeklappt, die neue Fassung als Hinweis */
.avv-docs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.avv-docs li > div:first-child { color: var(--ink); }
.avv-earlier { margin-top: 10px; }
.avv-earlier > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.avv-earlier .plain-list { margin-top: 8px; }
.avv-pending { margin-top: 12px; }
.hosp-grid { display: grid; gap: 12px; margin-top: 12px; }
.card.quiet { background: transparent; box-shadow: none; border: 1px dashed var(--line); }
.card.quiet h2 { font-size: 18px; }
.card.rec-low { border-left: 3px solid var(--due); }
.check-list li.info::before { content: 'i'; color: var(--ink-2); left: 5px; font-style: italic; }
.check-list li.run { padding-left: 0; }
/* Abgabe-Check vor der Übermittlung an ELSTER (0.183.0) */
.filing-check { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.filing-check h4 { margin: 12px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.filing-check .fc-hint { font-size: 13px; margin: 6px 0 0; }
.filing-check li.fc-open label.check { margin: 0; font-size: 14px; }
.filing-check li.fc-open.is-invalid { background: var(--over-bg); border-radius: var(--r-sm); }
/* Zweitmeinung der KI und Freigabe durch die Kanzlei (0.184.0) */
.elster-opinion { margin: 12px 0 0; }
.elster-approval { margin: 12px 0 0; }
.elster-approval .actions { margin-top: 6px; }
.approval-view .badge { margin-left: 4px; }
[data-approvals] { margin: 12px 0; }
[data-approvals] h3 { font-size: 14px; margin: 0 0 6px; }
[data-approvals] li { margin: 4px 0; }
/* Bescheid prüfen (0.185.0) */
[data-assessments] { margin: 12px 0; }
[data-assessments] h3 { font-size: 14px; margin: 0 0 6px; }
[data-assessments] li { margin: 4px 0; }
.assessment-prepay { margin: 12px 0 0; }
.assessment-prepay .row input { min-width: 0; }
.assessment-ki { margin: 8px 0 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.assessment-prepay-result { margin: 12px 0 0; }
.assessment-prepay-result h3 { font-size: 14px; margin: 0 0 6px; }
.ok-line { color: var(--paid); font-weight: 600; margin: 0; }
.incoming-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.incoming-side { position: sticky; top: 16px; }
.incoming-side .viewer { margin-bottom: 0; max-height: calc(100vh - 110px); overflow: auto; }
@media (max-width: 1250px) { .incoming-grid { grid-template-columns: minmax(0, 1fr); } .incoming-side { position: static; } .incoming-side .viewer { max-height: none; } }
.viewer .preview { height: calc(100vh - 230px); min-height: 520px; }
.viewer img.scan { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); }
.split-table { display: grid; gap: 6px; margin-bottom: 10px; }
.split-head, .split-row { display: grid; gap: 6px; align-items: start; }
.split-row.booking { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) 64px minmax(0, 1fr); grid-template-areas: 'acc tax key gross' 'cc text text rm'; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.split-row.booking .c-acc { grid-area: acc; } .split-row.booking .c-tax { grid-area: tax; } .split-row.booking .c-key { grid-area: key; } .split-row.booking .c-gross { grid-area: gross; }
.split-row.booking .c-cc { grid-area: cc; } .split-row.booking .c-text { grid-area: text; } .split-row.booking .c-rm { grid-area: rm; align-self: end; justify-self: end; margin-bottom: 6px; }
.split-row .sf { display: block; margin: 0; min-width: 0; }
.split-row .sf > span { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.split-head.tax, .split-row.tax { grid-template-columns: minmax(150px, 1.4fr) minmax(100px, 1fr) minmax(100px, 1fr) 70px; }
.split-head span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.split-row input, .split-row select { padding: 7px 8px; font-size: 14px; width: 100%; }
.split-row input.num { text-align: right; font-variant-numeric: tabular-nums; }
.split-row .acc-name { display: block; font-size: 11.5px; margin-top: 2px; line-height: 1.3; }
/* Buchungserfassung im Journal: Konto | Soll | Haben | Steuerfall | Text | entfernen */
.split-head.ledger, .split-row.ledger { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1.2fr) 64px; gap: 6px 8px; }
.split-row.ledger { padding: 6px 0; border-bottom: 1px solid var(--line); }
.split-row.ledger .sf > span { display: none; }
.split-row.ledger .c-rm { align-self: center; justify-self: end; }
.split-row.ledger .invalid { border-color: var(--over); background: var(--over-bg); }
@media (max-width: 800px) { .split-row.ledger { grid-template-columns: 1fr 1fr; } .split-row.ledger .sf > span { display: block; } .split-row.ledger .c-acc, .split-row.ledger .c-tax, .split-row.ledger .c-text { grid-column: 1 / -1; } }
@media (max-width: 800px) { .split-head { display: none; } .split-row.tax { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); } .split-row.booking { grid-template-columns: 1fr 1fr; grid-template-areas: 'acc tax' 'key gross' 'cc text' 'rm rm'; } }
.balance { font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-sm); }
.balance.ok { background: var(--paid-bg); color: var(--paid); }
.balance.err { background: var(--due-bg); color: var(--due); }
.einvoice h3 { margin: 20px 0 8px; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.einvoice h3:first-child { margin-top: 0; font-family: var(--fd); font-size: 19px; border: 0; }
.einvoice .grid.two { gap: 12px; font-size: 14px; }
.einvoice .kv.totals dd { text-align: right; }
.pre { white-space: pre-line; }
details.more > summary { cursor: pointer; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
details.more[open] > summary { margin-bottom: 12px; }
.export-sum td.num { white-space: nowrap; }
.acc-table .split-row { grid-template-columns: 110px minmax(0, 1fr) 70px; }

/* ---------- Formate, Zustellung, Links, Stripe (Etappe 6) ---------- */
.format-box .format-sels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.format-box .format-sels select { width: 100%; }
.format-box small.muted { display: block; margin-top: 4px; font-size: 12.5px; }
.format-kind { padding: 14px 0; border-top: 1px solid var(--line); }
.format-kind:first-of-type { border-top: 0; padding-top: 4px; }
.format-kind-head h3 { margin: 0 0 2px; font-size: 15.5px; }
.format-kind-head p { margin: 0 0 10px; font-size: 13px; }
.format-kind .row { margin-bottom: 0; }
.format-attach { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: 14px; }
.format-attach .check { margin: 0; }
.format-kind .field-error { display: block; margin-top: 6px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-list li { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.link-list input { width: 100%; font-size: 12.5px; padding: 6px 8px; }
.link-list .actions { gap: 6px; }
ol.steps { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 8px; }
ol.steps .toolbar input { flex: 1; min-width: 220px; font-size: 13px; }
/* Als App installieren (0.113.0): Schritte im Dialog */
.webapp-steps { margin: 0 0 12px; padding-left: 20px; font-size: 14px; display: grid; gap: 8px; }
/* Geteilte Dateien ablegen (0.113.0): Liste und Knöpfe im Hinweis über dem Ablagefeld */
.share-note .share-files { margin: 8px 0; padding-left: 18px; }
.share-note .share-files li { overflow-wrap: anywhere; }
.share-note p { margin: 6px 0 0; }
.share-note .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Benachrichtigungen (0.114.0): Ereignisse untereinander, Geräte mit Knopf in der Zeile */
table.notify-matrix td:not(:first-child), table.notify-matrix th:not(:first-child) { text-align: center; width: 150px; } /* 0.118.0: Ereignis × Weg */
.notify-devices { margin: 8px 0 12px; }
.notify-devices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.online-check small { display: block; }
td.row-actions { white-space: nowrap; text-align: right; }
td.row-actions .btn { margin-left: 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
label.inline input { padding: 6px 8px; }
.modal-body h3 { font-size: 15.5px; margin: 6px 0 10px; }
.delivery-mode { display: grid; gap: 6px; justify-items: start; margin: 4px 0 16px; }
.delivery-mode > span { font-size: 13px; font-weight: 600; }
.delivery-mode p { margin: 0; }
.link-list input.mono { font-family: var(--fm); }
/* Rabatt: Umschalter Prozent / Betrag */
.line-f.disc .disc-box { display: flex; align-items: stretch; }
.line-f.disc .disc-box input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.disc-unit { border: 1px solid var(--line); border-left: 0; background: var(--soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 0 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.disc-unit:hover { background: var(--tint); }
/* Aktionen je Zeile (Kopieren, Umwandeln) */
td.row-menu-cell { width: 44px; text-align: right; padding-left: 0; }
details.row-menu { position: relative; display: inline-block; }
details.row-menu > summary { list-style: none; cursor: pointer; width: 32px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; line-height: 1; color: var(--ink-2); }
details.row-menu > summary::-webkit-details-marker { display: none; }
details.row-menu > summary:hover, details.row-menu[open] > summary { background: var(--soft); }
.row-menu-list { position: fixed; z-index: 40; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-float); padding: 6px; display: grid; }
.row-menu-list a, .row-menu-list button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.row-menu-list a:hover, .row-menu-list button:hover { background: var(--soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Angebotsvorlagen und freie Abschnitte */
.tpl-grid { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 1000px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tpl-list button { width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--r-sm); padding: 8px 10px; font: inherit; cursor: pointer; display: grid; gap: 2px; }
.tpl-list button:hover { background: var(--soft); }
.tpl-list li.active button { background: var(--tint); border-color: transparent; color: var(--violet-deep); }
.tpl-list .muted { font-size: 12.5px; }
.sections-editor { display: grid; gap: 10px; margin-bottom: 10px; }
.section-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--soft); display: grid; gap: 8px; }
.section-head { display: flex; gap: 6px; align-items: center; }
.section-head input { flex: 1; }
.section-item textarea { width: 100%; }
.tpl-pick { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.tpl-pick select { min-width: 240px; }
.card.inset { box-shadow: none; background: var(--soft); margin: 12px 0 0; padding: 16px 18px; }
.card.inset h3 { margin-top: 0; }

/* Stripe: Live- und Testmodus */
.stripe-status { border-radius: var(--r-sm); padding: 12px 16px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.stripe-status.live { background: var(--paid-bg); color: var(--paid); border: 1px solid color-mix(in srgb, var(--paid) 30%, transparent); }
.stripe-status.test { background: var(--due-bg); color: var(--due); border: 1px solid color-mix(in srgb, var(--due) 30%, transparent); }
.stripe-status strong { letter-spacing: .02em; }
.stripe-modes { margin-bottom: 14px; gap: 16px; }
.stripe-mode { margin: 0; }
.stripe-mode .stripe-mode-head { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.stripe-mode.active-mode { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.stripe-mode.active-mode .stripe-mode-head::after { content: 'aktiv für Rechnungen'; font: 500 10.5px var(--fm); letter-spacing: .09em; text-transform: uppercase; color: var(--violet-deep); background: var(--tint); padding: 2px 8px; border-radius: 99px; }
@media (max-width: 900px) { .stripe-modes { grid-template-columns: 1fr; } }

/* Schnittstelle (Etappe 8) */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.copy-row input { flex: 1; min-width: 0; font-family: var(--fm); font-size: 13px; }
.secret-once { border: 1.5px solid var(--violet); background: var(--tint); border-radius: var(--r); padding: 14px 16px; margin: 10px 0 16px; }
.secret-once .muted { margin: 6px 0 0; font-size: 13px; }
.scope-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 4px 0 12px; }
.event-head { display: flex; gap: 10px; align-items: baseline; margin: 6px 0 4px; }
.event-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin-bottom: 12px; }
.event-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; }
.event-group legend { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.event-group .check { margin: 4px 0; }
td.actions-cell { text-align: right; white-space: nowrap; }
td.actions-cell .btn + .btn { margin-left: 6px; }
pre.json { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; overflow: auto; max-height: 60vh; white-space: pre; }
.page-actions { display: flex; gap: 8px; }
@media (max-width: 900px) { .scope-list, .event-groups { grid-template-columns: 1fr; } }

/* Go-live (Etappe 9): Datensicherung, Inbetriebnahme, Verfahrensdokumentation, Wiederherstellung */
.test-badge { display: inline-block; align-self: flex-start; margin: -4px 10px 10px; font-family: var(--fm); font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--due); background: var(--due-bg); border: 1px solid color-mix(in srgb, var(--due) 30%, transparent); border-radius: 99px; padding: 2px 10px; text-decoration: none; }
.test-badge:hover { border-color: var(--due); }
.checklist .mark.info { background: var(--soft); color: var(--muted); font-style: italic; font-family: var(--fd); }
.golive-checks li { align-items: center; }
.golive-finish { border-color: color-mix(in srgb, var(--over) 30%, transparent); }
.golive-finish h3 { margin-top: 6px; }
table.backups .badge { margin: 0 4px 2px 0; }
.procedure { align-items: start; }
td.actions-cell.versions-actions { white-space: normal; }
td.actions-cell.versions-actions .btn { margin: 2px 0 2px 6px; }
.procedure textarea { min-height: 84px; resize: vertical; }
iframe.doc-preview { width: 100%; height: 68vh; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress > span { display: block; height: 100%; width: 0; background: var(--violet); transition: width .3s ease; }
/* Zähler (0.56.0): Verbrauch je Kontingent – Balken unter dem Wert, ab der ersten Stufe in Zeitfarbe (80 %, Speicher 75 %), ab 100 % (Speicher 95 %) in Überfällig-Farbe */
.quota-meter { height: 6px; max-width: 260px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 5px 0 2px; }
.quota-meter > span { display: block; height: 100%; width: 0; background: var(--violet); border-radius: 99px; }
.quota-meter[data-level="75"] > span, .quota-meter[data-level="80"] > span { background: var(--due); }
/* Speicher ab 95 % rot (0.145.0, Entscheidung vom 22.11.2026), andere Kontingente bei 100 %; mit „Speicher automatisch erweitern“ neutral */
.quota-meter[data-level="95"] > span, .quota-meter[data-level="100"] > span { background: var(--over); }
.quota-meter[data-auto] > span { background: var(--violet); }
.role-bar .role-meter { display: block; margin-top: 4px; }
.role-bar .role-meter .quota-meter { max-width: 240px; margin: 2px 0 0; }
.usage-table td.num, .usage-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Paketwechsel (0.60.0): Pakete als Auswahl mit Preis, Stichtag und Unterschieden */
.options { display: grid; gap: 2px; margin: 0 0 6px; }
.options label.check.option { margin: 0; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; }
.options label.check.option:has(input:checked) { border-color: var(--violet); background: var(--soft); }
.options label.check.option:has(input:disabled) { opacity: .6; cursor: default; }
/* aktuelles Paket über der Auswahl im Dialog „Paket wechseln“ (0.63.1) */
.current-package { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--violet); background: var(--soft); border-radius: 0 8px 8px 0; font-size: 14px; }
.restore-files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.restore-files label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.restore-files input:checked + span { font-weight: 600; }
.restore-summary { margin: 10px 0 14px; }
.suggest button.active { background: var(--tint); }
.suggest-more { padding: 8px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

/* 0.9.2: weitere Anmeldewege, Geräte, Passkeys */
/* Anmeldeseite: Passwort vergessen, Registrieren; Lockfeld der Registrierung (für Menschen unsichtbar) */
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 14px 0 0; font-size: 13.5px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.auth-alt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-alt > .muted:first-child { font-size: 13px; }
.auth-alt small { font-size: 12px; }
.device-list td .badge { margin-left: 6px; }
.security-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.security-row .field { min-width: 180px; }
.auth-alt .btn.link { text-align: left; }

/* Symbol im Browser (Favicon) */
.logo-preview { min-height: 72px; display: flex; align-items: center; padding: 14px 18px; background: var(--sheet); border: 1px dashed var(--line); border-radius: var(--r-sm); margin-top: 6px; }
.logo-preview img { max-width: 320px; max-height: 90px; width: auto; height: auto; display: block; }
.icon-preview { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.icon-preview .icon-big { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--sheet); object-fit: contain; }
.icon-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--soft); font-size: 13px; min-width: 200px; }
.icon-tab img { width: 16px; height: 16px; }

/* Ladeanzeige: Drehkreis im Inhalt, dünner Balken oben bei längeren Anfragen */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 64px 16px; color: var(--muted); font-size: 15px; }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--tint); border-top-color: var(--violet); animation: af-spin .8s linear infinite; flex: none; }
.btn .spinner { width: 15px; height: 15px; border-width: 2px; border-color: color-mix(in srgb, currentColor 28%, transparent); border-top-color: currentColor; }
#activity { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; overflow: hidden; background: var(--tint); }
#activity::before { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--violet); animation: af-bar 1.1s ease-in-out infinite; }
#activity[hidden] { display: none; }
@keyframes af-spin { to { transform: rotate(360deg); } }
@keyframes af-bar { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .spinner, #activity::before { animation-duration: 3s; } }

/* Abo über Stripe (Serie) */
.autopay-box { margin: 12px 0; }
.copy-line code { display: block; word-break: break-all; font-size: 12.5px; background: var(--soft); padding: 6px 8px; border-radius: 6px; margin: 4px 0 8px; }
/* 0.9.5: Formatierungsleiste über E-Mail-Vorlagen */
.fmt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.fmt-bar .spacer { flex: 1; }
.fmt-bar .btn.small { min-width: 34px; }
.fmt-bar select.small { width: auto; padding: 5px 8px; font-size: 13px; }

/* ---------- schmale Bildschirme: Bezeichnung über dem Wert ---------- */
@media (max-width: 520px) {
  .kv, .placeholders { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt, .placeholders dt { margin-top: 8px; font-size: 13px; }
  .placeholders dd { overflow-wrap: anywhere; }
}
@media (max-width: 600px) { .stat .value .docno { font-size: 14px; letter-spacing: 0; } }

/* Bankabgleich (0.19.0) */
.bank-account { margin-bottom: 16px; }
.bank-list { display: grid; gap: 10px; }
.bank-tx { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--sh); }
.bank-tx.done { box-shadow: none; background: var(--soft); }
.bank-tx-top { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.bank-tx-main { min-width: 0; flex: 1; }
.bank-tx-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.bank-tx-purpose { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bank-tx-meta { font-size: 12.5px; margin-top: 2px; }
.bank-tx-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; font-size: 16px; }
.bank-tx-amount.out { color: var(--ink-2); }
.bank-tx-body { margin-top: 10px; }
.bank-prop { border-top: 1px solid var(--hair); padding-top: 10px; margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.bank-prop.first { border-top: 0; padding-top: 0; margin-top: 0; }
.bank-prop-text { font-size: 14px; overflow-wrap: anywhere; }
.bank-prop-meta { grid-column: 1; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.bank-prop .actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.bank-hint { flex-basis: 100%; }
/* „Beleg fehlt“ (0.89.0): offene Auszahlung ohne Vorschlag */
.bank-receipt { border-top: 1px solid var(--hair); padding-top: 10px; margin-top: 10px; font-size: 13.5px; }
.bank-actions { margin-top: 10px; }
.bank-result { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.amount-input { max-width: 120px; }
@media (max-width: 640px) {
  .bank-tx { padding: 12px 14px; }
  .bank-prop { grid-template-columns: minmax(0, 1fr); }
  .bank-prop .actions { grid-column: 1; grid-row: auto; }
}

/* Abstimmung (0.19.1): offene Punkte der Buchhaltung */
.reconcile { list-style: none; margin: 0; padding: 0; }
.reconcile li { padding: 6px 0 6px 12px; border-left: 3px solid var(--line-strong); margin: 0 0 8px; }
.reconcile li.warn { border-left-color: var(--due); }
.reconcile li .more { margin-top: 4px; }

/* Umsatzsteuer-Voranmeldung (0.22.0): Kennzahlen auf schmalen Bildschirmen zweizeilig – Kz und Bezeichnung, darunter
   Bemessungsgrundlage und Steuer mit Beschriftung (statt seitlich zu scrollen) */
@media (max-width: 600px) {
  table.list.vat { min-width: 0; }
  table.list.vat thead { display: none; }
  table.list.vat tr { display: grid; grid-template-columns: 3.4em 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.vat td { border-bottom: 0; }
  table.list.vat td:nth-child(2) { grid-column: 2 / 4; }
  table.list.vat td:nth-child(3) { grid-column: 2; }
  table.list.vat td:nth-child(4) { grid-column: 3; }
  table.list.vat td:empty { display: none; }
  table.list.vat tr.group > td { grid-column: 1 / 4; }
  table.list.vat td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.vat-recon { min-width: 0; }
  table.list.vat-recon thead { display: none; }
  table.list.vat-recon tr { display: grid; grid-template-columns: 3.4em 1fr 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.vat-recon td { border-bottom: 0; }
  table.list.vat-recon td:nth-child(2) { grid-column: 2 / 5; }
  table.list.vat-recon td:nth-child(3) { grid-column: 2; }
  table.list.vat-recon td:nth-child(4) { grid-column: 3; }
  table.list.vat-recon td:nth-child(5) { grid-column: 4; }
  table.list.vat-recon td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.vat-year { min-width: 0; }
  table.list.vat-year thead { display: none; }
  table.list.vat-year tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--hair); }
  table.list.vat-year td { border-bottom: 0; }
  table.list.vat-year td:nth-child(1) { grid-area: 1 / 1; }
  table.list.vat-year td:nth-child(2) { grid-area: 2 / 1; padding-top: 0; }
  table.list.vat-year td:nth-child(3) { grid-area: 1 / 2; }
  table.list.vat-year td:nth-child(4) { grid-area: 2 / 2; padding-top: 0; text-align: right; }
  table.list.vat-year td[data-label]::before { content: attr(data-label) ' '; color: var(--muted); }
  /* 0.24.0: Vergleich der Erklärung mit den Voranmeldungen, Zeilen der Zusammenfassenden Meldung */
  table.list.vat-compare { min-width: 0; }
  table.list.vat-compare thead { display: none; }
  table.list.vat-compare tr { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.vat-compare td { border-bottom: 0; white-space: nowrap; }
  table.list.vat-compare td:nth-child(1) { grid-column: 1 / 4; padding-bottom: 0; }
  table.list.vat-compare td:empty { display: none; }
  table.list.vat-compare td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.zm-rows { min-width: 0; }
  table.list.zm-rows thead { display: none; }
  table.list.zm-rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--hair); }
  table.list.zm-rows td { border-bottom: 0; }
  table.list.zm-rows td:nth-child(1) { grid-area: 1 / 1; }
  table.list.zm-rows td:nth-child(4) { grid-area: 1 / 2; }
  table.list.zm-rows td:nth-child(2) { grid-area: 2 / 1; padding-top: 0; }
  table.list.zm-rows td:nth-child(3) { grid-area: 2 / 2; padding-top: 0; text-align: right; }
  table.list.zm-rows tr.sum td:nth-child(2) { grid-area: 1 / 1; padding-top: 8px; }
  table.list.zm-rows td:empty { display: none; }
}

/* Anlage EÜR (0.23.0): Zeilen auf schmalen Bildschirmen zweizeilig – Zeile und Bezeichnung, darunter Kz und Beträge;
   Anlage AVEÜR mit Beschriftung je Wert; Zahlungen der 10-Tage-Regel mit Auswahl darunter */
table.list.euer td:nth-child(1) { white-space: nowrap; color: var(--muted); font-size: 13px; }
table.list.euer tr.sum > td { border-top: 1px solid var(--line-strong); }
@media (max-width: 600px) {
  table.list.euer, table.list.aveuer, table.list.euer-days { min-width: 0; }
  table.list.euer thead, table.list.aveuer thead, table.list.euer-days thead { display: none; }
  table.list.euer tr { display: grid; grid-template-columns: 3.6em 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.euer td { border-bottom: 0; }
  table.list.euer td:nth-child(1) { grid-area: 1 / 1; }
  table.list.euer td:nth-child(2) { grid-area: 2 / 1; padding-top: 0; }
  table.list.euer td:nth-child(3) { grid-area: 1 / 2 / 2 / 4; }
  table.list.euer td:nth-child(4) { grid-area: 2 / 2; padding-top: 0; }
  table.list.euer td:nth-child(5) { grid-area: 2 / 3; padding-top: 0; }
  table.list.euer td:empty { display: none; }
  table.list.euer tr.group > td { grid-area: 1 / 1 / 2 / 4; white-space: normal; }
  table.list.euer tr.sum { border-top: 1px solid var(--line-strong); }
  table.list.euer tr.sum > td { border-top: 0; }
  table.list.euer td[data-label]::before, table.list.aveuer td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.aveuer tr { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.aveuer td { border-bottom: 0; }
  table.list.aveuer td:nth-child(1) { grid-column: 1 / 4; }
  table.list.euer-days tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--hair); }
  table.list.euer-days td { border-bottom: 0; }
  table.list.euer-days td:nth-child(1) { grid-area: 1 / 1; }
  table.list.euer-days td:nth-child(3) { grid-area: 1 / 2; }
  table.list.euer-days td:nth-child(2) { grid-area: 2 / 1 / 3 / 3; padding-top: 0; }
  table.list.euer-days td:nth-child(4) { grid-area: 3 / 1 / 4 / 3; padding-top: 0; }
  /* Investitionsabzugsbetrag (0.30.0): drei Spalten, Bezeichnung breit, Aktionen in eigener Zeile */
  table.list.iab { min-width: 0; }
  table.list.iab thead { display: none; }
  table.list.iab tr { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--hair); }
  table.list.iab td { border-bottom: 0; text-align: left; }
  table.list.iab td:nth-child(2) { grid-column: 2 / 4; }
  table.list.iab td.row-actions { grid-column: 1 / 4; padding-top: 0; }
  table.list.iab td.row-actions:empty { display: none; }
  table.list.iab td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
}

/* ---------- Rollen und Datenzugriff (0.28.0) ---------- */
/* Hinweis oben: Zugang der Steuerberatung, Prüfer, Support-Ansicht, gekündigtes Konto, AVV */
.role-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 -36px; padding: 9px 36px; background: var(--tint); border-bottom: 1px solid var(--hair); font-size: 13.5px; color: var(--ink); }
.role-bar.warn { background: var(--due-bg); }
/* Speicher ab 95 % und voll (0.145.0, Entscheidung vom 22.11.2026): rot */
.role-bar.warn[data-quota="storageMb"] { background: var(--over-bg); }
.role-bar b { font-weight: 600; }
.role-bar .actions { margin-left: auto; display: flex; gap: 8px; }
/* Mitteilungen der Verwaltung (0.70.0): Absätze bleiben, lange Adressen brechen um */
.role-bar .notice-text { flex: 1 1 320px; min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }
/* Verwaltung → Mitteilungen: Text der Karte, Auswahl der Konten, Vorschau der Leiste (ohne die Ränder der App) */
.notice-body { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 12px; }
.notice-tenants { max-height: 220px; overflow: auto; border: 1px solid var(--hair); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.notice-tenants label.check { margin: 4px 0; }
.field-group { margin-bottom: 14px; }
.field-group > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field-group > label.field { margin-bottom: 0; }
.field-group.invalid > .pkg-groups, .field-group.invalid > .notice-tenants { outline: 2px solid color-mix(in srgb, var(--over) 40%, transparent); outline-offset: 2px; border-radius: 6px; }
.notice-preview-box:not(:empty) { margin-top: 16px; border-top: 1px solid var(--hair); padding-top: 12px; }
.notice-preview-frame { border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; margin: 8px 0 12px; }
.notice-preview-frame .role-bar { margin: 0; padding: 9px 14px; border-bottom: 0; }
.mail-preview .mail-body { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: var(--tint); padding: 10px 12px; border-radius: 8px; margin: 6px 0 0; overflow-wrap: anywhere; }
/* Verwaltung → Pakete (0.54.0): Funktionsgruppen zum Anhaken */
.pkg-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 700px) { .pkg-groups { grid-template-columns: 1fr; } }
/* je Funktionsgruppe inklusive / zubuchbar / nicht verfügbar (0.112.0, Plan 7.12) */
.pkg-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 700px) { .pkg-modes { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .role-bar { margin: 0 -16px; padding: 8px 16px; } }
/* nur lesen: Knöpfe zum Ändern ausblenden; lesende Knöpfe tragen „ro-ok“, ganze Bereiche (Mein Konto) „ro-free“;
   im eingeschränkten Konto (0.53.0, body.pay-ok) bleiben Zahlungen und Bankabgleich bedienbar („ro-pay“) */
.ro .view .btn:not(.ro-ok, .ro-free .btn, .pay-ok .ro-pay .btn, .pay-ok .btn.ro-pay) { display: none; }
.ro .view .ro-hide { display: none; }
/* Belege nicht im Paket (0.54.0): nur nichts Neues anlegen – Hauptaktion oben ausblenden, Zahlung, Storno und Korrektur bleiben */
.pkg-off .view .page-head .actions .btn { display: none; }
/* Speicher voll (0.67.1): Links und Knöpfe, die neue Belege oder Dateien anlegen, grau und ohne Wirkung – Storno, Rechnungskorrektur
   und korrigierte Rechnung bleiben (art=storno|teilstorno|korrektur); die Seiten prüfen es selbst noch einmal (Hinweis statt Editor) */
.storage-full a[href^="#/rechnungen?neu"]:not([href*="art=storno"]):not([href*="art=teilstorno"]):not([href*="art=korrektur"]),
.storage-full a[href^="#/angebote?neu"],
.storage-full a[href^="#/kostenbelege?neu"]:not([href*="art=storno"]),
[data-neu][data-disabled] { opacity: .45; cursor: not-allowed; }
.storage-full a[href^="#/rechnungen?neu"]:not([href*="art=storno"]):not([href*="art=teilstorno"]):not([href*="art=korrektur"]),
.storage-full a[href^="#/angebote?neu"],
.storage-full a[href^="#/kostenbelege?neu"]:not([href*="art=storno"]) { pointer-events: none; }
/* Dialoge ebenso (0.30.1), außer sie kommen aus einem freien Bereich (ui/readonly.js) */
.ro dialog.modal:not(.ro-free) .btn:not(.ro-ok), .ro dialog.modal:not(.ro-free) .ro-hide { display: none; }
/* gesperrte Felder (ui/readonly.js): gut lesbar, aber erkennbar nicht änderbar */
.ro [data-ro-locked] { background: var(--soft); color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; cursor: default; }
.nav .count { font-family: var(--fm); font-size: 10.5px; font-weight: 600; color: var(--violet-deep); background: var(--tint); border-radius: 99px; padding: 1px 8px; }
/* Bereich als Beta eingeschaltet (0.100.0): neutrales Abzeichen hinter der Beschriftung */
.nav .beta { font-size: 10.5px; padding: 0 6px; margin-left: 6px; line-height: 16px; }
/* Beta-Zeichen (0.154.0, ui/betamark.js): Marketing und Handwerk-Paket – nur ein Hinweis neben Überschrift, Reiter oder Knopf */
h1 .badge.beta, h2 .badge.beta, h3 .badge.beta, legend .badge.beta { margin-left: 8px; font-size: 11px; vertical-align: middle; }
.btn .badge.beta, .page-tabs .badge.beta, .nav-head .badge.beta { margin-left: 6px; font-size: 10.5px; padding: 0 6px; line-height: 16px; }
.side .foot .role { color: var(--violet-deep); }
/* Rückfragen: Verlauf */
.thread { display: grid; gap: 10px; margin: 10px 0 12px; }
.thread .post { border-left: 3px solid var(--hair); padding: 6px 12px; background: var(--soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.thread .post.owner { border-left-color: var(--violet); }
.thread .post .meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.thread .post .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.question { border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.question > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; list-style: none; }
.question > summary::-webkit-details-marker { display: none; }
.question .subject { font-weight: 600; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
/* offene Rückfragen fallen auf (0.30.1): wartet auf dich Bernstein, wartet auf die Gegenseite Violett */
.question.waiting { border-left: 3px solid var(--due); background: color-mix(in srgb, var(--due-bg) 45%, var(--surface)); }
.question.pending { border-left: 3px solid var(--violet); }

/* Zahlungsplan im Angebot (0.29.0) */
.plan-table input, .plan-table select { width: 100%; min-width: 0; }
.plan-table td { vertical-align: top; }
.plan-table select + input { margin-top: 6px; }
.plan-table td:first-child { min-width: 130px; }
@media (max-width: 700px) {
  .plan-table td:first-child { min-width: 110px; }
}
.plan-table tr.has-extra td { border-bottom: 0; }
.plan-table tr.plan-extra td { padding-top: 0; }
.plan-table tr.plan-extra .actions { margin-top: 4px; flex-wrap: wrap; }
.plan-table tr.plan-extra small { display: block; }
/* schmal: je Zahlung ein Block statt Tabellenzeile (Editor und Ansicht) */
@media (max-width: 700px) {
  .plan-table.plan-edit thead { display: none; }
  .plan-table.plan-edit tr { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .plan-table.plan-edit td { padding: 0; border: 0; min-width: 0 !important; }
  .plan-table.plan-edit td:nth-child(1) { grid-row: 1; grid-column: 1; }
  .plan-table.plan-edit td:nth-child(2) { grid-row: 1; grid-column: 2; }
  .plan-table.plan-edit td:nth-child(6) { grid-row: 1; grid-column: 3; }
  .plan-table.plan-edit td:nth-child(3) { grid-row: 2; grid-column: 1 / 3; }
  .plan-table.plan-edit td:nth-child(5) { grid-row: 2; grid-column: 3; align-self: center; }
  .plan-table.plan-edit td:nth-child(4) { grid-row: 3; grid-column: 1 / 4; }
}
@media (max-width: 600px) {
  .plan-table.plan-view thead { display: none; }
  .plan-table.plan-view tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .plan-table.plan-view tr.has-extra { border-bottom: 0; padding-bottom: 2px; }
  .plan-table.plan-view tr.plan-extra { display: block; padding-top: 0; }
  .plan-table.plan-view td { padding: 0; border: 0; min-width: 0 !important; }
  .plan-table.plan-view td:nth-child(4), .plan-table.plan-view td:nth-child(5) { grid-column: 1 / 4; }
  .plan-table.plan-view td:nth-child(4) { color: var(--muted); font-size: 13px; }
}

/* Pipeline (0.33.0): Board mit einer Spalte je Phase, Karten, „Heute wichtig“, Phasen bearbeiten */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: var(--gap-ui); align-items: start; }
.board-col { background: var(--soft); border: 1px solid transparent; border-radius: var(--r); padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.board-col.drop { border-color: var(--violet); background: var(--tint); }
.board-col header { padding: 2px 4px 4px; }
.board-col .col-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.board-col h3 { margin: 0; font-size: 14px; font-weight: 600; }
.board-col .col-count { font-family: var(--fm); font-size: 11.5px; color: var(--muted); }
/* „+“ je Phase (0.69.1): Karte in dieser Phase anlegen */
.board-col .col-tools { display: inline-flex; align-items: center; gap: 6px; }
.board-col .col-add { width: 24px; height: 24px; padding: 0; border: 1px solid var(--hair); border-radius: 7px; background: var(--surface); color: var(--ink-2); font: 600 16px/1 var(--fs); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.board-col .col-add:hover { color: var(--violet-deep); border-color: var(--violet); background: var(--tint); }
.board-col .col-add:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.board-col .col-sum { font-size: 13px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.col-cards { display: flex; flex-direction: column; gap: 8px; min-height: 8px; }
.col-empty, .col-more { font-size: 12.5px; color: var(--muted); margin: 2px 4px; }
.deal { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 10px 12px; box-shadow: var(--sh); cursor: pointer; display: grid; gap: 4px; min-width: 0; }
.deal:hover { border-color: var(--line-strong); }
.deal.over { box-shadow: inset 3px 0 0 var(--over), var(--sh); }
.deal.dragging { opacity: .45; }
.deal-title { font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.deal-contact { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.deal-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.deal-meta .muted { font-weight: 500; font-size: 12.5px; }
.deal-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.deal-chips:empty { display: none; }
.deal-chips .chip, .deal-chips .badge { white-space: normal; }
.deal-next { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.drop-mark { height: 3px; border-radius: 2px; background: var(--violet); }
.today-list { list-style: none; margin: 0 0 8px; padding: 0; }
.today-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.today-list li:last-child { border-bottom: 0; }
.today-list .today-chip { flex: none; min-width: 96px; padding-top: 1px; }
.today-list li > div { min-width: 0; overflow-wrap: anywhere; }
.today-list .detail { color: var(--muted); font-size: 13px; }
.today-list .btn.link { font-weight: 600; text-align: left; }
/* Schritte aus „Heute wichtig“ (0.42.0): rechts neben dem Text, auf schmalen Bildschirmen darunter */
.today-list li > div:not(.today-actions) { flex: 1 1 auto; }
.today-list .today-actions { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* Aufgaben und Aktivitäten an der Karte (0.43.0) */
.task-list { list-style: none; margin: 0 0 8px; padding: 0; }
.task-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.task-list li:last-child { border-bottom: 0; }
.task-list input[type=checkbox] { flex: none; margin-top: 3px; width: 18px; height: 18px; }
.task-list .task-dot { flex: none; width: 18px; text-align: center; color: var(--muted); }
.task-main { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.task-kind { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 3px; }
.task-meta .chip, .task-meta .badge { white-space: normal; }
.task-tools { display: inline-flex; flex-wrap: wrap; gap: 8px; }
/* Seite Aufgaben (0.102.0): Gruppen nach Fälligkeit, Verweise auf Karte und Kontakt, erledigte gedämpft */
.task-group { margin-bottom: 22px; }
.task-group h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 4px; }
.task-group h2 .count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.task-group[data-group=overdue] h2 .count { background: var(--tint); color: var(--violet-deep); }
.task-counts { font-size: 13px; }
.task-refs { font-size: 13px; color: var(--muted); }
.task-list li.done .task-main > div:first-child { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--hair); }
.today-links { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
/* „Heute wichtig“ (0.116.0, Plan 4.68): Aufgaben und Hinweise getrennt, „Warum?“, Regeln */
.today-group { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; }
.today-list .today-why { margin-top: 4px; padding: 6px 8px; border-left: 2px solid var(--hair); }
.today-list .btn.link.small { font-weight: 400; }
.today-rules { margin: 6px 0 0; }
.rule-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.rule-list .inline-days { display: flex; align-items: center; gap: 6px; margin: 0; }
.rule-list .inline-days input { width: 5.5em; }
/* WhatsApp am Kontakt (0.116.0, Plan 4.67) */
.wa-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; align-items: flex-start; }
.wa-list li > div:first-child { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.task-dialog .field-block { margin-bottom: 14px; }
.task-dialog .field-block > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.task-dialog .field-block.invalid input[type=search] { border-color: var(--over); }
/* die rechte Spalte des Karten-Dialogs ist schmal: Text über die ganze Breite, darunter Art, Fälligkeit und Knopf */
.task-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 6px; }
.task-add .field { margin-bottom: 0; }
.task-add .field:nth-child(2) { grid-column: 1 / -1; order: -1; }
.task-add-go { padding-bottom: 2px; }
@media (max-width: 640px) {
  .task-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-add-go { grid-column: 1 / -1; }
}
.deal-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.deal-history-head h3 { margin: 0; }
.deal-history .activity-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Bericht Gewonnen/Verloren (0.43.0) */
.report-tiles { margin-top: 4px; }
.report-period { align-items: flex-end; }
.report-period .field { margin-bottom: 0; }
.report-period .field > span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .report-deals, .report-deals tbody { display: block; width: 100%; min-width: 0; }
  .report-deals thead { display: none; }
  .report-deals tr { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.compact.report-deals td { padding: 0; border: 0; min-width: 0; text-align: left; }
  .report-deals td[data-label="Karte"] { flex: 1 0 100%; order: -1; }
  .report-deals td[data-label="Tage"]::after { content: " Tage"; color: var(--muted); }
}
.deal-dialog .field-block { margin-bottom: 14px; }
.deal-dialog .field-block > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.deal-dialog h3 { margin-top: 14px; }
.deal-dialog.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.deal-dialog .deal-side > div > :first-child h3, .deal-dialog .deal-side > div > h3:first-child { margin-top: 0; }
@media (max-width: 900px) { .deal-dialog.two { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.deal-docs { list-style: none; margin: 0; padding: 0; }
.deal-docs li { padding: 8px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 3px; }
.deal-docs li:last-child { border-bottom: 0; }
.deal-doc-main { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.deal-doc-main > a { font-family: var(--fm); font-size: 13px; white-space: nowrap; }
.deal-doc-main > a.draft-label { font-family: inherit; font-size: 13.5px; white-space: normal; }
.deal-doc-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.deal-doc-sub .amount { color: var(--ink-2); }
/* Pipeline einrichten (0.82.0): links die Phasen (Griff zum Ziehen), rechts die gewählte Phase; schmal erst die Liste, dann die Phase */
.setup { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.setup-nav { position: sticky; top: 12px; min-width: 0; }
.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.setup-item { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); }
.setup-item.active { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
.setup-item.invalid { border-color: var(--over); box-shadow: 0 0 0 1px var(--over); }
.setup-item.closed { background: var(--soft); }
/* Griff zum Ziehen (0.142.0, ui/sortable.js): überall, wo Pfeile die Reihenfolge ändern – Maus, Finger, Pfeiltasten */
.drag-handle { flex: none; align-self: center; width: 28px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 17px; line-height: 1; padding: 0;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag-handle:hover:not([disabled]) { color: var(--ink); background: var(--soft); }
.drag-handle:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.drag-handle[disabled] { cursor: default; opacity: .5; }
.is-dragging, .is-dragging .drag-handle { cursor: grabbing; }
.is-drag-row { opacity: .5; }
.drop-before, .drop-after { position: relative; }
:is(.line, .section-item, .fb-field, .field-item, .fav-order > li).drop-before::before,
:is(.line, .section-item, .fb-field, .field-item, .fav-order > li).drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--accent-strong); pointer-events: none; }
:is(.line, .section-item, .fb-field, .field-item, .fav-order > li).drop-before::before { top: -3px; }
:is(.line, .section-item, .fb-field, .field-item, .fav-order > li).drop-after::after { bottom: -3px; }
.fav-order .fav-name { flex: 1; min-width: 0; }
.field-item.has-grip .field-main { flex: 1; }
@media (pointer: coarse) { .drag-handle { width: 40px; height: 40px; } }
.setup-item.dragging { opacity: .5; }
.setup-item.drop-before::before, .setup-item.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--accent-strong); pointer-events: none; }
.setup-item.drop-before::before { top: -5px; }
.setup-item.drop-after::after { bottom: -5px; }
.setup-list .handle { flex: none; width: 34px; border: 0; background: none; cursor: grab; color: var(--muted); font-size: 18px; line-height: 1; padding: 0; touch-action: none; border-radius: var(--r) 0 0 var(--r); }
.setup-list .handle:hover:not([disabled]) { color: var(--ink); background: var(--soft); }
.setup-list .handle[disabled] { cursor: default; opacity: .5; }
.setup-list.is-dragging, .setup-list.is-dragging .handle { cursor: grabbing; }
.setup-list .handle-gap { flex: none; width: 12px; }
.setup-pick { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; text-align: left; border: 0; background: none; font: inherit; color: var(--ink); padding: 10px 12px 10px 4px; cursor: pointer; border-radius: 0 var(--r) var(--r) 0; }
.setup-name { font-weight: 600; overflow-wrap: anywhere; }
.setup-prob { font-family: var(--fm); font-size: 12.5px; color: var(--muted); }
.setup-hint { grid-column: 1 / -1; font-size: 12.5px; }
.setup-add { padding: 2px 0 6px 12px; }
.setup-general { margin-top: 10px; }
.setup-detail { min-width: 0; }
.setup-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.setup-head h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.setup-back { display: none; }
.setup-block h3 { margin: 0 0 10px; }
.setup-block .seg { margin-bottom: 6px; }
.setup [data-sub].invalid:not(label) { border-radius: var(--r); box-shadow: 0 0 0 2px color-mix(in srgb, var(--over) 45%, transparent); }
.req-list { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.req-list label.check small { display: block; color: var(--muted); font-size: 12.5px; }
.req-list .field-error { grid-column: 1 / -1; }
.req-strict { margin-top: 6px; }
.mail-list { display: grid; gap: 8px; margin: 12px 0; }
.mail-item { border: 1px solid var(--hair); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.mail-list .mail-item { margin-bottom: 0; }
.mail-item > summary { cursor: pointer; padding: 10px 14px; overflow-wrap: anywhere; }
.mail-item[open] > summary { border-bottom: 1px solid var(--hair); }
.mail-item.off > summary strong { color: var(--muted); }
.mail-body { padding: 12px 14px 14px; display: grid; gap: 12px; }
.mail-body textarea { width: 100%; }
/* Frist der Nachfass-E-Mail (0.86.0): Anzahl und Einheit nebeneinander */
.after-pair { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.after-pair input { width: 6.5em; flex: 0 0 auto; }
.after-pair select { flex: 1 1 8em; min-width: 0; }
.after-pair > .field-error { flex-basis: 100%; }
.after-pair.invalid input, .after-pair.invalid select { border-color: var(--over); box-shadow: 0 0 0 3px color-mix(in srgb, var(--over) 14%, transparent); }
.mail-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mail-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub-details > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.sub-details[open] > summary { margin-bottom: 8px; }
.setup .uwg { margin: 0 0 12px; }
.col-hints { font-size: 11.5px; margin-top: 3px; line-height: 1.35; }
.req-dialog { display: grid; gap: 14px; margin: 10px 0 4px; }
.req-item { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.req-item:last-child { border-bottom: 0; padding-bottom: 0; }
.mail-plan { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mail-plan-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-content: space-between; }
.mail-plan-item.done { color: var(--muted); }
.mail-plan-actions { display: inline-flex; gap: 6px; }
.next-mail { color: var(--ink-2); font-weight: 600; }
.board-tabs { display: none; margin-bottom: 10px; }
.board-tabs .col-count { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.deal-move { display: none; }
@media (max-width: 760px) {
  .setup { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .setup-nav { position: static; }
  .setup[data-pane="list"] .setup-detail { display: none; }
  .setup[data-pane="detail"] .setup-nav { display: none; }
  .setup-back { display: inline-flex; }
  .req-list { grid-template-columns: minmax(0, 1fr); }
  .setup-list .handle { width: 44px; }
}
/* schmale Bildschirme (0.36.1): Reiter je Phase, nur die gewählte Spalte, „Verschieben nach …“ auf der Karte statt Ziehen */
@media (max-width: 700px) {
  .board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .board-col { min-height: 0; display: none; }
  .board-col.active { display: flex; }
  .board-tabs { display: inline-flex; max-width: 100%; }
  .deal-move { display: block; width: 100%; margin-top: 4px; font-size: 13px; padding: 6px 8px; }
  .today-list .today-chip { min-width: 0; }
  .today-list li { flex-wrap: wrap; }
  .today-list .today-actions { width: 100%; justify-content: flex-start; }
}

/* Kundenportal am Kontakt (0.34.0) */
.portal-card .portal-url { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; }
.portal-card .portal-url input { flex: 1 1 auto; min-width: 0; font-family: var(--fm); font-size: 13px; }
.portal-card details.portal-access { margin-top: 14px; font-size: 13px; }
.portal-card details.portal-access ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

/* Terminbuchung (0.35.0): Wochenansicht, Termin-Dialog, Einstellungen (Wochenplan, Links) */
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.week-nav .week-title { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.week-col { background: var(--soft); border-radius: var(--r); padding: 8px; min-height: 90px; display: grid; gap: 6px; min-width: 0; }
.week-col.off { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.week-col.today { box-shadow: inset 0 3px 0 var(--violet); }
.week-col header { display: grid; gap: 1px; }
.week-col .wd { font-weight: 600; font-size: 13.5px; }
.week-col .win { font-size: 11.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.week-col .plus { justify-self: start; padding: 0; min-height: 0; font-size: 12px; }
.week-items { display: grid; gap: 6px; }
.appt { display: grid; gap: 2px; text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 7px 9px; cursor: pointer; box-shadow: var(--sh); min-width: 0; }
.appt:hover { border-color: var(--line-strong); }
.appt.kind-block { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--surface) 6px 12px); }
.appt.st-cancelled .appt-title, .appt.st-cancelled .appt-time { text-decoration: line-through; color: var(--muted); }
.appt.st-requested { border-color: var(--due); }
.appt-time { font-family: var(--fm); font-size: 11.5px; color: var(--ink-2); }
.appt-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.appt-chip .chip, .appt-chip .badge { font-size: 11px; }
.appt-dialog .kv { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 6px 18px; margin: 0 0 12px; }
.appt-dialog .kv dt { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.appt-dialog .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.appt-dialog .field-block { margin-bottom: 14px; }
.appt-dialog .field-block > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
/* Terminart mit mehreren Orten (0.47.0): Auswahl nebeneinander, Angaben je Ort eingerückt */
.loc-kinds { margin: 2px 0 12px; }
.loc-kinds > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
/* Angaben auf der Buchungsseite je Terminart (0.61.1): Überschrift wie bei den Orten, darunter die Felder */
.form-fields { margin: 4px 0 14px; padding: 12px 14px 0; border: 1px solid var(--hair); border-radius: var(--r-sm); }
.form-fields > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.form-fields > small { display: block; margin-bottom: 10px; }
.loc-kind-list { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.loc-kind-list label.check { margin: 0; }
.loc-detail { padding-left: 12px; border-left: 2px solid var(--hair); margin-bottom: 12px; }
/* Kalender (0.48.0): Warnung zur Videokonferenz im Dialog der Terminart, Freischalten am Konto, im Kalender gelöscht */
.video-note .alert { margin: -4px 0 12px; }
.cal-meetings { margin: 8px 0 4px; }
.cal-meetings .btn.link { padding: 0; font-size: inherit; }
.cal-missing-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hours { display: grid; gap: 6px; margin: 10px 0; }
.hours-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: start; }
.hours-day { font-weight: 600; font-size: 13.5px; padding-top: 8px; }
.hours-wins { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.hours-win { display: inline-flex; align-items: center; gap: 6px; }
.hours-win input[type=time] { width: auto; min-width: 0; font-family: var(--fm); font-size: 13px; }
.portal-url-row { margin: 10px 0 14px; }
.portal-url-row .portal-url { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.portal-url-row .portal-url input { flex: 1 1 240px; min-width: 0; font-family: var(--fm); font-size: 13px; }
.termine-card .badge { margin-left: 4px; }
/* Pipeline am Kontakt (0.42.0) */
.pipeline-card details.closed-deals { margin-top: 10px; }
.pipeline-card details.closed-deals summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.appt.kind-external { background: var(--soft); border-style: dashed; cursor: default; box-shadow: none; }
.appt.kind-external .appt-title { font-weight: 500; color: var(--ink-2); }
/* minmax(0, 1fr) und min-width: 0: die Tabelle der Kalender scrollt in ihrem Rahmen, statt die Seite zu verbreitern (0.41.0) */
.cal-connections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 10px 0; }
.cal-connection { border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0; overflow-wrap: break-word; }
.cal-connection .cal-head { margin-bottom: 6px; }
.cal-connection .actions { margin-top: 8px; }
.cal-sources td label.check.inline { margin: 0; justify-content: center; }
.cal-sources .sub.err, .appt-dialog .err, .cal-head .err { color: var(--over); }
/* schmaler Bildschirm: je Kalender ein Block – Name (mit Hinweis) über der Zeile mit Belegt, Zeiten beachten, Termine eintragen */
@media (max-width: 640px) {
  .cal-sources, .cal-sources tbody { display: block; width: 100%; min-width: 0; }
  .cal-sources thead { display: none; }
  .cal-sources tr { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .cal-sources tr.cal-none { flex-wrap: nowrap; justify-content: space-between; border-bottom: 0; }
  table.list.compact.cal-sources td { padding: 0; border: 0; min-width: 0; text-align: left; }
  .cal-sources tr:not(.cal-none) td:first-child { flex: 1 0 100%; }
  .cal-sources tr.cal-none td:empty { display: none; }
  .cal-sources td[data-label] { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .cal-sources td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 400; }
  .cal-sources td label.check.inline { justify-content: flex-start; }
}
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: -1px; }
/* Gutscheincodes (0.40.0): Terminarten zum Ankreuzen, Fehler im Dialog */
.voucher-dialog .field-block, .voucher-types { margin-bottom: 14px; }
.voucher-types > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.voucher-types .checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.voucher-types .checks label.check.inline { margin: 0; }
.voucher-dialog .err, .appt-dialog .err { color: var(--over); }
/* Kästchen „In der Pipeline“ im Angebot (0.36.1) */
.pipeline-box { border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; background: var(--soft); }
.pipeline-box .check { margin: 0 0 6px; }
.pipeline-pick { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-end; } .pipeline-pick select { max-width: 100%; }
.pipeline-pick > label.field { flex: 1 1 240px; min-width: 0; margin: 0; } .pipeline-pick > .btn { margin-bottom: 5px; }
.pipeline-box .pipeline-status { display: block; margin-top: 6px; } .pipeline-box .pipeline-status:empty { display: none; }
.pipeline-pick select.stage-view:disabled { opacity: 1; color: var(--ink-2); }
/* Kontofeld mit Suche (0.36.1): Vorschlagsliste unter dem Feld, Konto und Stichwort */
.acc-wrap { position: relative; }
.acc-suggest { min-width: min(420px, 90vw); max-height: 280px; }
.acc-suggest .acc-no { font-family: var(--fm); font-size: 13px; margin-right: 2px; }
.split-row .sf.acc-wrap { overflow: visible; }
/* Einbetten (0.36.1): Bausteine zum Kopieren */
.embed-list { display: grid; gap: 14px; }
.embed-block { display: grid; gap: 6px; justify-items: start; }
.embed-block textarea { width: 100%; font-family: var(--fm); font-size: 12px; line-height: 1.45; white-space: pre; overflow: auto; }
/* Monatsansicht (0.36.1): je Tag bis zu drei Einträge, Tipp auf den Tag öffnet die Woche */
.month-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px 4px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-list { display: none; }
.month-day { display: grid; align-content: start; gap: 4px; text-align: left; font: inherit; color: inherit; background: var(--soft); border: 1px solid transparent; border-radius: var(--r-sm); padding: 6px 7px; min-height: 86px; min-width: 0; cursor: pointer; }
.month-day:hover { border-color: var(--line-strong); }
.month-day.other { opacity: .45; }
.month-day.today { box-shadow: inset 0 3px 0 var(--violet); }
.month-day.off { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--surface) 6px 12px); }
.month-day .md-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.month-day .md-num { font: inherit; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; color: inherit; background: none; border: 0; padding: 1px 4px; margin: -1px -4px; border-radius: 4px; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.month-day .md-num:hover, .month-day .md-num:focus-visible { background: var(--surface); text-decoration: underline; }
.month-day .md-add { font: inherit; font-size: 15px; line-height: 1; color: var(--ink-2); background: none; border: 1px solid transparent; border-radius: 4px; width: 22px; height: 22px; padding: 0; cursor: pointer; flex: none; }
.month-day .md-add:hover { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.month-day .md-items { display: grid; gap: 2px; }
.month-day .md-item { font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--hair); }
.month-day .md-item:hover { border-color: var(--line-strong); }
.month-day .md-item.kind-block { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--surface) 6px 12px); }
.month-day .md-item.st-requested { border-color: var(--due); }
.month-day .md-more, .month-day .md-ext, .month-day .md-abs { font-size: 11px; }
.month-day .md-more { font-family: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.month-day .md-more:hover { text-decoration: underline; }
.seg.small button { font-size: 12.5px; padding: 4px 11px; }
@media (max-width: 1100px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .week-nav .week-title { margin-left: 0; width: 100%; }
  .month { gap: 3px; }
  .month-day { min-height: 54px; padding: 4px 4px; }
  .month-day .md-item { font-size: 0; height: 6px; width: 6px; padding: 0; border-radius: 50%; background: var(--violet); border: 0; display: inline-block; margin-right: 2px; vertical-align: middle; pointer-events: none; }
  .month-day .md-add { display: none; }
  .month-day .md-num { pointer-events: none; white-space: normal; overflow: visible; }
  .month-day .md-more { pointer-events: none; }
  .month-day .md-items { display: block; }
  .month-day .md-more, .month-day .md-ext, .month-day .md-abs { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  /* Liste je Tag unter dem Raster (0.79.0) */
  .month-list { display: block; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
  .ml-day { padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .ml-head { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: none; border: 0; padding: 2px 0 6px; cursor: pointer; }
  .ml-day.today .ml-head { color: var(--violet-deep); }
  .ml-items { display: grid; gap: 4px; }
  .ml-item { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 8px; align-items: baseline; width: 100%; text-align: left; font: inherit; font-size: 14px; color: inherit; background: var(--soft); border: 1px solid transparent; border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; }
  .ml-item .ml-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
  .ml-item .ml-name { min-width: 0; overflow-wrap: anywhere; }
  .ml-item.kind-block { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--surface) 6px 12px); }
  .ml-item.st-requested { border-color: var(--due); }
  .hours-row { grid-template-columns: minmax(0, 1fr); }
  .hours-day { padding-top: 0; }
  .appt-dialog .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .appt-dialog .kv dt { margin-top: 6px; }
}

/* Erinnerungen als Zahl und Einheit (0.40.1) */
.rem-edit { margin-bottom: 14px; }
.rem-edit > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.rem-edit > small { display: block; margin-top: 4px; }
.rem-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.rem-row input { width: 5.5em; flex: 0 0 auto; }
.rem-row select { width: auto; flex: 0 0 auto; }
/* Einbetten: Seite über Reiter wählen (0.40.1) */
.embed-card .field-block { margin-bottom: 14px; }
.embed-card .field-block > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.embed-card .embed-pick { margin-bottom: 0; }
td .td-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* Karte im Angebot (0.40.1): „Karte öffnen“ neben der Auswahl */
.pipeline-pick a.small { align-self: flex-end; margin-bottom: 11px; font-size: 13px; }

/* Gewerbesteuer (0.44.0): Berechnung mit Position, Vorschrift, Grundlage und Betrag; schmal zweizeilig (Position oben,
   darunter Vorschrift, Grundlage und Betrag); Angaben mit Zwischenüberschriften */
table.list.gewst td:nth-child(2) { white-space: nowrap; color: var(--muted); font-size: 13px; }
table.list.gewst tr.sum > td, table.list.gewst tr.total > td { border-top: 1px solid var(--line-strong); }
table.list.gewst tr.sub > td { font-size: 13px; }
table.list.gewst tr.sub > td:first-child { padding-left: 22px; }
.card.gewst-input h3 { margin: 18px 0 8px; font-size: 15px; }
@media (max-width: 600px) {
  table.list.gewst { min-width: 0; }
  table.list.gewst thead { display: none; }
  table.list.gewst tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; border-bottom: 1px solid var(--hair); }
  table.list.gewst td { border-bottom: 0; }
  table.list.gewst td:nth-child(1) { grid-area: 1 / 1 / 2 / 4; }
  table.list.gewst td:nth-child(2) { grid-area: 2 / 1; padding-top: 0; white-space: normal; }
  table.list.gewst td:nth-child(3) { grid-area: 2 / 2; padding-top: 0; }
  table.list.gewst td:nth-child(4) { grid-area: 2 / 3; padding-top: 0; }
  table.list.gewst tr.group > td { grid-area: 1 / 1 / 2 / 4; }
  table.list.gewst tr.sum, table.list.gewst tr.total { border-top: 1px solid var(--line-strong); }
  table.list.gewst tr.sum > td, table.list.gewst tr.total > td { border-top: 0; }
  table.list.gewst tr.sub > td:first-child { padding-left: 12px; }
  table.list.gewst td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
}

/* Einkommensteuer (0.45.0): Berechnung wie bei der Gewerbesteuer (Klasse gewst), Vorschrift darf umbrechen; Angaben je Person
   (du, Ehepartner) und je Kind mit Zwischenüberschriften; Werte je Vordruck mit Gruppenzeilen */
table.list.est td:nth-child(2) { white-space: normal; min-width: 150px; }
.card.est-input h3 { margin: 22px 0 8px; font-size: 15px; }
.card.est-input .est-person { margin: 4px 0 10px; }
.card.est-input .est-person h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.card.est-input .est-kid { padding: 8px 0 4px; border-bottom: 1px solid var(--hair); }
.card.est-input .est-kid .actions { margin-top: 0; }
.card.est-input .est-kids > .btn { margin-top: 10px; }
.row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .row.four { grid-template-columns: 1fr; } }
table.list.est-forms tr.group > td { padding-top: 14px; background: none; }
@media (max-width: 600px) {
  table.list.est td:nth-child(2) { min-width: 0; }
}

/* Geld im Blick (0.49.0): Fristen (Datum, Frist, Betrag, Stand), Vorauszahlungen je Vierteljahr, Zahlungseingänge mit
   Rücklage, Karte in der Übersicht; schmal als Block je Zeile */
table.list.deadlines td.dl-date { white-space: nowrap; }
table.list.deadlines td.num, table.list.reserve-payments td.num { white-space: nowrap; }
table.list.deadlines tr.done td { color: var(--muted); }
table.list.deadlines tr.done td.dl-title a { color: inherit; }
table.list.deadlines .dl-amount small, .dl-today .dl-amount small { color: var(--muted); }
/* Wer übermittelt ans Finanzamt? (0.90.0) */
fieldset.filer-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 14px 12px; margin: 0 0 12px; min-width: 0; }
fieldset.filer-box legend { font-weight: 600; padding: 0 6px; }
/* Körperschaftsteuer (0.166.0): Anteilseigner je Block */
fieldset.kst-sh { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 14px 12px; margin: 0 0 12px; min-width: 0; }
fieldset.kst-sh legend { font-weight: 600; padding: 0 6px; }
table.list.prepay-table td label.field { margin: 0; }
table.list.prepay-table td label.field > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.list.prepay-table input { min-width: 96px; text-align: right; }
table.list.reserve-payments tr.refund td { color: var(--muted); }
table.list.reserve-payments tfoot td { border-top: 1px solid var(--line-strong); }
.geld-today .geld-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.geld-today .geld-sum strong { font-size: 22px; }
.geld-today .dl-today li { justify-content: space-between; }
.geld-today .dl-today li > div { min-width: 0; }
.ku-forecast h3 { margin: 16px 0 8px; font-size: 15px; }
@media (max-width: 640px) {
  table.list.deadlines, table.list.deadlines tbody, table.list.prepay-table, table.list.prepay-table tbody,
  table.list.reserve-payments, table.list.reserve-payments tbody, table.list.reserve-payments tfoot { display: block; width: 100%; min-width: 0; }
  table.list.deadlines thead, table.list.prepay-table thead, table.list.reserve-payments thead { display: none; }
  table.list.deadlines tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.deadlines td { border: 0; padding: 2px 0; min-width: 0; }
  table.list.deadlines td.dl-date { grid-area: 1 / 1; color: var(--muted); font-size: 13px; }
  table.list.deadlines td:nth-child(4) { grid-area: 1 / 2; justify-self: end; }
  table.list.deadlines td.dl-title { grid-area: 2 / 1 / 3 / 3; }
  table.list.deadlines td:nth-child(3) { grid-area: 3 / 1; text-align: left; }
  table.list.deadlines td.row-actions { grid-area: 3 / 2; justify-self: end; }
  table.list.deadlines td[data-label]::before { content: none; }
  table.list.prepay-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.prepay-table td { border: 0; padding: 0; min-width: 0; }
  table.list.prepay-table td:first-child, table.list.prepay-table td.row-actions { grid-column: 1 / 3; }
  table.list.prepay-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.prepay-table input { min-width: 0; width: 100%; }
  table.list.reserve-payments tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.reserve-payments td { border: 0; padding: 0; min-width: 0; text-align: left; }
  table.list.reserve-payments tbody td:nth-child(1) { grid-column: 1 / 2; color: var(--muted); font-size: 13px; }
  table.list.reserve-payments tbody td:nth-child(2) { grid-column: 2 / 3; }
  table.list.reserve-payments tfoot td:first-child { grid-column: 1 / 3; }
  table.list.reserve-payments tfoot td { border-top: 0; }
  table.list.reserve-payments tfoot tr { border-top: 1px solid var(--line-strong); border-bottom: 0; }
  table.list.reserve-payments td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
}
/* Kundenkartei (0.50.0): Kennzahlen und Verlauf am Kontakt */
.cust-file .cust-kpis { margin-bottom: 18px; }
.cust-file .cust-kpis .stat { box-shadow: none; }
.cust-file h3 { margin: 6px 0 4px; font-size: 15px; }
.cust-timeline { list-style: none; margin: 0; padding: 0; }
.cust-timeline li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.cust-timeline li:last-child { border-bottom: 0; }
.cust-timeline .tl-date { font-family: var(--fm); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cust-timeline .tl-main { min-width: 0; overflow-wrap: anywhere; }
.cust-timeline .detail { font-size: 13px; color: var(--muted); white-space: pre-line; }
.cust-timeline .tl-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cust-timeline li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .cust-timeline .tl-date { grid-column: 1 / -1; }
}
/* Zeiterfassung (0.51.0) */
.nav .live { display: inline-flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 10.5px; font-weight: 600; color: var(--violet-deep); background: var(--tint); border-radius: 99px; padding: 1px 8px; }
.nav .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--paid); }
.timer-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.timer-card .timer-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.timer-card .timer-main > div { min-width: 0; overflow-wrap: anywhere; }
.timer-card .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.timer-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--paid); flex: none; }
.timer-dot.idle { background: var(--line-strong); }
.timer-card.running .timer-dot { animation: timer-pulse 1.6s ease-in-out infinite; }
@keyframes timer-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .timer-card.running .timer-dot { animation: none; } }
.timer-clock { font-family: var(--fm); font-size: 24px; font-variant-numeric: tabular-nums; min-width: 5.2em; }
.zeiten .time-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 4px 0 14px; }
.zeiten .time-nav { display: flex; align-items: center; gap: 8px; }
.zeiten .time-nav strong { min-width: 12em; text-align: center; }
.zeiten .time-filter { display: flex; gap: 8px; margin-left: auto; min-width: 0; }
.zeiten .time-filter select { width: auto; min-width: 0; max-width: 16em; }
.time-list .time-day + .time-day { margin-top: 14px; }
.time-list h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-size: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.time-list ul { list-style: none; margin: 0; padding: 0; }
.time-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.time-row:last-child { border-bottom: 0; }
.time-row.internal .time-label { color: var(--ink-2); }
.time-when { font-family: var(--fm); font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; }
.time-when .time-dur { color: var(--ink); font-size: 14px; }
.time-what { min-width: 0; overflow-wrap: anywhere; }
.time-what .btn.link.time-label { text-align: left; font-weight: 600; }
.time-what .detail { font-size: 13px; color: var(--muted); white-space: pre-line; }
.time-what .detail .chip, .time-what .detail .badge { margin-left: 4px; }
.time-doc { text-decoration: none; }
.time-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time-dialog .time-grid { align-items: end; }
.time-dialog .time-billable { display: flex; align-items: center; }
.time-dialog > .alert { margin-bottom: 12px; }
.time-bill h3 { margin: 16px 0 6px; font-size: 15px; }
.time-bill h3 .muted { font-weight: 400; font-size: 13px; margin-left: 6px; }
.time-bill .table-wrap { max-height: 320px; overflow: auto; }
table.list.time-pick td:first-child, table.list.time-pick th:first-child { width: 28px; }
table.list.time-lines tfoot td { border-top: 1px solid var(--line-strong); }
table.list.time-rates td label.field { margin: 0; }
.time-addrate { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; margin-top: 10px; }
.time-addrate .field { margin: 0; }
@media (max-width: 640px) {
  .zeiten .time-filter { margin-left: 0; width: 100%; }
  .zeiten .time-filter select { flex: 1 1 0; max-width: none; }
  .zeiten .time-nav strong { min-width: 0; }
  .time-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .time-row .time-when { grid-column: 1 / -1; flex-direction: row; gap: 10px; }
  .timer-card .actions { justify-content: flex-start; }
  table.list.time-open, table.list.time-open tbody, table.list.time-lines, table.list.time-lines tbody, table.list.time-lines tfoot,
  table.list.time-pick, table.list.time-pick tbody, table.list.time-rates, table.list.time-rates tbody { display: block; width: 100%; min-width: 0; }
  table.list.time-open thead, table.list.time-lines thead, table.list.time-pick thead { display: none; }
  table.list.time-open tr, table.list.time-lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.time-open td, table.list.time-lines td, table.list.time-pick td, table.list.time-rates td { border: 0; padding: 0; min-width: 0; text-align: left; }
  table.list.time-open td:first-child, table.list.time-open td:last-child, table.list.time-lines td:first-child { grid-column: 1 / -1; }
  table.list.time-lines tfoot tr { grid-template-columns: minmax(0, 1fr) auto; }
  table.list.time-lines tfoot td:first-child { grid-column: auto; }
  table.list.time-open td[data-label]::before, table.list.time-lines td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.time-pick tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.time-pick td:nth-child(2) { grid-column: 2; color: var(--muted); font-size: 13px; }
  table.list.time-pick td:nth-child(3) { grid-column: 2 / 4; }
  table.list.time-pick td:nth-child(4) { grid-column: 3; grid-row: 1; }
  table.list.time-pick td:nth-child(5) { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; }
  table.list.time-pick td:nth-child(5)::before { content: 'berechnet '; }
  table.list.time-rates tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.time-rates td:first-child { grid-column: 1 / -1; }
  .time-addrate { grid-template-columns: minmax(0, 1fr) auto; }
  .time-addrate > .field:first-child { grid-column: 1 / -1; }
}
.zeiten-card .zeiten-rate { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 8px 0 12px; }
.zeiten-card .zeiten-rate .field { margin: 0; flex: 0 1 22em; min-width: 0; }
.zeiten-card .zeiten-rate .field input { max-width: 10em; }
/* Projekte, Freigabe, Auslagen (0.76.0) */
.budget { display: grid; gap: 0; min-width: 0; }
.budget .quota-meter { margin: 4px 0 1px; }
.budget small { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.time-open-actions { white-space: nowrap; text-align: right; }
table.list.time-projects td:first-child .btn.link { text-align: left; font-weight: 600; }
table.list.time-projects td:nth-child(3) { min-width: 12em; }
table.list.time-approvals .return-note { white-space: pre-line; overflow-wrap: anywhere; }
.approval-detail .kv { margin: 0 0 12px; }
.approval-detail .copy-row { margin: 0 0 12px; }
.approval-send h3, .project-dialog h3 { margin: 16px 0 6px; font-size: 15px; }
.approval-send .table-wrap { max-height: 280px; overflow: auto; }
.project-dialog .project-status { margin: 0 0 12px; }
.zeiten-card .zeiten-projects { margin: 4px 0 12px; }
.zeiten-card .zeiten-projects h3 { margin: 0 0 6px; font-size: 14px; }
.zeiten-card .zeiten-projects ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.zeiten-card .zeiten-projects li { min-width: 0; overflow-wrap: anywhere; }
.time-dialog [data-project-state] { display: grid; gap: 2px; }
.time-dialog [data-project-state]:empty { display: none; }
.rebill-card .kv { margin: 0 0 10px; }
.rebill-dialog .rebill-amount { margin: 10px 0 0; }
table.list.time-expenses .err-text { font-size: 12.5px; }
/* Retainer und Stundenguthaben (0.76.1) */
.retainer, .credit-state { display: grid; gap: 0; min-width: 0; }
.retainer .quota-meter, .credit-state .quota-meter { margin: 4px 0 1px; }
.retainer small, .credit-state small { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.retainer + .budget { margin-top: 6px; }
.retainer-section { margin: 4px 0 8px; padding: 10px 0 0; border-top: 1px solid var(--hair); }
.retainer-section > .retainer { margin: 0 0 8px; }
.retainer-fields { margin: 6px 0 0; }
.retainer-fields > p.muted { font-size: 13px; margin: 0 0 8px; }
table.list.time-credits td:nth-child(2) { min-width: 12em; }
.credit-dialog .kv { margin: 0 0 12px; }
.credit-dialog .credit-sum { margin: 8px 0 0; }
.zeiten-card .zeiten-credits { margin: 4px 0 12px; }
.zeiten-card .zeiten-credits h3 { margin: 0 0 6px; font-size: 14px; }
.zeiten-card .zeiten-credits ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.zeiten-card .zeiten-credits li { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  table.list.time-projects, table.list.time-projects tbody, table.list.time-approvals, table.list.time-approvals tbody, table.list.time-credits, table.list.time-credits tbody { display: block; width: 100%; min-width: 0; }
  table.list.time-projects thead, table.list.time-approvals thead, table.list.time-credits thead { display: none; }
  table.list.time-projects tr, table.list.time-approvals tr, table.list.time-credits tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.time-projects td, table.list.time-approvals td, table.list.time-credits td { border: 0; padding: 0; min-width: 0; text-align: left; }
  table.list.time-projects td:first-child, table.list.time-approvals td:first-child, table.list.time-approvals td:last-child, table.list.time-credits td:first-child, table.list.time-credits td:nth-child(2) { grid-column: 1 / -1; }
  table.list.time-projects td:nth-child(3) { grid-column: 2 / -1; min-width: 0; }
  table.list.time-projects td[data-label]::before, table.list.time-approvals td[data-label]::before, table.list.time-credits td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.time-expenses td:nth-child(2) { color: var(--ink); font-size: 14px; }
  table.list.time-expenses td:nth-child(3) { color: var(--muted); font-size: 12.5px; }
  .time-open-actions { white-space: normal; text-align: left; display: flex; flex-wrap: wrap; gap: 6px; }
}
/* Fahrten und Pauschalen (0.52.0) */
.fahrten .year-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.fahrten .year-nav strong { font-size: 17px; min-width: 3.5em; text-align: center; }
.fahrten p.small, .fahrten span.small, .trip-dialog p.small, .travel-dialog p.small { font-size: 13px; }
.fahrten table.vehicles tr.selected td { background: var(--tint); }
.fahrten table.vehicles .detail, .fahrten table.trips .detail, .fahrten .travel-list .detail, .fahrten table.allowance-months .detail { font-size: 12.5px; color: var(--muted); }
.fahrten .logbook-kv { margin: 0 0 12px; }
.fahrten table.trips tr.trip-private td, .fahrten table.trips tr.trip-commute td { color: var(--ink-2); }
.fahrten table.trips td.row-actions { white-space: nowrap; }
.fahrten table.allowance-months tfoot td { border-top: 1px solid var(--line-strong); }
.fahrten table.allowance-months .chip { margin-top: 3px; font-size: 11.5px; }
.fahrten .travel-list { list-style: none; margin: 0; padding: 0; }
.fahrten .travel-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.fahrten .travel-list li:last-child { border-bottom: 0; }
.fahrten .travel-list li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.fahrten .home-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 12px; margin: 10px 0 6px; }
.fahrten .home-grid .field { margin: 0; }
.fahrten .home-grid input { text-align: right; }
.trip-dialog .trip-history { margin-top: 12px; font-size: 13px; }
.trip-dialog .trip-history ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.trip-dialog .seg { flex-wrap: wrap; }
.trip-dialog div.field > span:first-child { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.travel-dialog .meal-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.travel-dialog .meal-checks label.check.inline { margin: 0; }
.travel-dialog table.travel-day-table tfoot td { border-top: 1px solid var(--line-strong); }
.travel-dialog .travel-day-table .detail { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .fahrten .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fahrten table.vehicles, .fahrten table.vehicles tbody, .fahrten table.trips, .fahrten table.trips tbody, .fahrten table.allowance-months, .fahrten table.allowance-months tbody,
  .fahrten table.allowance-months tfoot, .travel-dialog table.travel-day-table, .travel-dialog table.travel-day-table tbody, .travel-dialog table.travel-day-table tfoot { display: block; width: 100%; min-width: 0; }
  .fahrten table.vehicles thead, .fahrten table.trips thead, .fahrten table.allowance-months thead, .travel-dialog table.travel-day-table thead { display: none; }
  .fahrten table.vehicles tr, .fahrten table.trips tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .fahrten table.vehicles td, .fahrten table.trips td, .fahrten table.allowance-months td, .travel-dialog table.travel-day-table td { border: 0; padding: 0; min-width: 0; text-align: left; }
  .fahrten table.vehicles td:first-child, .fahrten table.trips td.trip-main, .fahrten table.trips td.row-actions { grid-column: 1 / -1; }
  /* Stand der Fahrt (0.65.3: „nachgetragen am …“, „erfasst am …“) darf umbrechen */
  .fahrten table.trips td.row-actions { white-space: normal; text-align: left; }
  .fahrten table.allowance-months tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .fahrten table.allowance-months td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .fahrten table.allowance-months td[data-label]::before, .fahrten table.vehicles td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .travel-dialog table.travel-day-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  .travel-dialog table.travel-day-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .travel-dialog table.travel-day-table tfoot tr { border-bottom: 0; }
}
/* Geführte Einrichtung (0.52.0) */
.onboarding-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-left: 3px solid var(--violet); }
.onboarding-card .onboarding-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.onboarding-card h2 { margin: 0 0 4px; }
.onboarding-card p { margin: 0; }
.onboarding-card .progress, .onboarding .progress { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; max-width: 420px; }
.onboarding-card .progress span { display: block; height: 100%; background: var(--violet); border-radius: 99px; }
.onboarding-grid { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.onboarding-steps { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.onboarding-steps li a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.onboarding-steps li a:hover { background: var(--soft); }
.onboarding-steps li.current a { background: var(--tint); color: var(--ink); font-weight: 600; }
.onboarding-steps .num { width: 24px; height: 24px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--fm); font-size: 12px; border: 1px solid var(--line-strong); }
.onboarding-steps li.done .num { background: var(--paid-bg); color: var(--paid); border-color: transparent; }
.onboarding-steps li.done .num::after { content: ''; width: 5px; height: 10px; margin-top: -2px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.onboarding-panel h2 { display: flex; align-items: center; gap: 10px; }
.onboarding-panel p.small { font-size: 13px; }
.onboarding-panel .feature-list label.check { margin: 0 0 10px; }
/* Logo im Schritt „Bank und Logo“ (0.68.6) */
.onboarding-logo { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.onboarding-logo h3 { margin: 0 0 4px; }
.onboarding-logo .logo-preview img { max-width: min(320px, 100%); }
@media (max-width: 900px) {
  .onboarding-grid { grid-template-columns: minmax(0, 1fr); }
  .onboarding-steps { display: flex; flex-wrap: wrap; gap: 4px; }
  .onboarding-steps li a { padding: 6px 8px; }
  .onboarding-steps li:not(.current) a span:not(.num) { display: none; }
}

/* ---------- Seite „Einstellungen“ (0.62.0): Kacheln je Gruppe, Feld zum Filtern, Stand des Testbetriebs ---------- */
.test-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; background: var(--tint); border-color: transparent; box-shadow: none; }
.test-card > div { flex: 1 1 360px; min-width: 0; }
.test-card h2 { margin: 0 0 6px; font-size: 17px; }
.test-card p { margin: 0; color: var(--ink-2); }
.test-card .progress { max-width: 420px; height: 6px; margin: 12px 0 0; background: var(--surface); }
.settings-groups { display: grid; gap: 28px; }
.settings-group h2 { margin: 0 0 12px; font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 116px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); box-shadow: var(--sh); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.tile:hover { border-color: var(--violet); text-decoration: none; }
.tile b { font-size: 15px; font-weight: 600; }
.tile .d { color: var(--muted); font-size: 13px; line-height: 1.45; }
.tile .st { margin-top: auto; padding-top: 8px; color: var(--ink-2); font-size: 12.5px; }
.tile .st.warn { color: var(--due); font-weight: 600; }
@media (max-width: 600px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { min-height: 0; } }

/* ---------- Verwaltung: Systemmails (0.68.1) ---------- */
.sysmail-group { margin-top: 18px; }
.sysmail-group h3 { margin: 0 0 6px; font-size: 15px; }
.sysmail-list { list-style: none; margin: 0; padding: 0; }
.sysmail-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--hair); }
.sysmail-text { min-width: 0; flex: 1 1 auto; }
.sysmail-subject { color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.sysmail-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.sysmail-pv { padding: 12px 14px; background: var(--soft); border-radius: var(--r); }
.sysmail-pv-subject { font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
.sysmail-pv-body { white-space: pre-wrap; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 600px) { .sysmail-list li { flex-direction: column; } }

/* ---------- Übersicht „Zu erledigen“ (0.62.0) ---------- */
.dash { display: flex; flex-wrap: wrap; gap: 0 var(--gap-ui); align-items: flex-start; }
.dash-main { flex: 999 1 520px; min-width: 0; }
.dash-side { flex: 1 1 300px; min-width: 0; }
.todo-card { padding: 0; overflow: hidden; }
.todo-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; }
.todo-head h2 { margin: 0; font-size: 18px; }
.todo-card > .empty { margin: 0 20px 20px; }
.todo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 13px 20px; border-top: 1px solid var(--hair); }
.todo-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--soft); color: var(--ink-2); }
.todo-ico .ico { width: 19px; height: 19px; }
.todo-ico.over { background: var(--over-bg); color: var(--over); }
.todo-ico.due { background: var(--due-bg); color: var(--due); }
.todo-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 3px; }
.todo-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.todo-title b { font-weight: 600; }
.todo-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.todo-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.todo > .btn { margin-left: auto; }
.glance-card h2, .debtors-card h2 { margin: 0 0 4px; font-size: 18px; }
.glance-row { display: grid; gap: 2px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.glance-row + .glance-row { border-top: 1px solid var(--hair); }
.glance-row:hover { text-decoration: none; }
.glance-row:hover .glance-val { color: var(--violet-deep); }
.glance-row .muted { font-size: 13px; }
.glance-val { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.glance-val small { color: var(--num-dim); font-size: inherit; font-weight: inherit; }
.glance-sub { font-size: 12.5px; color: var(--muted); }
.glance-sub .chip { white-space: normal; }
.glance-row.split .glance-sub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.glance-row.split .glance-sub a:hover { color: var(--violet-deep); }
.debtors { display: grid; margin: 6px -22px 0; }
.debtor { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; }
.debtor:hover { background: var(--soft); text-decoration: none; }
.debtor.over { box-shadow: inset 3px 0 0 var(--over); }
.debtor-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.debtor-main b { font-weight: 600; overflow-wrap: anywhere; }
.debtor-main small { color: var(--muted); font-size: 12.5px; }
.debtor-st.over { color: var(--over); font-weight: 600; }
.debtor-st.due { color: var(--due); font-weight: 600; }
.debtor-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .todo { padding: 12px 16px; } .todo-head { padding: 16px 16px 10px; } .todo-amt { margin-left: 50px; } .debtors { margin: 6px -16px 0; } .debtor { padding: 11px 16px; } }
/* Mobil: „Neu“ steht als „+“ in der Leiste unten – die Hauptaktion der Übersicht schwebt dort nicht noch einmal */
@media (max-width: 640px) { .page-head .actions.dash-actions .btn.primary { display: none; } }
/* Übersicht anpassen (0.146.0): Dialog mit zwei Spalten, Säulen der Karten „Umsatz im Jahr“ und „Zeiten dieser Woche“ */
.dash-adjust-col h3 { margin: 14px 0 4px; font-size: 14px; }
.dash-order { list-style: none; margin: 0; padding: 0; }
.dash-order li { display: flex; align-items: center; gap: 6px 10px; padding: 4px 0; border-bottom: 1px solid var(--hair); }
.dash-order .dash-name { flex: 1 1 auto; margin: 0; min-width: 0; }
.dash-order .btn { flex: none; }
.dash-umsatz .geld-sum, .dash-zeiten .geld-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dash-umsatz .geld-sum strong, .dash-zeiten .geld-sum strong { font-size: 22px; }
.dash-bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; margin: 12px 0 6px; }
.dash-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dash-bar-track { flex: 1 1 auto; width: 100%; max-width: 18px; display: flex; align-items: flex-end; }
.dash-bar-fill { display: block; width: 100%; background: var(--violet); border-radius: 4px 4px 0 0; opacity: .55; }
.dash-bar.now .dash-bar-fill { opacity: 1; }
.dash-bar small { font-size: 10.5px; color: var(--muted); line-height: 1; }
.dash-bar.later small { opacity: .5; }
/* Leistungspaket (0.148.0): Bestandteile im Artikel */
.pkg-parts { list-style: none; margin: 0 0 10px; padding: 0; }
.pkg-parts li { display: flex; align-items: center; gap: 6px 10px; padding: 5px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.pkg-parts .pkg-name { flex: 1 1 220px; min-width: 0; }
.pkg-parts input.num { width: 84px; }
.pkg-parts .num { min-width: 80px; text-align: right; }

/* ---------- Seitenmuster der Detailseiten (seit 0.62.1, ui/detail.js): Pfad, Kopf mit Status und einer Hauptaktion,
   „Weitere“, Kennzahlenleiste, Hauptspalte und Seitenspalte, Reiter ---------- */
.detail-head { display: block; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
/* Pfad oben (0.65.4): Bereich mit Menü › Seite › Unterseite; die letzte Stufe ist die Seite selbst */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs a { color: var(--violet-deep); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep, .crumbs span[aria-hidden] { color: var(--muted); }
.crumbs [aria-current=page] { color: var(--ink-2); }
.crumbs .crumb-menu { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--violet-deep); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.crumbs .crumb-menu:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs .crumb-menu .ico { width: 13px; height: 13px; }
.crumbs .menu { left: 0; right: auto; text-transform: none; letter-spacing: 0; font-family: var(--fs); }
.crumbs .menu a { color: var(--ink); }
.crumbs .menu a.current { background: var(--soft); }
.crumbs .menu a:hover { text-decoration: none; }
.crumbs .path-meta { color: var(--muted); }
@media (max-width: 640px) {
  /* schmaler Bildschirm: nur die Stufe darüber, mit „‹“ (zurück) */
  .crumbs li { display: none; }
  .crumbs li.up { display: inline-flex; }
  .crumbs li.up .sep { display: none; }
  .crumbs li.up::before { content: '‹' / ''; color: var(--muted); }
}
.detail-head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; }
.detail-title { flex: 1 1 420px; min-width: 0; display: grid; gap: 8px; }
.detail-h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.detail-h1 h1 { margin: 0; overflow-wrap: anywhere; }
.detail-h1 h1 .mono { font-family: var(--fm); font-size: .78em; font-weight: 500; letter-spacing: 0; }
.page-head .detail-sub { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-actions .menu-wrap .menu { min-width: 280px; }
.btn[data-more] { display: inline-flex; align-items: center; gap: 6px; }
.btn[data-more] .ico { width: 16px; height: 16px; flex: none; }
.btn[data-more][aria-expanded=true] .ico { transform: rotate(180deg); }
.menu [role=menuitem].danger { color: var(--over); }
.menu [role=menuitem][aria-disabled=true] { cursor: default; color: var(--muted); }
.menu [role=menuitem][aria-disabled=true]:hover { background: none; }
.facts { display: flex; flex-wrap: wrap; margin: 0 0 22px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.facts > .fact { flex: 1 1 170px; min-width: 0; display: grid; align-content: start; gap: 2px; padding: 14px 20px; border-left: 1px solid var(--hair); }
.facts > .fact:first-child { border-left: 0; padding-left: 0; }
.facts > .fact dt { color: var(--muted); font-size: 13px; }
.facts > .fact dd { margin: 0; font: 600 20px/1.3 var(--fd); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.facts > .fact dd .fact-note { display: block; font: 400 13px/1.4 var(--fs); letter-spacing: 0; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: var(--gap-ui); align-items: start; }
.detail-main { min-width: 0; display: grid; gap: var(--gap-ui); }
.detail-main > .card { margin-bottom: 0; }
.detail-side { min-width: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); box-shadow: var(--sh); }
.side-sec { display: grid; gap: 8px; padding: 16px 18px; border-top: 1px solid var(--hair); min-width: 0; }
.side-sec:first-child { border-top: 0; }
.side-sec h3 { margin: 0; font-family: var(--fm); font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.side-sec .kv { font-size: 13.5px; gap: 4px 14px; }
.side-sec .stack { display: grid; gap: 2px; overflow-wrap: anywhere; }
.side-sec .stack .muted { font-size: 13px; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-list li { display: grid; gap: 1px; font-size: 13.5px; overflow-wrap: anywhere; }
.side-list li small { color: var(--muted); font-family: var(--fm); font-size: 11.5px; }
.side-list li[hidden] { display: none; }
.side-list li.err { color: var(--over); }
.more-toggle { justify-self: start; margin-left: -10px; }
.main-sec .sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.main-sec .sec-head h2 { margin: 0 auto 0 0; }
.main-sec .sec-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.main-sec.accent { border-color: var(--violet); }
details.main-sec > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; cursor: pointer; list-style: none; min-height: 32px; }
details.main-sec > summary::-webkit-details-marker { display: none; }
details.main-sec > summary { color: var(--ink); font-size: 14.5px; margin: 0; }
details.main-sec > summary h2 { margin: 0; font-size: 17px; }
details.main-sec > summary .muted { font-size: 13px; }
details.main-sec[open] > summary { margin-bottom: 12px; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.file-row > span { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.file-row small.mono { display: block; color: var(--muted); font-family: var(--fm); font-size: 11.5px; }
/* Reiter der Detailseiten (0.65.2, Rückmeldung 3): segmentierte Leiste statt Unterstrich – grauer Grund, der gewählte Reiter weiß
   mit Rand und Schatten, die Zahl als Chip; auf schmalen Bildschirmen über die ganze Breite */
.page-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: -4px 0 24px; padding: 4px; background: var(--soft); border: 1px solid var(--hair); border-radius: 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.page-tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.page-tabs button.active { color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh); }
.page-tabs button:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.page-tabs .count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.page-tabs button.active .count { background: var(--tint); color: var(--violet-deep); }
@media (max-width: 640px) { .page-tabs { width: 100%; } .page-tabs button { flex: 1 0 auto; padding: 8px 12px; } }
.tab-panel[hidden] { display: none; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .facts > .fact { flex-basis: 45%; padding: 10px 12px; }
  .facts > .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts > .fact:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .facts > .fact dd { font-size: 17px; }
  .detail-actions { width: 100%; }
  .side-sec { padding: 14px 16px; }
}
.pay-form { margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--violet); border-radius: var(--r-sm); }
.pay-form h3 { margin: 0 0 10px; font-size: 15px; }
.pay-form .actions { justify-content: flex-end; }
/* Kontakt als Detailseite (0.62.1) */
.contact-page .facts { margin-bottom: 18px; }
.open-list { list-style: none; margin: 0; padding: 0; }
.open-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.open-list li:first-child { border-top: 0; padding-top: 0; }
.open-list .od-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 1px; }
.open-list .od-main small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.open-list .od-amt { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
table.list.contact-docs td.sub-cell { color: var(--ink-2); overflow-wrap: anywhere; }
table.list.contact-docs td:first-child { white-space: nowrap; }
@media (max-width: 600px) {
  table.list.contact-docs td:nth-child(2), table.list.contact-docs th:nth-child(2), table.list.contact-docs td.sub-cell, table.list.contact-docs th:nth-child(3) { display: none; }
  table.list.contact-docs td:first-child { white-space: normal; }
  table.list.contact-docs td:first-child .mono { display: block; }
}
/* Zahlungen an der Rechnung auf schmalen Bildschirmen: Datum, Betrag und Aktion in einer Zeile, Angaben darunter (0.62.1) */
@media (max-width: 600px) {
  table.list.pay-list, table.list.pay-list tbody { display: block; }
  table.list.pay-list tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
  table.list.pay-list tr:last-child { border-bottom: 0; }
  table.list.pay-list td { padding: 0; border: 0; }
  table.list.pay-list td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
}
/* Verwaltung (0.62.2): Kontenliste mit Suche und Filter, Seite eines Kontos, Wechselnachweise */
.account-tools input[type=search] { flex: 1 1 320px; max-width: 520px; }
.seg button .count { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
table.list.accounts tbody tr { cursor: pointer; }
table.list.accounts tbody tr:hover td { background: var(--soft); }
table.list.accounts td { vertical-align: top; }
.account-link { font-weight: 600; color: var(--ink); }
.small-line { font-size: 12.5px; }
.chips-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
table.list.accounts td > div + div { margin-top: 2px; }
.list-count { margin: 10px 0 0; font-size: 13px; }
.account-out:not(:empty) { margin-bottom: 16px; }
.proof-row { padding: 10px 0; border-top: 1px solid var(--line); }
table.list.audit td { vertical-align: top; }
@media (max-width: 760px) {
  table.list.accounts, table.list.accounts tbody { display: block; width: 100%; min-width: 0; }
  table.list.accounts thead { display: none; }
  table.list.accounts tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
  table.list.accounts tr:last-child { border-bottom: 0; }
  table.list.accounts td { padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  table.list.accounts td:first-child { grid-column: 1 / -1; }
  table.list.accounts td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.accounts td.num { text-align: left; }
  table.list.accounts tbody tr:hover td { background: none; }
  .account-tools input[type=search] { flex-basis: 100%; max-width: none; }
  table.list.audit, table.list.audit tbody { display: block; width: 100%; min-width: 0; }
  table.list.audit thead { display: none; }
  /* erste Spalte höchstens halb so breit – mit „auto“ nahm ein langer Name (Wer) den Platz, der Zeitpunkt bekam 0 px (Klickprüfung 0.173.0) */
  table.list.audit tr { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.audit td { padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  table.list.audit td[data-label="Ereignis"], table.list.audit td[data-label="Konto"] { grid-column: 1 / -1; }
  table.list.audit td[data-label="IP-Adresse"]:empty { display: none; }
}
@media (min-width: 761px) { table.list.accounts td:first-child { min-width: 230px; } }
/* Verwaltung (0.62.3): Paketvergleich, Protokoll mit Filtern und lesbaren Angaben */
table.list.compare th[scope=col] { text-align: left; vertical-align: bottom; min-width: 128px; font-family: inherit; font-size: 14px; letter-spacing: 0; text-transform: none; white-space: normal; }
table.list.compare .cmp-name { font-weight: 600; color: var(--ink); }
table.list.compare .cmp-sub { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
table.list.compare tbody th[scope=row] { font-family: inherit; font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--hair); white-space: normal; }
table.list.compare tr.cmp-actions .btn { white-space: nowrap; }
table.list.compare th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 180px; }
table.list.compare tbody tr.cmp-sec th { padding-top: 18px; font-family: var(--fm); color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
table.list.compare tr.cmp-price td { font-weight: 600; font-variant-numeric: tabular-nums; }
table.list.compare .cmp-yes { color: var(--violet); font-weight: 600; }
table.list.compare .cmp-no { color: var(--muted); }
table.list.compare tr.cmp-actions td, table.list.compare tr.cmp-actions th { border-bottom: 0; padding-top: 12px; }
.audit-tools input[type=search] { flex: 1 1 280px; max-width: 420px; }
.audit-tools select { max-width: 260px; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.inline-field input { width: auto; }
.filter-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid var(--hair); border-radius: 999px; font-size: 12.5px; background: var(--soft); }
.filter-chip .chip-x { border: 0; background: none; padding: 0 6px; font-size: 15px; line-height: 1; color: var(--muted); cursor: pointer; }
.filter-chip .chip-x:hover { color: var(--ink); }
.audit-action { font-weight: 500; }
.audit-details dl { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 4px 0 0; font-size: 12.5px; }
.audit-details dl > div { display: inline-flex; gap: 4px; min-width: 0; }
.audit-details dt { color: var(--muted); }
.audit-details dt::after { content: ':'; }
.audit-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.audit-raw { margin-top: 4px; font-size: 12px; }
.audit-raw summary { color: var(--muted); cursor: pointer; }
.audit-raw code { display: block; margin-top: 4px; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 760px) {
  .audit-tools input[type=search], .audit-tools select { flex-basis: 100%; max-width: none; }
  /* feste erste Spalte schmal; scroll-padding hält Knöpfe beim Scrollen (Tastatur, scrollIntoView) rechts neben ihr statt darunter */
  table.list.compare th:first-child { width: 120px; min-width: 120px; max-width: 120px; overflow-wrap: anywhere; hyphens: auto; }
  table.list.compare tbody tr.cmp-sec th { letter-spacing: .04em; }
  .table-wrap.compare-wrap { scroll-padding-left: 120px; }
}
/* Module und Tarife in der Verwaltung (0.66.1): auf schmalen Bildschirmen je Zeile ein Block */
@media (max-width: 760px) {
  table.list.modules-table thead, table.list.tariff-plan thead { display: none; }
  table.list.modules-table tr, table.list.tariff-plan tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.modules-table td, table.list.tariff-plan td { border: 0; padding: 0; min-width: 0; }
  table.list.modules-table td:nth-child(-n+2), table.list.tariff-plan td:first-child { grid-column: 1 / -1; }
  table.list.modules-table td[data-label]:nth-child(n+3)::before, table.list.tariff-plan td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.list.modules-table input { min-width: 0; width: 100%; max-width: none !important; }
}
/* ELSTER (0.64.0): Einstellungen, Schreiben der Steuerverwaltung, Dialog zum Senden */
.elster-cert-form div.field { margin-bottom: 14px; }
.elster-cert-form div.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.elster-notice .actions { margin: 4px 0 14px; }
.elster-notice h3 { margin: 14px 0 4px; font-size: 14px; }
.elster-notice p { margin: 0 0 8px; }
.elster-letter h3 { margin: 16px 0 6px; font-size: 14.5px; }
.elster-letter p, .elster-letter li { font-size: 14px; line-height: 1.55; }
.elster-letter ul { margin: 0 0 8px; padding-left: 20px; }
.elster-send .kv { margin: 4px 0 14px; }
.elster-send .elster-pin { margin-top: 14px; }
.elster-send .elster-pin label.field { max-width: 380px; }
table.list.elster-values td:first-child { width: 60px; }
table.list.elster-tx .sub { display: block; }
/* ELStAM-Meldungen (0.69.2): Angaben als Liste statt Kennzahlen */
.elster-send .elster-plain { margin: 4px 0 14px; }
@media (max-width: 760px) {
  /* Übermittlungen an ELSTER als Block je Zeile (Tabelle in einer Karte) */
  .elster-tx, .elster-tx tbody { display: block; width: 100%; min-width: 0; }
  .elster-tx thead { display: none; }
  .elster-tx tr { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.compact.elster-tx td { padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .elster-tx td:empty { display: none; }
  .elster-tx .elster-files { display: inline; }
}
/* Stripe-Verbindung (0.68.0): Kennung des Stripe-Kontos in Plex Mono */
.stripe-conn .mono { font-family: var(--fm); font-size: 12px; }
/* Geschäftsführergehalt (0.69.0): Monate, Zeilen der Bezüge und Abzüge, Rechnung, Anmeldungen */
.gehalt .year-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.gehalt .year-nav strong { font-size: 17px; min-width: 3.5em; text-align: center; }
.gehalt .todo-list { margin: 0; padding-left: 18px; }
.gehalt .todo-list li { margin: 4px 0; }
.salary-lines { display: grid; gap: 8px; margin: 0 0 6px; }
.salary-line { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 0.8fr) auto; gap: 10px; align-items: end; }
.salary-line.sonst { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.9fr) auto; }
.salary-line label.field { margin: 0; min-width: 0; }
.salary-line input.num { text-align: right; }
.salary-line > .btn { margin-bottom: 4px; }
.salary-car { margin: 12px 0; }
.salary-run h3, .salary-dialog h3 { font-size: 14px; margin: 14px 0 6px; }
/* ELStAM (0.69.2): abgeholte Listen, Dialog „Monat beginnen“ */
table.list.elstam-lists .sub { display: block; }
table.list.elstam-lists .plain-list { margin: 0; padding-left: 16px; }
table.list.elstam-lists td.row-actions { white-space: nowrap; }
.month-start .month-steps label.check { display: flex; margin: 6px 0; }
.month-start .month-final { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-sm); }
.month-start .month-final .kv { margin: 0 0 8px; }
.month-start .month-results { margin: 12px 0 0; padding: 0; list-style: none; }
.month-start .month-results li { margin: 6px 0; }
.month-start .elster-pin label.field { max-width: 380px; }
table.list.salary-result tr.sum td { font-weight: 600; border-top: 1px solid var(--ink); }
table.list.salary-result tr.total td { font-size: 16px; }
table.list.salary-result tr.group td { padding-top: 14px; font-size: 13px; border-bottom: none; }
table.list.salary-result tr.group:first-child td { padding-top: 4px; }
table.list.salary-result td.num, table.list.salary-booking td.num { white-space: nowrap; }
@media (max-width: 760px) {
  .salary-line, .salary-line.sonst { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .salary-line > .btn { justify-self: end; }
  /* Monate, Posten und Anmeldungen als Block je Zeile */
  .salary-months, .salary-months tbody, .salary-filings, .salary-filings tbody, .salary-items, .salary-items tbody { display: block; width: 100%; min-width: 0; }
  .salary-months thead, .salary-filings thead, .salary-items thead { display: none; }
  .salary-months tr, .salary-filings tr, .salary-items tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.salary-months td, table.list.salary-filings td, table.list.compact.salary-items td { padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .salary-months td:first-child, .salary-filings td:first-child, .salary-items td:first-child { grid-column: 1 / -1; }
  .salary-months td[data-label]:not(:first-child)::before, .salary-filings td[data-label]:not(:first-child)::before, .salary-items td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .salary-months td:empty, .salary-filings td:empty, .salary-items td:empty { display: none; }
  .salary-months td:last-child, .salary-filings td:last-child, .salary-items td:last-child { grid-column: 1 / -1; }
  /* abgeholte ELStAM-Listen als Block je Zeile (0.69.2) */
  .elstam-lists, .elstam-lists tbody { display: block; width: 100%; min-width: 0; }
  .elstam-lists thead { display: none; }
  .elstam-lists tr { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.list.compact.elstam-lists td { padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; white-space: normal; }
  .elstam-lists td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .elstam-lists td:empty { display: none; }
  .salary-months td:last-child .btn, .salary-filings td:last-child .btn, .salary-items td:last-child .btn { white-space: nowrap; }
}

/* Eigene Felder (0.83.0): Seite „Eigene Felder“, Eingaben an Karte und Kontakt, Platzhalter-Listen */
.field-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.field-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); }
.field-main { min-width: 0; overflow-wrap: anywhere; }
.field-main code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.field-main small.block { display: block; margin-top: 2px; }
.field-actions { display: flex; gap: 6px; flex: none; }
.field-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; } /* Vorschläge für allgemeine Felder (0.85.0) */
.felder-delete { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap-ui); }
.custom-fields > * { min-width: 0; }
.field-block h3 { margin: 16px 0 6px; font-size: 15px; }
.placeholders-custom h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) {
  .field-item { flex-direction: column; align-items: stretch; }
  .field-actions { justify-content: flex-end; }
  .custom-fields { grid-template-columns: minmax(0, 1fr); }
}

/* WhatsApp (0.87.0): Beispiel unter den Texten, Schalter je Phase */
.wa-sample { white-space: pre-wrap; font-size: 13px; margin: -4px 0 12px; }
/* E-Mail-Vorlagen (0.117.0, Plan 4.70): eigene Vorlagen je Reiter, Verweis an Phasen und Nachfass-E-Mails */
.own-templates { list-style: none; margin: 0 0 12px; padding: 0; }
.own-templates li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.own-templates li > div:first-child { min-width: 0; flex: 1 1 260px; }
.own-templates .actions { display: inline-flex; gap: 6px; }
.tpl-ref { margin: -6px 0 10px; }
.tpl-ref .btn.link { padding: 0; min-height: 0; }
.tpl-pick { margin-bottom: 10px; }
/* Aufgaben beim Eintritt (0.119.0, Plan 5.17) */
.task-tpl { border-top: 1px solid var(--hair); padding: 12px 0 4px; }
.task-tpl:first-child { border-top: 0; padding-top: 4px; }
.task-tpl-head { margin-bottom: 6px; }
.task-tpl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 640px) { .task-tpl-grid { grid-template-columns: minmax(0, 1fr); } }
.setup-block .check.wa-notice { margin-top: 14px; }
/* Markenfarbe (0.109.0, Plan 4.64): Vorschau der Stufen unter Unternehmen (Werte als Variablen aus core/brand.js) und Anzeige im Belegdesign */
.brand-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.brand-sample .b-btn { display: inline-block; padding: 8px 16px; border-radius: var(--r-pill); background: var(--b, var(--ink)); color: var(--o, var(--surface)); font-weight: 600; font-size: 14px; }
.brand-sample .b-link { color: var(--t, var(--ink)); text-decoration: underline; font-size: 14px; }
.brand-sample .b-tint { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--g, var(--soft)); color: var(--gt, var(--ink)); font-size: 13px; font-weight: 600; }
.brand-sample .b-line { display: inline-block; width: 64px; height: 0; border-top: 2px solid var(--l, var(--ink)); }
.brand-sample > small { flex-basis: 100%; }
.brand-info { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.swatch.static { cursor: default; width: 22px; height: 22px; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
/* Formulare (0.120.0, Plan 5.10 erweitert): Formbuilder, Auswertung, Eingänge */
.fb-fields { display: grid; gap: 10px; margin: 10px 0; }
.fb-field { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; display: grid; gap: 8px; background: var(--surface); }
.fb-field .fb-head { display: flex; align-items: center; gap: 6px; }
.fb-field .fb-head .grow { flex: 1; }
.fb-field fieldset.fb-types { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 12px 10px; margin: 0; display: grid; gap: 4px; }
.fb-field .invalid { border-color: var(--over); }
.fb-add { align-items: center; gap: 8px; }
fieldset.kind-choice { border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.fb-stat { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.fb-stat h3 { font-size: 15px; margin: 0 0 2px; }
table.fb-counts td { padding: 3px 8px 3px 0; }
td.fb-bar-cell { width: 40%; }
.fb-bar { display: block; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.fb-bar-fill { display: block; height: 100%; background: var(--accent-strong, var(--ink)); }
.fb-texts { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
details.submission summary { cursor: pointer; }
details.submission dl.sub-facts { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 4px 12px; margin: 10px 0; }
details.submission dl.sub-facts dt { color: var(--muted); }
details.submission dl.sub-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Import: Zuordnung der Spalten (0.122.0, Wechselhilfe) */
table.import-map select { max-width: 260px; }
table.import-map tr.ignored td:first-child { color: var(--muted); text-decoration: line-through; }

/* Bild je Terminart (0.126.0): Vorschau im Dialog der Terminart */
.type-image-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0; }
.type-image-preview { max-width: 240px; max-height: 120px; width: auto; height: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); }

/* Mit KI verbessern (0.128.0): Knopf unter dem Feld, Auswahl, Vorschlag neben dem Original */
.ki-improve { display: block; margin-top: 4px; }
.ki-improve-menu { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 6px; vertical-align: middle; }
.ki-improve-panel { display: block; }
.ki-suggest { display: block; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--violet-light); border-radius: 8px; background: var(--soft); }
.ki-suggest-head { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
/* Kennzeichnung von KI-Ergebnissen (0.195.0, C-8): Zeichen „KI-Vorschlag“ (neutral wie .badge), Hinweis beim Übernehmen */
.badge.ki-mark { white-space: nowrap; vertical-align: baseline; }
.ki-result-head { margin: 0 0 6px; }
.ki-take-hint { display: block; margin-top: 4px; }
.ki-suggest-text { display: block; white-space: pre-wrap; font-size: 14px; color: var(--ink); }
.ki-suggest .actions { display: flex; gap: 8px; margin-top: 8px; }
/* Sprachnotiz (0.130.0, Plan 7.3): Aufnahme mit Zeit, Vorschläge je eigene Karte */
.voice-rec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.voice-time { font-family: var(--fm); font-size: 14px; color: var(--ink-2); }
.voice-rec[data-voice-state="recording"] .voice-time { color: var(--ink); font-weight: 600; }
.voice-result .voice-item { margin: 10px 0; padding: 12px 14px; }
.voice-result .voice-item h3 { margin: 0 0 6px; font-size: 14px; }
.voice-transcript { margin: 8px 0; font-size: 13.5px; }
.voice-transcript p { white-space: pre-wrap; margin: 6px 0 0; color: var(--ink-2); }
.deal-history-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ki-suggest-note { display: block; margin-top: 6px; }
.ki-suggest h4 { font-size: 13px; margin: 10px 0 4px; }
.ki-suggest ul { margin: 0; padding-left: 20px; font-size: 14px; }
.ki-suggest p { margin: 4px 0; font-size: 14px; }

/* Verträge (0.131.0, Plan 8.3): Stand, Anlagen, Feld zum Zeichnen */
.agreement-facts { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 16px; font-size: 14px; }
.agreement-facts dt { color: var(--ink-2); min-width: 0; overflow-wrap: break-word; }
.agreement-facts dd { margin: 0; overflow-wrap: anywhere; }
.agreement-files { margin: 12px 0; }
.agreement-files h3 { font-size: 14px; margin: 0 0 6px; }
.agreement-files .file-list, [data-agreement-templates] .file-list { list-style: none; padding: 0; margin: 0 0 8px; }
.agreement-files .file-list li, [data-agreement-templates] .file-list li { padding: 4px 0; border-bottom: 1px solid var(--hair); }
.sign-pad-app { display: grid; gap: 6px; max-width: 420px; margin: 8px 0 12px; }
.sign-canvas { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); touch-action: none; }
.sign-pad-app .btn { justify-self: start; }
/* Liquidität (0.133.0, Plan 8.5): Stand am Ende je Zeitraum als Balken, Zahlungen je Zeitraum aufklappbar */
.liq-chart { margin: 8px 0 12px; }
.liq-chart svg { display: block; width: 100%; height: 180px; }
.liq-bar { fill: var(--ink-2); }
.liq-bar.neg { fill: var(--over); }
.liq-zero { stroke: var(--line-strong); stroke-width: 1; }
.liq-table tbody tr[tabindex] { cursor: pointer; }
.liq-table tr.liq-detail td { background: var(--hair); }
.liq-items { list-style: none; padding: 0; margin: 0; }
.liq-items li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.liq-items .liq-date { min-width: 88px; color: var(--muted); font-variant-numeric: tabular-nums; }
.liq-items .liq-amount { margin-left: auto; }
[data-liquidity-balance] ul.liq-accounts { list-style: none; padding: 0; margin: 0 0 12px; }
/* Liquidität (0.134.0): geplante Investitionen, Vergleichsrechner */
.liq-invest { list-style: none; padding: 0; margin: 0; }
.liq-invest > li { padding: 10px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 2px; }
.liq-invest .actions { margin-top: 4px; }
table.compare th[scope], table.compare tbody th { text-align: left; font-weight: 500; }

/* Newsletter (0.143.0): Themen, Formulare, Bedingungen für Bestandskunden */
.nl-topics, .nl-forms { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.nl-conditions { border: 1px solid var(--hair); border-radius: var(--r); padding: 10px 14px 6px; margin: 14px 0; display: grid; gap: 4px; min-width: 0; }
.nl-conditions legend { font-weight: 600; padding: 0 6px; }
/* Vorschau des Imports (Durchsicht 0.143.0): klein, rollt auf dem Handy waagrecht */
.nl-preview { margin: -4px 0 12px; overflow-x: auto; }
.nl-preview .table { font-size: 13px; }
.nl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.nl-head h2 { margin: 0; }
.nl-blocks { display: grid; gap: 8px; margin: 8px 0 10px; }
.nl-block { align-items: flex-start; }
.nl-block .field-main { display: grid; gap: 6px; min-width: 0; }
.nl-block .field-main .field { margin: 0; }
.nl-add { justify-content: flex-start; flex-wrap: wrap; margin: 0 0 16px; }
.nl-images { border-top: 1px solid var(--hair); padding-top: 12px; margin-bottom: 12px; }
.nl-image-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.nl-image-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.nl-image-list img { border: 1px solid var(--hair); border-radius: var(--r-sm); height: auto; max-height: 72px; object-fit: contain; background: var(--soft); }
.nl-preview-frame { height: 70vh; min-height: 420px; }
.nl-record { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; color: var(--muted); }
/* Kataloge der Lieferanten in der Artikelsuche (0.149.0) */
.suggest-group { padding: 6px 12px 2px; font-size: 12px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--hair); }
.datanorm-dialog progress { width: 100%; }

/* Fotos (0.150.0): Anfrageformular und Projekt – Vorschau als Kacheln, Auswahl über einen Knopf (das Dateifeld bleibt erreichbar) */
.photo-picker { display: grid; gap: 8px; }
.photo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photo-item { position: relative; width: 96px; height: 96px; border-radius: var(--r-sm); overflow: hidden; background: var(--soft); border: 1px solid var(--hair); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 72%, transparent); color: var(--surface); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.photo-remove:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.photo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.photo-errors:empty { display: none; }
.photo-errors { color: var(--over); font-size: 13.5px; }
.photo-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.photo-item img.broken { visibility: hidden; }
.photo-view { display: grid; gap: 8px; }
.photo-full { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-sm); background: var(--soft); justify-self: center; }
.project-site { border: 1px solid var(--hair); border-radius: var(--r); padding: 8px 14px 4px; margin: 4px 0; }
.project-site legend { font-weight: 600; padding: 0 4px; }
.project-photos { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 10px; }
/* Aufmaß (0.151.0): Zeilen mit Bezeichnung, Anzahl, Länge, Breite, Höhe, Abzug, Menge */
.measure-rows { display: grid; gap: 6px; margin: 8px 0; }
.measure-row { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(4, 74px) 78px 84px 32px; gap: 6px; align-items: center; }
.measure-row input[type=text] { min-width: 0; width: 100%; }
.measure-head { font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--hair); padding-bottom: 4px; }
.measure-head .num, .measure-qty { text-align: right; }
.measure-qty { font-variant-numeric: tabular-nums; }
.measure-minus { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.measure-row input.invalid { border-color: var(--over); }
.measure-msg:empty { display: none; }
.measure-msg { color: var(--over); }
.measure-total { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink); padding-top: 8px; margin-top: 6px; }
.measure-sum { font-variant-numeric: tabular-nums; }
.line-measure { white-space: nowrap; }
@media (max-width: 720px) {
  .measure-head { display: none; }
  .measure-row { grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--hair); padding-bottom: 8px; }
  .measure-row > input[type=text]:first-child { grid-column: 1 / -1; }
  .measure-row > .measure-minus { grid-column: span 2; }
}
/* Arbeitsbericht (0.152.0): Material mit Suche und freier Zeile, Beschreibung mit Zeilenumbrüchen */
.report-material-add { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 8px 0 4px; }
.report-material-add .suggest-wrap { flex: 1 1 260px; min-width: 0; }
.report-materials input.num { width: 96px; }
.report-materials input[type=text]:not(.num) { width: 100%; min-width: 140px; }
.report-notes { white-space: pre-line; overflow-wrap: anywhere; }
/* Nachkalkulation (0.153.0): Soll, Ist, Abweichung; Rohertrag als letzte Zeile hervorgehoben */
table.costing th[scope=row] { font-weight: 500; text-align: left; }
table.costing tr.costing-margin th, table.costing tr.costing-margin td { border-top: 1px solid var(--ink); font-weight: 600; }
/* Eigenbelege (0.161.0, Plan 4.82): Unterschrift des Verkäufers und Beilagen im Editor */
.sign-done { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.sign-preview { width: 160px; max-width: 45%; height: auto; border: 1px solid var(--hair); border-radius: 6px; background: var(--surface); }
.attachment-list { list-style: none; padding: 0; margin: 0 0 10px; }
.attachment-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.attachment-list li select { max-width: 170px; }
.attachment-list li .btn.link { overflow-wrap: anywhere; text-align: left; }
.attachment-preview { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.attachment-label { max-width: 200px; }
/* Speicher aufräumen (0.161.0, Plan 4.83) */
[data-cleanup] td.num, [data-cleanup] td .btn { white-space: nowrap; }
/* Jahresabschluss (0.162.0, B.9 Stufe 1): Schritte, Bilanz und GuV mit Kontennachweis */
[data-yearend-steps] .inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
[data-yearend-steps] .input-amount { width: 120px; text-align: right; }
[data-yearend-steps] td.num, [data-yearend-steps] td .btn { white-space: nowrap; }
[data-yearend-statements] table.bilanz td.num, [data-yearend-statements] table.guv td.num { white-space: nowrap; }
[data-yearend-statements] tr.sub td:first-child { padding-left: 20px; }
[data-yearend-statements] tr.total td { border-top: 1px solid var(--ink); }
details.nachweis { margin-top: 4px; font-size: 13px; }
details.nachweis > summary { cursor: pointer; color: var(--muted); }
details.nachweis table { margin-top: 4px; }
.accrual-row { align-items: end; margin-bottom: 8px; }
.accrual-row .inline-form { display: flex; gap: 6px; align-items: center; }
