/* ==========================================================================
   Dashboard – INX InvestingExperts
   Farben: INX-Navy/Gold; Diagrammfarben mit dem Dataviz-Validator geprüft
   (hell gegen #ffffff, dunkel gegen #101d30).
   ========================================================================== */

:root {
  color-scheme: light;
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f5;
  --border: #e3e7ed;
  --border-strong: #cdd4dd;
  --ink: #13202e;
  --ink-2: #3d4b5a;
  --muted: #5b6773;
  --grid: #e9ecf1;
  --axis: #c9d0d9;

  --navy: #002f5d;
  --deep: #011a34;
  --gold: #c9a75a;
  --gold-ink: #8a6a1f;
  --gold-soft: #f7f0e1;
  --accent: #002f5d;
  --accent-hover: #0b3f75;
  --accent-ink: #ffffff;
  --link: #1b729a;
  --focus: #2a78d6;

  --pos: #127a3a;
  --pos-bg: #e6f4eb;
  --neg: #c2323b;
  --neg-bg: #fbe9ea;
  --warn: #8f5500;
  --warn-bg: #fdf0da;
  --info: #1d5fa8;
  --info-bg: #e8f1fb;

  --s-me: #2a78d6;
  --s-inx: #c08a1e;
  --d-megatrend: #0f988c;
  --d-smartmoney: #7059d6;
  --d-ipo: #d9467e;
  --d-diamonds: #0b7fae;
  --d-trading: #d0622c;
  --d-reserve: #a9b3bf;
  --bar: #2a78d6;
  --bar-track: #dbe7f6;

  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .05);
  --shadow-lg: 0 30px 80px rgba(1, 26, 52, .28);
  --scrim: rgba(1, 17, 34, .45);

  --sidebar-bg: linear-gradient(180deg, #002f5d 0%, #011a34 100%);
  --sidebar-ink: rgba(255, 255, 255, .74);
  --sidebar-ink-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, .07);
  --sidebar-active: rgba(255, 255, 255, .12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #081322;
    --surface: #101d30;
    --surface-2: #13233a;
    --surface-3: #192b44;
    --border: #22354f;
    --border-strong: #30486a;
    --ink: #e9eef5;
    --ink-2: #bac6d4;
    --muted: #8fa3b8;
    --grid: #1b2c44;
    --axis: #2f4665;
    --gold-ink: #d9b66a;
    --gold-soft: rgba(201, 167, 90, .14);
    --accent: #3987e5;
    --accent-hover: #4c95ec;
    --link: #6cb4e6;
    --focus: #6cb4e6;
    --pos: #3ecf72;
    --pos-bg: rgba(62, 207, 114, .13);
    --neg: #ff7a7a;
    --neg-bg: rgba(255, 122, 122, .13);
    --warn: #f0b44c;
    --warn-bg: rgba(240, 180, 76, .14);
    --info: #7db7f5;
    --info-bg: rgba(57, 135, 229, .16);
    --s-me: #3987e5;
    --s-inx: #bf8a2a;
    --d-megatrend: #169c8f;
    --d-smartmoney: #8474e6;
    --d-ipo: #e0588c;
    --d-diamonds: #2a95c9;
    --d-trading: #e8834f;
    --d-reserve: #4d607a;
    --bar: #3987e5;
    --bar-track: #1c3353;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
    --scrim: rgba(0, 6, 14, .62);
    --sidebar-bg: linear-gradient(180deg, #0b1b31 0%, #060f1c 100%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081322;
  --surface: #101d30;
  --surface-2: #13233a;
  --surface-3: #192b44;
  --border: #22354f;
  --border-strong: #30486a;
  --ink: #e9eef5;
  --ink-2: #bac6d4;
  --muted: #8fa3b8;
  --grid: #1b2c44;
  --axis: #2f4665;
  --gold-ink: #d9b66a;
  --gold-soft: rgba(201, 167, 90, .14);
  --accent: #3987e5;
  --accent-hover: #4c95ec;
  --link: #6cb4e6;
  --focus: #6cb4e6;
  --pos: #3ecf72;
  --pos-bg: rgba(62, 207, 114, .13);
  --neg: #ff7a7a;
  --neg-bg: rgba(255, 122, 122, .13);
  --warn: #f0b44c;
  --warn-bg: rgba(240, 180, 76, .14);
  --info: #7db7f5;
  --info-bg: rgba(57, 135, 229, .16);
  --s-me: #3987e5;
  --s-inx: #bf8a2a;
  --d-megatrend: #169c8f;
  --d-smartmoney: #8474e6;
  --d-ipo: #e0588c;
  --d-diamonds: #2a95c9;
  --d-trading: #e8834f;
  --d-reserve: #4d607a;
  --bar: #3987e5;
  --bar-track: #1c3353;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  --scrim: rgba(0, 6, 14, .62);
  --sidebar-bg: linear-gradient(180deg, #0b1b31 0%, #060f1c 100%);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num, .tab { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
.gold { color: var(--gold-ink); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- App-Rahmen ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  padding: 22px 14px 18px;
  overflow-y: auto;
}
.brand { padding: 4px 10px 22px; border-bottom: 1px solid rgba(255, 255, 255, .09); margin-bottom: 14px; }
.brand-logo { display: block; width: 168px; height: auto; filter: brightness(0) invert(1); opacity: .96; }
.brand-product { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.brand-product b { color: var(--sidebar-ink-strong); font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.brand-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #1d1400; background: var(--gold); border-radius: 5px; padding: 2px 6px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--sidebar-ink); font-weight: 500; font-size: 15px;
  text-decoration: none; position: relative;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-ink-strong); }
.nav a[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-ink-strong); }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--gold);
}
.nav .badge-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: #1d1400; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-section { margin: 20px 12px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.member-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: #1d1400; background: linear-gradient(135deg, #e3c98c, #c9a75a);
}
.member-card b { display: block; color: #fff; font-size: 14px; font-weight: 600; }
.member-card span { font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.sidebar-links { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.sidebar-links button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; color: var(--sidebar-ink); padding: 8px 12px; border-radius: 9px; font-size: 14px; text-align: left;
}
.sidebar-links button:hover { background: var(--sidebar-hover); color: #fff; }

.main { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; margin-left: 248px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { min-width: 0; flex: 1 1 260px; }
.topbar-title h1 { font-family: var(--font-serif); font-weight: 600; font-size: 26px; color: var(--ink); letter-spacing: -.005em; }
.topbar-title p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mobile-brand { display: none; }
.view { padding: 28px 32px 40px; width: 100%; max-width: 1440px; outline: none; }
.footer {
  margin-top: auto; padding: 18px 32px 28px; color: var(--muted); font-size: 13px;
  display: flex; gap: 8px 18px; flex-wrap: wrap; border-top: 1px solid var(--border);
}
.demo-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--gold-ink); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Bedienelemente ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14.5px; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1d1400; }
.btn-gold:hover { background: #d5b672; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--neg); }
.btn-danger:hover { background: var(--neg-bg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; gap: 6px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px;
  background: var(--surface-3); border: 1px solid var(--border);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.seg .dot { width: 8px; height: 8px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-megatrend { background: var(--d-megatrend); }
.dot-smartmoney { background: var(--d-smartmoney); }
.dot-ipo { background: var(--d-ipo); }
.dot-diamonds { background: var(--d-diamonds); }
.dot-reserve, .dot-mc_reserve, .dot-di_reserve, .dot-tr_reserve { background: var(--d-reserve); }
.dot-trading { background: var(--d-trading); }
.dot-me { background: var(--s-me); }
.dot-inx { background: var(--s-inx); }

/* ---------- Karten & Raster ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 22px 0;
}
.card-head h2 { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.card-head .card-tools { display: flex; gap: 6px; flex: none; align-items: center; }
.card-body { padding: 16px 22px 20px; }
.card-foot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-link { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.card-inx { border-top: 3px solid var(--gold); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-value { font-size: 52px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; margin-top: 8px; color: var(--ink); }
.hero-delta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 15px; }
.hero-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.hero-split div span { display: block; font-size: 13px; color: var(--muted); }
.hero-split div b { font-size: 18px; font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13.5px;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.chip-pos { background: var(--pos-bg); color: var(--pos); }
.chip-neg { background: var(--neg-bg); color: var(--neg); }
.chip-neutral { background: var(--surface-3); color: var(--ink-2); }
.chip-gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }

/* KPI-Kacheln */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.kpi-value { font-size: 25px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.2; }
.kpi-value.pos { color: var(--pos); }
.kpi-value.neg { color: var(--neg); }
.kpi-sub { font-size: 13.5px; color: var(--muted); }
.kpi .meter { margin-top: 8px; }

.info-tip {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--border-strong); color: var(--muted); font-size: 10.5px; font-weight: 700;
  cursor: help; background: none; padding: 0; line-height: 1;
}

/* Meter */
.meter { height: 8px; border-radius: 99px; background: var(--bar-track); overflow: hidden; position: relative; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--bar); }
.meter.megatrend { background: color-mix(in srgb, var(--d-megatrend) 18%, transparent); }
.meter.megatrend > i { background: var(--d-megatrend); }
.meter.smartmoney { background: color-mix(in srgb, var(--d-smartmoney) 18%, transparent); }
.meter.smartmoney > i { background: var(--d-smartmoney); }
.meter.ipo { background: color-mix(in srgb, var(--d-ipo) 18%, transparent); }
.meter.ipo > i { background: var(--d-ipo); }
.meter.diamonds { background: color-mix(in srgb, var(--d-diamonds) 18%, transparent); }
.meter.diamonds > i { background: var(--d-diamonds); }
.meter.reserve { background: color-mix(in srgb, var(--d-reserve) 30%, transparent); }
.meter.reserve > i, .meter.mc_reserve > i, .meter.di_reserve > i, .meter.tr_reserve > i { background: var(--d-reserve); }
.meter.mc_reserve, .meter.di_reserve, .meter.tr_reserve { background: color-mix(in srgb, var(--d-reserve) 30%, transparent); }
.meter.trading { background: color-mix(in srgb, var(--d-trading) 18%, transparent); }
.meter.trading > i { background: var(--d-trading); }

/* Depot-Zeilen (Aufteilung) */
.alloc-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.alloc-row:first-of-type { border-top: 0; }
.alloc-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.alloc-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.alloc-val { text-align: right; font-size: 14px; white-space: nowrap; }
.alloc-val b { font-weight: 600; }

/* Tabellen */
/* position: relative, damit absolut gesetzte Elemente in der Tabelle (verborgene Spaltentitel .sr-only) am Rahmen hängen und
   mit ihm abgeschnitten werden. Ohne das ragte „Aktionen“ im Tagebuch über den Rahmen hinaus und machte die ganze Seite
   breiter als das Fenster: 20 px bei 1280 px, 104 px bei 1024 px Breite (Befund 25.11.2026) */
.table-wrap { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted);
  padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data th:first-child, table.data td:first-child { padding-left: 22px; }
table.data th:last-child, table.data td:last-child { padding-right: 22px; }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .c { text-align: center; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover td { background: var(--surface-2); }
table.data tfoot td { font-weight: 600; border-top: 1px solid var(--border-strong); border-bottom: 0; background: var(--surface-2); }
.title-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title-cell .logo {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  color: #fff;
}
.logo.megatrend { background: var(--d-megatrend); }
.logo.smartmoney { background: var(--d-smartmoney); }
.logo.ipo { background: var(--d-ipo); }
.logo.diamonds { background: var(--d-diamonds); }
.logo.mc_reserve, .logo.di_reserve, .logo.tr_reserve { background: var(--d-reserve); color: var(--ink); }
.logo.trading { background: var(--d-trading); }
.title-cell > div { min-width: 0; max-width: 230px; }
.title-cell b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-cell small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.row-sub { display: block; font-size: 12.5px; color: var(--muted); }

/* Tranchen-Chips */
.tranches { display: inline-flex; gap: 4px; }
.tr-chip {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px;
  border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid var(--border-strong); color: var(--muted); background: transparent;
}
.tr-chip.done { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .tr-chip.done { background: #2d5d93; border-color: #2d5d93; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tr-chip.done { background: #2d5d93; border-color: #2d5d93; } }
.tr-chip.t4 { border-style: dashed; }
.tr-chip.t4.done { background: var(--gold); border-color: var(--gold); color: #1d1400; border-style: solid; }
.tr-chip.miss { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
/* Kennung des Tranchen-Schemas vor den Tranchen (S, M, D), seit 22.11.2026 */
.schema-kz {
  display: inline-grid; place-items: center; width: 18px; height: 22px; margin-right: 2px; flex: none;
  border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--ink-2);
}
.schema-kz.schema-m { background: var(--gold-soft); color: var(--gold-ink); }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-offen { color: var(--info); }
.status-geschlossen { color: var(--muted); }

/* Listen / Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.feed li:first-child { border-top: 0; padding-top: 4px; }
.feed-date { text-align: center; line-height: 1.15; }
.feed-date b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
.feed-date span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.feed-main { min-width: 0; }
.feed-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.feed-text { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.feed-meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.tag-kauf { background: var(--info-bg); color: var(--info); }
.tag-verkauf { background: var(--surface-3); color: var(--ink-2); }
.tag-neu { background: var(--gold-soft); color: var(--gold-ink); }
.tag-stop { background: var(--warn-bg); color: var(--warn); }

/* Abgleich */
.sync-list { list-style: none; margin: 0; padding: 0; }
.sync-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.sync-list li:first-child { border-top: 0; padding-top: 2px; }
.sync-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.sync-ico.warn { background: var(--warn-bg); color: var(--warn); }
.sync-ico.info { background: var(--info-bg); color: var(--info); }
.sync-ico.ok { background: var(--pos-bg); color: var(--pos); }
.sync-main { flex: 1; min-width: 0; }
.sync-main b { font-weight: 600; }
.sync-main p { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.sync-main .btn { margin-top: 8px; }
.sync-ok { display: flex; align-items: center; gap: 10px; color: var(--pos); font-weight: 600; padding: 6px 0; }

/* Leerzustand */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: var(--border-strong); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.empty .empty-text { margin: 0; }
.empty-aktion { margin-top: 14px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.empty-aktion > * { margin-top: 0 !important; }
.empty-aktion .btn { margin-top: 0; }

/* Werkzeugleiste */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar .sortierung .input { height: 38px; width: auto; min-width: 170px; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; width: 240px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field[hidden], .calc-box[hidden] { display: none; }
.field > label, .field > .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--neg); font-weight: 600; }
.input, select.input, textarea.input {
  height: 40px; padding: 0 12px; border-radius: 9px; width: 100%;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-size: 15px;
}
textarea.input { height: auto; min-height: 72px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 0; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--neg); }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 40px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.calc-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.calc-box span { display: block; font-size: 12.5px; color: var(--muted); }
.calc-box b { font-size: 17px; font-weight: 600; }
.radio-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.radio-cards label {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--surface);
}
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.radio-cards b { font-size: 14.5px; }
.radio-cards small { font-size: 12.5px; color: var(--muted); }
.radio-cards label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.radio-cards label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.radio-cards label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.note {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 11px 13px;
  border-radius: 10px; background: var(--info-bg); color: var(--ink-2);
}
.note .icon { color: var(--info); margin-top: 1px; }
.note.warn { background: var(--warn-bg); }
.note.warn .icon { color: var(--warn); }
.note.gold { background: var(--gold-soft); }
.note.gold .icon { color: var(--gold-ink); }

/* Modal / Seitenpanel */
.scrim {
  position: fixed; inset: 0; z-index: 80; background: var(--scrim);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .15s ease-out;
}
.scrim.drawer-mode { justify-content: flex-end; padding: 0; align-items: stretch; }
.modal {
  width: min(640px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); animation: pop .18s ease-out;
}
.modal.wide { width: min(880px, 100%); }
.drawer {
  width: min(720px, 100%); height: 100%; overflow: auto; background: var(--surface);
  box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); animation: slide .2s ease-out;
}
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 19px; font-weight: 600; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; background: var(--surface); border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }

/* Positionsdetail */
.detail-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.detail-kpis div { background: var(--surface); padding: 12px 14px; }
.detail-kpis span { display: block; font-size: 12.5px; color: var(--muted); }
.detail-kpis b { font-size: 17px; font-weight: 600; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* Toast */
#toast-root { position: fixed; z-index: 120; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px;
  background: var(--deep); color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; font-size: 14.5px;
  animation: pop .2s ease-out; pointer-events: auto;
}
.toast .icon { color: #7fdca2; }

/* Menü */
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.menu.open .menu-list { display: block; }
.menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  border: 0; background: none; border-radius: 8px; text-align: left; font-size: 14.5px; color: var(--ink);
}
.menu-list button:hover { background: var(--surface-3); }
.menu-list hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---------- Diagramme ---------- */
.viz { position: relative; width: 100%; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz text { font-family: var(--font); fill: var(--muted); font-size: 12px; }
.viz .axis-label { font-variant-numeric: tabular-nums; }
.viz .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz .base-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz .zero-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz .crosshair { stroke: var(--ink-2); stroke-width: 1; opacity: .55; }
.viz .end-label { font-weight: 600; font-size: 12.5px; fill: var(--ink); }
.viz .val-label { fill: var(--ink-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.viz .cat-label { fill: var(--ink-2); font-size: 13px; }
.viz .hit { fill: transparent; cursor: default; }
.viz .mark-hover { opacity: .82; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend .key-line { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.viz-legend .key-box { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.viz-legend .key-track { width: 16px; height: 9px; border-radius: 3px; display: inline-block; }
.viz-tip {
  position: fixed; z-index: 150; pointer-events: none; min-width: 150px; max-width: 280px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 13px; line-height: 1.35;
  opacity: 0; transition: opacity .08s;
}
.viz-tip.show { opacity: 1; }
.viz-tip .tip-title { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.viz-tip .tip-row { display: grid; grid-template-columns: 14px 1fr; gap: 2px 8px; align-items: center; margin-top: 4px; }
.viz-tip .tip-row i { width: 12px; height: 3px; border-radius: 2px; display: block; }
.viz-tip .tip-row b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-tip .tip-row span { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.viz-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.viz-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.viz-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.viz-table td + td, .viz-table th + th { text-align: right; }
.viz-table-wrap { max-height: 360px; overflow: auto; }
.spark { display: block; }

/* Kopfbereich Musterportfolio */
.inx-banner {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 24px 26px;
  background: linear-gradient(120deg, #002f5d 0%, #011a34 70%); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 24px; align-items: center;
  border: 1px solid rgba(255, 255, 255, .06);
}
.inx-banner::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  border: 2px solid rgba(201, 167, 90, .35); pointer-events: none;
}
.inx-banner h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.inx-banner p { color: rgba(255, 255, 255, .72); font-size: 14.5px; margin-top: 6px; }
.inx-banner .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.inx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 1; }
.inx-stats div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 14px; }
.inx-stats span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .66); }
.inx-stats b { font-size: 21px; font-weight: 600; color: #fff; }
.inx-stats .up { color: #7fdca2; }
.inx-stats .down { color: #ff9b9b; }

/* Planung */
.alloc-inputs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.alloc-inputs .field label { display: flex; align-items: center; gap: 7px; }
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface); }
.stackbar i { display: block; height: 100%; }
.stackbar i:first-child { border-radius: 99px 0 0 99px; }
.stackbar i:last-child { border-radius: 0 99px 99px 0; }
.sum-ok { color: var(--pos); font-weight: 600; }
.sum-bad { color: var(--neg); font-weight: 600; }
.schema-table input { width: 84px; }
.kbd { font-size: 12px; border: 1px solid var(--border-strong); border-bottom-width: 2px; padding: 0 5px; border-radius: 5px; color: var(--muted); }

/* Mobile Navigation */
.tabbar { display: none; }
.fab { display: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-lg-12 { grid-column: span 12; }
  .span-lg-6 { grid-column: span 6; }
  .inx-banner { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .sidebar { width: 76px; padding: 18px 10px; }
  .main { margin-left: 76px; }
  .brand-logo, .brand-product, .nav-section, .member-card div, .sidebar-links span { display: none; }
  .brand { padding: 0 0 12px; display: grid; place-items: center; }
  .brand::before { content: "INX"; font-family: var(--font-serif); font-weight: 600; color: #fff; font-size: 18px; letter-spacing: .06em; }
  .nav a { justify-content: center; padding: 12px 0; }
  .nav a .label { display: none; }
  .nav .badge-count { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .nav a[aria-current="page"]::before { left: -10px; }
  .member-card { justify-content: center; padding: 8px 0; }
  .sidebar-links button { justify-content: center; }
  .span-md-12 { grid-column: span 12; }
  .span-md-6 { grid-column: span 6; }
}
@media (max-width: 860px) {
  body { font-size: 15px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar-title h1 { font-size: 22px; }
  .topbar-title p { font-size: 13px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; width: 100%; }
  .mobile-brand img { height: 22px; width: auto; }
  :root[data-theme="dark"] .mobile-brand img { filter: brightness(0) invert(1); }
  .topbar-actions { width: 100%; }
  .topbar-actions .seg { flex: 1 1 100%; }
  .topbar-actions .btn-trade { display: none; }
  .view { padding: 18px 16px 28px; }
  .footer { padding: 16px 16px 24px; }
  .grid { gap: 14px; }
  .grid > [class*="span-"] { grid-column: span 12; }
  .kpis { gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-value { font-size: 21px; }
  .hero-value { font-size: 40px; }
  .hero-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-pad { padding: 16px; }
  .card-foot { padding: 12px 16px; }
  .alloc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .alloc-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .inx-banner { padding: 20px 18px; }
  .inx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alloc-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .radio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .scrim { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .drawer { width: 100%; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }

  /* Tabellen werden zu Karten */
  table.data.cards thead { display: none; }
  table.data.cards, table.data.cards tbody, table.data.cards tfoot { display: block; }
  table.data.cards tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
  }
  table.data.cards td { display: block; padding: 0 !important; border: 0; text-align: left !important; min-width: 0; }
  table.data.cards td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 1px; }
  table.data.cards td.cell-main { grid-column: 1 / -1; }
  table.data.cards td.cell-wide { grid-column: 1 / -1; }
  table.data.cards td.cell-hide { display: none; }
  /* Karten-Ansicht: das Schema steht im Feldnamen („Tranchen · Momentum“), vor den Tranchen ist kein Platz */
  table.data.cards .schema-kz { display: none; }
  table.data.cards tfoot tr { background: var(--surface-2); }
  .title-cell b { white-space: normal; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 10px;
    color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; position: relative;
  }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] .icon { color: var(--accent); }
  .tabbar .badge-count {
    position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    background: var(--gold); color: #1d1400; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  }
  .fab {
    display: inline-flex; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 61;
    height: 52px; padding: 0 18px; border-radius: 26px; box-shadow: var(--shadow-lg);
  }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-value { font-size: 36px; }
  .inx-stats b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar-actions, .tabbar, .fab, .card-tools { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- Ergänzungen für Ansichten ---------- */
.linklike { border: 0; background: none; padding: 0; color: var(--ink); font-weight: 600; text-align: left; cursor: pointer; }
.linklike:hover { color: var(--link); text-decoration: underline; }
.linklike[disabled] { cursor: default; color: var(--ink); text-decoration: none; }
.card-head h2 .dot { vertical-align: 1px; margin-right: 4px; }
.card-head h2 .icon { vertical-align: -2px; }

.viz-card .viz-table-area { display: none; }
.viz-card.zeige-tabelle .viz-table-area { display: block; }
.viz-card.zeige-tabelle .viz-chart-area { display: none; }

.hero-compare {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px;
  border-radius: 10px; background: var(--gold-soft); font-size: 14px; color: var(--ink-2);
}
.hero-compare b { color: var(--ink); }

/* Balkenlisten */
.hbar-list { display: flex; flex-direction: column; }
.hbar-row {
  display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) minmax(92px, auto); gap: 14px;
  align-items: center; padding: 7px 6px; border-radius: 8px; outline-offset: 0;
}
.hbar-row:hover { background: var(--surface-2); }
.hbar-label { min-width: 0; }
.hbar-label b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-label small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { position: relative; height: 14px; }
.hbar-track > i { position: absolute; top: 1px; bottom: 1px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-track > i.up { background: var(--pos); border-radius: 0 4px 4px 0; }
.hbar-track > i.down { background: var(--neg); border-radius: 4px 0 0 4px; }
.hbar-zero { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--axis); }
.hbar-track.bullet > em { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--bar-track); }
.hbar-track.bullet > i { top: 3px; bottom: 3px; left: 0; }
.hbar-val { text-align: right; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.hbar-val .muted { font-weight: 400; }
.hbar-list.divergierend .hbar-row { grid-template-columns: minmax(110px, 28%) minmax(0, 1fr) minmax(128px, auto); }

/* gestapelte Aufteilung */
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.stack-legend span { display: inline-flex; align-items: center; gap: 7px; }
.stack-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.stack-legend b { font-weight: 600; color: var(--ink); }
.stackbar i:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

table.data tr.aktiv td { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
table.data tr.aktiv td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.daten-aktionen { display: flex; flex-wrap: wrap; gap: 10px; }
.sektor-block .section-title { font-size: 14px; }
.edit-table td { padding: 8px 6px; }
.edit-table .input { height: 36px; font-size: 14px; }
.edit-table .input-suffix .input { padding-right: 30px; }
.edit-table .input-suffix span { right: 9px; }
.schema-table td .input-suffix { width: 92px; margin-left: auto; }
.schema-table td .input { height: 36px; }
.schema-table th:first-child, .schema-table td:first-child { padding-left: 0; }
.schema-table th:last-child, .schema-table td:last-child { padding-right: 0; }

@media (max-width: 860px) {
  .cell-hide-m { display: none; }
  .hbar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .hbar-list.divergierend .hbar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar-track { grid-column: 1 / -1; grid-row: 2; }
  .hbar-label { grid-row: 1; }
  .hbar-val { grid-row: 1; }
  .edit-table thead { display: none; }
  .edit-table, .edit-table tbody { display: block; }
  .edit-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .edit-table td { padding: 0; border: 0; }
}

/* Hero: Aufschlüsselung */
.hero { display: flex; flex-direction: column; }
.hero-list { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.hero-list-title { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.hero-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; padding: 5px 0; border-top: 1px solid var(--border); }
.hero-row:first-of-type { border-top: 0; }
.hero-row b { font-weight: 600; text-align: right; min-width: 64px; }
.hero-row em { font-style: normal; text-align: right; min-width: 76px; color: var(--muted); }
.hero-row span.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .hero-compare { margin-top: auto; }
.hero .hero-split, .hero .hero-list { margin-bottom: 16px; }
.hero-spacer { flex: 1; min-height: 12px; }
.hero-compare { justify-content: space-between; }

/* Schemas als Raster */
.schema-grid { display: grid; grid-template-columns: minmax(78px, auto) repeat(3, minmax(0, 1fr)) minmax(52px, auto); gap: 8px 10px; align-items: center; }
.schema-grid .sg-head { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.schema-grid .sg-head.r, .schema-grid .sg-sum { text-align: right; }
.schema-grid .input { height: 38px; padding: 0 26px 0 10px; }
.schema-grid .input-suffix span { right: 9px; }
.schema-grid b { font-weight: 600; }

/* Feed einklappen */
.feed-mehr { margin-top: 8px; width: 100%; }

/* Mobil: kompakte Kopfzeile, Karten in drei Spalten */
.mb-actions { margin-left: auto; display: flex; gap: 6px; }
@media (max-width: 860px) {
  .topbar { position: static; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; padding-bottom: 4px; }
  .topbar .desk-only { display: none; }
  .topbar-actions .seg { width: 100%; }
  .mobile-brand .demo-pill { font-size: 12px; }
  table.data.cards tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  table.data.cards td > div { justify-content: flex-start !important; }
  table.data.cards tr.aktiv td:first-child { box-shadow: none; }
  table.data.cards tr.aktiv { box-shadow: inset 3px 0 0 var(--gold); }
  .inx-banner::after { display: none; }
  .hero-split { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-split div b { font-size: 16px; }
  .fab { height: 48px; padding: 0 16px; }
}
@media (max-width: 359px) {
  table.data.cards tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* dichte Tabelle (Musterportfolio neben dem Änderungsprotokoll) */
table.data.dense th, table.data.dense td { padding-left: 6px; padding-right: 6px; }
table.data.dense .title-cell > div { max-width: 150px; }
table.data.dense th:first-child, table.data.dense td:first-child { padding-left: 20px; }
table.data.dense th:last-child, table.data.dense td:last-child { padding-right: 14px; }
table.data.dense .title-cell { gap: 10px; }
table.data.dense .title-cell .logo { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }

.hinweis-liste { margin: 6px 0 0; padding-left: 18px; }
.hinweis-liste li { margin: 3px 0; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mobile-brand img { filter: brightness(0) invert(1); } }
:root[data-theme="dark"] .mobile-brand img { filter: brightness(0) invert(1); }

.viz .ref-label { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- Rundgang ---------- */
.tour { display: none; }
.tour.an { display: block; }
.tour-sperre { position: fixed; inset: 0; z-index: 200; background: transparent; }
.tour.zentriert .tour-sperre { background: var(--scrim); animation: fade .2s ease-out; }
.tour-spot {
  position: fixed; z-index: 201; display: none; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 9999px var(--tour-dim);
  transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
}
:root { --tour-dim: rgba(1, 17, 34, .58); }
:root[data-theme="dark"] { --tour-dim: rgba(0, 5, 12, .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tour-dim: rgba(0, 5, 12, .7); } }
.tour-karte {
  position: fixed; z-index: 202; width: 360px; max-width: calc(100vw - 24px);
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 18px 20px 16px; outline: none;
  transition: left .28s ease, top .28s ease, opacity .15s ease;
}
.tour-karte.wechsel { opacity: 0; }
.tour.zentriert .tour-karte { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 540px; padding: 26px 28px 22px; transition: opacity .15s ease; }
.tour-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.tour-karte h3 { font-family: var(--font-serif); font-size: 21px; font-weight: 600; margin: 6px 0 8px; color: var(--ink); }
.tour.zentriert .tour-karte h3 { font-size: 25px; }
.tour-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.tour-kopf { display: flex; justify-content: space-between; align-items: center; margin: -6px -10px 0 0; }
.tour-schritt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.tour-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tour.zentriert .tour-fuss { justify-content: flex-end; margin-top: 22px; }
.tour-knoepfe { display: flex; gap: 6px; margin-left: auto; }
.tour-punkte { display: flex; gap: 5px; align-items: center; }
.tour-punkte i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.tour-punkte i.an { background: var(--gold); width: 16px; border-radius: 3px; }
.tour-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.tour-kacheln div { border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; background: var(--surface-2); }
.tour-kacheln .icon { color: var(--gold-ink); width: 22px; height: 22px; }
.tour-kacheln b { display: block; font-size: 14px; font-weight: 600; margin-top: 8px; color: var(--ink); }
.tour-kacheln span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
@media (max-width: 860px) {
  .tour-karte { width: calc(100vw - 24px); padding: 16px 16px 14px; }
  .tour.zentriert .tour-karte { width: calc(100vw - 24px); padding: 22px 18px 18px; }
  .tour-kacheln { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tour-kacheln div { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 10px 12px; }
  .tour-kacheln b { margin-top: 1px; }
  .tour-kacheln span { grid-column: 2; }
}

/* Währung in der Planung */
.waehrung-zeile { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.fx-feld { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; }
.fx-feld .input-suffix { width: 110px; }
.fx-anzeige { height: 40px; display: flex; align-items: center; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; }

/* ---------- Echte INX-Portfolios (02.10.2026): Gruppen je Depot, Warteliste, kleine Chips ---------- */
.chip-xs { padding: 0 6px; font-size: 11.5px; line-height: 18px; gap: 4px; vertical-align: 1px; }
table.data tr.gruppe td { background: var(--surface-2); font-size: 13px; padding-top: 9px; padding-bottom: 9px; border-top: 1px solid var(--line); }
table.data tr.gruppe td b { font-weight: 650; }
table.data tr.gruppe:first-child td { border-top: 0; }
table.data td.hinweis-zelle { max-width: 260px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 1180px) {
  .alloc-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  table.data.cards tr.gruppe { display: block; padding: 0 12px; border: 0; background: none; box-shadow: none; }
  table.data.cards tr.gruppe td { display: block; border-radius: 10px; margin: 6px 0 2px; }
  table.data.cards tr.gruppe td::before { content: none; }
  table.data td.hinweis-zelle { max-width: none; }
}

/* ---------- Zwei Portfolios (06.10.2026): Portfolio- und Bereichswahl, Reserve, Reihenfolge ---------- */
:root { --d-mc_reserve: var(--d-reserve); --d-di_reserve: var(--d-reserve); --d-tr_reserve: var(--d-reserve); }
.scopebar { flex: 1 1 100%; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.seg-programm button { font-size: 14.5px; padding: 6px 16px; position: relative; }
.seg-programm button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
/* Portfolios heißen wie ihr Produkt (seit 25.11.2026): am Handy der Kurzname, damit alle in eine Zeile passen */
.seg-programm .pn-kurz { display: none; }
.neu-punkt { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.alloc-inputs.alloc-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.alloc-inputs.alloc-2 { grid-template-columns: repeat(2, minmax(0, 220px)); }
.meter-gestapelt { display: flex; }
.meter-gestapelt > i { border-radius: 0; }
.meter-gestapelt > i:first-child { border-radius: 999px 0 0 999px; }
.meter-gestapelt > i.notfall { background: var(--warn, #c77700) !important; }
table.data td.cell-sort { width: 1%; white-space: nowrap; padding-right: 0; cursor: default; }
.sortier-griff { display: inline-flex; vertical-align: middle; color: var(--muted); cursor: grab; padding: 4px 2px; }
.sortier-griff .icon { width: 16px; height: 16px; }
.sortier-knoepfe { display: inline-flex; gap: 0; vertical-align: middle; }
.btn.btn-xs { height: 24px; width: 24px; min-width: 24px; padding: 0; border-radius: 6px; }
.btn.btn-xs .icon { width: 14px; height: 14px; }
.btn.btn-xs[disabled] { opacity: .25; }
tr.wird-gezogen td { opacity: .45; background: var(--surface-2); }
@media (max-width: 1180px) {
  .alloc-inputs.alloc-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .topbar-actions { display: none; }
  .scopebar { gap: 8px; }
  .scopebar .seg { width: 100%; }
  .seg-programm { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .seg-programm button { justify-content: center; padding-left: 6px; padding-right: 6px; }
  .seg-programm .pn-lang { display: none; }
  .seg-programm .pn-kurz { display: inline; }
  .sortier-griff { display: none; }
  table.data.cards td.cell-sort { grid-column: 1 / -1; order: 99; }
  table.data.cards td.cell-sort::before { display: inline; margin-right: 8px; }
}
@media (max-width: 520px) {
  .scopebar .seg-depot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
  .scopebar .seg-depot button { grid-column: span 2; justify-content: center; padding: 7px 6px; }
  .scopebar .seg-depot button:nth-child(n+4) { grid-column: span 3; }
  .alloc-inputs.alloc-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tranchen-Mehrfachauswahl im Trade-Formular (13.10.2026) */
.radio-cards.mehrfach label { position: relative; padding-right: 30px; }
.radio-cards.mehrfach.mit-nachkauf { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.radio-cards.mehrfach label::after {
  content: ''; position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid var(--border-strong, var(--muted)); background: var(--surface);
}
.radio-cards.mehrfach label:has(input:checked)::after {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ==========================================================================
   Anmeldung, Pflegemodus, Verkaufsansicht, Zugänge (10/2026)
   ========================================================================== */
:root {
  /* Ringdiagramm „Titel“: Kategorienfarben 1–4 (Dataviz-Referenzpalette, mit dem Validator geprüft), neutral für Weitere/Cash */
  --v-1: #2a78d6; --v-2: #eb6834; --v-3: #1baf7a; --v-4: #eda100; --v-weitere: #8c96a3; --v-cash: #d5dbe3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --v-1: #3987e5; --v-2: #d95926; --v-3: #199e70; --v-4: #c98500; --v-weitere: #66768b; --v-cash: #2c3e57; }
}
:root[data-theme="dark"] { --v-1: #3987e5; --v-2: #d95926; --v-3: #199e70; --v-4: #c98500; --v-weitere: #66768b; --v-cash: #2c3e57; }

/* Anmeldung: verdeckt die App, bis eine Sitzung besteht */
body.ohne-sitzung .app, body.ohne-sitzung .tabbar, body.ohne-sitzung .fab { display: none !important; }
body.ohne-sitzung { padding-bottom: 0; background: var(--bg); }
.anmeldung { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 16px; }
.anmeldung-karte { width: 100%; max-width: 420px; padding: 28px 28px 30px; }
.anmeldung-kopf { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.anmeldung-kopf img { width: 168px; height: auto; }
.anmeldung-kopf b { display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.anmeldung-kopf span { color: var(--muted); font-size: 14px; }
.anmeldung h1 { font-size: 20px; font-weight: 600; color: var(--ink); }
.anmeldung-fuss { color: var(--muted); font-size: 13px; text-align: center; max-width: 420px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .anmeldung-kopf img { filter: brightness(0) invert(1); } }
:root[data-theme="dark"] .anmeldung-kopf img { filter: brightness(0) invert(1); }
.btn-block { width: 100%; justify-content: center; }
.link-knopf { align-self: center; background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 14px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-knopf:hover { text-decoration-thickness: 2px; }
.link-knopf:disabled { opacity: .5; cursor: default; }
.check-zeile { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.check-zeile input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Navigation: Verwaltung, Pflegemodus, Kontoknopf */
.nav .nav-section { margin: 18px 12px 4px; }
.nav-knopf {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: var(--sidebar-ink); font-weight: 500; font-size: 15px; text-align: left; cursor: pointer;
}
.nav-knopf:hover { background: var(--sidebar-hover); color: var(--sidebar-ink-strong); }
.nav-knopf.aktiv { background: rgba(201, 167, 90, .18); color: #f3dfae; }
.member-card { padding: 0; }
.konto-knopf {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; border-radius: 12px;
  text-align: left; cursor: pointer; color: inherit;
}
.konto-knopf:hover { background: var(--sidebar-hover); }
.konto-knopf > div { min-width: 0; flex: 1; }
.konto-knopf b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-knopf > .icon { color: rgba(255, 255, 255, .6); }
.konto-menue { display: flex; flex-direction: column; gap: 8px; }
.konto-menue .btn { justify-content: flex-start; }
@media (max-width: 1080px) {
  .nav-knopf { justify-content: center; padding: 12px 0; }
  .nav-knopf .label { display: none; }
  .konto-knopf { justify-content: center; }
  .konto-knopf > .icon { display: none; }
}

.pflege-leiste {
  flex: 1 1 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); color: var(--ink);
}
.pflege-leiste > .icon { color: var(--gold-ink); flex: none; }
.pflege-leiste > div { flex: 1; min-width: 0; font-size: 13.5px; }
.pflege-leiste b { display: block; font-size: 14.5px; color: var(--gold-ink); }
.pflege-leiste span { color: var(--ink-2); }
.speicher-status { font-size: 12.5px; color: var(--muted); min-width: 84px; text-align: right; }
html[data-speicherstand="speichert"] .speicher-status { color: var(--info); }
html[data-speicherstand="fehler"] .speicher-status { color: var(--neg); font-weight: 600; }
@media (max-width: 860px) {
  .pflege-leiste { padding: 8px 12px; }
  .pflege-leiste span { display: none; }
  .speicher-status { display: none; }
}

/* Verkaufsansicht */
.verkauf-werkzeug { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verkauf-werkzeug .input[type="date"] { width: auto; height: 38px; }
.verkauf-quelle { font-size: 13px; margin-left: auto; }
.seg.seg-sm button { height: 28px; padding: 0 10px; font-size: 13px; }
.dd-titel { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 14px 0 2px; }
.torte { display: block; flex: none; }
.torte-seg { cursor: default; outline: none; }
.torte-seg:focus-visible { stroke: var(--focus); stroke-width: 3; }
.torte-wert { font-size: 26px; font-weight: 700; fill: var(--ink); }
.torte-label { font-size: 13px; fill: var(--muted); }
.torte-block { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.torte-legende { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.torte-legende li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; }
.torte-legende i { width: 12px; height: 12px; border-radius: 4px; }
.torte-legende i.neutral { box-shadow: inset 0 0 0 1px var(--border-strong); }
.torte-legende span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.torte-legende em { font-style: normal; color: var(--muted); font-size: 13px; min-width: 86px; text-align: right; }
.top-liste { margin: 0; padding: 0; list-style: none; counter-reset: top; display: flex; flex-direction: column; gap: 6px; }
.top-liste li { counter-increment: top; display: grid; grid-template-columns: 22px 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.top-liste li::before { content: counter(top); color: var(--muted); font-size: 12.5px; text-align: right; }
.top-liste span:not(.dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grafik-body { display: flex; flex-direction: column; gap: 14px; }
.grafik-titel { max-width: 520px; }
.grafik-vorschau { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; align-self: flex-start; width: 100%; }
.grafik-vorschau.quer { max-width: 960px; }
.grafik-vorschau.hoch { max-width: 480px; }
.grafik-vorschau canvas { display: block; width: 100%; height: auto; }

/* Zugänge */
.zeilen-aktionen { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.link-feld { display: flex; gap: 8px; margin: 12px 0; }
.link-feld .input { flex: 1; min-width: 0; font-size: 13px; }
@media print {
  .pflege-leiste, .speicher-status { display: none !important; }
}
.banner-aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.inx-banner .banner-aktionen .btn:not(.btn-gold) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.inx-banner .banner-aktionen .btn:not(.btn-gold):hover { background: rgba(255, 255, 255, .18); }
.sync-info { color: var(--ink-2); }
.logo.nutzer-logo { background: linear-gradient(135deg, #e3c98c, #c9a75a); color: #1d1400; }
@media (max-width: 860px) {
  .verkauf-ansicht .card-head { flex-wrap: wrap; }
  .verkauf-ansicht .card-head .card-tools { flex-wrap: wrap; flex: 1 1 100%; }
  .verkauf-quelle { margin-left: 0; flex: 1 1 100%; }
  .verkauf-werkzeug .seg { max-width: 100%; }
}
@media (max-width: 860px) {
  .verkauf-werkzeug .seg { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 860px) { table.data.cards td.leer-mobil { display: none; } }
.fab[hidden] { display: none !important; }
@media (max-width: 860px) {
  .card-head { flex-wrap: wrap; }
  /* Knopfzeile darf schmaler werden als ihr Inhalt und bricht dann um. Mit „flex: none“ (oben) blieb sie so breit wie alle
     Knöpfe zusammen: „Wertpapiere Megatrend“ auf der Planung lief mit vier Knöpfen bis 489 px bei 390 px Breite, die Seite
     wurde breiter als das Handy und Navigation unten sowie Rundgang-Karte rutschten aus dem Bild (Befund 25.11.2026) */
  .card-head .card-tools { flex-wrap: wrap; flex: 0 1 auto; max-width: 100%; }
}

/* Simplified Indikator im Musterportfolio (seit 17.11.2026) */
.sim-zeile { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); white-space: normal; max-width: 340px; }
.sim-zeile .chip { margin-right: 2px; vertical-align: 1px; }
.sim-zeile .sim-text { overflow-wrap: anywhere; }
.sim-link { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; font-weight: 600; white-space: nowrap; }

/* Gesamtkapital direkt in der Übersicht eintragen (leeres Portfolio, seit 17.11.2026) */
.kapital-form { width: 100%; max-width: 440px; margin: 16px auto 0; text-align: left; display: grid; gap: 8px; }
.kapital-form label { font-weight: 600; font-size: 14px; }
.kapital-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kapital-zeile .btn { margin: 0; }
.kapital-zeile .input-suffix { flex: 1 1 200px; }
.kapital-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.kapital-form .err:empty { display: none; }
.inx-banner .stichtag-hinweis { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; opacity: .92; margin-top: 6px; }
.inx-banner .stichtag-hinweis .icon { flex: none; margin-top: 2px; }
/* Freigaben für Mitglieder (Zugänge) */
.freigabe-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, #e6e9ee); flex-wrap: wrap; }
.freigabe-zeile:last-child { border-bottom: 0; }
.freigabe-zeile > div { flex: 1 1 260px; display: grid; gap: 2px; }
.freigabe-zeile small { color: var(--muted, #5b6773); }

/* Interactive Brokers (Planung, Zuordnung, Anleitung), seit 18.11.2026 */
.broker-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.broker-form .err, .broker-form > div:last-child { grid-column: 1 / -1; }
.broker-form .err:empty { display: none; }
@media (max-width: 640px) { .broker-form { grid-template-columns: 1fr; } }
.broker-werte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.broker-werte > div { display: grid; gap: 2px; }
.broker-werte span, .broker-werte small { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .broker-werte { grid-template-columns: 1fr; } }
.broker-anleitung ol { padding-left: 20px; display: grid; gap: 12px; margin: 0 0 14px; }
.broker-anleitung ul { padding-left: 18px; margin: 6px 0; display: grid; gap: 3px; }
.broker-anleitung .note { margin-top: 10px; }
.broker-zuordnung select.input { min-width: 170px; }
.broker-hinweis .btn { margin-left: 6px; }
/* feste Zuordnung der (Unter-)Konten, seit 21.11.2026 */
.broker-konten { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.broker-konten-kopf { display: grid; gap: 2px; }
.broker-konten-kopf .muted { font-size: 13px; }
.broker-konto { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--border); }
.broker-konto-name { display: grid; gap: 1px; min-width: 0; }
.broker-konto-name b { overflow-wrap: anywhere; }
.broker-konto-name small { color: var(--muted); font-size: 13px; }
.broker-konto .input { width: auto; min-width: 170px; height: 36px; }
.hinweis-warn { color: var(--warn); }
/* „Signale der Woche“ im Musterportfolio, seit 22.11.2026 */
.signale-tabelle .signal-text { min-width: 200px; max-width: 340px; white-space: normal; }
.signale-tabelle .signal-aktion { white-space: nowrap; }
.signal-ok { color: var(--pos); display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
@media (max-width: 760px) { .signal-ok { justify-content: flex-start; } }
/* „Frühere Stände“: Liste der Wiederherstellungspunkte, seit 22.11.2026 */
.stand-liste { display: grid; max-height: 50vh; overflow: auto; }
.stand-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.stand-zeile > div { display: grid; gap: 2px; min-width: 0; }
.stand-zeile small { color: var(--muted); font-size: 13px; }
.stand-zeile .btn { flex: none; }
@media (max-width: 560px) { .stand-zeile { flex-direction: column; align-items: stretch; } }
/* „Aufräumen“: Liste der Wertpapiere ohne Trades, seit 22.11.2026 */
.aufraeum-liste { display: grid; gap: 2px; max-height: 46vh; overflow: auto; }
.aufraeum-zeile { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.aufraeum-zeile input { margin-top: 4px; flex: none; }
.aufraeum-zeile span { display: grid; gap: 1px; min-width: 0; }
.aufraeum-zeile small { color: var(--muted); font-size: 13px; }
[data-broker-karte] .note .btn { margin-left: 6px; }
.zuordnung-filter { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.broker-zuordnung tr[hidden] { display: none !important; }
.edit-table select.input { min-width: 96px; }
.edit-table .input:disabled { color: var(--muted); background: var(--surface-2); cursor: default; }
@media (max-width: 640px) {
  .broker-konto { flex-direction: column; align-items: stretch; gap: 6px; }
  .broker-konto .input { width: 100%; }
}
/* Impressum und Datenschutz (Fuß und Anmeldung) */
#footer a, .anmeldung-recht a { color: inherit; }
.anmeldung-recht { margin-top: 6px; font-size: 13px; }
/* Tranchen mit Nachkauf (5 Karten): auf schmalen Bildschirmen zweispaltig wie die übrigen Karten */
@media (max-width: 860px) {
  .radio-cards.mehrfach.mit-nachkauf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Trade-Formular: Label mit kleiner Umschaltung (Währung der Gebühr) */
.label-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.seg.seg-mini { padding: 2px; border-radius: 8px; }
.seg.seg-mini button { height: 24px; min-width: 30px; padding: 0 8px; font-size: 13px; border-radius: 6px; }
.label-zeile > label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
/* Planung: Einzahlungen und Entnahmen */
.ez-form { display: grid; grid-template-columns: auto 160px 180px minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.ez-form .ez-knopf .btn { height: 40px; }
.unter-plan { display: grid; gap: 6px; margin-top: 8px; }
.up-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.up-zeile .dot { margin-right: 6px; }
@media (max-width: 860px) {
  .ez-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ez-form .field:first-child, .ez-form .ez-knopf { grid-column: 1 / -1; }
  .up-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .up-zeile .btn { grid-column: 1 / -1; justify-self: start; }
}
.ez-liste { display: grid; gap: 0; border-top: 1px solid var(--border); }
.ez-zeile { display: grid; grid-template-columns: 110px 130px minmax(0, 1fr) auto; grid-template-areas: "datum betrag notiz weg"; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ez-datum { grid-area: datum; } .ez-betrag { grid-area: betrag; } .ez-notiz { grid-area: notiz; overflow-wrap: anywhere; } .ez-weg { grid-area: weg; }
@media (max-width: 860px) {
  .ez-form .field:nth-child(4) { grid-column: 1 / -1; }
  .ez-zeile { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "datum betrag weg" "notiz notiz notiz"; }
}
/* IBKR-Zuordnung: Kopfzeile je Unterkonto */
.broker-zuordnung tr.konto-kopf td { background: var(--surface-3); padding: 8px 12px; }
.konto-kopf-inhalt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.konto-programm { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.konto-programm .input { height: 32px; width: auto; min-width: 170px; }
@media (max-width: 860px) {
  .broker-zuordnung tr.konto-kopf { display: block; }
  .broker-zuordnung tr.konto-kopf td { display: block; }
  .konto-programm { margin-left: 0; width: 100%; }
}

/* Karten auf- und zuklappen (Wunsch Enrico 23.11.2026); Stand je Browser in localStorage „dash-karten-zu“ */
.card[data-klapp] > .card-head h2, .card[data-klapp] .card-head h2 { cursor: pointer; }
.card[data-klapp] .card-head { position: relative; padding-right: 58px; }
.card-head .card-klapp { color: var(--muted); position: absolute; top: 13px; right: 14px; }
.card-head .card-klapp .icon { transition: transform .15s ease; }
.card.zu { align-self: start; }
.card.zu .card-head ~ * { display: none !important; }
.card.zu .card-head { padding-bottom: 18px; }
.card.zu .card-head .card-tools { display: none; }
.card.zu .card-head .card-klapp .icon { transform: rotate(-90deg); }
@media (max-width: 860px) {
  .card.zu .card-head { padding-bottom: 16px; }
  .card[data-klapp] .card-head { padding-right: 50px; }
  .card-head .card-klapp { top: 10px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .card-head .card-klapp .icon { transition: none; } }

/* Bemerkung mehrzeilig (Rückmeldung Sabine 24.11.2026) */
textarea.notiz-eingabe { min-height: 64px; line-height: 1.45; }
.notiz-text { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Werkzeuge im Bereich Krypto Masterclass (25.11.2026): Krypto-Kalkulator und Tradingtagebuch ---------- */
.wz-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 22px; }
.input-suffix.suffix-lang .input { padding-right: 62px; }
.wz-zeile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wz-zeile > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.wz-zeile > b { font-size: 17px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.wz-zeile > b small { font-size: 13px; font-weight: 600; }
.wz-zeile > small { font-size: 12.5px; color: var(--muted); }
.chip-long { background: var(--pos-bg); color: var(--pos); }
.chip-short { background: var(--neg-bg); color: var(--neg); }
.input.input-sm { padding: 6px 10px; font-size: 13.5px; width: auto; max-width: 280px; }
.modal .err { margin: 0; font-size: 13px; font-weight: 600; color: var(--neg); }
.modal .err:empty { display: none; }
.hint.neg { color: var(--neg); font-weight: 600; }
.hint:empty { display: none; }
.wz-leitfaden summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2, var(--ink)); }
.wz-leitfaden-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; margin-top: 12px; font-size: 13.5px; }
.wz-leitfaden-raster ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.wz-leitfaden-raster li { margin: 3px 0; }
@media (max-width: 860px) {
  .wz-status { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
  .wz-leitfaden-raster { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- CoinTracking und Finanzübersicht (25.11.2026) ---------- */
.ct-schritte { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.cf-leiste { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cf-leiste > div:nth-child(2) { flex: 1 1 320px; }
.cf-aktionen { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.cf-aktionen .muted { font-size: 13px; }
.cf-tabelle .input-sm { width: 100%; max-width: none; }
.cf-tabelle td { vertical-align: middle; }
.cf-tabelle .input-suffix { min-width: 120px; }
.cf-typen { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 860px) {
  .cf-aktionen { margin-left: 0; width: 100%; }
  .cf-tabelle .input-suffix { min-width: 0; }
}
