/* ============================================================
 * Greineisen Kunden-Portal — eigene Styles
 * Geladen NACH Bootstrap (Overrides erlaubt).
 * Vendor-Assets (Bootstrap, Bootstrap Icons) liegen unter
 *   /public/assets/vendor/
 * und werden gemäß DSGVO ausschließlich lokal ausgeliefert.
 * ============================================================ */

/* ------------------------------------------------------------
 * Dunkelmodus (data-bs-theme="dark", gesetzt von /assets/js/theme.js)
 *
 * Bootstrap 5.3 schaltet fast alles selbst um. Ausnahmen sind die
 * ausdruecklich HELLEN Klassen: .table-light und .text-bg-light bleiben
 * sonst hell und leuchten als weisse Balken aus der dunklen Seite.
 * ------------------------------------------------------------ */
[data-bs-theme="dark"] .table-light {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: var(--bs-tertiary-bg);
    --bs-table-border-color: var(--bs-border-color);
    --bs-table-striped-bg: var(--bs-secondary-bg);
    --bs-table-hover-bg: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .text-bg-light {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-tertiary-bg) !important;
}
[data-bs-theme="dark"] .text-bg-light.text-dark {
    color: var(--bs-body-color) !important;
}

/* Umschalter in der Kopfleiste: der gewaehlte Eintrag ist markiert. */
.theme-wahl .dropdown-item.active .bi-check2 { visibility: visible; }
.theme-wahl .dropdown-item .bi-check2 { visibility: hidden; }

/* ------------------------------------------------------------
 * Boerse / Berater: Fortschritt bis zur Lernschwelle.
 * ⚡ <progress> statt Bootstrap-.progress: dessen Breite kaeme aus einem
 * style-Attribut, und das verbietet die Content-Security-Policy.
 * ------------------------------------------------------------ */
.boerse-fortschritt {
    display: block;
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 3px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bs-secondary-bg);
    color: var(--bs-primary);
}
.boerse-fortschritt::-webkit-progress-bar   { background: var(--bs-secondary-bg); }
.boerse-fortschritt::-webkit-progress-value { background: var(--bs-primary); }
.boerse-fortschritt::-moz-progress-bar      { background: var(--bs-primary); }
.boerse-fortschritt.voll::-webkit-progress-value { background: var(--bs-success); }
.boerse-fortschritt.voll::-moz-progress-bar      { background: var(--bs-success); }

/* ------------------------------------------------------------
 * Hilfsklassen statt style="..."
 *
 * ⚡ Die .htaccess setzt "Content-Security-Policy: default-src 'self'".
 * Die verbietet nicht nur Inline-Skripte, sondern auch style-Attribute
 * und <style>-Bloecke in der Seite. Deshalb stehen alle Einzelwerte hier.
 * ------------------------------------------------------------ */
.ge-mw-420     { max-width: 420px; }
.ge-mw-520     { max-width: 520px; }
.ge-mw-10rem   { max-width: 10rem; }
.ge-mw-32rem   { max-width: 32rem; }
.ge-minw-220   { min-width: 220px; }
.ge-minw-6rem  { min-width: 6rem; }
.ge-minw-2rem  { min-width: 2rem; }
.ge-minw-15rem { min-width: 1.5rem; }
.ge-minw-2-6rem { min-width: 2.6rem; }
.ge-pt-4rem    { padding-top: 4rem; }
.ge-icon-2     { font-size: 2rem; }
.ge-icon-3     { font-size: 3rem; }
.ge-icon-4     { font-size: 4rem; }
.ge-fs-11px    { font-size: 11px; }
.ge-pre-line   { white-space: pre-line; }
.ge-pre-wrap   { white-space: pre-wrap; }
.ge-pre-code   { white-space: pre; overflow-x: auto; font-size: .85rem; }
.ge-scroll-20em { max-height: 20em; overflow: auto; }
.ge-zeiger     { cursor: pointer; }
.ge-sticky-kopf { top: 0; z-index: 5; }
.ge-nach-oben  { right: 1.25rem; bottom: 1.25rem; width: 2.75rem; height: 2.75rem; z-index: 6; }
.ge-h-05       { height: .5rem; }
.ge-h-065      { height: .65rem; }
.ge-h-09       { height: .9rem; }

/* Fortschrittsbalken: Breite in 5-%-Stufen (feiner sieht bei .5 rem Hoehe niemand). */
.ge-w-0 { width: 0%; }
.ge-w-5 { width: 5%; }
.ge-w-10 { width: 10%; }
.ge-w-15 { width: 15%; }
.ge-w-20 { width: 20%; }
.ge-w-25 { width: 25%; }
.ge-w-30 { width: 30%; }
.ge-w-35 { width: 35%; }
.ge-w-40 { width: 40%; }
.ge-w-45 { width: 45%; }
.ge-w-50 { width: 50%; }
.ge-w-55 { width: 55%; }
.ge-w-60 { width: 60%; }
.ge-w-65 { width: 65%; }
.ge-w-70 { width: 70%; }
.ge-w-75 { width: 75%; }
.ge-w-80 { width: 80%; }
.ge-w-85 { width: 85%; }
.ge-w-90 { width: 90%; }
.ge-w-95 { width: 95%; }
.ge-w-100 { width: 100%; }

/* ---- Boerse ---------------------------------------------------------- */
/* Untere Leiste: sechs Knoepfe auf 390 Pixeln - die Schrift muss kleiner
   sein als .small, sonst bricht „Watchlist" um und die Leiste wird doppelt so hoch. */
.boerse-knopf { font-size: .7rem; line-height: 1.1; }
/* Meldungen ohne zugeordnetes Papier: nur auf Wunsch (Schalter, boerse.js). */
.boerse-rauschen { display: none; }
body.rauschen-an .boerse-rauschen { display: block; }
/* Aktualisieren-Knopf: das Symbol dreht sich, bis die Seite neu da ist. */
@keyframes boerse-drehen { to { transform: rotate(360deg); } }
.boerse-dreht { display: inline-block; animation: boerse-drehen .8s linear infinite; }

/* ---- Börse: Echtgeld auf einen Blick vom Spielgeld unterscheiden
   (leicht goldener Grund, hell wie dunkel - durchscheinend). */
.ge-echtgeld {
  background: rgba(212, 160, 23, 0.09);
  border: 1px solid rgba(212, 160, 23, 0.45);
  border-left: 4px solid #d4a017;
  border-radius: .5rem;
  padding: .6rem .75rem;
  margin: 1rem 0;
}
.ge-echtgeld .list-group-item { background-color: rgba(212, 160, 23, 0.06); }
.ge-echtgeld-marke {
  display: inline-block; padding: .05rem .5rem; border-radius: .25rem;
  background: #d4a017; color: #1a1400; font-weight: 700; letter-spacing: .03em;
}

/* ---- Börse: Reiterleiste zum Wischen (Handy) und Ziehen/Mausrad (Desktop) */
.boerse-unten { position: sticky; bottom: 0; z-index: 1030; padding-bottom: max(.25rem, env(safe-area-inset-bottom, 0px)); }
/* sonst stuende die Leiste am Seitenende ueber Abstand und Fusszeile - sie soll ganz unten bleiben */
main:has(.boerse-unten) { padding-bottom: 0 !important; }
body:has(.boerse-unten) > footer { display: none; }
.boerse-reiter { overflow: hidden; justify-content: center; touch-action: pan-y; }
.boerse-reiter .nav-item { flex: 0 0 auto; min-width: 4.1rem; }
.boerse-reiter .nav-link { white-space: nowrap; }
/* Blaettern: Seiten zu je n Reitern, Pfeile links/rechts. Ohne JS: alles in einer Zeile. */
.boerse-blaettern { display: none; width: 24px; flex: 0 0 24px; color: var(--bs-body-color); text-decoration: none; }
.boerse-leiste.seiten .boerse-blaettern { display: inline-flex; align-items: center; justify-content: center; }
.boerse-leiste.seiten .boerse-blaettern.aus { visibility: hidden; }
.boerse-leiste.seiten .boerse-reiter { gap: 0 !important; }
.boerse-leiste.seiten .boerse-reiter .nav-item { flex: 1 1 0; min-width: 0; }
.boerse-leiste.seiten .boerse-reiter .nav-link { padding-left: 0 !important; padding-right: 0 !important; }
/* ---- Depot: Spielgeld ausblenden */
.boerse-depot.ohne-spielgeld .boerse-depot-spiel { display: none !important; }
.boerse-depot-echt { background: rgba(212, 160, 23, 0.07); border-left: 4px solid #d4a017; }
.boerse-blaettern:focus-visible { outline: 2px solid var(--bs-primary); border-radius: .375rem; }
.ge-notaus-grund { max-width: 16rem; }

/* ---- Börse: Branchen-Wärmekarte */
.boerse-waerme { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.boerse-waerme-feld { border-radius: .5rem; padding: .5rem .6rem; border: 1px solid var(--bs-border-color); }
.boerse-wm3 { background: rgba(220, 53, 69, .35); } .boerse-wm2 { background: rgba(220, 53, 69, .22); }
.boerse-wm1 { background: rgba(220, 53, 69, .10); } .boerse-wp0 { background: transparent; }
.boerse-wp1 { background: rgba(25, 135, 84, .10); } .boerse-wp2 { background: rgba(25, 135, 84, .22); }
.boerse-wp3 { background: rgba(25, 135, 84, .35); }

/* ---- Börse: Formkurve der Rangliste */
.boerse-formkurve { display: inline-flex; gap: 2px; vertical-align: middle; }
.boerse-form { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; background: var(--bs-secondary-bg); }
.boerse-form.gut { background: var(--bs-success); } .boerse-form.mittel { background: var(--bs-warning); }
.boerse-form.schlecht { background: var(--bs-danger); }

/* ---- Drucken (Steuer-Datenblatt): nur der Inhalt, schwarz auf weiß */
@media print {
  .navbar, footer, .ge-nicht-drucken, .alert-dismissible .btn-close { display: none !important; }
  :root, [data-bs-theme="dark"] {
    --bs-body-bg: #fff; --bs-body-color: #000; --bs-border-color: #bbb;
    --bs-secondary-color: #555; --bs-emphasis-color: #000;
  }
  body { background: #fff !important; color: #000 !important; }
  .table { --bs-table-color: #000; --bs-table-bg: transparent; }
  .boerse-steuer { padding: 0 !important; }
}

/* Legende der Vergleichslinie */
.boerse-legende-strich { display: inline-block; width: 1.4rem; border-top: 2px dashed currentColor; opacity: .5; vertical-align: middle; }

/* Protokollzeilen umbrechen statt seitlich schieben */
.ge-umbruch { white-space: pre-wrap; word-break: break-word; }

/* ---- Agenten-Uebersicht: Lernfortschritt */
.boerse-lern { display: block; width: 100%; height: .4rem; margin: .25rem 0; border: 0; border-radius: .2rem;
  background: var(--bs-secondary-bg); color: var(--bs-secondary); appearance: none; -webkit-appearance: none; }
.boerse-lern::-webkit-progress-bar { background: var(--bs-secondary-bg); border-radius: .2rem; }
.boerse-lern::-webkit-progress-value { background: var(--bs-warning); border-radius: .2rem; }
.boerse-lern::-moz-progress-bar { background: var(--bs-warning); border-radius: .2rem; }
.boerse-lern.gelernt::-webkit-progress-value { background: var(--bs-primary); }
.boerse-lern.gelernt::-moz-progress-bar { background: var(--bs-primary); }

/* ---- Rangliste: drei Spalten nebeneinander, auch auf dem Handy */
.boerse-rang3 .list-group-item { font-size: .85rem; line-height: 1.25; }
.boerse-rang3 .boerse-form { width: .4rem; height: .4rem; }

/* Formkurve: Tage/Wochen ohne genug Voten als leerer Ring statt unsichtbar */
.boerse-form.leer { background: transparent; box-shadow: inset 0 0 0 1px var(--bs-secondary-color); opacity: .5; }

/* Boerse: interaktive Charts (boerse-charts.js) */
.boerse-chart { height: 260px; position: relative; }
.boerse-chart-kerzen { height: 240px; }
.boerse-chart-legende { min-height: 1.4em; display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.boerse-legende-eintrag { white-space: nowrap; }
.boerse-chip { border: 1px solid var(--bs-border-color); border-radius: 999px; padding: .1rem .55rem;
               margin: 0 .3rem .3rem 0; font-size: .78rem; color: var(--bs-secondary-color); background: transparent; }
.boerse-chip.aktiv { color: var(--bs-body-color); border-color: var(--bs-body-color); }
.boerse-chip-punkt { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; vertical-align: baseline; }
.boerse-marke-kauf { color: #1baf7a; }
.boerse-marke-verkauf { color: #e34948; }

/* Boerse: Live-Zentrale (boerse-live.js) - immer dunkle Buehne, auch im hellen Thema */
.boerse-live-buehne { position: relative; border-radius: 16px; overflow: hidden; color: #e8ecf6;
    background: radial-gradient(ellipse at 50% 45%, #1a2750 0%, #0d1530 45%, #070b18 100%);
    box-shadow: 0 10px 30px rgba(7, 11, 24, .35), inset 0 0 0 1px rgba(120, 150, 255, .12); }
.boerse-live-kopf { padding: .7rem .9rem .2rem; }
.boerse-live-titel { font-weight: 700; letter-spacing: .14em; font-size: .78rem; color: #cfe0ff; }
.boerse-live-punkt { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #ff4d5e;
    margin-right: .35rem; box-shadow: 0 0 8px #ff4d5e; animation: boerse-live-blink 1.6s ease-in-out infinite; }
@keyframes boerse-live-blink { 50% { opacity: .25; } }
.boerse-live-stand { font-size: .75rem; color: #8a94ad; font-variant-numeric: tabular-nums; }
.boerse-live-hud { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; padding: .35rem .9rem .2rem; }
.boerse-live-hud > div { background: rgba(120, 150, 255, .07); border: 1px solid rgba(120, 150, 255, .14);
    border-radius: 10px; padding: .35rem .4rem; text-align: center; min-width: 0; }
.boerse-live-zahl { display: block; font-weight: 700; font-size: 1.15rem; line-height: 1.2; font-variant-numeric: tabular-nums;
    color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Gesamtwert-Box: am PC nur der breite Text, Handy-Teile aus (siehe Handy-Block unten) */
.nur-handy { display: none; }
.boerse-live-hud-text { display: block; font-size: .66rem; color: #8a94ad; letter-spacing: .04em; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
.boerse-live-auf { color: #2fe6a0; text-shadow: 0 0 10px rgba(47, 230, 160, .45); }
.boerse-live-ab { color: #ff5d6c; text-shadow: 0 0 10px rgba(255, 93, 108, .45); }
.boerse-live-gold { color: #ffc94a; text-shadow: 0 0 10px rgba(255, 201, 74, .45); }
.boerse-live-hud { grid-template-columns: repeat(4, 1fr); }
.boerse-live-hud2 { grid-template-columns: repeat(3, 1fr); padding-top: 0; }
.boerse-live-hud2 .boerse-live-hud-text { white-space: normal; line-height: 1.25; }
.boerse-live-hud2.ohne-echt { grid-template-columns: repeat(2, 1fr); }
.boerse-live-kachel { background: rgba(120, 150, 255, .07); border: 1px solid rgba(120, 150, 255, .14);
    border-radius: 10px; padding: .35rem .4rem; text-align: center; min-width: 0; color: inherit; font: inherit; }
.boerse-live-hud2 > .boerse-live-echt { border-color: rgba(255, 201, 74, .35); background: rgba(255, 201, 74, .07); }
.boerse-live-echt .boerse-live-zahl { color: #ffd66b; }
button.boerse-live-claude { border-color: rgba(204, 140, 255, .4); background: rgba(170, 110, 255, .1); cursor: pointer;
    transition: background .2s, box-shadow .2s; }
button.boerse-live-claude:hover, button.boerse-live-claude:focus-visible { background: rgba(170, 110, 255, .22);
    box-shadow: 0 0 14px rgba(170, 110, 255, .45); outline: none; }
button.boerse-live-claude .boerse-live-zahl { color: #e2c4ff; }
button.boerse-live-claude.ist-aus { opacity: .6; border-style: dashed; }
.boerse-claude-rest { height: .5rem; accent-color: #8b5cf6; }
.boerse-claude-betrag { max-width: 9rem; }
.boerse-claude-knopf { min-width: 4.6rem; }
/* Handy: Spielgeld / Echtgeld / Cl. Konto in EINER Reihe - kurz beschriftet */
@media (max-width: 575.98px) {
    .boerse-live-hud2 .boerse-live-lang { display: none; }
    .boerse-live-hud2 .boerse-live-hud-text { white-space: nowrap; letter-spacing: 0; font-size: .6rem; text-overflow: clip; }
    .boerse-live-hud2 .boerse-live-zahl { font-size: 1.05rem; }
    .boerse-live-hud2 > * { padding-left: .2rem; padding-right: .2rem; }
}
.boerse-live-netz { height: 480px; }
.boerse-live-netz canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 575.98px) { .boerse-live-netz { height: 500px; } }
/* Handy: Live-Kopf kompakter, damit das Bild ohne Scrollen ueber die untere Leiste passt.
   Die Hoehe des Bildes setzt boerse-live.js passend zum Bildschirm (Mindesthoehe 420px). */
@media (max-width: 575.98px) {
    main:has(.boerse-unten) { padding-top: .6rem !important; }
    .boerse-live-kopf { padding: .45rem .7rem .1rem; }
    .boerse-live-titel { white-space: nowrap; letter-spacing: .1em; font-size: .72rem; }
    .boerse-live-stand { font-size: .66rem; text-align: right; line-height: 1.2; }
    .boerse-live-hud { gap: .3rem; padding: .25rem .6rem .15rem; }
    .boerse-live-hud2 { padding-top: 0; }
    .boerse-live-hud > div, .boerse-live-kachel { padding: .22rem .3rem; border-radius: 8px; }
    .boerse-live-zahl { font-size: 1rem; line-height: 1.15; }
    .boerse-live-hud2 .boerse-live-zahl { font-size: .98rem; }
    .boerse-live-hud-text { font-size: .6rem; }
    /* Gesamtwert-Box (28.09.2026): Handy zweiseitig - "3.500 €   −4" / "Kasse 5.410   45 %" */
    .boerse-live-hud2 .nur-breit { display: none; }
    .boerse-live-hud2 .nur-handy { display: inline; }
    .boerse-live-hud2 .boerse-live-kachel:first-child .boerse-live-zahl,
    .boerse-live-hud2 .boerse-live-kachel:first-child .boerse-live-hud-text,
    .boerse-live-hud2 .boerse-live-echt .boerse-live-zahl:has(.nur-handy),
    .boerse-live-hud2 .boerse-live-echt .boerse-live-hud-text:has(.nur-handy) { display: flex; align-items: baseline; gap: .25em; }
    .boerse-live-hud2 .boerse-live-rechts { margin-left: auto; font-weight: 600; white-space: nowrap; }
    .boerse-live-hud2 .boerse-live-zahl .boerse-live-rechts { font-size: .6em; }
    .boerse-live-hud2 .boerse-live-zahl.boerse-live-5stellig { font-size: .84rem; }
    .boerse-live-hud2 .boerse-live-zahl.boerse-live-6stellig { font-size: .74rem; }
    .boerse-live-band { padding: .28rem 0; margin-top: .3rem; font-size: .74rem; }
}
.boerse-live-band { overflow: hidden; white-space: nowrap; padding: .45rem 0; font-size: .8rem;
    background: rgba(0, 0, 0, .35); border-top: 1px solid rgba(120, 150, 255, .14);
    border-bottom: 1px solid rgba(120, 150, 255, .14); margin-top: .5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* Inhalt steht zweimal hintereinander: um die Haelfte schieben = nahtlos von vorn */
.boerse-live-band-inhalt { display: inline-block; padding-left: 0; animation: boerse-band 60s linear infinite; }
.boerse-live-meldung { margin-right: 2.8rem; }
.boerse-live-band { cursor: pointer; }
.boerse-live-band:focus-visible { outline: 1px solid #8fb4ff; outline-offset: -1px; }
.boerse-live-tempo { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .4rem .9rem;
    background: rgba(0, 0, 0, .45); border-bottom: 1px solid rgba(120, 150, 255, .14); font-size: .75rem; }
.boerse-live-tempo[hidden] { display: none; }
.boerse-live-tempo-text { color: #8a94ad; margin-right: .2rem; }
.boerse-live-tempo-knopf { background: rgba(120, 150, 255, .08); border: 1px solid rgba(120, 150, 255, .25); color: #c9d3ee;
    border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; line-height: 1.4; }
.boerse-live-tempo-knopf.aktiv { background: #8fb4ff; border-color: #8fb4ff; color: #0b1020; font-weight: 700; }
.boerse-live-rubrik { display: inline-block; margin-right: 1rem; padding: 0 .45rem; border-radius: 4px; font-size: .68rem;
    font-weight: 700; letter-spacing: .12em; color: #0b1020; background: #8fb4ff; vertical-align: 1px; }
.boerse-live-meldung.plus { color: #2fe6a0; }
.boerse-live-meldung.minus { color: #ff5d6c; }
.boerse-live-meldung.null { color: #8a94ad; }
@keyframes boerse-band { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .boerse-live-band { overflow-x: auto; }
    .boerse-live-band-inhalt { animation: none; padding-left: 0; }
    .boerse-live-punkt { animation: none; }
}

/* Konto-Knoepfe unter dem Kontenverlauf: EINE Zeile, seitlich wischen statt fuenf Zeilen hoch */
.boerse-chart-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.boerse-chart-chips::-webkit-scrollbar { display: none; }
.boerse-chart-chips .boerse-chip { flex: 0 0 auto; white-space: nowrap; }

/* ---- Rangliste (neu 26.09.2026): Handy ein Zeitraum mit Knoepfen, Desktop drei Spalten */
.boerse-rang-liste { display: flex; flex-direction: column; gap: .4rem; }
.boerse-rang-zeile { display: flex; gap: .6rem; align-items: center; padding: .55rem .7rem; border-radius: .7rem;
    background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); }
.boerse-rang-zeile.schwach { border-color: var(--bs-danger); background: var(--bs-danger-bg-subtle); }
.boerse-rang-platz { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.boerse-rang-platz.gold { background: linear-gradient(135deg, #ffe07a, #e0a800); color: #3b2a00; }
.boerse-rang-platz.silber { background: linear-gradient(135deg, #f1f3f5, #aeb5bd); color: #2b3035; }
.boerse-rang-platz.bronze { background: linear-gradient(135deg, #f0c09a, #b86b35); color: #3a1d08; }
.boerse-rang-platz.leer { background: transparent; border: 1px dashed var(--bs-secondary-color); color: var(--bs-secondary-color); }
.boerse-rang-mitte { flex: 1 1 auto; min-width: 0; }
.boerse-rang-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boerse-rang-quote { font-weight: 700; font-size: 1.05rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.boerse-rang-balken { display: block; width: 100%; height: .35rem; margin: .25rem 0 .2rem; border: 0; border-radius: .2rem;
    appearance: none; -webkit-appearance: none; background: var(--bs-secondary-bg); }
.boerse-rang-balken::-webkit-progress-bar { background: var(--bs-secondary-bg); border-radius: .2rem; }
.boerse-rang-balken::-webkit-progress-value { background: var(--bs-warning); border-radius: .2rem; }
.boerse-rang-balken::-moz-progress-bar { background: var(--bs-warning); border-radius: .2rem; }
.boerse-rang-balken.gut::-webkit-progress-value { background: var(--bs-success); }
.boerse-rang-balken.gut::-moz-progress-bar { background: var(--bs-success); }
.boerse-rang-balken.schlecht::-webkit-progress-value { background: var(--bs-danger); }
.boerse-rang-balken.schlecht::-moz-progress-bar { background: var(--bs-danger); }
.boerse-rang-zeile .boerse-form { width: .55rem; height: .55rem; }
.boerse-rang-titel { font-weight: 700; margin-bottom: .4rem; }
@media (min-width: 992px) {
    .boerse-rang-panes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
    .boerse-rang-panes > .tab-pane { display: block !important; opacity: 1 !important; }
}

/* Kerzen: Musterbilder und frisch erkannte Muster */
.boerse-muster-bild { flex: 0 0 120px; width: 120px; height: 56px; background: var(--bs-tertiary-bg); border-radius: .4rem; }
.boerse-muster-frisch { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.boerse-muster-karte { display: flex; gap: .5rem; align-items: center; padding: .5rem .6rem; border-radius: .6rem;
    border: 1px solid var(--bs-border-color-translucent); background: var(--bs-body-bg); }
.boerse-muster-karte.auf { border-left: 4px solid var(--bs-success); }
.boerse-muster-karte.ab { border-left: 4px solid var(--bs-danger); }
.boerse-muster-text { min-width: 0; line-height: 1.3; }

/* Depot: Nacht-Analyse von Claude */
.boerse-analyse summary { cursor: pointer; color: #7c4dff; }
.boerse-analyse[open] { background: rgba(124, 77, 255, .06); border-radius: 6px; padding: .3rem .5rem; }
.boerse-muster-bild.echt { flex-basis: 150px; width: 150px; height: 64px; }

/* Branchen-Waermekarte: Papiere je Branche aufklappbar */
.boerse-waerme-titel { margin-top: .3rem; }
.boerse-waerme-titel summary { cursor: pointer; opacity: .85; }
.boerse-waerme-titel ul { margin-top: .25rem; max-height: 14rem; overflow-y: auto; }
.boerse-waerme-titel li { line-height: 1.35; }

/* Auffaellig: zwei Kaesten je Meldung - was sich geaendert hat */
.boerse-auff-boxen { display: grid; grid-template-columns: repeat(2, minmax(0, 12rem)); gap: .3rem; margin: .25rem 0; }
.boerse-auff-box { border: 1px solid var(--bs-border-color); border-radius: .4rem; padding: .15rem .4rem; font-size: .8rem; line-height: 1.25; }
.boerse-auff-box > .small { font-size: .72rem; }
.boerse-auff-box.auf { border-left: 3px solid var(--bs-success); }
.boerse-auff-box.ab { border-left: 3px solid var(--bs-danger); }
.boerse-auff-wert { font-size: .9rem; font-weight: 600; }
.boerse-auff-pfeil { font-size: .7rem; }
.boerse-auff-box.auf .boerse-auff-pfeil { color: var(--bs-success); }
.boerse-auff-box.ab .boerse-auff-pfeil { color: var(--bs-danger); }
.boerse-auff-vorher { font-weight: 600; font-size: .78rem; color: var(--bs-body-color); background: var(--bs-tertiary-bg); border-radius: .25rem; padding: 0 .3rem; display: inline-block; }
.boerse-auff-hinweis { font-size: .7rem; }

/* ---- Drucken eines Teils (data-drucken, portal.js) ----
   Professionell wie das PDF: dunkelblaues Kopfband mit Goldlinie, Tabellen mit
   blauem Kopf und Zebra, Seitenzahl unten rechts. */
#ge-druckblatt { display: none; }
@page {
  size: A4;
  margin: 14mm 12mm 16mm 12mm;
  @bottom-left { content: "Greineisen Portal · Börse · Spielgeld ist Spielgeld, keine Anlageberatung"; font: 7pt sans-serif; color: #6c757d; }
  @bottom-right { content: "Seite " counter(page) " von " counter(pages); font: 7pt sans-serif; color: #6c757d; }
}
@media print {
  body.ge-druckt { background: #fff !important; }
  body.ge-druckt > *:not(#ge-druckblatt) { display: none !important; }
  body.ge-druckt #ge-druckblatt { display: block !important; }
  #ge-druckblatt { font-size: 9pt; color: #212529; }
  #ge-druckblatt, #ge-druckblatt * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  #ge-druckblatt .ge-nicht-drucken, #ge-druckblatt .btn-close, #ge-druckblatt [data-drucken], #ge-druckblatt .btn,
  #ge-druckblatt form, #ge-druckblatt .modal-footer, #ge-druckblatt [data-bs-toggle] { display: none !important; }
  #ge-druckblatt .ge-druck-kopf { background: #1f3a5f; color: #fff; border-bottom: 3pt solid #c4963c; border-radius: 4pt;
    padding: 9pt 13pt 8pt; margin-bottom: 12pt; break-inside: avoid; }
  #ge-druckblatt .ge-druck-marke { font-size: 6.5pt; letter-spacing: .12em; font-weight: 700; color: #c8d2e1; }
  #ge-druckblatt .ge-druck-kopf h1 { font-size: 17pt; font-weight: 700; margin: 2pt 0 1pt; color: #fff; }
  #ge-druckblatt .ge-druck-meta { font-size: 8pt; color: #dce4ee; }
  #ge-druckblatt h2, #ge-druckblatt h3, #ge-druckblatt .modal-title { font-size: 10.5pt; font-weight: 700; color: #1f3a5f;
    border-bottom: .6pt solid #d6dbe2; padding-bottom: 2pt; margin: 8pt 0 5pt; break-after: avoid; }
  #ge-druckblatt .modal-header { border: 0; padding: 0; }
  #ge-druckblatt .modal-body, #ge-druckblatt .modal-header { overflow: visible !important; max-height: none !important; }
  #ge-druckblatt .text-muted { color: #6c757d !important; }
  #ge-druckblatt .text-success { color: #198754 !important; }
  #ge-druckblatt .text-danger { color: #c82d2d !important; }
  #ge-druckblatt a { color: inherit; text-decoration: none; }
  /* Tabellen */
  #ge-druckblatt table { font-size: 7.8pt; width: 100%; border-collapse: collapse; }
  #ge-druckblatt thead th { background: #1f3a5f !important; color: #fff !important; font-weight: 600; border: 0; padding: 3pt 4pt; }
  #ge-druckblatt tbody td { padding: 2.5pt 4pt; border-bottom: .4pt solid #e3e7ec; }
  #ge-druckblatt tbody tr:nth-child(even) td { background: #f3f5f8; }
  #ge-druckblatt tfoot td { font-weight: 700; border-top: .8pt solid #1f3a5f; }
  #ge-druckblatt tr { break-inside: avoid; }
  /* Listen: ruhige Zeilen statt Kaesten */
  #ge-druckblatt .list-group { border-radius: 0; }
  #ge-druckblatt .list-group-item { border: 0; border-bottom: .5pt solid #dee2e6; padding: 4pt 2pt; background: transparent; break-inside: avoid; }
  #ge-druckblatt .list-group-item:nth-child(even) { background: #f7f8fa; }
  #ge-druckblatt .card { border: .6pt solid #d6dbe2; break-inside: avoid; }
  #ge-druckblatt .badge { border: .4pt solid rgba(0,0,0,.15); }
  #ge-druckblatt .row > [class*="col-"] { width: 50% !important; flex: 0 0 50% !important; }
  #ge-druckblatt .boerse-waerme { grid-template-columns: repeat(4, 1fr) !important; }
  #ge-druckblatt .boerse-auff-boxen { grid-template-columns: repeat(2, 11rem) !important; }
  /* Beim Druck immer die breite Tabelle, nie die Handy-Liste */
  #ge-druckblatt .d-md-none { display: none !important; }
  #ge-druckblatt .d-none.d-md-block { display: block !important; }
  #ge-druckblatt .d-md-table-cell, #ge-druckblatt .d-sm-table-cell { display: table-cell !important; }
  #ge-druckblatt .d-sm-inline { display: inline !important; }
  #ge-druckblatt [hidden] { display: none !important; }
}

/* ---- Berichte (src/boerse/berichte_ansicht.php, bericht_seite.php) ---- */
.bb-wahl { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .5rem .7rem; cursor: pointer; }
.bb-wahl:has(input:checked) { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.bb-wahl .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.bb-raster { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .bb-raster { grid-template-columns: repeat(3, 1fr);
               grid-template-areas: "tag monat zeitraum" "woche jahr steuer"; }
  .bb-feld-tag { grid-area: tag; } .bb-feld-woche { grid-area: woche; } .bb-feld-monat { grid-area: monat; }
  .bb-feld-jahr { grid-area: jahr; } .bb-feld-zeitraum { grid-area: zeitraum; } .bb-feld-steuer { grid-area: steuer; }
}
.bb-gruppe { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); margin: .2rem 0 .35rem; }
.bb-gruppe-zeile td { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); padding-top: .35rem; }
.bb-deckblatt { background: #1f3a5f; color: #fff; border-bottom: 3px solid #c4963c; border-radius: .5rem; padding: 1rem 1.2rem; }
.bb-deck-marke { font-size: .7rem; letter-spacing: .08em; opacity: .75; font-weight: 600; }
.bb-deck-unter { font-size: .85rem; opacity: .85; }
.bb-kopf { border-left: 4px solid #c4963c; padding-left: .7rem; margin-bottom: .8rem; }
.bb-kopf h2 { color: #1f3a5f; }
[data-bs-theme="dark"] .bb-kopf h2, [data-bs-theme="dark"] .bb-titel { color: #9fbbe0; }
.bb-kennzahl { background: var(--bs-tertiary-bg); border-left: 3px solid #1f3a5f; border-radius: .35rem; padding: .45rem .6rem; height: 100%; }
.bb-kennzahl.auf { border-left-color: var(--bs-success); }
.bb-kennzahl.ab { border-left-color: var(--bs-danger); }
.bb-kz-titel { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600; }
.bb-kz-wert { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.bb-kennzahl.auf .bb-kz-wert { color: var(--bs-success); }
.bb-kennzahl.ab .bb-kz-wert { color: var(--bs-danger); }
.bb-kz-unter { font-size: .75rem; color: var(--bs-secondary-color); }
.bb-titel { font-size: .95rem; font-weight: 700; color: #1f3a5f; border-bottom: 1px solid var(--bs-border-color); padding-bottom: .2rem; margin-bottom: .5rem; }
.bb-kuchen { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.bb-svg-loch { fill: var(--bs-body-bg); }
.bb-svg-mitte { font-size: 13px; font-weight: 700; fill: var(--bs-body-color); }
.bb-svg-lab { font-size: 11px; fill: var(--bs-body-color); }
.bb-svg-wert { font-size: 11px; font-weight: 700; fill: var(--bs-body-color); }
.bb-svg-wert.ab { fill: var(--bs-danger); }
.bb-balken { width: 100%; max-width: 470px; height: auto; }
.bb-legende { list-style: none; padding: 0; margin: 0; font-size: .8rem; flex: 1 1 10rem; }
.bb-legende li { display: flex; align-items: center; gap: .4rem; }
.bb-leg-name { flex: 1 1 auto; }
.bb-leg-wert { font-weight: 700; }
.bb-hinweis { background: #faf7ee; border-left: 3px solid #c4963c; padding: .4rem .7rem; color: #5a503c; border-radius: .25rem; }
[data-bs-theme="dark"] .bb-hinweis { background: #2b2719; color: #d9cfae; }
.bb-tabelle { font-size: .82rem; }
.bb-tabelle thead th { background: #1f3a5f; color: #fff; font-weight: 600; }
@media print {
  .bb-neue-seite { break-before: page; }
  .bb-deckblatt, .bb-tabelle thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bb-bericht .row > .col-lg-6 { width: 50%; flex: 0 0 50%; }
  .bb-bericht .row > .col-lg-3 { width: 25%; flex: 0 0 25%; }
  .bb-tabelle tr, .bb-kennzahl, .bb-kuchen { break-inside: avoid; }
}
.bb-linie { width: 100%; height: auto; }
.bb-gitter { stroke: var(--bs-border-color); stroke-width: 1; }
.bb-null { stroke: var(--bs-secondary-color); stroke-width: 1.2; }
.bb-legende-quer { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.bb-legende-quer li { flex: 0 1 14rem; }
.bb-alarm { border: 1px solid var(--bs-danger-border-subtle); background: var(--bs-danger-bg-subtle); border-radius: .5rem; padding: .5rem .7rem; }

/* Score-Ring bei den Agenten */
.boerse-score { display: inline-flex; flex-direction: column; align-items: center; flex: 0 0 auto; line-height: 1; }
.boerse-score-bahn { stroke: var(--bs-secondary-bg); }
.boerse-score-marke { stroke: var(--bs-secondary-color); }
.boerse-score-zahl { font-size: 11px; font-weight: 700; fill: var(--bs-body-color); }
.boerse-score-wort { font-size: .68rem; font-weight: 600; margin-top: .1rem; color: var(--bs-secondary-color); }
.boerse-score-wort[data-ton="gut"] { color: var(--bs-success); }
.boerse-score-wort[data-ton="schwach"] { color: var(--bs-danger); }
.boerse-score-wort[data-ton="mittel"] { color: #6c8ebf; }

/* Agent-Hebel: Verlauf als flache Linie */
.boerse-hebel-kurve { display: block; width: 100%; height: 90px; }
.boerse-hebel-klappe { border: 1px solid var(--bs-border-color); border-left: 3px solid #ffc94a; border-radius: .5rem; padding: .5rem .75rem; }
.boerse-hebel-klappe > summary { cursor: pointer; }
.boerse-hebel-kachel { border-left: 4px solid #ffc94a !important; }
.boerse-hebel-grund { min-width: 14rem; font-size: .78rem; }
.boerse-rang-hebel { border-top: 1px dashed #ffc94a; margin-top: .3rem; padding-top: .35rem; }
.boerse-rang-hebel .boerse-rang-platz { font-size: .62rem; }

/* Papier-Score gestern -> heute: zwei Kreise, dazwischen die Veraenderung */
.boerse-score-paar { display: inline-flex; align-items: center; gap: .25rem; }
.boerse-score-kreis { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.boerse-score-gross { font-size: 12.5px; font-weight: 800; fill: var(--bs-body-color); }
.boerse-score-gestern { font-size: .66rem; color: var(--bs-secondary-color); margin-top: .1rem; }
.boerse-score-mitte { display: inline-flex; flex-direction: column; align-items: center; min-width: 2.3rem; font-weight: 800; line-height: 1.1; }
.boerse-score-mitte .boerse-score-pfeil { font-size: 1rem; }
.boerse-score-mitte .boerse-score-delta { font-size: 1rem; }
.boerse-score-mitte.auf { color: var(--bs-success); }
.boerse-score-mitte.ab { color: var(--bs-danger); }
.boerse-score-mitte.gleich { color: var(--bs-secondary-color); }
.boerse-legende-punkte { display: inline-block; width: 1.4rem; border-top: 2px dotted #3d8bfd; vertical-align: middle; }
