/* Schulungsplattform – Erscheinungsbild in den Hausfarben (ab 1.3.0):
   Blau #1D2A64 (Grundfarbe), Rot #C83C48 (Akzent), Schwarz. Abstufungen 80/60/40/20 % wie in der Farbtafel.
   Eigene Gestaltung, keine externen Schriften, kein CDN, keine Inline-Skripte.
   Farben als Variablen; hell/dunkel über [data-theme] und prefers-color-scheme (auto). */
:root {
  --blue: #1d2a64; --blue-80: #4a5583; --blue-60: #777fa2; --blue-40: #a5aac1; --blue-20: #d2d4e0;
  --red: #c83c48; --red-80: #d3636d; --red-60: #de8a91; --red-40: #e9b1b6; --red-20: #f4d8da;
  --bg: #f3f4f8; --bg-2: #e9ebf3; --surface: #ffffff; --surface-2: #f2f3f8; --line: #e0e3ee; --line-2: #c9cede;
  --text: #0c0e18; --muted: #515870; --faint: #8a90a4;
  --brand: #1d2a64; --brand-2: #2d3f8f; --brand-ink: #ffffff; --brand-soft: #e7e9f4; --brand-deep: #121a44;
  --accent: #c83c48; --accent-2: #b3313d; --accent-ink: #ffffff; --accent-soft: #fbe9eb;
  --ok: #157a52; --ok-soft: #e0f3ea; --warn: #8f5600; --warn-soft: #fcf0da; --bad: #b42b37; --bad-soft: #fbe5e7;
  --focus: #3d52b8;
  --shadow-sm: 0 1px 2px rgba(18, 26, 68, .06);
  --shadow: 0 1px 2px rgba(18, 26, 68, .05), 0 12px 32px -20px rgba(18, 26, 68, .32);
  --shadow-lg: 0 28px 64px -30px rgba(18, 26, 68, .5);
  --radius: 16px; --radius-sm: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --side-w: 264px;
  --side-bg: linear-gradient(180deg, #1d2a64 0%, #151f4d 100%); --side-ink: #d5d9ea; --side-muted: #a2a9c8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215; --bg-2: #17181c; --surface: #1b1c21; --surface-2: #22242a; --line: #2d2f37; --line-2: #3a3d47;
    --text: #eceef4; --muted: #a4a9ba; --faint: #747a8c;
    --brand: #8d9cf0; --brand-2: #aab5f5; --brand-ink: #0b1030; --brand-soft: #1f2545; --brand-deep: #0b1030;
    --accent: #e3616c; --accent-2: #ec7d87; --accent-ink: #ffffff; --accent-soft: #3a1b20;
    --ok: #5fcf9c; --ok-soft: #12322a; --warn: #edc06a; --warn-soft: #36290f; --bad: #f08a92; --bad-soft: #3b171c;
    --focus: #aab5f5; --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.7);
    --side-bg: linear-gradient(180deg, #161a30 0%, #0f1120 100%); --side-ink: #cfd3e6; --side-muted: #8e95b3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111215; --bg-2: #17181c; --surface: #1b1c21; --surface-2: #22242a; --line: #2d2f37; --line-2: #3a3d47;
  --text: #eceef4; --muted: #a4a9ba; --faint: #747a8c;
  --brand: #8d9cf0; --brand-2: #aab5f5; --brand-ink: #0b1030; --brand-soft: #1f2545; --brand-deep: #0b1030;
  --accent: #e3616c; --accent-2: #ec7d87; --accent-ink: #ffffff; --accent-soft: #3a1b20;
  --ok: #5fcf9c; --ok-soft: #12322a; --warn: #edc06a; --warn-soft: #36290f; --bad: #f08a92; --bad-soft: #3b171c;
  --focus: #aab5f5; --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.7);
  --side-bg: linear-gradient(180deg, #161a30 0%, #0f1120 100%); --side-ink: #cfd3e6; --side-muted: #8e95b3;
  color-scheme: dark;
}

/* ------------------------------------------------------------ Grundlagen */
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--font); min-height: 100vh;
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
body.site { background: radial-gradient(1100px 480px at 90% -140px, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%), var(--bg); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: 1.85rem; line-height: 1.2; margin: .2rem 0 1rem; font-weight: 700; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 .7rem; font-weight: 650; }
h3 { font-size: 1.04rem; margin: 1.2rem 0 .45rem; font-weight: 650; }
p { margin: .4rem 0 .85rem; }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; }
pre { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: .85rem 1rem;
  border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap; font-size: .86rem; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; vertical-align: -.2em; }

/* ------------------------------------------------------------ Kopf (Mitarbeitende) */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: .6rem 1.2rem; display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--text); text-decoration: none;
  font-size: 1.05rem; font-family: var(--font-display); }
.brand:hover { color: var(--text); }
.mark { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue), #2d3f8f); position: relative; box-shadow: var(--shadow-sm); flex: none; }
.mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); }
.mark .ic { stroke-width: 3; }
.brand img { max-height: 40px; max-width: 190px; display: block; }
.brand .brand-sep { width: 1px; align-self: stretch; background: var(--line-2); margin: .2rem .15rem; }
.logo-plate { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px;
  padding: .3rem .55rem; box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .top .logo-plate { box-shadow: none; }
/* Markenleiste: Blau mit rotem Abschluss – die Hausfarben als durchgehendes Erkennungszeichen */
.brandbar { height: 4px; background: linear-gradient(90deg, var(--blue) 0 72%, var(--red) 72% 100%); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 10px;
  text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 550; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.switches { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; }
.seg form { margin: 0; display: contents; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: .28rem .7rem; font: inherit;
  font-size: .85rem; font-weight: 550; cursor: pointer; border-radius: 999px; line-height: 1.4; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(18,26,68,.18); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--text); }
.seg button.ico { display: inline-grid; place-items: center; padding: .3rem .5rem; }
.nav a { white-space: nowrap; }
.logout .btn { gap: .35rem; }

.devband { background: repeating-linear-gradient(45deg, #b3261e, #b3261e 14px, #a11f18 14px, #a11f18 28px); color: #fff;
  text-align: center; padding: .3rem; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.maintband { display: flex; gap: .5rem; align-items: center; justify-content: center; background: var(--warn-soft);
  color: var(--warn); padding: .45rem 1rem; font-weight: 600; font-size: .92rem; border-bottom: 1px solid var(--line); }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.8rem 1.2rem 3.5rem; }
main.narrow { max-width: 720px; }
.foot { color: var(--faint); font-size: .85rem; }
.foot .in { max-width: 1180px; margin: 0 auto; padding: 1rem 1.2rem 1.4rem; display: flex; gap: 1.3rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

/* ------------------------------------------------------------ Administration: Seitenleiste */
body.admin { background: var(--bg); }
body.with-side { padding-left: var(--side-w); }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30; display: flex; flex-direction: column;
  background: var(--side-bg); color: var(--side-ink); padding: 1rem .8rem;
  border-right: 1px solid rgba(255,255,255,.05); }
.side::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--red) 0 22%, transparent 22%); }
.side-brand { display: flex; align-items: center; gap: .7rem; padding: .3rem .5rem 1.1rem; color: #fff; text-decoration: none; }
.side-brand:hover { color: #fff; }
.side-brand b { display: block; font-size: 1rem; line-height: 1.2; font-family: var(--font-display); }
.side-brand small { display: block; color: var(--side-muted); font-size: .78rem; }
.side-logo { display: block; background: #fff; border-radius: 12px; padding: .55rem .7rem; margin: 0 .2rem .4rem; text-align: center; }
.side-logo img { max-width: 100%; max-height: 52px; display: inline-block; vertical-align: middle; }
.side .mark { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.side .mark::after { border-color: var(--blue); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-nav a { position: relative; display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem;
  border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 550; font-size: .95rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -.8rem; top: 22%; bottom: 22%; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--accent); }
.side-nav a[aria-current="page"] .ic { color: #ff9aa3; }
.side-nav .side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--side-muted); padding: .9rem .75rem .3rem; font-weight: 700; }
.side-sep { height: 1px; background: rgba(255,255,255,.08); margin: .6rem .4rem; }
.side-foot { display: flex; align-items: center; gap: .4rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: .8rem; }
.side-user { flex: 1; display: flex; align-items: center; gap: .6rem; color: #eef0f8; text-decoration: none; padding: .45rem .5rem;
  border-radius: 10px; min-width: 0; }
.side-user:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-user span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.side-user small { display: block; color: var(--side-muted); font-weight: 400; font-size: .78rem; }
.side-logout { background: transparent; border: 0; color: var(--side-ink); padding: .55rem; border-radius: 10px; cursor: pointer; display: grid; }
.side-logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.shell { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 1rem; padding: .65rem 1.6rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body.admin main { max-width: 1240px; padding: 1.6rem 1.6rem 3rem; }
body.admin .foot .in { max-width: 1240px; padding: 1rem 1.6rem 1.4rem; }

/* ------------------------------------------------------------ Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.pad-lg { padding: 2.1rem; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card-head { display: flex; align-items: center; gap: .7rem; margin: -.1rem 0 1rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .ic-bubble { margin-right: .1rem; }
.ic-bubble { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand); }
.ic-bubble.accent { background: var(--accent-soft); color: var(--accent); }
.grid { display: grid; gap: 1.1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack > * + * { margin-top: .8rem; }
.pagehead { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin: 0 0 1.2rem; }
.pagehead h1 { margin: 0; }
.pagehead .lead { color: var(--muted); margin: .25rem 0 0; max-width: 70ch; }
.pagehead .actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--brand-2); margin: 0 0 .25rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1.15rem; border-radius: 11px; font: inherit;
  font-weight: 650; cursor: pointer; text-decoration: none; min-height: 42px; line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, var(--shadow-sm); transition: background .15s, transform .05s, box-shadow .15s; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--brand-ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.cta { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.cta:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.secondary { background: var(--surface); color: var(--brand); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); font-weight: 550; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(1.06); background: var(--bad); }
.btn.small { padding: .32rem .75rem; min-height: 34px; font-size: .88rem; border-radius: 9px; }
.btn.big { padding: .85rem 1.6rem; font-size: 1.05rem; min-height: 50px; border-radius: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; margin: 0; }

label { display: block; font-weight: 600; margin: .9rem 0 .35rem; font-size: .95rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; margin: .4rem 0; }
.hint { color: var(--muted); font-size: .88rem; margin: .15rem 0 .45rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface);
  color: var(--text); font: inherit; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-2)); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 22%, transparent); }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--brand); flex: none; }
input[type=file] { font: inherit; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem 1.1rem; margin: 1rem 0; }
legend { font-weight: 700; padding: 0 .4rem; }
.field-error { color: var(--bad); font-size: .9rem; margin-top: .25rem; }

.code-input { font-family: var(--mono); font-size: 1.65rem; letter-spacing: .16em; text-align: center; max-width: 24rem;
  padding: .85rem 1rem !important; border-radius: 14px !important; }

.alert { display: block; border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.info { background: var(--brand-soft); color: var(--text); border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.alert strong { display: block; }
.rp-balken { border-left-width: 6px; border-left-color: currentColor; }
.rp-balken .kv { color: var(--text); }
.passkey-box .btn { display: inline-flex; align-items: center; gap: .4rem; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .6rem; border-radius: 999px; font-size: .78rem;
  font-weight: 650; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: .85rem; color: var(--text); }

table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; font-size: .93rem; box-shadow: var(--shadow-sm); }
table.list th, table.list td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--surface-2); font-size: .76rem; color: var(--muted); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; }
table.list tbody tr:hover td { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list a { font-weight: 600; text-decoration: none; }
table.list a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ------------------------------------------------------------ Fortschritt */
.progress { display: flex; align-items: center; gap: .8rem; }
.progress .bar { flex: 1; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line); }
.progress .bar > span { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.progress .pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 5.2rem; text-align: right; }
.stickyprog { position: sticky; top: 57px; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); padding: .7rem 0 .8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }

/* ------------------------------------------------------------ Mitarbeitende: Anmeldung, Übersicht */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; border-radius: 24px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); margin-top: 1rem; }
.hero-art { position: relative; padding: 2.6rem 2.4rem; color: #fff; min-height: 420px; display: flex; flex-direction: column;
  justify-content: flex-end; background:
    radial-gradient(520px 280px at 115% -5%, rgba(200,60,72,.55), transparent 62%),
    radial-gradient(460px 320px at -15% 115%, rgba(74,85,131,.75), transparent 62%),
    linear-gradient(150deg, #1d2a64, #121a44); }
.hero-art::before { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.2px); background-size: 22px 22px; }
.hero-art > * { position: relative; }
.hero-art h2 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 .7rem; }
.hero-art p { color: #d6dbef; margin: 0 0 1.2rem; max-width: 34ch; }
.hero-art .points { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.hero-art .points li { display: flex; gap: .55rem; align-items: center; color: #eceffa; font-size: .95rem; }
.hero-art .hero-logo { margin: 0 0 auto; align-self: flex-start; }
.hero-art .hero-logo img { max-height: 54px; max-width: 220px; display: block; }
.hero-art .points .ic { color: #ff9aa3; }
.hero-form { padding: 2.6rem 2.4rem; display: flex; flex-direction: column; justify-content: center; }
.hero-form h1 { font-size: 1.7rem; }
.tcard { display: grid; gap: .7rem; position: relative; overflow: hidden; }
.tcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--blue) 0 72%, var(--red) 72%); }
.tcard.done::before { background: var(--ok); }
.tcard.due::before { background: var(--accent); }
.tcard h2 { margin: 0; font-size: 1.2rem; }
.meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.welcome { display: flex; align-items: center; gap: 1rem; margin: .2rem 0 1.4rem; }
.welcome .avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 700;
  font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); flex: none; }
.welcome h1 { margin: 0; }
.welcome p { margin: 0; color: var(--muted); }

/* Folien */
.slide { margin: 0 0 1rem; }
.slide img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow); }
details.slidetext { margin: .4rem 0 1rem; }
details.slidetext summary { cursor: pointer; color: var(--muted); font-size: .92rem; }

/* Fragen */
.q-text { font-size: 1.2rem; font-weight: 650; margin: .2rem 0 1rem; white-space: pre-line; }
.options { display: grid; gap: .65rem; margin: 0; padding: 0; border: 0; }
.option { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1.05rem; border: 2px solid var(--line);
  border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 500; margin: 0; transition: border-color .12s, background .12s; }
.option:hover { border-color: color-mix(in srgb, var(--brand-2) 55%, var(--line)); }
.option:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); }
.option:has(input:disabled) { cursor: default; }
.feedback { border-radius: 14px; padding: 1rem 1.15rem; margin: 1rem 0; }
.feedback.right { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.feedback.wrong { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.feedback h3 { margin: 0 0 .3rem; }
.savestate { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.savestate[data-state="saved"] { color: var(--ok); }
.savestate[data-state="error"] { color: var(--bad); font-weight: 600; }
.stepnav { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 1.4rem; }
fieldset.card > legend.q-text { float: left; width: 100%; padding: 0; margin: 0 0 .7rem; font-size: 1.25rem; line-height: 1.35; }
fieldset.card > legend.q-text + * { clear: both; }

/* ------------------------------------------------------------ Administration: Bausteine */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: .7rem 0 1.1rem; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .85rem 1rem;
  box-shadow: var(--shadow-sm); overflow: hidden; }
.stat b { display: block; font-size: 1.65rem; line-height: 1.15; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.stat span { color: var(--muted); font-size: .84rem; }
.stat.hl { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); border-color: transparent; }
.stat.hl span { color: var(--brand-ink); opacity: .82; }
.stat.accent b { color: var(--accent); }
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; margin: .4rem 0 1.1rem; padding: .9rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.toolbar label { margin: 0 0 .25rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.toolbar > div { min-width: 150px; flex: 1; }
.toolbar > div:last-child { flex: 0; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1.2rem; padding: 4px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 13px; width: fit-content; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-weight: 600; font-size: .9rem; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(18,26,68,.16); }
.steprow { display: grid; grid-template-columns: 3rem 1fr auto; gap: .8rem; align-items: start; }
.steprow .pos { font-weight: 700; font-size: 1.1rem; color: var(--muted); }
.thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.thumbs img { height: 70px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.mailpreview { background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; white-space: pre-wrap; font-size: .9rem; }
.mailframe { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 14px; background: #eef0f6; display: block; }
.issues li { margin: .2rem 0; }
.kv { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: .4rem 1.2rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; }
.qr img { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 12px; }
.codes { font-family: var(--mono); font-size: 1.1rem; columns: 2; }
/* ------------------------------------------------------------ Hilfe */
.help { max-width: 880px; min-width: 0; }
.help-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; }
.help-toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: .9rem; font-size: .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.help-toc .help-filter { min-height: 38px; padding: .45rem .7rem; margin-bottom: .6rem; font-size: .9rem; }
.help-toc-group + .help-toc-group { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.help-toc-cat { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--text); text-decoration: none; padding: .2rem .3rem; }
.help-toc-cat .ic { color: var(--accent); }
.help-toc ul { list-style: none; margin: .15rem 0 0; padding: 0 0 0 1.6rem; }
.help-toc li a { display: block; padding: .14rem .3rem; color: var(--muted); text-decoration: none; border-radius: 6px; }
.help-toc li a:hover, .help-toc li a.on { color: var(--brand); background: var(--brand-soft); }
.help-cat { margin: 0 0 2.2rem; scroll-margin-top: 80px; }
.help-cat-head { display: flex; gap: .9rem; align-items: center; padding: 0 0 .7rem; margin-bottom: .4rem; border-bottom: 2px solid var(--line); position: relative; }
.help-cat-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: var(--accent); }
.help-cat-head h2 { margin: 0; font-size: 1.4rem; }
.help-cat-head p { margin: .1rem 0 0; }
.help-topic { padding: .2rem 0 .4rem; }
.help-topic h3 { font-size: 1.08rem; margin: 1.3rem 0 .4rem; scroll-margin-top: 80px; }
.help-topic h3:target { color: var(--accent); }
.help h2[id], .help h3[id] { scroll-margin-top: 80px; }
.help-current { margin-bottom: 2rem; }
.cur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .8rem; }
.cur-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem; }
.cur-box h4 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: .9rem; color: var(--brand); }
.help-einst { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: .6rem .85rem; margin: .8rem 0; max-width: 40rem; }
.help-einst-kopf { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; font-size: .85rem; font-weight: 650; color: var(--brand); margin-bottom: .35rem; }
[data-einst].geaendert { background: color-mix(in srgb, var(--brand) 18%, transparent); border-radius: 4px; transition: background .6s; }
.cur-box .more { display: inline-block; margin-top: .45rem; font-size: .85rem; font-weight: 600; }
.kv.tight { gap: .3rem .8rem; font-size: .88rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.kv.tight dd { text-align: right; }
.kv.tight dt, .kv.tight dd { padding-bottom: .3rem; border-bottom: 1px dashed var(--line); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.facts li { display: flex; gap: .65rem; align-items: flex-start; }
.facts .ic { color: var(--accent); margin-top: .2rem; }
.help-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; font-weight: 600; color: var(--brand);
  text-decoration: none; padding: .3rem .7rem; border-radius: 999px; background: var(--brand-soft); }
.help-chip:hover { text-decoration: none; filter: brightness(.97); }
table.list.compact th, table.list.compact td { padding: .45rem .7rem; }
@media (max-width: 1000px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; max-height: none; }
}

/* Nachweise */
.records { margin-top: 2rem; }
.records h2 { display: flex; align-items: center; gap: .5rem; }
.reclist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.reclist li { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: .75rem 1rem; box-shadow: var(--shadow-sm); }
.reclist .grow { flex: 1; min-width: 0; }
.ic-bubble.ok { background: var(--ok-soft); color: var(--ok); }
details.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
details.danger-zone summary { cursor: pointer; color: var(--bad); }
code.wrap { word-break: break-all; white-space: normal; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.hidden { display: none !important; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty .ic-bubble { width: 52px; height: 52px; border-radius: 16px; margin-bottom: .6rem; }

/* Versandweg-Wahl (Kacheln) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin: .4rem 0 1.2rem; }
.tile { position: relative; display: grid; gap: .3rem; padding: 1rem 1.1rem 1rem 3.1rem; border: 2px solid var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; margin: 0; font-weight: 400; transition: border-color .12s, background .12s; }
.tile:hover { border-color: color-mix(in srgb, var(--brand-2) 55%, var(--line)); }
.tile input { position: absolute; left: 1.1rem; top: 1.15rem; }
.tile b { font-size: 1rem; }
.tile span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tile:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 15%, transparent); }
.tile .ic { position: absolute; right: 1rem; top: 1rem; color: var(--brand-2); opacity: .8; }
[data-weg-box][hidden] { display: none; }

/* Platzhalter-Legende */
.ph-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.ph-list li { display: flex; gap: .6rem; align-items: baseline; font-size: .9rem; }
.ph-list button { font-family: var(--mono); font-size: .82rem; padding: .18rem .5rem; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--brand); cursor: pointer; white-space: nowrap; }
.ph-list button:hover { border-color: var(--brand); background: var(--brand-soft); }
.ph-list span { color: var(--muted); }

/* Messbalken (Drossel) */
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); margin: .3rem 0 .2rem; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.meter.high > span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Versionsverlauf */
.timeline { position: relative; margin: 0; padding: 0 0 0 1.6rem; list-style: none; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.timeline > li { position: relative; margin: 0 0 1.1rem; }
.timeline > li::before { content: ""; position: absolute; left: -1.47rem; top: 1.45rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand-2); }
.timeline > li.current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.vhead { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.vhead h2 { margin: 0; font-size: 1.25rem; }
.vsec { margin-top: .9rem; }
.vsec h3 { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .4rem; }
.vsec ul { margin: 0; padding-left: 1.2rem; }
.vsec li { margin: .3rem 0; }
.vsec.added h3 { color: var(--ok); } .vsec.changed h3 { color: var(--brand-2); } .vsec.fixed h3 { color: var(--accent); }
.vsec.removed h3 { color: var(--bad); }

/* Code-Liste (Bildschirm) */
.codegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.codecard { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: var(--surface); }
.codecard .c { font-family: var(--mono); font-size: 1.45rem; font-weight: 700; letter-spacing: .08em; color: var(--brand);
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: .35rem .7rem; margin: .4rem 0; }

/* ------------------------------------------------------------ Responsiv */
@media (max-width: 1000px) {
  body.with-side { padding-left: 0; }
  .side { position: sticky; top: 0; width: auto; inset: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: .55rem .8rem; gap: .4rem; }
  .side-brand { padding: .2rem .4rem; }
  .side-brand small { display: none; }
  .side-nav { flex: 1 0 100%; flex-direction: row; overflow-x: auto; order: 3; padding-bottom: .2rem; }
  .side-nav a { white-space: nowrap; padding: .45rem .65rem; }
  .side-nav a[aria-current="page"]::before { left: 15%; right: 15%; top: auto; bottom: -2px; width: auto; height: 3px; border-radius: 3px; }
  .side-sep { display: none; }
  .side-foot { border: 0; padding: 0; margin-left: auto; order: 2; }
  .side-user small { display: none; }
  .topbar { position: static; padding: .55rem 1rem; }
  .grid.side-r { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; padding: 1.8rem 1.6rem; }
}
@media (max-width: 640px) {
  .top-in { gap: .5rem; padding: .55rem .9rem; }
  .top-in .brand { flex: 1; order: 1; }
  .top-in > form.inline { order: 2; }
  .top-in .nav { order: 3; flex: 0 0 100%; }
  .switches { order: 4; margin-left: 0; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: .4rem; }
  .switches .seg button { padding: .26rem .55rem; font-size: .82rem; }
  .logout .btn span { display: none; }
  main, body.admin main { padding: 1.2rem .9rem 2.5rem; }
  h1 { font-size: 1.55rem; }
  .steprow { grid-template-columns: 2rem 1fr; }
  .steprow > :last-child { grid-column: 1 / -1; }
  .card { padding: 1.1rem; }
  .card.pad-lg, .hero-form { padding: 1.4rem; }
  .codes { columns: 1; }
  .stickyprog { top: 0; }
  .side-user span { display: none; }
}
@media print {
  .top, .side, .topbar, .foot, .switches, .noprint { display: none !important; }
  body, body.with-side { background: #fff; color: #000; padding: 0; }
  .card, .codecard { box-shadow: none; border-color: #999; break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) {
  .progress .bar > span { transition: width .35s ease; }
}
.seg a.segl { color: var(--muted); padding: .28rem .8rem; border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 600; }
.seg a.segl[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(18,26,68,.16); }

/* ---- 2.0: Hell/Dunkel-Knopf, Feedback, Meldungen (gleich in allen drei Anwendungen) ---- */
.switches > form { margin: 0; }
.theme-btn { width: 2.1rem; height: 2.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.theme-btn:hover { border-color: var(--brand, currentColor); }
.tabs-help { margin-left: auto; font-weight: 600; }
.meldung.fehler { border-left: 4px solid var(--bad, #b42318); } .meldung.idee { border-left: 4px solid var(--brand, #1d2a64); }
.melder-btn { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); border-radius: 999px; padding: .45rem .95rem; font: inherit; font-size: .85rem; cursor: pointer;
  box-shadow: 0 4px 18px rgba(18,26,68,.16); }
.melder-box { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 61; width: min(25rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.melder-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.melder-zu { background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.melder-box input[type="text"], .melder-box textarea { width: 100%; margin-bottom: .5rem; }
.melder-pfad { margin: .1rem 0 .6rem; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.melder-bild { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.melder-hinweis { font-size: .78rem; color: var(--muted); }
.melder-fuss { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; }
.fb-art { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.fb-art-knopf { position: relative; cursor: pointer; }
.fb-art-knopf input { position: absolute; opacity: 0; width: 0; height: 0; }
.fb-art-inhalt { display: block; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; }
.fb-art-knopf input:focus-visible + .fb-art-inhalt { outline: 3px solid var(--focus, #2f6fed); }
.fb-art-knopf input:checked + .fb-art-inhalt { border-color: var(--brand, #1d2a64); background: var(--surface-2); }
.fb-art-fehler input:checked + .fb-art-inhalt { border-color: var(--bad, #b42318); }
.fb-art-wort { font-weight: 700; }
.fb-zeile { display: flex; align-items: center; gap: .6rem; } .fb-zeile .melder-pfad { flex: 1; min-width: 0; }
.fb-bilder { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .6rem; }
.fb-kachel { position: relative; margin: 0; width: 6.4rem; }
.fb-kachel img { width: 100%; height: 4.2rem; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; display: block; }
.fb-kachel figcaption { font-size: .7rem; color: var(--muted); text-align: center; }
.fb-kachel-weg { position: absolute; top: -.35rem; right: -.35rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; line-height: 1; }
/* Hilfe: Gliederung, Inhaltsverzeichnis und Suche stehen oben im Abschnitt „Hilfe“ (ab 2.2.0) */
.help-konsole { font-size: .78rem; font-weight: 600; margin-left: .5rem; white-space: nowrap; text-decoration: none; }
.hint .hilfe-mini { font-weight: 600; white-space: nowrap; }
@media print { .melder-btn, .melder-box, .help-toc { display: none !important; } }
