/* ============================================
   CoachFlow – Styles
   Dunkles, sportliches Farbschema
   ============================================ */

:root {
  /* ============================================
     60-30-10 SYSTEM (DHB-inspiriert, Dark Mode)
     ============================================ */
  /* 60% — Haupt-Hintergrund */
  --bg-main:         #0F1115;
  /* 30% — Sidebar, Cards, Modals */
  --bg-card:         #1A1D24;
  /* 10% — Signal-Grün exklusiv für Buttons & aktive Nav */
  --brand-coachflow: #22C55E;

  /* Typo */
  --text-main:       #FFFFFF;
  --text-muted:      #94A3B8;

  /* Tokens (Backward-Compat-Aliase für bestehende Regeln) */
  --bg-base:         var(--bg-main);
  --bg-elevated:     #161922;
  --bg-card-2:       #20242d;  /* leicht heller für Layer-Hierarchie */
  --bg-input:        #11141a;
  --border:          #252a35;
  --border-strong:   #3a4150;

  --text-primary:    var(--text-main);
  --text-secondary:  var(--text-muted);

  --accent:          var(--brand-coachflow);
  --accent-hover:    #16A34A;
  --accent-soft:     rgba(34, 197, 94, 0.12);

  --accent-2:        #16A34A;
  --accent-2-soft:   rgba(22, 163, 74, 0.10);

  --blue:            #5a7a8a;
  --blue-soft:       rgba(90, 122, 138, 0.10);

  /* Layer-spezifische rgba-Hilfen (werden im Light-Mode überschrieben) */
  --overlay-soft:    rgba(255, 255, 255, 0.04);
  --overlay-medium:  rgba(255, 255, 255, 0.08);
  --shadow-card:     0 6px 18px -8px rgba(0, 0, 0, 0.55);

  --danger:          #F87171;
  --warning:         #FACC15;

  /* DHB-Ausbildungsstufen (10% – nur für Badges/Akzente) */
  --dhb-basis:       #4ADE80;
  --dhb-grundlage:   #FACC15;
  --dhb-aufbau1:     #FB923C;
  --dhb-aufbau2:     #D97706;
  --dhb-anschluss:   #F87171;

  /* Layout */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow:    0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 50px rgba(0,0,0,0.55);

  --sidebar-w: 280px;
}

/* ============================================
   LIGHT-MODE — überschreibt nur Farben/Overlays.
   Layout-Variablen (--sidebar-w, --radius-*, --shadow-*)
   bleiben aus :root erhalten.
   ============================================ */
:root[data-theme="light"] {
  --bg-main:         #F5F7FA;
  --bg-card:         #FFFFFF;
  --text-main:       #0F172A;
  --text-muted:      #475569;

  --bg-base:         var(--bg-main);
  --bg-elevated:     #FFFFFF;
  --bg-card-2:       #F1F5F9;
  --bg-input:        #FFFFFF;
  --border:          #E2E8F0;
  --border-strong:   #CBD5E1;

  --text-primary:    var(--text-main);
  --text-secondary:  var(--text-muted);

  --accent-soft:     rgba(34, 197, 94, 0.14);
  --accent-2-soft:   rgba(22, 163, 74, 0.10);
  --blue-soft:       rgba(90, 122, 138, 0.10);

  --overlay-soft:    rgba(15, 23, 42, 0.04);
  --overlay-medium:  rgba(15, 23, 42, 0.07);
  --shadow-card:     0 6px 18px -8px rgba(15, 23, 42, 0.18);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse at 85% 0%, rgba(34, 197, 94, 0.05), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(34, 197, 94, 0.03), transparent 55%),
    var(--bg-main);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================
   Dekorativer Hintergrund (Court-Bögen)
   ============================================ */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-decor-svg {
  width: 100%;
  height: 100%;
}
.decor-arc-1 {
  color: var(--brand-coachflow);
  opacity: 0.10;
  animation: drift-1 14s ease-in-out infinite alternate;
}
.decor-arc-2 {
  color: var(--brand-coachflow);
  opacity: 0.07;
  animation: drift-2 18s ease-in-out infinite alternate;
}
.decor-dots {
  color: var(--text-muted);
  opacity: 0.18;
  fill: currentColor;
}

@keyframes drift-1 {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-30px, 20px) rotate(-3deg); }
}
@keyframes drift-2 {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(40px, -25px) rotate(4deg); }
}

/* Sicherstellen, dass Content über dem Decor liegt */
.auth-section,
.dashboard {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

.hidden { display: none !important; }

/* ============================================
   AUTH
   ============================================ */
.auth-section {
  min-height: 100vh;
  padding: 0;
  background: var(--bg-main);
}

.auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ---------- HERO LINKS ---------- */
.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 60px 56px;
  color: var(--text-main);
  background:
    radial-gradient(circle at 25% 25%, rgba(34, 197, 94, 0.18), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(34, 197, 94, 0.08), transparent 50%),
    linear-gradient(135deg, #11141a 0%, #0a0c10 100%);
}
.auth-hero-arc {
  position: absolute;
  top: -120px;
  right: -160px;
  width: 720px;
  height: 720px;
  color: rgba(34, 197, 94, 0.20);
  animation: drift-1 20s ease-in-out infinite alternate;
  pointer-events: none;
}
.auth-hero-content {
  position: relative;
  max-width: 480px;
  z-index: 1;
}
.auth-brand-light .logo-dot {
  background: var(--brand-coachflow);
  box-shadow: 0 0 16px var(--brand-coachflow), 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.auth-brand-light h1 {
  color: var(--text-main);
  font-size: 28px;
  letter-spacing: -0.01em;
}

/* Auth-Logo (Hero links + Mobile-Card) */
.auth-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
  transition: filter 0.2s ease, transform 0.2s ease;
}
.auth-logo:hover {
  filter: drop-shadow(0 6px 18px rgba(34, 197, 94, 0.35));
}
.auth-logo-sm {
  width: 150px;
  margin-bottom: 6px;
}
.auth-hero-title {
  font-size: 46px;
  line-height: 1.1;
  font-weight: 700;
  margin: 44px 0 18px;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}
.auth-hero-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 440px;
}
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}
.ft-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  color: var(--brand-coachflow);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-hero-footer {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.6);
}

/* ---------- FORM RECHTS ---------- */
.auth-form-side {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-brand-mobile { display: none; }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-brand h1 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

/* Auf Desktop kein doppeltes CoachFlow-Logo in der Card */
@media (min-width: 901px) {
  .auth-brand-mobile { display: none !important; }
  .auth-card { padding-top: 44px; }
}

/* Responsive: ab Tablet stapeln */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero {
    padding: 50px 32px 60px;
    text-align: left;
    min-height: auto;
  }
  .auth-hero-title { font-size: 32px; margin-top: 28px; }
  .auth-hero-arc   { width: 520px; height: 520px; top: -80px; right: -200px; }
  .auth-features   { margin-bottom: 0; }
  .auth-card .auth-brand,
  .auth-card .auth-brand-mobile { display: flex; }
  /* Im Hero den Top-Brand verstecken auf Mobile (Form bringt eigenen) */
  .auth-hero .auth-brand-light { display: none; }
  .auth-card .auth-brand-mobile { margin-bottom: 8px; }
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-coachflow);
  box-shadow: 0 0 12px var(--brand-coachflow), 0 0 0 4px rgba(34, 197, 94, 0.15);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 12px var(--brand-coachflow), 0 0 0 4px rgba(34, 197, 94, 0.15); transform: scale(1); }
  50%      { box-shadow: 0 0 22px var(--brand-coachflow), 0 0 0 8px rgba(34, 197, 94, 0.06); transform: scale(1.1); }
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.auth-actions .btn {
  flex: 1;
}

.auth-message {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-message.error   { color: var(--danger); }
.auth-message.success { color: var(--accent); }

.auth-switch {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  padding: 0 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.signup-only {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ============================================
   FORM ELEMENTE
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

/* Date/Time-Picker: native Icons im Dark-Mode sichtbar machen */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: dark;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) brightness(1.4) saturate(0);
  opacity: 0.85;
  cursor: pointer;
  padding: 4px;
  margin-right: 2px;
  transition: opacity 0.15s, filter 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: invert(0.7) sepia(0.5) saturate(8) hue-rotate(70deg);  /* leichter Grün-Akzent */
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.1s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand-coachflow);
  color: #06120a;
  box-shadow: 0 4px 16px -4px rgba(34, 197, 94, 0.5);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 22px -4px rgba(34, 197, 94, 0.6);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: var(--brand-coachflow);
  color: var(--brand-coachflow);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 4px 0;
}

.brand-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  /* Sanftes Drop-Shadow, damit das Logo auf dem dunklen Sidebar-BG plastisch wirkt */
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  transition: filter 0.2s ease, transform 0.2s ease;
}
.brand-logo:hover {
  filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.25));
  transform: scale(1.02);
}

/* Auf Tablet / Mobile (≤ 960 px) klappt die Sidebar horizontal um – Logo kompakter */
@media (max-width: 960px) {
  .brand {
    margin-bottom: 0;
    justify-content: flex-start;
  }
  .brand-logo {
    width: 140px;
  }
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(96, 165, 250, 0.04));
  border: none;
  border-radius: 14px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s, transform 0.1s;
}
.profile-card:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(96, 165, 250, 0.08));
  transform: translateY(-1px);
}
.profile-card-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 14px;
  transition: transform .15s;
}
.profile-card[aria-expanded="true"] .profile-card-arrow { transform: rotate(180deg); }

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-coachflow), var(--accent-hover));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #06120a;
  flex-shrink: 0;
}

.profile-info { min-width: 0; }

.profile-info h3 {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-license {
  font-size: 12px;
  color: var(--accent);
  margin-top: 2px;
}

.profile-club {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Team-Badge in der Sidebar */
.sidebar-team-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(96, 165, 250, 0.06));
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .05s;
}
.sidebar-team-badge:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(96, 165, 250, 0.10));
}
.sidebar-team-badge:active { transform: scale(0.99); }
.stb-arrow {
  margin-left: auto;
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 700;
}
.sidebar-team-badge:hover .stb-arrow { color: var(--brand-coachflow); }
.stb-icon { font-size: 18px; }
.stb-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.stb-body small { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.stb-body strong {
  color: var(--text-main);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-team-badge.no-team {
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.25);
}
.sidebar-team-badge.no-team strong { color: var(--text-muted); font-style: italic; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, padding-left 0.18s, transform 0.1s;
  position: relative;
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
  width: 22px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s;
}

.nav-label { flex: 1; min-width: 0; }

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding-left: 16px;
}
.nav-item:hover .nav-icon { transform: scale(1.1); }

.nav-item.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  color: var(--brand-coachflow);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25),
              0 4px 12px -6px rgba(34, 197, 94, 0.4);
}
.nav-item.active .nav-icon { transform: scale(1.15); }
.nav-item.active::before { display: none; }

.btn-logout {
  margin-top: auto;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #FCA5A5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.1s;
  font-family: inherit;
}
.btn-logout:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.5);
  color: #FECACA;
}
.btn-logout:active { transform: translateY(1px); }
.btn-logout span { font-size: 16px; }

/* ---------- Main ---------- */
.main-content {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1400px;
  width: 100%;
}

.main-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-header .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

.main-content {
  padding-top: 36px;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
/* Subtiler farbiger Streifen oben in jeder Card */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-coachflow), transparent);
  opacity: 0.4;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 16px;
  margin-bottom: 16px;
}

.card-header .card-title { margin-bottom: 0; }

/* ---------- Cycle Form ---------- */
.cycle-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label,
.form-group .form-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group-color {
  max-width: 120px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- Weekday-Picker ---------- */
.weekday-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.weekday-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.weekday-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.weekday-chip:hover span {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.weekday-chip input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.weekday-chip input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Calendar ---------- */
.calendar-card {
  flex: 1;
  min-height: 400px;
}

.calendar-placeholder {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: rgba(0,0,0,0.15);
}

.calendar-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-sep {
  color: var(--text-muted);
  margin: 0 4px;
  align-self: center;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ---------- Calendar Toolbar ---------- */
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.cal-title {
  min-width: 160px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Calendar Grid ---------- */
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekdays {
  margin-top: 4px;
  margin-bottom: 6px;
}
.calendar-weekdays > div {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 0;
}

.day-cell {
  position: relative;
  min-height: 90px;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
/* Standard-Border für Tage MIT Sessions, neutral blau */
.day-cell.has-sessions {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.05);
}

/* ============================================
   Status-Ampel (überschreibt has-sessions)
   ============================================ */
/* ⚪ GRAU – Training ungeplant (keine Übungen zugewiesen) */
.day-cell.status-empty {
  border: 2px solid rgba(148, 163, 184, 0.55) !important;
  background: rgba(148, 163, 184, 0.08) !important;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.15);
}
/* 🟡 GELB – Trainingsinhalte fehlen (teilweise belegt) */
.day-cell.status-partial {
  border: 2px solid #EAB308 !important;
  background: rgba(234, 179, 8, 0.10) !important;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.18);
}
/* 🟢 GRÜN – Training vollständig geplant */
.day-cell.status-full {
  border: 2px solid #22C55E !important;
  background: rgba(34, 197, 94, 0.10) !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

/* Hover-Effekt bei Status-Cellen nicht überschreiben — nur leicht heben */
.day-cell.status-empty:hover,
.day-cell.status-partial:hover,
.day-cell.status-full:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.day-cell:hover {
  border-color: var(--brand-coachflow);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -8px rgba(34, 197, 94, 0.5);
  background: linear-gradient(180deg, var(--bg-input), rgba(34, 197, 94, 0.04));
}
.day-cell.out-of-month {
  opacity: 0.35;
  cursor: default;
}
.day-cell.out-of-month:hover { transform: none; box-shadow: none; }
/* "Heute"-Marker: nur ein dezenter Punkt + farbige Tageszahl, KEIN Rahmen
   (sonst Verwechslung mit dem grünen Status-vollständig-Rahmen) */
.day-cell.today::after {
  content: "";
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.day-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.day-cell.today .day-number { color: var(--accent); }

.day-sessions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.session-pill {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid var(--accent);
}
.session-pill-empty {
  background: rgba(154, 166, 181, 0.10);
  border-left-color: var(--text-muted);
  font-style: italic;
}
.session-pill-run {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.session-item-run {
  background: rgba(90, 122, 138, 0.04);
}
.badge-run {
  background: rgba(90, 122, 138, 0.14);
  color: #5a7a8a;
  border-color: rgba(90, 122, 138, 0.3);
  font-weight: 600;
}
.btn-active-run {
  background: rgba(90, 122, 138, 0.14);
  border-color: #5a7a8a;
  color: #5a7a8a;
}

/* ============================================
   Trainingsaufbau – 3-Block-System pro Session
   ============================================ */
.session-stufe {
  margin: 14px 0;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
}
.session-stufe label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-coachflow);
  font-weight: 600;
  margin-right: 8px;
}
.session-stufe select {
  display: inline-block;
  width: auto;
  min-width: 200px;
  padding: 6px 10px;
  font-size: 13px;
}

.training-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.training-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  border-left: 3px solid var(--brand-coachflow);
}
/* Farb-Coding der Blöcke:
   Aufwärmen 1+2 → orange · Übung 1+2 → grün · Übung 3 → rot */
.training-block-warmup,
.training-block-warmup_2 { border-left-color: var(--dhb-aufbau1); }
.training-block-focus_1,
.training-block-focus_2  { border-left-color: var(--brand-coachflow); }
.training-block-focus_3  { border-left-color: var(--dhb-anschluss); }

/* Aufwärmen 1 + 2 nebeneinander, ab schmaleren Modals stapelnd */
.warmup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .warmup-row { grid-template-columns: 1fr; }
}

/* Eigene-Übung Quick-Mode: Details optional auf Knopfdruck */
/* Aufwärm-Filter-Tabs im Picker */
.warmup-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.wt-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.wt-tab:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.wt-tab.active {
  background: var(--brand-coachflow);
  color: #06120a;
}

/* Platzhalter-Karte in Übung-Liste */
.pkg-unit-row.placeholder {
  border-style: dashed;
  background: rgba(96, 165, 250, 0.04);
}
.pkg-unit-row.placeholder .pu-text small::before {
  content: "🔲 Platzhalter · ";
  color: var(--blue);
  font-weight: 600;
}
.placeholder-banner {
  margin: 10px 0;
  padding: 12px 14px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px dashed rgba(96, 165, 250, 0.5);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}
.placeholder-banner strong { color: var(--blue); }

/* Wiederholungs-Empfehlung */
.repetitions-hint {
  margin: 10px 0;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid var(--brand-coachflow);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}
.repetitions-hint strong { color: var(--brand-coachflow); }

/* Bild-Upload mit Auto-Komprimierung */
.image-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.image-upload-row input[type="file"] {
  width: auto;
  padding: 4px;
  font-size: 12px;
}
.upload-hint {
  font-size: 10px;
  color: var(--text-muted);
}
.image-preview-mini {
  margin-top: 6px;
}
.image-preview-mini img {
  max-width: 200px;
  max-height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-coachflow);
}
.image-upload-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}
.image-upload-status.busy    { background: rgba(250, 204, 21, 0.10); color: var(--warning); }
.image-upload-status.success { background: rgba(34, 197, 94, 0.10);  color: var(--brand-coachflow); }
.image-upload-status.error   { background: rgba(248, 113, 113, 0.10); color: var(--danger); }

.own-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0;
  list-style: none;
}
.own-details summary::-webkit-details-marker { display: none; }
.own-details[open] summary { color: var(--brand-coachflow); margin-bottom: 8px; }

.block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
/* Minuten-Box ganz nach rechts in die Kopfzeile schieben */
.block-head .block-duration { margin-left: auto; }
.block-icon  { font-size: 18px; }
.block-title { font-weight: 700; font-size: 14px; color: var(--text-main); }
.block-required {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--brand-coachflow);
}
.block-required.optional {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.block-methodik {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.block-label { color: var(--text-muted); }
.block-methodik select {
  width: auto;
  min-width: 160px;
  padding: 5px 8px;
  font-size: 12px;
}
.block-methodik-fixed {
  font-weight: 600;
  color: var(--dhb-grundlage);
  padding: 4px 10px;
  background: rgba(250, 204, 21, 0.10);
  border-radius: 999px;
  font-size: 11px;
}

.block-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  padding: 2px 8px 2px 6px;
}
.block-duration input {
  width: 48px;
  padding: 3px 4px;
  font-size: 12px;
  text-align: right;
  background: transparent;
  border: none;
  color: var(--text-main);
}
.block-duration input:focus { outline: none; }
.block-min {
  font-size: 11px;
  color: var(--text-muted);
}

.session-total {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
}
.session-total strong {
  color: var(--brand-coachflow);
  font-size: 15px;
}
.session-total-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
}
.session-total-warn {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
}
.session-total-warn strong { color: var(--danger); }
.session-total-light {
  background: rgba(250, 204, 21, 0.06);
  border-color: rgba(250, 204, 21, 0.25);
}

.session-hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}
.session-hint strong { color: var(--text-primary); }

/* ============================================
   Choice-Cards (Picker-Einstieg)
   ============================================ */
.choice-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
  margin-bottom: 8px;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.choice-card:hover {
  border-color: var(--brand-coachflow);
  background: rgba(34, 197, 94, 0.05);
  transform: translateY(-1px);
}
.choice-card.choice-own {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.04);
}
.choice-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.choice-body { flex: 1; min-width: 0; }
.choice-body h5 { font-size: 14px; margin: 0 0 2px; color: var(--text-main); }
.choice-body p  { font-size: 12px; color: var(--text-muted); margin: 0; }
.choice-arrow {
  color: var(--text-muted);
  font-size: 20px;
}
.choice-section-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 18px 0 8px;
}

/* Wenn Choice-View aktiv, Grid einspaltig */
.focus-grid:has(.choice-card) {
  grid-template-columns: 1fr;
}

/* ============================================
   Next-Unit-Prompt (Smart-Flow)
   ============================================ */
.next-unit-prompt {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(251, 146, 60, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-lg);
}
.next-unit-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.next-unit-body { flex: 1; }
.next-unit-body h5 {
  font-size: 16px;
  color: var(--brand-coachflow);
  margin: 0 0 6px;
}
.next-unit-body > p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.next-unit-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.next-unit-preview strong { color: var(--text-main); font-size: 13px; }
.next-unit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.next-unit-actions .btn { font-size: 13px; }

/* ============================================
   Pending-Suggestion-Banner (oben im Tagesmodal)
   ============================================ */
.pending-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(34, 197, 94, 0.06));
  border: 1px dashed rgba(96, 165, 250, 0.5);
  border-radius: var(--radius);
}
.pending-icon { font-size: 22px; }
.pending-body { flex: 1; font-size: 13px; color: var(--text-primary); }
.pending-body strong { color: var(--brand-coachflow); }
.pending-body small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.pending-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================
   Schwerpunkt-Zyklen (Outlook-Style)
   ============================================ */
.focus-cycle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0 10px;
}
.focus-cycle-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: rgba(var(--fc-rgb, 59,130,246), 0.10);
  border-left: 4px solid var(--fc-color, #3b82f6);
  border-top: 1px solid rgba(var(--fc-rgb, 59,130,246), 0.30);
  border-right: 1px solid rgba(var(--fc-rgb, 59,130,246), 0.30);
  border-bottom: 1px solid rgba(var(--fc-rgb, 59,130,246), 0.30);
  font-size: 13px;
}
.focus-cycle-bar strong { color: var(--text-main); }
.focus-cycle-bar small { color: var(--text-muted); }
.focus-cycle-bar .fc-foci { display: flex; gap: 4px; flex-wrap: wrap; }
.focus-cycle-bar .fc-foci span {
  background: rgba(var(--fc-rgb, 59,130,246), 0.20);
  color: var(--fc-color, #3b82f6);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.focus-cycle-bar .fc-bar-del {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 6px;
}
.focus-cycle-bar .fc-bar-del:hover { color: var(--danger); }

/* Day-Cells im aktiven Schwerpunktzyklus bekommen eine farbige Top-Linie */
.day-cell.in-focus-cycle::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cell-fc-color, #3b82f6);
}

/* Schwerpunkt-Hinweis im Picker (wenn Tag in Zyklus liegt) */
.fc-suggest-banner {
  margin-bottom: 10px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid var(--brand-coachflow);
  border-radius: 6px;
  font-size: 13px;
}
.fc-suggest-banner strong { color: var(--brand-coachflow); }

/* Modal-Liste der bestehenden Zyklen */
.fc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.fc-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.fc-list-item .fc-swatch {
  width: 12px; height: 12px; border-radius: 3px;
  flex-shrink: 0;
}
.fc-list-item .fc-meta { flex: 1; }
.fc-list-item .fc-meta small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; }

.fc-create > summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
  color: var(--brand-coachflow);
  font-size: 14px;
  list-style: none;
}
.fc-create > summary::-webkit-details-marker { display: none; }

.fc-focus-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fc-focus-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
}
.fc-focus-list label:hover { background: var(--bg-card-2); color: var(--text-primary); }
.fc-focus-list input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand-coachflow);
}

.block-content {
  margin-top: 4px;
}
.block-exercise {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.block-exercise strong {
  font-size: 13px;
  color: var(--text-main);
  flex: 1;
  min-width: 140px;
}
.block-exercise small {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  flex-basis: 100%;
  margin-top: -4px;
}
.btn-pick {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border-style: dashed !important;
}
.btn-sm { padding: 4px 10px !important; font-size: 12px !important; }

.session-item-actions-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================
   Import-Dialog (Paket → Kalender)
   ============================================ */
.import-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.import-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.import-option:hover {
  border-color: var(--brand-coachflow);
}
.import-option input[type="radio"] {
  width: auto;
  margin-top: 2px;
  accent-color: var(--brand-coachflow);
}
.import-option strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.import-option small {
  font-size: 12px;
  color: var(--text-muted);
}
.import-option:has(input:checked) {
  border-color: var(--brand-coachflow);
  background: rgba(34, 197, 94, 0.06);
}

.pkg-card-footer .pkg-import {
  padding: 6px 12px;
  font-size: 13px;
}

/* ============================================
   Picker-Toolbar + Eigene Übung
   ============================================ */
.picker-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.picker-toolbar .inline-field {
  font-size: 12px;
}
.picker-toolbar input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand-coachflow);
}

.own-exercise-form {
  background: var(--bg-card-2);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.own-exercise-form h5 {
  font-size: 15px;
  color: var(--brand-coachflow);
  margin: 0;
}

/* ============================================
   Multi-Select (Kalender)
   ============================================ */
.btn-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Im Select-Mode: Cursor & subtiler Hinweis */
body.select-mode-active .day-cell {
  cursor: copy;
}
body.select-mode-active .day-cell.out-of-month {
  cursor: not-allowed;
}

.day-cell.day-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(168, 127, 83, 0.18), rgba(168, 127, 83, 0.08));
  box-shadow: inset 0 0 0 2px var(--accent),
              0 4px 14px -6px rgba(168, 127, 83, 0.4);
  transform: translateY(-1px);
}
.day-cell.day-selected::before {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fffdf6;
  font-size: 11px;
  font-weight: 700;
}

/* Bulk-Bar fixiert unten */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px 12px 22px;
  background: var(--text-primary);
  color: var(--bg-base);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(42, 34, 26, 0.25);
  animation: barIn 0.22s ease-out;
}
@keyframes barIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.bulk-count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.bulk-actions {
  display: flex;
  gap: 6px;
}
.bulk-bar .btn {
  background: rgba(255, 253, 246, 0.08);
  color: #f5efe2;
  border-color: rgba(255, 253, 246, 0.18);
  padding: 6px 12px;
  font-size: 13px;
}
.bulk-bar .btn:hover {
  background: rgba(255, 253, 246, 0.18);
  border-color: rgba(255, 253, 246, 0.4);
}
.bulk-bar .btn-danger {
  color: #ffb4a8;
  border-color: rgba(255, 180, 168, 0.3);
}
.bulk-bar .btn-danger:hover {
  background: rgba(176, 74, 58, 0.3);
}

@media (max-width: 700px) {
  .bulk-bar {
    left: 12px;
    right: 12px;
    transform: none;
    border-radius: var(--radius);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  @keyframes barIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .day-cell {
    min-height: 64px;
    padding: 5px;
  }
  .session-pill { font-size: 10px; }
  .cal-title { min-width: 120px; font-size: 14px; }
}

/* ============================================
   Tagesübersicht im Modal
   ============================================ */
.modal-content-wide { max-width: 720px; }

.day-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.session-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.session-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.session-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.session-item-actions .btn { padding: 6px 12px; font-size: 13px; }

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.inline-field input {
  width: auto;
  padding: 6px 8px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-success {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.3);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.new-session-details {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.new-session-details > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  padding: 6px 0;
  user-select: none;
  list-style: none;
}
.new-session-details > summary::-webkit-details-marker { display: none; }
.new-session-details[open] > summary { margin-bottom: 10px; }

/* ============================================
   Übungs-Picker (Card-Grid)
   ============================================ */
.exercise-view-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.exercise-view-head h4 { font-size: 16px; }

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.exercise-card {
  text-align: left;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.1s;
}
.exercise-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.ex-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  overflow: hidden;
}
.ex-image img { width: 100%; height: 100%; object-fit: cover; }
.ex-image svg { width: 60%; height: 60%; }

.ex-body { padding: 12px 14px 8px; }
.ex-title { font-size: 14px; margin-bottom: 6px; }
.ex-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.ex-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.ex-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-coachflow), var(--accent-hover));
  color: #06120a;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ex-creator {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.ex-creator strong { font-size: 12px; color: var(--text-primary); }
.ex-creator small  { font-size: 11px; color: var(--accent); }

/* ============================================
   DHB Schwerpunkt-Karten
   ============================================ */
.focus-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.focus-card {
  position: relative;
  text-align: left;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.1s, opacity 0.2s;
}
.focus-card:hover:not(.disabled) {
  border-color: var(--focus-color, var(--accent));
  transform: translateY(-2px);
}
.focus-card.selected {
  border-color: var(--focus-color);
  box-shadow: inset 0 0 0 1px var(--focus-color), 0 4px 14px rgba(0,0,0,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.focus-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: saturate(0.4);
}

.focus-color-bar {
  height: 6px;
  background: var(--focus-color);
}

.focus-body {
  padding: 12px 14px 10px;
  flex: 1;
}
.focus-group-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.focus-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--focus-color);
  font-weight: 600;
}
.focus-check {
  font-size: 14px;
  color: var(--focus-color);
  font-weight: 700;
}
.focus-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
  color: var(--text-primary);
}
.focus-stage {
  font-size: 12px;
  color: var(--text-secondary);
}

.focus-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.badge-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.focus-badge {
  border-width: 1px;
  border-style: solid;
}

/* ============================================
   Trainings-Pakete
   ============================================ */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;   /* Titelblock + Buttons vertikal mittig ausrichten */
  gap: 16px;
  flex-wrap: wrap;
}
.main-header > div:first-child { flex: 1 1 320px; min-width: 0; }
.main-header .subtitle { max-width: 60ch; }
.card-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.pkg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.12s, box-shadow 0.18s;
}

/* Card-Top: prominente Stufen-Anzeige (kein Bild mehr) */
.pkg-card-top {
  padding: 18px 18px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;   /* Stufen-Badge + Owner-Buttons immer in EINER Zeile */
}
.stufen-badge-large {
  font-size: 11px !important;
  padding: 5px 10px !important;
  letter-spacing: 0.03em !important;
  border-width: 1.5px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;        /* erlaubt Schrumpfen, statt Buttons zu verdrängen */
}

.pkg-card-body {
  padding: 14px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pkg-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.pkg-card-head {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pkg-card-title {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.pkg-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pkg-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}
.pkg-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.pkg-card-footer .ex-creator { flex: 1; min-width: 0; }
.pkg-card-footer .pkg-view {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}
.pkg-card-footer .pkg-delete {
  padding: 4px 10px;
  font-size: 12px;
}

/* Neuer Author-Block + getrennte Action-Reihe */
.pkg-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
}
.pkg-card-author:hover {
  background: rgba(34, 197, 94, 0.06);
}
.pkg-card-author .ex-creator { flex: 1; min-width: 0; }
.pkg-card-author::after {
  content: "→";
  color: var(--text-muted);
  font-size: 18px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s;
}
.pkg-card-author:hover::after { opacity: 1; }

/* ============================================
   Trainer-Entdeckung
   ============================================ */
.trainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.trainer-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.trainer-card:hover {
  border-color: var(--brand-coachflow);
  transform: translateY(-2px);
}
.trainer-card .ex-avatar { width: 44px; height: 44px; font-size: 14px; }
.trainer-card-info { flex: 1; min-width: 0; }
.trainer-card-info strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trainer-card-info small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.trainer-card-info .tc-license {
  color: var(--brand-coachflow);
  font-size: 11px;
  font-weight: 600;
}
.trainer-card-count {
  background: var(--bg-card-2);
  color: var(--brand-coachflow);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Trainer-Profil-Header */
.trainer-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.trainer-profile-head .ex-avatar {
  width: 64px;
  height: 64px;
  font-size: 20px;
}
.trainer-profile-head h4 {
  font-size: 18px;
  color: var(--text-main);
  margin: 0 0 4px;
}
.trainer-profile-head p {
  margin: 2px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.trainer-profile-head .tp-license {
  color: var(--brand-coachflow);
  font-weight: 600;
}
.trainer-profile-section-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================
   Trainingssammlung — Editor + Viewer
   ============================================ */
.collection-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  max-height: 50vh;
  overflow-y: auto;
}
.collection-item-edit {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-coachflow);
  border-radius: var(--radius);
  overflow: hidden;
}
.ci-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.15);
  font-size: 13px;
}
.ci-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand-coachflow);
  color: #06120a;
  display: grid; place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.ci-head strong { flex: 1; color: var(--text-main); }
.ci-head small { color: var(--text-muted); }
.ci-actions { display: flex; gap: 4px; }
.ci-actions .btn { padding: 2px 8px; font-size: 12px; }
.ci-body { padding: 10px 14px; }

.cpp-card.disabled { opacity: 0.5; cursor: not-allowed; }

/* Sammlung-Viewer */
.cv-meta { margin-bottom: 18px; }
.cv-meta p { font-size: 13px; color: var(--text-secondary); margin: 4px 0; }
.cv-notes-banner {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(250, 204, 21, 0.10);
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
}
.cv-notes-banner strong { color: var(--warning); }

.cv-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cv-item {
  display: flex;
  gap: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-coachflow);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cv-item-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-coachflow), var(--accent-hover));
  color: #06120a;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.cv-item-body { flex: 1; min-width: 0; }
.cv-item-body h4 { font-size: 15px; color: var(--text-main); margin: 0 0 4px; }
.cv-item-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cv-notes {
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(96, 165, 250, 0.06);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pkg-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 18px 14px;
}
.pkg-card-actions .btn {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 10px;
  text-align: center;
  min-width: 0;          /* erlaubt Schrumpfen ohne Überlappen */
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Bei 3 Buttons (nur „Ansehen" als Primary) Ansehen volle Breite */
.pkg-card-actions .pkg-view {
  grid-column: 1 / -1;
}
/* Wenn auch Bearbeiten + Löschen da sind (eigenes Paket) → Ansehen + Bearbeiten oben, dann Löschen + Importieren */
.pkg-card-actions:has(.pkg-edit) .pkg-view {
  grid-column: auto;
}

/* Bereichs-Badges (alte Pauschal-Tags, falls noch genutzt) */
.bereich-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  border: 1px solid transparent;
}
.bereich-badge.motorik {
  background: rgba(34, 197, 94, 0.12);
  color: #22C55E;
  border-color: rgba(34, 197, 94, 0.35);
}
.bereich-badge.aufbau {
  background: rgba(251, 146, 60, 0.12);
  color: #FB923C;
  border-color: rgba(251, 146, 60, 0.35);
}
.bereich-badge.taktik {
  background: rgba(90, 122, 138, 0.18);
  color: #94A3B8;
  border-color: rgba(148, 163, 184, 0.4);
}

/* SP: Schwerpunkt-Badges (konkret pro Paket-Karte) */
.pkg-card-foci {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 18px 0;
}
.sp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  line-height: 1.2;
}
.sp-badge.sp-motorik {
  background: rgba(34, 197, 94, 0.10);
  color: #4ADE80;
  border-color: rgba(34, 197, 94, 0.30);
}
.sp-badge.sp-aufbau {
  background: rgba(251, 146, 60, 0.10);
  color: #FB923C;
  border-color: rgba(251, 146, 60, 0.30);
}
.sp-badge.sp-taktik {
  background: rgba(96, 165, 250, 0.10);
  color: #93C5FD;
  border-color: rgba(96, 165, 250, 0.30);
}
.sp-badge.sp-more {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.3);
}

/* Filter-Bar im Pakete-Tab */
.pkg-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* Suchfeld nimmt den freien Rest, schrumpft aber bis 180px wenn nötig */
.pkg-filter-bar input[type="search"] {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 320px;
  padding: 8px 12px;
  height: 36px;
}
/* Dropdowns: kompakt, einheitliche Breite */
.pkg-filter-bar select {
  width: 140px;
  min-width: 0;
  flex: 0 0 auto;
  padding: 6px 8px;
  height: 36px;
  font-size: 13px;
}
.pkg-filter-bar .inline-field {
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* Buttons in der Leiste: gleich hoch + nicht schrumpfen */
.pkg-filter-bar .btn,
.pkg-filter-bar .btn-sm {
  padding: 0 12px !important;
  font-size: 13px !important;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.pkg-filter-bar input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand-coachflow);
}

/* Detail-Modal Sections */
.ex-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ex-detail-image {
  margin: 10px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: border-color 0.18s;
}
.ex-detail-image:hover {
  border-color: var(--brand-coachflow);
}
.ex-detail-image img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: contain;
  background: var(--bg-input);
}

/* Lightbox-Overlay zum Vergrößern */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  padding: 30px;
  cursor: zoom-out;
  animation: lightboxIn 0.2s ease-out;
}
@keyframes lightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.image-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.image-lightbox-close {
  position: absolute;
  top: 16px; right: 22px;
  font-size: 30px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ex-detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ex-detail-section h5 {
  font-size: 13px;
  color: var(--brand-coachflow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.ex-detail-section p {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}
.ex-detail-variations {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
}
.ex-detail-variations li {
  margin-bottom: 4px;
}

/* ============================================
   Paket-Units Split-View (Liste links + Detail rechts)
   ============================================ */
.pkg-units-back-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  grid-column: 1 / -1;
}
.pkg-units-back-bar .btn {
  font-size: 11px;
  padding: 4px 10px;
}

.pkg-units-split {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 14px;
  max-height: 62vh;
  grid-column: 1 / -1;
}

/* Liste links */
.pkg-units-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  padding-right: 4px;
}
.pkg-unit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.pkg-unit-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-2);
}
.pkg-unit-row.selected {
  border-color: #FACC15;
  background: rgba(250, 204, 21, 0.08);
  box-shadow: 0 0 12px -4px rgba(250, 204, 21, 0.5);
}
/* Nicht zur aktuellen Methodik passende Übungen leicht abgedimmt */
.pkg-unit-row-dim {
  opacity: 0.6;
}
.pkg-unit-row-dim:hover { opacity: 1; }
.pkg-unit-row-dim.selected { opacity: 1; }

.pu-tag {
  display: inline-block;
  background: rgba(34, 197, 94, 0.16);
  color: var(--brand-coachflow);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}
.pu-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-card-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pkg-unit-row.selected .pu-num {
  background: #FACC15;
  color: #1A1410;
}
.pu-text { flex: 1; min-width: 0; }
.pu-text strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pu-text small {
  font-size: 11px;
  color: var(--text-muted);
}

/* Detail rechts */
.pkg-units-detail {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-y: auto;
}
.pkg-units-detail .detail-h {
  font-size: 16px;
  color: var(--text-main);
  margin: 0 0 8px;
}
.pkg-units-detail .ex-detail-section { margin-top: 12px; padding-top: 10px; }

/* Übernehmen-Button (jetzt nur einer, nicht mehr 2 wie früher) */
.preview-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.preview-actions .btn { width: 100%; padding: 10px; font-size: 14px; }
.preview-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-package-all {
  background: linear-gradient(135deg, var(--brand-coachflow), #16A34A);
  position: relative;
}

/* Prev/Next-Navigation im Detail-Panel */
.pv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.pv-nav .btn { min-width: 110px; }
.pv-nav .btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pv-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Video-Embed */
.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 6px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Auf schmalen Screens stapeln */
@media (max-width: 720px) {
  .pkg-units-split {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

/* Bild-Upload-Vorschau */
.imgs-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
}
.imgs-preview:empty { display: none; }
.imgs-preview-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 11px;
}
.imgs-preview-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.imgs-preview-item .pi-name {
  padding: 6px 8px 2px;
  color: var(--text-muted);
  word-break: break-all;
}
.imgs-preview-item .pi-status {
  padding: 4px 8px 6px;
  font-size: 10px;
  font-weight: 600;
}
.imgs-preview-item.pi-ok      { border-color: var(--brand-coachflow); }
.imgs-preview-item.pi-ok      .pi-status { color: var(--brand-coachflow); }
.imgs-preview-item.pi-warn    { border-color: var(--warning); }
.imgs-preview-item.pi-warn    .pi-status { color: var(--warning); }
.imgs-preview-item.pi-error   { border-color: var(--danger); }
.imgs-preview-item.pi-error   .pi-status { color: var(--danger); }

/* Team-Optionen (Signup) */
.team-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.team-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.team-option input[type="radio"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--brand-coachflow);
}
.team-option > span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.team-option strong { color: var(--text-main); }
.team-option small  { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.team-option:has(input:checked) {
  border-color: var(--brand-coachflow);
  background: rgba(34, 197, 94, 0.06);
}

/* Team-Card im Profil */
.team-card { max-width: 760px; margin-top: 18px; }
.team-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}
.team-row code {
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  user-select: all;
}
.team-row strong { color: var(--brand-coachflow); }
.team-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.team-actions .btn { padding: 8px 14px; font-size: 13px; }
.team-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ============================================
   Hilfe & Glossar
   ============================================ */
.help-card { max-width: 760px; margin-top: 18px; }
.help-card .subtitle { margin-top: -4px; margin-bottom: 18px; }

.help-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.help-block > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.help-block > summary::-webkit-details-marker { display: none; }
.help-block > summary::before {
  content: "▸";
  display: inline-block;
  color: var(--text-muted);
  transition: transform 0.15s;
  margin-right: 4px;
}
.help-block[open] > summary::before {
  transform: rotate(90deg);
  color: var(--brand-coachflow);
}
.help-block > summary:hover { background: var(--bg-card-2); }

.help-content {
  padding: 4px 18px 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.help-content p { margin: 10px 0; }
.help-content ul,
.help-content ol { margin: 10px 0; padding-left: 22px; }
.help-content li { margin-bottom: 6px; }
.help-content strong { color: var(--text-main); }

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}
.help-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.help-table tr:last-child td { border-bottom: none; }
.help-table td:first-child {
  white-space: nowrap;
  color: var(--text-main);
  font-weight: 500;
}

.help-tip {
  margin-top: 14px !important;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.06);
  border-left: 3px solid var(--brand-coachflow);
  border-radius: 4px;
  font-size: 13px;
}

.help-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.help-status-row {
  padding: 10px 14px;
  border: 1.5px solid;
  border-radius: var(--radius);
  font-size: 13px;
}

.help-steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
.help-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
}
.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-coachflow);
  color: #06120a;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

/* ============================================
   DHB Ausbildungs­stufen-Badges (10%-System)
   Nur für kleine Labels / Ränder / Symbole
   ============================================ */
.stufen-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.stufen-badge.basis {
  background: rgba(74, 222, 128, 0.12);
  color: var(--dhb-basis);
  border-color: rgba(74, 222, 128, 0.35);
}
.stufen-badge.grundlage {
  background: rgba(250, 204, 21, 0.12);
  color: var(--dhb-grundlage);
  border-color: rgba(250, 204, 21, 0.35);
}
.stufen-badge.aufbau1 {
  background: rgba(251, 146, 60, 0.12);
  color: var(--dhb-aufbau1);
  border-color: rgba(251, 146, 60, 0.35);
}
.stufen-badge.aufbau2 {
  background: rgba(217, 119, 6, 0.15);
  color: #F59E0B;
  border-color: rgba(217, 119, 6, 0.45);
}
.stufen-badge.anschluss {
  background: rgba(248, 113, 113, 0.12);
  color: var(--dhb-anschluss);
  border-color: rgba(248, 113, 113, 0.40);
}

/* ============================================
   Paket-Editor (großes Modal)
   ============================================ */
.modal-content-xl {
  max-width: 920px;
}
.modal-content-xxl {
  max-width: 1280px;
  width: 95vw;
}
.modal-content-xxl .pkg-units-split {
  max-height: 75vh;
}
.pkg-meta { margin-bottom: 20px; }
.pkg-units .card-header { margin-bottom: 12px; }

.pkg-units-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(0,0,0,0.15);
}

.unit-editor {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.unit-editor > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 14px;
  transition: background 0.15s;
}
.unit-editor > summary::-webkit-details-marker { display: none; }
.unit-editor > summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s;
  color: var(--text-muted);
}
.unit-editor[open] > summary::before {
  transform: rotate(90deg);
  color: var(--accent);
}
.unit-editor > summary:hover { background: var(--bg-elevated); }
.unit-num { font-weight: 600; }
.unit-summary-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: auto;
}

.unit-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.1);
}

.form-group-wide { flex: 2; min-width: 240px; }

.label-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 6px;
}

/* Variationen */
.variations-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.var-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.var-row .var-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.var-row input { flex: 1; }
.var-remove {
  padding: 4px 12px;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.btn-add-variation {
  padding: 6px 12px;
  font-size: 12px;
}

/* ============================================
   Paket-Wizard (Schritt-für-Schritt)
   ============================================ */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.wizard-header h4 {
  font-size: 18px;
  color: var(--brand-coachflow);
  font-weight: 700;
  letter-spacing: -0.005em;
}
.wizard-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.wizard-jump select {
  min-width: 200px;
  padding: 6px 8px;
  font-size: 13px;
}

.wizard-progress {
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-coachflow), var(--accent-hover));
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  transition: width 0.25s ease;
  width: 0%;
}

.unit-editor-static {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.10), 0 12px 32px -16px rgba(34, 197, 94, 0.15);
}

/* Read-only-Inputs lesbar halten */
.unit-editor-static input:disabled,
.unit-editor-static select:disabled,
.unit-editor-static textarea:disabled,
.pkg-meta input:disabled,
.pkg-meta select:disabled,
.pkg-meta textarea:disabled {
  opacity: 1;
  color: var(--text-primary);
  background: var(--bg-input);
  cursor: default;
}
.unit-editor-static .unit-body {
  border-top: none;
  padding: 18px;
  background: transparent;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.wizard-counter {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.wizard-nav .btn { min-width: 180px; }
.wizard-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav .btn { min-width: 0; flex: 1; }
  .wizard-counter { order: -1; flex: 1 0 100%; text-align: center; }
}

/* ============================================
   Profil-View
   ============================================ */
.profile-card-edit { max-width: 760px; }

.profile-edit-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.profile-edit-head h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.avatar-large {
  width: 88px;
  height: 88px;
  font-size: 28px;
  flex-shrink: 0;
}

/* ============================================
   View-Transitions & Micro-Interaktionen
   ============================================ */
.view:not(.hidden) {
  animation: viewFadeIn 0.35s ease-out;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cards leicht anheben beim Mouseover */
.pkg-card,
.exercise-card,
.focus-card {
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.pkg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -10px rgba(0,0,0,0.7),
              0 0 0 1px var(--accent-soft);
  border-color: var(--brand-coachflow);
}
.exercise-card:hover {
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.5),
              0 0 0 1px var(--accent-soft);
}

/* Modal-Auftauchen */
.modal:not(.hidden) .modal-content {
  animation: modalIn 0.22s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Session-Pills "atmen" beim Hover */
.session-pill {
  transition: transform 0.15s, filter 0.15s;
}
.day-cell:hover .session-pill {
  filter: brightness(1.15);
}

/* Wochentag-Chips bekommen Magenta beim Hover (statt nur Grau) */
.weekday-chip:hover span {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.weekday-chip input:checked + span {
  box-shadow: 0 4px 14px -6px var(--accent-soft);
}

/* Sidebar-Profile-Karte: zarter Glanz */
.profile-card {
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(34,197,94,0.05) 100%);
  pointer-events: none;
}

/* Nav-Items: schneller, mit Akzent-Linie */
.nav-item {
  transition: background 0.15s, color 0.15s, padding-left 0.18s;
}
.nav-item:hover {
  padding-left: 16px;
}

/* Main-Header H2 mit Akzent-Underline */
.main-header h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}
.main-header h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Highlight-Buttons: Signal-Grün als zentrale Aktion */
#cal-new-session,
#btn-new-package {
  background: var(--brand-coachflow);
  color: #06120a;
  border: none;
  box-shadow: 0 4px 16px -4px rgba(34, 197, 94, 0.5);
}
#cal-new-session:hover,
#btn-new-package:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -4px rgba(34, 197, 94, 0.6);
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
  }

  .brand { order: 1; }
  .profile-card { order: 2; flex: 1; min-width: 220px; }
  .sidebar-nav {
    order: 3;
    flex-direction: row;
    flex: 1;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav-item {
    padding: 8px 12px;
    font-size: 13px;
  }
  .nav-item:hover { padding-left: 12px; }
  .btn-logout {
    order: 4;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
  }

  .main-content {
    padding: 24px 20px;
  }
}

@media (max-width: 560px) {
  .main-content { padding: 18px 14px; }
  .card { padding: 18px; }
  .main-header h2 { font-size: 20px; }

  .weekday-chip span {
    min-width: 42px;
    padding: 8px 10px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .sidebar-nav { display: none; } /* Optional: später Burger-Menü */
}

/* ============================================
   Day-Picker (Übung -> Trainingstag)
   ============================================ */
.dp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.dp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, transform .05s;
}
.dp-row:hover { background: rgba(255,255,255,0.08); border-color: rgba(148,163,184,0.5); }
.dp-row:active { transform: scale(0.997); }
.dp-row-full { opacity: 0.6; cursor: not-allowed; }
.dp-row-full:hover { background: rgba(255,255,255,0.03); }
.dp-row-main strong { display: block; font-size: 15px; }
.dp-row-main small  { color: var(--text-muted); }
.dp-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.dp-pill-free { background: rgba(34,197,94,0.15); color: #22c55e; }
.dp-pill-full { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ============================================
   Day-Picker Kalender-Grid
   ============================================ */
.dp-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 6px 2px 12px;
}
.dp-cal-title { font-weight: 700; font-size: 16px; text-transform: capitalize; }
.dp-cal-nav { min-width: 36px; }
.dp-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-align: center;
}
.dp-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.dp-cal-cell {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  min-height: 64px; padding: 6px 8px;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  color: inherit; font: inherit; text-align: left;
  cursor: pointer; overflow: hidden;
  transition: background .12s, border-color .12s, transform .05s;
}
.dp-cal-cell:hover:not(.dp-cal-empty):not(.dp-cal-full) {
  background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.5);
}
.dp-cal-cell:active:not(.dp-cal-empty):not(.dp-cal-full) { transform: scale(0.985); }
.dp-cal-empty { background: transparent; border-color: rgba(148,163,184,0.08); cursor: default; }
.dp-cal-empty .dp-cal-num { color: rgba(148,163,184,0.45); }
.dp-cal-full { opacity: 0.55; cursor: not-allowed; border-color: rgba(239,68,68,0.35); }
.dp-cal-free { border-color: rgba(34,197,94,0.45); }
.dp-cal-num { font-weight: 700; font-size: 14px; }
.dp-cal-time { font-size: 11px; color: var(--text-muted); }
.dp-cal-state {
  align-self: stretch; text-align: right;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.dp-cal-free .dp-cal-state { color: #22c55e; }
.dp-cal-full .dp-cal-state { color: #ef4444; }
.dp-cal-legend {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 14px; font-size: 12px; color: var(--text-muted);
}
.dp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 4px; vertical-align: middle; }
.dp-dot-free { background: #22c55e; }
.dp-dot-full { background: #ef4444; }
.modal-content-md { max-width: 560px; }

/* Klickbarer "Aus Paket: ..." Link */
.ex-pkg-link {
  color: var(--brand-coachflow, #22c55e);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ex-pkg-link:hover { filter: brightness(1.2); }

/* ============================================
   Source-Picker (woher soll die Übung kommen?)
   ============================================ */
.sp-options {
  display: flex; flex-direction: column; gap: 10px;
  margin: 10px 0 4px;
}
.sp-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
}
.sp-option:hover {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.5);
}
.sp-option:active { transform: scale(0.99); }
.sp-option-icon { font-size: 26px; flex: 0 0 32px; text-align: center; }
.sp-option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sp-option-body strong { font-size: 15px; }
.sp-option-body small { color: var(--text-muted); font-size: 12px; }
.sp-option-arrow { color: var(--text-muted); font-size: 22px; font-weight: 700; }

/* ============================================
   Auswahl-Modus Banner (fixed top)
   ============================================ */
.select-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(34,197,94,0.95), rgba(22,163,74,0.95));
  color: #06231b;
  font-weight: 700;
  box-shadow: 0 6px 18px -4px rgba(0,0,0,0.4);
  animation: select-banner-in .18s ease-out;
}
.select-banner.hidden { display: none; }
.select-banner .btn { background: rgba(255,255,255,0.25); color: #06231b; }
.select-banner .btn:hover { background: rgba(255,255,255,0.4); }
@keyframes select-banner-in { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ============================================
   Theme-Auswahl Zeile (Profil-Seite)
   ============================================ */
.theme-card { max-width: 760px; margin-top: 18px; }
.theme-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 6px 2px;
}
.theme-row-info { display: flex; flex-direction: column; gap: 2px; }
.theme-row-info strong { font-size: 15px; }
.theme-row-info small  { color: var(--text-muted); font-size: 12.5px; }
.theme-toggle-icon { font-size: 16px; margin-right: 6px; }
#btn-theme-toggle { min-width: 130px; }

/* ============================================
   Light-Mode Overrides für Stellen mit
   hartkodierten rgba(255,255,255,...) Werten
   ============================================ */
:root[data-theme="light"] .dp-row,
:root[data-theme="light"] .dp-cal-cell,
:root[data-theme="light"] .sp-option {
  background: var(--overlay-soft);
}
:root[data-theme="light"] .dp-row:hover,
:root[data-theme="light"] .sp-option:hover {
  background: var(--accent-soft);
}
:root[data-theme="light"] .dp-cal-cell:hover:not(.dp-cal-empty):not(.dp-cal-full) {
  background: rgba(34, 197, 94, 0.14);
}
:root[data-theme="light"] .dp-cal-empty {
  background: transparent;
}
/* Banner für Auswahlmodus bleibt grün — Text dunkler im Light-Mode */
:root[data-theme="light"] .select-banner { color: #06231b; }

/* Auth-Section Hintergrund weicher im Light-Mode */
:root[data-theme="light"] body {
  background: var(--bg-main);
}

/* Tabellen / Cards generisch */
:root[data-theme="light"] .card,
:root[data-theme="light"] .modal-content {
  box-shadow: var(--shadow-card);
}

/* Status-Ampel im Light-Mode etwas kräftiger */
:root[data-theme="light"] .day-cell.status-empty {
  background: rgba(148, 163, 184, 0.15) !important;
}
:root[data-theme="light"] .day-cell.status-partial {
  background: rgba(234, 179, 8, 0.18) !important;
}
:root[data-theme="light"] .day-cell.status-full {
  background: rgba(34, 197, 94, 0.18) !important;
}

/* ============================================
   Laufeinheit – Notizen
   ============================================ */
.run-notes-wrap {
  margin: 10px 0 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.run-notes-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.run-notes {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
}
.run-notes:focus { outline: 1px solid var(--brand-coachflow); border-color: var(--brand-coachflow); }

/* ============================================
   App-Confirm-Dialog
   ============================================ */
.modal-content-sm { max-width: 440px; }
.confirm-message  { font-size: 15px; line-height: 1.5; margin: 4px 2px 18px; }
#confirm-ok.btn-danger {
  background: #ef4444; border-color: #dc2626;
}
#confirm-ok.btn-danger:hover { background: #dc2626; }

/* ============================================
   Aktiver Filter-Chip (z.B. Trainer-Filter)
   ============================================ */
.filter-chip-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  font-size: 14px;
}
.filter-chip-bar.hidden { display: none; }
.filter-chip-icon { font-size: 16px; }
.filter-chip-label { font-weight: 600; }
.filter-chip-author { color: var(--brand-coachflow); }
.filter-chip-clear {
  margin-left: auto;
  padding: 4px 12px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.filter-chip-clear:hover { background: var(--overlay-medium); border-color: var(--brand-coachflow); }

/* ============================================
   Toggle-Buttons in der Filterleiste (z.B. "Nur meine …")
   ============================================ */
.pkg-filter-bar .btn-toggle.is-active {
  background: rgba(34, 197, 94, 0.18);
  color: var(--brand-coachflow);
  border-color: var(--brand-coachflow);
  font-weight: 700;
}
.pkg-filter-bar .btn-toggle.is-active:hover {
  background: rgba(34, 197, 94, 0.28);
}

/* ============================================
   Profil-Dropdown (in Sidebar)
   ============================================ */
.profile-card-wrap { position: relative; }
.profile-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 50;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.5);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.profile-dropdown.hidden { display: none; }
.profile-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-primary);
  font: inherit; font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.profile-dropdown-item:hover { background: var(--overlay-medium); color: var(--brand-coachflow); }
.profile-dropdown-item span { font-size: 16px; }

/* ============================================
   Karten-Action-Buttons (Like, Report, Edit, Delete)
   Moderne Icon-Buttons mit weichem Hover
   ============================================ */
.pkg-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.card-import-btn {
  width: 100%;
  justify-content: center;
}
/* Zweireihige Karten-Aktionen */
.pkg-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkg-card-actions-row2 {
  display: flex;
  align-items: center;
  justify-content: center;       /* alle Icons als Cluster zentriert */
  gap: 12px;                     /* sichtbarer Spalt zwischen Left- und Right-Gruppe */
  flex-wrap: wrap;
}
.card-actions-left, .card-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--overlay-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.card-icon-btn:hover {
  background: var(--overlay-medium);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.card-icon-btn:active { transform: translateY(0); }
.card-icon-btn .like-icon { font-size: 14px; }
.card-icon-btn .like-count {
  font-size: 12.5px;
  font-weight: 700;
}
.card-like-btn:hover {
  background: rgba(34, 197, 94, 0.14);
  border-color: var(--brand-coachflow);
  color: var(--brand-coachflow);
}
.card-report-btn:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: #ef4444;
  color: #ef4444;
}
.card-icon-btn-danger:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: #ef4444;
  color: #ef4444;
}

/* ============================================
   Header-Actions Container (für Buttons rechts im Header)
   ============================================ */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;          /* Button-Gruppe immer rechts (wie bei den anderen Reitern) */
  justify-content: flex-end;
}
/* ===========================================
   CoachFlow – Layout-Fix für Aufwärmen 1 & 2 nebeneinander
   =========================================== */

.warmup-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

/* "> .training-block" = alle direkten Block-Kinder der Reihe */
.warmup-row > .training-block {
  flex: 1 1 0;     /* beide gleich breit, teilen sich den Platz */
  min-width: 0;    /* erlaubt Schrumpfen, verhindert Überlauf/Scrollen */
}

/* Wizard-Header: Button + Jump-Select nebeneinander */
.wizard-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   Lucide Vektor-Icons
   ============================================ */
.choice-icon svg, .block-icon svg, .pkg-card-actions svg, .filter-chip-icon svg,
.next-unit-icon svg, .pending-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--brand-coachflow);
  stroke-width: 2;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}
/* Für kleinere Buttons im Grid */
.card-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  stroke-width: 2;
}
/* Like/Report behalten ihre Hover-Farben (siehe card-like/report) */
.card-like-btn:hover svg  { stroke: var(--brand-coachflow); }
.card-report-btn:hover svg,
.card-icon-btn-danger:hover svg { stroke: #ef4444; }
/* Import-Button (primär, grün) – Icon weiß lassen */
.card-import-btn svg, .btn-primary svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 2; fill: none;
  display: inline-block; vertical-align: middle; margin-right: 2px;
}
/* Icons in Ghost-Buttons folgen der Textfarbe */
.btn-ghost svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 2; fill: none;
  display: inline-block; vertical-align: middle;
}

/* Lucide-Icons in Sidebar-Nav + Logout */
.nav-icon svg {
  width: 18px; height: 18px;
  stroke-width: 2; fill: none;
  vertical-align: middle;
}
.btn-logout svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 2; fill: none;
  vertical-align: middle; margin-right: 4px;
}

/* Lucide-Icons im Source-Picker (große Auswahl-Kacheln) */
.sp-option-icon svg {
  width: 26px; height: 26px;
  stroke: var(--brand-coachflow); stroke-width: 2; fill: none;
  vertical-align: middle;
}

/* Eigentümer-Aktionen (Bearbeiten/Löschen) oben rechts in der Karte */
.pkg-card-owner-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}
.pkg-card-owner-actions .card-icon-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
}

/* SVG in Badges erbt die Badge-Textfarbe */
.stufen-badge svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2; fill: none;
  vertical-align: -2px; margin-right: 2px;
}

/* Aktives-Team-Badge Icon */
.stb-icon svg {
  width: 20px; height: 20px;
  stroke: var(--brand-coachflow); stroke-width: 2; fill: none;
  vertical-align: middle;
}

/* Lucide-Icons in Hilfe-Summaries */
.help-block summary svg {
  width: 18px; height: 18px;
  stroke: var(--brand-coachflow); stroke-width: 2; fill: none;
  vertical-align: -3px; margin-right: 4px;
}
/* Toggle-Button Icons (Nur meine / Trainer entdecken) */
.btn-toggle svg, #btn-discover-trainers svg,
#btn-discover-trainers-ex svg, #btn-discover-trainers-col svg {
  width: 15px; height: 15px;
  stroke: currentColor; stroke-width: 2; fill: none;
  vertical-align: -2px; margin-right: 3px;
}

/* Lucide-Icon in Kalender-Pille (Laufeinheit) */
.session-pill svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  vertical-align: -1px;
}

/* Lucide-Icons in Card-Titeln (Team-Seite etc.) */
.card-title svg {
  width: 18px; height: 18px;
  stroke: var(--brand-coachflow); stroke-width: 2; fill: none;
  vertical-align: -3px; margin-right: 4px;
}
/* Kopieren-/Team-Buttons Icons folgen Textfarbe */
.team-row .btn svg, .team-actions .btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2; fill: none;
  vertical-align: -2px; margin-right: 3px;
}

/* Lucide-Icons in Modal-Überschriften */
.modal-header h3 svg {
  width: 18px; height: 18px;
  stroke: var(--brand-coachflow); stroke-width: 2; fill: none;
  vertical-align: -3px; margin-right: 4px;
}

/* ============================================================
   ▓▓▓  PRO-UI LAYER (SaaS-Polish, Dark Mode)  ▓▓▓
   Schichtung · Tiefe · Micro-Interactions · Glassmorphism
   Wird als letzter Layer geladen → überschreibt alles oben.
   ============================================================ */
:root {
  /* RGB-Variante der Brand-Farbe für rgba()-Glows */
  --brand-coachflow-rgb: 34, 197, 94;

  /* Edle Dark-Palette: tiefes Anthrazit + leicht hellere Karten */
  --pro-bg-app:        #0B0F19;   /* App-Background */
  --pro-bg-surface:    #11162A;   /* Sidebar / Header */
  --pro-bg-card:       #161D30;   /* Karten, Cells */
  --pro-bg-card-hi:    #1B2238;   /* Hover-Layer */
  --pro-bg-input:      #0E1424;

  /* Hauchdünne Hairlines statt harter Borders */
  --pro-hairline:      rgba(255, 255, 255, 0.05);
  --pro-hairline-hi:   rgba(255, 255, 255, 0.09);

  /* Tiefen-Schatten + Brand-Glow */
  --pro-shadow-card:   0 1px 0 rgba(255,255,255,0.03) inset,
                       0 8px 24px -12px rgba(0, 0, 0, 0.55);
  --pro-shadow-hover:  0 1px 0 rgba(255,255,255,0.05) inset,
                       0 14px 32px -14px rgba(0, 0, 0, 0.65),
                       0 0 15px rgba(var(--brand-coachflow-rgb), 0.10);
  --pro-glow-focus:    0 0 0 3px rgba(var(--brand-coachflow-rgb), 0.18);

  /* Glas für Modals & Sidebar */
  --pro-glass-bg:      rgba(22, 29, 48, 0.75);
  --pro-glass-border:  rgba(255, 255, 255, 0.07);

  /* Easing */
  --pro-ease:          cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 1) Globales Reset auf neue Palette + Typo ---------- */
html, body {
  background: var(--pro-bg-app) !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

/* Token-Aliase auf neue Palette mappen → alle bestehenden Regeln
   (die var(--bg-base), var(--bg-card) usw. nutzen) profitieren automatisch. */
:root {
  --bg-main:       var(--pro-bg-app);
  --bg-base:       var(--pro-bg-app);
  --bg-card:       var(--pro-bg-card);
  --bg-elevated:   var(--pro-bg-card);
  --bg-card-2:     var(--pro-bg-card-hi);
  --bg-input:      var(--pro-bg-input);
  --border:        var(--pro-hairline);
  --border-strong: var(--pro-hairline-hi);
  --shadow-card:   var(--pro-shadow-card);
}

/* Headings: feinere Letter-Spacing + Inter-Tightness */
h1, h2, h3, h4, h5, .card-title, .modal-header h3 {
  font-family: "Inter", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h1 { font-weight: 700; }

/* ---------- 2) Karten – Schichtung + Hover-Lift + Brand-Glow ---------- */
.pkg-card,
.exercise-card,
.day-cell,
.collection-card,
.team-card,
.card {
  background: var(--pro-bg-card);
  border: 1px solid var(--pro-hairline);
  border-radius: 14px;
  box-shadow: var(--pro-shadow-card);
  transition: transform 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              border-color 0.2s var(--pro-ease),
              background 0.2s var(--pro-ease);
  will-change: transform;
}

.pkg-card:hover,
.exercise-card:hover,
.collection-card:hover,
.team-card:hover {
  transform: translateY(-3px);
  background: var(--pro-bg-card-hi);
  border-color: var(--pro-hairline-hi);
  box-shadow: var(--pro-shadow-hover);
}

/* Kalender-Zellen: dezenter heben (kein 3-px-Bounce in Tabellen-Grid) */
.day-cell:hover {
  transform: translateY(-2px);
  border-color: var(--pro-hairline-hi);
  box-shadow: var(--pro-shadow-hover);
}
.day-cell.out-of-month {
  background: transparent;
  border-color: transparent;
}
.day-cell.out-of-month:hover { transform: none; box-shadow: none; }

/* ---------- 3) Symmetrisches Grid – gleiche Karten-Höhen ---------- */
.pkg-card,
.exercise-card,
.collection-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 22px 22px 18px;
  gap: 10px;
}

.pkg-card-body,
.exercise-card-body,
.collection-card-body {
  flex: 1 1 auto;
  min-height: 0;
}

/* Description-Truncate (3 Zeilen) → kein „welliges" Layout */
.pkg-card-desc,
.exercise-card-desc,
.collection-card-desc,
.ex-description,
.pkg-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Titel werden vollstaendig angezeigt (kein Line-Clamp, wrappt nach Bedarf) */
.pkg-card-title,
.exercise-card-title,
.collection-card-title {
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Quell-Paket-Titel oberhalb der Übungs-Überschrift (Übungssammlung) */
.pkg-card-source {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.8;
}

/* Methodik / Kategorie fett unter dem Titel — in Brand-Grün abgesetzt */
.pkg-card-category {
  font-size: 13px;
  color: var(--brand-coachflow, #22C55E);
  margin: 0;
  letter-spacing: 0.01em;
}
.pkg-card-category strong {
  font-weight: 700;
}
/* Light-Mode: dunkleres Gruen damit es auf weiss lesbar bleibt */
html[data-theme="light"] .pkg-card-category {
  color: #15803D;
}

/* Footer immer am unteren Rand der Karte */
.pkg-card-footer,
.exercise-card-footer,
.collection-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--pro-hairline);
}

/* Grids: gleichmäßige Spalten, einheitlicher Stretch */
.pkg-grid,
.exercises-grid,
.collections-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.pkg-grid > *,
.exercises-grid > *,
.collections-grid > *,
.cards-grid > * { height: 100%; }

/* ---------- 4) Buttons – ruhige Hover-Transitions + Brand-Glow ---------- */
.btn, button.btn, .icon-btn, .pkg-import, .pkg-view, .pkg-delete {
  transition: transform 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              background-color 0.2s var(--pro-ease),
              border-color 0.2s var(--pro-ease),
              color 0.2s var(--pro-ease);
}
.btn:hover, button.btn:hover { transform: translateY(-1px); }
.btn:active, button.btn:active { transform: translateY(0); }
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--pro-glow-focus);
}

/* Primär-Button (Brand) – softer Glow im Hover */
.btn-primary:hover,
.btn.primary:hover {
  box-shadow: 0 8px 24px -10px rgba(var(--brand-coachflow-rgb), 0.55),
              0 0 18px rgba(var(--brand-coachflow-rgb), 0.20);
}

/* ---------- 5) Modals – Glasmorphism ---------- */
.modal { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-content,
#session-modal .modal-content,
.modal-content-xl,
.modal-content-xxl,
.modal-content-wide,
.modal-content-md,
.modal-content-sm {
  background: var(--pro-glass-bg);
  border: 1px solid var(--pro-glass-border);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -20px rgba(0,0,0,0.7);
}

/* Modal-Header / Footer: feine Hairline statt harter Linie */
.modal-header,
.modal-footer {
  border-color: var(--pro-hairline) !important;
}

/* ---------- 6) Sidebar – Glas-Effekt + Hairline ---------- */
.sidebar {
  background: var(--pro-glass-bg);
  border-right: 1px solid var(--pro-hairline);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.sidebar .nav-item,
.sidebar a.nav-link {
  transition: background 0.2s var(--pro-ease), color 0.2s var(--pro-ease);
}
.sidebar .nav-item:hover,
.sidebar a.nav-link:hover {
  background: rgba(255,255,255,0.04);
}

/* ---------- 7) Trainingsblöcke / Sessions – mehr „atmen" ---------- */
.session-card,
.training-block,
.unit-editor,
.pkg-units-container .unit-editor {
  padding: 18px 20px;
  border-radius: 12px;
  border-color: var(--pro-hairline) !important;
}
.session-card + .session-card,
.training-block + .training-block { margin-top: 14px; }

/* ---------- 8) DHB-Stufen-Badges – softer & runder ---------- */
.stufen-badge,
.stufen-badge-large,
.bereich-badge,
.sp-badge,
.badge,
.focus-badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border: 1px solid transparent;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Aggressivität rausnehmen: soft-tinted Background, kein harter Border */
.stufen-badge.basis {
  background: rgba(74, 222, 128, 0.10);
  color: #86EFAC;
  border-color: rgba(74, 222, 128, 0.18);
}
.stufen-badge.grundlage {
  background: rgba(250, 204, 21, 0.10);
  color: #FDE68A;
  border-color: rgba(250, 204, 21, 0.18);
}
.stufen-badge.aufbau1 {
  background: rgba(251, 146, 60, 0.10);
  color: #FDBA74;
  border-color: rgba(251, 146, 60, 0.20);
}
.stufen-badge.aufbau2 {
  background: rgba(217, 119, 6, 0.12);
  color: #FCD34D;
  border-color: rgba(217, 119, 6, 0.22);
}
.stufen-badge.anschluss {
  background: rgba(248, 113, 113, 0.10);
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.22);
}

/* Bereich-Badges (Motorik/Aufbau/Taktik) ebenfalls softer */
.bereich-badge.motorik,  .sp-badge.sp-motorik {
  background: rgba(96, 165, 250, 0.10); color: #93C5FD;
  border-color: rgba(96, 165, 250, 0.20);
}
.bereich-badge.aufbau,   .sp-badge.sp-aufbau {
  background: rgba(167, 139, 250, 0.10); color: #C4B5FD;
  border-color: rgba(167, 139, 250, 0.20);
}
.bereich-badge.taktik,   .sp-badge.sp-taktik {
  background: rgba(var(--brand-coachflow-rgb), 0.10);
  color: #86EFAC;
  border-color: rgba(var(--brand-coachflow-rgb), 0.22);
}

/* ---------- 9) Inputs – ruhiger, feiner Focus-Ring ---------- */
input, select, textarea {
  background: var(--pro-bg-input);
  border: 1px solid var(--pro-hairline);
  border-radius: 10px;
  transition: border-color 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              background 0.2s var(--pro-ease);
}
input:hover, select:hover, textarea:hover {
  border-color: var(--pro-hairline-hi);
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(var(--brand-coachflow-rgb), 0.55);
  box-shadow: var(--pro-glow-focus);
  outline: none;
}

/* ---------- 10) Scrollbars – dezent ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--brand-coachflow-rgb), 0.35);
  background-clip: padding-box;
}

/* ---------- 11) Reduced Motion respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .pkg-card:hover, .exercise-card:hover, .collection-card:hover,
  .team-card:hover, .day-cell:hover { transform: none; }
}

/* ---------- 12) Light-Mode – Glas anders mischen ---------- */
:root[data-theme="light"] {
  --pro-bg-app:      #F5F7FA;
  --pro-bg-surface:  #FFFFFF;
  --pro-bg-card:     #FFFFFF;
  --pro-bg-card-hi:  #F8FAFC;
  --pro-bg-input:    #FFFFFF;
  --pro-hairline:    rgba(15, 23, 42, 0.06);
  --pro-hairline-hi: rgba(15, 23, 42, 0.10);
  --pro-glass-bg:    rgba(255, 255, 255, 0.75);
  --pro-glass-border:rgba(15, 23, 42, 0.08);
  --pro-shadow-card: 0 1px 0 rgba(255,255,255,0.6) inset,
                     0 8px 24px -14px rgba(15, 23, 42, 0.18);
  --pro-shadow-hover:0 1px 0 rgba(255,255,255,0.8) inset,
                     0 14px 32px -16px rgba(15, 23, 42, 0.22),
                     0 0 15px rgba(var(--brand-coachflow-rgb), 0.12);
}
/* ============================================================
   ▓▓▓  /PRO-UI LAYER  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  LIGHT-THEME POLISH  ▓▓▓
   Augenschonende Schichtung + AAA-taugliche DHB-Kontraste.
   Lädt NACH allem oben → gewinnt die Kaskade.
   ============================================================ */
html[data-theme="light"],
:root[data-theme="light"] {

  /* ---- 1) Hintergrund-Schichtung (kein Pure-White) ---------- */
  --pro-bg-app:        #F4F6F9;   /* App – kühles, abgetöntes Hellgrau */
  --pro-bg-surface:    #FFFFFF;
  --pro-bg-card:       #FFFFFF;   /* Karten „schweben" weiß */
  --pro-bg-card-hi:    #F8FAFC;   /* Hover-Layer */
  --pro-bg-input:      #FFFFFF;
  --pro-bg-sidebar:    #E2E8F0;   /* Sidebar 1 Stufe dunkler als Karten */

  /* Bestehende Token-Aliase mappen → wirkt automatisch in allen
     bereits geschriebenen Regeln (var(--bg-main) etc.) */
  --bg-main:           var(--pro-bg-app);
  --bg-base:           var(--pro-bg-app);
  --bg-card:           var(--pro-bg-card);
  --bg-elevated:       var(--pro-bg-card);
  --bg-card-2:         var(--pro-bg-card-hi);
  --bg-input:          var(--pro-bg-input);

  /* Hairlines deutlich sichtbarer als im Dark-Mode (weiße Flächen
     brauchen mehr Kontrast, damit Karten Kanten zeigen) */
  --pro-hairline:      rgba(15, 23, 42, 0.08);
  --pro-hairline-hi:   rgba(15, 23, 42, 0.14);
  --border:            var(--pro-hairline);
  --border-strong:     var(--pro-hairline-hi);

  /* ---- 2) Text-Kontrast (kein Pure-Black) ----------------- */
  --text-main:         #0F172A;   /* Tiefes Slate-Dunkelblau */
  --text-muted:        #475569;   /* Lesbares Graublau für Meta */
  --text-primary:      var(--text-main);
  --text-secondary:    var(--text-muted);

  /* Glas / Shadows für hellen Hintergrund */
  --pro-glass-bg:      rgba(255, 255, 255, 0.78);
  --pro-glass-border:  rgba(15, 23, 42, 0.08);
  --pro-shadow-card:   0 1px 2px rgba(15, 23, 42, 0.04),
                       0 8px 20px -14px rgba(15, 23, 42, 0.18);
  --pro-shadow-hover:  0 1px 2px rgba(15, 23, 42, 0.06),
                       0 14px 30px -16px rgba(15, 23, 42, 0.22),
                       0 0 14px rgba(var(--brand-coachflow-rgb), 0.14);

  /* ---- 3) DHB Kontrast-Booster ---------------------------- */
  /* Aufbautraining – Orange (#F59E0B war auf weiß unleserlich) */
  --dhb-aufbau-core:   #B45309;   /* sattes Bernstein – AAA auf weiß */
  --dhb-aufbau-bg:     #FEF3C7;   /* warmer Soft-Tone */
  --dhb-aufbau-bd:     #FCD34D;   /* feiner, sichtbarer Border */

  /* Taktik – Blau */
  --dhb-taktik-core:   #1D4ED8;
  --dhb-taktik-bg:     #DBEAFE;
  --dhb-taktik-bd:     #93C5FD;

  /* Motorik / Athletik – Grün */
  --dhb-motorik-core:  #15803D;
  --dhb-motorik-bg:    #DCFCE7;
  --dhb-motorik-bd:    #86EFAC;

  /* Basis / Grundlage / Anschluss – analog auf hellem Grund */
  --dhb-basis-core:    #15803D;
  --dhb-basis-bg:      #DCFCE7;
  --dhb-basis-bd:      #86EFAC;

  --dhb-grundlage-core:#A16207;   /* tiefes Goldgelb */
  --dhb-grundlage-bg:  #FEF9C3;
  --dhb-grundlage-bd:  #FDE68A;

  --dhb-anschluss-core:#B91C1C;   /* tiefes Rot */
  --dhb-anschluss-bg:  #FEE2E2;
  --dhb-anschluss-bd:  #FCA5A5;

  /* Brand-Farbe minimal abdunkeln für besseren Kontrast auf weiß */
  --accent-soft:       rgba(21, 128, 61, 0.10);
}

/* ============================================================
   Body / App-Container
   ============================================================ */
html[data-theme="light"] body {
  background: var(--pro-bg-app) !important;
  color: var(--text-main);
}

/* ============================================================
   Sidebar – eine Nuance dunkler als die Karten
   ============================================================ */
html[data-theme="light"] .sidebar {
  background: var(--pro-bg-sidebar);
  border-right: 1px solid var(--pro-hairline-hi);
  backdrop-filter: none;            /* auf hellem Grund kein Glas-Effekt */
  -webkit-backdrop-filter: none;
}
html[data-theme="light"] .sidebar .nav-item:hover,
html[data-theme="light"] .sidebar a.nav-link:hover {
  background: rgba(15, 23, 42, 0.05);
}
html[data-theme="light"] .sidebar a.nav-link.active,
html[data-theme="light"] .sidebar .nav-item.active {
  background: #FFFFFF;
  color: var(--text-main);
}

/* ============================================================
   Karten – sauberes Weiß über grauem Grund
   ============================================================ */
html[data-theme="light"] .pkg-card,
html[data-theme="light"] .exercise-card,
html[data-theme="light"] .day-cell,
html[data-theme="light"] .collection-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .card {
  background: var(--pro-bg-card);
  border-color: var(--pro-hairline);
  box-shadow: var(--pro-shadow-card);
}
html[data-theme="light"] .pkg-card:hover,
html[data-theme="light"] .exercise-card:hover,
html[data-theme="light"] .collection-card:hover,
html[data-theme="light"] .team-card:hover {
  background: var(--pro-bg-card);   /* nicht graustufiger werden */
  border-color: var(--pro-hairline-hi);
  box-shadow: var(--pro-shadow-hover);
}

/* Modals: Glas auf hellem Grund subtiler */
html[data-theme="light"] .modal-content,
html[data-theme="light"] #session-modal .modal-content {
  background: var(--pro-glass-bg);
  border-color: var(--pro-glass-border);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
}

/* ============================================================
   DHB-STUFEN-BADGES – High-Contrast Overrides
   Erzwingt die neuen Kontrast-Variablen, egal was das Dark-
   Schema vorher gesetzt hat (auch wenn JS Inline-Styles oder
   die Stufenfarben aus dem Dark-Mode injiziert).
   ============================================================ */
html[data-theme="light"] .stufen-badge.basis,
html[data-theme="light"] .stufen-badge-large.basis,
html[data-theme="light"] .bereich-badge.basis,
html[data-theme="light"] .sp-badge.sp-basis {
  background: var(--dhb-basis-bg) !important;
  color: var(--dhb-basis-core) !important;
  border-color: var(--dhb-basis-bd) !important;
}

html[data-theme="light"] .stufen-badge.grundlage,
html[data-theme="light"] .stufen-badge-large.grundlage,
html[data-theme="light"] .bereich-badge.grundlage,
html[data-theme="light"] .sp-badge.sp-grundlage {
  background: var(--dhb-grundlage-bg) !important;
  color: var(--dhb-grundlage-core) !important;
  border-color: var(--dhb-grundlage-bd) !important;
}

/* WICHTIG: Aufbau1 + Aufbau2 → das problematische Orange */
html[data-theme="light"] .stufen-badge.aufbau1,
html[data-theme="light"] .stufen-badge.aufbau2,
html[data-theme="light"] .stufen-badge-large.aufbau1,
html[data-theme="light"] .stufen-badge-large.aufbau2,
html[data-theme="light"] .bereich-badge.aufbau,
html[data-theme="light"] .bereich-badge.aufbau1,
html[data-theme="light"] .bereich-badge.aufbau2,
html[data-theme="light"] .sp-badge.sp-aufbau {
  background: var(--dhb-aufbau-bg) !important;
  color: var(--dhb-aufbau-core) !important;
  border-color: var(--dhb-aufbau-bd) !important;
}

html[data-theme="light"] .stufen-badge.anschluss,
html[data-theme="light"] .stufen-badge-large.anschluss,
html[data-theme="light"] .bereich-badge.anschluss,
html[data-theme="light"] .sp-badge.sp-anschluss {
  background: var(--dhb-anschluss-bg) !important;
  color: var(--dhb-anschluss-core) !important;
  border-color: var(--dhb-anschluss-bd) !important;
}

/* Bereich-Badges (Taktik / Motorik) auf hellem Grund */
html[data-theme="light"] .bereich-badge.taktik,
html[data-theme="light"] .sp-badge.sp-taktik {
  background: var(--dhb-taktik-bg) !important;
  color: var(--dhb-taktik-core) !important;
  border-color: var(--dhb-taktik-bd) !important;
}
html[data-theme="light"] .bereich-badge.motorik,
html[data-theme="light"] .sp-badge.sp-motorik {
  background: var(--dhb-motorik-bg) !important;
  color: var(--dhb-motorik-core) !important;
  border-color: var(--dhb-motorik-bd) !important;
}

/* ============================================================
   DYNAMISCHE STUFEN-FARBEN VIA CUSTOM-PROPERTY KAPERN
   Wenn JS Inline-Styles wie style="background: var(--dhb-aufbau1)"
   oder style="--stufe-color: #F59E0B" setzt, fangen wir hier
   die CSS-Variablen direkt ab → kein JS-Patch nötig.
   ============================================================ */
html[data-theme="light"] {
  --dhb-basis:         var(--dhb-basis-core);
  --dhb-grundlage:     var(--dhb-grundlage-core);
  --dhb-aufbau1:       var(--dhb-aufbau-core);
  --dhb-aufbau2:       var(--dhb-aufbau-core);
  --dhb-anschluss:     var(--dhb-anschluss-core);
}

/* Focus-Cycle / Stufen-Ring auf Day-Cells: dunklere Outline,
   damit das Orange auf weiß nicht verschwindet */
html[data-theme="light"] .day-cell.in-focus-cycle::before {
  outline-color: var(--dhb-aufbau-core);
}

/* ============================================================
   Inputs / Buttons – weichere Borders + Brand-Focus
   ============================================================ */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: var(--pro-bg-input);
  border: 1px solid var(--pro-hairline-hi);
  color: var(--text-main);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #94A3B8; }

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: rgba(var(--brand-coachflow-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--brand-coachflow-rgb), 0.18);
}

/* Scrollbar im Light-Mode dezent grau */
html[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  background-clip: padding-box;
}
html[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--brand-coachflow-rgb), 0.45);
  background-clip: padding-box;
}
/* ============================================================
   ▓▓▓  /LIGHT-THEME POLISH  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  LIGHT-THEME · AUTH + LOGOUT  ▓▓▓
   Frontseite (Login/Register) + Abmelden-Button für hellen Modus.
   ============================================================ */

/* ---------- 1) Auth-Section: weiche, abgetönte Bühne ---------- */
html[data-theme="light"] #auth-section,
html[data-theme="light"] .auth-section {
  background:
    radial-gradient(1200px 600px at 20% 0%,
                    rgba(var(--brand-coachflow-rgb), 0.07) 0%,
                    transparent 60%),
    radial-gradient(900px 500px at 100% 100%,
                    rgba(29, 78, 216, 0.05) 0%,
                    transparent 65%),
    var(--pro-bg-app);
  color: var(--text-main);
}

/* Split-Layout transparent, damit der Gradient durchscheint */
html[data-theme="light"] .auth-split,
html[data-theme="light"] .auth-form-side {
  background: transparent;
}

/* ---------- 2) Auth-Card: schwebende weiße SaaS-Karte ---------- */
html[data-theme="light"] .auth-card {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -12px rgba(15, 23, 42, 0.18),
    0 30px 60px -30px rgba(15, 23, 42, 0.22);
}

/* Titel + Subtitle: harter Kontrast */
html[data-theme="light"] .auth-card h1,
html[data-theme="light"] .auth-card h2,
html[data-theme="light"] .auth-card .auth-title {
  color: var(--text-main);
  letter-spacing: -0.02em;
}
html[data-theme="light"] #auth-subtitle,
html[data-theme="light"] .auth-subtitle {
  color: #334155;          /* etwas dunkler als --text-secondary */
  font-weight: 500;
}

/* Switch-Text („Noch kein Account?") gut lesbar + Link grün */
html[data-theme="light"] #auth-switch-text,
html[data-theme="light"] .auth-switch-text {
  color: #334155;
}
html[data-theme="light"] #auth-switch,
html[data-theme="light"] .auth-switch,
html[data-theme="light"] a.auth-switch {
  color: #15803D;          /* abgedunkeltes Brand-Grün, AAA auf weiß */
  font-weight: 600;
}
html[data-theme="light"] a.auth-switch:hover { text-decoration: underline; }

/* ---------- 3) Form-Inputs: dezenter Grau-Hintergrund ---------- */
html[data-theme="light"] .auth-form label {
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
}
html[data-theme="light"] #auth-email,
html[data-theme="light"] #auth-password,
html[data-theme="light"] .auth-form input[type="email"],
html[data-theme="light"] .auth-form input[type="password"],
html[data-theme="light"] .auth-form input[type="text"] {
  background: #F8FAFC;
  color: #0F172A;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  transition: border-color 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              background 0.2s var(--pro-ease);
}
html[data-theme="light"] .auth-form input::placeholder {
  color: #94A3B8;
}
html[data-theme="light"] .auth-form input:hover {
  border-color: rgba(15, 23, 42, 0.20);
  background: #FFFFFF;
}
html[data-theme="light"] .auth-form input:focus {
  background: #FFFFFF;
  border-color: rgba(var(--brand-coachflow-rgb), 0.70);
  box-shadow: 0 0 0 4px rgba(var(--brand-coachflow-rgb), 0.15);
  outline: none;
}

/* ---------- 4) Submit-Button: deckendes Brand-Grün ---------- */
html[data-theme="light"] #btn-submit,
html[data-theme="light"] .auth-form .btn-primary {
  background: #16A34A;          /* AA-tauglich gegen weißen Text */
  color: #FFFFFF !important;
  font-weight: 700;
  letter-spacing: 0.005em;
  border: 1px solid #15803D;
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 6px 14px -6px rgba(22, 163, 74, 0.45);
}
html[data-theme="light"] #btn-submit:hover,
html[data-theme="light"] .auth-form .btn-primary:hover {
  background: #15803D;
  border-color: #14532D;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 10px 22px -8px rgba(22, 163, 74, 0.55),
    0 0 18px rgba(var(--brand-coachflow-rgb), 0.25);
  transform: translateY(-1px);
}
html[data-theme="light"] #btn-submit:active {
  transform: translateY(0);
  background: #14532D;
}
html[data-theme="light"] #btn-submit:focus-visible {
  box-shadow: 0 0 0 4px rgba(var(--brand-coachflow-rgb), 0.30);
}

/* ---------- 5) Auth-Messages: dunkler Text auf softem Tint ---------- */
html[data-theme="light"] .auth-message {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  transition: background 0.2s var(--pro-ease), color 0.2s var(--pro-ease);
}
html[data-theme="light"] .auth-message:empty {
  padding: 0; border: none;     /* leere Bubble nimmt keinen Platz */
}

/* Error – dunkles Rot auf hellrotem Banner */
html[data-theme="light"] .auth-message.error {
  background: #FEE2E2;
  color: #991B1B !important;
  border-color: #FCA5A5;
}
/* Success – dunkles Grün auf hellgrünem Banner */
html[data-theme="light"] .auth-message.success {
  background: #DCFCE7;
  color: #14532D !important;
  border-color: #86EFAC;
}
/* Info / Loading – neutrales Slate */
html[data-theme="light"] .auth-message.info,
html[data-theme="light"] .auth-message.loading {
  background: #F1F5F9;
  color: #1E293B !important;
  border-color: rgba(15, 23, 42, 0.10);
}

/* ---------- 6) Logout-Button: Ghost → Danger im Hover ---------- */
html[data-theme="light"] #btn-logout,
html[data-theme="light"] .btn-logout {
  background: transparent;
  color: #475569;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
  box-shadow: none;
  transition: background 0.2s var(--pro-ease),
              color 0.2s var(--pro-ease),
              border-color 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              transform 0.2s var(--pro-ease);
}
html[data-theme="light"] #btn-logout svg,
html[data-theme="light"] .btn-logout svg {
  stroke: currentColor;
  transition: stroke 0.2s var(--pro-ease);
}

/* Hover → klare „Gefahrenzone" in Rot */
html[data-theme="light"] #btn-logout:hover,
html[data-theme="light"] .btn-logout:hover {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FCA5A5;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(185, 28, 28, 0.35);
}
html[data-theme="light"] #btn-logout:hover svg,
html[data-theme="light"] .btn-logout:hover svg { stroke: #B91C1C; }

html[data-theme="light"] #btn-logout:active,
html[data-theme="light"] .btn-logout:active {
  transform: translateY(0);
  background: #FECACA;
  color: #7F1D1D;
}
html[data-theme="light"] #btn-logout:focus-visible,
html[data-theme="light"] .btn-logout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.25);
}

/* ---------- 7) Auth-Brand / Marketing-Side (links) ---------- */
html[data-theme="light"] .auth-brand,
html[data-theme="light"] .auth-brand-mobile { color: var(--text-main); }
html[data-theme="light"] .auth-brand .brand-tagline,
html[data-theme="light"] .auth-brand p { color: #475569; }

/* Hero-Title im Light-Mode dunkel-lesbar (Dark-Mode bleibt weiß) */
html[data-theme="light"] .auth-hero-title {
  color: var(--text-main);
}

/* Trennlinien innerhalb der Card */
html[data-theme="light"] .auth-card hr,
html[data-theme="light"] .auth-card .divider {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.08);
}
/* ============================================================
   ▓▓▓  /LIGHT-THEME · AUTH + LOGOUT  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  AVATAR — Bild-Variante + Profilbild-Uploader  ▓▓▓
   ============================================================ */

/* Bild-Variante des grünen Initialen-Kreises */
.ex-avatar.ex-avatar-img {
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;            /* nur fürs aria-label, optisch unsichtbar */
  border: 1px solid var(--pro-hairline);
}

/* Größen-Varianten */
.ex-avatar.ex-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.ex-avatar.ex-avatar-sm { width: 28px; height: 28px; font-size: 11px; }

/* Uploader im Profil-Modal */
.avatar-uploader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.avatar-uploader .btn { white-space: nowrap; }
.avatar-uploader-hint {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s var(--pro-ease);
}
.avatar-uploader-hint.error   { color: #F87171; }
.avatar-uploader-hint.success { color: var(--brand-coachflow); }

html[data-theme="light"] .avatar-uploader-hint.error   { color: #B91C1C; }
html[data-theme="light"] .avatar-uploader-hint.success { color: #15803D; }
/* ============================================================ */


/* ============================================================
   ▓▓▓  ONBOARDING WIZARD  ▓▓▓
   Step-by-Step Modal mit Progress, Choice-Cards, Chips,
   Slide/Fade-Transitionen zwischen Schritten.
   ============================================================ */

body.onb-open { overflow: hidden; }

.onb-modal {
  position: fixed; inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--pro-ease);
}
.onb-modal.is-shown { opacity: 1; pointer-events: auto; }
.onb-modal.hidden   { display: none; }

.onb-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 30% 20%,
                    rgba(var(--brand-coachflow-rgb), 0.10) 0%,
                    transparent 60%),
    rgba(8, 12, 22, 0.78);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.onb-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--pro-glass-bg, rgba(22, 29, 48, 0.92));
  border: 1px solid var(--pro-glass-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 20px;
  padding: 28px 32px 24px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 40px 80px -24px rgba(0,0,0,0.8),
    0 0 60px -10px rgba(var(--brand-coachflow-rgb), 0.18);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.32s var(--pro-ease);
}
.onb-modal.is-shown .onb-card { transform: translateY(0) scale(1); }

/* ---------- Progress-Bar ---------- */
.onb-progress {
  height: 4px; width: 100%;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.onb-progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--brand-coachflow) 0%, #4ADE80 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(var(--brand-coachflow-rgb), 0.45);
  transition: width 0.42s cubic-bezier(.2,.8,.2,1);
}

.onb-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.onb-meta strong { color: var(--text-main); font-weight: 700; }
.onb-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font: inherit; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.18s var(--pro-ease), background 0.18s var(--pro-ease);
}
.onb-skip:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }

/* ---------- Step-Container (Stacked, animiert) ---------- */
.onb-steps { position: relative; min-height: 480px; }
.onb-step {
  position: absolute; inset: 0;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.36s var(--pro-ease), transform 0.36s var(--pro-ease);
  pointer-events: none;
}
.onb-step.is-active     { opacity: 1; transform: translateX(0); pointer-events: auto; }
.onb-step.is-exit-left  { opacity: 0; transform: translateX(-28px); }
.onb-step.is-exit-right { opacity: 0; transform: translateX(28px);  }
.onb-step.is-enter-left { opacity: 0; transform: translateX(-28px); }

/* ---------- Step-Inhalte ---------- */
.onb-icon-badge {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
              rgba(var(--brand-coachflow-rgb), 0.20),
              rgba(var(--brand-coachflow-rgb), 0.06));
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.30);
  box-shadow:
    0 0 22px -4px rgba(var(--brand-coachflow-rgb), 0.30) inset,
    0 8px 20px -10px rgba(var(--brand-coachflow-rgb), 0.40);
  margin-bottom: 18px;
}
.onb-icon-badge svg {
  width: 26px; height: 26px;
  stroke: var(--brand-coachflow);
  stroke-width: 2; fill: none;
}

.onb-step h2 {
  font-family: "Inter", sans-serif;
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 8px;
}
.onb-lead {
  color: var(--text-muted);
  font-size: 14px; line-height: 1.55;
  margin: 0 0 22px;
}

/* ---------- Form (Step 1) ---------- */
.onb-form { display: flex; flex-direction: column; gap: 16px; }
.onb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .onb-form-row { grid-template-columns: 1fr; }
}
.onb-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.onb-label input,
.onb-label select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  text-transform: none;
  transition: border-color 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease),
              background 0.2s var(--pro-ease);
}
.onb-label input:focus,
.onb-label select:focus {
  outline: none;
  background: rgba(255,255,255,0.06);
  border-color: rgba(var(--brand-coachflow-rgb), 0.60);
  box-shadow: 0 0 0 4px rgba(var(--brand-coachflow-rgb), 0.16);
}
.onb-select-wrap { position: relative; }
.onb-select-wrap select { appearance: none; padding-right: 40px; cursor: pointer; }

/* Dropdown-Optionen: OS-Renderer stylen (Chromium liest hier nur color/background) */
.onb-label select option {
  background-color: #161D30;
  color: #FFFFFF;
  padding: 8px 12px;
}
.onb-label select option:checked {
  background: linear-gradient(0deg, rgba(var(--brand-coachflow-rgb), 0.25), rgba(var(--brand-coachflow-rgb), 0.25)), #161D30;
  color: #FFFFFF;
}
html[data-theme="light"] .onb-label select option {
  background-color: #FFFFFF;
  color: #0F172A;
}
.onb-select-chevron {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  width: 18px; height: 18px;
}

/* ---------- Choice-Cards (Step 2) ---------- */
.onb-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) { .onb-choices { grid-template-columns: 1fr; } }

.onb-choice {
  position: relative;
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 18px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  transition: transform 0.2s var(--pro-ease),
              border-color 0.2s var(--pro-ease),
              background 0.2s var(--pro-ease),
              box-shadow 0.2s var(--pro-ease);
}
.onb-choice:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(var(--brand-coachflow-rgb), 0.25);
  box-shadow: 0 12px 24px -16px rgba(0,0,0,0.6),
              0 0 16px rgba(var(--brand-coachflow-rgb), 0.10);
}
.onb-choice.is-selected {
  background: rgba(var(--brand-coachflow-rgb), 0.08);
  border-color: rgba(var(--brand-coachflow-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.40),
              0 14px 30px -16px rgba(var(--brand-coachflow-rgb), 0.40);
}
.onb-choice-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(var(--brand-coachflow-rgb), 0.12);
  margin-bottom: 4px;
}
.onb-choice-icon svg {
  width: 20px; height: 20px;
  stroke: var(--brand-coachflow);
  stroke-width: 2; fill: none;
}
.onb-choice strong {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
}
.onb-choice span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.onb-choice-tick {
  position: absolute;
  top: 14px; right: 14px;
  width: 20px; height: 20px;
  stroke: var(--brand-coachflow);
  stroke-width: 3; fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s var(--pro-ease), transform 0.2s var(--pro-ease);
}
.onb-choice.is-selected .onb-choice-tick { opacity: 1; transform: scale(1); }

.onb-join-input {
  margin-top: 16px;
  animation: onbSlideDown 0.32s var(--pro-ease);
}
@keyframes onbSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Chips (Step 3) ---------- */
.onb-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.onb-chip {
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease),
              color 0.18s var(--pro-ease),
              box-shadow 0.18s var(--pro-ease);
}
.onb-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(var(--brand-coachflow-rgb), 0.25);
}
.onb-chip.is-selected {
  background: rgba(var(--brand-coachflow-rgb), 0.14);
  border-color: rgba(var(--brand-coachflow-rgb), 0.60);
  color: #DCFCE7;
  box-shadow: 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.45),
              0 0 18px rgba(var(--brand-coachflow-rgb), 0.25);
}

/* ---------- Flash / Validation ---------- */
.onb-flash {
  margin-top: 14px;
  min-height: 22px;
  padding: 0 2px;
  font-size: 13px; font-weight: 500;
  color: #FCA5A5;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--pro-ease), transform 0.2s var(--pro-ease);
}
.onb-flash.is-shown    { opacity: 1; transform: translateY(0); }
.onb-flash.is-success  { color: var(--brand-coachflow); }

/* ---------- Footer-Buttons ---------- */
.onb-footer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
}
.onb-footer-spacer { flex: 1; }

.onb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.005em;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  transition: transform 0.18s var(--pro-ease),
              box-shadow 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease);
}
.onb-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }

.onb-btn-ghost {
  background: transparent;
  border-color: var(--pro-hairline-hi, rgba(255,255,255,0.10));
  color: var(--text-muted);
}
.onb-btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }

.onb-btn-primary {
  background: var(--brand-coachflow);
  color: #061B0E;
  border-color: rgba(0,0,0,0.10);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 8px 18px -8px rgba(var(--brand-coachflow-rgb), 0.55);
}
.onb-btn-primary:hover {
  transform: translateY(-1px);
  background: #16A34A;
  color: #FFFFFF;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 12px 24px -8px rgba(var(--brand-coachflow-rgb), 0.65),
    0 0 24px rgba(var(--brand-coachflow-rgb), 0.30);
}
.onb-btn-primary:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Light-Theme Adaption ---------- */
html[data-theme="light"] .onb-backdrop {
  background:
    radial-gradient(800px 500px at 30% 20%,
                    rgba(var(--brand-coachflow-rgb), 0.10) 0%,
                    transparent 60%),
    rgba(15, 23, 42, 0.45);
}
html[data-theme="light"] .onb-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 40px 80px -24px rgba(15, 23, 42, 0.30);
}
html[data-theme="light"] .onb-label input,
html[data-theme="light"] .onb-label select,
html[data-theme="light"] .onb-choice,
html[data-theme="light"] .onb-chip {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
}
html[data-theme="light"] .onb-chip.is-selected { color: #14532D; }
html[data-theme="light"] .onb-btn-primary { color: #FFFFFF; background: #16A34A; }


/* ============================================================
   ▓▓▓  DRIVER.JS · CoachFlow-Theme  ▓▓▓
   ============================================================ */

.cf-driver-popover.driver-popover {
  background: var(--bg-card, #161D30);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  max-width: 340px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 22px 50px -18px rgba(0,0,0,0.75),
    0 0 22px -6px rgba(var(--brand-coachflow-rgb), 0.20);
}

.cf-driver-popover .driver-popover-arrow-side-top    { border-top-color:    var(--bg-card, #161D30); }
.cf-driver-popover .driver-popover-arrow-side-bottom { border-bottom-color: var(--bg-card, #161D30); }
.cf-driver-popover .driver-popover-arrow-side-left   { border-left-color:   var(--bg-card, #161D30); }
.cf-driver-popover .driver-popover-arrow-side-right  { border-right-color:  var(--bg-card, #161D30); }

.cf-driver-popover .driver-popover-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin: 0 0 8px;
  font-family: "Inter", sans-serif;
}
.cf-driver-popover .driver-popover-description {
  font-size: 13px; line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.cf-driver-popover .driver-popover-progress-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.cf-driver-popover .driver-popover-close-btn {
  color: var(--text-muted);
  font-size: 18px;
  top: 10px; right: 12px;
  background: transparent;
  border: none;
  transition: color 0.18s var(--pro-ease);
}
.cf-driver-popover .driver-popover-close-btn:hover { color: var(--text-main); }

.cf-driver-popover .driver-popover-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  display: flex; gap: 8px; align-items: center;
}

.cf-driver-popover .driver-popover-prev-btn,
.cf-driver-popover .driver-popover-next-btn {
  font-family: "Inter", sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-shadow: none;
  transition: transform 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease),
              box-shadow 0.18s var(--pro-ease);
}
.cf-driver-popover .driver-popover-prev-btn {
  background: transparent;
  border-color: var(--pro-hairline-hi, rgba(255,255,255,0.10));
  color: var(--text-muted);
}
.cf-driver-popover .driver-popover-prev-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}
.cf-driver-popover .driver-popover-next-btn {
  background: var(--brand-coachflow);
  color: #061B0E;
  border-color: rgba(0,0,0,0.10);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 6px 14px -6px rgba(var(--brand-coachflow-rgb), 0.55);
}
.cf-driver-popover .driver-popover-next-btn:hover {
  background: #16A34A;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 10px 22px -8px rgba(var(--brand-coachflow-rgb), 0.65),
    0 0 20px rgba(var(--brand-coachflow-rgb), 0.30);
}

/* Light-Theme Driver-Popover */
html[data-theme="light"] .cf-driver-popover.driver-popover {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
  box-shadow:
    0 1px 2px rgba(15,23,42,0.06),
    0 20px 40px -16px rgba(15,23,42,0.30);
}
html[data-theme="light"] .cf-driver-popover .driver-popover-arrow-side-top    { border-top-color:    #FFFFFF; }
html[data-theme="light"] .cf-driver-popover .driver-popover-arrow-side-bottom { border-bottom-color: #FFFFFF; }
html[data-theme="light"] .cf-driver-popover .driver-popover-arrow-side-left   { border-left-color:   #FFFFFF; }
html[data-theme="light"] .cf-driver-popover .driver-popover-arrow-side-right  { border-right-color:  #FFFFFF; }
html[data-theme="light"] .cf-driver-popover .driver-popover-title       { color: #0F172A; }
html[data-theme="light"] .cf-driver-popover .driver-popover-description { color: #475569; }
html[data-theme="light"] .cf-driver-popover .driver-popover-next-btn    { color: #FFFFFF; background: #16A34A; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .onb-step, .onb-modal, .onb-card, .onb-progress-fill { transition: none !important; }
  .onb-join-input { animation: none !important; }
}
/* ============================================================
   ▓▓▓  /ONBOARDING WIZARD + DRIVER  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  ONBOARDING · AVATAR-UPLOAD (Step 1)  ▓▓▓
   ============================================================ */

.onb-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.onb-avatar-picker {
  position: relative;
  width: 72px; height: 72px;
  padding: 0;
  border: 2px dashed rgba(var(--brand-coachflow-rgb), 0.35);
  background: rgba(var(--brand-coachflow-rgb), 0.06);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease);
}
.onb-avatar-picker:hover {
  transform: scale(1.04);
  border-color: rgba(var(--brand-coachflow-rgb), 0.65);
  background: rgba(var(--brand-coachflow-rgb), 0.10);
}
.onb-avatar-picker.is-loading { opacity: 0.6; cursor: progress; }

.onb-avatar-preview {
  width: 60px; height: 60px;
  border-radius: 50%;
  background-color: rgba(var(--brand-coachflow-rgb), 0.10);
  background-size: cover;
  background-position: center;
  display: grid; place-items: center;
}
.onb-avatar-preview.has-image { background-color: transparent; }
.onb-avatar-preview.has-image .onb-avatar-cam { display: none; }
.onb-avatar-cam {
  width: 22px; height: 22px;
  stroke: var(--brand-coachflow);
  stroke-width: 2; fill: none;
}

.onb-avatar-edit {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand-coachflow);
  display: grid; place-items: center;
  border: 2px solid var(--bg-card, #161D30);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.onb-avatar-edit svg {
  width: 12px; height: 12px;
  stroke: #061B0E;
  stroke-width: 2.4;
}

.onb-avatar-meta {
  display: flex; flex-direction: column; gap: 2px;
}
.onb-avatar-meta strong {
  font-size: 14px; font-weight: 600;
  color: var(--text-main);
}
.onb-avatar-meta span {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s var(--pro-ease);
}
.onb-avatar-meta span.is-error   { color: #FCA5A5; }
.onb-avatar-meta span.is-success { color: var(--brand-coachflow); }


/* ============================================================
   ▓▓▓  FAVORITES · Heart-Button auf Karten  ▓▓▓
   ============================================================ */

/* Idle: dezent grau, outline */
.card-fav-btn {
  position: relative;
}
.card-fav-btn svg {
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  transition: stroke 0.2s var(--pro-ease),
              fill 0.2s var(--pro-ease),
              transform 0.2s var(--pro-ease);
}

/* Hover: dezenter Roteinblick */
.card-fav-btn:hover svg {
  stroke: #F87171;
  transform: scale(1.10);
}

/* Aktiv (Favorit): rotes gefülltes Herz */
.card-fav-btn.is-fav svg {
  stroke: #EF4444;
  fill: #EF4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.45));
}
.card-fav-btn.is-fav:hover svg {
  stroke: #DC2626;
  fill: #DC2626;
}

/* Klick-Puls beim Toggle */
@keyframes favPulse {
  0%   { transform: scale(1);   }
  35%  { transform: scale(1.35); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1);   }
}
.card-fav-btn.just-toggled svg {
  animation: favPulse 0.32s var(--pro-ease);
}

html[data-theme="light"] .card-fav-btn svg { stroke: #94A3B8; }
html[data-theme="light"] .card-fav-btn:hover svg { stroke: #DC2626; }
html[data-theme="light"] .card-fav-btn.is-fav svg { stroke: #DC2626; fill: #DC2626; }


/* ============================================================
   ▓▓▓  FAVORITES · Filter-Chip in Toolbar  ▓▓▓
   ============================================================ */

.btn-fav-filter svg {
  stroke: #F87171;
  fill: none;
  stroke-width: 2;
  transition: fill 0.2s var(--pro-ease),
              stroke 0.2s var(--pro-ease);
}
.btn-fav-filter:hover svg {
  fill: rgba(248, 113, 113, 0.25);
}
.btn-fav-filter.is-active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
}
.btn-fav-filter.is-active svg {
  stroke: #EF4444;
  fill: #EF4444;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.40));
}

html[data-theme="light"] .btn-fav-filter svg            { stroke: #DC2626; }
html[data-theme="light"] .btn-fav-filter.is-active      { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
html[data-theme="light"] .btn-fav-filter.is-active svg  { stroke: #DC2626; fill: #DC2626; }


/* ============================================================
   ▓▓▓  DRIVER.JS · Interaktive Tour-CTAs  ▓▓▓
   ============================================================ */

.cf-driver-popover .cf-tour-actions {
  margin-top: 14px;
  padding: 12px;
  background: rgba(var(--brand-coachflow-rgb), 0.08);
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-driver-popover .cf-tour-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--brand-coachflow);
  color: #061B0E;
  border: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease),
              box-shadow 0.18s var(--pro-ease);
  box-shadow: 0 6px 14px -6px rgba(var(--brand-coachflow-rgb), 0.55);
  width: 100%;
  justify-content: center;
}
.cf-driver-popover .cf-tour-cta-primary:hover {
  transform: translateY(-1px);
  background: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 10px 22px -8px rgba(var(--brand-coachflow-rgb), 0.70),
              0 0 18px rgba(var(--brand-coachflow-rgb), 0.30);
}
.cf-driver-popover .cf-tour-cta-secondary {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

html[data-theme="light"] .cf-driver-popover .cf-tour-actions {
  background: #F0FDF4;
  border-color: #86EFAC;
}
html[data-theme="light"] .cf-driver-popover .cf-tour-cta-primary {
  color: #FFFFFF;
  background: #16A34A;
}

/* ---------- Weekday-Picker in der Tour ---------- */
.cf-driver-popover .cf-tour-weekdays {
  margin-top: 14px;
  padding: 12px;
  background: rgba(var(--brand-coachflow-rgb), 0.08);
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cf-driver-popover .cf-tour-weekdays-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}
.cf-driver-popover .cf-tour-weekday-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cf-driver-popover .cf-tour-wd-chip {
  padding: 7px 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s var(--pro-ease),
              color 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease),
              transform 0.12s var(--pro-ease);
}
.cf-driver-popover .cf-tour-wd-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
}
.cf-driver-popover .cf-tour-wd-chip.is-on {
  background: var(--brand-coachflow);
  color: #061B0E;
  border-color: var(--brand-coachflow);
  box-shadow: 0 0 12px rgba(var(--brand-coachflow-rgb), 0.40);
}

.cf-driver-popover .cf-tour-cta-primary.is-applied {
  background: #16A34A;
  color: #FFFFFF;
  pointer-events: none;
}

html[data-theme="light"] .cf-driver-popover .cf-tour-weekdays {
  background: #F0FDF4;
  border-color: #86EFAC;
}
html[data-theme="light"] .cf-driver-popover .cf-tour-wd-chip {
  background: #FFFFFF;
  color: #475569;
  border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .cf-driver-popover .cf-tour-wd-chip.is-on {
  background: #16A34A;
  color: #FFFFFF;
  border-color: #16A34A;
}

/* Driver-Overlay: das hervorgehobene Element soll WIRKLICH hell wirken.
   Driver.js cuts out the stage natively → wir verstärken den Brand-Glow drum herum. */
.driver-active-element {
  box-shadow:
    0 0 0 2px rgba(var(--brand-coachflow-rgb), 0.55),
    0 0 40px rgba(var(--brand-coachflow-rgb), 0.25) !important;
  border-radius: 12px !important;
}

/* ---------- Tour „nicht abbrechbar" ---------- */
.cf-driver-locked .driver-popover-close-btn { display: none !important; }

/* ---------- Sidebar-Nav-Highlight für aktuellen Tour-Step ---------- */
/* Matched exakt das Aussehen von .nav-item.active + zusätzlicher Brand-Puls */
.sidebar-nav .cf-tour-nav-active,
.sidebar-nav a.cf-tour-nav-active {
  background: linear-gradient(135deg,
              rgba(var(--brand-coachflow-rgb), 0.28),
              rgba(var(--brand-coachflow-rgb), 0.12)) !important;
  color: var(--brand-coachflow) !important;
  font-weight: 600 !important;
  box-shadow:
    inset 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.45),
    0 4px 14px -6px rgba(var(--brand-coachflow-rgb), 0.55),
    0 0 22px rgba(var(--brand-coachflow-rgb), 0.30);
  animation: cfNavPulse 1.8s ease-in-out infinite;
}
.sidebar-nav .cf-tour-nav-active .nav-icon { transform: scale(1.15); }

@keyframes cfNavPulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.45),
      0 4px 14px -6px rgba(var(--brand-coachflow-rgb), 0.55),
      0 0 22px rgba(var(--brand-coachflow-rgb), 0.30);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.65),
      0 6px 18px -6px rgba(var(--brand-coachflow-rgb), 0.65),
      0 0 32px rgba(var(--brand-coachflow-rgb), 0.45);
  }
}

/* ---------- Day-Cell-Puls (nach "Trainingszeiten generieren") ---------- */
@keyframes cfCellPulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--brand-coachflow-rgb), 0.55), 0 0 0  rgba(var(--brand-coachflow-rgb), 0.40); }
  50%  { box-shadow: 0 0 0 4px rgba(var(--brand-coachflow-rgb), 0.30), 0 0 30px rgba(var(--brand-coachflow-rgb), 0.50); }
  100% { box-shadow: 0 0 0 0   rgba(var(--brand-coachflow-rgb), 0.00), 0 0 0  rgba(var(--brand-coachflow-rgb), 0.00); }
}
.cf-tour-cell-pulse {
  animation: cfCellPulse 1.4s var(--pro-ease) infinite;
  border-color: rgba(var(--brand-coachflow-rgb), 0.65) !important;
  z-index: 5;
  position: relative;
}

/* ---------- Modal-Scroll-Lock: nur Modal scrollt, nicht Body ---------- */
body:has(#fc-modal:not(.hidden)),
body:has(.modal:not(.hidden)) {
  overflow: hidden;
}

/* Modal-Content über Driver.js-Overlay heben (sonst nicht interaktiv) */
#fc-modal:not(.hidden) {
  z-index: 100050;
}
#fc-modal .modal-content {
  max-height: 85vh;
  overflow-y: auto;
}

/* ============================================================
   TOUR-RUNNING: Außerhalb des aktiven Stage NICHTS klickbar
   (Driver.js-Overlay deckt zwar, aber bei wide-target Steps
   liegen Day-Cells & Co. innerhalb der Cutout-Fläche.)
   ============================================================ */

/* Day-Cells: standardmäßig blockiert,
   AUSSER eine Zelle bekommt .cf-tour-clickable (für Step 6). */
body.cf-tour-running .day-cell,
body.cf-tour-running .day-cell * {
  pointer-events: none !important;
}
body.cf-tour-running .day-cell.cf-tour-clickable,
body.cf-tour-running .day-cell.cf-tour-clickable * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Session-Modal + Source-Picker-Modal über Driver-Overlay heben */
body.cf-tour-running #session-modal:not(.hidden),
body.cf-tour-running #source-picker-modal:not(.hidden) {
  z-index: 100050;
}

/* Day-Picker (für „Übung übernehmen") über alles */
body.cf-tour-running #day-picker-modal:not(.hidden) {
  z-index: 100100;
}

/* ============================================================
   RUNDGANG-ABBRECHEN-Button (fixed, unten links)
   ============================================================ */
.cf-tour-cancel-btn {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  /* Über ALLEM: Driver-Overlay (10000), Modal (100050), Day-Picker (100100) */
  z-index: 2147483600 !important;
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.92);
  color: #FCA5A5;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 10px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.5),
              0 0 0 1px rgba(248, 113, 113, 0.20);
  transition: background 0.18s var(--pro-ease),
              color 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease),
              transform 0.18s var(--pro-ease);
}
.cf-tour-cancel-btn:hover {
  background: rgba(220, 38, 38, 0.20);
  color: #FECACA;
  border-color: rgba(220, 38, 38, 0.60);
  transform: translateY(-1px);
}
.cf-tour-cancel-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  stroke-width: 2.4;
}

/* ============================================================
   CF-TOUR-BLINK: Pulsierende Klick-Aufforderung
   ============================================================ */
@keyframes cfTourBlink {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(var(--brand-coachflow-rgb), 0.0),
      0 0 0 3px rgba(var(--brand-coachflow-rgb), 0.75),
      0 0 30px rgba(var(--brand-coachflow-rgb), 0.55);
    background-color: rgba(var(--brand-coachflow-rgb), 0.15) !important;
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(var(--brand-coachflow-rgb), 0.25),
      0 0 0 3px rgba(var(--brand-coachflow-rgb), 1.0),
      0 0 60px rgba(var(--brand-coachflow-rgb), 0.95);
    background-color: rgba(var(--brand-coachflow-rgb), 0.40) !important;
  }
}
.cf-tour-blink {
  animation: cfTourBlink 1.0s ease-in-out infinite;
  position: relative;
  z-index: 5;
  border-radius: 10px !important;
}

/* ============================================================
   Profil-View während Step 2 ÜBER Driver-Overlay heben
   ============================================================ */
body.cf-tour-show-profile #view-profile {
  position: relative !important;
  z-index: 100050 !important;
  background: var(--bg-main) !important;
  isolation: isolate;
}

/* Driver-Overlay-SVG während Step 2 deutlich abschwächen, damit das
   Profil im Hintergrund hell durchscheint statt gedimmt zu sein.
   Driver.js v1 nutzt verschiedene mögliche Class-Namen → alle abdecken. */
body.cf-tour-show-profile .driver-overlay,
body.cf-tour-show-profile svg.driver-overlay,
body.cf-tour-show-profile [class*="driver-overlay"] {
  opacity: 0.30 !important;
}

/* Popover während Step 2 schmaler halten, damit es im Sidebar-Bereich bleibt
   und das Profil nicht überdeckt */
body.cf-tour-show-profile .cf-driver-popover {
  max-width: 280px !important;
}

/* Disabled Weekday-Chips während Step 3 (nur Sonntag aktiv) */
body.cf-tour-only-sunday .weekday-chip:not(.cf-tour-blink) {
  opacity: 0.30;
  pointer-events: none !important;
  filter: grayscale(80%);
}
body.cf-tour-only-sunday .weekday-chip.cf-tour-blink {
  opacity: 1;
}

html[data-theme="light"] .cf-tour-cancel-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #B91C1C;
  border-color: rgba(220, 38, 38, 0.35);
}
html[data-theme="light"] .cf-tour-cancel-btn:hover {
  background: #FEE2E2;
  color: #991B1B;
}

/* ---------- Inline-Hint im Popover (Basisschulung-Erklärung) ---------- */
.cf-driver-popover .cf-tour-hint {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(96, 165, 250, 0.10);
  border-left: 3px solid #60A5FA;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
}
.cf-driver-popover .cf-tour-hint small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

/* ---------- Liste mit Icon-Erklärungen (Step 9: Karten-Buttons) ---------- */
.cf-driver-popover .cf-tour-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cf-driver-popover .cf-tour-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
}
.cf-driver-popover .cf-tour-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}


/* ============================================================
   ▓▓▓  TOUR-OVERLAY-DIALOG (Skip-Start, Age-Only)  ▓▓▓
   ============================================================ */
.cf-tour-overlay {
  position: fixed; inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--pro-ease);
}
.cf-tour-overlay.is-shown { opacity: 1; pointer-events: auto; }

.cf-tour-overlay-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 30% 20%,
                    rgba(var(--brand-coachflow-rgb), 0.10) 0%,
                    transparent 60%),
    rgba(8, 12, 22, 0.82);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.cf-tour-overlay-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--pro-glass-bg, rgba(22, 29, 48, 0.92));
  border: 1px solid var(--pro-glass-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 20px;
  padding: 28px 28px 24px;
  text-align: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 40px 80px -24px rgba(0,0,0,0.8),
    0 0 60px -10px rgba(var(--brand-coachflow-rgb), 0.18);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.28s var(--pro-ease);
}
.cf-tour-overlay.is-shown .cf-tour-overlay-card { transform: translateY(0) scale(1); }

.cf-tour-overlay-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
              rgba(var(--brand-coachflow-rgb), 0.20),
              rgba(var(--brand-coachflow-rgb), 0.06));
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.30);
  box-shadow: 0 8px 20px -10px rgba(var(--brand-coachflow-rgb), 0.40);
}
.cf-tour-overlay-icon svg {
  width: 28px; height: 28px;
  stroke: var(--brand-coachflow);
  stroke-width: 2;
  fill: none;
}

.cf-tour-overlay-card h2 {
  font-family: "Inter", sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 8px;
}
.cf-tour-overlay-lead {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 22px;
}

.cf-tour-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.cf-tour-overlay-btn {
  padding: 12px 18px;
  border-radius: 10px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--pro-ease),
              background 0.18s var(--pro-ease),
              box-shadow 0.18s var(--pro-ease),
              border-color 0.18s var(--pro-ease);
}
.cf-tour-overlay-btn.is-primary {
  background: var(--brand-coachflow);
  color: #061B0E;
  border-color: rgba(0,0,0,0.10);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 8px 18px -8px rgba(var(--brand-coachflow-rgb), 0.55);
}
.cf-tour-overlay-btn.is-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #16A34A;
  color: #FFFFFF;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 12px 24px -8px rgba(var(--brand-coachflow-rgb), 0.65),
    0 0 24px rgba(var(--brand-coachflow-rgb), 0.30);
}
.cf-tour-overlay-btn.is-ghost {
  background: transparent;
  border-color: var(--pro-hairline-hi, rgba(255,255,255,0.10));
  color: var(--text-muted);
}
.cf-tour-overlay-btn.is-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}
.cf-tour-overlay-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Age-Chips im Skip-Pfad */
.cf-tour-age-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}
.cf-tour-age-chip {
  padding: 10px 12px;
  font-family: "Inter", sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.16s var(--pro-ease),
              background 0.16s var(--pro-ease),
              border-color 0.16s var(--pro-ease),
              color 0.16s var(--pro-ease);
}
.cf-tour-age-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(var(--brand-coachflow-rgb), 0.25);
}
.cf-tour-age-chip.is-on {
  background: rgba(var(--brand-coachflow-rgb), 0.14);
  border-color: rgba(var(--brand-coachflow-rgb), 0.60);
  color: #DCFCE7;
  box-shadow: 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.45),
              0 0 18px rgba(var(--brand-coachflow-rgb), 0.25);
}

/* Light-Theme Adaption */
html[data-theme="light"] .cf-tour-overlay-backdrop {
  background:
    radial-gradient(800px 500px at 30% 20%,
                    rgba(var(--brand-coachflow-rgb), 0.10) 0%,
                    transparent 60%),
    rgba(15, 23, 42, 0.55);
}
html[data-theme="light"] .cf-tour-overlay-card {
  background: rgba(255,255,255,0.94);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 40px 80px -24px rgba(15, 23, 42, 0.30);
}
html[data-theme="light"] .cf-tour-overlay-btn.is-primary {
  color: #FFFFFF;
  background: #16A34A;
}
html[data-theme="light"] .cf-tour-age-chip {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
}
html[data-theme="light"] .cf-tour-age-chip.is-on { color: #14532D; }
/* ============================================================ */


/* ============================================================
   ▓▓▓  OPEN-BETA NOTICE-MODAL  ▓▓▓
   ============================================================ */
.beta-modal {
  position: fixed; inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--pro-ease);
}
.beta-modal.is-shown { opacity: 1; pointer-events: auto; }
.beta-modal.hidden   { display: none; }

.beta-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 30% 20%,
                    rgba(var(--brand-coachflow-rgb), 0.10) 0%,
                    transparent 60%),
    rgba(8, 12, 22, 0.78);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.beta-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--pro-glass-bg, rgba(22, 29, 48, 0.94));
  border: 1px solid var(--pro-glass-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 20px;
  padding: 30px 32px 26px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 40px 80px -24px rgba(0,0,0,0.8),
    0 0 60px -10px rgba(var(--brand-coachflow-rgb), 0.20);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.28s var(--pro-ease);
}
.beta-modal.is-shown .beta-card { transform: translateY(0) scale(1); }

.beta-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
              rgba(var(--brand-coachflow-rgb), 0.22),
              rgba(var(--brand-coachflow-rgb), 0.06));
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.32);
  box-shadow:
    0 0 22px -4px rgba(var(--brand-coachflow-rgb), 0.30) inset,
    0 8px 20px -10px rgba(var(--brand-coachflow-rgb), 0.45);
  margin-bottom: 18px;
}
.beta-icon { width: 28px; height: 28px; stroke: var(--brand-coachflow); stroke-width: 2; fill: none; }

.beta-card h2 {
  font-family: "Inter", sans-serif;
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 8px;
}
.beta-lead {
  color: var(--text-muted);
  font-size: 14px; line-height: 1.55;
  margin: 0 0 18px;
}

.beta-list {
  list-style: none; padding: 0; margin: 0 0 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.beta-list li {
  display: flex; gap: 12px;
  align-items: flex-start;
  font-size: 13px; line-height: 1.5;
  color: var(--text-main);
  padding: 10px 12px;
  background: rgba(var(--brand-coachflow-rgb), 0.06);
  border: 1px solid rgba(var(--brand-coachflow-rgb), 0.18);
  border-radius: 10px;
}
.beta-list svg {
  width: 18px; height: 18px;
  stroke: var(--brand-coachflow);
  stroke-width: 2; fill: none;
  flex-shrink: 0;
  margin-top: 1px;
}

.beta-cta {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 700;
  letter-spacing: 0.005em;
}
.beta-cta svg { width: 16px; height: 16px; }

html[data-theme="light"] .beta-card {
  background: rgba(255,255,255,0.96);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 40px 80px -24px rgba(15, 23, 42, 0.30);
}
html[data-theme="light"] .beta-list li {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: #14532D;
}
/* ============================================================
   ▓▓▓  /OPEN-BETA NOTICE  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  TAKTIKBOARD (Editor + Viewer)  ▓▓▓
   Reine Vanilla-Canvas-Implementation. Container .tb-root.
   ============================================================ */

.tb-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-height: 0;
}

/* ---------- Toolbar ---------- */
.tb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 10px;
  background: var(--pro-bg-card, #161D30);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
  flex-shrink: 0;
}
.tb-tool-group {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.tb-tool-group-end { margin-left: auto; }

.tb-tool,
.tb-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.16s var(--pro-ease),
              background 0.16s var(--pro-ease),
              border-color 0.16s var(--pro-ease),
              color 0.16s var(--pro-ease);
}
.tb-tool svg, .tb-action svg {
  width: 16px; height: 16px;
  stroke-width: 2;
}
.tb-tool:hover, .tb-action:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(var(--brand-coachflow-rgb), 0.25);
}
.tb-tool.is-active {
  background: rgba(var(--brand-coachflow-rgb), 0.15);
  border-color: rgba(var(--brand-coachflow-rgb), 0.65);
  color: #DCFCE7;
  box-shadow: 0 0 0 1px rgba(var(--brand-coachflow-rgb), 0.45),
              0 0 18px rgba(var(--brand-coachflow-rgb), 0.25);
}
.tb-tool.is-active svg { stroke: var(--brand-coachflow); }

/* ---------- Canvas-Wrap ---------- */
.tb-canvas-wrap {
  position: relative;
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 14px;
  overflow: hidden;
  background: #0F2A22;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 14px 32px -16px rgba(0,0,0,0.6);
  /* Wrap zentriert das Canvas und shrinkt mit ihm */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}
.tb-canvas {
  display: block;
  width: auto;
  height: auto;
  /* Beide Begrenzungen: Canvas passt sich an Container-Breite UND Viewport-Höhe an */
  max-width: 100%;
  max-height: calc(100vh - 220px);   /* 220 px Reserve für Toolbar + Frames + Padding */
  aspect-ratio: 2 / 1;
  touch-action: none;
}

.tb-canvas-hint {
  position: absolute;
  bottom: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(8, 12, 22, 0.72);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.tb-canvas-hint svg { width: 13px; height: 13px; stroke-width: 2.2; }

/* ---------- Frame-Tabs ---------- */
.tb-frames {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  background: var(--pro-bg-card, #161D30);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
  flex-shrink: 0;
}
.tb-frames-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tb-frame-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  flex: 1;
}
.tb-frame-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s var(--pro-ease);
}
.tb-frame-tab:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(var(--brand-coachflow-rgb), 0.25);
}
.tb-frame-tab.is-active {
  background: rgba(var(--brand-coachflow-rgb), 0.18);
  border-color: rgba(var(--brand-coachflow-rgb), 0.65);
  color: #DCFCE7;
  box-shadow: 0 0 18px -4px rgba(var(--brand-coachflow-rgb), 0.40);
}
.tb-frame-num {
  display: inline-block;
  min-width: 18px;
  text-align: center;
}
.tb-frame-del {
  width: 13px; height: 13px;
  stroke: rgba(255,255,255,0.55);
  stroke-width: 2.4;
  transition: stroke 0.16s;
  margin-left: 2px;
}
.tb-frame-del:hover { stroke: #F87171; }

.tb-add-frame {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: rgba(var(--brand-coachflow-rgb), 0.10);
  border: 1px dashed rgba(var(--brand-coachflow-rgb), 0.45);
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-coachflow);
  cursor: pointer;
  transition: all 0.16s var(--pro-ease);
}
.tb-add-frame svg { width: 14px; height: 14px; stroke-width: 2.4; }
.tb-add-frame:hover {
  background: rgba(var(--brand-coachflow-rgb), 0.18);
  border-style: solid;
  transform: translateY(-1px);
}

/* ---------- Viewer-Navigation ---------- */
.tb-viewer-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--pro-bg-card, #161D30);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
}
.tb-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s var(--pro-ease);
}
.tb-nav-btn:hover {
  background: rgba(var(--brand-coachflow-rgb), 0.15);
  border-color: rgba(var(--brand-coachflow-rgb), 0.55);
  transform: translateY(-1px);
}
.tb-nav-btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.tb-nav-play {
  margin-left: auto;
  background: rgba(var(--brand-coachflow-rgb), 0.18);
  border-color: rgba(var(--brand-coachflow-rgb), 0.55);
  color: var(--brand-coachflow);
}

.tb-nav-dots {
  display: flex; gap: 6px;
  flex: 1; flex-wrap: wrap;
  justify-content: center;
}
.tb-nav-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px;
  padding: 0 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 14px;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all 0.16s var(--pro-ease);
}
.tb-nav-dot:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
}
.tb-nav-dot.is-active {
  background: rgba(var(--brand-coachflow-rgb), 0.22);
  border-color: rgba(var(--brand-coachflow-rgb), 0.65);
  color: #DCFCE7;
  box-shadow: 0 0 14px -4px rgba(var(--brand-coachflow-rgb), 0.45);
}

.tb-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--pro-bg-card, #161D30);
  border: 1px dashed var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 12px;
}

/* ---------- Light-Theme ---------- */
html[data-theme="light"] .tb-toolbar,
html[data-theme="light"] .tb-frames,
html[data-theme="light"] .tb-viewer-nav {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .tb-tool,
html[data-theme="light"] .tb-action,
html[data-theme="light"] .tb-frame-tab,
html[data-theme="light"] .tb-nav-btn,
html[data-theme="light"] .tb-nav-dot {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
}
html[data-theme="light"] .tb-tool.is-active,
html[data-theme="light"] .tb-frame-tab.is-active,
html[data-theme="light"] .tb-nav-dot.is-active {
  background: rgba(var(--brand-coachflow-rgb), 0.16);
  color: #14532D;
}
html[data-theme="light"] .tb-add-frame { color: #15803D; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .tb-tool span,
  .tb-action span,
  .tb-add-frame span,
  .tb-frames-label { display: none; }
  .tb-tool, .tb-action, .tb-add-frame { padding: 8px 10px; }
}
/* ============================================================
   ▓▓▓  /TAKTIKBOARD  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  ÜBUNGS-DETAIL: SIDE-BY-SIDE + MEDIA-TABS  ▓▓▓
   ============================================================ */

.ex-detail-modal {
  max-width: 1280px;
  width: 95vw;
}

.ex-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  margin-top: 14px;
}
@media (max-width: 980px) {
  .ex-detail-grid { grid-template-columns: 1fr; }
}

.ex-detail-col-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.ex-detail-col-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  /* sticky innerhalb des scrollbaren Modal-Bodys */
  position: sticky;
  top: 0;
  align-self: start;
}

.ex-detail-section h5 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.005em;
  margin: 0 0 8px;
  text-transform: none;
}
.ex-detail-section h5 svg {
  width: 16px; height: 16px;
  stroke: var(--brand-coachflow);
  stroke-width: 2;
}
.ex-detail-section p {
  margin: 0;
  line-height: 1.55;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* ---------- Media-Tabs ---------- */
.ex-media-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--pro-bg-card, #161D30);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 10px;
}
.ex-media-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--pro-ease);
}
.ex-media-tab svg { width: 14px; height: 14px; stroke-width: 2.2; }
.ex-media-tab:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}
.ex-media-tab.is-active {
  background: rgba(var(--brand-coachflow-rgb), 0.18);
  border-color: rgba(var(--brand-coachflow-rgb), 0.45);
  color: #DCFCE7;
}

.ex-media-pane {
  background: var(--pro-bg-card, #161D30);
  border: 1px solid var(--pro-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
  padding: 12px;
  min-height: 200px;
}
.ex-media-panel { display: none; }
.ex-media-panel.is-active { display: block; }

.ex-media-image {
  display: flex;
  justify-content: center;
}
.ex-media-image img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 10px;
  display: block;
}

.ex-media-yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
}
.ex-media-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.ex-media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  background: var(--pro-bg-card, #161D30);
  border: 1px dashed var(--pro-hairline-hi, rgba(255,255,255,0.09));
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.ex-media-empty svg { width: 28px; height: 28px; stroke-width: 1.6; opacity: 0.7; }

html[data-theme="light"] .ex-media-tabs,
html[data-theme="light"] .ex-media-pane,
html[data-theme="light"] .ex-media-empty {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .ex-media-tab.is-active { color: #14532D; }
/* ============================================================
   ▓▓▓  /ÜBUNGS-DETAIL  ▓▓▓
   ============================================================ */


/* ============================================================
   ▓▓▓  TAKTIKBOARD · Wizard-Integration  ▓▓▓
   ============================================================ */

.u-tactic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.u-tactic-status {
  font-size: 12px;
  color: var(--text-muted);
}
.u-tactic-status.has-frames {
  color: var(--brand-coachflow);
  font-weight: 600;
}

/* Editor-Modal: möglichst breit, damit das Taktikboard groß genug ist */
.tactic-editor-modal {
  max-width: 1280px;
  width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}
.tactic-editor-mount {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px;
  overflow: auto;
}
.tactic-editor-modal .modal-actions {
  flex-shrink: 0;
}
/* ============================================================
   ▓▓▓  /TAKTIKBOARD WIZARD  ▓▓▓
   ============================================================ */

/* ============================================================
   ▓▓▓  BUG-REPORT MODAL + ADMIN-VIEW  ▓▓▓
   ============================================================ */
.bug-report-card {
  max-width: 560px;
  text-align: left;
}
.bug-report-card h2,
.bug-report-card .beta-lead {
  text-align: center;
}
.bug-report-form {
  margin-top: 8px;
}
.bug-report-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
}
.bug-report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
.form-hint.success {
  color: var(--brand-coachflow, #22C55E);
}

/* Sidebar: Bug + Admin item visuell leicht abgesetzt vom Hauptmenue */
#nav-report-bug { margin-top: auto; }
.nav-admin-only .nav-icon i { color: var(--brand-coachflow, #22C55E); }

/* --- Admin-View ---------------------------------------- */
.admin-bugs-card { padding: 0; }
.admin-bugs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-bugs-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.admin-bugs-filters .btn.is-active {
  background: rgba(34,197,94,0.12);
  color: var(--brand-coachflow, #22C55E);
}
.admin-bugs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
}
.admin-bug-card {
  background: var(--pro-bg-app, #0B0F19);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-bug-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-bug-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.admin-bug-status-open         { background: rgba(239, 68, 68, 0.18); color: #FCA5A5; }
.admin-bug-status-in_progress  { background: rgba(234, 179, 8, 0.18); color: #FDE68A; }
.admin-bug-status-resolved     { background: rgba(34, 197, 94, 0.18); color: #86EFAC; }
.admin-bug-status-dismissed    { background: rgba(148, 163, 184, 0.18); color: #CBD5E1; }
.admin-bug-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.admin-bug-message {
  margin: 0;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.45;
}
.admin-bug-foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.admin-bug-foot code {
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: 4px;
}
.admin-bug-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 2px;
}

/* Light-Theme-Tunings */
body[data-theme="light"] .admin-bug-card {
  background: #F8FAFC;
  border-color: rgba(15,23,42,0.08);
}
body[data-theme="light"] .admin-bug-meta,
body[data-theme="light"] .admin-bug-foot { color: #475569; }
body[data-theme="light"] .admin-bug-status-open        { background: #FEE2E2; color: #991B1B; }
body[data-theme="light"] .admin-bug-status-in_progress { background: #FEF3C7; color: #92400E; }
body[data-theme="light"] .admin-bug-status-resolved    { background: #DCFCE7; color: #166534; }
body[data-theme="light"] .admin-bug-status-dismissed   { background: #E2E8F0; color: #334155; }

/* ============================================================
   ▓▓▓  /BUG-REPORT MODAL + ADMIN-VIEW  ▓▓▓
   ============================================================ */

/* ============================================================
   ▓▓▓  SCHWERPUNKTZYKLUS · Edit + Notes / Shift-Modal  ▓▓▓
   ============================================================ */
.fc-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fc-bar-icon i {
  width: 16px;
  height: 16px;
}
.fc-bar-note {
  display: block;
  margin-top: 2px;
  opacity: 0.75;
  font-style: italic;
}
.fc-list-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.fc-list-note {
  display: block;
  margin-top: 4px;
  opacity: 0.75;
  font-style: italic;
}
.fc-suggest-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.fc-suggest-banner > i {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Shift-Modal nutzt bestehende Modal-/Form-Styles, kein Extra-Block noetig. */

/* ============================================================
   ▓▓▓  /SCHWERPUNKTZYKLUS · Edit + Notes / Shift-Modal  ▓▓▓
   ============================================================ */

/* ============================================================
   ▓▓▓  CONTENT-REPORTS · Modal + Admin-Sektion  ▓▓▓
   ============================================================ */
.report-card {
  max-width: 560px;
  text-align: left;
}
.report-card h2,
.report-card .beta-lead {
  text-align: center;
}
.report-form {
  margin-top: 8px;
}
.report-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 100px;
}
.report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Kind-Badge in der Admin-Liste */
.admin-cr-kind {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.18);
  color: #93C5FD;
}
.admin-cr-card .admin-cr-reason {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(255,255,255,0.18);
  padding: 8px 12px;
  border-radius: 6px;
  font-style: italic;
  white-space: pre-wrap;
}
.admin-bug-status-reviewed   { background: rgba(34, 197, 94, 0.18); color: #86EFAC; }

/* Light-Theme */
body[data-theme="light"] .admin-cr-kind {
  background: #DBEAFE; color: #1D4ED8;
}
body[data-theme="light"] .admin-cr-card .admin-cr-reason {
  background: #F1F5F9; border-left-color: #94A3B8;
}
body[data-theme="light"] .admin-bug-status-reviewed { background: #DCFCE7; color: #166534; }

/* ============================================================
   ▓▓▓  /CONTENT-REPORTS · Modal + Admin-Sektion  ▓▓▓
   ============================================================ */

/* ============================================================
   ▓▓▓  LIKE-BUTTON · is-liked Highlight  ▓▓▓
   ============================================================ */
.card-like-btn.is-liked {
  background: rgba(34, 197, 94, 0.16);
  color: var(--brand-coachflow, #22C55E);
  border-color: rgba(34, 197, 94, 0.45);
}
.card-like-btn.is-liked i {
  color: var(--brand-coachflow, #22C55E);
  fill: currentColor;
}
.card-like-btn.is-liked .like-count {
  color: var(--brand-coachflow, #22C55E);
  font-weight: 700;
}
body[data-theme="light"] .card-like-btn.is-liked {
  background: #DCFCE7;
  color: #166534;
  border-color: #86EFAC;
}
body[data-theme="light"] .card-like-btn.is-liked i,
body[data-theme="light"] .card-like-btn.is-liked .like-count { color: #166534; }
/* ============================================================
   ▓▓▓  /LIKE-BUTTON · is-liked  ▓▓▓
   ============================================================ */

/* ============================================================
   ▓▓▓  DETAIL-VIEWER · Paket + Sammlung  ▓▓▓
   ============================================================ */
.pv-headline,
.cv-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="light"] .pv-headline,
html[data-theme="light"] .cv-headline {
  border-bottom-color: rgba(15,23,42,0.08);
}
.pv-headline .form-hint,
.cv-headline .cv-meta { flex: 1 1 280px; }
.pv-headline .btn,
.cv-headline .btn { flex-shrink: 0; }

/* Karten-Grid im Paket-Viewer */
.pv-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pv-unit-card {
  position: relative;
}
.pv-unit-card .pkg-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pv-unit-num {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.pv-unit-card:hover {
  border-color: var(--brand-coachflow, #22C55E);
  transform: translateY(-2px);
  transition: border-color 0.15s, transform 0.15s;
}

/* Sammlungs-Viewer Notes-Banner ohne Emoji */
.cv-notes-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #F59E0B;
  border-radius: 6px;
  margin-bottom: 16px;
}
.cv-notes-banner i { flex-shrink: 0; margin-top: 2px; color: #F59E0B; }
html[data-theme="light"] .cv-notes-banner {
  background: #FEF3C7;
  color: #92400E;
}

/* repetitions-hint + cv-notes Layout */
.repetitions-hint,
.cv-notes {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 6px;
}
.repetitions-hint { background: rgba(59, 130, 246, 0.12); }
.repetitions-hint i { color: #60A5FA; flex-shrink: 0; margin-top: 1px; }
.cv-notes { background: rgba(255,255,255,0.05); }
.cv-notes i { color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }
html[data-theme="light"] .repetitions-hint { background: #DBEAFE; color: #1E3A8A; }
html[data-theme="light"] .repetitions-hint i { color: #1D4ED8; }
html[data-theme="light"] .cv-notes { background: #F1F5F9; color: #334155; }

/* ============================================================
   ▓▓▓  /DETAIL-VIEWER  ▓▓▓
   ============================================================ */

