/* TheCryptoTrader Dashboard. Farben als Rollen, hell und dunkel an einer Stelle. */
:root {
  color-scheme: light;
  --plane: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f3f3f1;
  --ink: #191919;
  --ink-2: #666666;
  --ink-3: #8c8c8c;
  --line: rgba(11, 11, 11, 0.10);
  --line-strong: rgba(11, 11, 11, 0.18);
  --grid: #e7e7e7;
  --axis: #c2c2c2;
  --accent: #257de0;
  --accent-ink: #1757ac;
  --accent-wash: rgba(37, 125, 224, 0.10);
  --s-bot: #257de0;
  --s-analysten: #f47230;
  --s-halten: #00b894;
  --s-btc: #f2a600;
  --up: #006c10;
  --up-wash: rgba(10, 172, 35, 0.12);
  --down: #c5292a;
  --down-wash: rgba(220, 60, 61, 0.11);
  --warn: #8a5a00;
  --warn-wash: rgba(251, 179, 21, 0.20);
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px -16px rgba(11, 11, 11, 0.18);
  --radius: 16px;
  --side: 248px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #0b0b0b;
    --surface: #191919;
    --surface-2: #222222;
    --ink: #efefef;
    --ink-2: #9c9c9c;
    --ink-3: #7a7a7a;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.20);
    --grid: #303030;
    --axis: #474747;
    --accent: #338ced;
    --accent-ink: #84b9f3;
    --accent-wash: rgba(51, 140, 237, 0.16);
    --s-bot: #338ced;
    --s-analysten: #e76624;
    --s-halten: #00a888;
    --s-btc: #d28e05;
    --up: #53c556;
    --up-wash: rgba(83, 197, 86, 0.14);
    --down: #eb6263;
    --down-wash: rgba(235, 98, 99, 0.15);
    --warn: #fbb315;
    --warn-wash: rgba(251, 179, 21, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0b0b0b;
  --surface: #191919;
  --surface-2: #222222;
  --ink: #efefef;
  --ink-2: #9c9c9c;
  --ink-3: #7a7a7a;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --grid: #303030;
  --axis: #474747;
  --accent: #338ced;
  --accent-ink: #84b9f3;
  --accent-wash: rgba(51, 140, 237, 0.16);
  --s-bot: #338ced;
  --s-analysten: #e76624;
  --s-halten: #00a888;
  --s-btc: #d28e05;
  --up: #53c556;
  --up-wash: rgba(83, 197, 86, 0.14);
  --down: #eb6263;
  --down-wash: rgba(235, 98, 99, 0.15);
  --warn: #fbb315;
  --warn-wash: rgba(251, 179, 21, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
pre { background: var(--surface-2); padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-2); }
.right { text-align: right; }
.icon { flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* --- Gerüst ------------------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  padding: 20px 14px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: #fff; }
.brand-mark.big { width: 48px; height: 48px; }
.brand-name { font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.2; }
.brand-name small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-2); letter-spacing: 0; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-wash); color: var(--accent-ink); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.run-select { display: grid; gap: 4px; padding: 0 4px; }
.run-select label { font-size: 12px; color: var(--ink-2); }
.side-user { display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.side-user form { display: contents; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; font-weight: 650; font-size: 13px; flex: none; }
.who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); border-radius: 9px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 28px 32px 0; }
.top h1 { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.15; }
.top-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.content { padding: 22px 32px 32px; display: grid; gap: 18px; align-content: start; flex: 1; max-width: 1320px; width: 100%; }
.foot { padding: 0 32px 24px; color: var(--ink-3); font-size: 12.5px; }

/* --- Bausteine --------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 15.5px; font-weight: 650; letter-spacing: -0.005em; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head.pad, .pad { padding: 18px 20px 0; }
.card-head p { font-size: 13px; margin-top: 2px; }
.more { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.empty { text-align: center; padding: 44px 24px; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto; }
.empty pre { text-align: left; max-width: 420px; margin: 18px auto 0; }
.empty-note { color: var(--ink-2); padding: 6px 0 2px; }
.empty-note.pad { padding: 4px 20px 20px; }
.hint { color: var(--ink-2); font-size: 13px; margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2.wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-3); }
.s-bot { background: var(--s-bot); } .s-analysten { background: var(--s-analysten); }
.s-halten { background: var(--s-halten); } .s-btc { background: var(--s-btc); }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 550; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.pill.active .dot { background: #0aac23; box-shadow: 0 0 0 3px var(--up-wash); }
.pill.killed { color: var(--down); } .pill.killed .dot { background: var(--down); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 550; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--up-wash); color: var(--up); }
.chip.bad { background: var(--down-wash); color: var(--down); }
.chip.info { background: var(--accent-wash); color: var(--accent-ink); }
.chip.warn { background: var(--warn-wash); color: var(--warn); }
.chip + .chip { margin-left: 4px; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--ink-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.block { width: 100%; padding: 11px 16px; }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--down); border-color: var(--down); }

input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; }
input::placeholder { color: var(--ink-3); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
label, .label { font-size: 13px; font-weight: 550; color: var(--ink-2); }

.notice { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-weight: 500; }
.notice.error { background: var(--down-wash); color: var(--down); }
.notice.good { background: var(--up-wash); color: var(--up); }
.notice .icon { margin-top: 2px; }

/* --- Tabellen ---------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .reason { color: var(--ink-2); min-width: 22ch; }
.table .struck td { color: var(--ink-3); }
.table .note { display: block; font-size: 12.5px; margin-top: 3px; }
.table .ext { color: var(--ink-2); vertical-align: -2px; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 20px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 20px; }

/* --- Übersicht --------------------------------------------------------------------------- */
.progress-card { display: grid; gap: 8px; }
.progress-text { font-size: 13.5px; color: var(--ink-2); }
.progress-text strong { color: var(--ink); }
.progress { position: relative; height: 8px; border-radius: 99px; background: var(--accent-wash); }
.progress span { position: absolute; inset: 0 auto 0 0; width: var(--p); min-width: 8px; border-radius: 99px; background: var(--accent); }
.progress .mark { position: absolute; left: 50%; top: -3px; width: 2px; height: 14px; background: var(--line-strong); border-radius: 2px; }
.progress-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }

.tiles { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 18px; }
.tiles header { display: flex; align-items: center; gap: 8px; }
.tiles header .muted { font-size: 13px; }
.hero-value { font-size: clamp(38px, 4.4vw, 54px); font-weight: 680; letter-spacing: -0.03em; line-height: 1.08; margin-top: 10px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 15px; }
.hero-meta .delta { font-size: 16px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.hero-facts dt { font-size: 12.5px; color: var(--ink-2); }
.hero-facts dd { font-weight: 620; font-size: 16px; font-variant-numeric: tabular-nums; margin-top: 1px; }
.tile { display: flex; flex-direction: column; }
.tile-value { font-size: 26px; font-weight: 660; letter-spacing: -0.02em; margin: 10px 0 2px; }
.tile-foot { margin-top: auto; padding-top: 12px; font-size: 13px; }
.spark { width: 100%; height: 44px; margin-top: 12px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.k-analysten polyline { stroke: var(--s-analysten); }
.spark.k-halten polyline { stroke: var(--s-halten); }
.spark.k-btc polyline { stroke: var(--s-btc); }
.top-status { display: flex; align-items: center; gap: 6px; }
.top-actions { display: none; }
.top-actions form { display: contents; }
.mini-list .right { justify-items: end; gap: 3px; }
.mini-list time { font-size: 12.5px; }
.stat .state { color: var(--ink-2); font-weight: 500; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px 5px 10px; font: inherit; font-size: 13.5px; cursor: pointer; }
.legend-item:hover { border-color: var(--line-strong); }
.legend-item[aria-pressed="false"] { opacity: 0.45; }
.legend-item[aria-pressed="false"] .legend-name { text-decoration: line-through; }
.legend-value { font-weight: 620; font-variant-numeric: tabular-nums; }
.legend-date { margin-left: auto; font-size: 13px; }
.chart { position: relative; height: 340px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.chart.ready .chart-empty { display: none; }
.chart .uplot, .chart .u-wrap { font-family: var(--font); }
.chart .u-cursor-x { border-right: 1px solid var(--axis); }
.chart .u-cursor-pt { border-width: 2px !important; border-color: var(--surface) !important; box-shadow: none; }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; width: max-content; }
.table-view .table-wrap { margin-top: 10px; }

.score { font-weight: 660; font-size: 15px; background: var(--surface-2); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.criteria { display: grid; gap: 12px; }
.criteria li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.criteria strong { display: block; font-weight: 550; line-height: 1.35; }
.criteria .muted { font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-width: 62px; justify-content: center; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 620; margin-top: 1px; }
.yes .badge { background: var(--up-wash); color: var(--up); }
.no .badge { background: var(--down-wash); color: var(--down); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.facts dt { font-size: 12.5px; color: var(--ink-2); }
.facts dd { font-size: 19px; font-weight: 640; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.facts.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.facts.compact dd { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.facts.compact dd .muted { font-weight: 400; }

.mini-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; padding-top: 2px; }
.mini-list li > div { display: grid; min-width: 0; }
.mini-list .muted { font-size: 13px; }
.mini-list.events li > div { grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.mini-list.events .event-text { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; }
.mini-list.events time { font-size: 12.5px; white-space: nowrap; }

/* --- Positionen -------------------------------------------------------------------------- */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.pos-head { display: flex; justify-content: space-between; gap: 12px; }
.pos-head h2 { font-size: 19px; }
.pos-head p { font-size: 13px; }
.pos-pnl { font-size: 19px; }
.ladder { margin: 34px 0 20px; }
.ladder-track { position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); }
.ladder-risk { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--down-wash); border-radius: 99px 0 0 99px; }
.ladder-gain { position: absolute; left: var(--l); right: 0; top: 0; bottom: 0; background: var(--up-wash); border-radius: 0 99px 99px 0; }
.ladder .tick { position: absolute; left: var(--x); top: -4px; width: 2px; height: 16px; background: var(--ink-3); transform: translateX(-1px); border-radius: 2px; }
.ladder .tick.hit { background: var(--up); }
.ladder .now { position: absolute; left: var(--x); top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--accent); }
.ladder .now span { position: absolute; bottom: 17px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ladder-labels { position: relative; height: 34px; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ladder-labels span { position: absolute; top: 0; display: grid; line-height: 1.25; }
.ladder-labels small { color: var(--ink-2); font-size: 11.5px; }
.ladder-labels .l-stop { left: 0; }
.ladder-labels .l-t2 { right: 0; text-align: right; }
.ladder-labels .l-entry, .ladder-labels .l-t1 { left: var(--x); transform: translateX(-50%); text-align: center; }

/* --- Trades ------------------------------------------------------------------------------ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat { background: var(--surface); padding: 14px 18px; display: grid; gap: 2px; align-content: start; }
.stat span { font-size: 12.5px; color: var(--ink-2); }
.stat strong { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .state { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 12.5px; font-weight: 600; }
.stat .state.ok { color: var(--up); } .stat .state.bad { color: var(--down); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters.inline { margin-left: auto; }
.filter { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.filter:hover { border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.filter b { font-weight: 600; opacity: 0.7; font-variant-numeric: tabular-nums; }

.trade-list li + li { border-top: 1px solid var(--line); }
.trade-list summary { display: grid; grid-template-columns: 110px minmax(150px, 1.2fr) minmax(120px, 1fr) 90px 120px 24px; gap: 12px; align-items: center; padding: 13px 20px; cursor: pointer; list-style: none; }
.trade-list summary::-webkit-details-marker { display: none; }
.trade-list summary:hover { background: var(--surface-2); }
.t-market { display: grid; line-height: 1.3; }
.t-market .muted, .t-prices .muted { font-size: 13px; }
.t-prices { font-variant-numeric: tabular-nums; }
.t-r, .t-pnl { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.t-open { color: var(--ink-3); display: grid; place-items: center; }
details[open] > summary .t-open { color: var(--accent); }
.trade-body { padding: 4px 20px 20px; display: grid; gap: 16px; }
.chart-img { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.chart-img img { display: block; width: 100%; height: auto; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* --- Analysten --------------------------------------------------------------------------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 5px; align-content: start; }
.span-2 { grid-column: 1 / -1; }
.form .hint { margin: 0; }
.radio-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.radio-seg label { position: relative; text-align: center; cursor: pointer; }
.radio-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.radio-seg span { display: block; padding: 7px 8px; border-radius: 8px; font-size: 14px; font-weight: 550; color: var(--ink-2); }
.radio-seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.radio-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.analyst-list { display: grid; gap: 16px; }
.analyst-top { display: flex; justify-content: space-between; gap: 10px; }
.meter { height: 8px; border-radius: 99px; background: var(--accent-wash); margin: 8px 0 6px; overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 99px; }
.analyst-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.analyst-foot b { color: var(--ink); }
.actions { text-align: right; white-space: nowrap; }
.storno summary { cursor: pointer; color: var(--ink-2); font-size: 13px; list-style: none; }
.storno summary::-webkit-details-marker { display: none; }
.storno summary:hover { color: var(--down); }
.storno form { display: grid; gap: 6px; margin-top: 8px; min-width: 200px; text-align: left; }

/* --- Berichte und Status ----------------------------------------------------------------- */
.report-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.report-nav { padding: 8px; position: sticky; top: 18px; }
.report-nav a { display: grid; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-weight: 550; }
.report-nav a small { font-weight: 400; font-size: 12.5px; }
.report-nav a:hover { background: var(--surface-2); text-decoration: none; }
.report-nav a.on { background: var(--accent-wash); color: var(--accent-ink); }
.prose { padding: 28px 30px; }
.prose h2 { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; margin-bottom: 6px; }
.prose h3 { font-size: 16px; margin: 22px 0 8px; }
.prose p { margin: 10px 0; max-width: 72ch; }
.prose ul { list-style: disc; padding-left: 20px; margin: 12px 0; display: grid; gap: 4px; }
.prose .table-wrap { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }

.run-switch { display: grid; gap: 5px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.kv { display: grid; gap: 10px; }
.kv > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; }
.kv dt { color: var(--ink-2); font-size: 13.5px; }
.kv dd { font-weight: 500; min-width: 0; }
.hash { word-break: break-all; font-size: 12.5px; }
.event-list li { display: grid; grid-template-columns: 138px 170px minmax(0, 1fr); gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 14px; align-items: start; }
.event-list time { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.event-list .chip { justify-self: start; }

/* --- Anmeldung --------------------------------------------------------------------------- */
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 480px); min-height: 100%; }
.login-art { background: linear-gradient(160deg, #0f4a96 0%, #257de0 70%, #519ced 100%); position: relative; overflow: hidden; }
.login-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-art .g { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; fill: none; }
.login-art .w { stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.login-art .p circle { fill: #fff; stroke: #257de0; stroke-width: 3; }
.login-art .t { fill: rgba(255, 255, 255, 0.85); font: 600 15px var(--font); }
.login-card { align-self: center; padding: 40px clamp(24px, 5vw, 56px); display: grid; gap: 8px; }
.login-card h1 { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; margin-top: 14px; }
.login-card .muted { margin-bottom: 14px; }
.login-card label { margin-top: 8px; }
.login-card .btn { margin-top: 18px; }
.login-card .fine { display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 12.5px; margin-top: 14px; }

/* --- Schmale Bildschirme ----------------------------------------------------------------- */
@media (max-width: 1120px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles .hero { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 30; }
  .brand, .side-foot { display: none; }
  .top-actions { display: flex; }
  .nav { flex-direction: row; flex: 1; overflow-x: auto; gap: 0; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10.5px; min-width: 0; flex: 1 1 0; letter-spacing: -0.01em; }
  .nav-item span { white-space: nowrap; }
  .top { padding: 18px 16px 0; align-items: center; }
  .top h1 { font-size: 22px; }
  .content { padding: 16px 16px 24px; gap: 14px; }
  .foot { padding: 0 16px 96px; }
  .grid-2, .grid-2.wide-left, .report-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .report-nav { position: static; }
  .report-nav ul { display: flex; gap: 4px; overflow-x: auto; }
  .report-nav a { white-space: nowrap; }
  .tiles { gap: 14px; }
  .prose { padding: 20px; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:last-child { grid-column: 1 / -1; }
  .card { padding: 16px; }
  .hero-facts { grid-template-columns: 1fr; gap: 8px; }
  .hero-facts > div { display: flex; justify-content: space-between; align-items: baseline; }
  .chart { height: 260px; }
  .legend-date { width: 100%; margin: 0; }
  .facts.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade-list summary { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; }
  .t-prices { grid-column: 1; grid-row: 2; font-size: 13.5px; }
  .t-exit { grid-column: 1; grid-row: 3; }
  .t-pnl { grid-column: 2; grid-row: 1; }
  .t-r { grid-column: 2; grid-row: 2; font-size: 13.5px; }
  .t-open { grid-column: 2; grid-row: 3; justify-self: end; }
  .trade-body { padding: 4px 16px 16px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .event-list li { grid-template-columns: 1fr auto; padding: 11px 16px; gap: 4px 10px; }
  .event-list li span:last-child { grid-column: 1 / -1; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
  .login { grid-template-columns: 1fr; grid-template-rows: 170px 1fr; }
  .login-card { align-self: start; }
  /* Tabellen als Karten */
  .table.stack thead { position: absolute; left: -9999px; }
  .table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.stack td { display: grid; padding: 0 !important; border: 0; text-align: left !important; }
  .table.stack td::before { content: attr(data-th); font-size: 11.5px; color: var(--ink-2); font-weight: 550; }
  .table.stack td.reason, .table.stack td.actions { grid-column: 1 / -1; min-width: 0; }
  .table.stack td.actions::before { content: none; }
  .table.stack td > .chip, .table.stack td > .delta { justify-self: start; }
  .chart-img { overflow-x: auto; }
  .chart-img img { min-width: 680px; }
  .table.stack tbody tr:hover td { background: none; }
  .filters.inline { margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav-item, .btn, .filter, .legend-item, .icon-btn { transition: background-color 0.12s, color 0.12s, border-color 0.12s; }
}
@media print {
  .side, .foot, .seg, .filters { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}
