/* =============================================================================
   GREEN GOOSE · BIER EXCHANGE
   Pub-Style Theme — Tannengrün · Holz · Bier-Gold · Schaum-Creme
   Mobile-First
   ============================================================================= */

/* DSGVO-Hinweis: Für Produktivbetrieb Fonts lokal hosten statt von Google laden. */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Fintech Dark — moderner Look */
  --bg:           #0a0a12;
  --bg-elev:      #14141c;
  --surface:      #1a1a24;
  --surface-2:    #22222e;
  --border:       rgba(255,255,255,0.08);
  --border-soft:  rgba(255,255,255,0.04);

  /* Wood & Bronze — für Legacy-Elemente */
  --wood:         #3a2a1a;
  --wood-light:   #4a3a2a;
  --bronze:       #b8863a;

  /* Warm Gold — Akzentfarbe */
  --gold:         #f0b850;
  --gold-light:   #f7d087;
  --gold-dim:     #b8863a;
  --gold-bg:      rgba(240,184,80,0.10);

  /* Cream für Text-Highlights */
  --cream:        #f4f4f6;
  --cream-soft:   #d9d9df;

  /* Text — hoher Kontrast */
  --text:         #ffffff;
  --text-dim:     rgba(255,255,255,0.62);
  --text-mute:    rgba(255,255,255,0.38);

  /* Trend-Farben — pastellig, mit Glow */
  --pos:          #7dd960;
  --pos-glow:     rgba(125,217,96,0.35);
  --pos-bg:       rgba(125,217,96,0.15);
  --neg:          #ff6b52;
  --neg-glow:     rgba(255,107,82,0.35);
  --neg-bg:       rgba(255,107,82,0.15);

  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-brand:   'Alfa Slab One', Georgia, serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  padding-top: 116px;
  padding-bottom: 88px;
}

/* Subtile Pub-Hintergrund-Textur: zwei warme Radial-Gradients + vertikale Holzandeutung */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 10% 0%,   rgba(212,168,74,0.05), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(212,168,74,0.04), transparent 50%),
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 80px,
      rgba(0,0,0,0.05) 80px,
      rgba(0,0,0,0.05) 81px);
  opacity: 0.6;
}

main {
  position: relative; z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* =============================================================================
   STICKY HEADER — Pub-Schild-Anmutung mit Bronze-Rand
   ============================================================================= */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(180deg, #1c2719 0%, #161f14 100%);
  border-bottom: 2px solid var(--bronze);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.topbar-brand {
  display: flex; align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.topbar-logo {
  height: 80px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.topbar-cash {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--gold);
  background: var(--gold-bg);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212,168,74,0.25);
}

/* =============================================================================
   BOTTOM NAV
   ============================================================================= */

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(180deg, #161f14 0%, #0f1a0e 100%);
  border-top: 2px solid var(--bronze);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.4);
}
.bottomnav-inner {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 9px 2px 11px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: color 0.15s;
}
.bottomnav a.active {
  color: var(--gold);
}
.bottomnav a.disabled { opacity: 0.4; pointer-events: none; }
.bottomnav .ico { font-size: 18px; line-height: 1; }

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--cream);
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  margin-top: 24px;
  color: var(--cream);
}
h2 .label {
  font-size: 11px; font-weight: 500;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2px;
}
.subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.neu { color: var(--text-dim); }

/* =============================================================================
   CARDS — warmer Holz-Schein
   ============================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.card-stat {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.card-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.card-stat .label {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  font-weight: 600;
}
.card-stat .big {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.card-stat .sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-grid .card-stat { padding: 14px; }
.stat-grid .card-stat .big { font-size: 20px; }
.stat-grid .card-stat .label { font-size: 10px; }

/* =============================================================================
   ROWS (Aktien / Positionen)
   ============================================================================= */

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.row:active { transform: scale(0.98); }
.row:hover  {
  border-color: var(--bronze);
  background: var(--bg-elev);
}

/* === SPARKLINE-Row Variante (Markt + Depot) === */
.row-spark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #243121 0%, #1d2a1a 100%);
  padding: 14px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.row-spark .spark-bg {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 55%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
}
.row-spark > * { z-index: 1; position: relative; }
.row-spark .row-ticker {
  width: 56px; height: 56px;
}
.row-spark .row-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
}
.row-side-pill {
  text-align: right;
  background: rgba(20,28,18,0.85);
  padding: 5px 9px;
  border-radius: 8px;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(212,168,74,0.08);
}
.row-side-pill .row-price {
  font-size: 17px;
  line-height: 1;
  display: block;
}
.row-change-pill {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
}
.row-change-pill.pos {
  background: rgba(159,197,90,0.18);
  color: var(--pos);
  border: 1px solid rgba(159,197,90,0.3);
}
.row-change-pill.neg {
  background: rgba(217,107,74,0.18);
  color: var(--neg);
  border: 1px solid rgba(217,107,74,0.3);
}

/* === HERO-Stat-Card mit Sparkline (Depot oben) === */
.card-stat.hero-stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2a3520 0%, #1d2a1a 100%);
  border-color: rgba(212,168,74,0.3);
}
.card-stat.hero-stat .spark-bg {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 60%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
}
.card-stat.hero-stat > * { position: relative; z-index: 1; }
.card-stat.hero-stat .big { color: var(--gold); }

/* === Achievement-Banner === */
.achv-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(212,168,74,0.12) 0%, var(--surface) 100%);
  border: 1px solid rgba(212,168,74,0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.achv-card:hover { border-color: var(--gold); }
.achv-icon {
  width: 38px; height: 38px;
  background: rgba(212,168,74,0.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.achv-text { flex: 1; }
.achv-name { font-size: 14px; color: var(--cream); font-weight: 600; }
.achv-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.achv-arrow { color: var(--gold); font-size: 20px; }

.row-ticker {
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #3a2918 0%, #261a0e 100%);
  border: 1px solid var(--bronze);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  overflow: hidden;
}
.row-ticker.has-logo {
  background: #fff;
  padding: 5px;
}
.row-ticker.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.row-main { flex: 1; min-width: 0; }
.row-name {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--cream);
}
.row-sub  { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.row-side { text-align: right; flex-shrink: 0; }
.row-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.row-change {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus {
  border-color: var(--gold);
  background: var(--surface);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #2a1d08;
  border: 1px solid var(--gold-dim);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform 0.1s, filter 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn:active { transform: scale(0.98); }
.btn:hover  { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--bronze);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
  filter: none;
}

.btn-buy {
  background: linear-gradient(180deg, #b8d96f 0%, var(--pos) 100%);
  color: #1a2a0a;
  border-color: #6b8c3a;
}
.btn-sell {
  background: linear-gradient(180deg, #e88a6a 0%, var(--neg) 100%);
  color: #2a0e0a;
  border-color: #9c4a32;
}

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */

.flash {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  font-size: 14px;
  border-left: 3px solid;
}
.flash.ok  { background: var(--pos-bg); color: var(--pos); border-color: var(--pos); }
.flash.err { background: var(--neg-bg); color: var(--neg); border-color: var(--neg); }

/* Badge-Toast: erscheint oben, wenn neues Achievement vergeben wird */
.badge-toast {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #2a1f10 0%, #1a1208 100%);
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  box-shadow: 0 0 24px rgba(212,168,74,0.25);
  animation: badgePop 0.5s ease-out;
}
.badge-toast-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.badge-toast-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 2px;
}
.badge-toast-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--cream);
}
@keyframes badgePop {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Badge-Galerie auf Achievements-Seite */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.badge-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  position: relative;
}
.badge-card.earned {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,168,74,0.10) 0%, var(--surface) 100%);
}
.badge-card.locked .badge-card-icon {
  filter: grayscale(1);
  opacity: 0.3;
}
.badge-card-icon { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.badge-card-title {
  font-weight: 600; font-size: 12px; color: var(--cream);
  margin-bottom: 4px; line-height: 1.2;
}
.badge-card-desc {
  font-size: 10px; color: var(--text-mute); line-height: 1.3;
}
.badge-card-date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gold);
  margin-top: 6px;
}

/* =============================================================================
   AUTH PAGES — Pub-Schild als Hero
   ============================================================================= */

.auth-wrap {
  min-height: calc(100vh - 116px - 88px);
  display: flex; flex-direction: column; justify-content: center;
}

.auth-logo {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.auth-wrap h1 {
  font-family: var(--font-brand);
  font-size: 24px;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 6px;
}
.auth-wrap .subtitle {
  text-align: center;
  color: var(--gold-light);
  font-style: italic;
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 14px;
}
.auth-link a { color: var(--gold); text-decoration: none; font-weight: 600; }

/* =============================================================================
   EMPTY STATES
   ============================================================================= */

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-mute);
}
.empty .ico { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.empty p { font-size: 14px; }

/* =============================================================================
   STOCK DETAIL HERO — Styles siehe .stock-hero-new weiter unten
   ============================================================================= */

.branch-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-soft);
  background: var(--wood-light);
  border: 1px solid var(--bronze);
  padding: 3px 9px;
  border-radius: 999px;
  margin-top: 8px;
}

/* =============================================================================
   NEWS
   ============================================================================= */

.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.news-card:hover  { border-color: var(--bronze); background: var(--bg-elev); }
.news-card:active { transform: scale(0.99); }

/* Karten mit Thumbnail: Flexbox-Layout */
.news-card.has-thumb {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.news-card .news-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.news-card .news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card .news-body {
  flex: 1;
  min-width: 0;
}
.news-card .news-body > *:last-child { margin-bottom: 0; }

.news-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-mute);
}
.news-meta .cat {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.news-meta .dot { color: var(--border); }

.news-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--cream);
}
.news-teaser {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 8px;
  /* maximal 2 Zeilen */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-effects {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.eff-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.eff-pill.pos { background: var(--pos-bg); color: var(--pos); }
.eff-pill.neg { background: var(--neg-bg); color: var(--neg); }

.news-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding: 14px 16px;
  margin-top: 4px;
}

.news-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 12px;
  display: block;
  border: 1px solid var(--border);
}

.news-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.news-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: block;
}

/* =============================================================================
   TRADE FEED
   ============================================================================= */

.feed-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.feed-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.feed-user {
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
}
.feed-time {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.feed-action {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.feed-action strong { color: var(--text); font-weight: 600; }
.feed-action .ticker {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.feed-action .mono { color: var(--cream); font-weight: 500; }

.reactions {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.rx-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
}
.rx-btn:hover  { border-color: var(--bronze); }
.rx-btn:active { transform: scale(0.94); }
.rx-btn.active {
  background: var(--gold-bg);
  border-color: rgba(212,168,74,0.40);
  color: var(--gold);
}
.rx-btn .emo { font-size: 14px; line-height: 1; }
.rx-btn form { display: inline; margin: 0; }
.rx-btn button {
  background: none; border: none;
  display: inline-flex; align-items: center; gap: 5px;
  color: inherit; font: inherit; cursor: pointer;
  padding: 0;
}

/* Filter-Bar */
.filter-bar {
  display: flex; gap: 6px;
  margin-bottom: 14px;
}
.filter-bar a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-soft);
}
.filter-bar a.active {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(212,168,74,0.35);
}

/* =============================================================================
   LIGA
   ============================================================================= */

.season-info {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.season-info .name { font-weight: 600; font-size: 15px; color: var(--cream); }
.season-info .meta {
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

.my-rank-card {
  background: linear-gradient(135deg, rgba(212,168,74,0.15), rgba(212,168,74,0.05));
  border: 1px solid rgba(212,168,74,0.40);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 6px rgba(212,168,74,0.10);
}
.my-rank-card .pos {
  font-family: var(--font-brand);
  font-size: 24px;
  color: var(--gold);
  min-width: 50px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.my-rank-card .label-mini {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.my-rank-card .val {
  font-family: var(--font-mono);
  font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.my-rank-card .roi {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: 6px;
}
.rank-row.me {
  background: rgba(212,168,74,0.10);
  border-color: rgba(212,168,74,0.35);
}
.rank-row .rank-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-mute);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rank-row .rank-medal {
  font-size: 20px;
  min-width: 28px;
  text-align: center;
}
.rank-row .rank-name {
  flex: 1; min-width: 0;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--cream);
}
.rank-row.me .rank-name { color: var(--gold); }
.rank-row .rank-side { text-align: right; flex-shrink: 0; }
.rank-row .rank-total {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.rank-row .rank-roi {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rank-divider {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .2em;
  margin: 16px 0 8px;
}

/* =============================================================================
   CHECK-IN SUCCESS-SCREEN — die Bier-Stunde!
   ============================================================================= */

.checkin-screen {
  min-height: calc(100vh - 116px - 88px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 20px;
}
.checkin-screen .ico-big {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}
.checkin-screen .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: 8px;
}
.checkin-screen .amount {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--pos);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.checkin-screen .amount.muted { color: var(--cream); }
.checkin-screen .headline {
  font-family: var(--font-brand);
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--cream);
  margin-bottom: 8px;
}
.checkin-screen .subline {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 320px;
  margin-bottom: 24px;
}
.checkin-screen .cash-now {
  background: var(--surface);
  border: 1px solid var(--bronze);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.checkin-screen .cash-now strong { color: var(--gold); }
.checkin-screen .btn { max-width: 320px; }

.signup-bonus-banner {
  background: linear-gradient(135deg, rgba(159,197,90,0.12), rgba(212,168,74,0.10));
  border: 1px solid rgba(159,197,90,0.35);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--cream);
}
.signup-bonus-banner strong {
  color: var(--pos);
  font-family: var(--font-mono);
  font-size: 16px;
}

/* =============================================================================
   STATIC PAGES (Spielregeln, Impressum, Datenschutz)
   ============================================================================= */

.rules-content {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 20px;
  line-height: 1.7;
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.rules-content h1 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold);
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,168,74,0.3);
  font-weight: 600;
}
.rules-content h1:first-child { margin-top: 0; }

.rules-content h2 {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--cream);
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 600;
  background: none;
  padding: 0;
  border: none;
}

.rules-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--cream);
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

.rules-content p {
  margin-bottom: 12px;
}

.rules-content em {
  color: var(--gold);
  font-style: italic;
}

.rules-content strong {
  color: var(--cream);
  font-weight: 600;
}

.rules-content ul,
.rules-content ol {
  margin: 8px 0 14px 20px;
  padding-left: 8px;
}
.rules-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.rules-content li::marker { color: var(--gold); }

.rules-content blockquote {
  background: rgba(212,168,74,0.08);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 4px;
  font-style: italic;
  color: var(--text-dim);
}

.rules-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.rules-content table th {
  background: var(--surface-2);
  color: var(--gold);
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rules-content table td {
  padding: 8px 12px;
  border-top: 1px solid var(--border-soft);
}
.rules-content table tr:nth-child(odd) td {
  background: rgba(255,255,255,0.02);
}

.rules-content code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
}

.rules-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Letztes Element ohne unteren Abstand */
.rules-content > *:last-child {
  margin-bottom: 0;
}

/* Versteckte Anchor-IDs sollen nicht stören */
.rules-content [id] {
  scroll-margin-top: 90px;
}

/* === DANGER ZONE (Account löschen) === */
.danger-zone {
  background: rgba(217,107,74,0.05);
  border: 1px solid rgba(217,107,74,0.25);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 24px;
}
.danger-zone h3 {
  color: var(--neg);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.danger-zone p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}
.btn-danger {
  background: transparent;
  color: var(--neg);
  border: 1px solid var(--neg);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-danger:hover {
  background: var(--neg);
  color: #fff;
}

/* =============================================================================
   VISUAL ENHANCEMENTS — Ticker, Widgets, Pulse, Tilt, Animationen
   ============================================================================= */

/* === TICKER-BAND === */
.ticker-band {
  position: sticky;
  top: 0;  /* Ganz oben */
  z-index: 100;
  background: linear-gradient(180deg, #0a0f08 0%, #08110a 100%);
  border-top: 1px solid rgba(212,168,74,0.15);
  border-bottom: 1px solid rgba(212,168,74,0.15);
  overflow: hidden;
  height: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ticker-track {
  display: inline-flex;
  gap: 32px;
  padding: 6px 0;
  white-space: nowrap;
  animation: ticker-scroll 80s linear infinite;
  will-change: transform;
}
.ticker-band:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  padding: 2px 4px;
}
.ticker-sym { color: var(--gold); font-weight: 700; letter-spacing: 0.03em; }
.ticker-val { color: var(--cream); }
.ticker-arrow { font-size: 9px; margin: 0 1px; }
.ticker-pct { font-weight: 600; }
.ticker-up   .ticker-arrow, .ticker-up   .ticker-pct { color: var(--pos); }
.ticker-down .ticker-arrow, .ticker-down .ticker-pct { color: var(--neg); }
.ticker-flat .ticker-arrow, .ticker-flat .ticker-pct { color: var(--text-mute); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }  /* Hälfte, weil doppelt ausgegeben */
}

/* Ticker ganz oben, Topbar rutscht darunter */
body.has-ticker .topbar { top: 32px; }
body.has-ticker { padding-top: 148px; }
@media (max-width: 440px) {
  body.has-ticker { padding-top: 148px; }
}

/* === DASHBOARD-WIDGETS === */
.widget-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.widget {
  position: relative;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  overflow: hidden;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, border-color 0.15s;
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, #243121 0%, #1d2a1a 100%);
}
.widget:active { transform: scale(0.97); }
.widget:hover { border-color: var(--gold); }

.widget-icon {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 22px;
  opacity: 0.5;
}
.widget-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.widget-ticker {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.widget-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cream);
  margin-top: 2px;
}
.widget-value.pos { color: var(--pos); }
.widget-value.neg { color: var(--neg); }

.widget-gainer   { border-color: rgba(159,197,90,0.3); }
.widget-loser    { border-color: rgba(217,107,74,0.3); }
.widget-hot      { border-color: rgba(212,168,74,0.35); }
.widget-trending { border-color: rgba(212,168,74,0.25); }

/* === PULSE-EFFEKT bei Kurs-Änderung === */
@keyframes pulse-glow-pos {
  0%   { background: rgba(159,197,90,0);   color: var(--cream); }
  20%  { background: rgba(159,197,90,0.35); color: var(--pos); }
  100% { background: rgba(159,197,90,0);   color: var(--cream); }
}
@keyframes pulse-glow-neg {
  0%   { background: rgba(217,107,74,0);   color: var(--cream); }
  20%  { background: rgba(217,107,74,0.35); color: var(--neg); }
  100% { background: rgba(217,107,74,0);   color: var(--cream); }
}
.pulse-pos {
  animation: pulse-glow-pos 2.5s ease-out;
  border-radius: 4px;
  padding: 1px 6px;
  margin: -1px -6px;
}
.pulse-neg {
  animation: pulse-glow-neg 2.5s ease-out;
  border-radius: 4px;
  padding: 1px 6px;
  margin: -1px -6px;
}

/* === TILT-CARD 3D-Effekt === */
.tilt-card {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

/* === SLIDE-IN Animation für Listen === */
.row, .row-spark, .widget, .achv-card, .news-card {
  animation: slide-in 0.35s ease-out both;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger — nur die ersten 6 Elemente, sonst wird's zäh */
.row:nth-child(1), .row-spark:nth-child(1) { animation-delay: 0.02s; }
.row:nth-child(2), .row-spark:nth-child(2) { animation-delay: 0.05s; }
.row:nth-child(3), .row-spark:nth-child(3) { animation-delay: 0.08s; }
.row:nth-child(4), .row-spark:nth-child(4) { animation-delay: 0.11s; }
.row:nth-child(5), .row-spark:nth-child(5) { animation-delay: 0.14s; }
.row:nth-child(6), .row-spark:nth-child(6) { animation-delay: 0.17s; }

/* === BUTTON-RIPPLE beim Klick === */
.btn, .achv-card, .widget {
  position: relative;
  overflow: hidden;
}
.btn:active::after,
.achv-card:active::after,
.widget:active::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 300%; height: 300%;
  background: radial-gradient(circle, rgba(212,168,74,0.3) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  animation: ripple 0.5s ease-out;
  pointer-events: none;
}
@keyframes ripple {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* Reduziere Animationen falls der User es bevorzugt */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .row, .row-spark, .widget, .achv-card, .news-card { animation: none; }
  .pulse-pos, .pulse-neg { animation: none; }
}

/* =============================================================================
   STOCK DETAIL — Neuer Hero-Umbau, Chart oben, Stats-Streifen
   ============================================================================= */

/* === HERO — kompakt zweizeilig === */
.stock-hero-new {
  background: linear-gradient(135deg, #2a3520 0%, #1d2a1a 100%);
  border: 1px solid rgba(212,168,74,0.25);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.hero-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.hero-logo-small {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.hero-logo-small img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.hero-logo-placeholder {
  background: linear-gradient(135deg, #3a2918 0%, #261a0e 100%);
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
  padding: 0;
  border: 1px solid var(--bronze);
}

.hero-info {
  flex: 1;
  min-width: 0;
}
.hero-ticker-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hero-ticker {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1;
}
.branch-tag-inline {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(212,168,74,0.12);
  border: 1px solid rgba(212,168,74,0.2);
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--cream);
  line-height: 1.2;
}

/* Preis-Zeile: großer Preis, Change-Pill, kleine Sparkline */
.hero-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(212,168,74,0.15);
}
.hero-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-price {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-change-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
}
.hero-change-pill.pos {
  background: rgba(159,197,90,0.20);
  color: var(--pos);
  border: 1px solid rgba(159,197,90,0.4);
}
.hero-change-pill.neg {
  background: rgba(217,107,74,0.20);
  color: var(--neg);
  border: 1px solid rgba(217,107,74,0.4);
}
.hero-trend-mini {
  width: 100px;
  height: 40px;
  flex-shrink: 0;
  opacity: 0.6;
  position: relative;
}
.hero-trend-mini .spark-bg {
  position: absolute;
  inset: 0;
}

/* === CHART-BLOCK === */
.chart-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.chart-tabs {
  display: flex;
  gap: 4px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border-soft);
}
.chart-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chart-tab:hover {
  background: rgba(212,168,74,0.08);
  color: var(--cream);
}
.chart-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
  color: #1a1208;
  box-shadow: 0 2px 8px rgba(212,168,74,0.4);
}

.chart-container {
  padding: 16px 8px;
  min-height: 200px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 100%);
}
.chart-container svg {
  width: 100%;
  height: 220px !important;
  display: block;
}

.chart-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  padding: 0;
}
.chart-stats-strip .stat-cell {
  background: var(--bg-elev);
  padding: 10px 8px;
  text-align: center;
}
.chart-stats-strip .stat-label {
  font-size: 9px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-weight: 600;
}
.chart-stats-strip .stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--cream);
}
.chart-stats-strip .stat-value.pos { color: var(--pos); }
.chart-stats-strip .stat-value.neg { color: var(--neg); }

/* === ORDER-BOOK-PREVIEW === */
.order-book-preview {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.order-book-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-weight: 600;
}
.order-book-bar {
  display: flex;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.ob-buy, .ob-sell {
  display: flex;
  align-items: center;
  transition: width 0.3s;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 10px;
}
.ob-buy {
  background: linear-gradient(90deg, rgba(159,197,90,0.4), rgba(159,197,90,0.7));
  border-right: 2px solid var(--bg);
  justify-content: flex-start;
}
.ob-sell {
  background: linear-gradient(90deg, rgba(217,107,74,0.7), rgba(217,107,74,0.4));
  justify-content: flex-end;
}
.order-book-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
}
.ob-pct-buy { color: var(--pos); }
.ob-pct-sell { color: var(--neg); }

/* === META-GRID (Marktkap, Halter, Supply) === */
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.meta-cell {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.meta-supply {
  grid-column: 1 / -1;  /* Supply-Zeile über beide Spalten */
  align-items: flex-start;
}
.meta-icon {
  font-size: 22px;
  flex-shrink: 0;
  opacity: 0.8;
}
.meta-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  font-weight: 600;
}
.meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--cream);
}

/* === Beschreibung === */
.stock-description {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-style: italic;
}

/* Mobile: bei sehr schmalen Screens 3 Stats statt 4 */
@media (max-width: 380px) {
  .chart-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-price { font-size: 26px; }
  .hero-ticker { font-size: 22px; }
}

/* =============================================================================
   STECKBRIEF-OVERLAY (Klick auf Aktien-Logo)
   ============================================================================= */

/* Logo-Trigger als Button — Default-Styles reseten */
.logo-trigger {
  border: none;
  cursor: pointer;
  padding: 6px;
  position: relative;
  font-family: inherit;
  color: inherit;
  transition: transform 0.15s;
}
.logo-trigger:hover { filter: brightness(1.05); }
.logo-trigger .zoom-hint {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(212,168,74,0.9);
  color: #1a1208;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
  pointer-events: none;
}
.logo-trigger:hover .zoom-hint { opacity: 1; }

/* Overlay-Container */
.steckbrief-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
/* Wichtig: hidden-Attribut soll display:flex überschreiben */
.steckbrief-overlay[hidden] {
  display: none !important;
}
.steckbrief-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.steckbrief-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

/* Karte */
.steckbrief-card {
  position: relative;
  background: linear-gradient(135deg, #2a3520 0%, #1d2a1a 100%);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 28px 22px 20px;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(212,168,74,0.15);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s ease-out;
}
.steckbrief-overlay.is-open .steckbrief-card {
  transform: scale(1);
}

.steckbrief-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.steckbrief-close:hover {
  background: rgba(217,107,74,0.15);
  color: var(--neg);
}

.steckbrief-logo {
  width: 160px;
  height: 160px;
  margin: 0 auto 18px;
  background: #fff;
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.steckbrief-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.steckbrief-logo-placeholder {
  background: linear-gradient(135deg, #3a2918 0%, #261a0e 100%);
  color: var(--gold);
  font-weight: 700;
  font-size: 32px;
  padding: 0;
  border: 1px solid var(--bronze);
}

.steckbrief-ticker {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 4px;
}
.steckbrief-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.2;
}

.steckbrief-description {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.25);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
}

.steckbrief-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(212,168,74,0.2);
}
.steckbrief-stat {
  text-align: center;
}
.steckbrief-stat .stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-weight: 600;
}
.steckbrief-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
}
.steckbrief-stat .stat-value.pos { color: var(--pos); }
.steckbrief-stat .stat-value.neg { color: var(--neg); }

@media (max-width: 480px) {
  .steckbrief-card { padding: 24px 18px 16px; }
  .steckbrief-logo { width: 140px; height: 140px; }
  .steckbrief-ticker { font-size: 24px; }
  .steckbrief-name { font-size: 18px; }
}

/* =============================================================================
   MODERN FINTECH OVERRIDES
   Überschreibt alle Legacy-Styles mit dem modernen Look
   ============================================================================= */

/* Body: kompletter schwarzer Grund */
body {
  background:
    radial-gradient(ellipse at top, rgba(240,184,80,0.03) 0%, transparent 50%),
    var(--bg);
}

/* === TOPBAR — cleaner === */
.topbar {
  background: rgba(10,10,18,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-cash {
  background: linear-gradient(135deg, rgba(240,184,80,0.15) 0%, rgba(240,184,80,0.05) 100%);
  border: 1px solid rgba(240,184,80,0.25);
  color: var(--gold);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

/* Topbar Icons in gerundeten Circles */
.topbar a[title="Profil & Einstellungen"],
.topbar a[title="Logout"] {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  transition: background 0.15s, border-color 0.15s;
}
.topbar a[title="Profil & Einstellungen"]:hover,
.topbar a[title="Logout"]:hover {
  background: rgba(240,184,80,0.1);
  border-color: rgba(240,184,80,0.3);
}

/* === TICKER-BAND — moderner, mit Glow-Punkten === */
.ticker-band {
  background: linear-gradient(180deg, #08080f 0%, #0d0d16 100%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.ticker-item {
  padding: 4px 8px;
  position: relative;
}
.ticker-sym {
  color: var(--cream);
  font-weight: 700;
}
.ticker-up   .ticker-sym::before,
.ticker-down .ticker-sym::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.ticker-up .ticker-sym::before {
  background: var(--pos);
  box-shadow: 0 0 6px var(--pos-glow);
}
.ticker-down .ticker-sym::before {
  background: var(--neg);
  box-shadow: 0 0 6px var(--neg-glow);
}
.ticker-up .ticker-arrow, .ticker-up .ticker-pct { color: var(--pos); }
.ticker-down .ticker-arrow, .ticker-down .ticker-pct { color: var(--neg); }

/* === KARTEN — modern gerundet === */
.card, .card-stat, .stat-cell,
.row, .row-spark, .row-glass,
.stock-hero-new, .chart-block, .order-book-preview,
.meta-cell, .stock-description,
.rules-content, .empty {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Row-Modifier bleiben spezifisch */
.row-spark {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
}

/* === HERO — großer Preis wie Screenshot === */
.stock-hero-new {
  padding: 20px;
  background: var(--surface);
}
.hero-logo-small {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 40px rgba(240,184,80,0.15);
}
.hero-ticker { color: var(--cream); font-size: 28px; }
.hero-name { color: var(--text-dim); font-size: 15px; margin-top: 2px; }
.branch-tag-inline {
  background: transparent;
  border: 1px solid rgba(240,184,80,0.3);
  color: var(--gold);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 6px;
}

.hero-price-line { border-top: none; padding-top: 4px; }
.hero-price { font-size: 42px; font-weight: 300; color: var(--text); letter-spacing: -0.03em; }
.hero-change-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.hero-change-pill.pos {
  background: rgba(125,217,96,0.12);
  border: 1px solid rgba(125,217,96,0.3);
  color: var(--pos);
}
.hero-change-pill.neg {
  background: rgba(255,107,82,0.12);
  border: 1px solid rgba(255,107,82,0.3);
  color: var(--neg);
}

/* Hero-Sparkline mit Glow-Endpunkt */
.hero-trend-mini {
  width: 140px;
  height: 60px;
  opacity: 1;
  position: relative;
}
.hero-trend-mini .spark-bg polyline {
  stroke-width: 2;
  filter: drop-shadow(0 0 4px currentColor);
}

/* === CHART-BLOCK — schöner === */
.chart-block { padding: 8px; }
.chart-tabs {
  background: transparent;
  padding: 6px;
  border-bottom: none;
  gap: 6px;
}
.chart-tab {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-mute);
}
.chart-tab:hover {
  background: rgba(255,255,255,0.04);
  color: var(--cream);
}
.chart-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #1a1208;
  box-shadow: 0 4px 12px rgba(240,184,80,0.4), 0 0 20px rgba(240,184,80,0.2);
}
.chart-container {
  padding: 16px;
  background: transparent;
}
.chart-container svg {
  height: auto !important;
  overflow: visible;
}

/* Stats-Streifen unter dem Chart */
.chart-stats-strip {
  background: transparent;
  gap: 0;
  border-top: 1px solid var(--border-soft);
}
.chart-stats-strip .stat-cell {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-soft);
  border-radius: 0;
  box-shadow: none;
  padding: 14px 8px;
}
.chart-stats-strip .stat-cell:last-child { border-right: none; }
.chart-stats-strip .stat-value { font-size: 15px; font-weight: 600; }

/* === ORDER-BOOK-BAR === */
.order-book-preview { padding: 16px; }
.ob-buy {
  background: linear-gradient(90deg, rgba(125,217,96,0.3), rgba(125,217,96,0.6));
}
.ob-sell {
  background: linear-gradient(90deg, rgba(255,107,82,0.6), rgba(255,107,82,0.3));
}

/* === POSITION-CARD === */
.card {
  padding: 18px;
}
.card .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 600;
}
.card .big {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
}
.card .sub { font-size: 13px; font-weight: 600; }

/* === BUTTONS === */
.btn {
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #1a1208;
  box-shadow: 0 4px 14px rgba(240,184,80,0.3);
}
.btn:hover {
  box-shadow: 0 6px 20px rgba(240,184,80,0.4);
}
.btn:active { transform: scale(0.98); }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--cream);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: none;
}

/* Kauf/Verkauf-Buttons — grün und rot */
.btn-buy {
  background: linear-gradient(135deg, rgba(125,217,96,0.2) 0%, rgba(125,217,96,0.1) 100%);
  border: 1px solid rgba(125,217,96,0.4);
  color: var(--pos);
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(125,217,96,0.15);
}
.btn-buy:hover {
  background: linear-gradient(135deg, rgba(125,217,96,0.3) 0%, rgba(125,217,96,0.15) 100%);
  box-shadow: 0 6px 20px rgba(125,217,96,0.25);
}
.btn-sell {
  background: linear-gradient(135deg, rgba(255,107,82,0.2) 0%, rgba(255,107,82,0.1) 100%);
  border: 1px solid rgba(255,107,82,0.4);
  color: var(--neg);
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(255,107,82,0.15);
}
.btn-sell:hover {
  background: linear-gradient(135deg, rgba(255,107,82,0.3) 0%, rgba(255,107,82,0.15) 100%);
  box-shadow: 0 6px 20px rgba(255,107,82,0.25);
}

/* === FORM-INPUTS === */
input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(240,184,80,0.15);
}
input::placeholder { color: var(--text-mute); }
.form-group label {
  display: block;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-group { margin-bottom: 16px; }

/* === BOTTOM-NAV === */
.bottomnav {
  background: rgba(10,10,18,0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
}
.bottomnav a {
  color: var(--text-mute);
  transition: color 0.15s;
  position: relative;
  padding-top: 12px;
  padding-bottom: 10px;
}
.bottomnav a.active {
  color: var(--gold);
}
.bottomnav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--gold);
}

/* === WIDGETS auf Dashboard === */
.widget {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.widget-ticker { color: var(--cream); }

/* === PULSE-Effekt anpassen === */
.pulse-pos {
  animation: pulse-pos-modern 2s ease-out;
}
.pulse-neg {
  animation: pulse-neg-modern 2s ease-out;
}
@keyframes pulse-pos-modern {
  0%   { color: var(--text); text-shadow: 0 0 0 transparent; }
  20%  { color: var(--pos);  text-shadow: 0 0 20px var(--pos-glow); }
  100% { color: var(--text); text-shadow: 0 0 0 transparent; }
}
@keyframes pulse-neg-modern {
  0%   { color: var(--text); text-shadow: 0 0 0 transparent; }
  20%  { color: var(--neg);  text-shadow: 0 0 20px var(--neg-glow); }
  100% { color: var(--text); text-shadow: 0 0 0 transparent; }
}

/* === AUTH-Wrap === */
.auth-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* === Achievement-Card === */
.achv-card {
  background: linear-gradient(135deg, rgba(240,184,80,0.10) 0%, var(--surface) 100%);
  border: 1px solid rgba(240,184,80,0.25);
  border-radius: var(--r-lg);
}
.achv-icon {
  background: rgba(240,184,80,0.15);
  border-radius: 12px;
}

/* === EMPTY-States === */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-mute);
}
.empty .ico { font-size: 42px; margin-bottom: 12px; opacity: 0.5; }

/* === Flash-Messages === */
.flash {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  margin-bottom: 16px;
}
.flash.err {
  background: rgba(255,107,82,0.1);
  border: 1px solid rgba(255,107,82,0.3);
  color: var(--neg);
}
.flash.ok {
  background: rgba(125,217,96,0.1);
  border: 1px solid rgba(125,217,96,0.3);
  color: var(--pos);
}

/* === Sparklines in Rows: mit Glow === */
.row-spark .spark-bg polyline {
  filter: drop-shadow(0 0 3px currentColor);
}

/* === Site-Credit (Seitenfuß über der Bottom-Nav) === */
.site-credit {
  margin: 36px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-mute);
}
.site-credit a { color: var(--text-mute); text-decoration: none; }
.site-credit a:hover { color: var(--gold); }

/* =============================================================================
   STAMMTISCH
   ============================================================================= */
.bottomnav a { font-size: 9.5px; padding: 9px 0 11px; }

.back-link { display:inline-block; font-size:13px; color:var(--text-dim); text-decoration:none; margin-bottom:8px; }
.back-link:hover { color:var(--gold); }

.post-stream { display:flex; flex-direction:column; gap:8px; }
.thread-replies { margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--border); display:flex; flex-direction:column; gap:8px; }

.post {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 12px 14px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  animation: slide-in .25s ease-out both;
}
.post-self { border-color: rgba(240,184,80,0.25); background: linear-gradient(135deg, rgba(240,184,80,0.06), var(--surface)); }
.post-thread { border-left: 3px solid var(--gold); }

.post-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.post-user { font-weight:700; color:var(--cream); font-size:14px; }
.post-self .post-user { color:var(--gold); }
.post-time { font-family:var(--font-mono); font-size:11px; color:var(--text-mute); flex:1; }
.post-del { margin:0; }
.post-del button { background:none; border:none; color:var(--text-mute); font-size:18px; line-height:1; cursor:pointer; padding:0 4px; }
.post-del button:hover { color:var(--neg); }

.post-title-link { text-decoration:none; }
.post-title { display:block; font-family:var(--font-display); font-size:16px; font-weight:700; color:var(--gold); margin-bottom:4px; }
.post-title-link:hover .post-title { text-decoration:underline; }

.post-body { font-size:15px; line-height:1.55; color:var(--text); word-wrap:break-word; }
.post-body a { color:var(--gold); }
.post-ticker { font-family:var(--font-mono); font-weight:700; color:var(--gold); }

.post-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; }
.post-foot .rx-btn { padding:3px 9px 3px 8px; font-size:11px; }
.post-replies { font-size:12px; color:var(--text-dim); text-decoration:none; white-space:nowrap; padding:4px 8px; border-radius:8px; }
.post-replies:hover { color:var(--gold); background:rgba(240,184,80,0.08); }

/* Eingabe — oben, im Fluss */
.composer-top {
  background: var(--surface);
  border: 1px solid rgba(240,184,80,0.25);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.composer-title { margin-bottom: 8px; }
.composer-title input { padding: 10px 14px; font-size: 14px; border-radius: 12px; }
.composer-row { display:flex; align-items:flex-end; gap:8px; }
.composer-row textarea {
  flex:1; resize:none; min-height:44px; max-height:140px;
  padding: 11px 14px; font-size:15px; line-height:1.4;
  border-radius: 14px;
}
.composer-toggle, .composer-send {
  width:44px; height:44px; flex-shrink:0;
  border-radius: 50%; border:1px solid var(--border);
  background: rgba(255,255,255,0.05); color:var(--text-dim);
  font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition: background .15s, color .15s;
}
.composer-toggle.on { background: rgba(240,184,80,0.15); border-color: rgba(240,184,80,0.4); color: var(--gold); }
.composer-send { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color:#1a1208; border:none; box-shadow: 0 4px 12px rgba(240,184,80,0.3); }
.composer-send:active { transform: scale(0.95); }

.new-posts-btn {
  position: fixed; left:50%; transform:translateX(-50%); top: 160px; z-index: 61;
  background: var(--gold); color:#1a1208; border:none; border-radius:999px;
  padding: 8px 16px; font-weight:700; font-size:13px; cursor:pointer;
  box-shadow: 0 6px 20px rgba(240,184,80,0.4);
}

.row-avail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
  white-space: nowrap;
}
.row-avail span { color: var(--text-dim); font-weight: 600; }
.row-avail .avail-low { color: var(--gold); }
.row-avail .avail-out { color: var(--neg); font-weight: 700; }
