/* Prüfungsportal – UI im Relution-Design (Corporate Identity).
   Grün #95b507 als Primärfarbe, dunkelgraue Navigation, Selawik-Schrift,
   flache Material-Buttons, weiße Karten mit feinem Rand. Selbstgehostet,
   CSP-konform (keine externen Fonts/CDNs, kein Inline-CSS/JS). */

/* ================= Selawik (selbstgehostet) ================= */
@font-face {
  font-family: "Selawik";
  src: url("/static/fonts/Selawik-Light.woff2") format("woff2"),
       url("/static/fonts/Selawik-Light.woff") format("woff"),
       url("/static/fonts/Selawik-Light.ttf") format("truetype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Selawik";
  src: url("/static/fonts/Selawik-Regular.woff2") format("woff2"),
       url("/static/fonts/Selawik-Regular.woff") format("woff"),
       url("/static/fonts/Selawik-Regular.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Selawik";
  src: url("/static/fonts/Selawik-Bold.woff2") format("woff2"),
       url("/static/fonts/Selawik-Bold.woff") format("woff"),
       url("/static/fonts/Selawik-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ================= Design-Tokens (Relution CI) ================= */
:root {
  --primary: #95b507;          /* Relution-Grün */
  --primary-dark: #84a006;
  --primary-tint: rgba(149, 181, 7, .10);
  --primary-tint-strong: rgba(149, 181, 7, .18);
  --accent: #45a4ff;           /* Info-Blau */
  --danger: #d04500;
  --danger-tint: rgba(208, 69, 0, .06);
  --warning: #ffa000;

  --sidenav: #2b303c;          /* Navigation Anthrazit (moderner, ruhiger) */
  --sidenav-header: #22272f;   /* Kopf/Topbar dunkler Anthrazit */
  --sidenav-hover: rgba(149, 181, 7, .14);
  --sidenav-item: rgba(255, 255, 255, .62);

  --bg: #eef1f4;               /* helles Grau (relution.io-Look) */
  --bg-dark: #22272f;          /* Teilnehmer-Hintergrund */
  --card: #ffffff;
  --text: #3c3c3c;
  --text-strong: rgba(0, 0, 0, .87);
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e5e8ee;
  --line-soft: #eef0f4;
  --table-head: #2f3441;
  --table-alt: #f7f9fb;

  --ok: #6f8a00;               /* dunkleres Grün für Text/Badges auf Weiß */
  --radius: 10px;              /* weiche Karten-Ecken */
  --radius-img: 6px;           /* Bilder/Thumbnails – dezenter als Karten */
  --radius-btn: 9px;           /* Buttons/Inputs */
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .06);
  --shadow-2: 0 4px 12px rgba(16, 24, 40, .10), 0 12px 28px rgba(16, 24, 40, .10);
  --shadow-green: 0 4px 14px rgba(149, 181, 7, .30);
  --page-header-h: 92px;       /* Höhe des Seiten-Banners = Höhe des Sidebar-Logo-Blocks */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Selawik", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 0.875rem; line-height: 1.42857;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; font-weight: 300; color: var(--text-strong); margin: 0 0 .25rem; }
h2 { font-size: 1.125rem; font-weight: 700; color: var(--text-strong); margin: 1.75rem 0 .75rem; }
strong { font-weight: 700; }
p.sub { color: var(--muted); margin: 0 0 1.75rem; }
p.sub a { color: var(--primary-dark); }

/* ---------- Buttons (flache Material-Buttons) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: .6rem 1.3rem; border-radius: var(--radius-btn);
  box-shadow: none; line-height: 1.2;
  transition: background .15s;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn:active { background: var(--primary-dark); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.btn.secondary:hover { background: var(--primary-tint); color: var(--primary-dark); border-color: var(--primary); transform: none; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-tint); color: var(--danger); }
.btn.small { padding: .32rem .7rem; font-size: .8rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- Formulare ---------- */
label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=datetime-local], input[type=date], input[type=file], textarea, select {
  width: 100%; padding: .55rem .7rem; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-btn); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input[type=file] { padding: .4rem .5rem; }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-tint);
}
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.field { margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: 1fr 1fr 1fr; }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------- Karten / Panels ---------- */
.card {
  background: var(--card); border: 1px solid rgba(16, 24, 40, .04);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 1.6rem 1.75rem; margin-bottom: 1.35rem;
}
.card h2:first-child { margin-top: 0; }
.content .card > h2 { padding-left: .65rem; border-left: 4px solid var(--primary); line-height: 1.25; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; color: var(--table-head); font-weight: 700; font-size: .8rem;
     padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: rgba(0, 0, 0, .03); }
th:first-child, td:first-child { padding-left: 4px; }
code.voucher { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .95em;
               background: var(--primary-tint); color: var(--ok); padding: .15rem .45rem;
               border-radius: 6px; letter-spacing: .05em; }
input.copy-field { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; width: 100%;
                   min-width: 14rem; padding: .25rem .4rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .2rem .6rem;
         border-radius: 99px; line-height: 1.4; }
.badge.ok { background: var(--primary-tint); color: var(--ok); }
.badge.off { background: #eeeeee; color: var(--muted); }
.badge.used { background: var(--danger-tint); color: var(--danger); }

.flash { background: var(--primary-tint); color: var(--ok); border: 1px solid rgba(149, 181, 7, .35);
         padding: .7rem 1rem; border-radius: var(--radius-btn); margin-bottom: 1.25rem; font-weight: 500; }
.error-box { background: var(--danger-tint); color: var(--danger); border: 1px solid rgba(208, 69, 0, .3);
             padding: .7rem 1rem; border-radius: var(--radius-btn); margin-bottom: 1rem; font-weight: 500; }

/* ================= Teilnehmer-Ansicht ================= */
.public-topbar {
  background: var(--sidenav-header); color: #fff; height: 64px;
  padding: 0 24px; display: flex; align-items: center; gap: .9rem;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.public-topbar .logo { height: 26px; width: auto; display: block; }
.public-topbar .brand { font-weight: 500; letter-spacing: .01em; color: rgba(255, 255, 255, .85);
                        padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.lang-switch { margin-left: auto; display: flex; gap: .25rem; }
.lang-switch a { color: rgba(255, 255, 255, .6); font-size: .82rem; font-weight: 700; padding: .2rem .5rem;
                 border-radius: 4px; }
.lang-switch a:hover { color: #fff; text-decoration: none; }
.lang-switch a.active { color: #fff; background: rgba(255, 255, 255, .15); }
/* width:100% ist wichtig: in der Flex-Spalte würde die Wrap sonst wegen margin:auto
   auf die Inhaltsbreite schrumpfen und die Kartenbreite je Frage springen. */
.public-wrap { width: 100%; max-width: 760px; margin: 2.5rem auto; padding: 0 1rem; }
.public-wrap.narrow { max-width: 460px; }
.public-wrap.wide { max-width: 1080px; }

/* ===== Schulungs-Landing (Heise-Academy-Layout, Relution-CI) ===== */
/* Helles Theme nur für die Schulungsseiten (Prüfungsseiten bleiben dunkel) */
.public-body.theme-light { background: var(--bg); }
.public-body.theme-light .site-footer { color: var(--muted-light); }
.public-body.theme-light .site-footer a { color: var(--muted); }
.public-body.theme-light .site-footer a:hover { color: var(--primary-dark); }
.brand-link { display: inline-flex; align-items: center; }

.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.section-title { font-size: 1.35rem; font-weight: 700; color: var(--text-strong); margin: 2rem 0 1rem;
                 scroll-margin-top: 1rem; padding-left: .7rem; border-left: 4px solid var(--primary); }

/* Hero (grün hinterlegter Titel, wie im Relution-Entwurf) */
.hero-lg { background: transparent; border-radius: 0; padding: 2.25rem 0 1.25rem; margin-bottom: 1rem; }
.hero-lg-inner { max-width: 720px; }
.hero-tag { display: inline-block; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: .08em; padding: .3rem .65rem; margin-bottom: 1rem; }
.hero-lg h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.5; margin: 0 0 1rem; }
.hero-lg h1 .hl { background: var(--primary); color: #fff; padding: .05em .3em; text-transform: uppercase;
                  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-lg .hero-lg-inner p { color: var(--muted); margin: 0 0 1.25rem; font-size: 1.05rem; line-height: 1.55; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* Feature-Strip */
.feature-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.feature { display: flex; align-items: center; gap: .75rem; background: var(--card); border: 1px solid var(--line);
           border-radius: var(--radius); padding: .9rem 1.1rem; }
.feature-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--primary-tint);
              color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; }
.feature strong { display: block; font-size: .95rem; }
.feature span { color: var(--muted); font-size: .82rem; }

/* Kurskarten (Raster wie im Relution-Entwurf) */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
               border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); color: var(--text);
               transition: box-shadow .15s, transform .15s; }
.course-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); text-decoration: none; }
.course-cathead { background: var(--primary); color: #fff; font-weight: 700; text-transform: uppercase;
                  font-size: .72rem; letter-spacing: .05em; padding: .6rem 1.1rem; min-height: 2rem; }
.course-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--line-soft);
                display: flex; align-items: center; justify-content: center; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-thumb-empty { font-size: 2.5rem; font-weight: 700; color: var(--muted-light); }
/* course-badge/course-cat: von der Detailseite mitbenutzt – hier belassen */
.course-badge { position: absolute; top: .7rem; left: .7rem; background: var(--primary); color: #fff;
                font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; }
.course-cat { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
              text-transform: uppercase; color: var(--primary-dark); margin-bottom: .3rem; }
.course-body { padding: 1.15rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.course-body h3 { margin: 0 0 .4rem; font-size: 1.02rem; font-weight: 700; text-transform: uppercase;
                  letter-spacing: .01em; color: var(--text-strong); line-height: 1.25; }
.course-body p { margin: 0 0 1.1rem; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.course-info { display: flex; gap: 1rem; margin-top: auto; margin-bottom: 1.15rem; }  /* unten verankert → gleiche Höhe über alle Kacheln */
.course-info-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.ci-label { font-size: .74rem; font-weight: 700; color: var(--text-strong); }
.ci-value { font-size: .82rem; color: var(--muted); }
.course-cta-btn { display: block; text-align: center; background: #e7e8ea;
                  color: var(--text-strong); text-transform: uppercase; font-weight: 700;
                  font-size: .76rem; letter-spacing: .07em; padding: .72rem 1rem; border-radius: 5px;
                  transition: background .15s, color .15s; }
.course-card:hover .course-cta-btn { background: var(--primary); color: #fff; }

/* Filter-Pills */
.filter-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.pill { border: 0; background: #eceef1; color: var(--muted); cursor: pointer;
        font: inherit; font-size: .82rem; font-weight: 600; padding: .42rem 1.05rem; border-radius: 99px; transition: all .12s; }
.pill:hover { background: #e2e5e9; color: var(--text); }
.pill.active { background: var(--primary); color: #fff; }

/* Detail: Tags/Preis + On-Demand */
.detail-tags { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.detail-price { font-weight: 700; color: var(--primary-dark); }
.course-badge.inline { position: static; }
.ondemand-card .btn { margin-top: .5rem; }

/* Detail-Kopf */
.detail-hero { display: flex; gap: 1.5rem; align-items: flex-start; }
.detail-hero-media { flex: none; width: 220px; aspect-ratio: 3 / 2; border-radius: var(--radius-img);
                     overflow: hidden; background: var(--line-soft); display: flex; align-items: center; justify-content: center; }
.detail-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-body { flex: 1; min-width: 0; }
@media (max-width: 640px) { .detail-hero { flex-direction: column; } .detail-hero-media { width: 100%; } }

/* Termin-Liste */
.session-list { display: flex; flex-direction: column; gap: .75rem; }
.session-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
                background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.session-date { display: block; font-weight: 700; color: var(--text-strong); }
.session-meta { color: var(--muted); font-size: .85rem; }

/* Zweispaltige Anmeldung */
.register-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.register-form { margin-bottom: 0; }
.summary-card { position: sticky; top: 1.5rem; }
.summary-thumb { aspect-ratio: 3 / 2; border-radius: var(--radius-img); overflow: hidden; background: var(--line-soft);
                 display: flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-card h2 { margin: 0 0 .75rem; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); }
.summary-list li span { color: var(--muted); }
@media (max-width: 800px) { .register-layout { grid-template-columns: 1fr; } .summary-card { position: static; } }

/* Rich-Text-Ausgabe (gerenderte Beschreibungen/Texte) */
.rich p { margin: 0 0 .75rem; }
.rich p:last-child { margin-bottom: 0; }
.rich ul { margin: 0 0 .75rem; padding-left: 1.25rem; }
.rich a { color: var(--primary-dark); }
.rich h2 { font-size: 1.6rem; font-weight: 700; margin: .25rem 0 .6rem; color: var(--text-strong); }
.rich h3 { font-size: 1.25rem; font-weight: 700; margin: .25rem 0 .5rem; color: var(--text-strong); }
.rich h4 { font-size: 1.05rem; font-weight: 700; margin: .25rem 0 .4rem; color: var(--text-strong); }

/* Freier Textblock auf der Landing (zwischen Vorteilen und Terminen) */
.landing-intro { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
                 padding: 1.75rem 2rem; margin: 0 0 .5rem; }

/* Einstellungen: Cluster-Optik */
.settings-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.settings-nav a { border: 1px solid var(--line); background: var(--card); border-radius: 99px;
                  padding: .35rem .9rem; font-size: .85rem; color: var(--text); }
.settings-nav a:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.settings-section { font-size: 1.25rem; font-weight: 700; color: var(--text-strong);
                    margin: 2rem 0 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary-tint-strong);
                    scroll-margin-top: 1rem; }
.card h3 { margin-top: 0; font-size: 1.05rem; }

/* Markdown-Formatierleiste im Admin */
.md-toolbar { display: flex; gap: .4rem; margin-bottom: .4rem; }
.md-toolbar .btn.small { min-width: 2.2rem; }

/* Schulungs-Kacheln (öffentliche Übersicht) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
        border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); color: var(--text); }
.tile:hover { box-shadow: var(--shadow-2); text-decoration: none; }
.tile-thumb { aspect-ratio: 1 / 1; background: var(--line-soft); display: flex; align-items: center; justify-content: center; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-thumb-empty { font-size: 2rem; font-weight: 700; color: var(--muted-light); }
.tile-body { padding: 1rem; }
.tile-body h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.tile-body p { margin: 0; color: var(--muted); font-size: .85rem; }
.detail-head { display: flex; gap: 1.25rem; align-items: flex-start; }
.detail-thumb { width: 120px; height: 120px; border-radius: var(--radius-img); object-fit: cover; flex: none; }
@media (max-width: 600px) { .detail-head { flex-direction: column; } }

/* Termin-Detail: Buchungsblöcke */
.booking-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.booking-head { margin-bottom: .5rem; }

/* Anmeldeformular: Teilnehmerzeilen */
.participant-row { display: flex; gap: .6rem; margin-bottom: .55rem; }
.participant-row input { flex: 1; }
@media (max-width: 600px) { .participant-row { flex-direction: column; } }
input:disabled, input[readonly] { background: var(--line-soft); color: var(--muted); cursor: not-allowed; }
.participant-row.self-row input { background: var(--primary-tint); color: var(--text); border-color: var(--primary); }

.hero-card { text-align: center; padding: 2.25rem 2rem; }
.hero-card p { color: var(--text); }

/* Teilnehmer-Ansicht: dunkler Hintergrund wie im Relution-Portal */
.public-body { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-dark); }
.public-body .public-wrap { flex: 1 0 auto; }

/* Footer mit dauerhaft sichtbarem Impressum-Link */
.site-footer { flex: none; padding: 1.25rem 1.5rem; text-align: center;
               font-size: .82rem; color: var(--muted-light); }
.site-footer a { color: var(--muted); margin: 0 .6rem; }
.site-footer a:hover { color: var(--primary-dark); text-decoration: underline; }
/* auf dunklem Hintergrund (Teilnehmer) heller */
.public-body .site-footer { color: rgba(255, 255, 255, .45); }
.public-body .site-footer a { color: rgba(255, 255, 255, .65); }
.public-body .site-footer a:hover { color: #fff; }

/* Prüfungs-Karte: feste Mindesthöhe, Navigation unten – kein Größenspringen */
.exam-card { display: flex; flex-direction: column; min-height: 520px; }
.exam-card > form { flex: 1; display: flex; flex-direction: column; }
.exam-card .question { flex: 1 0 auto; border-bottom: 0; padding-top: 0; }
.exam-card .exam-nav { margin-top: auto; }

/* Optionales „Zertifikat per E-Mail"-Feld auf der Ergebnisseite */
.cert-mail-form { border-top: 1px solid var(--line-soft); padding-top: 1.25rem; }
.mail-row { display: flex; gap: .6rem; align-items: stretch; }
.mail-row input { flex: 1; }
.mail-row .btn { flex: none; white-space: nowrap; }

/* Prüfung */
.question { padding: 1.5rem 0; border-bottom: 1px solid var(--line-soft); }
.question:last-of-type { border-bottom: 0; }
.q-num { color: var(--primary-dark); font-weight: 700; font-size: .78rem; letter-spacing: .05em; }
.q-text { font-weight: 700; color: var(--text-strong); margin: .3rem 0 .85rem; font-size: 1rem;
          overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
.option { display: flex; align-items: flex-start; gap: .65rem; padding: .6rem .8rem;
          border: 1px solid var(--line); border-radius: var(--radius-btn); margin-bottom: .55rem; cursor: pointer;
          transition: border-color .1s, background .1s; }
.option:hover { border-color: var(--primary); background: var(--primary-tint); }
.option input { margin-top: .15rem; flex: none; }
.option span { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.hint { color: var(--muted-light); font-size: .82rem; }
.hint code, p code { font-family: ui-monospace, Consolas, monospace; background: #f4f4f4; padding: 0 .3em; border-radius: 2px; }

/* Prüfungs-Wizard: Fortschritt + Navigation */
.exam-progress { margin: 0 0 1.75rem; }
.exam-progress-head { display: flex; justify-content: space-between; align-items: baseline;
                      gap: 1rem; margin-bottom: .5rem; }
.exam-progress-head .q-num { color: var(--primary-dark); font-weight: 700; font-size: .85rem;
                             letter-spacing: .04em; }
.exam-bar { -webkit-appearance: none; -moz-appearance: none; appearance: none;
            display: block; width: 100%; height: 8px; border: 0; border-radius: 99px;
            background: var(--line-soft); overflow: hidden; }
.exam-bar::-webkit-progress-bar { background: var(--line-soft); border-radius: 99px; }
.exam-bar::-webkit-progress-value { background: var(--primary); border-radius: 99px; transition: width .2s ease; }
.exam-bar::-moz-progress-bar { background: var(--primary); border-radius: 99px; }
.exam-nav { display: flex; align-items: center; gap: .7rem; margin-top: 1.5rem;
            padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }
.exam-nav .grow { flex: 1; }

.score-ring { font-size: 3rem; font-weight: 300; line-height: 1.1; margin-bottom: .5rem; }
.score-ring.pass { color: var(--primary); }
.score-ring.fail { color: var(--danger); }

/* ================= Admin-Layout ================= */
.admin { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 270px; flex: none; background: var(--sidenav); color: var(--sidenav-item);
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}
.sidebar .brand { display: flex; align-items: center; height: var(--page-header-h); padding: 0 24px;
                  background: var(--sidenav-header); }
.sidebar .brand .logo { height: 24px; width: auto; }
.sidebar nav { padding: .75rem 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sidebar nav a {
  display: block; color: var(--sidenav-item); padding: .7rem 24px; font-weight: 500;
  border-left: 3px solid transparent; transition: background .12s, color .12s;
}
.sidebar nav a:hover { color: #fff; background: var(--sidenav-hover); text-decoration: none; }
.sidebar nav a.active { color: #fff; background: var(--sidenav-hover); border-left-color: var(--primary); }
.sidebar .spacer { display: none; }
.sidebar form { padding: 1rem 24px; }
.sidebar .btn-logout { width: 100%; background: transparent; border: 1px solid rgba(255, 255, 255, .25);
                       color: var(--sidenav-item); box-shadow: none; font-weight: 500; }
.sidebar .btn-logout:hover { border-color: var(--primary); color: #fff; background: transparent; }
.sidebar-account { display: block; padding: .5rem 24px 1rem; color: rgba(255, 255, 255, .55); font-size: .8rem; }
.sidebar-account:hover { color: #fff; text-decoration: none; }
.sidebar-account.active { color: #fff; }

.content { flex: 1; padding: 2rem 2.5rem; max-width: 1160px; display: flex; flex-direction: column;
           height: 100vh; overflow-y: auto; }
.content.wide { max-width: 1600px; }
.content-main { flex: 1 0 auto; }
.content .site-footer { text-align: left; padding: 1.5rem 0 0; }
@media (max-width: 800px) {
  .admin { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; position: static; height: auto; overflow: visible; }
  .sidebar .brand { padding: 0 16px; }
  .sidebar nav { display: flex; flex: 0 1 auto; overflow-x: auto; overflow-y: visible; padding: 0; }
  .sidebar nav a { border-left: 0; border-bottom: 3px solid transparent; padding: .7rem 1rem; white-space: nowrap; }
  .sidebar nav a.active { border-bottom-color: var(--primary); }
  .sidebar .spacer { display: none; }
  .sidebar form { padding: .5rem 1rem; margin-left: auto; }
  .content { padding: 1.25rem; height: auto; overflow: visible; }
}

/* Dashboard-Kacheln */
.stat { text-align: center; padding: 1.6rem 1rem; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
                background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.stat .num { font-size: 2.4rem; font-weight: 300; color: var(--primary-dark); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .82rem; font-weight: 500; margin-top: .3rem; }

.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar .grow { flex: 1; }

details.q-edit { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; background: #fff; }
details.q-edit summary { cursor: pointer; padding: .75rem .9rem; font-weight: 500; list-style: none; color: var(--text); }
details.q-edit summary::-webkit-details-marker { display: none; }
details.q-edit summary::before { content: "▸ "; color: var(--primary-dark); }
details.q-edit[open] summary::before { content: "▾ "; }
details.q-edit[open] summary { border-bottom: 1px solid var(--line); }
details.q-edit .inner { padding: 1rem .9rem; }
.opt-row { display: flex; gap: .6rem; align-items: center; margin-bottom: .45rem; }
.opt-row input[type=text] { flex: 1; }
.opt-row label.inline { display: flex; align-items: center; gap: .35rem; margin: 0;
                        font-size: .8rem; white-space: nowrap; color: var(--muted); font-weight: 500; }

/* Zertifikat-Layout: kompakte Feld-Matrix + Farbwähler */
.cert-layout { width: auto; margin-bottom: 1rem; }
.cert-layout th, .cert-layout td { padding: .4rem .55rem; border-bottom: 1px solid var(--line-soft);
                                   vertical-align: middle; }
.cert-layout th { font-size: .75rem; }
.cert-layout td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.cert-layout input[type=number] { width: 84px; }
.cert-layout select { min-width: 118px; }
.cert-color-field { max-width: 220px; }
.repeat-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem;
              color: var(--muted); font-size: .9rem; }
.repeat-row input { width: auto; }
.repeat-row .w-count { max-width: 90px; }
.repeat-row select { width: auto; }
.price-row { display: flex; gap: .5rem; }
.price-row input { flex: 1; }
.price-row select { width: auto; }

/* Terminübersicht: Filter, Serien, Mehrfachauswahl */
.filter-form { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.filter-form label { margin: 0; }
.filter-form select { width: auto; min-width: 220px; }
.series-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.series-item { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
               border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.series-item .series-info { display: flex; flex-direction: column; gap: .1rem; margin-right: auto; }
.series-extend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
                 color: var(--muted); font-size: .85rem; }
.series-extend input { width: auto; }
.series-extend .w-count { max-width: 90px; }
.series-extend input[type=date] { max-width: 160px; }
.bulk-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
tr.group-row td { background: var(--bg); color: var(--muted); font-weight: 700; font-size: .78rem;
                  text-transform: uppercase; letter-spacing: .04em; padding: .5rem 16px; }
tr.is-past td { color: var(--muted-light); }
tr.is-past td a { color: var(--muted); }

/* ---- Dashboard ---- */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: auto 1fr; gap: .25rem .7rem;
               align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.activity li:last-child { border-bottom: 0; }
.activity .act-main { min-width: 0; }
.activity .act-meta { grid-column: 2; color: var(--muted-light); font-size: .8rem; }
.act-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
           padding: .12rem .45rem; border-radius: var(--radius-btn); white-space: nowrap;
           background: var(--line-soft); color: var(--muted); align-self: center; }
.act-tag.reg { background: var(--primary-tint); color: var(--primary-dark); }
.act-tag.exam.ok { background: rgba(46, 160, 67, .12); color: #237a34; }
.act-tag.exam.fail { background: rgba(200, 60, 60, .12); color: #b23636; }
.chart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.chart-head h2 { margin: 0; }
.range-form { display: flex; align-items: center; gap: .5rem; }
.range-form label { margin: 0; }
.range-form select { width: auto; }
.bar-chart { width: 100%; height: auto; max-height: 240px; display: block; margin: .5rem 0; }
.pie-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin: .5rem 0; }
.pie-chart { width: 180px; height: 180px; flex: none; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; }
.pie-legend li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; font-size: .9rem; }
.pie-swatch { flex: none; }
.pie-legend .pie-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-legend .pie-val { color: var(--muted); white-space: nowrap; }
.thumb-preview { width: 80px; height: 80px; border-radius: var(--radius-img); border: 1px solid var(--line);
                 object-fit: cover; flex: none; }
input[type=color] { width: 56px; height: 40px; padding: 3px; border: 1px solid var(--line);
                    border-radius: var(--radius-btn); background: #fff; cursor: pointer; }

/* ---------- Utility-Klassen (ersetzen CSP-verbotene Inline-Styles) ---------- */
.w-full { width: 100%; }
.block { display: block; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mt-lg { margin-top: 1.25rem; }
.mt-sm { margin-top: .5rem; }
.m-0 { margin: 0; }
.align-end { align-self: flex-end; }
.inline-form { display: inline; }
.w-count { max-width: 120px; }
.gap-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

/* Anmeldungs-Übersicht: Filterzeile, Status-Pills, Paging */
.reg-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.reg-filters .field { margin: 0; min-width: 150px; }
.reg-filters .field.grow { flex: 1 1 240px; }
.reg-filter-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.status-pill { display: inline-block; padding: .15rem .55rem; border-radius: 1rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.status-angemeldet { background: #e6edf5; color: #33506e; }
.status-teilgenommen { background: #fff2d2; color: #8a6100; }
.status-zertifiziert { background: #d9f2e3; color: #1c7a48; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.pager-info { color: var(--muted-light); font-size: .85rem; }
.btn.small.disabled { opacity: .45; pointer-events: none; }
.sort-link { color: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.sort-link:hover { text-decoration: underline; }
.sort-link.active { font-weight: 700; }
.reg-cutoff { background: #fff2d2; border: 1px solid #e6cf8a; color: #6b5200; padding: 1rem; border-radius: 6px; }

/* ============ Relution-Look (Schulungen/Einstellungen/Benutzer/Dashboard) ============ */
/* Nur auf .content.admin-modern aktiv – Prüfungs-/Ergebnis-/Voucher-Seiten bleiben unverändert. */
.content.admin-modern .content-main h1 { display: none; }  /* Seitentitel steckt im Banner */
.content.admin-modern .page-banner {
  margin: -2rem -2.5rem 1.6rem;                            /* Vollbreite bis an die Content-Kanten */
  min-height: var(--page-header-h);                        /* gleiche Höhe wie der Logo-Block links */
  padding: .6rem 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(105deg, #20252d 0%, #2b303c 40%, #5f7a06 84%, #95b507 100%);
  color: #fff;
}
.content.admin-modern .page-banner h1 { display: block; color: #fff; font-weight: 300; font-size: 1.7rem; margin: 0; }
.content.admin-modern .crumb { font-size: .8rem; color: rgba(255, 255, 255, .82); margin-bottom: .45rem; }
.content.admin-modern .crumb a { color: rgba(255, 255, 255, .82); }
.content.admin-modern .crumb a:hover { color: #fff; text-decoration: none; }
.content.admin-modern .crumb span { margin: 0 .4rem; opacity: .7; }
/* dezenter Feinschliff: rundere Suchfelder wie im Relution-Portal */
.content.admin-modern .filter-form input[type=search],
.content.admin-modern .reg-filters input[type=search] { border-radius: 999px; }

@media (max-width: 800px) {
  .content.admin-modern .page-banner { margin: -1.25rem -1.25rem 1.25rem; padding: 1.1rem 1.25rem 1.3rem; }
  .content.admin-modern .page-banner h1 { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sidebar, .public-topbar { display: none; } }
