*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

:root {
  --c-secondary: #555;
  --c-muted: #888;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.d-none { display: none; }
.d-inline { display: inline; }
.d-contents { display: contents; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.85rem; }
.text-secondary { color: var(--c-secondary); }
.text-muted { color: var(--c-muted); }
.text-meta { color: #666; font-size: 0.82rem; }
.text-hint { font-size: 0.78rem; color: #aaa; margin-top: 0.3rem; }
.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; }
.chk-gold { width: 1rem; height: 1rem; accent-color: #ffd700; flex-shrink: 0; }
.w-100 { width: 100%; }
.mt-1 { margin-top: 1rem; }
.mb-15 { margin-bottom: 1.5rem; }
.text-faint { color: #ccc; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 0.75rem; }
.grid-auto-2 { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.75rem; align-items: end; }
.form-check {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 0;
  cursor: pointer; font-weight: normal; font-size: 0.9rem;
}
.badge-toggle {
  cursor: pointer; border: none; font-family: inherit;
  text-decoration: underline dotted; text-underline-offset: 2px; background: inherit;
}
.badge-toggle:hover { filter: brightness(1.2); }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ── Top-Nav ── */
nav.topbar {
  width: 100%;
  background: #000;
  color: #ffd700;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
nav.topbar .brand { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
nav.topbar .nav-links { display: flex; gap: 0.2rem; height: 100%; }
nav.topbar .nav-links a {
  display: flex; align-items: center; padding: 0 1rem;
  color: #fff; text-decoration: none; font-size: 0.88rem; font-weight: 600;
  border-bottom: 3px solid transparent; transition: color 0.15s, border-color 0.15s;
}
nav.topbar .nav-links a:hover  { color: #ffd700; }
nav.topbar .nav-links a.active { color: #ffd700; border-bottom-color: #ffd700; }
nav.topbar .user { font-size: 0.82rem; color: #ccc; display: flex; align-items: center; gap: 0.8rem; }
nav.topbar form { display: inline; }
nav.topbar button, nav.topbar a.btn-logout {
  background: none; border: 1px solid #444; color: #aaa;
  padding: 0.3rem 0.75rem; border-radius: 5px; cursor: pointer; font-size: 0.8rem;
  text-decoration: none; display: inline-block;
}
nav.topbar button:hover, nav.topbar a.btn-logout:hover { border-color: #ffd700; color: #ffd700; }
.nav-user-row { display: none; }
.gear-link {
  color: #aaa; text-decoration: none; font-size: 1.15rem; line-height: 1;
  display: flex; align-items: center; transition: color 0.15s;
}
.gear-link:hover { color: #fff; }
.gear-link.active { color: #ffd700; }

/* Nav-Umschaltung: nicht an eine feste Bildschirmbreite gebunden, sondern per
   JS (siehe _topbar.ejs) auf .nav-collapsed gesetzt, sobald Marke+Links+User
   nicht mehr in die Leiste passen. */
nav.topbar.nav-collapsed { padding: 0 1rem; position: relative; }
nav.topbar.nav-collapsed .brand { font-size: 0.88rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.topbar.nav-collapsed .nav-links {
  display: none; flex-direction: column; height: auto;
  position: absolute; top: 52px; left: 0; right: 0;
  background: #0a0a0a; z-index: 200; padding-bottom: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
nav.topbar.nav-collapsed .nav-links.open { display: flex; }
nav.topbar.nav-collapsed .nav-links a {
  padding: 0.75rem 1.2rem; height: auto;
  border-bottom: 1px solid #1e1e1e; font-size: 0.92rem;
  color: #fff;
}
nav.topbar.nav-collapsed .nav-links a:hover { color: #ffd700; }
nav.topbar.nav-collapsed .nav-links a:last-child { border-bottom: none; }
nav.topbar.nav-collapsed .nav-links a.active { background: #111; border-bottom-color: transparent; color: #ffd700; }
nav.topbar.nav-collapsed .user { display: none; }
nav.topbar.nav-collapsed .nav-toggle { display: flex !important; align-items: center; margin-left: 0.5rem; }
nav.topbar.nav-collapsed .nav-user-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.2rem; border-bottom: 2px solid #2a2a2a;
  background: #111; color: #ccc; font-size: 0.82rem;
}
nav.topbar.nav-collapsed .nav-user-info { display: flex; align-items: center; gap: 0.5rem; }
nav.topbar.nav-collapsed .nav-user-actions { display: flex; align-items: center; gap: 0.8rem; }

main { padding: 2rem; max-width: 1600px; margin: 0 auto; }

h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.05rem; margin-bottom: 1rem; color: #333; font-weight: 700; }

.card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.card-flush { padding: 0; overflow: hidden; }
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 0.6rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left; padding: 0.6rem 0.8rem;
  background: #f8f8f8; border-bottom: 2px solid #eee;
  font-size: 0.75rem; text-transform: uppercase; color: #666; white-space: nowrap;
}
td { padding: 0.6rem 0.8rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 99px; font-size: 0.75rem; font-weight: 600;
}
.badge-used      { background: #fdecea; color: #b71c1c; }
.badge-free      { background: #e8f5e9; color: #2e7d32; }
.badge-vorstand     { background: #fff8e1; color: #f57f17; }
.badge-kassierer    { background: #e3f2fd; color: #1565c0; }
.badge-ticket       { background: #f3e8ff; color: #7e22ce; }
.badge-offen     { background: #e3f2fd; color: #1565c0; }
.badge-genehmigt { background: #e8f5e9; color: #2e7d32; }
.badge-abgelehnt { background: #fdecea; color: #b71c1c; }
.badge-passiv    { background: #f3f4f6; color: #6b7280; }
.badge-gesperrt  { background: #fdecea; color: #b71c1c; }
.badge-resigned  { background: #f3f4f6; color: #9ca3af; }
.badge-excluded  { background: #fdecea; color: #b71c1c; font-weight: 700; }

.alert {
  background: #fdecea; color: #b71c1c; border: 1px solid #f5c6cb;
  border-radius: 7px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: 0.92rem;
}
.success {
  background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9;
  border-radius: 7px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: 0.92rem;
}

label { display: block; font-size: 0.85rem; font-weight: 600; color: #444; margin-bottom: 0.3rem; margin-top: 1rem; }
input[type="email"], input[type="password"], input[type="number"], input[type="text"],
input[type="tel"], input[type="datetime-local"], input[type="url"], select {
  width: 100%; padding: 0.72rem 0.9rem;
  border: 1.5px solid #d1d5db; border-radius: 7px; font-size: 1rem;
  background: #fafafa; transition: border-color 0.2s; font-family: inherit;
}
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
  padding-right: 2.5rem; cursor: pointer;
}
input:focus { outline: none; border-color: #ffd700; background: #fff; }
select:focus { outline: none; border-color: #ffd700; background-color: #fff; }
.input-sm { width: 100%; padding: 0.6rem 0.8rem; border: 1.5px solid #d1d5db; border-radius: 7px; font-size: 0.95rem; }

@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-spinner {
  display: inline-block; width: 14px; height: 14px; flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.25); border-top-color: currentColor;
  border-radius: 50%; animation: btn-spin .7s linear infinite;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.4rem; background: #ffd700; color: #000;
  font-weight: 700; font-size: 0.9rem; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; text-decoration: none; transition: background 0.15s;
  appearance: none; -webkit-appearance: none; line-height: 1.2;
}
.btn:hover { background: #f0c800; }
.btn-ghost {
  background: none; border: 1px solid #d1d5db; color: #444;
  padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; border-radius: 5px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem;
  appearance: none; -webkit-appearance: none; font-family: inherit; line-height: 1.2;
}
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; border-radius: 5px; vertical-align: middle; }
.btn-ghost:hover { border-color: #000; color: #000; }
.btn-ghost-danger { border-color: #fca5a5; color: #dc2626; }
.btn-ghost-danger:hover { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.btn-green  { background: #25d366; color: #fff; }
.btn-green:hover  { background: #1ebe5d; }
.btn-danger    { background: #d32f2f; color: #fff; }
.btn-danger:hover    { background: #b71c1c; }
.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-xs { padding: 0.2rem 0.55rem; font-size: 0.85rem; }
.btn-dark { background: #2a2a3d; color: #ffd700; }
.btn-dark:hover { background: #1a1a2e; }
.btn-block { width: 100%; justify-content: center; margin-top: 1.5rem; }
.close-x { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #888; line-height: 1; }
.btn-dashed {
  width: 100%; background: none; border: 1.5px dashed #d1d5db; color: #555;
  padding: 0.6rem 1rem; border-radius: 7px; cursor: pointer; font-family: inherit;
  font-size: 0.9rem; transition: border-color 0.15s, color 0.15s;
}
.btn-dashed:hover { border-color: #ffd700; }

/* ── Filter-Tabs ── */
.filter-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem; border-radius: 99px; font-size: 0.82rem; font-weight: 600;
  border: 1.5px solid #d1d5db; color: #555; text-decoration: none;
  background: #fff; transition: border-color 0.15s, color 0.15s;
}
.filter-tab:hover  { border-color: #000; color: #000; }
.filter-tab.active { border-color: #ffd700; background: #ffd700; color: #000; }
.filter-count { font-size: 0.75rem; font-weight: 700; opacity: 0.7; }

/* ── Detail-Liste ── */
dl.details { display: grid; grid-template-columns: 160px 1fr; gap: 0.5rem 1rem; font-size: 0.88rem; }
dl.details dt { color: #888; font-weight: 600; padding-top: 0.15rem; }
dl.details dd { color: #1a1a2e; }
dl.details-140 { grid-template-columns: 140px 1fr; }
dl.details-180 { grid-template-columns: 180px 1fr; }
dl.details-200 { grid-template-columns: 200px 1fr; }

/* ── Entscheidungsbereich ── */
.decision-area { padding: 1rem; background: #f8f8f8; border-radius: 8px; }
.decision-result { padding: 0.8rem; border-radius: 8px; display: flex; align-items: center; }
.decision-approved { background: #f1faf2; }
.decision-rejected { background: #fef7f7; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border-radius: 10px; padding: 1.2rem 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.stat .value { font-size: 2rem; font-weight: 700; color: #000; }
.stat .label { font-size: 0.82rem; color: #888; margin-top: 0.2rem; }

/* ── Search count badge ── */
.search-count {
  display: inline-flex; align-items: center;
  font-size: 0.8rem; color: #9ca3af; white-space: nowrap;
  padding: 0.25rem 0.7rem; border-radius: 99px;
  border: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.search-count.active {
  color: #1a1a2e; border-color: #d1d5db; background: #fff;
}

/* ── Modal ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; padding: 2rem;
  max-width: 400px; width: 90%; text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.modal h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.modal .code-label {
  font-family: monospace; font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.1em; background: #f4f6f9; padding: 0.4rem 1rem;
  border-radius: 6px; display: inline-block; margin-bottom: 1rem;
}
.modal canvas { border-radius: 8px; }
.modal .modal-url {
  font-size: 0.75rem; color: #888; word-break: break-all;
  margin: 0.6rem 0 1.2rem; display: block;
}
.modal-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #888;
}
.modal-close:hover { color: #000; }
.modal-wrapper { position: relative; }
.modal-header {
  padding: 1.1rem 1.4rem; border-bottom: 1px solid #f0f0f0;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-footer {
  padding: 1rem 1.4rem; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ── Auth-Shell (Login/Passwort vergessen/Zurücksetzen) ────────────────── */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #f4f6f9; padding: 1rem;
}
.auth-card {
  background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2.5rem; width: 100%; max-width: 380px;
}

/* ── Seiten-spezifisch: Kontoführung ─────────────────────────────────────── */
.kf-tabs { display:flex; gap:0; border-bottom:2px solid #e5e7eb; margin-bottom:1.75rem; }
.kf-tab {
  background:none; border:none; border-bottom:3px solid transparent; margin-bottom:-2px;
  padding:0.6rem 1.25rem; font-size:0.9rem; font-weight:600; color:#888; cursor:pointer;
  transition:color .15s,border-color .15s; white-space:nowrap;
}
.kf-tab:hover { color:#333; }
.kf-tab.active { color:#ffd700; border-bottom-color:#ffd700; }

.kf-summary-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1.5rem; }
.kf-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:1.1rem 1.3rem; }
.kf-card-label { font-size:0.78rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:#888; margin-bottom:0.3rem; }
.kf-card-value { font-size:1.55rem; font-weight:700; }
.kf-card-value.income { color:#15803d; }
.kf-card-value.expense { color:#b91c1c; }
.kf-card-value.saldo-pos { color:#15803d; }
.kf-card-value.saldo-neg { color:#b91c1c; }
.kf-card-value.saldo-zero { color:#888; }

.kf-year-bar { display:flex; align-items:center; gap:0.5rem; margin-bottom:1.25rem; flex-wrap:wrap; }
.kf-year-btn {
  padding:0.3rem 0.8rem; border:1.5px solid #e5e7eb; border-radius:6px;
  background:#fff; font-size:0.85rem; font-weight:600; color:#555; cursor:pointer; text-decoration:none;
}
.kf-year-btn:hover { border-color:#ffd700; color:#333; }
.kf-year-btn.active { border-color:#ffd700; background:#ffd700; color:#000; }

.kf-monthly-table table { width:100%; border-collapse:collapse; font-size:0.88rem; }
.kf-monthly-table th { text-align:right; padding:0.4rem 0.75rem; color:#888; font-weight:600; font-size:0.78rem; }
.kf-monthly-table th:first-child { text-align:left; }
.kf-monthly-table td { padding:0.45rem 0.75rem; text-align:right; border-top:1px solid #f3f4f6; }
.kf-monthly-table td:first-child { text-align:left; font-weight:600; color:#374151; }
.kf-monthly-table tr:hover td { background:#fafafa; }
.kf-monthly-table .total-row td { border-top:2px solid #e5e7eb; font-weight:700; background:#f9fafb; }
.amount-income  { color:#15803d; }
.amount-expense { color:#b91c1c; }
.amount-pos     { color:#15803d; font-weight:600; }
.amount-neg     { color:#b91c1c; font-weight:600; }
.amount-zero    { color:#888; }

.kf-cat-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:1.5rem; }
.kf-cat-list { list-style:none; padding:0; margin:0; }
.kf-cat-list li { display:flex; align-items:center; justify-content:space-between; padding:0.4rem 0; border-bottom:1px solid #f3f4f6; font-size:0.88rem; }
.kf-cat-list li:last-child { border-bottom:none; }
.kf-cat-bar-wrap { flex:1; margin:0 1rem; height:6px; background:#f3f4f6; border-radius:3px; overflow:hidden; }
.kf-cat-bar { height:100%; border-radius:3px; }
.kf-cat-bar.income { background:#86efac; }
.kf-cat-bar.expense { background:#fca5a5; }

.buch-filter-bar { display:flex; gap:0.6rem; align-items:center; margin-bottom:1rem; flex-wrap:wrap; }
.buch-filter-bar select, .buch-filter-bar input { padding:0.45rem 0.75rem; border:1.5px solid #d1d5db; border-radius:7px; font-size:0.85rem; font-family:inherit; }
.buch-filter-bar input { width:240px; }

.kat-section { margin-bottom:1.5rem; }
.kat-section h3 { font-size:0.85rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#888; margin-bottom:0.75rem; }
.kat-list { display:flex; flex-direction:column; gap:0.3rem; }
.kat-item { display:flex; align-items:center; gap:0.75rem; padding:0.6rem 0.9rem; background:#fff; border:1px solid #e5e7eb; border-radius:8px; }
.kat-item-name { flex:1; font-size:0.9rem; font-weight:500; }
.kat-system-badge { font-size:0.72rem; background:#f3f4f6; color:#888; border-radius:4px; padding:0.1rem 0.4rem; }

.buch-form, .kat-form {
  margin-top:1.25rem; padding:1.25rem; border:1px solid #e5e7eb; border-radius:10px; background:#fafafa;
}
.buch-form h3, .kat-form h3 { font-size:0.92rem; font-weight:700; margin-bottom:1rem; color:#374151; }

.bank-bar {
  display:flex; align-items:center; gap:1rem; flex-wrap:wrap;
  background:#fff; border:1px solid #e5e7eb; border-radius:10px;
  padding:0.9rem 1.2rem; margin-bottom:1.25rem;
}
.bank-bar-icon { font-size:1.4rem; line-height:1; }
.bank-bar-info { flex:1; min-width:0; }
.bank-bar-balance { font-size:1.25rem; font-weight:700; }
.bank-bar-balance.pos { color:#15803d; }
.bank-bar-balance.neg { color:#b91c1c; }
.bank-bar-balance.unknown { color:#888; }
.bank-bar-meta { font-size:0.78rem; color:#999; margin-top:0.15rem; }
.bank-bar-actions { display:flex; gap:0.5rem; align-items:center; }
#bankSyncMsg { font-size:0.82rem; color:#555; }

.tan-overlay {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.5);
  z-index:1000; align-items:center; justify-content:center;
}
.tan-overlay.open { display:flex; }
.tan-box {
  background:#fff; border-radius:12px; padding:2rem; max-width:440px; width:90%;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
}
.tan-box h3 { margin:0 0 0.75rem; font-size:1.05rem; }
.tan-challenge {
  background:#fffbeb; border:1px solid #fde68a; border-radius:8px;
  padding:0.75rem 1rem; font-size:0.9rem; margin-bottom:1rem;
  white-space:pre-wrap; word-break:break-word;
}
.tan-box input { width:100%; box-sizing:border-box; font-size:1rem; margin-bottom:0.75rem; }
.tan-box .btn-row { display:flex; gap:0.5rem; justify-content:flex-end; }

/* ── Seiten-spezifisch: Tab-Leiste (dokumente/mitglieder/newsletter) ─────── */
.ml-tabs { display:flex; gap:0; border-bottom:2px solid #f0f0f0; margin-bottom:1.5rem; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.ml-tabs::-webkit-scrollbar { display:none; }
.ml-tab { padding:0.6rem 1.2rem; font-size:0.88rem; font-weight:600; color:#888; cursor:pointer; border:none; background:none; border-bottom:2px solid transparent; margin-bottom:-2px; transition:color .15s, border-color .15s; white-space:nowrap; flex-shrink:0; }
.ml-tab.active { color:#1a1a2e; border-bottom-color:#ffd700; }
.ml-tab-panel { display:none; }
.ml-tab-panel.active { display:block; }
.badge-resigned { background:#f3f4f6; color:#6b7280; }

/* ── Seiten-spezifisch: Konfiguration ─────────────────────────────────────── */
.cfg-tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 1.75rem; }
.cfg-tab {
  background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 0.6rem 1.25rem; font-size: 0.9rem; font-weight: 600; color: #888; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.cfg-tab:hover { color: #333; }
.cfg-tab.active { color: #ffd700; border-bottom-color: #ffd700; }
.au-menu-trigger {
  background: none; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0.15rem 0.55rem; font-size: 1.1rem; line-height: 1;
  color: #555; cursor: pointer; letter-spacing: 0.05em;
}
.au-menu-trigger:hover { background: #f3f4f6; border-color: #d1d5db; }
.au-menu-wrap { position: relative; display: inline-block; }
.au-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  min-width: 200px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  padding: 0.3rem 0; display: none;
}
.au-menu.open { display: block; }
.au-menu button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.5rem 1rem; background: none; border: none; text-align: left;
  font-size: 0.88rem; color: #374151; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.au-menu button:hover { background: #f9fafb; }
.au-menu button.au-menu-danger { color: #dc2626; }
.au-menu button.au-menu-danger:hover { background: #fef2f2; }
.au-menu .au-menu-sep { height: 1px; background: #f0f0f0; margin: 0.25rem 0; }
.bank-found-badge {
  display:inline-flex; align-items:center; gap:0.4rem;
  background:#f0fdf4; border:1px solid #86efac; border-radius:6px;
  padding:0.35rem 0.75rem; font-size:0.82rem; color:#15803d; font-weight:500; margin-top:0.4rem;
}

/* ── Seiten-spezifisch: Einstellungen ─────────────────────────────────────── */
.es-tabs { display:flex; gap:0; border-bottom:2px solid #f0f0f0; margin-bottom:1.5rem; flex-wrap:wrap; }
.es-tab  { background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px; padding:0.6rem 1.1rem; font-size:0.9rem; font-weight:500; color:#888; cursor:pointer; transition:color .15s; }
.es-tab:hover  { color:#333; }
.es-tab.active { color:#ffd700; border-bottom-color:#ffd700; }

/* ── Seiten-spezifisch: Spiele ─────────────────────────────────────────────── */
.bvb-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid #e5e7eb; border-top-color: #ffd700;
  border-radius: 50%; animation: btn-spin .8s linear infinite;
  vertical-align: middle; margin-right: 0.5rem; flex-shrink: 0;
}

/* ── Seiten-spezifisch: Zuteilung ──────────────────────────────────────────── */
.mso { padding:.7rem 1rem; cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-size:.9rem; border-bottom:1px solid #f5f5f5; }
.mso:hover, .mso:active { background:#fffbea; }
.mso-clr { color:#888; font-style:italic; }
.mso-grp { padding:.3rem 1rem; font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#9ca3af; background:#f9fafb; border-bottom:1px solid #f0f0f0; }
.ms-input.ms-open { border-color:#7c3aed !important; box-shadow:0 0 0 2px rgba(124,58,237,.18); }

/* ── Seiten-spezifisch: Antrag ────────────────────────────────────────────── */
.decision-form { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ── Seiten-spezifisch: Einstellungen / 2FA (gemeinsam genutzt) ───────────── */
.setup-banner {
  background: #fffbea; border: 1.5px solid #ffd700; border-radius: 10px;
  padding: 1.4rem; margin-bottom: 1.5rem;
}
.code-input-mono {
  letter-spacing: 0.25em; font-family: monospace; font-size: 1.3rem;
  font-weight: 700; text-align: center;
}
.totp-qr-img {
  display: block; border-radius: 8px; margin-bottom: 1rem; max-width: 200px;
  border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Seiten-spezifisch: Mitglied ───────────────────────────────────────────── */
.member-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.member-status-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.edit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }

/* ── Seiten-spezifisch: Mitglieder ─────────────────────────────────────────── */
.notes-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-toolbar { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem 0.6rem; flex-wrap: wrap; }
.member-search {
  flex: 1; min-width: 240px; max-width: 440px; padding: 0.6rem 1rem;
  border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 0.92rem;
  font-family: inherit; background: #fafafa; transition: border-color 0.2s, background 0.2s;
}
.member-search:focus { outline: none; border-color: #ffd700; background: #fff; }
.member-count {
  font-size: 0.8rem; color: #9ca3af; white-space: nowrap;
  display: inline-flex; align-items: center; padding: 0.25rem 0.7rem;
  border-radius: 99px; border: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.member-count.active { color: #1a1a2e; border-color: #d1d5db; background: #fff; }
th[data-col]:hover { background: #f9fafb; }
th[data-col].sorted { color: #1a1a2e; }
th .sort-icon { font-size: 0.7rem; color: #9ca3af; margin-left: 0.2rem; }
th[data-col].sorted .sort-icon { color: #1a1a2e; }

/* ── Seiten-spezifisch: Spiele / Zuteilung / Kontoführung (spiele.css) ────── */
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.2rem; }
.dt-input { font-family: monospace; letter-spacing: 0.05em; }
.spiele-toolbar { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 0; border-bottom: 1px solid #e5e7eb; flex-wrap: wrap; }

.sf-search {
  min-width: 180px; max-width: 280px; padding: 0.5rem 0.85rem;
  border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 0.9rem;
  font-family: inherit; background: #fafafa; transition: border-color 0.2s, background 0.2s;
}
.sf-search:focus { outline: none; border-color: #ffd700; background: #fff; }
.sf-select {
  padding: 0.5rem 0.75rem; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 0.88rem; font-family: inherit; background: #fafafa; color: #374151;
  cursor: pointer; transition: border-color 0.2s;
}
.sf-select:focus { outline: none; border-color: #ffd700; }
.sf-pills { display: flex; gap: 0; border: 1.5px solid #d1d5db; border-radius: 8px; overflow: hidden; }
.sf-pill {
  padding: 0.48rem 0.85rem; font-size: 0.85rem; font-family: inherit; font-weight: 500;
  background: #fafafa; border: none; border-right: 1px solid #d1d5db; color: #6b7280;
  cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.sf-pill:last-child { border-right: none; }
.sf-pill:hover { background: #f3f4f6; color: #111; }
.sf-pill.active { background: #1a1a2e; color: #ffd700; font-weight: 600; }
.sf-reset {
  padding: 0.48rem 0.85rem; font-size: 0.85rem; font-family: inherit; background: none;
  border: 1.5px solid #d1d5db; border-radius: 8px; color: #6b7280;
  cursor: pointer; transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.sf-reset:hover { border-color: #888; color: #111; }
.spiele-count {
  font-size: 0.8rem; color: #9ca3af; white-space: nowrap;
  display: inline-flex; align-items: center; padding: 0.25rem 0.7rem;
  border-radius: 99px; border: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.spiele-count.active { color: #1a1a2e; border-color: #d1d5db; background: #fff; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 6px; font-size: 1rem; line-height: 1;
  text-decoration: none; background: none; border: 1px solid #d1d5db; color: #555;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.icon-btn:hover { border-color: #888; background: #f4f6f9; color: #000; }
.icon-btn-danger { border-color: #fca5a5; color: #dc2626; }
.icon-btn-danger:hover { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.icon-btn-success { border-color: #86efac; color: #15803d; background: #f0fdf4; }
.icon-btn-success:hover { border-color: #22c55e; background: #dcfce7; }
.icon-btn-muted { border-color: #fca5a5; color: #dc2626; }
.icon-btn-muted:hover { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }

.spiel-tabs { display: flex; border-bottom: 2px solid #e5e7eb; margin: 1rem 0 1.5rem; gap: 0; }
.spiel-tab {
  padding: 0.55rem 1.4rem; font-size: 0.9rem; font-weight: 500; color: #6b7280;
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.spiel-tab:hover { color: #111; }
.spiel-tab.active { color: #1a1a2e; border-bottom-color: #ffd700; font-weight: 600; }

.ms { position: relative; display: inline-block; }
.alloc-table td:not(:last-child) { white-space: nowrap; }
.price-display { font-size: 0.82rem; }
.price-edit-btn {
  background: none; border: none; cursor: pointer; padding: 0.1rem 0.25rem;
  color: #9ca3af; font-size: 0.82rem; vertical-align: middle; line-height: 1;
}
.price-edit-btn:hover { color: #333; }
.price-input {
  width: 120px; padding: 0.3rem 0.5rem; font-size: 0.88rem; font-family: inherit;
  border: 1.5px solid #ffd700; border-radius: 4px; outline: none;
}
.price-original { display: block; font-size: 0.72rem; color: #9ca3af; margin-top: 0.1rem; white-space: nowrap; }
.seat-assign-form { min-width: 200px; }
.seat-assign-form .ms { flex: 1; display: block; }
.seat-assign-form .ms-input { width: 100%; box-sizing: border-box; min-width: 130px; font-size: 0.92rem; padding: 0.45rem 0.7rem; }
.seat-assign-form .ms-input[readonly] { cursor: default; }
.ms-input {
  font-size: 0.88rem; padding: 0.38rem 0.6rem; border: 1.5px solid #d1d5db;
  border-radius: 6px; width: 200px; font-family: inherit; color: #888;
}
.ms-input.ms-has-value { color: #15803d; border-color: #86efac; background: #f0fdf4; }
.ms-input:focus { outline: none; border-color: #ffd700; }
.ms-drop {
  display: none; position: fixed; z-index: 9000; min-width: 280px; max-height: 320px;
  overflow-y: auto; background: #fff; border: 1.5px solid #d1d5db; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
}
.ms-opt {
  padding: 0.6rem 0.9rem; font-size: 0.88rem; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid #f3f4f6;
}
.ms-opt:last-child { border-bottom: none; }
.ms-opt:hover { background: #f4f6f9; }
.ms-clear { color: #999; font-style: italic; }
.ms-grp {
  padding: 0.3rem 0.9rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #bbb; background: #f8f8f8; border-top: 1px solid #f0f0f0;
}
.ms-qty {
  font-size: 0.78rem; color: #666; white-space: nowrap; background: #f1f5f9;
  padding: 0.15rem 0.5rem; border-radius: 99px; font-weight: 600;
}

.upload-tabs { display: flex; gap: 0; margin: -1.1rem -1.1rem 1.1rem; border-bottom: 1px solid #f0f0f0; }
.upload-tab {
  padding: 0.6rem 1.2rem; font-size: 0.85rem; font-weight: 500; color: #6b7280;
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.upload-tab:hover { color: #111; }
.upload-tab.active { color: #1a1a2e; border-bottom-color: #ffd700; font-weight: 600; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
.nav-toggle {
  display: none !important;
  background: none; border: none; color: #ffd700;
  font-size: 1.5rem; cursor: pointer; padding: 0.2rem 0.5rem; line-height: 1;
  flex-shrink: 0;
}

.m-br { display: none; }
.d-sep { display: inline; color: #ccc; }

.doc-actions { display: flex; flex-direction: row; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.banner-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }


@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .grid-1-2 { grid-template-columns: 1fr; }
  .grid-auto-2 { grid-template-columns: 1fr; }
  .edit-form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .kf-summary-cards { grid-template-columns: 1fr; }
  .kf-cat-grid { grid-template-columns: 1fr; }
  .spiele-toolbar { padding-left: 0; padding-right: 0; }
  .sf-search { min-width: 0; max-width: none; flex: 1; }
  .sf-select { flex: 1; }
  .ms-input { width: 140px; }
  .m-br { display: block; height: 0; }
  .d-sep { display: none; }
  .doc-actions { flex-direction: column; align-items: flex-end; gap: 0.3rem; }
  .banner-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }

  main { padding: 1rem; }
  h1 { font-size: 1.2rem; margin-bottom: 1rem; }
  .card { padding: 1rem; }
  .card table, .card-flush table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  dl.details, dl.details-140, dl.details-180, dl.details-200 { grid-template-columns: 110px 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .filter-tabs { gap: 0.3rem; }
  .filter-tab { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .nav-toggle { margin-left: auto; }
  dl.details, dl.details-140, dl.details-180, dl.details-200 { grid-template-columns: 1fr; }
  dl.details dt { margin-top: 0.5rem; }
  dl.details dd { padding-bottom: 0.25rem; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .fc .fc-toolbar { flex-wrap: wrap; gap: 0.4rem; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .fc .fc-button { padding: 0.3rem 0.55rem; font-size: 0.8rem; }
  .fc .fc-list-event-title { font-size: 0.85rem; }
  .fc .fc-list-day-text, .fc .fc-list-day-side-text { font-size: 0.82rem; }
}
