/*
 * TradeButtons Smart Money — Oberfläche
 *
 * ⚠ DREI REGELN DIESER UMGEBUNG (gemessen, nicht vermutet):
 *
 * 1. Look (tb_look: cyber|standard) und Hell/Dunkel (blockifyDarkMode) sind
 *    ZWEI UNABHÄNGIGE SCHALTER. Alle vier Kombinationen müssen lesbar sein.
 *    Der Zustand wird serverseitig am Container gestempelt — deshalb hängen
 *    alle Farben an .tbsm--dark / .tbsm--light / .tbsm--look-*, niemals an
 *    body-Klassen fremder Plugins.
 *
 * 2. Das Theme INVERTIERT --wp--preset--color--neutral-* im Dark Mode.
 *    Deshalb hier ausschliesslich FESTE HEX-WERTE. Keine neutral-*-Presets.
 *
 * 3. tb-cyber-skin.css formatiert button, select und input global mit
 *    !important. Eigene Bedienelemente gewinnen nur über höhere Spezifität
 *    (body .tbsm …) plus eigenes !important. Das Theme wird nicht angefasst.
 */

/* ═══════════════════════════════════════════════════════════════════
   Farbtokens
   ═══════════════════════════════════════════════════════════════════ */

.tbsm {
	/* Struktur */
	--tbsm-radius: 10px;
	--tbsm-radius-sm: 6px;
	--tbsm-gap: 16px;
	--tbsm-gap-sm: 10px;
	--tbsm-maxw: 1600px;
	--tbsm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tbsm-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--tbsm-shadow: 0 1px 3px rgba(0, 0, 0, .16);
	--tbsm-glow: none;
}

/* ── Dunkel ────────────────────────────────────────────────────────── */
.tbsm--dark {
	--tbsm-bg: #0d1117;
	--tbsm-surface: #161b22;
	--tbsm-surface-2: #1c2128;
	--tbsm-surface-3: #262c36;
	--tbsm-border: #30363d;
	--tbsm-border-strong: #444c56;
	--tbsm-text: #e6edf3;
	--tbsm-text-muted: #9198a1;
	/* #7d8590 lag auf --tbsm-surface-2 nur bei 4,34:1 — gemessen, nicht geschätzt. */
	--tbsm-text-faint: #8b949e;
	--tbsm-accent: #60a5fa;
	--tbsm-accent-contrast: #04121f;
	--tbsm-success: #3fb950;
	--tbsm-danger: #f85149;
	--tbsm-warning: #d29922;
	--tbsm-info: #a5a5f5;
	--tbsm-on-accent: #04121f;
	--tbsm-aktiv-blau: #58a6ff;
	--tbsm-aktiv-tuerkis: #35d6f5;
	--tbsm-track: #21262d;
	--tbsm-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ── Hell ──────────────────────────────────────────────────────────── */
.tbsm--light {
	--tbsm-bg: #f6f8fa;
	--tbsm-surface: #ffffff;
	--tbsm-surface-2: #f6f8fa;
	--tbsm-surface-3: #eaeef2;
	--tbsm-border: #d0d7de;
	--tbsm-border-strong: #afb8c1;
	--tbsm-text: #1f2328;
	--tbsm-text-muted: #59636e;
	--tbsm-text-faint: #656d76;
	--tbsm-accent: #0969da;
	--tbsm-accent-contrast: #ffffff;
	--tbsm-success: #1a7f37;
	--tbsm-danger: #cf222e;
	--tbsm-warning: #8a6400;
	--tbsm-info: #512a97;
	--tbsm-on-accent: #ffffff;
	--tbsm-aktiv-blau: #0969da;
	--tbsm-aktiv-tuerkis: #0b6a8f;
	--tbsm-track: #eaeef2;
	--tbsm-shadow: 0 1px 3px rgba(31, 35, 40, .12);
}

/* ── Cyber-Look: eigene Akzente, gleiche Lesbarkeit ────────────────── */
.tbsm--look-cyber.tbsm--dark {
	--tbsm-bg: #080b12;
	--tbsm-surface: #10151f;
	--tbsm-surface-2: #161d2b;
	--tbsm-surface-3: #1e2739;
	--tbsm-border: #22304a;
	--tbsm-border-strong: #35496e;
	--tbsm-accent: #35d6f5;
	--tbsm-on-accent: #041017;
	--tbsm-info: #b18cff;
	--tbsm-aktiv-blau: #3b82f6;
	--tbsm-aktiv-tuerkis: #35d6f5;
	--tbsm-glow: 0 0 0 1px rgba(53, 214, 245, .18);
}

.tbsm--look-cyber.tbsm--light {
	--tbsm-accent: #0b6a8f;
	--tbsm-info: #5b2ea6;
	--tbsm-aktiv-blau: #0b52a8;
	--tbsm-aktiv-tuerkis: #0b6a8f;
	--tbsm-glow: 0 0 0 1px rgba(11, 106, 143, .16);
}

/* ═══════════════════════════════════════════════════════════════════
   Grundgerüst
   ═══════════════════════════════════════════════════════════════════ */

.tbsm {
	box-sizing: border-box;
	max-width: var(--tbsm-maxw);
	margin: 0 auto;
	padding: clamp(12px, 2vw, 28px);
	background: var(--tbsm-bg);
	color: var(--tbsm-text);

	/*
	 * Eigener Stapelkontext ueber dem Wasserzeichen des Themes.
	 *
	 * Das Theme malt sein Logo als `body::before` mit `position: fixed`
	 * und `z-index: 0`. Ein positioniertes Element gewinnt gegen den
	 * Hintergrund eines nicht positionierten — ohne diese Zeilen liegt das
	 * Logo also UEBER der ganzen Anwendung, obwohl jede Karte einen
	 * deckenden Hintergrund hat (gemessen: rgb(16,21,31), opacity 1).
	 *
	 * Dialoge und Hinweisfaehnchen haengen an `document.body` und werden
	 * davon nicht eingesperrt.
	 */
	position: relative;
	z-index: 1;
	font-family: var(--tbsm-font);
	font-size: 15px;
	line-height: 1.55;
	border-radius: var(--tbsm-radius);
}

.tbsm *,
.tbsm *::before,
.tbsm *::after {
	box-sizing: inherit;
}

.tbsm h1, .tbsm h2, .tbsm h3, .tbsm h4 {
	color: var(--tbsm-text);
	margin: 0 0 .4em;
	line-height: 1.25;
	font-weight: 650;
}

.tbsm h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.tbsm h2 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
.tbsm h3 { font-size: 1.05rem; }
.tbsm h4 { font-size: .95rem; }

.tbsm p { margin: 0 0 .7em; }
.tbsm a { color: var(--tbsm-accent); text-decoration: none; }
.tbsm a:hover { text-decoration: underline; }

.tbsm-muted { color: var(--tbsm-text-muted); font-size: .9em; }
.tbsm-faint { color: var(--tbsm-text-faint); font-size: .85em; }
.tbsm-mono { font-family: var(--tbsm-mono); font-size: .9em; }
.tbsm-pos { color: var(--tbsm-success); }
.tbsm-neg { color: var(--tbsm-danger); }
.tbsm-warn { color: var(--tbsm-warning); }

.tbsm-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ── Kopfbereich ───────────────────────────────────────────────────── */

.tbsm-head {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tbsm-gap);
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: var(--tbsm-gap);
	padding-bottom: var(--tbsm-gap);
	border-bottom: 1px solid var(--tbsm-border);
}

.tbsm-head__title { min-width: 0; flex: 1 1 320px; }
.tbsm-head__title p { margin: 0; }

/* Sitzt in derselben Zeile wie die Schnellaktionen, rechts daneben. */
.tbsm-search {
	display: flex;
	gap: 6px;
	flex: 0 0 320px;
	min-width: 0;
}

.tbsm-search input[type="search"] { flex: 1 1 auto; min-width: 0; }
.tbsm-search .tbsm-btn { flex: none; }

/* ── Kopfbereich (Hero) ────────────────────────────────────────────── */

/*
 * Eine einzige Zeile: Schnellaktionen links, Suchfeld rechts daneben.
 * Die Überschrift steht nur noch für Screenreader im Markup (.tbsm-sr) —
 * sichtbar wäre sie hier reine Höhe ohne Nutzen.
 */
.tbsm-hero {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px 12px;
	background: linear-gradient(180deg, var(--tbsm-surface) 0%, var(--tbsm-bg) 100%);
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
	padding: 10px 12px;
	margin-bottom: var(--tbsm-gap);
}

.tbsm--look-cyber .tbsm-hero {
	background:
		radial-gradient(900px 180px at 12% -60%, color-mix(in srgb, var(--tbsm-accent) 12%, transparent) 0%, transparent 70%),
		linear-gradient(180deg, var(--tbsm-surface) 0%, var(--tbsm-bg) 100%);
	border-color: var(--tbsm-border-strong);
}

/*
 * Schnellaktionen bleiben auf EINER Zeile, damit das Suchfeld daneben stehen
 * bleibt. Passen die Knöpfe nicht, rollt die Zeile seitlich in sich selbst —
 * die Seite bekommt dadurch keinen waagerechten Überlauf.
 */
.tbsm-quick {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0 0 2px;
	border-top: none;
	overflow-x: auto;
	scrollbar-width: thin;
	scroll-behavior: smooth;
}

.tbsm-quick::-webkit-scrollbar { height: 6px; }
.tbsm-quick::-webkit-scrollbar-thumb { background: var(--tbsm-border-strong); border-radius: 3px; }

body .tbsm .tbsm-quick .tbsm-btn {
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 6px 11px !important;
	font-size: .85rem !important;
	min-height: var(--tbsm-zeilenhoehe);
	height: var(--tbsm-zeilenhoehe);
}

/*
 * Eine Zeile heisst: gleiche Hoehe fuer Knoepfe, Suchfeld und Suchknopf.
 * Das Cyber-Skin setzt auf `button`/`input` global `!important`, deshalb hier
 * ebenfalls mit `!important` und ueber die hoehere Spezifitaet von `body .tbsm`.
 * Die Werte kommen aus einer Variablen, damit die drei nie auseinanderlaufen.
 */
.tbsm-hero { --tbsm-zeilenhoehe: 32px; }

body .tbsm .tbsm-hero .tbsm-search { align-items: center; }

body .tbsm .tbsm-hero .tbsm-search input[type="search"],
body .tbsm .tbsm-hero .tbsm-search .tbsm-btn {
	height: var(--tbsm-zeilenhoehe) !important;
	min-height: var(--tbsm-zeilenhoehe) !important;
	padding: 6px 11px !important;
	font-size: .85rem !important;
	line-height: 1.2 !important;
	box-sizing: border-box !important;
	margin: 0 !important;
}

body .tbsm .tbsm-hero .tbsm-search .tbsm-btn { white-space: nowrap; }

/*
 * Die Rollleiste der Schnellaktionen darf die Zeile nicht verschieben:
 * gemessen lag sie sonst 5 px ueber dem Suchfeld, weil der reservierte
 * Balken die Knoepfe nach oben drueckt. Die Zeile bleibt seitlich rollbar,
 * nur der Balken selbst ist unsichtbar.
 */
.tbsm-hero .tbsm-quick {
	align-items: center;
	padding-bottom: 0;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.tbsm-hero .tbsm-quick::-webkit-scrollbar { display: none; height: 0; }

/*
 * Hervorgehoben wird nur die Aktion, die zum offenen Bereich gehoert.
 * Vorher trug „Wallet hinzufuegen" fest die Variante `primary` und sah
 * dadurch auf jeder Seite wie der aktive Menuepunkt aus.
 */
body .tbsm .tbsm-quick .tbsm-btn.is-active {
	background: var(--tbsm-accent) !important;
	border-color: var(--tbsm-accent) !important;
	color: var(--tbsm-on-accent, #06131f) !important;
	font-weight: 700 !important;
}

/* ── Grundriss: Menüleiste links, Inhalt rechts ────────────────────── */

.tbsm-shell {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

/* Die Hauptspalte MUSS min-width: 0 haben — sonst sprengt eine breite
   Tabelle das Flex-Layout, statt in ihrem eigenen Container zu rollen. */
.tbsm-content {
	flex: 1 1 auto;
	min-width: 0;
}

.tbsm-skip {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tbsm-skip:focus {
	position: static;
	width: auto;
	height: auto;
	display: inline-block;
	margin-bottom: 8px;
	padding: 6px 12px;
	background: var(--tbsm-accent);
	color: var(--tbsm-on-accent);
	border-radius: var(--tbsm-radius-sm);
}

/* ── Navigation ────────────────────────────────────────────────────── */

.tbsm-nav {
	flex: 0 0 232px;
	position: sticky;
	top: 90px;
	background: var(--tbsm-surface);
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
	box-shadow: var(--tbsm-shadow);
	padding: 8px;
}

.tbsm--look-cyber .tbsm-nav { box-shadow: var(--tbsm-shadow), var(--tbsm-glow); }

.tbsm-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tbsm-nav__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	color: var(--tbsm-text-muted);
	border-radius: var(--tbsm-radius-sm);
	font-size: .92rem;
	font-weight: 500;
	line-height: 1.3;
	border-left: 2px solid transparent;
}

.tbsm-nav__link:hover {
	color: var(--tbsm-text);
	background: var(--tbsm-surface-2);
	text-decoration: none;
}

/*
 * Aktiver Menueeintrag: zwei Farbverlaeufe in einer Zeile —
 * Blau (rechts aussen) → Tuerkis (Mitte) → Blau (rechts aussen).
 * Die Farben liegen als eigene Variablen vor, damit jeder Look (hell,
 * dunkel, Cyber, Standard) seine eigenen Werte setzen kann, ohne dass die
 * Textfarbe darunter unlesbar wird.
 */
.tbsm-nav__link.is-active {
	background-image: linear-gradient(
		90deg,
		var(--tbsm-aktiv-blau) 0%,
		var(--tbsm-aktiv-tuerkis) 38%,
		var(--tbsm-aktiv-tuerkis) 68%,
		var(--tbsm-aktiv-blau) 100%
	);
	/*
	 * Zwingend, sonst entsteht links ein harter blauer Streifen:
	 * `background-origin` steht standardmaessig auf der Innenkante, der
	 * Verlauf beginnt also erst hinter dem 2 px breiten Rahmen — und weil
	 * Hintergruende sich wiederholen, fuellt das rechte ENDE des Verlaufs
	 * (Blau) genau diesen Randstreifen. Gemessen, nicht vermutet.
	 */
	background-origin: border-box;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	color: var(--tbsm-on-accent);
	font-weight: 620;
	border-left-color: transparent;
}

.tbsm-nav__link:focus-visible {
	outline: 2px solid var(--tbsm-accent);
	outline-offset: -2px;
}

.tbsm-nav__icon {
    width: 20px;
    flex: none;
    text-align: center;
    font-size: 1.05em;
    opacity: .9;
    color: currentColor;
    font-variant-emoji: text;
}

.tbsm-nav__label { min-width: 0; }

/* Umschalter nur auf kleinen Bildschirmen. */
body .tbsm .tbsm-nav__toggle {
	display: none;
	align-items: center;
	gap: 8px;
	width: 100%;
	justify-content: flex-start;
}

/* ── Karten und Raster ─────────────────────────────────────────────── */

.tbsm-grid {
	/*
	 * Umbruch statt Raster.
	 *
	 * Ein Raster laesst eine angebrochene letzte Zeile als Loch stehen.
	 * `auto-fit` half dagegen nicht — es klappt nur voellig leere SPALTEN
	 * ein. Gemessen bei 2560 px auf „Smart-Money-Bewegungen": 15 Karten in
	 * zwei Spuren, die letzte Zeile fuellte 50 % der Breite.
	 *
	 * Im Umbruch behaelt jede Karte ihre Mindestbreite und darf wachsen;
	 * die letzte Zeile teilt den Rest unter sich auf.
	 */
	display: flex;
	flex-wrap: wrap;
	gap: var(--tbsm-gap);
	align-items: stretch;
}

.tbsm-grid > * { flex: 1 1 300px; min-width: 0; }

/* 560 statt 440: bei 440 px entstanden auf breiten Schirmen vier sehr enge
   Spalten, in denen jede Tabelle seitwaerts rollen musste. */
.tbsm-grid--wide > * { flex-basis: 560px; }
/*
 * Kurzer Statushinweis statt zweier grosser Karten. Eine Zeile, dezent,
 * mit Verweis auf die vollen Angaben unter „Einstellungen".
 */
.tbsm-hinweiszeile {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0 0 var(--tbsm-gap);
	padding: 7px 11px;
	border: 1px solid var(--tbsm-border);
	border-left: 3px solid var(--tbsm-warning);
	border-radius: var(--tbsm-radius-sm);
	background: var(--tbsm-surface);
	font-size: .87rem;
	color: var(--tbsm-text-muted);
}

.tbsm-hinweiszeile__text { min-width: 0; }
.tbsm-hinweiszeile__mehr { color: var(--tbsm-accent); white-space: nowrap; }

/*
 * Die Kennzahlenzeile bekommt oben und unten Luft, damit sie nicht direkt
 * an der Karte darueber und am folgenden Block klebt.
 */
.tbsm-grid--kpi {
	/*
	 * Umbruch statt Raster.
	 *
	 * Ein Raster mit fester Spurzahl laesst eine angebrochene letzte Zeile
	 * als Loch stehen — gemessen: 10 Kacheln in 6 Spuren, zweite Zeile mit
	 * 4 Kacheln und zwei leeren Kachelbreiten daneben. `auto-fit` hilft
	 * dagegen nicht, es klappt nur voellig leere SPALTEN ein.
	 *
	 * Im Umbruch behaelt jede Kachel ihre Mindestbreite und darf wachsen;
	 * die letzte Zeile teilt den Rest unter sich auf.
	 */
	display: flex;
	flex-wrap: wrap;
	margin-top: calc(var(--tbsm-gap) * 1.5);
	margin-bottom: calc(var(--tbsm-gap) * 1.5);
}

.tbsm-grid--kpi > * { flex: 1 1 190px; min-width: 0; }

.tbsm-card {
	background: var(--tbsm-surface);
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
	padding: 14px 16px;
	box-shadow: var(--tbsm-shadow);
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.tbsm--look-cyber .tbsm-card { box-shadow: var(--tbsm-shadow), var(--tbsm-glow); }

.tbsm-card--clickable { cursor: pointer; }
.tbsm-card--clickable:hover { border-color: var(--tbsm-border-strong); }
.tbsm-card--warn { border-color: var(--tbsm-warning); }

.tbsm-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.tbsm-card__head h2, .tbsm-card__head h3 { margin: 0; }
.tbsm-card__body { flex: 1 1 auto; min-width: 0; }

.tbsm-card__foot {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid var(--tbsm-border);
	font-size: .82em;
	color: var(--tbsm-text-faint);
	display: flex;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

/* Kennzahlkachel */
.tbsm-kpi__value {
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	font-weight: 680;
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
	word-break: break-word;
}

.tbsm-kpi__label {
	color: var(--tbsm-text-muted);
	font-size: .82rem;
	display: flex;
	align-items: center;
	gap: 5px;
}

.tbsm-kpi__sub { font-size: .78rem; color: var(--tbsm-text-faint); margin-top: 3px; }

/* ── Bedienelemente ────────────────────────────────────────────────
   Höhere Spezifität + !important, weil tb-cyber-skin.css button/input/select
   global mit !important formatiert. Nur auf den eigenen Container bezogen. */

body .tbsm .tbsm-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	padding: 7px 14px !important;
	border-radius: var(--tbsm-radius-sm) !important;
	border: 1px solid var(--tbsm-border-strong) !important;
	background: var(--tbsm-surface-2) !important;
	color: var(--tbsm-text) !important;
	font-family: inherit !important;
	font-size: .9rem !important;
	font-weight: 550 !important;
	line-height: 1.35 !important;
	cursor: pointer;
	text-decoration: none;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	min-height: 36px;
}

/*
 * Beim Ueberfahren wird der Knopf HELLER, nie dunkler.
 *
 * Das Cyber-Skin legt auf jedes `button:hover` einen Innenschatten
 * (`inset 0 0 18px …`) mit `!important`. Auf dunklem Grund wirkt der wie ein
 * Schmutzrand und laesst den Knopf abgesackt/dunkel aussehen. Innerhalb des
 * Smart-Money-Containers wird er deshalb abgeschaltet und durch einen
 * definierten Zustand ersetzt: hellerer Grund, Akzentrahmen, volle
 * Textfarbe. Die Textfarbe muss ausdruecklich mitgesetzt werden, sonst
 * gewinnt der Theme-Wert und der Text verliert an Kontrast.
 */
body .tbsm .tbsm-btn:hover:not(:disabled),
body .tbsm .tbsm-btn:focus-visible:not(:disabled) {
	background: var(--tbsm-surface-3) !important;
	border-color: var(--tbsm-accent) !important;
	color: var(--tbsm-text) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	filter: none !important;
}

body .tbsm .tbsm-btn--primary:hover:not(:disabled) {
	background: var(--tbsm-accent) !important;
	color: var(--tbsm-on-accent) !important;
	box-shadow: none !important;
}

body .tbsm .tbsm-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

body .tbsm .tbsm-btn--primary {
	background: var(--tbsm-accent) !important;
	border-color: var(--tbsm-accent) !important;
	color: var(--tbsm-on-accent) !important;
}

body .tbsm .tbsm-btn--primary:hover:not(:disabled) {
	filter: brightness(1.1);
	color: var(--tbsm-on-accent) !important;
}

body .tbsm .tbsm-btn--danger {
	border-color: var(--tbsm-danger) !important;
	color: var(--tbsm-danger) !important;
}

body .tbsm .tbsm-btn--sm {
	padding: 4px 9px !important;
	font-size: .8rem !important;
	min-height: 28px;
}

body .tbsm input[type="text"],
body .tbsm input[type="search"],
body .tbsm input[type="number"],
body .tbsm input[type="url"],
body .tbsm input[type="date"],
body .tbsm select,
body .tbsm textarea {
	width: 100%;
	padding: 7px 10px !important;
	border: 1px solid var(--tbsm-border-strong) !important;
	border-radius: var(--tbsm-radius-sm) !important;
	background: var(--tbsm-surface-2) !important;
	color: var(--tbsm-text) !important;
	font-family: inherit !important;
	font-size: .9rem !important;
	line-height: 1.4 !important;
	min-height: 36px;
	box-shadow: none !important;
	text-transform: none !important;
}

body .tbsm textarea { min-height: 84px; resize: vertical; }

body .tbsm input::placeholder,
body .tbsm textarea::placeholder {
	color: var(--tbsm-text-faint) !important;
	opacity: 1;
}

body .tbsm input:focus-visible,
body .tbsm select:focus-visible,
body .tbsm textarea:focus-visible,
body .tbsm .tbsm-btn:focus-visible,
body .tbsm a:focus-visible {
	outline: 2px solid var(--tbsm-accent) !important;
	outline-offset: 2px;
}

/* Browser-Autofill übermalt Felder mit eigenem Weiss und ignoriert
   background-color — nur über Inset-Schatten und text-fill-color zu bändigen. */
body .tbsm input:-webkit-autofill,
body .tbsm input:-webkit-autofill:hover,
body .tbsm input:-webkit-autofill:focus,
body .tbsm textarea:-webkit-autofill,
body .tbsm select:-webkit-autofill {
	-webkit-text-fill-color: var(--tbsm-text) !important;
	-webkit-box-shadow: 0 0 0 1000px var(--tbsm-surface-2) inset !important;
	box-shadow: 0 0 0 1000px var(--tbsm-surface-2) inset !important;
	caret-color: var(--tbsm-text);
	transition: background-color 9999s ease-in-out 0s;
}

.tbsm-field { margin-bottom: 12px; min-width: 0; }

.tbsm-field label {
	display: block;
	margin-bottom: 4px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--tbsm-text);
}

.tbsm-field__hint { font-size: .78rem; color: var(--tbsm-text-faint); margin-top: 3px; }

.tbsm-form-row {
	display: grid;
	gap: var(--tbsm-gap-sm);
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ── Abzeichen ─────────────────────────────────────────────────────── */

.tbsm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: .74rem;
	font-weight: 600;
	line-height: 1.6;
	border: 1px solid var(--tbsm-border-strong);
	color: var(--tbsm-text-muted);
	background: var(--tbsm-surface-2);
	white-space: nowrap;
}

.tbsm-badge--ok { color: var(--tbsm-success); border-color: var(--tbsm-success); }
.tbsm-badge--warn { color: var(--tbsm-warning); border-color: var(--tbsm-warning); }
.tbsm-badge--danger { color: var(--tbsm-danger); border-color: var(--tbsm-danger); }
.tbsm-badge--info { color: var(--tbsm-info); border-color: var(--tbsm-info); }
.tbsm-badge--accent { color: var(--tbsm-accent); border-color: var(--tbsm-accent); }

/* Herkunftskennzeichnung: Fakt / Berechnung / Vermutung / KI */
.tbsm-origin { font-size: .72rem; letter-spacing: .02em; text-transform: uppercase; }
.tbsm-origin--fakt { color: var(--tbsm-success); }
.tbsm-origin--berechnet { color: var(--tbsm-accent); }
.tbsm-origin--heuristik { color: var(--tbsm-warning); }
.tbsm-origin--ki { color: var(--tbsm-info); }
.tbsm-origin--unbekannt { color: var(--tbsm-text-faint); }

/* ── Tabellen ──────────────────────────────────────────────────────── */

.tbsm-tablewrap {
	overflow-x: auto;
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
	background: var(--tbsm-surface);
	-webkit-overflow-scrolling: touch;
}

.tbsm-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .88rem;
	min-width: 640px;
}

.tbsm-table th,
.tbsm-table td {
	padding: 9px 12px;
	text-align: left;
	border-bottom: 1px solid var(--tbsm-border);
	vertical-align: middle;
	white-space: nowrap;
}

.tbsm-table th {
	background: var(--tbsm-surface-2);
	color: var(--tbsm-text-muted);
	font-weight: 620;
	font-size: .8rem;
	position: sticky;
	top: 0;
	z-index: 2;
}

.tbsm-table th.is-sortable { cursor: pointer; user-select: none; }
.tbsm-table th.is-sortable:hover { color: var(--tbsm-text); }
.tbsm-table th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
.tbsm-table th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }

.tbsm-table tbody tr:hover { background: var(--tbsm-surface-2); }
.tbsm-table tbody tr:last-child td { border-bottom: none; }
.tbsm-table td.is-num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--tbsm-mono); }
.tbsm-table td.is-wrap { white-space: normal; min-width: 220px; }

/*
 * Tabellen INNERHALB der Uebersichtskacheln duerfen nicht seitwaerts rollen.
 *
 * `.tbsm-table` hat eine Mindestbreite von 640 px — sinnvoll auf einer
 * eigenen Seite, aber in einer rund 460 px breiten Kachel erzwingt sie
 * genau den waagerechten Balken unter jeder Kachel. Hier faellt die
 * Mindestbreite weg, lange Bezeichnungen brechen um, und die Zahlenspalten
 * bleiben schmal. Zusammen mit den gekuerzten Betraegen („54,39 Mrd $“)
 * passt der Inhalt dadurch in die Kachel.
 */
.tbsm-grid--wide .tbsm-tablewrap { overflow-x: hidden; }
.tbsm-grid--wide .tbsm-table { min-width: 0; font-size: .82rem; table-layout: fixed; }

.tbsm-grid--wide .tbsm-table th,
.tbsm-grid--wide .tbsm-table td {
	padding: 7px 8px;
	white-space: normal;
	overflow-wrap: anywhere;
}

.tbsm-grid--wide .tbsm-table td.is-num,
.tbsm-grid--wide .tbsm-table th.is-num { white-space: nowrap; }

/* ── Kopierbare Adresse ────────────────────────────────────────────── */

.tbsm-copy {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--tbsm-mono);
	font-size: .85em;
}

body .tbsm .tbsm-copy__btn {
	border: 1px solid var(--tbsm-border) !important;
	background: transparent !important;
	color: var(--tbsm-text-muted) !important;
	padding: 1px 6px !important;
	border-radius: 4px !important;
	font-size: .75rem !important;
	cursor: pointer;
	min-height: 22px;
}

body .tbsm .tbsm-copy__btn:hover { color: var(--tbsm-accent) !important; border-color: var(--tbsm-accent) !important; }
body .tbsm .tbsm-copy__btn.is-done { color: var(--tbsm-success) !important; border-color: var(--tbsm-success) !important; }

/* ── Erklärung / Tooltip ───────────────────────────────────────────── */

.tbsm-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px; height: 15px;
	border-radius: 50%;
	border: 1px solid var(--tbsm-border-strong);
	color: var(--tbsm-text-muted);
	font-size: 10px;
	font-weight: 700;
	cursor: help;
	flex: none;
	position: relative;
}

.tbsm-info:hover, .tbsm-info:focus-visible { color: var(--tbsm-accent); border-color: var(--tbsm-accent); }

/* Der Hinweis wird bewusst NICHT abgeschnitten: fixe Position über JS. */
.tbsm-tip {
	position: fixed;
	z-index: 9999;
	max-width: min(340px, 90vw);
	padding: 9px 12px;
	background: var(--tbsm-surface-3);
	color: var(--tbsm-text);
	border: 1px solid var(--tbsm-border-strong);
	border-radius: var(--tbsm-radius-sm);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
	font-size: .82rem;
	line-height: 1.45;
	pointer-events: none;
}

.tbsm-tip__meta { color: var(--tbsm-text-faint); font-size: .75rem; margin-top: 5px; }

/* ── Fortschritt, Ladezustand, Hinweise ────────────────────────────── */

.tbsm-loading, .tbsm-empty {
	padding: 34px 20px;
	text-align: center;
	color: var(--tbsm-text-muted);
	border: 1px dashed var(--tbsm-border-strong);
	border-radius: var(--tbsm-radius);
	background: var(--tbsm-surface);
}

.tbsm-empty h3 { color: var(--tbsm-text); }

/*
 * Dicker Ladebalken.
 *
 * Ersetzt den kleinen Kringel ueberall dort, wo laenger gewartet wird.
 * Kein Prozentwert: der Server liefert am Ende alles auf einmal, jede Zahl
 * waere erfunden. Der laufende Streifen zeigt „es arbeitet", die
 * Sekundenanzeige ist gemessen.
 */
.tbsm-ladebalken {
	padding: 26px 20px 22px;
	text-align: center;
	border: 1px solid var(--tbsm-border-strong);
	border-radius: var(--tbsm-radius);
	background: var(--tbsm-surface);
}

.tbsm-ladebalken__spur {
	position: relative;
	height: 14px;
	max-width: 620px;
	margin: 0 auto 16px;
	border-radius: 999px;
	background: var(--tbsm-track);
	overflow: hidden;
}

.tbsm-ladebalken__lauf {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 38%;
	border-radius: 999px;
	background: linear-gradient( 90deg, transparent, var(--tbsm-accent), transparent );
	animation: tbsm-lauf 1.5s ease-in-out infinite;
}

.tbsm-ladebalken__titel {
	margin: 0 0 5px;
	font-size: 1.02rem;
	font-weight: 600;
	color: var(--tbsm-text);
}

.tbsm-ladebalken__hinweis {
	margin: 0;
	font-size: .88rem;
	color: var(--tbsm-text-muted);
}

.tbsm-ladebalken__zeit { margin-left: 6px; font-variant-numeric: tabular-nums; }

@keyframes tbsm-lauf {
	0%   { transform: translateX( -105% ); }
	100% { transform: translateX( 370% ); }
}

.tbsm-spinner {
	display: inline-block;
	width: 14px; height: 14px;
	margin-right: 7px;
	border: 2px solid var(--tbsm-border-strong);
	border-top-color: var(--tbsm-accent);
	border-radius: 50%;
	animation: tbsm-spin .8s linear infinite;
	vertical-align: -2px;
}

@keyframes tbsm-spin { to { transform: rotate(360deg); } }

.tbsm-bar {
	height: 6px;
	background: var(--tbsm-track);
	border-radius: 999px;
	overflow: hidden;
}

.tbsm-bar__fill {
	height: 100%;
	background: var(--tbsm-accent);
	transition: width .3s ease;
}

.tbsm-notice {
	padding: 10px 14px;
	border-radius: var(--tbsm-radius-sm);
	border: 1px solid var(--tbsm-border-strong);
	background: var(--tbsm-surface-2);
	margin-bottom: var(--tbsm-gap);
	font-size: .9rem;
}

.tbsm-notice--error { border-color: var(--tbsm-danger); color: var(--tbsm-danger); }
.tbsm-notice--ok { border-color: var(--tbsm-success); color: var(--tbsm-success); }
.tbsm-notice--warn { border-color: var(--tbsm-warning); color: var(--tbsm-warning); }

.tbsm-locked {
	padding: 44px 22px;
	text-align: center;
	background: var(--tbsm-surface);
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
}

/* ── Aktivitätsfeed und Listen im Dashboard ────────────────────────── */

.tbsm-feed__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	border-bottom: 1px solid var(--tbsm-border);
	align-items: flex-start;
}

.tbsm-feed__row:last-child { border-bottom: none; }
.tbsm-feed__row.is-clickable { cursor: pointer; }
.tbsm-feed__row.is-clickable:hover { background: var(--tbsm-surface-2); }

.tbsm-feed__left { min-width: 0; flex: 1 1 auto; }
.tbsm-feed__right { text-align: right; flex: none; font-size: .85em; }
.tbsm-feed__satz { line-height: 1.4; }
.tbsm-feed__titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Marktbild ─────────────────────────────────────────────────────── */

/*
 * Volle Breite. `auto-fill` legte eine leere zusaetzliche Spalte an, sodass
 * die fuenf Kacheln rechts einen toten Streifen stehen liessen. `auto-fit`
 * laesst leere Spalten zusammenfallen — die vorhandenen Kacheln teilen sich
 * die gesamte Breite.
 */
.tbsm-marktbild {
	/* Umbruch statt Raster — sonst bleibt die angebrochene letzte Zeile als
	   Loch stehen. Gemessen bei 1440 px: 5 Kacheln in 4 Spuren, letzte
	   Zeile 24 % der Breite. */
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	width: 100%;
}

.tbsm-marktbild > * { flex: 1 1 240px; min-width: 0; }

.tbsm-marktbild__item {
	background: var(--tbsm-surface);
	border: 1px solid var(--tbsm-border);
	border-left: 3px solid var(--tbsm-accent);
	border-radius: var(--tbsm-radius-sm);
	padding: 10px 12px;
	min-width: 0;
}

.tbsm-marktbild__label {
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--tbsm-text-muted);
}

.tbsm-marktbild__wert {
	font-size: 1.15rem;
	font-weight: 660;
	margin: 2px 0 4px;
	word-break: break-word;
}

/* ── Fortschritt der Erstsynchronisierung ──────────────────────────── */

.tbsm-stufen { list-style: none; margin: 12px 0 0; padding: 0; }

.tbsm-stufen li {
	display: flex;
	gap: 8px;
	align-items: baseline;
	padding: 3px 0;
	color: var(--tbsm-text-muted);
	font-size: .88rem;
}

.tbsm-stufen li.is-done { color: var(--tbsm-text); }
.tbsm-stufen__mark { color: var(--tbsm-text-faint); width: 14px; flex: none; }
.tbsm-stufen li.is-done .tbsm-stufen__mark { color: var(--tbsm-success); }

/* ── Starter-Pakete ────────────────────────────────────────────────── */

.tbsm-pack {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius-sm);
	margin-bottom: 8px;
	cursor: pointer;
	background: var(--tbsm-surface-2);
}

.tbsm-pack:hover { border-color: var(--tbsm-accent); }
.tbsm-pack__label { font-weight: 620; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Diagramme ─────────────────────────────────────────────────────── */

.tbsm-chart {
	width: 100%;
	min-height: 220px;
	position: relative;
}

.tbsm-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.tbsm-chart__axis { stroke: var(--tbsm-border-strong); stroke-width: 1; }
.tbsm-chart__grid { stroke: var(--tbsm-border); stroke-width: 1; stroke-dasharray: 2 4; }
.tbsm-chart__label { fill: var(--tbsm-text-muted); font-size: 11px; font-family: var(--tbsm-font); }
.tbsm-chart__line { fill: none; stroke: var(--tbsm-accent); stroke-width: 2; stroke-linejoin: round; }
.tbsm-chart__area { fill: var(--tbsm-accent); opacity: .12; }
.tbsm-chart__bar { fill: var(--tbsm-accent); }
.tbsm-chart__bar--pos { fill: var(--tbsm-success); }
.tbsm-chart__bar--neg { fill: var(--tbsm-danger); }
.tbsm-chart__dot { fill: var(--tbsm-accent); }

.tbsm-chart__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
	font-size: .8rem;
	color: var(--tbsm-text-muted);
}

.tbsm-chart__legend span { display: inline-flex; align-items: center; gap: 5px; }
.tbsm-chart__swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }

.tbsm-chart__toolbar {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 8px;
	align-items: center;
}

/* ── Wallet-Graph ──────────────────────────────────────────────────── */

.tbsm-graph {
	width: 100%;
	height: clamp(360px, 60vh, 680px);
	border: 1px solid var(--tbsm-border);
	border-radius: var(--tbsm-radius);
	background: var(--tbsm-surface);
	position: relative;
	overflow: hidden;
	touch-action: none;
}

.tbsm-graph svg { width: 100%; height: 100%; display: block; }
.tbsm-graph__edge { stroke: var(--tbsm-border-strong); fill: none; }
.tbsm-graph__edge.is-strong { stroke: var(--tbsm-accent); }
.tbsm-graph__node { cursor: pointer; }
.tbsm-graph__node circle { stroke: var(--tbsm-surface); stroke-width: 2; }
.tbsm-graph__node text { fill: var(--tbsm-text); font-size: 11px; pointer-events: none; }
.tbsm-graph__node.is-center circle { stroke: var(--tbsm-accent); stroke-width: 3; }

/* ── Detailseiten ──────────────────────────────────────────────────── */

.tbsm-detail__head {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tbsm-gap);
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: var(--tbsm-gap);
}

.tbsm-detail__ident { min-width: 0; flex: 1 1 340px; }
.tbsm-detail__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tbsm-tabs {
	display: flex;
	gap: 2px;
	border-bottom: 1px solid var(--tbsm-border);
	margin-bottom: var(--tbsm-gap);
	overflow-x: auto;
}

body .tbsm .tbsm-tab {
	padding: 8px 14px !important;
	background: transparent !important;
	border: none !important;
	border-bottom: 2px solid transparent !important;
	color: var(--tbsm-text-muted) !important;
	cursor: pointer;
	white-space: nowrap;
	font-size: .9rem !important;
	border-radius: 0 !important;
}

body .tbsm .tbsm-tab.is-active {
	color: var(--tbsm-accent) !important;
	border-bottom-color: var(--tbsm-accent) !important;
	font-weight: 620 !important;
}

/* Befund-Liste (Meme Intelligence) */
.tbsm-finding {
	border-left: 3px solid var(--tbsm-border-strong);
	padding: 8px 0 8px 12px;
	margin-bottom: 10px;
}

.tbsm-finding--kritisch { border-left-color: var(--tbsm-danger); }
.tbsm-finding--warnung { border-left-color: var(--tbsm-warning); }
.tbsm-finding--hinweis { border-left-color: var(--tbsm-accent); }
.tbsm-finding--info { border-left-color: var(--tbsm-text-faint); }
.tbsm-finding__title { font-weight: 620; margin-bottom: 2px; }
.tbsm-finding__why { color: var(--tbsm-text-muted); font-size: .87rem; }
.tbsm-finding__src { color: var(--tbsm-text-faint); font-size: .78rem; margin-top: 3px; }

/* Score-Aufschlüsselung */
.tbsm-score { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tbsm-score__num { font-size: 2.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tbsm-factor { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--tbsm-border); }
.tbsm-factor:last-child { border-bottom: none; }
.tbsm-factor__label { font-size: .88rem; }
.tbsm-factor__val { font-variant-numeric: tabular-nums; font-family: var(--tbsm-mono); font-size: .85rem; }
.tbsm-factor__why { grid-column: 1 / -1; color: var(--tbsm-text-faint); font-size: .78rem; }

/* ── Dialog ────────────────────────────────────────────────────────── */

.tbsm-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .6);
	overflow-y: auto;
}

.tbsm-modal__box {
	background: var(--tbsm-surface);
	color: var(--tbsm-text);
	border: 1px solid var(--tbsm-border-strong);
	border-radius: var(--tbsm-radius);
	max-width: 720px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.tbsm-modal__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 14px;
}

.tbsm-modal__foot {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 18px;
	flex-wrap: wrap;
}

/* ── Fusszeile ─────────────────────────────────────────────────────── */

.tbsm-foot {
	margin-top: 26px;
	padding-top: 14px;
	border-top: 1px solid var(--tbsm-border);
	font-size: .82rem;
	color: var(--tbsm-text-faint);
}

.tbsm-foot summary { cursor: pointer; color: var(--tbsm-text-muted); }
.tbsm-foot ul { margin: 8px 0 0; padding-left: 20px; }
.tbsm-foot li { margin-bottom: 3px; }

/* ── Seitenwahl ────────────────────────────────────────────────────── */

.tbsm-pager {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	margin-top: var(--tbsm-gap);
	flex-wrap: wrap;
	font-size: .85rem;
	color: var(--tbsm-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   Kleine Bildschirme
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
	/*
	 * align-items: flex-start bestimmt in Spaltenrichtung die BREITE.
	 * Im Handy-Layout wächst die Hauptspalte dadurch auf Inhaltsbreite und
	 * läuft aus dem Bildschirm — bei body{overflow:hidden} unsichtbar
	 * abgeschnitten. Deshalb hier überall stretch.
	 */
	.tbsm-head,
	.tbsm-hero,
	.tbsm-detail__head,
	.tbsm-grid,
	.tbsm-marktbild,
	.tbsm-form-row {
		align-items: stretch;
	}

	.tbsm { padding: 12px; font-size: 14.5px; }
	.tbsm-head { flex-direction: column; align-items: stretch; }
	/* Suchfeld rutscht unter die Knopfzeile und nimmt die volle Breite. */
	.tbsm-hero { padding: 10px; flex-direction: column; align-items: stretch; }
	.tbsm-marktbild > * { flex-basis: 100%; }
	.tbsm-quick { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
	.tbsm-quick .tbsm-btn { flex: 0 0 auto; }
	.tbsm-search { flex: 1 1 auto; min-width: 0; margin-left: 0; }
	.tbsm-feed__row { flex-direction: column; gap: 4px; }
	.tbsm-feed__right { text-align: left; }
	.tbsm-search { max-width: none; }
	.tbsm-grid > *, .tbsm-grid--wide > * { flex-basis: 100%; }
	.tbsm-grid--kpi > * { flex-basis: 100%; }

	/* Menüleiste wird zur aufklappbaren Liste über dem Inhalt. */
	.tbsm-shell { flex-direction: column; align-items: stretch; }
	.tbsm-nav { position: static; width: 100%; flex: none; }
	.tbsm-content { width: 100%; max-width: 100%; }
	body .tbsm .tbsm-nav__toggle { display: inline-flex !important; }
	.tbsm-nav__list { display: none; margin-top: 8px; }
	.tbsm-nav__list.is-open { display: flex; }

	.tbsm-detail__actions { width: 100%; }
	.tbsm-modal__box { padding: 14px; }
}

/* Zwischen 900 und 1200 px etwas schmaler, damit der Inhalt Luft behält. */
@media (min-width: 901px) and (max-width: 1200px) {
	.tbsm-nav { flex-basis: 196px; }
	.tbsm-nav__link { font-size: .88rem; padding: 8px 10px; }
}

@media (max-width: 560px) {
	.tbsm-table { min-width: 520px; }
	.tbsm-kpi__value { font-size: 1.15rem; }
	body .tbsm .tbsm-btn { flex: 1 1 auto; justify-content: center; }
}

/* Grosse Bildschirme: Kennzahlen bekommen mehr Spalten. */
@media (min-width: 1400px) {
	.tbsm-grid--kpi > * { flex-basis: 210px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Bedienhilfen
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
	.tbsm *,
	.tbsm *::before,
	.tbsm *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
	.tbsm-spinner { animation: none !important; border-top-color: var(--tbsm-accent); }
	/*
	 * Ohne Bewegung bliebe vom Balken ein stehender Streifen am linken Rand.
	 * Stattdessen eine ruhige, deutlich sichtbare Teilfuellung — die
	 * Sekundenanzeige daneben zeigt weiterhin, dass es laeuft.
	 */
	.tbsm-ladebalken__lauf {
		animation: none !important;
		width: 100%;
		background: repeating-linear-gradient(
			135deg,
			var(--tbsm-accent) 0 12px,
			var(--tbsm-track) 12px 24px
		);
		opacity: .55;
	}
}

@media print {
	.tbsm-nav, .tbsm-search, .tbsm-detail__actions, .tbsm-chart__toolbar { display: none !important; }
	.tbsm { background: #fff; color: #000; max-width: none; }
	.tbsm-card { break-inside: avoid; border-color: #999; }
}

/* Handy (02.11.2026): Die Zeile wird senkrecht (flex-direction: column), die
   Grundregel align-items: flex-start blieb – der linke Teil wurde so breit wie
   sein nicht umbrechender Titel (bis 553px bei 375px). Gestreckt greift die
   vorgesehene Kuerzung mit „…". */
@media (max-width: 700px) {
	.tbsm-feed__row > .tbsm-feed__left { align-self: stretch; }
}
