:root {
  --color-primary: #1e4fa1;
  --color-primary-dark: #0b2d63;
  --color-accent: #6ea8ff;
  --color-bg: #ffffff;
  --color-surface: #f5f7fb;
  --color-text: #0e1a2b;
  --color-card: #ffffff;
  --color-border: #e4e7ec;
  --color-muted: #667085;
  --radius-card: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(14, 26, 43, 0.08);
}

* {
  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: "Inter", system-ui, -apple-system, sans-serif;
  background: #0b2d63;
  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: #5b8cff;
  --color-primary-dark: #cddcff;
  --color-accent: #7aa6ff;
  --color-bg: #0b1220;
  --color-surface: #101826;
  --color-text: #e5e7eb;
  --color-card: #121a2a;
  --color-border: #1f2a44;
  --color-muted: #9aa4b2;
  color-scheme: dark;
}

.auth-pending .content,
.auth-pending .sidebar {
  visibility: hidden;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: linear-gradient(135deg, #0b2d63 0%, #1e4fa1 100%);
  padding: 24px;
  gap: 24px;
  max-width: 100%;
  min-width: 0;
}

/* Grid-„1fr“-Spalte darf schrumpfen — sonst horizontaler Overflow auf schmalen Viewports */
.app-shell > .content {
  min-width: 0;
}

.sidebar {
  background: linear-gradient(180deg, #0b2d63 0%, #123b7a 100%);
  border-radius: 22px;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 18px 40px rgba(2, 12, 36, 0.35);
}

body[data-theme="dark"] .app-shell {
  background: linear-gradient(135deg, #0b1220 0%, #101826 100%);
}

body[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0b1220 0%, #111c30 100%);
  box-shadow: 0 18px 40px rgba(2, 12, 36, 0.6);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e4fa1;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.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 */
body.rsv-guest-shell[data-page="login"] .sidebar--guest,
body.rsv-guest-shell[data-page="login"] .menu-button {
  display: none !important;
}

body.rsv-guest-shell[data-page="login"] .app-shell {
  grid-template-columns: 1fr;
  max-width: 100%;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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: rgba(255, 255, 255, 0.07);
  color: rgba(230, 238, 255, 0.95);
  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: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-group-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  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: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.2s ease, background 0.15s ease;
}

.nav-group-toggle:hover .nav-group-chevron {
  background: rgba(0, 0, 0, 0.3);
}

.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 rgba(255, 255, 255, 0.16);
}

.nav-group:not(.nav-group--open) .nav-group-items {
  display: none;
}

.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: #d9e2f5;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item.active {
  background: #1e4fa1;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-icon {
  width: 18px;
  display: inline-flex;
  justify-content: center;
}

.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(--color-surface);
  border-radius: 22px;
  padding: 20px;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 18px 40px rgba(2, 12, 36, 0.2);
}

.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 100%;
  min-width: 0;
}

.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%;
}

.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;
}

.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: #667085;
  line-height: 1.4;
}

/* Eltern-Rückmeldung: ausführliche ?-Hilfe (Desktop: Dropdown rechts oben) */
body.rsv-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.rsv-guest-shell[data-page^="public-attendance"] .help-text {
  font-size: 13px;
  color: #344054;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.rsv-guest-shell[data-page^="public-attendance"] .help-text ul,
body.rsv-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.rsv-guest-shell[data-page^="public-attendance"] .topbar-actions {
    overflow: visible;
  }

  body.rsv-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.rsv-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;
}

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);
}

.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;
}

.public-light-session-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.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--cancelled {
  opacity: 0.9;
}

/* Öffentliche Light-Karten: Farben über CSS-Variablen (--rsv-public-light-pending-*) bei Bedarf durch Systemoptionen überschrieben */
:root {
  --rsv-public-light-pending-training: rgba(232, 241, 248, 0.94);
  --rsv-public-light-pending-training-dark: rgba(56, 189, 248, 0.12);
  --rsv-public-light-pending-spiel: rgba(214, 233, 255, 0.96);
  --rsv-public-light-pending-spiel-dark: rgba(74, 155, 255, 0.18);
  --rsv-public-light-pending-tournament: rgba(255, 244, 220, 0.94);
  --rsv-public-light-pending-tournament-dark: rgba(251, 191, 36, 0.15);
  --rsv-public-light-pending-event: rgba(239, 230, 255, 0.95);
  --rsv-public-light-pending-event-dark: rgba(167, 139, 250, 0.18);
}

/* Kind-/Team-Light: Pending-Hintergrund je Termin-Art */
.public-light-session-card--pending.public-light-session-card--kind-training {
  background: var(--rsv-public-light-pending-training);
}
.public-light-session-card--pending.public-light-session-card--kind-spiel {
  background: var(--rsv-public-light-pending-spiel);
}
.public-light-session-card--pending.public-light-session-card--kind-tournament {
  background: var(--rsv-public-light-pending-tournament);
}
.public-light-session-card--pending.public-light-session-card--kind-event {
  background: var(--rsv-public-light-pending-event);
}
.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);
}

.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(71, 85, 105, 0.45);
  background: rgba(100, 116, 139, 0.12);
}

.public-light-status-pill {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.public-light-vote-btn {
  font-weight: 700;
  border-width: 2px;
}

.public-light-vote-btn--yes {
  border-color: #2e7d32;
  color: #1b5e20;
  background: rgba(46, 125, 50, 0.08);
}

.public-light-vote-btn--no {
  border-color: #b71c1c;
  color: #8e0000;
  background: rgba(183, 28, 28, 0.08);
}

.public-light-vote-btn.is-active.public-light-vote-btn--yes {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.public-light-vote-btn.is-active.public-light-vote-btn--no {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

@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: rgba(148, 163, 184, 0.28);
}

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(--rsv-public-light-pending-training-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-spiel {
  background: var(--rsv-public-light-pending-spiel-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-tournament {
  background: var(--rsv-public-light-pending-tournament-dark);
}
body[data-theme="dark"] .public-light-session-card--pending.public-light-session-card--kind-event {
  background: var(--rsv-public-light-pending-event-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);
}

body[data-theme="dark"] .public-light-vote-btn--yes {
  color: #dcedc8;
  border-color: #66bb6a;
  background: rgba(102, 187, 106, 0.16);
}

body[data-theme="dark"] .public-light-vote-btn--no {
  color: #ffcdd2;
  border-color: #ef5350;
  background: rgba(239, 83, 80, 0.16);
}

.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, #e2e8f0);
  --fc-page-bg-color: var(--color-surface, #fff);
  --fc-neutral-bg-color: #f1f5f9;
}

.incoming-fc-team-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  max-height: 9.5rem;
  overflow-y: auto;
  padding: 6px 0;
}

.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: 10px;
  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;
}

/* FullCalendar: Turnieranfrage vs. eigener Termin */
.incoming-fc-mount .fc-event.rsv-fc-attendance {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.incoming-fc-mount .fc-event.rsv-fc-attendance.rsv-fc-attendance--cancelled {
  opacity: 0.75;
  font-style: italic;
}

.incoming-fc-mount .fc-event.rsv-fc-incoming.rsv-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.rsv-fc-incoming.rsv-fc-incoming--idle {
  opacity: 0.9;
}

.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.rsv-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;
}

.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 {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.user-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  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-row:nth-child(even) {
  background: #fafbfc;
}

.user-table-row:hover {
  background: #f1f5f9;
}

.user-table-cell {
  padding: 5px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #eef1f5;
  word-break: break-word;
}

.user-table-cell--name {
  font-weight: 600;
  color: #0f172a;
  max-width: 220px;
}

.user-table-cell--contact {
  font-size: 12px;
  color: #475569;
  min-width: 160px;
}

.user-table-cell--status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.user-table-cell--actions {
  white-space: nowrap;
  text-align: right;
}

.user-table-action-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  margin-left: 6px;
}

.user-table-action-btn:first-child {
  margin-left: 0;
}

.user-table-empty {
  padding: 14px 10px !important;
  text-align: center;
  color: #64748b;
  font-weight: 400;
}

.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-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;
}

.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%);
}

.modal-body {
  padding: 18px 22px;
  overflow: auto;
}

.user-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr repeat(3, minmax(160px, 200px));
  margin-bottom: 12px;
}

@media (max-width: 960px) {
  .user-toolbar {
    grid-template-columns: 1fr;
  }
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.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.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: #667085;
}

.tile-state {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.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;
}

/* 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 {
    width: 100%;
    justify-content: stretch;
  }

  .list-item > .status-group > .cta,
  .list-item > .status-group > a.cta,
  .list-item > .status-group > a.cta.ghost {
    width: 100%;
    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;
}

.trainer-kpi-card {
  border: 1px solid var(--color-border, #2a3f5c);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: rgba(15, 23, 42, 0.2);
}

.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: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(14, 26, 43, 0.15);
}

.cta.ghost {
  background: #ffffff;
  color: var(--color-primary-dark);
  border: 1px solid #cbd5f5;
  box-shadow: none;
}

/* [hidden] allein reicht nicht: .cta setzt display:inline-flex und überdeckt das UA-[hidden]-Verhalten */
.cta[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;
}

.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(180deg, #e6efff 0%, #ffffff 100%);
}

body[data-theme="dark"] .card-header {
  background: linear-gradient(180deg, #111c30 0%, #121a2a 100%);
}

body[data-theme="dark"] .topbar {
  color: var(--color-text);
}

body[data-theme="dark"] .page-title {
  color: var(--color-text);
}

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: var(--color-muted);
}

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;
}

.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: #667085;
}

.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));
}

.field label {
  display: block;
  font-size: 12px;
  color: #667085;
  margin-bottom: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

/* Fremdturnier anlegen: Labels/Hinweise stärker vom Kartenhintergrund absetzen */
#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;
}

.modal-backdrop.app-confirm-modal {
  align-items: center;
  justify-content: center;
}

.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);
}

.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;
}

.input,
.textarea {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  color: #101828;
}

.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-master {
  background: #e8f0fe;
  border-style: dashed;
}

.permissions-row-master > div:first-child {
  font-weight: 600;
  font-size: 12px;
  color: #1e3a5f;
}

.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: 8px 10px 8px 28px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  position: relative;
  user-select: none;
}

.permissions-expand-summary::-webkit-details-marker {
  display: none;
}

.permissions-expand-summary::before {
  content: "▸";
  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 {
  padding: 2px 10px 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, 1.6fr) repeat(4, 58px);
  gap: 6px;
  align-items: center;
  padding: 5px 0 5px 8px;
  font-size: 12px;
  border-left: 2px solid #cbd5e1;
  margin-left: 4px;
}

.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 {
  border-left-color: #475569;
}

body[data-theme="dark"] .permissions-sub-row-label {
  color: #94a3b8;
}

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--contact {
  color: #cbd5e1;
}

body[data-theme="dark"] .user-table-empty {
  color: #94a3b8;
}

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);
}

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-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;
}

.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;
  }
  .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 .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;
}

.schedule-table .table-row.table-head {
  grid-template-columns: 56px 124px 90px 110px 1.6fr 170px 130px 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 124px 90px 110px 1.6fr 170px 130px 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: 72px;
}

.schedule-table .schedule-time-input {
  width: 100%;
  max-width: 100%;
  min-width: 112px;
  padding-right: 32px;
  font-variant-numeric: tabular-nums;
}

.schedule-group {
  white-space: nowrap;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  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: 60px 120px 70px 90px 1fr 140px 110px 140px;
  }
}

@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;
  }
  .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(240px, 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;
  }
  .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: Titel in eigener Zeile unter Pill — weniger Breite in der Icon-Zeile */
  .topbar .page-title {
    flex: 1 1 100%;
    font-size: 1.05rem;
    line-height: 1.25;
    margin-top: 2px;
  }

  .topbar-actions {
    gap: 6px;
    /* Eigene Zeile unter Branding/Titel — verhindert Abschneiden am rechten Rand (iOS Safari) */
    flex: 1 1 100%;
    max-width: 100%;
    justify-content: flex-end;
  }

  .topbar .pill {
    padding: 5px 10px;
    font-size: 11px;
    max-width: min(200px, 52vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #logoutButton.tab {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .topbar .icon-button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
}

/* iPhone / schmale Geräte: Abmelden nicht abschneiden */
@media (max-width: 480px) {
  .topbar {
    row-gap: 10px;
  }

  .topbar-left {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .topbar-actions {
    flex: 1 1 100%;
    max-width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }

  .topbar .pill {
    max-width: min(180px, 46vw);
  }

  #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-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-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-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;
}

/* Ö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="public-attendance-light-player"] .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="public-attendance-light-player"] .menu-button,
body[data-page="invite"] .menu-button {
  display: none !important;
}

body[data-page="public-attendance-rsvp"] .app-shell,
body[data-page="public-attendance-light"] .app-shell,
body[data-page="public-attendance-light-player"] .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-rsv-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-rsv-light-session-tools] .outline,
body[data-page="public-attendance-light"] [data-rsv-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-rsv-trainer-session-tools-footer],
body[data-page="trainer-term-management"] [data-rsv-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-rsv-trainer-session-tools-footer] .cta.ghost,
body[data-page="trainer-term-management"] [data-rsv-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-rsv-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-rsv-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-rsv-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;
}

/* 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);
}

.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;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* 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;
}

.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;
  }

  body[data-page="admin-tournament-results"] .results-print-h1 {
    margin: 0 0 2mm;
    font-size: 22pt;
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  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-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: avoid;
    page-break-inside: avoid;
    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 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 {
    display: none !important;
  }

  body[data-page="public-tournament-live"] .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 {
    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 {
    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 {
    overflow: visible !important;
  }

  /* Grid-Container können in manchen Engines Print-Fragmente clippen */
  body[data-page="public-tournament-live"] .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-kicker {
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111827;
    margin-bottom: 1mm;
  }

  .results-print-h1 {
    margin: 0 0 2mm;
    font-size: 22pt;
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .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;
  }

  .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-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; /* äußere Rahmenlinie, damit rechts nicht „abgeschnitten“ wirkt */
    font-size: 9.5pt;
    break-inside: avoid;
    page-break-inside: avoid;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
  }

  .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--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 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 .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);
}

/* 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) {
  min-width: 3.25rem;
}

/* 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);
}

.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);
}

/* Eltern-Light: Push als kompakte Karte + Button statt Checkbox */
.rsv-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);
}
.rsv-push-prompt__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.rsv-push-prompt__copy {
  flex: 1 1 200px;
  min-width: 0;
}
.rsv-push-prompt__title {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text, #0e1a2b);
}
.rsv-push-prompt__meta {
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.rsv-push-prompt__btn {
  flex: 0 0 auto;
  min-height: 44px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.rsv-push-prompt__fb {
  margin: 0.5rem 0 0;
  min-height: 1.25em;
}
body[data-theme="dark"] .rsv-push-prompt {
  background: rgba(15, 23, 42, 0.45);
  border-color: var(--color-border, #334155);
  box-shadow: none;
}
body[data-theme="dark"] .rsv-push-prompt__title {
  color: var(--color-text, #e2e8f0);
}
