:root {
  --bg: #030303;
  --bg-panel: rgba(255, 255, 255, 0.035);
  --bg-panel-2: rgba(255, 255, 255, 0.028);
  --bg-panel-3: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.065);
  --accent: #5abdf6;
  --accent-bright: #8fd4fa;
  --accent-dark: #2e9de0;
  --accent-glow: rgba(90, 189, 246, 0.32);
  --font-body: "Inter", "Segoe UI", ui-sans-serif, system-ui, Roboto, -apple-system, sans-serif;
  --font-display: "Orbitron", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --teal: #5fd4c4;
  --teal-bright: #8fe6da;
  --teal-glow: rgba(95, 212, 196, 0.24);
  --gold: #e8b866;
  --gold-bright: #f3cd8c;
  --gold-dark: #c9962f;
  --gold-glow: rgba(232, 184, 102, 0.24);
  --text: #f2f2f5;
  --text-muted: #9997a6;
  --text-faint: #686773;
  --success: #6ee7a8;
  --success-glow: rgba(110, 231, 168, 0.22);
  --error: #f38ba0;
  --error-glow: rgba(243, 139, 160, 0.22);
  /* Plattform-Markenfarben - fuer die Discord-/Twitch-Seiten, statt ueberall nur
     die eine Akzentfarbe zu nutzen (echtes Discord-Blurple/Twitch-Violett). */
  --discord: #5865f2;
  --discord-bright: #8b93f8;
  --discord-glow: rgba(88, 101, 242, 0.3);
  --twitch: #9146ff;
  --twitch-bright: #b98bff;
  --twitch-glow: rgba(145, 70, 255, 0.3);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 26px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(139, 143, 245, 0.2), 0 0 18px -6px var(--accent-glow);
  --glass-blur: blur(8px) saturate(130%);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --glow-blue: 0 0 24px rgba(80, 180, 240, 0.35), 0 0 48px rgba(80, 180, 240, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.icon {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    /* 0s statt 0.001ms: mit einer Dauer > 0 (und transition-property "all" als Standard) wurde
       JEDE Stilaenderung auf jedem Element zur Transition - ueber tausend auf einmal bei einem
       Theme-Wechsel. Bei 0s entsteht gar keine, sichtbar ist beides gleich. */
    transition-duration: 0s !important;
  }
}

::selection {
  background: rgba(139, 143, 245, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a2a33;
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a46;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 15% -10%, rgba(139, 143, 245, 0.14), transparent 65%),
    radial-gradient(45% 40% at 100% 0%, rgba(95, 212, 196, 0.08), transparent 60%);
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Fixe Ambient-Deko hinter dem gesamten Dashboard - portiert aus .landing-bg (landing.css),
   gleiche Werte (dort schon bewaehrt): dezentes Punktraster + zwei driftende Blau-Glows.
   .layout hat bereits position:relative/z-index:1, exakt das Muster, das .landing/.landing-bg
   nutzen - kein Ueberlappungsrisiko mit echtem Content. */
.dashboard-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(90, 189, 246, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

@keyframes dashboardDriftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, 5vh) scale(1.12); }
}
@keyframes dashboardDriftB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-5vw, -4vh) scale(1.06); }
}

.dashboard-bg::before,
.dashboard-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(180px);
}
.dashboard-bg::before {
  width: 60vmax;
  height: 60vmax;
  top: -15vmin;
  left: -12vw;
  background: radial-gradient(circle, rgba(90, 189, 246, 0.06), transparent 140%);
  animation: dashboardDriftA 20s ease-in-out infinite alternate;
}
.dashboard-bg::after {
  width: 55vmax;
  height: 55vmax;
  top: 10vh;
  right: -12vw;
  background: radial-gradient(circle, rgba(90, 189, 246, 0.04), transparent 140%);
  animation: dashboardDriftB 22s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-bg::before,
  .dashboard-bg::after {
    animation: none;
  }
}

a {
  color: var(--accent-bright);
  transition: color 0.15s var(--ease);
}
a:hover {
  color: var(--text);
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 244px;
  background: linear-gradient(180deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  border-radius: var(--radius);
  box-shadow: none;
  padding: 18px 12px;
  margin: 12px 0 12px 12px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  z-index: 10;
  transition: width 0.2s var(--ease), padding 0.2s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.brand-text-wrap {
  flex: 1;
  min-width: 0;
}

.sidebar-collapse-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: none;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-panel-3);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.sidebar.collapsed {
  width: 76px;
}

.sidebar.collapsed .brand-text-wrap,
.sidebar.collapsed .label-text,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .logout .who {
  display: none;
}

.sidebar.collapsed .brand {
  justify-content: center;
}

.sidebar.collapsed .sidebar-collapse-btn {
  transform: rotate(180deg);
}

.sidebar.collapsed nav a {
  justify-content: center;
}

.brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(90, 189, 246, 0.3), rgba(90, 189, 246, 0.08));
  border: 1px solid rgba(90, 189, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.brand:hover .brand-icon {
  transform: scale(1.06);
  border-color: var(--accent);
}

.brand .brand-text {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand .brand-text small {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section {
  margin: 10px 0 3px;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.nav-section:first-child {
  margin-top: 2px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 11px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  position: relative;
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.nav-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.sidebar nav a.active .nav-count {
  background: rgba(90, 189, 246, 0.22);
  color: var(--accent-bright);
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-soft);
  color: var(--text);
}

.sidebar nav a .nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.sidebar nav a:hover .nav-icon {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-soft);
}

.sidebar nav a.active {
  background: rgba(90, 189, 246, 0.12);
  border-color: rgba(90, 189, 246, 0.25);
  color: var(--accent-bright);
  font-weight: 600;
  box-shadow: none;
}

.sidebar nav a.active .nav-icon {
  background: rgba(90, 189, 246, 0.18);
  border-color: rgba(90, 189, 246, 0.3);
  box-shadow: none;
}

/* Schmaler, leuchtender Indikator-Balken am aktiven Nav-Eintrag - uebliches Muster moderner
   Sidebars (Vercel/Linear-artig), macht den aktiven Eintrag auf einen Blick erkennbar statt
   sich nur ueber Hintergrundfarbe zu unterscheiden. */
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.sidebar.collapsed nav a.active::before {
  display: none;
}


.sidebar-home-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  margin-top: 10px;
  border-radius: 11px;
  color: var(--text-faint);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

/* Owner-Panel-Sidebar hat kein .sidebar-upgrade-Element, das "Zum Dashboard" + Profil-Karte
   sonst per margin-top:auto ans Ende schiebt (siehe .sidebar-upgrade) - hier uebernimmt das
   dieser eigene Modifier, ohne die geteilte .sidebar-home-link-Regel fuer die Kunden-Sidebar
   anzufassen. */
.sidebar-home-link-bottom {
  margin-top: auto;
}

.sidebar-home-link .nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.sidebar-home-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-soft);
  color: var(--text);
}

.sidebar-home-link:hover .nav-icon {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-soft);
}

.sidebar.collapsed .sidebar-home-link {
  justify-content: center;
}

.sidebar-upgrade {
  margin-top: auto;
  padding-top: 14px;
}

.sidebar-upgrade-card {
  position: relative;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  box-shadow: none;
  transition: border-color 0.2s var(--ease);
}

.sidebar-upgrade-card:hover {
  border-color: #8fd4fa40;
}

.sidebar-upgrade .btn {
  position: relative;
  width: 100%;
  justify-content: center;
}

.sidebar .logout {
  margin-top: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}

.sidebar .logout .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-panel-3);
}

.sidebar .logout .avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar .logout .who {
  min-width: 0;
  flex: 1;
}

.sidebar .logout .who .name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-open-btn {
  margin-top: 2px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-faint);
  cursor: pointer;
  box-shadow: none;
}
.profile-open-btn:hover {
  color: var(--accent);
  background: none;
  box-shadow: none;
  transform: none;
}

/* ---------- Dashboard-Navbar (references01/dashboard-navbar, 1:1 uebernommen) ----------
   Eigene .dash-*-Klassen statt der alten .sidebar-*-Klassen oben - die alten Regeln bleiben
   unangetastet, da partials/ownerSidebar.ejs sie weiterhin nutzt. Werte wortwoertlich aus der
   Referenz-CSS uebernommen; .dash-collapsed (Referenz-Trigger) wurde auf .collapsed uebersetzt,
   damit das bestehende sidebar.js ohne Aenderung weiterfunktioniert. */

.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(155deg, #101b25, #080e14 65%);
  border-right: 1px solid #a4dcff1c;
  padding: 20px 13px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
  transition: width 0.2s var(--ease);
}

.dash-brand {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0 3px 22px;
  border-bottom: 1px solid #ffffff15;
  min-height: 71px;
}
.dash-brand > img {
  width: 31px;
  height: 37px;
  filter: drop-shadow(0 0 9px #9cdaff44);
}
.dash-brand > div {
  flex: 1;
  min-width: 0;
}
.dash-brand > div > img {
  width: 94px;
  height: 25px;
  display: block;
}
.dash-brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #6d8aa1;
  margin-top: 2px;
}

.dash-collapse {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a4dcff22;
  background: #ffffff04;
  border-radius: 7px;
  height: 28px;
  min-width: 28px;
  color: #8daac0;
  font-size: 20px;
  line-height: 1;
}
.dash-collapse:hover {
  border-color: #a4dcff55;
  color: #d3e9f9;
}

.dash-menu {
  padding-top: 18px;
}
.dash-group {
  margin-bottom: 17px;
}
.dash-group-title {
  display: block;
  padding: 0 13px 7px;
  color: #658196;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.dash-group a {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: #92a8bb;
  font-size: 13px;
  padding: 9px 12px;
  text-align: left;
  text-decoration: none;
  margin: 2px 0;
  white-space: nowrap;
}
.dash-group a:hover {
  background: #a4dcff08;
  color: #d3e9f9;
}
.dash-group a[aria-current="page"] {
  background: linear-gradient(90deg, #8bc9ef18, #8bc9ef07);
  border-color: #a4dcff28;
  color: #c5e8ff;
}
.dash-icon {
  width: 19px;
  min-width: 19px;
  height: 19px;
}

/* Aufklappbarer Menuepunkt (OBS -> Szenen / Alerts / Widgets / Overlays). Der Toggle ist ein
   Button im exakten Look der normalen Links; die Unterpunkte haengen an einer feinen Linie. */
.dash-group .dash-sub-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: #92a8bb;
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  text-align: left;
  margin: 2px 0;
  white-space: nowrap;
  cursor: pointer;
  /* Globale button-Regel (Glow-Schatten, Anheben beim Hover, fette Schrift) neutralisieren. */
  box-shadow: none;
  transform: none;
  font-weight: inherit;
  letter-spacing: inherit;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.dash-group .dash-sub-toggle:hover {
  background: #a4dcff08;
  color: #d3e9f9;
  box-shadow: none;
  transform: none;
}
.dash-group .dash-sub-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #a4dcff40;
}
.dash-group .dash-sub-toggle[aria-current="page"] {
  background: linear-gradient(90deg, #8bc9ef18, #8bc9ef07);
  border-color: #a4dcff28;
  color: #c5e8ff;
}
.dash-sub-arrow {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0.7;
  transition: transform 220ms ease;
}
.dash-sub.open .dash-sub-arrow {
  transform: rotate(180deg);
}
.dash-sub-list {
  display: none;
  flex-direction: column;
  margin: 0 0 6px 21px;
  padding-left: 10px;
  border-left: 1px solid #a4dcff1f;
}
.dash-sub.open .dash-sub-list {
  display: flex;
}
.dash-group .dash-sub-list a {
  min-height: 32px;
  padding: 6px 10px;
  gap: 9px;
  font-size: 12.5px;
  margin: 1px 0;
}
.dash-sub-dot {
  width: 6px;
  min-width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f6a80;
  transition: background 160ms ease, box-shadow 160ms ease;
}
.dash-group .dash-sub-list a:hover .dash-sub-dot {
  background: #92a8bb;
}
.dash-group .dash-sub-list a[aria-current="page"] .dash-sub-dot {
  background: #8bc9ef;
  box-shadow: 0 0 8px #8bc9ef;
}
.dash-sidebar.collapsed .dash-sub-list,
.dash-sidebar.collapsed .dash-sub-arrow {
  display: none;
}
.dash-sidebar.collapsed .dash-group .dash-sub-toggle {
  justify-content: center;
  padding: 10px 0;
}

.dash-bottom {
  margin-top: auto;
  padding: 20px 4px 0;
}
.dash-account-links {
  border-top: 1px solid #a4dcff13;
  padding: 12px 0;
}
.dash-plan,
.dash-home {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 39px;
  margin: 2px 0;
  padding: 10px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #90a6b8;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.4;
}
.dash-plan:hover,
.dash-home:hover {
  background: #a4dcff08;
  color: #d3e7f5;
}
.dash-plan[aria-current="page"] {
  background: #a4dcff0b;
  color: #cceaff;
}
.dash-bottom .dash-icon {
  width: 17px;
  min-width: 17px;
  height: 17px;
  color: #6f8fa6;
}
.dash-profile {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 0;
  padding: 15px 7px 2px;
  border: 0;
  border-top: 1px solid #a4dcff13;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #c9dce9;
  text-align: left;
}
.dash-profile:focus-visible,
.dash-collapse:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dash-avatar {
  width: 31px;
  height: 31px;
  min-width: 31px;
  border-radius: 8px;
  border: 1px solid #93b9d126;
  background: linear-gradient(140deg, #203242, #111e28);
  color: #a7c7de;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 11px;
}
.dash-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dash-profile b {
  font-size: 12px;
  font-weight: 500;
  color: #c0d3e1;
}
.dash-profile small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1px;
  color: #637f94;
  margin-top: 5px;
}
.dash-profile-arrow {
  margin-left: auto;
  font-size: 19px;
  color: #6d8ba1;
}
.dash-profile:hover b {
  color: #e1f3ff;
}

.dash-sidebar.collapsed {
  width: 74px;
}
.dash-sidebar.collapsed .dash-label,
.dash-sidebar.collapsed .dash-group-title,
.dash-sidebar.collapsed .dash-brand > div,
.dash-sidebar.collapsed .dash-brand > img,
.dash-sidebar.collapsed .dash-profile-arrow {
  display: none;
}
.dash-sidebar.collapsed .dash-brand {
  justify-content: center;
}
.dash-sidebar.collapsed .dash-group a,
.dash-sidebar.collapsed .dash-home,
.dash-sidebar.collapsed .dash-plan,
.dash-sidebar.collapsed .dash-profile {
  justify-content: center;
  padding: 10px 0;
}
.dash-sidebar.collapsed .dash-profile {
  padding-top: 14px;
}

@media (max-width: 900px) {
  .dash-sidebar {
    width: 72px;
    padding: 18px 10px;
  }
  .dash-label,
  .dash-group-title,
  .dash-brand > div,
  .dash-collapse {
    display: none;
  }
  .dash-brand {
    justify-content: center;
    padding-bottom: 18px;
  }
  .dash-group a,
  .dash-home,
  .dash-plan,
  .dash-profile {
    justify-content: center;
    padding: 10px 0;
  }
}

/* ---------- Profil-Popup ---------- */

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s var(--ease) both;
}
.profile-modal-backdrop[hidden] {
  display: none;
}

.profile-modal {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 18px;
  margin: 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  animation: fadeInUp 0.2s var(--ease) both;
}

.profile-modal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.profile-modal-header .avatar,
.profile-modal-header .avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-modal-header .avatar {
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-panel-3);
}

.profile-modal-header .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.profile-modal-title-wrap {
  flex: 1;
  min-width: 0;
}

.profile-modal-title-wrap #profile-modal-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-modal-subtitle {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.profile-modal-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-3);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
}
.profile-modal-close:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-panel-3);
  box-shadow: none;
  transform: none;
}

.profile-modal-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.profile-tab-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: calc(var(--radius-sm) - 3px);
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
.profile-tab-btn:hover {
  color: var(--text);
  background: var(--bg-panel-3);
  box-shadow: none;
  transform: none;
}
.profile-tab-btn.active {
  background: linear-gradient(120deg, rgba(90, 189, 246, 0.26), rgba(90, 189, 246, 0.1));
  border-color: rgba(90, 189, 246, 0.35);
  color: var(--accent-bright);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px -4px rgba(90, 189, 246, 0.6);
}

.profile-modal-body {
  position: relative;
  z-index: 1;
  min-height: 46px;
}

.profile-tab-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.profile-tab-panel.active {
  display: flex;
}

.profile-tab-panel .btn {
  width: 100%;
  justify-content: center;
}

.profile-language-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: #ffffff06;
  border: 1px solid var(--border-soft);
  box-shadow: none;
  transition: border-color 0.15s var(--ease);
}

.profile-language-form:hover {
  border-color: rgba(90, 189, 246, 0.3);
}

.profile-language-form label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-language-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(90, 189, 246, 0.15);
  color: var(--accent-bright);
}

.profile-language-form select {
  width: auto;
  padding: 5px 28px 5px 10px;
  font-size: 0.8rem;
}

.profile-redeem-form {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.profile-redeem-form input {
  flex: 1;
  min-width: 0;
}

.profile-redeem-form .btn {
  flex-shrink: 0;
  width: auto;
}

/* ---------- Zuschnitt-Modal (mediaCrop.js) ---------- */
/* Gleiches Glass-Panel-Muster wie .profile-modal-*, nur breiter/hoeher fuer die
   Cropper.js-Arbeitsflaeche. */

.crop-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.15s var(--ease) both;
}
.crop-modal-backdrop[hidden] {
  display: none;
}

.crop-modal {
  width: 100%;
  max-width: 620px;
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 18px;
  margin: 16px;
  animation: fadeInUp 0.2s var(--ease) both;
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.crop-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.crop-modal-close:hover {
  color: var(--text);
}

.crop-modal-stage {
  width: 100%;
  max-height: 58vh;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-panel-3);
}

.crop-modal-stage img {
  display: block;
  max-width: 100%;
}

.crop-modal-progress {
  margin-top: 14px;
}

.crop-modal-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-panel-3);
  overflow: hidden;
}

.crop-modal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s var(--ease);
}

.crop-modal-progress-text {
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.crop-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- Main ---------- */

.main {
  flex: 1;
  padding: 40px 48px 64px;
  max-width: 1160px;
  min-width: 0;
}

.page-header {
  margin: 0 0 32px;
  padding: 26px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 140% at 100% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.page-header > * {
  position: relative;
  z-index: 1;
}

.page-header-title {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.page-header-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(90, 189, 246, 0.3), rgba(90, 189, 246, 0.1));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--accent-bright);
}

.main h2,
.page-header h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  animation: fadeInUp 0.3s var(--ease) both;
}

.main h2 .grad {
  color: var(--text);
}

.page-subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
  animation: fadeInUp 0.3s var(--ease) both;
}

.filters.tab-bar a {
  font-weight: 600;
}

.filters .count {
  opacity: 0.6;
  margin-left: 2px;
}

/* ---------- Farbige Initialen-Avatare (Subscriber-/Teilnehmerlisten) ---------- */

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-bright);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(90, 189, 246, 0.25), rgba(90, 189, 246, 0.05));
  border: 1px solid rgba(90, 189, 246, 0.25);
  transition: box-shadow 0.15s var(--ease);
}

tbody tr:hover .avatar-circle {
  box-shadow: 0 0 14px rgba(90, 189, 246, 0.3);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell .user-name {
  font-weight: 600;
  color: var(--text);
}

.user-cell .user-sub {
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: 1px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.section-title .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.section-title h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.section-title .desc {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 400;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin: 0 0 28px;
}

/* Flach statt Glassmorphism - 1:1 an .feature-card der Homepage angelehnt (landing.css):
   einfacher dunkler Verlauf, duenner Rand, nur Anheben beim Hover. Kein Blur/kein Glow-Sweep
   mehr - das vorherige schwere Glas-plus-Leucht-Overlay-Muster ist der generische
   "Standard-SaaS-Dashboard"-Look, den wir bewusst nicht mehr wollen. */
.card {
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  animation: fadeInUp 0.3s var(--ease) both;
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #8fd4fa55;
}
@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}

/* Auf-/zuklappbare Karten (Joghurt World "Challenges"-Tab u.ae.) - natives <details>/<summary>
   statt eigenem JS, styled wie eine normale .card. Der native Dreiecks-Marker wird entfernt,
   stattdessen ein eigenes Chevron-Icon, das sich beim Oeffnen um 90 Grad dreht. */
details.card {
  padding: 18px 22px;
}

details.card > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

details.card > summary::-webkit-details-marker {
  display: none;
}

details.card > summary .chevron {
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
  color: var(--text-muted);
}

details.card[open] > summary .chevron {
  transform: rotate(90deg);
}

.challenge-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
}

.challenge-category-body {
  margin-top: 18px;
}

.challenge-item summary {
  font-weight: 600;
  font-size: 0.9rem;
}

.challenge-item-title {
  flex: 1;
}

.card .icon-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(90, 189, 246, 0.3), rgba(90, 189, 246, 0.08));
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--accent-bright);
}

.card .icon-badge.success {
  background: linear-gradient(135deg, rgba(110, 231, 168, 0.3), rgba(110, 231, 168, 0.08));
  border-color: rgba(110, 231, 168, 0.3);
  color: var(--success);
}

.card .icon-badge.error {
  background: linear-gradient(135deg, rgba(243, 139, 160, 0.3), rgba(243, 139, 160, 0.08));
  border-color: rgba(243, 139, 160, 0.3);
  color: var(--error);
}

.card .icon-badge.gold {
  background: linear-gradient(135deg, rgba(232, 184, 102, 0.3), rgba(232, 184, 102, 0.08));
  border-color: rgba(232, 184, 102, 0.3);
  color: var(--gold-bright);
}


.grid .card:nth-child(1) { animation-delay: 0.02s; }
.grid .card:nth-child(2) { animation-delay: 0.05s; }
.grid .card:nth-child(3) { animation-delay: 0.08s; }
.grid .card:nth-child(4) { animation-delay: 0.11s; }
.grid .card:nth-child(5) { animation-delay: 0.14s; }
.grid .card:nth-child(6) { animation-delay: 0.17s; }

.card .label {
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card .value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 9px;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.online,
.badge.live,
.badge.active {
  background: rgba(110, 231, 168, 0.14);
  color: var(--success);
}

.badge.online::before,
.badge.live::before,
.badge.active::before {
  animation: pulseDot 2s ease-in-out infinite;
}

.badge.offline,
.badge.inactive {
  background: rgba(153, 151, 166, 0.14);
  color: var(--text-muted);
}

.badge.error {
  background: rgba(243, 139, 160, 0.14);
  color: var(--error);
}

.badge.success {
  background: rgba(110, 231, 168, 0.14);
  color: var(--success);
}

.badge.gold {
  background: rgba(232, 184, 102, 0.14);
  color: var(--gold-bright);
}

.badge.accent {
  background: rgba(90, 189, 246, 0.14);
  color: var(--accent-bright);
}

.badge.teal {
  background: rgba(95, 212, 196, 0.14);
  color: var(--teal-bright);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ffffff15;
  box-shadow: none;
  animation: fadeInUp 0.3s var(--ease) both;
}

th,
td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.85rem;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

thead tr:hover {
  background: transparent;
}

tbody tr {
  cursor: default;
  transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

tbody tr:hover {
  background: rgba(90, 189, 246, 0.06);
  box-shadow: inset 3px 0 0 var(--accent);
}

tr:last-child td {
  border-bottom: none;
}

code {
  background: var(--bg-panel-3);
  border: 1px solid var(--border-soft);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.81rem;
  color: var(--accent-bright);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: #ffffff08;
  border: 1px solid #ffffff20;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.89rem;
  box-shadow: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

input[type="text"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
  border-color: #ffffff32;
  background: #ffffff0f;
}

/* Der native Options-Popup faellt in Chromium sonst auf helle System-Darstellung
   zurueck, egal was auf dem <select> selbst steht - color-scheme + explizite
   option-Farben erzwingen die dunkle Darstellung auch fuer die aufgeklappte Liste.
   Zusaetzlich wird der native (auf jeder Plattform unterschiedliche, meist sehr
   generisch wirkende) Pfeil durch einen eigenen, akzentfarbenen Chevron ersetzt -
   macht Dropdowns auf den ersten Blick als eigenstaendiges, gestaltetes Element
   erkennbar statt wie ein rohes Browser-Standardfeld. */
select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238fd4fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}

select option {
  background: #1c1c22;
  color: var(--text);
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(90, 189, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(90, 189, 246, 0.16);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

/* Nativer type="file"-Input faellt sonst komplett aus dem dunklen Theme (weisser
   System-Button + heller Dateiname-Text) - Container wie die anderen Inputs stylen,
   den Button-Teil ueber die ::file-selector-button-Pseudo-Klasse wie .btn aussehen lassen. */
input[type="file"] {
  width: 100%;
  background: #ffffff08;
  border: 1px solid #ffffff20;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #081019;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

input[type="file"]::file-selector-button:hover {
  background: var(--accent-bright);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

/* Buttons - 1:1 an die Homepage angelehnt (landing.css/.button), nicht nur an dieselben
   Farbvariablen: normale Gross-/Kleinschreibung statt Orbitron-Grossbuchstaben, Inter statt
   Orbitron, sanftes Anheben beim Hover statt Glow-Wechsel. Betrifft jeden Button/jedes
   Formular-Submit im gesamten Dashboard, da bare <button> mitgemeint ist. */
button,
.btn {
  background: #b9e5ff;
  color: #0a1b26;
  border: 1px solid transparent;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.86rem;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 22px rgba(138, 202, 255, 0.08);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

button:hover,
.btn:hover {
  background: #def2ff;
  color: #0a1b26;
  box-shadow: 0 5px 30px rgba(138, 202, 255, 0.16);
  transform: translateY(-2px);
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(90, 189, 246, 0.6);
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
}

.btn.secondary {
  background: #ffffff04;
  border: 1px solid #ffffff20;
  color: var(--text);
  box-shadow: none;
}
.btn.secondary:hover {
  background: #ffffff09;
  border-color: rgba(90, 189, 246, 0.4);
  box-shadow: none;
  transform: translateY(-2px);
}

.btn.danger {
  background: #f9dde2;
  color: #4a0f1a;
  box-shadow: 0 2px 22px rgba(243, 139, 160, 0.1);
}
.btn.danger:hover {
  background: #fceaee;
  box-shadow: 0 5px 30px rgba(243, 139, 160, 0.2);
}

/* Owner-Panel: Konto loeschen. */
.danger-zone { box-shadow: 0 0 0 1px var(--error-glow), var(--shadow-md, none); }
.danger-list { margin: 0 0 14px; padding-left: 18px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.danger-form { display: flex; flex-direction: column; gap: 8px; max-width: 440px; margin-top: 6px; }
.danger-form label { margin-bottom: 0; }
.danger-form .btn { align-self: flex-start; }

.btn.small {
  padding: 7px 14px;
  font-size: 0.78rem;
  box-shadow: none;
}

.inline-form {
  display: inline-block;
  margin: 0 4px 0 0;
}

.obs-import-form {
  display: block;
  margin: 8px 0 14px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: fadeInUp 0.25s var(--ease) both;
}

.support-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 171, 107, 0.1);
  border: 1px solid rgba(255, 171, 107, 0.3);
  color: #ffab6b;
  font-size: 0.82rem;
}
.support-mode-banner span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.support-mode-banner form {
  flex-shrink: 0;
}

.alert.success {
  background: rgba(110, 231, 168, 0.1);
  color: #8ff0bb;
  border-color: rgba(110, 231, 168, 0.25);
}

.alert.error {
  background: rgba(243, 139, 160, 0.1);
  color: #f6a5b6;
  border-color: rgba(243, 139, 160, 0.25);
}

.alert.success::before {
  content: "✓";
  font-weight: 800;
}
.alert.error::before {
  content: "!";
  font-weight: 800;
}

/* Speicher-/Fehler-Bestaetigungen (.alert.success/.alert.error nach einem Redirect) werden
   von alertToast.js hierher verschoben statt im Seitenfluss zu stehen - bleiben so sichtbar,
   egal wie weit runtergescrollt wurde, statt nach einem Upload weit unten auf der Seite
   uebersehen zu werden. */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}
.toast-stack .alert {
  margin-bottom: 0;
  padding-right: 34px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  position: relative;
  animation: toastIn 0.3s var(--ease) both;
}
.toast-stack .alert.is-leaving {
  animation: toastOut 0.25s var(--ease) both;
}
.toast-close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast-stack .alert {
    animation: fadeIn 0.2s var(--ease) both;
  }
  .toast-stack .alert.is-leaving {
    animation: none;
  }
}
@media (max-width: 560px) {
  .toast-stack {
    left: 12px;
    right: 12px;
    top: 12px;
    max-width: none;
  }
}

/* ---------- Public / login pages ---------- */

.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.center-page > .icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.center-page h1,
.center-page p,
.center-page .btn {
  animation: fadeInUp 0.3s var(--ease) both;
}
.center-page p {
  animation-delay: 0.04s;
}
.center-page .btn {
  animation-delay: 0.08s;
}

.center-page h1 {
  margin-bottom: 8px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.center-page > .icon.icon-accent {
  border-radius: 18px;
  background: radial-gradient(circle at 35% 30%, rgba(90, 189, 246, 0.22), rgba(90, 189, 246, 0.04) 70%);
  border: none;
  color: var(--accent-bright);
  box-shadow: 0 0 26px -2px rgba(90, 189, 246, 0.35);
}

.tenant-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
  width: 100%;
  max-width: 360px;
  animation: fadeInUp 0.3s var(--ease) both;
  animation-delay: 0.06s;
}

.tenant-select-form {
  width: 100%;
}

.tenant-select-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-2);
  border: 1px solid var(--border-soft);
  box-shadow: none;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.tenant-select-card:hover {
  background: var(--bg-panel-3);
  border-color: #8fd4fa55;
  transform: translateY(-2px);
  color: var(--text);
}

.tenant-select-name {
  flex: 1;
}

.tenant-select-arrow {
  display: flex;
  color: var(--text-faint);
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}

.tenant-select-card:hover .tenant-select-arrow {
  color: var(--accent-bright);
  transform: translateX(2px);
}

.onboarding-progress {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  animation: fadeInUp 0.3s var(--ease) both;
}

.center-page p {
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.55;
}

/* Pulsierender roter Punkt - "live"-Indikator, geteilt von mehreren Overlays
   (overlaySubMarathon.ejs, overlayStatus.ejs), nicht landing-page-exklusiv. */
.live-dot {
  background: var(--error);
  animation: pulseDot 2s ease-in-out infinite;
}

/* Free/Pro/Lifetime-Preiskarten - genutzt von onboardingPlan.ejs (Tarif-Auswahl beim
   Einrichten) und upgrade.ejs (Dashboard-Upgrade). Identische Klassen/Optik wie das
   Preise-Segment der Startseite (landing.css) - bewusst dupliziert statt landing.css hier
   mitzuladen, da diese Seiten sonst ungenutzten Hero-/Nav-/Slider-Code mitschleppen wuerden;
   beide Stellen muessen bei einer kuenftigen Preis-Design-Aenderung gemeinsam angepasst
   werden. */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .price-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  position: relative;
  padding: 30px;
  border: 1px solid #ffffff15;
  border-radius: 12px;
  background: #0a0f14;
  text-align: left;
}
.price-card.featured {
  background: linear-gradient(#132432, #0b131b);
  border-color: #8dcaee70;
  box-shadow: 0 0 50px #7dccff0a;
}

.plan-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #788fa1;
}
.featured .plan-label {
  color: #b0d9f2;
}

.price-card h3 {
  font-size: 27px;
  margin: 20px 0;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text);
}

.price {
  font-size: 42px;
  letter-spacing: -2px;
  font-weight: 500;
  font-family: var(--font-body);
  white-space: nowrap;
  color: var(--text);
}
.price > span {
  font-size: 12px;
  letter-spacing: 0;
  color: #8298aa;
  padding-left: 9px;
}

.price-card > p {
  font-size: 14px;
  color: #8298aa;
  line-height: 1.6;
  margin: 15px 0 28px;
}

.price-card .button {
  width: 100%;
}
.price-card .checklist {
  margin-bottom: 0;
}

/* Eigene Button-Optik fuer die Preiskarten (normale Gross-/Kleinschreibung statt der
   Orbitron/Uppercase-.btn-Optik) - identisch zum Preise-Segment der Startseite. */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 15px 21px;
  border-radius: 7px;
  min-height: 51px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button:disabled {
  pointer-events: none;
}
.button.primary {
  background: #b9e5ff;
  color: #0a1b26;
  box-shadow: 0 2px 22px #8acaff13;
}
.button.primary:hover {
  background: #def2ff;
  box-shadow: 0 5px 30px #8acaff28;
}
.button.secondary {
  background: #ffffff04;
  border-color: #ffffff20;
  color: #dfe9f2;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 28px 0;
}
.checklist li {
  padding: 8px 0 8px 23px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: #a7b7c5;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #98bad0;
  font-size: 12px;
}

/* Widerrufs-Verzicht-Checkbox auf der Lifetime-Karte (Onboarding + Dashboard-Upgrade) -
   muss aktiv bestaetigt werden, bevor der Lifetime-Checkout ausgeloest werden kann
   (§ 356 Abs. 4 BGB, siehe onboarding.ts/admin.ts). */
.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-faint);
  cursor: pointer;
}
.consent-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.consent-checkbox a {
  color: var(--text-muted);
}
.consent-error {
  color: #f38ba0;
  font-size: 0.75rem;
  margin: -8px 0 14px;
}

.hidden {
  display: none !important;
}

/* Client-seitige Karten-Filter (Sound Alerts/Key Actions/Jumpscares nach Aktiviert/
   Deaktiviert, Sound Alerts zusaetzlich per Suche) - zwei unabhaengige Attribute statt
   direktem style.display, damit Such- und Status-Filter sich nicht gegenseitig
   ueberschreiben koennen (siehe statusFilter.js/soundAlertsSearch.js). */
[data-status-hidden="1"],
[data-search-hidden="1"] {
  display: none !important;
}

.filters {
  margin-bottom: 16px;
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  animation: fadeInUp 0.3s var(--ease) both;
}

.filters a,
.filters button {
  padding: 6px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 500;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.filters a:hover,
.filters button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: transparent;
}

.filters a.active,
.filters button.active {
  background: #b9e5ff;
  color: #0a1b26;
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 900px) {
  .sidebar {
    width: 72px;
    padding: 18px 10px;
  }
  .brand-text-wrap,
  .sidebar nav a span.label-text,
  .nav-section,
  .sidebar .logout .who,
  .sidebar-collapse-btn {
    display: none;
  }
  .brand {
    justify-content: center;
    padding-bottom: 18px;
  }
  .sidebar nav a {
    justify-content: center;
    padding: 11px;
  }
  .main {
    padding: 22px 18px 44px;
  }
}

/* Discord-Embed-Vorschau: mimt die echte Discord-Nachrichten-Optik nach (siehe embedPreview.js) */
.discord-embed-preview-wrap {
  flex: 1;
  min-width: 320px;
  max-width: 420px;
  /* Folgt der laengeren Formular-Spalte beim Scrollen, statt nach dem ersten Abschnitt
     zurueckzubleiben und darunter nur noch leere Flaeche zu zeigen. */
  position: sticky;
  top: 24px;
}
.discord-embed-preview-wrap .label {
  margin-bottom: 10px;
}
.discord-embed-preview-chat {
  background: #313338;
  border-radius: 10px;
  padding: 16px;
}
.discord-embed-preview-msgrow {
  display: flex;
  gap: 12px;
}
.discord-embed-preview-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  flex-shrink: 0;
}
.discord-embed-preview-body {
  min-width: 0;
  flex: 1;
}
.discord-embed-preview-botname {
  color: #f2f3f5;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.discord-embed-preview-botname .tag {
  background: #5865f2;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.discord-embed-preview {
  background: #2b2d31;
  border-left: 4px solid #8b5cf6;
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  gap: 14px;
  max-width: 100%;
}
.discord-embed-preview-main {
  min-width: 0;
  flex: 1;
}
.discord-embed-preview-author {
  color: #f2f3f5;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.discord-embed-preview-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  word-break: break-word;
}
.discord-embed-preview-desc {
  color: #dbdee1;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.discord-embed-preview-thumb {
  width: 74px;
  height: 74px;
  border-radius: 4px;
  object-fit: cover;
  background: #1e1f22;
  flex-shrink: 0;
}
.discord-embed-preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 10px;
  display: block;
}
.discord-embed-preview-footer {
  color: #949ba4;
  font-size: 0.72rem;
  margin-top: 10px;
}
.discord-embed-preview [hidden] {
  display: none !important;
}
.welcome-card-preview img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Doku-Bereich (/admin/docs) - linke Kategorie-Navigation + Suche, rechts der Inhalt. Erstes
   vertikales Nav-neben-Content-Layout im Panel (bisherige Multi-Tab-Seiten nutzen alle eine
   horizontale .filters-Leiste), daher eigene, neue Klassen statt Wiederverwendung. */
.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(135deg, #12181d, #0a0e11);
  border: 1px solid #ffffff15;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: none;
}

.docs-nav nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav nav a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.docs-nav nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.docs-nav nav a.active {
  background: rgba(90, 189, 246, 0.14);
  color: var(--accent-bright);
  box-shadow: inset 2px 0 0 var(--accent);
}

.docs-search {
  position: relative;
}

.docs-search input {
  width: 100%;
}

.docs-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 340px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid #ffffff15;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.docs-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
}

.docs-search-result:hover {
  background: rgba(255, 255, 255, 0.06);
}

.docs-search-result-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.docs-search-result-category {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.docs-search-empty {
  padding: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.docs-content {
  min-width: 0;
}

.docs-section {
  scroll-margin-top: 16px;
  margin-bottom: 28px;
}

.docs-section .card p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.6;
  margin: 0 0 10px;
}

.docs-section .card h4 {
  margin: 18px 0 8px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
}

.docs-section .card h4:first-child {
  margin-top: 0;
}

.docs-section .card p:last-child {
  margin-bottom: 0;
}

.docs-section .card code {
  font-size: 0.85em;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
  }

  .docs-nav nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Analytics-Dashboard: hand-geschriebene SVG-Charts (simpleChart.js) */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-gridline {
  stroke: var(--border-soft);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--text-faint);
  font-size: 10px;
  font-family: var(--font-body, inherit);
}

.chart-line {
  stroke-width: 2;
}

.chart-point {
  cursor: pointer;
}

.chart-point:hover {
  r: 4.5;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.74rem;
  color: var(--text);
  white-space: nowrap;
  transform: translate(-4px, -100%);
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.chart-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.chart-empty {
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
  padding: 48px 0;
}

/* Joghurt Cam: eigenstaendige Vollbild-Raumseite (kein Sidebar/Layout-Rahmen). */
.cam-room-page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cam-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.cam-room-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cam-room-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
}

.cam-tile {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cam-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam-tile-label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 2;
}

.cam-tile-mod-badge {
  color: var(--accent-bright, var(--accent));
  font-size: 0.68rem;
}

.cam-tile-points-badge {
  position: absolute;
  right: 10px;
  top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}

.cam-tile-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Minimalistische Icon-Toolbar statt Buttons mit Text+Geraete-Dropdowns immer sichtbar - die
   Geraete-Auswahl/der Anzeigename wandern ins ausklappbare cam-settings-panel darunter. */
.cam-toolbar {
  position: relative;
  display: flex;
  gap: 10px;
  align-self: center;
}

.cam-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cam-icon-btn:hover {
  border-color: var(--accent);
}

.cam-icon-btn.active {
  background: var(--accent);
  color: #081019;
  border-color: var(--accent);
}

.cam-settings-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg, 0 12px 30px rgba(0, 0, 0, 0.35));
  z-index: 5;
}

.cam-scoreboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.cam-scoreboard-row:last-child {
  border-bottom: none;
}

.cam-scoreboard-name {
  flex: 1;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cam-scoreboard-points {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

/* ---------- Creator Academy: aufklappbare Unter-Navigation ---------- */
/* Farben bewusst ueber currentColor/opacity statt fester Werte - die Tab-Leiste wird von
   apple.css (hell) und theme.css (dunkel) unterschiedlich eingefaerbt, ein fester Wert waere
   in genau einem der beiden Themes unsichtbar. */
.academy-tab-bar .academy-subnav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.academy-tab-bar .academy-subnav-toggle:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.academy-tab-bar .academy-subnav-toggle.open {
  /* Zeigt im offenen Zustand zurueck nach links - also auf die Richtung, in die der Klick die
     Leiste wieder einfaehrt. */
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent);
}
/* Seitliches Auf-/Zufahren ueber eine Grid-Spalte von 0fr auf 1fr: braucht keinen geratenen
   max-width-Wert, der bei laengeren Eintraegen irgendwann abschneiden wuerde. */
.academy-subnav {
  display: grid;
  grid-template-columns: 0fr;
  opacity: 0;
  /* Hebt im zugeklappten Zustand die gap der Tab-Leiste auf - sonst bliebe hinter dem Pfeil ein
     Rest Luft stehen, obwohl dort nichts mehr kommt. */
  margin-left: -4px;
  transition: grid-template-columns 0.26s var(--ease, ease), opacity 0.2s ease, margin-left 0.26s var(--ease, ease);
}
.academy-subnav.open {
  grid-template-columns: 1fr;
  opacity: 1;
  margin-left: 0;
}
@media (prefers-reduced-motion: reduce) {
  .academy-subnav,
  .academy-tab-bar .academy-subnav-toggle {
    transition: none;
  }
}
.academy-subnav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
/* Trennstrich als Flex-Kind statt als Rand/Padding des Containers: Padding und Border lassen
   sich nicht auf 0 schrumpfen und wuerden im zugeklappten Zustand als Rest stehen bleiben -
   ein Kind wird dagegen von overflow:hidden sauber mit weggeklappt. */
.academy-subnav-inner::before {
  content: "";
  flex: none;
  width: 1px;
  height: 20px;
  margin-right: 7px;
  background: color-mix(in srgb, currentColor 22%, transparent);
}

/* Fortschrittsbalken eines Meilensteins */
.milestone-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.milestone-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}

/* Nur fuer Screenreader sichtbar */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
