:root {
  --sf-blue: #1a7fd4;
  --sf-blue-dark: #0d5a9e;
  --sf-green: #6bc628;
  --sf-green-dark: #4a9a18;
  --sf-navy: #0f1a2e;
  --sf-navy-soft: #1a2744;
  --sf-white: #ffffff;
  --sf-gray-50: #f4f7fb;
  --sf-gray-100: #e8eef6;
  --sf-gray-600: #5a6b82;
  --sf-shadow: 0 20px 50px rgba(15, 26, 46, 0.12);
  --sf-radius: 16px;
  --color-primary: var(--sf-blue);
  --color-primary-dark: var(--sf-blue-dark);
  --color-accent: var(--sf-green);
  --color-bg: #ffffff;
  --color-surface: #f4f7fb;
  --color-text: var(--sf-navy);
  --color-card: #ffffff;
  --color-border: #e8eef6;
  --color-muted: #5a6b82;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 20px 50px rgba(15, 26, 46, 0.12);
  --sf-session-list-gap: 14px;
  --sf-session-card-border: rgba(26, 127, 212, 0.22);
  --sf-session-card-shadow: 0 2px 10px rgba(15, 26, 46, 0.1), 0 0 0 1px rgba(26, 127, 212, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  /* Safari/iOS: kein automatisches Hochskalieren von Text beim ersten Rendern ? wirkt oft wie ?Zu-Zoom?. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--sf-gray-50);
  color: var(--color-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

body[data-theme="dark"] {
  --color-primary: #4da3e8;
  --color-primary-dark: #b8d4f0;
  --color-accent: #8ed654;
  --color-bg: var(--sf-navy);
  --color-surface: var(--sf-navy-soft);
  --color-text: #e8eef6;
  --color-card: #1a2744;
  --color-border: #2a3d5c;
  --color-muted: #b8c8dc;
  --text: var(--color-text);
  --border: var(--color-border);
  --card: var(--color-card);
  --sf-session-card-border: rgba(77, 163, 232, 0.35);
  --sf-session-card-shadow: 0 3px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(77, 163, 232, 0.12);
  color-scheme: dark;
  background: var(--color-bg);
  color: var(--color-text);
}

html:has(body[data-theme="dark"]) {
  background: var(--sf-navy);
}

.auth-pending .content,
.auth-pending .sidebar {
  visibility: hidden;
}

.is-hidden {
  display: none !important;
}

/* Kein kurzes Aufblitzen unberechtigter Navigation vor Permission-Check */
body:not(.permissions-applied):not(.sf-guest-shell) .sidebar-nav .nav-group,
body:not(.permissions-applied):not(.sf-guest-shell) .sidebar-nav .nav-item[data-module],
body:not(.permissions-applied):not(.sf-guest-shell) #auswertungenHubGrid .field[data-permission-hub] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--sf-gray-50);
  padding: 20px;
  gap: 20px;
  max-width: 100%;
  min-width: 0;
}

/* Light-Mode Admin: Plakat-Wash (Blau/Gr?n) statt flachem Grauwei? */
body:not([data-theme="dark"]):not(.sf-guest-shell) {
  background:
    radial-gradient(ellipse 70% 55% at 8% 0%, rgba(26, 127, 212, 0.18), transparent 58%),
    radial-gradient(ellipse 55% 48% at 96% 8%, rgba(107, 198, 40, 0.14), transparent 52%),
    radial-gradient(ellipse 50% 40% at 70% 100%, rgba(10, 61, 145, 0.08), transparent 55%),
    linear-gradient(165deg, #e4eef9 0%, #d5e6f6 38%, #e8f4dc 72%, #eef5f8 100%);
  background-attachment: fixed;
}

body:not([data-theme="dark"]):not(.sf-guest-shell) .app-shell {
  background: transparent;
}

body:not([data-theme="dark"]):not(.sf-guest-shell) .content {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(26, 127, 212, 0.14);
  box-shadow: 0 16px 40px rgba(14, 26, 43, 0.08);
}

body:not([data-theme="dark"]):not(.sf-guest-shell) .card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(26, 127, 212, 0.1);
  box-shadow: 0 12px 28px rgba(14, 26, 43, 0.07);
}

body:not([data-theme="dark"]):not(.sf-guest-shell) .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(232, 240, 252, 0.35) 100%);
  border-radius: 12px;
  border: 1px solid rgba(26, 127, 212, 0.08);
  box-shadow: 0 6px 16px rgba(14, 26, 43, 0.04);
  margin-bottom: 4px;
}

.sidebar {
  background: var(--sf-white);
  border-radius: var(--sf-radius);
  padding: 18px 16px;
  color: var(--sf-navy);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--sf-shadow);
  border: 1px solid var(--color-border);
}

body[data-theme="dark"] .app-shell {
  background: linear-gradient(135deg, #0b1220 0%, #101826 100%);
}

body[data-theme="dark"] .content {
  background: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0b1220 0%, #111c30 100%);
  box-shadow: 0 18px 40px rgba(2, 12, 36, 0.6);
  border-color: transparent;
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
}

.brand-text .word-spiel {
  color: var(--sf-navy);
}

.brand-text .word-funk {
  color: var(--sf-blue);
}

.logo-circle {
  display: none;
}

.nav-group {
  background: var(--sf-gray-50);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.nav-group-toggle {
  color: var(--sf-navy);
}

.nav-group-chevron {
  background: var(--sf-gray-100);
  color: var(--sf-gray-600);
}

.nav-group-items {
  border-left-color: var(--color-border);
}

.nav-item {
  color: var(--sf-gray-600);
  background: transparent;
}

.nav-item:hover {
  background: var(--sf-gray-100);
  color: var(--sf-navy);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark));
  color: var(--sf-white);
  box-shadow: 0 6px 16px rgba(107, 198, 40, 0.28);
}

.content {
  background: var(--sf-white);
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-shadow);
  border: 1px solid var(--color-border);
}

.cta {
  background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark));
  box-shadow: 0 8px 20px rgba(107, 198, 40, 0.28);
}

.cta.ghost {
  background: var(--sf-white);
  color: var(--sf-blue-dark, var(--sf-blue));
  border: 2px solid var(--sf-blue-dark, var(--sf-blue));
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Gast-Shell: schmale ?ffentliche Navigation (kein Admin/Trainer in Quelltext) */
.sidebar--guest .sidebar-nav--guest {
  padding-top: 0.25rem;
}

/* Gast-Login-Seite: nur Formular, keine Seitenleiste ? zentrierte Login-Karte */
body.sf-guest-shell[data-page="login"] .sidebar--guest,
body.sf-guest-shell[data-page="login"] .menu-button {
  display: none !important;
}

body.sf-guest-shell[data-page="login"] .app-shell {
  grid-template-columns: 1fr;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  gap: 0;
  background:
    radial-gradient(ellipse 90% 70% at 15% 10%, rgba(26, 127, 212, 0.45), transparent 55%),
    radial-gradient(ellipse 80% 60% at 90% 90%, rgba(107, 198, 40, 0.22), transparent 50%),
    linear-gradient(155deg, #0b1628 0%, #123058 48%, #0f1a2e 100%);
}

body.sf-guest-shell[data-page="login"] .content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: 100%;
}

body.sf-guest-shell[data-page="login"] .topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  justify-content: flex-end;
}

body.sf-guest-shell[data-page="login"] .topbar-left {
  display: none;
}

body.sf-guest-shell[data-page="login"] .topbar-actions .icon-button {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

body.sf-guest-shell[data-page="login"] .sf-lang-select {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
}

body.sf-guest-shell[data-page="login"] .sf-lang-label {
  color: #e8eef6;
}

body.sf-guest-shell[data-page="login"] .page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(4.5rem, calc(env(safe-area-inset-top, 0px) + 3.5rem))
    max(16px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  gap: 0;
}

.sf-login-stage {
  width: min(100%, 420px);
  margin: 0 auto;
}

.sf-login-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(2, 12, 36, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sf-login-card__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 1.1rem 1.25rem 1rem;
  background: linear-gradient(135deg, var(--sf-blue) 0%, var(--sf-blue-dark) 100%);
  color: #fff;
}

.sf-login-card__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px;
  flex-shrink: 0;
}

.sf-login-card__brand-text {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.sf-login-card__brand-text .word-spiel {
  color: #fff;
}

.sf-login-card__brand-text .word-funk {
  color: #d4f5a8;
}

.sf-login-card__title {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.sf-login-card__body {
  padding: 1.25rem 1.25rem 1.4rem;
}

.sf-login-card__lead {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #5a6b82;
}

.sf-login-form {
  display: grid;
  gap: 1rem;
}

.sf-login-field {
  display: grid;
  gap: 0.35rem;
}

.sf-login-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a6b82;
  margin: 0;
}

.sf-login-input.input {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #d0d7e2;
  background: #f8fafc;
}

.sf-login-input.input:focus {
  outline: none;
  border-color: var(--sf-blue);
  box-shadow: 0 0 0 3px rgba(26, 127, 212, 0.2);
  background: #fff;
}

.sf-login-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--sf-navy);
  cursor: pointer;
  user-select: none;
}

.sf-login-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--sf-blue);
}

.sf-login-submit.cta {
  width: 100%;
  min-height: 50px;
  margin-top: 0.25rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sf-login-bio-wrap {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.sf-login-bio-wrap[hidden] {
  display: none;
}

.sf-login-bio-btn {
  text-transform: none;
}

.sf-login-bio-or {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
}

.sf-bio-update-hint {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6e8;
  border: 1px solid #e6c27a;
  color: #5a3d00;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sf-bio-update-hint[hidden] {
  display: none;
}

.sf-bio-update-hint a {
  color: inherit;
  font-weight: 650;
}

.account-native-biometric input:disabled {
  cursor: not-allowed;
}

.sf-login-feedback {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

.sf-login-links {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  margin-top: 0.15rem;
}

.sf-login-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0.2rem 0.35rem;
  margin: 0;
  color: var(--sf-blue-dark);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: center;
}

.sf-login-link:hover,
.sf-login-link:focus-visible {
  color: var(--sf-blue);
}

.sf-login-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  color: #7a8aa0;
}

body[data-theme="dark"].sf-guest-shell[data-page="login"] .app-shell {
  background:
    radial-gradient(ellipse 90% 70% at 15% 10%, rgba(77, 163, 232, 0.28), transparent 55%),
    radial-gradient(ellipse 80% 60% at 90% 90%, rgba(142, 214, 84, 0.12), transparent 50%),
    linear-gradient(155deg, #060b14 0%, #0f1a2e 50%, #0a1220 100%);
}

body[data-theme="dark"] .sf-login-card {
  background: #1a2744;
  border-color: #2a3d5c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

body[data-theme="dark"] .sf-login-card__lead,
body[data-theme="dark"] .sf-login-label {
  color: #c5d4e8;
}

body[data-theme="dark"] .sf-login-input.input {
  background: #121c30;
  border-color: #2a3d5c;
  color: #e8eef6;
}

body[data-theme="dark"] .sf-login-input.input:focus {
  background: #152238;
  border-color: #4da3e8;
  box-shadow: 0 0 0 3px rgba(77, 163, 232, 0.28);
}

body[data-theme="dark"] .sf-login-remember {
  color: #e8eef6;
}

body[data-theme="dark"] .sf-login-link {
  color: #93c5fd;
}

body[data-theme="dark"] .sf-login-link:hover,
body[data-theme="dark"] .sf-login-link:focus-visible {
  color: #bfdbfe;
}

body[data-theme="dark"] .sf-login-hint {
  color: #94a3b8;
}

@media (min-width: 720px) {
  .sf-login-stage {
    width: min(100%, 440px);
  }

  .sf-login-card__body {
    padding: 1.5rem 1.6rem 1.65rem;
  }

  .sf-login-card__brand {
    padding: 1.25rem 1.5rem 1.1rem;
  }
}

.sf-maintenance-banner {
  background: #b45309;
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.35;
}

body[data-theme="dark"] .sf-maintenance-banner {
  background: #c2410c;
  color: #fff7ed;
}

body.sf-maintenance-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sfMaintAdminForm[hidden],
#sfMaintAdminForm.is-hidden {
  display: none !important;
}


/* Eltern-Zugangsanfrage / Shop (Gast): schmale Vollbreite ohne Seitenleiste.
 * Eingeloggte Trainer behalten Menü/Sidebar (auch in der Native-App). */
body.sf-guest-shell[data-page="public-parent-access-request"] .sidebar--guest,
body.sf-guest-shell[data-page="public-parent-access-request"] .menu-button,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .sidebar--guest,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .menu-button,
body.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .sidebar--guest,
body.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .menu-button,
body.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .sidebar--guest,
body.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .menu-button,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-request"] .sidebar,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-request"] .menu-button,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-confirm"] .sidebar,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-confirm"] .menu-button,
body.sf-native-app.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .sidebar,
body.sf-native-app.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .menu-button,
body.sf-native-app.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .sidebar,
body.sf-native-app.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .menu-button {
  display: none !important;
}

body.sf-guest-shell[data-page="public-parent-access-request"] .app-shell,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .app-shell,
body.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .app-shell,
body.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .app-shell,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-request"] .app-shell,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-confirm"] .app-shell,
body.sf-native-app.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .app-shell,
body.sf-native-app.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .app-shell {
  grid-template-columns: 1fr;
  max-width: 100%;
  padding: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

body.sf-guest-shell[data-page="public-parent-access-request"] .content,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .content,
body.sf-guest-shell[data-page="public-parent-access-request"] .page,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .page,
body.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .content,
body.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .content,
body.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .page,
body.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .page,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-request"] .content,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-confirm"] .content,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-request"] .page,
body.sf-native-app.sf-guest-shell[data-page="public-parent-access-confirm"] .page,
body.sf-native-app.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .content,
body.sf-native-app.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .content,
body.sf-native-app.sf-guest-shell[data-page="public-shop"]:not(.sf-kid-portal-embed) .page,
body.sf-native-app.sf-guest-shell[data-page="public-shop-confirm"]:not(.sf-kid-portal-embed) .page {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

body.sf-guest-shell[data-page="public-parent-access-request"] .card,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .card,
body.sf-native-app[data-page="public-parent-access-request"] .card,
body.sf-native-app[data-page="public-parent-access-confirm"] .card {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#parentAccessRequestForm.form-grid--stack,
#parentAccessTurnstileWrap {
  max-width: 100%;
  min-width: 0;
}

#parentAccessRequestForm .input,
#parentAccessRequestForm .textarea,
#parentAccessRequestForm select {
  font-size: 16px;
  max-width: 100%;
}

#parentAccessTurnstileWrap iframe {
  max-width: 100%;
}

.card.parent-access-request-done .card-header h3 {
  font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  line-height: 1.25;
}

body.sf-guest-shell[data-page="public-parent-access-request"] .topbar,
body.sf-guest-shell[data-page="public-parent-access-confirm"] .topbar,
body.sf-native-app[data-page="public-parent-access-request"] .topbar,
body.sf-native-app[data-page="public-parent-access-confirm"] .topbar {
  padding-left: 0;
  padding-right: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px;
  border-radius: 14px;
  background: var(--sf-gray-50);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

body[data-theme="dark"] .nav-group {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-group-toggle {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--sf-navy);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  padding: 9px 11px;
  font-weight: 700;
  min-height: 38px;
  line-height: 1.2;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-group--open .nav-group-toggle {
  background: var(--sf-gray-100);
}

.nav-group-toggle:hover {
  background: var(--sf-gray-100);
}

.nav-group-toggle:focus-visible {
  outline: 2px solid var(--sf-blue);
  outline-offset: 2px;
}

.nav-group-toggle-label {
  flex: 1;
  min-width: 0;
  line-height: 1.28;
}

.nav-group-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 0.5rem;
  line-height: 1;
  background: var(--sf-gray-100);
  color: var(--sf-gray-600);
  transition: transform 0.2s ease, background 0.15s ease;
}

.nav-group-toggle:hover .nav-group-chevron {
  background: var(--color-border);
}

.nav-group:not(.nav-group--open) .nav-group-chevron {
  transform: rotate(-90deg);
}

.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 4px 2px 3px 6px;
  padding: 2px 0 4px 10px;
  border-left: 2px solid var(--color-border);
}

.nav-group:not(.nav-group--open) .nav-group-items {
  display: none;
}

.nav-group--nested {
  margin: 4px 0 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.nav-group-toggle--nested {
  padding: 7px 10px 7px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.nav-group--nested .nav-group-items {
  margin-left: 4px;
  padding-left: 8px;
}

.nav-group--nested.is-hidden {
  display: none;
}

.nav-item.nav-item-sub.nav-item-player-child {
  padding-left: 30px;
}

.nav-item.nav-item-sub {
  padding: 8px 10px 8px 12px;
  font-weight: 500;
  font-size: 0.88rem;
}

.sidebar-footer {
  margin-top: auto;
}

.nav-item {
  text-decoration: none;
  color: var(--sf-gray-600);
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item:hover {
  background: var(--sf-gray-100);
  color: var(--sf-navy);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark));
  color: var(--sf-white);
  box-shadow: 0 6px 16px rgba(107, 198, 40, 0.28);
}

.nav-icon {
  width: 18px;
  display: inline-flex;
  justify-content: center;
}

body[data-theme="dark"] .sidebar .nav-item {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.team-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-name-display {
  font-weight: 700;
  color: var(--color-primary-dark);
  padding: 8px 0;
}

.team-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contacts-panel {
  margin-top: 10px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-row-actions {
  display: flex;
  gap: 8px;
}

.contact-meta {
  margin-top: 4px;
}

.contact-meta {
  margin-top: 4px;
}

.same-day-warning {
  color: #b42318;
  font-weight: 600;
}

.note-input {
  min-height: 70px;
  width: 220px;
  order: 10;
  flex-basis: 100%;
  max-width: 260px;
  margin-top: 6px;
}

.content {
  background: var(--sf-white);
  border-radius: var(--sf-radius);
  padding: 20px;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--sf-shadow);
  border: 1px solid var(--color-border);
}

.messenger-team-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 0.55rem;
  min-height: 2.2rem;
}

.messenger-team-presets .messenger-team-label,
.messenger-team-presets .messenger-team-empty {
  width: 100%;
  margin: 0 0 0.15rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.messenger-team-presets button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.messenger-team-preset-btn {
  border-width: 2px !important;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.messenger-team-preset-btn.is-active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  font-weight: 700;
}

.messenger-view[hidden] {
  display: none !important;
}

.messenger-subnav {
  margin: 0 0 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.messenger-subnav--bar {
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  min-height: 2.5rem;
}

.messenger-subnav--bar .sf-system-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-nav-back,
.messenger-nav-refresh {
  flex: 0 0 auto;
  min-width: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  margin-left: 0 !important;
}

.messenger-outbox-intro {
  margin: 0 0 0.65rem;
}

.messenger-outbox-detail-summary {
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.messenger-outbox-msg {
  margin: 0 0 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  overflow: hidden;
}

.messenger-outbox-msg[hidden] {
  display: none !important;
}

.messenger-outbox-msg-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-primary-dark, #0d5a9e);
  user-select: none;
}

.messenger-outbox-msg-summary::-webkit-details-marker {
  display: none;
}

.messenger-outbox-msg-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.messenger-outbox-msg[open] .messenger-outbox-msg-summary::before {
  transform: rotate(90deg);
}

.messenger-outbox-msg .messenger-outbox-preview {
  margin: 0;
  border: none;
  border-radius: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  max-height: min(50vh, 18rem);
  background: rgba(255, 255, 255, 0.65);
}

.messenger-compose-to-bar {
  display: none;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.messenger-compose-to-bar-label {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--color-primary-dark, #0d5a9e);
}

.messenger-compose-to-bar-summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

.messenger-compose-to-bar-count {
  flex: 0 0 auto;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--sf-blue, #1a7fd4);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messenger-compose-to-bar-count[hidden] {
  display: none !important;
}

.messenger-compose-to-bar-chevron {
  flex: 0 0 auto;
  opacity: 0.45;
  font-size: 1.25rem;
  line-height: 1;
}

.messenger-address-book-scrim {
  display: none;
}

.messenger-address-book-head {
  display: none;
}

.messenger-address-book-head-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.messenger-address-book-link {
  border: 0;
  background: transparent;
  color: var(--color-primary-dark, #0d5a9e);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  cursor: pointer;
}

.messenger-address-book-section-label {
  margin: 0.65rem 0 0.35rem;
  font-weight: 600;
}

.messenger-address-book-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.45rem;
}

.messenger-address-book-teams {
  margin: 0.5rem 0 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  overflow: hidden;
}

.messenger-address-book-teams-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  user-select: none;
}

.messenger-address-book-teams-summary::-webkit-details-marker {
  display: none;
}

.messenger-address-book-teams-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.messenger-address-book-teams[open] .messenger-address-book-teams-summary::before {
  transform: rotate(90deg);
}

.messenger-address-book-teams-inner {
  padding: 0 0.65rem 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.messenger-address-book-summary {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.messenger-compose-fields {
  margin-bottom: 1rem;
}

.messenger-address-book-body #messengerRecipientSummary {
  margin: 0.35rem 0 0.45rem;
}

/* Desktop: Mannschaften immer sichtbar (nicht im zugeklappten details verstecken) */
@media (min-width: 721px) {
  .messenger-address-book-body {
    display: flex;
    flex-direction: column;
  }

  .messenger-address-book-body > .messenger-compose-hint {
    order: 0;
  }

  .messenger-address-book-teams {
    order: 1;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.06);
    margin: 0 0 0.65rem;
    overflow: visible;
  }

  .messenger-address-book-teams-summary {
    display: block;
    cursor: default;
    pointer-events: none;
  }

  .messenger-address-book-teams-summary::before {
    content: none;
  }

  .messenger-address-book-teams-inner {
    display: block !important;
    padding: 0 0.65rem 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .messenger-team-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
  }

  .messenger-address-book-search {
    order: 2;
  }

  .messenger-address-book-list-wrap {
    order: 3;
  }

  .messenger-address-book-list-label {
    margin-top: 0.35rem;
  }
}

.messenger-inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 0.65rem;
}

.messenger-inbox-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
}

.messenger-inbox-sort-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.messenger-inbox-sort {
  min-width: 9.5rem;
  width: auto;
}

.messenger-inbox-filter-label {
  margin: 0;
  max-width: 100%;
}

.messenger-inbox-filter-hint button {
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.85rem;
}

.messenger-hub-tiles {
  margin-top: 0.35rem;
}

.messenger-wa-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-card, #fff);
  min-height: 12rem;
}

.messenger-wa-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.messenger-wa-row:last-child {
  border-bottom: 0;
}

.messenger-wa-row:hover,
.messenger-wa-row:focus-visible {
  background: rgba(59, 130, 246, 0.07);
  outline: none;
}

.messenger-wa-row.is-unread .messenger-wa-name {
  font-weight: 700;
}

.messenger-wa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  flex-shrink: 0;
}

.messenger-wa-main {
  min-width: 0;
}

.messenger-wa-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  justify-content: space-between;
}

.messenger-wa-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-wa-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.messenger-audience-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  line-height: 1.2;
}

.messenger-audience-badge.is-player {
  color: #0f3d2e;
  background: rgba(16, 185, 129, 0.18);
}

.messenger-audience-badge.is-parent {
  color: #1e3a8a;
  background: rgba(59, 130, 246, 0.16);
}

body[data-theme="dark"] .messenger-audience-badge.is-player {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.22);
}

body[data-theme="dark"] .messenger-audience-badge.is-parent {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.28);
}

.messenger-recipient-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.messenger-recipient-row-name {
  font-weight: 600;
}

.messenger-recipient-row-meta {
  margin-top: 0.1rem;
  font-size: 0.82rem;
  opacity: 0.8;
}

.messenger-recipient-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0.45rem;
}

.messenger-recipient-filter {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: transparent;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.25;
  cursor: pointer;
  color: inherit;
}

.messenger-recipient-filter.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #1e3a8a;
  font-weight: 600;
}

.messenger-role-badge,
.messenger-login-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.04rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  vertical-align: middle;
}

.messenger-role-badge {
  color: #334155;
  background: rgba(148, 163, 184, 0.22);
}

.messenger-login-badge.is-never {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.16);
}

.messenger-recipient-section {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.68;
  padding: 0.55rem 0.4rem 0.2rem;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface, #fff);
}

body[data-theme="dark"] .messenger-recipient-filter.is-active {
  background: rgba(96, 165, 250, 0.18);
  border-color: #60a5fa;
  color: #dbeafe;
}

body[data-theme="dark"] .messenger-role-badge {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .messenger-login-badge.is-never {
  color: #fdba74;
  background: rgba(234, 88, 12, 0.24);
}

body[data-theme="dark"] .messenger-recipient-section {
  background: var(--color-surface, #15263d);
}

#messengerParentsPane .messenger-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

#messengerParentsPane .messenger-view[hidden],
#messengerParentsPane .messenger-chat-view[hidden] {
  display: none !important;
}

#messengerParentsPane .messenger-compose-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#messengerParentsPane .messenger-recipient-checks {
  max-height: min(62vh, 520px);
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 0.15rem 0.45rem;
}

#messengerParentsPane .messenger-recipient-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  cursor: pointer;
}

#messengerParentsPane .messenger-recipient-row:last-child {
  border-bottom: 0;
}

#messengerParentsPane .messenger-recipient-row.is-guardian {
  padding-left: 1.7rem;
}

#messengerParentsPane .messenger-reply-to {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0 0.15rem 0.4rem;
}

#messengerParentsPane .messenger-reply-to-label {
  font-size: 0.85rem;
  color: var(--color-muted, #4a5d7a);
}

#messengerParentsPane .messenger-reply-to-select {
  min-width: 10rem;
  max-width: 100%;
}

#messengerParentsPane .messenger-chat-title .messenger-wa-name-row {
  min-width: 0;
}

#messengerParentsPane .messenger-wa-name-row .messenger-wa-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-wa-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  opacity: 0.7;
}

.messenger-wa-preview {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-wa-badge-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 1.6rem;
}

.messenger-outbox-preview {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.45;
  max-height: min(42vh, 16rem);
  overflow: auto;
}

.messenger-outbox-read-tabs {
  margin: 0 0 0.65rem;
  flex-wrap: wrap;
}

.messenger-outbox-read-tabs[hidden] {
  display: none !important;
}

.messenger-outbox-read-tabs .tab {
  flex: 1 1 auto;
  min-width: 7.5rem;
  justify-content: center;
}

.messenger-wa-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  opacity: 0.75;
}

.messenger-chat-view {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 640px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-card, #fff);
}

.messenger-chat-view[hidden] {
  display: none !important;
}

.messenger-chat-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(59, 130, 246, 0.06);
  flex: 0 0 auto;
}

.messenger-chat-header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.messenger-chat-title {
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.messenger-chat-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
}

.messenger-chat-header-actions .cta {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .messenger-chat-header {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .messenger-chat-header-main {
    flex: 1 1 calc(100% - 2.75rem);
  }

  .messenger-chat-header-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
    padding-left: 2.35rem;
  }

  .messenger-chat-header-actions .cta {
    font-size: 0.78rem;
    padding: 0.2rem 0.45rem;
  }
}

.messenger-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(42dvh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.65), rgba(255, 255, 255, 0.4));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.messenger-chat-bubble-row {
  display: flex;
  width: 100%;
}

.messenger-chat-bubble-row.is-mine {
  justify-content: flex-end;
}

.messenger-chat-bubble-row.is-theirs {
  justify-content: flex-start;
}

.messenger-chat-bubble {
  max-width: min(92%, 34rem);
  width: auto;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.18);
  word-break: break-word;
}

.messenger-chat-bubble-row.is-mine .messenger-chat-bubble {
  background: rgba(59, 130, 246, 0.16);
  border-bottom-right-radius: 4px;
}

.messenger-chat-bubble-row.is-theirs .messenger-chat-bubble {
  border-bottom-left-radius: 4px;
}

.messenger-chat-bubble .meta {
  margin-bottom: 0.25rem;
}

.messenger-chat-bubble .messenger-chat-sender {
  font-weight: 600;
  color: var(--color-text, #0f172a);
  opacity: 0.85;
}

.messenger-chat-compose {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--color-card, #fff);
  flex: 0 0 auto;
}

.messenger-chat-compose-main {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.messenger-chat-compose-main .messenger-compose-body,
.messenger-chat-compose-main #messengerChatBody {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.messenger-chat-attach {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
  font-size: 1.55rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
}

.messenger-chat-attach-plus {
  display: block;
  transform: translateY(-0.05em);
  line-height: 1;
}

.messenger-chat-send {
  flex: 0 0 auto;
  align-self: flex-end;
  white-space: nowrap;
  min-height: 2.75rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.messenger-draft-banner {
  margin: 0;
  padding: 0.45rem 0.55rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.messenger-chat-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.messenger-chat-compose-actions[hidden] {
  display: none !important;
}

.messenger-chat-files {
  flex: 1 1 auto;
  min-width: 0;
}

.messenger-chat-bubble .messenger-chat-msg-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.messenger-chat-bubble .messenger-chat-msg-actions .cta {
  font-size: 0.75rem;
  padding: 0.18rem 0.45rem;
  min-height: 0;
  line-height: 1.2;
}

@media (max-width: 720px) {
  /*
   * Messenger mobil: doppelte Köpfe sparen.
   * Hub: Card-Kopf (Kommunikation/Messenger/Langtext) weg — Topbar reicht.
   * Unteransicht (focus): auch Intern/Eltern + großen Topbar-Titel weg.
   */
  body[data-page="messenger"] .messenger-page > .card-header {
    display: none !important;
  }

  body[data-page="messenger"] #messengerMainTabs {
    margin-bottom: 0.65rem;
  }

  body.sf-messenger-focus[data-page="messenger"] #messengerMainTabs,
  body.sf-messenger-focus[data-page="messenger"] #messengerScopeHint,
  body.sf-messenger-focus[data-page="messenger"] #messengerPageFeedback {
    display: none !important;
  }

  body.sf-messenger-focus[data-page="messenger"] .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "menu . actions"
      "logo title title";
    row-gap: 0.3rem;
    padding-top: 0.35rem;
    padding-bottom: 0.4rem;
  }

  body.sf-messenger-focus[data-page="messenger"] .topbar .page-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.sf-messenger-focus[data-page="messenger"] .topbar-actions {
    width: auto;
    max-width: none;
  }

  body.sf-messenger-focus[data-page="messenger"] .messenger-subnav--bar {
    margin-bottom: 0.5rem;
  }

  body.sf-messenger-focus[data-page="messenger"] .messenger-outbox-intro {
    display: none;
  }

  body.sf-messenger-focus .sf-native-club-switch {
    display: none !important;
  }

  /* Compose: Adressbuch Vollbild — Suche zuerst, Teams einklappbar, Liste dominant */
  body.sf-messenger-compose-open .messenger-compose-to-bar {
    display: flex;
  }

  body.sf-messenger-compose-open .messenger-compose-hint {
    display: none;
  }

  body.sf-messenger-compose-open .messenger-team-label {
    display: none;
  }

  body.sf-messenger-addressbook-open {
    overflow: hidden;
  }

  body.sf-messenger-addressbook-open .topbar,
  body.sf-messenger-addressbook-open .sf-native-club-switch {
    visibility: hidden !important;
  }

  body.sf-messenger-compose-open .messenger-address-book {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: block;
    pointer-events: none;
    visibility: hidden;
  }

  body.sf-messenger-compose-open .messenger-address-book.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  body.sf-messenger-compose-open .messenger-address-book-scrim {
    display: none;
  }

  body.sf-messenger-compose-open .messenger-address-book-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-card, #fff);
    border-radius: 0;
    box-shadow: none;
    transform: translateY(100%);
    transition: transform 0.2s ease;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.sf-messenger-compose-open .messenger-address-book.is-open .messenger-address-book-panel {
    transform: translateY(0);
  }

  body.sf-messenger-compose-open .messenger-address-book-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: var(--color-card, #fff);
  }

  body.sf-messenger-compose-open .messenger-address-book-done {
    min-width: 0;
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
  }

  body.sf-messenger-compose-open .messenger-address-book-head h3 {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.sf-messenger-compose-open .messenger-address-book-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
  }

  body.sf-messenger-compose-open .messenger-address-book-search {
    flex: 0 0 auto;
    padding: 0.55rem 0.85rem 0.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--color-card, #fff);
  }

  body.sf-messenger-compose-open .messenger-address-book-search .messenger-to-field {
    min-height: 2.5rem;
    padding: 0.3rem 0.5rem;
  }

  body.sf-messenger-compose-open .messenger-address-book-summary {
    margin: 0.3rem 0 0;
  }

  body.sf-messenger-compose-open .messenger-address-book-teams {
    flex: 0 0 auto;
    margin: 0.45rem 0.85rem 0;
  }

  body.sf-messenger-compose-open .messenger-address-book-teams-summary {
    padding: 0.45rem 0.65rem;
    font-size: 0.88rem;
  }

  body.sf-messenger-compose-open .messenger-team-presets {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    margin: 0;
    min-height: 0;
  }

  body.sf-messenger-compose-open .messenger-team-presets .messenger-team-preset-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.28rem 0.55rem;
  }

  body.sf-messenger-compose-open .messenger-address-book-list-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0.35rem;
    padding: 0 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  body.sf-messenger-compose-open .messenger-address-book-list-label {
    flex: 0 0 auto;
    margin: 0 0 0.3rem;
    font-size: 0.82rem;
  }

  body.sf-messenger-compose-open .messenger-recipient-filters {
    flex: 0 0 auto;
    margin: 0 0 0.35rem;
    padding-bottom: 0.15rem;
    background: var(--color-card, #fff);
  }

  body.sf-messenger-compose-open .messenger-recipient-checks {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.sf-messenger-compose-open #messengerComposeBody.messenger-compose-body,
  body.sf-messenger-compose-open #messengerComposeView textarea.messenger-compose-body {
    min-height: 9rem;
    max-height: 40vh;
  }

  /* Postausgang-Detail: Nachricht aufklappbar, mehr Platz für Liste */
  body.sf-messenger-focus[data-page="messenger"] .messenger-outbox-msg .messenger-outbox-preview {
    max-height: min(55vh, 22rem);
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.75rem 0.85rem;
  }

  body.sf-messenger-focus[data-page="messenger"] .messenger-outbox-detail-summary {
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
  }

  /*
   * Immersiver Chat (WhatsApp-Stil): Viewport sperren,
   * nur .messenger-chat-messages scrollt — Eingabezeile bleibt unten.
   */
  html:has(body.sf-messenger-chat-open[data-page="messenger"]),
  body.sf-messenger-chat-open[data-page="messenger"] {
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .app-shell {
    padding: 0;
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  body.sf-messenger-chat-open[data-page="messenger"] .content {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .topbar {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    flex: 0 0 auto;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .page {
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .messenger-page.card {
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .messenger-page > .card-header,
  body.sf-messenger-chat-open[data-page="messenger"] #messengerMainTabs,
  body.sf-messenger-chat-open[data-page="messenger"] #messengerScopeHint,
  body.sf-messenger-chat-open[data-page="messenger"] #messengerPageFeedback {
    display: none !important;
  }

  body.sf-messenger-chat-open[data-page="messenger"] #messengerColleaguesPane,
  body.sf-messenger-chat-open[data-page="messenger"] #messengerParentsPane {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .messenger-chat-view:not([hidden]) {
    border: none;
    border-radius: 0;
    min-height: 0;
    max-height: none;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .messenger-chat-messages {
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.65rem 0.7rem;
  }

  body.sf-messenger-chat-open[data-page="messenger"] .messenger-chat-compose {
    position: relative;
    bottom: auto;
    z-index: 8;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    flex: 0 0 auto;
    background: var(--color-card, #fff);
  }

  /* Chat sichtbar, aber noch ohne body-Klasse (Fallback): kein Rahmen */
  body[data-page="messenger"] .messenger-chat-view:not([hidden]) {
    border: none;
    border-radius: 0;
  }

  body.sf-messenger-chat-open #messengerOpenPopupBtn {
    display: none;
  }

  body.sf-messenger-chat-open .sf-native-club-switch,
  body.sf-messenger-compose-open .sf-native-club-switch {
    display: none !important;
  }

  /* Neue-Nachricht-Maske: Senden nicht unter dem Fold */
  #messengerComposeView .messenger-compose-send-field {
    position: sticky;
    bottom: 0;
    z-index: 7;
    margin: 0 -0.25rem;
    padding: 0.55rem 0.25rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-card, #fff);
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    align-self: stretch;
  }

  #messengerComposeView .messenger-compose-send-field #messengerSendBtn {
    width: 100%;
  }

  #messengerComposeBody.messenger-compose-body,
  #messengerComposeView textarea.messenger-compose-body {
    min-height: 7rem;
    max-height: 12rem;
  }
}

body[data-theme="dark"].sf-messenger-chat-open[data-page="messenger"] .content,
body[data-theme="dark"].sf-messenger-chat-open[data-page="messenger"] .messenger-page.card {
  background: var(--color-card, #121a2a);
}

.messenger-wa-preview.is-peer-read {
  color: #2563eb;
  opacity: 1;
}

.messenger-read-receipt {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  opacity: 0.75;
}

.messenger-read-receipt.is-read {
  color: #1d4ed8;
  opacity: 0.95;
  font-weight: 600;
}

body[data-theme="dark"] .messenger-read-receipt.is-read,
body[data-theme="dark"] .messenger-wa-preview.is-peer-read {
  color: #93c5fd;
}

.messenger-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-theme="dark"] .messenger-wa-list,
body[data-theme="dark"] .messenger-chat-view {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .messenger-chat-messages {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.35));
}

body[data-theme="dark"] .messenger-wa-row:hover,
body[data-theme="dark"] .messenger-wa-row:focus-visible {
  background: rgba(59, 130, 246, 0.12);
}

/* Termin bearbeiten: Desktop h?her, Mobil Vollseite */
.modal-backdrop.sf-att-session-edit-modal {
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 12001;
}
.sf-att-session-edit-modal .sf-att-session-edit-panel {
  width: min(560px, calc(100% - 24px));
  max-width: min(560px, 96vw);
  height: auto;
  max-height: min(92dvh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(8, 20, 44, 0.35);
}
.sf-att-session-edit-modal .sf-att-session-edit-header {
  flex: 0 0 auto;
  padding: 0.85rem 1rem 0.35rem;
}
.sf-att-session-edit-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 1rem 0.75rem;
}
.sf-att-session-edit-modal .sf-att-session-edit-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(31, 61, 99, 0.12);
  background: var(--color-card, #fff);
}
.sf-att-session-edit-modal .sf-att-session-edit-danger {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-card, #fff);
}
.sf-att-session-edit-modal .sf-att-session-edit-danger-btn {
  width: 100%;
  justify-content: center;
}
.sf-att-session-edit-modal .sf-att-session-edit-delete-btn {
  border-color: rgba(185, 28, 28, 0.45);
  color: #991b1b;
}

@media (max-width: 720px) {
  .modal-backdrop.sf-att-session-edit-modal {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }
  .sf-att-session-edit-modal .sf-att-session-edit-panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 100dvh;
    border-radius: 0;
  }
  .sf-att-session-edit-modal .sf-att-session-edit-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
  .sf-att-session-edit-modal .sf-att-session-edit-actions .cta {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }
}

body[data-theme="dark"] .sf-att-session-edit-modal .sf-att-session-edit-actions,
body[data-theme="dark"] .sf-att-session-edit-modal .sf-att-session-edit-danger {
  background: var(--color-card, #121a2a);
  border-top-color: rgba(148, 163, 184, 0.2);
}
body[data-theme="dark"] .sf-att-session-edit-modal .sf-att-session-edit-delete-btn {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
}

.messenger-to-field {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--color-border, #b8cae6);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.messenger-to-chips {
  display: contents;
}

.messenger-to-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(30, 79, 161, 0.12);
  color: var(--color-text, #0a1628);
  font-size: 0.88rem;
  line-height: 1.25;
}

.messenger-to-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.messenger-to-chip-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0 0.2rem;
  border-radius: 999px;
}

.messenger-to-chip-remove:hover {
  background: rgba(0, 0, 0, 0.08);
}

.messenger-to-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--color-border, #b8cae6);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.14);
}

.messenger-to-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font: inherit;
  color: var(--color-text, #0a1628);
}

.messenger-to-suggest-item:hover,
.messenger-to-suggest-item.is-active {
  background: rgba(30, 79, 161, 0.1);
}

.messenger-to-suggest-empty {
  padding: 0.65rem 0.75rem;
  color: var(--color-muted, #4a5d7a);
  font-size: 0.9rem;
}

.messenger-recipient-checks {
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--color-border, #b8cae6);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.messenger-compose-body,
textarea.messenger-compose-body {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 12rem;
  resize: vertical;
  font-size: 16px;
  line-height: 1.4;
  -webkit-appearance: none;
  touch-action: manipulation;
}

/* Chat-Antwortzeile: kompakt neben dem Senden-Button */
.messenger-chat-compose textarea.messenger-compose-body,
#messengerChatBody {
  min-height: 2.75rem;
  max-height: 8rem;
  resize: vertical;
}

.messenger-page .field.full > .input,
.messenger-page .field.full > textarea.textarea,
.messenger-page input.input,
.messenger-page textarea.textarea,
.messenger-page .messenger-to-input,
.messenger-page .messenger-chat-files,
#messengerComposeSubject,
#messengerComposeFiles,
#messengerComposeBody,
#messengerToInput,
#messengerChatBody,
#messengerChatFiles {
  font-size: 16px !important;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

.messenger-scope-tabs {
  margin-bottom: 0.55rem;
  padding: 0.28rem;
  border-radius: 14px;
  background: rgba(41, 91, 160, 0.07);
  border: 1px solid rgba(41, 91, 160, 0.14);
}

.messenger-scope-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 3.1rem;
  padding: 0.45rem 0.7rem;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.messenger-scope-tab__title {
  font-weight: 750;
  font-size: 0.98rem;
}

.messenger-scope-tab__meta {
  font-size: 0.75rem;
  font-weight: 550;
  opacity: 0.82;
}

.messenger-scope-tab--audience:not(.active) {
  background: #eef6ea;
  color: #245c2e;
}

.messenger-scope-tab--intern:not(.active) {
  background: #e6efff;
}

.messenger-scope-hint {
  margin: 0 0 0.95rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.35;
  background: rgba(41, 91, 160, 0.08);
  border-left: 4px solid var(--color-primary, #295ba0);
}

body.sf-messenger-scope-audience .messenger-scope-hint {
  background: rgba(46, 125, 50, 0.1);
  border-left-color: #2e7d32;
}

body.sf-messenger-scope-audience #messengerParentsPane {
  border-radius: 12px;
}

.messenger-page,
.messenger-page .card,
.messenger-page .messenger-view,
.messenger-chat-view,
.messenger-chat-messages,
.messenger-chat-compose,
.messenger-wa-list {
  max-width: 100%;
  min-width: 0;
}

/* Nur Listen/Bubbles horizontal clippen — Chat-Spalte behält overflow:hidden (kein Mit-Scrollen der Eingabe) */
.messenger-chat-messages,
.messenger-wa-list {
  overflow-x: hidden;
}

.sf-pm-pending-files {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.4rem 0 0;
}
.sf-pm-pending-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.sf-pm-pending-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sf-pm-pending-file-remove {
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
}

.messenger-att-wrap {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.messenger-att-wrap--images.is-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  max-width: min(100%, 280px);
  align-items: stretch;
}

.messenger-att-wrap--images:not(.is-image-grid) {
  max-width: min(100%, 240px);
}

.messenger-chat-bubble .cta.ghost {
  max-width: 100%;
}

.messenger-att-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  text-align: left;
  word-break: break-word;
}

.messenger-att-thumb {
  display: block;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  overflow: hidden;
  max-width: min(100%, 220px);
  width: 100%;
  min-height: 72px;
}

.messenger-att-wrap--images.is-image-grid .messenger-att-thumb {
  max-width: none;
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.messenger-att-thumb.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.messenger-att-thumb-ph {
  font-size: 0.8rem;
  opacity: 0.65;
  padding: 0.5rem;
  text-align: center;
  word-break: break-word;
}

.messenger-att-thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
}

.messenger-att-wrap--images.is-image-grid .messenger-att-thumb img {
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.sf-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20050;
  background: rgba(8, 15, 30, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.sf-image-lightbox[hidden] {
  display: none !important;
}

.sf-image-lightbox img {
  max-width: min(100%, 960px);
  max-height: calc(100dvh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.sf-image-lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
}

.sf-image-lightbox-caption {
  color: #e2e8f0;
  font-size: 0.9rem;
  text-align: center;
  max-width: 90vw;
  word-break: break-word;
}

.sf-doc-lightbox {
  justify-content: flex-start;
  overflow: hidden;
}

.sf-doc-lightbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  width: min(100%, 960px);
  padding: 2.4rem 0.25rem 0.35rem;
}

.sf-doc-lightbox-pages {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  width: min(100%, 960px);
  flex: 1 1 auto;
  max-height: calc(100dvh - 7rem);
  padding: 0.4rem;
  background: #1e293b;
  border-radius: 10px;
}

.sf-doc-lightbox-pages canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 0.45rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.sf-doc-lightbox iframe,
.sf-doc-lightbox embed {
  width: min(100%, 960px);
  height: calc(100dvh - 5.5rem);
  max-height: 900px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.sf-doc-lightbox-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(92vw, 420px);
  padding: 1.25rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sf-doc-lightbox-icon {
  font-size: 2rem;
  line-height: 1;
}

.sf-doc-lightbox-title {
  margin: 0;
  font-weight: 650;
  font-size: 1rem;
  word-break: break-word;
  color: #e2e8f0;
}

.sf-doc-lightbox-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #475569;
}

.sf-doc-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
}

.sf-doc-lightbox-actions .cta {
  min-width: 9rem;
}

.messenger-to-input {
  flex: 1 1 8rem;
  min-width: 7rem;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: inherit;
  padding: 0.25rem 0.15rem;
}

@media (min-width: 961px) {
  .messenger-recipient-checks {
    max-height: 22rem;
  }

  textarea.messenger-compose-body {
    min-height: 18rem;
  }
}

.messenger-recipient-checks .messenger-recipient-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--color-text, #0a1628);
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  font: inherit;
}

.messenger-recipient-checks .messenger-recipient-row:hover {
  background: rgba(30, 79, 161, 0.08);
}

.messenger-recipient-checks .messenger-recipient-empty {
  color: var(--color-muted, #4a5d7a);
  padding: 0.5rem 0.25rem;
  font-size: 0.9rem;
}

body[data-theme="dark"] .messenger-to-field,
body[data-theme="dark"] .messenger-recipient-checks {
  background: rgba(18, 32, 51, 0.85);
  border-color: var(--color-border, #3d5a80);
}

body[data-theme="dark"] .messenger-to-suggest {
  background: #15263d;
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .messenger-to-chip {
  background: rgba(96, 165, 250, 0.18);
  color: #e8f1ff;
}

body[data-theme="dark"] .messenger-recipient-checks .messenger-recipient-row {
  color: var(--color-text, #e2e8f0);
}

body[data-theme="dark"] .messenger-recipient-checks .messenger-recipient-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 6px max(4px, env(safe-area-inset-right, 0px)) 2px
    max(4px, env(safe-area-inset-left, 0px));
  color: var(--color-primary-dark);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

/* Erste Zeile: Men? + Pill in einer Reihe; Titel optional umbrechen (schmal: k?rzer) */
.topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* Eingeloggt: Pill „Turnierverwaltung“ überflüssig — Logo trägt die Marke */
body:not(.sf-guest-shell) .topbar-context-pill {
  display: none !important;
}

/*
 * Mobil/Tablet: doppelte Seitenüberschrift im Card-Kopf ausblenden.
 * Hinweise: Toggle in Topbar (?), leerer Hinweis-Block ausgeblendet.
 */
@media (max-width: 960px) {
  body:not(.sf-guest-shell) .page > section.card > .card-header > .pill,
  body:not(.sf-guest-shell) .page > section.card > .card-header .sf-card-hint-main > .pill,
  body:not(.sf-guest-shell) .page > section.card > .card-header > div:not(.card-header-actions) > .pill {
    display: none !important;
  }

  body:not(.sf-guest-shell) .page > section.card > .card-header h2,
  body:not(.sf-guest-shell) .page > section.card > .card-header h3,
  body:not(.sf-guest-shell) .page > section.card > .card-header .sf-card-hint-main > h2,
  body:not(.sf-guest-shell) .page > section.card > .card-header .sf-card-hint-main > h3 {
    display: none !important;
  }

  body:not(.sf-guest-shell) .page > section.card > .card-header.sf-card-hint--collapsible:not(.sf-card-hint--collapsed) {
    padding: 0.65rem 0.85rem;
  }
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.topbar-actions .page-hint-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  /* ? sitzt in vielen Fonts optisch zu tief */
  transform: translateY(-0.5px);
}

.topbar-actions .page-hint-toggle[aria-pressed="true"] {
  background: rgba(26, 127, 212, 0.22);
  box-shadow: 0 0 0 2px rgba(26, 127, 212, 0.35);
}

/* Card-Hinweis-Button aus — Steuerung nur noch über Topbar „?“ */
.card-header .sf-card-hint-toggle {
  display: none !important;
}

/* Eingeklappter reiner Hinweis-Kopf: kein leerer Block */
.card-header.sf-card-hint--collapsed.sf-card-hint--header-empty {
  display: none !important;
}

.menu-button {
  display: none;
}

.mobile-backdrop {
  display: none;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-weight: 700;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
}

.icon-button .notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #ffffff;
  pointer-events: none;
  z-index: 1;
}

.icon-button .notification-badge[hidden] {
  display: none !important;
}

.avatar-button {
  background: linear-gradient(180deg, #1e4fa1 0%, #0b2d63 100%);
  color: #fff;
}

.avatar-initials {
  font-size: 12px;
  letter-spacing: 0.4px;
}

.help-button {
  background: #e6efff;
  color: var(--color-primary-dark);
}

.help-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: none;
  z-index: 5;
}

.help-panel.open {
  display: block;
}

.help-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.help-text {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Eltern-R?ckmeldung: ausf?hrliche ?-Hilfe (Desktop: Dropdown rechts oben) */
body.sf-guest-shell[data-page^="public-attendance"] .help-panel {
  width: min(92vw, 360px);
  max-height: min(72vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

body.sf-guest-shell[data-page^="public-attendance"] .help-text {
  font-size: 13px;
  color: #344054;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.sf-guest-shell[data-page^="public-attendance"] .help-text ul,
body.sf-guest-shell[data-page^="public-attendance"] .help-text ol {
  padding-left: 1.15rem;
  margin-right: 0;
}

.public-helper-selection-required-hint {
  outline: 2px solid var(--color-primary, #1e4fa1);
  outline-offset: 2px;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(30, 79, 161, 0.18);
}

/* iPhone / PWA: nicht in der Topbar clippen ? volle Breite mit Safe Area */
@media (max-width: 960px) {
  body.sf-guest-shell[data-page^="public-attendance"] .topbar-actions {
    overflow: visible;
  }

  body.sf-guest-shell[data-page^="public-attendance"] .help-panel {
    position: fixed;
    z-index: 250;
    top: calc(env(safe-area-inset-top, 0px) + 7.75rem);
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    max-height: min(
      calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 8.5rem),
      560px
    );
    margin: 0;
    box-shadow: 0 12px 40px rgba(8, 20, 44, 0.22);
  }
}

@media (max-width: 480px) {
  body.sf-guest-shell[data-page^="public-attendance"] .help-panel {
    top: calc(env(safe-area-inset-top, 0px) + 8.75rem);
  }
}

.help-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e6efff;
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  position: relative;
  cursor: help;
}

.help-inline::after {
  content: attr(data-help);
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #0e1a2b;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.3;
  min-width: 180px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 5;
}

.help-inline:hover::after {
  opacity: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #e6efff;
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.pill--rsvp-ok {
  background: rgba(46, 125, 50, 0.18);
  color: #1b5e20;
}
.pill--rsvp-no {
  background: rgba(198, 40, 40, 0.16);
  color: #b71c1c;
}
.pill--rsvp-pending {
  background: rgba(255, 160, 0, 0.2);
  color: #e65100;
}

.pill--rsvp-cancelled {
  background: rgba(183, 28, 28, 0.14);
  color: #9f1239;
  border: 1px solid rgba(183, 28, 28, 0.45);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-theme="dark"] .pill--rsvp-ok {
  color: #c8e6c9;
  background: rgba(76, 175, 80, 0.2);
}
body[data-theme="dark"] .pill--rsvp-no {
  color: #ffcdd2;
  background: rgba(244, 67, 54, 0.2);
}
body[data-theme="dark"] .pill--rsvp-pending {
  color: #ffe0b2;
  background: rgba(255, 193, 7, 0.15);
}

body[data-theme="dark"] .pill--rsvp-cancelled {
  color: #fecdd3;
  background: rgba(190, 18, 60, 0.28);
  border-color: rgba(251, 113, 133, 0.55);
}

.pill--trainer-quittierung-offen {
  background: rgba(245, 158, 11, 0.22);
  color: #92400e;
  border: 1px solid rgba(180, 83, 9, 0.35);
}
body[data-theme="dark"] .pill--trainer-quittierung-offen {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.35);
}

.trainer-player-rsvp-row {
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.trainer-player-rsvp-row--ok {
  border-color: rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.06);
}
.trainer-player-rsvp-row--no {
  border-color: rgba(244, 67, 54, 0.4);
  background: rgba(244, 67, 54, 0.06);
}
.trainer-player-rsvp-row--open {
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.06);
}
.trainer-player-rsvp-badge {
  margin: 0.25rem 0 0.15rem;
}

.sf-public-light-boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 1.35rem 1rem;
  margin-top: 0.75rem;
}

.sf-public-light-boot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--sf-gray-100, #e8edf3);
  border-top-color: var(--sf-blue, #1a7fd4);
  border-right-color: var(--sf-blue-dark, #1565b8);
  border-radius: 50%;
  animation: sf-public-light-boot-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.sf-public-light-boot-text {
  margin: 0;
  text-align: center;
}

@keyframes sf-public-light-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.sf-parent-data-consent {
  padding: 1rem 1.05rem 1.15rem;
  border: 1px solid var(--color-border, #d0d7e2);
  border-radius: 14px;
  background: var(--color-surface, #f8fafc);
}

.sf-parent-data-consent__title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--color-text, #0f1a2e);
}

.sf-parent-data-consent__text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text, #0f1a2e);
  max-height: min(55vh, 28rem);
  overflow-y: auto;
  padding-right: 0.35rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sf-parent-data-consent__intro p,
.sf-parent-data-consent__option-body p,
.sf-parent-data-consent__text p {
  margin: 0 0 0.55rem;
}

.sf-parent-data-consent__intro p:last-child,
.sf-parent-data-consent__option-body p:last-child {
  margin-bottom: 0;
}

.sf-parent-data-consent__option {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--color-border, #d0d7e2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.sf-parent-data-consent__option-body {
  font-size: 0.88rem;
  color: var(--color-muted, #5a6b82);
}

.sf-parent-data-consent__privacy {
  margin: 0.15rem 0 0;
}

.sf-parent-data-consent__text ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.sf-parent-data-consent__details {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.sf-parent-data-consent__details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sf-parent-data-consent__check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.35rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text, #0f1a2e);
  font-size: 0.92rem;
  line-height: 1.4;
  border-radius: 8px;
  background: rgba(26, 127, 212, 0.06);
}

.sf-parent-data-consent__check-label {
  flex: 1;
  min-width: 0;
}

.sf-parent-data-consent__check--optional {
  font-weight: 500;
  color: var(--color-muted, #5a6b82);
  background: rgba(90, 107, 130, 0.06);
}

.sf-parent-data-consent__check input {
  margin: 0.15rem 0 0;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  accent-color: var(--sf-blue, #1a7fd4);
}

body[data-theme="dark"] .sf-parent-data-consent {
  background: #152238;
  border-color: var(--color-border, #2a3d5c);
}

body[data-theme="dark"] .sf-parent-data-consent__title,
body[data-theme="dark"] .sf-parent-data-consent__text,
body[data-theme="dark"] .sf-parent-data-consent__check {
  color: var(--color-text, #e8eef6);
}

body[data-theme="dark"] .sf-parent-data-consent__option {
  background: rgba(15, 26, 46, 0.55);
  border-color: var(--color-border, #2a3d5c);
}

body[data-theme="dark"] .sf-parent-data-consent__option-body {
  color: #c5d4e8;
}

body[data-theme="dark"] .sf-parent-data-consent__check {
  background: rgba(26, 127, 212, 0.12);
}

body[data-theme="dark"] .sf-parent-data-consent__check--optional {
  color: #c5d4e8;
  background: rgba(90, 107, 130, 0.12);
}

.public-light-linked-helper {
  margin-top: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 8px;
  background: var(--color-surface-muted, rgba(37, 99, 235, 0.06));
}
.public-light-linked-helper__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.public-light-linked-helper__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0.35rem;
  cursor: pointer;
  font-size: 16px;
  touch-action: manipulation;
}

.public-light-session-card {
  border: 1px solid var(--sf-session-card-border, rgba(31, 61, 99, 0.28));
  box-shadow: var(--sf-session-card-shadow);
}

/* iOS: mind. 16px in Eingabefeldern, sonst Zoom/Focus-Probleme; volle Breite auf schmalen Displays */
.public-light-session-card .textarea,
#publicRsvpComment,
#publicLightKidGate textarea {
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.public-light-session-card--confirmed {
  border-left: 5px solid rgba(46, 125, 50, 0.78);
  background: rgba(46, 125, 50, 0.05);
}

.public-light-session-card--declined {
  border-left: 5px solid rgba(183, 28, 28, 0.78);
  background: rgba(183, 28, 28, 0.05);
}

.public-light-session-card--pending {
  border-left: 5px solid rgba(230, 81, 0, 0.72);
  background: rgba(230, 81, 0, 0.05);
}

.public-light-session-card--highlight {
  outline: 2px solid rgba(37, 99, 235, 0.75);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.public-light-session-card--recently-changed {
  border-left: 5px solid rgba(245, 158, 11, 0.88);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent 48%);
}

a.attendance-trikot-hilfe-link {
  color: var(--color-primary, #1e4fa1);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.attendance-trikot-hilfe-link:hover {
  color: var(--color-primary-dark, #0b2d63);
}

.attendance-parent-helper-modal-trikot-hilfe {
  line-height: 1.4;
}

.attendance-session-change-details {
  margin: 0.35rem 0 0.3rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(251, 191, 36, 0.14);
  font-size: 0.88rem;
  line-height: 1.35;
}

.attendance-session-change-details--compact {
  display: inline-block;
  margin: 0.15rem 0 0.1rem;
  max-width: 100%;
  border: none;
  background: transparent;
  vertical-align: baseline;
}

.attendance-session-change-summary {
  cursor: pointer;
  font-weight: 700;
  color: #b45309;
  padding: 0.4rem 0.55rem;
  list-style: none;
  user-select: none;
}

.attendance-session-change-summary--compact {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.1rem 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.attendance-session-change-icon {
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.9;
}

.attendance-session-change-details--compact[open] > .attendance-session-change-inner {
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

.attendance-session-change-summary::-webkit-details-marker {
  display: none;
}

.attendance-session-change-summary::after {
  content: " \25BE";
  font-weight: 600;
  opacity: 0.65;
}

.attendance-session-change-details[open] > .attendance-session-change-summary::after {
  content: "\25B4";
}

.attendance-session-change-inner {
  padding: 0 0.55rem 0.45rem;
}

.attendance-session-change-inner-title {
  font-weight: 700;
  color: #b45309;
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}

.attendance-session-change-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #92400e;
}

.attendance-session-change-list li {
  margin: 0.1rem 0;
}

.attendance-session-change-at {
  margin-top: 0.2rem;
}

/* Trainer — Teilnahme: Zusagen/Kader/Absagen als Info-Chips (wie „Geändert“) */
.attendance-rsvp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  align-items: flex-start;
}
.attendance-rsvp-chip-section {
  width: 100%;
  margin-top: 6px;
}
.attendance-rsvp-chip-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  margin: 0 0 4px;
  line-height: 1.2;
}
.attendance-rsvp-chip-section--trainers {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border, #cbd5e1) 80%, transparent);
}
.attendance-rsvp-chip-section--players .attendance-rsvp-chip-section-label {
  color: color-mix(in srgb, #166534 70%, var(--muted, #64748b));
}
.attendance-rsvp-chip-section--trainers .attendance-rsvp-chip-section-label {
  color: color-mix(in srgb, var(--accent, #2a4d7a) 75%, var(--muted, #64748b));
}
body[data-page="trainer-attendance"] .attendance-session-row-stats .attendance-rsvp-chip-row {
  width: 100%;
}
body[data-page="trainer-attendance"] .attendance-session-row-stats .attendance-rsvp-chip-section .attendance-rsvp-chip-row {
  margin-top: 0;
}

/* App-Anleitung: HTML-Viewer in der App (kein Pop-up) */
.sf-html-doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  background: #0f172a;
}
.sf-html-doc-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: #1e293b;
  color: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.sf-html-doc-viewer__title {
  font-size: 0.95rem;
  font-weight: 700;
}
.sf-html-doc-viewer__actions {
  display: flex;
  gap: 8px;
  margin: 0;
}
.sf-html-doc-viewer__frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
}
body.sf-html-doc-viewer-open {
  overflow: hidden;
}
.attendance-rsvp-info-chip > .attendance-rsvp-info-chip-summary::-webkit-details-marker {
  display: none;
}
.attendance-rsvp-info-chip > .attendance-rsvp-info-chip-summary::after {
  content: " \25BE";
  font-weight: 600;
  opacity: 0.65;
}
.attendance-rsvp-info-chip[open] > .attendance-rsvp-info-chip-summary::after {
  content: "\25B4";
}
.attendance-rsvp-info-chip[open] > .attendance-rsvp-info-chip-inner {
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  max-height: min(42vh, 260px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.attendance-rsvp-info-chip-summary--confirmed {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}
.attendance-rsvp-info-chip-summary--kader {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}
.attendance-rsvp-info-chip-summary--declined {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}
.attendance-rsvp-info-chip-summary--pending {
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}
.attendance-rsvp-info-chip-summary--moved {
  border-color: rgba(14, 116, 144, 0.45);
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
}
.attendance-rsvp-info-chip-summary--present {
  border-color: rgba(22, 163, 74, 0.5);
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  font-weight: 700;
}
.attendance-rsvp-info-chip-summary--absent {
  border-color: rgba(234, 88, 12, 0.5);
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.attendance-rsvp-info-chip--confirmed[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}
.attendance-rsvp-info-chip--kader[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
}
.attendance-rsvp-info-chip--declined[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}
.attendance-rsvp-info-chip--pending[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(100, 116, 139, 0.06);
}
.attendance-rsvp-info-chip--moved[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(14, 116, 144, 0.35);
  background: rgba(14, 116, 144, 0.06);
}
.attendance-rsvp-info-chip--present[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.08);
}
.attendance-rsvp-info-chip--absent[open] > .attendance-rsvp-info-chip-inner {
  border: 1px solid rgba(234, 88, 12, 0.4);
  background: rgba(234, 88, 12, 0.08);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--confirmed {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.22);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--kader {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.2);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--declined {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.22);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--pending {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(100, 116, 139, 0.22);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--moved {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(14, 116, 144, 0.28);
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--present {
  color: #86efac;
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.24);
  font-weight: 700;
}
body[data-theme="dark"] .attendance-rsvp-info-chip-summary--absent {
  color: #fdba74;
  border-color: rgba(234, 88, 12, 0.55);
  background: rgba(234, 88, 12, 0.22);
}
body[data-theme="dark"] .attendance-rsvp-info-chip--confirmed[open] > .attendance-rsvp-info-chip-inner {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
}
body[data-theme="dark"] .attendance-rsvp-info-chip--declined[open] > .attendance-rsvp-info-chip-inner {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
}
body[data-theme="dark"] .attendance-rsvp-info-chip--pending[open] > .attendance-rsvp-info-chip-inner,
body[data-theme="dark"] .attendance-rsvp-info-chip--absent[open] > .attendance-rsvp-info-chip-inner {
  border-color: rgba(234, 88, 12, 0.4);
  background: rgba(234, 88, 12, 0.1);
}
body[data-theme="dark"] .attendance-rsvp-info-chip--present[open] > .attendance-rsvp-info-chip-inner,
body[data-theme="dark"] .attendance-rsvp-info-chip--kader[open] > .attendance-rsvp-info-chip-inner {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}
body[data-page="trainer-attendance"] .attendance-rsvp-summary .attendance-rsvp-chip-row {
  margin-top: 6px;
}
.attendance-rsvp-chip-quick-inner {
  padding-top: 6px;
}
.attendance-rsvp-chip-quick-all {
  width: 100%;
  margin-bottom: 8px;
}
.attendance-rsvp-chip-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.attendance-rsvp-chip-quick-text {
  flex: 1 1 140px;
  min-width: 0;
}
.attendance-rsvp-chip-quick-reason {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
.attendance-rsvp-chip-quick-name {
  font-weight: 600;
  font-size: 0.92rem;
  flex: 1 1 120px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attendance-rsvp-chip-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.attendance-rsvp-chip-quick-slot {
  min-width: 6.5rem;
  padding: 8px 12px;
  font-size: 0.85rem;
}
.attendance-rsvp-chip-quick-move {
  min-width: 0;
}
.attendance-rsvp-chip-quick-present {
  min-width: 7.5rem;
}
.attendance-helper-list-assign-wrap {
  display: block;
  width: 100%;
  max-width: min(100%, 40rem);
  margin-top: 8px;
  text-align: left;
}
.attendance-helper-list-assign {
  display: block;
  width: 100%;
}
.attendance-helper-list-assign-inner {
  max-height: min(70vh, 32rem);
  overflow: auto;
  text-align: left;
  padding: 8px 6px 6px;
}
.attendance-helper-list-assign-fb {
  margin-top: 4px;
}
.attendance-helper-list-assign .attendance-helper-assignments,
.attendance-helper-list-assign .event-reg-helferliste,
.attendance-helper-list-assign .event-reg-duty-plan-block {
  text-align: left;
}
.attendance-helper-list-assign .event-reg-helferliste table {
  font-size: 0.85rem;
}

body[data-theme="dark"] .attendance-session-change-details {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.35);
}

body[data-theme="dark"] .attendance-session-change-summary,
body[data-theme="dark"] .attendance-session-change-inner-title {
  color: #fcd34d;
}

body[data-theme="dark"] .attendance-session-change-list {
  color: #fde68a;
}

body[data-theme="dark"] .attendance-session-change-summary--compact {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.4);
  color: #fcd34d;
}

body[data-theme="dark"] .attendance-session-change-details--compact[open] > .attendance-session-change-inner {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(120, 53, 15, 0.3);
}

.list-item.attendance-session-row.attendance-session-row--has-change {
  border-left: 4px solid rgba(245, 158, 11, 0.85);
}

.public-light-session-card--cancelled {
  border-left: 4px solid #b91c1c;
  background: rgba(183, 28, 28, 0.07) !important;
  box-shadow: inset 0 0 0 1px rgba(183, 28, 28, 0.12);
}

.public-light-session-card--cancelled.public-light-session-card--recently-changed {
  border-left-color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(183, 28, 28, 0.12);
}

.public-light-session-title--cancelled {
  color: #9f1239;
}

.public-light-cancelled-notice {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(183, 28, 28, 0.08);
  border: 1px solid rgba(183, 28, 28, 0.38);
  font-size: 0.95rem;
  line-height: 1.45;
  color: #7f1d1d;
}

.public-light-cancelled-notice-reason {
  margin-top: 8px;
  font-weight: 600;
  color: #991b1b;
}

/* Öffentliche Light-Karten: Farben über CSS-Variablen (--sf-public-light-pending-*) bei Bedarf durch Systemoptionen überschrieben */
:root {
  --sf-public-light-pending-training: rgba(232, 241, 248, 0.94);
  --sf-public-light-pending-training-dark: rgba(56, 189, 248, 0.12);
  --sf-public-light-pending-training-fg: #0f172a;
  --sf-public-light-pending-training-fg-dark: #e2e8f0;
  --sf-public-light-pending-spiel: rgba(214, 233, 255, 0.96);
  --sf-public-light-pending-spiel-dark: rgba(74, 155, 255, 0.18);
  --sf-public-light-pending-spiel-fg: #0f172a;
  --sf-public-light-pending-spiel-fg-dark: #e2e8f0;
  --sf-public-light-pending-tournament: rgba(255, 244, 220, 0.94);
  --sf-public-light-pending-tournament-dark: rgba(251, 191, 36, 0.15);
  --sf-public-light-pending-tournament-fg: #0f172a;
  --sf-public-light-pending-tournament-fg-dark: #fef3c7;
  --sf-public-light-pending-event: rgba(239, 230, 255, 0.95);
  --sf-public-light-pending-event-dark: rgba(167, 139, 250, 0.18);
  --sf-public-light-pending-event-fg: #0f172a;
  --sf-public-light-pending-event-fg-dark: #ede9fe;
  --sf-public-light-pending-trainer-meeting: rgba(236, 253, 245, 0.94);
  --sf-public-light-pending-trainer-meeting-dark: rgba(52, 211, 153, 0.16);
  --sf-public-light-pending-trainer-meeting-fg: #0f172a;
  --sf-public-light-pending-trainer-meeting-fg-dark: #d1fae5;
}

/* Kind-/Team-Light: Pending-Hintergrund + Schrift je Termin-Art */
.public-light-session-card--pending.public-light-session-card--kind-training {
  background: var(--sf-public-light-pending-training);
  color: var(--sf-public-light-pending-training-fg);
}
.public-light-session-card--pending.public-light-session-card--kind-spiel {
  background: var(--sf-public-light-pending-spiel);
  color: var(--sf-public-light-pending-spiel-fg);
}
.public-light-session-card--pending.public-light-session-card--kind-tournament {
  background: var(--sf-public-light-pending-tournament);
  color: var(--sf-public-light-pending-tournament-fg);
}
.public-light-session-card--pending.public-light-session-card--kind-event {
  background: var(--sf-public-light-pending-event);
  color: var(--sf-public-light-pending-event-fg);
}
.public-light-session-card--pending.public-light-session-card--kind-trainer-meeting {
  background: var(--sf-public-light-pending-trainer-meeting);
  color: var(--sf-public-light-pending-trainer-meeting-fg);
}
.public-light-session-card--pending[class*="public-light-session-card--kind-"] strong,
.public-light-session-card--pending[class*="public-light-session-card--kind-"] .meta {
  color: inherit;
}
.public-light-session-card--confirmed.public-light-session-card--kind-training,
.public-light-session-card--confirmed.public-light-session-card--kind-spiel,
.public-light-session-card--confirmed.public-light-session-card--kind-tournament,
.public-light-session-card--confirmed.public-light-session-card--kind-event {
  background: rgba(46, 125, 50, 0.05);
}
.public-light-session-card--declined.public-light-session-card--kind-training,
.public-light-session-card--declined.public-light-session-card--kind-spiel,
.public-light-session-card--declined.public-light-session-card--kind-tournament,
.public-light-session-card--declined.public-light-session-card--kind-event {
  background: rgba(183, 28, 28, 0.05);
}

/* Trainer-Teilnahme: gleiche Typ-Farben wie Kind-/Team-Link (--sf-public-light-pending-*) */
.list-item.attendance-session-row.attendance-session-row--kind-training {
  background: var(--sf-public-light-pending-training);
  color: var(--sf-public-light-pending-training-fg);
  border-left: 4px solid rgba(14, 165, 233, 0.55);
}
.list-item.attendance-session-row.attendance-session-row--kind-spiel {
  background: var(--sf-public-light-pending-spiel);
  color: var(--sf-public-light-pending-spiel-fg);
  border-left: 4px solid rgba(59, 130, 246, 0.55);
}
.list-item.attendance-session-row.attendance-session-row--kind-tournament {
  background: var(--sf-public-light-pending-tournament);
  color: var(--sf-public-light-pending-tournament-fg);
  border-left: 4px solid rgba(245, 158, 11, 0.6);
}
.list-item.attendance-session-row.attendance-session-row--kind-event {
  background: var(--sf-public-light-pending-event);
  color: var(--sf-public-light-pending-event-fg);
  border-left: 4px solid rgba(139, 92, 246, 0.55);
}
.list-item.attendance-session-row.attendance-session-row--kind-trainer-meeting,
.list-item.attendance-session-row.attendance-session-row--trainer-meeting {
  background: var(--sf-public-light-pending-trainer-meeting);
  color: var(--sf-public-light-pending-trainer-meeting-fg);
  border-left: 4px solid rgba(16, 185, 129, 0.55);
}

body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--kind-training {
  background: var(--sf-public-light-pending-training-dark);
  color: var(--sf-public-light-pending-training-fg-dark);
}
body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--kind-spiel {
  background: var(--sf-public-light-pending-spiel-dark);
  color: var(--sf-public-light-pending-spiel-fg-dark);
}
body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--kind-tournament {
  background: var(--sf-public-light-pending-tournament-dark);
  color: var(--sf-public-light-pending-tournament-fg-dark);
}
body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--kind-event {
  background: var(--sf-public-light-pending-event-dark);
  color: var(--sf-public-light-pending-event-fg-dark);
}
body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--kind-trainer-meeting,
body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--trainer-meeting {
  background: var(--sf-public-light-pending-trainer-meeting-dark);
  color: var(--sf-public-light-pending-trainer-meeting-fg-dark);
}
.list-item.attendance-session-row[class*="attendance-session-row--kind-"] strong,
.list-item.attendance-session-row.attendance-session-row--trainer-meeting strong,
.list-item.attendance-session-row[class*="attendance-session-row--kind-"] .attendance-session-row-main .meta,
.list-item.attendance-session-row.attendance-session-row--trainer-meeting .attendance-session-row-main .meta {
  color: inherit;
}

.public-light-statusline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.public-light-statusline--confirmed {
  border-color: rgba(46, 125, 50, 0.45);
  background: rgba(46, 125, 50, 0.08);
}

.public-light-statusline--declined {
  border-color: rgba(183, 28, 28, 0.45);
  background: rgba(183, 28, 28, 0.08);
}

.public-light-statusline--pending {
  border-color: rgba(230, 81, 0, 0.45);
  background: rgba(230, 81, 0, 0.08);
}

.public-light-statusline--cancelled {
  border-color: rgba(183, 28, 28, 0.5);
  background: rgba(183, 28, 28, 0.1);
}

.public-light-statusline--cancelled .public-light-status-pill {
  font-weight: 700;
}

.list-item.attendance-session-row.attendance-session-row--cancelled {
  border-left: 4px solid #b91c1c;
  background: rgba(183, 28, 28, 0.06);
}

.list-item.attendance-session-row.attendance-session-row--cancelled.attendance-session-row--active {
  background: rgba(183, 28, 28, 0.1);
  border-left-color: #991b1b;
}

.attendance-session-row-title--cancelled {
  color: #9f1239;
}

.attendance-session-cancelled-pill {
  margin-left: 4px;
  vertical-align: middle;
  font-size: 0.72rem;
}

#attendanceDetailWrap.attendance-detail-wrap--cancelled,
#eventDetailWrap.attendance-detail-wrap--cancelled {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(183, 28, 28, 0.35);
  background: rgba(183, 28, 28, 0.06);
}

.attendance-detail-heading--cancelled,
#eventDetailHeading.attendance-detail-heading--cancelled {
  color: #9f1239;
}

body[data-theme="dark"] .public-light-session-card--cancelled {
  border-left-color: #f87171;
  background: rgba(190, 18, 60, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

body[data-theme="dark"] .public-light-session-title--cancelled,
body[data-theme="dark"] .attendance-session-row-title--cancelled,
body[data-theme="dark"] .attendance-detail-heading--cancelled {
  color: #fecdd3;
}

body[data-theme="dark"] .public-light-cancelled-notice {
  background: rgba(190, 18, 60, 0.22);
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

body[data-theme="dark"] .public-light-statusline--cancelled {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(190, 18, 60, 0.2);
}

body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--cancelled {
  background: rgba(190, 18, 60, 0.14);
  border-left-color: #f87171;
}

body[data-theme="dark"] #attendanceDetailWrap.attendance-detail-wrap--cancelled,
body[data-theme="dark"] #eventDetailWrap.attendance-detail-wrap--cancelled {
  background: rgba(190, 18, 60, 0.16);
  border-color: rgba(251, 113, 133, 0.4);
}

.public-light-status-pill {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.public-light-aushilfe-badge {
  margin: 0.25rem 0 0.15rem;
}

.public-light-aushilfe-pill {
  background: color-mix(in srgb, var(--accent, #1d4ed8) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #1d4ed8) 45%, transparent);
  color: var(--text, #0f172a);
  font-weight: 700;
}

.public-light-session-card--aushilfe {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent, #1d4ed8) 70%, transparent);
}

body[data-theme="dark"] .public-light-aushilfe-pill {
  background: color-mix(in srgb, var(--accent, #60a5fa) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent, #60a5fa) 50%, transparent);
  color: var(--text, #e2e8f0);
}

.public-light-vote-btn {
  font-weight: 700;
  border-width: 2px;
}

@keyframes public-light-tap-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}

/** Ghost-Buttons (Kommentar speichern, Zur?cksetzen): deutlicheres Feedback als nur Scale. */
@keyframes public-light-tap-pulse-ghost {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(31, 61, 99, 0);
  }
  40% {
    transform: scale(0.94);
    box-shadow: 0 0 0 5px rgba(31, 61, 99, 0.14);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(31, 61, 99, 0);
  }
}

.public-light-tap-pulse {
  animation: public-light-tap-pulse 0.28s ease-out;
}

.cta.ghost.public-light-tap-pulse {
  animation-name: public-light-tap-pulse-ghost;
  animation-duration: 0.3s;
  animation-timing-function: ease-out;
}

body[data-theme="dark"] .cta.ghost.public-light-tap-pulse {
  animation-name: public-light-tap-pulse-ghost-dark;
}

@keyframes public-light-tap-pulse-ghost-dark {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0);
  }
  40% {
    transform: scale(0.94);
    box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.22);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-light-tap-pulse {
    animation: none;
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .cta.ghost.public-light-tap-pulse {
    animation: none;
    outline: 2px solid currentColor;
    outline-offset: 2px;
    box-shadow: none;
  }

  body[data-theme="dark"] .cta.ghost.public-light-tap-pulse {
    animation: none;
    outline: 2px solid currentColor;
    outline-offset: 2px;
    box-shadow: none;
  }
}

body[data-theme="dark"] .public-light-session-card {
  border-color: var(--sf-session-card-border);
  box-shadow: var(--sf-session-card-shadow);
}

body[data-theme="dark"] .public-light-session-card--confirmed {
  background: rgba(76, 175, 80, 0.11);
}

body[data-theme="dark"] .public-light-session-card--declined {
  background: rgba(244, 67, 54, 0.11);
}

body[data-theme="dark"] .public-light-session-card--pending {
  background: rgba(255, 152, 0, 0.1);
}

body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-training {
  background: var(--sf-public-light-pending-training-dark);
  color: var(--sf-public-light-pending-training-fg-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-spiel {
  background: var(--sf-public-light-pending-spiel-dark);
  color: var(--sf-public-light-pending-spiel-fg-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-tournament {
  background: var(--sf-public-light-pending-tournament-dark);
  color: var(--sf-public-light-pending-tournament-fg-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-event {
  background: var(--sf-public-light-pending-event-dark);
  color: var(--sf-public-light-pending-event-fg-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-trainer-meeting {
  background: var(--sf-public-light-pending-trainer-meeting-dark);
  color: var(--sf-public-light-pending-trainer-meeting-fg-dark);
}

body[data-theme="dark"] .public-light-session-card--confirmed.public-light-session-card--kind-training,
body[data-theme="dark"] .public-light-session-card--confirmed.public-light-session-card--kind-spiel,
body[data-theme="dark"] .public-light-session-card--confirmed.public-light-session-card--kind-tournament,
body[data-theme="dark"] .public-light-session-card--confirmed.public-light-session-card--kind-event {
  background: rgba(76, 175, 80, 0.11);
}

body[data-theme="dark"] .public-light-session-card--declined.public-light-session-card--kind-training,
body[data-theme="dark"] .public-light-session-card--declined.public-light-session-card--kind-spiel,
body[data-theme="dark"] .public-light-session-card--declined.public-light-session-card--kind-tournament,
body[data-theme="dark"] .public-light-session-card--declined.public-light-session-card--kind-event {
  background: rgba(244, 67, 54, 0.11);
}

.page {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--color-card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(14, 26, 43, 0.08);
  min-width: 0;
  max-width: 100%;
}

.tournament-pick-list {
  display: block;
}

.tournament-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.tournament-pick-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-pick-name {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
}

.tournament-pick-meta {
  font-size: 13px;
  color: var(--color-muted);
}

.tournament-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tournament-pick-actions .cta {
  font-size: 14px;
  padding: 8px 14px;
}

@media (min-width: 900px) {
  .tournament-pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
  }
  .tournament-pick-card {
    padding: 20px 24px;
  }
  .tournament-pick-name {
    font-size: 1.2rem;
  }
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-tabs {
  display: flex;
  gap: 8px;
}

.card-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* [hidden] allein reicht nicht: .toolbar-tabs setzt display:flex mit gleicher Spezifit?t */
.task-scope-filter-tabs[hidden] {
  display: none !important;
}

.task-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 4px 0 14px;
}

.task-tab-strip {
  gap: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding: 0;
}

.task-tab-strip .tab {
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--color-muted);
  font-weight: 600;
  padding: 10px 16px;
  box-shadow: none;
}

.task-tab-strip .tab:hover {
  color: var(--color-primary-dark);
  background: rgba(59, 130, 246, 0.07);
}

.task-tab-strip .tab.active {
  background: transparent;
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  border: none;
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: -1px;
  box-shadow: none;
}

.task-user-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.task-user-filter-label {
  margin-top: 0;
  flex-shrink: 0;
}

.task-user-filter .input {
  max-width: 22rem;
  min-width: 12rem;
  flex: 1 1 12rem;
}

.incoming-cal-view-tabs {
  margin-bottom: 10px;
}

.incoming-fc-mount {
  min-height: 420px;
  margin-top: 8px;
}

.incoming-fc-mount .fc {
  --fc-border-color: var(--color-border);
  --fc-page-bg-color: var(--color-card);
  --fc-neutral-bg-color: var(--color-surface);
  --fc-neutral-text-color: var(--color-text);
}

/* Mobil: FC-Toolbar stapeln ? sonst ?berlagern Links/Rechts den Monatstitel */
@media (max-width: 720px) {
  .incoming-fc-mount .fc .fc-header-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
  }

  .incoming-fc-mount .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  /* Titel oben, Navigation darunter, Ansichtsmodus unten */
  .incoming-fc-mount .fc .fc-toolbar-chunk:nth-child(1) {
    order: 2;
  }

  .incoming-fc-mount .fc .fc-toolbar-chunk:nth-child(2) {
    order: 1;
  }

  .incoming-fc-mount .fc .fc-toolbar-chunk:nth-child(3) {
    order: 3;
  }

  .incoming-fc-mount .fc .fc-toolbar-title {
    font-size: 1rem !important;
    line-height: 1.25;
    text-align: center;
    margin: 0;
    padding: 0.1rem 0;
    font-weight: 600;
  }

  .incoming-fc-mount .fc .fc-button {
    padding: 0.28rem 0.5rem;
    font-size: 0.78rem;
    background: transparent !important;
    border: 1px solid rgba(31, 61, 99, 0.28) !important;
    color: inherit !important;
    box-shadow: none !important;
  }

  .incoming-fc-mount .fc .fc-daygrid-day-number {
    font-size: 0.78rem;
    padding: 2px 4px;
  }

  .incoming-fc-mount .fc .fc-daygrid-event {
    margin: 1px 1px 0;
  }

  .incoming-fc-team-bar {
    gap: 6px;
    max-height: none;
    overflow: visible;
  }

  .incoming-fc-team-bar label {
    font-size: 0.82rem;
  }

  .incoming-fc-legend {
    padding-bottom: 3.75rem;
    padding-right: 0.5rem;
  }

  body.sf-native-app .incoming-fc-legend {
    padding-right: 9.5rem;
  }

  .incoming-fc-mount .fc-event.sf-fc-attendance.sf-fc-attendance--team-accent {
    border-width: 0;
    padding-left: 0;
  }
}

.incoming-fc-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0.35rem 0 0.15rem;
}

.incoming-fc-filter-row__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted, #5b6b7c);
}

.incoming-fc-colors-info {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted, #5b6b7c);
  border-radius: 6px;
}

.incoming-fc-colors-info:hover,
.incoming-fc-colors-info[aria-expanded="true"] {
  color: var(--color-text, #12263a);
  background: rgba(31, 61, 99, 0.08);
}

.incoming-fc-legend-panel {
  margin: 0.35rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(31, 61, 99, 0.14);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
}

body[data-theme="dark"] .incoming-fc-legend-panel {
  background: rgba(18, 26, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
}

.incoming-fc-legend-intro {
  margin: 0 0 0.45rem;
  width: 100%;
  flex: 1 0 100%;
  line-height: 1.35;
}

.incoming-fc-team-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-height: 9.5rem;
  overflow-y: auto;
  padding: 4px 0 6px;
}

.incoming-fc-team-bar--chips {
  max-height: none;
  overflow: visible;
}

.incoming-fc-team-chip {
  appearance: none;
  border: 1px solid rgba(31, 61, 99, 0.22);
  background: #fff;
  color: var(--color-text, #12263a);
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.incoming-fc-team-chip.is-active {
  border-color: var(--color-primary, #1f3d63);
  background: rgba(31, 61, 99, 0.1);
  font-weight: 700;
}

.incoming-fc-team-chip:active {
  transform: scale(0.97);
  opacity: 0.8;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

body[data-theme="dark"] .incoming-fc-team-chip {
  background: #121a2a;
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

body[data-theme="dark"] .incoming-fc-team-chip.is-active {
  background: rgba(96, 165, 250, 0.18);
  border-color: #60a5fa;
}

body[data-theme="dark"] .incoming-fc-team-chip:active {
  transform: scale(0.97);
  opacity: 0.8;
}

.incoming-fc-team-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.incoming-fc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 0;
  font-size: 0.88rem;
}

.incoming-fc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.incoming-fc-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.incoming-fc-legend-swatch--ring {
  box-sizing: border-box;
  border: 2px solid #f59e0b;
  background: transparent !important;
}

.incoming-fc-legend-item--hint {
  max-width: 22rem;
  line-height: 1.35;
}

.sf-fc-compact-evt {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 3px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  padding: 1px 3px 1px 0;
}

.sf-fc-compact-evt__bar {
  width: 3px;
  align-self: stretch;
  flex: 0 0 3px;
  background: var(--sf-fc-team-accent, #94a3b8);
  border-radius: 2px 0 0 2px;
}

.sf-fc-compact-evt__t {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.incoming-fc-mount .fc-event.sf-fc-attendance .fc-event-main {
  padding: 0;
}

/* FullCalendar: Turnieranfrage vs. eigener Termin */
.incoming-fc-mount .fc-event.sf-fc-attendance {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.incoming-fc-mount .fc-event.sf-fc-attendance.sf-fc-attendance--team-accent {
  border-style: solid;
  border-width: 0 0 0 5px;
  border-left-color: var(--sf-fc-team-accent, #94a3b8);
  padding-left: 2px;
}

.incoming-fc-mount .fc-event.sf-fc-attendance.sf-fc-attendance--cancelled {
  opacity: 0.75;
  font-style: italic;
}

.incoming-fc-legend-swatch--team-accent {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.incoming-fc-mount.sf-fc-create-enabled .fc-daygrid-day {
  cursor: pointer;
}

.incoming-fc-mount.sf-fc-create-enabled .fc-daygrid-day:hover {
  background: rgba(15, 118, 110, 0.08);
}

.incoming-fc-mount .fc-event.sf-fc-incoming.sf-fc-incoming--action {
  box-shadow: inset 0 0 0 2px #f59e0b, 0 1px 2px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.incoming-fc-mount .fc-event.sf-fc-incoming.sf-fc-incoming--idle {
  opacity: 0.9;
}

/* FullCalendar Dark-Mode: Monatsansicht + Termin?bersicht */
body[data-theme="dark"] .incoming-fc-mount,
body[data-theme="dark"] .incoming-fc-mount .fc,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard {
  --fc-border-color: var(--color-border);
  --fc-page-bg-color: var(--color-card);
  --fc-neutral-bg-color: #243556;
  --fc-neutral-text-color: var(--color-text);
  --fc-today-bg-color: rgba(77, 163, 232, 0.22);
  --fc-now-indicator-color: #4da3e8;
  --fc-highlight-color: rgba(77, 163, 232, 0.16);
  --fc-non-business-color: rgba(15, 22, 38, 0.35);
  --fc-button-bg-color: #1a2744;
  --fc-button-border-color: #3a5080;
  --fc-button-text-color: #e8eef6;
  --fc-button-hover-bg-color: #243556;
  --fc-button-hover-border-color: #4da3e8;
  --fc-button-active-bg-color: #2a3d5c;
  --fc-button-active-border-color: #4da3e8;
  --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.06);
  --fc-more-link-bg-color: #243556;
  --fc-more-link-text-color: var(--color-text);
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-toolbar-title {
  color: var(--color-text);
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-col-header-cell-cushion {
  color: #d1dbe8;
  font-weight: 600;
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-daygrid-day-number,
body[data-theme="dark"] .incoming-fc-mount .fc a.fc-daygrid-day-number {
  color: #e8eef6 !important;
  font-weight: 600;
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-day-other .fc-daygrid-day-number,
body[data-theme="dark"] .incoming-fc-mount .fc .fc-day-other a.fc-daygrid-day-number {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-daygrid-day.fc-day-today {
  background: rgba(77, 163, 232, 0.18);
}

/* Termin?bersicht: keine wei?en Tagesbalken, Datum gut lesbar */
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-scrollgrid,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-table {
  background: var(--color-card);
  border-color: var(--color-border);
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-table td,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-table th {
  background-color: var(--color-card) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text);
}

body[data-theme="dark"] .incoming-fc-mount .fc-list-sticky .fc-list-day > *,
body[data-theme="dark"] .incoming-fc-mount .fc-list-day > * {
  background: #243556 !important;
  background-color: #243556 !important;
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-day th {
  background-color: #243556 !important;
  border-color: var(--color-border) !important;
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-day-cushion,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-cell-shaded.fc-list-day-cushion {
  background-color: #243556 !important;
  color: #f1f5f9;
  padding-top: 12px;
  padding-bottom: 8px;
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard a.fc-list-day-text,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard a.fc-list-day-side-text,
body[data-theme="dark"] .incoming-fc-mount .fc .fc-list-day-cushion a {
  color: #f1f5f9 !important;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 1;
  text-decoration: none;
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard a.fc-list-day-text:hover,
body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard a.fc-list-day-side-text:hover {
  color: #bfdbfe !important;
  text-decoration: underline;
}

body[data-theme="dark"] .incoming-fc-mount .fc-theme-standard .fc-list-event td {
  border-top: 1px solid var(--color-border) !important;
  border-bottom: none !important;
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-list-event-title,
body[data-theme="dark"] .incoming-fc-mount .fc .fc-list-event-time,
body[data-theme="dark"] .incoming-fc-mount .fc .fc-list-event-title a {
  color: var(--color-text) !important;
}

body[data-theme="dark"] .incoming-fc-mount .fc .fc-list-empty {
  background: var(--color-card);
  color: var(--color-muted);
}

body[data-theme="dark"] .incoming-fc-team-bar label {
  color: var(--color-text);
}

body[data-theme="dark"] .incoming-fc-team-hint {
  color: #c5d4e8;
}

body[data-theme="dark"] .incoming-fc-legend {
  color: var(--color-text);
}

body[data-theme="dark"] .incoming-fc-legend-item--hint {
  color: #c5d4e8;
}

.list-item.incoming-cal-kind-attendance {
  border-left: 4px solid #0f766e;
}

.list-item.incoming-cal-kind-attendance.incoming-cal-attendance--cancelled {
  opacity: 0.85;
}

.list-item.incoming-cal-kind-incoming.sf-cal-needs-trainer {
  border-left: 4px solid #f59e0b;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.tab {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #e6efff;
  color: var(--color-primary-dark);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
}

.tab.active {
  background: var(--color-primary);
  color: #fff;
}

.tab.ghost {
  background: transparent;
  border: 1px solid #cbd5f5;
  color: var(--color-primary-dark);
}

.list {
  display: grid;
  gap: 10px;
}

/* Terminlisten: mehr Abstand zwischen Karten (Trainer + Eltern-Light) */
#attendanceSessionList,
#publicLightSessions,
#publicLightKidSessions {
  gap: var(--sf-session-list-gap, 14px);
}

.list-item.attendance-session-row,
.list-item.public-light-session-card {
  border-color: var(--sf-session-card-border, rgba(31, 61, 99, 0.28));
  box-shadow: var(--sf-session-card-shadow);
}

body[data-theme="dark"] .list-item.attendance-session-row,
body[data-theme="dark"] .list-item.public-light-session-card {
  border-color: var(--sf-session-card-border);
  box-shadow: var(--sf-session-card-shadow);
}

.list-item.attendance-session-row.attendance-session-row--active {
  border-color: rgba(59, 130, 246, 0.58);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.22);
}

body[data-theme="dark"] .list-item.attendance-session-row.attendance-session-row--active {
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: 0 3px 14px rgba(59, 130, 246, 0.22), 0 0 0 1px rgba(96, 165, 250, 0.28);
}

.user-list {
  max-height: min(72vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  border-radius: 10px;
  border: 1px solid #e4e7ec;
  background: #fff;
}

.user-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.user-table {
  width: max-content;
  max-width: none;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.user-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 1px solid #e4e7ec;
  white-space: nowrap;
}

.user-table__filter-row th {
  top: 28px;
  z-index: 1;
  padding: 4px 6px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  background: #f8fafc;
}

.user-table__filter-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 12px !important;
  padding: 4px 6px !important;
}

.user-table-row:nth-child(even) {
  background: #fafbfc;
}

.user-table-row:hover {
  background: #f1f5f9;
}

.user-table-cell {
  padding: 5px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #eef1f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-table-cell--name {
  font-weight: 600;
  color: #0f172a;
}

.user-table-cell--muted {
  color: #94a3b8;
}

.user-table-cell--status {
  white-space: normal;
}

.user-table-cell--status-head {
  text-align: left;
}

.user-table-col--compact {
  width: 5rem;
}

.user-table-col--actions {
  width: 11rem;
}

.user-table-cell--status .badge {
  margin: 0 2px 2px 0;
}

.user-table-cell--actions {
  white-space: nowrap;
  text-align: right;
  overflow: visible;
  max-width: none;
}

.user-table-cell--expand {
  white-space: normal;
  overflow: visible;
  max-width: none;
  text-overflow: clip;
}

.user-table-cell--wide {
  white-space: normal;
  word-break: break-word;
}

.user-table-action-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  margin-left: 4px;
}

.user-table-action-btn:first-child {
  margin-left: 0;
}

.user-table-empty {
  padding: 14px 10px !important;
  text-align: center;
  color: #64748b;
  font-weight: 400;
  white-space: normal;
  max-width: none;
}

.user-table__sum-row td {
  font-weight: 600;
  background: #f8fafc;
  white-space: normal;
  max-width: none;
}

.list-item.user-item {
  align-items: stretch;
}

.user-item-main {
  text-align: left;
  min-width: 0;
  flex: 1;
}

.user-item-main .meta {
  text-align: left;
}

.user-detail-inline {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #e4e7ec;
}

.user-detail-anchor[hidden] {
  display: none;
}

.user-detail-anchor:not([hidden]) {
  display: block;
  margin-top: 12px;
}

.user-table-row--editing td {
  background: #eef4ff;
  border-bottom-color: transparent;
}

.user-table-expand-row .user-table-cell--expand {
  padding: 0 8px 12px;
  vertical-align: top;
  background: #f7f9fc;
  border-top: none;
}

.user-table-expand-row .user-detail-inline {
  margin-top: 0;
  border-radius: 0 0 12px 12px;
  border-top: 3px solid #3b6fbd;
  box-shadow: inset 0 2px 0 rgba(59, 111, 189, 0.08);
}

.user-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-detail-slot {
  margin-top: 6px;
}

.user-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.user-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.team-map-list {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px solid #e4e7ec;
}

.team-map-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1f2a44;
}

.internal-only.hidden,
.incoming-only.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 44, 0.45);
  /* Flex statt Grid: Vollfl?chen-Overlay ohne width:100vw ? verringert erste-Ladung-Layoutspr?nge/HScroll auf mobilen Safari/Chrome */
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 50;
}

/* ?ber Trainer-Termindetail (fr?her Sheet z-200; Dialog blieb unsichtbar) */
.modal-backdrop.sf-modal-layer-top,
.modal-backdrop.app-confirm-modal.sf-modal-layer-top {
  z-index: 12001;
}
body.sf-attendance-trainer-detail-open .modal-backdrop,
body.sf-attendance-trainer-detail-open #appConfirmModal:not([hidden]),
body.sf-attendance-trainer-detail-page .modal-backdrop,
body.sf-attendance-trainer-detail-page #appConfirmModal:not([hidden]) {
  z-index: 12001;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 24px 60px rgba(8, 20, 44, 0.3);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: linear-gradient(180deg, #e6efff 0%, #ffffff 100%);
}

.club-player-edit-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

#clubPlayerEditModal .modal-header {
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.club-player-edit-invite {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.club-player-edit-invite .input {
  min-width: 12rem;
  max-width: 22rem;
}

.club-registry-table__invite {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.club-registry-table__invite-select {
  max-width: 13.5rem;
  min-width: 8.5rem;
}

.modal-body {
  padding: 18px 22px;
  overflow: auto;
}

.user-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.user-toolbar .input {
  flex: 0 1 220px;
  min-width: 140px;
  max-width: 320px;
}

.user-toolbar #userSort {
  flex: 0 1 220px;
}

.user-toolbar #newUserButtonToolbar {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .user-toolbar .input,
  .user-toolbar #userSort {
    flex: 1 1 100%;
    max-width: none;
  }
  .user-toolbar #newUserButtonToolbar {
    width: 100%;
  }
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  perspective: 1100px;
}

.tile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  box-shadow: 0 12px 24px rgba(14, 26, 43, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.tile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(14, 26, 43, 0.12);
}

.tile-card.tile-card--flipable {
  padding: 0;
  gap: 0;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
}

.tile-card.tile-card--flipable:hover {
  transform: none;
  box-shadow: none;
}

.tile-card.tile-card--flip-busy,
.tile-card.tile-card--flipped {
  pointer-events: none;
}

.tile-card__flipper {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.05, 0.2, 1);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(14, 26, 43, 0.08);
  background: #ffffff;
  border: 1px solid #e4e7ec;
  min-height: 7.5rem;
}

.tile-card.tile-attention .tile-card__flipper {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.1);
}

.tile-card--flipable:hover .tile-card__flipper {
  box-shadow: 0 16px 28px rgba(14, 26, 43, 0.12);
  transform: translateY(-2px);
}

.tile-card--flipped .tile-card__flipper,
.tile-card--flip-busy.tile-card--flipped .tile-card__flipper {
  transform: rotateY(180deg);
  box-shadow: 0 12px 24px rgba(14, 26, 43, 0.08);
}

.tile-card__face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  border-radius: 16px;
}

.tile-card__face--front {
  position: relative;
}

.tile-card__face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  align-items: center;
  justify-content: center;
  text-align: center;
  background: inherit;
}

.tile-card__loading {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary-dark, #0d5a9e);
  letter-spacing: 0.02em;
}

body[data-theme="dark"] .tile-card__flipper {
  background: var(--color-card, #1a2744);
  border-color: var(--color-border, #2a3d5c);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .tile-card.tile-attention .tile-card__flipper {
  background: rgba(180, 83, 9, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
}

body[data-theme="dark"] .tile-card__loading {
  color: var(--color-primary, #4da3e8);
}

@media (prefers-reduced-motion: reduce) {
  .tile-card__flipper {
    transition: none;
  }
  .tile-card--flipped .tile-card__flipper {
    transform: none;
  }
}

.tile-card.disabled {
  background: #f4f6f9;
  border-color: #e4e7ec;
  box-shadow: none;
  color: #98a2b3;
  cursor: not-allowed;
  pointer-events: none;
}

.tile-card.disabled:hover {
  transform: none;
  box-shadow: none;
}

.tile-card.disabled .tile-icon {
  background: #f0f2f6;
  color: #98a2b3;
}

.tile-card.disabled .tile-title,
.tile-card.disabled .tile-meta {
  color: #98a2b3;
}

.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e6efff;
  display: grid;
  place-items: center;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.tile-title {
  font-weight: 700;
  color: var(--color-primary-dark);
}

.tile-meta {
  font-size: 12px;
  color: var(--color-muted);
}

.tile-state {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tile-card.tile-attention {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.1);
}

.tile-card.tile-attention:hover {
  box-shadow: 0 16px 28px rgba(180, 83, 9, 0.16);
}

.tile-card.tile-attention .tile-icon {
  background: #fef3c7;
  color: #b45309;
}

.tile-card.tile-attention .tile-status {
  color: #b45309;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.tile-card.tile-ok .tile-status {
  color: #059669;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.tile-card.tile-action {
  cursor: pointer;
  border: none;
  font: inherit;
  text-align: left;
  width: 100%;
}

.sf-system-panel-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0 0.5rem;
  flex-wrap: wrap;
}

.sf-setup-status-group {
  margin-top: 1.25rem;
}

.sf-setup-status-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.65rem;
}

.sf-setup-status-hub-link {
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.sf-setup-status-hub-link:hover {
  text-decoration: underline;
}

.sf-setup-status-group-count {
  font-size: 0.85rem;
  color: #b45309;
  font-weight: 600;
}

.sf-setup-status-tiles {
  margin-top: 0;
}

.sf-setup-status-empty {
  padding: 1rem 0;
  font-size: 0.95rem;
}

.sf-setup-status-tiles .tile-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.sf-setup-status-tile-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
}

.sf-setup-status-preview {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #f59e0b 25%, var(--border, #e2e8f0) 75%);
  background: color-mix(in srgb, #fffbeb 35%, var(--card, #fff) 65%);
  max-height: 22rem;
  overflow: auto;
}

.sf-setup-status-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sf-testdata-preview-mount {
  margin: 0.5rem 0 0.75rem;
}

.sf-testdata-preview-section {
  margin: 0 0 0.85rem;
}

.sf-testdata-preview-section-head {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.35rem;
}

.sf-testdata-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sf-testdata-preview-table th,
.sf-testdata-preview-table td {
  border: 1px solid var(--border, #e2e8f0);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.sf-testdata-preview-table th {
  background: color-mix(in srgb, var(--border, #e2e8f0) 35%, transparent 65%);
  font-weight: 600;
}

body[data-theme="dark"] .sf-setup-status-preview {
  background: color-mix(in srgb, #78350f 20%, var(--card, #1e293b) 80%);
}

.club-registry-row--needs-team {
  background: color-mix(in srgb, #fef3c7 55%, var(--card, #fff) 45%);
  border-left: 3px solid #f59e0b;
}

.club-registry-table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--border, #2a3f5c);
  border-radius: 8px;
  background: var(--color-card, #fff);
}

.club-registry-columns-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 0.55rem;
}

.club-registry-columns-panel {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 10px 12px;
  border: 1px solid var(--border, #2a3f5c);
  border-radius: 8px;
  background: var(--color-card, #fff);
}

.club-registry-columns-panel[hidden] {
  display: none !important;
}

.club-registry-columns-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.club-registry-columns-grid__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
  margin: 0;
}

.club-registry-filter-hint {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.club-registry-filter-hint code {
  font-size: 0.92em;
  padding: 0 0.15rem;
}

.club-registry-table {
  width: max-content;
  max-width: none;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
  --registry-row-bg: var(--color-card, #fff);
  --registry-row-bg-alt: #e3eaf3;
  --registry-row-bg-hover: #d4e4ff;
  --registry-row-bg-needs-team: #fff7db;
  --registry-row-bg-needs-team-alt: #ffefc2;
  --registry-row-bg-needs-team-hover: #ffe08a;
}

.club-registry-table th,
.club-registry-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #e8edf4);
  text-align: left;
  vertical-align: top;
}

.club-registry-table th {
  position: sticky;
  top: 0;
  background: var(--color-bg-muted, #f4f7fb);
  z-index: 2;
  font-weight: 600;
  white-space: nowrap;
}

.club-registry-table tbody tr:nth-child(odd) td {
  background: var(--registry-row-bg);
}

.club-registry-table tbody tr:nth-child(even) td {
  background: var(--registry-row-bg-alt);
}

.club-registry-table tbody tr:hover td {
  background: var(--registry-row-bg-hover);
}

.club-registry-table tbody tr.club-registry-row--needs-team:nth-child(odd) td {
  background: var(--registry-row-bg-needs-team);
}

.club-registry-table tbody tr.club-registry-row--needs-team:nth-child(even) td {
  background: var(--registry-row-bg-needs-team-alt);
}

.club-registry-table tbody tr.club-registry-row--needs-team:hover td {
  background: var(--registry-row-bg-needs-team-hover);
}

.club-registry-table tbody tr:last-child td {
  border-bottom: none;
}

.club-registry-table__sum-row td {
  font-weight: 600;
  background: color-mix(in srgb, var(--border, #e2e8f0) 18%, var(--card, #fff) 82%);
  border-top: 2px solid color-mix(in srgb, var(--border, #e2e8f0) 70%, #64748b 30%);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

body[data-theme="dark"] .club-registry-table__sum-row td {
  background: color-mix(in srgb, var(--card, #1e293b) 88%, #fff 12%);
}

.club-registry-table tr.club-registry-row--needs-team td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.club-registry-table__cell-muted {
  color: var(--muted, #64748b);
}

.club-registry-table__cell-clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-registry-table__cell-wide {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-registry-table__active {
  text-align: center;
  white-space: nowrap;
  padding-left: 4px;
  padding-right: 4px;
}

.club-registry-table__active-head {
  text-align: center;
}

.club-registry-col--compact {
  width: 3.5rem;
}

.club-registry-col--narrow {
  width: 5.75rem;
}

.club-registry-col--actions {
  width: 11rem;
}

.club-registry-table__actions {
  min-width: 10rem;
  max-width: 12rem;
  width: 11rem;
  position: sticky;
  right: 0;
  background: inherit;
  box-shadow: -4px 0 8px -4px rgba(15, 23, 42, 0.12);
  z-index: 1;
}

.club-registry-table thead .club-registry-table__actions {
  z-index: 3;
}

.club-registry-table__actions-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}

.club-registry-table__actions-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.club-registry-table__actions-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.club-registry-table__team-add {
  display: flex;
  gap: 3px;
  align-items: center;
  flex: 1 1 100%;
  min-width: 0;
}

.club-registry-table__team-chip {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  max-width: 100%;
  font-size: 0.7rem;
  line-height: 1.25;
  padding: 1px 5px 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-bg-muted, #eef2f8) 88%, transparent);
  border: 1px solid var(--border, #c5d0de);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.club-registry-table__team-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.club-registry-table__team-chip-remove {
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 2px;
  margin: 0;
  font-size: 0.95em;
  line-height: 1;
  color: inherit;
  opacity: 0.55;
}

.club-registry-table__team-chip-remove:hover {
  opacity: 1;
  color: var(--danger, #b91c1c);
}

.club-registry-table__btn-sm {
  font-size: 0.7rem !important;
  line-height: 1.3 !important;
  padding: 2px 6px !important;
  min-height: unset !important;
  border-radius: 4px !important;
  white-space: nowrap;
}

.club-registry-table__btn-sm.danger {
  color: var(--danger, #b91c1c);
  border-color: color-mix(in srgb, var(--danger, #b91c1c) 35%, var(--border, #ccc));
}

.club-registry-table__actions-inner .input {
  min-width: 0;
  flex: 1;
  max-width: none;
  font-size: 0.7rem;
  padding: 2px 5px;
  line-height: 1.3;
}

.club-registry-table__actions-inner .cta {
  font-size: 0.7rem;
  padding: 2px 6px;
  line-height: 1.3;
}

.club-registry-table__active-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

.club-registry-table__active-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.club-registry-table__access-badge {
  flex: 1 1 100%;
  color: var(--warn, #c45c26);
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-bottom: 1px;
}

/* Mobil: Spieler-Stammdaten als Karten statt enger, horizontal scrollender Tabelle. */
@media (max-width: 760px) {
  .club-registry-table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  .club-registry-table {
    display: block;
    width: 100%;
    table-layout: auto;
    font-size: 0.86rem;
  }

  .club-registry-table thead,
  .club-registry-table tbody,
  .club-registry-table tfoot,
  .club-registry-table tr {
    display: block;
    width: 100%;
  }

  /* Spaltenüberschriften sind auf der Karte redundant (Label steht bereits vor jedem Wert). */
  .club-registry-table tr.club-registry-table__head-row {
    display: none;
  }

  .club-registry-table tr.club-registry-table__filter-row {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 0 0 0.6rem;
    background: transparent;
    border-bottom: none;
  }

  .club-registry-table__filter-row th {
    display: block;
    position: static;
    top: auto;
    flex: 1 1 clamp(6rem, 45%, 11rem);
    padding: 0;
    background: transparent;
  }

  .club-registry-table__filter-row th.club-registry-table__actions {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .club-registry-table tbody tr {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: var(--color-card, #fff);
    box-shadow: inset 3px 0 0 transparent;
  }

  .club-registry-table tbody tr.club-registry-row--needs-team {
    box-shadow: inset 3px 0 0 #f59e0b;
    background: var(--registry-row-bg-needs-team, #fff7db);
  }

  .club-registry-table tr.club-registry-row--needs-team td:first-child {
    box-shadow: none;
  }

  .club-registry-table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    padding: 5px 0;
    border-bottom: 1px dashed var(--border, #e8edf4);
    background: transparent !important;
    text-align: right;
    overflow: visible;
    white-space: normal;
  }

  .club-registry-table tbody tr td[data-th]::before {
    content: attr(data-th);
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--muted, #64748b);
    text-align: left;
    margin-right: auto;
  }

  .club-registry-table tbody tr td[data-col="familyName"],
  .club-registry-table tbody tr td[data-col="givenName"] {
    font-weight: 700;
    font-size: 1rem;
    border-bottom: none;
    padding-bottom: 2px;
  }

  .club-registry-table tbody tr td[data-col="givenName"] {
    padding-top: 0;
  }

  .club-registry-table__active {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .club-registry-table__actions {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    box-shadow: none;
    display: block !important;
    padding: 8px 0 0 !important;
    border-bottom: none !important;
  }

  .club-registry-table thead .club-registry-table__actions {
    display: flex !important;
  }

  .club-registry-table__actions-tools .club-registry-table__btn-sm,
  .club-registry-table__actions-tools {
    font-size: 0.76rem !important;
  }

  .club-registry-table__sum-row {
    padding: 4px 2px 0;
  }

  .club-registry-table__sum-row td {
    display: block;
    border-top: none;
  }

  .club-registry-table__sum-row td.club-registry-table__actions {
    display: none !important;
  }

  body[data-theme="dark"] .club-registry-table tbody tr {
    background: var(--card, #1e293b);
  }
}

body[data-theme="dark"] .club-registry-table-wrap {
  background: var(--card, #1e293b);
}

body[data-theme="dark"] .club-registry-table {
  --registry-row-bg: #1a2332;
  --registry-row-bg-alt: #243247;
  --registry-row-bg-hover: #2f4568;
  --registry-row-bg-needs-team: #3b2f1a;
  --registry-row-bg-needs-team-alt: #4a3a1f;
  --registry-row-bg-needs-team-hover: #5c471f;
}

body[data-theme="dark"] .club-registry-table th {
  background: color-mix(in srgb, var(--card, #1e293b) 88%, #fff 12%);
}

body[data-theme="dark"] .club-registry-table tbody tr:nth-child(odd) td {
  background: var(--registry-row-bg);
}

body[data-theme="dark"] .club-registry-table tbody tr:nth-child(even) td {
  background: var(--registry-row-bg-alt);
}

body[data-theme="dark"] .club-registry-table tbody tr:hover td {
  background: var(--registry-row-bg-hover);
}

body[data-theme="dark"] .club-registry-table tbody tr.club-registry-row--needs-team:nth-child(odd) td {
  background: var(--registry-row-bg-needs-team);
}

body[data-theme="dark"] .club-registry-table tbody tr.club-registry-row--needs-team:nth-child(even) td {
  background: var(--registry-row-bg-needs-team-alt);
}

body[data-theme="dark"] .club-registry-table tbody tr.club-registry-row--needs-team:hover td {
  background: var(--registry-row-bg-needs-team-hover);
}

body[data-theme="dark"] .club-registry-table__actions {
  background: inherit;
}

.club-registry-table__filter-row th {
  padding: 4px 6px;
  vertical-align: middle;
  background: color-mix(in srgb, var(--color-bg-muted, #f4f7fb) 82%, var(--color-card, #fff) 18%);
  top: 2.05rem;
}

.club-registry-table__filter-input {
  width: 100%;
  min-width: 3.5rem;
  max-width: 100%;
  font-size: 0.78rem;
  padding: 3px 6px;
  box-sizing: border-box;
}

.club-registry-table__filter-input--select {
  cursor: pointer;
}

.club-registry-table__filter-clear {
  font-size: 0.78rem;
  padding: 4px 8px;
  white-space: nowrap;
}

body[data-theme="dark"] .club-registry-table__filter-row th {
  background: color-mix(in srgb, var(--card, #1e293b) 92%, #fff 8%);
}

.club-contacts-unassigned-host {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border, #e2e8f0) 65%);
  border-radius: 8px;
  background: color-mix(in srgb, #fffbeb 40%, var(--card, #fff) 60%);
}

body[data-theme="dark"] .club-registry-row--needs-team {
  background: transparent;
}

body[data-theme="dark"] .club-contacts-unassigned-host {
  background: color-mix(in srgb, #78350f 25%, var(--card, #1e293b) 75%);
}

.sf-system-panel-nav.is-hidden {
  display: none;
}

.sf-system-panel-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}

.sf-system-area.is-hidden {
  display: none !important;
}

#clubPlayersHubSection.is-hidden {
  display: none !important;
}

.sf-club-area.is-hidden {
  display: none !important;
}

#systemHubSection.is-hidden {
  display: none !important;
}

#attendanceHubSection.is-hidden {
  display: none !important;
}

.sf-attendance-area.is-hidden {
  display: none !important;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #e4e7ec;
  box-shadow: 0 8px 16px rgba(14, 26, 43, 0.06);
  min-width: 0;
}

.sf-fussball-proposals-panel {
  padding: 0.85rem 1rem;
}
.sf-fussball-proposals-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sf-fussball-proposals-panel__summary::-webkit-details-marker {
  display: none;
}
.sf-fussball-proposals-panel__summary::after {
  content: "\25BE";
  opacity: 0.55;
  font-weight: 700;
}
.sf-fussball-proposals-panel[open] > .sf-fussball-proposals-panel__summary::after {
  content: "\25B4";
}
.sf-fussball-proposals-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 0.75rem;
}
.sf-fussball-proposal-kennung {
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.sf-fussball-proposal {
  display: block;
  padding: 0;
  overflow: hidden;
}

.sf-fussball-proposal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  user-select: none;
}

.sf-fussball-proposal-summary::-webkit-details-marker {
  display: none;
}

.sf-fussball-proposal-summary::after {
  content: "\25BE";
  font-weight: 600;
  opacity: 0.55;
  margin-left: 4px;
}

.sf-fussball-proposal[open] > .sf-fussball-proposal-summary::after {
  content: "\25B4";
}

.sf-fussball-proposal-summary-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.sf-fussball-proposal-date {
  font-size: 0.82rem;
  color: #64748b;
  white-space: nowrap;
}

.sf-fussball-proposal-badge {
  font-size: 11px;
  padding: 4px 10px;
}

.sf-fussball-proposal-badge--change {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.sf-fussball-proposal-badge--manual {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.sf-fussball-proposal-badge--cancel {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}
.sf-fussball-proposal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.sf-fussball-proposal-take {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.85rem;
}
.sf-fussball-proposal-dismiss {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.sf-fussball-proposal-body {
  padding: 0 16px 14px;
  border-top: 1px solid #eef1f5;
}

.sf-fussball-proposal[open] > .sf-fussball-proposal-body {
  padding-top: 10px;
}

body[data-theme="dark"] .sf-fussball-proposal-date {
  color: #94a3b8;
}

body[data-theme="dark"] .sf-fussball-proposal-body {
  border-top-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .sf-fussball-proposal-badge--change {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

body[data-theme="dark"] .sf-fussball-proposal-badge--manual {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

body[data-theme="dark"] .sf-fussball-proposal-badge--cancel {
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
}

.analytics-helper-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.analytics-helper-session {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(14, 26, 43, 0.05);
  overflow: hidden;
}

.analytics-helper-session-summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.analytics-helper-session-summary::-webkit-details-marker {
  display: none;
}

.analytics-helper-session-summary::before {
  content: "\25BE";
  float: left;
  margin-right: 0.45rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.35;
}

.analytics-helper-session[open] > .analytics-helper-session-summary::before {
  content: "\25B4";
}

.analytics-helper-session-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.analytics-helper-session-meta {
  overflow-wrap: anywhere;
}

.analytics-helper-session[open] > .analytics-helper-session-summary {
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.analytics-helper-session-assignments {
  margin: 0;
  padding: 0.55rem 0.9rem 0.7rem 1.65rem;
  list-style: disc;
}

.analytics-helper-session-assignments li {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

body[data-theme="dark"] .analytics-helper-session {
  background: #1a2332;
  border-color: #334155;
}

body[data-theme="dark"] .analytics-helper-session[open] > .analytics-helper-session-summary {
  background: #0f172a;
  border-bottom-color: #334155;
}

/* Text + Aktion nebeneinander: linker Block darf schrumpfen und umbrechen */
.list-item > div:first-child {
  flex: 1 1 200px;
  min-width: 0;
}

.list-item > div:first-child .meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.list-item > .status-group {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .list-item > div:first-child {
    flex: 1 1 auto;
  }

  .list-item > .status-group,
  .list-item > .actions {
    width: 100%;
    justify-content: stretch;
  }

  .list-item > .status-group > .cta,
  .list-item > .status-group > a.cta,
  .list-item > .status-group > a.cta.ghost,
  .list-item > .actions > .cta,
  .list-item > .actions > a.cta,
  .list-item > .actions > a.cta.ghost {
    flex: 1 1 calc(50% - 4px);
    min-width: 7.5rem;
    justify-content: center;
  }
}

.list-item.task-done {
  padding: 10px 12px;
  opacity: 0.85;
}

.list-item.task-done .meta {
  font-size: 11px;
}

.tournament-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 140px;
  gap: 8px;
}

.tournament-row .status-group {
  justify-content: flex-end;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.stat-card {
  background: linear-gradient(180deg, #1e4fa1 0%, #17438c 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(14, 26, 43, 0.12);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
}

.stat-title {
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  opacity: 0.9;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 8px;
}

.trainer-kpi-grid {
  display: grid;
  /* min(?,100%) verhindert zwei zu schmale Spalten nebeneinander auf sehr schmalen Phones */
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 10px;
}

.analytics-kind-card {
  cursor: pointer;
}
.analytics-kind-card:hover,
.analytics-kind-card:focus-visible {
  border-color: var(--color-accent, #3b82f6);
}
.analytics-kind-card.is-active {
  border-color: var(--color-accent, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}
body:not([data-theme="dark"]) .analytics-kind-card.is-active {
  background: rgba(37, 99, 235, 0.08);
}

.trainer-kpi-label {
  margin: 0;
  font-size: 0.79rem;
  color: var(--color-text-soft, #9fb0cc);
  letter-spacing: 0.01em;
}

.trainer-kpi-value {
  margin: 0.35rem 0 0;
  line-height: 1.05;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.trainer-dash-section-title {
  margin-top: 0.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--color-text-soft, #a9bddf);
}

.trainer-dash-divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.18) 0%,
    rgba(148, 163, 184, 0.42) 50%,
    rgba(148, 163, 184, 0.18) 100%
  );
}

body:not([data-theme="dark"]) .trainer-kpi-card {
  background: rgba(248, 250, 252, 0.94);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.side-panel {
  background: linear-gradient(180deg, #6ea8ff 0%, #4f87e6 100%);
  color: #fff;
}

.side-panel .card-header,
.side-panel .pill,
.side-panel .muted {
  color: #fff;
}

.toggle-list {
  display: grid;
  gap: 12px;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 12px;
  border-radius: 12px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark));
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(107, 198, 40, 0.28);
}

.cta.ghost {
  background: var(--sf-white);
  color: var(--sf-blue-dark, var(--sf-blue));
  border: 2px solid var(--sf-blue-dark, var(--sf-blue));
  box-shadow: none;
  font-weight: 600;
}

/* [hidden] allein reicht nicht: .cta setzt display:inline-flex und ?berdeckt das UA-[hidden]-Verhalten */
.cta[hidden] {
  display: none !important;
}

/* Gleiches Problem: .form-grid setzt display:grid und hält z. B. #facilityPublicGate sichtbar */
.form-grid[hidden] {
  display: none !important;
}

a.cta.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

body[data-theme="dark"] .cta {
  box-shadow: 0 6px 14px rgba(2, 12, 36, 0.35);
}

body[data-theme="dark"] .cta.ghost {
  background: #0f1626;
  color: #e5e7eb;
  border: 1px solid #2a3a5f;
}

body[data-theme="dark"] .cta.ghost:hover {
  background: #16233a;
}

/* Zu-/Absage (Daumen): CTA-Gr?n darf Vote-Farben nicht ?berschreiben ? muss nach .cta stehen */
button.cta.public-light-vote-btn {
  background-image: none;
  box-shadow: none;
}

button.cta.public-light-vote-btn--yes {
  border-style: solid;
  border-color: #2e7d32;
  color: #1b5e20;
  background: rgba(46, 125, 50, 0.08);
}

button.cta.public-light-vote-btn--no {
  border-style: solid;
  border-color: #b71c1c;
  color: #8e0000;
  background: rgba(183, 28, 28, 0.08);
}

button.cta.public-light-vote-btn.is-active.public-light-vote-btn--yes {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

button.cta.public-light-vote-btn.is-active.public-light-vote-btn--no {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

button.cta.public-light-vote-btn--locked {
  opacity: 0.55;
  pointer-events: auto;
  cursor: pointer;
}

button.cta.public-light-vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-theme="dark"] button.cta.public-light-vote-btn--yes {
  color: #dcedc8;
  border-color: #66bb6a;
  background: rgba(102, 187, 106, 0.16);
}

body[data-theme="dark"] button.cta.public-light-vote-btn--no {
  color: #ffcdd2;
  border-color: #ef5350;
  background: rgba(239, 83, 80, 0.16);
}

body[data-theme="dark"] button.cta.public-light-vote-btn.is-active.public-light-vote-btn--yes {
  background: #66bb6a;
  border-color: #66bb6a;
  color: #1b5e20;
}

body[data-theme="dark"] button.cta.public-light-vote-btn.is-active.public-light-vote-btn--no {
  background: #ef5350;
  border-color: #ef5350;
  color: #fff;
}

.checkbox {
  width: 18px;
  height: 18px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -16px -16px 14px;
  padding: 14px 16px;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(135deg, rgba(10, 61, 145, 0.12) 0%, rgba(107, 198, 40, 0.08) 48%, rgba(255, 255, 255, 0.98) 100%);
  border-bottom: 1px solid rgba(10, 61, 145, 0.08);
  box-shadow: inset 4px 0 0 var(--sf-blue, #0a3d91);
}

body[data-theme="dark"] .card-header {
  background: linear-gradient(180deg, #111c30 0%, #121a2a 100%);
  box-shadow: inset 4px 0 0 var(--color-primary, #4da3e8);
}

body[data-theme="dark"] .topbar {
  color: var(--color-text);
}

body[data-theme="dark"] .page-title {
  color: var(--color-text);
}

body[data-theme="dark"] .sidebar .brand-text .word-spiel {
  color: #f1f5f9;
}

body[data-theme="dark"] .sidebar .brand-text .word-funk {
  color: #93c5fd;
}

body[data-theme="dark"] .nav-group-toggle {
  color: #e2e8f0;
}

body[data-theme="dark"] .nav-group-toggle:hover,
body[data-theme="dark"] .nav-group--open .nav-group-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body[data-theme="dark"] .nav-group-chevron {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

body[data-theme="dark"] .sidebar .nav-item {
  color: #e2e8f0;
}

body[data-theme="dark"] .sidebar .nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .pill {
  background: linear-gradient(180deg, #2f4a73 0%, #243352 100%);
  color: #f1f5f9;
  border: 1px solid rgba(147, 197, 253, 0.38);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .side-panel .pill {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body[data-theme="dark"] .icon-button {
  background: linear-gradient(180deg, #2c354c 0%, #1e2639 100%);
  color: var(--color-text);
  border: 1px solid rgba(148, 163, 184, 0.42);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .avatar-button {
  background: linear-gradient(180deg, #2563eb 0%, #1e3a5f 100%);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .help-button {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.5);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

body[data-theme="dark"] .icon-button .notification-badge {
  box-shadow: 0 0 0 2px #1e2639;
}

body[data-theme="dark"] .help-inline {
  background: rgba(59, 130, 246, 0.28);
  color: #f1f5f9;
  border: 1px solid rgba(147, 197, 253, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .help-text {
  color: #c5d4e8;
}

body[data-theme="dark"] .modal-header {
  background: linear-gradient(180deg, #111c30 0%, #121a2a 100%);
}

body[data-theme="dark"] .tile-icon {
  background: rgba(91, 140, 255, 0.15);
  color: var(--color-accent);
}

body[data-theme="dark"] .badge,
body[data-theme="dark"] .status-badge.pending {
  background: rgba(59, 130, 246, 0.26);
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.52);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .pill-status.planned {
  background: rgba(148, 163, 184, 0.22);
  color: #f1f5f9;
  border: 1px solid rgba(186, 198, 213, 0.48);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card-header h2,
.card-header h3 {
  margin: 6px 0 4px;
}

/* Einklappbare Seiten-Hinweise (.card-header mit Erklärungstext) */
.card-header.sf-card-hint--collapsible {
  align-items: center;
  gap: 10px;
}
.card-header.sf-card-hint--collapsible .sf-card-hint-main {
  flex: 1 1 auto;
  min-width: 0;
}
.card-header.sf-card-hint--collapsible .sf-card-hint-toggle {
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}
.card-header.sf-card-hint--collapsed {
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.card-header.sf-card-hint--collapsed h2,
.card-header.sf-card-hint--collapsed h3 {
  margin: 2px 0 0;
}
.card-header.sf-card-hint--collapsed .sf-card-hint-body {
  display: none;
}
.card-header.sf-card-hint--collapsed .sf-card-hint-toggle {
  align-self: center;
}
body[data-theme="dark"] .card-header.sf-card-hint--collapsible .sf-card-hint-toggle {
  color: var(--color-text, #e2e8f0);
}

/* RSV-Navy-Köpfe: Toggle lesbar (auch wenn brands/rsv.css verzögert deployed) */
body[data-brand="rsv"]:not([data-theme="dark"]) .card-header .sf-card-hint-toggle {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
body[data-brand="rsv"]:not([data-theme="dark"]) .card-header .sf-card-hint-toggle:hover,
body[data-brand="rsv"]:not([data-theme="dark"]) .card-header .sf-card-hint-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.muted {
  margin: 0;
  color: var(--color-muted);
}

.meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f1f4ff;
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 12px;
}

.status-badge.confirmed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.pending {
  background: #f1f4ff;
  color: var(--color-primary-dark);
}

.status-value {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.pill-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-status.active {
  background: #1e4fa1;
  color: #fff;
}

.pill-status.planned {
  background: #e5e7eb;
  color: #1f2937;
}

.pill-status.done {
  background: #d1fae5;
  color: #065f46;
}

.table-head {
  background: #eef2f7;
  border-radius: 12px;
  padding: 8px 10px;
}

.table-head div {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
}

.status-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#editTournamentForm.form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (min-width: 900px) {
  #editTournamentForm.form-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

#editTournamentForm .field {
  min-width: 0;
}

#editTournamentForm .input,
#editTournamentForm select.input,
#editTournamentForm textarea.textarea {
  width: 100%;
  box-sizing: border-box;
}

.sf-tourn-editor-head .sf-tourn-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 16px 16px;
}

.sf-tourn-tabs .cta.active {
  background: var(--color-primary, #1e4fa1);
  color: #fff;
  border-color: var(--color-primary, #1e4fa1);
}

.sf-tourn-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
}

.sf-tourn-summary-line {
  font-weight: 600;
}

.sf-tourn-invite-link {
  display: inline-block;
  margin: 0 16px 10px;
}

.sf-tourn-edit-form {
  display: grid;
  gap: 14px;
}

.sf-tourn-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sf-tourn-fieldset {
  margin: 0;
  min-width: 0;
  padding: 0.75rem 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.sf-tourn-fieldset legend {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary-dark, #1e293b);
  padding: 0 0.35rem;
}

.sf-tourn-fieldset-grid {
  display: grid;
  gap: 10px;
}

.sf-tourn-colors-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sf-tourn-colors-toolbar .cta.active {
  background: var(--color-primary, #1e4fa1);
  color: #fff;
}

#placementOptionsList {
  display: grid;
  gap: 6px;
}

#placementOptionsList label.sf-tourn-placement-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

#placementOptionsList .sf-tourn-placement-more {
  margin-top: 8px;
  font-weight: 600;
}

.sf-tourn-add-team,
.sf-tourn-bulk-team {
  margin: 0 16px 12px;
}

.sf-tourn-bulk-team .textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
}

.sf-tourn-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: start;
  margin: 0 16px 16px;
}

.sf-tourn-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  min-height: 140px;
}

.sf-tourn-col.is-unassigned {
  background: #fff7ed;
  border-color: #fdba74;
}

.sf-tourn-col.is-drop-target {
  outline: 2px dashed #2563eb;
  outline-offset: 2px;
}

.sf-tourn-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--color-primary-dark, #1e293b);
}

.sf-tourn-col-count {
  font-size: 12px;
  font-weight: 600;
  color: #667085;
}

.sf-tourn-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 8px;
  margin-bottom: 6px;
  cursor: grab;
}

.sf-tourn-chip.is-dragging {
  opacity: 0.45;
}

.sf-tourn-chip-main {
  min-width: 0;
  flex: 1 1 auto;
}

.sf-tourn-chip-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.sf-tourn-chip-name-input {
  width: 100%;
  font-size: 13px;
}

.sf-tourn-chip-leader {
  font-size: 11px;
  color: #667085;
  margin-top: 2px;
}

.sf-tourn-chip-menu {
  position: relative;
  flex: 0 0 auto;
}

.sf-tourn-chip-menu > button {
  min-width: 2rem;
  padding: 0.2rem 0.45rem;
}

.sf-tourn-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  min-width: 200px;
  padding: 6px;
}

.sf-tourn-menu button,
.sf-tourn-menu select {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 4px;
}

.sf-tourn-menu .input {
  margin-bottom: 6px;
}

.sf-tourn-empty-col {
  font-size: 12px;
  color: #667085;
  padding: 8px 2px;
}

@media (max-width: 960px) {
  .sf-tourn-settings-grid {
    grid-template-columns: 1fr;
  }
}

.standings-lot-hint {
  margin-left: 0.35em;
  font-size: 0.92em;
  opacity: 0.85;
}

.standings-lot-legend {
  font-size: 12px;
  color: #667085;
  margin-top: 8px;
}

.tournament-format-hint {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
  line-height: 1.45;
  color: var(--color-text, #1d2939);
}

.form-grid--stack,
#loginForm.form-grid {
  grid-template-columns: 1fr;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

#attendanceNewSpieltagSquads {
  display: none;
  scroll-margin-top: 8.5rem;
  scroll-margin-bottom: 1.5rem;
}

#attendanceNewWrap:has(#attendanceNewType option[value="spieltag"]:checked) #attendanceNewSpieltagSquads {
  display: block !important;
}

@media (max-width: 720px) {
  #attendanceNewSpieltagSquads {
    position: relative;
    z-index: 2;
  }
}

/* Trainer-Teilnahme: eigene Zu-/Absage in der Terminliste */
.attendance-trainer-self-quick {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  width: 100%;
}

.attendance-trainer-self-quick--prominent {
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--color-accent, #2e7d32) 28%, var(--color-border, #c8d0dc));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-accent, #2e7d32) 6%, var(--color-surface, #fff));
  box-sizing: border-box;
}

.attendance-trainer-self-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.attendance-trainer-self-quick-info {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--color-text-soft, #6b7c93);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  cursor: pointer;
  border-radius: 6px;
}

.attendance-trainer-self-quick-info:hover,
.attendance-trainer-self-quick-info:focus-visible {
  background: rgba(120, 130, 150, 0.12);
  outline: none;
}

.attendance-trainer-self-quick-actions {
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
}

.attendance-trainer-self-quick-action {
  width: 100%;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  min-height: 2.2rem;
}

.attendance-trainer-self-quick-action--yes {
  border-color: color-mix(in srgb, #2e7d32 45%, var(--color-border, #c8d0dc));
  color: #1b5e20;
}

.attendance-trainer-self-quick-action--no {
  border-color: color-mix(in srgb, #c62828 40%, var(--color-border, #c8d0dc));
  color: #b71c1c;
}

.attendance-trainer-self-quick-label {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--color-text-soft, #5a6a80);
}

.attendance-trainer-self-quick-hint {
  font-size: 0.74rem;
  line-height: 1.35;
  margin: 0;
}

.attendance-trainer-self-quick-state {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.attendance-trainer-self-quick-dot {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}

.attendance-trainer-self-quick-state--confirmed {
  color: #1b5e20;
}

.attendance-trainer-self-quick-state--declined {
  color: #b71c1c;
}

.attendance-trainer-self-quick-state--pending {
  color: #5a6a80;
}

/* Legacy pill (falls noch woanders) */
.attendance-trainer-self-quick-status {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(120, 130, 150, 0.14);
}

.attendance-trainer-self-quick-status--confirmed {
  background: color-mix(in srgb, #2e7d32 14%, transparent);
  color: #1b5e20;
}

.attendance-trainer-self-quick-status--declined {
  background: color-mix(in srgb, #c62828 12%, transparent);
  color: #b71c1c;
}

.sf-helper-thanks {
  margin-top: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  line-height: 1.4;
}
.sf-helper-thanks[hidden] {
  display: none !important;
}
.sf-helper-thanks--ok {
  background: color-mix(in srgb, #1b7a3d 14%, #fff);
  border: 1px solid color-mix(in srgb, #1b7a3d 38%, transparent);
  color: #14532d;
}
.sf-helper-thanks--pending {
  background: color-mix(in srgb, #334155 8%, #fff);
  border: 1px solid color-mix(in srgb, #334155 18%, transparent);
  color: #334155;
}
.sf-helper-thanks--error {
  background: color-mix(in srgb, #c62828 10%, #fff);
  border: 1px solid color-mix(in srgb, #c62828 32%, transparent);
  color: #7f1d1d;
}
.sf-helper-thanks__title {
  display: block;
  font-size: 1.02em;
}
.sf-helper-thanks__detail {
  margin-top: 0.3rem;
  font-size: 0.92em;
}
.attendance-trainer-helper-pick {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}
.attendance-trainer-helper-pick .attendance-trainer-self-quick-label {
  margin: 0;
}
.attendance-trainer-helper-pick .sf-hp-public-row {
  align-items: flex-start;
}
body[data-page="trainer-attendance"] .attendance-trainer-self-quick--prominent {
  order: -1;
}

#incomingFremdturnierCard {
  color: var(--color-text);
}

#incomingFremdturnierCard .field label {
  color: #344054;
  font-weight: 600;
  font-size: 13px;
}

#incomingFremdturnierCard .muted {
  color: #475467;
}

#incomingFremdturnierCard .meta {
  color: #475467;
  font-weight: 600;
}

#incomingFremdturnierCard .input,
#incomingFremdturnierCard .textarea {
  color: #0f172a;
  font-size: 0.9375rem;
}

#incomingFremdturnierCard input[type="file"].input {
  padding: 0.55rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #0f172a;
}

#incomingFremdturnierCard input::file-selector-button,
#incomingFremdturnierCard input::-webkit-file-upload-button {
  margin-right: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #eef2f7;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}

body[data-theme="dark"] #incomingFremdturnierCard .field label {
  color: #e2e8f0;
}

body[data-theme="dark"] #incomingFremdturnierCard .muted,
body[data-theme="dark"] #incomingFremdturnierCard .meta {
  color: #cbd5e1;
}

body[data-theme="dark"] #incomingFremdturnierCard .input,
body[data-theme="dark"] #incomingFremdturnierCard .textarea {
  color: #f8fafc;
}

body[data-theme="dark"] #incomingFremdturnierCard input[type="file"].input {
  color: #e2e8f0;
}

body[data-theme="dark"] #incomingFremdturnierCard input::file-selector-button,
body[data-theme="dark"] #incomingFremdturnierCard input::-webkit-file-upload-button {
  background: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

.incoming-fremd-team-box {
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.45rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.incoming-fremd-team-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  margin: 0;
  line-height: 1.4;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.incoming-fremd-team-item:nth-child(even) {
  background: rgba(15, 23, 42, 0.035);
}

.incoming-fremd-team-item:hover {
  background: rgba(30, 79, 161, 0.08);
}

.incoming-fremd-team-item:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.incoming-fremd-team-item input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.12em;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  accent-color: var(--color-primary);
  cursor: pointer;
  border: 1px solid #64748b;
  border-radius: 4px;
  vertical-align: top;
}

.incoming-fremd-team-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.incoming-fremd-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.incoming-fremd-panel {
  margin-bottom: 1rem;
}

.incoming-fremd-details {
  border-radius: 10px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.04);
  overflow: hidden;
}

.incoming-fremd-details-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(22, 163, 74, 0.08);
  transition: background 0.15s ease;
}

.incoming-fremd-details-summary::-webkit-details-marker {
  display: none;
}

.incoming-fremd-details-summary:hover,
.incoming-fremd-details-summary:focus-visible {
  background: rgba(22, 163, 74, 0.14);
  outline: none;
}

.incoming-fremd-details-chevron {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: #166534;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.incoming-fremd-details-chevron::before {
  content: "\25BE";
}

.incoming-fremd-details[open] > .incoming-fremd-details-summary {
  border-bottom: 1px solid rgba(22, 163, 74, 0.22);
}

.incoming-fremd-details[open] .incoming-fremd-details-chevron::before {
  content: "\25B4";
}

.incoming-fremd-details-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.incoming-fremd-details-text strong {
  font-size: 1rem;
  color: #14532d;
}

.incoming-fremd-details-sub {
  font-size: 0.88rem;
  color: #166534;
  opacity: 0.85;
}

.incoming-fremd-details-body {
  padding: 0.85rem 1rem 1rem;
}

body[data-theme="dark"] .incoming-fremd-details {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}

body[data-theme="dark"] .incoming-fremd-details-summary {
  background: rgba(74, 222, 128, 0.1);
}

body[data-theme="dark"] .incoming-fremd-details-summary:hover,
body[data-theme="dark"] .incoming-fremd-details-summary:focus-visible {
  background: rgba(74, 222, 128, 0.16);
}

body[data-theme="dark"] .incoming-fremd-details-chevron {
  color: #bbf7d0;
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(74, 222, 128, 0.35);
}

body[data-theme="dark"] .incoming-fremd-details-text strong {
  color: #dcfce7;
}

body[data-theme="dark"] .incoming-fremd-details-sub {
  color: #86efac;
}

.modal-backdrop.app-confirm-modal {
  align-items: center;
  justify-content: center;
  z-index: 12000;
}

.app-confirm-modal .modal-panel {
  flex: 0 0 auto;
  align-self: auto;
  width: min(440px, calc(100% - 32px));
  height: auto;
  max-height: min(90vh, 360px);
  max-height: min(90dvh, 360px);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(8, 20, 44, 0.35);
}

/* Termin-Bearbeiten ?berschreibt die kurze Confirm-H?he */
.modal-backdrop.app-confirm-modal.sf-att-session-edit-modal .modal-panel.sf-att-session-edit-panel {
  width: min(560px, calc(100% - 24px));
  max-width: min(560px, 96vw);
  height: auto;
  max-height: min(92dvh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-confirm-message {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--color-text);
}

.app-confirm-modal .app-confirm-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.sf-delete-guard-code {
  margin: 8px 0 10px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.sf-day-squad-calc {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid #1b4f8a;
  border-radius: 8px;
  background: rgba(27, 79, 138, 0.06);
}

#attendanceDaySquadCalc[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body.sf-attendance-trainer-detail-page #attendanceDaySquadCalc:not([hidden]) {
    display: block;
    margin: 0.35rem 0 0.75rem;
  }
}

.sf-day-squad-calc__row {
  margin: 0.35rem 0 0;
}

.sf-day-squad-calc__short {
  color: #9b1c1c;
  font-weight: 700;
}

.sf-day-squad-calc__spare {
  color: #1b7f4a;
  font-weight: 700;
}

.input,
.textarea {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  color: #101828;
}

/* iOS: Fokus auf Inputs < 16px zoomt die Seite automatisch — GLOBALER FIX für alle Inputs */
@media (max-width: 720px) {
  .input,
  .textarea,
  select.input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="search"],
  input[type="url"] {
    font-size: 16px !important;
  }
}

.textarea {
  min-height: 120px;
  white-space: pre-line;
}

.input.compact {
  padding: 6px 8px;
  width: 70px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.editor {
  display: grid;
  gap: 10px;
}

.status-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.permissions-details {
  margin-top: 6px;
}

.permissions-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.permissions-details[open] .permissions-summary {
  margin-bottom: 10px;
}

.user-details {
  margin-top: 4px;
}

.user-details-summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}

.user-details[open] .user-details-summary {
  margin-bottom: 12px;
}

.permissions-grid {
  display: grid;
  gap: 6px;
}

.permissions-group-label {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 10px 10px 4px;
  margin-top: 4px;
  border-radius: 8px;
}

.permissions-group-label--turniere {
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 55%, #fed7aa33 100%);
  color: #9a3412;
  border-left: 4px solid #ea580c;
  padding-left: 12px;
}

.permissions-group-label--trainer {
  background: linear-gradient(90deg, #ecfeff 0%, #cffafe 55%, #a5f3fc33 100%);
  color: #0e7490;
  border-left: 4px solid #0891b2;
  padding-left: 12px;
}

.permissions-group-label--aufgaben {
  background: linear-gradient(90deg, #f5f3ff 0%, #ede9fe 55%, #ddd6fe44 100%);
  color: #5b21b6;
  border-left: 4px solid #7c3aed;
  padding-left: 12px;
}

.permissions-group-label--auswertungen {
  background: linear-gradient(90deg, #fdf2f8 0%, #fce7f3 55%, #fbcfe844 100%);
  color: #9d174d;
  border-left: 4px solid #db2777;
  padding-left: 12px;
}

.permissions-group-label--administration {
  background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 55%, #bfdbfe44 100%);
  color: #1e3a8a;
  border-left: 4px solid #2563eb;
  padding-left: 12px;
}

.permissions-group-label:first-child {
  margin-top: 0;
  padding-top: 4px;
}

.permissions-row {
  display: grid;
  grid-template-columns: minmax(11.5rem, 1.6fr) repeat(4, 58px);
  gap: 6px;
  align-items: center;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

.permissions-row:not(.head) {
  color: #0f172a;
}

.permissions-row > div:first-child {
  line-height: 1.35;
  min-width: 0;
}

.permissions-row:not(.head) > div:first-child {
  color: #0b1220;
  font-weight: 600;
  font-size: 13px;
}

.permissions-row:nth-child(even):not(.head) {
  background: #eef2f8;
}

.permissions-row:not(.head):not(.permissions-row-master):hover {
  background: #e8f0fe;
  border-color: #93c5fd;
}

.permissions-row:not(.head):not(.permissions-row-master).permissions-row--checked {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.permissions-row:not(.head):not(.permissions-row-master).permissions-row--checked > div:first-child {
  color: #1e3a8a;
}

.permissions-row-master {
  background: #eff6ff;
  border-style: dashed;
  border-color: #bfdbfe;
  padding: 6px 10px;
}

.permissions-row-master > div:first-child {
  font-weight: 500;
  font-size: 11px;
  color: #1e40af;
  font-style: italic;
}

.permissions-expand-block {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}

.permissions-expand-summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px 6px 28px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  position: relative;
  user-select: none;
}

.permissions-expand-icon {
  display: inline-block;
  font-style: normal;
  margin-right: 4px;
  opacity: 0.7;
}

.permissions-expand-summary::-webkit-details-marker {
  display: none;
}

.permissions-expand-summary::before {
  content: "\25BE";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #64748b;
  transition: transform 0.12s ease;
}

.permissions-expand-block[open] > .permissions-expand-summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.permissions-expand-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px 12px;
  border-top: 1px solid #f1f5f9;
}

.permissions-expand-subtitle {
  margin: 0;
  padding: 0 10px 8px 28px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
}

.permissions-expand-empty {
  margin: 0;
  padding: 8px 10px 10px 28px;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}

.permissions-sub-row {
  display: grid;
  grid-template-columns: minmax(11.5rem, 1fr) repeat(4, 58px);
  gap: 6px;
  align-items: center;
  padding: 9px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  margin: 0;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.permissions-sub-row:nth-child(odd) {
  background: #f1f5f9;
}

.permissions-sub-row:hover {
  background: #e8f0fe;
  border-left-color: #3b82f6;
}

.permissions-sub-row--checked {
  background: #eff6ff !important;
  border-color: #93c5fd;
  border-left-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.permissions-sub-row--checked .permissions-sub-row-label {
  color: #1e3a8a;
  font-weight: 600;
}

.permissions-sub-row-label {
  color: #475569;
  line-height: 1.35;
  min-width: 0;
}

.permissions-sub-row-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.permissions-sub-row-placeholder {
  min-height: 1px;
}

body[data-theme="dark"] .permissions-expand-block {
  background: #0f172a;
  border-color: rgba(51, 65, 85, 0.75);
}

body[data-theme="dark"] .permissions-expand-summary {
  color: #cbd5e1;
}

body[data-theme="dark"] .permissions-expand-summary::before {
  color: #94a3b8;
}

body[data-theme="dark"] .permissions-expand-body {
  border-top-color: rgba(51, 65, 85, 0.5);
}

body[data-theme="dark"] .permissions-sub-row {
  background: #0f172a;
  border-color: rgba(51, 65, 85, 0.75);
  border-left-color: #475569;
}

body[data-theme="dark"] .permissions-sub-row:nth-child(odd) {
  background: #111c2e;
}

body[data-theme="dark"] .permissions-sub-row:hover {
  background: #152238;
  border-left-color: #60a5fa;
}

body[data-theme="dark"] .permissions-sub-row--checked {
  background: #132547 !important;
  border-color: #3b82f6;
  border-left-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
}

body[data-theme="dark"] .permissions-sub-row--checked .permissions-sub-row-label {
  color: #bfdbfe;
}

body[data-theme="dark"] .permissions-sub-row-label {
  color: #94a3b8;
}

body[data-theme="dark"] .permissions-row:not(.head):not(.permissions-row-master):hover {
  background: #152238;
  border-color: #3b82f6;
}

body[data-theme="dark"] .permissions-row:not(.head):not(.permissions-row-master).permissions-row--checked {
  background: #132547;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18);
}

body[data-theme="dark"] .permissions-row:not(.head):not(.permissions-row-master).permissions-row--checked > div:first-child {
  color: #bfdbfe;
}

body[data-theme="dark"] .permissions-row-master {
  background: #132547;
  border-style: dashed;
}

body[data-theme="dark"] .permissions-row-master > div:first-child {
  color: #cbd5e1;
}

body[data-theme="dark"] .permissions-expand-subtitle {
  color: #94a3b8;
  border-bottom-color: rgba(51, 65, 85, 0.5);
}

body[data-theme="dark"] .permissions-expand-empty {
  color: #94a3b8;
  border-top-color: rgba(51, 65, 85, 0.5);
}

body[data-theme="dark"] .permissions-group-label--turniere {
  background: linear-gradient(90deg, #292524 0%, #422006 45%, #78350f55 100%);
  color: #fde68a;
  border-left-color: #f59e0b;
}

body[data-theme="dark"] .permissions-group-label--trainer {
  background: linear-gradient(90deg, #0c1929 0%, #0e3a44 45%, #155e7544 100%);
  color: #a5f3fc;
  border-left-color: #22d3ee;
}

body[data-theme="dark"] .permissions-group-label--aufgaben {
  background: linear-gradient(90deg, #1e1b2e 0%, #2e1065 40%, #4c1d9544 100%);
  color: #e9d5ff;
  border-left-color: #a78bfa;
}

body[data-theme="dark"] .permissions-group-label--auswertungen {
  background: linear-gradient(90deg, #27141f 0%, #500724 40%, #83184355 100%);
  color: #fbcfe8;
  border-left-color: #f472b6;
}

body[data-theme="dark"] .permissions-group-label--administration {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #1d4ed844 100%);
  color: #bfdbfe;
  border-left-color: #60a5fa;
}

body[data-theme="dark"] .permissions-row {
  background: #101b2f;
}

body[data-theme="dark"] .permissions-row:nth-child(even):not(.head) {
  background: #0e172a;
}

body[data-theme="dark"] .permissions-row:not(.head) {
  color: var(--color-text);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

body[data-theme="dark"] .permissions-row:not(.head) > div:first-child {
  color: var(--color-text);
  font-weight: 600;
}

body[data-theme="dark"] .permissions-summary {
  color: var(--color-accent);
}

body[data-theme="dark"] .permissions-summary:hover {
  color: #dbeafe;
}

body[data-theme="dark"] .permissions-row label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 1.1em;
  height: 1.1em;
  cursor: pointer;
}

body[data-theme="dark"] .user-detail-inline {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .team-map-list {
  background: var(--color-surface);
  border-color: var(--color-border);
}

body[data-theme="dark"] .team-map-item {
  color: var(--color-text);
}

body[data-theme="dark"] .user-list {
  border-color: var(--color-border);
  background: rgba(0, 0, 0, 0.2);
  scrollbar-color: #334155 transparent;
}

body[data-theme="dark"] .user-table th {
  background: var(--color-surface, #1e293b);
  color: #94a3b8;
  border-bottom-color: var(--color-border);
}

body[data-theme="dark"] .user-table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .user-table-row:hover {
  background: rgba(59, 130, 246, 0.08);
}

body[data-theme="dark"] .user-table-cell {
  border-bottom-color: var(--color-border);
}

body[data-theme="dark"] .user-table-cell--name {
  color: #f1f5f9;
}

body[data-theme="dark"] .user-table-cell--muted {
  color: #64748b;
}

body[data-theme="dark"] .user-table__filter-row th {
  background: #0f172a;
}

body[data-theme="dark"] .user-table__sum-row td {
  background: #0f172a;
}

body[data-theme="dark"] .user-table-empty {
  color: #94a3b8;
}

body[data-theme="dark"] .user-table-row--editing td {
  background: rgba(59, 130, 246, 0.12);
}

body[data-theme="dark"] .user-table-expand-row .user-table-cell--expand {
  background: var(--color-surface, #1e293b);
}

body[data-theme="dark"] .user-table-expand-row .user-detail-inline {
  background: var(--color-surface, #1e293b);
  border-color: var(--color-border);
  border-top-color: #3b82f6;
}

body[data-theme="dark"] .list-item.user-item {
  border-color: #273554;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .list-item.user-item:hover {
  border-color: #3b4f7a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .user-item-main strong {
  color: #f1f5f9;
}

body[data-theme="dark"] .user-toolbar {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 14px;
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .list-item,
body[data-theme="dark"] .modal-panel,
body[data-theme="dark"] .input,
body[data-theme="dark"] .textarea,
body[data-theme="dark"] .help-panel {
  background: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-border);
}

/* Masken/Formulare: bessere Lesbarkeit im Dark-Mode */
body[data-theme="dark"] .card .muted,
body[data-theme="dark"] .card-header .muted,
body[data-theme="dark"] .modal-panel .muted {
  color: #c5d4e8;
}

body[data-theme="dark"] .card .meta,
body[data-theme="dark"] .card-header .meta {
  color: #b8c8dc;
}

body[data-theme="dark"] .field label {
  color: #d1dbe8;
}

body[data-theme="dark"] .table-head div {
  color: #c5d4e8;
}

body[data-theme="dark"] .tile-meta {
  color: #c5d4e8;
}

body[data-theme="dark"] .tile-state {
  color: #94a3b8;
}

body[data-theme="dark"] .sf-setup-status-hub-link {
  color: #93c5fd;
}

body[data-theme="dark"] .sf-setup-status-hub-link:hover {
  color: #bfdbfe;
}

body[data-theme="dark"] .sf-setup-status-group-count {
  color: #fbbf24;
}

body[data-theme="dark"] .sf-setup-status-preview {
  color: var(--color-text);
  border-color: color-mix(in srgb, #f59e0b 35%, var(--color-border) 65%);
}

body[data-theme="dark"] .sf-testdata-preview-section-head {
  color: var(--color-text);
}

body[data-theme="dark"] .sf-testdata-preview-table th,
body[data-theme="dark"] .sf-testdata-preview-table td {
  color: var(--color-text);
  border-color: var(--color-border);
}

body[data-theme="dark"] .sf-testdata-preview-table th {
  background: color-mix(in srgb, var(--color-border) 45%, transparent 55%);
}

body[data-theme="dark"] select.input {
  background-color: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-border);
}

body[data-theme="dark"] .incoming-fremd-team-box {
  background: #0f1628;
  border-color: #334155;
}

body[data-theme="dark"] .incoming-fremd-team-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .incoming-fremd-team-item:hover {
  background: rgba(94, 140, 255, 0.14);
}

body[data-theme="dark"] .incoming-fremd-team-item:focus-within {
  outline-color: var(--color-accent);
}

body[data-theme="dark"] .incoming-fremd-team-item input[type="checkbox"] {
  accent-color: #7aa6ff;
  border-color: #94a3b8;
}

body[data-theme="dark"] .incoming-fremd-team-label {
  color: #f1f5f9;
  font-weight: 600;
}

body[data-theme="dark"] select.input option {
  background-color: var(--color-card);
  color: var(--color-text);
}

body[data-theme="dark"] .input::placeholder,
body[data-theme="dark"] .textarea::placeholder {
  color: #94a3b8;
}

body[data-theme="dark"] .modal-body {
  background: var(--color-card);
  color: var(--color-text);
}

body[data-theme="dark"] .user-detail-inline .editor {
  color: var(--color-text);
}

body[data-theme="dark"] .user-detail-inline label.meta {
  color: var(--color-text);
}

body[data-theme="dark"] .table-card {
  background: var(--color-card);
  border-color: var(--color-border);
}

body[data-theme="dark"] .table-row {
  background: #101b2f;
  color: var(--color-text);
}

body[data-theme="dark"] .table-row.table-head {
  background: #0e172a;
  color: var(--color-text);
}

body[data-theme="dark"] .schedule-table .table-row.table-head {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  color: #94a3b8;
}

body[data-theme="dark"] .schedule-table .schedule-row {
  background: #0f1726;
  border-color: #1f2a44;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .schedule-table .schedule-row:hover {
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .schedule-group {
  background: linear-gradient(180deg, #1e3a5f 0%, #1e40af 100%);
  color: #bfdbfe;
  border-color: #2563eb;
}

body[data-theme="dark"] .schedule-table .score-cell {
  background: #1e293b;
  border-color: #334155;
}


body[data-theme="dark"] .note-input {
  background: #0f1726;
  border-color: #23314f;
  color: var(--color-text);
}

body[data-theme="dark"] .note-input::placeholder {
  color: #94a3b8;
}

body[data-theme="dark"] .tile-card {
  background: var(--color-card);
  border-color: var(--color-border);
}

body[data-theme="dark"] .tile-title {
  color: var(--color-text);
}

body[data-theme="dark"] .tile-meta {
  color: var(--color-muted);
}

body[data-theme="dark"] .tile-card.tile-attention {
  background: #2a2210;
  border-color: #b45309;
}

body[data-theme="dark"] .tile-card.tile-attention .tile-icon {
  background: #3d3010;
  color: #fbbf24;
}

body[data-theme="dark"] .tile-card.disabled {
  background: #0f1626;
  border-color: #1f2a44;
}

body[data-theme="dark"] .tab {
  background: rgba(59, 130, 246, 0.18);
  color: #e8f0ff;
  border: 1px solid rgba(91, 140, 255, 0.42);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .tab.active {
  background: var(--color-primary);
  color: #0b1220;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body[data-theme="dark"] .tab.ghost {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(91, 140, 255, 0.38);
  color: var(--color-text);
}

body[data-theme="dark"] .task-tab-strip {
  border-bottom-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="dark"] .task-tab-strip .tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  box-shadow: none;
}

body[data-theme="dark"] .task-tab-strip .tab:hover {
  color: #e8f0ff;
  background: rgba(59, 130, 246, 0.12);
}

body[data-theme="dark"] .task-tab-strip .tab.active {
  background: transparent;
  color: #93c5fd;
  border: none;
  border-bottom: 2px solid #60a5fa;
  margin-bottom: -1px;
  box-shadow: none;
}

body[data-theme="dark"] .nav-item {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

body[data-theme="dark"] .nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.permissions-row.head {
  background: #eef2f7;
  font-weight: 700;
  color: #667085;
}

body[data-theme="dark"] .permissions-row.head {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #94a3b8;
  border: 1px solid #334155;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.permissions-row label {
  display: flex;
  justify-content: center;
}

.permissions-sub-row-cell input[type="checkbox"],
.permissions-row:not(.head) label input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
  accent-color: #2563eb;
}

.schedule-item {
  display: grid;
  grid-template-columns: 90px 90px 1fr 170px;
  gap: 10px;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 6px solid #e6efff;
  border: 1px solid #e4e7ec;
  box-shadow: 0 8px 16px rgba(14, 26, 43, 0.06);
}

.schedule-time,
.schedule-field {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.schedule-teams {
  font-weight: 700;
}

.schedule-meta {
  font-size: 12px;
  color: #667085;
}

.group-a { border-left-color: #1e4fa1; }
.group-b { border-left-color: #6ea8ff; }
.group-c { border-left-color: #0b2d63; }
.group-d { border-left-color: #9bbcff; }

@media print {
  body {
    background: #fff;
  }
  .sf-app-update-banner,
  #sfAppUpdateBanner {
    display: none !important;
  }
  .sidebar,
  .topbar {
    display: none !important;
  }
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0;
    background: #fff;
  }
  .content {
    padding: 0;
    border-radius: 0;
  }
  .topbar,
  .tabs,
  .cta,
  .actions,
  .form-grid,
  .editor,
  .status-board {
    display: none !important;
  }
  .card {
    box-shadow: none;
    background: #fff;
    page-break-inside: avoid;
  }
  .schedule-item {
    border: 1px solid #d0d5dd;
    border-left-width: 6px;
  }
}

.schedule-col {
  display: grid;
  gap: 4px;
}

.table-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 6px solid #e6efff;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 16px;
  align-items: start;
}

.groups-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.groups-grid .table-card {
  margin-bottom: 0;
  min-width: 0;
  overflow: visible;
}


.table-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.table {
  display: grid;
  gap: 6px;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr repeat(6, 60px);
  gap: 8px;
  align-items: center;
  background: #f7f9fc;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.table-row.table-head {
  background: #eef2f7;
  font-weight: 700;
  color: #667085;
}

.schedule-table {
  gap: 12px;
  padding: 4px 0;
  min-width: 980px;
}

.schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 0 -2px;
  padding: 2px;
}

.schedule-table .table-row.table-head {
  grid-template-columns: 56px minmax(120px, 132px) minmax(100px, 112px) 110px minmax(180px, 1.6fr) 170px 130px minmax(120px, 150px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 10px 10px 0 0;
  padding: 12px 10px;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6) inset;
}

.schedule-table .schedule-row {
  grid-template-columns: 56px minmax(120px, 132px) minmax(100px, 112px) 110px minmax(180px, 1.6fr) 170px 130px minmax(120px, 150px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(14, 26, 43, 0.06), 0 1px 2px rgba(14, 26, 43, 0.04);
  padding: 10px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-table .schedule-row:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(14, 26, 43, 0.08), 0 1px 3px rgba(14, 26, 43, 0.06);
}

.schedule-table .schedule-row.group-a { border-left: 4px solid #1e4fa1; }
.schedule-table .schedule-row.group-b { border-left: 4px solid #2563eb; }
.schedule-table .schedule-row.group-c { border-left: 4px solid #0b2d63; }
.schedule-table .schedule-row.group-d { border-left: 4px solid #3b82f6; }

.schedule-table .input.compact {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.schedule-table .schedule-field-input {
  width: 100%;
}

.schedule-table .schedule-time-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-right: 28px;
  font-variant-numeric: tabular-nums;
}

.schedule-group {
  white-space: nowrap;
  display: inline-block;
  min-width: 1.65rem;
  text-align: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.schedule-table .score-cell {
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
}

.schedule-table .schedule-actions {
  gap: 8px;
}

.schedule-table .schedule-actions .cta {
  font-weight: 600;
  font-size: 12px;
}

.group-colors-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.group-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-color-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-dark, #1e293b);
  min-width: 72px;
}

.group-color-input {
  width: 44px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.schedule-actions {
  justify-content: flex-end;
  gap: 6px;
}

.score-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-cell .input.compact {
  width: 52px;
  text-align: center;
}

@media (max-width: 1200px) {
  .schedule-table .schedule-row,
  .schedule-table .table-row.table-head {
    grid-template-columns: 56px minmax(112px, 124px) minmax(92px, 104px) 96px minmax(160px, 1fr) 136px 108px minmax(112px, 136px);
  }
}

@media (max-width: 900px) {
  .schedule-table .schedule-row,
  .schedule-table .table-row.table-head {
    grid-template-columns: 1fr;
  }
  .schedule-table .table-row.table-head {
    display: none;
  }
}

.group-pool-table .table-row {
  grid-template-columns: 1fr minmax(140px, 200px);
}

.group-pool-table .table-row.table-head {
  grid-template-columns: 1fr minmax(140px, 200px);
}

.group-pool-table .group-row .input.compact {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.group-pool-table .group-row > div:last-child {
  min-width: 0;
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .groups-grid {
    grid-template-columns: 1fr;
  }
  .group-pool-table .table-row,
  .group-pool-table .table-row.table-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .group-pool-table .group-row > div:last-child {
    justify-content: flex-start;
  }
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 200px 1fr;
  }
  .schedule-item {
    grid-template-columns: 80px 80px 1fr 120px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
    overflow-x: hidden;
    overflow-x: clip;
  }
  /* Zwei Zeilen: Menü+Icons oben, Logo+Titel darunter (lesbar) */
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "menu . actions"
      "logo title title";
    align-items: center;
    column-gap: 8px;
    row-gap: 0.35rem;
    padding-top: 0.4rem;
    padding-bottom: 0.45rem;
  }
  .topbar-left {
    display: contents;
  }
  .menu-button {
    grid-area: menu;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
  }
  .topbar-brand-logo {
    grid-area: logo;
    width: 28px;
    height: 28px;
  }
  .topbar-context-pill {
    display: none !important;
  }
  .topbar .page-title {
    grid-area: title;
    flex: unset;
    width: auto;
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.3;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-actions {
    grid-area: actions;
    flex: unset;
    width: auto;
    max-width: none;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
  }
  body.nav-open .topbar .menu-button {
    visibility: hidden;
    pointer-events: none;
  }
  body.nav-open .sidebar {
    z-index: 80;
  }
  body.nav-open .topbar {
    z-index: 50;
  }
  .sidebar {
    border-radius: 18px;
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    transform: translateX(-120%);
    transition: transform 160ms ease;
    z-index: 60;
    overflow: hidden;
  }
  /* Safari/iPhone (Browser): solide Sidebar im hellen Modus ? ohne sf-native-app war Hintergrund transparent */
  body:not([data-theme="dark"]) .sidebar {
    background: #ffffff;
    background-color: #ffffff;
    opacity: 1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 18px 48px rgba(8, 20, 44, 0.28);
  }
  body:not([data-theme="dark"]) .nav-group {
    background: #f4f7fb;
  }
  .sidebar-brand {
    flex-shrink: 0;
  }
  .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0.5rem;
    margin-right: -4px;
    padding-right: 4px;
  }
  .content {
    min-height: auto;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 44, 0.45);
    z-index: 50;
  }
  body.nav-open .mobile-backdrop {
    display: block;
  }

  .topbar .pill {
    padding: 5px 10px;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-item {
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
  }

  .nav-item.nav-item-sub {
    font-size: 0.86rem;
    padding: 9px 10px 9px 12px;
  }

  #logoutButton.tab {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .topbar .icon-button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .sf-lang-switcher-host {
    flex-shrink: 0;
    min-width: 0;
    max-width: none;
  }

  .sf-lang-switcher-host:not(.sf-lang-switcher-host--compact) {
    flex-shrink: 1;
    max-width: min(9.5rem, 42vw);
  }

  .sf-lang-select--compact {
    max-width: 100%;
    min-width: 0;
  }
}

/* iPhone / schmale Geräte: Topbar bleibt eine Zeile */
@media (max-width: 480px) {
  .topbar {
    row-gap: 0;
    column-gap: 6px;
  }

  .topbar-brand-logo {
    width: 26px;
    height: 26px;
  }

  .topbar .page-title {
    font-size: 0.95rem;
  }

  #logoutButton.tab {
    padding: 6px 9px;
    font-size: 0.8rem;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .topbar-actions .tab {
    max-width: 100%;
  }
}

/* Desktop: Titel nicht dauerhaft unter die Pill zwingen */
@media (min-width: 961px) {
  .topbar-left {
    flex-wrap: nowrap;
    align-items: center;
  }

  .topbar .page-title {
    flex: 0 1 auto;
    margin-top: 0;
    margin-left: 4px;
    max-width: min(480px, 36vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.onboarding {
  background: #ffffff;
  border-left: 6px solid #6ea8ff;
}

.onboarding-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.onboarding-text {
  font-size: 12px;
  color: #5d6a80;
  line-height: 1.5;
}

.onboarding-text ul {
  margin: 0;
  padding-left: 18px;
}

/* Trainingsbeteiligung: R?ckmeldungen Zusagen/Absagen/offen */
.list-item.attendance-session-row {
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 0.75rem 1.25rem;
}

.attendance-session-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.attendance-session-row.attendance-session-row--active {
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
}

.attendance-session-row-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.attendance-session-row-main strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.attendance-session-row-main .meta {
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

a.attendance-session-file-link {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

a.attendance-session-file-link:hover {
  text-decoration-thickness: 2px;
}

.attendance-session-files-inline {
  line-height: 1.45;
}

.attendance-session-row-actions {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-self: center;
  gap: 6px;
  min-width: 7.5rem;
}

.attendance-session-details-btn,
.attendance-session-edit-btn,
.attendance-session-carpool-btn {
  font-size: 0.88rem;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
  width: 100%;
}

.attendance-session-details-btn {
  min-height: 40px;
}

.attendance-session-carpool-btn {
  min-height: 36px;
  letter-spacing: 0.02em;
}

.list-item.attendance-session-row > .attendance-session-row-carpool,
#attendanceSessionList > .attendance-session-row-carpool {
  display: block;
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.06);
  box-sizing: border-box;
  order: unset;
}

#attendanceSessionList > .attendance-session-row-carpool {
  /* Direkt unter der Terminkarte, volle Listenbreite */
  grid-column: unset;
  grid-area: unset;
}

body[data-theme="dark"] .list-item.attendance-session-row > .attendance-session-row-carpool,
body[data-theme="dark"] #attendanceSessionList > .attendance-session-row-carpool {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #e8eef6;
}

.attendance-session-row-carpool .sf-session-carpool {
  margin: 0;
}

.attendance-session-row-carpool .sf-session-carpool--direct {
  border: none;
  padding: 0;
  background: transparent;
}

.attendance-session-row-carpool .sf-session-carpool-direct-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
}

.sf-session-carpool-direct-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.45rem;
}

.sf-session-carpool-direct-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.sf-session-carpool-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

.sf-session-carpool-form-actions .cta {
  flex: 1 1 auto;
  min-width: 8rem;
}

.sf-session-carpool-close-btn,
.sf-session-carpool-cancel-btn {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.attendance-session-carpool-btn--open {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}

.attendance-session-row-stats {
  flex: 0 0 auto;
  min-width: 11rem;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.attendance-session-row-stats .attendance-rsvp-bar {
  margin-bottom: 0;
}

.attendance-rsvp-bar {
  display: flex;
  width: 100%;
  height: 14px;
  min-height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(120, 130, 150, 0.28);
}

.attendance-rsvp-bar--empty {
  height: 10px;
  min-height: 10px;
  opacity: 0.55;
}

.attendance-rsvp-bar-seg {
  min-width: 3px;
  height: 100%;
}

.attendance-rsvp-bar-seg--confirmed {
  background: #2e7d32;
}

.attendance-rsvp-bar-seg--declined {
  background: #c62828;
}

.attendance-rsvp-bar-seg--pending {
  background: #78909c;
}

.attendance-rsvp-counts {
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--muted, #5d6a80);
}

.attendance-rsvp-counts--inline {
  text-align: right;
  white-space: normal;
  max-width: 20rem;
  margin-left: auto;
}

.attendance-rsvp-counts--session {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.attendance-rsvp-counts--detail-summary {
  font-size: 1rem;
  margin-top: 0.35rem;
  color: var(--color-text, #1e293b);
}

.attendance-rsvp-summary .attendance-rsvp-bar {
  max-width: 28rem;
  margin-bottom: 0.35rem;
}

.attendance-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.attendance-stat-values {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--muted, #5d6a80);
}

.attendance-rsvp-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.attendance-rsvp-player-name {
  font-size: 1.08rem;
  line-height: 1.35;
}

.attendance-rsvp-pill {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  line-height: 1.25;
}

.attendance-rsvp-eltern-status {
  margin-top: 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  display: inline-block;
  max-width: 100%;
}

.attendance-rsvp-eltern-status--confirmed {
  background: rgba(46, 125, 50, 0.14);
  color: #1b5e20;
  border: 1px solid rgba(46, 125, 50, 0.35);
}

.attendance-rsvp-eltern-status--declined {
  background: rgba(198, 40, 40, 0.12);
  color: #b71c1c;
  border: 1px solid rgba(198, 40, 40, 0.35);
}

.attendance-rsvp-eltern-status--pending {
  background: rgba(120, 144, 156, 0.16);
  color: #37474f;
  border: 1px solid rgba(120, 144, 156, 0.35);
}

.attendance-rsvp-pill.attendance-rsvp-row--confirmed {
  background: rgba(46, 125, 50, 0.18);
  color: #1b5e20;
}

.attendance-rsvp-pill.attendance-rsvp-row--declined {
  background: rgba(198, 40, 40, 0.15);
  color: #b71c1c;
}

.attendance-rsvp-pill.attendance-rsvp-row--pending {
  background: rgba(120, 144, 156, 0.2);
  color: #455a64;
}

.list-item.attendance-rsvp-row--confirmed {
  border-left: 6px solid #2e7d32;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.list-item.attendance-rsvp-row--declined {
  border-left: 6px solid #c62828;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.list-item.attendance-rsvp-row--pending {
  border-left: 6px solid #90a4ae;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.attendance-rsvp-list--compact .list-item {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.attendance-rsvp-list--compact .attendance-rsvp-player-name {
  font-size: 1rem;
}

.attendance-rsvp-list--compact .attendance-rsvp-pill {
  font-size: 0.8rem;
  padding: 0.22rem 0.55rem;
}

.attendance-rsvp-list--compact .attendance-rsvp-player-meta {
  display: none;
}

.attendance-rsvp-list--compact .attendance-rsvp-tp-label {
  display: none;
}

.attendance-rsvp-list--compact .attendance-rsvp-tp-select {
  max-width: 7rem;
  font-size: 0.82rem;
  padding: 0.2rem 0.35rem;
}

.attendance-detail-sticky-head {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(31, 61, 99, 0.14);
  background: var(--color-surface, #f5f7fb);
  box-shadow: 0 2px 8px rgba(14, 26, 43, 0.06);
}
.attendance-detail-sticky-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}
.attendance-detail-sticky-head__row h4 {
  margin: 0;
  flex: 1 1 160px;
  font-size: 1.05rem;
}
.attendance-detail-sticky-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.attendance-detail-primary .attendance-rsvp-summary {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.1);
  background: rgba(255, 255, 255, 0.5);
}
body[data-theme="dark"] .attendance-detail-primary .attendance-rsvp-summary {
  background: rgba(15, 23, 42, 0.45);
}
.attendance-detail-primary {
  margin: 0 0 0.75rem;
}
#attendanceDetailWrap {
  overflow: visible;
  max-height: none;
}

/* Trainer ? Teilnahme: Detail inline, nicht ?ber andere Termine legen */
body[data-page="trainer-attendance"] .attendance-detail-sticky-head {
  position: static;
  top: auto;
  z-index: auto;
  box-shadow: none;
}
body[data-page="trainer-attendance"] .attendance-detail-sticky-head #attendanceDetailMeta,
body[data-page="trainer-attendance"] .attendance-detail-sticky-head .meta {
  display: block;
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--color-text, #0a1628);
  opacity: 1;
}
body[data-theme="dark"][data-page="trainer-attendance"] .attendance-detail-sticky-head #attendanceDetailMeta,
body[data-theme="dark"][data-page="trainer-attendance"] .attendance-detail-sticky-head .meta {
  color: var(--color-text, #e2e8f0);
}
body[data-page="trainer-attendance"] .attendance-detail-sticky-head__row h4 {
  font-weight: 700;
}
body[data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0.35rem 0 0.5rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.32);
  background: var(--color-card, #fff);
  box-shadow: 0 2px 10px rgba(14, 26, 43, 0.06);
  isolation: isolate;
}
body[data-theme="dark"][data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap {
  background: var(--color-card, #121a2a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
body[data-page="trainer-attendance"] .attendance-page--teilnahme.sf-attendance-detail-open {
  padding-bottom: 1.25rem;
}
body[data-page="trainer-attendance"] #attendanceSessionList.sf-attendance-detail-open > .attendance-session-row[hidden] {
  display: none !important;
}
.attendance-teilnahme-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.48);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body[data-theme="dark"] .attendance-teilnahme-detail-backdrop {
  background: rgba(0, 0, 0, 0.62);
}
/* Light-Admin .content hat backdrop-filter ? fixed-Kinder bleiben im Content-Stack.
   Bei offenem Detail Filter aus, damit Sheet/Backdrop korrekt hit-testen. */
body.sf-attendance-trainer-detail-open .content {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-page="trainer-attendance"].sf-attendance-trainer-detail-open .attendance-session-row--active {
  position: relative;
  z-index: 92;
}
body[data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap {
  position: relative;
  z-index: 92;
}
body[data-page="trainer-attendance"] .attendance-detail-close-btn {
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 2px solid #1d4ed8;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}
body[data-page="trainer-attendance"] .attendance-detail-close-btn:hover,
body[data-page="trainer-attendance"] .attendance-detail-close-btn:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: 2px;
}
body[data-theme="dark"][data-page="trainer-attendance"] .attendance-detail-close-btn {
  border-color: #60a5fa;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}
.attendance-rsvp-group-details {
  margin: 0 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.1);
  background: rgba(255, 255, 255, 0.45);
}
.attendance-rsvp-group-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 10px 8px;
  list-style: none;
  user-select: none;
}
.attendance-rsvp-group-summary::-webkit-details-marker {
  display: none;
}
.attendance-rsvp-group-summary::after {
  content: " \25BE";
  font-weight: 600;
  opacity: 0.65;
}
.attendance-rsvp-group-details[open] > .attendance-rsvp-group-summary::after {
  content: "\25B4";
}
.attendance-rsvp-group-inner {
  padding: 0 6px 8px;
}
.attendance-rsvp-group-inner .list-item:first-child {
  margin-top: 0;
}
.attendance-rsvp-group-head--confirmed,
.attendance-rsvp-group-summary.attendance-rsvp-group-head--confirmed {
  color: #166534;
}
.attendance-rsvp-group-head--declined,
.attendance-rsvp-group-summary.attendance-rsvp-group-head--declined {
  color: #991b1b;
}
.attendance-rsvp-group-head--pending,
.attendance-rsvp-group-summary.attendance-rsvp-group-head--pending {
  color: #6b4c1e;
}
body[data-theme="dark"] .attendance-rsvp-group-details {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.55);
}
body[data-theme="dark"] .attendance-rsvp-group-head--confirmed,
body[data-theme="dark"] .attendance-rsvp-group-summary.attendance-rsvp-group-head--confirmed {
  color: #86efac;
}
body[data-theme="dark"] .attendance-rsvp-group-head--declined,
body[data-theme="dark"] .attendance-rsvp-group-summary.attendance-rsvp-group-head--declined {
  color: #fca5a5;
}
body[data-theme="dark"] .attendance-rsvp-group-head--pending,
body[data-theme="dark"] .attendance-rsvp-group-summary.attendance-rsvp-group-head--pending {
  color: #fcd34d;
}
body[data-theme="dark"] .attendance-detail-primary .attendance-rsvp-summary {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.5);
}
.attendance-trainer-rsvp-details > #attendanceTrainerRsvpSection > .pill,
.attendance-trainer-rsvp-details > #attendanceTrainerRsvpSection > p.muted {
  display: none;
}

/* Trainer · Teilnahme: Pill in Topbar unnötig (Logo/Titel reichen) */
body[data-page="trainer-attendance"] .topbar-left .pill {
  display: none !important;
}

/* Trainer ? Teilnahme: kompakter Kopf ? Terminliste fr?her sichtbar */
.attendance-page--teilnahme {
  padding-top: 10px;
  padding-bottom: 10px;
}
.attendance-teilnahme-card-header {
  margin-bottom: 0.35rem;
}
.attendance-teilnahme-card-header h2 {
  margin-bottom: 0;
}
.attendance-teilnahme-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 8px;
}
.attendance-teilnahme-toolbar .attendance-teilnahme-filters {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.attendance-page--teilnahme .attendance-teilnahme-head__link {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
  margin-left: auto;
}
.attendance-teilnahme-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 6px;
}
.attendance-teilnahme-filters__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted);
  flex: 0 0 auto;
}
.attendance-teilnahme-filters__select {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
}
.attendance-teilnahme-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
.attendance-teilnahme-new-btn {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
.club-players-page .club-players-list-section {
  margin-top: 0.25rem;
}
.club-players-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.club-players-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border, #2a3f5c);
}
.club-players-list-section__actions {
  margin-top: 0.85rem;
}
.club-import-modal .modal-body {
  padding-top: 0.25rem;
}
.club-xlsx-preview-summary {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.club-xlsx-preview-errors {
  margin: 0 0 0.5rem;
  color: var(--color-danger, #b42318);
  font-size: 0.88rem;
}
.club-xlsx-preview-table-wrap {
  max-height: min(42vh, 320px);
  overflow: auto;
  border: 1px solid var(--border, #2a3f5c);
  border-radius: 8px;
  background: var(--color-card, #fff);
}
.club-xlsx-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.club-xlsx-preview-table th,
.club-xlsx-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #e8edf4);
  text-align: left;
  vertical-align: top;
}
.club-xlsx-preview-table th {
  position: sticky;
  top: 0;
  background: var(--color-bg-muted, #f4f7fb);
  z-index: 1;
  font-weight: 600;
}
.club-xlsx-preview-table tr:last-child td {
  border-bottom: none;
}
.club-xlsx-preview-status--new {
  color: var(--color-success, #067647);
  font-weight: 600;
}
.club-xlsx-preview-status--existing {
  color: var(--color-warn, #b54708);
  font-weight: 600;
}
body[data-theme="dark"] .club-xlsx-preview-table-wrap {
  background: var(--color-card, #121a2a);
}
body[data-theme="dark"] .club-xlsx-preview-table th {
  background: #1a2438;
}
body[data-theme="dark"] .club-xlsx-preview-table td,
body[data-theme="dark"] .club-xlsx-preview-table th {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}
@media (max-width: 640px) {
  body[data-page="trainer-attendance"] .attendance-teilnahme-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -10px -10px 8px;
    padding: 8px 10px;
    background: var(--color-card, #fff);
    border-bottom: 1px solid rgba(31, 61, 99, 0.1);
  }
  body[data-theme="dark"][data-page="trainer-attendance"] .attendance-teilnahme-toolbar {
    background: var(--color-card, #121a2a);
    border-bottom-color: rgba(148, 163, 184, 0.2);
  }
  body[data-page="trainer-attendance"] .attendance-teilnahme-toolbar__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
  body[data-page="trainer-attendance"] .attendance-teilnahme-toolbar .attendance-teilnahme-kind-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 2px 0 4px;
    margin: 0;
    max-width: 100%;
  }
  body[data-page="trainer-attendance"] .attendance-teilnahme-kind-chip {
    flex: 0 0 auto;
  }
  .club-players-footer__actions .cta {
    width: 100%;
  }
}
.attendance-teilnahme-sessions-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
  min-height: 0;
}
.attendance-teilnahme-sessions-bar__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.attendance-teilnahme-sessions-bar__tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  margin: 0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-muted, #5b6b7c);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  line-height: 1.3;
}
.attendance-teilnahme-sessions-bar__tab.is-active {
  color: var(--color-text, #12263a);
  font-weight: 700;
  border-bottom-color: var(--color-primary, #1f3d63);
}
.attendance-teilnahme-sessions-bar__tab:disabled {
  opacity: 0.45;
  cursor: default;
}
.attendance-teilnahme-sessions-bar__refresh {
  appearance: none;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 4px 6px;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--color-muted, #5b6b7c);
  cursor: pointer;
  border-radius: 6px;
}
.attendance-teilnahme-sessions-bar__refresh:hover,
.attendance-teilnahme-sessions-bar__refresh:focus-visible {
  color: var(--color-text, #12263a);
  background: rgba(31, 61, 99, 0.08);
  outline: none;
}
.attendance-teilnahme-sessions-bar__hint {
  flex: 1 1 8rem;
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}
.attendance-teilnahme-kind-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  width: 100%;
  min-width: 0;
}
.attendance-teilnahme-toolbar .attendance-teilnahme-kind-filter {
  margin: 0;
}
.public-light-kind-filter {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
  margin: 0.35rem 0 0.65rem;
}
.attendance-teilnahme-kind-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(31, 61, 99, 0.22);
  background: var(--color-card, #fff);
  color: var(--color-text, #12263a);
  border-radius: 999px;
  padding: 7px 11px;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 36px;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.attendance-teilnahme-kind-chip:hover,
.attendance-teilnahme-kind-chip:focus-visible {
  border-color: var(--color-primary, #1f3d63);
  outline: none;
}
.attendance-teilnahme-kind-chip.is-active {
  box-shadow: inset 0 0 0 1px var(--color-primary, #1f3d63);
  border-color: var(--color-primary, #1f3d63);
}
.attendance-teilnahme-kind-chip--training {
  border-left: 4px solid rgba(14, 165, 233, 0.75);
}
.attendance-teilnahme-kind-chip--match {
  border-left: 4px solid rgba(59, 130, 246, 0.75);
}
.attendance-teilnahme-kind-chip--tournament {
  border-left: 4px solid rgba(245, 158, 11, 0.8);
}
.attendance-teilnahme-kind-chip--event {
  border-left: 4px solid rgba(139, 92, 246, 0.75);
}
.attendance-teilnahme-kind-chip--trainer_meeting {
  border-left: 4px solid rgba(16, 185, 129, 0.75);
}
.attendance-teilnahme-kind-chip--training.is-active {
  background: var(--sf-public-light-pending-training);
  color: var(--sf-public-light-pending-training-fg);
}
.attendance-teilnahme-kind-chip--match.is-active {
  background: var(--sf-public-light-pending-spiel);
  color: var(--sf-public-light-pending-spiel-fg);
}
.attendance-teilnahme-kind-chip--tournament.is-active {
  background: var(--sf-public-light-pending-tournament);
  color: var(--sf-public-light-pending-tournament-fg);
}
.attendance-teilnahme-kind-chip--event.is-active {
  background: var(--sf-public-light-pending-event);
  color: var(--sf-public-light-pending-event-fg);
}
.attendance-teilnahme-kind-chip--trainer_meeting.is-active {
  background: var(--sf-public-light-pending-trainer-meeting);
  color: var(--sf-public-light-pending-trainer-meeting-fg);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip {
  border-color: rgba(148, 163, 184, 0.28);
  background: var(--color-card, #121a2a);
  color: var(--color-text, #e8eef5);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip--training.is-active {
  background: var(--sf-public-light-pending-training-dark);
  color: var(--sf-public-light-pending-training-fg-dark);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip--match.is-active {
  background: var(--sf-public-light-pending-spiel-dark);
  color: var(--sf-public-light-pending-spiel-fg-dark);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip--tournament.is-active {
  background: var(--sf-public-light-pending-tournament-dark);
  color: var(--sf-public-light-pending-tournament-fg-dark);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip--event.is-active {
  background: var(--sf-public-light-pending-event-dark);
  color: var(--sf-public-light-pending-event-fg-dark);
}
body[data-theme="dark"] .attendance-teilnahme-kind-chip--trainer_meeting.is-active {
  background: var(--sf-public-light-pending-trainer-meeting-dark);
  color: var(--sf-public-light-pending-trainer-meeting-fg-dark);
}
.attendance-teilnahme-sessions-bar__btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  margin: 0;
}
body[data-page="trainer-attendance"] #attendanceSessionList {
  margin-top: 0 !important;
}
body[data-page="trainer-attendance"] #attendancePageFeedback {
  margin-top: 0.5rem;
}

body[data-page="trainer-attendance"] .list-item.attendance-session-row {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  gap: 0.45rem 0.65rem;
}

/* Desktop: Terminzeile als Grid ? Titel | Balken/Chips | Details */
@media (min-width: 721px) {
  body[data-page="trainer-attendance"] .list-item.attendance-session-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12.5rem, 17rem) 6.75rem;
    grid-template-areas: "main stats actions";
    align-items: start;
    column-gap: 1rem;
    row-gap: 0.35rem;
  }
  body[data-page="trainer-attendance"] .attendance-session-row-main {
    grid-area: main;
    min-width: 0;
  }
  body[data-page="trainer-attendance"] .attendance-session-row-stats {
    grid-area: stats;
    min-width: 0;
    max-width: none;
    width: 100%;
    justify-self: stretch;
  }
  body[data-page="trainer-attendance"] .attendance-session-row-stats .attendance-rsvp-bar {
    width: 100%;
  }
  body[data-page="trainer-attendance"] .attendance-session-row-stats .attendance-rsvp-chip-row {
    justify-content: flex-start;
  }
  body[data-page="trainer-attendance"] .attendance-session-row-actions {
    grid-area: actions;
    align-self: start;
    justify-self: stretch;
    flex-direction: column;
    min-width: 0;
    width: 100%;
  }
  body[data-page="trainer-attendance"] .attendance-session-details-btn,
  body[data-page="trainer-attendance"] .attendance-session-edit-btn,
  body[data-page="trainer-attendance"] .attendance-session-carpool-btn {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  body[data-page="trainer-attendance"] .attendance-teilnahme-detail-backdrop {
    display: none !important;
  }
  /* Detail-Panel Desktop: volle H?he, Seite scrollt ? kein verschachtelter Frame */
  body[data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap {
    display: block;
    max-height: none;
    overflow: visible;
    border-width: 1px;
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 2px 10px rgba(14, 26, 43, 0.06);
    padding-bottom: 1rem;
  }
  body[data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap .attendance-detail-sticky-head {
    position: static;
    top: auto;
    z-index: auto;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(31, 61, 99, 0.1);
  }
  body[data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap .attendance-detail-scroll-body {
    overflow: visible;
    max-height: none;
    min-height: 0;
  }
  body[data-page="trainer-attendance"] #attendanceDetailWrap .attendance-detail-sticky-foot {
    position: static;
    bottom: auto;
    z-index: auto;
    margin: 1rem 0 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid rgba(31, 61, 99, 0.12);
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-open #attendanceDetailWrap,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-open .attendance-session-row--active {
    z-index: auto;
  }
  body[data-page="trainer-attendance"] #attendanceDetailWrap .attendance-detail-sticky-foot .attendance-detail-toolbar,
  body[data-page="trainer-attendance"] #attendanceDetailWrap .attendance-detail-sticky-foot > .actions {
    margin: 0 !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  body[data-theme="dark"][data-page="trainer-attendance"] #attendanceDetailWrap .attendance-detail-sticky-foot {
    background: transparent;
    border-top-color: rgba(148, 163, 184, 0.2);
  }
  body[data-page="trainer-attendance"] .attendance-detail-primary .attendance-rsvp-summary {
    width: 100%;
    box-sizing: border-box;
  }
  body[data-page="trainer-attendance"] .attendance-detail-primary .attendance-rsvp-summary .attendance-rsvp-bar {
    max-width: none;
    width: 100%;
  }
}
body[data-theme="dark"][data-page="trainer-attendance"] #attendanceSessionList > #attendanceDetailWrap .attendance-detail-sticky-head {
  background: var(--color-card, #121a2a);
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

body[data-page="trainer-attendance"] .attendance-session-row-actions {
  flex-direction: row;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
}
body[data-page="trainer-attendance"] .attendance-session-details-btn,
body[data-page="trainer-attendance"] .attendance-session-edit-btn,
body[data-page="trainer-attendance"] .attendance-session-carpool-btn {
  width: auto;
  min-height: 36px;
  flex: 1 1 auto;
  min-width: 6.5rem;
}
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-zusagen,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-kader-names,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-quitt-offen,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-declined,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-pending,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-trainer-zusagen,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-trainer-declined {
  display: none !important;
}

/* Mobil: Abmelden in Sidebar ? Topbar-Button ausblenden */
@media (max-width: 720px) {
  #logoutButton.topbar-logout-btn {
    display: none !important;
  }
}
@media (min-width: 721px) {
  .sidebar-nav-footer {
    display: none;
  }
}
.sidebar-nav-footer {
  margin-top: auto;
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(31, 61, 99, 0.12);
  flex-shrink: 0;
}
.sidebar .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.sidebar-nav-footer .nav-item-logout {
  width: 100%;
  justify-content: flex-start;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}
body[data-theme="dark"] .sidebar-nav-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html.sf-body-scroll-lock,
body.sf-body-scroll-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 720px) {
  /* Mobile: Termindetail als eigene Seite (opak, kein Bottom-Sheet/Backdrop) */
  body.sf-attendance-trainer-detail-page .attendance-teilnahme-toolbar,
  body.sf-attendance-trainer-detail-page .attendance-teilnahme-head,
  body.sf-attendance-trainer-detail-page .attendance-teilnahme-sessions-bar,
  body.sf-attendance-trainer-detail-page .attendance-teilnahme-kind-filter,
  body.sf-attendance-trainer-detail-page [data-sf-trainer-session-tools-footer],
  body.sf-attendance-trainer-detail-page #attendanceSessionList,
  body.sf-attendance-trainer-detail-page #attendanceStatsWrap {
    display: none !important;
  }
  body.sf-attendance-trainer-detail-page .attendance-teilnahme-detail-backdrop {
    display: none !important;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page #attendanceDetailWrap,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap.attendance-detail-wrap--fullpage {
    position: relative !important;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    max-height: none !important;
    min-height: calc(100dvh - 7.5rem);
    margin: 0;
    border-radius: 12px;
    overflow: visible;
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--color-card, #fff) !important;
    opacity: 1 !important;
    isolation: isolate;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
    pointer-events: auto;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    max-height: none;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0.75rem 0 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.55rem 0.65rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(31, 61, 99, 0.12);
    background: var(--color-card, #fff);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot .attendance-detail-toolbar,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot > .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot .cta {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.78rem;
    padding: 7px 8px;
    min-height: 34px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot
    #attendanceDetailTermEditBtn,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot
    #attendanceCancelTrainingBtn,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot
    #attendanceReactivateTrainingBtn,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-foot
    #attendanceDeleteSessionBtn {
    grid-column: 1 / -1;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-collapsible--action
    > .attendance-detail-action-summary {
    font-size: 0.82rem;
    padding: 0.32rem 0.45rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-primary,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-head {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .app-confirm-modal .sf-modal-textarea,
  .app-confirm-modal .textarea,
  .app-confirm-modal .input {
    font-size: 16px;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-primary {
    overflow: visible;
    flex: none;
    min-height: 0;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-page
    #attendanceDetailWrap
    .attendance-detail-sticky-head {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--color-card, #fff);
    border-bottom: 1px solid rgba(31, 61, 99, 0.12);
    padding-bottom: 0.35rem;
  }
}
body[data-theme="dark"][data-page="trainer-attendance"].sf-attendance-trainer-detail-page
  #attendanceDetailWrap
  .attendance-detail-sticky-foot {
  background: var(--color-card, #121a2a);
  border-top-color: rgba(148, 163, 184, 0.2);
}
body[data-theme="dark"][data-page="trainer-attendance"].sf-attendance-trainer-detail-page
  #attendanceDetailWrap
  .attendance-detail-sticky-head {
  background: var(--color-card, #121a2a);
}
.attendance-detail-scroll-body {
  min-height: 0;
}

.attendance-rsvp-group-more {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  box-sizing: border-box;
}
.attendance-rsvp-row-menu {
  flex: 0 0 auto;
  position: relative;
}
.attendance-rsvp-row-menu > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.18);
  background: rgba(31, 61, 99, 0.05);
  user-select: none;
}
.attendance-rsvp-row-menu > summary::-webkit-details-marker {
  display: none;
}
.attendance-rsvp-row-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: var(--color-card, #fff);
  box-shadow: 0 4px 14px rgba(14, 26, 43, 0.12);
}
.attendance-rsvp-row-menu-inner .cta {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
body[data-page="trainer-attendance"] .attendance-rsvp-list--compact .list-item {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
body[data-page="trainer-attendance"] .attendance-rsvp-actions {
  flex: 0 0 auto;
  align-items: flex-start;
}
body[data-page="trainer-attendance"] .attendance-rsvp-present-btn {
  font-size: 0.82rem;
  padding: 6px 10px;
  white-space: nowrap;
}
body[data-page="trainer-attendance"] .attendance-rsvp-actions .attendance-rsvp-present-btn.cta.ghost {
  border-width: 1px;
}

/* Trainer-Zu-/Absage: auf schmalen Screens untereinander, nicht am Rand abgeschnitten */
@media (max-width: 720px) {
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    overflow: visible;
  }
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row-main,
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row .attendance-rsvp-actions {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row .attendance-rsvp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: none;
    justify-content: stretch;
    align-items: stretch;
  }
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row .attendance-rsvp-actions .cta {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  body[data-page="trainer-attendance"] #attendanceTrainerRsvpList .attendance-trainer-rsvp-row .attendance-rsvp-actions .cta:nth-child(3):last-child {
    grid-column: 1 / -1;
  }
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-open
    #attendanceDetailWrap
    .attendance-trainer-rsvp-details,
  body[data-page="trainer-attendance"].sf-attendance-trainer-detail-open
    #attendanceDetailWrap
    #attendanceTrainerRsvpList {
    overflow: visible;
    max-width: 100%;
  }
}

/* Mobil: nur Trainer-Zeilen k?rzen ? Zusagen/Kader vollst?ndig (Spiel/Turnier) */
@media (max-width: 720px) {
  body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-trainer-zusagen,
  body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-trainer-declined {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
  }
}
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-zusagen,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-kader-names,
body[data-page="trainer-attendance"] .attendance-session-row-stats .meta.attendance-rsvp-counts--session-quitt-offen {
  max-width: min(92vw, 320px);
}
.attendance-parent-thread-details {
  margin: 0 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: rgba(31, 61, 99, 0.03);
}
.attendance-parent-thread-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 10px;
  list-style: none;
  line-height: 1.35;
}
.attendance-parent-thread-summary::-webkit-details-marker {
  display: none;
}
.attendance-parent-thread-inner {
  padding: 0 10px 10px;
}
.attendance-parent-thread-inner .attendance-message-thread {
  margin-top: 4px;
}
.attendance-rsvp-counts--session-declined,
.attendance-rsvp-declined-names-detail {
  color: #991b1b;
}
.attendance-rsvp-counts--session-pending {
  color: #64748b;
}

body[data-theme="dark"] .attendance-rsvp-declined-names-detail {
  color: #fca5a5;
}
.attendance-detail-collapsible {
  margin: 0.5rem 0 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: rgba(31, 61, 99, 0.02);
}
.attendance-detail-collapsible-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 12px;
  list-style: none;
}
.attendance-detail-collapsible-summary::-webkit-details-marker {
  display: none;
}
.attendance-detail-collapsible > *:not(summary) {
  padding: 0 12px 12px;
}

/* Trainer-Detail: aufklappbare Aktionen wie Info-Chips erkennbar */
.attendance-detail-collapsible--action {
  border: none;
  background: transparent;
  margin: 0.45rem 0;
}
.attendance-detail-collapsible--action > .attendance-detail-action-summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(42, 77, 122, 0.35);
  background: rgba(42, 77, 122, 0.08);
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text, #1f3d63);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.attendance-detail-collapsible--action > .attendance-detail-action-summary::after {
  content: "\25BE";
  margin-left: auto;
  font-weight: 700;
  opacity: 0.55;
  flex-shrink: 0;
}
.attendance-detail-collapsible--action[open] > .attendance-detail-action-summary::after {
  content: "\25B4";
}
.attendance-detail-collapsible--action[open] > .attendance-detail-action-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}
.attendance-detail-collapsible--action[open] > *:not(summary) {
  padding: 0.55rem 0.65rem 0.75rem;
  border: 1px solid rgba(42, 77, 122, 0.22);
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: rgba(42, 77, 122, 0.04);
}
.attendance-detail-collapsible--broadcast > .attendance-detail-action-summary {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}
.attendance-detail-collapsible--dialog > .attendance-detail-action-summary {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.1);
  color: #7e22ce;
}
.attendance-detail-collapsible--dialog.attendance-detail-collapsible--needs-reply > .attendance-detail-action-summary {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
.attendance-detail-collapsible--files > .attendance-detail-action-summary {
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}
.attendance-detail-files .attendance-parent-files-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(100, 116, 139, 0.35);
}
.attendance-parent-files-empty {
  margin: 0.15rem 0 0.35rem;
  line-height: 1.45;
}
.attendance-detail-collapsible--options > .attendance-detail-action-summary {
  border-color: rgba(42, 77, 122, 0.4);
  background: rgba(42, 77, 122, 0.1);
}
body[data-theme="dark"] .attendance-detail-collapsible--action > .attendance-detail-action-summary {
  color: #e2e8f0;
}
body[data-theme="dark"] .attendance-detail-collapsible--broadcast > .attendance-detail-action-summary {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.16);
}
body[data-theme="dark"] .attendance-detail-collapsible--dialog > .attendance-detail-action-summary {
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(168, 85, 247, 0.16);
}
body[data-theme="dark"] .attendance-detail-collapsible--dialog.attendance-detail-collapsible--needs-reply > .attendance-detail-action-summary {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(245, 158, 11, 0.18);
}
body[data-theme="dark"] .attendance-detail-collapsible--files > .attendance-detail-action-summary {
  color: #cbd5e1;
}
body[data-theme="dark"] .attendance-detail-collapsible--action[open] > *:not(summary) {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.35);
}
.attendance-rsvp-list--compact .attendance-rsvp-actions .cta.ghost {
  padding: 0.2rem 0.45rem;
  min-width: 2rem;
}

#attendanceDetailCompactToggle.is-active {
  border-color: var(--accent, #2a4d7a);
  background: rgba(42, 77, 122, 0.12);
}

body[data-theme="dark"] .attendance-rsvp-bar-seg--confirmed {
  background: #66bb6a;
}

body[data-theme="dark"] .attendance-rsvp-bar-seg--declined {
  background: #ef5350;
}

body[data-theme="dark"] .attendance-rsvp-bar-seg--pending {
  background: #90a4ae;
}

body[data-theme="dark"] .attendance-rsvp-pill.attendance-rsvp-row--confirmed {
  color: #c8e6c9;
}

body[data-theme="dark"] .attendance-rsvp-pill.attendance-rsvp-row--declined {
  color: #ffcdd2;
}

body[data-theme="dark"] .attendance-rsvp-pill.attendance-rsvp-row--pending {
  color: #cfd8dc;
}

body[data-theme="dark"] .attendance-rsvp-counts {
  color: #cbd5e1;
}

body[data-theme="dark"] .attendance-rsvp-counts--detail-summary {
  color: #e2e8f0;
}

body[data-theme="dark"] .attendance-rsvp-eltern-status--confirmed {
  background: rgba(102, 187, 106, 0.18);
  color: #c8e6c9;
  border-color: rgba(102, 187, 106, 0.45);
}

body[data-theme="dark"] .attendance-rsvp-eltern-status--declined {
  background: rgba(239, 83, 80, 0.18);
  color: #ffcdd2;
  border-color: rgba(239, 83, 80, 0.45);
}

body[data-theme="dark"] .attendance-rsvp-eltern-status--pending {
  background: rgba(144, 164, 174, 0.2);
  color: #eceff1;
  border-color: rgba(144, 164, 174, 0.4);
}

/* Admin ? System: Deploy-Status (mobil: Label ?ber Wert; ab ~520px: feste Label-Spalte) */
.deploy-status-mount {
  min-width: 0;
  max-width: 100%;
}

.deploy-update-status {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-border);
}

.deploy-update-status--ok {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.08);
}

.deploy-update-status--available {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
}

.deploy-update-status--warn {
  border-color: rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.08);
}

.deploy-update-status__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.deploy-update-status__subtitle {
  font-size: 0.86rem;
  margin-top: 0.2rem;
  line-height: 1.4;
}

.deploy-update-status__actions {
  margin-top: 0.45rem;
}

details.deploy-status-technical summary {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.deploy-status-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.deploy-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.12rem 0;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  min-width: 0;
}

.deploy-status-row:last-of-type {
  border-bottom: none;
}

.deploy-status-label {
  font-weight: 600;
  font-size: 0.82rem;
}

.deploy-status-value {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (min-width: 520px) {
  .deploy-status-row {
    grid-template-columns: minmax(7.5rem, 12rem) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: baseline;
  }

  .deploy-status-label {
    font-size: 0.88rem;
  }
}

details.deploy-status-last summary.deploy-status-last-summary {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.deploy-progress-wrap {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-elevated, rgba(0, 0, 0, 0.03));
}

.deploy-progress-wrap.is-hidden {
  display: none;
}

.deploy-progress-label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.deploy-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.deploy-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary, #1565c0), var(--color-primary-light, #42a5f5));
  transition: width 0.45s ease;
}

.deploy-progress-bar.deploy-progress-bar--indeterminate {
  width: 42% !important;
  animation: sf-deploy-progress-indeterminate 1.35s ease-in-out infinite;
}

@keyframes sf-deploy-progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

.deploy-progress-steps {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
}

body[data-theme="dark"] .deploy-progress-wrap {
  background: rgba(255, 255, 255, 0.04);
}

.sf-app-update-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface-elevated, #1e293b);
  color: var(--color-text, #f8fafc);
  border-top: 1px solid var(--color-border, rgba(148, 163, 184, 0.45));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.sf-app-update-banner__text {
  font-size: 0.88rem;
  line-height: 1.35;
  text-align: center;
  max-width: 36rem;
}

body.auth-pending .sf-app-update-banner {
  display: none;
}

#sfLoginNoticeOk[hidden] {
  display: none;
}

.sf-login-notice-panel {
  width: min(440px, calc(100% - 32px));
}

.sf-login-notice-body {
  margin: 0 0 0.85rem;
  white-space: pre-wrap;
  line-height: 1.45;
}

.sf-login-notice-pick {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  margin-top: 0.35rem;
}

.sf-login-notice-pick label {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.22rem 0;
}

/* [hidden] allein reicht nicht: display:flex überdeckt das UA-[hidden] */
.sf-login-notice-pick label[hidden] {
  display: none !important;
}

.sf-login-notice-pick label.is-self {
  font-weight: 600;
}

.sf-login-notice-history-panel[hidden] {
  display: none !important;
}

.sf-login-notice-history-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 0.9rem 1rem;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 12px;
  background: #f7f9fc;
}

.sf-login-notice-history {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.55rem;
}

.sf-ln-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sf-ln-receipt-card {
  background: #fff;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.sf-ln-receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.sf-ln-receipt-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1b4f8a;
  margin-bottom: 0.2rem;
}

.sf-ln-receipt-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #172033;
}

.sf-ln-receipt-stat {
  flex: 0 0 auto;
  text-align: right;
  min-width: 4.5rem;
}

.sf-ln-receipt-stat-num {
  font-size: 1.25rem;
  line-height: 1.1;
  color: #172033;
}

.sf-ln-receipt-stat-num strong {
  font-size: 1.45rem;
  font-weight: 760;
  color: #1b4f8a;
}

.sf-ln-receipt-stat small {
  display: block;
  margin-top: 0.1rem;
  color: #667085;
  font-size: 0.78rem;
}

.sf-ln-receipt-progress {
  margin-top: 0.7rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.sf-ln-receipt-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b4f8a, #3b82c4);
  transition: width 0.25s ease;
}

.sf-login-notice-history-body {
  white-space: pre-wrap;
  margin: 0.65rem 0 0;
  line-height: 1.4;
}

.sf-ln-receipt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}

.sf-ln-receipt-filter-wrap {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.sf-ln-receipt-filter {
  width: 100%;
  margin: 0;
}

.sf-ln-receipt-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: #eef2f7;
}

.sf-ln-receipt-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475467;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.sf-ln-receipt-tab.is-active {
  background: #fff;
  color: #1b4f8a;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.sf-ln-receipt-people {
  margin-top: 0.55rem;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-height: 320px;
  overflow-y: auto;
}

.sf-ln-receipt-empty,
.sf-ln-receipt-no-match {
  margin: 0;
  padding: 0.75rem 0.85rem;
}

.sf-login-notice-history-row[hidden] {
  display: none !important;
}

.sf-login-notice-history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--border, #e6ebf2);
  font-size: 0.92rem;
}

.sf-login-notice-history-row:first-child {
  border-top: 0;
}

.sf-ln-receipt-person-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 10rem;
}

.sf-ln-receipt-person-name {
  font-weight: 650;
  color: #172033;
}

.sf-ln-receipt-person-detail {
  font-size: 0.82rem;
}

.sf-ln-receipt-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
}

.sf-ln-receipt-pill.is-open {
  background: #fff4e5;
  color: #9a5b00;
}

.sf-ln-receipt-pill.is-read {
  background: #e8f6ee;
  color: #17663a;
}

.sf-ln-receipt-earlier {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sf-ln-receipt-earlier-heading {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #667085;
}

.sf-login-notice-history-block {
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 10px;
  overflow: hidden;
}

.sf-login-notice-history-block summary {
  cursor: pointer;
  list-style: none;
}

.sf-login-notice-history-block summary::-webkit-details-marker {
  display: none;
}

.sf-ln-receipt-earlier-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
}

.sf-ln-receipt-earlier-summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(-45deg);
  margin-right: 0.1rem;
  transition: transform 0.15s ease;
}

.sf-login-notice-history-block[open] .sf-ln-receipt-earlier-summary::before {
  transform: rotate(45deg);
}

.sf-ln-receipt-earlier-label {
  color: #172033;
}

.sf-ln-receipt-earlier-badge {
  font-size: 0.78rem;
  font-weight: 650;
  color: #1b4f8a;
  background: #eef4fb;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.sf-ln-receipt-earlier-title {
  flex: 1 1 8rem;
  min-width: 0;
  color: #475467;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sf-login-notice-history-block .sf-ln-receipt-toolbar,
.sf-login-notice-history-block .sf-login-notice-history-body,
.sf-login-notice-history-block > .meta {
  margin-left: 0.85rem;
  margin-right: 0.85rem;
}

.sf-login-notice-history-block .sf-ln-receipt-people {
  margin: 0.55rem 0.85rem 0.85rem;
}

body[data-theme="dark"] .sf-login-notice-history-panel,
body[data-theme="dark"] .sf-ln-receipt-card,
body[data-theme="dark"] .sf-login-notice-history-block,
body[data-theme="dark"] .sf-ln-receipt-people {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .sf-ln-receipt-title,
body[data-theme="dark"] .sf-ln-receipt-person-name,
body[data-theme="dark"] .sf-ln-receipt-earlier-label,
body[data-theme="dark"] .sf-ln-receipt-stat-num {
  color: #e5eef8;
}

body[data-theme="dark"] .sf-ln-receipt-tabs {
  background: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .sf-ln-receipt-tab.is-active {
  background: rgba(30, 41, 59, 0.95);
  color: #93c5fd;
}

body[data-theme="dark"] .sf-ln-receipt-progress {
  background: rgba(148, 163, 184, 0.2);
}

.sf-whats-new-panel {
  width: min(420px, calc(100% - 32px));
  max-height: min(90dvh, 520px);
}

.sf-whats-new-list {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  line-height: 1.45;
  font-size: 0.95rem;
}

.sf-whats-new-list li + li {
  margin-top: 0.45rem;
}

.sf-nav-update-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: var(--radius-pill, 999px);
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.sf-nav-update-badge.is-hidden {
  display: none;
}

.sf-deploy-update-banner-mount {
  margin-bottom: 0.85rem;
}

.sf-deploy-update-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
}

.sf-deploy-update-banner__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1 1 14rem;
}

.sf-deploy-update-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sf-deploy-update-banner__list,
.deploy-update-status__list {
  margin: 0.55rem 0 0;
  padding: 0 0 0 1.15rem;
  width: 100%;
  flex: 1 1 100%;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--color-text, #0f1a2e);
}

.sf-deploy-update-banner__list li,
.deploy-update-status__list li {
  margin: 0.2rem 0;
}

.sf-deploy-update-banner {
  flex-wrap: wrap;
}

.deploy-update-status__list {
  margin-top: 0.65rem;
  color: inherit;
}

/* Öffentliche Eltern-An-/Abmeldung & Einladungsformular: keine Sidebar (keine Admin-/Aufgaben-Kacheln) */
body[data-page="public-attendance-rsvp"] .sidebar,
body[data-page="public-attendance-light"] .sidebar,
body[data-page="invite"] .sidebar {
  display: none !important;
}

body[data-page="public-attendance-rsvp"] .menu-button,
body[data-page="public-attendance-light"] .menu-button,
body[data-page="invite"] .menu-button {
  display: none !important;
}

/* Kind-Link + Fundgrube: Hamburger-Menü (Gast-Sidebar) */
body[data-page="public-attendance-light-player"] .sidebar,
body[data-page="public-lost-found"] .sidebar {
  display: flex !important;
}
body[data-page="public-attendance-light-player"] .menu-button,
body[data-page="public-lost-found"] .menu-button {
  display: inline-flex !important;
}

body[data-page="public-attendance-rsvp"] .app-shell,
body[data-page="public-attendance-light"] .app-shell,
body[data-page="invite"] .app-shell {
  grid-template-columns: 1fr;
  max-width: 100%;
  min-width: 0;
}

/* ?ffentliche R?ckmeldung (Light): Team-Link ? Aktualisieren zuerst, volle Button-Breite auf schmal */
body[data-page="public-attendance-light"] [data-sf-light-session-tools] {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  align-items: stretch;
  margin: 0 0 0.75rem 0;
  box-sizing: border-box;
}
body[data-page="public-attendance-light"] [data-sf-light-session-tools] .outline,
body[data-page="public-attendance-light"] [data-sf-light-session-tools] .cta.ghost {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

/* Trainer Teilnahme/Terminverwaltung: ?Weitere laden? unter der Terminliste */
body[data-page="trainer-attendance"] [data-sf-trainer-session-tools-footer],
body[data-page="trainer-term-management"] [data-sf-trainer-session-tools-footer] {
  display: none; /* per JS flex, wenn sichtbar */
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  align-items: stretch;
  box-sizing: border-box;
}
body[data-page="trainer-attendance"] [data-sf-trainer-session-tools-footer] .cta.ghost,
body[data-page="trainer-term-management"] [data-sf-trainer-session-tools-footer] .cta.ghost {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

/* Kind-Link: Aktualisieren bleibt oben; ?Mehr laden? + Kalender unten unter der Liste */
body[data-page="public-attendance-light-player"] [data-sf-light-session-tools] {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  align-items: center;
  margin: 0 0 0.5rem 0;
  box-sizing: border-box;
}
body[data-page="public-attendance-light-player"] [data-sf-light-session-tools-footer] {
  display: none; /* per JS flex, wenn sichtbar */
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  align-items: stretch;
  box-sizing: border-box;
}
body[data-page="public-attendance-light-player"] [data-sf-light-session-tools-footer] .cta.ghost {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

body[data-page="public-attendance-rsvp"] .content,
body[data-page="public-attendance-light"] .content,
body[data-page="public-attendance-light-player"] .content,
body[data-page="invite"] .content {
  max-width: 48rem;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

/* Eltern-Light Variante B: schlanke Topbar (nur Icons), kein roter Teilnahme-Bereich */
body[data-page="public-attendance-light"] .topbar-left .pill,
body[data-page="public-attendance-light-player"] .topbar-left .pill,
body[data-page="public-attendance-light"] .topbar-left .page-title,
body[data-page="public-attendance-light-player"] .topbar-left .page-title {
  display: none !important;
}
body[data-page="public-attendance-light"] .topbar-left,
body[data-page="public-attendance-light-player"] .topbar-left {
  min-width: 0;
  flex: 0 0 auto;
}

/* Teilnahme-Portale: kein Vereins-Login-Icon (Trainer-Zugang = App-Profil). */
body.sf-guest-shell[data-page^="public-attendance"] #loginButton,
body.sf-guest-shell[data-page="public-lost-found"] #loginButton,
body.sf-guest-shell[data-page="public-parent-access-request"] #loginButton,
body.sf-guest-shell[data-page="public-parent-access-confirm"] #loginButton,
body.sf-guest-shell[data-page="public-event-registration"] #loginButton {
  display: none !important;
}

/* R?ckmeldung: Topbar kompakt ? Sprache/Hilfe/Darkmode als Icon-Leiste */
body.sf-guest-shell[data-page^="public-attendance"] .topbar {
  padding: 0.35rem 0.55rem;
  min-height: 0;
  gap: 0.35rem;
  align-items: center;
}
body.sf-guest-shell[data-page^="public-attendance"] .topbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
body.sf-guest-shell[data-page^="public-attendance"] .sf-lang-switcher-host {
  max-width: none;
}
body.sf-guest-shell[data-page^="public-attendance"] .sf-lang-globe-btn {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  padding: 0;
}
body.sf-guest-shell[data-page^="public-attendance"] .topbar-actions .icon-button {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  padding: 0;
}
body.sf-guest-shell[data-page^="public-attendance"] #loginButton.tab {
  font-size: 0;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 26, 46, 0.08);
  border: 1px solid rgba(15, 26, 46, 0.14);
  color: #0f1a2e;
  text-decoration: none;
}
body.sf-guest-shell[data-page^="public-attendance"] #loginButton.tab::before {
  content: "\1F464";
  font-size: 0.95rem;
  line-height: 1;
}
body.sf-guest-shell[data-page^="public-attendance"] #loginButton.tab[title]::after {
  /* title bleibt f?r Accessibility */
  content: none;
}
@media (max-width: 480px) {
  body.sf-guest-shell[data-page^="public-attendance"] .sf-lang-label {
    display: none;
  }
}

/* Seiten-Look-Presets: assets/brands/portal-attendance-themes.css (nach Brand-CSS geladen) */
body[data-page="public-attendance-light"] .card-header .pill,
body[data-page="public-attendance-light-player"] .card-header .pill {
  display: none;
}
body[data-page="public-attendance-light"] .card-header h3,
body[data-page="public-attendance-light-player"] .card-header h3 {
  font-size: 1.15rem;
  margin: 0;
}
.public-light-device-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(31, 61, 99, 0.12);
}
.public-light-device-footer .cta.ghost {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
.public-light-comment-details {
  margin: 6px 0 4px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: rgba(31, 61, 99, 0.03);
}
.public-light-comment-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  list-style: none;
  color: var(--color-text, #0e1a2b);
}
.public-light-comment-summary::-webkit-details-marker {
  display: none;
}
.public-light-comment-inner {
  padding: 0 10px 10px;
}
.public-light-comment-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
}
.public-light-comment-save {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
body[data-page="public-attendance-light"] .attendance-session-trainer-messages,
body[data-page="public-attendance-light-player"] .attendance-session-trainer-messages,
body[data-page="public-attendance-light"] .attendance-session-trainer-reply-messages,
body[data-page="public-attendance-light-player"] .attendance-session-trainer-reply-messages {
  padding: 6px 8px !important;
  margin-top: 6px !important;
}
body[data-page="public-attendance-light"] .attendance-session-trainer-messages > div > div:last-child:not(.meta),
body[data-page="public-attendance-light-player"] .attendance-session-trainer-messages > div > div:last-child:not(.meta),
body[data-page="public-attendance-light"] .attendance-session-trainer-reply-messages > div > div:last-child:not(.meta),
body[data-page="public-attendance-light-player"] .attendance-session-trainer-reply-messages > div > div:last-child:not(.meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-theme="dark"] .public-light-device-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .public-light-comment-details {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

/* Live-View: Vollbild ohne Sidebar, volle Breite */
body[data-page="public-tournament-live"] .sidebar,
body[data-page="public-tournament-live"] .topbar {
  display: none !important;
}

body[data-page="public-tournament-live"] .app-shell {
  grid-template-columns: 1fr;
  padding: 0;
  gap: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body[data-page="public-tournament-live"] .content {
  padding: 0;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body[data-page="public-tournament-live"] .page {
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow-x: hidden;
}

/* Live-View: auf iPhone kein horizontales Scrollen der Seite, Fokus bleibt im Viewport */
html.live-view-page {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  touch-action: manipulation; /* verhindert Doppel-Tap-Zoom auf iOS */
}
html.live-view-page body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}
body[data-page="public-tournament-live"] {
  overflow-x: hidden;
  max-width: 100%;
}

/* Live-View (?ffentlich) */
.live-view {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #f1f5f9;
  box-sizing: border-box;
  overflow-x: hidden;
}

.live-view-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.live-view-banner-top,
.live-view-banner-bottom {
  width: 100%;
  max-height: 120px;
  overflow: hidden;
  flex-shrink: 0;
}

.live-view-banner-top img,
.live-view-banner-bottom img {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: cover;
  display: block;
}

.live-view-banner-top.is-ticker,
.live-view-banner-bottom.is-ticker {
  max-height: none;
}

.live-view-ticker {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.live-view-ticker-logo {
  height: 28px;
  width: auto;
  max-width: 64px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.live-view-ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.live-view-ticker-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: liveViewMarquee var(--live-view-marquee-duration, 22s) linear infinite;
  will-change: transform;
}

.live-view-ticker-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  padding-right: 64px;
  color: #f1f5f9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

@keyframes liveViewMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-view-ticker-track {
    animation: none;
    transform: none;
  }

  .live-view-ticker-item[aria-hidden="true"] {
    display: none;
  }
}

.live-view-header {
  padding: 24px 20px;
  text-align: center;
  flex-shrink: 0;
}

.live-view-logo img {
  max-height: 80px;
  width: auto;
  max-width: 100%;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.live-view-logo--right {
  display: flex;
  justify-content: flex-end;
}

.live-view-logo--left {
  display: flex;
  justify-content: flex-start;
}

.live-view-header-row .live-view-logo img {
  margin-bottom: 0;
  max-height: 64px;
}

.live-view-title {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.sf-tournament-heading-name {
  display: block;
}

.sf-tournament-heading-youth {
  display: block;
  font-size: 0.62em;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-top: 0.12em;
  opacity: 0.88;
}

#tournamentTitle.sf-tournament-heading,
#publicTournamentTitle.sf-tournament-heading,
#groupsTitle.sf-tournament-heading,
#pdfTitle.sf-tournament-heading {
  line-height: 1.15;
}

.live-view-title .sf-tournament-heading-youth {
  font-size: 0.48em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tournament-pick-name .sf-tournament-heading-youth,
.list-item strong .sf-tournament-heading-youth {
  font-size: 0.78em;
  font-weight: 700;
}

.schedule-dirty-lock {
  margin-top: 0.65rem;
  width: 100%;
  flex-basis: 100%;
  grid-column: 1 / -1;
}

.schedule-dirty-lock-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92em;
  line-height: 1.35;
  cursor: pointer;
  color: inherit;
}

.schedule-dirty-lock-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.live-view-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  max-width: 1200px;
  margin: 0 auto 10px;
}

.live-view-header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

.live-view-logo--left {
  justify-self: start;
}

.live-view-logo--right {
  justify-self: end;
}

.live-view-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.live-view-print-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.live-view-subtitle {
  margin: 0 0 12px;
  color: rgba(226, 232, 240, 0.9);
  font-weight: 600;
  font-size: 0.95rem;
}

.tournament-meta {
  margin: 0 0 12px;
  color: rgba(226, 232, 240, 0.88);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.tournament-meta-line1,
.tournament-meta-line2 {
  display: inline;
}

.tournament-meta-value {
  display: inline-block;
  padding: 0 2px 1px;
  border-bottom: 2px solid rgba(226, 232, 240, 0.55);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.live-view-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.live-view-tab {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.live-view-tab.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #fff;
}

.live-view-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}

.live-view-group-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #475569;
}

.live-view-header-teams {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.live-view-header-team-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  border-left: 4px solid #475569;
  min-width: 160px;
}

.live-view-header-team-title {
  font-weight: 700;
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.live-view-header-team-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-view-header-team-row {
  font-size: 12px;
  color: #cbd5e1;
}

@media (min-width: 900px) {
  .live-view-groups {
    gap: 12px 20px;
  }
  .live-view-group-pill {
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 17px;
  }
  .live-view-header-teams {
    gap: 24px 40px;
    margin-top: 24px;
    padding-top: 24px;
    width: 100%;
    max-width: 100%;
  }
  .live-view-header-teams .live-view-header-team-card {
    flex: 1 1 220px;
    min-width: 220px;
  }
  .live-view-header-team-card {
    padding: 16px 20px;
    border-radius: 14px;
  }
  .live-view-header-team-title {
    font-size: 15px;
    margin-bottom: 10px;
  }
  .live-view-header-team-row {
    font-size: 14px;
  }
}

@media (min-width: 1200px) {
  .live-view-groups {
    gap: 14px 24px;
  }
  .live-view-group-pill {
    padding: 12px 24px;
    font-size: 18px;
  }
  .live-view-header-teams .live-view-header-team-card {
    flex: 1 1 240px;
    min-width: 240px;
  }
  .live-view-header-team-card {
    padding: 18px 24px;
  }
  .live-view-header-team-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  .live-view-header-team-row {
    font-size: 15px;
  }
}

.live-view-header-team-row.live-view-muted {
  color: #64748b;
}

.live-view-main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 24px 40px;
  box-sizing: border-box;
}

.live-view-grid {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
}

.live-view-pane {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
  margin-bottom: 18px;
}

.live-view-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.live-view-pane-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.9);
}

.live-view-pane-subheader {
  margin-top: 16px;
  margin-bottom: 10px;
}

.live-view-pane-subtitle {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.9);
}

.live-schedule-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.live-schedule-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(148, 163, 184, 0.6);
}

.live-schedule-item.live::before {
  background: #ef4444;
}

.live-schedule-item.played::before {
  background: #22c55e;
}

.live-schedule-meta {
  font-weight: 900;
  color: rgba(147, 197, 253, 0.95);
  font-size: 13px;
  margin-bottom: 8px;
}

.live-schedule-teams {
  font-weight: 900;
  font-size: 18px;
  color: #f8fafc;
  margin-bottom: 6px;
}

.live-schedule-score {
  font-weight: 900;
  font-size: 16px;
  color: rgba(226, 232, 240, 0.9);
}

.live-scoreboard {
  background:
    radial-gradient(1200px 500px at 20% 20%, rgba(59, 130, 246, 0.35) 0%, rgba(15, 23, 42, 0) 70%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.65) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px 18px;
  overflow: hidden;
}

.live-scoreboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-scoreboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.live-scoreboard-court {
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.85);
  font-size: 12px;
}

.live-scoreboard-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.live-scoreboard-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.live-scoreboard-team {
  font-weight: 900;
  font-size: 18px;
  color: #f8fafc;
  text-align: center;
}

.live-scoreboard-score {
  font-weight: 1000;
  font-size: 32px;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.live-scoreboard-sub {
  margin-top: 10px;
  text-align: center;
  color: rgba(148, 163, 184, 0.95);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.live-upcoming-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.live-upcoming-meta {
  font-weight: 900;
  color: rgba(147, 197, 253, 0.95);
  font-size: 13px;
  margin-bottom: 8px;
}

.live-upcoming-teams {
  font-weight: 900;
  font-size: 18px;
  color: #f8fafc;
}

.live-league-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-league-row {
  display: grid;
  grid-template-columns: 56px 1fr 44px 44px 44px 56px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.95);
}

.live-league-row.head {
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 900;
  color: rgba(148, 163, 184, 0.95);
}

.live-league-row .team {
  font-weight: 900;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-league-row .pts {
  font-weight: 1000;
  color: #fff;
}

.live-view-qr-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-view-qr {
  width: 150px;
  height: 150px;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.live-view-qr img,
.live-view-qr canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.live-view-qr-title {
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px;
}

.live-view-qr-subtitle {
  color: rgba(148, 163, 184, 0.95);
  font-weight: 700;
  font-size: 13px;
}

.live-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.live-info-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
}

.live-info-meta {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 6px;
}

.live-info-value {
  font-weight: 900;
  color: #fff;
}

.live-info-desc {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 600;
  line-height: 1.4;
}

.live-view-section {
  margin-bottom: 32px;
}

.live-view-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.live-view-matches-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-match-row {
  display: grid;
  grid-template-columns: 82px 96px 80px 56px minmax(160px, 1fr) 110px;
  gap: 12px 20px;
  align-items: center;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 4px solid transparent;
}

.live-match-row:last-child {
  border-bottom: none;
}

.live-match-head {
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  min-height: 44px;
}

.live-match-head .live-match-cell {
  color: inherit;
}

.live-match-cell {
  font-size: 14px;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-match-cell.live-match-teams {
  font-weight: 700;
  color: #f8fafc;
  min-width: 0;
}

.live-match-cell.live-match-score {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #f8fafc;
  text-align: right;
}

.live-match-group-badge {
  display: inline-block;
  min-width: 1.5rem;
  text-align: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

/* Admin Ergebnisse: Hell-Modus klar & luftig; Dark-Modus = bisherige Live-View-Farben */
.results-matches-live-style {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(14, 26, 43, 0.07);
  padding: clamp(16px, 2.4vw, 28px);
  margin: 12px 0 0;
  overflow: hidden;
}

body[data-theme="dark"] .results-matches-live-style {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.results-print-root {
  display: none;
}

body[data-page="admin-tournament-results"] .results-admin-list {
  margin-top: 4px;
}

.sf-results-save-toast {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #166534;
  font-size: 0.92rem;
  font-weight: 600;
}

body[data-theme="dark"] .sf-results-save-toast {
  color: #86efac;
}

.results-live-control .sf-results-compact-header {
  margin-bottom: 0.65rem;
}

.results-live-control .sf-results-compact-header .live-view-title {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.sf-results-progress {
  font-weight: 600;
  margin-top: 0.25rem;
}

.sf-results-teams-collapse {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.sf-results-teams-collapse summary {
  cursor: pointer;
  color: var(--color-muted);
}

.sf-results-filter-tabs {
  margin: 0.75rem 0 1rem;
}

.sf-results-jetzt-section {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.06);
}

.sf-results-jetzt-title {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.sf-results-jetzt-line {
  font-size: 0.92rem;
  padding: 0.2rem 0;
}

.sf-results-matches-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sf-results-match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--color-border, #dbeafe);
  border-left: 4px solid var(--sf-results-group-accent, var(--color-border, #cbd5e1));
  background: var(--color-card, #fff);
}

.sf-results-match-row.sf-results-status--live {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.05);
}

.sf-results-match-row.sf-results-status--played {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.05);
}

.sf-results-match-meta {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.sf-results-group-badge {
  display: inline-block;
  min-width: 1.35rem;
  text-align: center;
  padding: 0 0.4rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  background: #1e40af;
}

.sf-results-match-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.sf-results-team {
  font-weight: 600;
  flex: 1 1 120px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sf-results-team--away {
  text-align: right;
}

.sf-results-score-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.sf-results-score-input {
  width: 2.6rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.sf-results-match-action {
  grid-row: 2;
  grid-column: 2;
  align-self: center;
}

.sf-results-status-btn {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-surface, #f8fafc);
  white-space: nowrap;
}

.sf-results-status-btn--planned {
  color: var(--sf-blue, #0a3d91);
  border-color: rgba(10, 61, 145, 0.25);
}

.sf-results-status-btn--live {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}

.sf-results-status-btn--played {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  cursor: pointer;
}

.live-view-standings-row.sf-results-qualified span:first-child {
  font-weight: 700;
}

.live-view-standings-row.sf-results-qualified {
  background: rgba(34, 197, 94, 0.08);
}

@media (min-width: 900px) {
  .sf-results-match-row {
    grid-template-columns: minmax(140px, 1fr) minmax(280px, 2fr) auto;
    grid-template-rows: auto;
    align-items: center;
  }
  .sf-results-match-meta {
    grid-column: 1;
  }
  .sf-results-match-main {
    grid-column: 2;
    flex-wrap: nowrap;
  }
  .sf-results-match-action {
    grid-row: 1;
    grid-column: 3;
  }
}

.results-edit-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
}

.results-edit-notice p {
  margin: 0;
}

.results-edit-notice p + p {
  margin-top: 8px;
}

.results-edit-notice a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

body[data-theme="dark"] .results-edit-notice {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.results-matches-live-style .live-view-section {
  margin-bottom: 28px;
}

.results-matches-live-style .live-view-section:last-child {
  margin-bottom: 0;
}

.results-matches-live-style .live-view-title {
  color: var(--color-primary-dark);
  text-shadow: none;
}

body[data-theme="dark"] .results-matches-live-style .live-view-title {
  color: #f8fafc;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.results-matches-live-style .tournament-meta {
  color: var(--color-muted);
}

body[data-theme="dark"] .results-matches-live-style .tournament-meta {
  color: rgba(226, 232, 240, 0.88);
}

.results-matches-live-style .live-view-muted {
  color: var(--color-muted);
}

body[data-theme="dark"] .results-matches-live-style .live-view-muted {
  color: #94a3b8;
}

.results-matches-live-style .live-view-section-title {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

body[data-theme="dark"] .results-matches-live-style .live-view-section-title {
  color: #e2e8f0;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.results-matches-live-style .live-view-header-teams {
  gap: 14px;
}

.results-matches-live-style .live-view-header-team-card {
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(14, 26, 43, 0.06);
}

body[data-theme="dark"] .results-matches-live-style .live-view-header-team-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.results-matches-live-style .live-view-header-team-title {
  color: var(--color-primary-dark);
}

body[data-theme="dark"] .results-matches-live-style .live-view-header-team-title {
  color: #f1f5f9;
}

.results-matches-live-style .live-view-header-team-row {
  color: var(--color-text);
}

body[data-theme="dark"] .results-matches-live-style .live-view-header-team-row {
  color: #e2e8f0;
}

.results-matches-live-style .live-view-header-team-row.live-view-muted {
  color: var(--color-muted);
}

body[data-theme="dark"] .results-matches-live-style .live-view-header-team-row.live-view-muted {
  color: #64748b;
}

.results-matches-live-style .live-view-standings-card {
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(14, 26, 43, 0.05);
}

body[data-theme="dark"] .results-matches-live-style .live-view-standings-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.results-matches-live-style .live-view-standings-title {
  color: var(--color-text);
}

body[data-theme="dark"] .results-matches-live-style .live-view-standings-title {
  color: #f1f5f9;
}

.results-matches-live-style .live-view-standings-head {
  color: var(--color-muted);
}

body[data-theme="dark"] .results-matches-live-style .live-view-standings-head {
  color: #94a3b8;
}

.results-matches-live-style .live-view-standings-row:not(.live-view-standings-head) {
  color: var(--color-text);
}

body[data-theme="dark"] .results-matches-live-style .live-view-standings-row:not(.live-view-standings-head) {
  color: #e2e8f0;
}

.results-matches-live-style .live-view-endrunde-table {
  max-width: 480px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

body[data-theme="dark"] .results-matches-live-style .live-view-endrunde-table {
  background: transparent;
  border: none;
  padding: 0;
}

.results-matches-live-style .live-view-matches-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

body[data-theme="dark"] .results-matches-live-style .live-view-matches-wrap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.results-matches-live-style .live-match-head {
  background: #eef2f7;
  color: #64748b;
}

body[data-theme="dark"] .results-matches-live-style .live-match-head {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.results-matches-live-style .live-match-row {
  grid-template-columns: minmax(100px, 120px) 96px 80px 56px minmax(160px, 1fr) 110px;
  border-bottom: 1px solid var(--color-border);
  padding-top: 12px;
  padding-bottom: 12px;
  min-height: 56px;
}

body[data-theme="dark"] .results-matches-live-style .live-match-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 52px;
}

.results-matches-live-style .live-match-cell {
  color: #475569;
}

body[data-theme="dark"] .results-matches-live-style .live-match-cell {
  color: #e2e8f0;
}

.results-matches-live-style .live-match-cell.live-match-teams {
  color: #0f172a;
  font-weight: 700;
}

body[data-theme="dark"] .results-matches-live-style .live-match-cell.live-match-teams {
  color: #f8fafc;
}

.results-matches-live-style .live-match-cell.live-match-score {
  color: #0f172a;
}

body[data-theme="dark"] .results-matches-live-style .live-match-cell.live-match-score {
  color: #f8fafc;
}

.results-matches-live-style .live-match-status-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.results-matches-live-style .live-match-status-cell .live-match-status-cb {
  width: 18px;
  height: 18px;
  accent-color: #64748b;
  cursor: pointer;
}

body[data-theme="dark"] .results-matches-live-style .live-match-status-cell .live-match-status-cb {
  accent-color: #475569;
}

.results-matches-live-style .live-match-status-label {
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

body[data-theme="dark"] .results-matches-live-style .live-match-status-label {
  color: #cbd5e1;
}

.results-matches-live-style .live-match-status-cell .live-match-status-cb-beendet {
  accent-color: #22c55e;
}

.results-matches-live-style .live-match-status-cell .live-match-status-cb-live {
  accent-color: #eab308;
}

.results-matches-live-style .live-match-time-input,
.results-matches-live-style .live-match-field-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  box-sizing: border-box;
}

body[data-theme="dark"] .results-matches-live-style .live-match-time-input,
body[data-theme="dark"] .results-matches-live-style .live-match-field-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.results-matches-live-style .live-match-time-input {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.results-matches-live-style .live-match-field-input {
  min-width: 0;
}

.results-matches-live-style .live-match-score-editor {
  display: flex;
  align-items: center;
  gap: 4px 8px;
  justify-content: flex-end;
  min-width: 0;
}

.results-matches-live-style .results-score-input {
  width: 48px;
  min-width: 48px;
  text-align: center;
  padding: 8px 4px;
  font-size: 1rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  box-sizing: border-box;
}

body[data-theme="dark"] .results-matches-live-style .results-score-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.results-matches-live-style .results-score-sep {
  color: #64748b;
  font-weight: 700;
}

body[data-theme="dark"] .results-matches-live-style .results-score-sep {
  color: #94a3b8;
}

.results-matches-live-style .live-view-header,
.results-matches-live-style .live-view-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.results-matches-live-style .live-match-row:not(.live-match-head):nth-child(even) {
  background: rgba(248, 250, 252, 0.85);
}

body[data-theme="dark"] .results-matches-live-style .live-match-row:not(.live-match-head):nth-child(even) {
  background: transparent;
}

.results-matches-live-style .live-match-row:not(.live-match-head):hover {
  background: #f1f5f9;
}

body[data-theme="dark"] .results-matches-live-style .live-match-row:not(.live-match-head):hover {
  background: rgba(255, 255, 255, 0.04);
}

.live-view-muted {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

.live-view-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.live-view-standings-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid #475569;
}

.live-view-standings-title {
  font-weight: 700;
  font-size: 1rem;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.live-view-standings-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-view-standings-row {
  display: grid;
  grid-template-columns: 1fr 32px 28px 28px 28px 40px 32px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.live-view-standings-row span:first-child {
  min-width: 0;
}

.live-view-standings-head {
  font-weight: 700;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.live-view-standings-row:not(.live-view-standings-head) {
  color: #e2e8f0;
}

.live-view-endrunde-table {
  max-width: 400px;
}

.live-view-endrunde-table .live-view-standings-row {
  grid-template-columns: 48px 1fr;
}

.live-match-row .live-match-status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.live-match-status--planned .live-match-status-badge {
  background: rgba(100, 116, 139, 0.5);
  color: #94a3b8;
}

.live-match-status--live .live-match-status-badge {
  background: rgba(234, 179, 8, 0.4);
  color: #fef08a;
  animation: live-pulse 1.5s ease-in-out infinite;
}

.live-match-status--played .live-match-status-badge {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.live-match-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.live-view-popup-overlay[hidden] {
  display: none !important;
}

.live-view-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.live-view-popup-panel {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-view-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  z-index: 2;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.live-view-popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.live-view-popup-content {
  text-align: center;
}

.live-view-popup-content .live-view-popup-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 16px;
}

.live-view-popup-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #f8fafc;
}

.live-view-popup-body {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .live-view-main {
    padding: 0 40px 48px;
  }
  .live-view-standings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 100%;
  }
  .live-view-standings-grid .live-view-standings-card {
    flex: 1 1 220px;
    min-width: 220px;
  }
  .live-view-header-teams {
    gap: 20px 32px;
  }
}

@media (min-width: 1200px) {
  .live-view-main {
    padding: 0 48px 56px;
  }
  .live-match-row {
    grid-template-columns: 82px 96px 80px 56px minmax(180px, 1fr) 110px;
    padding: 12px 20px;
    min-height: 56px;
  }
  .live-view-standings-grid {
    gap: 24px;
  }
  .live-view-standings-grid .live-view-standings-card {
    flex: 1 1 240px;
    min-width: 240px;
  }
}

@media (max-width: 640px) {
  .live-view-main {
    padding: 0 12px 24px;
    min-width: 0;
    overflow-x: hidden;
  }
  .live-view-content {
    min-width: 0;
    overflow-x: hidden;
  }
  .live-view-header {
    min-width: 0;
    overflow-x: hidden;
  }
  .live-view-header-teams {
    min-width: 0;
    overflow-x: hidden;
  }
  .live-view-matches-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .live-view-matches-wrap > .live-match-row {
    min-width: 320px;
  }
  .live-view-section {
    min-width: 0;
    overflow-x: hidden;
  }
  .live-view-standings-grid {
    min-width: 0;
    overflow-x: hidden;
  }
  .live-match-row {
    grid-template-columns: 56px 72px 56px 40px minmax(80px, 1fr) 72px;
    gap: 6px 8px;
    padding: 8px 10px;
    min-height: 48px;
    font-size: 13px;
  }
  .live-match-head {
    font-size: 10px;
    min-height: 40px;
    padding: 8px 10px;
  }
  .live-match-cell.live-match-score {
    font-size: 1rem;
  }
  .live-view-standings-row {
    grid-template-columns: 1fr 28px 24px 24px 24px 36px 28px;
    font-size: 12px;
  }
  .live-view-header {
    padding: 16px 12px;
  }
  .live-view-title {
    font-size: 1.35rem;
  }
  .results-matches-live-style {
    padding: 12px;
  }
  /* Mobile: Status-Spalte ausblenden, nur farblich anzeigen (Live/Beendet) */
  .results-matches-live-style .live-match-status-cell,
  .results-matches-live-style .live-match-head .live-match-cell:first-child {
    display: none;
  }
  .results-matches-live-style .live-match-row {
    grid-template-columns: 72px 56px 40px minmax(80px, 1fr) 72px;
  }
  .results-matches-live-style .live-match-row.live-match-status--live {
    background: rgba(234, 179, 8, 0.12);
    border-left-color: #eab308;
    border-left-width: 4px;
  }
  .results-matches-live-style .live-match-row.live-match-status--played {
    border-left-color: rgba(34, 197, 94, 0.6);
  }
  /* ?ffentliche Live-View: Status-Spalte auf Mobil ausblenden, nur farblich anzeigen */
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-row .live-match-cell:first-child,
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-head .live-match-cell:first-child {
    display: none;
  }
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-row {
    grid-template-columns: 72px 56px 40px minmax(80px, 1fr) 72px;
  }
  body[data-page="public-tournament-live"] .live-view-matches-wrap > .live-match-row {
    min-width: 280px;
  }
  body[data-page="public-tournament-live"] .live-match-row.live-match-status--live {
    background: rgba(234, 179, 8, 0.12);
    border-left-color: #eab308;
    border-left-width: 4px;
  }
  body[data-page="public-tournament-live"] .live-match-row.live-match-status--played {
    border-left-color: rgba(34, 197, 94, 0.6);
  }
}

/* Sehr schmale Viewports (z. B. iPhone im Hochformat) */
@media (max-width: 400px) {
  .live-view-main {
    padding: 0 8px 20px;
    min-width: 0;
    overflow-x: hidden;
  }
  .results-matches-live-style {
    padding: 8px;
  }
  .live-match-row {
    grid-template-columns: 50px 68px 52px 36px minmax(70px, 1fr) 68px;
    gap: 4px 6px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .live-view-matches-wrap > .live-match-row {
    min-width: 280px;
  }
  .live-view-matches-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .results-matches-live-style .live-match-status-cell,
  .results-matches-live-style .live-match-head .live-match-cell:first-child {
    display: none;
  }
  .results-matches-live-style .live-match-row {
    grid-template-columns: 68px 52px 36px minmax(70px, 1fr) 68px;
  }
  /* ?ffentliche Live-View ?400px: Status-Spalte ausgeblendet, 5 Spalten */
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-row .live-match-cell:first-child,
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-head .live-match-cell:first-child {
    display: none;
  }
  body[data-page="public-tournament-live"] .live-view-matches-wrap .live-match-row {
    grid-template-columns: 68px 52px 36px minmax(70px, 1fr) 68px;
  }
  body[data-page="public-tournament-live"] .live-view-matches-wrap > .live-match-row {
    min-width: 260px;
  }
}

/* Admin: Erscheinungsbild / Upload */
.live-view-upload-feedback {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.live-view-upload-feedback.error {
  color: #f87171;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.upload-row .input {
  flex: 1;
  min-width: 160px;
}

.popup-row {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
}

.popup-row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: start;
}

.popup-row-fields .field.inline {
  grid-column: span 1;
}

.popup-row-fields .field.inline label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
}

@media (max-width: 900px) {
  .popup-row-fields {
    grid-template-columns: 1fr;
  }
}

/* Druck: ?ffentliche Live-View (A4 optimiert) */
@media print {
  body[data-page="public-tournament-live"] {
    background: #fff !important;
    color: #000 !important;
  }

  body[data-page="public-tournament-live"] .live-view {
    background: #fff !important;
    color: #000 !important;
    min-height: auto !important;
  }

  body[data-page="public-tournament-live"] .live-view-popup-overlay,
  body[data-page="public-tournament-live"] .live-view-tabs,
  body[data-page="public-tournament-live"] .live-view-print-btn {
    display: none !important;
  }

  body[data-page="public-tournament-live"] .live-view-header {
    padding: 0 0 10mm !important;
    text-align: left !important;
  }

  body[data-page="public-tournament-live"] .live-view-header-row {
    margin: 0 0 6mm !important;
  }

  body[data-page="public-tournament-live"] .live-view-logo img {
    max-height: 100px !important;
    filter: none !important;
    margin: 0 !important;
  }

  body[data-page="public-tournament-live"] .live-view-title {
    font-size: 28pt !important;
    color: #000 !important;
    text-shadow: none !important;
    margin: 0 0 3mm !important;
  }

  body[data-page="public-tournament-live"] .live-view-subtitle {
    color: #000 !important;
    margin: 0 0 4mm !important;
    font-size: 13pt !important;
  }

  body[data-page="public-tournament-live"] .tournament-meta {
    color: #000 !important;
  }

  body[data-page="public-tournament-live"] .tournament-meta-value {
    border-bottom-color: #000 !important;
  }

  body[data-page="public-tournament-live"] .live-view-group-pill {
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #000 !important;
  }

  body[data-page="public-tournament-live"] .live-view-main {
    padding: 0 !important;
  }

  body[data-page="public-tournament-live"] .live-view-grid {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body[data-page="public-tournament-live"] .live-view-pane {
    background: #fff !important;
    border: 1px solid #d0d5dd !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 0 0 10mm !important;
  }

  body[data-page="public-tournament-live"] .live-view-pane-title {
    color: #000 !important;
    font-size: 13pt !important;
  }

  body[data-page="public-tournament-live"] .live-schedule-meta,
  body[data-page="public-tournament-live"] .live-upcoming-meta {
    color: #000 !important;
    font-size: 11pt !important;
  }

  body[data-page="public-tournament-live"] .live-schedule-teams,
  body[data-page="public-tournament-live"] .live-upcoming-teams,
  body[data-page="public-tournament-live"] .live-scoreboard-team,
  body[data-page="public-tournament-live"] .live-league-row .team,
  body[data-page="public-tournament-live"] .live-info-value {
    color: #000 !important;
  }

  body[data-page="public-tournament-live"] .live-scoreboard,
  body[data-page="public-tournament-live"] .live-scoreboard-score {
    background: #fff !important;
    border: 1px solid #000 !important;
    color: #000 !important;
  }

  body[data-page="public-tournament-live"] .live-scoreboard-score {
    font-size: 20pt !important;
  }

  body[data-page="public-tournament-live"] .live-league-row,
  body[data-page="public-tournament-live"] .live-schedule-item,
  body[data-page="public-tournament-live"] .live-upcoming-item,
  body[data-page="public-tournament-live"] .live-view-qr-card,
  body[data-page="public-tournament-live"] .live-info-card {
    background: #fff !important;
    border: 1px solid #d0d5dd !important;
    box-shadow: none !important;
  }

  body[data-page="public-tournament-live"] .live-league-row.head {
    color: #000 !important;
  }

  body[data-page="public-tournament-live"] .live-view-qr {
    width: 150px !important;
    height: 150px !important;
    border: 1px solid #d0d5dd !important;
    padding: 6px !important;
  }

  body[data-page="public-tournament-live"] .live-view-qr-title,
  body[data-page="public-tournament-live"] .live-view-qr-subtitle,
  body[data-page="public-tournament-live"] .live-info-meta,
  body[data-page="public-tournament-live"] .live-info-desc {
    color: #000 !important;
  }
}

/* Druck: Admin Ergebnisse (A4 optimiert, Tabellen + Logo + QR) */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body[data-page="admin-tournament-results"] {
    background: #fff !important;
    color: #000 !important;
  }

  body[data-page="admin-tournament-results"] .card-header {
    display: none !important;
  }

  body[data-page="admin-tournament-results"] .results-matches-live-style {
    display: none !important;
  }

  body[data-page="admin-tournament-results"] .results-print-root {
    display: block !important;
  }

  body[data-page="admin-tournament-results"] .card {
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    /* Wichtig: globale Print-Regel setzt .card oft auf avoid -> kann leere Seite 1 erzeugen */
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body[data-page="admin-tournament-results"] .results-print-header {
    margin: 0 0 7mm;
    padding-bottom: 3.5mm;
    border-bottom: 2px solid #111827;
  }

  body[data-page="admin-tournament-results"] .results-print-root,
  body[data-page="admin-tournament-results"] .results-print-content {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body[data-page="admin-tournament-results"] .results-print-headrow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10mm;
  }

  body[data-page="admin-tournament-results"] .results-print-brand {
    display: flex;
    align-items: flex-start;
    gap: 5mm;
    min-width: 0;
    flex: 1;
  }

  body[data-page="admin-tournament-results"] .results-print-logos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3mm;
    flex-shrink: 0;
  }

  body[data-page="admin-tournament-results"] .results-print-logo {
    max-height: 14mm;
    max-width: 38mm;
    width: auto;
    height: auto;
    display: block;
  }

  body[data-page="admin-tournament-results"] .results-print-logo--secondary {
    max-height: 12mm;
    opacity: 0.95;
  }

  body[data-page="admin-tournament-results"] .results-print-kicker {
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111827;
    margin-bottom: 1mm;
    text-align: center;
  }

  body[data-page="admin-tournament-results"] .results-print-h1 {
    margin: 0 0 2mm;
    font-size: 22pt;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-align: center;
  }

  body[data-page="admin-tournament-results"] .results-print-youth {
    margin: 0 0 2.5mm;
    font-size: 16pt;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
  }

  body[data-page="admin-tournament-results"] .results-print-meta {
    font-size: 11pt;
    color: #111827;
    line-height: 1.35;
    white-space: pre-line;
  }

  body[data-page="admin-tournament-results"] .results-print-desc {
    margin-top: 2mm;
    font-size: 10pt;
    color: #111827;
    line-height: 1.35;
  }

  body[data-page="admin-tournament-results"] .results-print-qrbox {
    flex-shrink: 0;
    width: 46mm;
    text-align: center;
  }

  body[data-page="admin-tournament-results"] .results-print-qr {
    width: 36mm;
    height: 36mm;
    margin: 0 auto 2mm;
    padding: 2.2mm;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4mm;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  body[data-page="admin-tournament-results"] .results-print-qr img,
  body[data-page="admin-tournament-results"] .results-print-qr canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  body[data-page="admin-tournament-results"] .results-print-qrtext {
    font-size: 9pt;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1mm;
  }

  body[data-page="admin-tournament-results"] .results-print-qrurl {
    font-size: 7.5pt;
    color: #6b7280;
    word-break: break-all;
  }

  body[data-page="admin-tournament-results"] .results-print-section {
    margin: 0 0 8mm;
    break-inside: auto;
    page-break-inside: auto;
  }

  body[data-page="admin-tournament-results"] .results-print-h2 {
    margin: 0 0 3mm;
    font-size: 14pt;
    font-weight: 900;
    letter-spacing: 0.02em;
    break-after: avoid;
    page-break-after: avoid;
  }

  body[data-page="admin-tournament-results"] .results-print-h3 {
    margin: 0 0 2.5mm;
    font-size: 12pt;
    font-weight: 900;
    break-after: avoid;
    page-break-after: avoid;
  }

  body[data-page="admin-tournament-results"] .results-print-h3--subsection {
    margin-top: 2mm;
    font-size: 11pt;
  }

  body[data-page="admin-tournament-results"] .results-print-muted {
    margin: 0;
    font-size: 10pt;
    color: #374151;
  }

  body[data-page="admin-tournament-results"] .results-print-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
  }

  body[data-page="admin-tournament-results"] .results-print-groups-grid--single {
    grid-template-columns: 1fr;
  }

  body[data-page="admin-tournament-results"] .results-print-groups-grid--single .results-print-teamlist {
    column-count: 2;
    column-gap: 8mm;
  }

  body[data-page="admin-tournament-results"] .results-print-groups-grid--single .results-print-teamlist li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body[data-page="admin-tournament-results"] .results-print-teamlist {
    margin: 0;
    padding-left: 5mm;
    font-size: 10pt;
    line-height: 1.35;
  }

  body[data-page="admin-tournament-results"] .results-print-teamlist li {
    margin: 0 0 1mm;
  }

  body[data-page="admin-tournament-results"] .results-print-standings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
  }

  body[data-page="admin-tournament-results"] .results-print-card {
    border: 1px solid #d1d5db;
    border-left-width: 4px;
    border-left-color: #111827;
    border-radius: 4mm;
    padding: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body[data-page="admin-tournament-results"] .results-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
    break-inside: auto;
    page-break-inside: auto;
    font-variant-numeric: tabular-nums;
  }

  body[data-page="admin-tournament-results"] .results-print-table thead {
    display: table-header-group;
  }

  body[data-page="admin-tournament-results"] .results-print-table th,
  body[data-page="admin-tournament-results"] .results-print-table td {
    border: 1px solid #d1d5db;
    padding: 2mm 2.2mm;
    vertical-align: top;
  }

  body[data-page="admin-tournament-results"] .results-print-table th {
    background: #f3f4f6;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 8pt;
  }

  body[data-page="admin-tournament-results"] .results-print-table--schedule td:nth-child(1),
  body[data-page="admin-tournament-results"] .results-print-table--schedule th:nth-child(1) {
    width: 10mm;
    text-align: right;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--schedule td:nth-child(2),
  body[data-page="admin-tournament-results"] .results-print-table--schedule th:nth-child(2) {
    width: 18mm;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--schedule td:nth-child(3),
  body[data-page="admin-tournament-results"] .results-print-table--schedule th:nth-child(3) {
    width: 14mm;
    text-align: center;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--schedule td:nth-child(4),
  body[data-page="admin-tournament-results"] .results-print-table--schedule th:nth-child(4) {
    width: 10mm; /* ?Grp.?: nur 1 Zeichen */
    text-align: center;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--schedule td:nth-child(6),
  body[data-page="admin-tournament-results"] .results-print-table--schedule th:nth-child(6) {
    width: 18mm; /* ?Ergebnis?: 00:00 + Padding */
    white-space: nowrap;
    text-align: center;
  }

  body[data-page="admin-tournament-results"] .results-print-table--endroundmatches td:nth-child(1),
  body[data-page="admin-tournament-results"] .results-print-table--placements td:nth-child(1),
  body[data-page="admin-tournament-results"] .results-print-table--ranking td:nth-child(1) {
    width: 12mm;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--endroundmatches td:nth-child(2),
  body[data-page="admin-tournament-results"] .results-print-table--endroundmatches th:nth-child(2),
  body[data-page="admin-tournament-results"] .results-print-table--placements td:nth-child(2),
  body[data-page="admin-tournament-results"] .results-print-table--placements th:nth-child(2) {
    width: 18mm;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table--endroundmatches td:nth-child(3),
  body[data-page="admin-tournament-results"] .results-print-table--endroundmatches th:nth-child(3),
  body[data-page="admin-tournament-results"] .results-print-table--placements td:nth-child(3),
  body[data-page="admin-tournament-results"] .results-print-table--placements th:nth-child(3) {
    width: 14mm;
    text-align: center;
    white-space: nowrap;
  }

  body[data-page="admin-tournament-results"] .results-print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Druck: Live-View nutzt den gleichen Poster-Print (Live-UI ausblenden). */
@media print {
  body[data-page="public-tournament-live"] .live-view,
  body[data-page="admin-tournament-detail"] .page > .card,
  body[data-page="admin-tournament-detail"] .sidebar,
  body[data-page="admin-tournament-detail"] .topbar,
  body[data-page="admin-tournament-groups"] .page > .card,
  body[data-page="admin-tournament-groups"] .sidebar,
  body[data-page="admin-tournament-groups"] .topbar,
  body[data-page="public-tournament-pdf"] .page > .card,
  body[data-page="public-tournament-pdf"] .sidebar,
  body[data-page="public-tournament-pdf"] .topbar,
  body[data-page="public-tournament-detail"] .page > .card,
  body[data-page="public-tournament-detail"] .sidebar,
  body[data-page="public-tournament-detail"] .topbar {
    display: none !important;
  }

  body[data-page="public-tournament-live"] .results-print-root,
  body[data-page="admin-tournament-detail"] .results-print-root {
    display: block !important;
  }

  /* Wichtig: Wie bei Admin-Ergebnisse Fragmentierung/Clipping vermeiden */
  body[data-page="public-tournament-live"] .results-print-root,
  body[data-page="public-tournament-live"] .results-print-content,
  body[data-page="admin-tournament-detail"] .results-print-root,
  body[data-page="admin-tournament-detail"] .results-print-content {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* In der Live-View soll die Endplatzierung nicht am Seitenende ?clippen?:
     Immer auf neue Seite schieben (Tabelle selbst bleibt ungebrochen). */
  body[data-page="public-tournament-live"] .results-print-endranking-block,
  body[data-page="admin-tournament-detail"] .results-print-endranking-block {
    break-before: page;
    page-break-before: always;
  }

  /* Auch ?bergeordnete Container d?rfen im Print nicht clippen */
  body[data-page="public-tournament-live"] .app-shell,
  body[data-page="public-tournament-live"] .content,
  body[data-page="public-tournament-live"] .page,
  body[data-page="admin-tournament-detail"] .app-shell,
  body[data-page="admin-tournament-detail"] .content,
  body[data-page="admin-tournament-detail"] .page {
    overflow: visible !important;
  }

  /* Grid-Container k?nnen in manchen Engines Print-Fragmente clippen */
  body[data-page="public-tournament-live"] .page,
  body[data-page="admin-tournament-detail"] .page {
    display: block !important;
  }
}

/* Poster-Print (gemeinsam f?r Live-View + Ergebnisse): Styles ohne Page-Filter. */
@media print {
  /* Explizite Helper f?r erzwungenen Seitenumbruch (z.B. Endplatzierung) */
  .results-print-break-before-page {
    break-before: page;
    page-break-before: always;
  }

  /* Endplatzierung-Block soll als Einheit auf einer Seite bleiben */
  .results-print-endranking-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Keine Scrollbars im Dokument-Druck */
  html,
  body,
  .results-print-root,
  .results-print-content {
    overflow: visible !important;
  }

  /* Kein Layout-Schatten / keine Seiten-Schattierung im Ausdruck */
  body {
    background: #fff !important;
  }
  .app-shell,
  .content,
  .page {
    background: #fff !important;
    box-shadow: none !important;
  }

  /* Scrollbar-Rendering aus (hilft je nach Engine) */
  * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }

  .results-print-root {
    display: block !important;
  }

  /* Meta-Zeile wie in der Maske (deutsches Datum + Wochentag + Zeiten) */
  .tournament-meta {
    margin: 0;
    color: #111827;
    font-weight: 600;
    font-size: 11pt;
    line-height: 1.35;
  }

  .tournament-meta-value {
    border-bottom: 2px solid rgba(17, 24, 39, 0.35);
    font-weight: 800;
    letter-spacing: 0.01em;
  }

  .results-print-header {
    margin: 0 0 7mm;
    padding-bottom: 3.5mm;
    border-bottom: 2px solid #111827;
  }

  .results-print-headrow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10mm;
  }

  .results-print-brand {
    display: flex;
    align-items: flex-start;
    gap: 5mm;
    min-width: 0;
    flex: 1;
  }

  .results-print-logos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3mm;
    flex-shrink: 0;
  }

  .results-print-logo {
    max-height: 14mm;
    max-width: 38mm;
    width: auto;
    height: auto;
    display: block;
  }

  .results-print-logo--secondary {
    max-height: 12mm;
    opacity: 0.95;
  }

  .results-print-titleblock {
    flex: 1;
    min-width: 0;
  }

  .results-print-kicker {
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111827;
    margin-bottom: 1mm;
    text-align: center;
  }

  .results-print-h1 {
    margin: 0 0 2mm;
    font-size: 22pt;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .results-print-youth {
    margin: 0 0 2.5mm;
    font-size: 16pt;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
  }

  .results-print-meta {
    font-size: 11pt;
    color: #111827;
    line-height: 1.35;
    white-space: pre-line;
  }

  .results-print-desc {
    margin-top: 2mm;
    font-size: 10pt;
    color: #111827;
    line-height: 1.35;
  }

  .results-print-qrbox {
    flex-shrink: 0;
    width: 46mm;
    text-align: center;
  }

  .results-print-qr {
    width: 36mm;
    height: 36mm;
    margin: 0 auto 2mm;
    padding: 2.2mm;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4mm;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .results-print-qr img,
  .results-print-qr canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .results-print-qrtext {
    font-size: 9pt;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1mm;
  }

  .results-print-qrurl {
    font-size: 7.5pt;
    color: #6b7280;
    word-break: break-all;
  }

  .results-print-section {
    margin: 0 0 8mm;
    break-inside: auto;
    page-break-inside: auto;
  }

  /* Jeder-gegen-jeden: Tabelle als Block auf die Folgeseite (füllt die sonst leere Seite 2). */
  .results-print-section--standings-single {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .results-print-section--standings-single .results-print-table--standings {
    font-size: 11pt;
  }

  .results-print-section--standings-single .results-print-table--standings td:nth-child(1),
  .results-print-section--standings-single .results-print-table--standings th:nth-child(1) {
    width: 16mm;
    text-align: right;
    white-space: nowrap;
  }

  .results-print-section--standings-single .results-print-table--standings td:nth-child(3),
  .results-print-section--standings-single .results-print-table--standings th:nth-child(3),
  .results-print-section--standings-single .results-print-table--standings td:nth-child(4),
  .results-print-section--standings-single .results-print-table--standings th:nth-child(4),
  .results-print-section--standings-single .results-print-table--standings td:nth-child(6),
  .results-print-section--standings-single .results-print-table--standings th:nth-child(6) {
    width: 16mm;
    text-align: right;
    white-space: nowrap;
  }

  .results-print-section--standings-single .results-print-table--standings td:nth-child(5),
  .results-print-section--standings-single .results-print-table--standings th:nth-child(5) {
    width: 22mm;
    text-align: center;
    white-space: nowrap;
  }

  .results-print-h2 {
    margin: 0 0 3mm;
    font-size: 14pt;
    font-weight: 900;
    letter-spacing: 0.02em;
    break-after: avoid;
    page-break-after: avoid;
  }

  .results-print-h3 {
    margin: 0 0 2.5mm;
    font-size: 12pt;
    font-weight: 900;
    break-after: avoid;
    page-break-after: avoid;
  }

  .results-print-h3--subsection {
    margin-top: 2mm;
    font-size: 11pt;
  }

  .results-print-muted {
    margin: 0;
    font-size: 10pt;
    color: #374151;
  }

  .results-print-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
  }

  .results-print-groups-grid--single {
    grid-template-columns: 1fr;
  }

  .results-print-groups-grid--single .results-print-teamlist {
    column-count: 2;
    column-gap: 8mm;
  }

  .results-print-groups-grid--single .results-print-teamlist li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .results-print-teamlist {
    margin: 0;
    padding-left: 5mm;
    font-size: 10pt;
    line-height: 1.35;
  }

  .results-print-teamlist li {
    margin: 0 0 1mm;
  }

  .results-print-standings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
  }

  .results-print-card {
    border: 1px solid #d1d5db;
    border-left-width: 4px;
    border-left-color: #111827;
    border-radius: 4mm;
    padding: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .results-print-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
    font-size: 9.5pt;
    break-inside: auto;
    page-break-inside: auto;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .results-print-table thead {
    display: table-header-group;
  }

  .results-print-table th,
  .results-print-table td {
    border: 1px solid #d1d5db;
    padding: 2mm 2.2mm;
    vertical-align: top;
  }

  .results-print-table th {
    background: #f3f4f6;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 8pt;
  }

  .results-print-table--schedule td:nth-child(1),
  .results-print-table--schedule th:nth-child(1) {
    width: 10mm;
    text-align: right;
    white-space: nowrap;
  }

  .results-print-table--schedule td:nth-child(2),
  .results-print-table--schedule th:nth-child(2) {
    width: 18mm;
    white-space: nowrap;
  }

  .results-print-table--schedule td:nth-child(3),
  .results-print-table--schedule th:nth-child(3) {
    width: 14mm;
    text-align: center;
    white-space: nowrap;
  }

  .results-print-table--schedule td:nth-child(4),
  .results-print-table--schedule th:nth-child(4) {
    width: 10mm; /* Grp.: nur 1 Zeichen */
    text-align: center;
    white-space: nowrap;
  }

  .results-print-table tr.results-print-row--grouped > td.results-print-grp-cell {
    color: var(--sf-print-group, #111827) !important;
    font-weight: 900;
    background-color: color-mix(in srgb, var(--sf-print-group, #111827) 18%, #ffffff) !important;
    border-left-width: 4px;
    border-left-color: var(--sf-print-group, #111827) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .results-print-table--schedule td:nth-child(6),
  .results-print-table--schedule th:nth-child(6) {
    width: 18mm; /* ?Ergebnis?: 00:00 + Padding */
    white-space: nowrap;
    text-align: center;
  }

  .results-print-table--endroundmatches td:nth-child(1),
  .results-print-table--placements td:nth-child(1),
  .results-print-table--ranking td:nth-child(1) {
    width: 12mm;
    white-space: nowrap;
  }

  .results-print-table--endroundmatches td:nth-child(2),
  .results-print-table--endroundmatches th:nth-child(2),
  .results-print-table--placements td:nth-child(2),
  .results-print-table--placements th:nth-child(2) {
    width: 18mm;
    white-space: nowrap;
  }

  .results-print-table--endroundmatches td:nth-child(3),
  .results-print-table--endroundmatches th:nth-child(3),
  .results-print-table--placements td:nth-child(3),
  .results-print-table--placements th:nth-child(3) {
    width: 14mm;
    text-align: center;
    white-space: nowrap;
  }

  .results-print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Teamverwaltung: Kontakte als Tabelle */
.team-contacts-host {
  margin-top: 0.25rem;
}

.team-contacts-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  background: var(--card-bg, #fff);
}

.team-contacts-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.team-contacts-table th,
.team-contacts-table td {
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.team-contacts-table thead th {
  background: var(--table-head-bg, #f1f5f9);
  font-weight: 600;
  color: var(--muted-strong, #475569);
  white-space: nowrap;
}

.team-contacts-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.team-contacts-table th.sortable:hover {
  color: var(--color-primary-dark, #0f172a);
}

.team-contacts-table th.sortable.sort-asc::after,
.team-contacts-table th.sortable.sort-desc::after {
  margin-left: 0.25em;
  font-size: 0.72em;
  opacity: 0.85;
}

.team-contacts-table th.sortable.sort-asc::after {
  content: "\25B2";
}

.team-contacts-table th.sortable.sort-desc::after {
  content: "\25BC";
}

.analytics-player-name-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--color-primary, #1d4ed8);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.analytics-player-name-btn:hover,
.analytics-player-name-btn:focus-visible {
  color: var(--color-primary-dark, #0f172a);
}

.analytics-player-detail-cell {
  background: var(--table-filter-bg, #f8fafc);
  padding: 0.55rem 0.65rem !important;
}

.analytics-player-sessions-title {
  margin: 0.75rem 0 0.4rem;
  font-weight: 600;
}

.analytics-player-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.7rem;
  margin: 0 0 0.35rem;
}

.analytics-player-detail-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #dbe3ee);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.analytics-player-detail-card h4 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}

.analytics-player-detail-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.18rem 0.75rem;
  margin: 0;
}

.analytics-player-detail-card dt {
  color: var(--muted, #64748b);
  font-size: 0.82rem;
}

.analytics-player-detail-card dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}

.analytics-player-sessions-table {
  width: 100%;
  font-size: 0.92rem;
}

.analytics-status-present td:last-child {
  color: var(--ok, #15803d);
  font-weight: 600;
}

.analytics-status-unexcused td:last-child,
.analytics-status-event_unexcused td:last-child,
.analytics-status-no_response td:last-child {
  color: var(--warn, #c45c26);
  font-weight: 600;
}

.analytics-status-excused td:last-child {
  color: var(--muted-strong, #475569);
  font-weight: 600;
}

.team-contacts-table .tc-filter-row td {
  background: var(--table-filter-bg, #f8fafc);
  padding: 0.25rem 0.35rem;
}

.team-contacts-table .tc-filter-row .input {
  width: 100%;
  min-width: 0;
  padding: 0.28rem 0.45rem;
  font-size: 0.8rem;
}

.team-contacts-table tbody tr:hover td {
  background: var(--table-row-hover, rgba(14, 116, 144, 0.06));
}

.team-contacts-table tbody tr.tc-from-user td {
  background: var(--table-user-row-bg, rgba(148, 163, 184, 0.14));
}

.team-contacts-table tfoot td {
  background: var(--table-foot-bg, #f8fafc);
  font-weight: 500;
}

.team-contacts-table tfoot .input {
  width: 100%;
  min-width: 0;
  padding: 0.32rem 0.5rem;
  font-size: 0.82rem;
}

.team-contacts-table .tc-actions {
  white-space: nowrap;
  text-align: right;
}

.team-contacts-table .tc-actions .cta {
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
}

.team-contacts-table .tc-muted {
  color: var(--muted, #64748b);
  font-size: 0.8rem;
}

body[data-theme="dark"] .team-contacts-scroll {
  border-color: #334155;
  background: var(--card-bg, #1e293b);
}

body[data-theme="dark"] .team-contacts-table th,
body[data-theme="dark"] .team-contacts-table td {
  border-bottom-color: #334155;
}

body[data-theme="dark"] .team-contacts-table thead th {
  background: #0f172a;
  color: #cbd5e1;
}

body[data-theme="dark"] .team-contacts-table .tc-filter-row td,
body[data-theme="dark"] .team-contacts-table tfoot td {
  background: #0f172a;
}

body[data-theme="dark"] .team-contacts-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.08);
}

body[data-theme="dark"] .team-contacts-table tbody tr.tc-from-user td {
  background: rgba(148, 163, 184, 0.1);
}

.event-reg-wizard {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 12px;
  background: var(--color-surface, #f8fafc);
}
.event-reg-wizard-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.event-reg-wizard-intro {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}
.event-reg-wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}
.event-reg-wizard-step {
  font-size: 0.82rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border, #cbd5e1);
}
.event-reg-wizard-step.is-active {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.45);
  font-weight: 600;
}
.event-reg-wizard-cards {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.event-reg-wizard-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 10px;
  background: var(--color-bg, #fff);
  cursor: pointer;
}
.event-reg-wizard-card strong {
  display: block;
  margin-bottom: 0.3rem;
}
.event-reg-wizard-card.is-selected,
.event-reg-wizard-card:hover {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}
.event-reg-wizard-actions {
  margin-top: 0.85rem;
  flex-wrap: wrap;
  gap: 8px;
}
.event-reg-wizard-done {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.35);
}
.event-reg-wizard-card:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.75);
  outline-offset: 2px;
}
body[data-theme="dark"] .event-reg-wizard {
  background: rgba(148, 163, 184, 0.08);
}
body[data-theme="dark"] .event-reg-wizard-card {
  background: rgba(15, 23, 42, 0.45);
}

.event-create-cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 0.5rem;
}
.event-create-expert-link {
  margin: 0.75rem 0 0;
}
.event-create-expert-link .btn.ghost {
  border: 0;
  background: transparent;
  color: var(--primary, #2563eb);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}
.event-create-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-create-chip {
  border: 1px solid var(--border, #cbd5e1);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
}
.event-create-chip.is-on {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.55);
}
.event-create-summary-card {
  padding: 1rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 12px;
  background: var(--surface, #f8fafc);
}
.event-create-summary-card h5 {
  margin: 0 0 0.45rem;
}
.event-create-summary-lead {
  margin: 0 0 0.75rem;
}
.event-create-summary-list {
  margin: 0;
  padding-left: 1.15rem;
}
.event-create-summary-list li {
  margin: 0.25rem 0;
}
@media (max-width: 800px) {
  .event-create-cards {
    grid-template-columns: 1fr;
  }
}

/* Web-Anmeldung: Live-Vorschau im Admin ? innere ?card? w?rde sonst mit der ?u?eren Karte verschmelzen */
/* Keine Klicks abfangen: darunterliegender Formular-Editor (z. B. ?+ Tabelle?) muss bedienbar bleiben */
.event-reg-live-preview-outer {
  pointer-events: none;
}

.event-reg-live-preview-mount {
  color: var(--color-text, #0f172a);
}

.event-reg-preview-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  color: var(--color-text, #0f172a);
}

.event-reg-preview-block {
  background: var(--color-surface, #f1f5f9);
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.event-reg-preview-placeholder {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--color-border, #94a3b8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text, #334155);
  font-size: 0.9rem;
  line-height: 1.45;
}

.event-reg-preview-placeholder--warn {
  border-color: rgba(234, 88, 12, 0.55);
  background: rgba(254, 243, 199, 0.35);
}

body[data-theme="dark"] .event-reg-preview-block {
  background: rgba(15, 23, 42, 0.55);
  border-color: var(--color-border, #334155);
  box-shadow: none;
}

body[data-theme="dark"] .event-reg-preview-placeholder {
  background: rgba(15, 23, 42, 0.45);
  color: var(--color-text, #e2e8f0);
}

body[data-theme="dark"] .event-reg-preview-placeholder--warn {
  background: rgba(120, 53, 15, 0.25);
  border-color: rgba(251, 191, 36, 0.45);
}

/* ?ffentliche Veranstaltungs-Anmeldung + Live-Vorschau: gro?e Matrix-Haken, gut treffbar */
.event-reg-matrix {
  font-size: 0.95rem;
}
.event-reg-matrix th,
.event-reg-matrix td {
  padding: 12px 14px;
  vertical-align: middle;
}
.event-reg-matrix thead th {
  font-size: 0.88rem;
  line-height: 1.25;
}
.event-reg-matrix tbody th {
  font-size: 0.92rem;
  line-height: 1.3;
  max-width: 11rem;
}
.event-reg-matrix-cb {
  width: 1.45rem;
  height: 1.45rem;
  min-width: 1.45rem;
  min-height: 1.45rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-primary, #1e4fa1);
}
.event-reg-matrix-cell:has(.event-reg-matrix-cb) {
  cursor: pointer;
  min-width: 3.25rem;
}
.event-reg-parent-duty-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1e4fa1;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin: 0 0 0.45rem;
}
.event-reg-parent-duty-hint {
  font-size: 0.88rem;
  line-height: 1.35;
}
.event-reg-team-filter-note {
  font-weight: 600;
}

/* Veranstaltungen-Admin: Mannschafts-Checkboxen gr??er antippbar */
.event-team-cb-input {
  width: 1.3rem;
  height: 1.3rem;
  min-width: 1.3rem;
  min-height: 1.3rem;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--color-primary, #1e4fa1);
}

/* Terminoptionen: Farbwähler für Eltern-Karten (offene Rückmeldung) */
.sf-light-kind-color-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 220px);
}
.sf-light-kind-color-section-label {
  margin: 0.15rem 0 0;
  font-weight: 650;
  font-size: 0.78rem;
}
.sf-light-kind-color-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sf-light-kind-color-picker {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 2px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.45));
  border-radius: 8px;
  background: var(--surface, #fff);
  cursor: pointer;
}
.sf-light-kind-color-opacity {
  display: flex;
  flex: 1 1 120px;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  margin: 0;
}
.sf-light-kind-color-opacity-range {
  flex: 1 1 72px;
  min-width: 72px;
  accent-color: var(--color-primary, #1e4fa1);
}
.sf-light-kind-color-opacity-label {
  min-width: 2.5rem;
  text-align: right;
  white-space: nowrap;
}
.sf-light-kind-color-css {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.82rem;
}
.sf-light-kind-color-preview {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.35));
}
.sf-light-kind-color-preview--light {
  background: #f8fafc;
}
.sf-light-kind-color-preview--dark {
  background: #0f172a;
}
.sf-light-kind-color-preview-swatch {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
}

/* Veranstaltungen-Admin: Spielerliste nur noch unter /admin/spieler */
.events-admin-page #eventPlayersWrap,
.events-admin-page .sf-events-admin-players-hidden {
  display: none !important;
}

.event-reg-matrix-allow-host input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.2rem;
  margin: 0 4px 0 0;
  cursor: pointer;
  vertical-align: middle;
  accent-color: var(--color-primary, #1e4fa1);
}

.event-reg-eval-wrap {
  background: rgba(37, 99, 235, 0.04);
}
.event-reg-entries-details {
  margin: 0.85rem 0 0;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 8px;
  padding: 0.15rem 0.65rem 0.15rem;
  background: #fff;
}
.event-reg-entries-summary {
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--muted, #667085);
  padding: 0.45rem 0;
  list-style: none;
}
.event-reg-entries-summary::-webkit-details-marker {
  display: none;
}
.event-reg-entries-details[open] .event-reg-entries-summary {
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 0.15rem;
}
.event-reg-entries-table {
  font-size: 0.9rem;
}
.event-reg-duty-plan-block {
  margin: 0.65rem 0 1rem;
}
.event-reg-duty-plan-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.event-reg-duty-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.event-reg-duty-plan-table th,
.event-reg-duty-plan-table td {
  border: 1px solid var(--border, #d0d5dd);
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}
.event-reg-duty-plan-table thead th {
  background: var(--color-surface, #f5f7fb);
}
.event-reg-duty-plan-filled {
  font-weight: 600;
}
.event-reg-duty-plan-open {
  color: var(--muted, #667085);
  font-style: italic;
}
.event-reg-helferliste-intro {
  color: #b42318;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.event-reg-helferliste-daywrap {
  margin: 0 0 0.85rem;
}
.event-reg-helferliste-day {
  background: #1e4fa1;
  color: #fff;
  font-weight: 700;
  padding: 7px 10px;
  margin: 12px 0 0;
  border-radius: 8px 8px 0 0;
}
.event-reg-helferliste-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0;
}
.event-reg-helferliste-table th,
.event-reg-helferliste-table td {
  border: 1px solid var(--border, #d0d5dd);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}
.event-reg-helferliste-table thead th {
  background: #e8eef8;
}
.event-reg-helferliste-time {
  color: #b42318;
  font-weight: 800;
  white-space: nowrap;
}
.event-reg-helferliste-youth {
  font-weight: 700;
}
.event-reg-helferliste-names {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.12rem;
}
.event-reg-helferliste-names li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}
.event-reg-helferliste-names li::before {
  content: "•";
  margin-right: 0.35rem;
}
.event-reg-helferliste-names .is-open {
  color: var(--muted, #667085);
  font-style: italic;
}
.event-reg-helferliste-table tr.is-kuchen td {
  background: #fff7ed;
}
.event-reg-helferliste-table tr.is-arbeit td {
  background: #eff8ff;
}
.event-reg-helferliste-overbook-banner {
  margin: 0 0 0.75rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  font-weight: 700;
  border: 1px solid #fec84b;
}
.event-reg-helferliste-overbook {
  color: #b54708;
  font-weight: 600;
}
.event-reg-helferliste-overbook.is-empty {
  color: var(--muted, #667085);
  font-weight: 400;
  font-style: italic;
}
.event-reg-helferliste-names--over {
  color: #b54708;
}
.event-reg-helferliste-table tr.is-overbooked td {
  box-shadow: inset 0 -2px 0 #f79009;
}
.event-reg-helferliste-nn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.event-reg-helferliste-person {
  margin-right: 0.35rem;
}
.event-reg-helferliste-kind {
  font-size: 0.75rem;
  color: var(--muted, #667085);
  font-weight: 600;
  margin-right: 0.25rem;
}
.event-reg-helferliste-remove {
  appearance: none;
  background: none;
  border: 0;
  color: #b42318;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.event-reg-helferliste-assign {
  min-width: 14rem;
  max-width: 22rem;
}
.event-reg-helferliste-assign-input {
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  touch-action: manipulation;
}
.event-reg-helferliste-assign-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
}
.event-reg-helferliste-assign-hit {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  background: #fff;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 6px;
  padding: 6px 8px;
  margin: 0 0 4px;
  font-size: 0.9rem;
  cursor: pointer;
}
.event-reg-helferliste-assign-hint {
  margin: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--muted, #667085);
}
.event-reg-helferliste-assign-guest {
  font-size: 0.85rem;
}
.attendance-event-helper-summary {
  text-align: right;
  max-width: 16rem;
}
.event-detail-workspace {
  position: relative;
}
.event-detail-sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--color-surface, #fff);
  padding: 0.4rem 0 0.55rem;
  margin: 0 0 0.55rem;
  border-bottom: 1px solid var(--border, #d0d5dd);
}
body[data-theme="dark"] .event-detail-sticky {
  background: var(--color-surface, #0f172a);
}
.event-detail-sticky-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  align-items: flex-start;
}
.event-detail-sticky-titles h4 {
  margin: 0 0 0.2rem;
}
.event-detail-sticky-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.65rem;
}
.event-detail-tab-btn {
  appearance: none;
  border: 1px solid var(--border, #d0d5dd);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.event-detail-tab-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 700;
}
.attendance-session-page-btn {
  font-size: 0.88rem;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
body.sf-event-detail-page .events-admin-page > .card-header,
body.sf-event-detail-page #eventsAdminHubSection,
body.sf-event-detail-page #eventsAdminPanelNav,
body.sf-event-detail-page #eventsAdminTrainerArea,
body.sf-event-detail-page #eventsAdminEventsArea > .form-grid,
body.sf-event-detail-page #eventPlayersWrap,
body.sf-event-detail-page #eventNewWrap,
body.sf-event-detail-page #eventSessionList,
body.sf-event-detail-page #eventPageFeedback {
  display: none !important;
}
body.sf-event-detail-page #eventsAdminEventsArea {
  display: block !important;
}
body.sf-event-detail-page #eventDetailWrap {
  margin-top: 0;
}
@media print {
  .event-reg-helferliste-assign,
  .event-reg-helferliste-remove {
    display: none !important;
  }
  button.event-reg-helferliste-nn {
    text-decoration: none;
    cursor: default;
  }
}
.sf-location-catalog-pick {
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
}

.modal-backdrop.app-confirm-modal.event-reg-print-pick-modal .modal-panel.event-reg-print-pick-panel {
  width: min(560px, calc(100% - 24px));
  max-width: min(560px, 96vw);
  height: auto;
  max-height: min(92dvh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.event-reg-print-pick-hint {
  margin: 0 0 0.65rem;
}
.event-reg-print-pick-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 0.65rem;
}
.event-reg-print-pick-list {
  overflow: auto;
  max-height: min(52vh, 420px);
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 10px;
  padding: 6px 10px 10px;
}
.event-reg-print-pick-day {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin: 0.7rem 0 0.2rem;
}
.event-reg-print-pick-day:first-child {
  margin-top: 0.15rem;
}
.event-reg-print-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0 4px 1.35rem;
  font-size: 0.92rem;
}
.event-reg-print-pick-error {
  color: var(--danger, #b91c1c);
  font-weight: 600;
  margin: 0.5rem 0 0;
}
.event-reg-print-pick-actions {
  margin-top: 0.85rem;
  justify-content: flex-end;
}

.public-light-helper-plan-preview {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #d0d5dd);
  background: #f8fafc;
}
.public-light-helper-plan-preview__title {
  font-weight: 800;
  font-size: 0.95rem;
  margin: 0 0 4px;
}
.public-light-helper-plan-preview__hint {
  margin: 0 0 8px;
}
.public-light-helper-plan-preview__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.public-light-helper-plan-preview__day {
  background: #1e4fa1;
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  margin: 8px 0 0;
  border-radius: 8px 8px 0 0;
}
.public-light-helper-plan-preview__task {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px;
  border: 1px solid var(--border, #d0d5dd);
  border-top: 0;
  background: #fff;
}
.public-light-helper-plan-preview__task:last-child {
  border-radius: 0 0 8px 8px;
}
.public-light-helper-plan-preview__time {
  color: #b42318;
  font-weight: 800;
  white-space: nowrap;
  min-width: 7.5rem;
}
.public-light-helper-plan-preview__name {
  font-weight: 700;
}
.public-light-helper-plan-preview__task.is-kuchen {
  background: #fff7ed;
}
.public-light-helper-plan-preview__task.is-arbeit {
  background: #eff8ff;
}
.public-light-helper-plan-preview__task.is-setup {
  background: #f2f4f7;
}
.public-light-event-reg-inplace {
  margin-top: 1rem;
  width: 100%;
}
.public-light-event-reg-inplace__bar {
  margin-bottom: 0.75rem;
}
#publicLightKidEventRegFrameHost {
  width: 100%;
  min-height: 0;
}
#publicLightKidEventRegFrameHost .public-event-registration-embed {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}
#publicLightKidEventRegFrameHost .public-event-registration-embed__head {
  padding: 0 0 0.75rem;
  position: relative;
  overflow: visible;
}
#publicLightKidEventRegFrameHost .public-event-registration-embed__head .pill {
  display: none;
}
#publicLightKidEventRegFrameHost .public-event-registration-embed__head::before,
#publicLightKidEventRegFrameHost .public-event-registration-embed__head::after,
#publicLightKidEventRegFrameHost .card-header::before,
#publicLightKidEventRegFrameHost .card-header::after {
  content: none !important;
  display: none !important;
}
#publicLightKidEventRegWrap #publicEventRegBackToSessions {
  display: none !important;
}
#publicEventRegBackToSessions {
  margin-top: 0.65rem;
}

/* Eltern-Light: Push als kompakte Karte + Button statt Checkbox */
.sf-push-prompt {
  padding: 12px 14px;
  border-radius: var(--radius-card, 14px);
  border: 1px solid var(--color-border, #e4e7ec);
  background: var(--color-surface, #f5f7fb);
  box-shadow: 0 1px 0 rgba(14, 26, 43, 0.04);
}
.sf-push-prompt__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.sf-push-prompt__copy {
  flex: 1 1 200px;
  min-width: 0;
}
.sf-push-prompt__title {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text, #0e1a2b);
}
.sf-push-prompt__meta {
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.sf-push-prompt__btn {
  flex: 0 0 auto;
  min-height: 44px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.sf-push-prompt__fb {
  margin: 0.5rem 0 0;
  min-height: 1.25em;
}
.sf-push-topics-details {
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: rgba(31, 61, 99, 0.03);
}
.sf-push-topics-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  list-style: none;
  color: var(--color-text, #0e1a2b);
}
.sf-push-topics-summary::-webkit-details-marker {
  display: none;
}
.sf-push-topics-grid {
  padding: 0 10px 10px;
}
.sf-push-samsung-assist {
  margin-bottom: 0.65rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f0c040;
  background: #fffbeb;
  line-height: 1.45;
}
.sf-push-samsung-assist strong {
  display: block;
  font-size: 0.92rem;
}
body[data-theme="dark"] .sf-push-samsung-assist {
  border-color: #b8860b;
  background: rgba(240, 192, 64, 0.12);
}
.sf-samsung-chrome-banner {
  margin: 0.75rem 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-card, 14px);
  border: 1px solid #e67e22;
  background: #fff4e6;
  line-height: 1.45;
}
.sf-samsung-chrome-banner strong {
  display: block;
  font-size: 0.95rem;
}
body[data-theme="dark"] .sf-samsung-chrome-banner {
  border-color: #c56a1a;
  background: rgba(230, 126, 34, 0.14);
}
body[data-theme="dark"] .sf-push-prompt {
  background: rgba(15, 23, 42, 0.45);
  border-color: var(--color-border, #334155);
  box-shadow: none;
}
body[data-theme="dark"] .sf-push-prompt__title {
  color: var(--color-text, #e2e8f0);
}

/* UI-Sprache (i18n) */
.sf-lang-switcher-host {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.sf-lang-select {
  min-width: 6.5rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
}
.sf-lang-select--compact {
  min-width: 5.5rem;
}
.sf-lang-label {
  white-space: nowrap;
}
.sf-lang-switcher-host--compact {
  max-width: none;
}
.sf-lang-globe-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sf-lang-globe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.sf-lang-globe-btn svg {
  display: block;
}
.sf-lang-menu {
  position: fixed;
  z-index: 12050;
  min-width: 8.5rem;
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid var(--color-border, rgba(15, 26, 46, 0.14));
  background: var(--color-surface-elevated, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.sf-lang-menu[hidden] {
  display: none !important;
}
.sf-lang-menu__item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--color-text, #0f1a2e);
  cursor: pointer;
}
.sf-lang-menu__item:hover,
.sf-lang-menu__item:focus-visible {
  background: rgba(15, 26, 46, 0.06);
  outline: none;
}
.sf-lang-menu__item.is-active {
  font-weight: 650;
  background: rgba(15, 26, 46, 0.08);
}
body[data-theme="dark"] .sf-lang-menu {
  background: var(--color-surface-elevated, #1e293b);
  border-color: var(--color-border, #334155);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .sf-lang-menu__item {
  color: var(--color-text, #e2e8f0);
}
body[data-theme="dark"] .sf-lang-menu__item:hover,
body[data-theme="dark"] .sf-lang-menu__item:focus-visible,
body[data-theme="dark"] .sf-lang-menu__item.is-active {
  background: rgba(148, 163, 184, 0.16);
}

/* Auswertungen ? Diagramm-Dashboard */
.analytics-dash-layout-panel {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border, #d8e0ea);
  border-radius: 8px;
  background: var(--color-surface-elevated, rgba(255, 255, 255, 0.5));
}
.analytics-dash-layout-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.analytics-dash-layout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.analytics-dash-layout-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border, #e8edf2);
  border-radius: 6px;
  transition: background 0.12s ease, opacity 0.12s ease;
}
.analytics-dash-layout-item--dragging {
  opacity: 0.45;
}
.analytics-dash-layout-item--drag-over {
  background: rgba(42, 77, 122, 0.08);
  outline: 2px dashed var(--accent, #2a4d7a);
  outline-offset: 2px;
}
.analytics-dash-layout-grip {
  flex: 0 0 auto;
  cursor: grab;
  user-select: none;
  padding: 0.15rem 0.35rem;
  color: var(--color-text-muted, #64748b);
  font-size: 1rem;
  line-height: 1;
  touch-action: none;
}
.analytics-dash-layout-grip:active {
  cursor: grabbing;
}
.analytics-dash-layout-item:last-child {
  border-bottom: none;
}
.analytics-dash-layout-item label {
  flex: 1 1 10rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.analytics-dash-layout-actions {
  display: flex;
  gap: 0.25rem;
}
.analytics-dash-layout-actions button {
  min-width: 2rem;
  padding: 0.2rem 0.45rem;
}
.analytics-dash-widget--hidden {
  display: none !important;
}
.analytics-dashboard-grid--reorder .analytics-dash-widget {
  transition: box-shadow 0.12s ease, outline 0.12s ease;
}
.analytics-dashboard-grid--reorder .analytics-dash-widget--drag-over {
  outline: 2px dashed var(--accent, #2a4d7a);
  outline-offset: 3px;
  box-shadow: 0 4px 14px rgba(42, 77, 122, 0.12);
}
.analytics-dashboard-grid--reorder .analytics-dash-widget--dragging {
  opacity: 0.55;
}
.analytics-dashboard-grid--reorder .analytics-dash-widget-title {
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.analytics-dash-widget-grip {
  flex: 0 0 auto;
  cursor: grab;
  user-select: none;
  color: var(--color-text-muted, #64748b);
  font-size: 0.95rem;
  line-height: 1;
  touch-action: none;
}
.analytics-dash-widget-grip:active {
  cursor: grabbing;
}
.analytics-dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
}
@media (max-width: 720px) {
  /* Mobile: Rückmelde-Grafik zuerst — liefert sofort Zusage/Absage/offen */
  .analytics-dashboard-grid .analytics-dash-widget[data-analytics-widget="rsvp"] {
    order: -1;
  }
}
.analytics-dash-widget {
  background: var(--color-surface-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--color-border, #d8e0ea);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  min-width: 0;
}
.analytics-dash-widget-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.analytics-dash-widget--kpis {
  grid-column: span 12;
}
.analytics-dash-widget--chart {
  grid-column: span 12;
}
.analytics-dash-widget--chart-wide {
  grid-column: span 12;
}
.analytics-dash-widget--list {
  grid-column: span 12;
}
.analytics-dash-chart-wrap {
  position: relative;
  height: 220px;
  max-width: 100%;
}
.analytics-dash-empty {
  margin: 0;
  padding: 2.5rem 0.5rem;
  text-align: center;
}
.analytics-dash-chart-wrap--compact {
  height: 200px;
  max-width: 280px;
  margin: 0 auto;
}
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  align-items: start;
}
.analytics-kpi-legend {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  line-height: 1.35;
}
.analytics-kpi-group-title {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0.85rem 0 0.1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  opacity: 0.9;
}
.analytics-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.04);
  min-height: 4.25rem;
  box-sizing: border-box;
}
body[data-theme="dark"] .analytics-kpi-card {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
}
.analytics-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.78;
}
.analytics-kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.analytics-kpi-card--expandable {
  border-style: dashed;
  border-color: rgba(42, 77, 122, 0.55);
  background: rgba(42, 77, 122, 0.06);
}
body[data-theme="dark"] .analytics-kpi-card--expandable {
  border-color: rgba(125, 170, 230, 0.45);
  background: rgba(42, 77, 122, 0.22);
}
.analytics-kpi-card--expandable details {
  margin: 0;
}
.analytics-kpi-card--expandable summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}
.analytics-kpi-card--expandable summary::-webkit-details-marker {
  display: none;
}
.analytics-kpi-expand-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary, #2a4d7a);
}
body[data-theme="dark"] .analytics-kpi-expand-hint {
  color: #9ec1ea;
}
.analytics-kpi-expand-hint::after {
  content: "▾";
  font-size: 0.75rem;
}
.analytics-kpi-card--expandable details[open] .analytics-kpi-expand-hint {
  font-size: 0;
}
.analytics-kpi-card--expandable details[open] .analytics-kpi-expand-hint::before {
  content: "Namen ausblenden";
  font-size: 0.7rem;
}
.analytics-kpi-card--expandable details[open] .analytics-kpi-expand-hint::after {
  content: "▴";
  font-size: 0.75rem;
  margin-left: 0.25rem;
}
.analytics-kpi-panel {
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}
.analytics-kpi-players {
  margin: 0;
  padding: 0 0 0 1rem;
  max-height: 12rem;
  overflow: auto;
  font-size: 0.85rem;
  text-align: left;
}
.analytics-kpi-players li {
  margin: 0.15rem 0;
}
.analytics-kpi-empty {
  margin: 0;
  text-align: left;
}
.attendance-presence-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
@media (min-width: 720px) {
  .analytics-dash-widget--chart {
    grid-column: span 6;
  }
  .analytics-dash-widget--chart-wide {
    grid-column: span 12;
  }
}
@media (min-width: 960px) {
  .analytics-dash-widget--kpis {
    grid-column: span 4;
  }
  .analytics-dash-widget--chart {
    grid-column: span 4;
  }
  .analytics-dash-widget--chart-wide {
    grid-column: span 8;
  }
  .analytics-dash-widget--list {
    grid-column: span 12;
  }
}
body[data-theme="dark"] .analytics-dash-widget {
  border-color: var(--color-border, #334155);
}

/* Termin-Nachrichten: Dialog Eltern ? Trainer */
.attendance-message-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.03);
  border: 1px solid rgba(17, 24, 39, 0.08);
}
.attendance-msg-bubble-wrap {
  display: flex;
  width: 100%;
}
.attendance-msg-bubble-wrap--parent {
  justify-content: flex-start;
}
.attendance-msg-bubble-wrap--trainer {
  justify-content: flex-end;
}
.attendance-msg-bubble {
  max-width: min(100%, 520px);
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.45;
}
.attendance-msg-bubble--parent {
  background: rgba(230, 81, 0, 0.1);
  border: 1px solid rgba(230, 81, 0, 0.22);
}
.attendance-msg-bubble--trainer {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.attendance-msg-bubble-meta {
  font-size: 0.82em;
  color: var(--color-muted, #667085);
  margin-bottom: 4px;
}
.attendance-parent-thread-item {
  padding: 0.65rem 0.75rem !important;
  margin-bottom: 12px !important;
  border-left: 3px solid rgba(230, 81, 0, 0.45) !important;
}
.attendance-trainer-reply-compose,
.attendance-parent-reply-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.attendance-parent-dialog {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(31, 61, 99, 0.15);
  background: rgba(31, 61, 99, 0.04);
}
.attendance-session-note {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border-left: 3px solid #c2410c;
  background: rgba(220, 38, 38, 0.08);
  max-width: 42rem;
}
.attendance-session-note-line {
  font-size: 0.92rem;
  line-height: 1.35;
  color: #7f1d1d;
}
.attendance-session-note-line + .attendance-session-note-line {
  margin-top: 4px;
}
.attendance-session-note-line strong {
  font-weight: 700;
}
body[data-theme="dark"] .attendance-session-note {
  background: rgba(239, 68, 68, 0.14);
  border-left-color: #fca5a5;
}
body[data-theme="dark"] .attendance-session-note-line {
  color: #fecaca;
}
.attendance-session-msg-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: middle;
  border-radius: 999px;
  background: rgba(230, 81, 0, 0.12);
  color: #c2410c;
  white-space: nowrap;
}
.attendance-session-msg-badge--answered {
  background: rgba(46, 125, 50, 0.14);
  color: #2e7d32;
}
.attendance-session-msg-badge--reply {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}
.attendance-session-row .attendance-session-row-main strong {
  flex-wrap: wrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body[data-theme="dark"] .attendance-session-msg-badge--answered {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}
body[data-theme="dark"] .attendance-session-msg-badge--reply {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}
body[data-theme="dark"] .attendance-message-thread {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .attendance-msg-bubble--parent {
  background: rgba(230, 81, 0, 0.15);
}
body[data-theme="dark"] .attendance-msg-bubble--trainer {
  background: rgba(37, 99, 235, 0.18);
}

/* Eltern-Light: Nachrichten klar der Termin-Karte zugeordnet */
.public-light-session-card .public-light-session-messages {
  width: 100%;
  margin: 4px 0 8px;
  padding: 10px 0 4px;
  border-top: 2px solid rgba(31, 61, 99, 0.14);
}
.public-light-session-card .attendance-parent-dialog {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.public-light-session-card .attendance-parent-dialog-title {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--color-text, #0e1a2b);
}
.public-light-session-card .attendance-message-thread {
  margin-top: 4px;
}

/* Eltern-Light: kompakter Nachrichtenverlauf + Helfer */
.attendance-parent-dialog-details {
  margin: 6px 0 4px;
  border-radius: 8px;
  border: 1px solid rgba(31, 61, 99, 0.12);
  background: rgba(31, 61, 99, 0.03);
}
.attendance-parent-dialog-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  list-style: none;
  color: var(--color-text, #0e1a2b);
}
.attendance-parent-dialog-summary::-webkit-details-marker {
  display: none;
}
.attendance-parent-dialog-inner {
  padding: 0 10px 10px;
  max-height: min(40vh, 320px);
  overflow-y: auto;
}
.attendance-parent-dialog-hint {
  margin: 0 0 6px;
  font-size: 0.85em;
}
.attendance-message-thread--compact {
  gap: 4px;
  margin: 4px 0 6px;
  padding: 6px 8px;
}
.attendance-msg-bubble--compact {
  padding: 5px 8px;
  font-size: 0.94rem;
}
.attendance-msg-bubble-wrap--compact + .attendance-msg-bubble-wrap--compact.attendance-msg-bubble-wrap--parent,
.attendance-msg-bubble-wrap--compact.attendance-msg-bubble-wrap--parent
  + .attendance-msg-bubble-wrap--compact.attendance-msg-bubble-wrap--parent {
  margin-top: -2px;
}
.attendance-msg-bubble-wrap--compact.attendance-msg-bubble-wrap--trainer
  + .attendance-msg-bubble-wrap--compact.attendance-msg-bubble-wrap--trainer {
  margin-top: -2px;
}
.public-light-helper-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tournament-group-audit--warn {
  color: #b45309;
  font-weight: 600;
  margin: 0.5rem 0;
}

.tournament-group-audit--ok {
  color: #15803d;
  font-weight: 600;
  margin: 0.5rem 0;
}

.tournament-team-unassigned {
  color: #b45309;
  font-weight: 600;
}

.tournament-unassigned-block {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
}

body[data-theme="dark"] .tournament-unassigned-block {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.public-light-session-card .actions {
  margin-top: 2px;
}

/* Kompakte Eltern-Rückmelde-Karten (data-rsvp-layout=compact, Default) */
body[data-rsvp-layout="compact"] .public-light-session-card {
  gap: 0.35rem !important;
  padding: 0.65rem 0.75rem !important;
}
body[data-rsvp-layout="compact"] .public-light-statusline {
  margin: 0.15rem 0 0.1rem;
  gap: 0.35rem;
}
body[data-rsvp-layout="compact"] .public-light-status-pill {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0;
  padding: 0.2rem 0.55rem;
}
body[data-rsvp-layout="compact"] .public-light-session-card--confirmed {
  background: rgba(46, 125, 50, 0.04);
}
/* Zusage / Offen / Absage: 3er-Auswahl — aktiv gefüllt, sonst nur Rand */
body[data-page^="public-attendance"][data-rsvp-layout="compact"] .public-light-vote-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.15rem;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn {
  min-height: 2.45rem;
  padding: 0.35rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  border-radius: 10px;
  box-shadow: none !important;
  background-image: none !important;
  flex: 1 1 0;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--yes {
  border: 1.5px solid #2e7d32 !important;
  color: #2e7d32 !important;
  background: #fff !important;
  background-image: none !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--yes.is-active {
  color: #fff !important;
  background: #2e7d32 !important;
}
body[data-page^="public-attendance"] .public-light-event-reg-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0.15rem 0 0.35rem;
  font-weight: 700;
  text-decoration: none !important;
  min-height: 2.6rem;
  line-height: 1.25;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 2px solid #1e4fa1 !important;
  color: #fff !important;
  background: #1e4fa1 !important;
}
body[data-page^="public-attendance"] .public-light-helper-need {
  margin: 0 0 0.2rem;
  color: #b54708;
  font-weight: 650;
}
body[data-page^="public-attendance"] .public-light-status-pill--helper-need {
  background: #fff7ed;
  color: #b54708;
  border: 1px solid #f79009;
}
body[data-page^="public-attendance"] .public-light-status-pill--helper-ok {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #12b76a;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--no {
  border: 1.5px solid #c62828 !important;
  color: #c62828 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--no.is-active {
  color: #fff !important;
  background: #c62828 !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open {
  border: 1.5px solid #78909c !important;
  color: #546e7a !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  flex: 1 1 0 !important;
  width: auto !important;
  min-height: 2.45rem !important;
  height: auto !important;
  margin-top: 0 !important;
  padding: 0.35rem 0.35rem !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  border-radius: 10px !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open.is-active {
  color: #fff !important;
  background: #607d8b !important;
  border-color: #607d8b !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open:hover,
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open:focus-visible {
  background: rgba(96, 125, 139, 0.08) !important;
  color: #455a64 !important;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open.is-active:hover,
body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open.is-active:focus-visible {
  background: #546e7a !important;
  color: #fff !important;
}
@media (min-width: 420px) {
  body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn,
  body[data-page^="public-attendance"][data-rsvp-layout="compact"] button.cta.public-light-vote-btn--open {
    font-size: 0.84rem !important;
    padding: 0.4rem 0.45rem !important;
  }
}
body[data-rsvp-layout="compact"] .public-light-rsvp-reset-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #546e7a;
  font: inherit;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
body[data-rsvp-layout="compact"] .public-light-rsvp-reset-link:hover,
body[data-rsvp-layout="compact"] .public-light-rsvp-reset-link:focus-visible {
  color: #37474f;
  background: rgba(84, 110, 122, 0.08);
}
body[data-rsvp-layout="compact"] .public-light-session-card > .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
body[data-rsvp-layout="compact"] .public-light-comment-details {
  margin-top: 0.35rem;
  border: none;
  background: transparent;
}
body[data-rsvp-layout="compact"] .public-light-comment-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(31, 61, 99, 0.28);
  background: #fff;
  color: #1f3d63;
  font-size: 0.86rem;
  font-weight: 550;
  line-height: 1.25;
}
body[data-rsvp-layout="compact"] .public-light-helper-summary {
  margin-top: 0.2rem;
  gap: 0.45rem !important;
  font-size: 0.86rem;
}
body[data-rsvp-layout="compact"] .public-light-helper-summary [data-helper-summary-text] {
  font-weight: 550;
  color: #334155;
}
body[data-rsvp-layout="compact"] .public-light-helper-summary .cta.ghost {
  min-height: 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
}
body[data-page^="public-attendance"][data-rsvp-layout="compact"] .page > .card > .card-header {
  padding: 0.4rem 0.7rem 0.35rem !important;
}
/* Weniger Leerraum über der Überschrift (Content + Topbar) */
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .content {
  padding: 8px 10px 12px !important;
  gap: 8px !important;
  min-height: 0;
}
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .page {
  margin: 0;
  padding: 0;
}
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .topbar {
  flex-wrap: nowrap;
  padding: 0.15rem 0.35rem;
  min-height: 2.15rem;
  gap: 0.15rem;
}
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .topbar-brand-logo {
  width: 22px;
  height: 22px;
}
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .topbar-actions .icon-button,
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .sf-lang-globe-btn {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
}
body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .menu-button {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  font-size: 0.95rem;
}
@media (max-width: 960px) {
  body.sf-guest-shell[data-page^="public-attendance"][data-rsvp-layout="compact"] .help-panel {
    top: calc(env(safe-area-inset-top, 0px) + 4.75rem);
  }
}
/* Profil wechseln: Terminkarten nicht überdecken */
body.sf-native-app[data-page^="public-attendance"] #publicLightSessions,
body.sf-native-app[data-page^="public-attendance"] #publicLightPlayerSessions {
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}
body.sf-native-app[data-page^="public-attendance"] .public-light-device-footer {
  margin-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
body.sf-native-app[data-page^="public-attendance"] .sf-native-club-switch {
  font-size: 0.78rem;
  padding: 7px 11px;
  opacity: 0.9;
  bottom: max(14px, env(safe-area-inset-bottom));
}

/* Store-App: schwebender Profilwechsel (auch auf Login/Gast-Seiten) */
.sf-native-club-switch {
  position: fixed;
  z-index: 12000;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.sf-native-club-switch:hover,
.sf-native-club-switch:focus-visible {
  border-color: #38bdf8;
  color: #f8fafc;
  outline: none;
}

body.sf-native-app.sf-guest-shell .sf-native-club-switch {
  bottom: max(16px, env(safe-area-inset-bottom));
}

/* Eltern-Zugangsanfragen: Link + Freigabe-Buttons mobil */
.parent-access-club-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.parent-access-club-link__input {
  width: 100%;
  font-size: 0.86rem;
}

.parent-access-club-link__copy {
  align-self: stretch;
  width: 100%;
}

.parent-access-request-item > div:first-child {
  min-width: 0;
}

.parent-access-request-item > div:first-child .meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 560px) {
  .parent-access-request-item > .actions {
    flex-direction: column;
  }

  .parent-access-request-item > .actions > .cta {
    width: 100%;
    flex: 1 1 auto;
  }
}

.parent-access-requests-table-wrap {
  overflow-x: auto;
  margin-top: 0.35rem;
}

.parent-access-requests-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  border: 1px solid var(--border-subtle, rgba(31, 61, 99, 0.12));
  border-radius: 8px;
  overflow: hidden;
}

.parent-access-requests-table th,
.parent-access-requests-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle, rgba(31, 61, 99, 0.08));
}

.parent-access-requests-table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted, #4a5568);
  background: var(--surface-muted, rgba(31, 61, 99, 0.05));
  white-space: nowrap;
}

.parent-access-requests-table tbody tr:last-child td {
  border-bottom: none;
}

.parent-access-requests-table__select {
  min-width: 7.5rem;
  max-width: 12rem;
  font-size: 0.86rem;
}

.parent-access-requests-table__email,
.parent-access-requests-table__msg {
  word-break: break-word;
  max-width: 10rem;
}

.parent-access-requests-table__new {
  text-align: center;
  width: 2.5rem;
}

.parent-access-requests-table__actions {
  white-space: nowrap;
}

.parent-access-requests-table__actions .cta {
  margin: 0 0.2rem 0.2rem 0;
  font-size: 0.82rem;
  padding: 0.35rem 0.55rem;
}

@media (max-width: 960px) {
  .parent-access-requests-table-wrap {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .parent-access-requests-table {
    font-size: 0.82rem;
  }

  .parent-access-requests-table__select {
    min-width: 6rem;
    max-width: 9rem;
  }
}

.parent-access-approve-modal .modal-panel {
  max-width: 560px;
  width: calc(100% - 24px);
}

.parent-access-approve-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.parent-access-approve-data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  border: 1px solid var(--border-subtle, rgba(31, 61, 99, 0.12));
  border-radius: 8px;
  overflow: hidden;
}

.parent-access-approve-data th,
.parent-access-approve-data td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle, rgba(31, 61, 99, 0.08));
}

.parent-access-approve-data tr:last-child th,
.parent-access-approve-data tr:last-child td {
  border-bottom: none;
}

.parent-access-approve-data th {
  width: 34%;
  font-weight: 600;
  color: var(--text-muted, #4a5568);
  background: var(--surface-muted, rgba(31, 61, 99, 0.04));
}

.parent-access-approve-data td {
  word-break: break-word;
}

.parent-access-approve-assign-head {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted, #4a5568);
}

.parent-access-approve-assign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.parent-access-approve-new {
  grid-column: 1 / -1;
}

.parent-access-approve-warn {
  margin: 0;
}

@media (max-width: 520px) {
  .parent-access-approve-assign {
    grid-template-columns: 1fr;
  }
}

.parent-access-approve-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.parent-access-approve-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted, #4a5568);
}

.parent-access-approve-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.parent-access-approve-check input {
  margin-top: 0.15rem;
}

.parent-access-approve-fb {
  min-height: 1.2em;
  color: #b71c1c;
}

.parent-access-approve-actions {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  gap: 8px;
}

.parent-access-approve-form .input[disabled],
.parent-access-approve-form .textarea[disabled] {
  opacity: 0.72;
}

/* Store-App: Hamburger-Men? ? gr??ere Touch-Fl?che, lesbare Sidebar */
body.sf-native-app .app-shell {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}
@media (max-width: 960px) {
  body.sf-native-app .menu-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    z-index: 70;
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(31, 61, 99, 0.12);
    box-shadow: 0 2px 8px rgba(8, 20, 44, 0.12);
    font-size: 1.15rem;
    -webkit-tap-highlight-color: transparent;
  }
  body.sf-native-app.nav-open .sidebar,
  body.sf-native-app .sidebar {
    background: #ffffff;
    opacity: 1;
    backdrop-filter: none;
    box-shadow: 0 18px 48px rgba(8, 20, 44, 0.28);
    border: 1px solid rgba(31, 61, 99, 0.12);
  }
  body[data-theme="dark"].sf-native-app.nav-open .sidebar,
  body[data-theme="dark"].sf-native-app .sidebar {
    background: #111c30;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
  body.sf-native-app .mobile-backdrop {
    background: rgba(8, 20, 44, 0.55);
    z-index: 55;
  }
  body.sf-native-app .topbar {
    position: relative;
    z-index: 65;
  }
  body.sf-native-app.nav-open .topbar {
    z-index: 50;
  }
  body.sf-native-app.nav-open .sidebar {
    z-index: 80;
  }
}

/* Turnier-Spielplan-Editor (RSV 267?270) */
.schedule-table .schedule-pairing-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.schedule-table .schedule-team-select {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
}

.schedule-table .schedule-pair-sep {
  flex: 0 0 auto;
  color: var(--color-muted, #64748b);
  font-weight: 600;
}

.schedule-save-status {
  font-size: 11px;
  min-width: 4.5rem;
  text-align: right;
}

.schedule-save-status.schedule-save-error {
  color: #b42318;
  min-width: 6rem;
  max-width: 10rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tournament-schedule-manual-hint p,
.tournament-schedule-plausi-feedback p {
  margin: 0.4rem 0 0;
}

.tournament-schedule-manual-hint p:first-child,
.tournament-schedule-plausi-feedback p:first-child {
  margin-top: 0;
}

.tournament-schedule-plausi-feedback {
  margin-top: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid #b42318;
  background: rgba(180, 35, 24, 0.08);
  border-radius: 4px;
  color: #b42318;
}

.tournament-schedule-plausi-block + .tournament-schedule-plausi-block {
  margin-top: 0.65rem;
}

.tournament-schedule-plausi-title {
  display: block;
  font-weight: 650;
}

.tournament-sim-panel .modal-header {
  align-items: flex-start;
  gap: 12px;
}
.tournament-sim-panel .modal-header .actions {
  flex-shrink: 0;
}
.tournament-sim-note {
  margin: 0 0 12px;
}
.tournament-sim-checks {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
}
.tournament-sim-checks th,
.tournament-sim-checks td {
  border: 1px solid #d7dee8;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.tournament-sim-checks th {
  background: #f4f7fb;
}
.tournament-sim-level-ok { color: #0a7a3e; font-weight: 650; }
.tournament-sim-level-warn { color: #b45309; font-weight: 650; }
.tournament-sim-level-fail { color: #b42318; font-weight: 650; }
.tournament-sim-section-title {
  margin: 16px 0 8px;
  font-size: 1.05rem;
}
.tournament-sim-matches {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.tournament-sim-matches th,
.tournament-sim-matches td {
  border: 1px solid #d7dee8;
  padding: 5px 7px;
  text-align: left;
}
.tournament-sim-matches th { background: #f4f7fb; }
.tournament-sim-sim-flag { color: #5b6573; font-style: italic; }
@media print {
  body.sf-print-tournament-sim * { visibility: hidden; }
  body.sf-print-tournament-sim #tournamentSimModal,
  body.sf-print-tournament-sim #tournamentSimModal * { visibility: visible; }
  body.sf-print-tournament-sim #tournamentSimModal {
    position: static;
    inset: auto;
    background: #fff;
    display: block;
  }
  body.sf-print-tournament-sim .tournament-sim-panel {
    box-shadow: none;
    display: block;
  }
  body.sf-print-tournament-sim #tournamentSimPrint,
  body.sf-print-tournament-sim #tournamentSimClose {
    display: none;
  }
}

.tournament-schedule-plausi-list,
.tournament-schedule-manual-hint-list {
  font-weight: 550;
}

.schedule-editor-tools {
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0.75rem 0 0.5rem;
  align-items: center;
  row-gap: 12px;
}

.schedule-editor-tools .schedule-tool-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.schedule-editor-tools #scheduleFillGroup {
  min-width: 11.5rem;
  max-width: 16rem;
}

.schedule-editor-tools #scheduleFillField {
  width: 4.25rem;
  min-width: 3.75rem;
}

.schedule-editor-tools #scheduleFillEndTime {
  min-width: 8.25rem;
  width: 8.25rem;
}

.schedule-editor-tools .input.compact[type="time"] {
  min-width: 8.25rem;
  padding-right: 0.35rem;
}

.group-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-color-label {
  cursor: pointer;
  user-select: none;
  min-width: 5.5rem;
}

.tournament-meta-timing {
  white-space: nowrap;
}

.tournament-teams-list-host .list-item > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.tournament-teams-list-host .tournament-team-name-input {
  width: 100%;
  min-width: 0;
}

@media print {
  body[data-page="admin-tournament-results"] .results-print-meta .tournament-meta-line1,
  body[data-page="admin-tournament-results"] .results-print-meta .tournament-meta-line2 {
    display: inline;
  }

  body[data-page="admin-tournament-results"] .results-print-meta .tournament-meta-line2::before {
    content: " \25BE ";
  }

  body[data-page="admin-tournament-results"] .results-print-desc {
    font-weight: 700;
  }
}

/* Mitfahrzentrale (Eltern-Portale + Trainer-Termindetail) */
.sf-session-carpool {
  margin: 0.65rem 0 0.35rem;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  padding: 0;
  background: var(--card-bg, #fff);
  overflow: hidden;
}

.sf-session-carpool--direct {
  border: none;
  background: transparent;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.sf-session-carpool-direct-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.35;
}

.sf-session-carpool-summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 0.55rem 0.75rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 9px;
  line-height: 1.35;
}

.sf-session-carpool-summary::before {
  content: "\25BE ";
  font-size: 0.72rem;
  opacity: 0.75;
}

.sf-session-carpool[open] > .sf-session-carpool-summary::before {
  content: "\25B4 ";
}

.sf-session-carpool-summary::-webkit-details-marker {
  display: none;
}

.sf-session-carpool-inner {
  padding: 0.45rem 0.75rem 0.65rem;
}

.sf-session-carpool-hint {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.sf-session-carpool-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.sf-session-carpool-offer {
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.6);
}

.sf-session-carpool-offer--mine {
  border-color: var(--accent, #2563eb);
}

.sf-session-carpool-offer--booked {
  background: rgba(34, 197, 94, 0.08);
}

.sf-session-carpool-provider {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sf-session-carpool-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin: 0.12rem 0;
  line-height: 1.4;
}

.sf-session-carpool-row-label {
  min-width: 5.75rem;
  color: var(--muted, #64748b);
  flex-shrink: 0;
}

.sf-session-carpool-passengers {
  margin-top: 0.35rem;
  font-size: 0.88rem;
}

.sf-session-carpool-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sf-session-carpool-form {
  margin-top: 0.35rem;
}

.sf-session-carpool-form-inner {
  padding-top: 0.35rem;
}

.sf-session-carpool-form-inner .field {
  margin-bottom: 0.5rem;
}

.sf-session-carpool-form-summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
}

.sf-session-carpool-form-summary::before {
  content: "\25BE ";
  font-size: 0.72rem;
  opacity: 0.75;
}

.sf-session-carpool-form[open] > .sf-session-carpool-form-summary::before {
  content: "\25B4 ";
}

.sf-session-carpool-empty {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.public-light-session-carpool .sf-session-carpool {
  margin-top: 0.75rem;
  border-color: rgba(100, 116, 139, 0.35);
}

.public-light-session-carpool .sf-session-carpool-summary {
  font-weight: 500;
  font-size: 0.95rem;
  background: rgba(148, 163, 184, 0.06);
}

/* Mitfahren: Dark Mode Lesbarkeit (Eltern-Portal + Trainer) */
body[data-theme="dark"] .sf-session-carpool {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e8eef6;
}

body[data-theme="dark"] .sf-session-carpool-summary,
body[data-theme="dark"] .public-light-session-carpool .sf-session-carpool-summary {
  background: rgba(148, 163, 184, 0.16);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .sf-session-carpool-direct-title,
body[data-theme="dark"] .sf-session-carpool-provider,
body[data-theme="dark"] .sf-session-carpool-form-summary,
body[data-theme="dark"] .sf-session-carpool-row-value,
body[data-theme="dark"] .sf-session-carpool-passengers,
body[data-theme="dark"] .sf-session-carpool-hint,
body[data-theme="dark"] .sf-session-carpool-empty {
  color: #e8eef6;
}

body[data-theme="dark"] .sf-session-carpool-row-label,
body[data-theme="dark"] .sf-session-carpool-hint.meta {
  color: #a8b8cc !important;
}

body[data-theme="dark"] .sf-session-carpool-offer {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.32);
  color: #e8eef6;
}

body[data-theme="dark"] .sf-session-carpool-offer--mine {
  border-color: rgba(110, 168, 255, 0.55);
  background: rgba(30, 58, 95, 0.55);
}

body[data-theme="dark"] .sf-session-carpool-offer--booked {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.35);
}

body[data-theme="dark"] .sf-session-carpool-form-inner .input,
body[data-theme="dark"] .sf-session-carpool-form-inner select.input,
body[data-theme="dark"] .sf-session-carpool-form-inner textarea.input {
  background: #0f172a;
  color: #e8eef6;
  border-color: rgba(148, 163, 184, 0.4);
}

body[data-theme="dark"] .sf-session-carpool-form-inner .input::placeholder,
body[data-theme="dark"] .sf-session-carpool-form-inner textarea.input::placeholder {
  color: #94a3b8;
}

.attendance-detail-carpool-wrap .sf-session-carpool {
  margin: 0.75rem 0;
}

/* Route planen (Kartendienst) */
.sf-route-plan-row {
  margin-top: 0.25rem;
}

.sf-route-plan-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sf-blue, #2563eb);
  text-decoration: none;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  background: rgba(37, 99, 235, 0.06);
  line-height: 1.25;
}

.sf-route-plan-link::before {
  content: none;
}

.sf-route-plan-link:hover {
  background: rgba(37, 99, 235, 0.12);
  text-decoration: none;
}

.sf-route-plan-link--compact {
  font-size: 0.82rem;
  padding: 0.22rem 0.48rem;
}

body[data-theme="dark"] .sf-route-plan-link {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(59, 130, 246, 0.14);
}

body[data-theme="dark"] .sf-route-plan-link:hover {
  background: rgba(59, 130, 246, 0.24);
}

#attendanceDetailMeta .sf-route-plan-link {
  display: inline-flex;
  margin-top: 0.35rem;
}

/* Vereins-Neuigkeiten */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.news-feed-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 10px;
  background: var(--card, #fff);
}
.news-feed-date {
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.35rem;
}
.news-feed-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.news-feed-body {
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Eltern-Portale: Checkbox-Matrix (Terminoptionen) */
.sf-portal-flags-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.sf-portal-flags-table thead th {
  text-align: center;
  padding: 8px 6px;
  font-weight: 600;
  font-size: 0.78rem;
  border-bottom: 2px solid var(--border, #2a3f5c);
  background: var(--card, #fff);
}
.sf-portal-flags-table thead th:first-child {
  text-align: left;
  padding-left: 0;
}
.sf-portal-flags-table tbody tr:nth-child(odd) {
  background: rgba(26, 127, 212, 0.05);
}
.sf-portal-flags-table tbody tr:nth-child(even) {
  background: rgba(15, 26, 46, 0.03);
}
.sf-portal-flags-table tbody tr:hover {
  background: rgba(26, 127, 212, 0.1);
}
.sf-portal-flags-table td {
  padding: 8px 6px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border, #dbe3ef);
}
.sf-portal-flags-table td:first-child {
  padding-left: 10px;
  font-weight: 500;
}
.sf-portal-flags-table td input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

/* Spieler & Mannschaften: Handzettel / Plakate */
.sf-parent-material-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sf-parent-material-quick-btn {
  font-size: 0.82rem !important;
  padding: 0.35rem 0.65rem !important;
}
.club-parent-material-details[open] summary {
  margin-bottom: 0.25rem;
}

/* Helferaufgaben-Katalog (Stufe 3) */
.sf-helper-catalog-editor__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.sf-helper-catalog-editor__row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.4fr) 5.5rem minmax(6rem, 7rem) auto auto auto;
  gap: 8px;
  align-items: center;
}

.sf-helper-catalog-editor__assign {
  font-size: 0.82rem;
  padding: 0.35rem 0.4rem !important;
}

.sf-helper-catalog-editor__slots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sf-helper-catalog-editor__slots-num {
  width: 3.2rem;
  padding: 0.35rem 0.4rem !important;
  font-size: 0.82rem;
}

.sf-helper-catalog-editor__unlimited {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sf-gray-600);
  white-space: nowrap;
}

.sf-helper-catalog-pick__label-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sf-helper-catalog-pick__meta {
  font-size: 0.72rem;
  line-height: 1.2;
}

.sf-helper-catalog-editor__flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sf-gray-600);
  white-space: nowrap;
}

.sf-helper-catalog-editor__remove {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.82rem !important;
}

.sf-helper-catalog-editor__add {
  margin-top: 4px;
}

.sf-helper-catalog-pick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 8px;
}

.sf-helper-catalog-pick__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border, #2a3f5c);
  background: rgba(255, 255, 255, 0.02);
}

.sf-helper-catalog-pick__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sf-helper-catalog-pick__slots-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding-left: 1.55rem;
}

.sf-helper-catalog-pick__slots-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sf-gray-600);
}

.sf-helper-catalog-pick__slots-num {
  width: 4.2rem;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.88rem;
}

.sf-helper-catalog-pick__unlimited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sf-gray-600);
}

.sf-helper-catalog-pick__item--active,
.sf-helper-catalog-pick__item:has(input:checked) {
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--sf-gray-100);
  background: var(--sf-white);
  color: var(--sf-navy, #1a2b44);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.sf-helper-catalog-pick__item:has(input:checked) {
  border-color: rgba(107, 198, 40, 0.45);
  background: linear-gradient(160deg, #f4fbea 0%, var(--sf-white) 100%);
}

.sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__meta,
.sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__slots-label,
.sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__unlimited {
  color: var(--sf-gray-600);
}

body[data-theme="dark"] .sf-helper-catalog-pick__item {
  background: rgba(15, 22, 38, 0.92);
  border-color: var(--color-border);
  color: var(--color-text);
}

body[data-theme="dark"] .sf-helper-catalog-pick__item:has(input:checked),
body[data-theme="dark"] .sf-helper-catalog-pick__item--active {
  background: linear-gradient(160deg, rgba(36, 68, 28, 0.72) 0%, rgba(18, 32, 24, 0.95) 100%);
  border-color: rgba(142, 214, 84, 0.5);
  color: var(--color-text);
}

body[data-theme="dark"] .sf-helper-catalog-pick__slots-label,
body[data-theme="dark"] .sf-helper-catalog-pick__unlimited,
body[data-theme="dark"] .sf-helper-catalog-editor__unlimited,
body[data-theme="dark"] .sf-helper-catalog-editor__flag {
  color: var(--color-muted);
}

body[data-theme="dark"] .sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__meta,
body[data-theme="dark"] .sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__slots-label,
body[data-theme="dark"] .sf-helper-catalog-pick__item:has(input:checked) .sf-helper-catalog-pick__unlimited {
  color: #c5d4e8;
}

body[data-theme="dark"] .sf-helper-catalog-pick__label-wrap > span:first-child {
  color: var(--color-text);
}

body[data-theme="dark"] .sf-helper-catalog-pick__unlimited-cb,
body[data-theme="dark"] .sf-helper-catalog-pick__cb {
  accent-color: var(--color-accent);
}

body[data-theme="dark"] #attendanceNewWrap .field > label,
body[data-theme="dark"] #eventNewWrap .field > label {
  color: var(--color-text);
}

body[data-theme="dark"] .sf-helper-catalog-pick__empty {
  color: var(--color-muted);
}

.sf-helper-catalog-pick__adhoc {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

@media (max-width: 640px) {
  .sf-helper-catalog-editor__row {
    grid-template-columns: 1fr;
  }
}

/* ??? Mannschaftslink: ?ffentliche Terminseite ??? */
body.sf-team-schedule-lite {
  --sf-ts-ink: #0f2744;
  --sf-ts-sky: #0b6e99;
  --sf-ts-sky-deep: #084f6f;
  --sf-ts-turf: #1f7a4d;
  --sf-ts-match: #c45c16;
  --sf-ts-tourney: #5b4bb5;
  --sf-ts-event: #0f766e;
  --sf-ts-surface: rgba(255, 255, 255, 0.92);
  --sf-ts-card: #ffffff;
  background:
    radial-gradient(1200px 520px at 12% -10%, rgba(11, 110, 153, 0.28), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(31, 122, 77, 0.22), transparent 50%),
    linear-gradient(165deg, #e8f4fa 0%, #f3f7f4 42%, #eef2f7 100%);
  min-height: 100dvh;
}

body.sf-team-schedule-lite .sidebar,
body.sf-team-schedule-lite .menu-button,
body.sf-team-schedule-lite .topbar-actions,
body.sf-team-schedule-lite .topbar-left .pill,
body.sf-team-schedule-lite .topbar-left .page-title,
body.sf-team-schedule-lite #pageHintToggle,
body.sf-team-schedule-lite #darkModeToggle,
body.sf-team-schedule-lite #loginButton,
body.sf-team-schedule-lite #sfLangSwitcherHost {
  display: none !important;
}

body.sf-team-schedule-lite .topbar {
  display: none !important;
}

body.sf-team-schedule-lite .app-shell {
  grid-template-columns: 1fr;
  max-width: 100%;
  background: transparent;
}

body.sf-team-schedule-lite .content {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.1rem 1rem 2.5rem;
  background: transparent;
  box-shadow: none;
  border: 0;
}

body.sf-team-schedule-lite .page {
  padding: 0;
}

.sf-team-schedule {
  border: 0;
  border-radius: 1.35rem;
  padding: 0;
  overflow: hidden;
  background: var(--sf-ts-surface);
  box-shadow:
    0 18px 48px rgba(15, 39, 68, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(8px);
}

.sf-team-schedule__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.6rem 1.25rem 1.25rem;
  background:
    linear-gradient(145deg, rgba(11, 110, 153, 0.95) 0%, rgba(8, 79, 111, 0.98) 48%, rgba(31, 122, 77, 0.9) 100%);
  color: #f5fbff;
}

.sf-team-schedule__logo-wrap {
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 1.15rem;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0.45rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.sf-team-schedule__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sf-team-schedule__club {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.88;
  font-weight: 600;
}

.sf-team-schedule__title {
  margin: 0;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.sf-team-schedule__meta {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.sf-team-schedule__hint {
  margin: 0.9rem 1.15rem 0;
  color: #4b6078;
  font-weight: 600;
}

.sf-team-schedule__list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem 1.05rem 0.35rem;
  margin: 0 !important;
}

.sf-team-schedule__card {
  position: relative;
  display: grid;
  grid-template-columns: 0.35rem 1fr;
  gap: 0;
  border-radius: 0.95rem;
  overflow: hidden;
  background: var(--sf-ts-card);
  border: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: 0 6px 18px rgba(15, 39, 68, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sf-team-schedule__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 39, 68, 0.1);
}

.sf-team-schedule__card-accent {
  background: var(--sf-ts-sky);
}

.sf-team-schedule__card--training .sf-team-schedule__card-accent {
  background: var(--sf-ts-turf);
}
.sf-team-schedule__card--match .sf-team-schedule__card-accent {
  background: var(--sf-ts-match);
}
.sf-team-schedule__card--tournament .sf-team-schedule__card-accent {
  background: var(--sf-ts-tourney);
}
.sf-team-schedule__card--event .sf-team-schedule__card-accent {
  background: var(--sf-ts-event);
}
.sf-team-schedule__card--cancelled {
  opacity: 0.78;
}
.sf-team-schedule__card--cancelled .sf-team-schedule__card-accent {
  background: #94a3b8;
}

.sf-team-schedule__card-body {
  padding: 0.85rem 0.95rem 0.9rem;
  min-width: 0;
}

.sf-team-schedule__card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.sf-team-schedule__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(11, 110, 153, 0.12);
  color: var(--sf-ts-sky-deep);
}

.sf-team-schedule__card--training .sf-team-schedule__badge {
  background: rgba(31, 122, 77, 0.12);
  color: #145c39;
}
.sf-team-schedule__card--match .sf-team-schedule__badge {
  background: rgba(196, 92, 22, 0.14);
  color: #9a3f0a;
}
.sf-team-schedule__card--tournament .sf-team-schedule__badge {
  background: rgba(91, 75, 181, 0.12);
  color: #4338a5;
}
.sf-team-schedule__card--event .sf-team-schedule__badge {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.sf-team-schedule__date {
  font-size: 0.84rem;
  font-weight: 650;
  color: #334155;
}

.sf-team-schedule__card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--sf-ts-ink);
  font-weight: 750;
}

.sf-team-schedule__card-title--cancelled {
  text-decoration: line-through;
  color: #64748b;
}

.sf-team-schedule__card-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #52657a;
}

.sf-team-schedule__empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: #52657a;
  font-weight: 600;
  border: 1px dashed rgba(15, 39, 68, 0.18);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.55);
}

.sf-team-schedule__actions {
  padding: 0.35rem 1.05rem 0.35rem;
}

.sf-team-schedule__actions--refresh {
  padding-bottom: 1.15rem;
}

.sf-team-schedule__more,
.sf-team-schedule__refresh {
  width: 100%;
  justify-content: center;
}

.sf-team-schedule__more {
  background: linear-gradient(135deg, var(--sf-ts-sky) 0%, var(--sf-ts-turf) 100%);
  border: 0;
  color: #fff;
  font-weight: 700;
}

.sf-team-schedule__more:hover {
  filter: brightness(1.05);
}

@media (min-width: 640px) {
  .sf-team-schedule__hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 1.6rem;
  }
  .sf-team-schedule__logo-wrap {
    width: 6.5rem;
    height: 6.5rem;
  }
}

.sf-team-schedule__route {
  margin: 0.55rem 0 0;
}
.sf-team-schedule .sf-route-plan-link {
  color: var(--sf-ts-sky-deep, #084f6f);
  border-color: rgba(11, 110, 153, 0.35);
  background: rgba(11, 110, 153, 0.08);
}
.sf-team-schedule .sf-route-plan-link:hover {
  background: rgba(11, 110, 153, 0.14);
}

/*
 * Teamseite Seiten-Look: kritische Viewport-/Wasserzeichen-Regeln hier in styles.css,
 * damit der Look nicht nur von portal-attendance-themes.css abhaengt (Cache/Reihenfolge).
 */
body.sf-team-schedule-lite[data-portal-theme] {
  background: transparent !important;
}
body.sf-team-schedule-lite[data-portal-theme] .app-shell,
body.sf-team-schedule-lite[data-portal-theme] .content,
body.sf-team-schedule-lite[data-portal-theme] .page {
  background: transparent !important;
}
body.sf-team-schedule-lite[data-portal-theme]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body.sf-team-schedule-lite[data-portal-theme] .app-shell {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

body.sf-team-schedule-lite[data-portal-theme="spielfunk"]::before {
  background:
    radial-gradient(ellipse 70% 55% at 100% -10%, rgba(26, 127, 212, 0.42), transparent 55%),
    radial-gradient(ellipse 60% 50% at -5% 100%, rgba(107, 198, 40, 0.38), transparent 50%),
    linear-gradient(160deg, #e8eef8 0%, #d5e6f8 42%, #e4f3d8 100%);
}
body.sf-team-schedule-lite[data-portal-theme="sportlich"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(26, 127, 212, 0.55), transparent 55%),
    linear-gradient(165deg, #0a1628 0%, #0f2744 45%, #123a5c 100%);
}
body.sf-team-schedule-lite[data-portal-theme="dezent"]::before {
  background: linear-gradient(180deg, #1c2430 0%, #151b24 55%, #10151c 100%);
}
body.sf-team-schedule-lite[data-portal-theme="sgm"]::before {
  background: linear-gradient(180deg, #0b2d63 0%, #0e1a2b 55%, #122244 100%);
}
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"]::before {
  background: linear-gradient(165deg, #1a0a0a 0%, #3a1010 40%, #0d1f0c 100%);
}

/* Wasserzeichen auf der Team-Karte (auch ohne portal-attendance-themes.css) */
body.sf-team-schedule-lite[data-portal-theme="sgm"] .page > .card.sf-team-schedule,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .page > .card.sf-team-schedule {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .page > .card.sf-team-schedule::after,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .page > .card.sf-team-schedule::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  transform: none;
  background-position: center 8rem;
  background-size: min(68%, 14rem);
  background-repeat: repeat-y;
  -webkit-mask-image: repeating-linear-gradient(
    to bottom,
    #000 0,
    #000 14rem,
    transparent 14rem,
    transparent 42rem
  );
  mask-image: repeating-linear-gradient(
    to bottom,
    #000 0,
    #000 14rem,
    transparent 14rem,
    transparent 42rem
  );
  -webkit-mask-size: 100% 42rem;
  mask-size: 100% 42rem;
  -webkit-mask-repeat: repeat-y;
  mask-repeat: repeat-y;
  -webkit-mask-position: 0 8rem;
  mask-position: 0 8rem;
  pointer-events: none;
  z-index: 0;
  opacity: var(--sf-portal-wm-opacity, 0.14);
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .page > .card.sf-team-schedule::after {
  background-image: url("brands/rsv/logo-composite.png?v=20260720a");
}
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .page > .card.sf-team-schedule::after {
  background-image: url("brands/tsv-einsingen/logo.png?v=20260719");
  background-size: min(58%, 13rem);
  opacity: var(--sf-portal-wm-opacity, 0.16);
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .page > .card.sf-team-schedule > *,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .page > .card.sf-team-schedule > * {
  position: relative;
  z-index: 1;
}

body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__hero {
  background: linear-gradient(180deg, #e8f0fc 0%, #ffffff 100%) !important;
  border-bottom: 2px solid #1e4fa1 !important;
  color: #0b2d63 !important;
  position: relative;
  overflow: hidden;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__title {
  color: #0b2d63 !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__club,
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__meta {
  color: #4a5d7a !important;
  opacity: 1 !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #0b2d63 0%, #1e4fa1 100%);
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__hero::after {
  content: "";
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 3.35rem;
  height: 3.35rem;
  background: url("brands/rsv/logo-composite.png?v=20260720a") center / contain no-repeat;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95),
    0 2px 10px rgba(14, 26, 43, 0.18);
  pointer-events: none;
  z-index: 2;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule {
  border: 1px solid #b8cae6 !important;
  box-shadow: 0 22px 52px rgba(14, 26, 43, 0.35) !important;
  background: #ffffff !important;
  position: relative;
  isolation: isolate;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__list,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__list {
  gap: 0.95rem;
  padding: 0.95rem 1.1rem 1.35rem !important;
  background: transparent;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__list::before,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__list::before {
  content: none !important;
  display: none !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.52) !important;
  box-shadow:
    0 8px 22px rgba(14, 26, 43, 0.08),
    0 0 0 1px rgba(30, 79, 161, 0.18) !important;
}
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.52) !important;
  box-shadow:
    0 8px 22px rgba(180, 24, 22, 0.08),
    0 0 0 1px rgba(84, 192, 78, 0.28) !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"]:has(#publicLightLogoWrap:not([hidden])) .sf-team-schedule__hero::after {
  content: none !important;
  display: none !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__hero {
  padding-right: 1.25rem !important;
  z-index: 2;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__more {
  background: linear-gradient(135deg, #1e4fa1, #0b2d63) !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule__refresh {
  border: 2px solid #1e4fa1 !important;
  color: #0b2d63 !important;
  background: #fff !important;
}
body.sf-team-schedule-lite[data-portal-theme="sgm"] .sf-team-schedule .sf-route-plan-link {
  color: #0b2d63;
  border-color: rgba(30, 79, 161, 0.35);
  background: rgba(30, 79, 161, 0.08);
}

body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__hero {
  background: linear-gradient(125deg, #e4211e 0%, #c41e1a 55%, #9e1815 100%) !important;
  border-bottom: 5px solid #54c04e !important;
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
}
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"]:has(#publicLightLogoWrap:not([hidden])) .sf-team-schedule__hero::after {
  content: none !important;
  display: none !important;
}
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__title,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__club,
body.sf-team-schedule-lite[data-portal-theme="tsv-einsingen"] .sf-team-schedule__meta {
  color: #ffffff !important;
  opacity: 1 !important;
}
body.sf-team-schedule-lite[data-portal-theme="sportlich"] .sf-team-schedule__hero {
  background: linear-gradient(115deg, #0f1a2e 0%, #0d5a9e 50%, #1a7fd4 100%) !important;
  border-bottom: 5px solid #6bc628 !important;
  color: #f8fafc !important;
}
body.sf-team-schedule-lite[data-portal-theme="sportlich"] .sf-team-schedule__title,
body.sf-team-schedule-lite[data-portal-theme="sportlich"] .sf-team-schedule__club,
body.sf-team-schedule-lite[data-portal-theme="sportlich"] .sf-team-schedule__meta {
  color: #f8fafc !important;
  opacity: 1 !important;
}
body.sf-team-schedule-lite[data-portal-theme="dezent"] .sf-team-schedule__hero {
  background: linear-gradient(180deg, #2f4056 0%, #243447 100%) !important;
  border-bottom: 3px solid #5b8fb8 !important;
  color: #f4f7fb !important;
}
body.sf-team-schedule-lite[data-portal-theme="dezent"] .sf-team-schedule__title,
body.sf-team-schedule-lite[data-portal-theme="dezent"] .sf-team-schedule__club,
body.sf-team-schedule-lite[data-portal-theme="dezent"] .sf-team-schedule__meta {
  color: #f4f7fb !important;
  opacity: 1 !important;
}
body.sf-team-schedule-lite[data-portal-theme="spielfunk"] .sf-team-schedule__hero {
  background: linear-gradient(145deg, #f4f7fb 0%, #dce9f8 48%, #e8f4e0 100%) !important;
  color: #0f1a2e !important;
}
body.sf-team-schedule-lite[data-portal-theme="spielfunk"] .sf-team-schedule__title {
  color: #0f1a2e !important;
}
body.sf-team-schedule-lite[data-portal-theme="spielfunk"] .sf-team-schedule__club,
body.sf-team-schedule-lite[data-portal-theme="spielfunk"] .sf-team-schedule__meta {
  color: #0d5a9e !important;
  opacity: 1 !important;
}


/* Mangelmeldung + Lost and Found */
.facility-page .facility-form { margin: 0.75rem 0 1.25rem; }
.facility-hub { margin-top: 0.35rem; }
.facility-hub-tiles { margin-top: 0.25rem; }
body[data-page="public-lost-found"] .facility-public-header {
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
}
body[data-page="public-lost-found"] .facility-public-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
}
body[data-page="public-lost-found"] .facility-public-header .pill {
  margin-bottom: 0;
}
.facility-search-field { margin-bottom: 0.85rem; }
.facility-subnav { align-items: center; }
/* iOS Safari: Globaler Fix bereits in Basis-CSS — hier nur noch max-width/touch-action */
.facility-page .input,
.facility-page .textarea,
.facility-page select.input,
#facilityTaskModal .input {
  max-width: 100%;
  box-sizing: border-box;
  touch-action: manipulation;
}
.facility-feedback--err { color: #b71c1c; }
.facility-list { display: flex; flex-direction: column; gap: 0.75rem; }
.facility-item {
  border: 1px solid var(--color-border, #c8d0dc);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--color-surface, #fff);
}
.facility-item-main { display: flex; gap: 0.75rem; align-items: flex-start; }
.facility-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #eee;
}
.facility-item-title { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.facility-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(120, 130, 150, 0.14);
}
.facility-pill--open { background: color-mix(in srgb, #f9a825 22%, transparent); }
.facility-pill--tasked { background: color-mix(in srgb, #1565c0 16%, transparent); color: #0d47a1; }
.facility-pill--done, .facility-pill--claimed { background: color-mix(in srgb, #2e7d32 16%, transparent); color: #1b5e20; }
.facility-pill--dismissed, .facility-pill--archived { background: rgba(120, 130, 150, 0.2); }
.facility-item-meta { margin: 0.25rem 0 0; font-size: 0.8rem; }
.facility-item-desc { margin: 0.35rem 0 0; white-space: pre-wrap; }
.facility-item-actions { margin-top: 0.5rem; }
.facility-panel[hidden],
.facility-hub[hidden],
.facility-form[hidden] {
  display: none !important;
}
.facility-item--openable { cursor: pointer; }
.facility-item--openable:focus-visible {
  outline: 2px solid var(--color-primary, #1565c0);
  outline-offset: 2px;
}
.facility-thumb[hidden] { display: none !important; }
.facility-thumb--empty {
  background: color-mix(in srgb, var(--color-border, #c8d0dc) 55%, #eee);
}
.facility-photo-preview {
  display: block;
  margin-top: 0.5rem;
  max-width: 220px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}
.facility-photo-preview[hidden] { display: none !important; }
.facility-detail-photo { margin-bottom: 0.75rem; }
.facility-photo-hero {
  display: block;
  width: 100%;
  max-height: min(70vh, 560px);
  object-fit: contain;
  border-radius: 10px;
  background: #111;
}

/* Trainer Spielerübersicht — kompakte Tabelle (Zebra + Header-Filter) */
.trainer-players-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.trainer-players-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin: 0.55rem 0 0.4rem;
}
.trainer-players-toolbar .meta {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.trainer-players-team-field {
  flex: 0 1 11rem;
  min-width: 8rem;
  max-width: 100%;
}
.trainer-players-team-field .input {
  width: 100%;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
}
.trainer-players-table-wrap {
  margin-top: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border, #e8eef6);
  border-radius: 10px;
  background: var(--color-card, #fff);
}
.trainer-players-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
  --tp-row-bg: var(--color-card, #fff);
  --tp-row-bg-alt: var(--sf-gray-100, #e8eef6);
}
.trainer-players-table th,
.trainer-players-table td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--color-border, #e8eef6);
  text-align: left;
  vertical-align: middle;
  line-height: 1.25;
}
.trainer-players-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--color-muted, #5a6b82);
  background: var(--color-surface, #f4f7fb);
  white-space: normal;
}
.trainer-players-th-filter {
  vertical-align: top;
}
.trainer-players-th-label {
  display: block;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  line-height: 1.1;
}
.trainer-players-th-control {
  width: 100%;
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.28rem 0.4rem;
  min-height: 2rem;
}
.trainer-players-table tbody tr:nth-child(odd) td {
  background: var(--tp-row-bg);
}
.trainer-players-table tbody tr:nth-child(even) td {
  background: var(--tp-row-bg-alt);
}
.trainer-players-table tbody tr:last-child td {
  border-bottom: none;
}
.trainer-players-empty {
  text-align: center;
  padding: 0.75rem 0.55rem !important;
}
.trainer-players-td-name {
  font-weight: 600;
  width: 46%;
  word-break: break-word;
}
.trainer-players-td-club {
  width: 38%;
  color: var(--color-muted, #5a6b82);
  word-break: break-word;
}
.trainer-players-td-app {
  width: 16%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.trainer-players-td-app.is-app-yes {
  color: var(--sf-green-dark, #4a9a18);
  font-weight: 600;
}
.trainer-players-td-app.is-app-no {
  color: var(--color-muted, #5a6b82);
}
body[data-theme="dark"] .trainer-players-table-wrap {
  background: var(--color-card);
  border-color: var(--color-border);
}
body[data-theme="dark"] .trainer-players-table {
  --tp-row-bg: var(--color-card, #1a2744);
  --tp-row-bg-alt: rgba(255, 255, 255, 0.06);
}
body[data-theme="dark"] .trainer-players-table th {
  background: var(--color-surface, #1a2744);
  color: var(--color-muted);
}
body[data-theme="dark"] .trainer-players-td-app.is-app-yes {
  color: var(--color-accent, #8ed654);
}

/* Turnier-Assistent (Beta) */
.sf-tournament-wizard-backdrop .sf-tournament-wizard-panel,
.sf-tournament-wizard-backdrop .sf-tournament-choice-panel {
  max-width: min(720px, calc(100vw - 1.5rem));
  width: 100%;
}
.sf-tournament-choice-grid {
  display: grid;
  gap: 0.75rem;
}
.sf-tournament-choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(10, 61, 145, 0.18);
  background: linear-gradient(135deg, rgba(10, 61, 145, 0.08), rgba(255, 255, 255, 0.98));
  cursor: pointer;
}
.sf-tournament-choice-card--ghost {
  background: var(--color-card, #fff);
}
.sf-tournament-wizard-footer {
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.sf-tournament-wizard-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
}
.sf-tournament-wizard-format-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #dbeafe);
  background: var(--color-card, #fff);
  cursor: pointer;
  text-align: left;
}
.sf-tournament-wizard-format-card.is-active {
  border-color: var(--sf-blue, #0a3d91);
  box-shadow: inset 3px 0 0 var(--sf-blue, #0a3d91);
}
.sf-tournament-wizard-club-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.sf-tournament-wizard-club-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border, #dbeafe);
  background: var(--color-surface, #f8fafc);
  font-size: 0.88rem;
}
.sf-tournament-wizard-preview-box {
  margin-top: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(10, 61, 145, 0.15);
  background: rgba(10, 61, 145, 0.06);
  font-size: 0.92rem;
}
.sf-tournament-wizard-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}
.sf-tournament-wizard-group-block {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #dbeafe);
  background: var(--color-surface, #f8fafc);
}
.sf-tournament-wizard-group-block ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.sf-tournament-wizard-assign-details {
  margin: 0.65rem 0;
}
.sf-tournament-wizard-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.35rem 0;
}
.sf-tournament-wizard-placements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.5rem;
}
.sf-tournament-wizard-placement-picker .actions {
  margin: 0.35rem 0 0.25rem;
}
#tournamentWizardPlacementOptionsList {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.sf-tournament-wizard-summary p {
  margin: 0.25rem 0;
}


/* Spieltag: Anreise und offene Mitfahrgesuche. */
.sf-session-travel, .sf-session-travel-overview { margin: .75rem 0; padding: .9rem; border: 1px solid var(--border, #dbe2e8); border-radius: 12px; }
.sf-session-travel { display: grid; gap: .65rem; }
.sf-session-travel h4, .sf-session-travel p { margin: 0; }
.sf-session-travel [hidden] { display: none; }
.sf-session-travel .input { width: 100%; min-width: 0; font-size: 16px; }
.sf-session-travel-group { margin-top: .6rem; }
.sf-session-travel-group ul { margin: .3rem 0; padding-left: 1.25rem; }
.sf-session-travel-overview summary { font-weight: 600; cursor: pointer; }
.sf-session-travel-requests .input { width: 100%; margin: .5rem 0; font-size: 16px; }
.sf-session-reminder { margin-top: .65rem; }

#attendanceNewRsvpDueWrap[hidden], .sf-rsvp-due-field[hidden] { display: none; }


.sf-player-intake-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.5rem; }
.sf-player-intake-card { margin-top:1rem; }
@media(max-width:760px) { .sf-player-intake-columns { grid-template-columns:minmax(0,1fr); } }


/* Teamchat: ohne Avatar darf die Listenzeile keine Avatar-Spalte reservieren. */
.sf-messenger-teamchat-list .messenger-wa-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sf-messenger-teamchat-list .messenger-wa-main {
  min-width: 0;
}

.sf-messenger-teamchat-list .messenger-wa-main > strong {
  display: block;
  line-height: 1.3;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-season {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(41, 91, 160, 0.08);
  white-space: nowrap;
}

.sf-messenger-teamchat-intro {
  max-width: 62ch;
  margin: 0.2rem 0 0.65rem;
  line-height: 1.4;
}

.sf-messenger-teamchat-members {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.sf-messenger-teamchat-privacy {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  min-height: 3rem;
  max-height: 6rem;
  line-height: 1.35;
  resize: none;
  overflow-y: hidden;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-compose .messenger-chat-send {
  min-width: 5.25rem;
  min-height: 3rem;
  align-self: stretch;
  padding-inline: 0.75rem;
}

.sf-messenger-teamchat-view .sf-messenger-teamchat-attachment {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .sf-messenger-teamchat-list .messenger-wa-row {
    padding: 0.85rem 0.9rem;
  }

  .sf-messenger-teamchat-view .sf-messenger-teamchat-messages {
    min-height: 0;
  }

  .sf-messenger-teamchat-view .sf-messenger-teamchat-input {
    max-height: 6rem;
  }
}
