/* =========================================================
   Book4Date – Gestaltung
   Petrol als Vereinsfarbe, Signalgelb wie Hallenmarkierungen,
   Barlow (lokal eingebunden, keine externen Anfragen).
   ========================================================= */

@font-face { font-family: "Barlow"; src: url("fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #EDF1F2;
  --surface: #FFFFFF;
  --surface-2: #F5F8F8;
  --ink: #10252B;
  --muted: #5B6E74;
  --line: #DCE3E5;
  --petrol: #0E4D5C;
  --petrol-deep: #093944;
  --petrol-soft: #DFEDEF;
  --signal: #FFC83D;
  --signal-deep: #E3A600;
  --signal-soft: #FFF4D1;
  --yes: #138A55;
  --yes-soft: #DCF2E6;
  --no: #C93A32;
  --no-soft: #FBE3E1;
  --guest: #8F5B00;
  --guest-soft: #FFEFC7;
  --focus: #2D8FA6;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(9, 57, 68, .06);
  --shadow-2: 0 10px 30px -12px rgba(9, 57, 68, .28);
  --sidebar: 264px;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: light;
}
/* Umschaltbar über data-theme an <html>: "light", "dark" oder ohne Angabe = Systemeinstellung */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A181C;
    --surface: #11252A;
    --surface-2: #163037;
    --ink: #E3EEF0;
    --muted: #8DA4AA;
    --line: #223D44;
    --petrol: #3E9DB1;
    --petrol-deep: #06242B;
    --petrol-soft: #173A42;
    --signal-soft: #3A3115;
    --yes: #4FCB8C;
    --yes-soft: #163A2A;
    --no: #F08479;
    --no-soft: #3D2120;
    --guest: #F2B84B;
    --guest-soft: #3A2E12;
    --shadow-1: none;
    --shadow-2: 0 14px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0A181C;
    --surface: #11252A;
    --surface-2: #163037;
    --ink: #E3EEF0;
    --muted: #8DA4AA;
    --line: #223D44;
    --petrol: #3E9DB1;
    --petrol-deep: #06242B;
    --petrol-soft: #173A42;
    --signal-soft: #3A3115;
    --yes: #4FCB8C;
    --yes-soft: #163A2A;
    --no: #F08479;
    --no-soft: #3D2120;
    --guest: #F2B84B;
    --guest-soft: #3A2E12;
    --shadow-1: none;
    --shadow-2: 0 14px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 "Barlow", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--petrol); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 700 2.5rem/1 var(--cond); letter-spacing: .005em; }
h2 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
code { background: var(--petrol-soft); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; }

/* ---------- Rahmen: Seitenleiste + Inhalt ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 16px 16px;
  background: var(--petrol-deep); color: #fff;
}
.main { margin-left: var(--sidebar); min-width: 0; }
.content { max-width: 1180px; padding: 36px 40px 64px; }
.mobilebar { display: none; }
.scrim { display: none; }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: .01em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.sidebar .brand { padding: 0 8px; }

.club-switch { display: grid; gap: 6px; }
.club-label { font-size: .8rem; color: rgba(255,255,255,.6); padding: 0 8px; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap > .ic { position: absolute; left: 12px; pointer-events: none; }
.select-wrap select { width: 100%; padding-left: 40px; }
.sidebar .select-wrap select {
  background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.16); font-weight: 600;
}
.sidebar .select-wrap select:disabled { opacity: 1; background-image: none; }
.sidebar .select-wrap select option { color: #10252B; }
.sidebar .select-wrap > .ic { color: var(--signal); }

.nav { display: grid; gap: 2px; }
.nav-sep { font-size: .8rem; color: rgba(255,255,255,.5); padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: rgba(255,255,255,.82); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: var(--signal); color: var(--petrol-deep); font-weight: 700; }

.me { margin-top: 10px; display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.me-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); color: #fff; text-decoration: none; }
.me-link:hover, .me-link.active { background: rgba(255,255,255,.08); }
.me-name { min-width: 0; display: grid; font-weight: 600; line-height: 1.2; }
.me-name, .me-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name small { font-weight: 400; color: rgba(255,255,255,.6); }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 6px 0 0; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Piktogramm-Schaltflächen ---------- */
.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; padding: 0;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.icon-btn:hover { background: var(--petrol-soft); border-color: var(--petrol-soft); color: var(--petrol); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .35; cursor: default; transform: none; background: var(--surface); }
.icon-btn.solid { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.icon-btn.solid:hover { background: var(--petrol-deep); border-color: var(--petrol-deep); }
.icon-btn.ghost { background: transparent; border-color: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.ghost:hover { background: var(--petrol-soft); color: var(--petrol); }
.icon-btn.danger { color: var(--no); }
.icon-btn.danger:hover { background: var(--no-soft); border-color: var(--no-soft); color: var(--no); }
.icon-btn.solid.danger { background: var(--no); border-color: var(--no); color: #fff; }
.icon-btn.xl { width: 60px; height: 60px; border-radius: 50%; }
.icon-btn.xl .ic { width: 26px; height: 26px; }
.icon-btn.on-dark { background: transparent; border-color: transparent; color: rgba(255,255,255,.75); }
.icon-btn.on-dark:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Tooltip mit der Beschriftung */
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: 7px;
  background: var(--petrol-deep); color: #fff;
  font: 500 .8rem/1.2 "Barlow", sans-serif; white-space: nowrap;
  pointer-events: none; z-index: 60;
  display: none;            /* unsichtbare Tooltips dürfen keinen Scrollbalken auslösen */
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { display: block; transform: translate(-50%, 0); animation: tip-in .12s ease-out; }
@keyframes tip-in { from { opacity: 0; } }
/* Am rechten Rand rechtsbündig, damit nichts über den Rand ragt */
.actions [data-tip]::after, .toolbar [data-tip]::after, .group-links [data-tip]::after,
.dlg-actions [data-tip]::after, .form-end [data-tip]::after, .test-row [data-tip]::after,
.club-card-actions .push [data-tip]::after, .panel-foot [data-tip]::after { left: auto; right: 0; transform: none !important; }
.sidebar [data-tip]::after, .mobilebar [data-tip]::after, .dlg-head [data-tip]::after { bottom: auto; top: calc(100% + 8px); }
.me [data-tip]::after { top: auto; bottom: calc(100% + 8px); left: auto; right: 0; transform: none; }

/* ---------- Terminliste ---------- */
.events { display: grid; gap: 12px; }
.ev {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 118px auto;
  gap: 22px; align-items: center;
  padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  scroll-margin-top: 80px;
}
.ev.mine-yes { box-shadow: inset 5px 0 0 var(--yes), var(--shadow-1); }
.ev.mine-no  { box-shadow: inset 5px 0 0 var(--no), var(--shadow-1); }

.ev-date {
  display: grid; justify-items: center; align-content: center;
  height: 84px; border-radius: 12px;
  background: var(--petrol-soft); color: var(--petrol);
}
.ev-date .wd, .ev-date .mon { font-size: .8rem; font-weight: 600; line-height: 1; }
.ev-date .day { font: 700 2.4rem/1 var(--cond); margin: 2px 0; }

.ev-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-title h2 { font-size: 1.2rem; font-weight: 700; }
.ev-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; margin: 2px 0 10px; }
.ev-meta span { display: inline-flex; align-items: center; gap: 5px; }

.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px 2px 2px; border-radius: 999px;
  background: var(--yes-soft); color: var(--ink); font-size: .9rem; font-weight: 500;
}
.person .plus { font-weight: 700; color: var(--guest); }
.person.guest { background: var(--guest-soft); padding-left: 8px; color: var(--guest); }
.declined { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.declined .ic { color: var(--no); }

.ev-count { display: grid; justify-items: center; text-align: center; line-height: 1.15; }
.ev-count .big { font: 700 2.6rem/1 var(--cond); color: var(--petrol); }
.ev-count .lbl { font-weight: 600; }
.ev-count .split { font-size: .78rem; color: var(--muted); margin-top: 2px; }

.ev-act { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.rsvp { display: flex; gap: 6px; }
.rsvp .icon-btn { width: 46px; height: 46px; border-radius: 50%; }
.rsvp .rsvp-yes:hover { background: var(--yes-soft); border-color: var(--yes-soft); color: var(--yes); }
.rsvp .rsvp-no:hover  { background: var(--no-soft);  border-color: var(--no-soft);  color: var(--no); }
.rsvp .rsvp-yes[aria-pressed="true"] { background: var(--yes); border-color: var(--yes); color: #fff; }
.rsvp .rsvp-no[aria-pressed="true"]  { background: var(--no);  border-color: var(--no);  color: #fff; }

.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.stepper .icon-btn { width: 36px; height: 36px; border-radius: 50%; border-color: transparent; background: transparent; }
.stepper .icon-btn:hover:not(:disabled) { background: var(--surface); color: var(--petrol); }
.guest-field { position: relative; display: inline-flex; align-items: center; gap: 2px; color: var(--guest); }
.guest-input {
  width: 42px; padding: 0; border: 0; background: transparent; text-align: center;
  font: 700 1.15rem/1 "Barlow", sans-serif; color: var(--ink); min-height: 36px;
  -moz-appearance: textfield; appearance: textfield;
}
.guest-input::-webkit-outer-spin-button, .guest-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Trenner zwischen späteren und vergangenen Terminen */
.ev-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; font-weight: 600; margin: 6px 0 -2px; }
.ev-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Vergangene Termine: nur noch zur Ansicht */
.ev-past { background: var(--surface-2); box-shadow: none; }
.ev-past .ev-date { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.ev-past .ev-title h2, .ev-past .ev-count .big { color: var(--muted); }
.ev-past .person { background: var(--surface); border: 1px solid var(--line); }
.ev-past.mine-yes, .ev-past.mine-no { box-shadow: none; }
.past-status { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.past-status.yes .ic { color: var(--yes); }
.past-status.no .ic { color: var(--no); }

/* Deaktivierte Termine: fällt aus */
.ev-off { background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface) 12px 24px); box-shadow: none; }
.ev-off .ev-date { background: var(--no-soft); color: var(--no); }
.ev-off .ev-title h2 { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.ev-off .ev-meta { margin-bottom: 6px; }
.off-note { margin: 0; color: var(--no); font-weight: 600; font-size: .92rem; }
.ev-count.off { color: var(--no); }
.ev-count.off .off-ic { width: 34px; height: 34px; opacity: .8; }

/* Mindestanzahl erreicht: grüner Rahmen + Etikett */
.tag.tag-ok { background: var(--yes-soft); border-color: transparent; color: var(--yes); }
.ev.min-ok { border-color: var(--yes); box-shadow: 0 0 0 1px var(--yes), var(--shadow-1); }
.ev.min-ok.mine-yes { box-shadow: inset 5px 0 0 var(--yes), 0 0 0 1px var(--yes), var(--shadow-1); }
.ev.min-ok.mine-no  { box-shadow: inset 5px 0 0 var(--no), 0 0 0 1px var(--yes), var(--shadow-1); }
.ev-next.min-ok { border-color: #6FE0A8; box-shadow: 0 0 0 2px #6FE0A8, var(--shadow-2); }
.ev-next.min-ok.mine-yes { box-shadow: inset 6px 0 0 var(--yes), 0 0 0 2px #6FE0A8, var(--shadow-2); }
.ev-next.min-ok.mine-no  { box-shadow: inset 6px 0 0 var(--no), 0 0 0 2px #6FE0A8, var(--shadow-2); }
.ev-next .tag.tag-ok { background: #6FE0A8; color: #093944; }
.ev-past.min-ok { border-color: color-mix(in srgb, var(--yes) 45%, var(--line)); box-shadow: none; }
.table tr.row-ok td:first-child { box-shadow: inset 3px 0 0 var(--yes); }
@media (max-width: 1199px) {
  .table.stack tr.row-ok { box-shadow: inset 3px 0 0 var(--yes); }
  .table.stack tr.row-ok td:first-child { box-shadow: none; }
}

/* Mindestanzahl */
.min-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .88rem; flex-wrap: wrap; }
.min-line .min-meter { width: 90px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.min-line .min-meter span { display: block; height: 100%; border-radius: 3px; }
.min-line.ok .min-meter span { background: var(--yes); }
.min-line.low .min-meter span { background: var(--guest); }
.min-line.ok .ic { color: var(--yes); }
.min-line.low .ic { color: var(--guest); }
.ev-next .min-line .min-meter { background: rgba(255,255,255,.2); }
.ev-next .min-line.ok .min-meter span, .ev-next .min-line.ok .ic { background: #6FE0A8; color: #6FE0A8; }
.ev-next .min-line.ok .ic { background: none; }
.ev-next .min-line.low .min-meter span { background: var(--signal); }
.ev-next .min-line.low .ic { color: var(--signal); }
.ev-past .min-line .min-meter span { opacity: .6; }
.min-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.min-badge.ok { color: var(--yes); }
.min-badge.low { color: var(--guest); }

/* Der nächste Termin steht im Vordergrund */
.ev-next {
  background: #0E4D5C; border-color: #0E4D5C; color: #fff;
  padding: 26px 26px; border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  margin: 10px 0;
}
.ev-next.mine-yes { box-shadow: inset 6px 0 0 var(--yes), var(--shadow-2); }
.ev-next.mine-no  { box-shadow: inset 6px 0 0 var(--no), var(--shadow-2); }
.ev-next .ev-date { height: 100px; background: var(--signal); color: var(--petrol-deep); }
.ev-next .ev-date .day { font-size: 3rem; }
.ev-next .ev-title h2 { font-size: 1.45rem; }
.ev-next .ev-meta, .ev-next .declined, .ev-next .muted, .ev-next .ev-count .split { color: rgba(255,255,255,.75); }
.ev-next .declined .ic { color: #FFB0A8; }
.ev-next .person { background: rgba(255,255,255,.14); color: #fff; }
.ev-next .person .plus, .ev-next .person.guest { color: var(--signal); }
.ev-next .person.guest { background: rgba(255,200,61,.16); }
.ev-next .ev-count .big { color: var(--signal); font-size: 3.4rem; }
.ev-next .icon-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.ev-next .icon-btn:hover:not(:disabled) { background: rgba(255,255,255,.2); color: #fff; }
.ev-next .icon-btn:disabled { background: transparent; }
.ev-next .rsvp .rsvp-yes[aria-pressed="true"] { background: var(--yes); border-color: #fff; }
.ev-next .rsvp .rsvp-no[aria-pressed="true"]  { background: var(--no);  border-color: #fff; }
.ev-next .stepper { background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.18); }
.ev-next .stepper .icon-btn { background: transparent; border-color: transparent; }
.ev-next .guest-field { color: var(--signal); }
.ev-next .guest-input { color: #fff; }
.ev-next .tag-signal { background: var(--signal); color: var(--petrol-deep); }

/* ---------- Aktiv/Inaktiv-Schalter ---------- */
.switch {
  position: relative; flex: none;
  width: 46px; height: 26px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--line);
  transition: background-color .18s, border-color .18s;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(9, 57, 68, .3);
  transition: transform .18s;
}
.switch.on { background: var(--yes); border-color: var(--yes); }
.switch.on .knob { transform: translateX(20px); }
.switch:hover:not(:disabled) { border-color: var(--petrol); }
.switch:disabled { cursor: default; opacity: .55; }
.switch-cell { width: 1%; }
.table tr.inactive td.switch-cell { opacity: 1; }
.switch-cell [data-tip]::after { left: 0; transform: translate(0, 4px); }
.switch-cell [data-tip]:hover::after, .switch-cell [data-tip]:focus-visible::after { transform: translate(0, 0); }
.club-card-head [data-tip]::after { left: auto; right: 0; transform: translate(0, 4px); }
.club-card-head [data-tip]:hover::after, .club-card-head [data-tip]:focus-visible::after { transform: translate(0, 0); }
.switch-cell form { margin: 0; }
.club-card-head form { margin: 0; }
.tag.tag-off { background: var(--no-soft); border-color: transparent; color: var(--no); }
.tag-struck { text-decoration: line-through; opacity: .65; }
.club-card.off { background: var(--surface-2); box-shadow: none; }
.club-card.off .club-ic, .club-card.off .stats dd { color: var(--muted); }
.club-card.off h2 { color: var(--muted); }
.stats dd small { font: 600 .85rem "Barlow", sans-serif; color: var(--muted); }
.select-wrap.narrow { min-width: 0; }
.inline-filter { margin: 0; flex-wrap: nowrap; }
.inline-filter .select-wrap { min-width: 150px; }
.ms-active { font-size: .85rem; white-space: nowrap; }

/* ---------- Serien ---------- */
.series-mark { display: inline-flex; vertical-align: middle; color: var(--petrol); margin-left: 4px; }
.series-sum { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-sm); background: var(--surface-2); }

/* ---------- Vereins-Chips mit Schalter, Gruppierung ---------- */
.switch.sm { width: 32px; height: 18px; }
.switch.sm .knob { top: 1px; left: 1px; width: 14px; height: 14px; }
.switch.sm.on .knob { transform: translateX(14px); }
.chips-col { display: flex; flex-wrap: wrap; gap: 6px; }
.club-chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.club-chip form { margin: 0; display: inline-flex; }
.club-chip a { color: var(--ink); text-decoration: none; }
.club-chip a:hover { text-decoration: underline; }
.club-chip.off { background: var(--surface-2); }
.club-chip.off a { color: var(--muted); text-decoration: line-through; }
.chip-role { font-size: .7rem; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--petrol-soft); color: var(--petrol); }
.chip-role.off { background: var(--no-soft); color: var(--no); }
.table tr.inactive td .club-chip { opacity: 1; }
.club-chip [data-tip]::after { left: 0; transform: translate(0, 4px); }
.club-chip [data-tip]:hover::after, .club-chip [data-tip]:focus-visible::after { transform: translate(0, 0); }

.seg-toggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg-toggle .icon-btn { width: 38px; height: 38px; border-color: transparent; background: transparent; color: var(--muted); border-radius: 9px; }
.seg-toggle .icon-btn.on { background: var(--petrol); color: #fff; }

.club-group .panel-head { cursor: pointer; }
.group-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.group-title h2 { font-size: 1.15rem; font-weight: 700; }
.group-links { display: inline-flex; align-items: center; gap: 2px; }
.club-group.off { background: var(--surface-2); }
.club-group.off h2 { color: var(--muted); }

/* ---------- Einstellungen ---------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%;
  padding: 4px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1);
}
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a.active { background: #0E4D5C; color: #fff; }
.tabs .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tabs .dot.ok { background: var(--yes); }
.tabs .dot.off { background: transparent; border: 1.5px solid currentColor; }
.tabs a.active .dot.ok { background: var(--signal); }
@media (max-width: 720px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabs a { justify-content: center; padding: 10px 8px; }
}
.tab-panel .form { gap: 18px; }
.form .row .grow2 { grid-column: span 2; }
.test-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.test-row .field { min-width: 260px; }
.test-row .push { flex: 1; }
textarea {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.5; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px color-mix(in srgb, var(--petrol) 22%, transparent); }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.ph { font: 600 .82rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 8px; border-radius: 7px; border: 1px dashed var(--petrol); background: var(--petrol-soft); color: var(--petrol); cursor: pointer; }
.ph:hover { background: var(--petrol); color: #fff; }
.tpl { padding-top: 6px; }
.tpl + .tpl { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.tpl-head h2 { margin-bottom: 2px; }
.form-end.gap { gap: 8px; }
.sysinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 22px 0 0; }
.sysinfo div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 14px; }
.sysinfo dt { font-size: .78rem; color: var(--muted); }
.sysinfo dd { margin: 0; font-weight: 600; }
.pw-gen { display: flex; gap: 6px; }
.pw-gen [data-tip]::after { left: auto; right: 0; transform: translate(0, 4px); }
.pw-gen [data-tip]:hover::after, .pw-gen [data-tip]:focus-visible::after { transform: translate(0, 0); }
.form .row { align-items: start; }
.field { align-content: start; }
.pw-gen input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.logout-alt { margin-top: 8px; display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .form .row .grow2 { grid-column: auto; } }

/* ---------- Tabellen: Spalten ausblenden, schmal als Karten ---------- */
.table td.cell-main { min-width: 180px; }
.table .chips-col { flex-direction: column; align-items: flex-start; }
@media (max-width: 1199px) { .table.stack .chips-col { flex-direction: row; } }
.table .who > div { min-width: 0; }
@media (max-width: 1439px) { .table .col-b { display: none; } }
@media (max-width: 1279px) { .table .col-a { display: none; } }
@media (max-width: 1199px) {
  .table.stack, .table.stack tbody { display: block; }
  .table.stack thead { display: none; }
  .table.stack tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
  }
  .table.stack tbody tr:last-child { border-bottom: 0; }
  .table.stack tbody tr:hover { background: var(--surface-2); }
  .table.stack td { display: block; border: 0; padding: 0; background: none !important; width: auto; }
  .table.stack td.switch-cell { order: 0; }
  .table.stack td.cell-main { order: 1; flex: 1 1 calc(100% - 200px); min-width: 0; }
  .table.stack td.actions { order: 2; margin-left: auto; }
  .table.stack td[data-label] { order: 3; font-size: .9rem; text-align: left; }
  .table.stack td.col-a, .table.stack td.col-b { display: block; }
  .table.stack td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: .74rem; font-weight: 600; color: var(--muted);
  }
  .table.stack td.switch-cell + td.cell-main ~ td[data-label]:first-of-type { margin-left: 0; }
}

/* ---------- Auswertung ---------- */
:root { --c-members: #00809A; --c-guests: #B36F00; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --c-members: #0F98B0; --c-guests: #C4851A; }
}
:root[data-theme="dark"] { --c-members: #0F98B0; --c-guests: #C4851A; }
.report-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 20px; }
.seg-text { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg-text a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; text-decoration: none; }
.seg-text a:hover { color: var(--ink); background: var(--surface-2); }
.seg-text a.active { background: #0E4D5C; color: #fff; }
.period-nav { display: inline-flex; align-items: center; gap: 4px; }
.period-label { font: 700 1.35rem/1 var(--cond); min-width: 9.5em; text-align: center; }
.report-opts { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-left: auto; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.stat-value { font: 700 2.2rem/1.05 var(--cond); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .78rem; color: var(--muted); }
.stat-of { font: 600 1rem "Barlow", sans-serif; color: var(--muted); }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.key.m { background: var(--c-members); }
.key.g { background: var(--c-guests); }
.chart-wrap { position: relative; }
.chart-narrow { display: none !important; }
@media (max-width: 720px) { .chart-wide { display: none !important; } .chart-narrow { display: block !important; } .chart .tick, .chart .xl { font-size: 11px; } }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.chart .tick, .chart .xl { fill: var(--muted); font: 500 12px "Barlow", sans-serif; }
.chart .bar.m { fill: var(--c-members); }
.chart .bar.g { fill: var(--c-guests); }
.chart .hit { fill: transparent; }
.chart .col { outline: none; cursor: default; }
.chart .col.on .hit, .chart .col:focus-visible .hit { fill: var(--surface-2); }
.chart .col.on .bar { filter: brightness(1.12); }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-2); font-size: .85rem;
}
.chart-tip .tt-h { font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.chart-tip .tt-r { display: flex; align-items: center; gap: 8px; }
.chart-tip .tt-r .key { width: 12px; height: 3px; border-radius: 2px; }
.chart-tip .tt-r strong { min-width: 1.6em; text-align: right; font-size: 1rem; }
.chart-tip .tt-n { margin-top: 6px; color: var(--muted); font-size: .8rem; }
.chart-data { margin-top: 10px; }
.chart-data summary { color: var(--petrol); }
.table.compact td, .table.compact th { padding: 6px 10px; }
.report-table .bar-col { width: 34%; }
.hbar { display: flex; align-items: center; gap: 10px; }
.hbar-track { flex: 1; height: 10px; border-radius: 0 5px 5px 0; background: var(--surface-2); overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--c-members); border-radius: 0 4px 4px 0; min-width: 0; }
.hbar-val { min-width: 2ch; font-variant-numeric: tabular-nums; }
.table th a.sort { color: inherit; text-decoration: none; }
.table th a.sort:hover { color: var(--ink); text-decoration: underline; }
.table th a.sort.on { color: var(--ink); }
.table th a.sort.on::after { content: " ↓"; }
.table th[aria-sort="ascending"] a.sort.on::after { content: " ↑"; }
@media (max-width: 1199px) { .report-table .bar-col { width: auto; flex: 1 1 100%; order: 2 !important; } .report-opts { margin-left: 0; } }

/* ---------- Umschalter Hell / Dunkel ---------- */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.theme-switch .icon-btn { width: 34px; height: 34px; border-radius: 9px; border-color: transparent; background: transparent; color: var(--muted); }
.theme-switch .icon-btn.on { background: var(--petrol-soft); color: var(--petrol); }
.theme-switch.on-dark { align-self: flex-start; margin: auto 8px 0; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.theme-switch.on-dark .icon-btn { color: rgba(255,255,255,.65); }
.theme-switch.on-dark .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.theme-switch.on-dark .icon-btn.on { background: var(--signal); color: var(--petrol-deep); }
.theme-switch.on-dark [data-tip]::after { top: auto; bottom: calc(100% + 8px); left: 0; transform: none; }
.theme-switch.floating { position: fixed; top: 16px; right: 16px; z-index: 30; box-shadow: var(--shadow-1); }
.theme-switch.floating [data-tip]::after { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; transform: none; }
/* ---------- Automatische E-Mails ---------- */
.auto-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.auto-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.auto-head h2 .ic { color: var(--petrol); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.auto-card { display: grid; gap: 10px; padding: 8px 16px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.auto-card.on { border-color: color-mix(in srgb, var(--yes) 55%, var(--line)); background: color-mix(in srgb, var(--yes-soft) 45%, var(--surface)); }
.auto-card legend { padding: 0 6px; }
.auto-card legend .check { font-weight: 700; font-size: 1rem; }
.auto-card p { margin: 0; }
.auto-card .row { grid-template-columns: 1.2fr 1fr 1.2fr; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { width: 80px; }
.input-suffix em { font-style: normal; color: var(--muted); }
.auto-status { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.auto-status span { display: inline-flex; align-items: center; gap: 5px; }
.auto-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.auto-actions .muted { margin-right: auto; }
@media (max-width: 720px) { .auto-grid { grid-template-columns: 1fr; } .auto-card .row { grid-template-columns: 1fr 1fr; } }

/* ---------- Avatare, Tags ---------- */
.avatar {
  --h: 190;
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: hsl(var(--h) 45% 86%); color: hsl(var(--h) 55% 24%);
  font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.5rem; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .avatar { background: hsl(var(--h) 35% 28%); color: hsl(var(--h) 60% 88%); }
}
:where(:root[data-theme="dark"]) .avatar { background: hsl(var(--h) 35% 28%); color: hsl(var(--h) 60% 88%); }
.ev-next .avatar { background: hsl(var(--h) 45% 86%); color: hsl(var(--h) 55% 24%); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  font-size: .78rem; font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap;
}
a.tag:hover { border-color: var(--petrol); }
.tag-petrol { background: var(--petrol-soft); border-color: transparent; color: var(--petrol); }
.tag-signal { background: var(--signal-soft); border-color: transparent; color: var(--guest); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--petrol-soft); color: var(--petrol); font-size: .8rem; font-weight: 700; vertical-align: middle; }

/* ---------- Flächen ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-1); }
.panel > h2 { margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.panel-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details .chev { color: var(--muted); transition: transform .2s; }
details[open] .chev { transform: rotate(90deg); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; margin-bottom: 20px; }
.grid-2 > .panel { margin-bottom: 0; }

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); }
.empty .empty-ic { width: 44px; height: 44px; color: var(--petrol); margin-bottom: 12px; }
.empty.small-empty { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 40px 24px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .82rem; font-weight: 600; color: var(--muted);
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.inactive td { opacity: .55; }
.table .num { text-align: right; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table .actions > * { display: inline-block; vertical-align: middle; }
.table .actions form { margin: 0; }
.who { display: flex; align-items: center; gap: 12px; }
.who small { display: block; color: var(--muted); }
.count { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.count.yes { color: var(--yes); }
.count.no { color: var(--no); }
.count.guest { color: var(--guest); }

/* ---------- Filter & Suche ---------- */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filterbar .select-wrap { min-width: 260px; }
.select-wrap.light > .ic { color: var(--petrol); }
.search { position: relative; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; min-width: 260px; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: .88rem; font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.field .hint { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.tag-plain { background: var(--surface); }
input, select {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; min-height: 44px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--petrol) 35%, var(--line)); }
input:focus, select:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px color-mix(in srgb, var(--petrol) 22%, transparent); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6E74' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--petrol); flex: none; }
label.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form .checks { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-end { display: flex; justify-content: flex-end; }
.input-ic { position: relative; display: flex; align-items: center; }
.input-ic > .ic { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.input-ic input { padding-left: 44px; }

fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 14px 12px; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .88rem; padding: 0 6px; }
.ms-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 160px auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ms-row:last-of-type { border-bottom: 0; }
.ms-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inline-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--no-soft); color: var(--ink); margin-bottom: 4px; }
.inline-alert > .ic { color: var(--no); margin-top: 1px; }
.inline-alert.info { background: var(--petrol-soft); margin-bottom: 16px; }
.inline-alert.info > .ic { color: var(--petrol); }
.join-alert { align-items: center; }
.join-alert > span { flex: 1; }
.join-alert > .ic { margin-top: 0; }

/* ---------- Dialoge ---------- */
.dlg {
  width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(6, 36, 43, .55);
}
.dlg[open] { animation: dlg-in .18s ease-out; }
.dlg::backdrop { background: rgba(6, 36, 43, .5); backdrop-filter: blur(3px); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0 22px; }
.dlg-head h2 { flex: 1; font-size: 1.25rem; font-weight: 700; }
.dlg-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--petrol-soft); color: var(--petrol); flex: none; }
.dlg-icon.danger { background: var(--no-soft); color: var(--no); margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 50%; }
.dlg-body { padding: 18px 22px 22px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.dlg-sm { width: min(400px, calc(100vw - 24px)); }
.dlg-sm form { padding: 26px 24px 20px; text-align: center; }
.dlg-sm p { font-size: 1.05rem; }
.dlg-sm .dlg-actions { justify-content: center; }

/* ---------- Meldungen ---------- */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 80; display: grid; gap: 8px; width: min(420px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 10px 12px 14px; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  animation: toast-in .25s ease-out; transition: opacity .35s, transform .35s;
}
.toast > span { flex: 1; padding-top: 1px; }
.toast > .ic { margin-top: 2px; }
.toast-success > .ic { color: var(--yes); }
.toast-error { border-color: var(--no); }
.toast-error > .ic { color: var(--no); }
.toast-info > .ic { color: var(--petrol); }
.toast.out { opacity: 0; transform: translateX(20px); }
.toast-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; }
.toast-x .ic { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Vereine ---------- */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.club-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: grid; gap: 16px; box-shadow: var(--shadow-1); }
.club-card-head { display: flex; align-items: center; gap: 12px; }
.club-card-head h2 { flex: 1; font-size: 1.1rem; font-weight: 700; }
.club-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--petrol-soft); color: var(--petrol); flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.stats div { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; }
.stats dt { font-size: .78rem; color: var(--muted); }
.stats dd { margin: 0; font: 700 1.7rem/1.1 var(--cond); color: var(--petrol); }
.club-card-actions { display: flex; gap: 2px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.club-card-actions form { margin: 0; }
.club-card-actions .push { margin-left: auto; }
.club-list { list-style: none; margin: 0; padding: 0; }
.club-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.club-list li:last-child { border-bottom: 0; }
.club-list .club-name { font-weight: 600; }
.club-list .small { margin-left: auto; }
.profile-head { display: flex; align-items: center; gap: 18px; }

/* ---------- Anmeldung & Einrichtung ---------- */
.bare-main { min-height: 100vh; }
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; background: var(--petrol-deep); color: #fff; display: flex; align-items: flex-end; padding: 48px; }
.auth-hero .court { position: absolute; inset: -10% -20% -10% 20%; width: 100%; height: 120%; color: var(--signal); opacity: .13; transform: rotate(-8deg); }
.auth-hero-inner { position: relative; max-width: 480px; }
.brand-large { font-size: 1.35rem; margin-bottom: 40px; }
.brand-large .brand-mark { width: 42px; height: 42px; }
.auth-claim { font: 700 clamp(4rem, 9vw, 7.5rem)/.88 var(--cond); color: var(--signal); margin: 0 0 22px; letter-spacing: -.01em; }
.auth-sub { font-size: 1.1rem; color: rgba(255,255,255,.8); max-width: 38ch; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: min(380px, 100%); gap: 18px; }
.login-form h1 { margin-bottom: 6px; }
.login-go { display: flex; justify-content: flex-end; }
.setup { width: min(640px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0; }
.brand-dark { color: var(--petrol); margin-bottom: 24px; }
.setup h1 { margin-bottom: 12px; }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-2); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(6, 36, 43, .45); }
  .main { margin-left: 0; }
  .mobilebar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    padding: 10px 16px; background: var(--petrol-deep); color: #fff;
  }
  .mobilebar .brand { flex: 1; font-size: 1.05rem; }
  .mobilebar .brand-mark { width: 28px; height: 28px; }
  .mobilebar .icon-btn { background: transparent; border-color: transparent; color: #fff; }
  .mobilebar .icon-btn:hover { background: rgba(255,255,255,.1); }
  .content { padding: 22px 16px 48px; }
  h1 { font-size: 2.1rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 24px 32px; min-height: 0; }
  .brand-large { margin-bottom: 20px; }
  .auth-claim { font-size: 3.6rem; margin-bottom: 10px; }
}

@media (max-width: 720px) {
  .ev { grid-template-columns: 64px minmax(0, 1fr); gap: 14px 16px; padding: 16px; }
  .ev-date { height: 74px; }
  .ev-date .day { font-size: 2rem; }
  .ev-next { padding: 18px; }
  .ev-next .ev-date { height: 84px; }
  .ev-count { grid-column: 1; grid-row: 2; align-self: start; }
  .ev-count .big { font-size: 2.1rem; }
  .ev-next .ev-count .big { font-size: 2.6rem; }
  .ev-count .split { display: none; }
  .ev-act { grid-column: 2; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .rsvp .icon-btn { width: 42px; height: 42px; }
  .stepper .icon-btn { width: 32px; height: 32px; }
  .guest-input { width: 34px; min-height: 32px; }
  .search input, .filterbar .select-wrap { min-width: 0; width: 100%; }
  .filterbar > * { flex: 1 1 100%; }
  .toolbar { width: 100%; }
  .toolbar .search { flex: 1; }
  .toolbar .search input { min-width: 0; }
  .ms-row { grid-template-columns: 1fr 1fr; }
  .inline-filter { flex-wrap: wrap; }
  .ms-name { grid-column: 1 / -1; }
  .table th, .table td { padding: 10px 12px; }
  .toasts { top: 70px; right: 12px; width: calc(100vw - 24px); }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
