/* Invest-Cockpit – Gemeinsame Stile (lokal, kein CDN) */
:root {
  --bg: #0d1117; --card: #161b22; --border: #30363d; --text: #c9d1d9;
  --green: #3fb950; --red: #f85149; --blue: #58a6ff; --yellow: #d29922;
  --muted: #8b949e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg); color: var(--text); padding: 16px; max-width: 640px; margin: auto;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.4rem; margin-bottom: 4px; }
.subtitle { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; margin-bottom: 12px;
}
.card h2 { font-size: 1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.badge { font-size: .7rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.badge-fear { background: var(--red); color: #fff; }
.badge-greed { background: var(--green); color: #000; }
.badge-neutral { background: var(--yellow); color: #000; }
.row {
  display: flex; justify-content: space-between; padding: 4px 0; font-size: .9rem;
  border-bottom: 1px solid var(--border); align-items: center;
}
.row:last-child { border-bottom: none; }
.ticker { font-weight: 600; color: var(--blue); }
a.ticker { text-decoration: none; }
a.ticker:hover { text-decoration: underline; }
.price { font-variant-numeric: tabular-nums; }
.up { color: var(--green); }
.down { color: var(--red); }
.signal { font-size: .75rem; padding: 1px 5px; border-radius: 3px; }
.sig-above { background: rgba(63,185,80,.15); color: var(--green); }
.sig-below { background: rgba(248,81,73,.15); color: var(--red); }
.loading { color: var(--muted); text-align: center; padding: 24px; }
.error { color: var(--red); text-align: center; padding: 12px; }
.meta { color: var(--muted); font-size: .75rem; text-align: right; margin-top: 4px; }
.sma-info { font-size: .78rem; color: var(--muted); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.detail-link { font-size: .8rem; }
.nav { display: flex; gap: 12px; margin-bottom: 12px; font-size: .85rem; }
.nav a { color: var(--blue); text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Ticker-Detail */
.chart-container { width: 100%; height: 350px; margin-bottom: 8px; }
.kpi-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  font-size: .85rem; margin-bottom: 4px;
}
.kpi-grid dt { color: var(--muted); }
.kpi-grid dd { font-variant-numeric: tabular-nums; text-align: right; }
.news-item { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.news-item:last-child { border-bottom: none; }
.news-item a { color: var(--blue); }
.news-date { color: var(--muted); font-size: .75rem; }
.disclaimer { color: var(--muted); font-size: .7rem; margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--border); }
.disclaimer a { color: var(--muted); text-decoration: underline; }

/* Responsive: etwas mehr Platz auf iPad/Desktop */
@media (min-width: 768px) {
  body { max-width: 800px; }
  .chart-container { height: 450px; }
  .kpi-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* Heute-Seite: Alerts */
.alert-item { padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: .85rem; }
.alert-item:last-child { margin-bottom: 0; }
.alert-crisis { background: rgba(248,81,73,.15); border-left: 3px solid var(--red); }
.alert-elevated { background: rgba(210,153,34,.12); border-left: 3px solid var(--yellow); }
.alert-info { background: rgba(88,166,255,.1); border-left: 3px solid var(--blue); }
.alert-item .ticker { font-weight: 600; }

/* VIX-Laufzeitstruktur */
.vix-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .85rem; }
.vix-label { width: 55px; color: var(--muted); flex-shrink: 0; }
.vix-bar-bg { flex: 1; height: 18px; background: var(--border); border-radius: 4px; overflow: hidden; }
.vix-bar { height: 100%; background: var(--yellow); border-radius: 4px; transition: width .4s ease; }
.vix-val { width: 45px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Login / Abmelden */
.nav .linkbtn { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; }
.nav .linkbtn:hover { color: var(--text); text-decoration: underline; }
.btn { background: var(--blue); color: #000; border: none; border-radius: 6px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; width: 100%; margin: 6px 0; }
#register-box input { width: 100%; padding: 8px; margin: 6px 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit; }
[hidden] { display: none !important; }
