:root {
  --bg: #0b0f1e;
  --bg2: #10162a;
  --card: #151c33;
  --card2: #1b2340;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef1fb;
  --muted: #8d97b8;
  --gold: #ffd040;
  --green: #3ee07a;
  --red: #ff5a6a;
  --purple: #a77bff;
  --cyan: #3cc8ff;
  --orange: #ff8a3d;
  --r: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; font-variant-numeric: tabular-nums;
  -webkit-user-select: none; user-select: none;
}
input { -webkit-user-select: text; user-select: text; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
h1, h2, .num, .top-name, .tabs span, .big, .kpi-v, .arm-eq { font-family: "Fredoka", -apple-system, sans-serif; }
h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.up { color: var(--green); }
.down { color: var(--red); }
.gold { color: var(--gold); }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 80% at 50% 0%, #133a2a 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 340px; text-align: center; }
.login-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 12px 40px rgba(62, 224, 122, .3); }
.login h1 { margin: 18px 0 4px; font-size: 30px; font-weight: 700; }
.login h1 span, .top-name span { color: var(--gold); }
.login p { margin: 0 0 22px; color: var(--muted); }
.login input { width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 17px; outline: none; }
.login input:focus { border-color: var(--green); }
.login button { width: 100%; margin-top: 12px; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 17px;
  background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1c00; }
.login-err { color: var(--red); min-height: 20px; margin-top: 10px; font-size: 14px; }

/* Rahmen */
.app { min-height: 100vh; padding: calc(var(--safe-t) + 64px) 14px calc(var(--safe-b) + 86px); }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 8px) 14px 10px; background: rgba(11, 15, 30, .82);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.top-icon { width: 36px; height: 36px; border-radius: 10px; }
.top-title { flex: 1; min-width: 0; }
.top-name { font-size: 18px; font-weight: 700; line-height: 1.1; }
.top-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 10px rgba(62, 224, 122, .7); }
.dot.warn { background: var(--orange); }
.dot.bad { background: var(--red); }
.refresh { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); flex: none; }
.refresh svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh.busy { color: var(--gold); }
.refresh.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ptr { position: fixed; top: calc(var(--safe-t) + 66px); left: calc(50% - 18px); z-index: 19; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transform: translateY(-70px); }
.ptr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ptr.ready { color: var(--gold); border-color: var(--gold); }
.offline { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 138, 61, .12); color: var(--orange); font-size: 13px; }

.view { display: none; animation: fade .18s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Tab-Leiste */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  padding: 8px 6px calc(var(--safe-b) + 8px); background: rgba(11, 15, 30, .9); border-top: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); padding: 4px 0; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab span { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--gold); }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sect { margin: 18px 4px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
  background: rgba(141, 151, 184, .14); color: var(--muted); white-space: nowrap; }
.pill.green { background: rgba(62, 224, 122, .14); color: var(--green); }
.pill.red { background: rgba(255, 90, 106, .14); color: var(--red); }
.pill.orange { background: rgba(255, 138, 61, .14); color: var(--orange); }
.pill.gold { background: rgba(255, 208, 64, .14); color: var(--gold); }
.pill.purple { background: rgba(167, 123, 255, .16); color: var(--purple); }

/* Start: Depots */
.arms { display: grid; gap: 10px; }
.arm { display: grid; grid-template-columns: 6px 1fr auto; gap: 12px; align-items: center; }
.arm-bar { width: 6px; height: 44px; border-radius: 3px; }
.arm-name { font-weight: 700; }
.arm-sub { font-size: 12px; color: var(--muted); }
.arm-eq { font-size: 20px; font-weight: 700; text-align: right; }
.arm-ret { font-size: 13px; font-weight: 700; text-align: right; }
.hero-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Diagramm */
.chart { width: 100%; height: 190px; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: -apple-system, sans-serif; }
.chart .gl { stroke: var(--line); }
.chart .zero { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 3 4; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.seg { display: flex; gap: 4px; background: var(--bg2); padding: 3px; border-radius: 10px; }
.seg button { padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--card2); color: var(--text); }

/* KPI-Raster */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--bg2); border-radius: 14px; padding: 10px 12px; }
.kpi-v { font-size: 18px; font-weight: 600; }
.kpi-l { font-size: 12px; color: var(--muted); }

/* Liste */
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.coin { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
  font-family: "Fredoka", sans-serif; background: var(--card2); }
.row-main { flex: 1; min-width: 0; }
.row-t { font-weight: 700; }
.row-s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-r { text-align: right; }
.row-r .v { font-weight: 700; }
.spark { width: 64px; height: 26px; flex: none; }
.wbar { height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin-top: 6px; }
.wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: 3px; }
.trend { display: flex; gap: 3px; margin-top: 5px; }
.trend b { width: 14px; height: 5px; border-radius: 2px; background: var(--bg2); }
.trend b.on { background: var(--green); }

/* Claude */
.verdicts { display: grid; gap: 8px; }
.verdict { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--bg2); }
.verdict .coin { width: 32px; height: 32px; font-size: 11px; }
.v-text { font-size: 13px; color: var(--muted); margin-top: 2px; }
.summary { font-size: 15px; line-height: 1.45; }
.src { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.src:last-child { border-bottom: 0; }
.src small { display: block; color: var(--muted); }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.steps { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.steps li { margin: 4px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--bg2); padding: 2px 6px; border-radius: 6px; color: var(--text); }

/* Trades */
.day { margin: 16px 4px 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.side { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.side svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.side.buy { background: rgba(62, 224, 122, .14); color: var(--green); }
.side.sell { background: rgba(255, 90, 106, .14); color: var(--red); }

/* Mehr */
.btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; border-radius: 14px;
  background: var(--bg2); font-weight: 700; margin-bottom: 8px; color: var(--text); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.danger { color: var(--red); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; }
pre.md { white-space: pre-wrap; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text);
  background: var(--bg2); border-radius: 12px; padding: 12px; max-height: 60vh; overflow: auto; -webkit-user-select: text; user-select: text; }
