/* Finanzcockpit · Gestaltung
   Idee: Moebius-Marke als ruhige Bühne für Zahlen. Tiefes Marineblau für Navigation und die eine Kernzahl,
   helles Papier für alles andere, Blau-Violett nur für Bedienung. Farbe im Inhalt gehört den Daten und dem Status.
   Schrift Inter, lokal ausgeliefert. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --page: #f3f4f8; --surface: #ffffff; --surface-2: #f7f8fc; --ink: #0f1429; --ink-2: #5b627d; --ink-3: #a3a9c2; --line: #e6e8f0; --line-2: #cfd3e2;
  --navy: #0a0e27; --navy-2: #1a2151; --accent: #4a5fd9; --accent-ink: #ffffff; --soft: #eceffb; --focus: #4a5fd9;
  --good: #0aac23; --warn: #fbb315; --serious: #f18a59; --bad: #dc3c3d; --up: #0a7a1c; --down: #c2302f;
  --s1: #257de0; --s2: #f47230; --s3: #00b894; --s4: #f2a600; --s5: #ee7fac; --s6: #008a17; --s7: #6a4ce2; --s8: #ec4647;
  --pill: #ffffff; --seq: 74, 95, 217; --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --r: 10px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 20, 41, .04), 0 4px 16px rgba(15, 20, 41, .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --page: #070a1c; --surface: #111634; --surface-2: #161c40; --ink: #edf0fc; --ink-2: #9aa3c7; --ink-3: #5a628a; --line: #1e2550; --line-2: #2f3870;
    --accent: #7689f2; --accent-ink: #0a0e27; --soft: #1b2250; --focus: #8fa0ff; --up: #53c556; --down: #ff8a80;
    --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23; --s7: #9887ef; --s8: #eb6263; --pill: #2c3570; --seq: 118, 137, 242; --shadow: none; }
}
:root[data-theme="dark"] { color-scheme: dark; --page: #070a1c; --surface: #111634; --surface-2: #161c40; --ink: #edf0fc; --ink-2: #9aa3c7; --ink-3: #5a628a; --line: #1e2550; --line-2: #2f3870;
  --accent: #7689f2; --accent-ink: #0a0e27; --soft: #1b2250; --focus: #8fa0ff; --up: #53c556; --down: #ff8a80;
  --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23; --s7: #9887ef; --s8: #eb6263; --pill: #2c3570; --seq: 118, 137, 242; --shadow: none; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--font); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; } h1 { font-size: 24px; font-weight: 680; letter-spacing: -0.022em; line-height: 1.2; } h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.012em; text-wrap: balance; } h3 { font-size: 14px; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; } .muted { color: var(--ink-2); } .small { font-size: 13px; } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .pad { padding: 18px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; margin-top: 18px; } .grow { flex: 1; min-width: 0; } .stack { display: grid; gap: 16px; }
.stack, .chat, .msgs { grid-template-columns: minmax(0, 1fr); } .stack > *, .row > * { min-width: 0; } .row > .sel, .row > label > .sel { max-width: 100%; }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; text-align: left; }
.link:hover { text-decoration-color: currentColor; } a { color: inherit; } .up { color: var(--up); } .down { color: var(--down); }
.only-narrow { display: none !important; }

/* Rahmen */
#app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.nav { color: #e8ecfb; background: radial-gradient(ellipse at top left, rgba(74, 95, 217, .38), transparent 62%), radial-gradient(ellipse at bottom right, rgba(46, 58, 140, .5), transparent 70%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy) 100%);
  display: flex; flex-direction: column; padding: 20px 14px 16px; position: sticky; top: 0; height: 100vh; gap: 14px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.015em; padding: 2px 8px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; place-content: center; align-items: end; box-shadow: 0 4px 14px rgba(74, 95, 217, .45); }
.brand-mark i { background: #fff; border-radius: 1.5px; } .brand-mark i:nth-child(1) { height: 7px; } .brand-mark i:nth-child(2) { height: 14px; } .brand-mark i:nth-child(3) { height: 10px; }
.scope { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: inherit; cursor: pointer; min-width: 0; }
.scope:hover { background: rgba(255, 255, 255, .1); } .scope-t { flex: 1; min-width: 0; } .scope-t strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .scope-t span { font-size: 12px; opacity: .7; }
.avatar { --c: var(--ink-3); --ring: transparent; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; color: var(--ink);
  background: color-mix(in srgb, var(--c) 22%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 75%, var(--surface)), 0 0 0 2px var(--ring); }
.avatar.round { border-radius: 50%; } .avatar.lg { width: 38px; height: 38px; font-size: 13px; border-radius: 11px; }
.avatar.neutral { background: var(--soft); color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.avatars { display: flex; flex: none; } .avatars .avatar + .avatar { margin-left: -6px; --ring: var(--navy-2); }
.nav nav { display: grid; gap: 2px; } .nav-foot { margin-top: auto; display: grid; gap: 2px; }
.nav-b { display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; width: 100%; color: rgba(232, 236, 251, .72); font-weight: 550; }
.nav-b:hover { background: rgba(255, 255, 255, .07); color: #fff; } .nav-b.on { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 8px; min-width: 0; } .nav-user > div { min-width: 0; } .nav-user strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nav-user div span { font-size: 12px; color: rgba(232, 236, 251, .55); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: none; }
.filters { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); padding: 12px 28px; }
.filters .line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: 1344px; margin: 0 auto; } .filters .line > * { flex: none; }
.sel.picked { border-color: var(--accent); color: var(--accent); background-color: var(--soft); }
#view { padding: 24px 28px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; max-width: 1400px; width: 100%; margin: 0 auto; }
.view-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; } .view-h p { color: var(--ink-2); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .grid2.tight { gap: 0 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* Bedienelemente */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; min-height: 38px; font-size: 14px; }
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); } .btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px rgba(74, 95, 217, .28); } .btn.pri:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; padding: 7px; min-height: 36px; } .btn.ghost:hover { background: var(--soft); } .btn.danger { color: var(--down); } .btn:disabled { opacity: .5; cursor: default; }
.sel, .inp, textarea.inp { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 8px 12px; min-height: 38px; max-width: 100%; font-size: 14px; }
.sel:hover, .inp:hover { border-color: var(--ink-3); }
.sel { appearance: none; -webkit-appearance: none; padding-right: 32px; font-weight: 550; cursor: pointer; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; background-position: calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); } .inp { width: 100%; } textarea.inp { resize: vertical; min-height: 44px; }
.seg { display: inline-flex; border-radius: var(--r); background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 3px; gap: 2px; flex: 0 1 auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .filters .seg { flex: none; }
.seg-b { border: 0; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 600; min-height: 30px; white-space: nowrap; font-size: 13.5px; } .seg-b:hover { color: var(--ink); }
.seg-b.on { background: var(--pill); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 20, 41, .14); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 600; color: var(--ink-2); min-height: 34px; flex: none; font-size: 13.5px; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); } .chip.on { background: var(--soft); border-color: transparent; color: var(--accent); } .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.field { display: grid; gap: 5px; margin-bottom: 14px; } .field label { font-size: 13px; font-weight: 600; } .hint { font-size: 13px; color: var(--ink-2); }
.check { display: flex; gap: 9px; align-items: flex-start; } input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 0 5px; }

/* Karten, Kernzahl, Kacheln */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; box-shadow: var(--shadow); }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; flex-wrap: wrap; } .card-h > * { min-width: 0; max-width: 100%; } .card-h p { margin-top: 2px; } .card-h > div:first-child { flex: 1 1 200px; }
.card > .chart, .card > .bars, .card > .body { padding: 0 20px 20px; } .card > .tbl-wrap { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); } .card > .tbl-wrap:not(:last-child) { border-radius: 0; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; }
.hero { --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23; --s7: #9887ef; --s8: #eb6263; --soft: rgba(255, 255, 255, .1); --surface: #141a44; --ink: #ffffff; --ink-2: rgba(232, 236, 251, .72); --ink-3: rgba(232, 236, 251, .4); --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .28); --up: #7ee08a; --down: #ffa39b;
  color: #fff; border-radius: 20px; padding: 24px 24px 18px; min-width: 0; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at top left, rgba(74, 95, 217, .55), transparent 60%), radial-gradient(ellipse at bottom right, rgba(46, 58, 140, .6), transparent 70%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, var(--navy) 100%); box-shadow: 0 10px 34px rgba(10, 14, 39, .22); }
.hero-l { font-size: 14px; color: var(--ink-2); font-weight: 550; } .hero-v { font-size: 46px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; margin: 4px 0 8px; white-space: nowrap; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 36px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--ink-2); }
.hero-stats { display: flex; gap: 12px 30px; flex-wrap: wrap; } .hstat-l { font-size: 13px; color: var(--ink-2); font-weight: 550; } .hstat-v { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; } .hstat-d { font-size: 13px; font-weight: 600; min-height: 20px; color: var(--ink-2); } .hstat-d.up { color: var(--up); } .hstat-d.down { color: var(--down); }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-weight: 650; font-size: 13px; background: rgba(255, 255, 255, .12); } .delta.up { color: var(--up); } .delta.down { color: var(--down); }
.hero .tip { background: #0f1438; border-color: rgba(255, 255, 255, .2); } .hero .lg { color: rgba(255, 255, 255, .85); } .hero .lg:hover { background: rgba(255, 255, 255, .1); } .hero .chart-table { background: rgba(10, 14, 39, .5); border-color: rgba(255, 255, 255, .14); } .hero .tbl thead th { background: transparent; }
.tiles { display: grid; gap: 18px; align-content: stretch; grid-template-rows: repeat(3, 1fr); min-width: 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.tile-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.tile-l { font-size: 13px; color: var(--ink-2); font-weight: 550; display: flex; align-items: center; gap: 7px; } .tile-v { font-size: 26px; font-weight: 680; letter-spacing: -0.025em; white-space: nowrap; } .tile-d { font-size: 13px; color: var(--ink-2); }
.tile-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--soft); color: var(--accent); display: grid; place-items: center; }
.agebar { display: flex; gap: 2px; height: 8px; margin: 6px 0 6px; } .agebar i { display: block; height: 100%; border-radius: 4px; min-width: 3px; } .age-0 { background: var(--ink-3); } .age-1 { background: #f6c177; } .age-2 { background: #f18a59; } .age-3 { background: #e0603a; } .age-4 { background: #c93232; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.kpi { padding: 16px 20px; border-right: 1px solid var(--line); min-width: 0; } .kpi:last-child { border-right: 0; }
.kpi-l { font-size: 13px; color: var(--ink-2); font-weight: 550; } .kpi-v { font-size: 24px; font-weight: 680; letter-spacing: -0.025em; margin: 2px 0; white-space: nowrap; } .kpi-d { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lvl { display: inline-flex; } .lvl.good { color: var(--good); } .lvl.warn { color: #b77a00; } .lvl.bad { color: var(--bad); } .lvl.info, .lvl.none { color: var(--ink-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lvl.warn { color: var(--warn); } } :root[data-theme="dark"] .lvl.warn { color: var(--warn); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--soft); white-space: nowrap; color: var(--ink-2); }
.pill.open { background: color-mix(in srgb, var(--s1) 14%, transparent); color: var(--s1); } .pill.partial { background: color-mix(in srgb, var(--warn) 22%, transparent); color: #8a5a00; } .pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--down); } .pill.paid, .pill.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--up); } .pill.warn { background: color-mix(in srgb, var(--warn) 24%, transparent); color: #8a5a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.partial, :root:not([data-theme="light"]) .pill.warn { color: var(--warn); } } :root[data-theme="dark"] .pill.partial, :root[data-theme="dark"] .pill.warn { color: var(--warn); }

/* Lagebild */
.board { display: grid; } .b-row { display: grid; grid-template-columns: minmax(200px, 2.2fr) repeat(5, minmax(84px, 1fr)) 100px 20px; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.b-head { font-size: 12.5px; color: var(--ink-2); font-weight: 550; padding-top: 0; padding-bottom: 10px; border-top: 0; } .b-row.b-data { cursor: pointer; } .b-row.b-data:hover { background: var(--surface-2); } .b-row.b-data:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.b-name { display: flex; gap: 12px; align-items: center; min-width: 0; } .b-name > div { min-width: 0; } .b-name strong { display: block; overflow-wrap: anywhere; line-height: 1.3; margin-bottom: 2px; font-weight: 650; } .b-status { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; color: var(--ink-2); } .b-row .num { font-weight: 550; }
.b-why { grid-column: 1 / -1; display: grid; gap: 6px; padding: 4px 0 4px 50px; } .b-why div { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; } .b-lab { display: none; }
.notes { list-style: none; margin: 0; padding: 0 20px 18px; display: grid; gap: 12px; } .notes li { display: flex; gap: 11px; align-items: flex-start; }

/* Rangliste als Zeile mit Füllung */
.bars { list-style: none; margin: 0; display: grid; gap: 6px; } .bars li { display: flex; gap: 10px; align-items: center; } .bars li.off { opacity: .45; } .cb-gap { width: 17px; flex: none; }
.brow { flex: 1; min-width: 0; position: relative; border-radius: 9px; overflow: hidden; padding: 8px 12px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.brow-fill { position: absolute; inset: 0 auto 0 0; border-radius: 9px; opacity: .16; min-width: 4px; } .brow > :not(.brow-fill) { position: relative; } .brow-name { overflow-wrap: anywhere; min-width: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .brow-name .dot { align-self: center; }
.brow .num { font-weight: 600; }
.tbl-wrap { overflow-x: auto; } .tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; } .tbl th:first-child, .tbl td:first-child { padding-left: 20px; } .tbl th:last-child, .tbl td:last-child { padding-right: 20px; } .tbl th.num, .tbl td.num { text-align: right; }
.tbl thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; background: var(--surface-2); } .tbl tbody th { font-weight: 550; white-space: nowrap; }
.tbl tbody tr:last-child td, .tbl tbody tr:last-child th { border-bottom: 0; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); } .tbl tfoot td { font-weight: 680; border-top: 1px solid var(--line-2); border-bottom: 0; }
.tbl.stick tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); } .tbl.stick thead tr > :first-child { background: var(--surface-2); }
.th-b { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; } .tbl .wrap { white-space: normal; overflow-wrap: anywhere; min-width: 140px; max-width: 340px; } .tbl .nowrap { white-space: nowrap; }
.heat td.h { background: rgba(var(--seq), var(--a, 0)); } .heat td.click { cursor: pointer; } .heat td.click:hover { outline: 1px solid var(--ink-2); outline-offset: -1px; }
.bulk { position: sticky; bottom: 14px; z-index: 6; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(10, 14, 39, .35); } .bulk .sel, .bulk .btn { color: var(--ink); }
/* Belege als Liste auf dem Telefon */
.dlist { list-style: none; margin: 0; padding: 0; } .drow { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
button.drow:hover { background: var(--surface-2); } div.drow { cursor: default; } .dlist li:first-child .drow { border-top-color: var(--line); } .card > .dlist li:last-child .drow { border-radius: 0 0 var(--r-lg) var(--r-lg); } .drow-m { flex: 1; min-width: 0; } .drow-m strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .drow-m span { font-size: 12.5px; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow-r { text-align: right; flex: none; } .drow-r strong { display: block; font-variant-numeric: tabular-nums; font-weight: 650; } .drow-r .small { display: block; } .drow-r .pill { font-size: 11.5px; padding: 1px 7px; margin-top: 2px; }

.find { display: grid; gap: 10px; } .find-box { position: relative; max-width: 420px; } .find-box .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; } .find-box .inp { padding-left: 38px; }
.strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .strip > * { flex: none; }
.opt { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); } .opt:last-child { border-bottom: 0; padding-bottom: 0; } .opt .grow { flex: 1 1 220px; }

/* Diagramme */
.chart-area { position: relative; } .chart-plot { min-height: 60px; touch-action: pan-y; cursor: crosshair; } .chart-plot svg { display: block; max-width: 100%; height: auto; }
.grid { stroke: var(--line); stroke-width: 1; } .axis { stroke: var(--line-2); stroke-width: 1; } .tick { font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font); } .band { fill: var(--ink); opacity: .06; } .cross { stroke: var(--ink-2); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: 0 10px 30px rgba(10, 14, 39, .18); z-index: 3; max-width: 290px; display: grid; gap: 4px; }
.tip[hidden] { display: none; } .tip-t { font-weight: 650; margin-bottom: 2px; } .tip-r { display: flex; gap: 8px; align-items: center; white-space: nowrap; } .tip-r strong { font-variant-numeric: tabular-nums; } .tip-r span:last-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; } .tip-r.sum { border-top: 1px solid var(--line); padding-top: 4px; } .tip-h { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; } .key.line { height: 3px; width: 14px; border-radius: 2px; } .key.sm.box { width: 8px; height: 8px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 10px; align-items: center; } .lg { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink); max-width: 100%; text-align: left; font-weight: 500; }
.lg:hover { background: var(--soft); } .lg.off { color: var(--ink-3); text-decoration: line-through; } .lg.off .key { opacity: .3; } .lg.tbl-toggle { margin-left: auto; color: var(--ink-2); } .chart-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; max-height: 320px; overflow: auto; }
.spark { display: block; }

/* Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(7, 10, 28, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; } .overlay.side { place-items: stretch end; padding: 0; }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(7, 10, 28, .4); } .modal.wide { width: min(840px, 100%); }
.modal.side { width: min(580px, 100%); height: 100%; max-height: none; border-radius: 0; border-width: 0 0 0 1px; } .modal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); } .modal-b { padding: 20px; overflow: auto; }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(440px, calc(100% - 32px)); } .toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-weight: 550; } .toast.err { background: var(--bad); }
.banner { background: var(--soft); border-radius: 12px; padding: 11px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; } .banner .ic { color: var(--accent); margin-top: 2px; } .banner.warn { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); } .banner.warn .ic { color: #b77a00; }
.doc-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); } .doc-amt { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; white-space: nowrap; }
.boxed { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; } .dl dt { color: var(--ink-2); } .dl dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; overflow-wrap: anywhere; user-select: all; display: block; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; } .tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 7px 13px; cursor: pointer; color: var(--ink-2); font-weight: 600; border-radius: 9px; white-space: nowrap; font-size: 14px; } .tab:hover { color: var(--ink); } .tab.on { color: var(--ink); background: var(--pill); box-shadow: 0 1px 3px rgba(15, 20, 41, .14); }
.items { list-style: none; margin: 0; padding: 0; } .items > li { display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; } .items > li:first-child { border-top: 0; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; } .pick-h { font-size: 12.5px; color: var(--ink-2); font-weight: 600; padding: 12px 8px 4px; display: flex; justify-content: space-between; align-items: center; }
.pick-b { display: flex; gap: 12px; align-items: center; width: 100%; padding: 9px 8px; border-radius: 12px; border: 0; background: none; cursor: pointer; text-align: left; } .pick-b:hover { background: var(--surface-2); } .pick-b.on { background: var(--soft); } .pick-b .grow strong { display: block; font-weight: 600; } .pick-b .grow span { font-size: 12.5px; color: var(--ink-2); }
.tick-on { color: var(--accent); }

/* Anmeldung */
#app.auth, .auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: radial-gradient(ellipse at top left, rgba(74, 95, 217, .38), transparent 60%), radial-gradient(ellipse at bottom right, rgba(46, 58, 140, .5), transparent 70%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, var(--navy) 100%); }
.auth-box { background: var(--surface); border-radius: 22px; padding: 32px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); } .auth-box .brand { padding: 0 0 22px; } .auth-box h1 { margin-bottom: 6px; } .auth-box > p { margin-bottom: 20px; color: var(--ink-2); }
.err-box { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--down); padding: 10px 12px; border-radius: var(--r); margin-bottom: 14px; font-size: 14px; font-weight: 550; }

/* Claude */
.chat { display: flex; flex-direction: column; gap: 14px; min-height: 55vh; } .msgs { display: grid; gap: 14px; align-content: start; flex: 1; }
.msg { max-width: min(780px, 100%); padding: 12px 16px; border-radius: 16px; overflow-wrap: anywhere; } .msg.user { background: var(--accent); color: var(--accent-ink); justify-self: end; border-bottom-right-radius: 5px; white-space: pre-wrap; } .msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow); }
.msg.bot p { margin: 0 0 8px; } .msg.bot p:last-child { margin: 0; } .msg.bot ul, .msg.bot ol { margin: 0 0 8px; padding-left: 20px; } .msg.bot h3 { margin: 10px 0 4px; } .msg.bot code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; } .msg.bot .tbl-wrap { margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; }
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .idea { text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; font-weight: 550; } .idea:hover { border-color: var(--accent); }
.tool-note { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; } .composer { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 8px; box-shadow: 0 8px 28px rgba(10, 14, 39, .12); } .composer textarea { border: 0; background: none; flex: 1; resize: none; padding: 8px; min-height: 38px; max-height: 160px; outline: none; }

/* Mittlere und schmale Bildschirme */
@media (max-width: 1180px) { .b-head, .b-row .hide-s { display: none; } .b-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; } .b-name { grid-column: 1 / -1; } .b-lab { display: block; font-size: 12px; color: var(--ink-2); font-weight: 500; } .b-row .num { text-align: left; } .b-spark { align-self: end; justify-self: start; } .b-why { padding-left: 0; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); } .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; } .tile-row > span { display: none; } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(2) { border-right: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 860px) {
  body { font-size: 15px; } .only-wide { display: none !important; } .only-narrow { display: revert !important; } .only-narrow.dlist { display: block !important; }
  #app { display: block; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 20; gap: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.5) blur(16px); border-top: 1px solid var(--line); color: var(--ink); }
  .nav .brand, .nav .scope, .nav-foot, .nav-user { display: none; } .nav nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .nav-b { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 2px; align-items: center; text-align: center; color: var(--ink-2); font-weight: 600; } .nav-b:hover { background: none; color: var(--ink); } .nav-b.on { background: none; color: var(--accent); box-shadow: none; }
  .nav-b .ic { padding: 4px 14px; box-sizing: content-box; border-radius: 999px; } .nav-b.on .ic { background: var(--soft); }
  .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px 4px; } .top .scope { background: var(--surface); border-color: var(--line); color: var(--ink); padding: 7px 10px; box-shadow: var(--shadow); } .top .avatars .avatar + .avatar { --ring: var(--surface); } .top .scope { flex: 1; }
  .filters { padding: 10px 16px; } .filters .line, .strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -2px -16px; padding: 2px 16px; } .filters .line::-webkit-scrollbar, .strip::-webkit-scrollbar { display: none; } .find-box { max-width: none; }
  #view { padding: 14px 16px 32px; gap: 14px; } .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); gap: 14px; } h1 { font-size: 22px; }
  .hero { padding: 20px 18px 14px; border-radius: 18px; } .hero-v { font-size: 38px; } .hero-stats { gap: 10px 22px; } .hstat-v { font-size: 18px; } .tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; } .tile-row > span { display: block; } .tile { padding: 14px 16px; } .tile-v { font-size: 24px; }
  .card-h { padding: 16px 16px 10px; } .card > .chart, .card > .bars, .card > .body { padding: 0 16px 16px; } .tbl th:first-child, .tbl td:first-child { padding-left: 16px; } .tbl th:last-child, .tbl td:last-child { padding-right: 16px; } .items > li { padding: 14px 16px; } .notes { padding: 0 16px 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi { padding: 14px 16px; } .kpi-v { font-size: 20px; }
  .b-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 16px; }
  .modal { border-radius: 20px 20px 0 0; align-self: end; width: 100%; max-height: 88vh; } .overlay { padding: 0; place-items: end stretch; } .modal.side { width: 100%; border-radius: 0; height: 100%; max-height: none; } .overlay.side { place-items: stretch; }
  .items > li > .grow { flex: 1 1 calc(100% - 60px); } .items > li > .grow + * { margin-left: auto; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } .composer { bottom: calc(80px + env(safe-area-inset-bottom)); } .bulk { bottom: calc(84px + env(safe-area-inset-bottom)); } .hide-s { display: none; } .ideas { grid-template-columns: minmax(0, 1fr); }
  .btn, .sel, .inp { min-height: 42px; } .seg-b { min-height: 34px; } .auth-box { padding: 26px 22px; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .nav-b, .chip, .seg-b, .tab, .pick-b, .drow { transition: background-color .14s, border-color .14s, color .14s; } }
@media print { .nav, .filters, .top { display: none; } #app { display: block; } body { background: #fff; } .hero { color: #000; background: none; box-shadow: none; } }
