/* Vereinsverwaltung – klar, ruhig, strukturiert. Akzentfarbe je Verein über --accent. */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e7ee;
  --border-strong: #cfd6e0;
  --text: #182032;
  --muted: #64708a;
  --accent: #2563eb;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --accent-line: color-mix(in srgb, var(--accent) 30%, #fff);
  --accent-strong: color-mix(in srgb, var(--accent) 82%, #000);
  --ok: #157f3c;   --ok-soft: #e7f6ec;
  --warn: #a35a00; --warn-soft: #fdf3e1;
  --bad: #b42318;  --bad-soft: #fdecea;
  --info: #3a4a6b; --info-soft: #eef2f8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --sidebar: 248px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.45rem; font-weight: 650; }
h2 { font-size: 1.02rem; font-weight: 650; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }
.muted { color: var(--muted); }
.small, small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.text-bad { color: var(--bad); }
.ico { flex: none; vertical-align: -3px; }

/* ---------- App-Gerüst ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: none;
}
.brand-mark.big { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 16px; margin: 0 auto; }
.brand-name { font-weight: 650; line-height: 1.2; }
.brand-sub { font-size: .78rem; color: var(--muted); }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--text); font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item.active .ico { color: var(--accent); }
.nav-item.disabled { color: #a3acbd; cursor: default; }
.nav-item.disabled small { margin-left: auto; font-size: .7rem; background: var(--surface-2); border: 1px solid var(--border); padding: 0 6px; border-radius: 99px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); padding: 4px; border-radius: 8px; }
.me:hover { background: var(--surface-2); text-decoration: none; }
.me strong, .me small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: .76rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-weight: 700; flex: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 18px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.topbar .menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1320px; width: 100%; }
.backdrop { display: none; }

/* ---------- Karten & Raster ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head.pad { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-2 > .card, .grid-2 > div > .card:last-child { margin-bottom: 0; }
.grid-2 { margin-bottom: 20px; }
.grid-2.wide-left { grid-template-columns: 1.6fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; color: var(--text); border-top: 3px solid var(--accent);
}
a.stat:hover { text-decoration: none; border-color: var(--accent-line); border-top-color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .78rem; color: var(--muted); }
.stat-bad { border-top-color: var(--bad); }

/* To-do-Liste */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); background: var(--warn-soft); margin-bottom: 6px; border-left: 3px solid #e7a33e; }
.todo li a:hover { text-decoration: none; filter: brightness(.98); }
.todo li a span { color: var(--warn); }
.empty-ok { color: var(--ok); display: flex; gap: 8px; align-items: center; margin: 0; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.list td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list.compact td { padding: 7px 12px; }
.list.compact th { padding: 8px 12px; }
.card:not(.flush) .list th:first-child, .card:not(.flush) .list td:first-child { padding-left: 4px; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list tr.click { cursor: pointer; }
.list tr.click:hover td { background: var(--accent-soft); }
.list tr.dim td { opacity: .55; }
.list tr.row-bad td { background: var(--bad-soft); }
.list td.actions { white-space: nowrap; text-align: right; }
.list td.actions form { display: inline; }
.list a.sort { color: inherit; }
.list a.sort.on { color: var(--accent-strong); }
.list a.sort.on::after { content: " ↓"; }
.edit-table input:not([type=checkbox]), .edit-table select { width: 100%; min-width: 90px; }
.edit-table .new-row td { background: var(--surface-2); }

/* Badges */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: var(--info-soft); color: var(--info); }
.badge-aktiv { background: var(--ok-soft); color: var(--ok); }
.badge-passiv { background: #eef1f6; color: #4b5872; }
.badge-ehren { background: #f6eefc; color: #7a3fae; }
.badge-ausgetreten { background: var(--bad-soft); color: var(--bad); }
.badge-z-sepa { background: var(--accent-soft); color: var(--accent-strong); }
.badge-z-zahlschein { background: #fff4e5; color: #9a5b00; }
.badge-z-email { background: #e9f7f7; color: #11706f; }
.badge-role-admin { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Formulare ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label, .field > span:first-child { font-size: .82rem; font-weight: 600; color: #3b4559; }
.field em { color: var(--bad); font-style: normal; }
.field small { color: var(--muted); font-size: .78rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 11px; width: 100%; min-height: 38px; transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: #3b4559; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.color-input { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; }
.input-inline { min-width: 160px; }
.input-sm { max-width: 110px; }
.input-xs { max-width: 70px; text-align: right; }
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid > * { grid-column: span 6; }
.form-grid > .s1 { grid-column: span 1; } .form-grid > .s2 { grid-column: span 2; }
.form-grid > .s3 { grid-column: span 3; } .form-grid > .s4 { grid-column: span 4; }
.form-grid > .s6 { grid-column: span 6; }
.form-sep { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.form-footer { display: flex; justify-content: flex-end; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; align-self: end; min-height: 38px; }
label.inline { display: inline-flex; gap: 4px; align-items: center; }

.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.choice-col { display: grid; gap: 8px; margin-top: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-strong); border-radius: 9px; padding: 11px 12px; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--accent-line); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice input { margin-top: 2px; }
.choice strong { display: block; font-weight: 600; }
.choice small { display: block; color: var(--muted); }
.sepa-box { margin-top: 14px; }
.choice-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.choice.is-disabled { opacity: .55; cursor: not-allowed; }
.align-end { align-self: end; padding-bottom: 22px; }

/* Familien */
.badge-fam { background: #eef0fd; color: #4338ca; display: inline-flex; align-items: center; gap: 4px; }
.fam-hint { color: #4338ca; display: inline-flex; gap: 4px; align-items: center; }
.list tr.fam-child td:nth-child(2) { padding-left: 34px; position: relative; }
.list tr.fam-child td:nth-child(2)::before { content: "↳"; position: absolute; left: 16px; color: #8b93a7; }
.fam-list { list-style: none; margin: 0 0 12px; padding: 0; }
.fam-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 8px 10px; border-radius: 8px; align-items: center; }
.fam-list li > a { font-weight: 600; }
.fam-list li > .badge { grid-column: 2; grid-row: 1; }
.fam-list li > .fam-amount { grid-column: 2; grid-row: 2; text-align: right; font-variant-numeric: tabular-nums; font-size: .86rem; }
.fam-list li > small { grid-column: 1; grid-row: 2; color: var(--muted); }
.fam-list li.me { background: var(--accent-soft); }
.fam-list li.dim { opacity: .55; }
.fam-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding: 10px 10px 12px; margin-bottom: 4px; }
.fam-total strong { font-size: 1.1rem; }
.family .btn + p { margin: 8px 0 0; }
.fam-switch { margin-top: 12px; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.fam-switch summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--muted); }
.fam-switch[open] { display: grid; gap: 8px; }
.fam-switch .check { min-height: 0; align-self: auto; }

.dropzone { display: flex; position: relative; border: 2px dashed var(--border-strong); border-radius: 10px; padding: 28px 16px; text-align: center; background: var(--surface-2); cursor: pointer; justify-content: center; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-text strong, .dz-text small { display: block; }
.steps { padding-left: 20px; margin: 0 0 16px; } .steps li { margin-bottom: 6px; }
.tips { padding-left: 18px; margin: 0; font-size: .88rem; } .tips li { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; }
.chip b { color: var(--accent); }
.roles { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.roles dt { font-weight: 600; } .roles dd { margin: 0; color: var(--muted); }

/* Mitglied-Formular */
.member-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.member-side { position: sticky; top: 92px; }
.sticky-actions { display: flex; flex-direction: column; gap: 8px; }
.meta { font-size: .84rem; display: grid; gap: 4px; }
.meta span { color: var(--muted); display: inline-block; width: 80px; }
.danger-zone { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--border-strong); }
.narrow-card { max-width: 720px; }
.logo-preview { display: grid; place-items: center; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 20px; margin-bottom: 14px; min-height: 120px; }
.logo-preview img { max-height: 110px; max-width: 100%; object-fit: contain; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent-strong); border-bottom-color: var(--accent); }

/* Filterleiste */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; }
.filters select { width: auto; min-width: 160px; }
.search { position: relative; flex: 1 1 240px; display: flex; align-items: center; }
.search .ico { position: absolute; left: 11px; color: var(--muted); }
.search input { padding-left: 34px !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 8px 15px; min-height: 38px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #b9c2cf; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-danger { color: var(--bad); border-color: #f1c0bb; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: .82rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 7px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link { font-size: .88rem; font-weight: 500; }

/* Meldungen */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash { padding: 11px 14px; border-radius: 9px; border: 1px solid; font-size: .92rem; margin-bottom: 0; }
.flash + .card, .flash + section { margin-top: 16px; }
.flash-success { background: var(--ok-soft); border-color: #b5e2c4; color: #0f5e2d; }
.flash-error { background: var(--bad-soft); border-color: #f4bfb9; color: #8e1b12; }
.flash-warning { background: var(--warn-soft); border-color: #f3d39e; color: #7a4300; }
.flash-info { background: var(--info-soft); border-color: #d3dceb; color: var(--info); }

/* ---------- Schlichte Seiten (Start, Login) ---------- */
body.plain { min-height: 100vh; background: radial-gradient(1200px 500px at 50% -120px, var(--accent-soft), transparent 70%) no-repeat, var(--bg); }
.plain-main { max-width: 880px; margin: 0 auto; padding: 56px 20px; }
.plain-main.narrow { max-width: 440px; }
.plain-main.wide { max-width: 1100px; }
.start-head { text-align: center; margin-bottom: 32px; }
.start-head h1 { font-size: 1.9rem; margin: 14px 0 6px; }
.start-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.club-card {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; color: var(--text); box-shadow: var(--shadow); border-left: 4px solid var(--c); transition: transform .12s, box-shadow .12s;
}
.club-card:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.club-card img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.club-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.25rem; flex: none; }
.club-info { flex: 1; min-width: 0; }
.club-info strong, .club-info small { display: block; }
.club-info small { color: var(--muted); }
.club-go { color: var(--muted); }
.start-foot { text-align: center; margin-top: 36px; font-size: .84rem; }
.start-foot a { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.login-card { padding: 30px; }
.login-head { text-align: center; margin-bottom: 22px; }
.login-head h1 { margin: 14px 0 4px; font-size: 1.35rem; }
.login-head p { margin: 0; }
.login-logo { max-width: 120px; max-height: 80px; object-fit: contain; }
.back-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 18px; font-size: .86rem; color: var(--muted); }
.center-card { text-align: center; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--accent); }
.sys-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sys-head h1 { display: flex; gap: 10px; align-items: center; }
.sys-head form { display: inline; }

/* ---------- Beitrittsformular ---------- */
.plain-main.form-page { max-width: 820px; }
.join-head { text-align: center; margin-bottom: 26px; }
.join-head h1 { font-size: 1.8rem; margin: 14px 0 2px; }
.join-club { font-weight: 600; color: var(--accent-strong); margin: 0 0 10px; }
.join-intro { color: var(--muted); max-width: 620px; margin: 0 auto; white-space: pre-line; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85rem; }
.fam-row { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 12px 14px 14px; margin-bottom: 12px; }
.fam-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mandate { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: .88rem; }
.mandate p { margin: 6px 0; }
.mandate .check, .consents .check { align-items: flex-start; font-weight: 500; min-height: 0; }
.consents { display: grid; gap: 10px; margin: 16px 0; }
.consents .check input, .mandate .check input { margin-top: 3px; flex: none; }
.join-total { display: flex; justify-content: space-between; align-items: baseline; background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.join-total strong { font-size: 1.35rem; color: var(--accent-strong); }
.btn-lg { min-height: 48px; font-size: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.ok-mark { background: var(--ok); }
.mt { margin-top: 14px; }
.pre { white-space: pre-line; margin: 0; }
.join-link { text-align: center; margin-top: 14px; font-size: .9rem; }
.nav-count { margin-left: auto; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
dl.data { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.data dt { color: var(--muted); font-size: .86rem; }
dl.data dd { margin: 0; }

/* ---------- Beiträge ---------- */
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; min-width: 80px; margin: 6px 0 2px; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.versand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.versand-grid .card { margin-bottom: 0; display: flex; flex-direction: column; }
.stat-warn { border-top-color: #e7a33e; }
.text-ok { color: var(--ok); }
.card.highlight { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.sum-box { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; padding-bottom: 4px; }
.sum-box strong { font-size: 1.4rem; }
.list tr.row-new td { background: var(--ok-soft); }
.list td.actions form + form { margin-left: 2px; }

/* ---------- Serienbriefe ---------- */
.mono-text { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9rem; line-height: 1.5; }
.chip-btn { cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.check-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.check-row .check { min-height: 0; font-weight: 500; }
.select-inline { width: auto !important; min-height: 32px !important; padding: 4px 8px !important; font-size: .85rem !important; }
.save-tpl input { max-width: 260px; }
.paper { background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 24px rgba(16, 24, 40, .07); padding: 28px 32px; font-size: .92rem; max-height: 560px; overflow: auto; }
.paper-addr { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.paper-subject { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; }
.paper-body p { margin: 0 0 10px; }
.paper-body ul { margin: 0 0 10px; padding-left: 20px; }
.recipients { max-height: 520px; overflow: auto; }
.pad-box { padding: 14px 20px; border-top: 1px solid var(--border); }

/* ---------- Zahlungen & Mahnungen ---------- */
.badge-mahn { background: #fff1e6; color: #b45309; }
.list tr.row-warn td { background: #fffaf2; }
.list tr.match-sicher td:first-child, .list tr.match-sepa_sammel td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.list tr.match-vorschlag td:first-child { box-shadow: inset 3px 0 0 #e7a33e; }
.list tr.match-ruecklastschrift td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.list tr.match-keine td:first-child { box-shadow: inset 3px 0 0 var(--border-strong); }
.mt-xs { margin-top: 6px; max-width: 360px; }
.versand-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-layout { grid-template-columns: 1fr; }
  .member-side { position: static; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 25; }
  .topbar .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .grid-2, .grid-2.wide-left, .versand-grid, .versand-grid.two { grid-template-columns: 1fr; }
  .choice-row, .choice-row.two { grid-template-columns: 1fr; }
  .align-end { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .form-grid > .s1, .form-grid > .s2, .form-grid > .s3, .form-grid > .s4 { grid-column: span 6; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 1.35rem; }
  .hide-sm, .spacer { display: none; }
  .topbar h1 { font-size: 1.15rem; }
  .topbar { flex-wrap: wrap; }
  .topbar-actions { order: 3; width: 100%; }
  .topbar-actions:empty { display: none; }
  .filters select { flex: 1 1 140px; min-width: 0; }
  .plain-main { padding: 32px 16px; }
}
