:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #e9edf2;
  --ink: #142033;
  --muted: #697586;
  --line: #d8dee7;
  --line-strong: #c5ccd7;
  --navy: #0b1f3a;
  --navy-2: #132b4f;
  --navy-3: #284d73;
  --blue: #315f87;
  --blue-soft: #e7eef5;
  --silver: #aeb8c6;
  --positive: #25634e;
  --positive-bg: #e5f1ec;
  --flow-in: #5f916d;
  --flow-out: #cf896f;
  --warning: #8b611c;
  --warning-bg: #fbf1dd;
  --danger: #a4423d;
  --danger-bg: #f8e9e7;
  --sidebar: 250px;
  --radius: 8px;
  --shadow: 0 2px 9px rgba(12, 30, 53, .045);
  --field-height: 48px;
  --field-padding-x: 13px;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; font-size: 16px; line-height: 1.48; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--navy); font-size: clamp(42px, 4vw, 64px); font-weight: 450; letter-spacing: -3px; line-height: 1.02; }
h2 { margin-bottom: 0; color: var(--navy-2); font-size: 25px; font-weight: 650; letter-spacing: -.65px; line-height: 1.12; }
.back-link { display: inline-block; margin-bottom: 9px; color: var(--blue); font-size: 13px; font-weight: 650; }
.lead, .panel-intro { color: var(--muted); line-height: 1.62; }

/* App-Rahmen nach der Grundlogik des Bauherren-Cockpits */
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar); display: flex; flex-direction: column; padding: 25px 17px 22px; color: white; background: radial-gradient(circle at 25% 18%, rgba(68, 101, 143, .48), transparent 44%), linear-gradient(165deg, #132b4f 0%, #0b1f3a 55%, #09182c 100%); border-right: 1px solid rgba(255,255,255,.11); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 11px; color: white; }
.brand-mark { flex: 0 0 45px; display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.1); }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: #e9eef6; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 5px; }
.brand strong { font-size: 17px; font-weight: 650; letter-spacing: -.25px; }
.brand small { color: rgba(255,255,255,.63); font-size: 13px; }
.primary-nav { min-height: 0; display: grid; gap: 4px; margin-top: 34px; overflow-y: auto; }
.nav-group-label { margin: 22px 14px 6px; color: rgba(220,228,239,.48); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 49px; padding: 12px 14px; border-radius: 6px; color: rgba(239,243,248,.78); font-size: 15px; font-weight: 450; transition: .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: rgba(255,255,255,.15); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); color: white; }
.nav-item.active::before { position: absolute; top: 4px; bottom: 4px; left: -5px; width: 4px; border-radius: 4px; background: #a9c9e7; content: ""; }
.nav-icon { display: grid; place-items: center; width: 25px; color: rgba(230,237,246,.8); }
.nav-icon svg, .icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { display: grid; gap: 14px; margin-top: auto; }
.system-state { display: flex; align-items: flex-start; gap: 10px; padding: 16px 10px; border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.system-state strong, .system-state small { display: block; }
.system-state strong { font-size: 14px; font-weight: 580; }
.system-state small { margin-top: 3px; color: rgba(255,255,255,.5); font-size: 12px; }
.system-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #8fb8d8; box-shadow: 0 0 0 3px rgba(143,184,216,.16); }
.account-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; color: rgba(255,255,255,.86); font-size: 13px; }
.account-link form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; color: rgba(255,255,255,.56); font-size: 12px; }
.workspace { grid-column: 2; min-width: 0; background: radial-gradient(circle at 84% 10%, rgba(213,222,234,.58), transparent 29%), linear-gradient(180deg, #fafbfc 0%, var(--bg) 100%); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: 95px; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(250,251,252,.91); backdrop-filter: blur(18px); }
.topbar-title { display: grid; }
.topbar-eyebrow { color: var(--blue); font-size: 13px; font-weight: 650; }
.topbar-eyebrow:empty { display: none; }
.topbar-eyebrow a { color: inherit; }
.topbar-eyebrow a:hover { color: var(--navy-2); }
.topbar-title strong { margin-top: 1px; color: var(--navy); font-size: 22px; font-weight: 570; letter-spacing: -.45px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; margin-left: auto; }
.topbar-actions:has(.notification-menu[open]) { overflow: visible; }
.topbar-actions:empty { display: none; }
.topbar-actions .primary-button, .topbar-actions .secondary-button { flex: 0 0 auto; min-height: 39px; padding: 0 13px; white-space: nowrap; }
.topbar-actions > form { flex: 0 0 auto; margin: 0; }
.topbar-actions .as-of { padding: 0 4px 0 0; white-space: nowrap; }
.topbar-actions .year-picker { margin: 0; }
.icon-button { position: relative; display: grid; place-items: center; width: 43px; height: 43px; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--navy-3); }
.mobile-menu { display: none; }
.notification-menu { position: relative; flex: 0 0 auto; }
.notification-menu > summary { list-style: none; }
.notification-menu > summary::-webkit-details-marker { display: none; }
.notification-menu[open] > summary { border-color: var(--navy-3); color: var(--navy-2); }
.badge-count { position: absolute; top: -6px; right: -6px; display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border: 2px solid white; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; font-weight: 780; line-height: 1; }
.topbar-actions .topbar-review-button { gap: 6px; padding-inline: 10px; }
.topbar-review-badge { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 999px; background: var(--danger); color: white; font-size: 11px; font-weight: 760; line-height: 1; }
.notification-popover { position: absolute; top: 51px; right: 0; z-index: 80; width: min(410px, calc(100vw - 28px)); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 20px 55px rgba(11,31,58,.2); }
.popover-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 9px 13px; border-bottom: 1px solid var(--line); }
.popover-header span { color: var(--muted); font-size: 12px; }
.notification-items { display: grid; max-height: min(560px, calc(100vh - 180px)); overflow-y: auto; }
.notification-item { display: grid; gap: 4px; padding: 12px 9px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { border-radius: 5px; background: var(--surface-2); }
.notification-item strong { color: var(--navy-2); font-size: 13px; }
.notification-item small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.empty-compact { display: grid; gap: 4px; padding: 24px 10px; color: var(--muted); text-align: center; }
.empty-compact strong { color: var(--navy-2); }
.notification-more { margin: 8px 9px 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.sidebar-backdrop { display: none; }
.page-shell { max-width: 1580px; margin: 0 auto; padding: 35px 40px 68px; }

/* Seiten und Kennzahlen */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.as-of { padding-bottom: 6px; color: var(--muted); font-size: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.cost-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cost-summary-grid .metric-card > span { white-space: nowrap; }
.metric-card { min-width: 0; min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; padding: 19px 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.metric-card > span, .metric-card small { color: var(--muted); }
.metric-card > span { font-size: 14px; }
.metric-card strong { color: var(--navy); font-size: clamp(25px, 2.35vw, 35px); font-weight: 620; letter-spacing: -1.25px; white-space: nowrap; }
.metric-card strong.negative { color: var(--danger); }
.metric-card small { font-size: 12px; }
.metric-card-value { display: grid; gap: 1px; }
.metric-card .metric-monthly { font-size: 13px; font-weight: 680; }
.metric-card--primary { border-color: var(--navy-2); background: linear-gradient(145deg, var(--navy-3), var(--navy)); }
.metric-card--primary > span, .metric-card--primary small { color: #c8d4e2; }
.metric-card--primary strong { color: white; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.chart-panel { min-width: 0; overflow: hidden; }
.chart-panel .panel-heading { align-items: flex-start; }
.chart-intro { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.chart-panel--waterfall .chart-intro { max-width: none; white-space: nowrap; }
.chart-unit { padding: 6px 9px; border-radius: 4px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.chart-canvas { position: relative; width: 100%; min-height: 315px; }
.chart-canvas svg { display: block; width: 100%; height: auto; min-height: 315px; overflow: visible; }
.chart-grid-line { stroke: #dfe4eb; stroke-width: 1; }
.chart-axis-label { fill: #687586; font-size: 12.5px; }
.chart-axis-month { fill: #526174; font-size: 13px; font-weight: 650; }
.chart-axis-year { fill: #526174; font-size: 10px; font-weight: 450; letter-spacing: .015em; }
.chart-axis-year-tick { stroke: #dfe4eb; stroke-width: 1; }
.chart-axis-year-divider { stroke: #7b8ca1; stroke-width: 1.5; }
.chart-axis-year-band { fill: #f1f4f8; }
.chart-axis-year-band--alternate { fill: #e7eef6; }
.chart-axis-title { fill: #687586; font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.waterfall-bar { rx: 3px; }
.waterfall-bar--positive { fill: #315f87; }
.waterfall-bar--negative { fill: #a65a55; }
.waterfall-bar--total { fill: #0b1f3a; }
.waterfall-connector { stroke: #aeb8c6; stroke-width: 1; stroke-dasharray: 3 3; }
.waterfall-value { fill: #17263d; font-size: 11px; font-weight: 700; text-anchor: middle; }
.waterfall-label { fill: #687586; font-size: 10px; font-weight: 600; text-anchor: middle; }
.history-area { fill: url(#history-area-gradient); }
.history-line { fill: none; stroke: #173b63; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.history-line--plan { stroke: #a9b3c1; stroke-width: 2; stroke-dasharray: 6 6; }
.history-point { fill: #173b63; stroke: none; }
.history-current-guide { stroke: #5f88ad; stroke-width: 1.5; stroke-dasharray: 4 5; }
.history-current-point { fill: #5f88ad; stroke: none; }
.history-current-label { fill: #173b63; font-size: 11px; font-weight: 750; text-anchor: end; }
.history-empty-label { fill: #687586; font-size: 12px; font-weight: 650; text-anchor: middle; }
.chart-heading-tools { display: grid; justify-items: end; gap: 13px; }
.chart-legend { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { display: inline-block; width: 17px; height: 3px; border-radius: 3px; background: #173b63; }
.chart-legend .legend-plan { height: 2px; background: repeating-linear-gradient(90deg, #a9b3c1 0 5px, transparent 5px 8px); }
.chart-legend .legend-current { width: 8px; height: 8px; border-radius: 50%; background: #5f88ad; }
.chart-range-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); }
.chart-range-switch button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 680; white-space: nowrap; }
.chart-range-switch button:hover { color: var(--navy-2); }
.chart-range-switch button[aria-pressed="true"] { background: white; box-shadow: 0 1px 4px rgba(11,31,58,.12); color: var(--navy-2); }
.chart-range-switch button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.chart-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.chart-tooltip { position: absolute; z-index: 4; min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.97); box-shadow: 0 8px 24px rgba(11,31,58,.13); color: var(--ink); font-size: 12px; pointer-events: none; transform: translate(-50%, -115%); }
.chart-tooltip strong, .chart-tooltip span { display: block; }
.chart-tooltip span { margin-top: 2px; color: var(--muted); }
.forecast-hit-point { fill: transparent; cursor: help; pointer-events: all; }
.forecast-svg-tooltip { pointer-events: none; filter: drop-shadow(0 6px 12px rgba(11,31,58,.14)); }
.forecast-svg-tooltip rect { fill: rgba(255,255,255,.98); stroke: #dfe4eb; stroke-width: 1; }
.forecast-svg-tooltip__value { fill: #17263d; font-size: 13.5px; font-weight: 750; }
.forecast-svg-tooltip__line { fill: #5f6e81; font-size: 11.5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 18px; }
.dashboard-grid--import { grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading a { color: var(--blue); font-size: 13px; font-weight: 680; }
.entity-row { padding: 18px 0; border-top: 1px solid var(--line); }
.entity-row:first-child { padding-top: 0; border-top: 0; }
.entity-title { display: flex; justify-content: space-between; gap: 16px; }
.entity-title span { color: var(--muted); font-size: 13px; }
.entity-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 17px 0 0; }
.entity-metrics div { padding: 12px; border-radius: 5px; background: var(--surface-2); }
.entity-metrics dt { color: var(--muted); font-size: 11px; }
.entity-metrics dd { margin: 4px 0 0; color: var(--navy-2); font-weight: 650; }
.due-list article, .import-list article { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); }
.due-list article:first-child, .import-list article:first-child { padding-top: 0; border-top: 0; }
.due-list span, .import-list span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.due-amount { text-align: right; white-space: nowrap; }
.income-panel, .warning-panel { margin-top: 18px; }
.income-summary { display: flex; flex-direction: column; text-align: right; }
.income-summary span, .income-list span { color: var(--muted); font-size: 12px; }
.income-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.income-list article { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.income-list article > div { min-width: 0; }
.income-list article:nth-child(-n+2) { border-top: 0; }
.warning-panel { border-color: #e4d2af; background: #fffdf8; }
.warning-panel ul { margin-bottom: 0; padding-left: 20px; color: var(--warning); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.account-card { display: flex; flex-direction: column; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.account-card > span, .account-card small { color: var(--muted); font-size: 12px; }
.account-card strong { margin-top: 12px; color: var(--navy); font-size: 25px; }
.account-card .text-action { margin-top: 8px; }
.asset-account-grid .account-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 18px; padding: 13px 16px; }
.asset-account-grid .account-card > span, .asset-account-grid .account-card h2, .asset-account-grid .account-card small, .asset-account-grid .account-card .text-action { grid-column: 1; }
.asset-account-grid .account-card h2 { margin: 1px 0; font-size: 19px; }
.asset-account-grid .account-card strong { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; font-size: 21px; }
.asset-account-grid .account-card .text-action { margin-top: 3px; }

/* Share-Bewertung und Verkauf */
.section-tabs { display: inline-flex; gap: 4px; margin-bottom: 25px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-3); }
.section-tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.section-tabs a:hover { color: var(--navy-2); }
.section-tabs a.active { background: white; box-shadow: 0 1px 4px rgba(11,31,58,.08); color: var(--navy-2); }
.share-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.share-summary-grid .metric-card strong { font-size: clamp(23px, 2vw, 32px); }
.share-warning-panel { margin-bottom: 20px; border-color: #e4d2af; background: #fffdf8; }
.share-warning-panel ul { margin: 0; padding-left: 20px; color: var(--warning); }
.share-growth-panel { margin-bottom: 26px; }
.share-growth-canvas, .share-growth-canvas svg { min-height: 260px; }
.share-growth-grid { stroke: #dfe4eb; stroke-width: 1; stroke-dasharray: 3 4; }
.share-growth-label { fill: var(--navy-2); font-size: 12px; font-weight: 680; }
.share-growth-bar--cost { fill: #aeb8c6; }
.share-growth-bar--current { fill: #173b63; }
.share-growth-bar--current:focus { outline: none; stroke: #6f9bc2; stroke-width: 3; }
.share-growth-delta { fill: var(--positive); font-size: 11px; font-weight: 750; }
.share-growth-legend .legend-cost { background: #aeb8c6; }
.share-growth-legend .legend-current-value { background: #173b63; }
.share-section { margin-top: 27px; }
.share-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.share-class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.share-class-card, .share-sale-card { padding: 0; overflow: hidden; }
.share-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.share-card-head h2 { font-size: 22px; }
.share-card-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.share-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); }
.share-fact-grid > div { min-width: 0; padding: 18px 20px; border-left: 1px solid var(--line); }
.share-fact-grid > div:first-child { border-left: 0; }
.share-fact-grid dt { color: var(--muted); font-size: 11px; }
.share-fact-grid dd { margin: 6px 0 0; color: var(--navy-2); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.share-fact-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.share-fact-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.share-fact-grid--compact > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
.share-fact-grid--compact > div:nth-child(4) { border-top: 1px solid var(--line); }
.share-installments { border-bottom: 1px solid var(--line); }
.share-installments table, .share-holder-table { min-width: 720px; }
.share-holder-table th, .share-holder-table td { padding: 12px 14px; }
.share-holder-table td small { display: block; margin-top: 2px; }
.share-sale-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 18px 28px; padding: 16px 22px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.share-sale-foot strong { margin-left: 5px; color: var(--navy-2); font-size: 14px; }
.share-source { margin: 0; padding: 13px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; }
.investment-actions { flex-wrap: wrap; }
.investment-history-panel { margin-bottom: 26px; }
.investment-history-canvas, .investment-history-canvas svg { min-height: 390px; }
.investment-chart-grid { stroke: #dfe4eb; stroke-width: 1; stroke-dasharray: 3 4; }
.investment-chart-zero { stroke: #9ba7b6; stroke-width: 1; }
.investment-value-area { fill: rgba(31, 90, 140, .09); }
.investment-value-line { fill: none; stroke: #173b63; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.investment-value-point { fill: white; stroke: #173b63; stroke-width: 4; cursor: pointer; }
.investment-value-point:focus { outline: none; stroke: #6f9bc2; stroke-width: 6; }
.investment-gain-bar { fill: #3b8f73; }
.investment-gain-bar--negative { fill: #b34f58; }
.investment-fx-bar { fill: #d49a37; }
.investment-year-label { fill: var(--muted); font-size: 12px; font-weight: 680; }
.investment-event-line { stroke: #8b98a8; stroke-width: 1; stroke-dasharray: 2 3; }
.investment-event-label { font-size: 11px; font-weight: 760; }
.investment-event-label--purchase { fill: #26745d; }
.investment-event-label--sale { fill: #a1424a; }
.investment-history-legend .legend-investment-value { background: #173b63; }
.investment-history-legend .legend-annual-gain { background: #3b8f73; }
.investment-history-legend .legend-fx-effect { background: #d49a37; }
.investment-history-legend .legend-event { width: 2px; border-radius: 0; background: #8b98a8; }
.transaction-ledger-table, .annual-investment-table { min-width: 1260px; }
.transaction-ledger-table td small { display: block; margin-top: 3px; }
.investment-event { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.investment-event--purchase { background: #e6f3ee; color: #26745d; }
.investment-event--sale { background: #f8e9ea; color: #a1424a; }
.investment-event--current { background: var(--blue-soft); color: var(--navy-3); }
.annual-row--sale { background: #fffafb; }
.investment-reconciliation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.investment-reconciliation-card h2 { margin-bottom: 18px; }
.investment-reconciliation-card dl { margin: 0; }
.investment-reconciliation-card dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.investment-reconciliation-card dt { color: var(--muted); font-size: 12px; }
.investment-reconciliation-card dd { margin: 0; color: var(--navy-2); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.investment-reconciliation-card .investment-reconciliation-total { margin-top: 4px; border-top-color: var(--navy-2); }
.investment-reconciliation-total dt, .investment-reconciliation-total dd { color: var(--navy-2); font-size: 16px; }
.calculation-formula { margin: 16px 0 0; padding: 12px 14px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.5; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.sale-details, .calculation-details { padding: 0; overflow: hidden; }
.sale-details summary, .calculation-details summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; cursor: pointer; list-style: none; }
.sale-details summary::-webkit-details-marker, .calculation-details summary::-webkit-details-marker { display: none; }
.sale-details summary strong, .calculation-details summary strong { display: block; color: var(--navy-2); font-size: 18px; }
.sale-details summary > span:last-child, .calculation-details summary > span:last-child { color: var(--blue); font-size: 12px; font-weight: 680; }
.sale-details[open] summary, .calculation-details[open] summary { border-bottom: 1px solid var(--line); }
.sale-details-body, .calculation-details-body { padding: 22px 24px; }
.calculation-details-body p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.calculation-details-body p:last-child { margin-bottom: 0; }

@media (max-width: 1500px) {
  .holdings-table .holdings-valuation-status { display: none; }
  .holdings-table :is(th, td) { padding-inline: 12px; }
  .obligations-table { table-layout: fixed; }
  .obligations-table :is(th, td) { padding-inline: 10px; }
  .obligations-table .obligations-due-date,
  .obligations-table .obligations-confidence { display: none; }
  .obligations-table .obligations-status { width: 8%; }
  .obligations-table .obligations-entity { width: 11%; }
  .obligations-table .obligations-type { width: 12%; }
  .obligations-table .obligations-position { width: 24%; }
  .obligations-table .obligations-counterparty { width: 17%; }
  .obligations-table .obligations-amount { width: 15%; }
  .obligations-table .obligations-action { width: 13%; }
  .obligations-table .obligations-action .table-action-button { width: 100%; display: inline-flex; align-items: center; justify-content: center; }
}

/* Tabellen und Formulare */
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 24px 24px 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { border-bottom: 1px solid var(--line-strong); background: #e9edf2; color: #526073; font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; }
td { font-size: 14px; }
td small { color: var(--muted); }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.currency-primary, .currency-secondary { display: block; }
.currency-secondary { min-height: 1.35em; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; white-space: nowrap; }
.currency-secondary--placeholder { display: none; }
.holdings-table tbody tr { height: 67px; }
.negative { color: var(--danger); }
.obligation-type-badge { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.obligation-type-badge--receivable { border: 1px solid color-mix(in srgb, var(--flow-in) 28%, white); background: color-mix(in srgb, var(--flow-in) 14%, white); color: color-mix(in srgb, var(--flow-in) 72%, var(--navy)); }
.obligation-type-badge--payable { border: 1px solid color-mix(in srgb, var(--flow-out) 28%, white); background: color-mix(in srgb, var(--flow-out) 14%, white); color: color-mix(in srgb, var(--flow-out) 72%, var(--navy)); }
.obligations-position strong, .obligations-position small { display: block; }
.obligations-position small { margin-top: 3px; }
.obligations-amount--receivable .currency-primary { color: color-mix(in srgb, var(--flow-in) 82%, var(--navy)); }
.obligations-amount--payable .currency-primary { color: color-mix(in srgb, var(--flow-out) 82%, var(--navy)); }
.empty-cell, .empty-state { padding: 30px; color: var(--muted); text-align: center; }
.empty-state p { margin: 7px 0 0; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--surface-3); font-size: 11px; }
.status--open { color: var(--navy-3); background: var(--blue-soft); }
.status--expected { color: var(--warning); background: var(--warning-bg); }
.status--settled { color: var(--muted); }
.status-warning { color: var(--warning); font-weight: 650; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border: 1px solid var(--navy-2); border-radius: 5px; font-weight: 560; }
.primary-button { background: var(--navy-2); color: white; }
.primary-button:hover { background: var(--navy); }
.secondary-button { background: white; color: var(--navy-2); }
.secondary-button:hover { background: var(--blue-soft); }
.danger-button { border-color: var(--danger); background: white; color: var(--danger); }
.danger-button:hover { background: var(--danger-bg); }
.form-delete-action { margin-left: auto; }
.delete-warning { display: grid; gap: 14px; }
.delete-warning p { margin: 0; line-height: 1.55; }
.delete-related-list { margin: 0; padding-left: 20px; color: var(--muted); }
.asset-editor.delete-confirmation-dialog { width: min(620px, calc(100vw - 36px)); }
.delete-confirmation-dialog .asset-editor__panel { overflow: visible; }
.delete-confirmation-dialog .asset-editor__actions { position: static; margin-top: 24px; }
.text-action, .table-action { color: var(--blue); font-size: 13px; font-weight: 680; }
.table-action { white-space: nowrap; }
.table-row-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; }
.table-action--secondary { color: var(--muted); font-size: 11px; font-weight: 560; }
.table-action-button { padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--blue); font: inherit; font-size: 12px; font-weight: 680; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.table-action-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.asset-editor { width: min(980px, calc(100vw - 36px)); max-width: none; max-height: calc(100vh - 36px); padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--surface); color: var(--navy-2); box-shadow: 0 24px 70px rgba(11,31,58,.28); }
.asset-editor::backdrop { background: rgba(11,31,58,.48); backdrop-filter: blur(2px); }
.asset-editor__shell { display: flex; max-height: calc(100vh - 36px); flex-direction: column; }
.asset-editor__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.asset-editor__header small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.asset-editor__header h2 { margin: 0; font-size: 25px; }
.asset-editor__close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); font-size: 25px; line-height: 1; cursor: pointer; }
.asset-editor__close:hover { background: var(--surface-3); color: var(--navy-2); }
.asset-editor__tabs { display: flex; gap: 5px; padding: 12px 28px 0; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.asset-editor__tabs button { min-height: 42px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 680; cursor: pointer; }
.asset-editor__tabs button[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--navy-2); }
.asset-editor__panel { padding: 24px 28px 28px; overflow-y: auto; }
.asset-editor__section + .asset-editor__section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.asset-editor__section h3 { margin: 0 0 15px; font-size: 16px; }
.asset-editor__grid { gap: 17px 20px; }
.asset-editor__actions { position: sticky; bottom: -28px; display: flex; justify-content: flex-end; gap: 10px; margin: 26px -28px -28px; padding: 16px 28px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.asset-editor__actions .form-delete-action { margin-right: auto; margin-left: 0; }
.asset-editor__inline-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.asset-editor__empty { max-width: 620px; padding: 12px 0 20px; }
.asset-editor__empty h3 { margin: 0 0 8px; }
.asset-editor__empty p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.bank-source-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bank-source-summary div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.bank-source-summary span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.bank-source-summary strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.valuation-editor-list { display: grid; gap: 10px; }
.valuation-editor { border: 1px solid var(--line); border-radius: 7px; background: white; }
.valuation-editor summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; cursor: pointer; list-style: none; }
.valuation-editor summary::-webkit-details-marker { display: none; }
.valuation-editor summary span:first-child { color: var(--navy-2); font-weight: 680; }
.valuation-editor summary span:last-child { color: var(--muted); font-size: 12px; }
.valuation-editor summary::after { margin-left: auto; color: var(--blue); content: "▾"; }
.valuation-editor[open] summary::after { content: "▴"; }
.valuation-editor__form { padding: 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.cost-amount-button { padding: 3px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--navy-2); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.cost-amount-button:hover, .cost-amount-button:focus-visible { border-bottom-color: currentColor; color: var(--blue); }
.cost-amount-button::after { margin-left: 7px; color: var(--blue); font-size: 11px; content: "▾"; }
.cost-amount-button[aria-expanded="true"]::after { content: "▴"; }
.cost-month-detail > td { padding: 0; background: var(--surface-2); }
.cost-category-list { padding: 8px 18px 18px; }
.cost-category-drilldown { border-bottom: 1px solid var(--line); background: white; }
.cost-category-drilldown:first-child { border-top: 1px solid var(--line); }
.cost-category-drilldown summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cost-category-drilldown summary::-webkit-details-marker { display: none; }
.cost-category-drilldown summary > span { display: grid; gap: 2px; }
.cost-category-drilldown summary > span:last-child { color: var(--navy-2); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cost-category-drilldown summary small { color: var(--muted); font-size: 11px; }
.cost-category-drilldown[open] summary { border-bottom: 1px solid var(--line); background: var(--blue-soft); }
.cost-transaction-table th { background: #f3f5f8; }
.cost-transaction-table td { font-size: 14px; }
.heading-actions, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.form-stack { display: grid; gap: 10px; }
.form-stack label { margin-top: 6px; font-size: 13px; font-weight: 650; }

/* Einheitlicher Feldstandard für Anmeldung, Import und Datenpflege. */
:where(.form-stack, .form-field) input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
:where(.form-stack, .form-field) select {
  width: 100%;
  height: var(--field-height);
  min-height: var(--field-height);
  margin: 0;
  padding: 0 var(--field-padding-x);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background-color: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}
:where(.form-stack, .form-field) textarea {
  width: 100%;
  min-height: calc(var(--field-height) * 2.5);
  margin: 0;
  padding: 11px var(--field-padding-x);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background-color: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  resize: vertical;
}
:where(.form-stack, .form-field) select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23526073' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
:where(.form-stack, .form-field) input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 8px 0 8px 8px;
  cursor: pointer;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
:where(.form-stack, .form-field) input[type="file"]:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
  padding: 5px;
  overflow: hidden;
}
:where(.form-stack, .form-field) input[type="file"]::file-selector-button {
  height: 36px;
  margin: 0 11px 0 0;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--navy-2);
  font: inherit;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
}
:where(.form-stack, .form-field) input[type="file"]::file-selector-button:hover { background: var(--blue-soft); }
:where(.form-stack, .form-field) :is(input, select, textarea):focus {
  outline: 3px solid rgba(49,95,135,.13);
  border-color: var(--blue);
}
:where(.form-stack, .form-field) :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
:where(.form-stack, .form-field) :is(input, select, textarea):disabled {
  background-color: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
.form-error { color: var(--danger); font-size: 13px; }
.form-error--block { margin-bottom: 18px; padding: 13px 15px; border-radius: 5px; background: var(--danger-bg); }

/* Integrierte Datenpflege */
.data-lead { max-width: 780px; margin: 13px 0 0; }
.data-section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.data-section-card { min-height: 245px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.data-section-card__head span { display: block; margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.data-section-card p { margin: 15px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.58; }
.data-section-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.data-section-card__actions .secondary-button { min-height: 40px; padding: 0 14px; }
.data-integrity-note { display: grid; grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr); align-items: center; gap: 35px; margin-top: 18px; }
.data-integrity-note p:last-child { margin: 0; color: var(--muted); }
.data-list-panel { padding: 0; overflow: hidden; }
.data-list-panel .panel-heading { padding: 22px 22px 16px; }
.data-list-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 82px; padding: 17px 22px; border-top: 1px solid var(--line); transition: background .16s ease; }
.data-list-row:first-child { border-top: 0; }
.data-list-row:hover { background: var(--surface-2); }
.data-list-row > span:first-child { min-width: 0; }
.data-list-row strong, .data-list-row small { display: block; }
.data-list-row strong { color: var(--navy-2); font-weight: 620; }
.data-list-row small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.data-list-row__action { flex: 0 0 auto; color: var(--blue); font-size: 13px; font-weight: 680; }
.data-list-row__amount { flex: 0 0 auto; color: var(--navy-2); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.transaction-filters { margin-bottom: 18px; padding: 22px; }
.transaction-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.transaction-filter-search { grid-column: span 2; }
.transaction-filter-grid .form-field { min-width: 0; gap: 4px; }
.transaction-filter-grid .form-field label { display: block; margin: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .065em; line-height: 1.2; text-transform: uppercase; }
.transaction-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.transaction-filter-actions > span { margin-left: auto; color: var(--muted); font-size: 13px; }
.table-tools { margin: 0; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--surface-2); }
.table-tools--collapsible { padding: 0; }
.table-tools-summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; cursor: pointer; list-style: none; color: var(--blue); font-size: 13px; font-weight: 680; }
.table-tools-summary::-webkit-details-marker { display: none; }
.table-tools-summary::after { content: "▾"; }
.table-tools--collapsible[open] .table-tools-summary { border-bottom: 1px solid var(--line); }
.table-tools--collapsible[open] .table-tools-summary::after { content: "▴"; }
.table-tools-summary-label--open { display: none; }
.table-tools--collapsible[open] .table-tools-summary-label--closed { display: none; }
.table-tools--collapsible[open] .table-tools-summary-label--open { display: inline; }
.table-tools-form { padding: 14px 16px; }
.table-tools .transaction-filter-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.table-tools input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(169, 42, 42, .1); }
.table-tools .transaction-filter-search { grid-column: auto; }
.table-tools .transaction-filter-actions { margin-top: 10px; }
.table-tools[hidden] { display: none; }
.table-sort-button { display: inline-flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-align: inherit; text-transform: inherit; }
.numeric .table-sort-button { justify-content: flex-end; }
.numeric .table-sort-indicator { order: -1; }
.table-sort-indicator { min-width: 10px; color: var(--blue); font-size: 12px; }
.table-filter-empty { padding: 26px 18px; color: var(--muted); text-align: center; }
.transaction-table-panel { max-width: 100%; contain: inline-size; }
.transaction-table-panel .table-scroll { max-width: 100%; overscroll-behavior-inline: contain; }
.transaction-review-table { min-width: 940px; }
.transaction-review-table th a { display: inline-flex; align-items: center; gap: 5px; }
.transaction-review-table th a:hover { color: var(--navy-2); }
.transaction-review-table td:nth-child(3) { min-width: 290px; max-width: 480px; }
.transaction-review-table td:nth-child(4) { min-width: 210px; }
.transaction-payment-details { margin-top: 8px; }
.transaction-payment-details summary { width: max-content; cursor: pointer; color: var(--blue); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.transaction-payment-details summary:hover, .transaction-payment-details summary:focus-visible { text-decoration: underline; }
.transaction-payment-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin: 9px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.transaction-payment-details dl div { min-width: 0; }
.transaction-payment-details dt { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.transaction-payment-details dd { margin: 0; overflow-wrap: anywhere; color: var(--navy-2); font-size: 12px; line-height: 1.4; }
.transaction-payment-details__wide { grid-column: 1 / -1; }
.transaction-category-form { min-width: 190px; }
.transaction-category-form select {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  appearance: none;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23526073' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 16px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.transaction-category-form select:focus { outline: 3px solid rgba(49,95,135,.13); border-color: var(--blue); }
.classification-suggestion { margin-top: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--blue-soft); }
.classification-suggestion > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.classification-suggestion strong { color: var(--navy-2); font-size: 13px; }
.classification-suggestion small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.confidence-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: white; color: var(--navy-3); font-size: 10px; font-weight: 750; }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.suggestion-actions button { min-height: 29px; padding: 4px 8px; border: 1px solid var(--navy-3); border-radius: 4px; background: var(--navy-3); color: white; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.suggestion-actions .suggestion-reject { border-color: var(--line-strong); background: white; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; }
.pagination > span { color: var(--muted); font-size: 13px; }
.pagination > div { display: flex; gap: 8px; }
.income-source-table { min-width: 980px; }
.income-source-table th:first-child { width: 25%; }
.income-source-table th:last-child { width: 1%; }
.income-source-table td strong { color: var(--navy-2); font-weight: 650; }
.editor-panel { max-width: 1050px; }
.form-automation-note { margin: 0 0 22px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--blue-soft); color: var(--navy-3); font-size: 13px; line-height: 1.5; }
.data-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.form-field > label { color: var(--navy-2); font-size: 13px; font-weight: 680; }
.form-field--checkbox { justify-content: flex-end; min-height: var(--field-height); padding-bottom: 10px; }
.forecast-form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.forecast-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.forecast-form-section h3 { margin: 0 0 7px; color: var(--navy-2); font-size: 17px; }
.forecast-form-section > p, .forecast-section-heading p { margin: 0 0 18px; }
.forecast-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.payroll-summary { display: flex; flex: 0 0 auto; gap: 22px; margin: 0; }
.payroll-summary div { display: grid; gap: 3px; text-align: right; }
.payroll-summary dt { color: var(--muted); font-size: 11px; }
.payroll-summary dd { margin: 0; color: var(--navy-2); font-weight: 750; }
.payroll-rule-grid { margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.payroll-rule-row { display: grid; grid-template-columns: minmax(230px, 1.5fr) minmax(150px, .55fr) minmax(220px, .8fr); gap: 18px; align-items: center; min-height: 78px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.payroll-rule-row:first-child { border-top: 0; }
.payroll-rule-row > div:first-child { display: grid; gap: 4px; }
.payroll-rule-row > div:first-child strong { color: var(--navy-2); }
.payroll-rule-row > div:first-child span { color: var(--muted); font-size: 12px; }
.compact-number-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.compact-number-field input { width: 100%; min-width: 90px; height: var(--field-height); padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--ink); font: inherit; font-size: 15px; }
.compact-number-field input:focus { outline: 3px solid rgba(74,110,153,.14); border-color: var(--blue); }
.compact-number-field--money { justify-self: stretch; }
.payroll-calculation-table { margin-top: 18px; }
.payroll-calculation-table table { min-width: 680px; }
.payroll-calculation-table td:first-child small { display: block; margin-top: 3px; color: var(--muted); }
.dividend-installment-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.dividend-installment-preview > div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-soft); }
.dividend-installment-preview span { color: var(--muted); font-size: 12px; }
.forecast-warnings { margin: 0 0 18px; color: var(--warning); }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-label input { width: 20px; height: 20px; accent-color: var(--navy-3); }
.help-text { color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-actions { margin-top: 27px; padding-top: 21px; border-top: 1px solid var(--line); }
.calculated-values { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.transaction-source-details { margin: 0 0 24px; }
.calculated-values h2 { margin-bottom: 16px; font-size: 20px; }
.calculated-values .share-fact-grid { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 13px 16px; border-radius: 6px; background: var(--blue-soft); color: var(--navy-3); }
.message.error { background: var(--danger-bg); color: var(--danger); }
.message.warning { background: var(--warning-bg); color: var(--warning); }
.import-alert-panel { margin-bottom: 20px; border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.import-alert-actions { align-items: flex-start; }
.import-alert-actions .table-action { margin-top: 5px; }
.import-overview-grid { margin-top: 20px; }
.form-hint { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Einkommen, Liquidität und Steuern */
.forecast-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tax-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.forecast-waterfall { overflow-x: auto; }
.forecast-balance { overflow: visible; }
.forecast-waterfall svg { min-width: 980px; }
.forecast-balance svg { min-width: 720px; }
.income-waterfall-section .waterfall-bar--positive { fill: var(--flow-in); }
.income-waterfall-section .waterfall-bar--negative { fill: var(--flow-out); }
.income-waterfall-section .waterfall-bar--total { fill: #153f2f; }
.income-waterfall-section .waterfall-connector { stroke: #7f9188; }
.income-waterfall-section .forecast-waterfall svg { min-width: 900px; }
.waterfall-legend i { width: 12px; height: 12px; border-radius: 3px; }
.waterfall-legend .legend-inflow { background: var(--flow-in); }
.waterfall-legend .legend-deduction { background: var(--flow-out); }
.waterfall-legend .legend-result { background: #153f2f; }
.forecast-detail-grid { margin-bottom: 18px; }
.forecast-breakdown { margin: 0; }
.forecast-breakdown > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); }
.forecast-breakdown > div:first-child { border-top: 0; }
.forecast-breakdown dt { color: var(--muted); font-size: 13px; }
.forecast-breakdown dd { margin: 0; color: var(--navy-2); font-weight: 700; }
.forecast-settings { margin-top: 18px; }
.liquidity-account-grid { margin: 18px 0; }
.cost-analysis-grid { align-items: start; margin-bottom: 18px; }
.cost-category-panel { margin-bottom: 18px; }
.cost-category-panel .panel-heading { margin-bottom: 22px; }
.cost-category-chart + .cost-category-chart { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.cost-chart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.cost-chart-heading strong { color: var(--navy-3); font-size: 13px; letter-spacing: .06em; }
.cost-chart-rows { display: grid; gap: 7px; }
.cost-chart-row { min-height: 42px; display: grid; grid-template-columns: minmax(180px, 1.05fr) minmax(240px, 3fr) minmax(112px, .7fr); align-items: center; gap: 16px; }
.cost-chart-label { min-width: 0; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.25; }
.cost-chart-track { height: 13px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.cost-chart-track i { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy-3), var(--blue)); }
.cost-chart-value { display: grid; grid-template-columns: minmax(65px, 1fr) 38px; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cost-chart-value strong { color: var(--navy-2); font-size: 14px; }
.cost-chart-value small { color: var(--muted); font-size: 11px; }
.cost-chart-more summary { cursor: pointer; list-style: none; }
.cost-chart-more summary::-webkit-details-marker { display: none; }
.cost-chart-more > summary .cost-chart-label::after { margin-left: 7px; color: var(--blue); font-size: 11px; content: "anzeigen"; }
.cost-chart-more[open] > summary .cost-chart-label::after { content: "schliessen"; }
.cost-chart-additional { display: grid; gap: 7px; margin-top: 7px; }
.cost-savings-table { min-width: 820px; }
.savings-history-panel { margin-top: 18px; }
.savings-rate-cell { min-width: 210px; display: flex; align-items: center; gap: 12px; }
.savings-rate-track { flex: 1 1 auto; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.savings-rate-track i { display: block; height: 100%; border-radius: inherit; background: var(--positive); }
.savings-rate-cell strong { flex: 0 0 58px; text-align: right; }
.cost-monthly-panel { margin-bottom: 18px; }
.cost-monthly-panel .panel-heading { align-items: flex-start; margin-bottom: 14px; }
.cost-stack-swatch { --cost-stack-color: #17365f; width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; border-radius: 2px; background: var(--cost-stack-color); }
.cost-stack-color-0 { --cost-stack-color: #17365f; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-1 { --cost-stack-color: #25558a; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-2 { --cost-stack-color: #386fa5; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-3 { --cost-stack-color: #4f87b8; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-4 { --cost-stack-color: #6a9fc4; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-5 { --cost-stack-color: #84b2ce; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-6 { --cost-stack-color: #9ec4d9; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-7 { --cost-stack-color: #bad5e3; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-8 { --cost-stack-color: #c8dee9; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-9 { --cost-stack-color: #dbeaf1; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-color-10 { --cost-stack-color: #acc8d7; fill: var(--cost-stack-color); background: var(--cost-stack-color); }
.cost-stack-swatch--savings, .cost-stack-savings-segment { fill: #c7ccd3; background: #c7ccd3; }
.cost-stack-line-swatch { width: 13px; height: 3px; display: inline-block; flex: 0 0 auto; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 1px white; }
.cost-stack-chart-shell { position: relative; }
.cost-stack-chart { width: 100%; min-height: 430px; }
.cost-stack-chart > svg { width: 100%; height: auto; display: block; overflow: visible; }
.cost-stack-grid { stroke: var(--line); stroke-width: 1; }
.cost-stack-axis { fill: var(--muted); font-size: 12px; }
.cost-stack-segment { stroke: white; stroke-width: 1; cursor: pointer; transition: filter .12s ease, opacity .12s ease, stroke-width .12s ease; }
.cost-stack-segment:hover, .cost-stack-segment:focus-visible, .cost-stack-segment.is-selected { stroke: var(--navy-2); stroke-width: 3; filter: brightness(.92) saturate(1.18); outline: none; }
.cost-stack-negative-marker { stroke: var(--negative); stroke-width: 4; }
.cost-stack-income-marker-bg { stroke: white; stroke-width: 6; pointer-events: none; }
.cost-stack-income-marker { stroke: var(--ink); stroke-width: 3; pointer-events: none; }
.cost-stack-month-grid { display: grid; grid-template-columns: repeat(var(--cost-month-count), minmax(0, 1fr)); }
.cost-stack-month-summary { min-width: 0; display: grid; justify-items: center; align-content: start; padding: 13px 3px 0; text-align: center; }
.cost-stack-month-summary > span { color: var(--muted); font-size: 15px; }
.cost-stack-month-summary > strong { max-width: 100%; margin-top: 7px; overflow: hidden; color: var(--navy-2); font-size: 17px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.cost-stack-month-summary > b { min-width: 46px; display: inline-flex; align-items: center; justify-content: center; margin-top: 7px; padding: 4px 9px; border-radius: 999px; background: var(--positive-bg); color: var(--positive); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.cost-stack-month-summary > b.is-negative-rate { background: var(--danger-bg); color: var(--danger); }
.cost-stack-month-summary > b.is-neutral { background: var(--surface-3); color: var(--muted); }
.cost-stack-month-summary.is-negative > strong { color: var(--negative); }
.cost-stack-more-button { min-height: 40px; margin-top: 11px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--navy-2); font-size: 14px; font-weight: 450; line-height: 1.15; cursor: pointer; }
.cost-stack-more-button:hover, .cost-stack-more-button:focus-visible { border-color: var(--blue); color: var(--blue); }
.cost-stack-more-button:disabled { cursor: default; opacity: .45; }
.cost-stack-tooltip { position: absolute; z-index: 4; width: 380px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.98); box-shadow: 0 9px 28px rgba(11,31,58,.16); color: var(--ink); font-size: 13px; pointer-events: none; }
.cost-stack-tooltip-header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 7px; }
.cost-stack-tooltip-header > small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cost-stack-tooltip-header > span { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .06em; }
.cost-stack-tooltip > span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 7px; line-height: 1.7; }
.cost-stack-tooltip > span.is-active { margin-inline: -5px; padding-inline: 5px; border-radius: 3px; background: var(--blue-soft); color: var(--navy-2); font-weight: 700; }
.cost-stack-tooltip em { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.cost-stack-tooltip b { font-weight: 560; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-stack-details:empty { display: none; }
.cost-stack-detail { margin: 20px -24px -24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cost-stack-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 24px; }
.cost-stack-detail-heading > div { display: grid; gap: 3px; }
.cost-stack-detail-heading strong { color: var(--navy-2); font-size: 14px; }
.cost-stack-detail-heading span { color: var(--muted); font-size: 13px; }
.cost-stack-detail .table-scroll { border-top: 1px solid var(--line); background: white; }
.cost-savings-formula { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); background: white; }
.cost-savings-formula div { padding: 16px 24px; }
.cost-savings-formula div + div { border-left: 1px solid var(--line); }
.cost-savings-formula dt { color: var(--muted); font-size: 11px; }
.cost-savings-formula dd { margin: 5px 0 0; color: var(--navy-2); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-savings-formula dd.negative { color: var(--negative); }
.cost-stack-mobile-list { display: grid; }
.cost-stack-mobile-month { padding: 13px 0; border-top: 1px solid var(--line); }
.cost-stack-mobile-month:first-child { border-top: 0; }
.cost-stack-mobile-month .cost-stack-month-summary { grid-template-columns: minmax(70px, 1fr) auto auto auto; align-items: center; justify-items: start; gap: 8px 12px; padding: 0; border-top: 0; text-align: left; }
.cost-stack-mobile-month .cost-stack-month-summary > span { font-size: 14px; font-weight: 700; }
.cost-stack-mobile-month .cost-stack-month-summary > :is(strong, b) { margin-top: 0; font-size: 14px; }
.cost-stack-mobile-month .cost-stack-more-button { min-height: 42px; margin-top: 0; padding-inline: 10px; }
.cost-stack-mobile-scale { margin-top: 9px; background: var(--surface-3); }
.cost-stack-mobile-bar { min-width: 2px; height: 18px; display: flex; position: relative; }
.cost-stack-mobile-segment { min-width: 3px; height: 18px; padding: 0; border: 0; border-right: 1px solid white; cursor: pointer; }
.cost-stack-mobile-segment:last-child { border-right: 0; }
.cost-stack-mobile-segment:focus-visible, .cost-stack-mobile-segment.is-selected { z-index: 1; outline: 3px solid var(--navy-2); outline-offset: 2px; }
.cost-stack-mobile-bar.has-negative-savings::after { position: absolute; inset: -4px 0 auto; height: 4px; background: var(--negative); content: ""; }
.cost-stack-mobile-income-marker { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -2px; background: var(--ink); box-shadow: 0 0 0 1px white; pointer-events: none; }
.metric-card a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.year-picker { min-width: 145px; display: grid; gap: 6px; }
.year-picker label { color: var(--muted); font-size: 11px; font-weight: 650; }
.year-picker select { height: 42px; padding: 0 38px 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--navy-2); font-weight: 650; }
.tax-status { margin-bottom: 18px; }
.tax-year-overview, .tax-proposal { margin-bottom: 18px; }
.tax-page-heading { align-items: center; }
.tax-review-button { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.tax-review-button .tax-review-badge { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--navy-2); font-size: 11px; font-weight: 780; line-height: 1; }
.tax-year-overview td small { display: block; margin-top: 4px; color: var(--muted); }
.tax-year-overview tr.is-selected td { background: var(--surface-2); }
.status--tax-missing { color: var(--muted); background: var(--surface-3); }
.status--tax-open { color: var(--warning); background: var(--warning-bg); }
.status--tax-partial { color: var(--navy-3); background: var(--blue-soft); }
.status--tax-settled { color: #2e6b57; background: #e8f3ee; }
.tax-proposal { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.tax-proposal > .panel-heading { align-items: center; margin-bottom: 0; }
.tax-proposal form { margin-top: 18px; }
.tax-current-forecast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.tax-current-forecast div { padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.tax-current-forecast span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.tax-current-forecast strong { font-size: 21px; }
.tax-unallocated-row td { background: #fff9ec; }
.tax-unallocated-row small { display: block; margin-top: 3px; color: var(--warning); }
.tax-unallocated-payment-warning { margin: 0 0 18px; }
.tax-year-editor { width: min(1120px, calc(100vw - 36px)); }
.tax-payment-editor { width: min(1280px, calc(100vw - 36px)); }
.tax-year-editor__panel { padding-top: 0; }
.tax-dialog-tabs { margin: 0 -28px 26px; padding-inline: 28px; overflow-x: auto; scrollbar-width: thin; }
.tax-dialog-tabs button { flex: 0 0 auto; white-space: nowrap; }
.asset-editor__tabs .tab-count, .asset-editor__tabs .tab-badge { display: inline-flex; min-width: 19px; height: 19px; align-items: center; justify-content: center; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--blue-soft); color: var(--navy-2); font-size: 10px; }
.asset-editor__tabs .tab-badge { background: var(--warning-bg); color: var(--warning); }
[data-dialog-tab-panel][hidden] { display: none; }
.tax-dialog-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.tax-dialog-summary div { padding: 15px 17px; }
.tax-dialog-summary div + div { border-left: 1px solid var(--line); }
.tax-dialog-summary dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.tax-dialog-summary dd { margin: 0; color: var(--navy-2); font-size: 18px; font-weight: 760; font-variant-numeric: tabular-nums; }
.tax-section-heading { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.tax-section-heading h3, .tax-proposal h3 { margin: 0 0 4px; }
.tax-section-heading p, .tax-proposal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tax-component-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.tax-component-edit { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.tax-component-edit h4 { margin: 0 0 18px; color: var(--navy-2); font-size: 16px; }
.tax-component-fields { display: grid; gap: 16px; }
.tax-component-edit .form-field { min-width: 0; }
.tax-estv-note { margin: 18px 0 0; }
.tax-dialog-actions { gap: 10px; }
.tax-dialog-payments { margin-top: 20px; }
.tax-dialog-payments :is(input, select) { width: 100%; min-width: 130px; height: 39px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--ink); }
.tax-dialog-payments td:first-child input { min-width: 145px; }
.tax-dialog-payments td:first-child small { display: block; max-width: 260px; margin-top: 5px; }
.tax-review-payments table { min-width: 1050px; }
.tax-review-payments .primary-button { min-height: 39px; }
.tax-payment-identifiers { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: -4px 0 14px; color: var(--muted); font-size: 11px; }
.tax-payment-source { min-width: 280px; vertical-align: top; }
.tax-payment-details { margin-top: 7px; }
.tax-payment-details summary { width: max-content; cursor: pointer; color: var(--blue); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.tax-payment-details summary:hover { text-decoration: underline; }
.tax-payment-details dl { width: min(520px, 70vw); margin: 9px 0 0; padding: 11px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.tax-payment-details dl div { min-width: 0; }
.tax-payment-details dt { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.tax-payment-details dd { margin: 0; overflow-wrap: anywhere; color: var(--navy-2); font-size: 12px; line-height: 1.4; }
.tax-payment-details__wide { grid-column: 1 / -1; }
.tax-year-overview__intro { max-width: none; white-space: nowrap; }
.tax-status-track { height: 16px; display: flex; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.tax-status-track span { display: block; min-width: 0; }
.tax-status-paid { width: min(100%, calc(var(--value) / var(--total) * 100%)); background: #315f87; }
.tax-status-reserved { width: min(100%, calc(var(--value) / var(--total) * 100%)); background: #8fb8d8; }
.tax-status .chart-legend { margin-top: 13px; }
.chart-legend .legend-tax-paid { height: 8px; background: #315f87; }
.chart-legend .legend-tax-reserved { height: 8px; background: #8fb8d8; }
.chart-legend .legend-tax-open { height: 8px; background: var(--surface-3); border: 1px solid var(--line-strong); }
.tax-grid { align-items: start; margin-bottom: 18px; }
.tax-formula { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.tax-formula div { min-width: 0; padding: 16px 18px; }
.tax-formula div + div { border-left: 1px solid var(--line); }
.tax-formula span { display: block; min-height: 30px; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 680; line-height: 1.35; }
.tax-formula strong { display: block; color: var(--navy-2); font-size: 19px; font-variant-numeric: tabular-nums; }
.tax-payments :is(input, select) { width: 100%; min-width: 130px; height: 39px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--ink); }
.tax-payments td:first-child input { min-width: 145px; }
.tax-payments td:first-child small { max-width: 260px; display: block; margin-top: 5px; }
.tax-payments .secondary-button { min-height: 39px; }
.tax-limit-note { margin-top: 18px; }

/* Anmeldung */
.login-page { background: var(--navy); }
.login-shell { min-height: 100vh; padding: 0; }
.login-card { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; background: var(--surface); }
.login-card > div { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 7vw, 112px); color: white; background: radial-gradient(circle at 24% 20%, rgba(74,110,153,.55), transparent 43%), linear-gradient(155deg, #17365f, #0b1f3a 62%, #081629); }
.login-card > .login-hero { align-items: center; gap: 38px; text-align: center; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: clamp(22px, 2.3vw, 36px); color: white; }
.login-brand-mark { display: grid; width: clamp(96px, 9vw, 132px); height: clamp(96px, 9vw, 132px); flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 22px 48px rgba(3,15,31,.2); }
.login-brand-mark svg { width: 58%; height: 58%; fill: none; stroke: #fff; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.login-brand h1 { margin: 0; color: white; font-size: clamp(52px, 6vw, 86px); font-weight: 430; letter-spacing: -.045em; line-height: .9; text-align: left; }
.login-feature-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; max-width: 620px; }
.login-feature-list span { padding: 7px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.88); font-size: 12px; font-weight: 580; }
.login-card .form-stack { width: min(440px, calc(100% - 48px)); margin: 0 auto; padding: 34px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 22px 60px rgba(11,31,58,.11); }

@media (max-width: 1100px) {
  :root { --sidebar: 290px; }
  html, body { overflow-x: clip; }
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 30px 0 70px rgba(4,15,29,.25); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; border: 0; background: rgba(6,17,32,.45); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .mobile-menu { display: grid; }
  .topbar { justify-content: flex-start; gap: 12px; padding: 0 20px; }
  .topbar-title { flex: 0 0 auto; }
  .topbar-actions { justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
  .page-shell { padding: 28px 20px 48px; }
  .metric-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-chart-row { min-height: 42px; grid-template-columns: minmax(230px, 1.15fr) minmax(220px, 3fr) minmax(112px, .7fr); }
  .cost-chart-label { line-height: 1.25; white-space: normal; }
  .chart-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .dashboard-grid--import { grid-template-columns: 1fr; }
  .data-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-rule-row { grid-template-columns: minmax(210px, 1.2fr) minmax(140px, .6fr) minmax(210px, .8fr); }
  .share-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forecast-metrics, .tax-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-class-grid { grid-template-columns: 1fr; }
  .investment-reconciliation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .chart-panel--waterfall .chart-intro { white-space: normal; }
  .topbar { align-content: center; flex-wrap: wrap; height: auto; min-height: 78px; padding-top: 9px; padding-bottom: 9px; }
  .topbar-actions { order: 3; width: 100%; padding: 2px 0; }
  .topbar-actions:empty { display: none; }
  .transaction-review-table { min-width: 0; }
  .transaction-review-table thead { display: none; }
  .transaction-review-table, .transaction-review-table tbody, .transaction-review-table tr, .transaction-review-table td { display: block; width: 100%; }
  .transaction-review-table tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .transaction-review-table tbody tr:first-child { border-top: 0; }
  .transaction-review-table td, .transaction-review-table td:nth-child(3), .transaction-review-table td:nth-child(4) { display: grid; grid-template-columns: minmax(88px, 28%) minmax(0, 1fr); min-width: 0; max-width: none; gap: 12px; padding: 7px 0; border: 0; text-align: left; white-space: normal; }
  .transaction-review-table td::before { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; content: attr(data-label); }
  .transaction-review-table td > :is(strong, small, span, a) { grid-column: 2; }
  .transaction-review-table td > :is(.transaction-category-form, .classification-suggestion, .transaction-payment-details) { grid-column: 2; min-width: 0; }
  .transaction-review-table td > strong + small, .transaction-review-table td > small + small { margin-top: -8px; }
  .obligations-table { min-width: 0; table-layout: auto; }
  .obligations-table thead { display: none; }
  .obligations-table, .obligations-table tbody, .obligations-table .obligation-data-row, .obligations-table td { display: block; width: 100%; }
  .obligations-table .obligation-data-row { padding: 11px 16px; border-top: 1px solid var(--line); }
  .obligations-table .obligation-data-row td { display: grid; width: 100%; grid-template-columns: minmax(94px, 27%) minmax(0, 1fr); min-width: 0; max-width: none; gap: 12px; padding: 6px 0; border: 0; text-align: left; white-space: normal; }
  .obligations-table .obligation-data-row td::before { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; content: attr(data-label); }
  .obligations-table .obligation-data-row td > * { grid-column: 2; justify-self: start; }
  .obligations-table .obligations-due-date, .obligations-table .obligations-confidence { display: grid; }
  .obligations-table .obligations-amount .currency-primary { white-space: nowrap; }
  .obligations-table .obligations-action .table-action-button { width: auto; justify-self: start; }
}
@media (max-width: 640px) {
  .tax-year-overview__intro { white-space: normal; }
  .forecast-balance { overflow-x: auto; }
  h1 { font-size: 39px; letter-spacing: -2.2px; }
  h2 { font-size: 22px; }
  .topbar { align-content: center; flex-wrap: wrap; height: auto; min-height: 78px; padding: 9px 14px; }
  .topbar-eyebrow { font-size: 11px; }
  .topbar-title strong { font-size: 17px; }
  .topbar-actions { order: 3; width: 100%; padding: 2px 0; justify-content: flex-start; }
  .topbar-actions:empty { display: none; }
  .topbar-actions .as-of { display: none; }
  .topbar-actions { flex-wrap: wrap; overflow-x: visible; }
  .topbar-actions .primary-button, .topbar-actions .secondary-button { flex: 1 1 auto; min-height: 38px; padding: 0 10px; font-size: 13px; }
  .page-shell { padding: 24px 13px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .heading-actions { width: 100%; }
  .heading-actions a { flex: 1 1 auto; }
  .metric-grid, .card-grid, .cost-summary-grid { grid-template-columns: 1fr; }
  .cost-chart-row { min-height: 48px; grid-template-columns: minmax(0, 1fr) 94px; gap: 4px 12px; }
  .cost-chart-label { font-size: 13px; }
  .cost-chart-track { grid-column: 1 / -1; grid-row: 2; height: 8px; }
  .cost-chart-value { grid-column: 2; grid-row: 1; grid-template-columns: minmax(52px, 1fr) 34px; gap: 6px; }
  .cost-stack-chart { min-height: 0; }
  .cost-stack-detail { margin: 18px -19px -19px; }
  .cost-stack-detail-heading { align-items: flex-start; padding: 15px 19px; }
  .cost-stack-detail-heading .secondary-button { min-height: 38px; padding-inline: 10px; }
  .cost-savings-formula { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-savings-formula div { padding: 14px 16px; }
  .cost-savings-formula div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .cost-savings-formula div:nth-child(4) { border-top: 1px solid var(--line); }
  .chart-panel .panel-heading { align-items: flex-start; flex-direction: column; }
  .chart-heading-tools { width: 100%; justify-items: start; }
  .chart-legend { justify-content: flex-start; }
  .chart-range-switch { width: 100%; overflow-x: auto; }
  .chart-range-switch button { flex: 1 0 auto; min-height: 40px; padding: 0 11px; }
  .chart-canvas, .chart-canvas svg { min-height: 275px; }
  .metric-card { min-height: 138px; }
  .dashboard-grid { gap: 13px; }
  .panel { padding: 19px; }
  .entity-metrics { grid-template-columns: 1fr; }
  .income-list { grid-template-columns: 1fr; }
  .income-list article { flex-direction: column; gap: 7px; }
  .income-list article:nth-child(2) { border-top: 1px solid var(--line); }
  .income-list .due-amount { text-align: left; white-space: normal; }
  .panel-heading { gap: 12px; }
  .tax-page-heading { align-items: stretch; }
  .tax-current-forecast { grid-template-columns: 1fr; }
  .tax-component-edit-grid { grid-template-columns: 1fr; }
  .tax-formula { grid-template-columns: 1fr; }
  .tax-formula div + div { border-top: 1px solid var(--line); border-left: 0; }
  .login-card { grid-template-columns: 1fr; }
  .login-card > div { min-height: 42vh; padding: 42px 28px; }
  .login-card > .login-hero { gap: 24px; }
  .login-brand { gap: 18px; }
  .login-brand-mark { width: 74px; height: 74px; }
  .login-brand h1 { font-size: 45px; letter-spacing: -2px; }
  .login-feature-list { gap: 6px; }
  .login-feature-list span { padding: 5px 8px; font-size: 10px; }
  .login-card .form-stack { margin: 40px auto; }
  th, td { padding: 13px 14px; }
  .data-section-grid, .data-form-grid, .data-integrity-note { grid-template-columns: 1fr; }
  .forecast-section-heading { display: grid; }
  .payroll-summary { justify-content: space-between; }
  .payroll-summary div { text-align: left; }
  .payroll-rule-row, .dividend-installment-preview { grid-template-columns: 1fr; gap: 10px; }
  .compact-number-field--money { justify-self: auto; }
  .data-section-card { min-height: 220px; }
  .data-integrity-note { gap: 14px; }
  .data-list-row { align-items: flex-start; gap: 15px; padding: 16px; }
  .transaction-filter-grid { grid-template-columns: 1fr; }
  .transaction-filter-search { grid-column: auto; }
  .transaction-filter-actions { align-items: stretch; flex-direction: column; }
  .transaction-filter-actions > span { margin-left: 0; text-align: center; }
  .transaction-payment-details dl { grid-template-columns: 1fr; }
  .transaction-payment-details__wide { grid-column: auto; }
  .table-tools .transaction-filter-grid { grid-template-columns: 1fr; }
  .table-tools .transaction-filter-actions { flex-direction: row; }
  .table-tools .transaction-filter-actions > span { margin-left: auto; text-align: right; }
  .asset-account-grid .account-card { grid-template-columns: minmax(0, 1fr) auto; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination > div { display: grid; grid-template-columns: repeat(2, 1fr); }
  .editor-panel { padding: 18px; }
  .asset-editor { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .asset-editor__shell { max-height: calc(100vh - 18px); }
  .asset-editor__header { padding: 18px 18px 14px; }
  .asset-editor__header h2 { font-size: 20px; }
  .asset-editor__tabs { padding: 8px 18px 0; }
  .asset-editor__tabs button { flex: 1; padding: 0 8px; }
  .asset-editor__panel { padding: 20px 18px 22px; }
  .tax-year-editor__panel { padding-top: 0; }
  .tax-dialog-tabs { margin: 0 -18px 22px; padding-inline: 18px; }
  .tax-dialog-tabs button { flex: 0 0 auto; padding-inline: 12px; }
  .asset-editor__grid { grid-template-columns: 1fr; }
  .asset-editor__actions { bottom: -22px; align-items: stretch; flex-direction: column; margin: 24px -18px -22px; padding: 14px 18px; }
  .asset-editor__actions .form-delete-action { margin-right: 0; }
  .asset-editor__inline-actions { justify-content: stretch; }
  .asset-editor__inline-actions > * { width: 100%; }
  .bank-source-summary { grid-template-columns: 1fr 1fr; }
  .valuation-editor summary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .section-tabs { display: flex; width: 100%; }
  .section-tabs a { flex: 1; justify-content: center; padding: 9px 10px; line-height: 1.25; text-align: center; }
  .share-summary-grid { grid-template-columns: 1fr; }
  .forecast-metrics, .tax-metrics { grid-template-columns: 1fr; }
  .tax-dialog-summary { grid-template-columns: 1fr 1fr; }
  .tax-dialog-summary div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .tax-dialog-summary div:nth-child(4) { border-top: 1px solid var(--line); }
  .tax-dialog-actions { align-items: stretch; flex-direction: column; }
  .tax-dialog-actions > * { width: 100%; }
  .year-picker { width: 100%; }
  .share-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .share-card-head { padding: 18px; }
  .share-fact-grid, .share-fact-grid--compact { grid-template-columns: 1fr; }
  .share-fact-grid > div { border-top: 1px solid var(--line); border-left: 0; }
  .share-fact-grid > div:first-child { border-top: 0; }
  .share-fact-grid--compact > div:nth-child(3), .share-fact-grid--compact > div:nth-child(4) { border-left: 0; }
  .share-sale-foot { align-items: flex-start; flex-direction: column; gap: 8px; }
  .investment-history-canvas, .investment-history-canvas svg { min-height: 410px; }
  .investment-history-canvas { overflow-x: auto; }
  .investment-history-canvas svg { min-width: 620px; }
  .sale-details summary, .calculation-details summary { align-items: flex-start; padding: 18px; }
  .sale-details summary > span:last-child, .calculation-details summary > span:last-child { display: none; }
  .sale-details-body, .calculation-details-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
