/* ================================================================
   TradeButtons Dashboard Widgets — GridStack Hub (dark navy)
   ================================================================ */

:root {
    --tbdw-bg:          #0b0f16;
    --tbdw-panel-bg:    #0f172a;
    --tbdw-border:      #1f2633;
    --tbdw-border-hl:   rgba(45, 212, 191, .35);
    --tbdw-accent:      #2dd4bf;
    --tbdw-accent2:     #3b82f6;
    --tbdw-text:        #e2e8f0;
    --tbdw-text-muted:  #94a3b8;
    --tbdw-handle-col:  rgba(45, 212, 191, .18);
    --tbdw-radius:      10px;
    --tbdw-cell-h:      25px;   /* 25px pro Zeile — feines Grid für nahtlose Anordnung */
    --tbdw-canvas-max:  3200px;
}

/* ── Wrapper ─────────────────────────────────────────────────────── */

.tbdw-wrap {
    --tbdw-scrollbar-comp: 0px;
    --tbdw-page-pad: clamp(10px, 1.35vw, 24px);
    background: var(--tbdw-bg);
    min-height: 60vh;
    padding: 0 var(--tbdw-page-pad) 22px;
    padding-left: max(0px, calc(var(--tbdw-page-pad) - 20px));
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--tbdw-text);
    position: relative;

    /* Fenster-Modus: innerhalb des normalen Seiten-Frames bleiben */
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Nur Vollbreite-Modus bricht aus dem Theme-Container aus */
.tbdw-wrap[data-canvas-mode="full"] {
    width: calc(100vw - var(--tbdw-scrollbar-comp));
    max-width: calc(100vw - var(--tbdw-scrollbar-comp));
    margin-left: calc(50% - 50vw + (var(--tbdw-scrollbar-comp) / 2));
    padding-left: var(--tbdw-page-pad);
    padding-top: 0;
}

/* Das Cyber-Profil nutzt denselben zentrierten Arbeitsbereich wie die
   Cyber-Startseite. Standard/Fenster und Vollbreite bleiben unverändert. */
.tbdw-wrap[data-layout-profile="cyber"] {
    width: min(100%, 1640px);
    max-width: 1640px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* ── Linke Seitenleiste ─────────────────────────────────────────── */

.tbdw-side-rail {
    position: fixed;
    left: auto;
    right: 8px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    transform: none;
    z-index: 2147483647;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: auto !important;
}

.tbdw-side-rail,
.tbdw-side-rail * {
    pointer-events: auto !important;
}

.tbdw-rail-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s, transform .14s;
}

.tbdw-rail-btn:hover {
    color: #f8fafc;
    border-color: rgba(45,212,191,.52);
    background: rgba(45,212,191,.16);
    transform: translateY(-1px);
}

.tbdw-rail-btn.is-active {
    color: #f8fafc;
    border-color: rgba(45,212,191,.62);
    background: rgba(45,212,191,.2);
}

.tbdw-rail-tools {
    display: none;
    align-items: center;
    gap: 8px;
}

.tbdw-rail-tools.is-open {
    display: inline-flex;
}

.tbdw-rail-divider {
    width: 1px;
    height: 18px;
    background: rgba(148,163,184,.45);
    margin: 0 2px;
}

.tbdw-preset-dots {
    width: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tbdw-preset-dots.is-collapsed,
.tbdw-rail-divider.is-collapsed {
    display: none !important;
}

.tbdw-preset-dot-wrap {
    position: relative;
    width: 28px;
    height: 28px;
}

.tbdw-preset-dot {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.tbdw-preset-dot:hover {
    border-color: rgba(45,212,191,.5);
    background: rgba(45,212,191,.14);
    color: #e2e8f0;
}

.tbdw-preset-dot.is-active {
    border-color: rgba(45,212,191,.6);
    background: rgba(45,212,191,.2);
    color: #f8fafc;
}

.tbdw-preset-dot-delete {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(248,113,113,.5);
    border-radius: 999px;
    background: rgba(127,29,29,.9);
    color: #fecaca;
    font-size: 10px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}

.tbdw-preset-dot-wrap:hover .tbdw-preset-dot-delete {
    opacity: 1;
    pointer-events: auto;
}

.tbdw-preset-empty {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(148,163,184,.72);
    font-size: 12px;
    line-height: 1;
}

.tbdw-side-meta {
    margin-top: 2px;
    text-align: left;
    font-size: 9px;
    line-height: 1.2;
    color: rgba(148,163,184,.86);
}

.tbdw-side-status {
    min-height: 11px;
    text-align: left;
    font-size: 9px;
    line-height: 1.2;
    color: rgba(148,163,184,.88);
}

.tbdw-side-status.is-ok { color: #86efac; }
.tbdw-side-status.is-err { color: #fca5a5; }

/* Canvas-Fläche begrenzen, damit Widgets auf Widescreens nicht ausufern */
.tbdw-wrap > .tbdw-topbar,
.tbdw-wrap > .tbdw-settings-panel,
.tbdw-wrap > .grid-stack,
.tbdw-wrap > .tbdw-toolbar {
    width: 100%;
    max-width: min(var(--tbdw-canvas-max), calc(100vw - (var(--tbdw-page-pad) * 2)));
    margin-left: auto;
    margin-right: auto;
}

.tbdw-wrap[data-canvas-mode="full"] > .tbdw-topbar,
.tbdw-wrap[data-canvas-mode="full"] > .tbdw-settings-panel,
.tbdw-wrap[data-canvas-mode="full"] > .grid-stack,
.tbdw-wrap[data-canvas-mode="full"] > .tbdw-toolbar {
    max-width: none;
}

/* ── Topbar / Settings ─────────────────────────────────────────── */

.tbdw-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tbdw-settings-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(15,23,42,.78);
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .16s, border-color .16s, color .16s, transform .14s;
}

.tbdw-settings-btn:hover {
    color: #f8fafc;
    border-color: rgba(45,212,191,.5);
    background: rgba(45,212,191,.14);
    transform: rotate(15deg);
}

.tbdw-settings-btn.is-active {
    color: #f8fafc;
    border-color: rgba(45,212,191,.55);
    background: rgba(45,212,191,.16);
}

.tbdw-top-meta {
    font-size: 10px;
    color: #2dd4bf;
    opacity: .62;
    letter-spacing: .02em;
}

.tbdw-settings-panel {
    display: none;
    margin: 0 auto 12px;
    border: 1px solid rgba(45,212,191,.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15,23,42,.82), rgba(2,6,23,.82));
    padding: 12px;
}

.tbdw-settings-panel.is-open {
    display: block;
}

.tbdw-settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
}

.tbdw-settings-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */

.tbdw-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 0;
}

.tbdw-btn-add,
.tbdw-btn-edit {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    white-space: nowrap;
    line-height: 1.4;
}

.tbdw-btn-add {
    background: linear-gradient(135deg, rgba(45,212,191,.12), rgba(59,130,246,.12));
    border: 1px solid var(--tbdw-border-hl);
    color: var(--tbdw-accent);
}

.tbdw-btn-add:hover {
    background: linear-gradient(135deg, rgba(45,212,191,.22), rgba(59,130,246,.22));
    border-color: var(--tbdw-accent);
}

.tbdw-btn-edit {
    background: transparent;
    border: 1px solid var(--tbdw-border);
    color: var(--tbdw-text-muted);
}

.tbdw-btn-edit:hover {
    color: var(--tbdw-text);
    border-color: var(--tbdw-border-hl);
    background: rgba(255,255,255,.04);
}

.tbdw-btn-edit.is-active {
    background: linear-gradient(135deg, rgba(45,212,191,.18), rgba(59,130,246,.18));
    border-color: var(--tbdw-accent);
    color: var(--tbdw-accent);
}

.tbdw-toolbar-hint {
    font-size: 12px;
    color: var(--tbdw-text-muted);
    flex: 1;
    min-width: 280px;
}

.tbdw-canvas-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.03);
}

.tbdw-canvas-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: color .15s, background .15s;
}

.tbdw-canvas-btn:hover {
    color: #cbd5e1;
    background: rgba(255,255,255,.06);
}

.tbdw-canvas-btn.is-active {
    color: #2dd4bf;
    background: rgba(45,212,191,.14);
}

.tbdw-preset-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.02);
}

.tbdw-preset-name {
    min-width: 170px;
    flex: 1 1 170px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(2,6,23,.78);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.2;
    padding: 7px 8px;
}

.tbdw-preset-select {
    min-width: 170px;
    flex: 1 1 170px;
    max-width: 260px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(2,6,23,.78);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.2;
    padding: 7px 8px;
}

.tbdw-preset-btn {
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 10px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.tbdw-preset-btn:hover {
    color: #f8fafc;
    border-color: rgba(45,212,191,.45);
    background: rgba(45,212,191,.1);
}

.tbdw-preset-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.2);
}

.tbdw-preset-btn.danger:hover {
    border-color: rgba(248,113,113,.45);
    background: rgba(248,113,113,.1);
}

.tbdw-settings-body {
    display: grid;
    gap: 16px;
}

.tbdw-settings-group {
    display: grid;
    gap: 8px;
}

.tbdw-settings-label {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.tbdw-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tbdw-settings-status {
    min-height: 18px;
    font-size: 12px;
    color: #94a3b8;
}

.tbdw-settings-status.is-ok {
    color: #34d399;
}

.tbdw-settings-status.is-err {
    color: #fca5a5;
}

/* ── GridStack Container ─────────────────────────────────────────── */

.grid-stack {
    background: var(--tbdw-bg);
    width: 100%;
    overflow: visible;             /* Grid wächst endlos nach unten */
}

.grid-stack > .grid-stack-item {
    padding: 0 !important;
}

/* ── GridStack Item Content — VIEW MODE (rahmenlos, default) ─────── */

/* Override GridStack default inset — ZERO gap für nahtlose Widget-Anordnung */
.grid-stack-item > .grid-stack-item-content {
    left:   5px !important;
    right:  5px !important;
    top:    5px !important;
    bottom: 5px !important;
    overflow: visible;   /* visible: Action-Buttons nicht abschneiden; panel-content clippt Inhalte */
    border-radius: 0;
}

/* Inner panel fills its cell completely — VIEW MODE: komplett rahmenlos */
.tbdw-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: transparent;              /* rahmenlos: kein sichtbarer Hintergrund */
    border: none;
    border-radius: 0;
    overflow: visible;                    /* visible: Action-Buttons werden nicht abgeschnitten */
}


/* ⚠ KONTER gegen das Theme (mintify/custom.css)
 *
 * Dort steht in einer großen Sammel-Regel für den Cyber-Rahmen:
 *     .site-main > .wp-block-group, …, .akctsp-card, .tbdw-panel {
 *         position: relative !important; border: …; clip-path: …;
 *     }
 *
 * Dieses `position: relative !important` schlägt sowohl GridStacks
 * `.grid-stack > .grid-stack-item > .grid-stack-item-content { position: absolute }`
 * als auch unser `.tbdw-panel { position: absolute }`.
 *
 * Folge: Das Panel füllt seine Grid-Zelle NICHT — seine Höhe kollabiert auf ~2px,
 * `flex: 1` am Panel-Content läuft ins Leere, Widgets erscheinen leer und die
 * Heatmap läuft aus ihrem Panel heraus.
 *
 * Das Theme wird NICHT verändert (der Cyber-Rahmen ist gewollt). Wir kontern nur
 * genau diese eine Eigenschaft über höhere Spezifität: (0,3,0) statt (0,1,0).
 */
.grid-stack-item > .grid-stack-item-content.tbdw-panel {
    position: absolute !important;
}

/* ================================================================
   THEME — data-dashboard-theme="cyber" (Default) | "normal"
   ================================================================
   Breite und Theme sind unabhängig: alle vier Kombinationen aus
   Fenster/Vollbild und Normal/Cyber sind möglich.

   Der Cyber-Look wird vom Theme (mintify/custom.css) gezeichnet:
   dort bekommt `.tbdw-panel` border + clip-path (abgeschrägte Ecken)
   + Glow + Glas-Hintergrund, jeweils mit !important.

   Wir verändern das Theme NICHT. Für den normalen Look neutralisieren
   wir diese Eigenschaften nur innerhalb des Dashboards, über höhere
   Spezifität: (0,5,0) schlägt die (0,1,0) der Sammel-Regel.
   ================================================================ */

/* ================================================================
   SEITENKOPF EINKLAPPEN — body.tbdw-chrome-collapsed
   ================================================================
   Blendet den Theme-Header (Logo, Navigation, Börsenleiste:
   `header.site-header`, 129px) aus, damit das Dashboard die volle
   Höhe bekommt. Die WordPress-Adminleiste bleibt stehen, damit man
   die Seite nicht "verliert".

   Gilt nur auf der Dashboard-Seite — PHP setzt die Body-Klasse
   ausschließlich dort (siehe tbdw_body_class()).
   ================================================================ */

body.tbdw-chrome-collapsed .site-header {
    display: none !important;
}

/* Das Logo hängt das Theme separat und absolut positioniert ins Dokument
   (a#mintify-tradebuttons-logo, z-index 50) — es liegt NICHT im Header und
   würde sonst über dem Kurs-Ticker schweben bleiben. */
body.tbdw-chrome-collapsed #mintify-tradebuttons-logo {
    display: none !important;
}

/* Der Leerraum, den der Header hinterlässt, soll nicht stehen bleiben. */
body.tbdw-chrome-collapsed .site-main {
    margin-top: 0 !important;
    padding-top: 8px !important;
}

body.tbdw-chrome-collapsed .tbdw-wrap {
    padding-top: 0;
}

/* ── Rettungsanker zum Wiederausklappen ─────────────────────────────
 * Der Rail-Knopf allein reicht nicht: Wer den Kopf einklappt, sieht die
 * Navigation nicht mehr und muss ohne Suchen zurückfinden. Dieser Streifen
 * erscheint deshalb NUR im eingeklappten Zustand, mittig ganz oben.
 */
/* ── Normaler Look: ruhig, rahmenarm, ohne Glow und Schrägkanten ── */

.tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) {
    clip-path: none !important;
    box-shadow: none !important;
    border: 1px solid rgba(51, 65, 85, .72) !important;
    border-radius: 8px !important;
    background: transparent !important;
}

/* Der dekorative Rahmen-Verlauf des Themes */
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"])::before {
    content: none !important;
    display: none !important;
}

/* Academy-Oberfläche: gilt nach allen Standard-Overrides nur für Nicht-Heatmap-Widgets. */
html.tb-look-standard #tbdw-dashboard-app,
html.tb-look-standard #tbdw-grid { background: transparent !important; }
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) {
    background: linear-gradient(180deg, rgba(17, 34, 55, .50), rgba(14, 28, 46, .50)) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .28) !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content > * {
    background-color: transparent !important;
    background-image: none !important;
}

/* Finaler, absichtlich separater Heatmap-Rollback: steht am Ende der Datei,
   damit keine allgemeine Dashboard-Regel ihn erneut überschreibt. */
html.tb-look-standard #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-type="live-heatmap"] {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(51, 65, 85, .72) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
html.tb-look-standard #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(30, 58, 78, .18) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .28) !important;
}

/* Actual final layer: only non-heatmap widgets use Academy glass. */
html.tb-look-standard #tbdw-dashboard-app,
html.tb-look-standard #tbdw-grid { background: transparent !important; }
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) {
    background: linear-gradient(180deg, rgba(17, 34, 55, .50), rgba(14, 28, 46, .50)) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .28) !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content > * {
    background-color: transparent !important;
    background-image: none !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"],
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap {
    background: transparent !important;
    background-image: none !important;
}

/* Final Academy glass layer: the Dashboard and grid must stay transparent so
 * the page background can actually show through the 50% Academy panels. */
html.tb-look-standard #tbdw-dashboard-app,
html.tb-look-standard #tbdw-grid {
    background: transparent !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) {
    background: linear-gradient(180deg, rgba(17, 34, 55, .50), rgba(14, 28, 46, .50)) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .28) !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content > * {
    background-color: transparent !important;
    background-image: none !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"],
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap {
    background: transparent !important;
    background-image: none !important;
}

/* Academy surface: every Dashboard widget except the heatmap uses exactly the
 * Academy panel values. The heatmap keeps its own Glass renderer untouched. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] {
    --tbdw-academy-panel: rgba(17, 34, 55, .50);
    --tbdw-academy-panel-2: rgba(14, 28, 46, .50);
    --tbdw-academy-line: rgba(148, 163, 184, .16);
    --tbdw-academy-shadow: 0 12px 28px rgba(2, 8, 23, .28);
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) {
    background: linear-gradient(180deg, var(--tbdw-academy-panel), var(--tbdw-academy-panel-2)) !important;
    border: 1px solid var(--tbdw-academy-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--tbdw-academy-shadow) !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-type="live-heatmap"]) > .tbdw-panel-content > * {
    background-color: transparent !important;
    background-image: none !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type^="csb-"] .akcs-card {
    background: transparent !important;
}

/* Einheitliche Datenlisten: dieselbe Zebra-Folge wie im Narrative Scanner. */
.tbdw-wrap .tbdw-panel table tbody > tr:nth-child(odd),
.tbdw-wrap .tbdw-panel .tbdw-brotektiv-news-item:nth-of-type(odd),
.tbdw-wrap .tbdw-panel .tbdw-brotektiv-alert-item:nth-of-type(odd),
.tbdw-wrap .tbdw-panel .tbex-item:nth-of-type(odd),
.tbdw-wrap .tbdw-panel .akctsp-news-item:nth-of-type(odd) {
    background: rgba(3, 7, 18, .90) !important;
    border-color: #111827 !important;
    box-shadow: none !important;
}
.tbdw-wrap .tbdw-panel table tbody > tr:nth-child(even),
.tbdw-wrap .tbdw-panel .tbdw-brotektiv-news-item:nth-of-type(even),
.tbdw-wrap .tbdw-panel .tbdw-brotektiv-alert-item:nth-of-type(even),
.tbdw-wrap .tbdw-panel .tbex-item:nth-of-type(even),
.tbdw-wrap .tbdw-panel .akctsp-news-item:nth-of-type(even) {
    background: rgba(15, 23, 42, .80) !important;
    border-color: #111827 !important;
    box-shadow: none !important;
}

/* Standardmodus: Dashboard-Widgets verwenden dieselbe ruhige Kartenpalette
   wie Coin & Charts. Damit bleiben die Widgets klar abgesetzt, ohne den
   Cyber-Look oder individuelle Widget-Styles zu beeinflussen. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] {
    --tbdw-standard-surface: linear-gradient(180deg, rgba(17, 34, 55, .50), rgba(14, 28, 46, .50));
    --tbdw-standard-border: rgba(148, 163, 184, .16);
    --tbdw-standard-shadow: 0 12px 28px rgba(2, 8, 23, .28);
}

html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]):not([data-widget-type^="csb-"]) {
    background: var(--tbdw-standard-surface) !important;
    border: 1px solid var(--tbdw-standard-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--tbdw-standard-shadow) !important;
}

html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akcs-bar-wrapper,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akctsp-card,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akctsp-live-heatmap-wrap,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .tbdw-brotektiv-widget,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .exchange-astro,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .exchange-news,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .ak-crypto-ticker-wrapper,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akcn-news-item {
    background: var(--tbdw-standard-surface) !important;
    border-color: var(--tbdw-standard-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--tbdw-standard-shadow) !important;
}

/* Einige Fremd-Widgets bringen eigene dunkle Verläufe oder Cyan-Karten mit.
   Im Standardmodus werden auch diese Oberflächen auf dieselbe transparente
   Widget-Sprache festgelegt. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .ak-crypto-scanner,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .ak-crypto-scanner-table-wrapper,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .akclg-table-wrapper,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbxa-card,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbex-wrap,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbex-card,
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tb-home-widget {
    background: var(--tbdw-standard-surface) !important;
    border-color: var(--tbdw-standard-border) !important;
    box-shadow: var(--tbdw-standard-shadow) !important;
}

html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbex-item {
    background: rgba(15, 23, 42, .50) !important;
    border-color: var(--tbdw-standard-border) !important;
}

/* Heatmap: bewusst vom globalen Standard-Look ausgenommen und auf den
   unveränderten Dashboard-Stil zurückgesetzt. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-type="live-heatmap"] {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(51, 65, 85, .72) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(30, 58, 78, .18) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .28) !important;
}

/* Die Marktindikator-Kacheln besitzen bereits ihren eigenen Kartenrahmen.
   Im Standardlook darf der äußere Dashboard-Panelrahmen deshalb nicht
   zusätzlich darum gelegt werden. Explizite Cyber-/Custom-Styles bleiben
   davon unberührt. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-type^="csb-"]:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) {
    border: 0 !important;
    clip-path: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Asynchrones Datenfeedback je Widget */
.tbdw-panel { position: relative; }
.tbdw-load-indicator {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid rgba(71, 190, 214, .34);
    border-radius: 999px;
    background: rgba(5, 18, 31, .88);
    color: #9fc5d5;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.tbdw-load-spinner {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 2px solid rgba(159, 197, 213, .3);
    border-top-color: #28e0d0;
    border-radius: 50%;
    animation: tbdw-load-spin .8s linear infinite;
}
.tbdw-load-indicator.is-waiting { border-color: rgba(245, 158, 11, .45); color: #f7c873; }
.tbdw-load-indicator.is-waiting .tbdw-load-spinner { border-top-color: #f59e0b; }
@keyframes tbdw-load-spin { to { transform: rotate(360deg); } }

/* Siteweiter Standard-Look: geerbte Dashboard-Widgets dürfen keine
   Cyber-Sammellinie aus dem Theme übernehmen. Explizite Cyber-Widgets
   und Custom-Widgets bleiben unverändert. */
html.tb-look-standard .tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]),
html.tb-look-standard .tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel.tbdw-panel--cyber:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) {
    border: 1px solid rgba(51, 65, 85, .72) !important;
    clip-path: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
}
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"])::before,
html.tb-look-standard .tbdw-wrap .tbdw-panel.tbdw-panel--cyber:not([data-widget-theme="cyber"]):not([data-widget-custom="1"])::before {
    content: none !important;
    display: none !important;
}
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akcs-bar-wrapper,
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akctsp-card,
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akctsp-live-heatmap-wrap,
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .tbdw-brotektiv-widget {
    border: 1px solid rgba(30, 58, 78, .18) !important;
    clip-path: none !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .035) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .28) !important;
}
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akcs-bar-wrapper::before,
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .akctsp-card::before,
html.tb-look-standard .tbdw-wrap .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]) .tbdw-brotektiv-widget::before {
    content: none !important;
    display: none !important;
}

/* Innere Karten der Fremd-Widgets ebenfalls beruhigen */
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akcs-bar-wrapper,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akctsp-card,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akctsp-live-heatmap-wrap,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .exchange-astro,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .exchange-news,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .ak-crypto-ticker-wrapper,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akcn-news-item {
    clip-path: none !important;
    box-shadow: none !important;
    border-color: var(--tbdw-border) !important;
    background: rgba(255, 255, 255, .035) !important;
}

.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akcs-bar-wrapper::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akctsp-card::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akctsp-live-heatmap-wrap::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .exchange-astro::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .exchange-news::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .ak-crypto-ticker-wrapper::before,
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]) .akcn-news-item::before {
    content: none !important;
    display: none !important;
}

/* Punkt-Raster im Edit-Modus dezenter, Hover-Ring neutral statt cyan */
.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .grid-stack {
    background-color: rgba(7, 18, 32, .52);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(148, 163, 184, .28) 1px, transparent 1.2px),
        linear-gradient(135deg, rgba(17, 34, 55, .26), rgba(8, 18, 32, .36));
    background-size:
        calc(100% / var(--tbdw-grid-columns, 48)) var(--tbdw-cell-h),
        100% 100%;
    background-position: 0 0;
    border: 1px solid rgba(148, 163, 184, .16);
    box-shadow: inset 0 0 36px rgba(2, 8, 23, .34);
}
.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .tbdw-panel:hover {
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .45) !important;
}
.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .tbdw-handle {
    background-color: rgba(148, 163, 184, .16);
    border-color: rgba(148, 163, 184, .35);
    background-image: radial-gradient(rgba(203, 213, 225, .85) 1px, transparent 1px);
}

/* ── Cyber-Look: der Theme-Rahmen bleibt, wir ergänzen nur den Edit-Ring ── */
.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .tbdw-panel:hover {
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, .45),
        0 0 14px rgba(45, 212, 191, .12) !important;
}

/* Cyber-Dashboard: dieselbe Panel-Sprache wie die Cyber-Startseite. */
.tbdw-wrap[data-dashboard-theme="cyber"] .tbdw-panel--cyber {
    background: linear-gradient(145deg, rgba(5, 24, 42, .86), rgba(4, 12, 26, .72)) !important;
    border: 1px solid rgba(45, 212, 191, .72) !important;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px) !important;
    box-shadow: 0 0 18px rgba(0, 210, 255, .14), inset 0 0 0 1px rgba(101, 123, 238, .16) !important;
}

.tbdw-wrap[data-dashboard-theme="cyber"] .tbdw-panel--cyber::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-top: 2px solid rgba(0, 224, 255, .78);
    border-radius: inherit;
    opacity: .72;
}

.tbdw-wrap[data-dashboard-theme="cyber"] .tbdw-panel--cyber .tbdw-panel-content {
    z-index: 1;
    padding: 0;
}

/* Homepage-Bausteine besitzen ihren Cyber-Rahmen bereits selbst. Der
   verschiebbare Grid-Container darf darum keinen zweiten Rahmen darüberlegen. */
.tbdw-wrap[data-dashboard-theme="cyber"] .tbdw-panel--cyber[data-widget-type^="home-"] {
    background: transparent !important;
    border: 0 !important;
    clip-path: none !important;
    box-shadow: none !important;
}

.tb-home-widget {
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    color: #e6f7ff;
    background: linear-gradient(145deg, rgba(9, 40, 61, .82), rgba(5, 18, 35, .78));
    border: 1px solid rgba(45, 212, 191, .36);
    border-radius: 9px;
    box-shadow: inset 0 0 18px rgba(0, 208, 255, .06);
}

.tb-home-widget__title {
    margin-bottom: 10px;
    color: #bdeeff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tb-home-widget__body { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.tb-home-widget__body strong { color: #f8fbff; font-size: 15px; }
.tb-home-widget__muted { color: rgba(190, 214, 229, .7); font-size: 11px; }
.tb-home-widget__badge { align-self: flex-start; padding: 2px 7px; border: 1px solid rgba(45, 212, 191, .55); border-radius: 999px; color: #54e7d3; font-size: 10px; }
.tb-home-dots, .tb-home-badges { color: #49d9c5; letter-spacing: 5px; white-space: nowrap; }
.tb-home-progress { height: 4px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.1); }
.tb-home-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00d5ff, #52e2bd); }
.tb-home-stack { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; height: 100%; }
.tb-home-stack .tb-home-widget { padding: 8px 10px; }
.tb-home-stack .tb-home-widget__title { margin-bottom: 5px; font-size: 10px; }
.tb-home-stack .tb-home-widget__body { gap: 4px; font-size: 11px; }
.tb-home-vision { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 100%; padding: 0 14px; }
.tb-home-vision strong { color: #eafaff; font-size: 14px; }
.tb-home-vision__assets { color: rgba(190,214,229,.78); font-size: 11px; white-space: nowrap; }
.tb-home-vision__assets b { color: #54e7d3; font-weight: 600; }
.tb-home-disclaimer { display: flex; align-items: center; height: 100%; padding: 0 14px; color: rgba(190,214,229,.7); font-size: 11px; }
.tb-home-disclaimer strong { color: #bdeeff; margin-right: 4px; }

/* ================================================================
   CHARTBOX — Chart-Workbench füllt ihr Widget
   ================================================================
   Die Workbench setzt ihre Höhe selbst (computeViewportHeight aus
   dem Fenster). Damit sie im Widget nicht überläuft, binden wir Host
   und Shell an die Panel-Höhe; dashboard.js stößt bei jeder
   Widget-Größenänderung ein Neu-Vermessen an.
   ================================================================ */

.tbdw-panel[data-widget-type^="chart-"] > .tbdw-panel-content {
    overflow: hidden;          /* Chart bringt eigene Scroll-/Zoom-Logik mit */
}

.tbdw-panel-content .tbcw-workbench-host,
.tbdw-panel-content .tbcw-workbench {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
}

.tbdw-panel-content .tbcw-workbench-host > * {
    max-height: 100%;
}

/* ── Chart füllt das Widget wirklich aus ─────────────────────────────
 * workbench.css gibt `.tbcw-chart` eine feste `min-height: 560px` und
 * `.tbcw-chart-wrap` erbt sie. In einem 446px hohen Panel ergab das
 * 15px Toolbar + 560px Chart + 45px Statusleiste = 620px: der Chart
 * wurde unten abgeschnitten und darunter blieb toter Raum.
 *
 * Lösung: Die Chart-Zone wird zur Flex-Spalte, Toolbar und Statusleiste
 * behalten ihre natürliche Höhe, der Chart bekommt den ganzen Rest.
 * dashboard.js ruft danach `chart.resizeToContainer()` auf.
 */
.tbdw-panel-content .tbcw-chart-zone {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tbdw-panel-content .tbcw-chart-toolbar,
.tbdw-panel-content .tbcw-statusbar {
    flex: 0 0 auto;
}

.tbdw-panel-content .tbcw-chart-wrap {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
}

.tbdw-panel-content .tbcw-chart {
    height: 100% !important;
    min-height: 0 !important;
}

/* ── Drei Ansichten pro Chartbox (Zustand wird im Layout gespeichert) ──
 *   ≡  view-list     → Chart + Seitenmenü + Werkzeugleiste
 *   ▤  view-compact  → ohne Seitenmenü
 *   ⊞  view-tiles    → nur der Chart
 */
.tbdw-panel[data-widget-type^="chart-"].view-compact .tbcw-side.right,
.tbdw-panel[data-widget-type^="chart-"].view-tiles   .tbcw-side.right {
    display: none !important;
}

/* `.tbcw-main` ist ein CSS-Grid mit `1fr 300px`. Ein `display:none` auf der
 * Seitenspalte gibt deren 300px NICHT frei — die Spalte bleibt im Raster stehen.
 * Deshalb muss die Spaltendefinition mit umgeschaltet werden. */
.tbdw-panel[data-widget-type^="chart-"].view-compact .tbcw-main,
.tbdw-panel[data-widget-type^="chart-"].view-tiles   .tbcw-main {
    grid-template-columns: 1fr !important;
}

.tbdw-panel[data-widget-type^="chart-"].view-tiles .tbcw-chart-toolbar,
.tbdw-panel[data-widget-type^="chart-"].view-tiles .tbcw-statusbar {
    display: none !important;
}

/* ── Orderflow & Liquidation Heatmap: NUR die Flaeche ─────────────────
 * Ati (02.09.2026): "nur der chart soll abgebildet werden nicht das ganze
 * plugin". Beide Plugins rendern eine komplette Seiten-Schale:
 *   .ofp-head / .ofp-toolbar / .ofp-settings / .ofp-kpis / .ofp-side
 *   .lhp-head / .lhp-toolbar / .lhp-kpis / .lhp-side
 * Im Widget bleibt davon nur .ofp-chart bzw. .lhp-chart stehen.
 *
 * Bewusst AUSBLENDEN statt aus dem Markup nehmen: die Steuerung beider
 * Anwendungen greift an rund 200 Stellen direkt auf diese Elemente zu
 * (Controller.cacheElements in orderflow.js / heatmap.js), ueberwiegend
 * ohne Null-Pruefung. Fehlen sie im DOM, bricht die Flaeche mit.
 * Gleiches Vorgehen wie bei der Chart Workbench weiter oben.
 */
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-head,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-toolbar,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-settings,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-kpis,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-side,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-head,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-toolbar,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-kpis,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-side {
    display: none !important;
}

/* Die Flaeche bringt eigenes Ziehen und Zoomen mit — kein Panel-Scrollen. */
.tbdw-panel[data-widget-type="orderflow-heatmap"] > .tbdw-panel-content,
.tbdw-panel[data-widget-type="liquidation-heatmap"] > .tbdw-panel-content {
    overflow: hidden;
}

/* Hoehenkette bis zur Flaeche: Panel -> Schale -> shell -> main -> chart.
 * Ohne durchgehende Kette bliebe .ofp-chart auf seiner Inline-Hoehe stehen
 * und das Widget waere beim Ziehen halb leer bzw. abgeschnitten. */
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-shell,
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-main,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-shell,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-main {
    height: 100%;
    min-height: 0;
}

/* Inline-Hoehe des Templates (style="height:460px") schlaegt nur !important. */
.tbdw-panel[data-widget-type="orderflow-heatmap"] .ofp-chart,
.tbdw-panel[data-widget-type="liquidation-heatmap"] .lhp-chart {
    height: 100% !important;
    min-height: 0 !important;   /* Vorgabe der Plugins: 340px — sonst nicht kleiner ziehbar */
}

/* ── Coin-Badge im Chart ──────────────────────────────────────────────
 * Zeigt Logo, Symbol und Timeframe direkt im Chart. Wichtig, weil in den
 * Ansichten "ohne Menü" und "nur Chart" sonst nirgends steht, welcher Coin
 * und welcher Timeframe gerade läuft.
 *
 * `.tbcw-chart-wrap` ist bereits position:relative — der Badge hängt sich
 * dort ein. `pointer-events: none`, damit Zeichenwerkzeuge und Zoom darunter
 * ungestört funktionieren.
 */
.tbdw-chart-badge {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: rgba(8, 15, 28, .72);
    border: 1px solid rgba(45, 212, 191, .28);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    user-select: none;
    font-size: 12px;
    line-height: 1;
    color: var(--tbdw-text);

    /* Klickbar: öffnet den Coin-/Timeframe-Wähler. Nur der Badge selbst fängt
       Klicks — der Rest des Charts bleibt für Zeichenwerkzeuge frei. */
    cursor: pointer;
    pointer-events: auto;
    transition: border-color .15s, background .15s;
}

.tbdw-chart-badge:hover {
    border-color: rgba(45, 212, 191, .6);
    background: rgba(12, 22, 40, .92);
}

/* ── Coin- & Timeframe-Wähler ────────────────────────────────────── */

/* Position und maxHeight setzt dashboard.js beim Öffnen (relativ zum Badge). */
.tbdw-coin-picker {
    position: absolute;
    top: 42px;
    left: 10px;
    z-index: 6;
    width: 268px;
    max-width: calc(100% - 16px);
    max-height: 340px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(45, 212, 191, .32);
    border-radius: 12px;
    background: rgba(8, 15, 28, .96);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow: hidden;
    pointer-events: auto;
}

.tbdw-coin-picker[hidden] { display: none; }

.tbdw-coin-picker__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.tbdw-coin-picker__search {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--tbdw-text);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 7px;
    outline: none;
}

.tbdw-coin-picker__search:focus { border-color: rgba(45, 212, 191, .5); }

.tbdw-coin-picker__close {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: var(--tbdw-text-muted);
    cursor: pointer;
    line-height: 1;
}

.tbdw-coin-picker__close:hover { color: var(--tbdw-text); }

.tbdw-coin-picker__tfs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.tbdw-tf-btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tbdw-text-muted);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.2;
}

.tbdw-tf-btn:hover { color: var(--tbdw-text); }

.tbdw-tf-btn.is-active {
    color: var(--tbdw-accent);
    background: rgba(45, 212, 191, .14);
    border-color: rgba(45, 212, 191, .45);
}

.tbdw-coin-picker__list {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px;
}

.tbdw-coin-row {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--tbdw-text);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.tbdw-coin-row:hover { background: rgba(255, 255, 255, .06); }

.tbdw-coin-row.is-active {
    background: rgba(45, 212, 191, .12);
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .35);
}

.tbdw-coin-row img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    object-fit: contain;
    background: #0f172a;
}

.tbdw-coin-row__sym { font-weight: 700; }

.tbdw-coin-row__name {
    margin-left: auto;
    font-size: 11px;
    color: var(--tbdw-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

.tbdw-coin-picker__empty {
    padding: 14px 10px;
    font-size: 12px;
    color: var(--tbdw-text-muted);
    text-align: center;
}

/* Normaler Look */
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-coin-picker { border-color: var(--tbdw-border); }
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-tf-btn.is-active {
    color: var(--tbdw-text);
    background: rgba(148, 163, 184, .16);
    border-color: rgba(148, 163, 184, .4);
}
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-coin-row.is-active {
    background: rgba(148, 163, 184, .14);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .35);
}

.tbdw-chart-badge__logo {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.tbdw-chart-badge__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .25s;
}

.tbdw-chart-badge__logo img.is-loaded { opacity: 1; }

/* Buchstaben-Ersatz, solange (oder falls) kein Logo geladen wird */
.tbdw-chart-badge__letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    transition: opacity .25s;
}

.tbdw-chart-badge__logo img.is-loaded + .tbdw-chart-badge__letter { opacity: 0; }

.tbdw-chart-badge__sym {
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.tbdw-chart-badge__tf {
    font-weight: 600;
    font-size: 11px;
    color: var(--tbdw-accent);
    background: rgba(45, 212, 191, .12);
    border: 1px solid rgba(45, 212, 191, .25);
    border-radius: 6px;
    padding: 2px 6px;
    white-space: nowrap;
}

/* Sehr schmale Chartboxen: Timeframe-Pille fällt weg (Klasse setzt dashboard.js) */
.tbdw-chart-badge.is-narrow .tbdw-chart-badge__tf { display: none; }

/* Normaler Look: ohne Cyan-Akzent */
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-chart-badge {
    border-color: var(--tbdw-border);
    background: rgba(15, 23, 42, .82);
}

.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-chart-badge__tf {
    color: var(--tbdw-text-muted);
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .28);
}

/* Drag handle: hidden in view mode */
.tbdw-handle {
    display: none;
    height: 8px;
    flex-shrink: 0;
    background: var(--tbdw-handle-col);
    cursor: grab;
    border-radius: var(--tbdw-radius) var(--tbdw-radius) 0 0;
    transition: background .2s;
    z-index: 2;
}

/* Panel header: hidden in view mode */
.tbdw-panel-header {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 6px;
}

.tbdw-panel-title {
    /* Ati, 10.08.2026: Vorgabe war 12px und damit zu klein. */
    font-size: 14px;
    font-weight: 600;
    /* Eigene Überschriftenfarbe je Widget; ohne Einstellung bleibt es
       beim bisherigen gedämpften Ton. */
    color: var(--tbdw-widget-title, var(--tbdw-text-muted));
    letter-spacing: .02em;
    text-transform: uppercase;
}

.tbdw-panel-remove {
    background: none;
    border: none;
    color: var(--tbdw-text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0;
    transition: opacity .15s, color .15s;
}

.tbdw-panel-header:hover .tbdw-panel-remove {
    opacity: 1;
}

.tbdw-panel-remove:hover {
    color: #f87171;
}

/* Panel content fills all available height */
.tbdw-panel-content {
    flex: 1;
    min-height: 0;
    /* Eigener Scrollbereich, wenn der Inhalt zu groß wird (z. B. News-Feeds mit
       34.000px Inhalt). Vorher `overflow:hidden` → Inhalt wurde einfach abgeschnitten.
       Horizontal weiterhin clippen, damit SVG/Canvas nicht seitlich ausbrechen. */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    /* KEIN display:flex — bricht AJAX-basierte akctsp-Widgets */
}

/* Widget-Wrapper an die Panel-Höhe binden.
 * Die Live-Heatmap rendert ein <svg height="829"> OHNE viewBox in einen Wrapper
 * ohne Höhenbindung. Dadurch blieb der Wrapper 830px hoch, egal wie klein das
 * Widget gezogen wurde — der Inhalt lief aus dem Panel. Mit height:100% liest
 * das Heatmap-Skript beim resize-Event die echte Panel-Höhe und layoutet neu. */
.tbdw-panel-content > .akctsp-wrap {
    height: 100%;
}

.tbdw-panel-content > * {
    max-width: 100%;
}

/* SVG und Canvas auf Panel-Größe begrenzen (Bubbles / Heatmap Overflow-Fix) */
.tbdw-panel-content svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
    max-width: 100%;
}
.tbdw-panel-content canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    max-width: 100%;
}

/* Custom scrollbar inside panels */
.tbdw-panel-content::-webkit-scrollbar       { width: 5px; height: 5px; }
.tbdw-panel-content::-webkit-scrollbar-track  { background: rgba(255,255,255,.04); }
.tbdw-panel-content::-webkit-scrollbar-thumb  { background: rgba(255,255,255,.18); border-radius: 3px; }

/* ── Panel Actions Hover Toolbar ─────────────────────────────────── */

/* Floating view-toggle (≡ list / ⊞ tiles) — visible on hover in view mode */
.tbdw-panel-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 20;
    display: flex;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
    background: rgba(11,15,22,.88);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 3px 4px;
    backdrop-filter: blur(10px);
}

.tbdw-panel:hover .tbdw-panel-actions {
    opacity: 1;
    pointer-events: auto;
}

/* In edit mode: always visible (shown in header instead) */
.tbdw-edit-mode .tbdw-panel-actions {
    display: none; /* hidden in edit mode — use header buttons instead */
}

.tbdw-view-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1;
    transition: color .14s, background .14s;
}

.tbdw-view-btn:hover { color: #2dd4bf; background: rgba(45,212,191,.1); }
.tbdw-view-btn.is-active { color: #2dd4bf; background: rgba(45,212,191,.15); }

/* Header action buttons (in edit mode header) */
.tbdw-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tbdw-view-btn--hdr {
    font-size: 13px;
    padding: 3px 6px;
}

/* Panel header: keep remove button consistent */
.tbdw-panel-remove {
    padding: 3px 6px;
    font-size: 13px;
}

/* Resize handles: hidden in view mode */
.grid-stack-item > .ui-resizable-handle { display: none !important; }

/* ── EDIT MODE (.tbdw-edit-mode) ─────────────────────────────────── */

/* Android-style dot grid background */
.tbdw-edit-mode .grid-stack {
    background-color: rgba(5, 15, 27, .52);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(45, 212, 191, .28) 1px, transparent 1.2px),
        linear-gradient(135deg, rgba(7, 34, 52, .24), rgba(4, 12, 24, .32));
    background-size:
        calc(100% / var(--tbdw-grid-columns, 48)) var(--tbdw-cell-h),
        100% 100%;
    background-position: 0 0;
    border-radius: var(--tbdw-radius);
    border: 1px solid rgba(45, 212, 191, .16);
    box-shadow: inset 0 0 42px rgba(2, 8, 23, .36);
}

/* Kein künstlicher Zwischenraum im Edit-Modus: GridStack arbeitet bereits mit
 * margin: 0, daher müssen die Widget-Flächen auch beim Verschieben bündig bleiben. */
.tbdw-edit-mode .grid-stack-item > .grid-stack-item-content {
    left:   5px !important;
    right:  5px !important;
    top:    5px !important;
    bottom: 5px !important;
    border-radius: var(--tbdw-radius);
}

/* Kein ZWEITER Rahmen im Edit-Modus.
 * Das Theme zeichnet bereits einen Cyber-Rahmen um .tbdw-panel (border + glow +
 * clip-path). Der Edit-Modus legte darüber nochmal Hintergrund + Border → genau
 * der klobige "kaputter Baukasten"-Look. Jetzt: nur ein dezenter Hover-Ring. */
.tbdw-edit-mode .tbdw-panel {
    background: transparent;
    cursor: grab;
    transition: box-shadow .18s ease;
}

.tbdw-edit-mode .tbdw-panel:active { cursor: grabbing; }

.tbdw-edit-mode .tbdw-panel:hover {
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, .45),
        0 0 14px rgba(45, 212, 191, .10);
}

/* Aktiv gezogenes / skaliertes Widget klar, aber nicht schwer markieren */
.tbdw-edit-mode .grid-stack-item.ui-draggable-dragging > .tbdw-panel,
.tbdw-edit-mode .grid-stack-item.ui-resizable-resizing > .tbdw-panel {
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, .75),
        0 0 22px rgba(45, 212, 191, .22);
}

/* ── Während Drag/Resize: Repaints bündeln ────────────────────────────
 * dashboard.js setzt .tbdw-interacting am Wrap (und friert Heatmap/Ticker
 * per JS ein). contain:paint begrenzt Repaint-Invalidierung auf die
 * jeweilige Panel-Box statt aufs ganze Grid — ohne das hinkte die
 * Drag-Vorschau der Maus hinterher. Läuft nur während der Interaktion,
 * Overflows (Action-Buttons, Tooltips) bleiben sonst sichtbar.
 */
.tbdw-wrap.tbdw-interacting .tbdw-panel {
    contain: paint;
    /* Jedes Panel wird während der Interaktion eine eigene Kompositor-Ebene:
     * das gezogene Widget läuft dann über den anderen Panels, ohne deren
     * (teilweise tausende Knoten große) Inhalte pro Frame neu zu layerizen. */
    will-change: transform;
}
.tbdw-wrap.tbdw-interacting .tbdw-panel * {
    animation-play-state: paused !important;
}

/* ── Drag-Badge statt Vollbreiten-Griffleiste ────────────────────────
 * Vorher: 8px hohe Leiste über die volle Panel-Breite PLUS ein 35px hoher
 * Header — beide im Flow. Bei einem 2-Zeilen-Widget (50px, z. B. Kurs-Ticker)
 * blieben davon ~7px für den Inhalt übrig: Das Widget wirkte im Edit-Modus leer.
 *
 * Jetzt: ein kleines, absolut positioniertes Badge. Es nimmt dem Inhalt keine
 * Höhe weg — View- und Edit-Modus zeigen exakt dasselbe Layout. */
.tbdw-edit-mode .tbdw-handle {
    display: block;
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 8px;
    background-color: rgba(45, 212, 191, .14);
    background-image: radial-gradient(rgba(45, 212, 191, .85) 1px, transparent 1px);
    background-size: 5px 5px;
    background-position: 4px 4px;
    border: 1px solid rgba(45, 212, 191, .32);
    opacity: .4;
    cursor: grab;
    z-index: 5;
    transition: opacity .15s, background-color .15s;
}

.tbdw-edit-mode .tbdw-panel:hover .tbdw-handle { opacity: 1; }
.tbdw-edit-mode .tbdw-handle:hover  { background-color: rgba(45, 212, 191, .3); }
.tbdw-edit-mode .tbdw-handle:active { cursor: grabbing; }

/* ── Header als Overlay statt als Flow-Element ─────────────────────── */
.tbdw-edit-mode .tbdw-panel-header {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    padding: 0 4px 0 36px;   /* links Platz für das Drag-Badge */
    background: transparent;
    border: 0;
    z-index: 4;
    pointer-events: none;    /* Klicks erreichen den Inhalt … */
}

.tbdw-edit-mode .tbdw-panel-title {
    font-size: 10px;
    line-height: 24px;
    max-width: 62%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
    opacity: 0;
    transition: opacity .15s;
}

.tbdw-edit-mode .tbdw-panel:hover .tbdw-panel-title { opacity: .8; }

.tbdw-edit-mode .tbdw-panel-header-actions {
    pointer-events: auto;    /* … außer auf den Buttons */
    opacity: 0;
    transition: opacity .15s;
}

.tbdw-edit-mode .tbdw-panel:hover .tbdw-panel-header-actions { opacity: 1; }

/* Resize handles visible in edit mode */
.tbdw-edit-mode .grid-stack-item > .ui-resizable-handle {
    display: block !important;
}

/* Resize-Ecke: dezent, wird erst beim Hover über dem Widget deutlich */
.tbdw-edit-mode .grid-stack-item > .ui-resizable-handle {
    opacity: .32;
    transition: opacity .15s;
}
.tbdw-edit-mode .grid-stack-item:hover > .ui-resizable-handle {
    opacity: 1;
}

/* Resize-Zonen an allen vier Kanten. Sie liegen direkt auf dem Rahmen,
 * nehmen also keinen Platz weg und erzeugen keinerlei zusätzliche Gutter. */
.tbdw-edit-mode .grid-stack-item > .ui-resizable-n,
.tbdw-edit-mode .grid-stack-item > .ui-resizable-s {
    left: 12px;
    right: 12px;
    height: 10px;
    cursor: ns-resize;
    z-index: 100;
}
.tbdw-edit-mode .grid-stack-item > .ui-resizable-n { top: -4px; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-s { bottom: -4px; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-w,
.tbdw-edit-mode .grid-stack-item > .ui-resizable-e {
    top: 12px;
    bottom: 12px;
    width: 10px;
    cursor: ew-resize;
    z-index: 100;
}
.tbdw-edit-mode .grid-stack-item > .ui-resizable-w { left: -4px; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-e { right: -4px; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-nw,
.tbdw-edit-mode .grid-stack-item > .ui-resizable-ne,
.tbdw-edit-mode .grid-stack-item > .ui-resizable-sw,
.tbdw-edit-mode .grid-stack-item > .ui-resizable-se {
    width: 15px;
    height: 15px;
    z-index: 101;
}
.tbdw-edit-mode .grid-stack-item > .ui-resizable-nw { top: -4px; left: -4px; cursor: nw-resize; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-ne { top: -4px; right: -4px; cursor: ne-resize; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.tbdw-edit-mode .grid-stack-item > .ui-resizable-se {
    right: -4px;
    bottom: -4px;
    cursor: se-resize;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M1 9 L9 1 M5 9 L9 5 M9 9' stroke='%232dd4bf' stroke-width='1.5' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

/* GridStack drag placeholder */
.grid-stack-placeholder > .placeholder-content {
    background: rgba(45, 212, 191, .08);
    border: 2px dashed rgba(45, 212, 191, .4);
    border-radius: var(--tbdw-radius);
}

/* Unavailable widget message */
.tbdw-unavailable {
    padding: 20px;
    color: var(--tbdw-text-muted);
    font-size: 13px;
    text-align: center;
}

/* ── Widget-Auswahl-Modal ────────────────────────────────────────── */

.tbdw-modal,
.tbdw-wrap .tbdw-modal {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.tbdw-modal.is-open,
.tbdw-wrap .tbdw-modal.is-open { display: flex !important; }

.tbdw-modal-backdrop,
.tbdw-wrap .tbdw-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
}

.tbdw-modal-inner,
.tbdw-wrap .tbdw-modal-inner {
    position: relative;
    z-index: 1;
    background: #131928;
    border: 1px solid var(--tbdw-border);
    border-radius: 16px;
    width: min(660px, 95vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,.7);
}

.tbdw-modal-inner--mini {
    width: min(420px, 95vw);
}

.tbdw-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--tbdw-border);
    position: sticky;
    top: 0;
    background: #131928;
    z-index: 2;
}

.tbdw-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tbdw-text);
}

.tbdw-modal-close {
    background: none;
    border: none;
    color: var(--tbdw-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color .2s, background .2s;
}

.tbdw-modal-close:hover {
    color: var(--tbdw-text);
    background: rgba(255,255,255,.08);
}

.tbdw-modal-body { padding: 20px 24px 24px; }

.tbdw-modal-help {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}

.tbdw-modal-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.tbdw-preset-dialog-label {
    display: block;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 7px;
}

.tbdw-preset-name--dialog {
    width: 100%;
}

.tbdw-modal-category { margin-bottom: 24px; }

.tbdw-modal-category h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--tbdw-text-muted);
    margin: 0 0 10px;
}

.tbdw-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.tbdw-widget-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--tbdw-border);
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    text-align: center;
}

.tbdw-widget-choice:hover {
    background: rgba(45,212,191,.08);
    border-color: var(--tbdw-border-hl);
    transform: translateY(-2px);
}

.tbdw-choice-icon {
    font-size: 26px;
    line-height: 1;
}

.tbdw-choice-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tbdw-text);
    line-height: 1.3;
}

/* ── Login Required ─────────────────────────────────────────────── */

.tbdw-login-required {
    text-align: center;
    color: var(--tbdw-text-muted);
    padding: 60px 20px;
    font-size: 14px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 560px) {
    .tbdw-side-rail {
        left: auto;
        right: 4px;
        top: calc(4px + env(safe-area-inset-top, 0px));
        transform: none;
        width: auto;
        gap: 6px;
        padding: 3px 0;
    }
    .tbdw-rail-btn {
        width: 30px;
        height: 30px;
    }
    .tbdw-toolbar { gap: 8px; }
    .tbdw-canvas-toggle { width: 100%; justify-content: stretch; }
    .tbdw-canvas-btn { flex: 1; text-align: center; }
    .tbdw-preset-tools { width: 100%; flex-wrap: wrap; }
    .tbdw-preset-select { width: 100%; max-width: none; }
    .tbdw-preset-btn { flex: 1; min-width: 84px; }
    .tbdw-toolbar-hint { display: none; }
}

@media (max-width: 1024px) {
    .tbdw-wrap {
        --tbdw-page-pad: 10px;
    }
}

/* Gruppenbearbeitung im Dashboard-Edit-Modus */
.tbdw-edit-mode .grid-stack-item.tbdw-selected > .grid-stack-item-content {
    outline: 2px solid #22d3ee !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(34,211,238,.16), 0 0 22px rgba(34,211,238,.22) !important;
}
.tbdw-group-tools {
    display: none;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    max-width: 150px;
    margin-top: 6px;
    padding: 5px;
    border: 1px solid rgba(45,212,191,.28);
    border-radius: 8px;
    background: rgba(4,12,26,.94);
}
.tbdw-edit-mode .tbdw-group-tools { display: flex; }
.tbdw-group-tools span { width: 100%; color: #94a3b8; font-size: 10px; text-align: center; }
.tbdw-group-tools button { width: 25px; height: 23px; padding: 0; border: 1px solid rgba(148,163,184,.3); border-radius: 5px; background: rgba(15,23,42,.9); color: #dbeafe; cursor: pointer; }
.tbdw-group-tools button:hover { border-color: #22d3ee; color: #67e8f9; }
.tbdw-widget-style-modal{position:fixed;inset:0;z-index:2147483647;display:grid;place-items:center;background:rgba(0,0,0,.58);backdrop-filter:blur(5px)}
.tbdw-widget-style-dialog{width:min(390px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:20px;background:#0b1424;color:#dbeafe;border:1px solid #28e0d0;border-radius:12px;box-shadow:0 0 30px rgba(40,224,208,.22);display:grid;gap:13px}.tbdw-widget-style-dialog h3{margin:0;color:#fff}.tbdw-widget-style-dialog label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px}.tbdw-widget-style-dialog select,.tbdw-widget-style-dialog input[type=color]{background:#111d31;color:#e8f3ff;border:1px solid #35516d;border-radius:6px;padding:5px}.tbdw-widget-style-dialog input[type=range]{width:135px;accent-color:#28e0d0}.tbdw-style-check{justify-content:flex-start!important}.tbdw-widget-style-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}.tbdw-widget-style-actions button{border:1px solid #35516d;background:#122238;color:#dbeafe;border-radius:6px;padding:7px 11px;cursor:pointer}.tbdw-widget-style-actions button:last-child{border-color:#28e0d0;color:#fff}
.tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-theme="cyber"]{clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px)!important;border:1px solid var(--tbdw-widget-frame,#28e0d0)!important;border-radius:0!important;background:rgba(4,18,32,.74)!important;box-shadow:0 0 16px color-mix(in srgb,var(--tbdw-widget-frame,#28e0d0) 35%,transparent)!important}
.tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-theme="normal"]{clip-path:none!important;border:1px solid var(--tbdw-widget-frame,#273348)!important;border-radius:10px!important;background:var(--tbdw-panel-bg,#0f172a)!important;box-shadow:0 4px 18px rgba(0,0,0,.22)!important}
.tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-cut-corners="0"]{clip-path:none!important;border-radius:10px!important}
.tbdw-panel[data-widget-theme="cyber"] .tbdw-panel-header{border-color:color-mix(in srgb,var(--tbdw-widget-accent,#28e0d0) 35%,transparent)}
.tbdw-panel[data-widget-custom="1"]{background:var(--tbdw-widget-bg,var(--tbdw-panel-bg,#0f172a))!important;border-width:var(--tbdw-widget-border-width,1px)!important;border-color:var(--tbdw-widget-frame,#273348)!important;border-radius:var(--tbdw-widget-radius,10px)!important;box-shadow:var(--tbdw-widget-shadow,0 4px 18px rgba(0,0,0,.22))!important;color:var(--tbdw-widget-text,#e8f3ff)}
.tbdw-panel[data-widget-custom="1"] .tbdw-panel-title,.tbdw-panel[data-widget-custom="1"] .tbdw-panel-content,.tbdw-panel[data-widget-custom="1"] .tbdw-panel-content *{color:var(--tbdw-widget-text,#e8f3ff)}
.tbdw-panel[data-widget-custom="1"] .tbdw-panel-header{border-color:var(--tbdw-widget-accent,var(--tbdw-widget-frame,#28e0d0))!important}
.tbdw-panel[data-widget-custom="1"] .sub,.tbdw-panel[data-widget-custom="1"] .meta,.tbdw-panel[data-widget-custom="1"] small{color:var(--tbdw-widget-muted,#86a6be)}
.tbdw-panel[data-cut-corners="0"]{clip-path:none!important;border-radius:var(--tbdw-widget-radius,10px)!important}
.tbdw-wrap .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-type^="csb-"]{border:0!important;clip-path:none!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}

/* Die kompakten Marktindikatoren sind im Dashboard bewusst rahmenlos.
 * Die Status-Bar liefert ihre eigene Karte; deren Außen- und Pseudo-Rahmen
 * würden hier sonst als doppelte Kante erscheinen. */
/* Nur im Standard-Profil unterdruecken. Im Cyber-Profil traegt die Karte die
   Startseiten-Huelle .tb-dash__statusbar und BRAUCHT ihren ::after-Rahmen. */
.tbdw-wrap:not([data-dashboard-theme="cyber"]) .tbdw-panel[data-widget-type^="csb-"] .akcs-card {
    border: 0 !important;
    box-shadow: none !important;
}
.tbdw-wrap:not([data-dashboard-theme="cyber"]) .tbdw-panel[data-widget-type^="csb-"] .akcs-card::after {
    display: none !important;
}

/* Dashboard-Standard entspricht der Standard-Startseite:
   kein zusätzlicher Sammelrahmen um das Widget. Explizite Widget-Styles
   (Cyber oder Custom) werden bewusst nicht überschrieben. */
.tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"]),
.tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-theme="normal"]:not([data-widget-custom="1"]) {
    border: 0 !important;
    clip-path: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel:not([data-widget-theme="cyber"]):not([data-widget-custom="1"])::before {
    content: none !important;
    display: none !important;
}

/* Finaler, absichtlich separater Heatmap-Rollback: steht am Ende der Datei,
   damit keine allgemeine Dashboard-Regel ihn erneut überschreibt. */
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .grid-stack-item > .grid-stack-item-content.tbdw-panel[data-widget-type="live-heatmap"] {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(51, 65, 85, .72) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] .tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(30, 58, 78, .18) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .28) !important;
}


/* ===== Einheitliche Widget-Ueberschrift =============================
   Jedes Widget hat eine Ueberschrift; data-show-title steuert, ob sie
   sichtbar ist. Greift auf beide Varianten: den Kopf der Modul-Huelle
   (.tbdw-mod__head) und den nachgeruesteten (.tbdw-widget-head). */
.tbdw-panel[data-show-title="0"] > .tbdw-mod__head,
.tbdw-panel[data-show-title="0"] > .tbdw-widget-head,
.tbdw-panel[data-show-title="0"] .tbdw-panel-content > .tbdw-mod > .tbdw-mod__head,
.tbdw-panel[data-show-title="0"] .tbdw-panel-content > .tbdw-mod--statusbar > .tbdw-mod__head {
    display: none !important;
}

/* (Alter Standard-Look-Block fuer den Kopf entfernt: er ueberschrieb mit
   12px/grau die an BroTektiv gemessenen 15px/weiss.) */



/* ===== Widget-Ueberschrift — 1:1 die BroTektiv-Karte ================
   Werte im Normal-Look an .tbdw-brotektiv-widget__eyebrow / h3 / __status
   gemessen. Eyebrow und Titel stehen NEBENEINANDER in einer Zeile. */
.tbdw-wrap .tbdw-widget-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(64, 170, 255, .25);
    flex-wrap: nowrap;
}
.tbdw-wrap .tbdw-widget-head__eyebrow {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1.44px;
    line-height: 13.5px;
    color: #28e0d0;
    text-transform: uppercase;
}
.tbdw-wrap .tbdw-widget-head__title {
    margin: 0;
    min-width: 0;
    /* Etwas groesser als die BroTektiv-Vorlage (15px) — Wunsch Ati. */
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .6px;
    line-height: 40px;
    color: #f4fbff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tbdw-wrap .tbdw-widget-head__status {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 15px;
    color: #79a9c9;
}
/* Innenabstand nur beim nachgeruesteten Kopf, der direkt im Panel sitzt. */
.tbdw-wrap .tbdw-panel > .tbdw-widget-head {
    padding: 0 14px 10px;
    margin: 12px 0 10px;
}

/* Quellenhinweis in den Indikator-Widgets ausblenden.
   Die Status-Bar bringt ihn pro Karte mit. Auf der Startseite steht die
   komplette Leiste in EINEM Modul, dort erscheint er also einmal — im
   Dashboard ist jeder Indikator ein eigenes Widget, dadurch stand die Zeile
   achtmal untereinander. Gilt in beiden Looks. */
.tbdw-wrap .tbdw-panel[data-widget-type^="csb-"] .akcs-attribution {
    display: none !important;
}

/* ===== Astro-Widget: Sternenkarte gross und mittig ==================
   Gemessen: das Modul ist ein 3-Spalten-Raster. Bei 875px Kachelbreite
   bleibt fuer die Karte nichts uebrig — und als ich ihr mehr gab, brauchte
   die Kennzahlen-Spalte 271px bei nur 198px Platz und lief mit
   overflow:visible in die Kalenderspalte (die Ueberschneidungen).
   Loesung: ZWEI Spalten. Karte links ueber beide Zeilen, rechts Kennzahlen
   ueber Kalender. Die Karte wird dadurch breiter UND hoeher.
   Nur im Dashboard-Widget; das Modul selbst bleibt unangetastet. */
/* Das Modul nimmt die VOLLE Hoehe der Kachel ein — sonst richtet sich die
   Rasterzeile nach dem Textinhalt und das Rad bleibt klein, egal wie gross
   die Kachel ist. Erst dadurch hat "100 %" beim Rad eine echte Bezugsgroesse. */
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbdw-panel-content {
    height: 100%;
    min-height: 0;
}
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-wrap {
    grid-template-columns: minmax(320px, 1.25fr) minmax(300px, 1fr);
    grid-template-areas:
        "star gauge"
        "star cal";
    grid-template-rows: auto 1fr;
    gap: 14px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-col-starmap { grid-area: star; }
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-col-gauge   { grid-area: gauge; }
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-col-right   { grid-area: cal; }

/* Karte quadratisch und mittig, fuellt ihre Spalte */
/* Das Rad richtet sich nach der verfuegbaren HOEHE der Karte, nicht nach
   der Breite. Vorher war es 340px breit bei 281px Kartenhoehe und stand
   98px unten heraus. Wird die Kachel hoeher gezogen, waechst es mit. */
/* Das Rad fuellt den Rest der Karte und bleibt quadratisch. Die Karte ist
   flex-column mit justify-content:center -> auch senkrecht mittig. */
/* Quadratisch, so gross wie die Karte es zulaesst, waagerecht UND senkrecht
   mittig (die Karte ist flex-column mit justify-content:center). */
/* Nur EINE Dimension vorgeben, sonst verzerrt aspect-ratio: mit height:100%
   UND max-width:100% wurde das Rad 341x489. Die Breite ist der Engpass
   (Spalte), also bestimmt sie — die Hoehe folgt quadratisch. */
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-starmap-canvas {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    align-self: center;
}
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-starmap-canvas svg {
    width: 100%;
    height: 100%;
}
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-starmap-header {
    justify-content: center;
    margin-bottom: 6px;
}

/* Nichts darf in die Nachbarspalte laufen — ABER die Sternenkarte darf nicht
   klemmen: gemessen war die Karte 281px hoch mit overflow:hidden, das Rad
   brauchte 341px und wurde unten abgeschnitten. Deshalb nur die beiden
   Textspalten begrenzen; die Kartenspalte waechst mit ihrem Inhalt. */
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-col-gauge,
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-col-right {
    min-width: 0;
    overflow: hidden;
}
/* Die Kartenspalte streckt sich ueber beide Zeilen der rechten Seite und
   bekommt dadurch eine ECHTE Hoehe. Mit height:auto scheiterte vorher die
   Prozentrechnung des Rades und es fiel auf die Breite zurueck (341px bei
   281px Karte -> 98px Ueberstand nach unten). */
/* exchange-astro.css setzt .tbxa-starmap-card auf feste 281px (mit !important).
   Deshalb blieb die Kartenspalte klein, obwohl das Raster 540px hergibt —
   das Rad konnte gar nicht wachsen. Hier gezielt aufgehoben. */
.tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-starmap-card {
    min-width: 0;
    min-height: 0;
    height: 100% !important;
    max-height: none !important;
    align-self: stretch;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Schmale Kachel: alles untereinander */
@media (max-width: 780px) {
    .tbdw-wrap .tbdw-panel[data-widget-type="exchange-astro"] .tbxa-wrap {
        grid-template-columns: 1fr;
        grid-template-areas: "star" "gauge" "cal";
    }
}


/* ===== Schriftgroesse je Widget =====================================
   --tbdw-font-scale kommt aus den Widget-Einstellungen (70-160 %).
   Umgesetzt ueber font-size auf dem Inhalt: Texte, die ihre Groesse erben
   oder in em/rem angeben, skalieren mit. Elemente mit fest verdrahteten
   px-Werten folgen NICHT — das betrifft vor allem Chart- und
   Kartenmodule, die ihre Groessen selbst zeichnen. */
.tbdw-wrap .tbdw-panel[style*="--tbdw-font-scale"] .tbdw-panel-content {
    /* 1em = geerbte Groesse des Widgets, NICHT 1rem (=16px Wurzel).
       Mit rem sprang ein 13px-Widget bei 140 % auf 22,4px statt 18,2px. */
    font-size: calc(1em * var(--tbdw-font-scale, 1));
}
.tbdw-wrap .tbdw-panel[style*="--tbdw-font-scale"] .tbdw-widget-head__title {
    font-size: calc(17px * var(--tbdw-font-scale, 1));
}
.tbdw-wrap .tbdw-panel[style*="--tbdw-font-scale"] .tbdw-widget-head__eyebrow,
.tbdw-wrap .tbdw-panel[style*="--tbdw-font-scale"] .tbdw-widget-head__status {
    font-size: calc(10px * var(--tbdw-font-scale, 1));
}


/* ===== Neues Widget erscheint weich ================================
   Zwei Klassen statt einer: 'tbdw-enter' ist nur der Startzustand,
   'tbdw-enter-active' traegt den Uebergang und wird nach 420ms wieder
   entfernt. Dadurch liegt auf den uebrigen Widgets KEINE Transition —
   sonst wuerde jedes Verschieben im Raster nachziehen. */
.tbdw-wrap .grid-stack-item.tbdw-enter > .grid-stack-item-content {
    opacity: 0;
    transform: translateY(8px) scale(.985);
}
.tbdw-wrap .grid-stack-item.tbdw-enter-active > .grid-stack-item-content {
    transition: opacity .3s ease, transform .3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .tbdw-wrap .grid-stack-item.tbdw-enter > .grid-stack-item-content,
    .tbdw-wrap .grid-stack-item.tbdw-enter-active > .grid-stack-item-content {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* Ungespeicherte Layout-Aenderungen sichtbar machen. Seit das automatische
   Speichern weg ist, muss erkennbar sein, dass etwas offen ist. */
#tbdw-btn-layout-save.is-dirty {
    border-color: #fbbf24 !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, .45);
}

/* Frisch eingefuegtes, noch nicht platziertes Widget deutlich markieren.
   Es liegt bewusst unterhalb von allem, damit es nichts verschiebt. */
.tbdw-wrap .grid-stack-item.tbdw-unplaced > .grid-stack-item-content {
    outline: 2px dashed #fbbf24;
    outline-offset: -2px;
}
.tbdw-wrap .grid-stack-item.tbdw-unplaced > .grid-stack-item-content::after {
    content: "neu — an den Platz ziehen";
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 5;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(251, 191, 36, .92);
    color: #1c1917;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    pointer-events: none;
}

/* Werkzeugleiste in die obere rechte Fensterecke.
   Nur das Zahnrad steht dort; die uebrigen Knoepfe klappen von dort auf. */
.tbdw-wrap .tbdw-side-rail {
    position: fixed !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 100003;
    align-items: flex-start;
}

/* Auf schmalen Bildschirmen stand die Leiste nur 4px vom Rollbalken entfernt
   und wirkte davon angeschnitten (gemessen 13.08.2026 bei 696px Fensterbreite:
   Leiste endet bei x=677, Inhaltsbreite 681). Deshalb dort mehr Luft.
   Beide Selektoren und `!important`, weil die Regel direkt darueber
   `right: 8px !important` mit hoeherer Spezifitaet setzt - hier entscheidet
   die Reihenfolge, deshalb steht dieser Block dahinter. */
@media (max-width: 1024px) {
    .tbdw-side-rail,
    .tbdw-wrap .tbdw-side-rail {
        right: 20px !important;
    }
}


/* "Widget hinzufuegen" nur im Bearbeitungsmodus — ausserhalb hat es keinen
   Zweck, weil man das neue Widget ohnehin erst platzieren muss. */
/* Die Leiste liegt ausserhalb von .tbdw-wrap — deshalb ueber <html>. */
html:not(.tbdw-edit-active) #tbdw-btn-add,
html:not(.tbdw-edit-active) #tbdw-btn-snap {
    display: none !important;
}

/* Linker und rechter Rand gleich. Die Grundregel zog nur LINKS 20px ab
   (padding-left: page-pad - 20px), rechts blieb der volle Wert — dadurch
   stand der Inhalt rechts 20px weiter innen als links. Gemessen: links 4px,
   rechts 24px. Jetzt beide gleich, der Platz rechts wird nutzbar. */
.tbdw-wrap,
.tbdw-wrap[data-canvas-mode="full"],
.tbdw-wrap[data-layout-profile="cyber"] {
    padding-right: max(0px, calc(var(--tbdw-page-pad) - 20px)) !important;
}

/* Globaler Look-Umschalter erst zeigen, wenn das Zahnrad geklickt wurde.
   :has(.tbdw-wrap) begrenzt das auf Seiten MIT Dashboard — auf allen anderen
   Seiten bleibt der Umschalter unveraendert sichtbar. */
html:not(.tbdw-tools-open) body:has(.tbdw-wrap) #tb-look-toggle {
    display: none !important;
}

/* ===== Chart-Widget: nur Chart + Coin-Name =========================
   Die Workbench rendert ihre Kopfzeile BEDINGUNGSLOS — toolbar="0" schaltet
   nur die Werkzeugleiste (.tbcw-toolrail) ab. Deshalb hier gezielt alles
   ausblenden, was nicht Chart oder Coin-Name ist.
   Gilt NUR fuer das Widget 'chart-coin'; die Chart Workbench behaelt ihre
   vollstaendige Oberflaeche. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar > *:not(.tbcw-symbol-btn) {
    display: none !important;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-statusbar,
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-side,
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-drawer,
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-toolrail {
    display: none !important;
}
/* Coin-Knopf ist die Coin-AUSWAHL: ein Klick oeffnet die Suche der Workbench.
   Der Wechsel wird von chartZustandUeberwachen() in die Widget-Einstellung
   gesichert und bleibt damit fuer Ansicht und Benutzer erhalten. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-symbol-btn {
    cursor: pointer;
    background: transparent !important;
    border: 0 !important;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-symbol-btn:hover .tbcw-symbol-code {
    color: #fff;
}
/* Das kleine Dreieck zeigt, dass man klicken kann. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-symbol-caret {
    opacity: .55;
    margin-left: 4px;
}
/* Der Chart bekommt den frei gewordenen Platz. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar {
    padding: 4px 8px !important;
    min-height: 0 !important;
}

/* Chart bekommt die VOLLE Breite. display:none am Seitenpanel entfernt nur
   den Inhalt — die Rasterspalte blieb stehen, samt 285px breitem
   Groessenzieher. Gemessen: Chart-Zone war dadurch nur 60px breit. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-body {
    grid-template-columns: 1fr !important;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-resizer {
    display: none !important;
}

/* Kopfzeile des Chart-Widgets: NUR der Coin-Name.
   ------------------------------------------------------------------
   Das Zeitfenster steht in der Legende IM Chart und wird oben nicht noch
   einmal gebraucht. Die Regel weiter oben blendet ohnehin alles ausser dem
   Coin-Knopf aus — hier wird also bewusst NICHTS wieder eingeblendet.

   Die Unterzeile des Coin-Knopfes zeigt "<Zeitfenster> · <Datenquelle>",
   also z. B. "15m · bitget". Beides gehoert nicht in die Ueberschrift —
   Zeile raus. (Quelle: workbench.js updateSymbolButton(), meta.textContent) */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-symbol-meta {
    display: none !important;
}
/* Das Coin-Logo enthaelt IMMER zusaetzlich die Anfangsbuchstaben als Ersatz,
   falls das Bild fehlt (workbench.js: `<img ...><i>BTC</i>`). Neben dem
   geladenen Bild lugt dieses "BTC" hervor. Nur ausblenden, solange das Bild
   wirklich da ist — faellt es weg (onerror entfernt das img), erscheint der
   Ersatz wieder. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-symbol-logo img + i {
    display: none !important;
}

/* =========================================================================
   Heatmap-Widget: die Kachel gibt die Hoehe vor — in BEIDEN Looks
   -------------------------------------------------------------------------
   Die Heatmap bringt aus ihrem eigenen Stylesheet height:68vh mit. Im
   Dashboard bestimmt aber die Widget-Kachel die Hoehe. Auf einem kleinen
   Monitor ist 68vh KLEINER als die Kachel — unten bleibt ein leeres Band
   stehen (gemeldet 09.08.2026 von einem Nutzer mit kleinem Bildschirm);
   auf einem grossen Monitor faellt es nicht auf, weil 68vh dort groesser
   ausfaellt als die Kachel.
   Die entsprechende Regel gab es bisher NUR fuer den Cyber-Look
   (cyber-modules.css). Hier gilt sie fuer beide Looks.
   ========================================================================= */
.tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap-wrap,
.tbdw-wrap .tbdw-mod--heatmap .akctsp-live-heatmap-wrap {
    height: 100%;
}
.tbdw-panel[data-widget-type="live-heatmap"] .akctsp-live-heatmap,
.tbdw-wrap .tbdw-mod--heatmap .akctsp-live-heatmap {
    height: 100% !important;
    min-height: 0 !important;
}
.tbdw-panel[data-widget-type="live-heatmap"] .akctsp-svg,
.tbdw-wrap .tbdw-mod--heatmap .akctsp-svg {
    height: 100%;
}


/* ------------------------------------------------------- Widget kopieren */
.tbdw-panel-copy {
    appearance: none;
    border: 0;
    background: none;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 2px 4px;
    transition: opacity .15s, color .15s;
}
.tbdw-panel-copy:hover { opacity: 1; color: #2ee6c5; }
/* Kopieren und Entfernen gehoeren in den Bearbeitungsmodus — sonst sind sie
   nur Beiwerk und laden zu Fehlklicks ein. */
html:not(.tbdw-edit-active) .tbdw-panel-copy { display: none !important; }


/* Ati, 09.08.2026: im Widget gehoert NUR Chart und Coin hin — die
   Indikator- und Strategie-Knoepfe bleiben ausgeblendet. Wer sie braucht,
   nutzt die Seite /chart/. Die Einstellungen der Workbench bleiben pro
   Widget erhalten, sie werden hier nur nicht bedient. */


/* =========================================================================
   Dialogfenster des Chart-Widgets ueber die Nachbarn heben
   -------------------------------------------------------------------------
   GEMESSEN: Die Coin-Auswahl liegt geometrisch RICHTIG (Karte 820x638 bei
   1157/316 im Fenster 3149x1270) — sie wurde nur VERDECKT. Das Fenster wird
   innerhalb der Stapel-Ebene seines eigenen Widgets gezeichnet, und die im
   Dokument spaeter stehenden Nachbar-Widgets malen darueber. Deshalb schien
   die Liste "irgendwohin zu rutschen".
   Solange ein Dialog offen ist, kommt das ganze Widget nach vorne.
   ========================================================================= */
.grid-stack-item:has(.tbcw-modal.active) {
    z-index: 100000 !important;
}
.grid-stack-item:has(.tbcw-modal.active) .tbdw-panel,
.grid-stack-item:has(.tbcw-modal.active) .tbdw-panel-content {
    overflow: visible !important;
}


/* Der ausgebettete Dialog haengt direkt am <body> und muss dort ueber
   allem liegen — auch ueber der Kopfzeile der Seite. */
.tbcw-modal.tbdw-dialog-frei {
    z-index: 2000000 !important;
}


/* ⛔ HIER STAND: den Dialog INS Widget sperren (position:absolute).
   Ergebnis war unbrauchbar — in einem kleinen Chart-Widget blieben zwei
   Zeilen Liste uebrig. Zurueckgenommen. Der Dialog bleibt gross und mittig
   im Fenster; damit ihn kein Nachbar-Widget ueberdeckt, wird er waehrend der
   Anzeige an <body> gehaengt (siehe chartDialogeAusbetten in dashboard.js)
   — diesmal MIT eigenem Schliessen. */

/* Der ausgebettete Dialog haengt am <body> und liegt ueber allem. */
.tbcw-modal.tbdw-dialog-frei {
    z-index: 2000000 !important;
}


/* Zweite Coin-Anzeige und zweite Coin-Auswahl sind abgeschaltet (siehe
   updateChartBadge in dashboard.js). Falls doch noch eine im Aufbau haengt,
   wird sie hier zuverlaessig unsichtbar. */
.tbdw-chart-badge,
.tbdw-coin-picker {
    display: none !important;
}


/* =========================================================================
   Chart-Widget: Zeitfenster gehoert in die Kopfzeile
   -------------------------------------------------------------------------
   Der TF stand vorher in der doppelten Chart-Beschriftung. Die ist raus
   (sie zeigte einen veralteten Coin) — damit war auch das Zeitfenster weg.
   Ati wollte im Widget "nur Coinauswahl und TF": also der Coin-Knopf und
   das Zeitfenster, sonst nichts.
   ========================================================================= */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar > .tbcw-topbar-group:has(.js-timeframe-select) {
    display: inline-flex !important;
    align-items: center;
}
.tbdw-panel[data-widget-type="chart-coin"] .js-timeframe-select {
    display: inline-flex !important;
    font-size: 12px;
    min-width: 62px;
}
/* Der Charttyp steckt in derselben Gruppe und bleibt draussen. */
.tbdw-panel[data-widget-type="chart-coin"] .js-charttype-select {
    display: none !important;
}


/* =========================================================================
   Chart-Widget: Coin und Zeitfenster als EIN Block oben links
   -------------------------------------------------------------------------
   Die Kopfzeile der Workbench ist ein Raster mit drei Spalten. Der Coin-Knopf
   sitzt in Spalte 1, das Zeitfenster in Spalte 2 — dadurch stand es mitten in
   der Zeile statt beim Coin. Fuer dieses Widget wird die Kopfzeile eine
   einfache Reihe, dann stehen beide direkt nebeneinander oben links.
   ========================================================================= */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 8px !important;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar > .tbcw-topbar-group:has(.js-timeframe-select) {
    margin: 0 !important;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-spacer {
    display: none !important;
}


/* ------------------------------------------------- Speichern-Dialog */
.tbdw-save-modal{position:fixed;inset:0;z-index:1000000;display:flex;align-items:center;
  justify-content:center;background:rgba(4,9,18,.72);backdrop-filter:blur(5px);padding:20px}
.tbdw-save-karte{width:min(520px,100%);background:linear-gradient(180deg,#0e1726,#0a1120);
  border:1px solid rgba(46,230,197,.25);border-radius:16px;padding:24px;color:#dbe7f5;
  box-shadow:0 24px 60px rgba(0,0,0,.55)}
.tbdw-save-karte h2{margin:0 0 14px;font-size:20px;color:#fff}
.tbdw-save-ziel{margin:0 0 10px;font-size:14px;line-height:1.5}
.tbdw-save-ziel b{color:#2ee6c5}
.tbdw-save-ziel span{display:block;font-size:12px;color:#7d90a5;margin-top:2px}
.tbdw-save-hinweis{margin:0 0 14px;font-size:12.5px;color:#8fa3b8}
.tbdw-save-uebernehmen{margin:16px 0 0;padding:14px;border:1px solid rgba(255,255,255,.10);
  border-radius:12px;background:rgba(255,255,255,.03)}
.tbdw-save-titel{font-size:12px;letter-spacing:.5px;text-transform:uppercase;color:#8fa3b8;margin-bottom:10px}
.tbdw-save-uebernehmen label{display:flex;align-items:center;gap:8px;font-size:14px;padding:5px 0;cursor:pointer}
.tbdw-save-uebernehmen input{width:16px;height:16px;accent-color:#2ee6c5}
.tbdw-save-warnung{margin:8px 0 0;font-size:12px;color:#ffc978}
.tbdw-save-fuss{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.tbdw-save-fuss button{padding:10px 20px;border-radius:999px;font-size:14px;cursor:pointer;
  border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#cfe0f0}
.tbdw-save-fuss .tbdw-save-ok{border-color:transparent;font-weight:700;color:#04121a;
  background:linear-gradient(135deg,#2ee6c5,#1ba9c9)}


/* =========================================================================
   Zeitfenster oben links IM Chartfenster
   -------------------------------------------------------------------------
   Es steckt im Markup in der KOPFZEILE. `position:absolute` haette sich dort
   auf die Kopfzeile bezogen, nicht auf den Chart — deshalb wird das Element
   per JS in die Chartflaeche verschoben (siehe zeitfensterInChart in
   dashboard.js). Hier nur noch das Aussehen.
   ========================================================================= */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-chart-wrap {
    position: relative;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbdw-tf-im-chart {
    position: absolute;
    left: 12px;
    top: 10px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
}
.tbdw-panel[data-widget-type="chart-coin"] .tbdw-tf-im-chart .tbcw-select {
    height: 26px !important;
    min-height: 26px !important;
    min-width: 58px;
    padding: 0 8px !important;
    font-size: 11.5px !important;
    border-radius: 7px !important;
    background: rgba(6, 14, 26, .86) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    backdrop-filter: blur(6px);
}
/* Die Kopfzeile traegt jetzt nur noch den Coin. */
.tbdw-panel[data-widget-type="chart-coin"] .tbcw-topbar {
    min-height: 0 !important;
    padding: 4px 8px !important;
}


/* -------------------------------------- Indikatoren/Strategien im Zahnrad */
.tbdw-style-biblio{display:flex;flex-direction:column;gap:8px;padding:12px;margin:6px 0;
  border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.03)}
.tbdw-style-biblio > span{font-size:11px;letter-spacing:.5px;text-transform:uppercase;color:#8fa3b8}
.tbdw-style-biblio button{align-self:flex-start;padding:7px 14px;border-radius:999px;cursor:pointer;
  border:1px solid rgba(46,230,197,.45);background:rgba(46,230,197,.10);color:#2ee6c5;font-size:13px}
.tbdw-style-biblio button:hover{background:rgba(46,230,197,.18)}
.tbdw-style-biblio em{font-style:normal;font-size:11.5px;color:#7d90a5;line-height:1.45}

/* Profil-Anzeige oben links: welches Preset ist geladen?
   Ati, 10.08.2026. Die Zahl entspricht dem nummerierten Punkt im
   Bedienstreifen. */
.tbdw-profil-anzeige {
	/* Ati, 10.08.2026: oben links im FENSTER. Vorher haftete der Kreis
	   an der Dashboard-Flaeche und wanderte mit ihr. */
	position: fixed;
	top: 96px;
	left: 12px;
	z-index: 2147481000;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid var(--tbdw-accent, #28e0d0);
	border-radius: 50%;
	background: rgba(8, 19, 31, .82);
	color: var(--tbdw-accent, #28e0d0);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	pointer-events: auto;
	cursor: default;
	user-select: none;
}

.tbdw-profil-anzeige.is-leer {
	border-color: var(--tbdw-text-muted, #86a6be);
	color: var(--tbdw-text-muted, #86a6be);
}

/* Punkt-Raster im Bearbeitungsmodus auch im Cyber-Look.
   Ati, 10.08.2026: wenn man im dashboard im bearbeitungsmodus ist, dann

/* Punkt-Raster im Bearbeitungsmodus auch im Cyber-Look.
   Ati, 10.08.2026: im Bearbeitungsmodus sollen wieder Punkte auf der
   Flaeche erscheinen, an denen man ausrichten kann.
   Es gab die Flaeche bisher NUR fuer data-dashboard-theme="normal" —
   im Cyber-Look blieb sie leer. Gleiche Geometrie, Cyber-Farbton. */
.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .grid-stack {
	background-color: rgba(4, 14, 22, .48);
	background-image:
		radial-gradient(circle at 50% 50%, rgba(40, 224, 208, .26) 1px, transparent 1.2px),
		linear-gradient(135deg, rgba(8, 30, 40, .24), rgba(3, 12, 20, .34));
	background-size:
		calc(100% / var(--tbdw-grid-columns, 48)) var(--tbdw-cell-h),
		100% 100%;
	background-position: 0 0;
	border: 1px solid rgba(40, 224, 208, .18);
	box-shadow: inset 0 0 36px rgba(0, 12, 18, .38);
}

/* ── Punkt-Raster im Bearbeitungsmodus, endgueltig ────────────────────
   Ati, 10.08.2026: "punkte im hintergrund bearbeitungsmodus".

   Gemessen: backgroundImage war "none" — obwohl es weiter oben eine
   Regel dafuer gibt. Ursache sind die Standard-Look-Regeln
   (html.tb-look-standard .tbdw-wrap[data-dashboard-theme="normal"] ...),
   die im ganzen Dashboard "background-image: none !important" setzen.
   Sie gewinnen gegen die Raster-Regel.

   Deshalb hier mit gleicher Waffe und hoeherer Spezifitaet — und nur im
   Bearbeitungsmodus, sonst bleibt die Flaeche ruhig. */
html body .tbdw-wrap.tbdw-edit-mode .grid-stack,
html body #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .grid-stack {
	background-image:
		radial-gradient(circle at 50% 50%, rgba(148, 163, 184, .34) 1px, transparent 1.2px),
		linear-gradient(135deg, rgba(17, 34, 55, .22), rgba(8, 18, 32, .32)) !important;
	background-size:
		calc(100% / var(--tbdw-grid-columns, 48)) var(--tbdw-cell-h, 25px),
		100% 100% !important;
	background-position: 0 0 !important;
	background-repeat: repeat, no-repeat !important;
}

html body .tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .grid-stack,
html body #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .grid-stack {
	background-image:
		radial-gradient(circle at 50% 50%, rgba(40, 224, 208, .32) 1px, transparent 1.2px),
		linear-gradient(135deg, rgba(8, 30, 40, .22), rgba(3, 12, 20, .32)) !important;
}

/* ── Zahnrad oben rechts trägt die Dashboard-Nummer ───────────────────
   Ati, 10.08.2026: „mache mal den äußeren rand des kreises zum zahnrad
   und da rein kommt die nummer des aktuell angewählten dashboards".
   Der Zahnkranz ist ein SVG-Hintergrund, die Mitte bleibt frei für die
   Ziffer. Die alte Anzeige links oben entfällt. */
.tbdw-profil-anzeige {
	display: none !important;
}

.tbdw-rail-btn.tbdw-zahnrad-nummer {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	color: var(--tbdw-accent, #28e0d0);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="none" stroke="%2328e0d0" stroke-width="2.6" stroke-linejoin="round" d="M24 3.2l3.1 3.6 4.6-1.3 1.5 4.6 4.7 1.2-.4 4.8 4 2.7-2.2 4.3 2.2 4.3-4 2.7.4 4.8-4.7 1.2-1.5 4.6-4.6-1.3L24 44.8l-3.1-3.6-4.6 1.3-1.5-4.6-4.7-1.2.4-4.8-4-2.7 2.2-4.3-2.2-4.3 4-2.7-.4-4.8 4.7-1.2 1.5-4.6 4.6 1.3z"/><circle cx="24" cy="24" r="12.4" fill="none" stroke="%2328e0d0" stroke-width="1.6" stroke-opacity=".45"/></svg>');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 100%;
	border-color: transparent !important;
	box-shadow: none !important;
	animation: tbdwZahnradDreh 14s linear infinite;
}

/* Nur der Kranz dreht sich, die Ziffer bleibt gerade. */
@keyframes tbdwZahnradDreh {
	from { background-position: center; }
	to   { background-position: center; }
}

.tbdw-rail-btn.tbdw-zahnrad-nummer:hover {
	filter: brightness(1.25);
}

/* Der alte Ring-Effekt ist raus — die Welle verzerrt jetzt die echte
   Oberflaeche per SVG-Displacement (siehe dashboard.js). */

@media (prefers-reduced-motion: reduce) {
	.tbdw-welle, .tbdw-welle::after { animation-duration: .01s; opacity: 0; }
	.tbdw-rail-btn.tbdw-zahnrad-nummer { animation: none; }
}

/* ── Bearbeitungsmodus: kleine Quadrate statt Punkte, nur auf Freiflächen ──
   Ati, 10.08.2026: „die punkte nur auf freiflächen und das sollen keine
   punkte sein, sondern kleine quadrate".

   Das Quadrat kommt als SVG-Kachel: eine Rasterzelle gross, darin ein
   2x2-Rechteck in der Mitte. Ein radial-gradient kann nur runde Flecken,
   deshalb der Wechsel.

   „Nur auf Freiflächen": das Raster liegt auf .grid-stack, also HINTER den
   Widgets. Sichtbar wurde es trotzdem, wo Widget-Flächen durchscheinen —
   deshalb bekommen die Panels im Bearbeitungsmodus einen deckenden Grund. */
html body .tbdw-wrap.tbdw-edit-mode .grid-stack,
html body #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .grid-stack {
	background-image:
		url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 25"><rect x="9.5" y="11.5" width="2" height="2" fill="%2394a3b8" fill-opacity="0.42"/></svg>'),
		linear-gradient(135deg, rgba(17, 34, 55, .22), rgba(8, 18, 32, .32)) !important;
	background-size:
		calc(100% / var(--tbdw-grid-columns, 48)) var(--tbdw-cell-h, 25px),
		100% 100% !important;
	background-repeat: repeat, no-repeat !important;
	background-position: 0 0 !important;
}

html body .tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .grid-stack,
html body #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .grid-stack {
	background-image:
		url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 25"><rect x="9.5" y="11.5" width="2" height="2" fill="%2328e0d0" fill-opacity="0.45"/></svg>'),
		linear-gradient(135deg, rgba(8, 30, 40, .22), rgba(3, 12, 20, .32)) !important;
}

/* Deckender Grund je Widget, damit das Raster wirklich nur zwischen den
   Widgets steht und nicht durch sie hindurchscheint. */
html body .tbdw-wrap.tbdw-edit-mode .tbdw-panel,
html body #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .tbdw-panel,
html.tb-look-standard #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .tbdw-panel,
html.tb-look-standard #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .tbdw-panel,
html.tb-look-standard #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .grid-stack-item > .grid-stack-item-content.tbdw-panel,
html.tb-look-cyber #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .tbdw-panel {
	/* Gemessen 10.08.2026: alle 25 Panels haben Alpha 0, das Raster schien
	   durch jedes Widget. Nur im Bearbeitungsmodus deckend, damit die
	   Quadrate wirklich nur zwischen den Widgets stehen. */
	background-color: var(--tbdw-widget-bg, #0b1424) !important;
}

/* Coin Scanner und Lowcap Gems liessen das Raster weiter durchscheinen.
   Gemessen 10.08.2026: es gewinnt

     html.tb-look-standard body:not(.home) .tbdw-wrap[data-dashboard-theme="normal"] …
     { background-color: initial !important }

   Meine vorige Regel hatte eine Stufe zu wenig. Diese hier nimmt dieselbe
   Kette auf und ergaenzt Bearbeitungs-Klasse und [data-widget-type] —
   greift also NUR im Bearbeitungsmodus. Ati, 10.08.2026. */
html.tb-look-standard body:not(.home) #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="normal"].tbdw-edit-mode .tbdw-panel[data-widget-type],
html.tb-look-standard body:not(.home) #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .tbdw-panel[data-widget-type],
html.tb-look-cyber body:not(.home) #tbdw-dashboard-app.tbdw-wrap[data-dashboard-theme="cyber"].tbdw-edit-mode .tbdw-panel[data-widget-type],
html body #tbdw-dashboard-app.tbdw-wrap.tbdw-edit-mode .tbdw-panel[data-widget-type] {
	background-color: var(--tbdw-widget-bg, #0b1424) !important;
}

/* Zahnkranz liegt jetzt als SVG IM Knopf — ein Hintergrundbild wurde im
   Cyber-Look ueberschrieben (Ati, 10.08.2026). */
.tbdw-rail-btn.tbdw-zahnrad-nummer {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-image: none !important;
}

.tbdw-rail-btn.tbdw-zahnrad-nummer .tbdw-zahnkranz {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linejoin: round;
	pointer-events: none;
}

.tbdw-rail-btn.tbdw-zahnrad-nummer .tbdw-zahnkranz circle {
	stroke-width: 1.6;
	stroke-opacity: .45;
}

.tbdw-rail-btn.tbdw-zahnrad-nummer .tbdw-zahnrad-ziffer {
	position: relative;
	z-index: 1;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

/* Ausgeklapptes Werkzeugmenü: Inhalt doppelt so groß.
   Ati, 10.08.2026: „mach mal bitte das klappmenu des dashboards wenn man
   es expandiert den inhalt doppelt so groß". */
.tbdw-rail.is-open .tbdw-rail-btn,
.tbdw-rail-tools.is-open .tbdw-rail-btn {
	width: 44px;
	height: 44px;
	font-size: 20px;
}

.tbdw-rail.is-open .tbdw-preset-dot,
.tbdw-rail-tools.is-open .tbdw-preset-dot {
	width: 34px;
	height: 34px;
	font-size: 15px;
}

.tbdw-rail.is-open .tbdw-zahnrad-nummer .tbdw-zahnrad-ziffer,
.tbdw-rail-tools.is-open .tbdw-zahnrad-nummer .tbdw-zahnrad-ziffer {
	font-size: 18px;
}

/* Der Cyber-/Standard-Umschalter bleibt bewusst an die geoeffnete
   Werkzeugleiste gebunden (Wunsch Ati, 10.08.2026). Mein zwischenzeitliches
   Dauer-Einblenden ist zurueckgenommen — das eigentliche Problem war, dass
   sein Klick vom Dirty-Waechter stumm gestoppt wurde (siehe dashboard.js). */

/* ── Werkzeugleiste klappt nach UNTEN und ist doppelt so groß ──────────
   Ati, 10.08.2026: „klappe mal bitte das dashboard menu immer runter und
   alles soll doppelt so groß werden, nicht nur irgendwelche … in beiden
   looks nach unten klappen".

   Gilt bewusst ohne Look-Bezug, damit Standard und Cyber gleich aussehen.
   !important, weil die Look-Regeln der Leiste teils selbst !important
   setzen (dieselbe Ursache wie beim Widget-Grund). */
/* Zugeklappt bleibt zugeklappt — das Ausklapp-Layout haengt an .is-open.
   Ohne diese Bindung war die Leiste dauerhaft offen (Ati, 10.08.2026). */
#tbdw-rail-tools.tbdw-rail-tools:not(.is-open) {
	display: none !important;
}

#tbdw-rail-tools.tbdw-rail-tools.is-open {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 10px !important;
	position: absolute !important;
	top: calc(100% + 10px) !important;
	right: 0 !important;
	left: auto !important;
	width: auto !important;
	max-height: min(70vh, 720px) !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	padding: 12px 10px !important;
	border-radius: 14px !important;
}

/* Alles darin doppelt so groß — Knöpfe, Ziffern, Punkte, Trenner. */
#tbdw-rail-tools.is-open .tbdw-rail-btn {
	width: 48px !important;
	height: 48px !important;
	min-width: 48px !important;
	min-height: 48px !important;
	font-size: 22px !important;
	line-height: 1 !important;
}

#tbdw-rail-tools.is-open .tbdw-preset-dots {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 8px !important;
	width: 100% !important;
}

#tbdw-rail-tools.is-open .tbdw-preset-dot-wrap {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px !important;
}

#tbdw-rail-tools.is-open .tbdw-preset-dot {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	font-size: 16px !important;
	line-height: 1 !important;
}

#tbdw-rail-tools.is-open .tbdw-preset-dot-delete {
	width: 22px !important;
	height: 22px !important;
	font-size: 15px !important;
}

#tbdw-rail-tools.is-open .tbdw-rail-divider {
	width: 70% !important;
	height: 2px !important;
	margin: 4px 0 !important;
}

#tbdw-rail-tools.is-open .tbdw-preset-empty {
	font-size: 20px !important;
}

/* Der Zahnrad-Knopf selbst bleibt oben und behaelt seine Groesse —
   er ist der Griff, nicht Teil des ausgeklappten Inhalts. Damit die
   Leiste unter ihm haengen kann, braucht sein Container einen Bezug. */
.tbdw-rail {
	position: relative !important;
}



/* Onboarding, Schritt 3: die Zeichen der Dashboard-Werkzeugleiste.
   Emoji und Textzeichen bringen sehr unterschiedliche Eigenhoehen mit
   (🧲 und 💾 sind deutlich hoeher als ＋ oder ⟲). Ein fester Kasten mit
   fester Schriftgroesse stellt alle auf dieselbe Hoehe. */
.tbob-hinweis ul li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.tbob-sym {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	font-size: 15px;
	line-height: 1;
	/* Emoji nicht in Farbe, damit sie neben den Textzeichen nicht ausbrechen */
	filter: grayscale(1) brightness(1.6);
	opacity: .9;
}

/* Heatmap-Widget: alle Kacheln gleich hoch (Ati, 11.08.2026).
   core.js setzt je Kachel ein inline min-height, das mit der
   Marktkapitalisierung waechst — deshalb war die obere Reihe doppelt so hoch
   wie die darunter. Hier gilt ein festes Mass; !important schlaegt das
   Inline-Mass.

   Bewusst NUR im Dashboard-Widget: dieselbe core.js treibt auch die grosse
   Heatmap-Seite, und die bleibt unangetastet. */
.tbdw-panel[data-widget-type="heatmap"] .akctsp-tile {
	min-height: 92px !important;
	height: 92px !important;
	overflow: hidden;
}

/* In der Kreisform ergibt eine feste Hoehe keinen Sinn — dort bestimmt das
   Seitenverhaeltnis die Groesse. */
.tbdw-panel[data-widget-type="heatmap"] .shape-circle .akctsp-tile {
	height: auto !important;
	min-height: 0 !important;
}

/* Dashboard-Widgettitel: groesser und standardmaessig in TradeButtons-Tuerkis.
   Eine pro Widget gesetzte --tbdw-widget-title-Farbe hat weiterhin Vorrang. */
.tbdw-wrap .tbdw-widget-head__title {
	font-size: 18px;
	color: var(--tbdw-widget-title, #54e7d3);
}

.tbdw-wrap .tb-home-widget__title {
	font-size: 13px;
	color: var(--tbdw-widget-title, #54e7d3);
}

.tbdw-wrap .tb-home-stack .tb-home-widget__title {
	font-size: 12px;
}

.tbdw-wrap .tbdw-brotektiv-widget h3 {
	font-size: 17px;
	color: var(--tbdw-widget-title, #54e7d3);
}

.tbdw-wrap[data-dashboard-theme="cyber"] .tbdw-mod__title {
	font-size: clamp(14px, 1.1vw, 16px);
	color: var(--tbdw-widget-title, #54e7d3);
}

.tbdw-wrap .tbdw-panel-title {
	font-size: 15px;
	color: var(--tbdw-widget-title, #54e7d3);
}

/* Nur die kleine Herkunftsmarke bleibt weiss; der Widgettitel bleibt tuerkis. */
.tbdw-wrap .tbdw-brotektiv-widget__eyebrow {
	color: #f4fbff;
}

/* 22.11.2026: solange das Anmelde-/Willkommensfenster offen ist, verdeckt "Anpassen" nicht dessen Schliessen-Knopf (Handy). */
html.tb-auth-open .tbdw-side-rail {
	visibility: hidden;
}
