/* ==========================================================================
   techFOX Dashboard — techFox Branding
   Petrol #12212D + Blau #023D93 (135° Gradient), Orange #FF5B1F Akzent.
   Mundial (Headlines + Body).
   ========================================================================== */

:root {
  --navy:   #12212D;
  --cyan:   #023D93;
  --orange: #FF5B1F;
  --grad:   linear-gradient(135deg, #12212D 0%, #023D93 100%);

  --bg:      #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --ink:     #16232f;
  --ink-soft:#51637a;
  --line:    #dfe6ee;
  --shadow:  0 6px 22px rgba(18, 33, 45, 0.10);
  --shadow-sm: 0 2px 10px rgba(18, 33, 45, 0.06);
  --radius:  14px;

  /* Status-Farben (Ampel) — kontrastgeprüft.
     Die Toenungen sind gegen die DUNKLERE der beiden Flaechen getunt
     (--surface-2), weil Badges auch auf getoenten Zeilen sitzen. Auf
     --surface liegen sie dadurch automatisch hoeher. */
  --status-ok:      #0f7a52;
  --status-ok-bg:   rgba(15, 122, 82, 0.07);
  --status-warn:    #8a6100;
  --status-warn-bg: rgba(138, 97, 0, 0.09);
  --status-risk:    #b34700;
  --status-risk-bg: rgba(179, 71, 0, 0.13);
  --status-bad:     #b3261e;
  --status-bad-bg:  rgba(179, 38, 30, 0.12);

  /* Chart-Farben (techFOX-Palette) */
  --chart-revenue:   #023D93;
  --chart-profit:    #FF5B1F;
  --chart-equity:    #6b3fa0;
  --chart-employees: #0f7a52;
}

:root[data-theme="dark"] {
  --bg:      #0d1622;
  --surface: #16232f;
  --surface-2: #1c2c3b;
  --ink:     #eaf1f8;
  --ink-soft:#9fb2c7;
  --line:    #26384a;

  /* Markenblau aufgehellt: #023D93 erreicht auf dunklem Grund nur 1,42-1,59:1
     und macht Kartenueberschriften, externe Links und Fokus-Rahmen unlesbar.
     #6ea8f5 liegt bei 6,52:1 auf --surface und 5,83:1 auf --surface-2.
     Der Light-Wert in :root bleibt unveraendert. */
  --cyan:    #6ea8f5;
  --shadow:  0 8px 26px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.28);

  /* Heller Verlauf für dunkle Flächen: der Petrol-Verlauf wäre hier dunkler
     als die Spurrillen, auf denen er liegt — Balken wären nicht mehr sichtbar. */
  --grad:   linear-gradient(135deg, #4d8ff0 0%, #7fb3f5 100%);

  /* Status-Farben (Ampel) — Dark-Varianten */
  --status-ok:      #3ddc97;
  --status-ok-bg:   rgba(61, 220, 151, 0.18);
  --status-warn:    #f5c451;
  --status-warn-bg: rgba(245, 196, 81, 0.18);
  --status-risk:    #ff8a4c;
  --status-risk-bg: rgba(255, 138, 76, 0.18);
  --status-bad:     #ff6b63;
  --status-bad-bg:  rgba(255, 107, 99, 0.15);

  /* Chart-Farben (techFOX-Palette) — Dark-Varianten */
  --chart-revenue:   #4d8ff0;
  --chart-profit:    #ff8a4c;
  --chart-equity:    #b79cf5;
  --chart-employees: #3ddc97;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, #12212D 0%, #023D93 100%) fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

:root[data-theme="dark"] body {
  background: linear-gradient(135deg, #12212D 0%, #023D93 100%) fixed;
}

h1, h2, h3 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.015em; margin: 0; }
a { color: inherit; text-decoration: none; }

/* --- Topbar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #12212D;
  box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 22px;
  min-height: 62px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px;
}
.brand { display: flex; flex-direction: column; line-height: 1.05; }
.brand-logo { display: flex; align-items: center; margin-bottom: -2px; }
.brand-logo svg { height: 28px; width: auto; display: block; }
.brand-mark { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 22px; color: #fff; }
.brand-sub  { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.navlink {
  color: rgba(255,255,255,0.86); font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 9px; transition: background .18s, color .18s;
}
.navlink:hover { background: rgba(255,255,255,0.14); color: #fff; }
.navlink.is-active { background: rgba(255,255,255,0.20); color: #fff; }
.theme-toggle {
  border: 0; cursor: pointer; width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 18px;
  display: grid; place-items: center; transition: background .18s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.28); }

/* Auf schmalen Viewports scrollt die Navigation horizontal in sich selbst,
   statt umzubrechen. Ein Umbruch liesse die sticky Topbar auf über 200px
   wachsen — ein Viertel der Bildschirmhöhe eines Handys, dauerhaft im Bild.
   min-width:0 ist nötig, damit der Flex-Kindcontainer unter seine
   Inhaltsbreite schrumpfen darf und dadurch überhaupt scrollen kann.
   Muss NACH den .mainnav/.navlink-Basisregeln stehen: gleiche Spezifität,
   also entscheidet die Reihenfolge. */
@media (max-width: 820px) {
  .topbar-inner { flex-wrap: nowrap; }
  .mainnav {
    flex-wrap: nowrap; overflow-x: auto; min-width: 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .mainnav::-webkit-scrollbar { display: none; }
  .navlink { white-space: nowrap; }
}

/* --- Layout ------------------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 22px 60px; }
.hero { margin-bottom: 26px; background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.hero--tight { margin-bottom: 18px; }
.hero--logo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.hero-logo-img { max-width: 260px; height: auto; display: block; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.lede { color: var(--ink-soft); font-size: 16px; margin: 8px 0 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

/* --- Card --------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 22px; margin-bottom: 20px;
}
.card--flush { padding: 0; overflow-x: auto; overflow-y: hidden; }
/* Mindestbreite verhindert, dass die Tabelle in unlesbar schmale Spalten
   gequetscht wird, bevor der horizontale Karten-Scrollbar greift. */
.card--flush > .tbl { min-width: 720px; }
/* Jede Tabelle in einer normalen Karte scrollt innerhalb der Karte, statt die
   Seite aufzublähen. Bewusst über :has() am Container statt display:block an
   der Tabelle: display:block nimmt dem <table> die Tabellen-Box, was die
   Tabellensemantik für Screenreader gefährdet. */
.card:has(> .tbl) { overflow-x: auto; }
.card--ghost { background: var(--surface-2); border-style: dashed; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.card-head h2 { font-size: 18px; font-weight: 700; color: var(--navy); }
:root[data-theme="dark"] .card-head h2 { color: var(--cyan); }
.muted { color: var(--ink-soft); font-size: 13px; }

/* --- KPI ---------------------------------------------------------------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 16px 14px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.kpi--navy::before   { background: var(--navy); }
.kpi--cyan::before   { background: var(--cyan); }
.kpi--orange::before { background: var(--orange); }
.kpi--slate::before  { background: #7d93ad; }
.kpi-val {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 500; font-size: 28px; line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 6px; }
.kpi-hint  { font-size: 11px; color: var(--ink-soft); opacity: .8; margin-top: 2px; }

/* --- Bars --------------------------------------------------------------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
@media (max-width: 640px) { .bars--2col { grid-template-columns: 1fr; } }
.bar { display: grid; grid-template-columns: 1fr 90px auto; align-items: center; gap: 12px; }
.bar-label { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label a:hover { color: var(--orange); }
.bar-track { grid-column: 2; background: var(--surface-2); border-radius: 6px; height: 9px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 6px; }
.bar-n { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 500; font-size: 13px; color: var(--ink-soft); text-align: right; }

/* --- Export-Card -------------------------------------------------------- */
.export-card {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: 24px;
  padding: 16px 22px; min-height: 64px;
}
.export-info {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; flex: 1 1 auto;
}
.export-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cyan);
}
.export-count {
  font-size: 16px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.export-actions {
  display: flex; gap: 8px; flex-shrink: 0; align-items: center;
}
.btn--sm {
  padding: 7px 14px; font-size: 13px; line-height: 1.2;
}
.export-card .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* --- Search / Filter ---------------------------------------------------- */
.searchbar, .filterbar { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.search-input, .select {
  font: inherit; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink);
}
.search-input { flex: 1; min-width: 220px; }
.search-input:focus, .select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; padding: 11px 18px;
  border-radius: 10px; border: 1px solid transparent; transition: transform .12s, filter .18s, background .18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* --- Hitlist ------------------------------------------------------------ */
.hitlist { display: flex; flex-direction: column; }
.hitlist--scroll { max-height: 420px; overflow-y: auto; }
.hit {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; border-radius: 9px; transition: background .15s;
}
.hit:hover { background: var(--surface-2); }
.hit + .hit { border-top: 1px solid var(--line); }
.hit-name { font-weight: 600; }
.hit-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* --- Badges / Chips ----------------------------------------------------- */
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge--mutter  { background: rgba(2,61,147,.16);  color: #0347b0; }
.badge--tochter { background: rgba(18,33,45,.12);  color: var(--navy); }
.badge--solo    { background: rgba(125,147,173,.18); color: #566a83; }
.badge--gov     { background: rgba(255,91,31,.14);  color: var(--orange); }
:root[data-theme="dark"] .badge--mutter  { color: #4d8ff0; }
:root[data-theme="dark"] .badge--tochter { color: #7a9ec4; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.chip--ghost { border: 1px solid var(--line); background: transparent; }
/* Klickbare Chips heben sich von statischen ab (Konvention wie .ext/.tbl-link) */
a.chip { color: var(--cyan); font-weight: 600; }
a.chip:hover { color: var(--orange); }

/* --- Chain (Konzern-Kette) --------------------------------------------- */
.chain { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.chain-step { width: 100%; }
.chain-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.chain-node {
  display: inline-block; margin-top: 3px; padding: 8px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 600;
}
a.chain-node:hover { border-color: var(--cyan); color: var(--cyan); }
.chain-node--empty { color: var(--ink-soft); opacity: .6; }
.chain-node--self { background: var(--grad); color: #fff; border: 0; }
/* Weiße Schrift läge auf dem hellen Dark-Verlauf unter 4.5:1 — hier dunkle Schrift. */
:root[data-theme="dark"] .chain-node--self { color: var(--navy); }
.chain-arrow { color: var(--ink-soft); font-size: 15px; padding: 3px 0 3px 20px; }

/* --- Detail head -------------------------------------------------------- */
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-soft); font-weight: 600; }
.back:hover { color: var(--orange); }
.org-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.org-head h1 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; }
.org-tags { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.org-addr { color: var(--ink-soft); margin: 2px 0 22px; }
.ext { font-weight: 600; color: var(--cyan); white-space: nowrap; }
.ext:hover { color: var(--orange); }

/* --- Table -------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.tbl thead th {
  background: var(--surface-2);
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
}
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl-link { font-weight: 600; }
.tbl-link:hover { color: var(--orange); }
.tbl-dom { display: block; font-size: 12px; color: var(--ink-soft); }

/* --- Pager / Footer ----------------------------------------------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.pager-info { color: var(--ink-soft); font-size: 14px; }
.foot {
  max-width: 1180px; margin: 0 auto; padding: 24px 22px 40px;
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--ink-soft); font-size: 12px; border-top: 1px solid var(--line);
}
.foot code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }

/* --- Import-Seite -------------------------------------------------------- */
.import-form { display: flex; flex-direction: column; gap: 16px; }
.import-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.import-flash { border-left: 4px solid var(--cyan); }
.import-flash--ok { border-left-color: var(--cyan); }
.import-flash--err { border-left-color: var(--orange); }
.import-errors summary { cursor: pointer; font-weight: 600; margin: 10px 0; }
.import-errlist { margin: 10px 0 4px 18px; font-size: 13px; color: var(--ink-soft); }
.import-errlist li { margin-bottom: 4px; }
.tbl--dense th, .tbl--dense td { padding: 8px 12px; font-size: 13px; }
.tbl-sub td { background: var(--surface-2); }
.kpi-grid--compact { margin: 12px 0; }

/* --- Vakanz-Trend -------------------------------------------------------- */
.trend { display: flex; align-items: flex-end; gap: 22px; padding: 14px 4px 20px; }
.trend-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; }
.trend-bar-wrap { height: 110px; width: 34px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.trend-bar { width: 100%; background: var(--cyan); border-radius: 8px 8px 0 0; min-height: 3px; }
.trend-val { font-weight: 700; font-size: 15px; }
.trend-date { font-size: 12px; color: var(--ink-soft); }
.trend-delta { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.trend-delta.up { color: var(--status-ok); }
.trend-delta.down { color: var(--orange); }
.trend-delta.flat { color: var(--ink-soft); }

/* --- Tabs ------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] {
  background: transparent; border: none; padding: 12px 20px;
  font: inherit; color: var(--ink-soft); cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.tabs [role="tab"][aria-selected="true"] {
  color: var(--cyan); border-bottom-color: var(--cyan);
}
/* Auf schmalen Viewports scrollt die Tab-Leiste horizontal in sich selbst,
   statt die Seite aufzublähen (Muster wie die Topbar-Navigation). */
@media (max-width: 720px) {
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs [role="tab"] { white-space: nowrap; }
}

/* --- Tab-Panel -------------------------------------------------------- */
.tab-panel[hidden] { display: none; }

/* --- Definition-List Stammdaten -------------------------------------- */
.stammdaten-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px 32px;
}
.stammdaten-grid dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.stammdaten-grid dd { margin: 0 0 8px 0; font-size: 15px; color: var(--ink); word-break: break-word; }

/* --- Personen-Liste --------------------------------------------------- */
.person-list { display: flex; flex-direction: column; gap: 8px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.person-name { font-weight: 600; flex: 1; }

/* --- Scoring KPI-Grid ------------------------------------------------- */
.scoring-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi-tile { padding: 16px; background: var(--surface-2); border-radius: 10px; text-align: center; }

/* Chart-Wrapper: feste Höhe, sonst wächst Canvas bei responsive+maintainAspectRatio:false endlos */
.chart-wrap { position: relative; height: 380px; width: 100%; margin-bottom: 20px; }
.chart-wrap canvas { display: block; }
.kpi-tile .kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 4px; }
.kpi-tile .kpi-value { font-size: 28px; font-weight: 700; color: var(--cyan); }
.kpi-tile .kpi-tier { font-size: 12px; margin-top: 6px; }

/* --- Chart Container -------------------------------------------------- */
#chart-finanzen { max-width: 100%; height: auto; }

/* --- Score-Seiten (Vakanzen) ------------------------------------------ */
/* KPI-Kacheln in Ampelfarben */
.kpi--ok::before   { background: var(--status-ok); }
.kpi--warn::before { background: var(--status-warn); }
.kpi--risk::before { background: var(--status-risk); }
.kpi--bad::before  { background: var(--status-bad); }

/* Ampel-Badges, aufbauend auf der bestehenden .badge-Basis */
.badge--ampel-gruen  { background: var(--status-ok-bg);   color: var(--status-ok); }
.badge--ampel-gelb   { background: var(--status-warn-bg); color: var(--status-warn); }
.badge--ampel-orange { background: var(--status-risk-bg); color: var(--status-risk); }
.badge--ampel-rot    { background: var(--status-bad-bg);  color: var(--status-bad); }
.badge--ampel-sonst  { background: var(--surface-2);
                       color: var(--ink-soft); }
.ampel-glyph { margin-right: 4px; }

/* Score-Zahl: Monospace mit Tabellenziffern, wie .kpi-val */
.score-num { font-family: 'JetBrains Mono', ui-monospace, monospace;
             font-variant-numeric: tabular-nums; font-weight: 500; }

/* Hinweiskarte zur Datenlage */
.card--hint { border-left: 4px solid var(--status-warn);
              background: var(--status-warn-bg); }

/* --- Vakanz-Detail ---------------------------------------------------- */
/* Score-Ring: Bogenfarbe über currentColor, Klasse setzt die Ampelfarbe */
.ring { display: grid; place-items: center; }
.ring--gruen  { color: var(--status-ok); }
.ring--gelb   { color: var(--status-warn); }
.ring--orange { color: var(--status-risk); }
.ring--rot    { color: var(--status-bad); }
.ring--sonst  { color: var(--ink-soft); }
.ring-val { font-family: 'JetBrains Mono', ui-monospace, monospace;
            font-variant-numeric: tabular-nums; font-weight: 500;
            /* SVG-<text> rendert über fill, nicht über color: ohne explizites
               fill fällt die Zahl auf Schwarz zurück. Bewusst var(--ink) statt
               currentColor — die Ampelfarbe tragen Bogen und Badge daneben. */
            fill: var(--ink); }
.ring-track { stroke: var(--line); }
.ring-arc   { stroke: currentColor; }

/* Dimensionsbalken: Label + Wert oben, Spurrille und Füllung darunter.
   min-width:0 erlaubt dem Label zu brechen, statt den Wert zu quetschen. */
.dimbar { display: grid; grid-template-columns: 1fr auto; align-items: center;
          gap: 4px 12px; margin-bottom: 14px; }
.dimbar-label { font-size: 14px; font-weight: 600; min-width: 0; }
.dimbar-kicker { display: block; font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.dimbar-track { grid-column: 1 / -1; background: var(--line); border-radius: 6px;
                height: 10px; overflow: hidden; }
.dimbar-fill { height: 100%; background: var(--grad); border-radius: 6px; }
.dimbar-n { font-family: 'JetBrains Mono', ui-monospace, monospace;
            font-variant-numeric: tabular-nums; font-weight: 500; font-size: 13px;
            color: var(--ink-soft); text-align: right; }

/* --- Signal-Checkliste ------------------------------------------------- */
.sigsection-head { display: flex; justify-content: space-between; align-items: baseline;
                   margin: 14px 0 8px; }
.sigsection-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.siglist { display: flex; flex-direction: column; gap: 8px; }
.sigrow { display: flex; align-items: center; justify-content: space-between;
          gap: 12px; padding: 10px 12px; background: var(--surface-2);
          border-radius: 8px; }
.sig-label { font-weight: 600; flex: 1; min-width: 0; }
.sig-hinweis { display: block; font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.sig-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sig-punkte { font-family: 'JetBrains Mono', ui-monospace, monospace;
              font-variant-numeric: tabular-nums; font-weight: 500; }
.sigbadge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
            white-space: nowrap; }
.sigbadge--ok    { background: var(--status-ok-bg);   color: var(--status-ok); }
.sigbadge--warn  { background: var(--status-warn-bg); color: var(--status-warn); }
.sigbadge--muted { background: var(--surface-2);      color: var(--ink-soft); }

/* --- Vergleich mit dem Bot -------------------------------------------- */
.vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 560px) { .vergleich { grid-template-columns: 1fr; } }
.vergleich-seite { display: flex; flex-direction: column; align-items: center; gap: 4px;
                    text-align: center; padding: 14px; border-radius: 12px;
                    background: var(--surface-2); }
.vergleich--fuehrend { border: 1px solid var(--line); }
.vergleich--referenz { opacity: .85; }
.vergleich-wert { font-family: 'JetBrains Mono', ui-monospace, monospace;
                  font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; }
.vergleich--fuehrend .vergleich-wert { font-size: 44px; color: var(--ink); }
.vergleich--referenz .vergleich-wert { font-size: 30px; color: var(--ink-soft); }
.vergleich-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
                    color: var(--ink-soft); font-weight: 600; }
.vergleich--fuehrend .vergleich-kicker { color: var(--ink); font-weight: 700; }
/* Abweichung: das Vorzeichen trägt die Information, Farbe nur Unterstützung */
.vergleich-delta { font-family: 'JetBrains Mono', ui-monospace, monospace;
                   font-variant-numeric: tabular-nums; font-weight: 600;
                   font-size: 18px; color: var(--ink); margin: 0 0 8px; }
.vergleich-delta .vergleich-wert { font-size: inherit; }
