/* 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; }
.side .brand .tagline { font-family: var(--fm); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); 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; }
.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; }
.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; }
.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; }
.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; }
.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; }

/* ---------- Mobil: Kopfleiste kompakt, Leiste unten (Übersicht, Rechnungen, „+“, Geld, Mehr), Streifen oben; „Mehr“ öffnet die
   Navigation als Blatt ---------- */
@media (max-width: 900px) {
  .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); }
  .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; 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; }
  .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: 18px 16px 14px; }
  .page-head .actions, .page-head .page-actions { margin-left: 0; width: 100%; }
  /* die Hauptaktion schwebt als runder Verlaufs-Button unten rechts über der Leiste */
  .page-head .actions .btn.primary, .page-head .page-actions .btn.primary { position: fixed; right: 16px; bottom: 72px; z-index: 24; min-height: 48px; padding: 12px 22px; font-size: 15px; box-shadow: var(--sh-v), var(--sh-float); }
  .view { padding-bottom: 56px; }
  /* Speicherleiste über der Leiste unten */
  .savebar { bottom: 57px; }
  h1 { font-size: 24px; }
}

/* ---------- 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); }
/* 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; }

/* 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; }
}

.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: 26px; }
.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; }
.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); }
.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; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); } .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; }
.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); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 900px) { #toasts, #toasts[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: 900px) { .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; }
.placeholders { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; margin: 0 0 16px; }
.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); }
@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; }
.editor-side .card { margin-bottom: 0; }
@media (max-width: 1150px) { .editor-grid { grid-template-columns: minmax(0, 1fr); } .editor-side { position: static; } }
.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 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; gap: 10px; align-items: center; font-size: 12.5px; margin-top: 3px; }
.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; }
.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; }
.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; }
.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 80 % in Zeitfarbe, ab 100 % 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="80"] > span { background: var(--due); }
.quota-meter[data-level="100"] > span { background: var(--over); }
.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%; }
.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); }
.role-bar b { font-weight: 600; }
.role-bar .actions { margin-left: auto; display: flex; gap: 8px; }
/* 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; } }
@media (max-width: 900px) { .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; }
.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); }
.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; }
/* 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); }
.stage-list { display: grid; gap: 8px; }
.stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(170px, auto); gap: 8px; align-items: center; }
.stage-row .stage-prob { display: flex; align-items: center; gap: 6px; }
.stage-row .stage-tools { display: flex; gap: 4px; align-items: center; }
.stage-row.invalid input { border-color: var(--over); }
.stage-row .stage-extra { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.stage-row .stage-extra .check.small { margin: 0; font-size: 13px; }
.fu-steps { display: grid; gap: 8px; margin: 8px 0 4px; }
.fu-step summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.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; }
/* 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; }
  .stage-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .stage-row .stage-tools { grid-column: 1 / -1; }
  .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: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.appt-dialog .kv dt { color: var(--muted); }
.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-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; }
  .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); }
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; }
/* 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; }
@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; }
.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: 900px) { .page-head .actions.dash-actions { display: none; } }

/* ---------- 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; }
  table.list.audit tr { display: grid; grid-template-columns: auto 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; }
  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; }
@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; }
