/* ============================================================
   Mitarbeiter-Kompetenz – Lernumgebung und Admin-Bereich
   Gestaltung wie die Website („Redaktionell, ruhig“): Papierweiß, Tinte,
   Navy, Korrekturrot (sparsam), feine Linien statt Schatten.
   Schriften selbst gehostet (SIL Open Font License, siehe /assets/fonts/OFL-*.txt).
   Bewusst nur heller Papierlook, keine externen Dienste.
   ============================================================ */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
    color-scheme: light;
    --paper: #fbfaf7;
    --white: #fff;
    --ink: #1b1d22;
    --ink-2: #33373e;
    --ink-3: #454a52;
    --navy: #16304f;
    --navy-2: #0f2440;
    --navy-soft: #e9eef4;
    --red: #b3261e;
    --red-soft: #fbefed;
    --rule: #dedad2;
    --rule-2: #cfc9bd;
    --soft: #f2efe8;
    --mute: #5f6670;
    --ok: #1f6b45;
    --ok-soft: #eaf2ec;
    --warn: #7a5200;
    --warn-soft: #f6eedb;
    --serif: "Newsreader", "Iowan Old Style", Charter, Georgia, serif;
    --sans: "Figtree", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    /* Alte Variablennamen (Inhalts-Grafiken nutzen var(--primary|--accent|--danger)) */
    --primary: var(--navy);
    --accent: var(--ok);
    --danger: var(--red);
}

/* === Grundlagen === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: #d9e1ec; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
/* Sprunglink (WCAG 2.4.1): erst bei Tastaturfokus sichtbar */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 8px; color: #fff; }
main[tabindex="-1"]:focus { outline: none; }

h1, h2, h3 { color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 500; font-size: 2.25rem; line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 0.6rem; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.008em; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin-bottom: 0.4rem; }
p { margin-bottom: 0.75rem; }
a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-2); text-decoration-thickness: 2px; }
strong, b { font-weight: 600; }
small { font-size: 0.85em; }
code { font-family: var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 2px; font-size: 0.88em; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.text-muted { color: var(--mute); }

/* === Layout === */
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.site-main { flex: 1; padding: 40px 0 64px; }

/* === Kopfzeile (Lernumgebung) === */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 76px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.header-brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.header-logo { height: 36px; width: auto; display: block; }
.header-company { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.header-title { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); font-weight: 500; line-height: 1.35; }
.header-meta { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; font-size: 0.94rem; }
.header-courses { color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding: 7px 0 1px; display: inline-block; }
.header-courses:hover { color: var(--navy-2); border-bottom-width: 2px; }
.header-user { color: var(--mute); }
.header-icon { display: none; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 2px 8px; border: 1px solid var(--rule-2); border-radius: 2px; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.lang-switch a.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* === Fußzeile === */
.site-footer { border-top: 1px solid var(--rule); background: var(--soft); padding: 28px 0 32px; font-size: 0.85rem; color: var(--mute); margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; }
.footer-inner p { margin: 0; }
.footer-wordmark { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; color: var(--ink); letter-spacing: -0.005em; }
.footer-legal { font-size: 0.8rem; flex-basis: 100%; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; min-height: 44px;
    border: 1px solid var(--rule-2); border-radius: 2px;
    background: var(--white); color: var(--ink);
    font-family: var(--sans); font-size: 0.97rem; font-weight: 600; line-height: 1.25;
    text-decoration: none; text-align: center; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-secondary:hover { background: var(--white); color: var(--navy-2); border-color: var(--navy-2); }
.btn-text { background: none; border-color: transparent; color: var(--navy); padding-left: 0; padding-right: 0; }
.btn-text:hover { background: none; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-large { padding: 14px 26px; min-height: 52px; font-size: 1.03rem; }
.btn-small { padding: 5px 11px; min-height: 32px; font-size: 0.84rem; }
.btn-block { width: 100%; }
.btn-danger { color: var(--red) !important; }
.btn:disabled, .btn[disabled] { background: var(--soft); border-color: var(--rule-2); color: var(--mute); cursor: not-allowed; }
.btn-disabled { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; font-size: 0.94rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--navy-2); }

/* === Formulare === */
.form-group { margin-bottom: 18px; }
.form-group > label, .filter-group label { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=url], input[type=tel], input[type=date], select, textarea {
    background: var(--white); border: 1px solid var(--rule-2); border-radius: 2px;
    padding: 11px 13px; font-size: 1rem; line-height: 1.4; color: var(--ink);
}
.form-group input:not([type=checkbox]):not([type=radio]), .form-group select, .form-group textarea { width: 100%; min-height: 48px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 17px; height: 17px; flex-shrink: 0; }
.form-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 8px; }
.form-group-full { grid-column: 1 / -1; }
.form-hint { display: block; margin-top: 6px; color: var(--mute); font-size: 0.86rem; line-height: 1.5; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 4px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; font-size: 0.97rem; }
.course-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 10px; }
.course-checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.97rem; cursor: pointer; }
.pin-fieldset { border: 1px solid var(--rule); border-radius: 2px; padding: 14px 16px 2px; margin: 4px 0 20px; background: var(--paper); }
.pin-fieldset legend { font-weight: 600; padding: 0 6px; }
.pin-fieldset .form-hint { margin: 0 0 12px; }
.pin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pin-input { font-family: var(--mono) !important; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; font-size: 1.2rem !important; }

/* === Hinweise === */
.alert { padding: 13px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--navy); border-radius: 2px; background: var(--white); margin-bottom: 22px; font-size: 0.95rem; line-height: 1.5; }
.alert-error { border-left-color: var(--red); background: var(--red-soft); color: #7d1a14; }
.alert-success { border-left-color: var(--ok); background: var(--ok-soft); color: #174f33; }
.alert-info { border-left-color: var(--navy); background: var(--navy-soft); color: var(--navy-2); }
.info-box { padding: 14px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--navy); border-radius: 2px; background: var(--white); margin-bottom: 22px; font-size: 0.93rem; line-height: 1.6; color: var(--ink-2); }
.info-box strong { color: var(--ink); }
.info-box small { color: var(--mute); }
.info-box-neutral { border-left-color: var(--rule-2); }
.info-box-primary { border-left-color: var(--navy); background: var(--navy-soft); }
.info-box-warning { border-left-color: var(--red); background: var(--red-soft); }
.lifecycle-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #e6d6ad; padding: 10px 16px; text-align: center; font-size: 0.92rem; line-height: 1.5; }
.lifecycle-banner a { color: var(--warn); font-weight: 600; margin-left: 6px; }
.lifecycle-banner-admin { text-align: left; padding-left: max(24px, calc((100% - 1352px) / 2)); }

/* === Kennzeichen (Badges) === */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 2px; font-size: 0.78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge .icon { vertical-align: -0.1em; }
.badge-success { background: var(--ok-soft); color: var(--ok); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--red-soft); color: var(--red); }
.badge-neutral { background: var(--soft); color: var(--mute); }
.badge-info { background: var(--navy-soft); color: var(--navy); }
.course-badge { display: inline-block; font-size: 0.76rem; font-weight: 500; padding: 1px 7px; border: 1px solid var(--rule-2); border-radius: 2px; background: var(--white); color: var(--ink-2); margin: 2px 4px 2px 0; white-space: nowrap; line-height: 1.5; }
.group-badge { background: var(--navy-soft); border-color: #cbd6e3; color: var(--navy); }

/* === Icons === */
.icon { display: inline-block; flex-shrink: 0; vertical-align: -0.2em; }
.icon-success { color: var(--ok); }
.heading-with-icon { display: flex; align-items: center; gap: 10px; }

/* === Fortschritt (feine Linie) === */
.progress-bar { height: 3px; background: var(--rule); overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; background: var(--navy); transition: width .4s ease; }
.progress-label { font-size: 0.9rem; color: var(--mute); }
.progress-mini { width: 64px; height: 3px; background: var(--rule); display: inline-block; vertical-align: middle; margin-right: 6px; }
.progress-mini-bar { height: 100%; background: var(--navy); }
.progress-mini-label { font-size: 0.8rem; color: var(--mute); vertical-align: middle; font-variant-numeric: tabular-nums; }

/* ============================================================
   EINSTIEG: Willkommen, Registrierung, PIN, Login
   ============================================================ */
.welcome-page, .register-page, .auth-container, .admin-login { display: flex; justify-content: center; padding: 16px 0 24px; }
.welcome-card, .register-card, .auth-card, .login-card {
    width: 100%; max-width: 500px;
    background: var(--white); border: 1px solid var(--rule); border-radius: 2px;
    padding: 36px 40px 32px;
}
.welcome-card { max-width: 600px; }
.login-card { max-width: 440px; }
.register-badge { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin-bottom: 10px; }
.register-card h2 { font-size: 1.5rem; margin: 0 0 4px; color: var(--ink); }
.register-card h1, .auth-card h1, .login-card h1, .welcome-card h1 { font-size: 2rem; margin-bottom: 12px; }
.register-text, .auth-subtitle, .welcome-text { color: var(--ink-2); margin-bottom: 24px; line-height: 1.6; }
.register-form .btn, .auth-form .btn, .login-card form .btn { width: 100%; }
.register-note, .auth-note, .login-help, .setup-hint { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--mute); line-height: 1.55; }
.login-help { margin-top: 18px; }
.login-card > p { color: var(--ink-2); }
.otp-input { font-family: var(--mono) !important; font-size: 1.5rem !important; letter-spacing: 0.45em; text-align: center; }
.auth-actions { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.resend-form { display: inline; }
.setup-card { max-width: 460px; }
.setup-card > p { color: var(--ink-2); margin-bottom: 20px; }
.setup-card small { display: block; color: var(--mute); margin-top: 4px; font-size: 0.84rem; }

.welcome-icon { display: none; }
.welcome-card h2 { font-size: 1.35rem; margin: 0 0 16px; color: var(--ink-2); }
.welcome-info { list-style: none; border-top: 1px solid var(--rule); margin: 8px 0 20px; }
.info-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.info-icon { flex-shrink: 0; color: var(--navy); }
.welcome-cta { color: var(--ink-2); font-size: 0.95rem; }
.welcome-text br { display: none; }
.welcome-login a { font-weight: 600; }
.welcome-demo { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* ============================================================
   KURSÜBERSICHT (/kurse)
   ============================================================ */
.courses-overview { max-width: 780px; }
.course-cards { list-style: none; border-top: 1px solid var(--ink); margin-top: 28px; }
.course-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 28px; padding: 24px 0 26px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.course-card:hover { text-decoration: none; color: inherit; }
.course-card:hover .course-card-title { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.course-card > * { grid-column: 1; }
.course-card-title { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.course-card-sub { font-size: 1rem; color: var(--ink-2); }
.course-card-meta { font-size: 0.9rem; color: var(--mute); margin-top: 4px; }
.course-card .progress-bar { display: block; max-width: 420px; }
.course-card .progress-fill { display: block; }
.course-card-done { font-size: 0.9rem; color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.course-card-btn { grid-column: 2; grid-row: 1 / span 4; align-self: center; }

/* ============================================================
   KURS-DASHBOARD
   ============================================================ */
.dashboard { max-width: 860px; }
.dashboard-header { margin-bottom: 28px; }
.dashboard-header h1 { font-size: 2.6rem; margin-bottom: 10px; }
.dashboard-header p { color: var(--ink-2); margin-bottom: 6px; }
.course-scope { color: var(--ink-2); }
.course-keep-link .icon { margin-top: 0.2em; }
.course-keep-link { display: flex; align-items: flex-start; gap: 8px; color: var(--mute) !important; font-size: 0.9rem; }
.role-info { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.role-label { color: var(--mute); font-size: 0.92rem; margin-right: 2px; }
.role-badge { display: inline-block; border: 1px solid var(--rule-2); background: var(--white); padding: 1px 9px; border-radius: 2px; font-size: 0.88rem; color: var(--ink-2); }

.progress-wrapper { margin: 0 0 8px; padding: 14px 0 0; }
.progress-wrapper .progress-label { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.motivation-badge { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ok); }
.motivation-wait { color: var(--warn); }

.supplement-notice { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--red); padding: 16px 20px; margin: 4px 0 28px; }
.supplement-notice ul { margin: 8px 0 8px 1.2rem; }
.supplement-notice p { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.supplement-hint { font-weight: 600; color: var(--red); }

.section-title { font-size: 1.5rem; margin: 40px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.module-grid { list-style: none; margin-bottom: 8px; }
.module-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.module-number { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; color: var(--mute); font-variant-numeric: tabular-nums; align-self: start; padding-top: 1px; }
.module-completed .module-number { color: var(--ok); }
.module-active .module-number { color: var(--navy); }
.module-content { min-width: 0; }
.module-content h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 3px; }
.module-locked .module-content h3 { color: var(--mute); }
.module-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 0; font-size: 0.88rem; color: var(--mute); }
.module-duration { font-size: 0.88rem; color: var(--mute); margin: 0; }
.module-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.88rem; font-weight: 600; }
.module-status svg { flex-shrink: 0; }
.status-done { color: var(--ok); }
.status-progress { color: var(--navy); }
.status-open { color: var(--ink-3); font-weight: 500; }
.status-locked, .status-demo { color: var(--mute); font-weight: 500; }
.module-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border: 1px solid var(--navy); border-radius: 2px; color: var(--navy); font-size: 0.93rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.module-link:hover { background: var(--white); color: var(--navy-2); text-decoration: none; }
.module-active .module-link { background: var(--navy); color: #fff; }
.module-active .module-link:hover { background: var(--navy-2); color: #fff; }
.module-completed .module-link { border-color: var(--rule-2); color: var(--ink-2); }
.module-branche-tag, .module-role-tag, .module-kunde-tag, .module-supplement-tag { display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin: 0 10px 2px 0; }
.module-supplement-tag { color: var(--red); }
.module-supplement { box-shadow: inset 3px 0 0 var(--red); padding-left: 14px; }

/* Abschlussquiz-Bereich im Dashboard */
.quiz-section { margin-top: 36px; }
.quiz-card { background: var(--white); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 26px 28px 28px; }
.quiz-card h2 { margin: 0 0 8px; font-size: 1.7rem; }
.quiz-card > p { color: var(--ink-2); }
.quiz-icon { display: none; }
.quiz-info { list-style: none; margin: 14px 0 20px; color: var(--ink-2); font-size: 0.97rem; border-top: 1px solid var(--rule); }
.quiz-info li { padding: 8px 0 8px 20px; border-bottom: 1px solid var(--rule); position: relative; }
.quiz-info li::before { content: "–"; position: absolute; left: 2px; color: var(--mute); }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.quiz-passed { border-top-color: var(--ok); }
.quiz-paused, .quiz-ready { border-top-color: var(--navy); }
.quiz-locked { background: var(--soft); border-top-color: var(--rule-2); }
.quiz-locked h2 { color: var(--ink-2); }
.quiz-wait { background: var(--soft); padding: 14px 16px; margin: 14px 0; border-left: 2px solid var(--rule-2); }
.quiz-wait p { margin-bottom: 4px; }
.quiz-tip { font-size: 0.9rem; color: var(--mute); }
.quiz-last-result { font-size: 0.88rem; color: var(--mute); margin-top: 16px; }
.quiz-demo { border-style: dashed; }
.merkkarte-link { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 0.97rem; }
.status-demo { color: var(--mute); }
.demo-readonly { opacity: 0.6; }

/* ============================================================
   MODULSEITE
   ============================================================ */
.module-page { max-width: 700px; margin: 0 auto; }
.module-nav-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.module-nav-top .btn-text { min-height: 40px; font-size: 0.94rem; }
.module-indicator { font-size: 0.88rem; color: var(--mute); }
.module-header { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.module-tag { display: inline-block; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-bottom: 10px; }
.module-header h1 { font-size: 2.35rem; margin-bottom: 8px; }
.module-meta { font-size: 0.92rem; color: var(--mute); margin: 0; }

/* Lerneinheiten: feine Segmentlinie, Ziffern bleiben für Screenreader */
.lerneinheit-nav { display: flex; flex-direction: column; gap: 6px; margin: -8px 0 28px; }
.lerneinheit-dots { display: flex; gap: 4px; }
.le-dot { flex: 1; position: relative; height: 36px; border: 0; background: none; cursor: pointer; font-size: 0; color: transparent; }
.le-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 3px; background: var(--rule); }
.le-dot:hover::before { background: var(--rule-2); }
.le-dot.active::before, .le-dot:has(~ .le-dot.active)::before { background: var(--navy); }
#lerneinheit-indicator { font-size: 0.86rem; color: var(--mute); }

.module-body { font-size: 1.09rem; line-height: 1.68; color: var(--ink); }
.content-section { margin-bottom: 36px; }
.content-section:last-child { margin-bottom: 0; }
.content-section h2 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 18px; }
.content-text { margin-bottom: 1.05em; }
.content-text p, .content-box-body p { margin-bottom: 0.85em; }
.content-text > :last-child, .content-box-body > :last-child { margin-bottom: 0; }
.module-body ul, .module-body ol { padding-left: 1.3em; }
.module-body li { margin-bottom: 0.4em; }
.module-body li::marker { color: var(--mute); }
.content-list { margin: 0.4em 0 1.1em; }

/* Kästen redaktionell: Fläche, Strich, Kennzeichnung */
.content-box { margin: 1.4em 0; font-size: 1rem; line-height: 1.62; }
.content-box > strong:first-child { display: block; margin-bottom: 6px; font-weight: 600; }
.content-box-title { display: flex !important; align-items: flex-start; gap: 8px; }
.content-box-title .icon { margin-top: 0.18em; }
.content-info { background: var(--soft); border-top: 1px solid var(--rule-2); padding: 16px 20px 18px; }
.content-example { border-left: 2px solid var(--navy); padding: 2px 0 2px 20px; }
.content-example::before { content: "Beispiel"; display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.content-example .content-box-title .icon { display: none; }
.content-example .content-box-body { color: var(--ink-2); }
.content-warning { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--red); padding: 16px 20px 18px; }
.content-warning .content-box-title .icon { color: var(--red); }
.content-box-body ul, .content-box-body ol { margin: 0.3em 0 0; }

.content-table-wrapper { overflow-x: auto; margin: 1.3em 0; -webkit-overflow-scrolling: touch; }
.content-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; line-height: 1.5; background: var(--white); }
.content-table th, .content-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.content-table th { font-weight: 600; border-bottom: 1px solid var(--ink); background: var(--paper); }

.content-figure { margin: 1.6em 0; }
.content-figure svg { display: block; width: 100%; height: auto; max-width: 680px; margin: 0 auto; }
.content-figure figcaption { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--mute); line-height: 1.5; }

.content-details { margin: 1.4em 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.content-details > summary { cursor: pointer; list-style: none; position: relative; padding: 14px 40px 14px 0; font-weight: 600; color: var(--navy); font-size: 1rem; }
.content-details > summary::-webkit-details-marker { display: none; }
.content-details > summary::after { content: "+"; position: absolute; right: 6px; top: 8px; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; line-height: 1; color: var(--navy); }
.content-details[open] > summary::after { content: "\2013"; }
.content-details > summary:hover { color: var(--navy-2); text-decoration: underline; text-underline-offset: 4px; }
.content-details-body { padding: 0 0 16px; font-size: 1rem; color: var(--ink-2); }

/* Verständnisfrage */
.check-question { background: var(--white); border: 1px solid var(--rule); border-top: 2px solid var(--navy); padding: 20px 22px 22px; margin: 1.8em 0; font-size: 1rem; scroll-margin-top: 24px; transition: box-shadow .2s; }
.check-label { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.check-label .icon { width: 15px; height: 15px; }
.check-text { font-size: 1.1rem; font-weight: 600; line-height: 1.45; margin-bottom: 16px; }
.check-options { display: flex; flex-direction: column; gap: 8px; }
.check-option {
    display: block; width: 100%; min-height: 52px; padding: 13px 16px;
    background: var(--paper); border: 1px solid var(--rule-2); border-radius: 2px;
    font-family: var(--sans); font-size: 1rem; line-height: 1.45; text-align: left; color: var(--ink);
    cursor: pointer; transition: border-color .15s, background-color .15s;
}
.check-option:hover { border-color: var(--navy); background: var(--white); }
.check-option.selected-correct { border-color: var(--ok); background: var(--ok-soft); box-shadow: inset 3px 0 0 var(--ok); }
.check-option.selected-wrong { border-color: var(--red); background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.check-option.disabled { pointer-events: none; }
.check-option.disabled:not(.selected-correct) { opacity: 0.6; }
.check-feedback { margin-top: 14px; font-size: 0.98rem; line-height: 1.55; }
.check-correct, .check-wrong { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--ink-2); } /* inline display:none blendet aus */
.check-correct .icon, .check-wrong .icon { margin-top: 0.12em; }
.check-correct .icon, .check-correct strong { color: var(--ok); }
.check-wrong .icon, .check-wrong strong { color: var(--red); }
.check-question.check-attention { box-shadow: 0 0 0 3px rgba(22, 48, 79, .35); }

/* Modulende */
.lerneinheit-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; margin-top: 32px; border-top: 1px solid var(--rule); }
#le-next:disabled { opacity: 0.45; cursor: not-allowed; }
.module-footer { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); }
.module-footer form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.min-time-notice { display: flex; align-items: center; gap: 8px; background: var(--soft); padding: 11px 14px; font-size: 0.93rem; color: var(--ink-2); border-left: 2px solid var(--rule-2); }
.min-time-icon { display: inline-flex; }
.min-time-text strong { font-weight: 600; }
.module-error { background: var(--red-soft); border-left: 3px solid var(--red); color: #7d1a14; padding: 11px 14px; font-size: 0.93rem; }
#btn-complete:disabled { background: var(--rule); border-color: var(--rule); color: var(--mute); cursor: not-allowed; }
.module-completed-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; background: var(--ok-soft); padding: 10px 14px; }
.module-nav-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ============================================================
   ABSCHLUSSQUIZ
   ============================================================ */
.quiz-page { max-width: 680px; margin: 0 auto; }
.quiz-header { margin-bottom: 24px; }
.quiz-header h1 { font-size: 2.3rem; }
.quiz-header p { color: var(--ink-2); font-size: 0.98rem; }
.quiz-retry-note { display: flex; align-items: flex-start; gap: 8px; color: var(--mute) !important; font-size: 0.9rem !important; }
.quiz-retry-note .icon { margin-top: 0.2em; }
.quiz-progress-bar { height: 3px; background: var(--rule); overflow: hidden; margin-bottom: 8px; }
.quiz-progress-fill { height: 100%; background: var(--navy); transition: width .3s ease; }
.quiz-counter { font-size: 0.86rem; color: var(--mute); margin-bottom: 18px; }
.quiz-question { background: var(--white); border: 1px solid var(--rule); padding: 24px 24px 26px; }
@media (prefers-reduced-motion: no-preference) { .quiz-question { animation: fadeIn .25s ease-out; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.question-number { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-bottom: 8px; }
.question-text { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; line-height: 1.45; letter-spacing: 0; margin: 0 0 18px; }
.question-options { display: flex; flex-direction: column; gap: 8px; }
.option-label { display: flex; align-items: flex-start; gap: 14px; min-height: 56px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 2px; cursor: pointer; transition: border-color .15s, background-color .15s; font-size: 1rem; line-height: 1.45; }
.option-label:hover { border-color: var(--navy); background: var(--white); }
.option-label input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.option-label:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }
.option-marker { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule-2); border-radius: 50%; font-size: 0.82rem; font-weight: 600; color: var(--ink-3); background: var(--white); flex-shrink: 0; }
.option-label input:checked + .option-marker { background: var(--navy); border-color: var(--navy); color: #fff; }
.option-label:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.option-text { padding-top: 2px; }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.quiz-nav #quiz-prev { margin-right: auto; }
.quiz-nav #quiz-next, .quiz-nav #quiz-submit { margin-left: auto; }

/* ============================================================
   ERGEBNIS
   ============================================================ */
.result-page { max-width: 680px; margin: 0 auto; }
.result-card { background: var(--white); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 30px 32px 32px; }
.result-passed { border-top-color: var(--ok); }
.result-failed { border-top-color: var(--rule-2); }
.result-icon, .result-confetti { display: none; }
.result-card h1 { font-size: 2.3rem; }
.result-text { color: var(--ink-2); }
.result-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.score-circle { display: inline-flex; align-items: baseline; gap: 6px; }
.score-number { font-family: var(--serif); font-size: 3.4rem; font-weight: 500; line-height: 1; }
.score-pass .score-number { color: var(--ok); }
.score-fail .score-number { color: var(--ink); }
.score-total { font-family: var(--serif); font-size: 1.5rem; color: var(--mute); }
.score-percent { font-size: 0.98rem; color: var(--ink-2); margin: 0; }
.result-score + .result-cert { border-top: 0; padding-top: 4px; }
.result-topics { margin: 22px 0; }
.result-topics h2 { font-size: 1.35rem; margin: 0 0 10px; }
.topic-list { list-style: none; border-top: 1px solid var(--rule); }
.topic-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.topic-score { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.topic-ok .topic-score { color: var(--ok); }
.topic-weak .topic-score { color: var(--red); }
.topic-hint { margin-top: 12px; font-size: 0.95rem; color: var(--ink-2); }
.result-cert { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.result-cert h2 { margin: 0 0 8px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 24px; }
.cert-email-form { margin-top: 8px; padding: 16px 18px; background: var(--soft); }
.cert-email-form p { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 8px; }
.email-input-group { display: flex; gap: 8px; max-width: 480px; }
.input-email { flex: 1; min-width: 0; min-height: 48px; }
.cert-email-note { font-size: 0.84rem !important; color: var(--mute) !important; margin: 8px 0 0 !important; }
.email-feedback { margin-top: 8px; font-size: 0.92rem; }
.result-retry { background: var(--soft); padding: 14px 18px; margin: 22px 0; border-left: 2px solid var(--rule-2); }
.result-retry p { margin-bottom: 4px; }
.retry-tip { font-size: 0.92rem; color: var(--mute); }
.result-bonus { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }

/* ============================================================
   SCROLL-FORTSCHRITT UND NACH-OBEN-KNOPF (app.js)
   ============================================================ */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; background: transparent; z-index: 9999; }
.scroll-progress-fill { height: 100%; background: var(--navy); width: 0%; transition: width .1s ease-out; }
.back-to-top {
    position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px;
    border-radius: 2px; background: var(--white); color: var(--navy); border: 1px solid var(--rule-2);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { border-color: var(--navy); }

/* ============================================================
   ADMIN-BEREICH
   ============================================================ */
.admin-body .container { max-width: 1400px; }
.admin-body .site-main { padding-top: 32px; }
.admin-body h1 { font-size: 2.1rem; margin-bottom: 18px; }
.admin-body h2 { font-size: 1.4rem; margin: 28px 0 10px; }
.admin-header .header-inner { min-height: 68px; }
.admin-header .header-company { font-size: 1.3rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.93rem; }
.admin-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.admin-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.admin-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.admin-nav .admin-nav-logout { color: var(--mute); }
.admin-menu-btn { display: none; }

.admin-course-switch { background: var(--soft); border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.admin-course-switch .container { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; padding-top: 6px; padding-bottom: 6px; }
.admin-course-label { color: var(--mute); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-course-switch a { padding: 6px 0; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.admin-course-switch a:hover { color: var(--navy); border-bottom-color: var(--rule-2); }
.admin-course-switch a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--navy); }

/* Kennzahlen */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 8px 0 24px; border: 1px solid var(--rule); background: var(--white); }
.stat-card { padding: 16px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 -1px -1px 0; }
.stat-number { display: block; font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.86rem; color: var(--mute); }
.stat-highlight .stat-number { color: var(--ok); }
.stat-card.stat-warning { box-shadow: inset 0 2px 0 var(--red); }
.stat-card.stat-warning .stat-number { color: var(--red); }
.stat-link { display: block; margin-top: 6px; font-size: 0.84rem; font-weight: 600; }
.completion-rate { margin: 0 0 24px; max-width: 520px; }
.completion-rate span { font-size: 0.93rem; color: var(--ink-2); }
.supplement-summary small { display: block; color: var(--mute); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }

/* Aufklappbereiche Sammelzuweisung */
.assign-bulk { margin: 0 0 14px; border: 1px solid var(--rule); background: var(--white); }
.assign-bulk > summary { cursor: pointer; padding: 13px 16px; font-weight: 600; color: var(--navy); list-style: none; position: relative; padding-right: 40px; }
.assign-bulk > summary::-webkit-details-marker { display: none; }
.assign-bulk > summary::after { content: "+"; position: absolute; right: 14px; top: 6px; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.assign-bulk[open] > summary::after { content: "\2013"; }
.assign-bulk form { padding: 0 16px 16px; border-top: 1px solid var(--rule); padding-top: 12px; }
.assign-all { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; margin: 8px 0; cursor: pointer; }
.assign-list { list-style: none; margin: 0 0 16px; columns: 2 260px; column-gap: 24px; }
.assign-list li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.assign-list label { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: pointer; }

/* Teilnehmerfilter */
.participants-header { display: flex; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; margin-top: 28px; }
.participants-header h2 { margin: 0; white-space: nowrap; }
.participant-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.filter-input, .filter-select { padding: 7px 10px; font-size: 0.9rem; min-height: 38px; }
.filter-input { min-width: 200px; }
.filter-select { cursor: pointer; }
.filter-count { font-size: 0.84rem; color: var(--mute); white-space: nowrap; }

/* Tabellen */
.table-wrapper { overflow-x: auto; margin: 12px 0 20px; -webkit-overflow-scrolling: touch; }
.data-table, .audit-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--rule); font-size: 0.9rem; line-height: 1.45; }
.data-table th, .audit-table th { padding: 10px 12px; text-align: left; font-weight: 600; font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--ink); background: var(--white); white-space: nowrap; }
.data-table td, .audit-table td { padding: 10px 12px; border-top: 1px solid var(--rule); vertical-align: middle; }
.data-table tbody tr:hover, .audit-table tbody tr:hover { background: #fdfcf9; }
.data-table td a strong { font-weight: 600; }
.row-completed td:first-child { box-shadow: inset 2px 0 0 var(--ok); }
.token-code { font-size: 0.82rem; }
.actions-cell { white-space: nowrap; }
.actions-cell > * { vertical-align: middle; }
.actions-cell form { display: inline-block; margin-right: 4px; }

/* Icon-Buttons */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--rule-2); border-radius: 2px; background: var(--white); color: var(--ink-2); cursor: pointer; vertical-align: middle; -webkit-appearance: none; appearance: none; transition: border-color .15s, color .15s; }
.icon-btn svg { stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.icon-btn-warning { color: var(--warn); }
.icon-btn-warning:hover { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.icon-btn-danger { color: var(--red); }
.icon-btn-danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.icon-btn:disabled, .icon-btn:disabled:hover { opacity: .4; cursor: not-allowed; border-color: var(--rule-2); background: var(--white); }
.demo-readonly .icon-btn:disabled { opacity: 1; }
.quiz-lock-info { margin-top: 6px; }
.quiz-lock-info small { display: block; color: var(--warn); white-space: nowrap; }
.quiz-lock-info form { margin-top: 4px; }
.quiz-lock-info .btn-small { white-space: nowrap; }

/* Karten und Abschnitte im Admin: Linien, keine Schatten */
.generate-card, .settings-section, .export-card, .certificates-section, .audit-filters {
    background: var(--white); border: 1px solid var(--rule); border-radius: 2px; padding: 22px 24px; margin-bottom: 22px;
}
.generate-card h2, .settings-section h2, .export-card h2, .certificates-section h2 { margin: 0 0 8px; font-size: 1.35rem; }
.card-desc, .settings-hint { color: var(--ink-2); margin-bottom: 18px; font-size: 0.95rem; }
.generate-form, .invite-form { margin-top: 6px; }
.settings-actions { margin: 4px 0 28px; }
.settings-test { background: var(--soft); }
.settings-test .form-row { align-items: flex-end; }
.settings-test .form-row .form-group { margin-bottom: 0; }
.settings-test #btn-test-mail { min-height: 48px; }

/* Reiter */
.tabs { display: flex; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tab-btn { padding: 10px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-size: 0.97rem; font-weight: 600; color: var(--mute); cursor: pointer; white-space: nowrap; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--navy); }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Einladen: Wege mit kurzer Erklärung (Konzept 27.10.2026) */
.invite-ways-intro { margin: 0 0 6px; color: var(--mute); }
.invite-ways { flex-wrap: wrap; gap: 4px 28px; }
.invite-ways .tab-btn { text-align: left; white-space: normal; }
.invite-ways .tab-btn small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--mute); }

/* Generierte Links */
.links-list { margin: 18px 0; border-top: 1px solid var(--rule); background: var(--white); }
.link-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.link-number { font-family: var(--serif); color: var(--mute); width: 2rem; text-align: right; flex-shrink: 0; }
.link-url { flex: 1; word-break: break-all; font-size: 0.84rem; background: transparent; padding: 0; }
.links-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.empty-state { color: var(--mute); padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* Gruppen und Personen */
.member-list { list-style: none; margin: 6px 0 14px; border-top: 1px solid var(--rule); }
.member-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.group-create { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.group-create .form-group { margin: 0; flex: 1 1 260px; }
.admin-group > p:first-child a, .admin-person > p:first-child a { font-size: 0.93rem; }

/* Export */
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 26px; }
.export-card { display: flex; flex-direction: column; margin-bottom: 0; }
.export-icon { color: var(--navy); margin-bottom: 12px; }
.export-card p { color: var(--ink-2); font-size: 0.93rem; margin: 0 0 12px; flex-grow: 1; }
.export-details { list-style: none; margin: 0 0 18px; font-size: 0.88rem; color: var(--ink-2); border-top: 1px solid var(--rule); }
.export-details li { padding: 6px 0 6px 18px; border-bottom: 1px solid var(--rule); position: relative; }
.export-details li::before { content: "–"; position: absolute; left: 2px; color: var(--mute); }
.export-card .btn { width: 100%; }
.export-card .btn + form, .export-card a.btn { margin-bottom: 8px; }

/* Audit-Log */
.admin-audit { max-width: 1400px; }
.audit-header { margin-bottom: 18px; }
.audit-header h1 { margin: 0 0 4px; }
.audit-subtitle { color: var(--mute); margin: 0; font-size: 0.93rem; }
.audit-filters { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 18px; }
.filter-form { flex-grow: 1; }
.filter-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.82rem; margin: 0; }
.filter-group select, .filter-group input { min-width: 150px; padding: 8px 10px; font-size: 0.9rem; }
.filter-actions { display: flex; gap: 8px; }
.export-action .btn { display: inline-flex; align-items: center; gap: 8px; }
.audit-table-wrapper { overflow-x: auto; }
.col-time { white-space: nowrap; }
.log-date { display: block; font-weight: 600; }
.log-time { display: block; font-size: 0.8rem; color: var(--mute); }
.action-badge { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 0.76rem; font-family: var(--mono); background: var(--soft); color: var(--ink-2); border-left: 2px solid var(--rule-2); }
.action-admin { border-left-color: var(--red); }
.action-module { border-left-color: var(--ok); }
.action-quiz { border-left-color: var(--navy); }
.action-certificate { border-left-color: var(--ok); background: var(--ok-soft); }
.action-otp { border-left-color: #6d5a8c; }
.action-invitation { border-left-color: var(--warn); }
.col-details { max-width: 320px; }
.details-code { display: block; font-size: 0.76rem; background: var(--paper); padding: 3px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.col-ip code { font-size: 0.8rem; color: var(--mute); background: none; }
.actor-admin { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 0.76rem; font-weight: 600; background: var(--navy); color: #fff; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }
.pagination-info { color: var(--mute); font-size: 0.9rem; }

/* KI-Richtlinie */
.admin-policy .policy-check { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 0 0 8px; line-height: 1.45; cursor: pointer; }
.admin-policy .policy-check input { margin-top: 3px; }
.policy-tools { display: grid; gap: 6px; margin-bottom: 6px; }
.policy-tools-head, .policy-tools-row { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 8px; }
.policy-tools-head { font-size: 0.84rem; font-weight: 600; color: var(--mute); }
.admin-policy textarea, .policy-tools-row input { width: 100%; }
.policy-more-tools > summary { cursor: pointer; color: var(--navy); font-weight: 600; margin: 6px 0; }
.policy-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.policy-actions-top { font-size: 0.92rem; color: var(--ink-2); }

/* Nachweis-Mappe (Vorschau) */
.doc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.doc-toolbar form { margin: 0; }
.doc-toolbar-hint { font-size: 0.92rem; color: var(--ink-2); }
.doc-legal { font-size: 0.86rem; color: var(--mute); margin: 0 0 16px; }
.doc-paper { background: var(--white); max-width: 820px; margin: 0 auto 32px; padding: 40px 48px; border: 1px solid var(--rule); border-top: 3px solid var(--navy); color: var(--ink); line-height: 1.55; font-size: 0.95rem; }
.doc-paper h1 { font-size: 1.9rem; margin: 0 0 4px; }
.doc-paper h2 { font-size: 1.3rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.doc-paper h3 { font-size: 1rem; margin: 18px 0 6px; }
.doc-paper p { margin: 0 0 10px; }
.doc-paper ul { margin: 0 0 12px 1.2rem; }
.doc-paper li { margin-bottom: 4px; }
.doc-sub, .doc-cover-sub { color: var(--mute); font-size: 1.05rem; margin-bottom: 16px !important; }
.doc-cover { padding: 28px 0 14px; }
.doc-cover h1 { font-size: 2.3rem; }
.doc-kv { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 6px 16px; margin: 0 0 16px; }
.doc-kv dt { font-weight: 600; color: var(--ink-2); }
.doc-kv dd { margin: 0; }
.doc-note { background: var(--soft); border-left: 2px solid var(--navy); padding: 11px 15px; margin: 8px 0 16px; font-size: 0.92rem; }
.doc-small { font-size: 0.82rem; color: var(--mute); }
.doc-table { font-size: 0.86rem; }
.doc-table td { vertical-align: top; }
.doc-signature { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 48px 0 16px; font-size: 0.86rem; color: var(--mute); }
.doc-signature span { display: block; border-top: 1px solid var(--ink-3); margin-bottom: 4px; }
.doc-pagebreak { border: 0; border-top: 1px dashed var(--rule-2); margin: 24px -48px; }

/* ============================================================
   RESPONSIV
   ============================================================ */
@media (max-width: 760px) {
    .audit-filters { flex-direction: column; align-items: stretch; }
    .filter-row { flex-direction: column; align-items: stretch; }
    .filter-group select, .filter-group input { width: 100%; }
    .export-action, .export-action .btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
    body { font-size: 17px; }
    .container { padding: 0 16px; }
    .site-main { padding: 24px 0 44px; }
    h1 { font-size: 1.95rem; }
    h2 { font-size: 1.45rem; }

    .header-inner { min-height: 0; padding-top: 14px; padding-bottom: 12px; align-items: flex-start; }
    .header-company { font-size: 1.3rem; }
    .header-meta { width: 100%; justify-content: space-between; font-size: 0.9rem; }
    .header-meta:empty { display: none; }
    .footer-inner { flex-direction: column; gap: 6px; }

    .btn { min-height: 48px; }
    .btn-small { min-height: 36px; }

    .welcome-card, .register-card, .auth-card, .login-card { padding: 24px 20px; }
    .register-card h1, .auth-card h1, .login-card h1, .welcome-card h1 { font-size: 1.75rem; }
    .pin-row { grid-template-columns: 1fr; }

    .dashboard-header h1 { font-size: 2.05rem; }
    .course-card { grid-template-columns: 1fr; }
    .course-card-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
    .course-card-title { font-size: 1.45rem; }
    .section-title { font-size: 1.3rem; margin-top: 32px; }
    .module-card { grid-template-columns: 38px 1fr; gap: 4px 12px; padding: 16px 0; }
    .module-number { font-size: 1.2rem; }
    .module-link { grid-column: 2; justify-self: start; margin-top: 8px; min-height: 44px; }
    .module-completed .module-link { border: 0; padding: 0; min-height: 36px; margin-top: 2px; text-decoration: underline; text-underline-offset: 4px; color: var(--navy); background: none; }
    .quiz-card { padding: 20px 18px 22px; }
    .quiz-card h2 { font-size: 1.45rem; }
    .quiz-actions .btn, .quiz-card > .btn { width: 100%; }

    .module-header h1 { font-size: 1.9rem; }
    .module-body { font-size: 1.06rem; line-height: 1.65; }
    .content-section h2 { font-size: 1.45rem; }
    .content-info, .content-warning { padding: 14px 16px 16px; }
    .content-example { padding-left: 16px; }
    .check-question { padding: 16px 16px 18px; margin-left: -4px; margin-right: -4px; }
    .lerneinheit-footer .btn, .module-footer .btn-large { width: 100%; }
    .lerneinheit-footer #le-prev { width: auto; }
    .module-footer form { align-items: stretch; }
    .module-nav-bottom .btn { flex: 1; }

    .quiz-header h1, .result-card h1 { font-size: 1.85rem; }
    .quiz-question { padding: 18px 16px 20px; }
    .quiz-nav { flex-direction: column-reverse; }
    .quiz-nav .btn { width: 100%; margin: 0 !important; }
    .result-card { padding: 22px 18px 24px; }
    .score-number { font-size: 2.8rem; }
    .cert-actions .btn { width: 100%; }
    .email-input-group { flex-direction: column; }

    .admin-body h1 { font-size: 1.75rem; }
    .admin-nav { gap: 2px 16px; width: 100%; }
    .admin-header .header-inner { flex-direction: row; flex-wrap: wrap; align-items: center; }
    /* Hamburger: Navigation eingeklappt, Knopf rechts neben dem Firmennamen */
    .admin-menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 12px; border: 1px solid var(--rule); background: var(--white); font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--ink); cursor: pointer; }
    .admin-menu-btn::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
    .admin-menu-btn[aria-expanded="true"]::before { content: "✕"; width: auto; height: auto; background: none; box-shadow: none; font-size: 0.9rem; line-height: 1; }
    .admin-header .admin-nav { display: none; flex-direction: column; gap: 0; width: 100%; border-top: 1px solid var(--rule); margin-top: 8px; }
    .admin-header.menu-open .admin-nav { display: flex; }
    .admin-header .admin-nav a { padding: 10px 0; border-bottom: 1px solid var(--rule); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card { min-width: 0; overflow-wrap: anywhere; }
    .stat-number { font-size: 1.7rem; }
    .form-row { flex-direction: column; align-items: stretch; }
    .form-grid { grid-template-columns: 1fr; }
    .checkbox-group, .course-checks { flex-direction: column; gap: 10px; }
    /* Kurswechsel umbrechen statt seitlich scrollen (WCAG 1.4.10 Reflow) */
    .admin-course-switch .container { flex-wrap: wrap; gap: 0 14px; }
    .generate-card, .settings-section, .export-card, .certificates-section { padding: 18px 16px; }

    .participants-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .participant-filters { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; min-width: 0; }
    .participant-filters .filter-input { grid-column: 1 / -1; min-width: 0; font-size: 1rem; }
    .participant-filters .filter-select { min-width: 0; width: 100%; font-size: 0.95rem; }
    .participant-filters #filter-reset { min-height: 38px; }
    .participant-filters .filter-count { align-self: center; }

    /* Mobil: Tabellenzeilen als Blöcke statt horizontalem Scrollen */
    .table-stack { border: 0; background: transparent; }
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { background: var(--white); border: 1px solid var(--rule); padding: 6px 0; margin-bottom: 10px; }
    .table-stack td { position: relative; padding: 6px 14px 6px calc(14px + 7.5rem); border: none; overflow-wrap: anywhere; min-height: 34px; }
    .table-stack td::before { content: attr(data-label); position: absolute; left: 14px; top: 9px; width: 7rem; font-size: 0.72rem; font-weight: 600; line-height: 1.3; color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; }
    .table-stack td.actions-cell { white-space: normal; }

    .policy-tools-head { display: none; }
    .policy-tools-row { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
    .doc-paper { padding: 20px 16px; }
    .doc-kv { grid-template-columns: 1fr; gap: 2px; }
    .doc-kv dd { margin-bottom: 6px; }
    .doc-pagebreak { margin: 24px -16px; }
    .doc-signature { grid-template-columns: 1fr; }
    .back-to-top { bottom: 16px; right: 16px; }
}

@media print {
    .site-header, .site-footer, .scroll-progress, .back-to-top, .admin-course-switch { display: none !important; }
    body { background: #fff; }
}

/* Aktionsmenü je Zeile (Kurse zuordnen, Mehrfachauswahl) */
.row-menu { position: relative; display: inline-block; vertical-align: middle; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary::after { content: " ▾"; font-size: 0.8em; }
.row-menu[open] > summary::after { content: " ▴"; }
.row-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; background: #fff; border: 1px solid var(--ink, #1b1d22); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; box-shadow: 0 12px 28px -18px rgba(0,0,0,.35); }
.row-menu-panel label { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; white-space: nowrap; }
.row-menu-panel small { color: var(--mute, #5f6670); font-size: 0.8rem; }
.row-menu-panel .btn { align-self: flex-start; }
@media (max-width: 760px) { .row-menu-panel { position: static; min-width: 0; margin-top: 6px; box-shadow: none; } }
/* Personen: Zusammenfassung und Filter (Konzept 27.10.2026) */
.person-summary p { margin: 0 0 8px; }
.person-summary .progress-bar { margin: 0 0 8px; max-width: 420px; }
.person-summary .reminder-line { margin: 0; padding: 0; border: 0; background: none; }
.filter-box { margin: 0 0 18px; }
.filter-box > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; align-items: end; margin-top: 8px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-field label { font-size: 0.85rem; font-weight: 600; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
/* Personenliste: Gruppe, Abteilung, Datum als eine ruhige Zeile unter dem Namen */
.person-meta { display: block; margin-top: 2px; font-size: 0.82rem; line-height: 1.4; color: var(--mute); }
/* Personen über alle Kurse: Stand je Kurs */
.course-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 0.9rem; }
.course-status-name { display: inline-block; min-width: 7.5rem; font-weight: 600; }
.text-success { color: var(--ok); }
.person-hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--mute); }
/* Personenliste: Dropdowns dürfen über die Tabelle hinausragen (Desktop passt ohne Querscrollen) */
@media (min-width: 761px) {
    .participants-wrapper { overflow: visible; }
    .participants-wrapper .actions-cell { white-space: nowrap; }
}
/* Aktionen in der Teilnehmertabelle: zweizeilig statt Überbreite */
@media (min-width: 761px) {
    #participants-table td.actions-cell { white-space: normal; width: 222px; min-width: 222px; }
    #participants-table td.actions-cell > * { margin: 2px 0; }
}
@media (min-width: 761px) {
    #participants-table th, #participants-table td { padding-left: 10px; padding-right: 10px; }
}
.group-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.group-filter label { font-weight: 600; font-size: 0.9rem; }
.group-filter select, .export-group-select { min-width: 220px; max-width: 100%; margin-bottom: 8px; }
.reminder-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--rule, #dedad2); background: #fff; font-size: 0.95rem; }
.group-course { margin-top: 28px; }
.group-course h3 { font-family: var(--serif, "Newsreader", Georgia, serif); font-size: 1.35rem; font-weight: 500; margin-bottom: 4px; }
.group-course .meta { color: var(--mute, #5f6670); font-size: 0.9rem; margin-bottom: 10px; }
.group-course .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.group-course .actions form { display: inline; }

/* Support-Hinweis im Admin-Bereich */
.admin-support { margin: 32px 0 8px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--mute); }

/* Admin Übersicht und Kurse & Plätze (Konzept 27.10.2026) */
.admin-next h2 { margin-top: 0; }
.export-card-wide { grid-column: 1 / -1; }
.settings-jump { margin: -6px 0 18px; font-size: 0.92rem; color: var(--mute); }
.admin-next ul, .admin-list { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.admin-next li + li, .admin-list li + li { margin-top: 0.35rem; }

/* Admin „Einführung“: Vorlagen */
.intro-template { margin: 0 0 16px; padding: 14px 18px; }
.intro-template > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.intro-note { margin: 12px 0 8px; font-size: 0.85rem; color: var(--mute); }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.intro-copied { font-size: 0.85rem; color: var(--ok); }
.intro-body { border-top: 1px solid var(--rule); padding-top: 12px; font-size: 0.95rem; line-height: 1.55; overflow-wrap: anywhere; }
.intro-body h2 { font-size: 1.15rem; } .intro-body h3 { font-size: 1.02rem; }

/* Kursweiter Hinweis aus kurs.json "hinweis" (dezent am Kursanfang) */
.course-note { font-size: 0.85rem; color: var(--mute); margin-top: 6px; }

/* Hinweis vor automatischer Abmeldung (session-timeout.js) */
.session-dialog { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.session-dialog[hidden] { display: none; }
.session-dialog-box { background: #fff; color: #1f2937; max-width: 420px; width: 100%; border-radius: 8px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.session-dialog-box h2 { margin-top: 0; }

/* Lange Adressen umbrechen statt seitlich überlaufen (WCAG 1.4.10) */
.info-box, .alert, .card-desc, .form-hint, .register-note { overflow-wrap: anywhere; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
