/* Hell ist der Standard beim allerersten Besuch. Unter "Profil" laesst sich
   zwischen Hell / Dunkel / System umschalten - siehe static/js/theme.js.
   Die Wahl wird im Browser gespeichert und als data-theme am <html>-Element
   gesetzt; "System" respektiert zusaetzlich die Betriebssystem-Einstellung. */
:root {
  --accent: #3b6fe8;   /* Blau, angelehnt an business-building-factory.de */
  --cta: #ff9900;      /* Amazon-Orange fuer Call-to-Action-Buttons */
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --card-border: #e2e6f0;
  --surface-2: #eef1fa;
  --input-bg: #f7f8fc;
  --text: #10142a;
  --text-muted: #5b6478;
  --countdown-bg: #dbe3fb;
}

:root[data-theme="dark"] {
  --bg: #050d2b;
  --card-bg: #0b1638;
  --card-border: #1a2540;
  --surface-2: #23213a;
  --input-bg: #0f0f12;
  --text: #f5f5f7;
  --text-muted: #99a3c2;
  --countdown-bg: #1e2c5c;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #050d2b;
    --card-bg: #0b1638;
    --card-border: #1a2540;
    --surface-2: #23213a;
    --input-bg: #0f0f12;
    --text: #f5f5f7;
    --text-muted: #99a3c2;
    --countdown-bg: #1e2c5c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.card h1 {
  font-size: 22px;
  margin: 0 0 12px;
}

.muted { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

label { display: block; font-size: 13px; font-weight: 600; margin: 20px 0 8px; }

input[type="email"], input[type="text"], input[type="number"], textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
}

textarea { min-height: 90px; resize: vertical; }

button, .btn {
  display: inline-block;
  background: var(--cta);
  color: #1a1200;
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
}

.btn-small {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  margin-top: 0;
}

.footer-links {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.flash {
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* App shell
   Grid statt absoluter Ueberlagerung: die mittlere Spalte traegt das Logo,
   die aeussere Spalte den Countdown - die Zeilenhoehe richtet sich dadurch
   automatisch nach dem hoechsten Element, nichts wird mehr abgeschnitten. */
.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--card-border);
}
.app-header .logo { grid-column: 1; justify-self: start; }
.app-header .header-side {
  grid-column: 3;
  justify-self: end;
}
.app-header .header-side.left { grid-column: 1; justify-self: start; }

.logo { font-weight: 800; font-size: 20px; }
.logo span { color: var(--accent); }

/* Firmenlogo oben links: helle/dunkle Version je nach Theme, siehe theme.js */
.logo-img { display: block; height: 36px; width: auto; }
.logo-img-light { display: none; }
:root[data-theme="dark"] .logo-img-dark { display: none; }
:root[data-theme="dark"] .logo-img-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .logo-img-dark { display: none; }
  :root[data-theme="system"] .logo-img-light { display: block; }
}

.countdown-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}

.countdown { display: flex; gap: 6px; }
.countdown .box {
  background: var(--countdown-bg);
  color: var(--accent);
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  min-width: 28px;
  text-align: center;
}
.countdown .unit { font-size: 9px; color: var(--text-muted); text-align: center; margin-top: 2px; }

/* Ab 3 Tagen vor Ablauf werden die Zahlen rot (Dringlichkeit), siehe
   Countdown-Script in base.html. */
.countdown.countdown-urgent .box { color: #e03131; }

.app-body { max-width: 900px; margin: 0 auto; padding: 24px 24px 100px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

.progress-bar-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin: 16px 0;
}
.progress-bar-fill { background: var(--accent); height: 100%; }

.search-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.course-cover {
  border-radius: 16px;
  padding: 24px;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(160deg, var(--from, #a855f7), var(--to, #1e1b2e));
  margin-bottom: 12px;
}
.course-cover h3 { margin: 0; font-size: 22px; }

.lesson-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.lesson-row::-webkit-details-marker { display: none; }

.lesson-panel { padding: 0 14px 16px; }

.video-embed-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  /* Kein border-radius/overflow:hidden hier auf dem Container - iOS Safari
     blendet dann die eigenen Video-Bedienelemente (Play/Lautstaerke/
     Vollbild) komplett aus, wenn ein <video> in einem so beschnittenen
     Container sitzt. Die Rundung sitzt stattdessen direkt am video/iframe
     selbst, siehe unten. */
  border-radius: 10px;
}
.video-embed-box iframe,
.video-embed-box video {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}
.video-embed-box video {
  /* Ohne object-fit zeigt der Browser das Poster-/Videobild standardmaessig
     "contain" (mit schwarzen Balken links/rechts, wenn das Bild nicht exakt
     im 16:9-Format ist). "cover" fuellt das ganze Feld randlos aus. */
  object-fit: cover;
}

/* Eigene, immer sichtbare Steuerleiste fuer eigene Videodateien (statt der
   nativen Browser-Steuerleiste, die sich je nach Geraet/Browser komplett
   unterschiedlich verhaelt - auf iOS Safari z. B. unsichtbar, auf manchen
   Android-Browsern erst nach einem Tap statt sofort). Siehe course.js fuer
   die Verdrahtung mit dem <video>-Element. */
.custom-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  border-radius: 0 0 10px 10px;
}
.cvc-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cvc-btn svg { display: block; }
.cvc-time {
  flex-shrink: 0;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
}
.cvc-seek {
  flex: 1;
  height: 4px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--cta);
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--cta);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}
.video-play-overlay svg { width: 24px; height: 24px; margin-left: 2px; display: block; }
.video-play-overlay.hidden { display: none; }

.video-play-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-4px, -84px);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.video-play-hint-text {
  font-weight: 800;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 1px;
  color: #ffffff;
  transform: rotate(-6deg);
  margin-bottom: -6px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.video-play-hint svg { display: block; }
.video-play-hint.hidden { display: none; }

.lesson-thumb {
  width: 60px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface-2);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.lesson-thumb-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.6;
}

.lesson-info { flex: 1; }
.lesson-title { font-size: 15px; font-weight: 600; }
.lesson-duration { font-size: 12px; color: var(--text-muted); }

.check {
  width: 26px; height: 26px; border-radius: 999px;
  border: 2px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: transparent;
  color: var(--text-muted);
  flex-shrink: 0;
}
.check.done { border-color: #22c55e; color: #22c55e; }

.lesson-locked { opacity: 0.55; }
.lesson-locked .lesson-title { color: var(--text-muted); }

.bottom-nav {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  display: flex;
  gap: 8px;
  padding: 8px;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 20px; border-radius: 999px; font-size: 12px; color: var(--text-muted);
}
.bottom-nav a.active { background: var(--surface-2); color: var(--accent); }

table.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--card-border); font-size: 14px; }

.admin-shell { max-width: 760px; margin: 0 auto; padding: 30px 24px 100px; }
.section-title { font-size: 18px; font-weight: 700; margin: 32px 0 8px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 140px; }
.row-actions { display: flex; gap: 8px; }
.danger { background: #3a1f24; color: #f87171; border: 1px solid #5c2b31; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 28px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
}
.stat-card .value { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.stat-card-conversion { border-color: var(--cta); }
.stat-card-conversion .value { color: var(--cta); }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
  margin: 16px 0 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 12px 8px;
}
.bar-chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.bar-chart .bar {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}
.bar-chart .bar-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
}

.period-switch {
  display: inline-flex;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px;
  margin: 10px 0 4px;
}
.period-switch a {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.period-switch a.active {
  background: var(--accent);
  color: #fff;
}

.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 0;
}
.theme-btn.active {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.theme-icon { font-size: 20px; }

/* --- Startseite: Hinweis-Banner, Lesezeichen-Kachel, Kurs-Raster --- */
.notice-card {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
}
.notice-icon { font-size: 20px; line-height: 1; }
.notice-title { font-weight: 700; }

.list-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0 8px;
}
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tile-title { font-weight: 700; }

.section-heading { font-size: 22px; font-weight: 800; margin: 32px 0 4px; }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.course-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}
.course-card-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, var(--from, #3b6fe8), var(--to, #050d2b));
}
.course-card-body { padding: 16px 18px 18px; }
.course-card-title { font-weight: 700; font-size: 17px; }
.course-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* --- Lektionsseite: Kapitel, Navigation, Lesezeichen --- */
.chapter-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  margin: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.chapter-item:hover { background: var(--surface-2); }
.chapter-time {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.lesson-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.bookmark-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 18px;
}
.bookmark-btn.active { border-color: var(--accent); }

/* --- Icons & Panels (Optik ans Vorbild angeglichen) --- */
.back-link svg,
.search-box svg,
.notice-icon svg,
.tile-icon svg { flex-shrink: 0; }

.search-box { display: flex; align-items: center; gap: 10px; }
.back-link svg { vertical-align: -3px; }

.notice-icon { color: var(--accent); display: flex; align-items: flex-start; }
.tile-icon { color: var(--accent); }

.check svg { display: block; }

.panel { max-width: 100%; margin-bottom: 16px; padding: 24px; }
.panel-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.panel-value { color: var(--text); font-weight: 600; }

.theme-btn svg { display: block; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  flex: 1;
}
.nav-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.bottom-nav a { gap: 4px; }
.bottom-nav a svg { display: block; }

/* Cover-Titel liegt immer auf dunklem Verlauf -> unabhaengig vom Theme hell halten */
.course-cover h3 { color: #fff; }

/* --- Lektionsseite: Kapitel-Ausklapper, Merken, Zusammenfassung, Fussleiste --- */
.lesson-body { padding-bottom: 120px; }

.chapters-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin-top: 20px;
  overflow: hidden;
}
.chapters-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.chapters-head::-webkit-details-marker { display: none; }
.chapters-chevron {
  display: flex;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.chapters-box[open] .chapters-chevron { transform: rotate(90deg); }
.chapters-label { font-weight: 700; font-size: 16px; }
.chapters-now {
  flex: 1;
  color: var(--text-muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chapters-now em { font-style: italic; }
.chapters-count { color: var(--text-muted); font-size: 14px; }
.chapters-list { padding: 0 10px 10px; }

.merken-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin: 16px 0 0;
  padding: 12px 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}
.merken-btn.active { color: var(--accent); border-color: var(--accent); }

.summary-box {
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 24px;
}
.summary-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.summary-text { margin: 0; line-height: 1.65; }

.lesson-bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--card-border);
  padding: 14px 24px;
}
.lesson-bottom-inner {
  display: flex;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* Bonus-Modul: Kachel mit Banderole und Freischalt-Button */
.course-card-cover-bonus { position: relative; overflow: hidden; }
.bonus-ribbon {
  position: absolute;
  top: 26%;
  left: -18%;
  width: 136%;
  transform: rotate(-12deg);
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.04em;
  padding: 8px 0;
}

/* Bonus-Landingpage: Ueberschrift, Video, ein zentraler CTA */
.bonus-page { text-align: center; max-width: 760px; }
.bonus-page .back-link { display: inline-flex; }
.bonus-headline {
  font-size: 30px;
  line-height: 1.25;
  margin: 12px 0 28px;
}
.bonus-video { margin: 0 auto; }
.bonus-cta {
  display: inline-block;
  width: auto;
  margin-top: 32px;
  padding: 16px 34px;
  font-size: 17px;
}
.bonus-hint { margin-top: 24px; }

/* CTA-Button direkt unter dem Video */
.lesson-cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 18px 34px;
  font-size: 17px;
}

.lesson-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lesson-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #16a34a;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.course-card-locked { opacity: 0.6; cursor: pointer; }

/* "Weiterlernen"-Karte auf Startseite & Kursseite */
.continue-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px;
  margin: 20px 0 8px;
}
.continue-thumb {
  width: 90px;
  height: 60px;
  border-radius: 10px;
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.continue-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 2px;
}
.continue-title { font-weight: 700; font-size: 15px; }

.lesson-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lesson-status-icon.locked { opacity: 0.8; }

.lesson-unlock-hint { text-align: center; font-size: 13px; margin-top: 20px; }

/* Hover-Effekt fuer Kurs-/Lektions-/Weiterlernen-Karten (Desktop mit Maus) */
.course-card,
.lesson-card,
.continue-card,
.list-tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) {
  .course-card:hover,
  .continue-card:hover,
  .list-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 20, 40, 0.08);
    border-color: var(--accent);
  }
  a.lesson-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 20, 40, 0.08);
    border-color: var(--accent);
  }
}

/* Mobile: Header etwas kompakter, Countdown selbst bleibt dick/gut lesbar
   (wie im Vorbild) - nicht kleiner als auf dem Desktop. */
@media (max-width: 480px) {
  .app-header { padding: 12px 14px; column-gap: 8px; }
  .logo { font-size: 16px; }
  .logo-img { height: 26px; }
  .app-header .header-side.countdown-widget {
    max-width: 150px;
  }
  .countdown-widget .countdown-label {
    font-size: 9px;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
  }
  .countdown-widget .countdown { gap: 6px; }
  .countdown-widget .countdown .box {
    min-width: 34px;
    padding: 7px 8px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    border-radius: 8px;
  }
  .countdown-widget .countdown .unit { font-size: 10px; margin-top: 3px; }
}

.bonus-locked-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  opacity: 0.6;
}

/* Info-Popup "Bonus noch gesperrt" (erscheint beim Klick auf eine gesperrte
   Bonus-Kachel im Dashboard) */
.bonus-locked-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 30, 0.6);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
.bonus-locked-modal-overlay.open { display: flex; }
.bonus-locked-modal-box {
  width: 100%;
  max-width: 380px;
  margin: auto;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.bonus-locked-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bonus-locked-modal-icon svg { width: 24px; height: 24px; }
.bonus-locked-modal-title { font-size: 19px; margin: 0 0 12px; }
.bonus-locked-modal-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.bonus-locked-modal-remaining { font-weight: 700; margin: 0 0 20px; }
.bonus-locked-modal-close { margin-top: 0; }

/* Beratungsgespraech-Popup (ActiveCampaign-Formular) */
.ac-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 30, 0.6);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
}
.ac-modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
.ac-modal-box {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: auto;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
/* Das AC-Formular ist als heller Embed gebaut. Unsere globale Dark-Mode-
   Formatierung fuer input/textarea (siehe oben) wuerde sonst den
   Hintergrund abdunkeln, waehrend AC per !important selbst dunklen Text
   erzwingt - dadurch waere die Schrift unlesbar. Deshalb hier immer
   hell erzwingen, unabhaengig vom gewaehlten Theme. */
.ac-modal-box input[type="text"],
.ac-modal-box input[type="tel"],
.ac-modal-box input[type="date"],
.ac-modal-box textarea {
  background: #ffffff;
  color: #142341;
}
.ac-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: auto;
  margin: 0;
  padding: 4px 10px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  z-index: 1;
}

/* Kompakte Nutzerliste im Admin-Bereich (statt einer grossen Karte pro
   Nutzer) - ein Klick auf eine Zeile fuehrt zur Detailseite. */
.admin-user-list {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}
.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  transition: background 0.12s ease;
}
.admin-user-row:last-child { border-bottom: none; }
@media (hover: hover) {
  .admin-user-row:hover { background: var(--surface-2); }
}
.admin-user-row-main { flex: 1; min-width: 0; }
.admin-user-row-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-row-sub {
  font-size: 12.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-badge {
  display: inline-block;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
}
.admin-user-badge-booked { background: #dcfce7; color: #16a34a; }
:root[data-theme="dark"] .admin-user-badge-booked { background: #123626; color: #4ade80; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .admin-user-badge-booked { background: #123626; color: #4ade80; }
}
.admin-user-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.avatar-c1 { background: #3b6fe8; }
.avatar-c2 { background: #7c5cff; }
.avatar-c3 { background: #e0559a; }
.avatar-c4 { background: #14ab8c; }
.avatar-c5 { background: #ff9900; }
.avatar-c6 { background: #4a5578; }
