/* Signal Hub Dashboard - Design-System.
   Farben nur ueber Tokens (dunkel = Standard, hell per data-theme, gesetzt von
   theme.js). Gruen/Rot (--pos/--neg) NUR fuer Ergebnis-Vorzeichen, Gelb (--warn)
   fuer Aufmerksamkeit (veraltet, offline, Fehler), sonst eine ruhige Akzentfarbe.
   Raster 4/8 px, Basisschrift 14 px, nichts unter 12 px, Kontrast >= 4.5:1
   (tests/test_dashboard_design.py rechnet nach). */

:root {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #161a21;
  --surface-2: #1e232c;
  --surface-3: #262c36;
  --surface-hover: #1a1f27;
  --border: #262c36;
  --border-strong: #3a4352;
  --grid: rgba(155, 165, 180, 0.12);
  --text: #e6e9ef;
  --text-strong: #f6f7f9;
  --text-muted: #9ba5b4;
  --accent: #86b1f7;
  --accent-tint: rgba(134, 177, 247, 0.14);
  --accent-border: rgba(134, 177, 247, 0.45);
  --on-accent: #0b1220;
  --pos: #45c98a;
  --pos-tint: rgba(69, 201, 138, 0.14);
  --pos-fill: rgba(69, 201, 138, 0.30);
  --neg: #f47b76;
  --neg-tint: rgba(244, 123, 118, 0.14);
  --neg-fill: rgba(244, 123, 118, 0.30);
  --warn: #e6b04e;
  --warn-tint: rgba(230, 176, 78, 0.14);
  --warn-border: rgba(230, 176, 78, 0.45);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --surface-3: #e2e6eb;
  --surface-hover: #f8f9fb;
  --border: #e1e5ea;
  --border-strong: #c3cad4;
  --grid: rgba(86, 96, 112, 0.14);
  --text: #1c2330;
  --text-strong: #0b1018;
  --text-muted: #566070;
  --accent: #1f4fb5;
  --accent-tint: rgba(31, 79, 181, 0.10);
  --accent-border: rgba(31, 79, 181, 0.40);
  --on-accent: #ffffff;
  --pos: #0f6b37;
  --pos-tint: rgba(15, 107, 55, 0.10);
  --pos-fill: rgba(15, 107, 55, 0.22);
  --neg: #b02a24;
  --neg-tint: rgba(176, 42, 36, 0.10);
  --neg-fill: rgba(176, 42, 36, 0.20);
  --warn: #7d4a00;
  --warn-tint: rgba(196, 128, 0, 0.12);
  --warn-border: rgba(125, 74, 0, 0.40);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-2: 0 12px 28px rgba(16, 24, 40, 0.16);
}

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-chart: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 26px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --gutter: 24px;
  --maxw: 1680px;
  --pad-x: max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* ---- Grundlagen ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.45; color: var(--text);
  background: var(--bg); min-height: 100vh; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
b, strong { font-weight: 600; color: var(--text-strong); }
small { font-size: var(--fs-xs); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-tint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Monospace wirkt groesser -> etwas kleiner, aber nie unter --fs-xs (12 px). */
.mono { font-family: var(--mono); font-size: max(0.95em, var(--fs-xs)); }
.dim { color: var(--text-muted); font-weight: 400; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.zero { color: var(--text-muted); }
.warn-text { color: var(--warn); }
.nowrap { white-space: nowrap; }
.sep { color: var(--text-muted); padding: 0 6px; }

/* ---- Knoepfe ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 34px; padding: 6px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text-strong); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-small { min-height: 30px; padding: 4px 12px; font-size: var(--fs-xs); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text-strong); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--r-sm);
  background: none; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; font-size: var(--fs-sm);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.theme-btn { font-size: var(--fs-md); width: 34px; height: 34px; border-color: var(--border); }

/* Segment-Schalter (Zeitraum, Cluster, Feedback-Filter) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px;
  border-radius: 7px; border: 0; background: transparent; color: var(--text-muted);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg-btn:hover { color: var(--text-strong); background: var(--surface-2); }
.seg-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text-strong); font-weight: 600; box-shadow: var(--shadow-1); }
.seg-count { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---- Formularfelder ---- */
.field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.field-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
select, input[type="password"], input[type="text"] {
  min-height: 34px; padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: var(--fs-sm);
}
select:hover, input:hover { border-color: var(--text-muted); }
select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

/* ---- Anmeldung ---- */
.login { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: var(--s4); }
.login-theme { position: absolute; top: var(--s4); right: var(--s4); }
.login-box {
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.login-title { font-size: var(--fs-lg); font-weight: 650; color: var(--text-strong); }
.login-sub { color: var(--text-muted); font-size: var(--fs-sm); margin-top: calc(-1 * var(--s2)); margin-bottom: var(--s2); }
.login-box input[type="password"] { width: 100%; min-height: 40px; font-size: var(--fs-base); }
.login-box .btn-primary { min-height: 40px; font-size: var(--fs-base); }
.check { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.login-err { color: var(--warn); font-size: var(--fs-sm); }

/* Markenzeichen: drei Balken (rein per CSS, keine Grafikdatei) */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: var(--fs-md); font-weight: 650; color: var(--text-strong); letter-spacing: 0.01em; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  background:
    linear-gradient(var(--on-accent), var(--on-accent)) 5px 12px / 3px 6px no-repeat,
    linear-gradient(var(--on-accent), var(--on-accent)) 10px 8px / 3px 10px no-repeat,
    linear-gradient(var(--on-accent), var(--on-accent)) 15px 4px / 3px 14px no-repeat,
    var(--accent);
}
.brand-mark.is-large { width: 36px; height: 36px; border-radius: 9px; background-size: 4px 9px, 4px 15px, 4px 22px, auto; background-position: 8px 19px, 16px 13px, 24px 6px, 0 0; }

/* ---- Kopfzeile ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s3) var(--pad-x); background: var(--surface); border-bottom: 1px solid var(--border);
}
.status-bar { display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-muted); }
.status-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-item b { font-weight: 600; color: var(--text); }
.status-actions { display: inline-flex; align-items: center; gap: var(--s2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-muted); }
.dot.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.dot.warn, .dot.off { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-tint); }

.conn-banner {
  display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--pad-x);
  background: var(--warn-tint); color: var(--text); font-size: var(--fs-sm); border-bottom: 1px solid var(--warn-border);
}
.conn-icon, .notice-icon, .state-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%; font-size: var(--fs-xs); font-weight: 700;
}
.conn-icon { background: var(--warn); color: var(--bg); }
/* Neuer Stand ausgerollt (build.sha aus /health hat sich geaendert) */
.update-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: var(--s2) var(--pad-x);
  background: var(--accent-tint); color: var(--text); font-size: var(--fs-sm); border-bottom: 1px solid var(--accent-border);
}
.update-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: var(--fs-xs); font-weight: 700; }
.update-text { flex: 1 1 240px; min-width: 0; }
.notice-box { position: fixed; top: var(--s3); right: var(--s3); z-index: 50; max-width: min(440px, calc(100vw - 24px)); }
.notice {
  display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border-strong); font-size: var(--fs-sm); box-shadow: var(--shadow-2);
}
.notice-text { flex: 1; padding-top: 1px; }
.notice-icon { background: var(--accent-tint); color: var(--accent); }
.notice-ok .notice-icon { background: var(--pos-tint); color: var(--pos); }
.notice-error { border-color: var(--warn-border); }
.notice-error .notice-icon { background: var(--warn); color: var(--bg); }
.notice-close { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: var(--fs-md); line-height: 1; padding: 0 2px; }
.notice-close:hover { color: var(--text-strong); }

/* ---- Kennzahlen ---- */
.kpis {
  display: grid; grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(150px, 1fr)); gap: var(--s3);
  padding: var(--s4) var(--pad-x) var(--s2);
}
.kpi {
  min-width: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px;
}
.kpi-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.kpi-period { font-weight: 500; padding-left: 4px; }
.kpi-period::before { content: "· "; }
.kpi-row { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.kpi-value { font-size: 30px; font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; }
.kpi-value.zero { color: var(--text-muted); }
.kpi-side { font-size: var(--fs-lg); font-weight: 600; }
.kpi-side small { color: var(--text-muted); font-weight: 500; font-size: var(--fs-sm); }
/* Darf umbrechen: abgeschnittene Hauptwerte ("vor 1 Std. 23…") sind schlimmer als zwei Zeilen. */
.kpi-num { font-size: var(--fs-lg); font-weight: 600; color: var(--text-strong); line-height: 1.3; overflow-wrap: break-word; }
.kpi-num small { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.kpi-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.kpi-sub b { color: var(--text); font-weight: 600; }
.kpi-sub .sep { padding: 0 4px; }
.kpi-lead { border-color: var(--border-strong); }

/* ---- Tabs + Zeitraum ---- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap;
  padding: var(--s2) var(--pad-x) 0; background: var(--bg); border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: var(--s1); min-width: 0; }
.tabs [role="tab"] {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px 12px;
  background: none; border: 0; color: var(--text-muted); font-size: var(--fs-base); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tabs [role="tab"]:hover { color: var(--text-strong); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text-strong); font-weight: 600; }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabs [role="tab"]:focus-visible { outline-offset: -2px; border-radius: var(--r-sm); }
.tab-badge { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); font-size: var(--fs-xs); font-weight: 600; line-height: 20px; text-align: center; }
.period { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding-bottom: var(--s2); }
.period-lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.period-info { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---- Ansichten, Panels, Zustaende ---- */
.view { padding: var(--s4) var(--pad-x) var(--s6); }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.view-info { font-size: var(--fs-sm); color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
#sig-summary { margin: 0 0 var(--s3); }
.panel { min-width: 0; padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-strong); margin-bottom: var(--s3); }
.panel-title .dim { font-weight: 400; }
.more-row { padding: var(--s4) 0 0; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }
.note { color: var(--text-muted); font-size: var(--fs-sm); padding: var(--s2) 0; }

.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); text-align: center;
  min-height: 180px; padding: var(--s6) var(--s4); border-radius: var(--r-md); border: 1px dashed var(--border-strong); color: var(--text-muted);
}
.state-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.state-hint { font-size: var(--fs-sm); color: var(--text-muted); max-width: 520px; }
.state-icon { width: 28px; height: 28px; font-size: var(--fs-base); background: var(--surface-2); color: var(--text-muted); }
.state-error { border-style: solid; border-color: var(--warn-border); background: var(--warn-tint); }
.state-error .state-icon { background: var(--warn); color: var(--bg); }
.state .btn { margin-top: var(--s2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-error {
  display: flex; align-items: center; justify-content: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s2) var(--s3);
  border-radius: var(--r-sm); background: var(--warn-tint); border: 1px solid var(--warn-border); color: var(--text); font-size: var(--fs-sm);
}
.chart-box .state { min-height: 100%; border: 0; }

/* ---- Karten ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s3); }
.card-grid.is-wide { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
.card {
  position: relative; min-width: 0; display: flex; flex-direction: column;
  padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.card.is-link { cursor: pointer; }
.card.is-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.card.has-alert { border-color: var(--warn-border); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); margin-bottom: var(--s3); }
.card-id { min-width: 0; flex: 1; }
.card-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-md); font-weight: 600; color: var(--text-strong); line-height: 1.3; }
.card-title .name { overflow-wrap: anywhere; }
.title-btn { background: none; border: 0; padding: 0; color: inherit; font-weight: inherit; cursor: pointer; text-align: left; overflow-wrap: anywhere; min-width: 0; }
.title-btn:hover { color: var(--accent); }
.card-sub { display: flex; flex-wrap: wrap; gap: 2px var(--s3); margin-top: 2px; font-size: var(--fs-xs); color: var(--text-muted); }
.card-sub .mono { font-size: var(--fs-xs); }
.card-meta { margin-top: var(--s2); font-size: var(--fs-xs); color: var(--text-muted); }
.card-meta .sep { padding: 0 4px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.online-dot.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.online-dot.off { background: transparent; border: 2px solid var(--text-muted); }

/* Klarnamen-Editor im Kartenkopf */
.label-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); width: 100%; font-size: var(--fs-sm); font-weight: 400; }
.label-form input { flex: 1 1 160px; min-width: 0; min-height: 30px; }

/* Bewertung (Cluster) und Quelle der Leitmetrik */
.cl-tag, .src-tag { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.cl-icon { font-size: 12px; line-height: 1; }
.cl-hot .cl-icon, .cl-icon.cl-hot { color: var(--pos); }
.cl-cold .cl-icon, .cl-icon.cl-cold { color: var(--neg); }
.src-tag { padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.src-tag.is-muted { background: var(--surface-2); color: var(--text-muted); }

/* Leitmetrik */
.lead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.lead-main, .lead-aside { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lead-aside { align-items: flex-end; text-align: right; }
.lead-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.lead-value { font-size: var(--fs-xl); font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; }
.lead-value.is-money { font-size: 22px; }
.lead-value.zero { color: var(--text-muted); }
.lead-value small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
.lead-note { font-size: var(--fs-xs); color: var(--text-muted); }
.lead-num { font-size: var(--fs-md); font-weight: 600; line-height: 1.2; }
.lead-num.zero { color: var(--text-muted); }

/* Gewinn-/Verlustanteil (aus dem PF) statt Trefferquoten-Balken */
.bal { display: flex; height: 4px; margin: var(--s3) 0; border-radius: 999px; overflow: hidden; background: var(--neg); }
.bal-fill { display: block; height: 100%; width: 0; background: var(--pos); box-shadow: 2px 0 0 var(--surface); }
.bal.is-empty { background: var(--surface-3); }
.bal.is-weak { opacity: 0.45; }

.card-line { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
.card-line b { font-weight: 600; }
.card-line + .card-line { margin-top: 2px; }
.card-line.is-detail { font-size: var(--fs-xs); }
.card-line .sep { padding: 0 6px; }
.claimed {
  align-self: flex-start; display: inline-block; margin-top: var(--s2); padding: 1px 8px; border-radius: 999px;
  border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: var(--fs-xs); font-style: italic;
}
.kpi .claimed { margin-top: 2px; }
.card-more { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.card-more:empty { display: none; }
.runs-at { line-height: 1.5; }
.runs-at b { color: var(--text); font-weight: 600; }
.more-toggle { display: none; }
.card-row { display: flex; align-items: baseline; gap: var(--s2); }
.card-row > .card-line { flex: 1; min-width: 0; }
.flag { margin-top: var(--s2); padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: 1.4; }
.flag-warn { background: var(--warn-tint); border: 1px solid var(--warn-border); color: var(--text); }
.flag-warn::before { content: "! "; font-weight: 700; color: var(--warn); }
.sub-block { margin-bottom: var(--s2); }
.sec-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.sec-label .dim { font-weight: 400; }

/* ---- Marken (Familien: Status, Ergebnis, Qualitaet, Hinweis) ---- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 500; line-height: 20px; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border);
}
.tag-warn { color: var(--warn); background: var(--warn-tint); border-color: var(--warn-border); font-weight: 600; }
.tag-accent { color: var(--accent); background: var(--accent-tint); border-color: var(--accent-border); font-weight: 600; }
/* Status (Familie: Umriss/Pille) */
.st-active { color: var(--accent); background: var(--accent-tint); border-color: var(--accent-border); }
.st-closed, .st-expired, .st-cancelled { color: var(--text-muted); }
.st-expired, .st-cancelled { background: transparent; }
.st-rejected { color: var(--warn); background: transparent; border-color: var(--warn-border); }
/* Ergebnis (Familie: gefuelltes Rechteck), verifiziert prominent, behauptet gedaempft */
.res {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 4px; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; line-height: 20px; color: var(--text); background: var(--surface-3);
}
.res-win { color: var(--pos); background: var(--pos-tint); }
.res-loss { color: var(--neg); background: var(--neg-tint); }
.res-claimed { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-muted); font-weight: 500; font-style: italic; line-height: 18px; }
.src { margin-left: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
/* Qualitaet: Profit-Faktor */
.pf-tag {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 650; line-height: 20px; border: 1px solid transparent;
}
.pf-pos { color: var(--pos); background: var(--pos-tint); }
.pf-neg { color: var(--neg); background: var(--neg-tint); }
.pf-zero { color: var(--text-muted); background: var(--surface-2); }
.pf-new { color: var(--text-muted); border-color: var(--border-strong); font-weight: 500; }
/* Richtung: neutral (keine Ergebnisfarbe) */
.dir { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--text); white-space: nowrap; }
.dir-icon { font-size: 12px; line-height: 1; color: var(--text-muted); }

/* ---- Listen in Karten ---- */
.list { margin-top: var(--s3); }
.list-head { display: flex; justify-content: space-between; gap: var(--s2); padding-bottom: var(--s1); border-bottom: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.list-rows { display: flex; flex-direction: column; }
.li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name main" "meta side";
  gap: 0 var(--s3); padding: 6px var(--s2); margin: 0 calc(-1 * var(--s2));
  width: calc(100% + 2 * var(--s2)); border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: var(--fs-sm);
}
.li + .li { border-top: 1px solid var(--border); }
.li.is-link { cursor: pointer; }
.li.is-link:hover { background: var(--surface-2); }
.li.is-link:hover + .li { border-top-color: transparent; }
.li.is-link:hover .li-name { color: var(--accent); }
.li-name { grid-area: name; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text-strong); }
.li-main { grid-area: main; text-align: right; white-space: nowrap; font-weight: 600; }
.li-meta { grid-area: meta; min-width: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.li-meta b { color: var(--text); }
.li-side { grid-area: side; text-align: right; white-space: nowrap; font-size: var(--fs-xs); font-weight: 600; }
.list-toggle { margin-top: var(--s2); font-size: var(--fs-sm); }

/* ---- Konten ---- */
.acct-list { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.acct-card .flag { margin: 0 0 var(--s2); }
.acct { padding: var(--s3); border-radius: var(--r-sm); background: var(--surface-2); }
.acct.is-stale .acct-grid dd { color: var(--text-muted); }
.acct-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-bottom: var(--s2); font-size: var(--fs-sm); }
.acct-name { color: var(--text-muted); }
.acct-tags { display: inline-flex; gap: var(--s1); margin-left: auto; }
/* Spalten nach Platz statt fix 4: Geldbetraege ("100 084,32 USD", geschuetzte Leerzeichen)
   passen in eine Zeile; reicht es doch nicht, wird gekuerzt (voller Wert im title). */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
.kv { min-width: 0; }
.kv dt { font-size: var(--fs-xs); color: var(--text-muted); }
.kv dd { font-size: var(--fs-sm); font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct .card-line { font-size: var(--fs-xs); }

/* ---- Matrix ---- */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--fs-xs); color: var(--text-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
/* relative: Bildschirmleser-Texte (.sr-only, absolut) bleiben im Scrollbereich */
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll:focus-visible { outline-offset: -2px; }
table { border-collapse: collapse; }
table.matrix { border-collapse: separate; border-spacing: 3px; font-size: var(--fs-xs); margin: var(--s2); }
.mx-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); text-align: left; vertical-align: bottom; padding: 6px 8px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.mx-col { vertical-align: bottom; padding: 4px 2px; min-width: 64px; color: var(--text-muted); font-weight: 500; }
.mx-col span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 200px; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-xs); line-height: 1.2; }
.mx-row { position: sticky; left: 0; z-index: 2; min-width: 170px; max-width: 230px; padding: 6px 10px; text-align: left; background: var(--surface); border-right: 1px solid var(--border); }
.mx-name { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.mx-meta { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.mx-cell { min-width: 64px; padding: 6px 4px; border-radius: var(--r-sm); text-align: center; background: var(--surface-2); color: var(--text-muted); }
.mx-pf { display: block; font-size: var(--fs-sm); font-weight: 650; line-height: 1.2; }
.mx-sub { display: block; font-size: var(--fs-xs); line-height: 1.3; opacity: 1; }
/* Heatmap: Farbe traegt die Flaeche, Ziffern bleiben neutral (Kontrast in beiden Themes) */
.mx-pf-pos { background: var(--pos-fill); color: var(--text-strong); }
.mx-pf-neg { background: var(--neg-fill); color: var(--text-strong); }
.mx-pf-pos .mx-sub, .mx-pf-neg .mx-sub { color: var(--text-strong); }
.mx-grey { background: var(--surface-2); color: var(--text-muted); }
.mx-empty { background: transparent; color: var(--text-muted); }
.sw.mx-grey { border: 1px solid var(--border-strong); }

.combos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); }
.combo-list { list-style: none; display: flex; flex-direction: column; }
.combo { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s2) 0; }
.combo + .combo { border-top: 1px solid var(--border); }
.combo-rank { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); text-align: center; }
.combo-names { font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; }
.combo .card-line { font-size: var(--fs-xs); }

/* ---- Auswertung ---- */
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.chart-box { position: relative; height: 240px; }
.chart-note { margin-top: var(--s2); font-size: var(--fs-xs); color: var(--text-muted); }
table.lb { width: 100%; font-size: var(--fs-sm); }
table.lb th { padding: 6px 8px; text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.lb td { padding: 8px; border-bottom: 1px solid var(--border); }
table.lb tr:last-child td { border-bottom: 0; }
table.lb .num { text-align: right; white-space: nowrap; }
table.lb .rank { width: 28px; color: var(--text-muted); }
table.lb .name { font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; min-width: 120px; }

/* ---- Signale ---- */
/* auto-fit: das Feld "Rolle des Kunden" erscheint nur mit Kunden-Filter */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); align-items: end; margin-bottom: var(--s3); }
.filters select { width: 100%; }
.filter-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.filter-actions .spacer { flex: 1; }
table.sig-table { width: 100%; font-size: var(--fs-sm); }
.sig-table th {
  position: sticky; top: 0; z-index: 1; padding: 10px 12px; text-align: left; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.sig-table th.num { text-align: right; }
.sig-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.sig-table td.num { text-align: right; white-space: nowrap; }
.sig-table tbody tr:last-child td { border-bottom: 0; }
.sort-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.sort-btn:hover { color: var(--text-strong); }
th[aria-sort="ascending"] .sort-btn::after { content: " ▲"; color: var(--accent); }
th[aria-sort="descending"] .sort-btn::after { content: " ▼"; color: var(--accent); }
.sig-row { cursor: pointer; }
.sig-row:hover td { background: var(--surface-hover); }
.sig-row.is-open td { background: var(--surface-2); border-bottom-color: transparent; }
.sig-row.is-muted td, .sig-row.is-muted strong, .sig-row.is-muted .dir { color: var(--text-muted); }
.sig-row.is-new td { animation: flash 2s ease-out; }
@keyframes flash { 0% { background: var(--accent-tint); } 100% { background: transparent; } }
.row-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; border: 0; color: var(--text-strong); cursor: pointer; font-size: var(--fs-sm); }
.chev { display: inline-block; width: 12px; color: var(--text-muted); font-size: var(--fs-xs); }
.dir-inline { display: none; }
.c-time { color: var(--text-muted); }
.cell-text { max-width: 220px; overflow-wrap: anywhere; color: var(--text); }
.c-cust { color: var(--text-muted); }
/* Rolle des gefilterten Kunden (eingeliefert / weitergeleitet / nur gehandelt) */
.role { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: var(--fs-xs); line-height: 18px; color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.role-eingeliefert { color: var(--accent); border-color: var(--accent-border); }
.role-gehandelt { border-style: dashed; }
.price { color: var(--text); }
.price .more { color: var(--text-muted); font-size: var(--fs-xs); }
.row-state > td { padding: var(--s4); }
.row-state .state { min-height: 140px; }

.sig-detail-row > td { padding: 0 !important; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sig-detail { margin: 0 var(--s3) var(--s3); padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2) var(--s4); margin-bottom: var(--s4); font-size: var(--fs-sm); }
.fact { min-width: 0; }
.fact dt { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.fact dd { color: var(--text-strong); overflow-wrap: anywhere; }
.fact dd.mono { font-family: var(--font); }
.sig-events h5 { font-size: var(--fs-sm); font-weight: 600; color: var(--text-strong); margin-bottom: var(--s2); }
.ev-list { list-style: none; border-left: 2px solid var(--border-strong); margin-left: 4px; }
.ev { position: relative; display: grid; grid-template-columns: 100px 140px minmax(0, 1fr); gap: 2px var(--s3); padding: 6px 0 6px var(--s3); font-size: var(--fs-sm); }
.ev::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.ev-time { color: var(--text-muted); font-size: var(--fs-xs); white-space: nowrap; padding-top: 2px; }
.ev-type { font-weight: 600; color: var(--text-strong); }
.ev-new::before { border-color: var(--accent); }
.ev-tp_hit::before, .ev-trade_result::before { border-color: var(--text-muted); }
.ev-data { display: flex; flex-wrap: wrap; gap: 2px var(--s3); color: var(--text); min-width: 0; }
.ev-kv .k, .ev-text .k { color: var(--text-muted); }
.ev-kv .v { font-weight: 600; color: var(--text-strong); }
.ev-text { flex-basis: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
.ev-src { color: var(--text-muted); font-size: var(--fs-xs); font-style: italic; }

/* ---- Feedback ---- */
#feedback-list { display: flex; flex-direction: column; gap: var(--s2); }
#feedback-list > .view-info { margin-bottom: var(--s1); }
.fb-card { padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.fb-card.is-done .fb-title { color: var(--text-muted); }
.fb-row1 { display: flex; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; margin-bottom: var(--s2); }
.fb-title { flex: 1 1 220px; font-size: var(--fs-base); font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.fb-time { font-size: var(--fs-xs); color: var(--text-muted); }
.fb-meta { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin-bottom: var(--s2); font-size: var(--fs-xs); color: var(--text-muted); }
.fb-meta b { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.fb-desc { max-height: 132px; overflow: hidden; padding-top: var(--s2); margin-top: var(--s1); border-top: 1px solid var(--border); font-size: var(--fs-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

/* ---- Verbindungen ---- */
#clients-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: var(--s3); align-items: start; }
.conn-list { list-style: none; }
.conn { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s3); padding: var(--s2) 0; font-size: var(--fs-sm); }
.conn + .conn { border-top: 1px solid var(--border); }
.conn-name { font-weight: 600; color: var(--text-strong); }
.conn .mono { color: var(--text-muted); }

/* ---- Fuss ---- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s4); padding: var(--s4) var(--pad-x); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-muted); }

/* ---- Breiten ---- */
@media (min-width: 900px) {
  .toolbar { position: sticky; top: 0; z-index: 20; }
  .sig-table th { top: 0; }
}
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-lead { grid-column: span 2; grid-row: span 2; justify-content: center; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .perf-grid, .combos, #clients-body { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .period { padding-bottom: var(--s3); }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  /* Kopf: Marke + Knoepfe in Zeile 1, Statusangaben darunter */
  .topbar { padding-top: var(--s2); padding-bottom: var(--s2); gap: var(--s1) var(--s3); }
  .status-bar { display: contents; }
  .brand { flex: 1 1 calc(100% - 160px); order: 1; }
  .status-actions { order: 2; }
  .status-item { order: 3; font-size: var(--fs-xs); }
  .kpis { grid-template-columns: 1fr 1fr; gap: var(--s2); padding-top: var(--s3); }
  .kpi-lead { grid-column: 1 / -1; grid-row: auto; }
  .kpi { padding: var(--s2) var(--s3); }
  .kpi:not(.kpi-lead) .kpi-sub { display: none; }
  .kpi-value { font-size: var(--fs-xl); }
  .kpi-num { font-size: var(--fs-md); }
  .tabs [role="tab"] { padding: 10px 10px 12px; font-size: var(--fs-sm); }
  .period { width: 100%; }
  .period .seg { flex: 1; }
  .period .seg-btn { flex: 1; justify-content: center; padding: 4px 6px; }
  .period-info { width: 100%; }
  .view { padding-top: var(--s3); }
  .card-grid, .card-grid.is-wide { grid-template-columns: 1fr; gap: var(--s2); }
  .card { padding: var(--s3) var(--s4); }
  .lead-value { font-size: 22px; }
  /* Karten kompakt: Details per Knopf */
  .more-toggle {
    display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin-top: var(--s2); padding: 2px 0;
    background: none; border: 0; color: var(--accent); font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  }
  .more-toggle::after { content: "▾"; font-size: var(--fs-xs); }
  .more-toggle[aria-expanded="true"]::after { content: "▴"; }
  .card:not(.is-open) .card-more { display: none; }
  .card-row .more-toggle { margin-top: 0; flex: none; }
  /* Signalgeber eingeklappt: eine kompakte Zeile Name/PF/Pips + Nebenwerte */
  .prov-card:not(.is-open) .card-sub, .prov-card:not(.is-open) .lead-label,
  .prov-card:not(.is-open) .lead-note, .prov-card:not(.is-open) .claimed { display: none; }
  .prov-card:not(.is-open) .card-head { margin-bottom: var(--s1); }
  .prov-card:not(.is-open) .lead { align-items: baseline; }
  .prov-card:not(.is-open) .lead-value { font-size: var(--fs-lg); }
  .prov-card:not(.is-open) .lead-main .lead-value::before { content: "PF "; font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
  .prov-card:not(.is-open) .lead-aside .lead-num::after { content: " Pips"; font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
  .prov-card:not(.is-open) .bal { margin: var(--s2) 0; }
  .prov-card:not(.is-open) .card-row .card-line > span:nth-child(n+4) { display: none; }
  .acct-grid { grid-template-columns: 1fr 1fr; }
  .view-head .seg { width: 100%; }
  .filters { grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
  .filter-actions .btn { flex: 1 1 auto; }
  .filter-actions .spacer { display: none; }
  /* Signal-Tabelle als Kartenliste, ohne waagrechtes Scrollen */
  #view-signals .table-scroll { overflow-x: visible; }
  .sig-table, .sig-table tbody { display: block; width: 100%; }
  .sig-table thead { display: none; }
  /* Feste Spaltenanteile: jede Zeile ist ein eigenes Grid - inhaltsabhaengige
     Breiten (fit-content) liessen SL/Status von Karte zu Karte springen. */
  .sig-row {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px var(--s2);
    grid-template-areas: "sym sym out" "prov prov pips" "entry sl tp" "time status cust";
    padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border);
  }
  .sig-row td { display: block; min-width: 0; padding: 0; border: 0; background: none !important; text-align: left; }
  .sig-row.is-open { background: var(--surface-2); border-bottom-color: transparent; }
  .sig-row td.num { text-align: left; }
  .c-sym { grid-area: sym; display: flex !important; align-items: center; gap: var(--s2); flex-wrap: wrap; }
  .c-dir { display: none !important; }
  .dir-inline { display: inline-flex; }
  .c-out { grid-area: out; display: flex !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 6px; white-space: normal; }
  .c-out .src { margin-left: 0; }
  .c-time { grid-area: time; font-size: var(--fs-xs); }
  .c-prov { grid-area: prov; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .c-pips { grid-area: pips; text-align: right !important; font-weight: 600; }
  .c-entry { grid-area: entry; }
  .c-sl { grid-area: sl; }
  .c-tp { grid-area: tp; text-align: right !important; }
  .c-status { grid-area: status; }
  .c-cust { grid-area: cust; text-align: right !important; font-size: var(--fs-xs); max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Kunden-Filter: der Name steht in jeder Zeile gleich (Filter oben) - nur die Rolle zeigen */
  .c-cust .cust-name { display: none; }
  .c-cust .role { margin-left: 0; padding: 0 5px; }
  .sig-row td.c-cust:has(.role)::before { content: none; }
  .sig-row td[data-label]::before { content: attr(data-label); margin-right: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
  .c-entry, .c-sl, .c-tp { font-size: var(--fs-xs); white-space: normal !important; }
  .c-status { overflow: hidden; }
  .c-status .tag { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-size: var(--fs-xs); }
  .c-out > .dim:only-child, .c-pips > .dim:only-child { visibility: hidden; }
  .row-state, .row-state > td, .sig-detail-row, .sig-detail-row > td { display: block; }
  .sig-detail { margin: 0 var(--s2) var(--s2); padding: var(--s3); }
  .facts { grid-template-columns: 1fr 1fr; }
  .ev { grid-template-columns: 1fr; gap: 0; }
  .combo { grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--s2); }
  .footer { flex-direction: column; }
}
@media (max-width: 340px) {
  .filters { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
