/* Bearbeiten-Bereich: ruhig, funktional, klar von der öffentlichen Seite unterscheidbar */
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-VariableFont_wght.bc1d0d2571ea.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --rd-nacht: #102a3a;
  --rd-blau: #1b98e0;
  --rd-linie: #e3e8ee;
  --rd-bg: #f5f7fa;
  --bs-body-font-family: "Nunito", system-ui, sans-serif;
  --bs-body-bg: var(--rd-bg);
  --bs-primary: var(--rd-blau);
  --bs-primary-rgb: 27, 152, 224;
}
body { font-size: .95rem; }
.btn-primary { --bs-btn-bg: var(--rd-blau); --bs-btn-border-color: var(--rd-blau); --bs-btn-hover-bg: #1479b4; --bs-btn-hover-border-color: #1479b4; --bs-btn-font-weight: 700; }


.rd-inhalt { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.rd-seitenkopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.rd-seitenkopf h1 { font-size: 1.75rem; font-weight: 800; color: var(--rd-nacht); margin: 0 0 .25rem; }
.rd-seitenkopf p { margin: 0; color: #5b6675; }

/* Filterleiste */
.rd-filter { position: sticky; top: 52px; z-index: 20; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--rd-linie); border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(16,42,58,.04); }
.rd-filter .form-select { width: auto; }
.rd-suche { position: relative; flex: 1 1 240px; max-width: 360px; }
.rd-suche .bi { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #8a94a3; }
.rd-suche input { padding-left: 2.2rem; }
.rd-zaehler { color: #5b6675; font-size: .875rem; }

/* Kursliste */
.rd-liste { display: grid; gap: .5rem; }
.rd-kurs { scroll-margin-top: 140px; background: #fff; border: 1px solid var(--rd-linie); border-radius: 10px; }
.rd-kurs.inaktiv { opacity: .7; }
.rd-kurs[open] { box-shadow: 0 6px 20px rgba(16,42,58,.08); border-color: #cfd8e2; }
.rd-kurs summary { list-style: none; display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) 10rem 14rem; gap: 1rem; align-items: center; padding: .85rem 1.1rem; cursor: pointer; border-radius: 10px; }
.rd-kurs summary::-webkit-details-marker { display: none; }
.rd-kurs summary:hover { background: #f8fbfd; }
.rd-pfeil { color: #8a94a3; transition: transform .15s; }
.rd-kurs[open] .rd-pfeil { transform: rotate(90deg); }
.rd-titel { font-weight: 800; color: var(--rd-nacht); }
.rd-eckdaten { color: #5b6675; }
.rd-termininfo { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; font-size: .875rem; }
.rd-anzahl { background: #e6f3fc; color: #00487c; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; }
@media (max-width: 767px) { .rd-kurs summary { grid-template-columns: 1.25rem 1fr; } .rd-eckdaten, .rd-termininfo { grid-column: 2; justify-content: flex-start; } }

.rd-termine { padding: .25rem 1.1rem 1.1rem 3.35rem; }
@media (max-width: 767px) { .rd-termine { padding-left: 1.1rem; overflow-x: auto; } }
.rd-tabelle { margin-bottom: 1rem; font-size: .9rem; }
.rd-tabelle th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #8a94a3; font-weight: 800; }
.rd-tabelle tr.rd-laeuft td { background: #f4fafe; }
.rd-hinweis { display: inline-flex; gap: .25rem; align-items: center; margin-left: .5rem; font-size: .78rem; color: #5b6675; background: #f1f3f6; padding: .05rem .45rem; border-radius: 4px; cursor: help; }

/* Status-Auswahl farbig */
.rd-status { width: 9.5rem; font-weight: 700; }
.rd-status.rd-frei { background-color: #eefbf0; border-color: #bfe8c7; color: #1e6b2c; }
.rd-status.rd-wenige { background-color: #fff6e6; border-color: #f3d19a; color: #9a5a00; }
.rd-status.rd-ausgebucht { background-color: #fdeeee; border-color: #f0bcbc; color: #a12a2a; }
.htmx-request.rd-status { opacity: .6; }

/* Dialog */
.rd-vorschau { background: #f4fafe; border: 1px solid #cfe6f6; border-radius: 10px; padding: .9rem 1rem; min-height: 3.2rem; }
.rd-format { border: 1px solid var(--rd-linie); border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .6rem; }

/* Anmeldung & Zwei-Faktor-Seiten (django-allauth) */
.konto-seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(120deg, #7ddf64, #1b98e0); padding: 2rem 1rem; }
.konto { width: 100%; max-width: 440px; }
.konto.breit { max-width: 640px; }
.konto-karte { background: #fff; border-radius: 16px; padding: 2.25rem; box-shadow: 0 30px 60px rgba(7, 42, 71, .25); }
.konto-karte h1 { font-size: 1.5rem; font-weight: 800; color: var(--rd-nacht); margin-bottom: 1rem; }
.konto-karte form .btn[type="submit"] { width: 100%; padding: .65rem; font-weight: 700; }
.konto-karte p { color: #475262; }
.konto-panel { border: 1px solid var(--rd-linie); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .75rem; }
.konto-panel .btn { width: auto !important; }
.konto-zurueck { color: #fff; font-weight: 700; text-decoration: none; }
.konto-zurueck:hover { color: #fff; text-decoration: underline; }
.konto-karte img[src^="data:image"], .konto-karte svg { display: block; margin: 1rem auto; max-width: 220px; height: auto; }
.konto-karte pre, .konto-karte code { font-size: 1rem; }
.zf-wahl { display: grid; gap: .75rem; margin: 1.25rem 0; }
.zf-wahl a { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border: 1.5px solid var(--rd-linie); border-radius: 12px; text-decoration: none; color: inherit; }
.zf-wahl a:hover { border-color: var(--rd-blau); background: #f4fafe; }
.zf-wahl .bi { font-size: 1.8rem; color: var(--rd-blau); }
.konto-karte form p { margin-bottom: 1rem; }
.konto-karte form label { display: block; font-weight: 700; margin-bottom: .35rem; }
.konto-karte input[type="text"], .konto-karte input[type="password"], .konto-karte input[type="email"], .konto-karte input[type="number"], .konto-karte input:not([type]) {
  display: block; width: 100%; padding: .65rem .85rem; font-size: 1.05rem; border: 1px solid #cfd8e2; border-radius: 10px; background: #fff;
}
.konto-karte input:focus { outline: 0; border-color: var(--rd-blau); box-shadow: 0 0 0 .2rem rgba(27, 152, 224, .2); }
.konto-karte .errorlist { list-style: none; padding: .6rem .85rem; margin: 0 0 1rem; background: #fdeeee; color: #a12a2a; border-radius: 10px; font-weight: 600; }
.konto-karte .helptext { display: block; margin-top: .35rem; font-size: .875rem; }

/* Formularseiten (Kurs, Weiterbildung) */
.rd-zurueck { display: inline-block; margin-bottom: .35rem; font-weight: 700; text-decoration: none; color: #5b6675; }
.rd-zurueck:hover { color: var(--rd-blau); }
.rd-karte { background: #fff; border: 1px solid var(--rd-linie); border-radius: 12px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.rd-karte h2 { font-size: 1.05rem; font-weight: 800; color: var(--rd-nacht); margin-bottom: 1rem; }
.rd-karte summary { cursor: pointer; }
.rd-karte summary h2 { margin: 0; }
.rd-klebend { position: sticky; top: 72px; }
.rd-bildvorschau { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--rd-linie); }
.rd-auswahl { display: flex; flex-wrap: wrap; gap: .4rem; }
.rd-auswahl.hoch { max-height: 18rem; overflow-y: auto; padding: .25rem; border: 1px solid var(--rd-linie); border-radius: 10px; }
.rd-option { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .5rem; border: 1px solid var(--rd-linie); border-radius: 999px; cursor: pointer; font-size: .9rem; background: #fff; user-select: none; }
.rd-option:hover { border-color: #b8c6d4; }
.rd-option:has(input:checked) { background: #e6f3fc; border-color: var(--rd-blau); color: #00487c; font-weight: 700; }
.rd-option input { margin: 0; }
/* Editor (Trix) */
.rd-editor { background: #fff; border: 1px solid #cfd8e2 !important; border-radius: 10px; padding: .75rem 1rem !important; overflow-y: auto; max-height: 60vh; }
.rd-editor:focus { outline: 0; border-color: var(--rd-blau) !important; box-shadow: 0 0 0 .2rem rgba(27,152,224,.15); }
.rd-editor h1 { font-size: 1.15rem; font-weight: 800; margin: 1rem 0 .4rem; }
trix-toolbar { position: sticky; top: 52px; z-index: 5; background: #fff; padding: .25rem 0; }
trix-toolbar .trix-button-group { border-color: #cfd8e2; border-radius: 8px; margin-bottom: .4rem; }
/* nicht benötigte Knöpfe ausblenden: Durchstreichen, Zitat, Code, Einrücken, Datei-Anhang */
trix-toolbar .trix-button--icon-strike, trix-toolbar .trix-button--icon-quote, trix-toolbar .trix-button--icon-code,
trix-toolbar .trix-button--icon-decrease-nesting-level, trix-toolbar .trix-button--icon-increase-nesting-level,
trix-toolbar .trix-button-group--file-tools { display: none; }
.rd-faq { background: #fff; border: 1px solid var(--rd-linie); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .9rem; }
.rd-faq.neu { border-style: dashed; background: #fbfcfd; }
.rd-karte .rd-faq { background: #fbfcfd; }

/* Statistik-Dashboard (dataviz: Serie 1 = CI-Blau, Palette validiert: #1b98e0,#f47230,#00b894) */
:root { --st-serie-1: #1b98e0; --st-serie-2: #f47230; --st-serie-3: #00b894; --st-raster: #e9edf1; --st-text-2: #5b6675; }
.st-filter { display: inline-flex; gap: .25rem; padding: .25rem; background: #fff; border: 1px solid var(--rd-linie); border-radius: 999px; margin-bottom: 1.5rem; }
.st-filter a { padding: .35rem 1rem; border-radius: 999px; text-decoration: none; color: var(--st-text-2); font-weight: 700; }
.st-filter a.aktiv { background: var(--rd-nacht); color: #fff; }
.st-abschnitt { font-size: 1.15rem; font-weight: 800; color: var(--rd-nacht); margin: 2rem 0 .9rem; }
.st-unter { font-size: .8rem; font-weight: 600; color: var(--st-text-2); }
.st-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.st-kachel { background: #fff; border: 1px solid var(--rd-linie); border-radius: 12px; padding: 1rem 1.2rem; }
.st-kachel-titel { font-size: .85rem; font-weight: 700; color: var(--st-text-2); }
.st-kachel-wert { font-size: 2rem; font-weight: 800; color: var(--rd-nacht); line-height: 1.2; font-variant-numeric: tabular-nums; }
.st-delta { font-size: .82rem; font-weight: 700; color: var(--rd-nacht); margin-top: .2rem; }
.st-delta span { font-weight: 600; color: var(--st-text-2); }
.st-diagramm h3, .rd-karte h3 { font-size: 1rem; font-weight: 800; color: var(--rd-nacht); margin-bottom: .75rem; }
.st-svg { width: 100%; min-height: 240px; }
.st-svg svg { display: block; width: 100%; height: auto; outline: none; }
.st-svg svg:focus-visible { outline: 2px solid var(--st-serie-1); outline-offset: 4px; border-radius: 6px; }
.st-raster { stroke: var(--st-raster); stroke-width: 1; }
.st-achse { font-size: 11px; fill: var(--st-text-2); font-variant-numeric: tabular-nums; }
.st-linie { fill: none; stroke: var(--st-serie-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-flaeche { fill: var(--st-serie-1); opacity: .1; }
.st-punkt { fill: var(--st-serie-1); stroke: #fff; stroke-width: 2; }
.st-fadenkreuz { stroke: #9aa6b2; stroke-width: 1; }
.st-saeule { fill: var(--st-serie-1); transition: opacity .1s; }
.st-saeule.aktiv { opacity: .75; }
.st-tooltip { position: absolute; z-index: 2000; pointer-events: none; background: #fff; border: 1px solid var(--rd-linie); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,42,58,.15); padding: .45rem .7rem; font-size: .85rem; }
.st-tooltip strong { font-size: 1rem; color: var(--rd-nacht); }
.st-tooltip span { color: var(--st-text-2); }
.st-tooltip-titel { font-size: .75rem; color: var(--st-text-2); }
.st-tabellenansicht summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--st-text-2); margin-top: .5rem; }
.st-tabelle { font-size: .88rem; font-variant-numeric: tabular-nums; }
/* Rangliste (horizontale Balken, eine Farbe, Wert am Balkenende) */
.st-balken { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.st-balken li { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr 3rem; gap: .75rem; align-items: center; font-size: .9rem; }
.st-balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-balken-spur { height: 14px; }
.st-balken-wert { display: block; height: 100%; min-width: 3px; background: var(--st-serie-1); border-radius: 0 4px 4px 0; }
.st-balken-zahl { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Geräte: hoher Segmentbalken, 2px Lücke, Anteil im Segment wo er passt, Legende darunter */
.st-segmente { display: flex; gap: 2px; height: 44px; border-radius: 6px; overflow: hidden; }
.st-segment { display: flex; align-items: center; justify-content: center; min-width: 4px; font-weight: 800; font-size: .85rem; }
.st-segment span { color: #102a3a; } /* dunkle Schrift: auf allen drei Füllungen ausreichend Kontrast */
.st-farbe-1 { background: var(--st-serie-1); } .st-farbe-2 { background: var(--st-serie-2); } .st-farbe-3 { background: var(--st-serie-3); }
.st-legende { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; }
.st-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
