/* EC-Kompass – helles, ruhiges Design mit Rettungsdienst-Rot; Dunkelmodus automatisch */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --ink: #1b1c20;
  --muted: #676a72;
  --line: #e3e0d9;
  --line-strong: #cfcbc2;
  --accent: #c4112f;
  --accent-hover: #a50e27;
  --accent-ink: #ffffff;
  --accent-soft: #fbe8eb;
  --ok: #1d7a4c;
  --ok-soft: #e2f3e9;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn: #a15c07;
  --warn-soft: #fdf1dc;
  --focus: #2f6fdb;
  --shadow: 0 1px 2px rgba(27, 28, 32, .06), 0 4px 16px rgba(27, 28, 32, .05);
  --shadow-lg: 0 8px 40px rgba(27, 28, 32, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111215;
    --surface: #1a1c20;
    --surface-2: #212328;
    --ink: #ecebe7;
    --muted: #9b9ea6;
    --line: #2d3036;
    --line-strong: #3d4048;
    --accent: #ff4d63;
    --accent-hover: #ff6b7e;
    --accent-ink: #1a0509;
    --accent-soft: #3a1820;
    --ok: #4cc38a;
    --ok-soft: #142d20;
    --bad: #ff6b5e;
    --bad-soft: #3a1714;
    --warn: #f0a542;
    --warn-soft: #33240f;
    --focus: #7aa7ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans); min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
.inaktiv, .muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.kopf-innen { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.marke img { width: 34px; height: 34px; flex: none; }
.marke-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.marke-text b { font-size: 1.05rem; letter-spacing: -.01em; }
.marke-text span { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.seite { max-width: 1120px; margin: 0 auto; padding: 20px 16px 96px; }
.schmal { max-width: 720px; }

/* ---------- Bausteine ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card-head { margin-bottom: 14px; }
.card-head p { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
.section-title { font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; cursor: pointer;
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn-sm { padding: 6px 11px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
select { appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 6px 0; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hinweis { color: var(--muted); font-size: .88rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: .8rem; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap;
}
.wert-chip { display: inline-flex; align-items: center; border-radius: 7px; padding: 2px 8px; font-weight: 700; font-size: .8rem; letter-spacing: .01em; white-space: nowrap; }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.progress-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); display: flex; }
.progress-bar .p-gelernt { background: var(--ok); }
.progress-bar .p-arbeit { background: color-mix(in srgb, var(--ok) 35%, transparent); }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.kpi .titel { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi .wert { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .unter { font-size: .8rem; color: var(--muted); }
.quote-gut { color: var(--ok); font-weight: 650; }
.quote-mittel { color: var(--warn); font-weight: 650; }
.quote-schlecht { color: var(--bad); font-weight: 650; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .76rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.klickbar { cursor: pointer; }
tbody tr.klickbar:hover td { background: var(--surface-2); }
tbody tr.aktiv td { background: var(--accent-soft); }
tr.ausgeblendet td { opacity: .5; }
th.sortierbar { cursor: pointer; user-select: none; }
th.sortierbar.auf::after { content: " ▲"; } th.sortierbar.ab::after { content: " ▼"; }

.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .zwei-spalten { grid-template-columns: 1fr; } }

/* ---------- Dialoge & Meldungen ---------- */
.dialog-hg { position: fixed; inset: 0; background: rgba(10, 10, 14, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; animation: einblenden .15s; }
.dialog { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.dialog.breit { max-width: 720px; }
.dialog h3 { margin-bottom: 8px; font-size: 1.15rem; }
.dialog > p { color: var(--muted); }
.dialog .btn-row { margin-top: 18px; justify-content: flex-end; }
.pw-fehler { color: var(--bad); font-size: .9rem; min-height: 1.2em; margin: 4px 0 0; }
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .93rem; animation: hoch .2s; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.fehler { background: var(--bad); color: #fff; }
@keyframes einblenden { from { opacity: 0; } }
@keyframes hoch { from { opacity: 0; transform: translateY(8px); } }

.melden-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 9px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
.melden-btn:hover { color: var(--ink); }
.melde-vorschau { width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; }
.melde-vorschau.aus { opacity: .25; }
@media (max-width: 600px) { .melden-btn span { display: none; } .melden-btn { padding: 10px 13px; } }

/* ---------- Menü ---------- */
.menue { position: relative; }
.menue-liste { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.menue-liste button, .menue-liste a { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 11px; border-radius: 8px; cursor: pointer; text-decoration: none; font-size: .94rem; }
.menue-liste button:hover, .menue-liste a:hover { background: var(--surface-2); }
.menue-liste .trenner { height: 1px; background: var(--line); margin: 5px 4px; }
.menue-liste .wer { padding: 8px 11px 6px; font-size: .8rem; color: var(--muted); }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 1px 7px; margin-left: auto; }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 400px; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.login-logo img { width: 72px; height: 72px; }
.login-logo h1 { font-size: 1.7rem; }
.login-logo p { color: var(--muted); margin: 0; }

/* ---------- Lernpfad ---------- */
.start-kopf { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-bottom: 16px; }
.start-kopf h1 { font-size: 1.6rem; margin-bottom: 4px; }
.start-kopf p { color: var(--muted); margin: 0; }
.gesamt { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring text { font: 700 15px var(--sans); fill: var(--ink); }
.gesamt-zahlen { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.gesamt-zahlen b { color: var(--ink); font-size: 1rem; }
.schnell { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.ziel-karte { border-left: 4px solid var(--accent); margin-bottom: 22px; }
.ziel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ziel-chip { font-size: .82rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-strong); cursor: pointer; background: var(--surface); }
.ziel-chip.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--ok); background: var(--ok-soft); }

.pfad { position: relative; }
.station { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 28px; }
.station::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.station:last-child::before { display: none; }
.station-nr { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 1.05rem;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.station.fertig .station-nr { background: var(--ok); border-color: var(--ok); color: #fff; }
.station.begonnen .station-nr { border-color: var(--ok); color: var(--ok); }
.station-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.station-kopf h2 { font-size: 1.15rem; }
.station-kopf p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; width: 100%; }
.station-stand { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.kachel {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; min-height: 104px;
}
.kachel:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kachel-kopf { display: flex; gap: 8px; align-items: flex-start; }
.kachel-titel { font-weight: 650; line-height: 1.25; }
.kachel-zeichen { margin-left: auto; display: flex; gap: 4px; font-size: .85rem; flex: none; }
.kachel-art { font-size: .78rem; color: var(--muted); margin-top: -4px; }
.kachel-meta { font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; margin-top: auto; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.kachel.fertig { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.kachel .fehler-hinweis { color: var(--bad); font-weight: 600; }
@media (max-width: 600px) {
  .start-kopf { grid-template-columns: 1fr; }
  .station { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .station-nr { width: 32px; height: 32px; font-size: .9rem; }
  .station::before { left: 15px; top: 32px; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kachel-titel { overflow-wrap: anywhere; hyphens: auto; }
  .kachel { min-height: 96px; padding: 11px; }
}
@media (max-width: 380px) { .kacheln { grid-template-columns: 1fr; } }

/* ---------- Lernen ---------- */
.lern-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lern-titel { min-width: 0; flex: 1; }
.lern-titel small { display: block; color: var(--muted); font-size: .8rem; }
.lern-titel b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; }
.lern-fortschritt { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lern-fortschritt .progress-bar { flex: 1; }

.frage-karte { padding: 26px 22px 22px; text-align: center; position: relative; }
.frage-einheit { position: absolute; left: 16px; top: 12px; font-size: .75rem; color: var(--muted); }
.serie { position: absolute; right: 16px; top: 14px; display: flex; gap: 4px; }
.serie i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.serie i.an { background: var(--ok); }
.frage-prompt { color: var(--muted); font-size: .9rem; margin: 6px 0 10px; }
.frage { font-weight: 750; letter-spacing: -.01em; line-height: 1.15; margin: 4px 0 6px; word-wrap: break-word; }
.frage.ist-code { font-family: var(--mono); font-size: clamp(3rem, 14vw, 4.6rem); letter-spacing: .04em; font-weight: 700; }
.frage.ist-text { font-size: clamp(1.35rem, 5vw, 1.9rem); }
.frage-unter { font-size: 1.1rem; color: var(--ink); margin-bottom: 4px; }

.antwort-bereich { margin-top: 20px; text-align: left; }
.antwort-knoepfe { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }

/* Combobox: Auswahlliste mit Suche */
.cb { position: relative; }
.cb-feld { position: relative; }
.cb-input { padding: 14px 44px 14px 15px !important; font-size: 1.05rem !important; border-width: 2px !important; }
.cb-input.gewaehlt { border-color: var(--focus) !important; background: color-mix(in srgb, var(--focus) 6%, var(--surface)) !important; font-weight: 600; }
.cb-pfeil { position: absolute; right: 6px; top: 6px; width: 38px; height: calc(100% - 12px); border: 0; background: none; cursor: pointer; color: var(--muted); border-radius: 8px; }
.cb-pfeil:hover { background: var(--surface-2); }
.cb-liste { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  max-height: min(46vh, 340px); overflow: auto; box-shadow: var(--shadow-lg); position: absolute; left: 0; right: 0; z-index: 40; }
.cb-liste li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.cb-liste li.aktiv { background: var(--surface-2); outline: 1px solid var(--line-strong); }
.cb-liste li mark { background: color-mix(in srgb, var(--warn) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cb-liste li.leer { color: var(--muted); cursor: default; }
.cb-liste li .mono { font-weight: 650; }
@media (max-width: 600px) { .cb-liste { position: static; max-height: 42vh; box-shadow: none; } }

/* Ergebnis + Codekarte */
.ergebnis { margin-top: 18px; border-radius: 12px; padding: 14px 16px; text-align: left; animation: hoch .18s; }
.ergebnis.richtig { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.ergebnis.falsch { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }
.ergebnis-titel { font-weight: 750; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.ergebnis.richtig .ergebnis-titel { color: var(--ok); }
.ergebnis.falsch .ergebnis-titel { color: var(--bad); }
.ergebnis-text { margin: 4px 0 0; font-size: .95rem; }
.ergebnis-text s { color: var(--muted); }
.codekarte { text-align: left; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid;
  grid-template-columns: auto minmax(0, 1fr); gap: 2px 16px; padding: 14px 16px; align-items: center; }
.codekarte .ck-code { grid-row: span 3; font-family: var(--mono); font-size: 2rem; font-weight: 700; letter-spacing: .03em; padding-right: 14px; border-right: 1px solid var(--line); text-align: center; min-width: 88px; }
.codekarte .ck-text { font-weight: 650; font-size: 1.02rem; line-height: 1.3; }
.codekarte .ck-kat { font-size: .85rem; color: var(--muted); }
.codekarte .ck-wert { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-top: 2px; flex-wrap: wrap; }
.weiter-zeile { margin-top: 14px; display: flex; gap: 10px; }
.weiter-zeile .btn-primary { flex: 1; }
.tasten-hinweis { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 14px; }
.tasten-hinweis kbd { font-family: var(--mono); font-size: .75rem; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }
@media (hover: none) { .tasten-hinweis { display: none; } }

.fertig-box { text-align: center; padding: 36px 22px; }
.fertig-box .gross { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.fertig-box h2 { font-size: 1.4rem; margin-bottom: 6px; }
.fertig-box p { color: var(--muted); }
.fertig-box .btn-row { justify-content: center; margin-top: 16px; }
.fertig-box .btn { white-space: normal; text-align: center; }

/* ---------- Statistik ---------- */
.aktiv-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 6px 0; }
.aktiv-chart .tag { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.aktiv-chart .r { background: var(--ok); }
.aktiv-chart .f { background: var(--bad); opacity: .75; }
.chart-achse { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.legende { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.mini-bar { display: flex; align-items: center; gap: 8px; min-width: 140px; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-bar .progress-bar { flex: 1; height: 6px; }

/* ---------- Hilfe ---------- */
.hilfe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hilfe-grid .card h3 { margin-bottom: 6px; }
.hilfe-grid .card p { color: var(--muted); font-size: .93rem; margin: 0; }
.hilfe-grid .gross { font-size: 1.6rem; margin-bottom: 6px; }

/* ---------- Verwaltung ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 10px 13px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.aktiv { color: var(--accent); border-bottom-color: var(--accent); }
.filterzeile { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filterzeile input, .filterzeile select { width: auto; flex: 1 1 160px; padding: 9px 12px; }
.filterzeile select { flex: 0 1 200px; padding-right: 34px; }
.filterzeile > * { min-width: 0; max-width: 100%; }
@media (max-width: 600px) { .filterzeile select { flex: 1 1 100%; } }
.massen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; margin-bottom: 12px; font-size: .9rem; }
.schalter { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.schalter input { opacity: 0; width: 0; height: 0; position: absolute; }
.schalter span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; cursor: pointer; transition: background .15s; }
.schalter span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.schalter input:checked + span { background: var(--ok); }
.schalter input:checked + span::before { transform: translateX(16px); }
.schalter input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.baum-bereich { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 14px; overflow: hidden; }
.baum-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.baum-kopf h3 { flex: 1; min-width: 160px; }
.baum-kopf small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.baum-einheit { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.baum-einheit:last-child { border-bottom: 0; }
.baum-einheit .titel { flex: 1; min-width: 160px; font-weight: 600; }
.baum-einheit .titel small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.baum-leer { padding: 12px 14px; color: var(--muted); font-size: .9rem; }
.aus-markierung { opacity: .5; }
.auswahl-liste { border: 1px solid var(--line); border-radius: 10px; max-height: 240px; overflow: auto; padding: 4px 10px; background: var(--surface); }
.auswahl-liste .check { margin: 4px 0; font-size: .9rem; }
.kat-gruppe { columns: 2 200px; column-gap: 16px; }
.meta-liste { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .85rem; margin-top: 6px; }
.detail-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ml-text { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.gemeldet td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.farbfeld { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.import-ergebnis { max-height: 260px; overflow: auto; font-size: .88rem; margin: 6px 0 14px; padding-left: 18px; }
.import-ergebnis li { margin: 2px 0; }

/* Übungen (Bereich Gesamtprüfung) */
.kachel.uebung { border-style: dashed; }
.auswahl-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 8px; }
.aw-chip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: var(--surface); }
.aw-chip:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.aw-chip input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ok); flex: none; }
.aw-chip { min-width: 0; }
.aw-chip span { min-width: 0; }
.aw-chip b { display: block; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.aw-chip small { color: var(--muted); font-size: .8rem; }
@media (max-width: 600px) { .auswahl-gitter { grid-template-columns: minmax(0, 1fr); gap: 6px; } .aw-chip { padding: 9px 11px; align-items: center; }
  .aw-chip span { display: flex; justify-content: space-between; gap: 8px; flex: 1; align-items: baseline; } .aw-chip small { white-space: nowrap; } }
