/* Selbst gehostete Schriften (SIL Open Font License), vorher von Google Fonts geladen.
   Nur latin/latin-ext; Browser laden eine Datei erst, wenn die Schrift gerendert wird. */
/* Barlow – latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-400-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Barlow – latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-400-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Barlow – latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-500-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Barlow – latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-500-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Barlow – latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-600-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Barlow – latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-600-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Barlow – latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-700-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Barlow – latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-700-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Grotesk – latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Grotesk – latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Grotesk – latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Grotesk – latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7fbf7;
  --card: #ffffff;
  --text: #182214;
  --muted: #53644f;
  --accent: #1d6b3a;
  --accent-strong: #134a28;
  --accent-soft: #e4f2e8;
  --bg-gradient-start: #d4f5d7;
  --bg-gradient-mid: #eef9ff;
  --bg-gradient-end: #fff1d6;
  --shape-a-start: #bff0cb;
  --shape-a-end: #28c98a;
  --shape-b-start: #0f63a9;
  --shape-b-end: #ffd067;
  --font-ui: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 15px 40px rgba(16, 56, 28, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background-image: url("assets/backgrounds/matchday-floodlights-emerald.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

body[data-bg-style="default"] {
  background-image: url("assets/backgrounds/matchday-floodlights-emerald.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-bg-style="matchday-floodlights"] {
  background-image: url("assets/backgrounds/matchday-floodlights.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-bg-style="matchday-floodlights-emerald"] {
  background-image: url("assets/backgrounds/matchday-floodlights-emerald.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-bg-style="matchday-floodlights-sunset"] {
  background-image: url("assets/backgrounds/matchday-floodlights-sunset.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-bg-style="isometric-pitch-system"] {
  background-image: url("assets/backgrounds/isometric-pitch-system.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-bg-style="matchday-floodlights"] .bg-shape,
body[data-bg-style="matchday-floodlights-emerald"] .bg-shape,
body[data-bg-style="matchday-floodlights-sunset"] .bg-shape,
body[data-bg-style="isometric-pitch-system"] .bg-shape {
  opacity: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0;
}

input,
select,
textarea,
button {
  font-family: var(--font-ui);
}

.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.88;
}

.bg-shape-a {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--shape-a-start), var(--shape-a-end));
  top: -130px;
  right: -90px;
}

.bg-shape-b {
  width: 520px;
  height: 520px;
  border-radius: 40%;
  background: linear-gradient(160deg, var(--shape-b-start), var(--shape-b-end));
  bottom: -210px;
  left: -190px;
}

.app-shell {
  width: min(480px, 96vw);
  margin: 22px auto;
  display: grid;
  gap: 16px;
  /* grid children must be allowed to shrink */
  min-width: 0;
}

#mainView:not(.hidden),
#studentView:not(.hidden) {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 14px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 0% 0%, rgba(37, 201, 138, 0.22), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(15, 99, 169, 0.18), transparent 34%),
    radial-gradient(circle at 50% 120%, rgba(255, 176, 59, 0.2), transparent 34%);
  border: 1px solid rgba(15, 99, 169, 0.14);
  box-shadow: 0 22px 60px rgba(15, 74, 119, 0.12);
  backdrop-filter: blur(12px);
}

#mainView:not(.hidden)::before,
#studentView:not(.hidden)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(37, 201, 138, 0.1), transparent 44%);
}

#mainView:not(.hidden) > *,
#studentView:not(.hidden) > * {
  position: relative;
  z-index: 1;
}

.app-shell > * {
  min-width: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(29, 107, 58, 0.12);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.topbar {
  position: relative;
  padding: 16px;
}

.login-card {
  max-width: 440px;
  margin: 6vh auto;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 74, 119, 0.22);
  background:
    radial-gradient(circle at 10% 14%, rgba(37, 201, 138, 0.3), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(15, 99, 169, 0.24), transparent 32%),
    radial-gradient(circle at 50% 108%, rgba(255, 176, 59, 0.22), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(235, 247, 255, 0.92) 52%, rgba(255, 248, 229, 0.92) 100%);
  box-shadow: 0 28px 70px rgba(15, 74, 119, 0.2);
  backdrop-filter: blur(10px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(330deg, rgba(37, 201, 138, 0.12), transparent 48%);
}

#mainTopbar,
.student-topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 247, 255, 0.9) 56%, rgba(241, 255, 244, 0.92) 100%);
  border: 1px solid rgba(15, 99, 169, 0.16);
  box-shadow: 0 16px 34px rgba(15, 74, 119, 0.11);
}

.student-dashboard-card,
.student-charges-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(245, 251, 255, 0.9) 58%, rgba(247, 255, 242, 0.92) 100%);
  border-color: rgba(37, 201, 138, 0.16);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card .app-title {
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  font-size: clamp(1.55rem, 2.8vw, 1.95rem);
}

.login-card .language-switcher-label {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 74, 119, 0.14);
  background: rgba(255, 255, 255, 0.75);
}

.auth-bootstrap-splash {
  max-width: 440px;
  margin: 12vh auto;
  padding: 24px;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.auth-bootstrap-splash h2 {
  font-size: 1.08rem;
}

.auth-bootstrap-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #d2e6d7;
  border-top-color: var(--accent);
  animation: authSpin 0.85s linear infinite;
}

@keyframes authSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

body.app-initializing #loginView,
body.app-initializing #mainView,
body.app-initializing #studentView {
  display: none;
}

.brand-mark {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
}

.brand-logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.brand-mark-tight {
  margin-bottom: 0;
}

.brand-image {
  width: 100%;
  max-width: 232px;
  max-height: 160px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 16px;
  border: 0;
  background: transparent;
  box-shadow: 0 12px 28px rgba(15, 74, 119, 0.18);
}

.brand-image-logo {
  max-width: 320px;
  max-height: 110px;
  aspect-ratio: auto;
  box-shadow: none;
}

.brand-image-login-crest {
  max-width: 92px;
  max-height: 92px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: contain;
}

.brand-fallback {
  display: none;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px dashed rgba(29, 107, 58, 0.34);
  background: linear-gradient(135deg, #f4fbf5, #e1f0e4);
  color: var(--accent-strong);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-image-fallback .brand-fallback {
  display: flex;
}

.hint-tight {
  margin: 8px 0 0;
}

.hint-flat {
  margin: 0;
}

.grid-form-two-columns {
  grid-template-columns: 1fr 1fr;
}

.grid-span-full {
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 13px;
}

#loginForm label {
  gap: 7px;
}

#loginForm input {
  border: 1px solid rgba(15, 74, 119, 0.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

#loginForm input:focus {
  outline: none;
  border-color: rgba(15, 74, 119, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 74, 119, 0.14);
}

#loginSubmitBtn,
#demoLoginBtn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 13px;
  font-weight: 700;
}

#loginSubmitBtn {
  background: linear-gradient(120deg, #0f4a77, #1d6b3a 66%, #19b77f);
  box-shadow: 0 12px 24px rgba(15, 74, 119, 0.25);
}

#loginSubmitBtn:hover {
  filter: brightness(1.03);
}

#demoLoginBtn {
  border: 1px solid rgba(15, 74, 119, 0.22);
  background: rgba(255, 255, 255, 0.8);
}

#loginError {
  min-height: 20px;
  margin-top: 2px;
}

.login-superadmin-link {
  margin-top: 12px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(15, 74, 119, 0.11);
}

.legal-links {
  margin-top: 10px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
}

.legal-shell {
  width: min(900px, 96vw);
}

.legal-card {
  padding: 22px;
  display: grid;
  gap: 10px;
}

.legal-card h2 {
  margin-top: 10px;
  font-size: 1.04rem;
}

.legal-card p,
.legal-card li {
  font-size: 0.95rem;
  line-height: 1.5;
}

.licenses-shell {
  width: min(980px, 96vw);
}

.licenses-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.licenses-hero {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 74, 119, 0.18);
  background: linear-gradient(135deg, rgba(15, 74, 119, 0.1), rgba(25, 183, 127, 0.14));
}

.licenses-sport-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.licenses-sport-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 74, 119, 0.2);
  background: #f3f8fb;
  color: #1c4e70;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

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

.license-tier {
  border: 1px solid #d0ddd4;
  border-radius: 14px;
  background: #fbfdfb;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.license-tier h3 {
  font-size: 1rem;
}

.license-price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  color: var(--accent-strong);
}

.license-includes {
  margin: 0;
  padding-left: 18px;
  color: #37463a;
  font-size: 0.9rem;
  line-height: 1.4;
}

.license-buy-panel {
  display: grid;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid #d0ddd4;
  background: #f8fbf9;
  padding: 14px;
}

.license-buy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.sports-picker {
  margin: 0;
  border: 1px solid #c8d8cc;
  border-radius: 12px;
  padding: 10px;
  background: #fdfefd;
}

.sports-picker legend {
  padding: 0 6px;
  font-weight: 700;
}

.sports-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sport-icon-option {
  display: block;
}

.sport-icon-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sport-icon-chip {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #ffffff;
  font-size: 1.65rem;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.sport-icon-input:checked + .sport-icon-chip {
  border-color: rgba(15, 74, 119, 0.55);
  background: rgba(15, 74, 119, 0.08);
  box-shadow: 0 0 0 3px rgba(15, 74, 119, 0.14);
}

.sport-icon-chip:hover {
  transform: translateY(-1px);
}

.provider-picker {
  margin: 0;
  border: 1px solid #c8d8cc;
  border-radius: 12px;
  padding: 10px;
  background: #fdfefd;
}

.provider-picker legend {
  padding: 0 6px;
  font-weight: 700;
}

.provider-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.provider-icon-option {
  display: block;
}

.provider-icon-option-single {
  display: grid;
  gap: 6px;
}

.provider-icon-grid-single {
  grid-template-columns: 1fr;
}

.provider-icon-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.provider-icon-chip {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.provider-icon-input:checked + .provider-icon-chip {
  border-color: rgba(15, 74, 119, 0.55);
  background: rgba(15, 74, 119, 0.08);
  box-shadow: 0 0 0 3px rgba(15, 74, 119, 0.14);
}

.provider-icon-chip:hover {
  transform: translateY(-1px);
}

.provider-brand-icon {
  width: 42px;
  height: 26px;
  display: block;
}

.provider-icon-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f4a77;
}

.provider-chip-inline {
  max-width: 140px;
}

.license-summary {
  border-radius: 12px;
  border: 1px solid #c8d8cc;
  background: #eef7f1;
  padding: 10px;
  font-size: 0.92rem;
  color: #21432c;
}

.license-summary strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.licenses-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manual-license-card {
  max-width: 860px;
  margin-inline: auto;
}

.manual-license-result {
  border-radius: 12px;
  border: 1px solid #c8d8cc;
  background: #f1faf3;
  padding: 12px;
  color: #1e4129;
}

.manual-license-result h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.manual-license-result p {
  margin: 0;
  font-size: 0.92rem;
}

.manual-license-result p + p {
  margin-top: 4px;
}

.owner-cockpit-shell {
  width: min(1240px, 96vw);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-stripe {
  background: #0f4a77;
}

.legend-paypal {
  background: #1ab67f;
}

@keyframes salesCardReveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.owner-cockpit-layout {
  padding: 14px;
}

.owner-workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.owner-sidebar {
  position: sticky;
  top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 99, 169, 0.2);
  background: linear-gradient(165deg, rgba(11, 48, 79, 0.08), rgba(25, 183, 127, 0.08));
  padding: 14px;
  display: grid;
  gap: 12px;
}

.owner-sidebar-brand {
  margin-bottom: 0;
}

.owner-sidebar-menu {
  display: grid;
  gap: 6px;
}

.owner-menu-link {
  width: 100%;
  border: 1px solid rgba(15, 99, 169, 0.22);
  border-radius: 12px;
  background: #f6fbff;
  color: #11415f;
  text-align: left;
  padding: 9px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.owner-menu-link:hover {
  transform: translateX(2px);
  background: #edf6ff;
}

.owner-menu-link.is-active {
  color: #ffffff;
  background: linear-gradient(120deg, #0f4a77, #1d6b3a);
  border-color: transparent;
}

.owner-sidebar-metrics {
  border: 1px solid rgba(15, 99, 169, 0.18);
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.owner-side-metric-card {
  border: 1px solid #d8e4db;
  border-radius: 10px;
  background: #f8fcf9;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.owner-side-metric-card span {
  font-size: 0.75rem;
  color: #4a5f51;
  font-weight: 700;
}

.owner-side-metric-card strong {
  font-size: 1rem;
  color: #153b29;
}

.owner-side-metric-card small {
  color: #4b5f80;
  font-size: 0.75rem;
}

.owner-mini-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5eef4;
  overflow: hidden;
}

.owner-mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f4a77, #1d6b3a);
}

.owner-main-content {
  display: grid;
  gap: 12px;
}

.owner-section {
  scroll-margin-top: 18px;
}

.owner-cockpit-card {
  gap: 18px;
}

.owner-hero-panel {
  position: relative;
  overflow: hidden;
}

.owner-hero-panel::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -32px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 201, 138, 0.25), transparent 70%);
  pointer-events: none;
}

.owner-tag-row span {
  background: rgba(233, 245, 251, 0.9);
}

.owner-stats-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.owner-visual-card {
  border: 1px solid #d2e2d8;
  border-radius: 14px;
  background: #f9fcfa;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.owner-visual-card h3 {
  font-size: 0.98rem;
}

.owner-pipeline-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.owner-pipeline-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e4ede8;
  overflow: hidden;
}

.owner-pipeline-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f4a77, #19b77f);
}

.owner-health-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.owner-health-ring {
  width: 94px;
  height: 94px;
  border-radius: 999px;
  border: 8px solid rgba(29, 107, 58, 0.18);
  display: grid;
  place-items: center;
  text-align: center;
  background: #ffffff;
}

.owner-health-ring span {
  font-size: 1.15rem;
  color: #134a28;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1;
}

.owner-health-ring small {
  font-size: 0.68rem;
  color: #4a6052;
}

.owner-health-details p {
  margin: 0;
  font-size: 0.84rem;
}

.owner-health-details p + p {
  margin-top: 4px;
}

.owner-sales-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.owner-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.owner-analytics-card {
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 12px;
  background: #fbfefc;
  display: grid;
  gap: 8px;
}

.owner-mix-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}

.owner-mix-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e3eee6;
  overflow: hidden;
}

.owner-mix-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #0f4a77, #1d6b3a);
}

.owner-big-stat {
  margin: 0;
  font-size: 1.35rem;
  font-family: "Space Grotesk", sans-serif;
  color: #123b28;
}

.owner-goal-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #dde9f0;
  overflow: hidden;
}

.owner-goal-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #0f4a77, #19b77f);
}

.owner-renewal-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.owner-renewal-list li {
  font-size: 0.84rem;
}

.owner-admin-topbar {
  padding: 0;
  margin-bottom: 10px;
}

.owner-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.owner-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.owner-bottom-links {
  justify-content: center;
}

.manual-license-debug {
  border: 1px solid #c8d2c3;
  border-radius: 12px;
  background: #f6faf7;
  padding: 10px;
  margin: 0;
  max-height: 280px;
  overflow: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 980px) {

  .owner-workspace {
    grid-template-columns: 1fr;
  }

  .owner-sidebar {
    position: static;
  }

  .owner-sidebar-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-stats-grid {
    grid-template-columns: 1fr;
  }

  .owner-sales-grid {
    grid-template-columns: 1fr;
  }

  .owner-analytics-grid {
    grid-template-columns: 1fr;
  }

  .owner-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .owner-sidebar-menu {
    grid-template-columns: 1fr;
  }

  .owner-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-table-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .sports-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.language-switcher-label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 10px;
}

.language-switcher-inline {
  margin-top: 6px;
  margin-bottom: 4px;
  max-width: 220px;
}

.language-select {
  min-height: 40px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  padding: 10px 12px;
  background: #fdfefd;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
  font-weight: 600;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-success {
  background: #1d6b3a;
  color: #ffffff;
}

.btn-success:hover {
  background: #14502b;
}

.btn-danger {
  background: #b42318;
  color: #ffffff;
}

.btn-danger:hover {
  background: #8a1912;
}

.btn-small {
  padding: 8px 10px;
}

#mainView #playerForm .btn-small {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  min-height: 30px;
  padding: 2px;
  font-size: 0.92rem;
  line-height: 1;
  justify-content: center;
}

#markAllUncertainBtn {
  background: #fff6dd;
  color: #6c5411;
  border: 1px solid #b0881a;
}

#markAllUncertainBtn:hover {
  background: #f6e9be;
  color: #5b4509;
}

.muted {
  color: var(--muted);
  margin: 4px 0 0;
}

.push-status-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.push-status-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.hint {
  color: #56604f;
  font-size: 0.92rem;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  margin-top: -8px;
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #4f5f53;
}

.app-version-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.error {
  color: var(--danger);
  min-height: 20px;
  margin: 0;
}

.error.is-warning {
  color: #92400e;
}

.error.is-info {
  color: var(--muted);
}

.hidden {
  display: none;
}

.admin-output {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #f6faf7;
  padding: 10px 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.tenant-role-account-list {
  display: grid;
  gap: 8px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #f6faf7;
  padding: 10px;
}

.tenant-role-account-card {
  border: 1px solid #d2dfd4;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 10px;
}

.tenant-role-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tenant-role-account-name {
  font-size: 0.92rem;
  color: #173d2e;
  font-weight: 700;
  word-break: break-word;
}

.tenant-role-account-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(15, 99, 169, 0.26);
  border-radius: 999px;
  background: rgba(234, 245, 255, 0.92);
  color: #1f3f56;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 2px 9px;
}

.tenant-feature-toggle {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #d2dfd4;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.tenant-feature-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.tenant-feature-toggle span {
  display: grid;
  gap: 2px;
}

.tenant-feature-toggle strong {
  color: #173d2e;
  font-size: 0.86rem;
  line-height: 1.3;
}

.tenant-feature-toggle small {
  color: #5a695e;
  font-size: 0.76rem;
  line-height: 1.35;
}

.tenant-team-list {
  display: grid;
  gap: 8px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #f6faf7;
  padding: 10px;
}

.tenant-team-card {
  border: 1px solid #d2dfd4;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.tenant-team-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tenant-team-name {
  font-size: 0.92rem;
  color: #173d2e;
  font-weight: 700;
  word-break: break-word;
}

.tenant-team-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(47, 112, 70, 0.34);
  border-radius: 999px;
  background: rgba(230, 247, 236, 0.95);
  color: #1f4f34;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 2px 9px;
}

.tenant-team-sport-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 74, 119, 0.3);
  border-radius: 999px;
  background: rgba(220, 235, 250, 0.9);
  color: #0f4a77;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 2px 9px;
}

.tenant-team-meta {
  font-size: 0.76rem;
  color: #566658;
}

.tenant-team-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tenant-team-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#tenantTeamForm .checkbox-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 74, 119, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 248, 255, 0.78));
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

#tenantTeamForm .checkbox-field:hover {
  border-color: rgba(15, 74, 119, 0.36);
  box-shadow: 0 8px 20px rgba(15, 74, 119, 0.12);
}

#tenantTeamForm .checkbox-field:active {
  transform: translateY(1px);
}

#tenantTeamForm .checkbox-field span {
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #1b2d43;
}

#tenantTeamForm .checkbox-field input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 22px;
  border-radius: 7px;
  border: 2px solid rgba(15, 74, 119, 0.48);
  background: #ffffff;
  display: grid;
  place-items: center;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

#tenantTeamForm .checkbox-field input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) scale(0.75);
  opacity: 0;
  transition: opacity 120ms ease;
}

#tenantTeamForm .checkbox-field input[type="checkbox"]:checked {
  border-color: var(--accent-strong);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 58, 0.16);
}

#tenantTeamForm .checkbox-field input[type="checkbox"]:checked::after {
  opacity: 1;
}

#tenantTeamForm .checkbox-field input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 74, 119, 0.2);
}

body.superadmin-page .app-shell {
  width: min(1100px, 96vw);
}

#superadminTenantPanel {
  padding: 18px;
}

#superadminTenantPanel .finance-accordion {
  margin-bottom: 0;
}

#superadminTenantPanel .finance-accordion > summary {
  border-bottom: 1px solid #d8e5da;
}

#superadminTenantPanel .finance-accordion:not([open]) > summary {
  border-bottom: none;
}

.superadmin-hero {
  border: 1px solid rgba(15, 99, 169, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(130deg, rgba(15, 99, 169, 0.09), rgba(37, 201, 138, 0.12));
}

.superadmin-hero h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.superadmin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.superadmin-kpi-card {
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 10px;
  background: #f8fcf9;
  display: grid;
  gap: 4px;
}

.superadmin-kpi-card span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6656;
}

.superadmin-kpi-card strong {
  font-size: 1.06rem;
  color: #173d2e;
}

.superadmin-pane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.superadmin-pane {
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 12px;
  background: #fbfefc;
}

.superadmin-pane h4 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.superadmin-form-grid {
  gap: 10px;
}

.superadmin-tenants-wrap {
  margin-top: 2px;
  border: 1px solid #d8e5da;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.superadmin-tenants-table {
  width: 100%;
  border-collapse: collapse;
}

.superadmin-tenants-table th,
.superadmin-tenants-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf3ee;
  text-align: left;
  vertical-align: middle;
}

.superadmin-tenants-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #496055;
  background: #f4faf6;
}

.superadmin-tenants-table tbody tr:hover {
  background: #f8fcf9;
}

.superadmin-tenant-name {
  font-weight: 700;
  color: #193327;
}

.superadmin-license-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #c9d8cc;
  background: #f2f8f3;
  color: #30533b;
}

.superadmin-license-badge.is-active {
  border-color: rgba(29, 107, 58, 0.34);
  background: rgba(29, 107, 58, 0.12);
  color: #1a4a2a;
}

.superadmin-license-badge.is-suspended,
.superadmin-license-badge.is-expired {
  border-color: rgba(180, 35, 24, 0.3);
  background: rgba(180, 35, 24, 0.12);
  color: #7c1b13;
}

.superadmin-seat-row {
  display: grid;
  gap: 6px;
  min-width: 128px;
}

.superadmin-seat-meter {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e7efe9;
  overflow: hidden;
}

.superadmin-seat-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #19b77f);
}

.superadmin-tenants-empty {
  text-align: center;
  color: #5b6758;
  font-style: italic;
}

@media (max-width: 900px) {
  .superadmin-kpis {
    grid-template-columns: 1fr;
  }

  .superadmin-pane-grid {
    grid-template-columns: 1fr;
  }
}

.superadmin-filter-toggle {
  align-self: end;
  min-height: 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  font-weight: 600;
}

.superadmin-filter-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.superadmin-table-wrap {
  border-radius: 12px;
  border: 1px solid #c8d2c3;
  background: #f6faf7;
  padding: 0;
}

.superadmin-tenants-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.superadmin-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.superadmin-tenants-table th,
.superadmin-tenants-table td,
.superadmin-history-table th,
.superadmin-history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #d8e2d4;
  text-align: left;
  font-size: 0.9rem;
}

.superadmin-tenants-table thead th,
.superadmin-history-table thead th {
  background: #e9f3ec;
  position: sticky;
  top: 0;
  z-index: 1;
}

.superadmin-tenants-table tbody tr:nth-child(even) {
  background: #fbfdfb;
}

.superadmin-history-table tbody tr:nth-child(even) {
  background: #fbfdfb;
}

.superadmin-history-table tbody tr {
  cursor: pointer;
}

.superadmin-history-table tbody tr.selected {
  background: #e3f1e7;
}

.superadmin-history-detail {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d8e2d4;
  box-shadow: none;
}

.superadmin-history-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.superadmin-history-pager label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.superadmin-history-pager select {
  min-width: 76px;
}

.superadmin-history-detail h4 {
  margin-bottom: 8px;
}

.superadmin-history-detail-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.superadmin-history-detail-meta p {
  margin: 0;
  font-size: 0.9rem;
}

.superadmin-history-diff-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.superadmin-history-diff-row {
  border: 1px solid #d8e2d4;
  border-radius: 10px;
  padding: 8px;
  background: #f8fbf9;
}

.superadmin-history-diff-row.changed {
  border-color: #adc8b4;
  background: #eef7f1;
}

.superadmin-history-diff-row h5 {
  margin: 0 0 6px;
  font-size: 0.84rem;
}

.superadmin-history-diff-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.superadmin-history-diff-values .before,
.superadmin-history-diff-values .after {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid #cfdbd2;
  background: #ffffff;
}

.superadmin-history-diff-values .arrow {
  font-size: 0.78rem;
  color: #476152;
}

.tenant-expiring-soon {
  color: #9b2c00;
  font-weight: 700;
}

.tenant-branding-preview {
  width: 100%;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid rgba(29, 107, 58, 0.2);
  background: linear-gradient(135deg, #1d6b3a 0%, #0f4a77 60%, #f2b705 100%);
}

.install-app-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  box-shadow: 0 10px 24px rgba(16, 56, 28, 0.22);
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.install-app-icon {
  width: 24px;
  height: 24px;
}

.calendar-export-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(29, 107, 58, 0.18);
  border-radius: 999px;
  background: #f3faf5;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 8px 18px rgba(16, 56, 28, 0.12);
  cursor: pointer;
  line-height: 1;
}

.calendar-export-btn:hover {
  background: #e4f2e8;
  color: var(--accent-strong);
}

.calendar-export-emoji {
  display: block;
  font-size: 17px;
  line-height: 1;
  transform: translateY(0);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.header-action-stack {
  position: static;
  margin-left: auto;
  align-self: flex-start;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#studentView .header-action-stack {
  position: static;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.student-topbar {
  position: relative;
  padding-right: 16px;
}

.header-action-stack .btn {
  min-width: 0;
}

#mainTopbar.is-demo-admin-view .header-action-stack {
  position: static;
  width: 100%;
  margin-top: 8px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#mainTopbar.is-demo-admin-view {
  display: block;
}

#mainTopbar.is-demo-admin-view #mainSwitchToPlayerBtn,
#mainTopbar.is-demo-admin-view #mainSwitchToParentBtn,
#mainTopbar.is-demo-admin-view #logoutBtn {
  width: 148px;
  flex: 0 0 148px;
  min-width: 148px;
  margin-top: 0;
}

.tenant-switch-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 74, 119, 0.18);
}

.tenant-switch-inline label {
  margin: 0;
  font-size: 0.8rem;
  color: #35546c;
}

.tenant-switch-inline select {
  min-height: 34px;
  min-width: 150px;
  border-radius: 8px;
  border: 1px solid rgba(15, 74, 119, 0.28);
  padding: 6px 8px;
}

.tenant-switch-settings-grid {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
}

.install-guide-modal-content {
  width: min(420px, 100%);
}

.install-guide-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install-guide-body p {
  margin: 0;
}

.install-guide-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-guide-note {
  font-size: 0.92rem;
}

.topbar {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Die App-Spalte ist auch am Desktop schmal: Aktionen bei Platzmangel unter den Titel umbrechen,
   statt rechts abgeschnitten zu werden. */
.topbar {
  flex-wrap: wrap;
  row-gap: 8px;
}

.topbar > .header-action-stack {
  max-width: 100%;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .topbar {
  flex-direction: row-reverse;
}

html[dir="rtl"] .tabs,
html[dir="rtl"] .grid-form,
html[dir="rtl"] .controls-row,
html[dir="rtl"] .quick-actions,
html[dir="rtl"] .player-row-actions,
html[dir="rtl"] .session-row-actions {
  direction: rtl;
}

.app-title {
  font-size: clamp(0.98rem, 3.4vw, 1.25rem);
  white-space: nowrap;
  line-height: 1.1;
}

#mainTopbar .app-title {
  display: block;
  min-width: 0;
  font-size: clamp(1.2rem, 3.8vw, 1.45rem);
  line-height: 1.15;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

#studentView .student-heading-row h1 {
  display: block;
  min-width: 0;
  font-size: clamp(1.08rem, 3.4vw, 1.3rem);
  line-height: 1.18;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.main-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
  max-width: 100%;
}

.main-dashboard-logo {
  width: 52px;
  height: 52px;
  max-width: 52px;
  max-height: 52px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.app-title-centered {
  text-align: center;
  margin-bottom: 12px;
}

.student-topbar {
  align-items: flex-start;
}

.student-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.student-push-status {
  margin-top: 2px;
}

.student-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.student-child-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.student-child-switch select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-color);
  font-size: 0.84rem;
  padding: 4px 8px;
  min-width: 170px;
  max-width: 240px;
}

.student-logo {
  width: 52px;
  height: 52px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}

.main-dashboard-logo.logo-contrast-box,
.student-logo.logo-contrast-box {
  border-color: rgba(29, 107, 58, 0.22);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 74, 119, 0.12);
}

#studentLogoutBtn {
  position: static;
}

.season-status {
  font-weight: 600;
  font-size: clamp(0.68rem, 2.2vw, 0.82rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.season-panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

#tenantRoleAdminPanel {
  padding: 18px;
  border: 1px solid rgba(15, 99, 169, 0.18);
  background: linear-gradient(165deg, #ffffff 0%, #f4faf6 48%, #eef7ff 100%);
}

#tenantRoleAdminPanel .finance-accordion {
  margin-bottom: 0;
  border-color: #d8e5da;
  background: #ffffff;
}

#tenantRoleAdminPanel .finance-accordion > summary {
  border-bottom: 1px solid #d8e5da;
  background: linear-gradient(180deg, #f8fbf8 0%, #eef5ef 100%);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 40px;
  padding: 10px 14px;
}

#tenantRoleAdminPanel .finance-accordion:not([open]) > summary {
  border-bottom: none;
}

#tenantRoleAdminPanel .finance-accordion-content {
  display: grid;
  gap: 12px;
  background: #ffffff;
}

#tenantRoleAdminPanel .accordion-description,
#tenantRoleAdminPanel .hint,
#tenantRoleAdminPanel .muted {
  margin: 0;
}

#tenantRoleAdminPanel .tenant-role-account-list {
  margin-top: 2px;
}

#tenantRoleAdminPanel hr {
  border: 0;
  border-top: 1px solid #dbe8de;
  width: 100%;
  margin: 0;
}

#tenantRoleAdminPanel > #seasonPanel,
#tenantRoleAdminPanel > .finance-accordion {
  margin-bottom: 8px;
}

#tenantRoleAdminPanel > .finance-accordion:last-child,
#tenantRoleAdminPanel > #seasonPanel:last-child {
  margin-bottom: 0;
}

.season-toggle-btn {
  appearance: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #d8e5da;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbf8 0%, #eef5ef 100%);
  color: var(--text);
  font-family: inherit;
}

.season-toggle-btn:hover {
  background: #edf5ef;
}

#seasonPanel:has(#seasonPanelContent:not(.hidden)) .season-toggle-btn {
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

#seasonPanelContent {
  margin-top: 0;
  border: 1px solid #d8e5da;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  padding: 14px;
}

#tenantRoleAdminPanel > .student-dashboard-title {
  margin: 0 0 10px;
}

.season-admin-area {
  display: grid;
  gap: 14px;
}

.season-admin-hero {
  border: 1px solid rgba(15, 99, 169, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 99, 169, 0.1), rgba(29, 107, 58, 0.1));
  padding: 10px 12px;
}

.season-admin-hero strong {
  font-size: 0.95rem;
  color: #163c2d;
}

.season-admin-hero p {
  margin: 6px 0 0;
  font-size: 0.84rem;
}

.season-mode-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #c7d6ca;
  background: #f5f8f6;
  color: #2f4135;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.season-mode-badge.is-global-mode {
  border-color: #9ec5df;
  background: #eaf5ff;
  color: #114a72;
}

.season-mode-badge.is-edit-mode {
  border-color: #b8d3ae;
  background: #edf8e8;
  color: #205325;
}

.season-first-start-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7d7b2;
  background: #fffde8;
  color: #574f19;
  font-size: 0.85rem;
  line-height: 1.45;
}

.season-admin-current-row,
.season-admin-current-actions {
  margin-bottom: 0;
}

.season-create-inline {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 12px;
  background: #f9fcf9;
  margin-top: 0;
}

.season-create-inline .btn {
  min-width: 230px;
}

.season-create-checkbox {
  padding-top: 8px;
}

.checkbox-field {
  align-content: start;
  padding-top: 18px;
}

.checkbox-field input {
  width: 28px;
  height: 28px;
}

#sessionsTab .checkbox-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed #c9d8cc;
  border-radius: 10px;
  background: #f4faf6;
}

#sessionsTab .checkbox-field span {
  min-width: 0;
  line-height: 1.2;
}

#sessionsTab .checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

#sessionsTab .session-series-hint-mini {
  margin-top: 2px;
  padding-left: 36px;
  font-size: 0.76rem;
  line-height: 1.2;
  color: #62715f;
}

#playersTab #playerForm .player-consent-group {
  border: 1px dashed #c9d8cc;
  border-radius: 10px;
  background: #f4faf6;
  padding: 10px 12px;
}

#playersTab #playerForm .player-consent-title {
  margin: 0;
  font-weight: 600;
}

#playersTab #playerForm .player-consent-hint {
  margin: 4px 0 8px;
  font-size: 0.9rem;
}

#playersTab #playerForm .player-consent-group .checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin: 0;
}

#playersTab #playerForm .player-consent-group .checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

#playersTab #playerForm .player-consent-group .checkbox-field span {
  line-height: 1.25;
}

.tabs {
  display: block;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d7e7d8;
  border-radius: 14px;
  background: #f6fbf7;
}

.main-inline-title {
  margin: 0;
  padding: 0 2px 10px;
}

#mainAreaInlineTitle {
  margin: 0;
}

.tabs.board-only {
  display: block;
}

.tab {
  border: 1px solid #c8decf;
  background: #f9fdf9;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-bottom: 8px;
}

#mainView .tabs .tab {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 40px;
  padding: 10px 14px;
}

#mainView #tabHelp {
  letter-spacing: 0;
}

.help-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.help-center-card {
  border: 1px solid #d4e6d8;
  border-radius: 14px;
  background: linear-gradient(170deg, #ffffff 0%, #f7fcf8 62%, #f0faf4 100%);
  box-shadow: 0 8px 22px rgba(24, 43, 26, 0.06);
  padding: 13px;
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.help-center-card:hover {
  transform: translateY(-1px);
  border-color: #bed8c3;
  box-shadow: 0 12px 26px rgba(24, 43, 26, 0.1);
}

.help-center-card h3 {
  margin: 0;
  font-size: 1rem;
}

.help-center-links {
  display: grid;
  gap: 6px;
}

#helpTab {
  border-color: rgba(37, 201, 138, 0.2);
  background:
    radial-gradient(circle at 96% 8%, rgba(37, 201, 138, 0.16), transparent 24%),
    radial-gradient(circle at 8% 96%, rgba(15, 99, 169, 0.11), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(242, 251, 248, 0.92) 100%);
}

#helpTab .section-head {
  margin-bottom: 8px;
}

#helpTabSubtitle {
  margin: 0;
}

#helpRoleHint {
  margin: 6px 0 2px;
}

.help-center-link {
  border: 1px solid #d6e6da;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  display: grid;
  gap: 2px;
  text-decoration: none;
  color: #134a28;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

#supportAdminPanel {
  border-color: rgba(14, 91, 140, 0.28);
  background:
    radial-gradient(circle at 96% 6%, rgba(68, 145, 207, 0.18), transparent 30%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.95));
}

#supportAdminPanel > summary {
  color: #143f64;
  font-weight: 700;
}

#supportAdminPanel[open] > summary {
  border-bottom-color: rgba(14, 91, 140, 0.24);
}

.support-owner-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1rem;
}

.support-owner-card {
  border: 1px solid rgba(16, 54, 84, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.9rem;
}

.support-ticket-list {
  display: grid;
  gap: 0.55rem;
  max-height: 520px;
  overflow: auto;
}

.support-ticket-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(16, 54, 84, 0.16);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.2rem;
  cursor: pointer;
}

.support-ticket-item.is-active {
  border-color: #1d6b3a;
  box-shadow: 0 0 0 2px rgba(29, 107, 58, 0.16);
}

.support-ticket-item small,
.support-ticket-item span {
  color: var(--muted, #516176);
  font-size: 0.84rem;
}

.support-ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.support-ticket-badge-confirm {
  color: #6b3f00;
  border: 1px solid rgba(178, 118, 0, 0.35);
  background: linear-gradient(135deg, rgba(255, 235, 179, 0.95), rgba(255, 246, 214, 0.95));
}

.support-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.support-ticket-messages {
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 0.55rem;
  padding-right: 0.2rem;
}

.support-message-item {
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(16, 54, 84, 0.14);
  background: #f9fcff;
}

.support-message-item.is-owner {
  background: #eff8f2;
  border-color: rgba(29, 107, 58, 0.22);
}

.support-message-item header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.support-message-item small {
  color: var(--muted, #516176);
  font-size: 0.8rem;
}

.support-message-item p {
  margin: 0;
  white-space: pre-wrap;
}

.support-message-image {
  margin-top: 0.5rem;
  display: block;
  max-width: min(100%, 360px);
  border-radius: 10px;
  border: 1px solid rgba(16, 54, 84, 0.18);
  background: #ffffff;
}

.support-reply-form {
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .support-owner-layout {
    grid-template-columns: 1fr;
  }
}

.help-center-link:hover {
  border-color: #7ab58a;
  background: #f3fbf5;
  text-decoration: none;
}

.help-center-link span {
  font-weight: 700;
  line-height: 1.25;
}

.help-center-link small {
  color: #607063;
  font-size: 0.78rem;
  line-height: 1.3;
}

.student-help-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
  padding: 10px 12px 12px;
}

#studentHelpDetails .help-center-link {
  position: relative;
  border: 1px solid #cfe3d5;
  border-radius: 12px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 201, 138, 0.12), transparent 36%),
    linear-gradient(165deg, #ffffff 0%, #f5fbf7 100%);
  box-shadow: 0 6px 16px rgba(24, 43, 26, 0.07);
  min-height: 92px;
  align-content: start;
}

#studentHelpDetails .help-center-link::after {
  content: "↗";
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 0.92rem;
  color: #5a8f68;
  opacity: 0.88;
}

#studentHelpDetails .help-center-link:hover,
#studentHelpDetails .help-center-link:focus-visible {
  border-color: #7ab58a;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 201, 138, 0.17), transparent 38%),
    linear-gradient(165deg, #ffffff 0%, #eef9f1 100%);
  box-shadow: 0 10px 22px rgba(24, 43, 26, 0.11);
  transform: translateY(-1px);
  outline: none;
}

#studentHelpDetails .help-center-link span {
  color: #123f24;
  font-size: 0.88rem;
  line-height: 1.28;
  padding-right: 16px;
}

#studentHelpDetails .help-center-link small {
  color: #5e6f62;
  font-size: 0.76rem;
  line-height: 1.3;
}

#studentHelpDetails .student-charges-summary {
  background: linear-gradient(135deg, rgba(30, 107, 58, 0.08), rgba(15, 99, 169, 0.06));
  border: 1px solid #d6e8dc;
  border-radius: 12px;
}

#studentHelpDetails[open] .student-charges-summary::after {
  transform: rotate(90deg);
}

@media (max-width: 600px) {
  .help-center-grid {
    grid-template-columns: 1fr;
  }

  .help-center-link {
    padding: 7px 9px;
  }

  .student-help-links {
    grid-template-columns: 1fr;
  }
}

.tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-content {
  display: none;
  font-size: 17px;
  margin: 4px 0 10px;
  transform: translateY(0);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tab-content.is-active {
  display: block;
  animation: enter 220ms ease;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 14px;
}

#attendanceTab .section-head,
#onlineStatusTab .section-head,
#lineupTab .section-head,
#pushTab .section-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#attendanceTab .section-head .muted,
#attendanceTab .section-head .hint,
#onlineStatusTab .section-head .muted,
#lineupTab .section-head .muted,
#pushTab .section-head .muted {
  margin: 0;
}

#pushTab .push-ack-overview-head {
  margin-top: 8px;
  margin-bottom: 8px;
  align-items: center;
}

#pushTab .checkbox-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed #c9d8cc;
  background: #f4faf6;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#pushTab .checkbox-inline:hover {
  border-color: #afc8b7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

#pushTab #pushRequireReadAck {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

#pushTab #pushRequireReadAck:focus-visible {
  outline: 2px solid rgba(15, 74, 119, 0.35);
  outline-offset: 2px;
}

#pushTab #pushReadAckLabel {
  display: block;
  margin-top: 0;
  font-size: 0.86rem;
  line-height: 1.25;
  color: #23343f;
}

.push-ack-table-wrap table th,
.push-ack-table-wrap table td {
  white-space: nowrap;
}

#attendanceTab .section-head .muted,
#attendanceTab .section-head .hint,
#sessionsTab .section-head .muted,
#onlineStatusTab .section-head .muted,
#lineupTab .section-head .muted,
#pushTab .section-head .muted,
#attendanceSummary,
#reportSummary,
#financeTaskSummary,
#pushTargetHint,
#calendarExportNotice,
#trainerLineupNotice {
  font-size: 0.78rem;
  line-height: 1.3;
}

.grid-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.player-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: end;
}

.player-form h2 {
  margin: 0;
  font-size: 1rem;
  grid-column: 1 / -1;
  white-space: normal;
}

.player-form label {
  font-size: 0.78rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.player-form input {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.player-export-heading {
  margin: 0 0 4px;
  font-size: 1rem;
  white-space: normal;
}

.player-export-scope-note {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: #4b594f;
  line-height: 1.35;
}

.player-export-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}

.player-export-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #4b594f;
}

.player-export-checkbox input {
  margin: 0;
}

#playersTab .player-export-checkbox[for="exportLoginCardsIncludeParents"] {
  align-items: center;
  flex-wrap: nowrap;
  line-height: 1;
}

#playersTab #exportLoginCardsIncludeParents {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

#playersTab .player-export-checkbox[for="exportLoginCardsIncludeParents"] .player-export-checkbox-text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.player-export-checkbox select {
  min-width: 170px;
  padding: 4px 8px;
  border: 1px solid #c6d8c9;
  border-radius: 8px;
  background: #ffffff;
  color: #234129;
  font-size: 0.82rem;
}

#playersTab th:first-child,
#playersTab td:first-child {
  width: 38px;
  text-align: center;
}

#playersTab td:first-child input[type="checkbox"],
#playersTab th:first-child input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.table-wrap {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#playersTab .table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

#playersTab .sessions-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

#playersTab .sessions-table th,
#playersTab .sessions-table td {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

#playersTab .sessions-table td.player-name-cell {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 140px;
}

#sessionsTab .table-wrap {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#sessionsTab thead th {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

#sessionsTab .sessions-table {
  font-size: 0.9rem;
}

#sessionsTab .session-title-cell {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sessionsTab .session-time-cell {
  white-space: nowrap;
  font-size: 0.84rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e3e9df;
  padding: 10px 8px;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

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

#attendanceTab .quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

#attendanceTab .quick-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

#markAllPresentBtn {
  border-color: #2f7a46;
  background: linear-gradient(180deg, #267f46 0%, #1f6d3b 100%);
}

#markAllPresentBtn:hover {
  background: linear-gradient(180deg, #247843 0%, #1a6034 100%);
}

#markAllAbsentBtn {
  border-color: #9d2118;
  background: linear-gradient(180deg, #cb3a2f 0%, #ab281f 100%);
}

#markAllAbsentBtn:hover {
  background: linear-gradient(180deg, #b83228 0%, #972017 100%);
}

#markAllUncertainBtn {
  border-color: #b0881a;
  background: linear-gradient(180deg, #fff7dd 0%, #f5e8be 100%);
}

#markAllUncertainBtn:hover {
  background: linear-gradient(180deg, #faefc8 0%, #efdca0 100%);
}

#attendanceTab .controls-row > label {
  width: 100%;
  min-width: 0;
}

#playersTab,
#sessionsTab,
#attendanceTab,
#onlineStatusTab,
#lineupTab,
#reportTab,
#financeTab,
#pollsTab,
#helpTab,
#pushTab {
  padding: 14px;
}

#playersTab,
#sessionsTab {
  min-width: 0;
}

#playersTab {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#sessionsTab {
  overflow-x: hidden;
}

#playersTab > *,
#sessionsTab > * {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#playersTab .grid-form,
#sessionsTab .grid-form {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#playersTab .grid-form > *,
#sessionsTab .grid-form > * {
  min-width: 0;
  max-width: 100%;
}

#playersTab label,
#sessionsTab label {
  width: 100%;
  min-width: 0;
}

#playersTab input,
#playersTab select,
#playersTab textarea,
#sessionsTab input,
#sessionsTab select,
#sessionsTab textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#sessionsTab .controls-row > * {
  min-width: 0;
  max-width: 100%;
}

#sessionsTab .grid-form label {
  overflow: hidden;
}

#sessionsTab input[type="date"],
#sessionsTab input[type="time"],
#sessionsTab input[type="text"],
#sessionsTab select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#sessionsTab #sessionForm input[name="date"],
#sessionsTab #sessionForm input[name="startTime"],
#sessionsTab #sessionForm input[name="endTime"] {
  width: min(100%, 240px);
}

#playersTab .player-form,
#sessionsTab #sessionForm {
  grid-template-columns: minmax(0, 1fr);
}

#playersTab .player-export-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

#playersTab .player-export-checkbox,
#playersTab .player-export-tools .btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#attendanceSessionSelect {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 760px) {
  .attendance-list {
    grid-template-columns: 1fr;
  }

  #attendanceTab .quick-actions {
    grid-template-columns: 1fr;
  }
}

.trainer-dashboard {
  border: 1px solid #d6dfd2;
  border-radius: 12px;
  background: #f8fcf8;
  padding: 10px;
  margin-bottom: 12px;
}

.trainer-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.trainer-dashboard-card-wide {
  grid-column: span 2;
}

.trainer-dashboard-card {
  border: 1px solid #d6dfd2;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf7 100%);
  padding: 8px 10px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  align-items: center;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.trainer-dashboard-card-neutral {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf7 100%);
  border-color: #d6dfd2;
  color: #243227;
}

.trainer-dashboard-card-present {
  background: linear-gradient(180deg, #edf8f0 0%, #e4f3e8 100%);
  border-color: #c7e5d1;
  color: #145a2b;
}

.trainer-dashboard-card-absent {
  background: linear-gradient(180deg, #fbeceb 0%, #f6dfdd 100%);
  border-color: #efc3be;
  color: #8a1510;
}

.trainer-dashboard-card-uncertain {
  background: linear-gradient(180deg, #fff7df 0%, #f8edc0 100%);
  border-color: #ead89a;
  color: #6a4d00;
}

.trainer-dashboard-card-unregistered {
  background: linear-gradient(180deg, #fff1e2 0%, #f6dfc7 100%);
  border-color: #efcfab;
  color: #7a2900;
}

.trainer-dashboard-card .muted {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.2;
}

.trainer-dashboard-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.35em;
  margin-top: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-align: center;
}

.trainer-dashboard-card-present .muted,
.trainer-dashboard-card-present strong {
  color: #145a2b;
}

.trainer-dashboard-card-absent .muted,
.trainer-dashboard-card-absent strong {
  color: #8a1510;
}

.trainer-dashboard-card-uncertain .muted,
.trainer-dashboard-card-uncertain strong {
  color: #6a4d00;
}

.trainer-dashboard-card-unregistered .muted,
.trainer-dashboard-card-unregistered strong {
  color: #7a2900;
}

.trainer-weekly-summary {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: #425445;
}

.trainer-attendance-tools {
  margin-bottom: 0;
}

.trainer-lineup {
  border: 1px solid #d6dfd2;
  border-radius: 12px;
  background: #f7fbf7;
  padding: 10px;
  margin-bottom: 12px;
}

.trainer-lineup-accordion {
  margin-bottom: 12px;
}

.trainer-lineup-accordion > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.trainer-lineup-head {
  margin-bottom: 8px;
}

.trainer-lineup-head h3 {
  margin: 0;
  font-size: 1rem;
}

.trainer-lineup-tools {
  margin-bottom: 8px;
}

.trainer-lineup-team-create-form {
  display: inline-flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.trainer-lineup-team-create-form label {
  min-width: 0;
  flex: 1 1 190px;
}

/* Mannschaften untereinander, alle gleich breit; Farbe und Aktionen in gleich breiten Spalten */
.trainer-lineup-team-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.trainer-lineup-team-tabs.is-touch-sorting {
  user-select: none;
  -webkit-user-select: none;
}

.trainer-lineup-team-tab-wrap {
  --team-accent: #2f7046;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #b7cbb7;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  cursor: grab;
}

.trainer-lineup-team-tab-wrap:active {
  cursor: grabbing;
}

.trainer-lineup-team-tab-wrap.is-drag-source {
  opacity: 0.68;
}

.trainer-lineup-team-tab-wrap.is-drop-before {
  box-shadow: inset 3px 0 0 var(--team-accent);
}

.trainer-lineup-team-tab-wrap.is-drop-after {
  box-shadow: inset -3px 0 0 var(--team-accent);
}

.trainer-lineup-team-tab-wrap.is-tab-active {
  border-color: var(--team-accent);
  box-shadow: inset 0 0 0 1px var(--team-accent);
}

.trainer-lineup-team-tab-wrap.is-disabled {
  opacity: 0.55;
}

.trainer-lineup-team-tab {
  background: transparent;
  color: #173d22;
  border: none;
  border-radius: 0;
  padding: 8px 10px;
  min-width: 110px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px;
  column-gap: 8px;
  text-align: left;
  cursor: pointer;
}

.trainer-lineup-team-tab.is-active {
  background: color-mix(in srgb, var(--team-accent) 14%, #ffffff);
}

.trainer-lineup-team-tab.is-inactive {
  color: #7a9282;
}

.trainer-lineup-team-tab small {
  grid-column: 2;
  color: #4f6252;
}

.trainer-lineup-team-tab-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--team-accent);
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.trainer-lineup-team-color-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #b7cbb7;
  padding: 0 6px;
  cursor: pointer;
}

.trainer-lineup-team-color-input {
  width: 20px;
  height: 20px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.trainer-lineup-team-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.trainer-lineup-team-color-input::-webkit-color-swatch {
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}

.trainer-lineup-team-tab-action {
  background: none;
  border: none;
  border-left: 1px solid #b7cbb7;
  padding: 0 8px;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  color: #355243;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trainer-lineup-team-tab-action:hover {
  background: #eef4ef;
  color: #173d22;
}

.trainer-lineup-team-tab-toggle {
  background: none;
  border: none;
  border-left: 1px solid #b7cbb7;
  padding: 0 10px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: #51615a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trainer-lineup-team-tab-toggle:hover {
  background: #f0f5f1;
  color: #173d22;
}

.trainer-lineup-team-tab-remove {
  background: none;
  border: none;
  border-left: 1px solid #b7cbb7;
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: #8a1912;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trainer-lineup-team-tab-remove:hover {
  background: #fbe8e6;
  color: #7a150f;
}

.trainer-lineup-team-tab-wrap {
  display: flex;
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
}

.trainer-lineup-team-tab {
  flex: 1 1 auto;
  min-width: 0;
}

.trainer-lineup-team-tab > span:not(.trainer-lineup-team-tab-color-dot),
.trainer-lineup-team-tab small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.trainer-lineup-team-color-control,
.trainer-lineup-team-tab-action,
.trainer-lineup-team-tab-remove,
.trainer-lineup-team-tab-toggle {
  flex: 0 0 48px;
  width: 48px;
  padding: 0;
  border-left: none;
  border-inline-start: 1px solid #b7cbb7;
  font-size: 1rem;
}

.trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-color-control,
.trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-action,
.trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-remove,
.trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-toggle {
  border-inline-start-color: color-mix(in srgb, var(--team-accent) 45%, #b7cbb7);
}

/* #mainView input setzt sonst Breite 100 % bzw. Touch-Mindesthöhe – der Farbwähler schrumpft zum Strich */
#mainView .trainer-lineup-team-color-input {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  flex: 0 0 24px;
}

/* Schmal: Name oben über die volle Breite, Farbe und Aktionen gleich breit darunter */
@media (max-width: 520px) {
  .trainer-lineup-team-tab-wrap {
    flex-wrap: wrap;
  }
  .trainer-lineup-team-tab {
    flex: 1 1 100%;
  }
  .trainer-lineup-team-color-control,
  .trainer-lineup-team-tab-action,
  .trainer-lineup-team-tab-remove,
  .trainer-lineup-team-tab-toggle {
    /* Basis > 0, sonst passt der Farbwähler mit 0 px noch in die Namenszeile */
    flex: 1 1 44px;
    width: auto;
    min-width: 44px;
    box-sizing: border-box;
    min-height: 40px;
    border-top: 1px solid #b7cbb7;
  }
  .trainer-lineup-team-color-control {
    border-inline-start: none;
  }
  .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-color-control,
  .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-action,
  .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-remove,
  .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-toggle {
    border-top-color: color-mix(in srgb, var(--team-accent) 45%, #b7cbb7);
  }
}

.trainer-lineup-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 8px;
}

.trainer-lineup-meta-row > label {
  min-width: 0;
}

.trainer-lineup-meta-row input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.trainer-lineup-meta-row input[readonly] {
  background: #eef4ef;
}

.trainer-lineup-chip.is-also-assigned {
  box-shadow: inset 0 0 0 2px #e0b94a;
}

#trainerLineupFieldContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* Einzelfeld (Fußball, Volleyball, Sonstige) oder zwei Felder Angriff/Abwehr (Handball, Basketball) */
#trainerLineupFieldContainer #trainerLineupFieldOffensive,
#trainerLineupFieldContainer #trainerLineupFieldDefensive,
#trainerLineupFieldContainer.dual-fields #trainerLineupField {
  display: none;
}

#trainerLineupFieldContainer.dual-fields #trainerLineupFieldOffensive,
#trainerLineupFieldContainer.dual-fields #trainerLineupFieldDefensive {
  display: block;
}

.trainer-lineup-field {
  --field-ratio: 0.8;
  position: relative;
  flex: 0 1 auto;
  width: min(100%, 560px, calc(78vh * var(--field-ratio)));
  aspect-ratio: var(--field-ratio);
  border-radius: 14px;
  border: 2px solid rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #5f7d74 0%, #4d6a62 100%);
  overflow: hidden;
  touch-action: manipulation;
}

/* Seitenverhältnisse der echten Spielflächen, damit Linien und Positionen stimmen */
.trainer-lineup-field[data-sport="fussball"] { --field-ratio: 0.648; }
.trainer-lineup-field[data-sport="handball"] { --field-ratio: 1; }
.trainer-lineup-field[data-sport="basketball"] { --field-ratio: 1.071; }
.trainer-lineup-field[data-sport="volleyball"] { --field-ratio: 1; }

#trainerLineupFieldContainer .trainer-lineup-bench-wrap {
  flex: 1 1 100%;
  margin-top: 0;
}

#trainerLineupFieldContainer.dual-fields .trainer-lineup-field {
  width: min(100%, 520px, calc(70vh * var(--field-ratio)));
}

.trainer-lineup-field[data-setup-label]:not([data-setup-label=""])::before {
  content: attr(data-setup-label);
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  pointer-events: none;
}

.trainer-lineup-field[data-setup="offensive"]::before {
  background: #b8322c;
}

.trainer-lineup-field[data-setup="defensive"]::before {
  background: #1f5f9e;
}

.trainer-lineup-slot {
  position: absolute;
  z-index: 1;
  width: clamp(54px, 17%, 78px);
  min-height: 46px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -50%);
  padding: 3px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.trainer-lineup-slot.is-filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 45, 22, 0.5);
}

.trainer-lineup-slot.has-uncertain-player {
  background: rgba(120, 95, 24, 0.58);
}

.trainer-lineup-slot-label {
  font-size: 0.66rem;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.trainer-lineup-player {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #143322;
  padding: 4px 6px;
  font-size: 0.68rem;
  line-height: 1.2;
  cursor: grab;
}

.trainer-lineup-player.is-uncertain {
  background: #fff4d8;
  border-color: #d8ab43;
  color: #5d4309;
}

.trainer-lineup-player:active {
  cursor: grabbing;
}

.trainer-lineup-empty {
  font-size: 0.65rem;
  opacity: 0.88;
}

.trainer-lineup-bench-wrap {
  margin-top: 10px;
}

.trainer-lineup-bench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trainer-lineup-bench-head .muted {
  margin: 0;
}

.trainer-lineup-field.is-layout-editing .trainer-lineup-slot {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(246, 199, 78, 0.7);
  cursor: move;
}

.trainer-lineup-field.is-layout-editing .trainer-lineup-slot-label {
  font-weight: 700;
}

.trainer-lineup-bench {
  min-height: 44px;
  border: 1px dashed #8ba191;
  border-radius: 10px;
  background: #eef6ef;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.trainer-lineup-bench-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: 8px;
}

.trainer-lineup-bench-slot {
  width: 100%;
  max-width: 84px;
  min-width: 0;
  min-height: 48px;
  border-radius: 10px;
  border: 1px dashed #8ba191;
  background: #f8fbf8;
  color: #284432;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px;
}

.trainer-lineup-bench-slot.is-filled {
  border-style: solid;
  border-color: #5f8670;
  background: #d8e8da;
}

.trainer-lineup-bench-slot.has-uncertain-player {
  border-color: #c8a14b;
  background: #f4ead4;
}

.trainer-lineup-bench-pool {
  min-height: 44px;
  border: 1px dashed #8ba191;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trainer-lineup-chip {
  border: 1px solid #89a78f;
  border-radius: 20px;
  background: #ffffff;
  color: #1f3d2a;
  padding: 5px 10px;
  font-size: 0.74rem;
  cursor: grab;
}

.trainer-lineup-chip.is-uncertain {
  border-color: #c8a14b;
  background: #fff4d8;
  color: #5d4309;
}

.trainer-lineup-chip:active {
  cursor: grabbing;
}

.trainer-lineup-slot,
.trainer-lineup-bench-slot {
  position: relative;
}

.trainer-lineup-field .trainer-lineup-slot {
  position: absolute;
}

.trainer-lineup-player.is-absent {
  background: #f6dcda;
  border-color: #b8322c;
  color: #6d1a15;
  text-decoration: line-through;
}

.trainer-lineup-player.is-selected,
.trainer-lineup-chip.is-selected {
  outline: 3px solid #f6c74e;
  outline-offset: 1px;
}

.trainer-lineup-field.has-selection .trainer-lineup-slot,
.trainer-lineup.has-selection .trainer-lineup-bench-slot {
  cursor: pointer;
}

.trainer-lineup-field.has-selection .trainer-lineup-slot:not(.is-filled) {
  border-color: #f6c74e;
  background: rgba(246, 199, 78, 0.22);
}

.trainer-lineup-remove {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: #ffffff;
  color: #8a1912;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* × nur bei Zeiger über dem Platz oder ausgewähltem Spieler, damit Positionsnamen frei bleiben */
.trainer-lineup-remove {
  display: none;
}

.trainer-lineup-slot:hover .trainer-lineup-remove,
.trainer-lineup-bench-slot:hover .trainer-lineup-remove,
.trainer-lineup-player.is-selected + .trainer-lineup-remove {
  display: flex;
}

@media (hover: none) {
  .trainer-lineup-slot:hover .trainer-lineup-remove,
  .trainer-lineup-bench-slot:hover .trainer-lineup-remove {
    display: none;
  }

  .trainer-lineup-player.is-selected + .trainer-lineup-remove {
    display: flex;
  }
}

.trainer-lineup-field.is-layout-editing .trainer-lineup-slot {
  touch-action: none;
  user-select: none;
}

.trainer-lineup-field.is-layout-editing .trainer-lineup-slot.is-dragging {
  z-index: 5;
  box-shadow: 0 0 0 3px #f6c74e, 0 6px 16px rgba(0, 0, 0, 0.35);
}

.trainer-lineup-chip-tags {
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 8px;
  background: #1f3d2a;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
}

#trainerLineupLayoutEditBtn.is-active {
  background: #f6c74e;
  border-color: #c8a14b;
  color: #3b2c05;
}

.attendance-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.attendance-list.is-readonly {
  opacity: 0.98;
}

.attendance-item {
  display: flex;
  align-items: stretch;
  border: 1px solid #d6dfd2;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fbfdf9;
  cursor: pointer;
  min-height: 64px;
}

.attendance-item > div {
  flex: 1;
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: stretch;
}

.attendance-item strong {
  line-height: 1.2;
}

.attendance-player-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.attendance-player-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-push-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.attendance-push-indicator.is-active {
  color: #0f5132;
  background: #d1e7dd;
  border: 1px solid #6dbf8e;
}

.attendance-push-indicator.is-inactive {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #d99aa2;
}

.attendance-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.attendance-item-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-item .badge {
  font-size: 0.72rem;
  padding: 2px 6px;
  line-height: 1.15;
  justify-self: start;
  width: fit-content;
}

.attendance-status-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.attendance-reason-inline {
  font-size: 0.68rem;
  color: #51615a;
  line-height: 1.2;
  max-width: min(46ch, 90vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-item-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 4px;
  margin-left: 8px;
}

.btn-quick-penalty {
  background: none;
  border: 1px solid #999;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-quick-penalty:hover {
  background: #f0f0f0;
  border-color: #666;
}

.btn-quick-penalty:active {
  background: #e0e0e0;
}

.btn-edit-catalog,
.btn-delete-catalog {
  background: none;
  border: 1px solid #999;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  margin: 0 2px;
}

.btn-edit-catalog:hover {
  background: #d4edda;
  border-color: #28a745;
}

.btn-delete-catalog:hover {
  background: #f8d7da;
  border-color: #dc3545;
}

.btn-edit-catalog:active,
.btn-delete-catalog:active {
  opacity: 0.8;
}

.session-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.session-row-actions .btn-edit-catalog,
.session-row-actions .btn-delete-catalog {
  min-width: 30px;
  padding: 2px 6px;
  font-size: 0.95rem;
  line-height: 1.1;
}

.finance-catalog-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.player-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-access-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.player-access-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfdfd4;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #eef6f0;
  color: #214735;
}

.player-access-badge.is-parent-active {
  border-color: #94b9a3;
  background: linear-gradient(180deg, #e8f4ec 0%, #dceee3 100%);
  color: #1f5d3a;
}

.player-access-badge.is-parent-disabled {
  border-color: #c5ccd3;
  background: linear-gradient(180deg, #f4f6f8 0%, #eceff3 100%);
  color: #6d7884;
}

.player-access-badge.is-consent-ready {
  border-color: #8ab89a;
  background: linear-gradient(180deg, #ecf7ef 0%, #dff0e5 100%);
  color: #1e5a39;
}

.player-access-badge.is-consent-missing {
  border-color: #d9b08f;
  background: linear-gradient(180deg, #fff3e8 0%, #fde6d5 100%);
  color: #7a3f1a;
}

.player-access-badge.player-consent-toggle {
  cursor: pointer;
  min-width: 26px;
  justify-content: center;
  padding: 1px 6px;
}

.player-access-badge.player-consent-toggle:disabled {
  cursor: wait;
  opacity: 0.7;
}

.player-access-badge.player-consent-toggle:focus-visible {
  outline: 2px solid #2f7f4a;
  outline-offset: 2px;
}

.player-row-actions .btn-edit-catalog.is-disabled {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
}

.player-access-badge.is-consent-needed {
  border-color: #d9b08f;
  background: #fff6ef;
  color: #7a3f1a;
}

.player-role-editor {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
}

.player-role-chip {
  min-height: 24px;
  flex: 0 0 auto;
  border: 1px solid #b7c9bd;
  border-radius: 999px;
  background: #f7fbf8;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.player-role-chip:hover {
  background: #eef6ff;
  border-color: #4b85c7;
}

.player-role-chip.is-selected {
  background: linear-gradient(180deg, #ecfff1 0%, #d7f0e0 100%);
  border-color: #1f6d3b;
  box-shadow: 0 0 0 2px rgba(31, 109, 59, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.player-role-chip.is-selected::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #1f6d3b;
  border: 1px solid #ffffff;
}

.player-role-chip.is-base-role {
  border-style: dashed;
}

.player-role-chip-symbol {
  font-size: 0.78rem;
  line-height: 1;
}

.player-role-chip-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.player-role-save-btn {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 30px;
}

.player-role-readonly {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.player-role-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e2d8;
  border-radius: 999px;
  background: #f4faf5;
  color: #29432f;
  justify-content: center;
  min-width: 22px;
  padding: 1px 6px;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}

#userRoleBadge,
#studentRoleBadge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.header-role-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.header-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(15, 99, 169, 0.22);
  border-radius: 999px;
  background: rgba(234, 245, 255, 0.9);
  color: #1f3f56;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}

.attendance-list.is-readonly .attendance-item {
  cursor: default;
}

.attendance-item.is-present {
  border-color: #2f7a46;
  background: #ecf8ef;
}

.attendance-item.is-absent {
  border-color: #b42318;
  background: #fce9e8;
}

.attendance-item.is-unregistered {
  border-color: #c44b00;
  background: #fff0e6;
}

.attendance-item.is-uncertain {
  border-color: #b0881a;
  background: #fff6dd;
}

.badge {
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 4px 8px;
  background: #dde8d9;
}

.badge.present {
  background: #d4f0dc;
  color: #145a2b;
}

.badge.absent {
  background: #f8d6d3;
  color: #8a1510;
}

.badge.is-present {
  background: #d4f0dc;
  color: #145a2b;
}

.badge.is-absent {
  background: #f8d6d3;
  color: #8a1510;
}

.badge.is-unregistered {
  background: #fde6d0;
  color: #7a2900;
}

.badge.is-uncertain {
  background: #ffe9ae;
  color: #6a4d00;
}

.badge.is-cancelled {
  background: #f8d7da;
  color: #842029;
}

.badge.is-planned {
  background: #e9f5ec;
  color: #1d6b3a;
}

#studentView {
  display: grid;
  gap: 10px;
}

#studentView.hidden {
  display: none;
}

.student-dashboard-card {
  margin-top: 0;
  padding: 12px;
}

.student-dashboard-title {
  font-size: 1rem;
  margin: 0 0 10px;
}

.student-dashboard-inline-panels {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.student-summary-card {
  border: 1px solid #d6e5d8;
  border-radius: 12px;
  background: #f7fbf8;
  padding: 10px 12px;
  margin-bottom: 10px;
}

details.student-summary-card {
  padding: 0;
  overflow: hidden;
}

.student-trend-summary {
  padding: 10px 12px 12px;
}

.student-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.student-taskhub-panel {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}
.student-taskhub-tabs {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.student-taskhub-tab {
  border: 1px solid #b9d6c0;
  background: #eaf6ed;
  color: #264334;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-taskhub-tab:hover {
  background: #e1f1e6;
  border-color: #9fc4a8;
}

.student-taskhub-tab:focus-visible {
  outline: 2px solid rgba(29, 107, 58, 0.35);
  outline-offset: 1px;
}

.student-taskhub-tab.is-active {
  background: #dceee0;
  border-color: #9fc4a8;
}
.student-taskhub-tab-panel {
  display: grid;
  gap: 10px;
}
.student-taskhub-block {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
  display: grid;
  gap: 8px;
}
.student-taskhub-block h4 {
  margin: 0;
  font-size: 0.84rem;
  color: #2f4635;
}
.student-taskhub-list {
  display: grid;
  gap: 6px;
}
.student-taskhub-item {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: #f7fbf8;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}
.student-taskhub-item strong {
  font-size: 0.78rem;
  line-height: 1.25;
  color: #20352a;
  overflow-wrap: anywhere;
}
.student-taskhub-meta {
  font-size: 0.72rem;
  line-height: 1.2;
  color: #4d6153;
  overflow-wrap: anywhere;
}
.student-taskhub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.student-taskhub-actions .btn {
  padding: 4px 8px;
  font-size: 0.72rem;
}
.student-taskhub-offer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.student-taskhub-offer-form label {
  display: grid;
  gap: 4px;
  font-size: 0.76rem;
  color: #34493a;
}
.student-taskhub-offer-form label:last-of-type {
  grid-column: 1 / -1;
}
.student-taskhub-offer-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.student-open-list {
  display: grid;
  gap: 6px;
}

.student-open-item {
  border: 1px solid #dce8de;
  border-left: 4px solid #c7d9cb;
  border-radius: 10px;
  background: #ffffff;
  padding: 7px 9px;
}

.student-open-item-compact {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
}

.student-open-item.is-high {
  border-left-color: #d14343;
}

.student-open-item.is-medium {
  border-left-color: #d78a2e;
}

.student-open-item.is-low {
  border-left-color: #2f7d44;
}

.student-open-badges {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.student-urgency-badge.is-high {
  background: #fbe3e3;
  color: #842029;
}

.student-urgency-badge.is-medium {
  background: #fff1df;
  color: #8a4b00;
}

.student-urgency-badge.is-low {
  background: #e8f5ec;
  color: #1d6b3a;
}

.student-open-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.student-open-item-line1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.student-open-item-title {
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.student-open-item-line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.7rem;
  line-height: 1.2;
  color: #506151;
}

.student-open-item-meta-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-open-status-badge {
  flex: 0 0 auto;
  font-size: 0.66rem;
  padding: 1px 6px;
}

.student-open-item-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.student-open-actions {
  display: inline-flex;
  gap: 6px;
  margin-top: 6px;
}

.student-open-actions-compact {
  gap: 4px;
  margin-top: 0;
}

.student-open-emoji-btn {
  min-height: 24px;
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0ddd2;
  background: #f8fbf8;
}

.student-open-emoji-btn:hover {
  background: #eef6ef;
}

.student-open-actions .btn {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.student-trend-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.student-trend-kpis > div {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: #ffffff;
  padding: 7px 9px;
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: start;
}

.student-trend-kpis > div span {
  font-size: 0.74rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.student-trend-kpis strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.student-stats-details {
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #f7fbf8;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.student-history-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.student-history-detail-card {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-history-detail-card strong {
  font-size: 0.84rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.student-history-detail-card div {
  overflow-wrap: anywhere;
}

.student-leaderboard-wrap {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.student-leaderboard-card {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.student-leaderboard-subtitle {
  font-size: 0.78rem;
  color: #4b594f;
}

.student-leaderboard-list {
  display: grid;
  gap: 6px;
}

.student-leaderboard-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
}

.student-leaderboard-badge {
  font-size: 1rem;
  line-height: 1;
}

.student-leaderboard-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.student-leaderboard-metric {
  font-size: 0.78rem;
  color: #34493a;
  white-space: nowrap;
}

.student-leaderboard-own-rank {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #4b594f;
}

.student-leaderboard-empty {
  font-size: 0.78rem;
  color: #4b594f;
}

@media (max-width: 600px) {
  .student-trend-kpis {
    grid-template-columns: 1fr;
  }

  .student-history-detail-grid {
    grid-template-columns: 1fr;
  }

  .student-open-item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-open-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .student-history-detail-grid {
    grid-template-columns: 1fr;
  }
}

.student-past-section {
  margin-top: 14px;
}

#studentActionSummary {
  margin-top: 14px;
}

.student-past-table-wrap {
  max-height: 286px;
  overflow-y: auto;
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #ffffff;
}

.student-past-table {
  width: 100%;
  border-collapse: collapse;
}

.student-past-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef6f0;
}

.student-past-table th,
.student-past-table td {
  font-size: 0.82rem;
  padding: 8px 10px;
  text-align: center;
}

.student-past-table th:first-child,
.student-past-table td:first-child {
  text-align: left;
}

#studentPastDetails {
  margin: 0;
  padding: 0;
}

.student-dashboard-list {
  --student-visible-items: 5;
  --student-item-height: 82px;
  display: grid;
  gap: 2px;
  max-height: calc((var(--student-item-height) * var(--student-visible-items)) + (2px * (var(--student-visible-items) - 1)));
  overflow-y: auto;
  scrollbar-gutter: auto;
  padding-right: 0;
}

.student-dashboard-list-past {
  --student-visible-items: 5;
}

#studentDashboardList {
  padding-top: 10px;
}

/* ── Charges (Strafen & Beiträge) ── */
.student-charges-card {
  margin-top: 0;
  padding: 12px;
}

#studentMessagesDetails,
#studentChargesDetails,
#studentTaskHubDetails,
#studentInsightsDetails,
#studentHistoryDetails,
#studentPastDetails,
#studentAbsenceSeriesDetails,
#studentProfileContainer {
  margin: 0;
  padding: 0;
}

.student-charges-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  margin: 0;
  user-select: none;
  background: linear-gradient(135deg, #e8f5ec 0%, #dff0e4 100%);
  border-bottom: 1px solid #c9dfcf;
  border-radius: 12px;
  color: #173a26;
}

.student-charges-summary:hover {
  background: linear-gradient(135deg, #e2f2e7 0%, #d6ebdd 100%);
}
.student-charges-summary::-webkit-details-marker {
  display: none;
}
.student-charges-summary::after {
  content: "▸";
  font-size: 0.9rem;
  color: #888;
  transition: transform 0.2s;
}
#studentMessagesDetails[open] .student-charges-summary,
#studentChargesDetails[open] .student-charges-summary,
#studentFutureDetails[open] .student-charges-summary,
#studentTaskHubDetails[open] .student-charges-summary,
#studentInsightsDetails[open] .student-charges-summary,
#studentHistoryDetails[open] .student-charges-summary,
#studentHelpDetails[open] .student-charges-summary {
  border-radius: 12px 12px 0 0;
}

#studentMessagesDetails[open] .student-charges-summary::after,
#studentChargesDetails[open] .student-charges-summary::after,
#studentFutureDetails[open] .student-charges-summary::after,
#studentTaskHubDetails[open] .student-charges-summary::after,
#studentInsightsDetails[open] .student-charges-summary::after,
#studentHistoryDetails[open] .student-charges-summary::after {
  transform: rotate(90deg);
}

.student-absence-series-panel {
  display: grid;
  padding: 10px 12px 12px;
}

.student-absence-series {
  display: grid;
  gap: 10px;
}

.student-absence-series-form {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.student-absence-reason-field {
  grid-column: 1 / -1;
}

.student-absence-series-form .btn {
  width: auto;
}

.student-profile-panel {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}

.student-profile-card {
  margin: 0;
}

.student-profile-form {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.student-profile-form input,
.student-profile-form select {
  width: 100%;
  min-width: 0;
}

.student-profile-form label:has(textarea),
.student-profile-form > button {
  grid-column: 1 / -1;
}

.student-profile-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  box-sizing: border-box;
}

.student-absence-series-list {
  display: grid;
  gap: 8px;
}

.student-absence-item {
  border: 1px solid #d8e7db;
  border-radius: 10px;
  background: #f9fcf9;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.student-absence-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.student-absence-item-period {
  font-weight: 700;
}

.student-absence-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.student-charges-badge {
  background: #e9ecef;
  color: #555;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
  margin-right: auto;
  margin-left: 6px;
}
.student-charges-badge.has-items {
  background: #fde8e8;
  color: #b42318;
}
.student-charges-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 10px 0 0;
}

.student-messages-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding: 10px 0 0;
}

.student-polls-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 10px 0 0;
}

.student-poll-card {
  border: 1px solid #d8e7db;
  border-radius: 12px;
  background: #f9fcf9;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.student-poll-card.is-open {
  border-left: 4px solid #1d6b3a;
}

.student-poll-card.is-closed {
  opacity: 0.93;
}

.student-poll-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.student-poll-question {
  margin: 0;
  line-height: 1.35;
}

.student-poll-type-hint {
  margin: 0;
  color: #5f6f63;
  font-size: 0.8rem;
  line-height: 1.35;
}

.student-poll-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.student-poll-scale-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.student-poll-choice-btn {
  border: 1px solid #c7dfcd;
  border-radius: 10px;
  background: #fff;
  color: #1d281a;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.student-poll-choice-btn:hover:not(:disabled) {
  background: #eff8f1;
  border-color: #9fc3a8;
}

.student-poll-choice-btn.is-selected {
  background: #1d6b3a;
  border-color: #1d6b3a;
  color: #fff;
}

.student-poll-choice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.student-poll-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-poll-option-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f3ea;
  border: 1px solid #c7dfcd;
  font-size: 0.78rem;
}

.student-poll-my-vote {
  margin: 0;
  font-size: 0.85rem;
}

.student-poll-results {
  display: grid;
  gap: 4px;
  border-top: 1px dashed #d8e7db;
  padding-top: 7px;
}

.student-poll-result-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.student-poll-actions {
  display: flex;
  justify-content: flex-end;
}

.student-poll-actions .btn {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.15;
  min-height: 30px;
  width: auto;
}

.poll-options-field {
  grid-column: 1 / -1;
}

.poll-options-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-option-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.poll-option-remove-btn {
  width: auto !important;
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  justify-content: center;
}

.poll-options-add-btn {
  margin-top: 8px;
  width: auto !important;
}

.poll-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  border: 1px solid #d8e5da;
  border-radius: 10px;
  background: #f8fcf8;
  padding: 8px 10px;
  line-height: 1.3;
  cursor: pointer;
}

#pollsTab .section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 14px;
  border: 1px solid #dbe8de;
  border-radius: 10px;
  background: #f3f8f4;
  padding: 10px 12px;
}

#pollsTab .section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

#pollsTab .section-head .muted {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

#pollsTab .finance-form-grid {
  gap: 12px;
}

#pollsTab .finance-form-grid label {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#pollsTab input,
#pollsTab select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#pollsTab input[type='datetime-local'] {
  display: block;
  inline-size: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  -webkit-appearance: none;
  appearance: none;
}

#pollsTab .finance-form-grid .poll-checkbox {
  grid-column: 1 / -1;
}

#pollsTab .poll-checkbox:hover {
  border-color: #c5d7c9;
  background: #f1f8f2;
}

#pollsTab .poll-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1d6b3a;
}

#pollsTab .poll-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid #1d6b3a;
  outline-offset: 1px;
}

.poll-admin-table-wrap {
  margin-top: 6px;
}

.polls-admin-table th,
.polls-admin-table td {
  white-space: nowrap;
}

.poll-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
}

.poll-admin-icon-btn {
  width: auto !important;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 8px;
  justify-content: center;
}

.poll-analytics-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8e7db;
  border-radius: 12px;
  background: #f8fcf8;
  display: grid;
  gap: 10px;
}

.poll-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.poll-analytics-voters {
  display: grid;
  gap: 8px;
}

.poll-analytics-toggle-btn {
  width: auto !important;
}

.poll-kpi-card {
  border: 1px solid #d3e3d6;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 2px;
}

.poll-kpi-card span {
  font-size: 0.74rem;
  color: #607163;
}

.poll-kpi-card strong {
  font-size: 1rem;
}

.polls-accordion .finance-accordion-content {
  display: grid;
  gap: 10px;
}

.polls-accordion .accordion-description {
  margin-bottom: 8px;
}

.polls-accordion .finance-form-grid {
  margin-bottom: 2px;
}

.student-message-item {
  border-radius: 10px;
  border: 1px solid #d8e7db;
  background: #f9fcf9;
  padding: 9px 10px;
}

.student-message-item.is-unread {
  border-left: 4px solid #1d6b3a;
  background: #eef7f0;
}

.trainer-profiles-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.trainer-profile-card {
  border: 1px solid #d8e7db;
  border-radius: 12px;
  background: #f9fcf9;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.trainer-profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.trainer-profile-view {
  gap: 12px;
}

.trainer-profile-field {
  border-top: 1px solid #dce9de;
  padding-top: 8px;
}

.trainer-profile-field h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.trainer-profile-field p {
  margin: 0;
  line-height: 1.45;
}

.student-message-item.is-read {
  opacity: 0.92;
}

.student-message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.student-message-head strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  color: #1a2a1d;
}

.student-message-date {
  font-size: 0.75rem;
  color: #647267;
  white-space: nowrap;
}

.student-message-body {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: #273629;
  white-space: pre-wrap;
}

.student-message-ack-state {
  display: inline-flex;
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.student-message-ack-state.is-required {
  color: #7a3b08;
}

.student-message-ack-state.is-confirmed {
  color: #1d6b3a;
}

.student-message-ack-btn {
  margin-top: 8px;
}

.student-message-item.requires-ack.is-unread {
  border-left-color: #d17a00;
  background: #fff7ea;
}

.student-charges-table-wrap {
  --student-charge-visible-items: 4;
  --student-charge-header-height: 34px;
  --student-charge-row-height: 40px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(var(--student-charge-header-height) + (var(--student-charge-row-height) * var(--student-charge-visible-items)) + 2px);
  scrollbar-gutter: stable;
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #ffffff;
}

.student-charges-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.76rem;
}

.student-charges-table thead th {
  text-align: left;
  padding: 7px 9px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4f5f4b;
  background: #f3f8f4;
  border-bottom: 1px solid #dbe8de;
}

.student-charges-table tbody td {
  padding: 7px 9px;
  font-size: 0.75rem;
  line-height: 1.2;
  border-bottom: 1px solid #eef3ef;
  vertical-align: top;
  color: #1d281a;
}

.student-charges-table tbody tr:last-child td {
  border-bottom: 0;
}

.student-charges-row.is-penalty td:first-child {
  color: #9a1a12;
  font-weight: 700;
}

.student-charges-row.is-contribution td:first-child {
  color: #1a4a7a;
  font-weight: 700;
}

.student-charges-amount {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}
.charge-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 0 2px;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 2px;
}
.charge-group-penalty { color: #9a1a12; }
.charge-group-contribution { color: #1a4a7a; }
.student-charge-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.83rem;
  line-height: 1.35;
}
.charge-penalty {
  background: #fff5f5;
  border-left-color: #e06060;
}
.charge-contribution {
  background: #f0f6ff;
  border-left-color: #6090d8;
}
.charge-icon {
  display: none;
}
.charge-body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}
.charge-description {
  font-weight: 600;
  color: #1a1a1a;
}
.charge-session {
  font-size: 0.78rem;
  color: #777;
}
.charge-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}
.charge-amount {
  font-weight: 700;
  color: #b42318;
  white-space: nowrap;
}
.charge-contribution .charge-amount {
  color: #1a4a7a;
}
.charge-date {
  font-size: 0.75rem;
  color: #999;
  white-space: nowrap;
}

.student-item {
  width: 100%;
  border-radius: 16px;
  min-height: var(--student-item-height);
}

.student-toggle-btn {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  justify-items: start;
  padding: 6px 10px;
  border: 1px solid transparent;
  white-space: normal;
  position: relative;
}

.student-toggle-btn.has-squad-hint {
  padding-bottom: 14px;
}

.student-toggle-btn.has-squad-hint .student-toggle-deadline {
  padding-right: 24px;
}

.student-toggle-btn.has-squad-accent {
  border-left: 3px solid var(--squad-accent, #2f7046);
}

.student-toggle-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
}

.student-toggle-appointment {
  font-size: 0.78rem;
  opacity: 0.92;
  line-height: 1.1;
}

.student-toggle-cancel-reason {
  font-size: 0.74rem;
  line-height: 1.15;
  font-weight: 700;
  color: #ffe2df;
}

.student-toggle-deadline {
  font-size: 0.7rem;
  opacity: 0.8;
  line-height: 1.1;
}

.student-squad-details {
  display: grid;
  gap: 3px;
  margin-top: 2px;
  padding-right: 30px;
  font-size: 0.72rem;
  line-height: 1.2;
}

.student-squad-details-label {
  font-weight: 700;
}

.student-squad-details-list {
  display: grid;
  gap: 2px;
}

.student-squad-detail-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-squad-team-dot {
  --team-accent: #2f7046;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--team-accent);
  border: 1px solid rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.student-toggle-squad {
  --squad-accent: #2f7046;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: auto 6px 6px auto;
  width: 22px;
  height: 22px;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}

.student-toggle-squad.is-in::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--squad-accent);
  background: color-mix(in srgb, var(--squad-accent) 20%, transparent);
}

.student-squad-icon {
  display: block;
  width: 20px;
  height: 20px;
  background-image: url("squad-field-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.student-toggle-squad.is-out::before,
.student-toggle-squad.is-out::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2.5px;
  background: #d90429;
  border-radius: 2px;
  opacity: 1;
}

.student-toggle-squad.is-out::before {
  transform: rotate(45deg);
}

.student-toggle-squad.is-out::after {
  transform: rotate(-45deg);
}

.student-toggle-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.student-toggle-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.student-toggle-btn.is-present {
  background: #2f7a46;
  color: #ffffff;
}

.student-toggle-btn.is-absent {
  background: #b42318;
  color: #ffffff;
}

.student-toggle-btn.is-absent-unregistered {
  background: #a0007a;
  color: #ffffff;
}

.student-toggle-btn.is-uncertain {
  background: #8f6d12; /* dunkler: weiße Schrift ≥ 4,5:1 */
  color: #ffffff;
}

.student-toggle-btn.is-cancelled {
  background: #6f7b74;
  color: #ffffff;
}

.student-toggle-btn.is-present .student-toggle-status,
.student-toggle-btn.is-absent .student-toggle-status,
.student-toggle-btn.is-absent-unregistered .student-toggle-status,
.student-toggle-btn.is-uncertain .student-toggle-status,
.student-toggle-btn.is-cancelled .student-toggle-status {
  background: rgba(255, 255, 255, 0.18);
}

.student-toggle-hint {
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.9;
  display: block;
}

.student-toggle-btn.is-locked {
  filter: grayscale(0.25);
  opacity: 0.74;
  cursor: not-allowed;
}

.student-toggle-btn:hover {
  filter: brightness(1.03);
}

.student-toggle-btn.is-locked:hover {
  filter: grayscale(0.25);
}

.student-toggle-btn.is-absence-series.is-locked,
.student-toggle-btn.is-absence-series.is-locked:hover {
  filter: none;
  opacity: 1;
}

.kind-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
  background: #e7f2ea;
  color: #1a5b30;
  font-weight: 600;
}

/* ── Monthly stats panels ────────────────────────────────────────────── */
.report-monthly-panels {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.monthly-panel-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.monthly-panel-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--surface);
  transition: background 0.15s;
}

.monthly-panel-summary::-webkit-details-marker { display: none; }

.monthly-panel-accordion[open] .monthly-panel-summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.monthly-panel-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.monthly-panel-content {
  padding: 14px 16px 16px;
}

.monthly-panel-controls {
  margin-bottom: 12px;
}

.monthly-panel-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monthly-select {
  min-width: 180px;
}

.monthly-panel-result {
  min-height: 24px;
}

.monthly-stats-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.monthly-result-table table {
  font-size: 0.86rem;
}

.monthly-top-row td {
  font-weight: 600;
  background: var(--accent-soft) !important;
}

.monthly-ratio-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.monthly-ratio-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
  max-width: 80px;
}

.monthly-potm-list {
  display: grid;
  gap: 7px;
}

.monthly-potm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
}

.monthly-potm-podium {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.monthly-potm-medal { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.monthly-potm-name  { flex: 1; font-weight: 700; }
.monthly-potm-votes { color: var(--muted); font-size: 0.82rem; }

.report-full-export-row {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}
  .student-taskhub-offer-form {
    grid-template-columns: 1fr;
  }

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.btn-accent:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.player-cell {
  display: grid;
  gap: 3px;
}

.player-name {
  font-weight: 700;
}

.player-period {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-summary-line {
  margin-top: 8px;
}

.report-date-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.report-date-row label {
  margin: 0;
}

@media (max-width: 640px) {
  #reportTab .report-date-row {
    width: min(100%, 230px);
  }

  #reportTab .report-date-row label {
    width: 100%;
  }

  #reportTab .report-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  #reportTab .report-filters .report-date-row,
  #reportTab .report-filters > label {
    grid-column: 1 / -1;
  }

  #reportTab #runReportBtn,
  #reportTab #runWinterReportBtn,
  #reportTab #runSeasonFinalReportBtn {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.78rem;
    line-height: 1.25;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #reportTab #exportPdfBtn,
  #reportTab #exportCsvBtn {
    width: 100%;
    min-height: 30px;
    padding: 7px 10px;
    font-size: 0.78rem;
    justify-content: flex-start;
    text-align: left;
  }
}

#mainView {
  font-size: 0.88rem;
}

#mainView h1 {
  font-size: 1.25rem;
}

#mainView .app-title {
  font-size: 1.25rem;
}

#mainView h2 {
  font-size: 1.05rem;
}

#mainView .tab {
  font-size: 0.8rem;
  padding: 6px 9px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#mainView .tab.hidden {
  display: none;
}

#mainView input,
#mainView select,
#mainView .btn {
  font-size: 0.85rem;
}

#mainView .btn:not(#logoutBtn) {
  padding: 6px 10px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

#mainView .tab::after {
  content: "▸";
  font-size: 0.78em;
  line-height: 1;
  opacity: 0.9;
}

#mainView .tabs {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#mainView .controls-row {
  flex-direction: column;
  align-items: stretch;
}

#mainView .quick-actions {
  width: 100%;
  flex-direction: column;
}

#mainView .card,
#studentView .card,
#mainView .tab-content,
#studentView .tab-content,
#mainView .finance-accordion,
#studentView .finance-accordion {
  max-width: 100%;
  min-width: 0;
}

#mainView .grid-form {
  grid-template-columns: 1fr;
}

#mainView .grid-form > * {
  min-width: 0;
}

#mainView input,
#mainView select,
#mainView textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

  #sessionsTab #sessionForm {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #sessionsTab #sessionForm > #sessionTeamField,
  #sessionsTab #sessionForm > .grid-span-full,
  #sessionsTab #sessionForm > button {
    grid-column: auto;
  }

  #sessionsTab #sessionSeriesOptions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #sessionsTab #sessionSeriesOptions > label {
    min-width: 0;
  }

  #sessionsTab #sessionSeriesOptions input,
  #sessionsTab #sessionSeriesOptions select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #sessionsTab #sessionSaveBtn {
    width: 100%;
  }

#mainView .player-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

#mainView .player-form h2 {
  grid-column: 1 / -1;
}

#mainView .player-form .btn {
  width: 100%;
  white-space: normal;
}

#mainView .player-form label {
  min-width: 0;
}

#playersTab .player-export-tools > * {
  min-width: 0;
}

#playersTab .player-export-checkbox {
  flex-wrap: wrap;
}

#playersTab .player-export-checkbox select {
  min-width: 0;
  width: min(170px, 100%);
  max-width: 100%;
}

.finance-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.finance-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 12px;
}

.finance-dashboard-card {
  border: 1px solid #d8e5da;
  border-radius: 14px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #fbfefb, #f4faf4);
  box-shadow: 0 6px 18px rgba(61, 96, 67, 0.06);
}

.finance-dashboard-lead {
  grid-column: span 2;
}

.finance-dashboard-note {
  margin-top: 4px;
  margin-bottom: 0;
  line-height: 1.3;
}

.finance-worklist {
  border: 1px solid #d8e5da;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fff;
}

.finance-worklist h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.finance-task-summary {
  margin: 0;
  color: #425445;
  font-size: 0.88rem;
  line-height: 1.45;
}

.finance-dashboard-stack {
  display: grid;
  gap: 8px;
}

.finance-mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.finance-mini-metrics div {
  border: 1px solid #d8e5da;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  display: grid;
  gap: 2px;
}

.finance-mini-metrics span {
  font-size: 0.72rem;
  color: #617264;
}

.finance-stat-card {
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 10px;
  background: #f8fcf8;
}

.finance-stat-value {
  font-size: 1rem;
}

.finance-form-grid {
  margin-bottom: 14px;
}

.finance-accordion {
  border: 1px solid #d3e2d6;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(24, 43, 26, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.finance-accordion > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
}

#financeTab .finance-accordion > summary {
  padding: 10px 16px;
}

#mainView #financeLedgerSection .section-head {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 8px !important;
}

#mainView #financeLedgerSection .section-head > label {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
}

#mainView #financeLedgerSection .section-head .btn {
  flex: 0 0 auto !important;
  align-self: stretch;
  display: inline-flex !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  padding: 7px 10px;
  min-height: 30px;
  font-size: 0.84rem;
  line-height: 1.15;
  white-space: nowrap;
  justify-content: center !important;
}

/* Form display styling for read-only field values */
.form-display {
  display: inline-block;
  padding: 8px 12px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.4;
  min-width: 150px;
}

.finance-accordion > summary {
  line-height: 1.25;
  color: var(--text);
  padding: 10px 12px;
  margin: 0;
  background: #f3f8f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid transparent;
  border-radius: 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
  user-select: none;
}

.finance-accordion > summary:hover {
  background: #edf5ef;
}

.finance-accordion > summary::-webkit-details-marker {
  display: none;
}

.finance-accordion > summary::after {
  content: "▸";
  font-size: 0.9rem;
  color: #6f7f74;
  transition: transform 0.2s ease;
}

.finance-accordion[open] > summary::after {
  transform: rotate(90deg);
}

.finance-accordion[open] {
  border-color: #bdd3c2;
  box-shadow: 0 7px 16px rgba(24, 43, 26, 0.07);
}

.finance-accordion[open] > summary {
  border-bottom-color: #dbe8de;
  background: #ebf3ed;
  border-radius: 10px 10px 0 0;
}

.finance-accordion-content {
  padding: 14px;
  background: #ffffff;
  min-width: 0;
  max-width: 100%;
}

.finance-accordion-content > * {
  min-width: 0;
}

#playersTab .finance-accordion {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#adminAbsenceSeriesPanel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#adminAbsenceSeriesPanel > summary {
  white-space: normal;
  overflow-wrap: anywhere;
}

#adminAbsenceSeriesPanel .finance-accordion-content,
#adminAbsenceSeriesPanel .finance-form-grid,
#adminAbsenceSeriesPanel .finance-form-grid > * {
  min-width: 0;
  max-width: 100%;
}

#adminAbsenceSeriesPanel .finance-form-grid {
  grid-template-columns: minmax(0, 1fr);
}

#adminAbsenceSeriesPanel input,
#adminAbsenceSeriesPanel select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#absenceSeriesTab,
#absenceSeriesTab .finance-form-grid,
#absenceSeriesTab .finance-form-grid > * {
  min-width: 0;
  max-width: 100%;
}

#absenceSeriesTab {
  padding: 14px;
  overflow-x: hidden;
}

#absenceSeriesTab .section-head {
  margin-bottom: 10px;
}

#absenceSeriesTab .section-head .muted {
  margin-top: 0;
}

#absenceSeriesTab .finance-form-grid {
  grid-template-columns: minmax(0, 1fr);
}

#absenceSeriesTab .finance-form-grid label {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#absenceSeriesTab input,
#absenceSeriesTab select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#absenceSeriesTab input[type='date'] {
  display: block;
  inline-size: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  -webkit-appearance: none;
  appearance: none;
}

.accordion-description {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e4ede6;
  color: #5a695e;
  font-size: 0.78rem;
  line-height: 1.35;
}

.finance-accordion-content > .accordion-description + * {
  margin-top: 0;
}

#financeLedgerTableWrap.is-cashier-limited {
  max-height: calc(2.4rem + (5 * 2.05rem));
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

#financeLedgerTableWrap.is-cashier-limited thead th {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

.hidden {
  display: none !important;
}

#mainView th,
#mainView td {
  font-size: 0.8rem;
  padding: 7px 6px;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100%, 96vw);
    margin: 10px auto;
  }

  .tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .finance-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-dashboard-lead {
    grid-column: span 2;
  }

  .finance-dashboard-stack {
    grid-column: auto;
  }

  .trainer-dashboard-card-wide {
    grid-column: span 2;
  }

  .topbar {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .trainer-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-heading-row {
    align-items: flex-start;
  }

  .tab,
  .btn,
  input,
  select {
    min-height: 44px;
  }

  .brand-image {
    max-width: 100%;
  }

  .app-title {
    font-size: clamp(0.9rem, 4.2vw, 1.05rem);
  }

  #mainView .btn,
  #mainView .tab {
    min-height: 34px;
  }

  .app-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .student-profile-form {
    grid-template-columns: 1fr;
  }

  .student-profile-form label,
  .student-profile-form input,
  .student-profile-form select,
  .student-profile-form textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  #mainView:not(.hidden),
  #studentView:not(.hidden) {
    padding: 10px;
    gap: 12px;
  }

  .topbar {
    padding: 12px;
  }

  #mainTopbar .header-action-stack,
  #studentView .header-action-stack {
    position: static;
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    margin-top: 8px;
  }

  #mainTopbar .tenant-switch-inline {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #mainTopbar .tenant-switch-inline select {
    min-width: 0;
    flex: 1 1 180px;
  }

  #mainTopbar.is-demo-admin-view #mainSwitchToPlayerBtn,
  #mainTopbar.is-demo-admin-view #mainSwitchToParentBtn,
  #mainTopbar.is-demo-admin-view #logoutBtn {
    margin-top: 0;
  }

  .main-heading-row,
  .student-heading-row {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
  }

  .student-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .student-child-switch {
    width: 100%;
    justify-content: space-between;
  }

  .student-child-switch select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tenant-switch-settings-grid {
    grid-template-columns: 1fr;
  }

  .app-title {
    white-space: normal;
  }

  #mainView .player-form {
    grid-template-columns: 1fr;
  }

  #mainView .player-form .btn {
    width: 100%;
  }

  .finance-dashboard,
  .finance-mini-metrics,
  .trainer-dashboard-grid,
  .report-date-row {
    grid-template-columns: 1fr;
  }

  .finance-dashboard-lead,
  .trainer-dashboard-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 360px) {
  #mainView:not(.hidden),
  #studentView:not(.hidden) {
    padding: 8px;
    gap: 10px;
  }

  .card,
  #playersTab,
  #sessionsTab,
  #attendanceTab,
  #lineupTab,
  #reportTab,
  #financeTab,
  #pushTab,
  .season-panel,
  #securityAdminPanel {
    padding: 10px;
  }

  .tabs {
    padding: 8px;
  }

  #mainView .tab,
  #mainView .btn:not(#logoutBtn) {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.79rem;
  }

  #mainView input,
  #mainView select {
    font-size: 0.8rem;
    padding: 8px 10px;
    min-height: 38px;
  }

  #mainView th,
  #mainView td {
    font-size: 0.74rem;
    padding: 6px 4px;
  }

  .student-logo,
  .main-dashboard-logo {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
  }

  .student-message-date,
  .hint,
  .muted {
    font-size: 0.72rem;
  }

  #mainTopbar .header-action-stack {
    position: static;
    width: 100%;
    justify-content: flex-start;
    margin-top: 8px;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: rgba(9, 19, 29, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
}

.modal-content {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);
  border: 1px solid rgba(16, 40, 27, 0.1);
  border-radius: 18px;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(8, 22, 33, 0.24);
}

.tenant-picker-modal-content {
  width: min(460px, 92vw);
}

.forgot-password-modal-content {
  width: min(520px, 92vw);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--accent-strong, #1d6b3a);
  padding: 0;
  text-align: left;
  justify-content: flex-start;
  min-height: auto;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
  background: transparent;
}

.modal-content h2 {
  margin: 0;
  font-size: 1.2rem;
}

.session-task-modal-content {
  width: min(920px, 95vw);
}

.session-task-rows {
  display: grid;
  gap: 10px;
}

.session-task-row {
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #f7fbf8;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.session-task-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto auto;
  gap: 8px;
  align-items: end;
}

.session-task-slot-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.session-task-slot-controls .btn {
  min-width: 72px;
}

.session-task-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.session-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.session-task-fairness-summary {
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #f7fbf8;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.session-task-fairness-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-task-fairness-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f5ec;
}

.session-task-fairness-chip strong {
  font-family: "Space Grotesk", sans-serif;
}

@media (max-width: 640px) {
  .session-task-row-head {
    grid-template-columns: 1fr;
  }
}

.modal-subtitle {
  margin: 0 0 16px 0;
  color: #666;
  font-weight: bold;
}

.modal-content > button {
  width: 100%;
  margin-bottom: 8px;
}

.calendar-export-modal-content {
  width: min(560px, 92vw);
}

.edit-session-modal-content {
  width: min(620px, 94vw);
}

.edit-session-form {
  gap: 12px;
}

.edit-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.edit-session-form label {
  display: grid;
  gap: 6px;
}

.edit-session-form input,
.edit-session-form select {
  width: 100%;
}

.action-dialog-modal-content {
  width: min(440px, 92vw);
}

.action-dialog-body {
  display: grid;
  gap: 12px;
}

.action-dialog-message {
  margin: 0;
  color: #223528;
  line-height: 1.45;
  white-space: pre-line;
}

.action-dialog-input {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.action-dialog-select,
.action-dialog-textarea {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.action-dialog-input input,
.action-dialog-select select,
.action-dialog-textarea textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfdacb;
  border-radius: 10px;
  background: #fbfdfb;
  font-size: 0.96rem;
}

.action-dialog-select select[multiple] {
  min-height: 148px;
}

.action-dialog-textarea textarea {
  min-height: 116px;
  resize: vertical;
}

.action-dialog-input input:focus-visible,
.action-dialog-select select:focus-visible,
.action-dialog-textarea textarea:focus-visible {
  outline: 2px solid rgba(29, 107, 58, 0.35);
  outline-offset: 1px;
}

.action-dialog-actions .btn {
  min-height: 42px;
}

.action-feedback-modal-content {
  width: min(320px, 90vw);
  padding: 14px;
}

.action-feedback-shell {
  display: grid;
  gap: 4px;
  padding: 2px 0 10px;
}

.action-feedback-shell strong {
  font-size: 0.96rem;
  color: #12271a;
}

.action-feedback-message {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #486050;
}

.action-feedback-modal-content.is-success {
  border: 1px solid rgba(29, 107, 58, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f2faf4 100%);
}

.action-feedback-modal-content.is-error {
  border: 1px solid rgba(190, 24, 93, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #fff4f7 100%);
}

.action-feedback-close {
  width: 100%;
  margin: 0;
}

.calendar-export-body {
  display: grid;
  gap: 14px;
}

.season-retention-notice {
  border: 1px solid #e5c07b;
  background: #fdf6e3;
  border-radius: 10px;
  padding: 10px 12px;
}

.season-retention-export-body {
  display: grid;
  gap: 14px;
}

.season-retention-export-categories {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dfe7e0;
  border-radius: 12px;
  background: #f8fbf8;
}

.season-retention-export-category {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-export-intro {
  margin: 0;
  color: #4f5f53;
}

.calendar-export-options {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 12px;
}

.calendar-export-option {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dfe7e0;
  border-radius: 12px;
  background: #f8fbf8;
}

.calendar-export-option-text {
  display: grid;
  gap: 4px;
}

.calendar-export-option strong {
  font-size: 1rem;
  color: var(--text);
}

.calendar-export-option .muted {
  margin: 0;
}

.calendar-export-subscribe {
  display: grid;
  gap: 8px;
}

.calendar-export-subscribe .muted {
  margin: -2px 0 6px;
  font-size: 0.84rem;
}

.calendar-export-subscribe-link {
  justify-content: center;
  text-decoration: none;
}

.calendar-export-subscribe-link.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.calendar-export-url-label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  color: #4f5f53;
}

.calendar-export-subscribe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-export-subscribe-actions .btn {
  flex: 1 1 180px;
}

.calendar-export-feed-url {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfdacb;
  border-radius: 10px;
  background: #f6fbf7;
  color: #163524;
  font-size: 0.86rem;
}

.calendar-export-feed-url:focus-visible {
  outline: 2px solid rgba(29, 107, 58, 0.35);
  outline-offset: 1px;
}

.season-create-hint {
  margin: 0;
  color: #4f5f53;
  padding: 8px 10px;
  border-left: 3px solid rgba(29, 107, 58, 0.36);
  background: rgba(240, 248, 242, 0.8);
  border-radius: 8px;
}

.season-create-wizard-content {
  width: min(620px, 100%);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0;
  border: 1px solid rgba(15, 99, 169, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 62%, #edf6ef 100%);
  box-shadow: 0 14px 34px rgba(12, 52, 81, 0.18);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 0.96rem;
}

.season-create-wizard-content .modal-body {
  padding: 14px 16px 16px;
  overflow-x: hidden;
}

.season-create-wizard-body {
  display: grid;
  gap: 12px;
  padding: 0;
}

.season-create-wizard-shell {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e4db;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faf7 100%);
}

.season-create-wizard-intro {
  margin: 0;
  color: #425347;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid rgba(15, 99, 169, 0.16);
  border-radius: 8px;
  padding: 7px 9px;
  background: linear-gradient(180deg, rgba(237, 246, 252, 0.88), rgba(238, 249, 241, 0.82));
}

.season-create-stepper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.season-create-stepper-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #d3e3d7;
  background: #f2f7f3;
  color: #5f6f61;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  font-weight: 600;
  text-align: center;
  word-break: break-word;
}

.season-create-stepper-item.is-active {
  background: linear-gradient(135deg, rgba(15, 99, 169, 0.19), rgba(29, 107, 58, 0.24));
  border-color: rgba(15, 99, 169, 0.38);
  color: #1d3950;
  box-shadow: 0 8px 18px rgba(15, 99, 169, 0.16);
}

.season-create-wizard-form {
  display: grid;
  gap: 10px;
}

.season-create-step {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e4db;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.season-create-step label {
  font-size: 0.9rem;
  color: #1e2d23;
}

.season-create-step input:not([type="checkbox"]),
.season-create-step select {
  min-height: 34px;
  border: 1px solid #c7d7cb;
  background: #ffffff;
  padding: 6px 8px;
}

.season-create-step .checkbox-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px dashed #c9d8cc;
  border-radius: 8px;
  background: #f4faf6;
}

.season-create-step .checkbox-field span {
  min-width: 0;
  line-height: 1.15;
}

.season-create-step .checkbox-field input {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.season-copy-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.season-copy-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #cfdfd3;
  border-radius: 8px;
  background: linear-gradient(180deg, #fafdfb 0%, #f4faf6 100%);
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.season-copy-option:hover {
  border-color: rgba(15, 99, 169, 0.32);
  box-shadow: 0 5px 14px rgba(15, 99, 169, 0.1);
  transform: translateY(-1px);
}

.season-copy-option input {
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  cursor: pointer;
}

.season-copy-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.season-copy-option input:checked + .season-copy-option-text strong {
  color: #17492a;
}

.season-copy-option input:checked + .season-copy-option-text .muted {
  color: #335240;
}

.season-copy-option:has(input:checked) {
  border-color: rgba(29, 107, 58, 0.5);
  background: linear-gradient(180deg, #eef8f0 0%, #e6f3ea 100%);
  box-shadow: 0 8px 18px rgba(29, 107, 58, 0.12);
}

.season-copy-option:has(input:focus-visible) {
  outline: 2px solid rgba(15, 99, 169, 0.36);
  outline-offset: 2px;
}

.season-copy-option-text strong {
  font-size: 0.86rem;
  color: #1b2f24;
}

.season-copy-option-text .muted {
  margin: 0;
  font-size: 0.78rem;
}

.season-create-summary {
  margin: 0;
  border-radius: 6px;
  border: 1px solid #d0dfd5;
  background: #eff7f1;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.season-create-summary:empty {
  display: none;
}

.season-create-wizard-actions {
  margin-top: 0;
  flex-wrap: wrap;
  padding-top: 0;
}

.season-create-wizard-actions button {
  flex: 1 1 130px;
  width: auto;
  margin-bottom: 0;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.84rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  font-weight: 700;
  text-align: center;
  justify-content: center;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.season-create-wizard-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(12, 52, 81, 0.14);
}

.season-create-wizard-actions button:active {
  transform: translateY(0);
}

#seasonCreateWizardBackBtn,
#seasonCreateWizardCancelBtn {
  border: 1px solid rgba(15, 99, 169, 0.26);
  background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
  color: #1f3e55;
}

#seasonCreateWizardSubmitBtn {
  border: 1px solid rgba(29, 107, 58, 0.42);
  background: linear-gradient(135deg, #1f7a43 0%, #1d6b3a 52%, #17582f 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(29, 107, 58, 0.28);
}

.season-create-wizard-content .modal-header {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 99, 169, 0.14);
  background: linear-gradient(125deg, rgba(233, 247, 255, 0.95), rgba(238, 250, 241, 0.92));
}

.season-create-wizard-content .modal-header h2 {
  margin-right: 8px;
  font-size: clamp(0.96rem, 1.7vw, 1.12rem);
  line-height: 1.1;
}

.modal-content .modal-header .modal-close {
  width: 26px;
  min-width: 26px;
  height: 26px;
  margin-bottom: 0;
  flex: 0 0 26px;
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .season-create-wizard-content {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    padding: 0;
  }

  .season-create-wizard-content .modal-body {
    padding: 12px;
  }

  .season-create-wizard-content .modal-header {
    margin: 0;
    padding: 8px 10px;
  }

  .season-create-stepper {
    grid-template-columns: 1fr;
  }

  .season-copy-options {
    grid-template-columns: 1fr;
  }

  .season-create-wizard-shell {
    padding: 10px;
  }

  .season-create-inline .btn {
    width: 100%;
    min-width: 0;
  }

  .action-dialog-actions {
    flex-direction: column;
  }

  .edit-session-grid {
    grid-template-columns: 1fr;
  }
}

/* Quick Penalty Modal */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.btn-quick-penalty {
  padding: 8px 12px;
  background: #f0f2f5;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
}

.btn-quick-penalty:hover {
  background: #e4f0ff;
  border-color: #0066cc;
  color: #0066cc;
}

.btn-quick-penalty:active {
  background: #cce5ff;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.modal-actions button {
  flex: 1;
  margin: 0;
}

.attendance-item-actions .btn-quick-penalty {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(16, 40, 27, 0.08);
  background: linear-gradient(135deg, rgba(231, 244, 236, 0.92), rgba(237, 247, 255, 0.92));
}

.modal-header h2 {
  margin: 0;
  font-size: 1.08rem;
  flex: 1;
  line-height: 1.15;
  color: #10281b;
}

.modal-close {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 40, 27, 0.08);
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #294033;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  color: #10281b;
  background: #ffffff;
  border-color: rgba(15, 99, 169, 0.2);
  transform: translateY(-1px);
}

.modal-body {
  padding: 16px 18px 18px;
}

.add-to-home-screen-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1300;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(15, 99, 169, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, #1f7a43 0%, #0f63a9 100%);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(12, 52, 81, 0.28);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.add-to-home-screen-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(12, 52, 81, 0.34);
  filter: saturate(1.06);
}

.add-to-home-screen-fab:active {
  transform: translateY(0);
}

.add-to-home-screen-fab:focus-visible {
  outline: 3px solid rgba(15, 99, 169, 0.35);
  outline-offset: 2px;
}

.add-to-home-screen-prompt {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 19, 29, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.add-to-home-screen-prompt.hidden {
  display: none;
}

.add-to-home-screen-content {
  width: min(520px, 92vw);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);
  border: 1px solid rgba(16, 40, 27, 0.1);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(8, 22, 33, 0.24);
  overflow: hidden;
}

.add-to-home-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(16, 40, 27, 0.08);
  background: linear-gradient(135deg, rgba(231, 244, 236, 0.92), rgba(237, 247, 255, 0.92));
}

.add-to-home-screen-header h2 {
  margin: 0;
  font-size: 1.08rem;
  flex: 1;
  line-height: 1.15;
  color: #10281b;
}

.add-to-home-screen-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}

.add-to-home-screen-instructions ol {
  margin: 0;
  padding-left: 1.2rem;
}

.add-to-home-screen-instructions p {
  margin: 10px 0 0;
}

@media (max-width: 760px) {
  .add-to-home-screen-fab {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
  }
}

.parents-family {
  border: 1px solid #d8e5da;
  border-radius: 12px;
  padding: 12px;
  background: #f8fcf8;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.parents-family h3 { margin: 0; font-size: 1rem; }
.parents-family .muted { margin: 0; }
.parents-family-list { display: flex; flex-wrap: wrap; gap: 6px; }
.parents-family-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d3e0d6;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
}
.parents-family-option small { color: #7a857c; }
#parentsTab .parents-family-option { display: inline-flex; flex-direction: row; width: auto; min-width: 0; margin: 0; cursor: pointer; }
#parentsTab .parents-family-option input { width: auto; min-width: 0; margin: 0; flex: 0 0 auto; }
#parentsTab .parents-family-option span { white-space: nowrap; }
#parentsTab .parents-family-actions label { width: auto; }
.parents-missing-consent { margin-top: 12px; border: 1px dashed #e0c9c9; border-radius: 10px; padding: 8px 12px; background: #fffaf9; }
.parents-missing-consent summary { cursor: pointer; font-weight: 600; }
.parents-missing-consent p { margin: 6px 0 0; }
.parents-family-option.is-disabled { opacity: 0.6; }
.parents-family-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }

.parents-child-list { display: grid; gap: 10px; }
.parents-child {
  border: 1px solid #dfe7e0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 6px;
}
.parents-child-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.parents-child-head button { margin-left: auto; }
.parents-slot {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed #e3ebe4;
}
.parents-slot-label { font-size: 0.82rem; color: #5a6656; }
.parents-slot-user { display: grid; gap: 2px; }
.parents-slot-user small, .parents-slot-note { color: #6b7669; font-size: 0.8rem; }
.parents-slot-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.parents-slot-actions select { max-width: 260px; }
@media (max-width: 640px) {
  .parents-slot { grid-template-columns: 1fr; }
  .parents-slot-actions { justify-content: flex-start; }
}

.student-charges-paid {
  margin-top: 12px;
  border: 1px solid #d8e5da;
  border-radius: 10px;
  background: #f8fcf8;
}

.student-charges-paid > summary {
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.student-charges-row.is-paid td {
  color: #4b5f4f;
}

.student-charges-totals {
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: #f7fbf8;
  margin-bottom: 10px;
  overflow: hidden;
}

.student-charges-totals-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.83rem;
  border-bottom: 1px solid #e3ece4;
}

.student-charges-totals-row:last-child {
  border-bottom: 0;
}

.student-charges-totals-row strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  color: #1d6b3a;
}

.student-charges-totals-row.is-total {
  background: #e9f4ec;
  font-weight: 700;
}

.student-charges-totals-row.is-total strong {
  color: #134a28;
  font-size: 0.95rem;
}

/* Sprachauswahl in der Kopfzeile */
.language-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.language-inline-icon {
  font-size: 1rem;
  line-height: 1;
}

.language-select-inline {
  width: auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
}

/* Sonstige: Slot-Anzahl der freien Aufstellung */
.lineup-slot-count:not([hidden]) {
  display: inline-flex;
  gap: 6px;
  align-items: flex-end;
}

/* Aufstellung: Startelf/Ersatzbank-Anzeige */
/* #mainView input (Breite 100 %) und die Touch-Mindesthöhe gelten sonst auch für die Checkbox
   und schieben den Text aus dem Bild – daher die ID-Spezifität. Optisch wie die Buttons der Leiste. */
#mainView .lineup-starter-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  box-sizing: border-box;
}
#mainView .lineup-starter-toggle input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--accent);
}
#mainView .lineup-starter-toggle span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
@media (max-width: 360px) {
  #mainView .lineup-starter-toggle {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.79rem;
  }
}
.student-squad-role {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 1px;
}
.student-squad-role.is-starter {
  background: #ffffff;
  color: #14532d;
  box-shadow: inset 0 0 0 1px rgba(20, 83, 45, 0.35);
}
.student-squad-role.is-bench {
  background: rgba(255, 255, 255, 0.82);
  color: #2b3a34;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

/* Digitale Einwilligung (Link/QR, Nachweise) */
.consent-modal-content { max-width: 560px; }
.consent-modal-body { display: grid; gap: 10px; }
.consent-link-qr { display: flex; justify-content: center; padding: 10px; background: #ffffff; border-radius: 12px; border: 1px solid var(--border, #d1d5db); min-height: 60px; }
.consent-link-qr img, .consent-link-qr canvas { width: 200px !important; height: 200px !important; }
.consent-link-url-label, .consent-link-mail label { display: grid; gap: 4px; }
.consent-link-url-label input, .consent-link-mail input { width: 100%; }
.consent-link-actions, .consent-link-mail { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.consent-link-mail label { flex: 1 1 220px; }
.consent-proof-list { display: grid; gap: 10px; }
.consent-proof-item { border: 1px solid var(--border, #d1d5db); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.consent-proof-item.is-revoked { opacity: 0.75; border-style: dashed; }
.consent-proof-item ul { margin: 4px 0; padding-inline-start: 18px; }
.consent-proof-item .consent-link-actions { margin-top: 4px; }
.player-access-badge.is-consent-digital { cursor: pointer; }
.player-access-badge.is-no-account { opacity: 0.8; }

/* Spieler-Tab: Admin ohne eigene Spielerrolle */
.self-player-role-hint:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}
#mainView .self-player-role-hint .btn {
  width: auto;
}

/* Kommentare am Termin: kleine Sprechblase links neben dem Status (Spieleransicht) */
.student-item.has-comments-bubble { position: relative; }
.student-item.has-comments-bubble .student-toggle-top { justify-content: flex-start; }
.student-item.has-comments-bubble .student-toggle-title { flex: 1 1 auto; min-width: 0; }
.student-toggle-bubble-slot { flex: 0 0 auto; width: 38px; height: 22px; }
.session-comments-bubble {
  position: absolute;
  top: 10px;
  right: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 38px;
  height: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-text, var(--accent));
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.session-comments-bubble::before { content: ""; position: absolute; inset: -10px -4px; } /* größere Tippfläche */
.session-comments-bubble:hover { background: #ffffff; }
.session-comments-bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.session-comments-bubble .session-comments-count { min-width: 0; height: auto; padding: 0; margin: 0; background: none; color: inherit; font-size: 0.74rem; }
.session-comments-bubble .session-comments-count[hidden] { display: none; }
.session-comments-unread-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d62839;
  box-shadow: 0 0 0 2px #ffffff;
}
.session-comments-unread-dot[hidden] { display: none; }
.session-comments-row-btn { position: relative; }
.session-comment-thread-new { margin-left: auto; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: #d62839; color: #fff; font-size: 0.72rem; font-weight: 700; }
html[data-theme="dark"] .session-comments-bubble { background: rgba(23, 33, 27, 0.85); }
html[data-theme="dark"] .session-comments-unread-dot { box-shadow: 0 0 0 2px #17211b; }
.session-comments-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0 4px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.session-comments-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 2px;
}
.session-comments-modal-content { max-width: 560px; }
.session-comments-body { display: grid; gap: 10px; }
.session-comments-subtitle { margin: 0; color: var(--muted); font-weight: 600; }
.session-comments-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 50vh; overflow-y: auto; }
.session-comment { padding: 10px 12px; border-radius: 14px; background: #f3f7f4; }
.session-comment.is-own { background: var(--accent-soft); }
.session-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.session-comment-head { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.session-comment-head span { color: var(--muted); flex-grow: 1; }
.session-comment-delete { border: 0; background: none; color: var(--muted); cursor: pointer; min-width: 32px; min-height: 32px; border-radius: 8px; }
.session-comment-delete:hover { background: rgba(0, 0, 0, 0.06); color: var(--danger); }
.session-comments-empty { color: var(--muted); padding: 8px 0; }
.session-comments-form { display: flex; gap: 8px; align-items: flex-end; }
.session-comments-form textarea { flex-grow: 1; min-width: 0; min-height: 44px; resize: vertical; }
#mainView .session-comments-form textarea, #studentView .session-comments-form textarea { width: auto; }
.session-comments-form[hidden], .session-comments-list[hidden], .session-comments-overview[hidden], .session-comments-thread-bar[hidden] { display: none; }
/* Trainer: Übersicht der Verläufe je Spieler */
.session-comments-thread-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.session-comments-overview { display: grid; gap: 12px; }
.session-comment-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 45vh; overflow-y: auto; }
.session-comment-thread { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line, #dce6df); border-radius: 14px; background: var(--card, #fff); color: inherit; font: inherit; cursor: pointer; }
.session-comment-thread:hover { border-color: var(--accent); }
.session-comment-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.session-comment-thread-last { color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-comment-thread-time { color: var(--muted); font-size: 0.8rem; }
.session-comment-start { display: grid; gap: 6px; }
.session-comment-start label { font-weight: 600; }
.session-comment-start-row { display: flex; gap: 8px; }
.session-comment-start-row select { flex: 1 1 auto; min-width: 0; }
html[data-theme="dark"] .session-comment-thread { background: #17211b; border-color: #2a3a30; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Branding: Vereinsfarben */
.tenant-branding-custom-colors { border: 1px solid var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.tenant-branding-custom-colors legend { font-weight: 700; padding: 0 6px; }
.tenant-branding-color-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tenant-branding-color-row label { display: grid; gap: 4px; font-size: 0.9rem; }
#mainView .tenant-branding-color-row input[type="color"] { width: 100%; min-height: 44px; padding: 4px; border-radius: 10px; cursor: pointer; }

/* ═══ Dunkelmodus ═══════════════════════════════════════════════════════════
   data-theme="dark" setzt theme-init.js (Wahl je Gerät: automatisch/dunkel/hell).
   Vereinsfarben mischt applyTenantBrandingToUi() passend zum dunklen Grund (--accent-soft, --accent-text). */
html[data-theme="dark"] {
  color-scheme: dark;
  --card: #17211b;
  --card-2: #1c2821;
  --text: #e6eee8;
  --muted: #a7b8ac;
  --line-dark: #2c3b32;
  --danger: #ff8a80;
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] body {
  background-color: #0b110d;
  background-image: radial-gradient(120% 80% at 20% 0%, #14241a 0%, #0b110d 60%) !important;
  color: var(--text);
}
html[data-theme="dark"] .bg-shape { opacity: 0.18; }

/* Rahmen (erzeugt: helle Rahmenfarben → dunkle Linienfarbe) */
:where(html[data-theme="dark"]) .license-tier { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .license-buy-panel { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .sports-picker { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .sport-icon-chip { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .provider-picker { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .provider-icon-chip { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .license-summary { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .manual-license-result { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .owner-side-metric-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .owner-visual-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .owner-analytics-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .manual-license-debug { border-color: #2a3a30; }
:where(html[data-theme="dark"]) input,
:where(html[data-theme="dark"]) select { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .admin-output { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tenant-role-account-list { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tenant-role-account-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tenant-feature-toggle { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tenant-team-list { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tenant-team-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #superadminTenantPanel .finance-accordion > summary { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-kpi-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-pane { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-tenants-wrap { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-tenants-table th,
:where(html[data-theme="dark"]) .superadmin-tenants-table td { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-license-badge { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-table-wrap { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-tenants-table th,
:where(html[data-theme="dark"]) .superadmin-tenants-table td,
:where(html[data-theme="dark"]) .superadmin-history-table th,
:where(html[data-theme="dark"]) .superadmin-history-table td { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-history-detail { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-history-diff-row { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .superadmin-history-diff-row.changed { border-color: #425448; }
:where(html[data-theme="dark"]) .superadmin-history-diff-values .before,
:where(html[data-theme="dark"]) .superadmin-history-diff-values .after { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #tenantRoleAdminPanel .finance-accordion { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #tenantRoleAdminPanel .finance-accordion > summary { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) #tenantRoleAdminPanel hr { border-top-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-toggle-btn { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #seasonPanelContent { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-mode-badge { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-mode-badge.is-global-mode { border-color: #3f5350; }
:where(html[data-theme="dark"]) .season-mode-badge.is-edit-mode { border-color: #445647; }
:where(html[data-theme="dark"]) .season-first-start-hint { border-color: #495647; }
:where(html[data-theme="dark"]) .season-create-inline { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #sessionsTab .checkbox-field { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #playersTab #playerForm .player-consent-group { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tabs { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .tab { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .help-center-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .help-center-card:hover { border-color: #45564a; }
:where(html[data-theme="dark"]) .help-center-link { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .help-center-link:hover { border-color: #385040; }
:where(html[data-theme="dark"]) #studentHelpDetails .help-center-link { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #studentHelpDetails .help-center-link:hover { border-color: #385040; }
:where(html[data-theme="dark"]) #studentHelpDetails .student-charges-summary { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #pushTab .checkbox-inline { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #pushTab .checkbox-inline:hover { border-color: #425448; }
:where(html[data-theme="dark"]) .player-export-checkbox select { border-color: #2a3a30; }
:where(html[data-theme="dark"]) th,
:where(html[data-theme="dark"]) td { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-dashboard { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-dashboard-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-dashboard-card-neutral { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-dashboard-card-present { border-color: #46594d; }
:where(html[data-theme="dark"]) .trainer-dashboard-card-absent { border-color: #4d534a; }
:where(html[data-theme="dark"]) .trainer-dashboard-card-uncertain { border-color: #4d5643; }
:where(html[data-theme="dark"]) .trainer-dashboard-card-unregistered { border-color: #4d5546; }
:where(html[data-theme="dark"]) .trainer-lineup { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-team-color-control { border-left-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-action { border-left-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-toggle { border-left-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-remove { border-left-color: #2a3a30; }
@media (max-width: 520px) {
:where(html[data-theme="dark"]) .trainer-lineup-team-color-control,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-action,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-remove,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-toggle { border-top-color: #2a3a30; }
}
@media (max-width: 520px) {
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-color-control,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-action,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-remove,
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap.is-tab-active .trainer-lineup-team-tab-toggle { border-top-color: #2a3a30; }
}
:where(html[data-theme="dark"]) .trainer-lineup-slot { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-slot.is-filled { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-player { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-lineup-player.is-uncertain { border-color: #494e33; }
:where(html[data-theme="dark"]) .trainer-lineup-bench-slot.has-uncertain-player { border-color: #464d35; }
:where(html[data-theme="dark"]) .trainer-lineup-chip { border-color: #3b4e41; }
:where(html[data-theme="dark"]) .trainer-lineup-chip.is-uncertain { border-color: #464d35; }
:where(html[data-theme="dark"]) #trainerLineupLayoutEditBtn.is-active { border-color: #464d35; }
:where(html[data-theme="dark"]) .attendance-item { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .attendance-push-indicator.is-active { border-color: #365241; }
:where(html[data-theme="dark"]) .attendance-push-indicator.is-inactive { border-color: #4a4b45; }
:where(html[data-theme="dark"]) .player-access-badge { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .player-access-badge.is-parent-active { border-color: #3d5145; }
:where(html[data-theme="dark"]) .player-access-badge.is-parent-disabled { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-ready { border-color: #3b5143; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-missing { border-color: #4a4f41; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-needed { border-color: #4a4f41; }
:where(html[data-theme="dark"]) .player-role-chip { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .player-role-badge { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-summary-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-taskhub-tab { border-color: #44564a; }
:where(html[data-theme="dark"]) .student-taskhub-tab:hover { border-color: #3f5346; }
:where(html[data-theme="dark"]) .student-taskhub-tab.is-active { border-color: #3f5346; }
:where(html[data-theme="dark"]) .student-taskhub-block { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-taskhub-item { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-open-item { border-color: #2a3a30; border-left-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-open-emoji-btn { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-trend-kpis > div { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-stats-details { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-history-detail-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-leaderboard-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-past-table-wrap { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-summary { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-absence-item { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-poll-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-poll-choice-btn { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-poll-choice-btn:hover:not(:disabled) { border-color: #3f5346; }
:where(html[data-theme="dark"]) .student-poll-option-pill { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-poll-results { border-top-color: #2a3a30; }
:where(html[data-theme="dark"]) .poll-checkbox { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #pollsTab .section-head { border-color: #2a3a30; }
:where(html[data-theme="dark"]) #pollsTab .poll-checkbox:hover { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .poll-analytics-panel { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .poll-kpi-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-message-item { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-profile-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .trainer-profile-field { border-top-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-table-wrap { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-table thead th { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-table tbody td { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .charge-group-label { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-dashboard-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-worklist { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-mini-metrics div { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-stat-card { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-accordion { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .form-display { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-accordion[open] { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .finance-accordion[open] > summary { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .accordion-description { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .session-task-row { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .session-task-fairness-summary { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .action-dialog-input input,
:where(html[data-theme="dark"]) .action-dialog-select select,
:where(html[data-theme="dark"]) .action-dialog-textarea textarea { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-retention-notice { border-color: #4c523e; }
:where(html[data-theme="dark"]) .season-retention-export-categories { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .calendar-export-option { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .calendar-export-feed-url { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-wizard-shell { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-stepper-item { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-step { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-step input:not([type="checkbox"]),
:where(html[data-theme="dark"]) .season-create-step select { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-step .checkbox-field { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-copy-option { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .season-create-summary { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .form-row select { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .btn-quick-penalty { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .parents-family { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .parents-family-option { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .parents-missing-consent { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .parents-child { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .parents-slot { border-top-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-paid { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-totals { border-color: #2a3a30; }
:where(html[data-theme="dark"]) .student-charges-totals-row { border-bottom-color: #2a3a30; }
:where(html[data-theme="dark"]) .consent-proof-item { border-color: #2a3a30; }

/* Verläufe (erzeugt aus den hellen Verläufen oben: gleicher Selektor, dunkle Töne) */
html[data-theme="dark"] #mainView:not(.hidden),
html[data-theme="dark"] #studentView:not(.hidden) { background: linear-gradient(145deg, rgba(30, 40, 34, 0.9), rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 0% 0%, rgba(37, 201, 138, 0.22), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(15, 99, 169, 0.18), transparent 34%),
    radial-gradient(circle at 50% 120%, rgba(255, 176, 59, 0.2), transparent 34%); }
html[data-theme="dark"] .login-card { background: radial-gradient(circle at 10% 14%, rgba(37, 201, 138, 0.3), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(15, 99, 169, 0.24), transparent 32%),
    radial-gradient(circle at 50% 108%, rgba(255, 176, 59, 0.22), transparent 34%),
    linear-gradient(155deg, rgba(30, 40, 34, 0.95), rgba(44, 54, 50, 0.92) 52%, rgba(46, 54, 47, 0.92) 100%); }
html[data-theme="dark"] #mainTopbar,
html[data-theme="dark"] .student-topbar { background: linear-gradient(135deg, rgba(30, 40, 34, 0.96), rgba(44, 54, 50, 0.9) 56%, rgba(45, 55, 49, 0.92) 100%); }
html[data-theme="dark"] .student-dashboard-card,
html[data-theme="dark"] .student-charges-card { background: linear-gradient(145deg, rgba(30, 40, 34, 0.95), rgba(45, 55, 50, 0.9) 58%, rgba(45, 55, 49, 0.92) 100%); }
html[data-theme="dark"] .brand-fallback { background: linear-gradient(135deg, rgb(30, 40, 34), rgb(43, 54, 47)); }
html[data-theme="dark"] #tenantTeamForm .checkbox-field { background: linear-gradient(145deg, rgba(30, 40, 34, 0.98), rgba(44, 54, 50, 0.9)); }
html[data-theme="dark"] #tenantRoleAdminPanel { background: linear-gradient(165deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 48%, rgb(44, 54, 50) 100%); }
html[data-theme="dark"] #tenantRoleAdminPanel .finance-accordion > summary { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(29, 39, 33) 100%); }
html[data-theme="dark"] .season-toggle-btn { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(29, 39, 33) 100%); }
html[data-theme="dark"] .help-center-card { background: linear-gradient(170deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 62%, rgb(45, 55, 49) 100%); }
html[data-theme="dark"] #helpTab { background: radial-gradient(circle at 96% 8%, rgba(37, 201, 138, 0.16), transparent 24%),
    radial-gradient(circle at 8% 96%, rgba(15, 99, 169, 0.11), transparent 26%),
    linear-gradient(150deg, rgba(30, 40, 34, 0.95), rgba(30, 40, 34, 0.92) 100%); }
html[data-theme="dark"] #supportAdminPanel { background: radial-gradient(circle at 96% 6%, rgba(68, 145, 207, 0.18), transparent 30%),
    linear-gradient(165deg, rgba(30, 40, 34, 0.98), rgba(45, 55, 50, 0.95)); }
html[data-theme="dark"] .support-ticket-badge-confirm { background: linear-gradient(135deg, rgba(46, 53, 42, 0.95), rgba(46, 54, 46, 0.95)); }
html[data-theme="dark"] #studentHelpDetails .help-center-link { background: radial-gradient(circle at 100% 0%, rgba(37, 201, 138, 0.12), transparent 36%),
    linear-gradient(165deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] #studentHelpDetails .help-center-link:hover,
html[data-theme="dark"] #studentHelpDetails .help-center-link:focus-visible { background: radial-gradient(circle at 100% 0%, rgba(37, 201, 138, 0.17), transparent 38%),
    linear-gradient(165deg, rgb(30, 40, 34) 0%, rgb(44, 55, 48) 100%); }
html[data-theme="dark"] #markAllUncertainBtn { background: linear-gradient(180deg, rgb(46, 54, 46) 0%, rgb(45, 53, 43) 100%); }
html[data-theme="dark"] #markAllUncertainBtn:hover { background: linear-gradient(180deg, rgb(46, 54, 44) 0%, rgb(45, 52, 40) 100%); }
html[data-theme="dark"] .trainer-dashboard-card { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .trainer-dashboard-card-neutral { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .trainer-dashboard-card-present { background: linear-gradient(180deg, rgb(44, 54, 48) 0%, rgb(43, 54, 48) 100%); }
html[data-theme="dark"] .trainer-dashboard-card-absent { background: linear-gradient(180deg, rgb(46, 53, 48) 0%, rgb(45, 52, 46) 100%); }
html[data-theme="dark"] .trainer-dashboard-card-uncertain { background: linear-gradient(180deg, rgb(46, 54, 47) 0%, rgb(45, 53, 44) 100%); }
html[data-theme="dark"] .trainer-dashboard-card-unregistered { background: linear-gradient(180deg, rgb(46, 54, 47) 0%, rgb(45, 52, 44) 100%); }
html[data-theme="dark"] .player-access-badge.is-parent-active { background: linear-gradient(180deg, rgb(44, 54, 48) 0%, rgb(43, 53, 47) 100%); }
html[data-theme="dark"] .player-access-badge.is-parent-disabled { background: linear-gradient(180deg, rgb(30, 39, 34) 0%, rgb(29, 39, 33) 100%); }
html[data-theme="dark"] .player-access-badge.is-consent-ready { background: linear-gradient(180deg, rgb(44, 54, 48) 0%, rgb(43, 54, 47) 100%); }
html[data-theme="dark"] .player-access-badge.is-consent-missing { background: linear-gradient(180deg, rgb(46, 54, 48) 0%, rgb(46, 53, 46) 100%); }
html[data-theme="dark"] .player-role-chip.is-selected { background: linear-gradient(180deg, rgb(44, 55, 48) 0%, rgb(42, 54, 47) 100%); }
html[data-theme="dark"] .student-charges-summary { background: linear-gradient(135deg, rgb(44, 54, 48) 0%, rgb(43, 54, 47) 100%); }
html[data-theme="dark"] .student-charges-summary:hover { background: linear-gradient(135deg, rgb(43, 54, 47) 0%, rgb(42, 53, 46) 100%); }
html[data-theme="dark"] .finance-dashboard-card { background: linear-gradient(180deg, rgb(30, 40, 34), rgb(30, 40, 34)); }
html[data-theme="dark"] .modal-content { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .action-feedback-modal-content.is-success { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .action-feedback-modal-content.is-error { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(46, 54, 49) 100%); }
html[data-theme="dark"] .season-create-wizard-content { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 62%, rgb(29, 39, 33) 100%); }
html[data-theme="dark"] .season-create-wizard-shell { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .season-create-wizard-intro { background: linear-gradient(180deg, rgba(44, 54, 50, 0.9), rgba(44, 55, 48, 0.9)); }
html[data-theme="dark"] .season-create-step { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .season-copy-option { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .season-copy-option:has(input:checked) { background: linear-gradient(180deg, rgb(44, 54, 48) 0%, rgb(44, 54, 48) 100%); }
html[data-theme="dark"] #seasonCreateWizardBackBtn,
html[data-theme="dark"] #seasonCreateWizardCancelBtn { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(44, 54, 49) 100%); }
html[data-theme="dark"] .season-create-wizard-content .modal-header { background: linear-gradient(125deg, rgba(44, 54, 50, 0.95), rgba(44, 55, 48, 0.92)); }
html[data-theme="dark"] .modal-header { background: linear-gradient(135deg, rgba(44, 54, 48, 0.92), rgba(44, 54, 50, 0.92)); }
html[data-theme="dark"] .add-to-home-screen-content { background: linear-gradient(180deg, rgb(30, 40, 34) 0%, rgb(30, 40, 34) 100%); }
html[data-theme="dark"] .add-to-home-screen-header { background: linear-gradient(135deg, rgba(44, 54, 48, 0.92), rgba(44, 54, 50, 0.92)); }

/* Flächen und Schrift (statisch erzeugt: helle Flächen / dunkle Schrift ohne Dunkel-Regel) */
html[data-theme="dark"] #loginForm input { background-color: #1e2822; }
html[data-theme="dark"] .login-superadmin-link { background-color: #1e2822; }
html[data-theme="dark"] .licenses-sport-tags span { background-color: #1e2722; color: #a9bcc9; }
html[data-theme="dark"] .license-tier { background-color: #1e2822; }
html[data-theme="dark"] .license-includes { color: #e6eee8; }
html[data-theme="dark"] .sports-picker { background-color: #1e2822; }
html[data-theme="dark"] .sport-icon-chip { background-color: #1e2822; }
html[data-theme="dark"] .provider-picker { background-color: #1e2822; }
html[data-theme="dark"] .provider-icon-chip { background-color: #1e2822; }
html[data-theme="dark"] .provider-icon-label { color: #a4bacb; }
html[data-theme="dark"] .license-summary { background-color: #1d2721; color: #abb8af; }
html[data-theme="dark"] .manual-license-result { background-color: #1e2821; color: #aab7ae; }
html[data-theme="dark"] .owner-menu-link { background-color: #1e2822; color: #a5b7c2; }
html[data-theme="dark"] .owner-menu-link:hover { background-color: #313b36; }
html[data-theme="dark"] .owner-sidebar-metrics { background-color: #1e2822; }
html[data-theme="dark"] .owner-side-metric-card { background-color: #1e2822; }
html[data-theme="dark"] .owner-side-metric-card span { color: #bac2bd; }
html[data-theme="dark"] .owner-side-metric-card strong { color: #a6b5ae; }
html[data-theme="dark"] .owner-side-metric-card small { color: #bbc2cf; }
html[data-theme="dark"] .owner-mini-progress { background-color: #303a35; }
html[data-theme="dark"] .owner-tag-row span { background-color: #303a36; }
html[data-theme="dark"] .owner-visual-card { background-color: #1e2822; }
html[data-theme="dark"] .owner-pipeline-track { background-color: #1d2721; }
html[data-theme="dark"] .owner-health-ring { background-color: #1e2822; }
html[data-theme="dark"] .owner-health-ring span { color: #a5baad; }
html[data-theme="dark"] .owner-health-ring small { color: #bac3bd; }
html[data-theme="dark"] .owner-analytics-card { background-color: #1e2822; }
html[data-theme="dark"] .owner-mix-track { background-color: #2f3a33; }
html[data-theme="dark"] .owner-big-stat { color: #a5b5ad; }
html[data-theme="dark"] .owner-goal-track { background-color: #2f3935; }
html[data-theme="dark"] .manual-license-debug { background-color: #1e2822; }
html[data-theme="dark"] .app-meta { color: #e6eee8; }
html[data-theme="dark"] .error.is-warning { color: #d6b6a3; }
html[data-theme="dark"] .admin-output { background-color: #1e2822; }
html[data-theme="dark"] .tenant-role-account-name { color: #a7b5b0; }
html[data-theme="dark"] .tenant-feature-toggle strong { color: #a7b5b0; }
html[data-theme="dark"] .tenant-feature-toggle small { color: #e6eee8; }
html[data-theme="dark"] .tenant-team-name { color: #a7b5b0; }
html[data-theme="dark"] #tenantTeamForm .checkbox-field span { color: #a8afb8; }
html[data-theme="dark"] .superadmin-kpi-card { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-kpi-card span { color: #e6eee8; }
html[data-theme="dark"] .superadmin-kpi-card strong { color: #a7b5b0; }
html[data-theme="dark"] .superadmin-pane { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-tenants-wrap { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-tenants-table th { background-color: #1e2822; color: #bac3be; }
html[data-theme="dark"] .superadmin-tenants-table tbody tr:hover { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-tenant-name { color: #a8b1ad; }
html[data-theme="dark"] .superadmin-license-badge { background-color: #1e2721; color: #b0beb5; }
html[data-theme="dark"] .superadmin-license-badge.is-active { color: #a8baae; }
html[data-theme="dark"] .superadmin-license-badge.is-suspended,
html[data-theme="dark"] .superadmin-license-badge.is-expired { color: #cda8a5; }
html[data-theme="dark"] .superadmin-seat-meter { background-color: #1d2721; }
html[data-theme="dark"] .superadmin-tenants-empty { color: #e6eee8; }
html[data-theme="dark"] .superadmin-table-wrap { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-tenants-table thead th,
html[data-theme="dark"] .superadmin-history-table thead th { background-color: #303a34; }
html[data-theme="dark"] .superadmin-tenants-table tbody tr:nth-child(even) { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-history-table tbody tr:nth-child(even) { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-history-table tbody tr.selected { background-color: #2f3a33; }
html[data-theme="dark"] .superadmin-history-diff-row { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-history-diff-row.changed { background-color: #1d2721; }
html[data-theme="dark"] .superadmin-history-diff-values .before,
html[data-theme="dark"] .superadmin-history-diff-values .after { background-color: #1e2822; }
html[data-theme="dark"] .superadmin-history-diff-values .arrow { color: #b9c3bd; }
html[data-theme="dark"] .tenant-expiring-soon { color: #d9af9e; }
html[data-theme="dark"] .calendar-export-btn:hover { background-color: #303a34; }
html[data-theme="dark"] .season-toggle-btn:hover { background-color: #1d2721; }
html[data-theme="dark"] #seasonPanelContent { background-color: #1e2822; }
html[data-theme="dark"] .season-admin-hero strong { color: #a6b5af; }
html[data-theme="dark"] .season-mode-badge { background-color: #1e2722; color: #e6eee8; }
html[data-theme="dark"] .season-mode-badge.is-global-mode { background-color: #303a36; color: #a5bac9; }
html[data-theme="dark"] .season-mode-badge.is-edit-mode { background-color: #313b34; color: #aabeac; }
html[data-theme="dark"] .season-first-start-hint { background-color: #333b34; color: #bfbca8; }
html[data-theme="dark"] .season-create-inline { background-color: #1e2822; }
html[data-theme="dark"] #sessionsTab .checkbox-field { background-color: #1e2822; }
html[data-theme="dark"] #sessionsTab .session-series-hint-mini { color: #e6eee8; }
html[data-theme="dark"] #supportAdminPanel > summary { color: #a6b6c4; }
html[data-theme="dark"] .support-ticket-item { background-color: #1e2822; }
html[data-theme="dark"] .support-message-item { background-color: #1e2822; }
html[data-theme="dark"] .support-message-item.is-owner { background-color: #1d2721; }
html[data-theme="dark"] .support-message-image { background-color: #1e2822; }
html[data-theme="dark"] .help-center-link small { color: #e6eee8; }
html[data-theme="dark"] #studentHelpDetails .help-center-link span { color: #a5b6ac; }
html[data-theme="dark"] #studentHelpDetails .help-center-link small { color: #e6eee8; }
html[data-theme="dark"] .player-export-checkbox { color: #e6eee8; }
html[data-theme="dark"] .player-export-checkbox select { background-color: #1e2822; color: #abb7ae; }
html[data-theme="dark"] .trainer-dashboard-card-present .muted,
html[data-theme="dark"] .trainer-dashboard-card-present strong { color: #a6c0ae; }
html[data-theme="dark"] .trainer-dashboard-card-absent .muted,
html[data-theme="dark"] .trainer-dashboard-card-absent strong { color: #d3a6a4; }
html[data-theme="dark"] .trainer-dashboard-card-uncertain .muted,
html[data-theme="dark"] .trainer-dashboard-card-uncertain strong { color: #c6bb9e; }
html[data-theme="dark"] .trainer-dashboard-card-unregistered .muted,
html[data-theme="dark"] .trainer-dashboard-card-unregistered strong { color: #ccae9e; }
html[data-theme="dark"] .trainer-lineup-team-tab small { color: #e6eee8; }
html[data-theme="dark"] .trainer-lineup-team-tab-action:hover { background-color: #1d2721; color: #a7b5ab; }
html[data-theme="dark"] .trainer-lineup-team-tab-toggle:hover { background-color: #1e2721; color: #a7b5ab; }
html[data-theme="dark"] .trainer-lineup-team-tab-remove:hover { background-color: #323933; color: #cca6a4; }
html[data-theme="dark"] .trainer-lineup-meta-row input[readonly] { background-color: #1d2721; }
html[data-theme="dark"] .trainer-lineup-player.is-uncertain { background-color: #333a32; color: #c1b8a2; }
html[data-theme="dark"] .trainer-lineup-bench-slot.has-uncertain-player { background-color: #323931; }
html[data-theme="dark"] .trainer-lineup-player.is-absent { background-color: #323732; color: #c8a8a6; }
html[data-theme="dark"] .trainer-lineup-remove { background-color: #1e2822; color: #d3a8a5; }
html[data-theme="dark"] #trainerLineupLayoutEditBtn.is-active { background-color: #323521; color: #b5afa0; }
html[data-theme="dark"] .attendance-push-indicator.is-active { background-color: #2d3932; color: #a4bdb1; }
html[data-theme="dark"] .attendance-reason-inline { color: #e6eee8; }
html[data-theme="dark"] .btn-quick-penalty:hover { background-color: #1e2721; }
html[data-theme="dark"] .btn-quick-penalty:active { background-color: #1d2721; }
html[data-theme="dark"] .btn-edit-catalog:hover { background-color: #2e3932; }
html[data-theme="dark"] .btn-delete-catalog:hover { background-color: #323732; }
html[data-theme="dark"] .player-role-chip:hover { background-color: #313b36; }
html[data-theme="dark"] .player-role-badge { background-color: #1e2822; color: #aeb8b0; }
html[data-theme="dark"] .attendance-item.is-absent { background-color: #323934; }
html[data-theme="dark"] .attendance-item.is-unregistered { background-color: #333a33; }
html[data-theme="dark"] .badge.present { background-color: #2e3a32; color: #a6c0ae; }
html[data-theme="dark"] .badge.absent { background-color: #323731; color: #d3a6a4; }
html[data-theme="dark"] .badge.is-absent { background-color: #323731; color: #d3a6a4; }
html[data-theme="dark"] .badge.is-unregistered { background-color: #333931; color: #ccae9e; }
html[data-theme="dark"] .badge.is-cancelled { background-color: #323732; color: #d0aaae; }
html[data-theme="dark"] .student-taskhub-tab:hover { background-color: #2f3a33; }
html[data-theme="dark"] .student-taskhub-block h4 { color: #b0b9b2; }
html[data-theme="dark"] .student-taskhub-item strong { color: #aab2ae; }
html[data-theme="dark"] .student-taskhub-offer-form label { color: #b2bab4; }
html[data-theme="dark"] .student-urgency-badge.is-high { background-color: #323833; color: #d0aaae; }
html[data-theme="dark"] .student-urgency-badge.is-medium { background-color: #333a33; color: #d3bb9e; }
html[data-theme="dark"] .student-urgency-badge.is-low { background-color: #303a34; color: #a9c7b4; }
html[data-theme="dark"] .student-open-item-line2 { color: #e6eee8; }
html[data-theme="dark"] .student-open-emoji-btn:hover { background-color: #1d2721; }
html[data-theme="dark"] .student-leaderboard-own-rank { color: #e6eee8; }
html[data-theme="dark"] .student-leaderboard-empty { color: #e6eee8; }
html[data-theme="dark"] .student-past-table thead th { background-color: #1d2721; }
html[data-theme="dark"] .student-absence-item { background-color: #1e2822; }
html[data-theme="dark"] .student-poll-card { background-color: #1e2822; }
html[data-theme="dark"] .student-poll-type-hint { color: #e6eee8; }
html[data-theme="dark"] .student-poll-choice-btn { background-color: #1e2822; color: #e6eee8; }
html[data-theme="dark"] .student-poll-choice-btn:hover:not(:disabled) { background-color: #1d2721; }
html[data-theme="dark"] .student-poll-option-pill { background-color: #303a34; }
html[data-theme="dark"] #pollsTab .section-head { background-color: #1e2722; }
html[data-theme="dark"] #pollsTab .poll-checkbox:hover { background-color: #1e2721; }
html[data-theme="dark"] .poll-analytics-panel { background-color: #1e2822; }
html[data-theme="dark"] .poll-kpi-card { background-color: #1e2822; }
html[data-theme="dark"] .poll-kpi-card span { color: #e6eee8; }
html[data-theme="dark"] .student-message-head strong { color: #e6eee8; }
html[data-theme="dark"] .student-message-ack-state.is-required { color: #ccb5a1; }
html[data-theme="dark"] .student-message-item.requires-ack.is-unread { background-color: #333b34; }
html[data-theme="dark"] .student-charges-table thead th { background-color: #1e2722; color: #bcc2bb; }
html[data-theme="dark"] .student-charges-table tbody td { color: #e6eee8; }
html[data-theme="dark"] .student-charges-row.is-penalty td:first-child { color: #d9a8a5; }
html[data-theme="dark"] .student-charges-row.is-contribution td:first-child { color: #a8bacc; }
html[data-theme="dark"] .charge-group-penalty { color: #d9a8a5; }
html[data-theme="dark"] .charge-group-contribution { color: #a8bacc; }
html[data-theme="dark"] .charge-penalty { background-color: #333a35; }
html[data-theme="dark"] .charge-contribution { background-color: #313b36; }
html[data-theme="dark"] .charge-description { color: #e6eee8; }
html[data-theme="dark"] .charge-amount { color: #e3aba7; }
html[data-theme="dark"] .charge-contribution .charge-amount { color: #a8bacc; }
html[data-theme="dark"] .kind-pill { background-color: #303a34; color: #a8c1b0; }
html[data-theme="dark"] .finance-mini-metrics div { background-color: #1e2822; }
html[data-theme="dark"] .finance-mini-metrics span { color: #e6eee8; }
html[data-theme="dark"] .finance-stat-card { background-color: #1e2822; }
html[data-theme="dark"] .form-display { background-color: #1e2721; color: #e6eee8; }
html[data-theme="dark"] .finance-accordion > summary:hover { background-color: #1d2721; }
html[data-theme="dark"] .finance-accordion[open] > summary { background-color: #1d2721; }
html[data-theme="dark"] #financeLedgerTableWrap.is-cashier-limited thead th { background-color: #1e2822; }
html[data-theme="dark"] .session-task-row { background-color: #1e2822; }
html[data-theme="dark"] .session-task-fairness-summary { background-color: #1e2822; }
html[data-theme="dark"] .session-task-fairness-chip { background-color: #303a34; }
html[data-theme="dark"] .modal-subtitle { color: #e6eee8; }
html[data-theme="dark"] .action-dialog-input input,
html[data-theme="dark"] .action-dialog-select select,
html[data-theme="dark"] .action-dialog-textarea textarea { background-color: #1e2822; }
html[data-theme="dark"] .action-feedback-shell strong { color: #a5ada8; }
html[data-theme="dark"] .action-feedback-message { color: #b9c3bd; }
html[data-theme="dark"] .season-retention-notice { background-color: #333b33; }
html[data-theme="dark"] .season-retention-export-categories { background-color: #1e2822; }
html[data-theme="dark"] .calendar-export-intro { color: #e6eee8; }
html[data-theme="dark"] .calendar-export-option { background-color: #1e2822; }
html[data-theme="dark"] .calendar-export-url-label { color: #e6eee8; }
html[data-theme="dark"] .calendar-export-feed-url { background-color: #1e2822; color: #a6b2ac; }
html[data-theme="dark"] .season-create-hint { background-color: #1e2721; color: #e6eee8; }
html[data-theme="dark"] .season-create-stepper-item { background-color: #1e2721; color: #e6eee8; }
html[data-theme="dark"] .season-create-stepper-item.is-active { color: #a9b4bd; }
html[data-theme="dark"] .season-create-step label { color: #e6eee8; }
html[data-theme="dark"] .season-create-step input:not([type="checkbox"]),
html[data-theme="dark"] .season-create-step select { background-color: #1e2822; }
html[data-theme="dark"] .season-create-step .checkbox-field { background-color: #1e2822; }
html[data-theme="dark"] .season-copy-option input:checked + .season-copy-option-text strong { color: #a7baae; }
html[data-theme="dark"] .season-copy-option input:checked + .season-copy-option-text .muted { color: #b1bdb6; }
html[data-theme="dark"] .season-copy-option-text strong { color: #a8b0ac; }
html[data-theme="dark"] .season-create-summary { background-color: #1d2721; }
html[data-theme="dark"] .btn-quick-penalty:hover { background-color: #303a36; color: #9ec5ec; }
html[data-theme="dark"] .btn-quick-penalty:active { background-color: #2d3936; }
html[data-theme="dark"] .modal-header h2 { color: #a4ada8; }
html[data-theme="dark"] .modal-close:hover { background-color: #1e2822; color: #a4ada8; }
html[data-theme="dark"] .add-to-home-screen-header h2 { color: #a4ada8; }
html[data-theme="dark"] .parents-family-option { background-color: #1e2822; }
html[data-theme="dark"] .parents-child { background-color: #1e2822; }
html[data-theme="dark"] .parents-slot-label { color: #e6eee8; }
html[data-theme="dark"] .parents-slot-user small,
html[data-theme="dark"] .parents-slot-note { color: #e6eee8; }
html[data-theme="dark"] .student-charges-row.is-paid td { color: #bbc2bc; }
html[data-theme="dark"] .student-charges-totals-row strong { color: #a9c7b4; }
html[data-theme="dark"] .student-charges-totals-row.is-total strong { color: #a5baad; }
html[data-theme="dark"] .student-squad-role.is-starter { background-color: #1e2822; color: #a6beaf; }
html[data-theme="dark"] .student-squad-role.is-bench { background-color: #1e2822; color: #e6eee8; }

/* Flächen und Schrift, Nachtrag (statisch erzeugt: fehlende Eigenschaft je Selektor) */
html[data-theme="dark"] #markAllUncertainBtn { color: #c7bea5; }
html[data-theme="dark"] #markAllUncertainBtn:hover { color: #c1b8a2; }
html[data-theme="dark"] .help-center-link { background-color: #1e2822; color: #a5baad; }
html[data-theme="dark"] .support-ticket-badge-confirm { color: #c7b69e; }
html[data-theme="dark"] .help-center-link:hover { background-color: #1e2822; }
html[data-theme="dark"] .trainer-dashboard-card-neutral { color: #e6eee8; }
html[data-theme="dark"] .trainer-dashboard-card-present { color: #a6c0ae; }
html[data-theme="dark"] .trainer-dashboard-card-absent { color: #d3a6a4; }
html[data-theme="dark"] .trainer-dashboard-card-uncertain { color: #c6bb9e; }
html[data-theme="dark"] .trainer-dashboard-card-unregistered { color: #ccae9e; }
html[data-theme="dark"] .trainer-lineup-team-tab { color: #a7b5ab; }
html[data-theme="dark"] .trainer-lineup-player { background-color: #1e2822; color: #a6b1ab; }
html[data-theme="dark"] .trainer-lineup-bench-slot { color: #adb8b1; }
html[data-theme="dark"] .trainer-lineup-chip { background-color: #1e2822; color: #aab5ae; }
html[data-theme="dark"] .attendance-item { background-color: #1e2822; }
html[data-theme="dark"] .player-access-badge { background-color: #1d2721; color: #abb9b2; }
html[data-theme="dark"] .player-access-badge.is-consent-ready { color: #aac0b4; }
html[data-theme="dark"] .student-open-item { background-color: #1e2822; }
html[data-theme="dark"] .student-charges-summary { color: #a7b4ad; }
html[data-theme="dark"] .student-charges-badge { color: #e6eee8; }
html[data-theme="dark"] .student-message-item { background-color: #1e2822; }
html[data-theme="dark"] .season-create-wizard-intro { color: #e6eee8; }
html[data-theme="dark"] #seasonCreateWizardBackBtn,
html[data-theme="dark"] #seasonCreateWizardCancelBtn { color: #aab6be; }

html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content {
  background: var(--card);
  border-color: var(--line-dark);
  color: var(--text);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong,
html[data-theme="dark"] label { color: var(--text); }
html[data-theme="dark"] a { color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] .hint,
html[data-theme="dark"] .muted,
html[data-theme="dark"] small { color: var(--muted); }
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f1813;
  color: var(--text);
  border-color: var(--line-dark);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #7f9286; }
html[data-theme="dark"] .btn-ghost {
  background: var(--accent-soft);
  color: var(--accent-text, #8fd4a8);
}
html[data-theme="dark"] table th { background: var(--card-2); color: var(--text); }
html[data-theme="dark"] table td,
html[data-theme="dark"] table th { border-color: var(--line-dark); }
html[data-theme="dark"] details > summary { color: var(--text); }
html[data-theme="dark"] .session-comment { background: var(--card-2); }
html[data-theme="dark"] .session-comments-btn { background: var(--card-2); color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] img.brand-image,
html[data-theme="dark"] img.student-logo { background: #ffffff; border-radius: 12px; }

/* Dunkelmodus – Flächen und Texte (aus den berechneten Farben erzeugt, Farbton bleibt erhalten) */
:where(html[data-theme="dark"]) #financeAssignSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeAssignedSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeCatalogSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeContributionSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeExpenseSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeIncomeSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeLedgerSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeOutstandingSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #financeOverviewSummary { background-color: #17211b; }
:where(html[data-theme="dark"]) #loginPasswordInput { background-color: #17211b; }
:where(html[data-theme="dark"]) #loginUsernameInput { background-color: #17211b; }
:where(html[data-theme="dark"]) #sessionsHeaderDate { background-color: #17211b; }
:where(html[data-theme="dark"]) #sessionsHeaderDeadline { background-color: #17211b; }
:where(html[data-theme="dark"]) #sessionsHeaderKind { background-color: #17211b; }
:where(html[data-theme="dark"]) #sessionsHeaderTime { background-color: #17211b; }
:where(html[data-theme="dark"]) #sessionsHeaderTitle { background-color: #17211b; }
:where(html[data-theme="dark"]) .attendance-item.is-present { background-color: #424c45; }
:where(html[data-theme="dark"]) .attendance-item.is-uncertain { background-color: #454c42; }
:where(html[data-theme="dark"]) .attendance-push-indicator.is-inactive { background-color: #444541; }
:where(html[data-theme="dark"]) .badge.is-planned { background-color: #414b45; }
:where(html[data-theme="dark"]) .badge.is-present { background-color: #3d4a42; }
:where(html[data-theme="dark"]) .badge.is-uncertain { background-color: #454938; }
:where(html[data-theme="dark"]) .btn-ghost { background-color: var(--accent-soft); }
:where(html[data-theme="dark"]) .btn-quick-penalty { background-color: #17211b; }
:where(html[data-theme="dark"]) .calendar-export-btn { background-color: #17211b; }
:where(html[data-theme="dark"]) .checkbox-field { background-color: #17211b; }
:where(html[data-theme="dark"]) .checkbox-inline { background-color: #17211b; }
:where(html[data-theme="dark"]) .finance-accordion { background-color: #17211b; }
:where(html[data-theme="dark"]) .finance-accordion-content { background-color: #17211b; }
:where(html[data-theme="dark"]) .finance-mini-metrics > div { background-color: #17211b; }
:where(html[data-theme="dark"]) .finance-worklist { background-color: #17211b; }
:where(html[data-theme="dark"]) .header-role-chip { background-color: #414b49; }
:where(html[data-theme="dark"]) .language-switcher-label { background-color: #17211b; }
:where(html[data-theme="dark"]) .modal-close { background-color: #17211b; }
:where(html[data-theme="dark"]) .parents-family { background-color: #17211b; }
:where(html[data-theme="dark"]) .parents-missing-consent { background-color: #17211b; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-link { background-color: #17211b; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-needed { background-color: #454c45; }
:where(html[data-theme="dark"]) .player-consent-group { background-color: #17211b; }
:where(html[data-theme="dark"]) .player-role-chip { background-color: #17211b; }
:where(html[data-theme="dark"]) .poll-checkbox { background-color: #17211b; }
:where(html[data-theme="dark"]) .section-head { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-charges-badge { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-charges-badge.has-items { background-color: #454944; }
:where(html[data-theme="dark"]) .student-charges-paid { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-charges-table-wrap { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-charges-totals { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-charges-totals-row.is-total { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-history-detail-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-leaderboard-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-message-item.is-read { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-message-item.is-unread { background-color: #454c44; }
:where(html[data-theme="dark"]) .student-open-emoji-btn { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-open-item.is-uncertain { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-past-table-wrap { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-stats-details { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-summary-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-taskhub-block { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-taskhub-item { background-color: #17211b; }
:where(html[data-theme="dark"]) .student-taskhub-tab { background-color: #3f4b44; }
:where(html[data-theme="dark"]) .student-taskhub-tab.is-active { background-color: #3e4a42; }
:where(html[data-theme="dark"]) .student-trend-kpis > div { background-color: #17211b; }
:where(html[data-theme="dark"]) .support-owner-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .tab { background-color: #17211b; }
:where(html[data-theme="dark"]) .tabs { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-feature-toggle { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-role-account-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-role-account-list { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-role-account-role { background-color: #414b49; }
:where(html[data-theme="dark"]) .tenant-team-badge { background-color: #404c45; }
:where(html[data-theme="dark"]) .tenant-team-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-team-list { background-color: #17211b; }
:where(html[data-theme="dark"]) .tenant-team-sport-badge { background-color: #3e4948; }
:where(html[data-theme="dark"]) .trainer-dashboard { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-bench { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-bench-pool { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-bench-slot { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-bench-slot.is-filled { background-color: #3e4941; }
:where(html[data-theme="dark"]) .trainer-lineup-chip.is-present { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-chip.is-uncertain { background-color: #454b41; }
:where(html[data-theme="dark"]) .trainer-lineup-player.is-present { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-lineup-team-tab-wrap.is-tab-active { background-color: #17211b; }
:where(html[data-theme="dark"]) .trainer-profile-card { background-color: #17211b; }
:where(html[data-theme="dark"]) .accordion-description { color: #e6eee8; }
:where(html[data-theme="dark"]) .action-dialog-message { color: #e6eee8; }
:where(html[data-theme="dark"]) .btn-link { color: #a2b9b5; }
:where(html[data-theme="dark"]) .hint-tight { color: #e6eee8; }
:where(html[data-theme="dark"]) .player-access-badge.is-consent-missing { color: #ccb6a8; }
:where(html[data-theme="dark"]) .player-access-badge.is-parent-active { color: #aac1b4; }
:where(html[data-theme="dark"]) .player-export-scope-note { color: #e6eee8; }
:where(html[data-theme="dark"]) input[type="checkbox"], :where(html[data-theme="dark"]) input[type="radio"] { accent-color: var(--accent-text, #8fd4a8); }

/* Dunkelmodus – Runde 2 (spezifischere Originalregeln, aufgehellte Schrift) */
html[data-theme="dark"] #loginPasswordInput { background-color: #17211b; }
html[data-theme="dark"] #loginUsernameInput { background-color: #17211b; }
html[data-theme="dark"] #sessionsHeaderDate { background-color: #17211b; }
html[data-theme="dark"] #sessionsHeaderDeadline { background-color: #17211b; }
html[data-theme="dark"] #sessionsHeaderKind { background-color: #17211b; }
html[data-theme="dark"] #sessionsHeaderTime { background-color: #17211b; }
html[data-theme="dark"] #sessionsHeaderTitle { background-color: #17211b; }
html[data-theme="dark"] .btn-ghost, html[data-theme="dark"] #mainView .btn-ghost, html[data-theme="dark"] #studentView .btn-ghost { background-color: var(--accent-soft); color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] .checkbox-field { background-color: #17211b; }
html[data-theme="dark"] .checkbox-inline { background-color: #17211b; }
html[data-theme="dark"] .finance-accordion { background-color: #17211b; }
html[data-theme="dark"] .finance-accordion-content { background-color: #17211b; }
html[data-theme="dark"] .language-switcher-label { background-color: #17211b; }
html[data-theme="dark"] .player-consent-group { background-color: #17211b; }
html[data-theme="dark"] .section-head { background-color: #17211b; }
html[data-theme="dark"] .student-message-item.is-unread { background-color: #454c44; }
html[data-theme="dark"] .student-taskhub-tab:not(.is-active) { background-color: #3f4b44; }
html[data-theme="dark"] #financeDashPenaltiesLabel { color: #e6eee8; }
html[data-theme="dark"] #financeDashPlayersLabel { color: #e6eee8; }
html[data-theme="dark"] #lineupStarterToggleLabel { color: #a9c7b4; }
html[data-theme="dark"] #studentMessagesTitle { color: #cfd9d2; }
html[data-theme="dark"] #studentPollsTitle { color: #cfd9d2; }
html[data-theme="dark"] #studentTaskHubTabCarpoolLabel { color: #cfd9d2; }
html[data-theme="dark"] #studentTaskHubTabTasksLabel { color: #cfd9d2; }
html[data-theme="dark"] .attendance-push-indicator.is-inactive { color: #d0aaae; }
html[data-theme="dark"] .badge.is-planned { color: #a9c7b4; }
html[data-theme="dark"] .badge.is-present { color: #a6c0ae; }
html[data-theme="dark"] .badge.is-uncertain { color: #c6bb9e; }
html[data-theme="dark"] .calendar-export-emoji { color: #a9c7b4; }
html[data-theme="dark"] .finance-task-summary { color: #e6eee8; }
html[data-theme="dark"] .header-role-chip { color: #aab6bf; }
html[data-theme="dark"] .hint-tight { color: #e6eee8; }
html[data-theme="dark"] .modal-close { color: #aeb6b1; }
html[data-theme="dark"] .player-access-badge.is-consent-link { color: #abb9b2; }
html[data-theme="dark"] .player-access-badge.is-consent-needed { color: #ccb6a8; }
html[data-theme="dark"] .student-charges-amount { color: #e6eee8; }
html[data-theme="dark"] .student-charges-badge.has-items { color: #e3aba7; }
html[data-theme="dark"] .student-charges-row > td { color: #d9a8a5; }
html[data-theme="dark"] .student-charges-totals-row > strong { color: #a5baad; }
html[data-theme="dark"] .student-leaderboard-metric { color: #b2bab4; }
html[data-theme="dark"] .student-leaderboard-subtitle { color: #e6eee8; }
html[data-theme="dark"] .student-message-ack-state.is-confirmed { color: #a9c7b4; }
html[data-theme="dark"] .student-message-body { color: #e6eee8; }
html[data-theme="dark"] .student-message-date { color: #e6eee8; }
html[data-theme="dark"] .student-open-item-meta-text { color: #e6eee8; }
html[data-theme="dark"] .student-taskhub-meta { color: #bbc3be; }
html[data-theme="dark"] .student-taskhub-tab { color: #cfd9d2; }
html[data-theme="dark"] .student-taskhub-tab.is-active { color: #cfd9d2; }
html[data-theme="dark"] .tenant-role-account-role { color: #aab6bf; }
html[data-theme="dark"] .tenant-team-badge { color: #aabcb2; }
html[data-theme="dark"] .tenant-team-meta { color: #e6eee8; }
html[data-theme="dark"] .tenant-team-sport-badge { color: #a4bacb; }
html[data-theme="dark"] .trainer-lineup-chip.is-present { color: #aab5ae; }
html[data-theme="dark"] .trainer-lineup-chip.is-uncertain { color: #c1b8a2; }
html[data-theme="dark"] .trainer-lineup-empty { color: #adb8b1; }
html[data-theme="dark"] .trainer-lineup-player.is-present { color: #a6b1ab; }
html[data-theme="dark"] .trainer-lineup-slot-label { color: #adb8b1; }
html[data-theme="dark"] .trainer-lineup-team-tab > span { color: #a7b5ab; }
html[data-theme="dark"] .trainer-lineup-team-tab-action { color: #b2bdb8; }
html[data-theme="dark"] .trainer-lineup-team-tab-remove { color: #d3a8a5; }
html[data-theme="dark"] .trainer-lineup-team-tab-toggle { color: #e6eee8; }
html[data-theme="dark"] .trainer-weekly-summary { color: #e6eee8; }

/* Dunkelmodus – Bereiche mit sehr spezifischen Originalregeln */
html[data-theme="dark"] #tenantRoleAdminPanel .finance-accordion,
html[data-theme="dark"] #tenantRoleAdminPanel > .finance-accordion,
html[data-theme="dark"] #tenantRoleAdminPanel .finance-accordion-content,
html[data-theme="dark"] #superadminTenantPanel .finance-accordion,
html[data-theme="dark"] #studentView .finance-accordion,
html[data-theme="dark"] #financeTab .finance-accordion,
html[data-theme="dark"] .polls-accordion .finance-accordion-content { background: var(--card); border-color: var(--line-dark); }
html[data-theme="dark"] #tenantRoleAdminPanel .finance-accordion > summary,
html[data-theme="dark"] #superadminTenantPanel .finance-accordion > summary,
html[data-theme="dark"] #financeTab .finance-accordion > summary,
html[data-theme="dark"] .finance-accordion > summary { background: var(--card-2); color: var(--text); }
html[data-theme="dark"] thead th,
html[data-theme="dark"] thead tr th { background: var(--card-2); color: var(--text); }
html[data-theme="dark"] .checkbox-field,
html[data-theme="dark"] .checkbox-inline,
html[data-theme="dark"] .player-consent-group,
html[data-theme="dark"] .section-head,
html[data-theme="dark"] #mainView .checkbox-field,
html[data-theme="dark"] #mainView .section-head { background: var(--card-2); }
html[data-theme="dark"] #demoLoginBtn { background: var(--card-2); }
html[data-theme="dark"] td a,
html[data-theme="dark"] tr td a { color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] .header-role-chip,
html[data-theme="dark"] .tenant-role-account-role { color: #d3dde4; }
html[data-theme="dark"] #sessionsTab thead th,
html[data-theme="dark"] #mainView thead th,
html[data-theme="dark"] #mainView table th { background: var(--card-2); color: var(--text); }
html[data-theme="dark"] #mainView .player-consent-group,
html[data-theme="dark"] #mainView .checkbox-inline,
html[data-theme="dark"] #pushTab .checkbox-inline { background: var(--card-2); }
html[data-theme="dark"] #mainView .hint,
html[data-theme="dark"] #mainView .hint-tight,
html[data-theme="dark"] #mainView .player-consent-hint { color: var(--muted); }
html[data-theme="dark"] #mainView .player-consent-title { color: var(--text); }
html[data-theme="dark"] .student-charges-row > td,
html[data-theme="dark"] #studentView .student-charges-table td { color: var(--text); }
html[data-theme="dark"] .student-help-links a.btn-link span,
html[data-theme="dark"] .student-help-links a.btn-link { color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] .student-help-links a.btn-link small { color: var(--muted); }
html[data-theme="dark"] .student-message-ack-state { color: #ffd08a; }
html[data-theme="dark"] .student-taskhub-tab,
html[data-theme="dark"] .student-taskhub-tab span { color: #cfd9d2; }
html[data-theme="dark"] #studentView .student-help-links .btn-link,
html[data-theme="dark"] #studentView .student-help-links .btn-link span { color: var(--accent-text, #8fd4a8); }
html[data-theme="dark"] #studentView .student-help-links .btn-link small { color: var(--muted); }
html[data-theme="dark"] #playersTab #playerForm .player-consent-group { background: var(--card-2); border-color: var(--line-dark); }
html[data-theme="dark"] #playersTab #playerForm .player-consent-group .checkbox-field span,
html[data-theme="dark"] #playersTab #playerForm .player-consent-title { color: var(--text); }
html[data-theme="dark"] #playersTab #playerForm .player-consent-hint { color: var(--muted); }
html[data-theme="dark"] #pushTab .checkbox-inline { background: var(--card-2); border-color: var(--line-dark); }
html[data-theme="dark"] #pushTab #pushReadAckLabel { color: var(--text); }

/* Kommentare an alle Spieler */
.session-comment-broadcast-btn { justify-self: start; }
.session-comment-thread.is-broadcast { border-color: var(--accent); }
.session-comment.is-broadcast { border-left: 4px solid var(--accent); }
.session-comment-broadcast-tag { font-style: normal; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); }

/* Datenschutzanfragen (Verwaltung) – bisherige Oberfläche */
.privacy-request-list { display: grid; gap: 10px; margin: 10px 0 14px; }
.privacy-request { padding: 10px 12px; border: 1px solid var(--line, rgba(0, 0, 0, 0.12)); border-radius: 12px; }
.privacy-request-head { display: flex; justify-content: space-between; gap: 10px; }
.privacy-request-note { margin: 6px 0 0; white-space: pre-wrap; }
.privacy-request-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Warteschlange ohne Empfang (src/app/19-offline-warteschlange.js): Hinweis oben, antippen = erneut senden */
.offline-queue-indicator {
  --oq-bg: #fff4d6;
  --oq-text: #5c3b00;
  --oq-border: #e7b94a;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  border: 1px solid var(--oq-border);
  border-radius: 999px;
  background: var(--oq-bg);
  color: var(--oq-text);
  font: 600 0.88rem/1.3 var(--font-ui);
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}
.offline-queue-indicator.hidden { display: none; }
html[data-theme="dark"] .offline-queue-indicator {
  --oq-bg: #3a2d10;
  --oq-text: #ffe2a3;
  --oq-border: #8a6a24;
}

/* Freigegebener Kader in der Spieleransicht (src/app/20-kader-ansicht.js) */
.student-squad-link {
  display: inline-block;
  margin: 6px 4px 2px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: 600 0.92rem/1.3 var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.student-squad-modal-content { width: min(560px, 94vw); }
.student-squad-modal-content .modal-body { padding: 4px 18px 20px; }
.student-squad-team-block + .student-squad-team-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.student-squad-team { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 1.05rem; }
.student-squad-group { margin: 14px 0 6px; font-size: 0.95rem; }
.student-squad-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.student-squad-member { padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--text); overflow-wrap: anywhere; }
.student-squad-member.is-you { font-weight: 700; box-shadow: inset 0 0 0 2px var(--accent); }
.student-squad-you { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; }
.student-squad-field { margin: 8px auto 0; width: min(100%, 520px, calc(62vh * var(--field-ratio))); }
.student-squad-field-player { cursor: default; text-align: center; overflow-wrap: anywhere; }
.student-squad-field-player.is-you { background: #ffe08a; border-color: #b8860b; color: #3d2a00; font-weight: 700; }
.student-squad-bench { margin-top: 4px; }
html[data-theme="dark"] .student-squad-link { color: var(--accent-text, #9fe0b4); }
html[data-theme="dark"] .student-squad-team-block + .student-squad-team-block { border-top-color: rgba(255, 255, 255, 0.14); }
#studentSquadModal { z-index: 1400; }
.student-squad-field-player { padding: 3px 2px; overflow-wrap: break-word; hyphens: auto; }
.student-squad-field-player.is-you { font-weight: 600; }
.student-squad-member .student-squad-role { margin-left: 4px; font-size: 0.75rem; }
.student-squad-field .trainer-lineup-slot { width: clamp(66px, 22%, 92px); }
.student-squad-field .student-squad-field-player { font-size: 0.66rem; padding: 3px 1px; }

/* Lizenz kaufen und verwalten (src/app/21-lizenzkauf.js) */
.license-modal { z-index: 1400; }
.license-modal-content { width: min(560px, 94vw); }
.license-modal-content .modal-body { padding: 4px 18px 20px; display: grid; gap: 10px; }
.license-status { margin: 4px 0 0; font-size: 1.05rem; font-weight: 700; }
.license-status.is-expired { color: var(--danger); }
.license-sub { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); display: grid; gap: 6px; }
.license-sub p { margin: 0; }
.license-sub .btn { justify-self: start; }
.license-heading { margin: 8px 0 0; font-size: 1rem; }
.license-offers { display: grid; gap: 8px; }
.license-offer { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 12px 14px; border: 1.5px solid rgba(0, 0, 0, 0.14); border-radius: 14px; background: var(--card); cursor: pointer; }
.license-offer input { grid-row: span 3; width: 20px; height: 20px; margin: 0; }
.license-offer-title { font-weight: 700; }
.license-offer-price { font-weight: 700; white-space: nowrap; }
.license-offer-price small { font-weight: 500; opacity: 0.75; }
.license-offer-note { grid-column: 2 / 4; font-size: 0.86rem; color: var(--muted); }
/* Kennenlernangebot und kleiner Monatsbetrag – werbewirksam hervorgehoben */
.license-offer-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #f2b705; color: #2b2100; font-size: 0.72rem; font-weight: 800; vertical-align: 2px; }
.license-offer-monthly { grid-column: 2 / 4; justify-self: start; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 800; font-size: 0.9rem; }
.license-offer:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.license-offer.is-subscription .license-offer-title::after { content: "★"; margin-left: 6px; color: var(--accent); }
.license-offer.is-unavailable { opacity: 0.55; cursor: not-allowed; }
.license-legal { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; border: 0; }
.license-legal .checkbox-field { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; }
.license-legal input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; }
.license-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.license-notice { min-height: 1.2em; margin: 0; }
.license-new-club-form { display: grid; gap: 8px; }
.license-new-club-form label { display: grid; gap: 4px; }
html[data-theme="dark"] .license-offer { border-color: rgba(255, 255, 255, 0.18); }

/* Vereinslizenzen (Verwaltung) */
.club-licenses { display: grid; gap: 12px; }
.club-license-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.95rem; }
.club-license-summary strong { font-size: 1.15rem; }
.club-license-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.club-license-card { display: grid; gap: 6px; }
.club-license-lines { display: grid; gap: 2px; word-break: break-word; }
.club-license-lines .hint { margin: 0; }
.club-license-chip { border-radius: 999px; padding: 2px 9px; font-size: 0.74rem; font-weight: 700; background: #eef4ef; color: #173d2e; }
.club-license-card.is-assigned .club-license-chip { background: #dff3e6; color: #11633a; }
.club-license-card.is-invited .club-license-chip { background: #eaf5ff; color: #1f3f56; }
.club-license-card.is-invite_expired .club-license-chip, .club-license-card.is-expired .club-license-chip { background: #fdecea; color: #8a1f17; }
.club-license-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.club-license-link { display: grid; gap: 6px; border: 1px dashed #9cb8a4; border-radius: 10px; padding: 10px; }
.club-license-link input { width: 100%; font-size: 0.85rem; }
.club-license-notice { min-height: 1.2em; margin: 0; }
html[data-theme="dark"] .club-license-chip { background: rgba(255, 255, 255, 0.1); color: inherit; }

/* Rollen, Gast/Probetraining, Gruppen eines Vereins, Spielplanimport */
[data-guest-field][hidden], [data-guest-only][hidden], .group-memberships-panel[hidden], .student-group-bar[hidden] { display: none !important; }
.player-guest-group { display: grid; gap: 6px; }
.tenant-guest-fields { display: grid; gap: 8px; }
.player-access-badge.is-guest { background: #fff4d6; color: #7a5300; }
.player-access-badge.is-group { background: #e3eefc; color: #12406f; }
.tenant-role-account-role.is-expired { background: #fde2e2; color: #8a1f1f; }
.group-memberships-panel { border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.group-memberships-panel h3 { margin: 0; font-size: 1rem; }
.group-request-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.group-request-actions { display: flex; gap: 6px; }
.group-membership-list { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; }
.student-group-bar { display: grid; gap: 8px; margin: 0 0 12px; }
.student-group-switch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.student-guest-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff4d6; color: #7a5300; }
.student-group-request { display: grid; gap: 6px; }
.student-group-request[open] { padding-bottom: 6px; }
.student-group-request select, .student-group-request input { margin: 4px 0; max-width: 100%; }
.schedule-import-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.schedule-import-table tr.is-duplicate td { opacity: 0.6; }
.schedule-import-table tr.is-error td { color: #8a1f1f; }
html[data-theme="dark"] .player-access-badge.is-guest, html[data-theme="dark"] .student-guest-note { background: rgba(255, 196, 0, 0.18); color: inherit; }
html[data-theme="dark"] .player-access-badge.is-group { background: rgba(80, 150, 255, 0.2); color: inherit; }
html[data-theme="dark"] .tenant-role-account-role.is-expired { background: rgba(255, 80, 80, 0.2); color: inherit; }