:root {
  --primary: #1f6f5c;
  --primary-dark: #17574a;
  --primary-soft: #e3f1ec;
  --accent: #f2b632;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --text: #1f2a28;
  --muted: #66736f;
  --border: #dfe4e1;
  --danger: #b4372f;
  --danger-soft: #fbe9e7;
  --success: #2e7d32;
  --success-soft: #e6f4e7;
  --warning-soft: #fff5d6;
  --info-soft: #e7f0fb;
  --on-primary: #ffffff;
  --brand: #1f6f5c;
  --on-brand: #ffffff;
  --on-accent: #17574a;
  --input-bg: #ffffff;
  --input-border: #c9d1cd;
  --table-head: #fafbfa;
  --row-hover: #f8faf9;
  --row-highlight: #fffaea;
  --gold-bg: #fdf0c8;
  --gold-text: #6b4d00;
  --red-bg: #fde2e1;
  --red-text: #8b1e17;
  --alert-success-border: #c4e3c6;
  --alert-error-border: #f1c4bf;
  --alert-info-border: #c9dcf3;
  --alert-warning-border: #f2df9c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 35, .06), 0 2px 8px rgba(20, 40, 35, .04);
  --sidebar: 236px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Dunkles Design: explizit gewählt oder automatisch nach Geräteeinstellung ---- */
:root[data-theme="dunkel"] {
  --primary: #4fb79c; --primary-dark: #7fd3bc; --primary-soft: #1d3a33; --accent: #f2b632;
  --bg: #121715; --surface: #1b2220; --text: #e3ebe8; --muted: #9aa8a3; --border: #2e3936;
  --danger: #ef7d73; --danger-soft: #3a1f1d; --success: #6fcf76; --success-soft: #1c3320;
  --warning-soft: #3a3118; --info-soft: #1b2a3b; --on-primary: #0f1513;
  --input-bg: #141a18; --input-border: #3a4643; --table-head: #1f2826; --row-hover: #222c29; --row-highlight: #33301c;
  --gold-bg: #3f3415; --gold-text: #f4d27a; --red-bg: #43211e; --red-text: #f3a39b;
  --alert-success-border: #2e5133; --alert-error-border: #5e2f2a; --alert-info-border: #2c4561; --alert-warning-border: #5b4b20;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --primary: #4fb79c; --primary-dark: #7fd3bc; --primary-soft: #1d3a33; --accent: #f2b632;
    --bg: #121715; --surface: #1b2220; --text: #e3ebe8; --muted: #9aa8a3; --border: #2e3936;
    --danger: #ef7d73; --danger-soft: #3a1f1d; --success: #6fcf76; --success-soft: #1c3320;
    --warning-soft: #3a3118; --info-soft: #1b2a3b; --on-primary: #0f1513;
    --input-bg: #141a18; --input-border: #3a4643; --table-head: #1f2826; --row-hover: #222c29; --row-highlight: #33301c;
    --gold-bg: #3f3415; --gold-text: #f4d27a; --red-bg: #43211e; --red-text: #f3a39b;
    --alert-success-border: #2e5133; --alert-error-border: #5e2f2a; --alert-info-border: #2c4561; --alert-warning-border: #5b4b20;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="hell"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
code { background: var(--primary-soft); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ---- Layout ---- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h, 56px); background: var(--brand); color: var(--on-brand); display: flex; align-items: center; gap: 1rem; padding: 0 1rem; z-index: 20; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-weight: 600; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.topbar-user { margin-left: auto; display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.burger { display: none; cursor: pointer; font-size: 1.4rem; }
.sidebar { position: fixed; top: var(--topbar-h, 56px); bottom: 0; left: 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; padding: 1rem .6rem; z-index: 10; }
.sidebar a, .sidebar .link { display: block; padding: .45rem .75rem; border-radius: 7px; color: var(--text); text-decoration: none; }
.sidebar a:hover, .sidebar .link:hover { background: var(--bg); }
.sidebar a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-group { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--border); }
.nav-group:last-child { border-bottom: 0; }
.nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .2rem .75rem .35rem; }
.logout { margin: 0; }
.link { background: none; border: 0; font: inherit; cursor: pointer; width: 100%; text-align: left; color: var(--danger) !important; }
.content { flex: 1; padding: 1.5rem; width: 100%; max-width: 1200px; }
body.app .content { margin: var(--topbar-h, 56px) 0 0 var(--sidebar); width: auto; max-width: 1200px; }
body.app .site-footer { margin-left: var(--sidebar); }
body.public .content { margin: 0 auto; }
.public-header { background: var(--brand); color: var(--on-brand); padding: .8rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.public-header nav { display: flex; align-items: center; gap: 1rem; }
.public-header nav a { color: var(--on-brand); text-decoration: none; }
.public-header .btn { background: var(--accent); color: var(--on-accent); }
.site-footer { padding: 1rem 1.5rem; color: var(--muted); font-size: .85rem; display: flex; gap: 1.25rem; flex-wrap: wrap; border-top: 1px solid var(--border); }
.site-footer a { color: var(--muted); }
.site-footer .version { margin-left: auto; }
.logo-img { height: var(--logo-h, 36px); max-width: calc(var(--logo-h, 36px) * 4); object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 4px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.color-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.color-row label { flex: 0 0 auto; }
input[type=color] { width: 64px; height: 40px; padding: 2px; cursor: pointer; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.preset { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.preset-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: inline-block; }
.logo-preview { max-height: 80px; max-width: 260px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.design-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.design-preview .dp-head { padding: .7rem 1rem; font-weight: 600; display: flex; gap: .6rem; align-items: center; }
.design-preview .dp-body { padding: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; background: var(--surface); }
.mail-preview { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 1rem; }
.var-list { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; font-size: .85rem; margin: 0; }
.var-list dt code { cursor: copy; }
.var-list dd { margin: 0; color: var(--muted); }
.progress-line { height: 10px; width: 100%; }

/* ---- Bausteine ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.narrow { max-width: 440px; margin: 2rem auto; }
.narrow-lg { max-width: 760px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.08rem; color: var(--muted); margin-top: 0; }
.pre { white-space: pre-line; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2rem; }
.hero .lead { max-width: 640px; margin: 0 auto 1.5rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent; background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--primary-dark); border-color: var(--border); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--primary-dark); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { filter: brightness(.9); }
.btn-danger { color: var(--on-primary); }
.btn-small { padding: .3rem .6rem; font-size: .85rem; }
.btn-large { padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
form.inline { display: inline; }

.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert-success { background: var(--success-soft); border-color: var(--alert-success-border); }
.alert-error { background: var(--danger-soft); border-color: var(--alert-error-border); }
.alert-info { background: var(--info-soft); border-color: var(--alert-info-border); }
.alert-warning { background: var(--warning-soft); border-color: var(--alert-warning-border); }
.credentials dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: .6rem 0 0; }
.credentials dd { margin: 0; }
.credentials .pw { font-size: 1.1rem; letter-spacing: .05em; }

.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .78rem; font-weight: 600; vertical-align: middle; }
.badge-gold { background: var(--gold-bg); color: var(--gold-text); font-size: .9rem; }
.badge-ok { background: var(--success-soft); color: var(--success); }
.mail-versendet { background: var(--success-soft); color: var(--success); }
.mail-fehlgeschlagen { background: var(--danger-soft); color: var(--danger); }
.mail-nicht-versendet { background: var(--warning-soft); color: var(--gold-text); }
.role-badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.role-admin { background: var(--red-bg); color: var(--red-text); }
.role-vorstand { background: var(--gold-bg); color: var(--gold-text); }
.role-mitglied { background: var(--primary-soft); color: var(--primary-dark); }
.topbar .role-badge { background: color-mix(in srgb, var(--on-brand) 18%, transparent); color: var(--on-brand); }
.status { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; vertical-align: middle; }
.status-aktiv { background: var(--success-soft); color: var(--success); }
.status-passiv { background: var(--warning-soft); color: var(--gold-text); }
.status-ausgetreten { background: var(--bg); color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; }
a.stat:hover { border-color: var(--primary); }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); }
.stat-label { color: var(--muted); font-size: .88rem; }
.stat-alert .stat-value { color: var(--danger); }

.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.tabs a { padding: .5rem 1rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--primary-dark); border-color: var(--primary); font-weight: 600; }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; padding: 0; }
.table-wrap > h2 { padding: 1.25rem 1.25rem 0; }
.table-wrap .form-actions { padding: 0 1.25rem 1.25rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--table-head); }
.table th.right, .table td.right { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--row-hover); }
.table tr.inactive td { opacity: .55; }
.table tr.highlight td { background: var(--row-highlight); }
.card > .table { margin-top: .5rem; }
.w-50 { width: 50%; }
progress.bar { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 5px; background: var(--bg); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--bg); border-radius: 5px; }
progress.bar::-webkit-progress-value { background: var(--primary); border-radius: 5px; }
progress.bar::-moz-progress-bar { background: var(--primary); border-radius: 5px; }

/* ---- Formulare ---- */
.form label, .filters label, .inline-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 500; margin-bottom: .8rem; flex: 1; min-width: 0; }
.form label.check, label.check { flex-direction: row; align-items: flex-start; gap: .5rem; font-weight: 400; font-size: .92rem; }
label.check input { margin-top: .2rem; }
input, select, textarea { font: inherit; font-size: .95rem; padding: .5rem .65rem; border: 1px solid var(--input-border); border-radius: 7px; background: var(--input-bg); color: var(--text); width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { resize: vertical; }
fieldset { margin: 0 0 1rem; }
fieldset.card { border: 1px solid var(--border); }
legend { font-weight: 700; font-size: 1.05rem; padding: 0 .35rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; }
.row > label { flex: 1 1 160px; }
.row > .w-25 { flex: 0 1 130px; }
.row > .w-33 { flex: 0 1 220px; }
.w-auto { width: auto; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .8rem; }
.filters input[type=search] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; }
.filters label.check { margin: 0; flex: 0 0 auto; }
.inline-form { align-items: flex-end; }
.inline-form .btn { margin-bottom: .8rem; }
.inline-form.compact { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.inline-form.compact select { width: auto; padding: .3rem .5rem; }
.inline-form.compact label, .inline-form.compact .btn { margin: 0; flex: 0 0 auto; }
.choice-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.form label.choice, label.choice { flex-direction: row; align-items: flex-start; gap: .65rem; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 400; margin-bottom: .5rem; }
label.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
label.choice input { margin-top: .25rem; }
.mandate { background: var(--bg); border-radius: 8px; padding: .9rem 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Listen & Termine ---- */
dl.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: .4rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.roles-legend { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 0; }
.roles-legend dd { margin: 0; color: var(--muted); font-size: .9rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .3rem 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border: 0; }
.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.event-list li { display: flex; gap: .75rem; align-items: center; }
.date-chip { background: var(--primary-soft); color: var(--primary-dark); border-radius: 8px; padding: .3rem .5rem; font-weight: 700; font-size: .85rem; min-width: 56px; text-align: center; }
.date-chip.big { font-size: 1.15rem; padding: .6rem .7rem; min-width: 76px; display: flex; flex-direction: column; }
.date-chip small { font-weight: 500; font-size: .75rem; }
.card.event { display: flex; gap: 1rem; align-items: flex-start; }
.event-body { flex: 1; min-width: 0; }
.event-body h2 { margin-bottom: .2rem; }
.event-body p { margin: .2rem 0; }
.event-actions { display: flex; gap: .25rem; }
.news-teaser { border-bottom: 1px solid var(--border); padding-bottom: .5rem; margin-bottom: .75rem; }
.news-teaser:last-child { border: 0; margin-bottom: 0; }
.news-teaser h3 { margin: 0; }
.news-teaser p { margin: .2rem 0; }
.prose { max-width: 780px; }

/* ---- Profilbild, Mitgliederbereich ---- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }
.avatar-md { width: 44px; height: 44px; font-size: .95rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.2rem; }
.topbar .avatar-initials { background: var(--accent); color: var(--on-accent); }
.topbar-profile { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; }
.profile-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 0; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; }
.avatar-edit { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.avatar-edit > div { flex: 1; min-width: 200px; }
.name-cell { display: flex; align-items: center; gap: .6rem; }
.name-cell p { margin: 0; }
.theme-choice { display: grid; gap: .5rem; margin-bottom: 1rem; }
.theme-swatch { width: 38px; height: 26px; border-radius: 6px; border: 1px solid var(--border); flex-shrink: 0; }
.theme-hell .theme-swatch { background: linear-gradient(135deg, #ffffff 50%, #e3f1ec 50%); }
.theme-dunkel .theme-swatch { background: linear-gradient(135deg, #1b2220 50%, #1d3a33 50%); }
.theme-auto .theme-swatch { background: linear-gradient(135deg, #ffffff 50%, #1b2220 50%); }
details.mandate { margin: .5rem 0 .8rem; }
details summary { cursor: pointer; }
.highlight-box { background: var(--warning-soft); padding: .5rem; border-radius: 6px; }
.signature-box { border: 1px dashed var(--border); border-radius: 8px; padding: .8rem; margin-bottom: .8rem; display: grid; gap: .5rem; }
.signature-img { max-width: 260px; max-height: 90px; background: #fff; border-radius: 4px; padding: 4px; }
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; display: inline-flex; }
.inline-details summary::-webkit-details-marker { display: none; }
.popover { position: absolute; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; box-shadow: var(--shadow); width: 260px; text-align: left; }
ul.changes { margin: .3rem 0 0; padding-left: 1.1rem; }
ul.changes del { color: var(--danger); }
ul.changes ins { color: var(--success); text-decoration: none; font-weight: 600; }
.mail-body { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; }

/* ---- Import ---- */
.popover.menu { display: grid; gap: .1rem; width: 270px; }
.popover.menu a { padding: .45rem .5rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.popover.menu a:hover { background: var(--primary-soft); }
.badge.import-neu { background: var(--success-soft); color: var(--success); }
.badge.import-aenderung { background: var(--info-soft); color: var(--primary-dark); }
.badge.import-fehler { background: var(--danger-soft); color: var(--danger); }
.table tr.import-error td { background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }

/* ---- Öffentliche Termine ---- */
.home-events { margin: 0 0 2rem; }
.home-events h2 { margin: 0; }
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.event-card { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .9rem; box-shadow: var(--shadow); }
.event-card .date-chip.big { min-width: 68px; }

/* ---- Zahlungs-QR ---- */
.pay-box { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border-left: 5px solid var(--accent); }
.pay-box > div { flex: 1 1 320px; }
.pay-box h2 { margin-top: 0; }
figure.qr { margin: 0; text-align: center; }
figure.qr img { width: 200px; height: 200px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
figure.qr figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.btn-paypal { background: #0070ba; color: #fff; border-radius: 999px; }
.btn-paypal:hover { background: #005ea6; }
.payment-request { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.payment-request > div { flex: 1 1 380px; }

/* ---- Kurse ---- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .7rem; }
.course-card h2 { margin: .3rem 0 0; font-size: 1.2rem; }
.course-card h2 a { color: var(--text); text-decoration: none; }
.course-time { margin: .2rem 0 0; color: var(--primary-dark); font-weight: 600; }
.course-card .btn-block { margin-top: auto; }
.course-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; text-align: center; }
.course-stats > div { background: var(--bg); border-radius: 8px; padding: .5rem .2rem; }
.course-stats strong { display: block; font-size: 1.05rem; }
.course-stats span { font-size: .75rem; color: var(--muted); }
.course-stats .alert-num strong { color: var(--danger); }
.home-courses { margin: 0 0 2rem; }
.home-courses h2 { margin: 0; }
a.course-mini { text-decoration: none; color: var(--text); }
a.course-mini:hover { border-color: var(--primary); }
.reg-table td { vertical-align: top; }
.reg-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; min-width: 210px; }
.reg-actions form.inline { margin: 0; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); }
/* Dialogfenster (z. B. Kursanmeldung bearbeiten) */
dialog.modal { width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal::backdrop { background: rgba(15, 23, 21, .55); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.modal-body { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; }
.modal-body hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--border); }
.modal-body .row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 520px) { .modal-body .row { grid-template-columns: 1fr; } }
.badge.reg-neu { background: var(--warning-soft); color: var(--gold-text); }
.badge.reg-zugelassen { background: var(--success-soft); color: var(--success); }
.badge.reg-warteliste { background: var(--info-soft); color: var(--primary-dark); }
.badge.reg-abgelehnt, .badge.reg-storniert { background: var(--bg); color: var(--muted); }
.attendance .att-date { font-size: .7rem; writing-mode: vertical-rl; transform: rotate(180deg); padding: .4rem .2rem; }
.attendance .att-box { min-width: 26px; border-left: 1px solid var(--border); }
@media print { .attendance .table th, .attendance .table td { border: 1px solid #999; padding: .3rem; } }

.pay-link-box { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; padding: .8rem; border: 1px dashed var(--border); border-radius: 10px; }
.pay-link-box figure.qr img { width: 130px; height: 130px; }
.break { overflow-wrap: anywhere; }
.closed-note { margin: auto 0 0; }

/* ---- Kurse öffentlich ---- */
.course-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: 2rem; margin-bottom: 1.5rem; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 22%, var(--surface))); border: 1px solid var(--border); }
.course-hero h1 { font-size: 2.1rem; margin: .1rem 0 .4rem; }
.course-hero .lead { max-width: 620px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--primary); margin: 0; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.hero-facts li { background: var(--surface); border-radius: 12px; padding: .7rem 1.1rem; min-width: 150px; box-shadow: var(--shadow); }
.hero-facts strong { display: block; font-size: 1.35rem; color: var(--primary-dark); }
.hero-facts span { font-size: .82rem; color: var(--muted); }
.ccard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20, 40, 35, .13); }
.ccard-media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 50%, #000)); overflow: hidden; }
.ccard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ccard:hover .ccard-media img { transform: scale(1.04); }
.ccard-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4.5rem; color: rgba(255, 255, 255, .85);
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .08) 0 25%, transparent 0 50%); background-size: 48px 48px; }
.ccard-placeholder.big { font-size: 7rem; }
.ccard-day { position: absolute; left: .8rem; top: .8rem; background: var(--surface); color: var(--text); font-weight: 700; font-size: .8rem; padding: .25rem .7rem; border-radius: 999px; box-shadow: var(--shadow); }
.ccard-state { position: absolute; right: .8rem; bottom: .8rem; font-weight: 700; font-size: .78rem; padding: .25rem .7rem; border-radius: 999px; }
.ccard-state.full { background: var(--danger); color: #fff; }
.ccard-state.few { background: var(--accent); color: var(--on-accent); }
.ccard-state.soon { background: rgba(0, 0, 0, .65); color: #fff; }
.ccard-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ccard-offer { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.ccard-offer.light { color: #fff; opacity: .9; }
.ccard-body h2 { margin: 0; font-size: 1.25rem; }
.ccard-body h2 a { color: var(--text); text-decoration: none; }
.ccard-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; font-size: .92rem; }
.ccard-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--border); }
.ccard-price strong { display: block; font-size: 1.35rem; color: var(--primary-dark); line-height: 1.1; }
.ccard-price span { font-size: .78rem; color: var(--muted); }
.ccard-places { text-align: right; min-width: 110px; }
.places-bar { display: block; height: 7px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-bottom: .2rem; border: 1px solid var(--border); }
.places-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.places-bar.big { height: 9px; margin: .2rem 0 .35rem; }
.places-bar .w-0 { width: 0%; }
.places-bar .w-5 { width: 5%; }
.places-bar .w-10 { width: 10%; }
.places-bar .w-15 { width: 15%; }
.places-bar .w-20 { width: 20%; }
.places-bar .w-25 { width: 25%; }
.places-bar .w-30 { width: 30%; }
.places-bar .w-35 { width: 35%; }
.places-bar .w-40 { width: 40%; }
.places-bar .w-45 { width: 45%; }
.places-bar .w-50 { width: 50%; }
.places-bar .w-55 { width: 55%; }
.places-bar .w-60 { width: 60%; }
.places-bar .w-65 { width: 65%; }
.places-bar .w-70 { width: 70%; }
.places-bar .w-75 { width: 75%; }
.places-bar .w-80 { width: 80%; }
.places-bar .w-85 { width: 85%; }
.places-bar .w-90 { width: 90%; }
.places-bar .w-95 { width: 95%; }
.places-bar .w-100 { width: 100%; }
.ccard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ccard-actions .btn:only-child { grid-column: 1 / -1; }
.cdetail-hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 280px; max-height: 420px; margin-bottom: 1.2rem; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #000)); display: flex; align-items: flex-end; }
.cdetail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cdetail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .05) 60%); }
.cdetail-hero-text { position: relative; z-index: 1; color: #fff; padding: 1.6rem 1.8rem; }
.cdetail-hero-text h1 { color: #fff; font-size: 2.2rem; margin: .1rem 0 .2rem; }
.cdetail-hero-text p { margin: 0; font-size: 1.1rem; opacity: .95; }
.cdetail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.cdetail-text { font-size: 1.04rem; line-height: 1.7; }
.sticky { position: sticky; top: 76px; }
.side-price strong { display: block; font-size: 2rem; color: var(--primary-dark); line-height: 1.1; }
.side-price span { color: var(--muted); font-size: .88rem; }
.side-facts { display: grid; grid-template-columns: auto 1fr; gap: .55rem .8rem; margin: 1rem 0 1.2rem; font-size: .95rem; }
.side-facts dt { color: var(--muted); white-space: nowrap; }
.side-facts dd { margin: 0; }
.session-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.session-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 58px; padding: .35rem .5rem; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: .9rem; }
.session-chip small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.session-chip.past { opacity: .45; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: .4rem .55rem; font-size: .78rem; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); }
.cdetail-others { margin-top: 1.5rem; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 13, .92); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #eee; margin-top: .6rem; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 1rem; right: 1rem; } .lb-prev { left: 1rem; top: 50%; } .lb-next { right: 1rem; top: 50%; }
body.lb-open { overflow: hidden; }
.choice-thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.choice-thumb.ph { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.5rem; }
.gallery-admin summary { cursor: pointer; display: flex; align-items: baseline; gap: .5rem; list-style: none; }
.gallery-admin summary h2 { margin: 0; display: inline; }
.gallery-admin[open] summary { margin-bottom: 1rem; }
.gallery-grid.admin { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: .5rem; }
.gallery-grid.admin figure { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; position: relative; background: var(--surface); }
.gallery-grid.admin figure.is-cover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.gallery-grid.admin img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.cover-flag { position: absolute; top: .4rem; left: .4rem; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.caption-form { padding: .4rem; display: grid; gap: .3rem; }
.caption-form input { font-size: .82rem; padding: .3rem .4rem; }
.img-actions { display: flex; justify-content: space-between; }
.img-actions .btn { padding: .2rem .45rem; }
@media (max-width: 900px) {
  .course-hero { grid-template-columns: 1fr; padding: 1.3rem; }
  .hero-facts { grid-auto-flow: column; overflow-x: auto; }
  .cdetail-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .cdetail-hero-text h1 { font-size: 1.6rem; }
}

/* ---- Passkeys ---- */
.or-line { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1.1rem 0 .8rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.passkey-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }

.passkey-offer { text-align: center; }
.passkey-offer .form label { text-align: left; }
.passkey-offer label { text-align: left; margin-bottom: .8rem; display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 500; }
.passkey-icon { font-size: 2.6rem; width: 76px; height: 76px; margin: .2rem auto .6rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); }
.passkey-benefits { list-style: none; padding: 0; margin: 1rem auto 1.2rem; text-align: left; display: inline-grid; gap: .35rem; font-size: .95rem; }
.passkey-offer-actions { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }

/* ---- Benutzer bearbeiten ---- */
.select-filter { margin-bottom: .4rem; }
select.member-select { width: 100%; padding: .25rem; }
select.member-select option { padding: .3rem .4rem; }
select.member-select option:disabled { color: var(--muted); }

/* ---- Neuigkeiten ---- */
.cat-1 { --cat: #2388c2; } .cat-2 { --cat: #2e9d4a; } .cat-3 { --cat: #e0841a; }
.cat-4 { --cat: #d6303a; } .cat-5 { --cat: #7a4fc4; } .cat-6 { --cat: #0f8f8a; } .cat-0 { --cat: var(--primary); }
.cat-badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, var(--surface)); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: .88rem; background: var(--surface); }
.chip:hover { border-color: var(--cat, var(--primary)); }
.chip[class*="cat-"]:not(.active) { border-color: color-mix(in srgb, var(--cat) 35%, var(--border)); color: color-mix(in srgb, var(--cat) 70%, var(--text)); }
.chip[class*="cat-"]:not(.active) { border-color: color-mix(in srgb, var(--cat) 35%, var(--border)); color: color-mix(in srgb, var(--cat) 70%, var(--text)); }
.chip.active { background: var(--cat, var(--primary)); border-color: var(--cat, var(--primary)); color: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(20, 40, 35, .12); }
.news-card.pinned { border-color: var(--accent); }
.news-card.draft { opacity: .75; border-style: dashed; }
.news-card-media { display: block; aspect-ratio: 16 / 9; background: var(--primary-soft); overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-media.no-image { display: grid; place-items: center; background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 55%, #000)); text-decoration: none; }
.news-card-initial { font-size: 3rem; font-weight: 800; color: rgba(255, 255, 255, .85); }
.news-card-body { padding: 1rem 1.15rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.news-card-body h2 { margin: .2rem 0 0; font-size: 1.12rem; line-height: 1.3; }
.news-card-body h2 a { color: var(--text); text-decoration: none; }
.news-card-body h2 a:hover { color: var(--primary); }
.news-teaser-text { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.news-card-body p.small { margin: 0; }
.news-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.badge-draft { background: var(--warning-soft); color: var(--gold-text); }
@media (min-width: 900px) {
  .news-card.featured { grid-column: 1 / -1; flex-direction: row; }
  .news-card.featured .news-card-media { flex: 0 0 55%; aspect-ratio: auto; min-height: 280px; }
  .news-card.featured .news-card-body { padding: 1.6rem; justify-content: center; }
  .news-card.featured h2 { font-size: 1.6rem; }
  .news-card.featured .news-teaser-text { flex: 0; font-size: 1.02rem; }
}
.news-article { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem 2rem 2rem; box-shadow: var(--shadow); }
.news-article h1 { font-size: 2rem; margin: .5rem 0 .8rem; }
.news-cover { width: calc(100% + 4rem); margin: -.5rem -2rem 1.2rem; max-height: 420px; object-fit: cover; display: block; }
.news-byline { display: flex; align-items: center; gap: .7rem; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.news-byline .actions { margin-left: auto; }
.news-lead { font-size: 1.15rem; color: var(--muted); line-height: 1.55; }
.news-more { max-width: 780px; margin: 1.5rem auto 0; }
.news-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.news-mini { display: flex; gap: .7rem; align-items: center; padding: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); }
.news-mini img, .news-mini-ph { width: 64px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.news-mini-ph { background: var(--cat); }
.news-teaser-link { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.news-teaser-link:last-child { border-bottom: 0; }
.news-teaser-link img { width: 92px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.news-teaser-link:hover strong { color: var(--primary); }

/* Öffentliche Neuigkeiten */
.badge-public { background: var(--info-soft); color: var(--primary-dark); text-decoration: none; }
.public-check { background: var(--info-soft); padding: .5rem .6rem; border-radius: 8px; }
.home-news { margin: 0 0 2rem; }
.home-news h2 { margin: 0; }
.news-card-body h3 { margin: .2rem 0 0; font-size: 1.08rem; line-height: 1.3; }
.news-card-body h3 a { color: var(--text); text-decoration: none; }
.news-card-body h3 a:hover { color: var(--primary); }
.news-byline .logo-img { height: 40px; }

/* Inhalt (Editor und Darstellung) */
.news-content { font-size: 1.04rem; line-height: 1.7; overflow-wrap: anywhere; }
.news-content > :first-child { margin-top: 0; }
.news-content h1, .news-content h2 { font-size: 1.45rem; margin: 1.6rem 0 .6rem; }
.news-content h3 { font-size: 1.2rem; margin: 1.3rem 0 .5rem; }
.news-content p { margin: 0 0 1rem; }
.news-content img { max-width: 100%; height: auto; border-radius: 10px; }
.news-content blockquote { margin: 1.2rem 0; padding: .6rem 1.1rem; border-left: 4px solid var(--accent); background: var(--primary-soft); border-radius: 0 10px 10px 0; font-style: italic; }
.news-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.news-content th, .news-content td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; }
.news-content th { background: var(--primary-soft); }
.news-content iframe, .news-content .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; display: block; margin: 1rem 0; }
.news-content .ql-align-center { text-align: center; } .news-content .ql-align-right { text-align: right; } .news-content .ql-align-justify { text-align: justify; }
.news-content li[data-list="bullet"] { list-style-type: disc; } .news-content li[data-list="ordered"] { list-style-type: decimal; }
.news-content .ql-ui { display: none; }
.news-box { padding: 1rem 1.2rem; border-radius: 12px; margin: 1.2rem 0; border-left: 5px solid var(--primary); background: var(--primary-soft); }
.news-box > :last-child { margin-bottom: 0; } .news-box h3 { margin-top: 0; }
.news-box.success { border-color: var(--success); background: var(--success-soft); }
.news-box.warning { border-color: var(--accent); background: var(--warning-soft); }
.news-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; margin: 1rem 0; }
.news-button { display: inline-block; padding: .65rem 1.3rem; border-radius: 999px; background: var(--primary); color: var(--on-primary) !important; text-decoration: none; font-weight: 600; }
.news-button:hover { filter: brightness(1.08); }
.news-figure { margin: 1.2rem 0; } .news-figure img { width: 100%; }
.news-figure figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.news-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.news-facts > div { background: var(--primary-soft); border-radius: 12px; padding: 1rem; text-align: center; }
.news-facts strong { display: block; font-size: 1.7rem; color: var(--primary); }
.news-facts span { color: var(--muted); font-size: .9rem; }
.news-video iframe { width: 100%; aspect-ratio: 16 / 9; }

/* Editor */
.news-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.input-large { font-size: 1.2rem !important; font-weight: 600; }
.editor-tabs { margin: .8rem 0 0; }
.tab-btn { background: none; border: 0; border-bottom: 2px solid transparent; padding: .5rem 1rem; font: inherit; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tab-btn.active { color: var(--primary-dark); border-color: var(--primary); font-weight: 600; }
#quill-editor { min-height: 360px; background: var(--input-bg); }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--input-border) !important; }
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; background: var(--table-head); }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; font-family: inherit; font-size: 1rem; }
.ql-editor { min-height: 360px; color: var(--text); }
.ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.ql-snow .ql-stroke { stroke: var(--text); } .ql-snow .ql-fill { fill: var(--text); } .ql-snow .ql-picker { color: var(--text); }
.ql-snow .ql-picker-options, .ql-snow .ql-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); }
.ql-snow .ql-tooltip input[type=text] { background: var(--input-bg); color: var(--text); border-color: var(--input-border); }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.5; tab-size: 2; min-height: 380px; }
.snippet-bar { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .6rem 0; }
.file-btn { cursor: pointer; }
.preview-box { border: 1px dashed var(--border); border-radius: 10px; padding: 1.2rem; min-height: 200px; }
.cover-preview { width: 100%; border-radius: 8px; margin-bottom: .5rem; }
@media (max-width: 900px) {
  .news-form-grid { grid-template-columns: 1fr; }
  .news-article { padding: 1rem 1.1rem 1.5rem; }
  .news-cover { width: calc(100% + 2.2rem); margin: -.5rem -1.1rem 1rem; }
  .news-article h1 { font-size: 1.5rem; }
}

/* ---- Responsiv ---- */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .burger { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  body.app .content, body.app .site-footer { margin-left: 0; }
  .content { padding: 1rem; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  h1 { font-size: 1.35rem; }
  .card.event { flex-direction: column; }
  dl.kv { grid-template-columns: 1fr; gap: 0 1rem; }
  dl.kv dd { margin-bottom: .4rem; }
}

/* ---- Druck (z. B. Geburtstags- und Jubiläumslisten) ---- */
@media print {
  .topbar, .sidebar, .site-footer, .actions, .no-print, .tabs, .public-header, .btn, .alert { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  body.app .content { margin: 0; padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .hide-sm { display: table-cell !important; }
  a { color: inherit; text-decoration: none; }
}

/* ---- Lizenz & Systemverwaltung ---- */
.license-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; letter-spacing: .03em; overflow-wrap: anywhere; word-break: break-all;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .35rem .5rem; display: inline-block; max-width: 100%; }
.license-key-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.license-cert { max-width: 760px; border-top: 4px solid var(--primary); }
.license-cert h2 { margin-top: .2rem; }
.otp-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.setup-2fa { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.setup-2fa figure.qr { margin: 0; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.system-header { background: #2b3440; color: #fff; }
.system-header nav { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.system-header nav a { color: #fff; text-decoration: none; opacity: .85; }
.system-header nav a.active, .system-header nav a:hover { opacity: 1; text-decoration: underline; }
.system-header .logo { background: #f8b040; color: #2b3440; }
.system-content { margin: 0 auto; }
@media print { .license-cert { border: 0; } .system-header { display: none !important; } }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.recovery-codes code { display: block; text-align: center; font-size: 1rem; padding: .4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; letter-spacing: .05em; }

/* ---- Branding & Rechtliches je Mandant ---- */
.wordmark-img { height: var(--wordmark-h, 36px); max-width: min(calc(var(--wordmark-h, 36px) * 9), 60vw); object-fit: contain; }
.wordmark-preview { background: var(--brand); padding: .6rem 1rem; border-radius: 8px; display: inline-block; }
.wordmark-preview img { max-height: 48px; max-width: 100%; display: block; }
.favicon-preview { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: #fff; }
.branding-row { display: grid; gap: .5rem; padding: .75rem 0; border-top: 1px solid var(--border); }
.branding-row:first-of-type { border-top: 0; }
.legal-form fieldset { padding: 1.25rem; }
.legal-form legend h2 { margin: 0; padding: 0 .3rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: .8rem; }
.choice-row label.check { margin: 0; }
.richtext-field .ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; border-color: var(--input-border); background: var(--surface); }
.richtext-field .ql-container.ql-snow { border-color: var(--input-border); min-height: 320px; background: var(--input-bg); }
.richtext-field .ql-editor { min-height: 320px; }
.legal-content h2 { margin-top: 1.4rem; }
.reg-table .badge { white-space: nowrap; }
.layout-hints { margin: -.4rem 0 .9rem; padding-left: 1.1rem; }
.btn-icon-danger { color: var(--danger); padding-left: .5rem; padding-right: .5rem; }
.btn-icon-danger:hover { background: var(--danger-soft); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem; border: 1px solid var(--alert-error-border); border-radius: 8px; background: var(--danger-soft); }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.group-new { border-style: dashed; }
.role-mitarbeit { background: var(--info-soft); color: var(--text); }
.perm-list { display: grid; gap: .3rem; }
.perm-groups { margin: .3rem 0 .6rem 1.6rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.perm-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.plain-fieldset { border: 0; padding: 0; margin: 0 0 .8rem; display: grid; gap: .35rem; }
.inline-choice { display: flex !important; flex-direction: row !important; align-items: center; gap: .4rem; flex-wrap: wrap; }
.input-xs { width: 5rem !important; }
.input-auto { width: auto !important; }
.indent { margin: -.2rem 0 .2rem 1.6rem; }
.module-list { margin: .6rem 0; display: grid; gap: .15rem; }
.board-list { display: grid; gap: .8rem; }
.board-list li { display: flex; gap: .75rem; align-items: center; }
.board-list a { overflow-wrap: anywhere; }

/* Vorstand: Reihenfolge, Startseite */
.board-list .board-info { flex: 1; min-width: 0; }
.board-sort { display: flex; flex-direction: column; gap: .15rem; }
.board-sort form { margin: 0; }
.board-sort .btn { padding: .1rem .45rem; line-height: 1.1; }
.board-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.board-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.home-board, .home-docs { margin: 0 0 2rem; }
.home-board h2, .home-docs h2 { margin: 0; }
.input-xs { width: 4.2rem !important; display: inline-block; }
.home-layout td { vertical-align: middle; }

/* Protokolle & Dokumente */
.doc-group h2 { margin: 1.4rem 0 .6rem; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }
.doc-icon { flex: 0 0 auto; width: 2.8rem; height: 3.3rem; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: .35rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .03em; color: #fff; background: #6b7280; text-decoration: none; }
.doc-icon.doc-pdf { background: #c0392b; }
.doc-icon.doc-docx, .doc-icon.doc-odt { background: #2b5797; }
.doc-icon.doc-xlsx, .doc-icon.doc-ods { background: #1e7145; }
.doc-icon.doc-pptx, .doc-icon.doc-odp { background: #c55a11; }
.doc-icon.doc-png, .doc-icon.doc-jpg { background: #7c3aed; }
.doc-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.doc-body p { margin: .35rem 0 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; align-items: center; }
.event-docs { margin: .4rem 0; }
@media (max-width: 640px) {
  .doc-list li { flex-wrap: wrap; }
  .doc-actions { width: 100%; justify-content: flex-start; }
}

.board-links { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.board-links .chip { font-size: .78rem; padding: .1rem .55rem; }
.board-address { display: inline-block; }
.board-card-contact { margin-top: .3rem; }

.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.directory-card { display: flex; gap: .75rem; align-items: flex-start; margin: 0; }
.directory-card a { overflow-wrap: anywhere; }
.board-fields { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem; margin: .4rem 0 .8rem; }
.board-fields summary { cursor: pointer; }
.board-fields[open] summary { margin-bottom: .6rem; }

/* Vorstand als Visitenkarten (2 × 2) */
.board-section { margin: 1.5rem 0 0; }
.board-section h2, .home-board h2 { margin: 0; }
.bcard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.bcard { position: relative; display: flex; flex-direction: column; min-height: 220px; padding: 1.25rem 1.4rem 1rem 1.6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.bcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: linear-gradient(var(--primary), var(--primary-dark)); }
.bcard::after { content: ''; position: absolute; right: -42px; top: -42px; width: 110px; height: 110px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent); pointer-events: none; }
.bcard-head { display: flex; gap: 1rem; align-items: center; }
.bcard-photo { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 1.5rem; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.bcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.bcard-id { flex: 1; min-width: 0; }
.bcard-id h3 { margin: 0; font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.bcard-role { margin: .2rem 0 0; font-size: .78rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--primary); }
.bcard-brand { position: relative; z-index: 1; align-self: flex-start; opacity: .9; }
.bcard-brand .logo-img { max-height: 34px; max-width: 70px; width: auto; }
.bcard-brand .logo { width: 34px; height: 34px; font-size: .8rem; }
.bcard-rule { height: 2px; width: 56px; margin: .9rem 0 .7rem; background: var(--accent); border-radius: 2px; }
.bcard-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9rem; }
.bcard-contact li { display: flex; gap: .55rem; align-items: baseline; min-width: 0; }
.bcard-contact a, .bcard-contact span { overflow-wrap: anywhere; }
.bcard-ico { flex: 0 0 1.1rem; text-align: center; color: var(--primary); font-weight: 700; }
.bcard-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.bcard-links a { font-size: .76rem; padding: .12rem .6rem; border-radius: 999px; text-decoration: none;
  background: var(--primary-soft); color: var(--primary-dark); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.bcard-links a:hover { background: var(--primary); color: #fff; }
.bcard-foot { margin-top: auto; padding-top: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bcard-club { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bcard-tools { display: inline-flex; gap: .15rem; }
.bcard-tools form { margin: 0; }
.bcard-tools .btn { padding: .1rem .45rem; line-height: 1.2; }
@media (max-width: 760px) {
  .bcard-grid { grid-template-columns: minmax(0, 1fr); }
  .bcard { min-height: 0; }
}
@media print { .bcard-tools { display: none; } }

/* Logo-Initialen in der Kopfzeile wachsen mit der eingestellten Logogröße */
.topbar .brand .logo, .public-header .brand .logo { width: var(--logo-h, 34px); height: var(--logo-h, 34px); font-size: calc(var(--logo-h, 34px) * .38); }
.size-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center; }
.size-row input[type=range] { width: 100%; }
.size-row output { font-variant-numeric: tabular-nums; min-width: 3.5rem; text-align: right; }
.bg-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Systemverwaltung */
.inline-details { display: inline-block; position: relative; }
.inline-details > summary { list-style: none; display: inline-block; cursor: pointer; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details[open] { display: block; margin-top: .4rem; }
.inline-details form { margin: .4rem 0; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; }
.changelog-entry summary { cursor: pointer; }
.changelog-entry ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.changelog-entry li { margin: .2rem 0; }
.select-all { user-select: all; }

.cert-image-preview { max-width: 100%; max-height: 90px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 14px 14px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; }
