/* ==========================================================================
   Rezeptauswertung – Design
   Basis: DESIGN-SYSTEM-ADVANCED.md (Enterprise-Stil), Farbwelt als grüne Variante
   („Enterprise-Grüngrau“ statt Blaugrau). Farbe funktional (Status, Aktion), nie dekorativ.
   Offline/DSGVO: keine Google Fonts / kein Font Awesome – Systemschrift + eigene SVG-Icons.
   ========================================================================== */
:root {
  /* Primär-/Sekundärfarben (grüne Variante) */
  --primary-light: #e5efe6;
  --primary: #3f6b4c;
  --primary-dark: #284b33;
  --secondary-light: #e3ebe4;
  --secondary: #6b8f74;
  --secondary-dark: #4a6b53;
  /* Statusfarben */
  --success-light: #ebf4e8;
  --success: #569948;
  --success-dark: #25762a;
  --warning-light: #f9f4db;
  --warning: #f1c150;
  --warning-dark: #876611;
  --danger-light: #ffe9e9;
  --danger: #d24242;
  --danger-dark: #8a3c3c;
  --info-light: #e5efe6;
  --info: #5f9a6c;
  --info-dark: #3d6b48;
  /* Neutrale Graustufen, leicht grün getönt (50 = hell → 900 = dunkel) */
  --gray-50: #f6f9f6;
  --gray-100: #edf2ee;
  --gray-200: #dbe3dc;
  --gray-300: #c3cec5;
  --gray-400: #8d9a90;
  --gray-500: #626f66;
  --gray-600: #49554c;
  --gray-700: #363f39;
  --gray-800: #2a312c;
  --gray-900: #3b4740;
  /* Hintergründe */
  --bg-page: #e7eee8;
  --bg-card: #f5f8f5;
  --bg-sidebar: #34463a;
  --bg-header: #f5f8f5;
  --bg-hover: var(--gray-50);
  --bg-selected: var(--primary-light);
  /* Text */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --text-inverse: #ffffff;
  /* Ränder */
  --border-color: var(--gray-200);
  --border-light: var(--gray-100);
  --border-top: #cddbd0;
  /* Schatten – grün getönt im Light Mode */
  --shadow-sm: 0 1px 2px rgba(40, 80, 52, .08);
  --shadow-md: 0 4px 12px rgba(40, 80, 52, .12);
  --shadow-lg: 0 12px 24px rgba(40, 80, 52, .15);
  --shadow-xl: 0 20px 40px rgba(40, 80, 52, .18);
  /* Radius */
  --radius: 4px;
  --radius-sm: 2px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  /* Typografie (DM Sans / JetBrains Mono nur, falls lokal installiert) */
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --serif: var(--font);
  /* Layout */
  --sidebar: 256px;
  --header-height: 60px;
  /* Transitions */
  --transition: all .25s cubic-bezier(.4, 0, .2, 1);
  --transition-fast: all .15s cubic-bezier(.4, 0, .2, 1);
  --transition-spring: all .4s cubic-bezier(.34, 1.56, .64, 1);
  /* Sidebar-Text (dunkler Grund) */
  --side-text: #e6efe8;
  --side-muted: #a9bdae;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active: rgba(255, 255, 255, .10);
  --side-accent: #8cc79a;
  --tip-bg: #26302a;
  --tip-text: #eef4ef;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-light: #34503d; --primary: #7f9884; --primary-dark: #9db3a2;
    --secondary-light: #2d3a31; --secondary: #7d9784; --secondary-dark: #a7bcac;
    --success-light: #213326; --success: #74b866; --success-dark: #9ad18e;
    --warning-light: #3a3219; --warning: #e9bb4f; --warning-dark: #f0cf7a;
    --danger-light: #3d2323; --danger: #e47070; --danger-dark: #f0a0a0;
    --info-light: #233328; --info: #7fb98b; --info-dark: #a9d5b2;
    --gray-50: #272b28; --gray-100: #303631; --gray-200: #3b423d; --gray-300: #47504a; --gray-400: #6a776e;
    --gray-500: #8a978e; --gray-600: #9aa79e; --gray-700: #aab7ae; --gray-800: #bac4bd; --gray-900: #d0dbd3;
    --bg-page: #212422; --bg-card: #1f2120; --bg-sidebar: #1c1e1d; --bg-header: #1d1f1e;
    --text-primary: #e0ebe3; --text-secondary: #8a978e; --text-muted: #a0aca4; --text-inverse: #142019; --text-inverse: #142019;
    --border-color: #333a35; --border-light: #3d443f; --border-top: #4a564e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-md: 0 4px 12px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 24px rgba(0, 0, 0, .5); --shadow-xl: 0 20px 40px rgba(0, 0, 0, .6);
    --tip-bg: #343b36; --tip-text: #eef4ef;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary-light: #34503d; --primary: #7f9884; --primary-dark: #9db3a2;
  --secondary-light: #2d3a31; --secondary: #7d9784; --secondary-dark: #a7bcac;
  --success-light: #213326; --success: #74b866; --success-dark: #9ad18e;
  --warning-light: #3a3219; --warning: #e9bb4f; --warning-dark: #f0cf7a;
  --danger-light: #3d2323; --danger: #e47070; --danger-dark: #f0a0a0;
  --info-light: #233328; --info: #7fb98b; --info-dark: #a9d5b2;
  --gray-50: #272b28; --gray-100: #303631; --gray-200: #3b423d; --gray-300: #47504a; --gray-400: #6a776e;
  --gray-500: #8a978e; --gray-600: #9aa79e; --gray-700: #aab7ae; --gray-800: #bac4bd; --gray-900: #d0dbd3;
  --bg-page: #212422; --bg-card: #1f2120; --bg-sidebar: #1c1e1d; --bg-header: #1d1f1e;
  --text-primary: #e0ebe3; --text-secondary: #8a978e; --text-muted: #a0aca4;
  --border-color: #333a35; --border-light: #3d443f; --border-top: #4a564e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-md: 0 4px 12px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 24px rgba(0, 0, 0, .5); --shadow-xl: 0 20px 40px rgba(0, 0, 0, .6);
  --tip-bg: #343b36; --tip-text: #eef4ef;
  color-scheme: dark;
}
/* Kurznamen der Komponenten → Design-Tokens (gelten in Light & Dark automatisch) */
:root, :root[data-theme] {
  --bg: var(--bg-page);
  --surface: var(--bg-card);
  --surface-2: var(--gray-100);
  --border: var(--border-color);
  --border-strong: var(--gray-300);
  --text: var(--text-primary);
  --text-2: var(--gray-600);
  --muted: var(--text-secondary);
  --primary-hover: var(--primary-dark);
  --primary-soft: var(--primary-light);
  --primary-text: var(--primary-dark);
  --on-primary: var(--text-inverse);
  --lime: var(--info);
  --lime-soft: var(--info-light);
  --olive: var(--secondary-dark);
  --warn: var(--warning-dark);
  --warn-soft: var(--warning-light);
  --danger-soft: var(--danger-light);
  --track: var(--gray-200);
  --hl: var(--bg-hover);
  --ink: var(--text-primary);
  --shadow-pop: var(--shadow-lg);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font: 700 1.65rem/1.2 var(--font); letter-spacing: -.4px; color: var(--text); }
:root[data-theme="dark"] h1 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) h1 { color: var(--text); } }
h2 { font: 600 1.05rem/1.3 var(--font); letter-spacing: -.1px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: .9rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary-text); }
button, input, select { font: inherit; color: inherit; }
.ic { flex: none; vertical-align: middle; }
.rot90 { transform: rotate(90deg); }
.rot-90 { transform: rotate(-90deg); }
.muted { color: var(--muted); }
.small { font-size: calc(12.5px * var(--fs)); }
.mono { font-family: var(--mono); font-size: calc(12px * var(--fs)); }
.warn-text { color: var(--warn); font-weight: 600; }
.print-only { display: none; }
.hidden { visibility: hidden; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--primary)); flex: none; }
.t-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.shell { min-width: 0; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; height: var(--header-height); padding: 0 2.5rem; background: var(--bg-header); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); min-width: 0; }
.crumb b { color: var(--text); font-weight: 600; white-space: nowrap; }
.crumb .sep { color: var(--gray-300); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hdr-note { display: inline-flex; align-items: center; gap: 6px; padding: .25rem .65rem; border-radius: var(--radius-full); background: var(--success-light); color: var(--success-dark); font-size: .72rem; font-weight: 600; }
.app-header .menu-btn { display: none; }
.nav-backdrop { display: none; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 0 14px 18px; background: var(--bg-sidebar); color: var(--side-text); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--header-height); padding: 0 8px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand b { display: block; font: 700 .95rem/1.2 var(--font); letter-spacing: -.2px; }
.brand span:not(.brand-logo) { font-size: .72rem; color: var(--side-muted); letter-spacing: .3px; }
.brand-logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--side-accent); color: #1d2b21; font: 700 15px/1 var(--font); flex: none; }
.theme-btn { color: var(--muted); }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.sidebar-foot .btn-primary { background: var(--side-accent); border-color: var(--side-accent); color: #1d2b21; }
.sidebar-foot .btn-primary:hover { background: #a3d4ae; border-color: #a3d4ae; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: .55rem .8rem; border-radius: var(--radius-md); color: var(--side-muted); text-decoration: none; font-weight: 500; font-size: .875rem; transition: var(--transition-fast); }
.nav a:hover { background: var(--side-hover); color: var(--side-text); }
.nav a.active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--side-accent); }
.nav a.active .ic { color: var(--side-accent); }
.nav a > span:first-child { display: flex; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: var(--radius-full); background: #f9f4db; color: #876611; font-size: .7rem; font-weight: 700; line-height: 19px; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.backup-hint { font-size: calc(12px * var(--fs)); color: var(--side-muted); display: flex; align-items: center; gap: 6px; justify-content: center; }
.backup-hint a { color: var(--side-muted); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.backup-hint a.warn { color: #f1c150; }
.main { min-width: 0; padding: 2rem 2.5rem 4rem; }
.view { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 4px; }
.page-h > div:first-child { max-width: 760px; }
.page-h p.muted { margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.section-h h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 36px; padding: 0 1rem; border-radius: var(--radius); border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; font-size: .875rem; cursor: pointer; white-space: nowrap; transition: var(--transition-fast); }
.btn:hover { background: var(--surface-2); border-color: var(--secondary); }
.btn:active { box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-soft { background: var(--primary-light); border-color: transparent; color: var(--primary-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); }
.btn-danger-soft { background: var(--danger-light); border-color: transparent; color: var(--danger-dark); }
.btn-lg { height: 44px; padding: 0 1.75rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 .875rem; font-size: .8rem; }
.btn-t:hover { border-color: var(--c); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: var(--transition-fast); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-light); color: var(--danger-dark); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.link-btn { border: 0; background: none; color: var(--primary-text); font-weight: 600; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.link-btn:hover { text-decoration-color: currentColor; }
.p-name { border: 0; background: none; padding: 0; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.p-name:hover { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.chip-btn { border: 1.5px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-full); padding: 2px 10px; font-size: .75rem; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary-text); }

/* ---------- Filter / Tabs ---------- */
.filterbar, .toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filterbar { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.fb-right, .tb-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pills { display: flex; gap: 2px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 .9rem; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--muted); font-weight: 500; font-size: .82rem; cursor: pointer; transition: var(--transition-fast); }
.pill:hover { color: var(--text); background: var(--surface-2); }
.pill.on { color: var(--on-primary); background: var(--primary); font-weight: 600; }
.pill.on em { color: inherit; opacity: .8; }
.pill em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; }
.pill .warn-em { color: var(--warn); }
.select { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px 0 .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); font-size: .8rem; transition: var(--transition-fast); }
.select:hover, .search:hover, .input:hover, .money:hover { border-color: var(--secondary); }
.select select { border: 0; background: transparent; height: 100%; padding: 0 4px; color: var(--text); font-weight: 500; font-size: .85rem; cursor: pointer; outline: none; max-width: 230px; }
.select select option { background: var(--surface); color: var(--text); }
.select:focus-within, .search:focus-within, .input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); max-width: 400px; transition: var(--transition-fast); }
.search input { flex: 1; border: 0; outline: none; background: transparent; height: 100%; min-width: 0; color: var(--text); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: var(--radius); font-weight: 500; font-size: .82rem; color: var(--muted); cursor: pointer; transition: var(--transition-fast); }
.seg button.on { background: var(--surface); color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow-sm); }
.seg.small button { padding: 3px 9px; font-size: calc(12.5px * var(--fs)); }
.input { height: 36px; padding: 0 .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); min-width: 0; transition: var(--transition-fast); }
.tabs-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { --c: var(--primary); display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 1.1rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; font-weight: 500; color: var(--muted); cursor: pointer; transition: var(--transition-fast); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--c); }
.tabs-row .seg { margin-bottom: 6px; }

/* ---------- Karten & Kennzahlen ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.5rem 1.75rem; min-width: 0; }
.card::before, .kpis::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(90deg, var(--primary), var(--info)); pointer-events: none; }
.card.danger-zone::before { background: var(--danger); }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h.pad { padding: 1.4rem 1.75rem 0; margin-bottom: 10px; }
.card-h p { margin-top: 3px; max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; }
.kpis { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 1.15rem 1.4rem; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; }
.kpi > b { font-size: 1.6rem; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.kpi.accent > b { color: var(--c, var(--text)); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: .75rem; font-weight: 700; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.none { color: var(--muted); font-weight: 500; }
.notice, .banner { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.15rem; border-radius: var(--radius-md); background: var(--info-light); border: 0; border-left: 3px solid var(--info); font-size: .85rem; color: var(--text); }
.notice.warn, .banner { border-left-color: var(--warning); background: var(--warning-light); }
.notice > .ic { color: var(--info-dark); }
.notice.warn > .ic, .banner > .ic { color: var(--warning-dark); }
.notice > span, .banner > div { flex: 1; }

/* Therapeutinnen-Karten */
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.tcard { display: flex; flex-direction: column; gap: 6px; padding: 1.2rem 1.35rem .8rem; background: var(--surface); border: 1px solid var(--border-light); border-left: 3px solid var(--c); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); min-width: 0; transition: var(--transition-fast); }
.tcard:hover { box-shadow: var(--shadow-md); }
.tcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tcard .t-name { font: 600 1rem/1.2 var(--font); }
.tcard .dot { background: var(--c); }
.tc-rev { font-size: 1.75rem; font-weight: 700; letter-spacing: -.5px; margin-top: 4px; }
.tc-sub { font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.tc-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.tc-meta dt { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tc-meta dd { margin: 0; font-weight: 600; }
.tc-spark { margin: 2px -4px 0; }
.spark { display: block; }
.avatar { --c: var(--primary); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1.5px solid var(--c); color: var(--text); font-weight: 600; font-size: .75rem; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: calc(11.5px * var(--fs)); }

/* ---------- Monatsabschluss ---------- */
.cockpit { padding: 0; }
.ck-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); background: var(--primary-light); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.ck-nav { display: flex; align-items: center; gap: 6px; }
.ck-nav h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px; }
.ck-kicker { display: block; font-size: .68rem; color: var(--primary-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.ck-main { padding: 18px 20px; min-width: 0; }
.ck-total { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ck-total b { font-size: 1.75rem; font-weight: 700; letter-spacing: -.5px; }
.ck-total .muted { width: 100%; margin-bottom: -10px; }
.ck-cmp { font-size: calc(13px * var(--fs)); color: var(--muted); }
.ck-side { list-style: none; margin: 0; padding: 8px 0; border-left: 1px solid var(--border); }
.ck-side li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.ck-side li:last-child { border-bottom: 0; }
.ck-side span { font-size: calc(13px * var(--fs)); color: var(--text-2); }
.ck-side b { font-size: 1.05rem; font-weight: 700; text-align: right; }
.ck-side em { grid-column: 1 / -1; font-style: normal; font-size: calc(12px * var(--fs)); color: var(--muted); }
.ck-side li.warn b { color: var(--warn); }
.ck-side li.ok b { color: var(--success); }
.row-none td { color: var(--muted); }
.mini-goal { display: flex; align-items: center; gap: 8px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.mg-bar { flex: 1; min-width: 60px; height: 6px; background: var(--track); border-radius: var(--radius-full); overflow: hidden; }
.mg-bar i { display: block; height: 100%; }

/* ---------- Ziele ---------- */
.empty-goals { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.goal-list { display: flex; flex-direction: column; }
.goal-row { display: grid; grid-template-columns: 150px minmax(120px, 1fr) 190px 120px 200px; gap: 16px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); font-size: calc(13px * var(--fs)); }
.goal-row:first-child { border-top: 0; }
.goal-bar { position: relative; height: 10px; background: var(--track); border-radius: var(--radius-full); }
.goal-bar i { display: block; height: 100%; border-radius: var(--radius-full); transition: width .4s ease; }
.goal-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); }
.goal-val { white-space: nowrap; }
.goal-plan { font-weight: 600; white-space: nowrap; }
.goal-plan.up { color: var(--success); }
.goal-plan.down { color: var(--danger); }
.goal-fc { white-space: nowrap; color: var(--text-2); }
.goal-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.gf-head, .gf-row { display: grid; grid-template-columns: 1fr 150px 150px; gap: 12px; align-items: center; }
.gf-head span { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 600; }
.gf-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.money { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding-right: 10px; transition: var(--transition-fast); }
.money input { width: 100%; height: 34px; border: 0; background: transparent; padding: 0 8px 0 10px; text-align: right; outline: none; }
.money em { font-style: normal; color: var(--muted); white-space: nowrap; }
.money:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }

/* ---------- Diagramme ---------- */
.colchart { --h: 250px; padding-left: 52px; }
.cc-plot { position: relative; height: var(--h); }
.cc-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.cc-grid span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: calc(11px * var(--fs)); color: var(--muted); white-space: nowrap; }
.cc-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: clamp(2px, 1.4%, 16px); padding: 0 4px; }
.cc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cc-col:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.cc-bar { position: relative; width: 100%; max-width: 40px; display: flex; flex-direction: column-reverse; }
.cc-seg { min-height: 0; }
.cc-seg + .cc-seg { box-shadow: 0 1px 0 var(--surface); }
.cc-val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: calc(10.5px * var(--fs)); font-weight: 600; color: var(--muted); white-space: nowrap; }
.cc-labels { display: flex; gap: clamp(2px, 1.4%, 16px); padding: 6px 4px 0; border-top: 1px solid var(--border-strong); }
.cc-lbl { flex: 1; text-align: center; font-size: calc(11.5px * var(--fs)); color: var(--muted); white-space: nowrap; min-width: 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .8rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.donut { position: relative; }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.stackbar { display: flex; height: 10px; border-radius: var(--radius-full); overflow: hidden; background: var(--track); }
.stackbar.big { height: 18px; margin: 4px 0 14px; }
.stackbar i + i { box-shadow: -2px 0 0 var(--surface); }
.share-tbl td { padding: 9px 0 !important; }
.share-tbl tr.sum td { font-weight: 700; border-top: 1px solid var(--border-strong); }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hb-head { display: flex; justify-content: space-between; gap: 12px; font-size: calc(13px * var(--fs)); margin-bottom: 4px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-val { font-weight: 600; white-space: nowrap; }
.hb-val em { font-style: normal; color: var(--muted); font-weight: 500; font-size: calc(12px * var(--fs)); margin-left: 4px; }
.hb-track { height: 8px; background: var(--track); border-radius: var(--radius-full); overflow: hidden; }
.hb-fill { display: flex; height: 100%; }
.splitbar { display: inline-flex; width: 44px; height: 6px; border-radius: 2px; overflow: hidden; vertical-align: middle; background: var(--track); }
.tooltip { position: fixed; left: 0; top: 0; z-index: 1500; pointer-events: none; min-width: 170px; max-width: 320px; padding: .7rem .85rem; border-radius: var(--radius-md); background: var(--tip-bg); color: var(--tip-text); font-size: .8rem; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .1s; }
.tooltip.show { opacity: 1; }
.tip-title { font-weight: 700; margin-bottom: 6px; }
.tip-row { display: grid; grid-template-columns: 9px 1fr auto auto; gap: 8px; align-items: center; padding: 1px 0; }
.tip-row i { width: 9px; height: 9px; border-radius: 2px; }
.tip-row em { font-style: normal; color: #a9bdae; font-size: .72rem; min-width: 34px; text-align: right; }
.tip-total { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 6px; padding-top: 6px; }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; padding: .7rem 1rem; border-bottom: 1.5px solid var(--border); background: var(--surface); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td small { display: block; font-size: calc(11px * var(--fs)); color: var(--muted); font-weight: 500; }
.tbl.compact td, .tbl.compact th { padding: 8px 12px; }
.tbl.plain th, .tbl.plain td { padding-left: 0; }
.tbl.plain th:last-child, .tbl.plain td:last-child { padding-right: 0; }
.tbl.hover tbody tr { cursor: pointer; }
.tbl.hover tbody tr:hover, .tbl tbody tr:hover > td { background: var(--hl); }
.tbl.nowrap td { white-space: nowrap; }
.tbl.nowrap td, .tbl.nowrap th { padding-left: 10px; padding-right: 10px; }
.tbl tr.hl td { background: var(--hl); }
.tbl tr.sub th { font-size: calc(11px * var(--fs)); padding-top: 0; font-weight: 500; border-bottom-color: var(--border); }
.tbl.matrix th[colspan] { text-align: right; border-bottom: 0; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover, .tbl th.sorted { color: var(--text); }
.arrow { font-size: calc(9px * var(--fs)); margin-left: 4px; }
.ellip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.bar-cell { width: 26%; }
.inline-bar { display: block; height: 8px; border-radius: 2px; background: var(--c); min-width: 2px; }
.tbl tr.excl td { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.tbl tr.excl td:last-child, .tbl tr.excl td:last-child * { text-decoration: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 600; vertical-align: middle; border: 1px solid var(--border); line-height: 18px; }
.tag.info { color: var(--info-dark); border-color: transparent; background: var(--info-light); }
.tag.new { color: var(--success-dark); border-color: transparent; background: var(--success-light); }
.tag.warn { color: var(--warning-dark); border-color: transparent; background: var(--warning-light); }
.tchip { --c: var(--primary); display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--text); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tchip em { font-style: normal; color: var(--muted); font-weight: 600; }
.tchip.soft { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.tchip.none { background: var(--warning-light); color: var(--warning-dark); }
.tchip.none i { background: var(--warning); }
.splitcell { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rx-sum { display: flex; gap: 22px; flex-wrap: wrap; font-size: calc(13px * var(--fs)); color: var(--muted); }
.rx-sum b { color: var(--text); }
.more { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--border); }
.list-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; color: var(--muted); text-align: center; }
.list-empty .ic { color: var(--primary); padding: 18px; width: 64px; height: 64px; border-radius: var(--radius-full); background: var(--primary-light); }
.list-empty b { color: var(--text); font: 600 1rem var(--font); }

/* ---------- Zuordnung ---------- */
.progress-card { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pc-left { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; }
.pc-left h2 { font-size: calc(17px * var(--fs)); }
.pc-right { flex: 1 1 340px; }
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(13px * var(--fs)); flex: none;
  background: radial-gradient(closest-side, var(--surface) 80%, transparent 81% 100%), conic-gradient(var(--primary) calc(var(--p) * 1%), var(--track) 0); }
.pc-right .legend { margin-top: 10px; }
.bulk-slot:empty { display: none; }
.bulkbar { position: sticky; top: calc(var(--header-height) + 10px); z-index: 55; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 10px 8px 16px; border-radius: var(--radius-md); background: var(--bg-sidebar); color: var(--side-text); box-shadow: var(--shadow-lg); animation: slideUp .25s; }
.bb-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.bulkbar .btn { background: transparent; color: inherit; border-color: rgba(255, 255, 255, .25); }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .08); }
.bulkbar .dot { background: var(--c); }
.bulkbar .icon-btn { color: inherit; }
.plist { padding: 0; }
.plist-h { display: flex; align-items: center; gap: 14px; padding: .7rem 18px; border-bottom: 1.5px solid var(--border); font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.plist-h span.muted { margin-left: auto; margin-right: 90px; }
.prow { display: grid; grid-template-columns: auto auto minmax(160px, 1.5fr) minmax(100px, .7fr) minmax(0, 1.2fr) auto auto; align-items: center; gap: 14px; padding: 9px 14px 9px 18px; border-bottom: 1px solid var(--border); }
.prow:hover { background: var(--hl); }
.prow:focus { outline: none; background: var(--primary-light); box-shadow: inset 3px 0 0 var(--primary); }
.prow.sel { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.prow.unassigned .avatar { border-style: dashed; border-color: var(--border-strong); color: var(--muted); }
.p-main, .p-stats { display: flex; flex-direction: column; min-width: 0; }
.p-stats { cursor: pointer; }
.p-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .6rem; border-radius: var(--radius-full); background: var(--surface-2); color: var(--text-2); font-size: .7rem; font-weight: 600; white-space: nowrap; line-height: 20px; }
.badge.warn { background: var(--warning-light); color: var(--warning-dark); }
.badge.info { background: var(--info-light); color: var(--info-dark); }
.badge.ok, .badge.new { background: var(--success-light); color: var(--success-dark); }
.sug-chip { --c: var(--primary); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--radius-full); border: 1.5px dashed var(--c); background: color-mix(in srgb, var(--c) 6%, transparent); color: var(--text); font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: var(--transition-fast); }
.sug-chip:hover { border-style: solid; background: color-mix(in srgb, var(--c) 14%, transparent); }
.sug-chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: calc(11.5px * var(--fs)); }
.p-assign { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tbtn { --c: var(--primary); display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 .8rem; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: .82rem; cursor: pointer; white-space: nowrap; transition: var(--transition-fast); }
.tbtn:hover { border-color: var(--c); color: var(--text); }
.tbtn .dot { background: var(--c); }
.tbtn.on { background: color-mix(in srgb, var(--c) 24%, var(--surface)); border-color: var(--c); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--c); }
.tbtn.on .dot { background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.tbtn.clear { width: 30px; padding: 0; justify-content: center; color: var(--muted); }
.tbtn.clear:hover { border-color: var(--danger); color: var(--danger-dark); }
.tbtn.mini { height: 24px; padding: 0 8px; font-size: calc(12px * var(--fs)); border-radius: 4px; }
.tbtn.mini.std.on { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.tbtn.mini.split.on { --c: var(--olive); }
.exp .ic { transition: transform .15s; }
.prow.open .exp .ic { transform: rotate(180deg); }
.p-detail { padding: 4px 18px 16px 64px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pd-info { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: calc(13px * var(--fs)); color: var(--text-2); flex-wrap: wrap; }
.pd-info .link-btn { margin-left: auto; }
.rx-tbl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); border-collapse: separate; border-spacing: 0; }
.rx-assign { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.rx-split { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs)); color: var(--muted); margin-left: 4px; }
.cb { display: inline-flex; cursor: pointer; position: relative; }
.cb input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.cb span { width: 17px; height: 17px; border-radius: var(--radius); border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; transition: var(--transition-spring); }
.cb input:checked + span { background: var(--primary); border-color: var(--primary); }
.cb input:checked + span::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cb input:focus-visible + span { box-shadow: var(--focus-ring); }
.kbd-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 9px; }
kbd { display: inline-block; min-width: 24px; padding: 1px 6px; margin-right: 4px; border-radius: 4px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface-2); font: 600 12px var(--mono); text-align: center; }
.acc-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; background: rgba(0, 0, 0, .5); animation: fadeIn .25s; }
.modal-wrap.out { opacity: 0; transition: opacity .15s; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); animation: slideUp .3s; z-index: 1001; }
.modal.wide { width: min(900px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 1.25rem 1.5rem .4rem; }
.modal-h h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.3px; }
.modal-h p { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.modal-b { padding: .75rem 1.5rem 1.15rem; overflow: auto; min-width: 0; }
.guide-toc .pill { flex: none; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: .85rem 1.5rem; border-top: 1px solid var(--border); background: var(--gray-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.rx-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.rx-head div { display: flex; flex-direction: column; min-width: 0; }
.rx-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.mode-opt { --c: var(--primary); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: .7rem .85rem; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; transition: var(--transition-fast); }
.mode-opt b { display: flex; align-items: center; gap: 7px; font-size: calc(13.5px * var(--fs)); }
.mode-opt span { font-size: calc(12px * var(--fs)); color: var(--muted); }
.mode-opt:hover { background: var(--surface-2); }
.mode-opt.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.split-panel { margin-top: 16px; padding: 1rem 1.15rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; }
.split-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.split-rows { display: flex; flex-direction: column; gap: 10px; }
.split-row { display: grid; grid-template-columns: 120px 1fr 110px; gap: 14px; align-items: center; }
.sr-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.split-row input[type=range] { accent-color: var(--c); width: 100%; }
.sr-num { display: flex; align-items: center; gap: 6px; }
.sr-num input { width: 64px; height: 32px; border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 0 8px; text-align: right; background: var(--surface); }
.sr-num em { font-style: normal; font-size: calc(12px * var(--fs)); color: var(--muted); }
.sp-bar { display: flex; height: 10px; border-radius: var(--radius-full); overflow: hidden; background: var(--track); }
.sp-bar i + i { box-shadow: -2px 0 0 var(--surface-2); }
.sp-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: calc(13px * var(--fs)); }
.sp-legend span { display: inline-flex; gap: 6px; align-items: center; }
.sp-legend i { width: 9px; height: 9px; border-radius: 2px; }
.hint { font-size: calc(12.5px * var(--fs)); color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.hint.warn { color: var(--warn); }

/* ---------- Patientenakte (Seitenansicht) ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .35); animation: fadeIn .25s; }
.drawer-wrap.out { opacity: 0; transition: opacity .2s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-xl); animation: slidel .25s cubic-bezier(.4, 0, .2, 1); }
@keyframes slidel { from { transform: translateX(40px); opacity: .4; } }
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.dr-head h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.3px; }
.dr-head p { margin-top: 3px; }
.dr-body { flex: 1; overflow: auto; padding: 16px 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.dr-assign { display: flex; flex-direction: column; gap: 8px; }
.dr-label { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.dr-assign .sug-chip { align-self: flex-start; }
.dr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dr-stats div { padding: 10px 0; }
.dr-stats div + div { padding-left: 12px; border-left: 1px solid var(--border); }
.dr-stats dt { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.dr-stats dd { margin: 0; font-weight: 600; }
.dr-stats small { color: var(--muted); font-weight: 500; }
.dr-split .legend { margin-top: 8px; }
.dr-note { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); padding: .6rem .85rem; background: var(--info-light); border-left: 3px solid var(--info); border-radius: var(--radius-md); }
.dr-sub { font: 600 .95rem var(--font); margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--border-strong); }
.tl-year { position: relative; padding: 10px 0 6px 26px; font: 700 .8rem var(--font); letter-spacing: .5px; color: var(--muted); }
.tl-item { position: relative; padding: 4px 0 14px 26px; }
.tl-dot { position: absolute; left: 0; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.tl-item.open .tl-dot { background: var(--surface); box-shadow: 0 0 0 1.5px var(--warn); }
.tl-item.excl { opacity: .6; }
.tl-item.excl .tl-l1 b, .tl-item.excl .tl-amt { text-decoration: line-through; }
.tl-body { display: flex; flex-direction: column; gap: 3px; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.tl-l1 { display: flex; gap: 10px; align-items: baseline; }
.tl-amt { margin-left: auto; font-weight: 600; }
.tl-l2 { font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.tl-l3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: calc(12.5px * var(--fs)); }
.tl-act { margin-left: auto; }

/* ---------- Import & Duplikate ---------- */
.imp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.imp-stat { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; }
.imp-stat + .imp-stat { border-left: 1px solid var(--border); }
.imp-stat b { font-size: 1.5rem; font-weight: 700; letter-spacing: -.4px; }
.imp-stat span { font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; }
.imp-stat em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.imp-stat.new b { color: var(--success); }
.imp-stat.changed b { color: var(--secondary-dark); }
.imp-stat.zero { opacity: .5; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: .65rem .85rem; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; margin-bottom: 8px; transition: var(--transition-fast); }
.check-row:hover { border-color: var(--secondary); }
.check-row > span { display: flex; flex-direction: column; }
.check-row input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }
.check-row.inline { padding: 5px 10px; margin: 0; align-items: center; font-size: calc(13px * var(--fs)); }
.check-row.inline input { margin: 0; }
.imp-details { margin: 6px 0 12px; font-size: calc(13px * var(--fs)); }
.imp-details summary { cursor: pointer; color: var(--primary-text); font-weight: 600; padding: 4px 0; }
.imp-details ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.dup-box { margin-top: 8px; padding: 1rem 1.15rem; border-radius: var(--radius-md); border: 0; border-left: 3px solid var(--warning); background: var(--warning-light); display: flex; flex-direction: column; gap: 12px; }
.dup-box h3 { display: flex; align-items: center; gap: 8px; color: var(--warning-dark); font: 700 .95rem var(--font); }
.dup-modes { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dup-list { list-style: none; padding: 0 !important; max-height: 260px; overflow: auto; }
.dup-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 7px 10px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.dup-list li > div { display: flex; flex-direction: column; min-width: 0; }
.dup-months { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dup-intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dup-intro p { max-width: 720px; }
.dup-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rx-table:not(.card) { display: flex; flex-direction: column; gap: 12px; }
.dup-group { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.dup-group.open { border-left: 3px solid var(--warn); }
.dg-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.dg-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.dg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dup-group .tbl th { position: static; }
.cnt-toggle { border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); border-radius: var(--radius-full); padding: 2px 10px; font-size: .75rem; font-weight: 600; cursor: pointer; }
.cnt-toggle.on { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary-text); }
.storage-info { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); padding: .65rem .85rem; border-radius: var(--radius-md); background: var(--info-light); border-left: 3px solid var(--info); margin-bottom: 12px; }

/* ---------- Toasts / Drop ---------- */
.toasts { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: .75rem; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: .75rem; min-width: 300px; max-width: 460px; padding: .8rem 1rem; border-radius: var(--radius-md); background: var(--surface); color: var(--text); border: 1px solid var(--border-light); border-left: 3px solid var(--info); box-shadow: var(--shadow-lg); font-size: .85rem; animation: toastIn .3s; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } }
.toast-success { border-left-color: var(--success); }
.toast-success > .ic { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error > .ic { color: var(--danger); }
.toast-info > .ic { color: var(--info); }
.toast span { flex: 1; }
.toast-act { border: 1.5px solid var(--border); background: transparent; color: var(--primary-dark); font-weight: 600; padding: 4px 10px; border-radius: var(--radius); cursor: pointer; font-size: .78rem; white-space: nowrap; }
.toast-act:hover { background: var(--primary-light); border-color: var(--primary); }
.toast-x { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; padding: 2px; }
.drop-overlay { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; background: rgba(40, 75, 51, .6); opacity: 0; pointer-events: none; transition: opacity .12s; }
.drop-overlay.show { opacity: 1; }
.drop-overlay > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 60px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .75); color: #fff; text-align: center; }
.drop-overlay b { font: 700 1.35rem var(--font); }

/* ---------- Leerer Zustand ---------- */
.empty { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.empty-card { position: relative; max-width: 640px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 2.5rem; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.empty-card h1 { font-size: 1.65rem; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary); }
.lead { font-size: calc(15px * var(--fs)); color: var(--text-2); }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; width: 100%; border-top: 1px solid var(--border); }
.steps li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.steps li > b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary-dark); font: 700 .8rem/1 var(--font); }
.steps strong { display: block; font-size: calc(14px * var(--fs)); }
.steps span { font-size: calc(13px * var(--fs)); color: var(--muted); }
.privacy { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--success-dark); background: var(--success-light); padding: .4rem .75rem; border-radius: var(--radius-full); }

/* ---------- Einstellungen ---------- */
.th-list { display: flex; flex-direction: column; }
.th-row { display: grid; grid-template-columns: 34px minmax(120px, 1fr) minmax(120px, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.th-row:first-child { border-top: 0; }
.th-row.inactive { opacity: .55; }
.th-usage { white-space: nowrap; }
.color-pick { position: relative; width: 30px; height: 30px; border-radius: var(--radius-full); background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--border-strong), inset 0 0 0 2px var(--surface); }
.color-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: var(--radius-full); background: var(--gray-300); cursor: pointer; transition: var(--transition-fast); }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: var(--transition-spring); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--focus-ring); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.rcard { position: relative; display: flex; flex-direction: column; gap: 2px; padding: .7rem .85rem; border-radius: var(--radius-md); border: 1.5px solid var(--border); cursor: pointer; transition: var(--transition-fast); }
.rcard input { position: absolute; opacity: 0; pointer-events: none; }
.rcard span { font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.rcard:hover { background: var(--surface-2); }
.rcard.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-light); }
.rcard:focus-within { box-shadow: var(--focus-ring); }
.pos-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.pos-row { display: grid; grid-template-columns: 70px 1fr 50px; gap: 10px; align-items: center; }
.pos-row em { font-style: normal; text-align: right; }
.backup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-md); }
.bk { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.bk + .bk { border-left: 1px solid var(--border); }
.bk .btn { margin-top: auto; align-self: flex-start; }
.bk span { margin-bottom: 8px; }
.danger-zone { border-left: 3px solid var(--danger); }
.dz-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settings .card > p.muted { margin-top: 12px; }

#printRoot { display: none; }

/* ---------- Viva-Abgleich ---------- */
.viva-intro { margin-bottom: 14px; }
.viva-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 6px 0 8px; }
.viva-codes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.viva-code { display: grid; grid-template-columns: 80px 100px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.viva-k { display: inline-flex; justify-content: center; padding: 2px 8px; border-radius: var(--radius); background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.viva-code .select select { max-width: none; width: 100%; }
.viva-code .select { width: 100%; }

/* ---------- Analysen & Prognosen ---------- */
.pos { color: var(--success-dark); }
.neg { color: var(--danger); }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.ins { display: flex; gap: 12px; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: var(--transition-fast); }
.ins:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.ins h3 { font-size: .92rem; line-height: 1.35; margin: 2px 0 4px; }
.ins p { font-size: .8rem; color: var(--text-2); line-height: 1.5; }
.ins-kind { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.ins-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--info-light); color: var(--info-dark); }
.ins-ic.k-prognose { background: var(--primary-light); color: var(--primary-dark); }
.ins-ic.k-frhwarnung, .ins-ic.k-risiko { background: var(--warning-light); color: var(--warning-dark); }
.ins-ic.k-chance { background: var(--success-light); color: var(--success-dark); }
.ins-ic.k-liquiditt { background: var(--secondary-light); color: var(--secondary-dark); }
.kpis.inner { box-shadow: none; border: 1px solid var(--border); margin-bottom: 14px; border-radius: var(--radius-md); }
.kpis.inner::before { display: none; }
.kpi b.pos { color: var(--success-dark); }
.kpi b.neg { color: var(--danger); }
.lc { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: var(--border); stroke-width: 1; }
.lc-ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.lc-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.lc-line.fc { stroke-dasharray: 6 5; }
.lc-band { opacity: .14; stroke: none; }
.lc-now { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.lc-hit { fill: transparent; }
.lc-hit:hover { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.wf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; height: 220px; margin-bottom: 10px; }
.wf-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.wf-plot { position: relative; flex: 1; width: 100%; max-width: 90px; }
.wf-bar { position: absolute; left: 0; right: 0; border-radius: var(--radius); }
.wf-bar.tot { background: var(--primary); }
.wf-bar.pos { background: var(--success); }
.wf-bar.neg { background: var(--danger); }
.wf-val { font-size: .8rem; font-weight: 700; }
.wf-val.tot { color: var(--text); }
.wf-lbl { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.sub-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.sub-h.warn-h { color: var(--warning-dark); }
.contrib { display: flex; flex-direction: column; gap: 8px; }
.cb-row { display: grid; grid-template-columns: 130px 1fr 100px; gap: 10px; align-items: center; font-size: .82rem; }
.cb-row b { text-align: right; }
.cb-track { position: relative; height: 10px; background: var(--track); border-radius: var(--radius-full); }
.cb-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.cb-track i { position: absolute; top: 0; bottom: 0; border-radius: var(--radius-full); }
.cb-track i.pos { background: var(--success); }
.cb-track i.neg { background: var(--danger); }
.heat { display: grid; grid-template-columns: 42px repeat(12, minmax(0, 1fr)); gap: 3px; font-size: .68rem; }
.hh { text-align: center; color: var(--muted); font-weight: 600; }
.hy { color: var(--muted); font-weight: 700; align-self: center; }
.hc { display: grid; place-items: center; height: 30px; border-radius: var(--radius); background: color-mix(in srgb, var(--c) var(--p), var(--surface-2)); color: var(--text); font-variant-numeric: tabular-nums; cursor: default; }
.hc.dark { color: #fff; }
.hc.na { background: transparent; border: 1px dashed var(--border); }
.season { display: grid; grid-template-columns: 42px repeat(12, minmax(0, 1fr)); gap: 3px; margin-top: 6px; font-size: .66rem; font-weight: 700; text-align: center; }
.season::before { content: "Saison"; color: var(--muted); text-align: left; font-weight: 600; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; }
.mini-kpis > div { display: flex; flex-direction: column; padding: .65rem .8rem; min-width: 0; }
.mini-kpis > div + div { border-left: 1px solid var(--border); }
.mini-kpis span { font-size: .64rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.mini-kpis b { font-size: 1.15rem; font-weight: 700; letter-spacing: -.3px; }
.lag-years, .ep-dist { display: flex; gap: 10px; align-items: flex-end; height: 120px; margin-bottom: 8px; }
.lag-years > div, .ep-dist > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; font-size: .75rem; }
.lag-bar, .ep-bar { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; }
.lag-bar i, .ep-bar i { display: block; width: 100%; border-radius: var(--radius) var(--radius) 0 0; background: var(--secondary); }
.lag-years em, .ep-dist em { font-style: normal; color: var(--muted); font-size: .7rem; }
.fu-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.grid-2.tight { gap: 1.5rem; }
.price-list { display: flex; flex-direction: column; gap: 12px; }
.pr-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pr-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.pr-years { display: flex; gap: 6px; align-items: flex-end; height: 54px; }
.pr-years span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 2px; }
.pr-years i { display: block; width: 100%; background: var(--primary); opacity: .75; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.pr-years em { font-style: normal; font-size: .62rem; color: var(--muted); }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.sim-ctrl { display: flex; flex-direction: column; gap: 10px; }
.sim-row { --c: var(--primary); display: grid; grid-template-columns: 130px 1fr 56px; column-gap: 12px; align-items: center; }
.sim-row .dot { background: var(--c); }
.sim-row input[type=range] { accent-color: var(--c); width: 100%; }
.sim-row output { font-weight: 700; text-align: right; font-size: .85rem; }
.sim-row em { grid-column: 2 / -1; font-style: normal; font-size: .7rem; color: var(--muted); margin-top: -4px; }
.sim-out { display: flex; flex-direction: column; gap: 6px; padding: 1.15rem 1.35rem; border-radius: var(--radius-md); background: var(--primary-light); }
.sim-tot { font-size: 2rem; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; }
/* Soll-Ertrag nach Arbeitszeit (interaktiv, Motion) */
.cx { --tc: var(--primary); display: flex; flex-direction: column; gap: 1.25rem; }
.cx-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: 1.5rem 1.75rem; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--info)); color: var(--text-inverse); box-shadow: var(--shadow-md); }
.cx-hero::before, .cx-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--text-inverse) 16%, transparent), transparent 70%); animation: cxFloat 9s ease-in-out infinite alternate; }
.cx-hero::before { width: 340px; height: 340px; right: 18%; top: -170px; }
.cx-hero::after { width: 240px; height: 240px; left: -80px; bottom: -140px; animation-duration: 12s; }
@keyframes cxFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 24px) scale(1.15); } }
.cx-hero-main { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-hero .kpi-l { color: color-mix(in srgb, var(--text-inverse) 78%, transparent); }
.cx-who { align-self: flex-start; margin-bottom: 10px; background: color-mix(in srgb, var(--text-inverse) 12%, transparent); border-color: color-mix(in srgb, var(--text-inverse) 28%, transparent); color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.cx-who select { color: var(--text-inverse); }
.cx-who select option { color: var(--text); }
.cx-who:hover { border-color: color-mix(in srgb, var(--text-inverse) 60%, transparent); }
.cx-big { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -1.5px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cx-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.cx-pills > div { display: flex; flex-direction: column; gap: 2px; padding: .6rem .8rem; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text-inverse) 12%, transparent); border: 1px solid color-mix(in srgb, var(--text-inverse) 16%, transparent); backdrop-filter: blur(4px); }
.cx-pills span { font-size: .7rem; color: color-mix(in srgb, var(--text-inverse) 75%, transparent); }
.cx-pills b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cx-ring { position: relative; z-index: 1; width: 190px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cx-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.cx-ring circle { fill: none; stroke-width: 11; }
.cx-ring-bg { stroke: color-mix(in srgb, var(--text-inverse) 18%, transparent); }
.cx-ring-fg { stroke: var(--text-inverse); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.22, 1, .36, 1); }
.cx-ring.done .cx-ring-fg { stroke: var(--warning); }
.cx-ring.done svg { animation: cxGlow 2.4s ease-in-out infinite; }
@keyframes cxGlow { 50% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--warning) 70%, transparent)); } }
.cx-ring-c { position: absolute; top: 0; width: 150px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cx-ring-c b { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-ring-c span { font-size: .66rem; color: color-mix(in srgb, var(--text-inverse) 75%, transparent); max-width: 90px; line-height: 1.25; }
.cx-ring-n { margin: 0; font-size: .74rem; text-align: center; color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.cx-ring.empty .cx-ring-c, .cx-ring.empty svg { opacity: .45; }

.cx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cx-step { display: flex; flex-direction: column; gap: 12px; padding: 1.1rem 1.15rem 1.2rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition); animation: cxIn .6s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i) * 110ms); }
.cx-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--secondary); }
@keyframes cxIn { from { opacity: 0; transform: translateY(18px); } }
.cx-step header { display: flex; gap: 10px; align-items: center; }
.cx-step h3 { margin: 0; font-size: 1rem; }
.cx-step header p { margin: 0; font-size: .75rem; color: var(--muted); }
.cx-no { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--primary); color: var(--text-inverse); font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 4px var(--primary-light); }
.cx-cap { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.cx-cap b { color: var(--text); }
.cx-warn { color: var(--danger); font-weight: 600; }

.cx-rate { display: flex; align-items: baseline; gap: 8px; }
.cx-rate b { font-size: 2.1rem; font-weight: 700; letter-spacing: -.8px; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.cx-rate span { font-size: .78rem; color: var(--muted); }
.cx-range { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: var(--radius-full); outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--primary) 0, var(--info) var(--p), var(--gray-200) var(--p)); }
.cx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: var(--shadow-md); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.cx-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: var(--shadow-md); }
.cx-range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.cx-range:active::-webkit-slider-thumb { transform: scale(1.3); box-shadow: 0 0 0 8px var(--primary-light); }
.cx-range:focus-visible { box-shadow: var(--focus-ring); }
.cx-scale { display: flex; justify-content: space-between; font-size: .66rem; color: var(--muted); margin-top: -6px; }

.cx-clock { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.cx-clock svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.cx-clock circle { fill: none; }
.cx-clk-bg { stroke: var(--gray-100); stroke-width: 14; }
.cx-clk-beh, .cx-clk-vor { stroke-width: 14; transition: stroke-dasharray .7s cubic-bezier(.22, 1, .36, 1), stroke-dashoffset .7s cubic-bezier(.22, 1, .36, 1); }
.cx-clk-beh { stroke: var(--primary); }
.cx-clk-vor { stroke: var(--secondary-light); stroke: color-mix(in srgb, var(--secondary) 45%, var(--surface)); }
.cx-clk-hand { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; transform-box: view-box; transform-origin: 50px 50px; transition: transform .8s cubic-bezier(.34, 1.56, .64, 1); }
.cx-clk-pin { fill: var(--text); }
.cx-clock-f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.cx-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 10px; }
.cx-stp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-stp-l { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-stp-c { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 30px; align-items: center; height: 34px; border: 1.5px solid var(--border); border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; transition: var(--transition-fast); }
.cx-stp-c:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.cx-stp-c.bump { animation: cxBump .28s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cxBump { 40% { transform: scale(1.06); border-color: var(--primary); } }
.cx-stp-c button { height: 100%; border: 0; background: transparent; color: var(--primary-dark); font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition-fast); touch-action: manipulation; user-select: none; }
.cx-stp-c button:hover { background: var(--primary-light); }
.cx-stp-c button:active { background: var(--primary); color: var(--text-inverse); }
.cx-stp-c input { width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; text-align: right; font-weight: 700; font-size: .9rem; color: var(--text); outline: none; -moz-appearance: textfield; padding: 0 4px 0 0; }
.cx-stp-c input::-webkit-outer-spin-button, .cx-stp-c input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cx-stp-c em { font-style: normal; font-size: .7rem; color: var(--muted); padding-right: 2px; }

.cx-chips { --b: 75%; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; min-height: 30px; }
.cx-chip { position: relative; display: block; height: 20px; border-radius: 5px; background: linear-gradient(90deg, var(--primary) var(--b), color-mix(in srgb, var(--secondary) 45%, var(--surface)) var(--b));
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .3s, background .3s; }
.cx-chip.in { animation: cxPop .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: var(--d, 0ms); }
.cx-chip.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--danger); opacity: .85; transform: scale(.88) rotate(-4deg); }
.cx-chip.off::before, .cx-chip.off::after { content: ''; position: absolute; left: 50%; top: 50%; width: 60%; height: 1.5px; background: var(--danger); transform: translate(-50%, -50%) rotate(35deg); }
.cx-chip.off::after { transform: translate(-50%, -50%) rotate(-35deg); }
@keyframes cxPop { from { opacity: 0; transform: scale(.2); } }

.cx-waffle { --cols: 20; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; }
.cx-waffle i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--primary); transition: background .35s; animation: cxPop .4s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--j) * 2.5ms); }
.cx-waffle i[data-c="urlaub"] { background: var(--warning); }
.cx-waffle i[data-c="krank"] { background: var(--danger); }
.cx-waffle i[data-c="feiertag"] { background: var(--gray-400); }
.cx-waffle i[data-c="fobi"] { background: var(--warning-dark); }
.cx-waffle i.pop { animation: cxFlip .45s cubic-bezier(.34, 1.56, .64, 1); animation-delay: 0ms; }
@keyframes cxFlip { 0% { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.35); } }

.cx-formula { display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cx-formula > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 150px; padding: .75rem 1.25rem; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.cx-formula b { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-formula em { font-style: normal; font-size: .7rem; color: var(--muted); }
.cx-formula .res { background: var(--primary); border-color: var(--primary); color: var(--text-inverse); box-shadow: var(--shadow-md); }
.cx-formula .res em { color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.cx-op { align-self: center; font-size: 1.4rem; font-weight: 700; color: var(--muted); }
.cx-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .25rem; }
.cx-tip { display: flex; align-items: flex-start; gap: 8px; margin: 0; flex: 1 1 380px; padding: .65rem .9rem; border-radius: var(--radius-md); background: var(--warning-light); border-left: 3px solid var(--warning); font-size: .8rem; color: var(--text); }
.cx-tip svg { flex: none; margin-top: 1px; color: var(--warning-dark); }

@media (max-width: 1200px) { .cx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-steps > :last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .cx-hero { grid-template-columns: 1fr; }
  .cx-ring { width: 100%; }
  .cx-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after, .cx-hero::before, .cx-hero::after { animation: none !important; transition: none !important; }
}
.ai-text { width: 100%; min-height: 320px; padding: .75rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); font: 12px/1.5 var(--mono); resize: vertical; }
@media (max-width: 900px) {
  .sim-grid { grid-template-columns: 1fr; }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-kpis > div:nth-child(3) { border-left: 0; }
  .mini-kpis > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 680px) {
  .insights { grid-template-columns: 1fr; }
  .heat, .season { grid-template-columns: 30px repeat(12, minmax(0, 1fr)); font-size: .58rem; }
  .pr-row { grid-template-columns: 1fr; }
  .cb-row { grid-template-columns: 90px 1fr 80px; }
  .wf { height: 180px; gap: 8px; }
  .sim-row { grid-template-columns: 100px 1fr 48px; }
}

/* ---------- Anleitung (Motion Graphics) ---------- */
.guide-toc { position: sticky; top: calc(var(--header-height) + 8px); z-index: 40; display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; padding: 6px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--bg-card) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); align-self: flex-start; }
.gs-num { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-dark); background: var(--primary-light); padding: 2px 9px; border-radius: var(--radius-full); margin-bottom: 8px; }
.lead-s { color: var(--text-2); font-size: .92rem; line-height: 1.6; margin: 6px 0 12px; }
.guide h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px; }
.guide-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 2rem; align-items: center; }
.gh-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-svg { width: 100%; height: auto; display: block; }
.h-card { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; filter: drop-shadow(0 2px 4px rgba(40, 80, 52, .08)); }
.h-ttl { fill: #fff; font: 600 11px var(--font); }
.h-ttl.dark { fill: var(--text); font-size: 12px; }
.h-sub { fill: var(--muted); font: 500 10px var(--font); }
.h-sub.dark { fill: var(--text-2); font-size: 11px; }
.h-line { fill: var(--gray-200); }
.h-path { fill: none; stroke: var(--gray-300); stroke-width: 2; stroke-dasharray: 5 6; animation: dashflow 1.2s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -22; } }
.h-node { fill: var(--primary); }
.h-ring { fill: none; stroke: var(--info); stroke-width: 2; stroke-dasharray: 4 8; }
.h-node-t { fill: #fff; font: 700 13px var(--font); }
.h-node-s { fill: rgba(255, 255, 255, .8); font: 500 10px var(--font); }

.gs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.2rem; align-items: center; }
.gs.flip .gs-text { order: 2; }
.gs.wide { grid-template-columns: minmax(0, 1fr); }
.gs.wide .gs-art { max-width: 900px; width: 100%; justify-self: center; }
.gs-list { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: gs; display: flex; flex-direction: column; gap: 9px; }
.gs-list li { position: relative; padding-left: 34px; font-size: .86rem; line-height: 1.55; counter-increment: gs; }
.gs-list li::before { content: counter(gs); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-full); background: var(--primary); color: var(--on-primary); font-size: .72rem; font-weight: 700; }
.gs-sub { margin-top: 6px; }
.gs-dl { margin: 0 0 14px; display: grid; grid-template-columns: 1fr; gap: 2px; }
.gs-dl dt { font-weight: 600; font-size: .86rem; margin-top: 8px; }
.gs-dl dd { margin: 0; font-size: .82rem; color: var(--text-2); line-height: 1.5; }
.gl { display: inline-block; padding: 0 8px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 600; line-height: 19px; }
.gl.exakt { background: var(--success-light); color: var(--success-dark); }
.gl.name { background: var(--info-light); color: var(--info-dark); }
.gl.datum { background: var(--warning-light); color: var(--warning-dark); }
.gs-checks { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gs-checks li { display: flex; gap: 10px; font-size: .85rem; line-height: 1.5; }
.gs-checks li .ic { color: var(--primary); margin-top: 2px; }
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: .88rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 700; transition: var(--transition-fast); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { font-size: .84rem; color: var(--text-2); margin-top: 6px; line-height: 1.55; animation: fadeIn .25s; }

/* Bühne für Animationen */
.ga { position: relative; padding: 1.25rem; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--primary-light), var(--bg-page)); border: 1px solid var(--border-light); overflow: hidden; min-height: 120px; }
.ga-replay { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.ga-replay.static { position: static; }
.routine.ga { background: none; border: 0; padding: 0; overflow: visible; }

/* Basis = Endzustand (sichtbar ohne Animation); erst .play spielt die Animation ab */
.ga.play .a { animation-duration: .6s; animation-delay: var(--d, 0s); animation-fill-mode: both; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.ga.play .a-up { animation-name: gUp; }
.ga.play .a-pop { animation-name: gPop; animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.ga.play .a-fade { animation-name: fadeIn; }
.ga.play .a-grow-y { animation-name: gGrowY; animation-duration: .8s; }
.ga.play .a-draw { animation-name: gDraw; animation-duration: 1s; animation-timing-function: ease-in-out; }
.ga.play .a-drop { animation-name: gDrop; animation-duration: 1.1s; }
.ga.play .a-glow { animation-name: gGlow; animation-duration: 1.2s; }
.ga.play .a-strike { animation-name: gStrike; animation-duration: .5s; }
.ga.play .a-fall { animation-name: gFall; animation-duration: 1.2s; }
@keyframes gUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes gPop { from { opacity: 0; transform: scale(.6); } }
@keyframes gGrowY { from { transform: scaleY(0); } }
@keyframes gDraw { from { stroke-dashoffset: 1; } }
@keyframes gDrop { 0% { opacity: 0; transform: translate(-40px, -30px) rotate(-8deg); } 60% { opacity: 1; transform: translate(0, 46px) rotate(0); } 100% { opacity: 0; transform: translate(0, 60px) scale(.8); } }
@keyframes gGlow { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 22%, transparent); border-color: var(--primary); } }
@keyframes gStrike { from { transform: scaleX(0); } }
@keyframes gFall { 0% { opacity: 0; transform: translateY(-30px); } 30% { opacity: 1; } 100% { transform: translateY(0); } }
.a-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.a-grow-y { transform-origin: bottom; }

/* 1 · Import */
.ga-import { display: grid; grid-template-columns: 1fr; gap: 14px; justify-items: center; min-height: 260px; }
.gi-file { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); font-weight: 600; font-size: .82rem; color: var(--primary-dark); opacity: 0; position: absolute; top: 20px; }
.gi-zone { margin-top: 64px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border: 2px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--muted); font-size: .82rem; font-weight: 600; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.gi-tiles { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gi-tile { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.gi-tile b { font-size: 1.35rem; font-weight: 700; }
.gi-tile span { font-size: .64rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.gi-tile.ok b { color: var(--success-dark); }
.gi-tile.info b { color: var(--secondary-dark); }
.gi-tile.mute { opacity: .55; }
.ga-dup { padding: 2.4rem 1rem 1rem; min-height: 0; }
.gd-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.gd-rec { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); font-size: .8rem; }
.gd-rec.keep { border-color: var(--success); box-shadow: inset 3px 0 0 var(--success); }
.gd-rec .tag { align-self: flex-start; }
.gd-x { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: var(--danger); transform-origin: left; }
.gd-eq { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.gd-cap { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--success-dark); margin-top: 10px; font-weight: 600; }

/* 2 · Viva-Abgleich */
.ga-match svg { width: 100%; height: auto; display: block; }
.gm-h { fill: var(--muted); font: 700 10px var(--font); letter-spacing: .8px; text-transform: uppercase; }
.gm-box { fill: var(--surface); stroke: var(--border); stroke-width: 1.2; }
.gm-box.empty { fill: none; stroke-dasharray: 4 4; }
.gm-n { fill: var(--text); font: 600 12px var(--font); }
.gm-s { fill: var(--muted); font: 500 10.5px var(--font); }
.gm-code { fill: var(--primary-light); }
.gm-code-t { fill: var(--primary-dark); font: 700 10.5px var(--mono); }
.gm-chip { fill: var(--text); font: 600 10.5px var(--font); }
.gm-split { fill: var(--surface-2); stroke: var(--border); }
.gm-line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.gm-line.exakt { stroke: var(--success); }
.gm-line.name { stroke: var(--info); }
.gm-line.datum { stroke: var(--warning); }
.gm-lbl { font: 700 9.5px var(--font); text-transform: uppercase; letter-spacing: .5px; }
.gm-lbl.exakt { fill: var(--success-dark); }
.gm-lbl.name { fill: var(--info-dark); }
.gm-lbl.datum { fill: var(--warning-dark); }

/* 3 · Priorität */
.ga-prio { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.gp-token { align-self: center; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--radius-full); background: var(--primary); color: var(--on-primary); font-size: .78rem; font-weight: 600; box-shadow: var(--shadow-md); }
.gp-layers { display: flex; flex-direction: column; gap: 8px; }
.gp-layer { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.gp-layer > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary-dark); font-size: .8rem; }
.gp-layer div { display: flex; flex-direction: column; }
.gp-layer strong { font-size: .86rem; }
.gp-layer span { font-size: .74rem; color: var(--muted); }
.gp-layer.l1 { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.gp-layer.l3 > b { background: var(--gray-200); color: var(--muted); }
.gp-keys { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; font-size: .74rem; color: var(--muted); }
.gp-keys span { display: inline-flex; align-items: center; gap: 2px; }

/* 4 · Auswertung */
.ga-dash { display: flex; flex-direction: column; gap: 12px; }
.gx-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.gx-kpis div { display: flex; flex-direction: column; padding: 10px 12px; }
.gx-kpis div + div { border-left: 1px solid var(--border); }
.gx-kpis span { font-size: .62rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.gx-kpis b { font-size: 1.05rem; font-weight: 700; }
.gx-body { display: grid; grid-template-columns: 1fr 130px; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.gx-bars { display: flex; gap: 8px; align-items: flex-end; height: 130px; }
.gx-col { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.gx-col i { display: block; width: 100%; border-radius: 2px; }
.gx-col i + i { margin-bottom: 2px; }
.gx-donut { width: 100%; }
.gx-track { fill: none; stroke: var(--track); stroke-width: 16; }
.gx-arc { fill: none; stroke-width: 16; transform: rotate(-90deg); transform-origin: center; stroke-dasharray: var(--len) 1; stroke-dashoffset: var(--off, 0); }
.ga.play .gx-arc.a-draw { animation-name: gArc; }
@keyframes gArc { from { stroke-dasharray: 0 1; } }
.gx-dt { fill: var(--text); font: 700 18px var(--font); }
.gx-ds { fill: var(--muted); font: 600 10px var(--font); }

/* 5 · Analysen */
.gy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gy-card { padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.gy-h { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.gy-card > svg { width: 100%; height: auto; display: block; }
.gy-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.gy-line.fc { stroke-dasharray: 1; opacity: .8; }
.gy-band { fill: var(--primary); opacity: .15; }
.ga.play .gy-band { animation-fill-mode: both; }
.gy-now { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.gy-wf { display: flex; gap: 8px; height: 104px; }
.gy-wf > div { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.gy-wf-p { position: relative; flex: 1; width: 100%; max-width: 34px; }
.gy-wf-p i { position: absolute; left: 0; right: 0; border-radius: 3px; }
.gy-wf-p i.tot { background: var(--primary); }
.gy-wf-p i.pos { background: var(--success); }
.gy-wf em { font-style: normal; font-size: .62rem; color: var(--muted); }
.gy-heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.gy-heat i { display: block; aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--primary) var(--p), var(--surface-2)); }
.gy-radar { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 6px; color: var(--warning-dark); }
.gy-radar > div { display: flex; flex-direction: column; color: var(--text); }
.gy-radar b { font-size: .82rem; }
.gy-radar span:not(.gy-pulse) { font-size: .72rem; color: var(--muted); }
.gy-pulse { position: absolute; left: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; animation: gPulse 2s infinite; }
@keyframes gPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warning) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 14px transparent; } }

/* Routine */
.routine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: rt; }
.routine li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.routine li div { display: flex; flex-direction: column; }
.routine b { font-size: .86rem; }
.routine li div span { font-size: .74rem; color: var(--muted); }
.rt-ic { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary-dark); }
.rt-check { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--success); padding: 2px; }
.rt-check path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1180px) {
  .guide-hero, .gs { grid-template-columns: 1fr; }
  .gs.flip .gs-text { order: 0; }
  .routine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .guide-toc { border-radius: var(--radius-md); position: static; }
  .gi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gy-grid, .routine { grid-template-columns: 1fr; }
  .gx-body { grid-template-columns: 1fr 96px; }
  .gd-row { grid-template-columns: 1fr; }
  .gd-eq { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gi-file { display: none; } }

/* ---------- CSV-Aufbau (Anleitung + Modal) ---------- */
.spec-rules { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.spec-rules li { display: flex; flex-direction: column; gap: 2px; padding: .65rem .8rem; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.spec-rules b { font-size: 1rem; color: var(--primary-dark); }
.spec-rules span { font-size: .72rem; color: var(--muted); }
.spec-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 12px; }
.spec-card { display: flex; flex-direction: column; gap: 12px; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.spec-card header { display: flex; gap: 12px; align-items: center; }
.spec-card h3 { font-size: 1rem; }
.spec-card header > div { display: flex; flex-direction: column; }
.spec-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); font-weight: 700; }
.spec-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; }
.spec-facts li { display: flex; gap: 8px; align-items: flex-start; }
.spec-facts .ic { color: var(--success); margin-top: 3px; }
.spec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.spec-mini { padding: .9rem; min-height: 0; }
.sm-grid { display: grid; grid-template-columns: repeat(var(--n), auto); gap: 3px; overflow-x: auto; font-size: .72rem; }
.sm-h, .sm-c { padding: 5px 8px; white-space: nowrap; background: var(--surface); border-radius: var(--radius); }
.sm-h { font-weight: 700; color: var(--primary-dark); background: var(--primary-light); }
.sm-h.req, .spec-tbl th.req { color: var(--danger-dark); background: var(--danger-light); }
.sm-c { color: var(--text-2); font-family: var(--mono); font-size: .68rem; }
.sm-sep { margin-top: 8px; font-size: .7rem; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.sm-req { color: var(--danger-dark); font-weight: 700; }
.spec-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: .6rem .8rem; margin-bottom: 12px; border-radius: var(--radius-md); background: var(--surface-2); font-size: .78rem; color: var(--text-2); }
.spec-meta span { display: inline-flex; gap: 5px; align-items: center; }
.spec-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.spec-pane .tbl-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.spec-cols td { vertical-align: top; }
.spec-cols tr.lv-ignoriert td { color: var(--muted); }
.badge.mute { opacity: .7; }
.raw { max-height: 46vh; overflow: auto; padding: .8rem; border-radius: var(--radius-md); background: var(--tip-bg); color: var(--tip-text); font: 11.5px/1.7 var(--mono); }
.raw-l { white-space: nowrap; }
.raw-c.h { color: #b9dcc0; font-weight: 700; }
.raw-c.req { color: #ffb3a8; }
.raw-sep { color: #f1c150; padding: 0 1px; }
.raw-empty { color: rgba(255, 255, 255, .25); font-style: normal; }
.spec-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 1.3rem; border: 2px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2); color: var(--primary-dark); text-align: center; cursor: pointer; transition: var(--transition-fast); }
.spec-drop:hover, .spec-drop.over { border-color: var(--primary); background: var(--primary-light); }
.spec-result { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.spec-result .notice { width: 100%; }
.spec-checks { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; }
.spec-checks li { display: grid; grid-template-columns: 18px 150px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .8rem; }
.spec-checks li.ok .ic { color: var(--success); }
.spec-checks li.warn .ic { color: var(--warning-dark); }
.spec-checks li.err .ic { color: var(--danger); }
.spec-checks li.err b { color: var(--danger-dark); }

/* ---------- Import-Dialog (eine oder beide Dateien) ---------- */
.imp-store { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); margin-bottom: 10px; }
.imp-store > div { display: flex; flex-direction: column; padding: .65rem .85rem; min-width: 0; }
.imp-store > div + div { border-left: 1px solid var(--border); }
.imp-store span { display: inline-flex; gap: 5px; align-items: center; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.imp-store b { font-size: .95rem; }
.imp-store em { font-style: normal; font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-intro { margin-bottom: 12px; }
.imp-slots { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 8px; align-items: stretch; margin-bottom: 10px; }
.imp-arrow { display: grid; place-items: center; color: var(--muted); }
.imp-slot { display: flex; flex-direction: column; gap: 10px; padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: var(--transition-fast); }
.imp-slot.filled { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.is-head { display: flex; gap: 10px; align-items: center; }
.is-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.is-head b { font-size: .9rem; }
.is-file { display: flex; gap: 8px; align-items: center; padding: .45rem .6rem; border-radius: var(--radius); background: var(--success-light); color: var(--success-dark); font-size: .8rem; }
.is-file.err { background: var(--danger-light); color: var(--danger-dark); }
.is-file b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-file .icon-btn { width: 24px; height: 24px; color: inherit; }
.is-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.is-stats span { display: flex; flex-direction: column; padding: .4rem .6rem; border-radius: var(--radius); background: var(--surface-2); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.is-stats b { font-size: 1.05rem; color: var(--text); letter-spacing: 0; text-transform: none; }
.is-stats .ok b { color: var(--success-dark); }
.is-stats .info b { color: var(--secondary-dark); }
.is-stats .warn b { color: var(--warning-dark); }
.is-state .spec-checks { margin-top: 6px; }
.is-state .spec-checks li { grid-template-columns: 18px 110px 1fr; }

@media (max-width: 900px) {
  .spec-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-cards { grid-template-columns: 1fr; }
  .imp-slots { grid-template-columns: 1fr; }
  .imp-arrow { display: none; }
  .imp-store { grid-template-columns: 1fr; }
  .imp-store > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .spec-checks li { grid-template-columns: 18px 110px 1fr; }
}

/* ---------- Datenfusion (Vollbild-Animation nach dem Viva-Abgleich) ---------- */
.fx-wrap { position: fixed; inset: 0; z-index: 3000; cursor: pointer; color: #e6fff0; font-family: var(--font); animation: fadeIn .35s; overflow: hidden; background: #050b07; }
.fx-wrap canvas { position: absolute; inset: 0; display: block; }
.fx-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(140, 240, 168, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 240, 168, .22) 1px, transparent 1px);
  background-size: 60px 60px; transform: perspective(500px) rotateX(62deg); transform-origin: top; animation: fxGrid 2.4s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); }
@keyframes fxGrid { to { background-position: 0 60px, 0 0; } }
.fx-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.fx-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(to bottom, transparent, rgba(140, 240, 168, .08), transparent); animation: fxSweep 3.2s linear infinite; }
@keyframes fxSweep { to { transform: translateY(calc(100vh + 240px)); } }
.fx-hud { position: absolute; inset: 0; pointer-events: none; }
.fx-hud > * { position: absolute; }
.fx-top { top: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.fx-tag { font: 700 .66rem var(--mono); letter-spacing: 4px; text-transform: uppercase; color: #8cf0a8; padding: 3px 12px; border: 1px solid rgba(140, 240, 168, .45); border-radius: var(--radius-full); box-shadow: 0 0 18px rgba(140, 240, 168, .25), inset 0 0 12px rgba(140, 240, 168, .12); }
.fx-top b { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.5px; text-shadow: 0 0 24px rgba(140, 240, 168, .55); }
.fx-top b i { font-style: normal; color: #a6d45f; padding: 0 .2em; display: inline-block; animation: fxSpin 3s linear infinite; }
@keyframes fxSpin { 50% { transform: rotate(180deg) scale(1.2); } 100% { transform: rotate(360deg); } }
.fx-id { font: 500 .7rem var(--mono); color: rgba(230, 255, 240, .55); letter-spacing: 1px; }
.fx-side { top: 13%; display: flex; flex-direction: column; gap: 2px; transition: opacity .6s, transform .6s; }
.fx-side.l { left: 6%; }
.fx-side.r { right: 6%; text-align: right; }
.fx-side span { font: 700 .66rem var(--mono); letter-spacing: 2.5px; text-transform: uppercase; color: #8cf0a8; }
.fx-side.r span { color: #c9ec8f; }
.fx-side b { font: 700 1.9rem var(--mono); letter-spacing: -1px; text-shadow: 0 0 16px rgba(140, 240, 168, .45); }
.fx-side em { font-style: normal; font-size: .72rem; color: rgba(230, 255, 240, .5); }
.st-merge .fx-side { opacity: 0; transform: translateY(-10px); }
.fx-phase { bottom: 10%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: var(--radius-full); background: rgba(10, 30, 18, .6); border: 1px solid rgba(140, 240, 168, .3); font: 600 .82rem var(--mono); letter-spacing: 1px; backdrop-filter: blur(6px); white-space: nowrap; }
.fx-phase i { width: 8px; height: 8px; border-radius: 50%; background: #8cf0a8; box-shadow: 0 0 10px #8cf0a8; animation: pulse 1s infinite; }
.fx-phase.pulse { animation: fxPhase .5s; }
@keyframes fxPhase { from { opacity: 0; transform: translate(-50%, 8px); } }
.fx-center { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.8); display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .5s, transform .6s cubic-bezier(.34, 1.56, .64, 1); text-align: center; }
.st-link .fx-center { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.st-merge .fx-center { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.st-ring .fx-center { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fx-center b { font: 700 clamp(2.4rem, 5vw, 3.6rem) var(--mono); letter-spacing: -2px; text-shadow: 0 0 30px rgba(140, 240, 168, .7); }
.fx-center span { font: 600 .72rem var(--mono); letter-spacing: 3px; text-transform: uppercase; color: rgba(230, 255, 240, .7); }
.fx-labels { inset: 0; }
.fx-lbl { position: absolute; transform: translate(-50%, -50%) scale(.6); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 14px; border-radius: var(--radius-md); background: rgba(8, 22, 14, .72); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 40%, transparent); opacity: 0; transition: opacity .5s, transform .7s cubic-bezier(.34, 1.56, .64, 1); backdrop-filter: blur(4px); white-space: nowrap; }
.fx-lbl i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.fx-lbl b { font-size: 1rem; }
.fx-lbl span { font: 600 .72rem var(--mono); color: rgba(230, 255, 240, .75); }
.st-ring .fx-lbl { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.st-ring .fx-lbl:nth-child(2) { transition-delay: .12s; }
.st-ring .fx-lbl:nth-child(3) { transition-delay: .24s; }
.st-ring .fx-lbl:nth-child(4) { transition-delay: .36s; }
.fx-done { bottom: 17%; left: 50%; transform: translateX(-50%) translateY(10px); display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0; transition: all .6s; text-align: center; }
.fx-done b { font-size: 1.3rem; letter-spacing: .5px; color: #b6ffcb; text-shadow: 0 0 20px rgba(140, 240, 168, .6); }
.fx-done span { font-size: .85rem; color: rgba(230, 255, 240, .75); }
.st-done .fx-done { opacity: 1; transform: translateX(-50%); }
.fx-skip { right: 24px; bottom: 22px; pointer-events: auto; border: 1px solid rgba(230, 255, 240, .25); background: rgba(10, 30, 18, .5); color: rgba(230, 255, 240, .8); border-radius: var(--radius-full); padding: 6px 14px; font: 600 .75rem var(--font); cursor: pointer; }
.fx-skip:hover { border-color: #8cf0a8; color: #fff; }
.fx-skip kbd { background: transparent; color: inherit; border-color: rgba(230, 255, 240, .3); margin: 0 0 0 6px; }
@media (max-width: 680px) { .fx-side { display: none; } .fx-phase { font-size: .7rem; } }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); }

/* ---------- Responsiv ---------- */
@media (max-width: 1180px) {
  .grid-2-1 { grid-template-columns: 1fr; }
  .prow { grid-template-columns: auto auto minmax(140px, 1fr) minmax(100px, auto) auto auto; }
  .p-badges { grid-column: 3 / -1; grid-row: 2; justify-content: flex-start; }
  .p-badges:empty { display: none; }
  .goal-row { grid-template-columns: 130px minmax(100px, 1fr) 170px; }
  .goal-plan, .goal-fc { grid-column: 2 / -1; }
  .goal-plan { margin-top: -8px; }
  .ck-grid { grid-template-columns: 1fr; }
  .ck-side { border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .ck-side li { border-bottom: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  body { overflow-x: hidden; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1100; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-xl); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1050; background: rgba(0, 0, 0, .45); animation: fadeIn .2s; }
  .app-header .menu-btn { display: inline-grid; margin-left: -8px; }
  .app-header { padding: 0 1rem; }
  .hdr-note { display: none; }
  .main { padding: 1.25rem 1rem 3rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .backup-grid { grid-template-columns: 1fr; }
  .bk + .bk { border-left: 0; border-top: 1px solid var(--border); }
  .th-row { grid-template-columns: 34px 1fr auto auto; }
  .th-row input[data-f="role"], .th-usage { display: none; }
  .p-detail { padding-left: 16px; padding-right: 16px; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--border); }
  .imp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  h1 { font-size: calc(25px * var(--fs)); }
  .hide-sm { display: none; }
  .prow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .prow .avatar, .prow .p-stats { display: none; }
  .p-assign { grid-column: 1 / -1; }
  .p-badges { grid-column: 1 / -1; grid-row: auto; }
  .prow .exp { grid-row: 1; grid-column: 3; }
  .rx-head, .dr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-row { grid-template-columns: 90px 1fr 96px; }
  .colchart { padding-left: 44px; }
  .fb-right, .tb-right { margin-left: 0; }
  .plist-h span.muted { display: none; }
  .goal-row { grid-template-columns: 1fr; gap: 6px; }
  .goal-plan, .goal-fc { grid-column: auto; margin: 0; }
  .gf-head, .gf-row { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Gehaltsrechner (Brutto / Netto / Arbeitgeberkosten) ---------- */
.gx { --tc: var(--primary); display: flex; flex-direction: column; gap: 1.25rem; }
.gx-hero { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 1.4rem 1.75rem 1.3rem; border-radius: var(--radius-lg); overflow: hidden; color: var(--text-inverse);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--info)); box-shadow: var(--shadow-md); }
.gx-hero::before { content: ''; position: absolute; width: 320px; height: 320px; right: -60px; top: -160px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--text-inverse) 16%, transparent), transparent 70%); animation: cxFloat 10s ease-in-out infinite alternate; }
.gx-hero > * { position: relative; z-index: 1; }
.gx-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.gx-hero-top .cx-who { margin: 0; }
.gx-per { background: color-mix(in srgb, var(--text-inverse) 12%, transparent); border-color: color-mix(in srgb, var(--text-inverse) 25%, transparent); }
.gx-per button { color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.gx-per button.on { color: var(--primary-dark); }
.gx-big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gx-big3 > div { display: flex; flex-direction: column; gap: 2px; padding: .8rem 1rem; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text-inverse) 10%, transparent); border: 1px solid color-mix(in srgb, var(--text-inverse) 16%, transparent); }
.gx-big3 > div.net { background: color-mix(in srgb, var(--text-inverse) 20%, transparent); border-color: color-mix(in srgb, var(--text-inverse) 40%, transparent); box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-dark) 40%, transparent); }
.gx-big3 span { font-size: .7rem; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; color: color-mix(in srgb, var(--text-inverse) 78%, transparent); }
.gx-big3 b { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gx-big3 em { font-style: normal; font-size: .75rem; color: color-mix(in srgb, var(--text-inverse) 75%, transparent); }
.gx-flow { display: flex; height: 16px; border-radius: var(--radius-full); overflow: hidden; background: color-mix(in srgb, var(--text-inverse) 15%, transparent); gap: 2px; }
.gx-flow i { display: block; flex: 0 1 0; min-width: 0; transition: flex-grow .8s cubic-bezier(.22, 1, .36, 1); }
.gx .f-net { background: var(--text-inverse); }
.gx .f-tax { background: var(--warning); }
.gx .f-svan { background: color-mix(in srgb, var(--text-inverse) 55%, var(--info)); }
.gx .f-svag { background: var(--primary-dark); }
.gx .f-uml { background: color-mix(in srgb, var(--primary-dark) 55%, var(--gray-400)); }
.gx-flow-l { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .75rem; color: color-mix(in srgb, var(--text-inverse) 85%, transparent); }
.gx-flow-l span { display: inline-flex; align-items: center; gap: 6px; }
.gx-flow-l i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.gx-flow-l b { color: var(--text-inverse); }

.gx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.gx-mode { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); }
.gx-mode button { padding: 5px 4px; }
.gx-conv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gx-conv > div { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border-light); transition: var(--transition); }
.gx-conv > div.on { border-color: var(--primary); background: var(--primary-light); }
.gx-conv span { font-size: .66rem; color: var(--muted); }
.gx-conv b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.gx-lbl { font-size: .72rem; color: var(--muted); margin-bottom: -6px; }
.gx-stkl { align-self: stretch; display: grid; grid-template-columns: repeat(6, 1fr); }
.gx-stkl button { padding: 6px 0; font-weight: 700; }
.gx-check { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--text); cursor: pointer; }
.gx-check input { accent-color: var(--primary); width: 16px; height: 16px; }
.gx-more { border-top: 1px dashed var(--border); padding-top: 8px; }
.gx-more summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; }
.gx-tbl { display: flex; flex-direction: column; gap: 12px; }
.gx-acc h4 { margin: 0 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.gx-acc > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: .82rem; border-bottom: 1px solid var(--border-light); }
.gx-acc > div span { color: var(--muted); }
.gx-acc > div b { font-variant-numeric: tabular-nums; font-weight: 600; }
.gx-acc > div.neg b { color: var(--danger); }
.gx-acc > div.sum b { color: var(--text); }
.gx-acc > div.total { border-bottom: 0; border-top: 2px solid var(--text); margin-top: 2px; padding-top: 5px; }
.gx-acc > div.total span { color: var(--text); font-weight: 700; }
.gx-acc > div.total b { font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

.gx-afford { display: flex; flex-direction: column; gap: 12px; padding: 1.2rem 1.35rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); animation: cxIn .6s cubic-bezier(.22, 1, .36, 1) both; animation-delay: 330ms; }
.gx-af-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.gx-af-head h3 { margin: 0; font-size: 1rem; }
.gx-af-head p { margin: 2px 0 0; }
.gx-af-grid { display: grid; grid-template-columns: 170px minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.gx-ring { position: relative; width: 160px; height: 160px; }
.gx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gx-ring circle { fill: none; stroke-width: 12; }
.gx-ring .bg { stroke: var(--gray-100); }
.gx-ring .fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dasharray 1s cubic-bezier(.22, 1, .36, 1), stroke .3s; }
.gx-ring.over .fg { stroke: var(--danger); }
.gx-ring .tg { stroke: var(--text); stroke-width: 18; transition: stroke-dashoffset .6s cubic-bezier(.22, 1, .36, 1); }
.gx-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gx-ring-c b { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-ring.over .gx-ring-c b { color: var(--danger); }
.gx-ring-c span { font-size: .66rem; color: var(--muted); max-width: 90px; line-height: 1.25; }
.gx-af-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gx-af-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: .7rem .85rem; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border-light); }
.gx-af-kpis span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.gx-af-kpis b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.gx-af-kpis em { font-style: normal; font-size: .72rem; color: var(--muted); }
.gx-af-kpis .hi { background: var(--primary); border-color: var(--primary); color: var(--text-inverse); box-shadow: var(--shadow-md); }
.gx-af-kpis .hi span, .gx-af-kpis .hi em { color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.gx-af-ctrl { display: flex; flex-direction: column; gap: 10px; }
.gx-disc { margin: 0; }
@media (max-width: 1200px) { .gx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gx-grid > :last-child { grid-column: 1 / -1; } .gx-af-grid { grid-template-columns: 170px minmax(0, 1fr); } .gx-af-ctrl { grid-column: 1 / -1; } }
@media (max-width: 900px) { .gx-grid, .gx-big3 { grid-template-columns: 1fr; } .gx-af-grid { grid-template-columns: 1fr; justify-items: center; } .gx-af-kpis, .gx-af-ctrl { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .gx *, .gx *::before, .gx-hero::before { animation: none !important; transition: none !important; } }

/* ---------- Soll-Ist-Bericht (PDF, DIN A4 hochkant, 1 Seite) ---------- */
.si-ui { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; align-items: start; }
.si-ctrl { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.si-ctrl-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.si-months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; transition: opacity .3s; }
.si-months.is-year { opacity: .55; }
.si-mb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); animation: cxPop .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: var(--d); }
.si-mb:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--secondary); box-shadow: var(--shadow-md); }
.si-mb:disabled { opacity: .4; cursor: default; }
.si-mb.on { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-sm); }
.si-mb .mb-bar { position: relative; display: block; width: 14px; height: 30px; border-radius: 3px; background: var(--gray-100); overflow: hidden; }
.si-mb .mb-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--secondary); border-radius: 3px; transition: height .5s cubic-bezier(.22, 1, .36, 1); }
.si-mb.s-ok .mb-bar i { background: var(--success); }
.si-mb.s-warn .mb-bar i { background: var(--warning); }
.si-mb.s-bad .mb-bar i { background: var(--danger); }
.si-mb em { font-style: normal; font-size: .66rem; color: var(--muted); font-weight: 500; }
.si-hint { margin: -4px 0 0; }
.si-srcs { display: flex; flex-direction: column; gap: 6px; }
.si-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.si-chip { --c: var(--primary); display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 6px; border-radius: var(--radius-full); border: 1.5px dashed var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.si-chip em { font-style: normal; font-weight: 400; font-size: .72rem; color: var(--muted); }
.si-chk { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); color: transparent; transition: var(--transition-spring); }
.si-chip:hover { border-color: var(--c); transform: translateY(-1px); }
.si-chip.on { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--text); }
.si-chip.on .si-chk { background: var(--c); border-color: var(--c); color: var(--text-inverse); transform: scale(1.05); }
.si-chip:active { transform: scale(.96); }
.si-all { margin-left: 2px; }
.si-scope-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.si-scope-h .sub-h { margin: 0; }
.si-chip.radio .si-chk { border-radius: 50%; }
.si-chip.radio:not(.on) .si-chk { background: transparent; }
/* Einzelbericht */
.si-perf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2.2mm; }
.si-perf-t { display: flex; flex-direction: column; gap: .6mm; padding: 2.2mm 2.4mm; border-radius: 2mm; background: var(--si-soft); border-left: .8mm solid var(--tc, var(--si-pri)); min-width: 0; }
.si-perf-t > span:first-child { font-size: 6.6pt; text-transform: uppercase; letter-spacing: .06em; color: var(--si-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-perf-t b { font-size: 12pt; white-space: nowrap; }
.si-perf-t em { font-style: normal; font-size: 6.8pt; color: var(--si-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-perf-t .pb { display: block; height: 1.6mm; border-radius: .8mm; background: var(--si-white); overflow: hidden; }
.si-perf-t .pb i { display: block; height: 100%; background: var(--tc, var(--si-pri)); border-radius: .8mm; }
.si-mx-one tbody th { width: 22mm; }
.si-mx-one td.pos { color: var(--si-ok); font-weight: 700; } .si-mx-one td.neg { color: var(--si-bad); font-weight: 700; }
.si-src { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: .85rem; }
.si-src > span:first-child { display: flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-src .select { width: 100%; }
.si-src .select select { max-width: none; width: 100%; }
.si-src b { text-align: right; font-variant-numeric: tabular-nums; }
.si-go { align-self: flex-start; margin-top: 6px; }
.si-prev { position: relative; width: 100%; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xl); background: var(--surface); animation: siFlip .55s cubic-bezier(.22, 1, .36, 1) both; transform-origin: 50% 0; }
@keyframes siFlip { from { opacity: 0; transform: perspective(1200px) rotateX(-8deg) translateY(14px); } }
.si-prev-in { width: 210mm; transform-origin: 0 0; pointer-events: none; }
@media (max-width: 1100px) { .si-ui { grid-template-columns: 1fr; } .si-prev { max-width: 620px; } }
@media (max-width: 680px) { .si-months { grid-template-columns: repeat(4, minmax(0, 1fr)); } .si-src { grid-template-columns: 1fr; gap: 4px; } .si-src b { text-align: left; } }

/* Seite selbst – feste Druckfarben (unabhängig vom App-Theme) */
.si-page { --si-ink: #2a312c; --si-muted: #626f66; --si-line: #dbe3dc; --si-soft: #f2f6f2; --si-pri: #3f6b4c; --si-pri-d: #284b33; --si-info: #5f9a6c;
  --si-ok: #3f8a3a; --si-ok-l: #e3f1df; --si-warn: #b98a14; --si-warn-l: #faf1d4; --si-bad: #c23b3b; --si-bad-l: #fbe3e3; --si-white: #ffffff;
  box-sizing: border-box; width: 210mm; height: 297mm; padding: 0 11mm 8mm; background: var(--si-white); color: var(--si-ink); font: 8.4pt/1.42 var(--font);
  display: flex; flex-direction: column; gap: 3.6mm; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-variant-numeric: tabular-nums; }
.si-page *, .si-page *::before, .si-page *::after { box-sizing: border-box; }
.si-page h1, .si-page h2, .si-page h3, .si-page p, .si-page ul { margin: 0; }
.si-head { margin: 0 -11mm; padding: 8mm 11mm 6.5mm; display: flex; justify-content: space-between; align-items: flex-end; color: var(--si-white);
  background: linear-gradient(120deg, var(--si-pri-d), var(--si-pri) 58%, var(--si-info)); position: relative; overflow: hidden; }
.si-head::after { content: ''; position: absolute; right: -30mm; top: -40mm; width: 90mm; height: 90mm; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--si-white) 18%, transparent), transparent 70%); }
.si-head h1, .si-head p { color: inherit; }
.si-kicker { font-size: 7.5pt; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.si-head h1 { font-size: 24pt; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 1mm; }
.si-sub { font-size: 8.5pt; opacity: .85; margin-top: 1mm !important; }
.si-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 2.5mm; font-size: 7.5pt; line-height: 1.25; opacity: .92; text-align: left; }
.si-logo { display: grid; place-items: center; width: 9mm; height: 9mm; border-radius: 2.5mm; background: color-mix(in srgb, var(--si-white) 20%, transparent); font-weight: 700; font-size: 12pt; }

.si-hero { display: grid; grid-template-columns: 46mm minmax(0, 1fr); gap: 4mm; align-items: center; }
.si-gwrap { position: relative; height: 28mm; display: flex; justify-content: center; }
.si-gauge { width: 46mm; height: 26.7mm; }
.si-gauge path { fill: none; stroke-width: 9; stroke-linecap: round; }
.si-gauge .g-bg { stroke: var(--si-soft); }
.si-gauge .g-fg { stroke: var(--si-pri); }
.si-gauge.ok .g-fg { stroke: var(--si-ok); } .si-gauge.warn .g-fg { stroke: var(--si-warn); } .si-gauge.bad .g-fg { stroke: var(--si-bad); }
.si-gval { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; display: flex; flex-direction: column; }
.si-gval b { font-size: 19pt; font-weight: 700; line-height: 1; }
.si-gval span { font-size: 7pt; color: var(--si-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: .8mm; }
.si-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5mm; }
.si-kpi { display: flex; flex-direction: column; gap: .6mm; padding: 2.6mm 3mm; border-radius: 2.5mm; background: var(--si-soft); border-top: .7mm solid var(--si-pri); }
.si-kpi span { font-size: 6.8pt; text-transform: uppercase; letter-spacing: .08em; color: var(--si-muted); font-weight: 700; }
.si-kpi b { font-size: 13.5pt; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.si-kpi em { font-style: normal; font-size: 7.2pt; color: var(--si-muted); }
.si-kpi.pos { border-top-color: var(--si-ok); } .si-kpi.pos b { color: var(--si-ok); }
.si-kpi.neg { border-top-color: var(--si-bad); } .si-kpi.neg b { color: var(--si-bad); }

.si-page h2 { font-size: 9.5pt; font-weight: 700; color: var(--si-pri-d); margin-bottom: 1.8mm; display: flex; align-items: baseline; gap: 2mm; }
.si-page h2 small, .si-page h3 small { font-size: 7pt; font-weight: 400; color: var(--si-muted); }
.si-page h3 { font-size: 8pt; font-weight: 700; color: var(--si-pri-d); margin: 2.5mm 0 1.2mm; }
.si-sec { display: flex; flex-direction: column; gap: 1.6mm; }
.si-row { display: grid; grid-template-columns: 34mm minmax(0, 1fr) 14mm 36mm; gap: 3mm; align-items: center; padding: 1.8mm 2.5mm; border-radius: 2mm; background: var(--si-soft); }
.si-name { display: flex; align-items: center; gap: 2mm; min-width: 0; }
.si-name > div { min-width: 0; }
.si-name > i { width: 3mm; height: 3mm; border-radius: 50%; flex: none; }
.si-name b { display: block; font-size: 9pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-name em { display: block; font-style: normal; font-size: 6.6pt; color: var(--si-muted); }
.si-bul { display: flex; flex-direction: column; gap: 1mm; min-width: 0; }
.si-bul .tr { position: relative; display: block; height: 3.4mm; border-radius: 1.7mm; background: var(--si-white); box-shadow: inset 0 0 0 .2mm var(--si-line); }
.si-bul .fi { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1.7mm; }
.si-bul .mk { position: absolute; top: -1mm; bottom: -1mm; width: .7mm; margin-left: -.35mm; background: var(--si-ink); border-radius: .3mm; }
.si-bul .lb { display: flex; gap: 3.5mm; font-size: 7.2pt; color: var(--si-muted); }
.si-bul .lb b { color: var(--si-ink); }
.si-bul .pos { color: var(--si-ok); font-weight: 700; } .si-bul .neg { color: var(--si-bad); font-weight: 700; }
.si-pct { text-align: center; font-size: 12pt; font-weight: 700; padding: 1mm 0; border-radius: 1.6mm; }
.si-pct.ok { color: var(--si-ok); background: var(--si-ok-l); } .si-pct.warn { color: var(--si-warn); background: var(--si-warn-l); } .si-pct.bad { color: var(--si-bad); background: var(--si-bad-l); } .si-pct.na { color: var(--si-muted); }
.si-meta { font-size: 6.9pt; color: var(--si-muted); line-height: 1.45; }

.si-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5mm; }
.si-three { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 3.5mm; }
.si-page > * { flex-shrink: 0; }
.si-page > .si-grow { flex: 1 1 0; min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
.si-dense { gap: 2.6mm; }
.si-dense .si-sec { gap: 1mm; }
.si-dense .si-row { padding: 1.1mm 2.5mm; }
.si-dense .si-pct { font-size: 10.5pt; padding: .4mm 0; }
.si-dense .si-name b { font-size: 8.4pt; }
.si-dense .si-strip div { padding: 1mm .5mm .8mm; }
.si-dense .si-hero { margin-top: -1mm; }
.si-box { border: .25mm solid var(--si-line); border-radius: 2.5mm; padding: 3mm 3.2mm; min-width: 0; overflow: hidden; }
.si-chart { display: block; width: 100%; height: auto; }
.si-chart .gl { stroke: var(--si-line); stroke-width: .6; }
.si-chart .ax { font-size: 8px; fill: var(--si-muted); }
.si-chart .ax.b { fill: var(--si-ink); font-weight: 700; }
.si-chart .soll { stroke: var(--si-ink); stroke-width: 1.6; stroke-dasharray: 4 3; fill: none; }
.si-chart .hi { fill: none; stroke: var(--si-pri); stroke-width: 1; stroke-dasharray: 2 2; }
.si-chart .area { fill: var(--si-pri); fill-opacity: .14; }
.si-chart .ist { fill: none; stroke: var(--si-pri); stroke-width: 2.4; stroke-linejoin: round; }
.si-chart .ist-dot { fill: var(--si-white); stroke: var(--si-pri); stroke-width: 2.4; }
.si-chart .hr { fill: none; stroke: var(--si-info); stroke-width: 2; stroke-dasharray: 1.5 3.5; stroke-linecap: round; }
.si-chart .hr-dot { fill: var(--si-info); }
.si-chart .lbl { font-size: 8.5px; fill: var(--si-ink); font-weight: 700; paint-order: stroke; stroke: var(--si-white); stroke-width: 3px; stroke-linejoin: round; }
.si-leg { display: flex; flex-wrap: wrap; gap: 1.2mm 3.5mm; margin-top: 1.4mm; font-size: 6.9pt; color: var(--si-muted); }
.si-leg span { display: inline-flex; align-items: center; gap: 1.2mm; }
.si-leg i { display: inline-block; width: 2.6mm; height: 2.6mm; border-radius: .6mm; }
.si-leg i.soll-k { height: 0; border-top: .5mm dashed var(--si-ink); border-radius: 0; width: 4mm; }
.si-leg i.ist-k { height: .7mm; background: var(--si-pri); width: 4mm; }
.si-leg i.hr-k { height: 0; border-top: .6mm dotted var(--si-info); border-radius: 0; width: 4mm; }

.si-text { display: flex; flex-direction: column; }
.si-basis { margin-top: auto; padding-top: 2.5mm; border-top: .25mm solid var(--si-line); }
.si-basis h3 { margin-top: 0; }
.si-text .si-basis ul { list-style: none; padding: 0; gap: 1.4mm; }
.si-basis li { position: relative; padding-left: 4mm; font-size: 7pt; line-height: 1.4; }
.si-basis li i { position: absolute; left: 0; top: 1mm; width: 2.4mm; height: 2.4mm; border-radius: 50%; }
.si-basis li span { color: var(--si-muted); }
.si-mini.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.si-text ul { padding-left: 3.6mm; display: flex; flex-direction: column; gap: 1.5mm; }
.si-text li { font-size: 7.9pt; line-height: 1.45; }
.si-text li::marker { color: var(--si-pri); }
.si-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2mm; }
.si-mini div { display: flex; flex-direction: column; padding: 1.8mm 2mm; border-radius: 1.6mm; background: var(--si-soft); }
.si-mini span { font-size: 6.6pt; color: var(--si-muted); }
.si-mini b { font-size: 10pt; }
.si-kt { display: flex; flex-direction: column; gap: 1.3mm; }
.si-kt-r { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr) 14mm 7mm; gap: 2mm; align-items: center; font-size: 7.2pt; }
.si-kt-r .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-kt-r .b { display: block; height: 2.6mm; border-radius: 1.3mm; background: var(--si-soft); overflow: hidden; }
.si-kt-r .b i { display: block; height: 100%; border-radius: 1.3mm; background: linear-gradient(90deg, var(--si-pri), var(--si-info)); }
.si-kt-r .v { text-align: right; font-weight: 700; }
.si-kt-r .p { text-align: right; color: var(--si-muted); }

.si-mx { width: 100%; border-collapse: separate; border-spacing: .5mm; font-size: 7pt; table-layout: fixed; }
.si-mx th, .si-mx td { padding: 1.1mm .8mm; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-mx thead th { color: var(--si-muted); font-weight: 700; font-size: 6.6pt; }
.si-mx thead th:first-child, .si-mx tbody th, .si-mx tfoot th { text-align: left; width: 25mm; }
.si-mx thead th:nth-last-child(-n+4) { width: 14mm; }
.si-mx-one thead th:nth-last-child(-n+4) { width: auto; }
.si-mx-one thead th:last-child { width: 18mm; }
.si-mx tbody th, .si-mx tfoot th { font-weight: 700; }
.si-mx th i { display: inline-block; width: 2.2mm; height: 2.2mm; border-radius: 50%; margin-right: 1.2mm; vertical-align: middle; }
.si-mx td { border-radius: .8mm; background: var(--si-soft); }
.si-mx td.c-ok { background: var(--si-ok-l); color: var(--si-ok); font-weight: 700; }
.si-mx td.c-warn { background: var(--si-warn-l); color: var(--si-warn); font-weight: 700; }
.si-mx td.c-bad { background: var(--si-bad-l); color: var(--si-bad); font-weight: 700; }
.si-mx .dim { background: transparent; color: var(--si-line); }
.si-mx td.sum { background: transparent; font-weight: 700; border-left: .2mm solid var(--si-line); }
.si-mx td.sum.ok { color: var(--si-ok); } .si-mx td.sum.warn { color: var(--si-warn); } .si-mx td.sum.bad { color: var(--si-bad); }
.si-mx tfoot td, .si-mx tfoot th { background: transparent; border-top: .3mm solid var(--si-ink); font-weight: 700; }
.si-mx tr.none th, .si-mx tr.none td { color: var(--si-muted); }
.si-note { font-size: 6.6pt; color: var(--si-muted); margin-top: 1.2mm !important; }
.si-q { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5mm; align-items: end; }
.si-q > div { display: flex; flex-direction: column; align-items: center; gap: .6mm; font-size: 6.8pt; color: var(--si-muted); }
.si-q b { color: var(--si-ink); font-size: 7.6pt; }
.si-q .qb { position: relative; display: block; width: 7mm; height: 16mm; background: var(--si-soft); border-radius: 1mm; }
.si-q .qb i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--si-pri); border-radius: 1mm; }
.si-q .qb em { position: absolute; left: -1.2mm; right: -1.2mm; height: 0; border-top: .5mm dashed var(--si-ink); }
.si-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.4mm; }
.si-strip div { display: flex; flex-direction: column; align-items: center; gap: .4mm; padding: 1.6mm .5mm 1.4mm; border-radius: 1.6mm; background: var(--si-soft); font-size: 6.6pt; color: var(--si-muted); }
.si-strip b { font-size: 8.6pt; color: var(--si-ink); }
.si-strip em { font-style: normal; font-size: 6.2pt; }
.si-strip .ok { background: var(--si-ok-l); } .si-strip .ok b { color: var(--si-ok); }
.si-strip .warn { background: var(--si-warn-l); } .si-strip .warn b { color: var(--si-warn); }
.si-strip .bad { background: var(--si-bad-l); } .si-strip .bad b { color: var(--si-bad); }
.si-strip .cur { box-shadow: inset 0 0 0 .45mm var(--si-pri-d); }
.si-strip .na { opacity: .45; }
.si-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 4mm; padding-top: 2mm; border-top: .25mm solid var(--si-line); font-size: 6.6pt; color: var(--si-muted); }
@media print {
  body.printing-si { margin: 0; background: none; }
  body.printing-si #printRoot { margin: 0; padding: 0; }
  body.printing-si .si-page { height: 296.6mm; break-after: avoid; page-break-after: avoid; break-inside: avoid; }
}

/* ---------- Übersicht: Motion Graphics ----------
   Grundzustand = Endzustand. Animationen laufen nur unter .dash.anim, ausgelöst je Abschnitt (.rv → .in) beim Sichtbarwerden. */
.cnt { font-variant-numeric: tabular-nums; }

/* Hero „Puls der Praxis“ */
.dh-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 1.75rem; align-items: center; padding: 1.5rem 1.75rem 1.25rem; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
  color: var(--text-inverse); box-shadow: var(--shadow-md);
  background: linear-gradient(125deg, var(--bg-sidebar), color-mix(in srgb, var(--bg-sidebar) 45%, var(--primary)) 52%, color-mix(in srgb, var(--primary) 65%, var(--info))); }
.dh-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(color-mix(in srgb, var(--text-inverse) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--text-inverse) 7%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(100deg, transparent 20%, var(--text-inverse) 75%); -webkit-mask-image: linear-gradient(100deg, transparent 20%, var(--text-inverse) 75%); }
.dh-orb { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--text-inverse) 18%, transparent), transparent 68%); animation: dhFloat 11s ease-in-out infinite alternate; }
.dh-orb.a { width: 380px; height: 380px; left: 26%; top: -210px; }
.dh-orb.b { width: 260px; height: 260px; left: -90px; bottom: -150px; animation-duration: 14s; animation-direction: alternate-reverse; }
@keyframes dhFloat { to { transform: translate(46px, 26px) scale(1.14); } }
.dh-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dh-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: color-mix(in srgb, var(--text-inverse) 78%, transparent); }
.dh-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success-light, var(--text-inverse)); box-shadow: 0 0 0 0 color-mix(in srgb, var(--text-inverse) 60%, transparent); animation: dhLive 2.2s ease-out infinite; }
@keyframes dhLive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--text-inverse) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.dh-big { font-size: clamp(2.2rem, 4.6vw, 3.3rem); font-weight: 700; letter-spacing: -1.4px; line-height: 1.05; }
.dh-sub { font-size: .82rem; color: color-mix(in srgb, var(--text-inverse) 80%, transparent); }
.dh-delta { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; padding: 2px 9px 2px 7px; border-radius: var(--radius-full); font-weight: 700; background: color-mix(in srgb, var(--text-inverse) 16%, transparent); color: var(--text-inverse); }
.dh-delta.down { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.dh-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dh-pills > div { display: flex; flex-direction: column; gap: 2px; padding: .55rem .75rem; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text-inverse) 11%, transparent); border: 1px solid color-mix(in srgb, var(--text-inverse) 16%, transparent); backdrop-filter: blur(4px); min-width: 0; }
.dh-pills > div > span { font-size: .68rem; color: color-mix(in srgb, var(--text-inverse) 74%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-pills b { font-size: 1.05rem; white-space: nowrap; }
.dh-shares { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.dh-share { display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; font-size: .78rem; }
.dh-share > span { display: inline-flex; align-items: center; gap: 6px; color: color-mix(in srgb, var(--text-inverse) 85%, transparent); }
.dh-share > span i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-inverse) 45%, transparent); }
.dh-share b { font-size: .95rem; }
.dh-share em { grid-column: 1 / -1; font-style: normal; font-size: .7rem; color: color-mix(in srgb, var(--text-inverse) 65%, transparent); padding-left: 15px; }
.dh-chart { min-width: 0; color: var(--text-inverse); }
.dh-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.dh-zone { fill: color-mix(in srgb, var(--text-inverse) 7%, transparent); stroke: color-mix(in srgb, var(--text-inverse) 18%, transparent); stroke-dasharray: 3 4; }
.dh-ax { fill: color-mix(in srgb, var(--text-inverse) 70%, transparent); font: 600 10px var(--font); }
.dh-ax.zone { font-size: calc(9.5px * var(--fs)); text-transform: uppercase; letter-spacing: .6px; }
.dh-bar { fill: color-mix(in srgb, var(--text-inverse) 20%, transparent); transform-box: fill-box; transform-origin: 50% 100%; }
.dh-bar.cur { fill: color-mix(in srgb, var(--text-inverse) 36%, transparent); }
.dh-line { fill: none; stroke: var(--text-inverse); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--bg-sidebar) 70%, transparent)); }
.dh-dot { fill: var(--text-inverse); stroke: var(--primary); stroke-width: 2.5; }
.dh-pulse { fill: none; stroke: var(--text-inverse); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: dhPulse 2.4s ease-out infinite; }
@keyframes dhPulse { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(4.2); opacity: 0; } }
.dh-hit { fill: transparent; }
.dh-hit:hover { fill: color-mix(in srgb, var(--text-inverse) 8%, transparent); }
.dh-legend { display: flex; justify-content: flex-end; gap: 14px; margin-top: 4px; font-size: .7rem; color: color-mix(in srgb, var(--text-inverse) 72%, transparent); }
.dh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dh-legend i.bar { width: 8px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--text-inverse) 36%, transparent); }
.dh-legend i.ln { width: 16px; height: 2.5px; border-radius: 2px; background: var(--text-inverse); }

/* Abschnitte einblenden */
.dash.anim .rv:not(.in) { opacity: 0; }
.dash.anim .rv.in { animation: dIn .7s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes dIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes dFade { from { opacity: 0; } }
@keyframes dRise { from { opacity: 0; transform: translateY(10px); } }
@keyframes dGrowY { from { transform: scaleY(0); } }
@keyframes dRevealX { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.25); } 100% { transform: scale(1); opacity: 1; } }
@keyframes dDrop { from { transform: translateY(-14px); opacity: 0; } }

/* Hero */
.dash.anim .dh-hero.in .dh-main > * { animation: dRise .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.dash.anim .dh-hero.in .dh-main > :nth-child(2) { animation-delay: .08s; }
.dash.anim .dh-hero.in .dh-main > :nth-child(3) { animation-delay: .16s; }
.dash.anim .dh-hero.in .dh-main > :nth-child(4) { animation-delay: .26s; }
.dash.anim .dh-hero.in .dh-main > :nth-child(5) { animation-delay: .36s; }
.dash.anim .dh-hero.in .dh-share { animation: dRise .5s ease backwards; animation-delay: calc(.5s + var(--i) * 90ms); }
.dash.anim .dh-hero.in .dh-bar { animation: dGrowY .7s cubic-bezier(.2, .9, .25, 1) backwards; animation-delay: calc(.15s + var(--i) * 32ms); }
.dash.anim .dh-hero.in .dh-line { stroke-dasharray: 1; animation: dDraw 1.6s cubic-bezier(.45, .05, .2, 1) .45s backwards; }
.dash.anim .dh-hero.in .dh-area { animation: dRevealX 1.6s cubic-bezier(.45, .05, .2, 1) .45s backwards; }
.dash.anim .dh-hero.in .dh-zone, .dash.anim .dh-hero.in .dh-ax.zone { animation: dFade .6s ease 1.5s backwards; }
.dash.anim .dh-hero.in .dh-dot { transform-box: fill-box; transform-origin: center; animation: dPop .5s ease 1.95s backwards; }
.dash.anim .dh-hero.in .dh-pulse { animation: dFade .2s 2.2s backwards, dhPulse 2.4s ease-out 2.2s infinite; }

/* Monatsabschluss */
.dash.anim .cockpit.in .ck-total { animation: dRise .55s ease .1s backwards; }
.dash.anim .cockpit.in tbody tr { animation: dRise .45s ease backwards; }
.dash.anim .cockpit.in tbody tr:nth-child(1) { animation-delay: .2s; } .dash.anim .cockpit.in tbody tr:nth-child(2) { animation-delay: .28s; }
.dash.anim .cockpit.in tbody tr:nth-child(3) { animation-delay: .36s; } .dash.anim .cockpit.in tbody tr:nth-child(n+4) { animation-delay: .44s; }
.dash.anim .cockpit.in .mg-bar i { animation: dRevealX 1s cubic-bezier(.2, .8, .2, 1) .5s backwards; }
.dash.anim .cockpit.in .ck-side li { animation: dRise .45s ease backwards; }
.dash.anim .cockpit.in .ck-side li:nth-child(2) { animation-delay: .1s; } .dash.anim .cockpit.in .ck-side li:nth-child(3) { animation-delay: .2s; } .dash.anim .cockpit.in .ck-side li:nth-child(4) { animation-delay: .3s; }
.ck-side li.warn b { transition: color .3s; }
.dash.anim .cockpit.in .ck-side li.warn b { animation: dPop .5s ease .6s backwards; }

/* KPIs */
.dash.anim .kpis.in .kpi { animation: dRise .55s cubic-bezier(.2, .8, .2, 1) backwards; }
.dash.anim .kpis.in .kpi:nth-child(2) { animation-delay: .08s; } .dash.anim .kpis.in .kpi:nth-child(3) { animation-delay: .16s; } .dash.anim .kpis.in .kpi:nth-child(4) { animation-delay: .24s; }
.dash.anim .kpis.in .delta { animation: dPop .45s ease .7s backwards; }

/* Therapeutinnen-Karten */
.dash.anim .tcards.in .tcard { animation: dRise .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 110ms); }
.dash.anim .tcards.in .tc-spark svg { animation: dRevealX 1.3s cubic-bezier(.45, .05, .2, 1) backwards; animation-delay: calc(.3s + var(--i) * 110ms); }
.tcard { position: relative; overflow: hidden; }
.tcard::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--c) 14%, transparent) 50%, transparent 65%); transform: translateX(-100%); }
.dash.anim .tcards.in .tcard::after { animation: dShine 1.4s ease backwards; animation-delay: calc(.6s + var(--i) * 110ms); }
@keyframes dShine { 0% { opacity: 1; transform: translateX(-100%); } 100% { opacity: 1; transform: translateX(100%); } }
.tcard:hover { transform: translateY(-2px); }

/* Ziele */
.dash.anim .goals.in .goal-row { animation: dRise .5s ease backwards; animation-delay: calc(.1s + var(--i) * 100ms); }
.dash.anim .goals.in .goal-bar i { animation: dRevealX 1.2s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.3s + var(--i) * 100ms); }
.dash.anim .goals.in .goal-mark { animation: dDrop .45s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(1.2s + var(--i) * 100ms); }
.dash.anim .goals.in .goal-plan, .dash.anim .goals.in .goal-fc { animation: dFade .5s ease backwards; animation-delay: calc(1.3s + var(--i) * 100ms); }

/* Umsatzverlauf + Anteile */
.dash.anim .rv.in .cc-bar { transform-origin: 50% 100%; animation: dGrowY .75s cubic-bezier(.2, .9, .25, 1) backwards; animation-delay: calc(.15s + min(var(--i), 30) * 28ms); }
.dash.anim .rv.in .cc-val { animation: dFade .4s ease 1.1s backwards; }
.dash.anim .rv.in .stackbar { animation: dRevealX 1.2s cubic-bezier(.45, .05, .2, 1) .3s backwards; }
.dash.anim .rv.in .share-tbl tr { animation: dRise .45s ease backwards; animation-delay: calc(.4s + var(--i, 4) * 80ms); }

/* Kostenträger / Verordner */
.dash.anim .rv.in .hb-row { animation: dRise .45s ease backwards; animation-delay: calc(var(--i) * 60ms); }
.dash.anim .rv.in .hb-fill { animation: dRevealX 1s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.2s + var(--i) * 60ms); }

/* Jahresvergleich */
.dash.anim .year-card.in tbody tr { animation: dRise .45s ease backwards; animation-delay: calc(.1s + var(--i) * 70ms); }

@media (max-width: 980px) { .dh-hero { grid-template-columns: 1fr; } .dh-legend { justify-content: flex-start; } }
@media (max-width: 560px) { .dh-pills { grid-template-columns: 1fr 1fr; } .dh-pills > div:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .dash *, .dash *::before, .dash *::after { animation: none !important; transition: none !important; }
  .dash .rv { opacity: 1 !important; }
}
@media print {
  .dash .rv { opacity: 1 !important; }
  .dash *, .dash *::before, .dash *::after { animation: none !important; }
  .dh-hero { box-shadow: none; }
  .dh-orb, .dh-pulse { display: none; }
}

/* ---------- Ansicht Inhaberin / Mitarbeiter (Schalter im Menü) ---------- */
.mode-tg { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--radius-md); background: var(--side-hover); border: 1px solid var(--side-active); }
.mode-l { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--side-muted); }
.mode-sw { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--radius-full); background: rgba(0, 0, 0, .22); }
.mode-sw button { position: relative; z-index: 1; border: 0; background: transparent; padding: 6px 4px; border-radius: var(--radius-full); color: var(--side-muted); font: 600 .78rem/1 var(--font); cursor: pointer; transition: color .25s; }
.mode-sw button.on { color: var(--bg-sidebar); }
.mode-sw button:focus-visible { outline: 2px solid var(--side-accent); outline-offset: 1px; }
.mode-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--radius-full); background: var(--side-accent); box-shadow: var(--shadow-sm); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), background .3s; }
body.staff-mode .mode-thumb { transform: translateX(100%); background: var(--warning); }
body.staff-mode .mode-tg { border-color: color-mix(in srgb, var(--warning) 55%, transparent); }
body.staff-mode .mode-l::after { content: ' · ohne Eurobeträge'; color: var(--warning); text-transform: none; letter-spacing: 0; }
.nav a.staff-only { display: none; }
body.staff-mode .nav a { display: none; }
body.staff-mode .nav a.staff-only { display: flex; }
body.staff-mode .sidebar-foot .btn-primary, body.staff-mode #backupHint, body.staff-mode .hdr-note { display: none; }

/* ---------- Mitarbeiteransicht ---------- */
.staff-card .card-h { align-items: flex-start; }
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-size: .84rem; color: var(--text-2); }
.staff-list li { display: flex; gap: 8px; align-items: flex-start; }
.staff-list .ic { flex: none; margin-top: 2px; color: var(--success); }
.staff-list li:last-child .ic { color: var(--danger); }
.ma-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--warning-light); color: var(--warning-dark); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.ma-nav { display: flex; align-items: center; gap: 8px; }
.ma-period { min-width: 120px; text-align: center; font-size: .95rem; }
.ma-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2rem; align-items: center; padding: 1.5rem 1.9rem; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; color: var(--text-inverse); box-shadow: var(--shadow-md);
  background: linear-gradient(125deg, var(--bg-sidebar), color-mix(in srgb, var(--bg-sidebar) 45%, var(--primary)) 55%, color-mix(in srgb, var(--primary) 65%, var(--info))); }
.ma-hero::before { content: ''; position: absolute; z-index: -1; width: 360px; height: 360px; right: -80px; top: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 45%, transparent), transparent 68%); animation: dhFloat 12s ease-in-out infinite alternate; }
.ma-ring-wrap { position: relative; width: 150px; height: 150px; }
.ma-ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ma-ring circle { fill: none; stroke-width: 12; }
.ma-ring .bg { stroke: color-mix(in srgb, var(--text-inverse) 18%, transparent); }
.ma-ring .fg { stroke: var(--text-inverse); stroke-linecap: round; }
.ma-ring.ok .fg { stroke: var(--side-accent); } .ma-ring.warn .fg { stroke: var(--warning); } .ma-ring.bad .fg { stroke: color-mix(in srgb, var(--danger) 70%, var(--text-inverse)); }
.ma-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ma-ring-c b { font-size: 2rem; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.ma-ring-c span { font-size: .7rem; color: color-mix(in srgb, var(--text-inverse) 75%, transparent); }
.ma-hero-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ma-name { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: color-mix(in srgb, var(--text-inverse) 82%, transparent); }
.ma-name .dot { background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-inverse) 45%, transparent); }
.ma-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ma-big b { font-size: clamp(2.6rem, 6vw, 3.8rem); font-weight: 700; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.ma-big span { font-size: 1rem; color: color-mix(in srgb, var(--text-inverse) 82%, transparent); }
.ma-vs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.ma-diff, .ma-st { color: var(--text-inverse); padding: 3px 10px; border-radius: var(--radius-full); font-weight: 700; font-size: .8rem; background: color-mix(in srgb, var(--text-inverse) 16%, transparent); }
.ma-diff.neg { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.ma-st.ok { background: color-mix(in srgb, var(--success) 60%, transparent); } .ma-st.warn { background: color-mix(in srgb, var(--warning) 65%, transparent); } .ma-st.bad { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.ma-track { position: relative; height: 12px; margin-top: 6px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--text-inverse) 16%, transparent); }
.ma-track i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--text-inverse); }
.ma-track i.ok { background: var(--side-accent); } .ma-track i.warn { background: var(--warning); } .ma-track i.bad { background: color-mix(in srgb, var(--danger) 70%, var(--text-inverse)); }
.ma-track b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text-inverse); }
.ma-track b.plan { width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--text-inverse) 70%, transparent); }
.ma-track-l { display: flex; justify-content: space-between; gap: 12px; font-size: .72rem; opacity: .8; margin-top: 2px; }
.ma-track-l span.plan { font-weight: 600; }
.ma-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ma-tile { display: flex; flex-direction: column; gap: 3px; padding: 1rem 1.1rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); min-width: 0; }
.ma-tile span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.ma-tile b { font-size: 1.4rem; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ma-tile.pos b { color: var(--success-dark); } .ma-tile.neg b { color: var(--danger); }
.ma-tile em { font-style: normal; font-size: .74rem; color: var(--muted); }
.ma-chart { display: block; width: 100%; height: auto; }
.ma-chart .gl { stroke: var(--border); }
.ma-chart .ax { fill: var(--muted); font: 500 11px var(--font); }
.ma-chart .ax.b { fill: var(--text); font-weight: 700; }
.ma-chart .val { fill: var(--text-2); font: 700 11px var(--font); }
.ma-chart .bar { transform-box: fill-box; transform-origin: 50% 100%; fill: var(--primary); }
.ma-chart .bar.ok { fill: var(--success); } .ma-chart .bar.warn { fill: var(--warning); } .ma-chart .bar.bad { fill: var(--danger); } .ma-chart .bar.na { fill: var(--secondary); }
.ma-chart .bar.future { fill: none; stroke: var(--border-strong); stroke-dasharray: 3 3; }
.ma-chart .bar.sel { stroke: var(--text); stroke-width: 2; }
.ma-chart .soll { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.ma-text ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; line-height: 1.5; }
.ma-basis { display: flex; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); font-size: .8rem; color: var(--text-2); line-height: 1.45; }
.ma-basis .ic { flex: none; margin-top: 1px; color: var(--info-dark); }
.ma-tbl tr.dim td { color: var(--muted); }
.ma-tbl tr.sel td { background: var(--primary-light); font-weight: 600; }
.ma-tbl td.pos { color: var(--success-dark); font-weight: 600; } .ma-tbl td.neg { color: var(--danger); font-weight: 600; }
.ma-tbl tr.sum td { font-weight: 700; border-top: 1px solid var(--border-strong); }
.ma-reach { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.ma-reach span { font-weight: 700; font-size: .8rem; min-width: 38px; text-align: right; }
.ma-reach.ok span { color: var(--success-dark); } .ma-reach.warn span { color: var(--warning-dark); } .ma-reach.bad span { color: var(--danger); }
.ma-bar { position: relative; flex: 1; display: block; height: 8px; border-radius: var(--radius-full); background: var(--track); }
.ma-bar i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--secondary); }
.ma-reach.ok .ma-bar i { background: var(--success); } .ma-reach.warn .ma-bar i { background: var(--warning); } .ma-reach.bad .ma-bar i { background: var(--danger); }
.ma-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); }
.ma-foot { margin: 0; }
/* Bewegung */
.ma.anim .ma-hero { animation: dIn .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.ma.anim .ma-ring .fg { animation: maRing 1.4s cubic-bezier(.2, .8, .2, 1) .2s backwards; }
@keyframes maRing { from { stroke-dashoffset: var(--C); } }
.ma.anim .ma-hero-main > * { animation: dRise .55s ease backwards; }
.ma.anim .ma-hero-main > :nth-child(2) { animation-delay: .08s; } .ma.anim .ma-hero-main > :nth-child(3) { animation-delay: .18s; } .ma.anim .ma-hero-main > :nth-child(4) { animation-delay: .28s; }
.ma.anim .ma-track i { animation: dRevealX 1.2s cubic-bezier(.2, .8, .2, 1) .35s backwards; }
.ma.anim .ma-tile { animation: dRise .5s ease backwards; }
.ma.anim .ma-tile:nth-child(2) { animation-delay: .06s; } .ma.anim .ma-tile:nth-child(3) { animation-delay: .12s; } .ma.anim .ma-tile:nth-child(4) { animation-delay: .18s; } .ma.anim .ma-tile:nth-child(5) { animation-delay: .24s; } .ma.anim .ma-tile:nth-child(6) { animation-delay: .3s; }
.ma.anim .ma-chart .bar:not(.future) { animation: dGrowY .7s cubic-bezier(.2, .9, .25, 1) backwards; animation-delay: calc(.2s + var(--i) * 45ms); }
.ma.anim .ma-chart .val { animation: dFade .4s ease backwards; animation-delay: calc(.7s + var(--i) * 45ms); }
.ma.anim .ma-chart .soll { animation: dFade .4s ease backwards; animation-delay: calc(.9s + var(--i) * 30ms); }
.ma.anim .ma-bar i { animation: dRevealX 1s cubic-bezier(.2, .8, .2, 1) .3s backwards; }
@media (max-width: 720px) { .ma-hero { grid-template-columns: 1fr; justify-items: start; } .staff-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ma *, .ma *::before, .ma *::after, .mode-thumb { animation: none !important; transition: none !important; } }
@media print { .ma *, .ma *::before { animation: none !important; } .ma-hero { box-shadow: none; } .ma .filterbar { display: none !important; } }

/* Mitarbeiteransicht – Zusatzgrafiken */
.ma-chart .py { fill: var(--surface); stroke: var(--text-2); stroke-width: 2; }
.ma-chart .ma3 { fill: none; stroke: var(--info-dark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ma-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .75rem; color: var(--text-2); }
.ma-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ma-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.ma-legend .k-bar { background: var(--success); }
.ma-legend .k-soll { height: 3px; background: var(--text); }
.ma-legend .k-py { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--text-2); background: var(--surface); }
.ma-legend .k-ma { height: 3px; background: var(--info-dark); }
.ma-legend .k-ist { height: 4px; background: var(--primary); }
.ma-legend .k-soll-l { height: 0; border-top: 2px dashed var(--text); }
.ma-legend .k-hr { height: 0; border-top: 2px dotted var(--primary); }
.ma-legend .k-neu { background: var(--primary); }
.ma-legend .k-weiter { background: var(--secondary-light, var(--secondary)); }
.ma-path .area { fill: color-mix(in srgb, var(--primary) 16%, transparent); }
.ma-path .ist { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; }
.ma-path .soll-l { stroke: var(--text); stroke-width: 1.8; stroke-dasharray: 6 5; }
.ma-path .hr { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-dasharray: 2 5; stroke-linecap: round; }
.ma-path .hr-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.ma-path .ist-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.ma-path .lbl { font: 700 11px var(--font); }
.ma-path .soll-t { fill: var(--text); } .ma-path .hr-t { fill: var(--primary); }
.ma-q { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ma-qi { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border-light); min-width: 0; }
.ma-qi.na { opacity: .55; }
.ma-qi > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.ma-qi span { font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .5px; }
.ma-qi b { font-size: .95rem; }
.ma-qi em { font-style: normal; font-size: .72rem; color: var(--muted); }
.ma-qr { position: relative; width: 54px; height: 54px; flex: none; }
.ma-qr b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem !important; }
.ma-mring { width: 54px; height: 54px; transform: rotate(-90deg); }
.ma-mring circle { fill: none; stroke-width: 6; }
.ma-mring .bg { stroke: var(--track); }
.ma-mring .fg { stroke: var(--secondary); stroke-linecap: round; }
.ma-mring.ok .fg { stroke: var(--success); } .ma-mring.warn .fg { stroke: var(--warning); } .ma-mring.bad .fg { stroke: var(--danger); }
.ma-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.ma-kv > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); min-width: 0; }
.ma-kv span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ma-kv b { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ma-kv em { font-style: normal; font-size: .72rem; color: var(--muted); }
.ma-split { display: flex; height: 12px; border-radius: var(--radius-full); overflow: hidden; background: var(--track); }
.ma-split i.neu { background: var(--primary); } .ma-split i.weiter { background: var(--secondary-light, var(--secondary)); }
.ma-split + .ma-legend { margin-bottom: 14px; }
.ma-split i.kasse { background: var(--primary); } .ma-split i.priv { background: var(--info); }
.ma-legend .k-kasse { background: var(--primary); } .ma-legend .k-privs { background: var(--info); }
.ma-legend .k-priv { background: var(--text); opacity: .4; }
.ma-chart .bar.priv { fill: var(--text); opacity: .26; pointer-events: none; }
.ma-chart .bar.priv.sel { stroke: none; }
.ma-sub { font-size: .82rem; opacity: .85; }
.ma-chart .bar.prov { opacity: .5; stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 3 2; }
/* Ampel Datenqualität (Zuordnung) */
.ma-qual, .q-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); font-size: .74rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border-light); white-space: nowrap; cursor: help; }
.ma-qual i, .q-pill i, .ma-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gray-400); flex: none; display: inline-block; }
.ma-qual.ok i, .q-pill.ok i, .ma-qline.ok .ma-dot { background: var(--success); }
.ma-qual.warn i, .q-pill.warn i, .ma-qline.warn .ma-dot { background: var(--warning); }
.ma-qual.bad i, .q-pill.bad i, .ma-qline.bad .ma-dot { background: var(--danger); }
.ma-qline .ma-dot { margin-top: 5px; }
.ma-priv .ma-lag { margin: 12px 0 8px; }
.ma-priv .ma-lag-r { grid-template-columns: 120px 1fr 80px; }
.ma-priv .ma-lag-t i { background: var(--info); }
.ma-lag { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ma-lag-r { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; font-size: .85rem; }
.ma-lag-r b { text-align: right; }
.ma-lag-t { height: 10px; border-radius: var(--radius-full); background: var(--track); overflow: hidden; }
.ma-lag-t i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--primary); }
.ma-lag-r.p .ma-lag-t i { background: var(--gray-400); }
.ma-lag-r.p { color: var(--muted); }
.ma-rec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ma-rec li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); border-left: 3px solid var(--primary); }
.ma-rec li .ic { flex: none; color: var(--primary); }
.ma-rec li div { display: flex; flex-direction: column; }
.ma-rec span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ma-rec b { font-size: .98rem; }
.ma-rec em { font-style: normal; font-size: .75rem; color: var(--muted); }
.ma-years { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.ma-ytbl tr.sel td { background: var(--primary-light); }
.ma-ytbl td.pos { color: var(--success-dark); font-weight: 600; } .ma-ytbl td.neg { color: var(--danger); font-weight: 600; }
/* Bewegung */
.ma.anim .ma-chart .ma3 { animation: dDraw 1.4s cubic-bezier(.45, .05, .2, 1) .8s backwards; }
.ma.anim .ma-chart .py { animation: dPop .4s ease backwards; animation-delay: calc(.9s + var(--i) * 40ms); }
.ma.anim .ma-path .ist { animation: dDraw 1.6s cubic-bezier(.45, .05, .2, 1) .3s backwards; }
.ma.anim .ma-path .area { animation: dRevealX 1.6s cubic-bezier(.45, .05, .2, 1) .3s backwards; }
.ma.anim .ma-path .hr, .ma.anim .ma-path .hr-dot, .ma.anim .ma-path .hr-t, .ma.anim .ma-path .ist-dot { animation: dFade .5s ease 1.8s backwards; }
.ma.anim .ma-qi { animation: dRise .5s ease backwards; animation-delay: calc(.2s + var(--i) * 90ms); }
.ma.anim .ma-mring .fg { animation: maRing 1.2s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.35s + var(--i, 0) * 90ms); }
.ma.anim .ma-split, .ma.anim .ma-lag-t i { animation: dRevealX 1.1s cubic-bezier(.2, .8, .2, 1) .3s backwards; }
.ma.anim .ma-rec li { animation: dRise .45s ease backwards; animation-delay: calc(.3s + var(--i) * 90ms); }
@media (max-width: 900px) { .ma-years { grid-template-columns: 1fr; } }

/* ---------- Druck ---------- */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f5f2; --hl: #f2f5f2; }
  body { background: #fff; font-size: 11px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app { display: block; }
  .sidebar, .app-header, .filterbar, .page-actions, .tabs-row .seg, .toasts, .tooltip, .notice, .banner, .seg, .drawer-wrap, .modal-wrap { display: none !important; }
  .main { padding: 0; }
  .view { gap: 12px; max-width: none; }
  .print-only { display: block; }
  .card, .kpis, .tcard { break-inside: avoid; }
  .tabs .tab:not(.on) { display: none; }
  .tbl th { position: static; }
  .grid-2-1, .grid-2 { grid-template-columns: 1fr; }

  /* Monatsbericht */
  body.printing-report .app { display: none; }
  body.printing-report #printRoot { display: block; }
  .report { color: #2a312c; font: 10.5px/1.45 var(--font); }
  .report h1 { font: 600 24px/1.2 var(--serif); }
  .report h2 { font: 600 14px var(--serif); margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #c3cec5; }
  .report h3 { font: 600 12.5px var(--serif); margin: 14px 0 4px; }
  .report h3 small { font: 400 10px var(--font); color: #626f66; margin-left: 6px; }
  .pr-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 10px; border-bottom: 2px solid #3f6b4c; }
  .pr-kicker { font-size: 10px; color: #3f6b4c; font-weight: 700; letter-spacing: .04em; }
  .pr-meta { text-align: right; color: #626f66; font-size: 9.5px; }
  .pr-kpis { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 4px; border: 1px solid #dbe3dc; }
  .pr-kpis div { padding: 8px 10px; display: flex; flex-direction: column; }
  .pr-kpis div + div { border-left: 1px solid #dbe3dc; }
  .pr-kpis span { color: #626f66; font-size: 9.5px; }
  .pr-kpis b { font-size: 17px; }
  .pr-kpis em { font-style: normal; color: #626f66; font-size: 9.5px; }
  .report table { width: 100%; border-collapse: collapse; }
  .report th { text-align: left; font-weight: 600; color: #626f66; font-size: 9.5px; border-bottom: 1px solid #c3cec5; padding: 4px 6px; }
  .report td { padding: 3px 6px; border-bottom: 1px solid #edf2ee; }
  .report tfoot td { font-weight: 700; border-top: 1px solid #c3cec5; border-bottom: 0; }
  .report .num { text-align: right; white-space: nowrap; }
  .report tr { break-inside: avoid; }
  .pr-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
  .pr-notes { margin-top: 10px; padding: 8px 10px; border-left: 3px solid #876611; background: #f9f4db; }
  .pr-notes ul { margin: 4px 0 0; padding-left: 16px; }
  .pr-ok { margin-top: 10px; color: #3f6b4c; }
  .pr-break { break-before: page; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Händische Rechnungen (Privat, Förderstätten, Bundeswehr, Sonstige) ===== */
.mf-grow { flex: 1; }
.inv-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.inv-form .span2 { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.fld > span > em { color: var(--danger); font-style: normal; }
.fld > span i { text-transform: none; letter-spacing: 0; font-weight: 500; font-style: normal; }
.fld .input { width: 100%; }
.fld .hint { margin-top: 0; }
.inv-form [hidden] { display: none !important; }
.inv-kt { display: flex; flex-wrap: wrap; gap: 6px; }
.kt-opt { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 .85rem; border-radius: var(--radius-full); border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .84rem; font-weight: 500; cursor: pointer; transition: var(--transition-fast); }
.kt-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kt-opt:hover { border-color: var(--secondary); }
.kt-opt.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.kt-opt:focus-within { box-shadow: var(--focus-ring); }
.inv-kt + .input { margin-top: 6px; }
.inv-calc { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: end; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.inv-calc .op { padding-bottom: 8px; color: var(--muted); font-weight: 600; }
.money.strong input { font-weight: 700; }
.inv-anim { position: relative; display: grid; place-items: center; padding: 18px; }
.ia-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ia-row { display: flex; justify-content: space-between; gap: 10px; font-size: calc(13px * var(--fs)); padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.ia-row span { color: var(--muted); }
.ia-kt { display: flex; flex-wrap: wrap; gap: 5px; }
.ia-kt span { padding: 2px 9px; border-radius: var(--radius-full); border: 1px solid var(--border); font-size: calc(11.5px * var(--fs)); color: var(--text-2); }
.ia-kt span.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.ia-calc { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; border-radius: var(--radius-md); background: var(--surface-2); font-size: calc(13px * var(--fs)); }
.ia-calc em { font-style: normal; color: var(--muted); }
.ia-sum b { color: var(--primary-dark); font-size: calc(15px * var(--fs)); }
.ia-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.pay-guide { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 14px; }
.pay-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pay-steps li { display: flex; gap: 10px; align-items: flex-start; }
.pay-steps li > b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--primary); color: var(--on-primary); font-size: calc(12px * var(--fs)); }
.pay-steps li div { display: flex; flex-direction: column; gap: 2px; font-size: calc(13px * var(--fs)); }
.pay-steps li span { color: var(--muted); }
.pay-steps a { color: var(--primary-text); font-weight: 600; }
.pay-spec { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); font-size: calc(13px * var(--fs)); }
.pay-spec .link-btn { align-self: flex-start; display: inline-flex; gap: 5px; align-items: center; }
.pay-drop { min-height: 110px; }
.pay-stats { margin-bottom: 12px; }
.pay-global { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.pay-hours { display: flex; gap: 6px; align-items: center; }
.pay-hours .money { width: 130px; }
.pay-tbl { max-height: 48vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.pay-tbl thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pay-tbl td { vertical-align: top; }
.pay-tbl td small { display: block; max-width: 260px; margin-top: 2px; }
.pay-tbl .pay-link { display: flex; gap: 4px; align-items: center; color: var(--info-dark); }
.pay-tbl tr.excl td { opacity: .55; }
.pay-tbl .neg { color: var(--danger); }
.input.sm { height: 30px; font-size: calc(12.5px * var(--fs)); padding: 0 .5rem; width: 100%; min-width: 96px; }
.modal.wide.xwide { width: min(1240px, 100%); }
select.input.sm { padding-right: 4px; }
.pay-sum b { color: var(--text); }
@media (max-width: 900px) { .pay-guide { grid-template-columns: 1fr; } }
.sp-inline { margin-top: 8px; gap: 10px; }
.sp-rows { display: flex; flex-direction: column; gap: 8px; }
.sp-row { --c: var(--primary); display: grid; grid-template-columns: minmax(110px, 160px) 150px 1fr; gap: 12px; align-items: center; font-size: calc(13px * var(--fs)); }
.sp-row .sr-name { display: flex; gap: 7px; align-items: center; font-weight: 600; }
.sp-row .dot { background: var(--c); }
.sp-eur { color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-prev .hint { margin-top: 6px; }
.sp-def { margin-top: 8px; }
.tbtn.mini-split { width: 30px; padding: 0; justify-content: center; color: var(--muted); }
.tbtn.mini-split.on { color: var(--text); --c: var(--info); }
.jr-opts { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.jr-toggles { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jr-wrap { max-height: max(360px, calc(100vh - 400px)); overflow: auto; }
.jr-tbl.nowrap td, .jr-tbl.nowrap th { padding: 6px 8px; }
.jr-tbl td.ellip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.jr-tbl td.pat .p-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.jr-tbl td small { display: inline; margin-left: 4px; }
.jr-tbl tr.is-man td { background: color-mix(in srgb, var(--info-light) 35%, transparent); }
.jr-tbl tr.jr-month td { position: sticky; top: 33px; z-index: 1; background: var(--surface-2); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--primary-dark); padding-top: 10px; }
.jr-tbl tr.jr-sub td { font-weight: 600; background: var(--gray-50); border-bottom: 1.5px solid var(--border-strong); font-size: .8rem; }
.jr-tbl tfoot td { position: sticky; bottom: 0; background: var(--surface); box-shadow: 0 -1px 0 var(--border-strong); }
.jr-tbl tfoot tr.jr-foot2 td { bottom: 0; font-weight: 500; color: var(--muted); font-size: .78rem; }
.jr-tbl tfoot tr:first-child td { bottom: 34px; }
.jr-tbl tbody tr { cursor: pointer; }
@media print {
  .jr-wrap { max-height: none; overflow: visible; }
  .jr-tbl tfoot td, .jr-tbl tr.jr-month td { position: static; }
  .liste .toolbar, .liste .jr-toggles, .liste .page-actions { display: none; }
}
.jr-adv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jr-adv-bar .btn.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.jr-adv-bar .btn.on svg:last-child { transform: rotate(180deg); }
.jr-adv-n { font-style: normal; min-width: 18px; padding: 0 5px; border-radius: var(--radius-full); background: var(--primary); color: var(--on-primary); font-size: calc(11px * var(--fs)); line-height: 18px; text-align: center; }
.jr-adv-n:empty { display: none; }
.jr-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.jr-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: var(--radius-full); background: var(--info-light); color: var(--info-dark); font-size: calc(12px * var(--fs)); font-weight: 600; }
.jr-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.jr-chip button:hover { background: color-mix(in srgb, var(--info) 25%, transparent); }
.jr-adv { padding: 1rem 1.25rem; }
.jr-adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.jr-adv-grid .span-all { grid-column: 1 / -1; }
.jr-adv-grid .fld > span { display: flex; gap: 10px; align-items: center; }
.jr-adv-grid select.input { width: 100%; }
.jr-range { display: flex; align-items: center; gap: 6px; }
.jr-range .input { flex: 1; min-width: 0; }
.jr-range em { font-style: normal; color: var(--muted); font-size: calc(12px * var(--fs)); white-space: nowrap; }
.jr-checks { display: flex; flex-direction: column; gap: 6px; }
.jr-kts { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow: auto; padding: 2px; }
.jr-kts .kt-opt { height: 28px; font-size: calc(12.5px * var(--fs)); padding: 0 .7rem; }
.jr-kts .kt-opt em { font-style: normal; color: var(--muted); font-size: calc(11px * var(--fs)); }
.jr-adv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.jr-adv-foot p { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media print { .jr-adv, .jr-adv-bar { display: none !important; } }
.dr-sub-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invoices .kpis { margin-bottom: 0; }
@media (max-width: 680px) {
  .inv-form { grid-template-columns: 1fr; }
  .inv-calc { grid-template-columns: 1fr; }
  .inv-calc .op { display: none; }
}
.pay-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pay-spec .tbl th, .pay-spec .tbl td { padding: 5px 8px; font-size: calc(12px * var(--fs)); }

/* Einstellungen: Erlös je Termin je Jahr */
.rates { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.rates .rate-def { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--text-2); }
.rates-tbl .money { width: 120px; margin-left: auto; }
.rates-tbl .money input { height: 30px; }
.rates-tbl input::placeholder { color: var(--muted); opacity: .8; }
@media (max-width: 900px) { .rates { grid-template-columns: 1fr; } }

/* Lohn & Gehalt (views/lohn.js) */
.lx { display: flex; flex-direction: column; gap: 1.25rem; }
.lx-sum { display: flex; flex-direction: column; gap: 1.25rem; }
.lx-tbl tbody tr { cursor: pointer; }
.lx-tbl tr.sel td { background: var(--primary-light); }
.lx-tbl td.pos, .lx-tbl .pos { color: var(--success-dark); font-weight: 600; }
.lx-tbl td.neg, .lx-tbl .neg { color: var(--danger); font-weight: 600; }
.lx-tbl td.warn { color: var(--warning-dark); font-weight: 600; }
.lx-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lx-foot { padding: 0 1.75rem 1.2rem; margin: 8px 0 0; }
.lx-tiles { margin-bottom: 14px; }
.lx-h3 { font-size: .9rem; margin: 6px 0 4px; }
.lx-chart { width: 100%; height: auto; display: block; }
.lx-chart .gl { stroke: var(--border-light); }
.lx-chart .ax { fill: var(--muted); font: 10.5px var(--font); }
.lx-chart .bar { fill: var(--secondary); }
.lx-chart .bar.ok { fill: var(--success); } .lx-chart .bar.warn { fill: var(--warning); } .lx-chart .bar.bad { fill: var(--danger); }
.lx-chart .cost { stroke: var(--text); stroke-width: 2; }
.lx-chart .need { stroke: var(--success-dark); stroke-width: 1.6; stroke-dasharray: 6 4; }
.lx-chart .lbl { font: 700 10.5px var(--font); }
.lx-chart .cost-t { fill: var(--text); } .lx-chart .need-t { fill: var(--success-dark); }
.ma-legend .lk { background: var(--secondary); } .ma-legend .lk.ok { background: var(--success); } .ma-legend .lk.warn { background: var(--warning); } .ma-legend .lk.bad { background: var(--danger); }
.ma-legend .lk.cost { height: 3px; background: var(--text); }
.lx-raise-in { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.lx-raise-in .cx-range { flex: 1; }
.lx-raise-in b { font-size: 1.35rem; min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.lx-raise .ma-kv b.neg { color: var(--danger); } .lx-raise .ma-kv b.pos { color: var(--success-dark); }
.lx-list, .lx-guide { margin: 0 0 10px; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; line-height: 1.45; }
.lx-pills { margin-top: -4px; }
@media print { .lx #gxCard, .lx [data-lx-print], .lx-raise-in .cx-range { display: none !important; } }
.gx-link { text-decoration: none; color: inherit; } .gx-link:hover { filter: brightness(.97); }
.lx-tbl { font-size: .84rem; } .lx-tbl th { white-space: normal; vertical-align: bottom; }
/* Anleitung: Privatpatient anlegen */
.inv-anim:has(.pp-akte) { gap: 12px; }
.pp-new { color: var(--success-dark); display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
.pp-akte { border-left: 3px solid var(--info); }

/* =====================================================================
   Kompakte Darstellung für kleine Laptop-Bildschirme
   (z. B. 1366 × 768 oder 1280 × 720 bzw. 1920 × 1080 mit 125–150 % Skalierung).
   Ziel: Kopfbereich, Hero und die wichtigsten Kennzahlen/Grafiken passen in den ersten Bildschirm;
   was darüber hinausgeht, wird wie gewohnt gescrollt. Nur ab 901 px Breite (darunter gilt das mobile Layout).
   ===================================================================== */
@media (min-width: 901px) and (max-width: 1500px) {
  :root { --sidebar: 220px; }
  .main { padding: 1.5rem 1.6rem 3rem; }
  .app-header { padding: 0 1.6rem; }
  .view { gap: 16px; }
  .card { padding: 1.2rem 1.35rem; }
  .card-h.pad { padding: 1.15rem 1.35rem 0; }
  .lx-foot { padding: 0 1.35rem 1rem; }
  .grid-2, .grid-2-1 { gap: 1rem; }
  .nav a { gap: 9px; padding: .5rem .7rem; }
  .sidebar { padding: 0 10px 14px; }
  .nav a.active::before { left: -10px; }
  .ma-tiles { grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; }
  .ma-tile span { letter-spacing: .3px; }
  .lx-tbl td:first-child { min-width: 120px; }
  .lx-tbl { font-size: .8rem; }
  .lx-tbl th, .lx-tbl td { padding-left: 8px; padding-right: 8px; }
  .jr-tbl, .tbl { font-size: .84rem; }
}
@media (min-width: 901px) and (max-height: 860px) {
  :root { --header-height: 50px; }
  .main { padding-top: 1.05rem; padding-bottom: 2.5rem; }
  .view { gap: 14px; }
  h1 { font-size: 1.45rem; }
  .page-h { padding-bottom: 0; }
  .page-h p.muted { margin-top: 3px; font-size: .84rem; line-height: 1.45; }
  .page-h > div:first-child { max-width: 920px; }
  .card { padding: 1.05rem 1.25rem; }
  .card-h { margin-bottom: 12px; }
  .card-h.pad { padding: 1rem 1.25rem 0; margin-bottom: 8px; }
  .btn { height: 32px; padding: 0 .85rem; }
  .filterbar { padding-bottom: 10px; }
  /* Sidebar: alle Menüpunkte + Fußbereich ohne Scrollen */
  .brand { margin-bottom: 8px; }
  .brand-logo { width: 28px; height: 28px; font-size: calc(13px * var(--fs)); }
  .nav a { padding: .38rem .7rem; font-size: .84rem; }
  .nav a.active::before { top: 5px; bottom: 5px; }
  .sidebar-foot { gap: 7px; }
  .mode-tg { padding: 7px 8px; gap: 4px; }
  .mode-sw button { padding: 5px 4px; }
  .sidebar-foot .btn-primary { height: 34px; }
  /* Übersicht: Hero „Puls der Praxis“ + KPIs */
  .dh-hero { padding: 1.05rem 1.4rem .95rem; gap: 1.25rem; }
  .dh-big { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
  .dh-pills { margin-top: 6px; }
  .dh-shares { margin-top: 6px; }
  .kpi { padding: .8rem 1.05rem; gap: 2px; }
  .kpi > b { font-size: 1.35rem; }
  /* Mitarbeiteransicht */
  .ma-hero { padding: 1rem 1.5rem; gap: 1.4rem; }
  .ma-ring-wrap, .ma-ring { width: 118px; height: 118px; }
  .ma-ring-c b { font-size: 1.6rem; }
  .ma-hero-main { gap: 6px; }
  .ma-big b { font-size: clamp(2.1rem, 4.6vw, 3rem); }
  .ma-big span { font-size: .92rem; }
  .ma-vs { font-size: .84rem; gap: 8px; }
  .ma-track { height: 10px; margin-top: 4px; }
  .ma-tile { padding: .7rem .9rem; gap: 2px; }
  .ma-tile b { font-size: 1.2rem; }
  .ma-chart { max-height: 300px; }
  .ma-kv > div { padding: 8px 10px; }
  .ma-kv b { font-size: 1.1rem; }
  /* Soll nach Arbeitszeit, Gehaltsrechner */
  .cx-hero { padding: 1.1rem 1.4rem; gap: 1.4rem; }
  .lx-chart, .dh-chart svg { max-height: 280px; }
}
@media (min-width: 901px) and (max-height: 720px) {
  :root { --header-height: 46px; }
  .main { padding-top: .85rem; }
  .view { gap: 12px; }
  h1 { font-size: 1.32rem; }
  .brand span:not(.brand-logo) { display: none; }
  .nav a { padding: .3rem .7rem; }
  .ma-ring-wrap, .ma-ring { width: 100px; height: 100px; }
  .ma-ring-c b { font-size: 1.35rem; }
  .ma-big b { font-size: clamp(1.9rem, 4vw, 2.6rem); }
  .dh-big { font-size: clamp(1.7rem, 3vw, 2.3rem); }
  .ma-chart, .lx-chart, .dh-chart svg { max-height: 240px; }
}

/* =====================================================================
   Seitenwechsel: Motion Graphics (app.js → moveInd / v-leave / v-enter)
   ===================================================================== */
/* Menü: gleitender Indikator statt springendem Hintergrund */
.nav { position: relative; }
.nav a { z-index: 1; }
.nav-ind { position: absolute; left: 0; right: 0; top: 0; height: 36px; border-radius: var(--radius-md); pointer-events: none; z-index: 0; opacity: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--side-accent) 22%, var(--side-active)), var(--side-active) 70%);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .05);
  transition: transform .5s cubic-bezier(.34, 1.25, .5, 1), height .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; will-change: transform; }
.nav-ind::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--side-accent); box-shadow: 0 0 10px var(--side-accent); }
.nav-ind.no-tr { transition: none; }
.nav.has-ind a.active { background: transparent; }
.nav.has-ind a.active::before { display: none; }
.nav a .ic { transition: transform .25s cubic-bezier(.34, 1.4, .5, 1), color .2s; }
.nav a:hover .ic { transform: translateX(2px); }
.nav a.pop .ic { animation: navPop .55s cubic-bezier(.34, 1.5, .5, 1); }
.nav a.pop .nav-l { animation: navTxt .45s ease; }
@keyframes navPop { 0% { transform: scale(.6) rotate(-12deg); } 55% { transform: scale(1.25) rotate(4deg); } 100% { transform: none; } }
@keyframes navTxt { from { letter-spacing: .6px; opacity: .6; } }
@media (min-width: 901px) and (max-width: 1500px) { .nav-ind::before { left: -10px; } }

/* Inhalt: alte Seite blendet aus, neue gleitet ein */
.main.v-leave > * { opacity: 0; transform: translateY(-8px) scale(.995); transition: opacity .14s ease-in, transform .14s ease-in; pointer-events: none; }
.main.v-enter > * { animation: vIn .55s cubic-bezier(.16, 1, .3, 1) backwards; }
.main.v-enter > * > .page-h { animation: vHead .6s cubic-bezier(.16, 1, .3, 1) .04s backwards; }
@keyframes vIn { from { opacity: 0; transform: translateY(16px) scale(.992); } }
@keyframes vHead { from { opacity: 0; transform: translateX(-14px); } }
/* Brotkrumen-Titel */
#crumb { display: inline-block; }
#crumb.swap { animation: crumbIn .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes crumbIn { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
@media (prefers-reduced-motion: reduce) {
  .nav-ind { transition: none; }
  .main.v-leave > *, .main.v-enter > *, .main.v-enter > * > .page-h, #crumb.swap, .nav a.pop .ic, .nav a.pop .nav-l { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
@media print { .nav-ind { display: none; } }
@media (max-width: 900px) { .nav-ind::before { display: none; } }

/* =====================================================================
   Schriftgröße: 5 Stufen (Kopfleiste #fsSw, html[data-fs]) – skaliert rem-Basis und Grundschrift
   ===================================================================== */
:root { --fs: 1; }
html[data-fs="2"] { --fs: 1.08; }
html[data-fs="3"] { --fs: 1.16; }
html[data-fs="4"] { --fs: 1.26; }
html[data-fs="5"] { --fs: 1.38; }
html { font-size: calc(16px * var(--fs)); }
body { font-size: calc(14px * var(--fs)); }
.app { grid-template-columns: calc(var(--sidebar) * (.3 + var(--fs) * .7)) minmax(0, 1fr); }
.ring { width: calc(58px * var(--fs)); height: calc(58px * var(--fs)); }
@media (min-width: 901px) and (max-height: 860px) { html { font-size: calc(15px * var(--fs)); } body { font-size: calc(13.5px * var(--fs)); } }
@media (min-width: 901px) and (max-height: 720px) { html { font-size: calc(14px * var(--fs)); } body { font-size: calc(13px * var(--fs)); } }
@media (max-width: 900px) { .app { grid-template-columns: minmax(0, 1fr); } }
@media print { html[data-fs] { --fs: 1 !important; } html { font-size: 16px; } body { font-size: 11px; } .fs-sw { display: none !important; } }
/* Umschalter in der Kopfleiste: fünf „A“ in steigender Größe */
.fs-sw { position: relative; display: inline-flex; align-items: flex-end; gap: 1px; padding: 3px; border-radius: var(--radius-full); background: var(--surface-2); border: 1px solid var(--border-light); }
.fs-sw button { display: inline-grid; place-items: end center; width: 26px; height: 26px; padding: 0 0 4px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--muted); font-weight: 700; line-height: 1; cursor: pointer; font-family: var(--font);
  transition: background .2s, color .2s, transform .25s cubic-bezier(.34, 1.4, .5, 1); }
.fs-sw button span { line-height: 1; }
.fs-sw button:hover { color: var(--text); background: var(--surface); transform: translateY(-1px); }
.fs-sw button.on { background: var(--primary); color: var(--text-inverse); box-shadow: var(--shadow-sm); }
.fs-sw button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (max-width: 900px) { .hdr-note { display: none; } .fs-sw button { width: 24px; height: 24px; } }

/* Übersicht – Hero: Umsatz bis heute + Jahresprognose */
.dh-duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: end; margin-top: 2px; }
.dh-now, .dh-fc { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dh-fc { padding: .55rem .85rem .6rem; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text-inverse) 10%, transparent); border: 1px dashed color-mix(in srgb, var(--text-inverse) 34%, transparent); }
.dh-fc.done { border-style: solid; }
.dh-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: color-mix(in srgb, var(--text-inverse) 78%, transparent); }
.dh-big2 { font-size: clamp(1.35rem, 2.5vw, 1.95rem); font-weight: 700; letter-spacing: -.8px; line-height: 1.1; white-space: nowrap; }
.dh-cap { font-size: .72rem; color: color-mix(in srgb, var(--text-inverse) 72%, transparent); }
.dh-now .dh-big { white-space: nowrap; }
.dh-prog { position: relative; height: 8px; margin-top: 8px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--text-inverse) 16%, transparent); overflow: hidden; }
.dh-prog i { position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--side-accent), var(--text-inverse)); }
.dh-prog s { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--bg-sidebar) 45%, transparent); }
.dh-progl { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .68rem; color: color-mix(in srgb, var(--text-inverse) 70%, transparent); margin-bottom: 2px; }
.dh-bar.fc { fill: color-mix(in srgb, var(--text-inverse) 8%, transparent); stroke: color-mix(in srgb, var(--text-inverse) 62%, transparent); stroke-width: 1.2; stroke-dasharray: 3 2.5; }
.dh-now-l { stroke: color-mix(in srgb, var(--text-inverse) 55%, transparent); stroke-width: 1.2; stroke-dasharray: 2 3; }
.dh-ax.now { font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; }
.dh-legend i.bar.fc { background: transparent; border: 1px dashed color-mix(in srgb, var(--text-inverse) 70%, transparent); }
.dash.anim .dh-hero.in .dh-prog i { animation: dRevealX 1.2s cubic-bezier(.2, .8, .2, 1) .4s backwards; }
@media (max-width: 1200px) { .dh-duo { grid-template-columns: 1fr; } }
