:root {
  color-scheme: light;
  --primary: #a3352b;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, white);
  --primary-dark: color-mix(in srgb, var(--primary) 80%, black);
  --bg: #f5f3f1;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b6560;
  --line: #e7e2de;
  --line-strong: #d6cfc9;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --info: #1d4ed8;
  --info-soft: #dbeafe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 4px 16px rgba(28, 25, 23, .05);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h3 { font-size: 16px; margin-bottom: 12px; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: #f1edea; padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-line; }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  font: 600 14px/1.2 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #faf8f6; border-color: #c7bfb8; text-decoration: none; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 1px;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .04); }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px;
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); color: var(--text); }

/* ---------- Formulare ---------- */
label { display: block; margin-bottom: 14px; }
label > span, .label { display: block; font-size: 13px; font-weight: 600; color: #44403c; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  font: 15px/1.4 var(--font); color: var(--text);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
}
textarea { resize: vertical; }
input[type=color] { padding: 4px; width: 64px; height: 42px; cursor: pointer; }
input[type=radio], input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--primary); }
label.check { display: flex; align-items: center; gap: 10px; padding-top: 28px; }
label.check > span { margin: 0; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
label.inline > span { margin: 0; white-space: nowrap; }
label.inline select { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span2 { grid-column: span 2; }
fieldset.box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 2px; margin: 4px 0 16px; }
legend { font-weight: 600; font-size: 13px; padding: 0 6px; color: var(--muted); }
.form-error { color: var(--bad); background: var(--bad-soft); padding: 9px 12px; border-radius: 9px; font-size: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.hint { font-size: 13px; color: var(--muted); background: #faf8f6; border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.calc { font-weight: 600; color: var(--primary); min-height: 1.5em; }
.color-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-field > span { width: 100%; }

.seg { display: inline-flex; background: #ece8e4; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg label span {
  display: block; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px;
  font: 600 13px var(--font); color: var(--muted); cursor: pointer; margin: 0;
}
.seg label { margin: 0; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg button.active, .seg label input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg label input:focus-visible + span { outline: 2px solid var(--primary); }
.seg-field { margin-bottom: 14px; }

.temp-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.temp-choice .label { grid-column: 1 / -1; margin: 0; }
.temp { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; cursor: pointer; }
.temp input { position: absolute; opacity: 0; }
.temp strong { display: block; }
.temp small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.temp:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.temp:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth.single { grid-template-columns: 1fr; place-items: center; padding: 24px 16px; }
.auth-brand {
  background: linear-gradient(150deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #1c1917));
  color: #fff; padding: 64px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center;
}
.auth-brand h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.02em; }
.auth-brand > p { font-size: 18px; opacity: .9; max-width: 460px; }
.auth-logo { width: 96px; height: 96px; border-radius: 24px; margin-bottom: 24px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22), 0 10px 30px rgba(0, 0, 0, .25); background: #fff; object-fit: contain; }
.auth-logo.small { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 16px; box-shadow: none; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-points .icon { width: 22px; height: 22px; padding: 4px; box-sizing: content-box; background: rgba(255, 255, 255, .15); border-radius: 8px; }
.auth-card { align-self: center; justify-self: center; width: min(420px, 100% - 32px); background: var(--surface); padding: 32px; border-radius: 20px; box-shadow: var(--shadow); margin: 24px 0; }
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-card .btn.block { margin-top: 6px; }

/* ---------- Startseite ---------- */
.landing-hero {
  display: grid; justify-items: center; text-align: center; padding: 72px 20px 80px; color: #fff;
  background: linear-gradient(150deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #1c1917));
}
.landing-hero h1 { font-size: clamp(38px, 7vw, 64px); letter-spacing: -.02em; margin: 0; }
.landing-hero p { font-size: 18px; opacity: .92; max-width: 560px; margin: 8px 0 0; }
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.landing-actions .btn { min-height: 48px; padding: 12px 28px; font-size: 16px; }
.btn.landing-cta { background: #fff; border-color: #fff; color: var(--primary); }
.btn.landing-cta:hover { background: #f5f3f1; border-color: #f5f3f1; }
.btn.landing-install { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn.landing-install:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.landing-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
  max-width: 1040px; margin: -40px auto 0; padding: 0 16px 48px;
}
.landing-features .panel { margin: 0; }
.landing-features .icon { width: 24px; height: 24px; color: var(--primary); }
.landing-features h2 { font-size: 17px; margin: 10px 0 4px; }
.landing-features p { margin: 0; }

/* ---------- Info-Startseite ---------- */
.site-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; }
.site-brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.site-hero {
  display: grid; justify-items: center; text-align: center; padding: 64px 20px; color: #fff;
  background: linear-gradient(150deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #1c1917));
}
.site-hero h1 { font-size: clamp(34px, 7vw, 58px); letter-spacing: -.02em; margin: 0; }
.site-hero p { font-size: 18px; opacity: .92; max-width: 600px; margin: 10px 0 0; }
.site-main { display: grid; gap: 40px; max-width: 860px; margin: 0 auto; padding: 40px 16px; }
.site-main h2 { font-size: 26px; margin: 0 0 12px; letter-spacing: -.01em; }
.site-main p { margin: 0 0 10px; }
.site-next { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); }
.site-next .icon { color: var(--primary); }
.site-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-benefits li { display: flex; gap: 10px; }
.site-benefits .icon { color: var(--primary); margin-top: 3px; }
.site-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.site-quotes figure { margin: 0; }
.site-quotes blockquote { margin: 0 0 10px; font-size: 16px; }
.site-quotes figcaption { font-size: 13px; color: var(--muted); }
.site-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.site-photos figure { margin: 0; }
.site-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.site-photos figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.site-form { display: grid; gap: 12px; }
.site-form .btn { justify-self: start; }
.site-trap { position: absolute; left: -9999px; }
.site-contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.site-foot { display: flex; justify-content: center; gap: 20px; padding: 20px 16px 32px; font-size: 14px; }
.site-legal { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.site-pre { white-space: pre-line; }
.site-admin-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.site-admin-list li { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.site-admin-list img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: #1f1a17; color: #e7e2de; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; color: #fff; text-decoration: none !important; }
.brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; object-fit: contain; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 12px; color: #a8a29e; }
.nav { display: grid; gap: 2px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #d6d3d1; font-weight: 500; text-decoration: none; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
[data-install][hidden] { display: none; }
.nav-install {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: auto; margin-bottom: 8px; padding: 10px 12px;
  background: transparent; border: 0; border-radius: 10px; color: #d6d3d1; font: 500 14px/1.2 var(--font); text-align: left; cursor: pointer;
}
.nav-install:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-install:not([hidden]) + .me { margin-top: 0; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.me-link { flex: 1; display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; padding: 6px; border-radius: 10px; text-decoration: none !important; }
.me-link:hover { background: rgba(255, 255, 255, .07); }
.me-link span { min-width: 0; }
.me-link strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-link small { color: #a8a29e; font-size: 12px; }
.me .icon-btn { color: #a8a29e; }
.me .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 22px; flex: 1; letter-spacing: -.01em; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }
.view { padding: 24px 32px 48px; max-width: 1240px; }
.scrim { display: none; }

/* ---------- Bausteine ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel.highlight { border-color: color-mix(in srgb, var(--primary) 30%, white); background: var(--primary-soft); }
.panel.sticky { position: sticky; top: 84px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.cols-profile { grid-template-columns: 1.2fr 1fr; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 12px; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello h2 { font-size: 26px; letter-spacing: -.01em; }
.hello p { margin: 4px 0 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpis-compact { grid-template-columns: repeat(auto-fill, minmax(220px, 260px)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi.accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.kpi.accent .kpi-label, .kpi.accent .kpi-sub { color: rgba(255, 255, 255, .85); }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }

.chart { width: 100%; height: auto; max-height: 300px; }
.chart .bar { fill: var(--primary); }
.chart .bar:hover { fill: var(--primary-dark); }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { font: 12px var(--font); fill: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.next-meeting .big { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.checks { padding-left: 0; list-style: none; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1edea; color: #57534e; white-space: nowrap; }
.badge.st-offen { background: var(--info-soft); color: var(--info); }
.badge.st-kontaktiert { background: #ede9fe; color: #6d28d9; }
.badge.st-angebot, .badge.gs-nachfassen { background: var(--warn-soft); color: var(--warn); }
.badge.st-gewonnen, .badge.att-anwesend, .badge.att-vertreten, .badge.gs-mitglied { background: var(--ok-soft); color: var(--ok); }
.badge.st-verloren, .badge.att-abwesend, .badge.gs-kein_interesse { background: var(--bad-soft); color: var(--bad); }
.badge.temp-heiss { background: #fee2e2; color: #b91c1c; }
.badge.temp-warm { background: #ffedd5; color: #c2410c; }
.badge.temp-kalt { background: #e0f2fe; color: #0369a1; }
.badge.guest, .badge.role-guest { background: #fef3c7; color: #92400e; }
.badge.role-admin { background: var(--primary-soft); color: var(--primary); }
.badge.gs-besucht { background: #ede9fe; color: #6d28d9; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; background: #eee; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 5px 12px; font: 500 13px var(--font); cursor: pointer; color: var(--muted); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search { max-width: 460px; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaf9; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
.table td.row-actions > * { vertical-align: middle; margin-left: 4px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.me td { background: var(--primary-soft); }
.table tr.inactive td { opacity: .55; }
.note { margin-top: 4px; padding: 4px 8px; background: #faf8f6; border-radius: 6px; }
.person { display: flex; align-items: center; gap: 10px; color: inherit; }
.person span span { display: block; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff; }
.medal.m1 { background: #d4a017; }
.medal.m2 { background: #9ca3af; }
.medal.m3 { background: #b07a4a; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Mitglieder */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.member-card {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 5px solid var(--card-accent); transition: transform .15s, box-shadow .15s;
}
.member-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(28, 25, 23, .1); }
.member-info { min-width: 0; display: flex; flex-direction: column; }
.member-info > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card .badge { position: absolute; top: 10px; right: 10px; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 600; }
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; padding: 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); border-top: 5px solid var(--card-accent); box-shadow: var(--shadow); }
.profile-head h2 { font-size: 24px; }
.profile-head .lead { font-size: 16px; font-weight: 500; margin: 2px 0; }
.profile-head p { margin: 0; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.contact { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0; }
.contact dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.contact dd { margin: 0; word-break: break-word; }
.card-preview { width: 100%; aspect-ratio: 85 / 55; height: auto; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); display: block; margin-bottom: 16px; background: #f1edea; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.media-row { margin-bottom: 8px; }
.media-field { margin-bottom: 16px; }
.media-box { display: flex; align-items: center; min-height: 80px; margin-bottom: 8px; }
.logo-box img { max-height: 72px; max-width: 200px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.media-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.media-actions label.btn { margin: 0; }

/* Treffen */
.meeting-row { flex-wrap: nowrap; }
.date-tile { width: 54px; flex: none; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.date-tile span { display: block; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.date-tile strong { display: block; font-size: 20px; padding: 2px 0; }
.att-row { flex-wrap: wrap; }
.seg-att label span { padding: 6px 10px; }
.sub-input { max-width: 220px; min-height: 34px; padding: 5px 10px; }

/* Gäste */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.pipe { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); border-top: 4px solid #d6d3d1; }
.pipe strong { display: block; font-size: 24px; }
.pipe span { font-size: 13px; color: var(--muted); }
.pipe-besucht { border-top-color: #7c3aed; }
.pipe-nachfassen { border-top-color: #d97706; }
.pipe-mitglied { border-top-color: #16a34a; }
.pipe-kein_interesse { border-top-color: #dc2626; }

/* ---------- Dialoge & Meldungen ---------- */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 64px rgba(0, 0, 0, .25); color: var(--text); }
.modal.wide { width: min(760px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(28, 25, 23, .45); backdrop-filter: blur(2px); }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 24px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 10px; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 8px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
.toast { background: #1c1917; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-weight: 500; transition: opacity .4s, transform .4s; }
.toast.error { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }

.loading { display: grid; place-items: center; min-height: 40vh; }
.loading span { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Zugangsblatt */
.sheet-preview { border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 12px 0; background: #fff; }
.sheet-head { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--primary); padding-bottom: 14px; margin-bottom: 16px; }
.sheet-head img { width: 64px; height: 64px; border-radius: 14px; }
.sheet-head h1 { font-size: 24px; }
.sheet-head p { margin: 0; color: var(--muted); }
.sheet h2 { font-size: 18px; margin-bottom: 8px; }
.sheet-table { border-collapse: collapse; margin: 12px 0 16px; }
.sheet-table th { text-align: left; padding: 6px 20px 6px 0; color: var(--muted); font-weight: 600; }
.sheet-table td { padding: 6px 0; font-size: 16px; }
.sheet-table code { font-size: 17px; padding: 3px 8px; }
.sheet ol { padding-left: 20px; }
.sheet-foot { font-size: 12px; color: var(--muted); margin-top: 16px; }
#print-area { display: none; }

@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; padding: 10mm; }
  body.printing { background: #fff; }
  @page { size: A4; margin: 12mm; }
}

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .cols, .cols-profile { grid-template-columns: 1fr; }
  .panel.sticky { position: static; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .4); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar h1 { font-size: 19px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .view { padding: 16px 16px 40px; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 36px 20px 28px; }
  .auth-points { display: none; }
  .auth-logo { width: 64px; height: 64px; margin-bottom: 14px; }
  .auth-card { margin-top: -12px; padding: 24px 20px; }

  /* Tabellen werden zu Karten */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table td { padding: 3px 0; border: 0; text-align: left !important; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; font-weight: 600; }
  .table td.row-actions { padding-top: 8px; text-align: left; white-space: normal; }
  .table td.row-actions > *:first-child { margin-left: 0; }
  .leaderboard td:first-child { display: inline-block; width: auto; margin-right: 8px; }
  .leaderboard td:nth-child(2) { display: inline-block; width: auto; margin-bottom: 6px; }
  .leaderboard td.num { display: inline-block; width: auto; margin-right: 14px; }
  .table tr.me { background: var(--primary-soft); }
  .table tr.me td { background: transparent; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .temp-choice { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 21px; }
  .profile-actions { margin-left: 0; width: 100%; }
  .profile-actions .btn { flex: 1; }
  .seg-period { width: 100%; }
  .seg-period button { flex: 1; padding: 6px 6px; }
  .contact { grid-template-columns: 1fr; gap: 0; }
  .contact dd { margin-bottom: 8px; }
  label.check { padding-top: 0; }
}
