/* ═══════════════════════════════════════════════════
   PIOUSTRACK — STYLE
   Piouswood Solution · v3.0 (Stitch-faithful)
═══════════════════════════════════════════════════ */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

input, select, textarea {
  font-family: inherit;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  transition: border-color var(--duration-fast) var(--ease-out);
  width: 100%;
}
/* iOS-Zoom-Schutz: <16px Inputs erzwingen Auto-Zoom auf Mobile */
@media (max-width: 860px) {
  input, select, textarea { font-size: 16px; }
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
input::placeholder { color: var(--color-text-tertiary); }

/* ── App Shell ───────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}
.app-shell.no-sidebar { grid-template-columns: 1fr; }
.app-shell.no-sidebar .sidebar,
.app-shell.no-sidebar .topbar { display: none; }
.app-shell.no-sidebar .main { padding: 0; }

.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  background: var(--color-bg-base);
  border-right: 1px solid var(--color-border-default);
  display: flex;
  flex-direction: column;
  padding: 24px 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: var(--z-sidebar);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 28px;
  color: var(--color-accent);
}
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: 16px;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  position: relative;
  transition: all var(--duration-fast) var(--ease-out);
}
.nav-item::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--color-accent);
  border-radius: 0 2px 2px 0;
  transition: height var(--duration-fast) var(--ease-out);
}
.nav-item:hover { color: var(--color-text-primary); background: var(--color-bg-surface); }
.nav-item.active {
  color: var(--section-accent);
  background: var(--color-bg-surface);
}
.nav-item.active::before {
  height: 24px;
  background: var(--section-accent);
  box-shadow: 0 0 8px var(--section-accent-glow);
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: var(--weight-semi);
  font-size: var(--text-md);
  transition: all var(--duration-fast) var(--ease-out);
}
.sidebar-cta:hover {
  background: var(--color-accent-hover);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-accent);
}
.sidebar-cta svg { width: 16px; height: 16px; }

.sidebar-user {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  margin: 0 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: var(--weight-semi);
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent-border);
}
.user-meta { min-width: 0; }
.user-email {
  font-size: 12px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tier-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.08em;
  background: var(--color-accent-muted);
  color: var(--color-accent);
}
.tier-badge.free { background: var(--color-bg-elevated); color: var(--color-text-tertiary); }
.user-logout {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}
.user-logout svg { width: 16px; height: 16px; }
.user-logout:hover { color: var(--color-danger); background: var(--color-bg-elevated); }

/* ── Topbar ──────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 32px;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-bg-base);
  position: sticky;
  top: 0;
  z-index: 5;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
}
.breadcrumb a { color: var(--color-text-tertiary); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { color: var(--color-border-strong); }
.breadcrumb .current { color: var(--color-text-secondary); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-input {
  position: relative;
  width: 280px;
}
.burger-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  margin-right: 8px;
  flex-shrink: 0;
}
.burger-btn svg { width: 18px; height: 18px; }
.burger-btn:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
}
.search-input svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--color-text-tertiary);
  pointer-events: none;
}
.search-input input {
  padding: 8px 12px 8px 36px;
  font-size: var(--text-md);
  background: var(--color-bg-surface);
}
.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  transition: all var(--duration-fast) var(--ease-out);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }
.icon-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-slot-peak);
  box-shadow: 0 0 6px var(--color-slot-peak);
}

/* ── Main content ────────────────────────────────── */
.main {
  padding: var(--main-padding);
  min-width: 0;
  flex: 1;
}

.maintenance-banner {
  background: var(--neon-amber-muted);
  border: 1px solid var(--neon-amber);
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-amber);
  text-align: center;
}

/* ── Page Header ─────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 6px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  margin: 0;
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Split-Button (QR-Theme-Auswahl) ─────────────── */
.btn-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.btn-split .btn {
  border-radius: 0;
  border-right: 1px solid rgba(0,0,0,0.2);
}
.btn-split-arrow {
  border: none;
  border-radius: 0;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: 0 12px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  transition: background var(--duration-fast) var(--ease-out);
}
.btn-split-arrow:hover { background: var(--color-accent-hover); }
.btn-split-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn-split-menu button {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
}
.btn-split-menu button:hover { background: var(--color-surface-3); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-md);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-accent);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-text-inverse);
  box-shadow: 0 0 18px var(--color-accent-glow), 0 0 36px var(--color-accent-glow);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg-base), 0 0 0 4px var(--color-accent-glow);
}
.btn svg { width: 16px; height: 16px; }

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-default);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 14px var(--color-accent-glow);
  background: transparent;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  box-shadow: none;
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}
.btn-danger:hover { background: var(--color-danger-muted); box-shadow: none; }

/* ── Custom Dialog ─────────────────────────────── */
dialog.dlg {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  max-width: 440px;
  width: 90vw;
  padding: 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
dialog.dlg[open] { animation: dlg-in 0.18s ease-out; }
@keyframes dlg-in {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
dialog.dlg::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.dlg-content { padding: 24px; }
.dlg-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0 0 8px;
}
.dlg-danger .dlg-title { color: var(--color-danger); }
.dlg-message {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  margin: 0 0 16px;
  line-height: 1.5;
}
.dlg-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-md);
  font-family: inherit;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.dlg-input:focus { outline: none; border-color: var(--color-border-focus); }
.dlg-input-error {
  border-color: var(--color-danger) !important;
  animation: dlg-shake 0.3s ease;
}
@keyframes dlg-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.btn-sm { padding: 6px 14px; font-size: var(--text-base); }

/* ── Filter chips ────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.chip:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }
.chip.active { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-muted); }
.chip svg { width: 12px; height: 12px; }

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-6);
  align-items: center;
  flex-wrap: wrap;
}
.toolbar .search-input { flex: 1; max-width: 520px; }

.bulk-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}
.bulk-bar > span:first-child { flex: 1; color: var(--color-text-secondary); font-size: 13px; }

/* Session-Gruppenzeilen */
.set-group-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  border: none;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1.4;
}
.set-group-badge:hover { opacity: 0.8; }
.set-group-row td { background: var(--color-bg-elevated); }
.set-sub-row td { background: transparent; opacity: 0.75; font-size: 12px; }
.set-sub-row:hover td { opacity: 1; }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.search-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: var(--color-bg-surface); }
.search-title { font-size: 14px; font-weight: 500; color: var(--color-text-primary); }
.search-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.search-empty { padding: 16px; text-align: center; color: var(--color-text-tertiary); font-size: 13px; }

.data-table tbody tr:hover { background: var(--color-bg-elevated); }

/* Honeypot: visuell unsichtbar, aber Bots sehen das Feld */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Passwort-Stärke-Meter */
.pw-meter {
  display: block;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 6px 0 4px;
  overflow: hidden;
}
.pw-meter span {
  display: block; height: 100%; width: 0; transition: width .2s, background .2s;
}
.pw-meter.score-0 span { width: 10%; background: #d33; }
.pw-meter.score-1 span { width: 30%; background: #d33; }
.pw-meter.score-2 span { width: 55%; background: #e6b800; }
.pw-meter.score-3 span { width: 80%; background: #5cb85c; }
.pw-meter.score-4 span { width: 100%; background: #5cb85c; }
.pw-hint { font-size: 11px; margin-top: 2px; }

/* Consent-Checkboxen */
.form-group.consent { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.form-group.consent label.check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  width: 100%;
  margin-bottom: 0;
}
.form-group.consent label.check span {
  display: block;
  word-break: normal;
  white-space: normal;
}
.form-group.consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.form-group.consent a { color: var(--color-accent); }
/* Überschreibt evtl. globale Auth-Label-Styles (uppercase/mono) */
.form-group.consent label.check, .form-group.consent label.check span {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: var(--font-sans, inherit) !important;
  line-height: 1.5;
}

/* App-Footer — globale Legal-Links */
.app-foot {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--color-text-tertiary);
  background: var(--color-bg-base);
  border-top: 1px solid var(--color-border);
  z-index: 10;
  pointer-events: none;
}
.app-foot > * { pointer-events: auto; }
.app-foot a { color: var(--color-text-secondary); text-decoration: none; }
.app-foot a:hover { color: var(--color-accent); }
/* Auf Legal-Pages keinen globalen Footer (Legal-Page hat eigenen Foot) */
body:has([class*="legal-page"]) .app-foot { display: none; }
/* Auf Login-/Register-Seiten: Footer bleibt sichtbar — User braucht die Links VOR der Anmeldung */

/* Legal-Pages — standalone Layout ohne Sidebar */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  color: var(--color-text-primary);
}
.legal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.legal-brand { font-family: var(--font-mono); letter-spacing: 2px; color: var(--color-accent); text-decoration: none; }
.legal-back { color: var(--color-text-secondary); text-decoration: none; font-size: 14px; }
.legal-back:hover { color: var(--color-accent); }
.legal-content h1 { font-size: 28px; margin: 0 0 24px; }
.legal-content h2 { font-size: 18px; margin: 28px 0 12px; color: var(--color-accent); }
.legal-content p { line-height: 1.7; margin: 0 0 12px; color: var(--color-text-secondary); }
.legal-content ul { margin: 0 0 16px 24px; color: var(--color-text-secondary); line-height: 1.7; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--color-accent); }
.legal-content strong { color: var(--color-text-primary); }
.legal-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
}
.legal-foot a { color: var(--color-text-secondary); margin: 0 4px; }

/* Cookie-Banner — bottom-fixed, schmal, dezent */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; gap: 20px; align-items: center;
  z-index: 9999;
  box-shadow: 0 12px 36px rgba(0,0,0,.4);
}
.cookie-body { flex: 1; }
.cookie-body strong { display: block; font-size: 14px; margin-bottom: 4px; }
.cookie-body p { font-size: 12px; color: var(--color-text-secondary); margin: 0; }
.cookie-body a { color: var(--color-accent); }
.cookie-actions .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; }
}

#uploadZoneContainer.compact .upload-zone-card { padding: 16px 24px; }
#uploadZoneContainer.compact .upload-icon-wrap { display: none; }
#uploadZoneContainer.compact .upload-headline { font-size: 14px; margin: 0; }
#uploadZoneContainer.compact .upload-sub { font-size: 12px; margin: 4px 0 8px; }
#uploadZoneContainer.compact .upload-hint { font-size: 11px; margin: 4px 0 0; }

.kpi-card.empty .kpi-value, .kpi-card.empty .kpi-sub { color: var(--color-text-tertiary); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: calc(100% - 32px);
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
@media (min-width: 600px) {
  .modal { width: auto; min-width: 440px; }
}

.loc-map { height: 280px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); margin-bottom: 20px; }
.leaflet-container { background: var(--color-bg-elevated); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--color-bg-surface); color: var(--color-text-primary); }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card.featured { border-top: 2px solid var(--color-accent); }
.card-title {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-xl);
  margin: 0 0 4px;
}
.card-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  margin: 0 0 16px;
}
.compat-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -8px 0 12px;
}
.compat-legend span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── KPI Cards (Stitch-Style: Icon top-right) ─── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: var(--space-8);
}
.kpi-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}
.kpi-card.is-slot { border-top: 2px solid var(--color-slot-peak); }

.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
}
.kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kpi-card.is-slot .kpi-icon-wrap { background: var(--color-slot-peak-muted); color: var(--color-slot-peak); }
.kpi-icon-wrap svg { width: 16px; height: 16px; }

.kpi-value {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: var(--weight-semi);
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.kpi-card.is-slot .kpi-value {
  font-family: var(--font-body);
  font-size: 26px;
  color: var(--color-slot-peak);
}

.kpi-foot {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-success);
}
.kpi-delta.down { color: var(--color-danger); }
.kpi-delta svg { width: 10px; height: 10px; }

/* mini-KPI strip (Bibliothek) */
.kpi-row.mini { grid-template-columns: repeat(3, 1fr); }
.kpi-row.mini .kpi-card { min-height: 0; padding: 16px 20px; gap: 6px; }
.kpi-row.mini .kpi-value { font-size: 26px; }
.kpi-row.mini .kpi-icon-wrap { display: none; }

/* ── Upload Zone ─────────────────────────────────── */
.upload-zone-card {
  background: var(--color-bg-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.upload-zone-card:hover, .upload-zone-card.dragover {
  border-color: var(--color-accent);
  border-style: solid;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-accent);
}
.upload-zone-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.upload-icon-wrap svg { width: 26px; height: 26px; }
.upload-headline {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-3xl);
  margin: 0;
  letter-spacing: -0.01em;
}
.upload-sub {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--text-md);
}
.upload-sub strong { color: var(--color-text-primary); font-weight: var(--weight-medium); }
.upload-hint {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  margin: 4px 0 0;
}
.upload-cta { margin-top: 12px; pointer-events: none; }

.upload-info-details {
  margin-top: 12px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
}
.upload-info-details summary {
  padding: 10px 16px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  user-select: none;
}
.upload-info-details summary:hover { color: var(--color-text-primary); }
.upload-info-details[open] summary { border-bottom: 1px solid var(--color-border-default); }
.upload-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 16px;
}
.upload-info-section h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--color-accent);
  margin: 0 0 8px;
}
.upload-info-section dl { margin: 0; }
.upload-info-section dt {
  font-size: 12px;
  font-weight: var(--weight-semi);
  color: var(--color-text-primary);
  margin-top: 8px;
}
.upload-info-section dt:first-child { margin-top: 0; }
.upload-info-section dd {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.upload-zone-card.uploading {
  pointer-events: none;
  border-color: var(--color-accent);
}
.upload-progress-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.upload-progress-icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
  animation: upload-pulse 1.5s ease-in-out infinite;
}
.upload-progress-icon svg { width: 100%; height: 100%; }
@keyframes upload-pulse {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}
.upload-progress-status {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--color-text-primary);
  margin: 0;
}
.upload-progress-inline progress {
  -webkit-appearance: none;
  appearance: none;
  width: 80%;
  max-width: 360px;
  height: 4px;
  border: none;
  background: var(--color-bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.upload-progress-inline progress::-webkit-progress-bar { background: var(--color-bg-elevated); }
.upload-progress-inline progress::-webkit-progress-value { background: var(--color-accent); transition: width var(--duration-normal) var(--ease-out); }
.upload-progress-inline progress::-moz-progress-bar { background: var(--color-accent); }
.upload-progress-detail {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  margin: 0;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Section / Activity ─────────────────────────── */
.section {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  margin-top: var(--space-8);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border-default);
  min-height: 64px;
}
.section-title {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-xl);
  margin: 0;
}
.section-link {
  font-size: var(--text-md);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.section-link svg { width: 14px; height: 14px; }

/* Default size for inline icons (Buttons setzen ihre eigene Größe) */
.chip svg, .row-flex svg, .auth-checklist svg, .filter-pill svg, .dropdown-item svg { width: 12px; height: 12px; }
.col-slot-bar { width: 3px; }

.activity-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--color-border-default);
}
.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: var(--color-bg-elevated); }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}
.activity-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.activity-target {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
}
.activity-time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--color-text-tertiary);
  font-size: var(--text-md);
}

/* ── Badges & Pills ─────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge.lg { padding: 4px 10px; font-size: 11px; }
.badge-slot-morning { background: var(--color-slot-morning-muted); color: var(--color-slot-morning); }
.badge-slot-afternoon { background: var(--color-slot-afternoon-muted); color: var(--color-slot-afternoon); }
.badge-slot-sundowner { background: var(--color-slot-sundowner-muted); color: var(--color-slot-sundowner); }
.badge-slot-warmup { background: var(--color-slot-warmup-muted); color: var(--color-slot-warmup); }
.badge-slot-peak { background: var(--color-slot-peak-muted); color: var(--color-slot-peak); }
.badge-slot-after { background: var(--color-slot-after-muted); color: var(--color-slot-after); }
.badge-sw-serato { background: var(--color-sw-serato-muted); color: var(--color-sw-serato); }
.badge-sw-rekordbox { background: var(--color-sw-rekordbox-muted); color: var(--color-sw-rekordbox); }
.badge-sw-virtualdj { background: var(--color-sw-virtualdj-muted); color: var(--color-sw-virtualdj); }
.badge-sw-traktor { background: var(--color-sw-traktor-muted); color: var(--color-sw-traktor); }
.badge-cyan { background: var(--color-accent-muted); color: var(--color-accent); }
.badge-key {
  background: var(--color-slot-peak-muted);
  color: var(--color-slot-peak);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-semi);
}

/* ── Preview-Tracks ─────────────────────────────── */
.preview-row { opacity: 0.45; }
.preview-row:hover { opacity: 0.7; }
.badge-preview {
  background: var(--color-border);
  color: var(--color-text-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}
.preview-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}
.preview-toggle input { accent-color: var(--color-accent); cursor: pointer; }

/* ── Quick-stat pills ───────────────────────────── */
.quick-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-8); }
.quick-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--color-text-primary);
}
.quick-stat svg { width: 14px; height: 14px; color: var(--color-accent); }
.quick-stat .label { color: var(--color-text-secondary); }

/* ── Tables ──────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; }
@media (max-width: 768px) {
  .data-table th { padding: 10px 10px; font-size: 11px; }
  .data-table td { padding: 9px 10px; font-size: 13px; }
}
.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  position: sticky;
  top: 0;
}
.data-table th.sortable-header {
  cursor: pointer;
  user-select: none;
  padding-right: 24px;
  position: relative;
}
.data-table th.sortable-header:hover { color: var(--color-text-secondary); }
.data-table th.sortable-header::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.3;
}
.data-table th.sortable-header:hover::after { content: "▲"; opacity: 0.5; }
.data-table th.sortable-header[data-sort-dir="asc"]::after { content: "▲"; opacity: 1; color: var(--color-accent); }
.data-table th.sortable-header[data-sort-dir="desc"]::after { content: "▼"; opacity: 1; color: var(--color-accent); }

/* DJ-Score Karten */
.dj-score-card { text-align: center; padding: 24px 16px; }
.dj-score-icon { margin-bottom: 8px; width: 28px; height: 28px; margin-left: auto; margin-right: auto; overflow: hidden; line-height: 0; }
.dj-score-icon svg { width: 28px; height: 28px; display: block; color: var(--color-text-muted); }
.dj-score-big { font-size: 36px; font-weight: 700; line-height: 1.1; margin: 8px 0 4px; }
.dj-score-big.neon-mint { color: var(--neon-mint); }
.dj-score-big.neon-amber { color: var(--neon-amber); }
.dj-score-big.neon-coral { color: var(--neon-coral); }
.dj-score-unit { font-size: 11px; color: var(--color-text-muted); margin: 0 0 12px; }
.dj-key-bar-stacked { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 12px 0 6px; gap: 1px; }
.dj-key-legend-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.dj-key-legend { font-size: 10px; color: var(--color-text-muted); display: flex; align-items: center; gap: 3px; }
.dj-key-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dj-comp-bar { position: relative; height: 4px; background: var(--color-bg-elevated); border-radius: 2px; margin-top: 8px; }
.dj-comp-fill { height: 100%; border-radius: 2px; transition: width 0.4s ease; }
.dj-comp-avg { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--color-text-muted); border-radius: 1px; transform: translateX(-50%); }
.dj-comp-label { font-size: 10px; color: var(--color-text-muted); margin-top: 4px; }

/* Transition-Map Hover */
.tm-svg .tm-link { transition: opacity 0.2s ease; }
.tm-svg .tm-node { transition: opacity 0.2s ease; }
.tm-svg.tm-hover-active .tm-link { opacity: 0.08; }
.tm-svg.tm-hover-active .tm-link-label { opacity: 0.08; }
.tm-svg.tm-hover-active .tm-link-label.tm-highlight { opacity: 1; }
.tm-svg .tm-link-label { transition: opacity 0.2s ease; }
.tm-svg.tm-hover-active .tm-node { opacity: 0.3; }
.tm-svg.tm-hover-active .tm-link.tm-highlight { opacity: 1; stroke: #00d9ff !important; filter: drop-shadow(0 0 4px rgba(0,217,255,0.5)); }
.tm-svg.tm-hover-active .tm-node.tm-highlight { opacity: 1; }
.tm-svg .tm-node circle { transition: filter 0.2s ease; }
.tm-svg .tm-node:hover circle { filter: drop-shadow(0 0 6px rgba(0,217,255,0.6)); }

.bj-dot { cursor: pointer; transition: r 0.15s ease, filter 0.15s ease; }
.bj-dot:hover { filter: drop-shadow(0 0 6px rgba(0,217,255,0.7)); }
.bj-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--color-bg-card, #1a1a2e); border: 1px solid var(--neon-cyan, #00d9ff);
  border-radius: 8px; padding: 8px 14px; text-align: center; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5); z-index: 10;
}
.bj-tip-bpm { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; color: var(--neon-cyan, #00d9ff); }
.bj-tip-title { font-size: 13px; color: var(--color-text-primary, #e0e0e8); margin-top: 2px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.bj-tip-artist { font-size: 12px; color: var(--color-text-secondary, #6a6a78); }

.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: var(--text-md);
}
.data-table tr:hover td { background: var(--color-bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }
.td-mono { font-family: var(--font-mono); }
.td-num { font-family: var(--font-mono); color: var(--color-accent); }
.td-artist { color: var(--color-text-secondary); }
.td-pos { color: var(--color-text-tertiary); font-family: var(--font-mono); }

.table-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Grid Helpers ────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.sd-grid { display: grid; gap: 16px; grid-template-columns: 1.5fr minmax(0, 1fr); align-items: start; }
@media (max-width: 768px) {
  .sd-grid { grid-template-columns: minmax(0, 1fr); }
}
.slot-grid { display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 24px; }
@media (max-width: 768px) {
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Auth pages (no sidebar) ─────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: var(--color-bg-base);
  position: relative;
  overflow: hidden;
}
.auth-hero {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 217, 255, 0.06), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 217, 255, 0.04), transparent 60%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 49%, rgba(0, 217, 255, 0.05) 50%, transparent 51%);
  background-size: 100% 6px;
  pointer-events: none;
  opacity: 0.6;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}
.auth-brand svg { width: 28px; height: 28px; }
.auth-brand span { color: var(--color-text-primary); }
.auth-hero-body {
  position: relative;
  z-index: 1;
  max-width: 560px;
  /* Mittig auch ohne auth-foot-meta darunter (Register hat keinen eigenen Foot) */
  margin-block: auto;
}
.auth-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-accent);
  margin: 0 0 16px;
}
.auth-headline {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 16px;
  color: var(--color-text-primary);
}
.auth-subline {
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}
.auth-checklist { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.auth-checklist li { display: flex; align-items: center; gap: 10px; color: var(--color-text-secondary); font-size: var(--text-md); }
.auth-checklist svg { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }

.auth-foot-meta {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  display: flex;
  gap: 16px;
}
.auth-foot-meta a { color: var(--color-text-tertiary); }
.auth-foot-meta a:hover { color: var(--color-accent); }

/* Login-Hero: Wert-Versprechen */
.hero-perks {
  list-style: none;
  margin: 28px 0 24px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.hero-perks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.hero-perks li svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  margin-top: 2px;
}
.hero-perks li strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.hero-perks li span {
  display: block;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* Zielgruppen-Pills */
.hero-audience {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.aud-pill {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

/* Trust-Row im Footer */
.trust-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.trust-row svg {
  width: 12px;
  height: 12px;
  color: var(--color-accent);
}
.trust-row > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px 56px;
  border-left: 1px solid var(--color-border-default);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.auth-card h1 {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-3xl);
  margin: 0 0 6px;
  letter-spacing: var(--tracking-tight);
}
.auth-card .sub {
  color: var(--color-text-secondary);
  margin: 0 0 28px;
  font-size: var(--text-md);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.form-row { display: flex; justify-content: flex-end; }
.form-link { font-size: var(--text-sm); color: var(--color-accent); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.auth-card .btn-secondary { margin-top: 8px; }
.auth-card .auth-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-md);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border-default);
}

/* ── Toasts ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
  font-size: var(--text-md);
  min-width: 220px;
  box-shadow: var(--shadow-md);
  animation: toast-in var(--duration-normal) var(--ease-out);
}
.toast.success { border-color: var(--color-success); }
.toast.error { border-color: var(--color-danger); }
.toast.info { border-color: var(--color-accent); }
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Library Cards ──────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
  margin: 0 0 12px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: var(--space-8);
}
.library-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  cursor: pointer;
}
.library-card:hover { border-color: var(--color-border-strong); transform: translateY(-1px); }
.library-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.library-card-delete {
  color: var(--color-text-tertiary);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.library-card-delete:hover { color: var(--color-danger); background: var(--color-bg-elevated); }
.library-card-delete svg { width: 14px; height: 14px; display: block; }
.library-card h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
}
.library-meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.library-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-default);
}
.library-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-md);
}
.library-stat-row .l { color: var(--color-text-secondary); }
.library-stat-row .v { font-family: var(--font-mono); color: var(--color-text-primary); }
.library-card-foot {
  display: flex;
  justify-content: center;
  padding-top: 6px;
  border-top: 1px solid var(--color-border-default);
  margin-top: 4px;
}
.library-card-foot a {
  color: var(--color-accent);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  padding: 8px;
}

/* ── Session Cards ───────────────────────────────── */
.session-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.session-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-top: 3px solid var(--color-text-tertiary);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.session-card:hover { border-color: var(--color-border-strong); transform: translateY(-1px); }
.session-card.morning { border-top-color: var(--color-slot-morning); }
.session-card.afternoon { border-top-color: var(--color-slot-afternoon); }
.session-card.sundowner { border-top-color: var(--color-slot-sundowner); }
.session-card.warmup { border-top-color: var(--color-slot-warmup); }
.session-card.peak { border-top-color: var(--color-slot-peak); }
.session-card.after { border-top-color: var(--color-slot-after); }
.session-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.session-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.session-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semi);
  margin: 6px 0 8px;
  line-height: 1.3;
}
.session-time {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--color-text-primary);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.session-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-default);
}
.session-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
  margin-bottom: 2px;
}
.session-stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--color-text-primary);
}

/* ── Hero Summary (Session-Detail) ──────────────── */
.hero-summary {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-top: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: var(--space-8);
}
.hero-stat-val {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: var(--weight-semi);
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-stat-lab {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
  margin-top: 8px;
}

/* ── Crate Tree ─────────────────────────────────── */
.crate-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-md);
}
.crate-tree ul { list-style: none; padding-left: 18px; margin: 2px 0; }
.crate-tree li { margin: 1px 0; }
.crate-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  border-left: 2px solid transparent;
}
.crate-node:hover { color: var(--color-text-primary); background: var(--color-bg-elevated); }
.crate-node.active {
  color: var(--color-accent);
  background: var(--color-bg-elevated);
  border-left-color: var(--color-accent);
}
.crate-node.virtual {
  color: var(--color-text-tertiary);
  cursor: default;
}
.crate-node.virtual:hover { background: transparent; color: var(--color-text-tertiary); }
.crate-tree ul ul { padding-left: 0; }
.crate-caret { color: var(--color-text-tertiary); font-size: 10px; }
.crate-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

/* ── Sub-nav (Settings) ─────────────────────────── */
.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}
.settings-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (max-width: 800px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-layout .subnav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 4px; background: var(--color-bg-surface); border-radius: var(--radius-md); }
  .settings-layout .subnav-item { border-left: none; border-bottom: 2px solid transparent; padding: 8px 12px; }
  .settings-layout .subnav-item.active { border-left: none; border-bottom-color: var(--section-accent); }
}
.subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-md);
  position: sticky;
  top: 24px;
}
.subnav-item {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.subnav-item:hover { color: var(--color-text-primary); }
.subnav-item.active {
  color: var(--section-accent);
  border-left-color: var(--section-accent);
}
.subnav-item.danger { color: var(--color-danger); }
.subnav-item.danger.active { border-left-color: var(--color-danger); }
/* Smooth-scroll Anchor-Offset für Cards */
.settings-content .card { scroll-margin-top: 24px; }

/* ── Usage-Bars (Plan-Card) ─────────────────────── */
.usage-row { margin-bottom: 12px; }
.usage-row:last-child { margin-bottom: 0; }
.usage-row-head {
  display: flex; justify-content: space-between;
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.usage-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--color-bg-surface);
  overflow: hidden;
}
.usage-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width var(--duration-normal) var(--ease-out);
}

/* Stripe-Konfiguration im Admin */
.admin-stripe {
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  padding: 16px 18px;
  margin-bottom: 16px;
}
/* Der Livemodus bewegt echtes Geld — er muss sich auf den ersten Blick
   vom Testmodus unterscheiden. */
.admin-stripe.is-live { border-color: var(--color-warning); }
.stripe-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.stripe-badge-test, .stripe-badge-live {
  font-size: var(--text-sm); font-weight: 700;
  padding: 2px 8px; border-radius: 10px; margin-left: 8px;
}
.stripe-badge-test { background: var(--color-bg-surface); color: var(--color-text-tertiary); }
.stripe-badge-live { background: var(--color-warning); color: #1a1000; }
.stripe-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.stripe-grid h4 {
  font-size: var(--text-md); margin: 0 0 8px; color: var(--color-text-secondary);
}
.stripe-kv {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--text-md); margin-bottom: 4px;
}
.stripe-prices { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.stripe-prices th {
  text-align: left; font-weight: 500; color: var(--color-text-tertiary);
  padding: 4px 6px 6px 0;
}
.stripe-prices td { padding: 3px 6px 3px 0; }
.stripe-prices input {
  width: 100%; min-width: 120px; font-family: var(--font-mono); font-size: var(--text-sm);
}

/* Admin-Cockpit: System & Jobs (nutzt .admin-stripe als Panel) */
.ops-pill {
  display: inline-block; font-size: var(--text-sm); font-weight: 600;
  padding: 1px 8px; border-radius: 10px;
  background: var(--color-bg-surface); color: var(--color-text-tertiary);
}
.ops-pill.ok { background: var(--neon-mint-muted); color: var(--neon-mint); }
.ops-pill.warn { background: var(--neon-amber-muted); color: var(--neon-amber); }
.ops-pill.crit { background: var(--neon-coral-muted); color: var(--neon-coral); }
.ops-warn {
  border: 1px solid var(--color-warning); border-radius: var(--radius-sm);
  padding: 8px 12px; margin-bottom: 12px; font-size: var(--text-md);
}
/* Konfiguriert ja/nein — die Regeln unter .admin-maintenance greifen hier
   nicht und bedeuten dort das Gegenteil (an = Warnung). */
.admin-stripe .m-indicator {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.admin-stripe .m-indicator.on { background: var(--neon-mint); box-shadow: 0 0 4px var(--neon-mint-muted); }
.admin-stripe .m-indicator.off { background: transparent; border: 1px solid var(--neon-coral); }
.ops-actions { white-space: nowrap; }
.ops-actions button { margin-right: 4px; }
.ops-error { color: var(--neon-coral); max-width: 320px; overflow-wrap: anywhere; }
.ops-result { font-size: var(--text-sm); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  #adminJobsBox table, #adminSystemBox table { display: block; overflow-x: auto; }
}

/* Tarif-Auswahl in der Plan-Karte (Settings) */
.plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.plan-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.plan-option:hover:not(:disabled) {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-glow);
}
.plan-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.plan-option-label {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
}
.plan-option-price {
  font-size: 19px;
  font-weight: 650;
}
.plan-option-suffix {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--color-text-tertiary);
  margin-left: 4px;
}
.plan-option-strike {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  margin-right: 6px;
}

.upload-limit-banner {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  margin-bottom: 12px;
  border: 1px solid var(--color-border-default);
}
.upload-limit-banner.warning {
  background: var(--color-warning-muted);
  border-color: var(--color-warning);
  color: var(--color-text-primary);
}
.upload-limit-banner.blocking {
  background: var(--color-danger-muted);
  border-color: var(--color-danger);
  color: var(--color-text-primary);
}

/* ── Plan card (cyan accent top) ────────────────── */
.plan-card {
  border-top: 2px solid var(--color-accent);
}

/* ── Misc ────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.muted { color: var(--color-text-tertiary); }
.text-secondary { color: var(--color-text-secondary); }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--color-border-default); margin: 16px 0; }

/* Bar (Stacked / horizontal progress) */
.bar-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.bar-label { width: 110px; color: var(--color-text-secondary); font-size: var(--text-md); }
.bar-track { flex: 1; height: 6px; background: var(--color-bg-elevated); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--color-accent); border-radius: 3px; }
.bar-pct { width: 72px; white-space: nowrap; text-align: right; font-family: var(--font-mono); font-size: var(--text-md); color: var(--color-text-primary); }
.stacked-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--color-bg-elevated); }

/* ── Heatmap (Aktivität Wochentag × Stunde) ─────── */
.heatmap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  max-width: 760px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.heatmap-row {
  display: grid;
  grid-template-columns: 28px repeat(24, 24px);
  gap: 3px;
  align-items: center;
  min-width: max-content;
}
@media (max-width: 860px) {
  .heatmap {
    position: relative;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
  .heatmap::-webkit-scrollbar { height: 6px; }
  .heatmap::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 3px; }
}
.heatmap-row.heatmap-head .heatmap-cell {
  background: transparent !important;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-tertiary);
  text-align: center;
  cursor: default;
  display: grid;
  place-items: center;
}
.heatmap-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  text-align: right;
  padding-right: 4px;
}
.heatmap-cell {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  cursor: pointer;
  transition: outline 0.1s;
  border: 1px solid rgba(34, 34, 42, 0.7);
}
.heatmap-cell:hover { outline: 1px solid var(--color-accent); outline-offset: 1px; }

#heatmapCard { position: relative; }
.heatmap-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  font-size: 12px;
  transform: translate(0, 0);
}
.heatmap-tooltip .ht-time {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}
.heatmap-tooltip .ht-main {
  font-size: 14px;
  margin-bottom: 2px;
}
.heatmap-tooltip .ht-num {
  font-family: var(--font-mono);
  font-weight: var(--weight-semi);
  color: var(--color-accent);
  font-size: 18px;
}
.heatmap-tooltip .ht-pct {
  font-family: var(--font-mono);
  font-size: 11px;
}
.stacked-bar .seg { height: 100%; }
/* ── Slot-Microbar (Sessions-Tabelle) ───────────── */
.slot-microbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slot-microbar-track {
  display: flex;
  width: 56px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
}
.slot-microbar-track .slot-seg { height: 100%; }
.slot-microbar-track .slot-seg.morning { background: var(--color-slot-morning); }
.slot-microbar-track .slot-seg.afternoon { background: var(--color-slot-afternoon); }
.slot-microbar-track .slot-seg.sundowner { background: var(--color-slot-sundowner); }
.slot-microbar-track .slot-seg.warmup { background: var(--color-slot-warmup); }
.slot-microbar-track .slot-seg.peak { background: var(--color-slot-peak); }
.slot-microbar-track .slot-seg.after { background: var(--color-slot-after); }

.stacked-bar .seg.morning { background: var(--color-slot-morning); }
.stacked-bar .seg.afternoon { background: var(--color-slot-afternoon); }
.stacked-bar .seg.sundowner { background: var(--color-slot-sundowner); }
.stacked-bar .seg.warmup { background: var(--color-slot-warmup); }
.stacked-bar .seg.peak { background: var(--color-slot-peak); }
.stacked-bar .seg.after { background: var(--color-slot-after); }

/* ── Zeitstrahl (Session-Detail) ─────────────────── */
.timeline {
  padding: 8px 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 60px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--color-border-default);
}
.timeline-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 28px;
  align-items: center;
  padding: 8px 22px 8px 14px;
  position: relative;
}
.timeline-time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  text-align: right;
}
.timeline-row::before {
  content: "";
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-bg-surface);
}
.timeline-track { min-width: 0; }
.timeline-title { font-size: var(--text-md); }
.timeline-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── Tabs ────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border-default);
  margin-bottom: 24px;
}
.tab {
  padding: 12px 18px;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.tab:hover { color: var(--color-text-primary); }
.tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-elevated);
  color: var(--color-text-tertiary);
}
.tab.active .tab-count { background: var(--color-accent-muted); color: var(--color-accent); }

/* ── Sammlungen-Mini-Cards (Library page) ───────── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.collection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.collection-card:hover { border-color: var(--color-border-strong); }
.collection-card.active {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
}
.collection-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.collection-card-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collection-card-stats {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.collection-card-stats .l { color: var(--color-text-tertiary); }

/* ── Sets-Tabelle ───────────────────────────────── */
.sessions-table-wrap {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 768px) {
  .sessions-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.sessions-table-wrap .data-table th { background: var(--color-bg-surface); }
.sessions-table-wrap .data-table tr { cursor: pointer; }
.sessions-table-wrap .col-slot-bar {
  display: inline-block;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 8px;
  background: var(--color-border-default);
}
.sessions-table-wrap .col-slot-bar.morning { background: var(--color-slot-morning); }
.sessions-table-wrap .col-slot-bar.afternoon { background: var(--color-slot-afternoon); }
.sessions-table-wrap .col-slot-bar.sundowner { background: var(--color-slot-sundowner); }
.sessions-table-wrap .col-slot-bar.warmup { background: var(--color-slot-warmup); }
.sessions-table-wrap .col-slot-bar.peak { background: var(--color-slot-peak); }
.sessions-table-wrap .col-slot-bar.after { background: var(--color-slot-after); }

.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--color-border-default);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.active-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}
.filter-pill .x {
  cursor: pointer;
  color: var(--color-accent);
  font-weight: var(--weight-bold);
  padding-left: 2px;
}
.clear-filters {
  font-size: var(--text-base);
  color: var(--color-text-tertiary);
  cursor: pointer;
  text-decoration: underline;
}
.clear-filters:hover { color: var(--color-danger); }

/* ── Dropdown menus ─────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: 4px;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  cursor: pointer;
}
.dropdown-item:hover { color: var(--color-text-primary); background: var(--color-bg-overlay); }
.dropdown-item.checked { color: var(--color-accent); }
.dropdown-item.checked::before { content: "✓"; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .hero-summary { grid-template-columns: repeat(2, 1fr); }
  .library-grid, .session-grid { grid-template-columns: repeat(2, 1fr); }
  /* Sets-Tabelle: low-value columns ausblenden */
  .sessions-table-wrap .data-table th:nth-child(5),  /* Location header */
  .sessions-table-wrap .data-table td:nth-child(6),  /* Location cell */
  .sessions-table-wrap .data-table th:nth-child(6),  /* Software header */
  .sessions-table-wrap .data-table td:nth-child(7)   /* Software cell */
    { display: none; }
}
@media (max-width: 720px) {
  /* Sets als Karten statt Tabelle */
  .sessions-table-wrap .data-table thead { display: none; }
  .sessions-table-wrap .data-table tbody tr {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    grid-template-areas: "chk date slot" "chk meta meta";
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    gap: 4px 12px;
  }
  .sessions-table-wrap .data-table tbody td {
    border: none !important;
    padding: 0 !important;
  }
  .sessions-table-wrap .data-table tbody td:nth-child(1) { grid-area: chk; align-self: start; }
  .sessions-table-wrap .data-table tbody td:nth-child(2) { grid-area: date; font-weight: 600; }
  .sessions-table-wrap .data-table tbody td:nth-child(8) { grid-area: slot; justify-self: end; }
  .sessions-table-wrap .data-table tbody td:nth-child(3),
  .sessions-table-wrap .data-table tbody td:nth-child(4),
  .sessions-table-wrap .data-table tbody td:nth-child(5)
    { grid-area: meta; display: inline-block; font-size: 12px; color: var(--color-text-secondary); }
  .sessions-table-wrap .data-table tbody td:nth-child(3)::after { content: " · "; }
  .sessions-table-wrap .data-table tbody td:nth-child(4)::after { content: " · "; }
  .sessions-table-wrap .data-table th:nth-child(7),
  .sessions-table-wrap .data-table td:nth-child(7) { display: none; }
}
@media (max-width: 860px) {
  /* Sidebar als Off-Canvas-Drawer */
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform var(--duration-normal, 240ms) var(--ease-out);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop { display: block; }
  .burger-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .search-input { width: 100%; flex: 1; min-width: 0; }
  .topbar-actions { flex: 1; min-width: 0; }
  .main { padding: 20px; }
  .kpi-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4, .library-grid, .session-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-summary { grid-template-columns: 1fr 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px; }
  .auth-panel { border-left: none; border-top: 1px solid var(--color-border-default); padding: 32px; }
  .auth-headline { font-size: 36px; }
  /* In Auth/Legal/Public-Modi keinen Burger zeigen */
  .app-shell.no-sidebar .burger-btn { display: none; }
}
@media (max-width: 480px) {
  .breadcrumb { font-size: 11px; }
  .topbar { padding: 10px 12px; gap: 4px; }
  .topbar-actions { gap: 4px; }
}

/* ═══════════════════════════════════════════════════
   REQUEST BOARD — DJ Dashboard + Public Gast-Page
═══════════════════════════════════════════════════ */

/* ---- DJ Dashboard ---- */
.board-page .board-url-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px;
}
.board-url {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-default);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-md);
}
.board-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  cursor: pointer;
}
.board-toggle input { accent-color: var(--color-accent); }

.board-settings-card { margin: 16px 0; }

.profile-hint-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin: 16px 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-left: 3px solid var(--section-accent);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
}
.profile-hint-banner .muted { margin-left: 8px; }
.board-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.board-settings-grid .form-group input,
.board-settings-grid .form-group input[type="number"],
.board-settings-grid .form-group input[type="time"] {
  width: 100%;
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-family: var(--font-body);
}
.board-settings-grid .form-group input:focus { outline: none; border-color: var(--color-border-focus); }
.label-mono {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}
.hint {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-top: 4px;
}
.hint.right { text-align: right; }

.board-filter-row {
  display: flex; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap;
}
.board-table-card { padding: 0; overflow: hidden; }
.board-table-card .data-table { margin: 0; }
.board-footer-info {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border-default);
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.3 } }

.link-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: var(--radius-pill);
  background: var(--color-success-muted); color: var(--color-success);
  font-weight: var(--weight-semi);
}
.link-badge.youtube { background: var(--color-danger-muted); color: var(--color-danger); }
.td-actions { display: flex; gap: 6px; }
.btn-icon {
  background: transparent;
  border: 1px solid var(--color-border-default);
  color: var(--color-text-secondary);
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.btn-icon:hover { border-color: var(--color-accent); color: var(--color-accent); }
.td-center { text-align: center; }
.accent { color: var(--color-accent); }

.badge-cyan-outline {
  background: transparent;
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.badge-muted {
  background: var(--color-bg-elevated);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ---- Public Gast-Page ---- */
body.public-board-mode .app-shell.no-sidebar { display: block; }
body.public-board-mode .topbar { display: none; }
.pub-board {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.pub-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-top: 2px solid var(--color-accent);
}
.pub-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-accent-border);
  position: relative;
}
.pub-avatar::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid var(--color-text-tertiary);
  border-radius: 50%;
}
.pub-header-text { flex: 1; }
.pub-header-text h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}
.pub-socials { display: flex; gap: 8px; }
.pub-social {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: var(--weight-medium);
}
.pub-social:hover { color: var(--color-accent); border-color: var(--color-accent); }

.pub-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
}
.pub-banner.warning {
  background: var(--color-warning-muted);
  border: 1px solid var(--color-warning);
  color: var(--color-text-primary);
}
.pub-donate {
  text-align: center;
  text-decoration: none;
}
.pub-form-card { display: flex; flex-direction: column; gap: 10px; }
.pub-form-card input {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-family: var(--font-body);
}
.pub-form-card input:focus { outline: none; border-color: var(--color-border-focus); }

.pub-section { display: flex; flex-direction: column; gap: 8px; }
.pub-req-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
}
.pub-req-card.played { opacity: 0.5; transition: opacity 0.3s, box-shadow 0.3s, border-color 0.3s; }

@keyframes played-glow {
  0%   { box-shadow: 0 0 0 0 var(--neon-lime); transform: scale(1); }
  25%  { box-shadow: 0 0 18px 4px var(--neon-lime); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
}
.pub-played-highlight {
  animation: played-glow 2.5s ease-out;
  border-color: var(--neon-lime) !important;
  opacity: 0.85 !important;
}
.pub-req-main { flex: 1; min-width: 0; }
.pub-req-title {
  font-weight: var(--weight-medium);
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pub-req-artist { font-size: var(--text-md); }
.pub-req-meta { font-size: var(--text-sm); color: var(--color-text-tertiary); margin-top: 2px; }

.pub-vote {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 56px; min-height: 56px;
  background: transparent;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 8px;
}
.pub-vote:hover, .pub-vote.voted {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-muted);
}
.pub-vote-arrow { font-size: 14px; line-height: 1; }
.pub-vote-count { font-size: var(--text-lg); font-weight: var(--weight-semi); }

.pub-closing-hint {
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  padding: 12px;
}
.pub-footer {
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  padding: 16px 0 24px;
  text-transform: lowercase;
  letter-spacing: var(--tracking-wide);
}
.pub-error {
  text-align: center; padding: 64px 16px;
  color: var(--color-text-secondary);
}

@media (max-width: 720px) {
  .board-settings-grid { grid-template-columns: 1fr; }
  .board-page .board-url-row { font-size: var(--text-sm); }
}

/* ── Feedback Dialog ────────────────────────────── */
.feedback-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.feedback-overlay.visible { opacity: 1; pointer-events: auto; }

.feedback-dialog {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  padding: 24px;
  transform: translateY(16px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-out);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.feedback-overlay.visible .feedback-dialog {
  transform: translateY(0) scale(1);
}

.feedback-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.feedback-header h3 {
  margin: 0; font-size: var(--text-lg); font-weight: 600;
  color: var(--color-text-primary);
}
.feedback-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-tertiary);
  transition: color var(--duration-fast), background var(--duration-fast);
}
.feedback-close:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}
.feedback-close svg { width: 18px; height: 18px; }

.feedback-types {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.feedback-type { flex: 1; }
.feedback-type input { display: none; }
.feedback-type-label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.feedback-type-label svg { width: 16px; height: 16px; flex-shrink: 0; }
.feedback-type input:checked + .feedback-type-label {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}
.feedback-type-label:hover {
  border-color: var(--color-border-focus);
  color: var(--color-text-primary);
}

.feedback-title {
  margin-bottom: 12px;
}
.feedback-body {
  margin-bottom: 20px; resize: vertical; min-height: 80px;
}

.feedback-actions {
  display: flex; gap: 12px; justify-content: flex-end;
}
.feedback-cancel {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast);
}
.feedback-cancel:hover { color: var(--color-text-primary); }

.feedback-submit {
  padding: 10px 24px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-size: var(--text-sm); font-weight: 600;
  transition: background var(--duration-fast);
}
.feedback-submit:hover { background: var(--color-accent-hover); }
.feedback-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.feedback-success {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 16px; text-align: center;
}
.feedback-success-text {
  font-size: var(--text-lg); font-weight: 600;
  color: var(--color-text-primary); margin: 0 0 4px;
}
.feedback-ref {
  font-size: var(--text-sm); color: var(--color-text-tertiary);
  margin: 0; font-family: var(--font-mono);
}

@media (max-width: 480px) {
  .feedback-dialog { margin: 16px; max-width: none; }
  .feedback-types { flex-direction: column; }
}

/* ============================== Hilfe-Menü ================================ */
.help-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  padding: 6px;
  z-index: 900;
  display: none;
}
.help-menu.visible { display: block; }
.help-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--text-sm); font-weight: 500;
  text-align: left; cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.help-menu-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}
.help-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================== Onboarding =============================== */
/* Welcome-Modal */
.onb-welcome-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.onb-welcome-overlay.visible { opacity: 1; pointer-events: auto; }
.onb-welcome {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 460px;
  padding: 32px 28px 20px;
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-out);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.onb-welcome-overlay.visible .onb-welcome { transform: translateY(0) scale(1); }
.onb-welcome-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border-radius: 50%;
}
.onb-welcome-icon svg { width: 32px; height: 32px; }
.onb-welcome-title {
  margin: 0 0 8px;
  font-size: var(--text-xl); font-weight: 700;
  color: var(--color-text-primary);
}
.onb-welcome-body {
  margin: 0 0 24px;
  font-size: var(--text-md); line-height: 1.5;
  color: var(--color-text-secondary);
}
.onb-welcome-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 8px;
}
.onb-welcome-later {
  margin-top: 6px;
  background: transparent; border: 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 6px 12px;
}
.onb-welcome-later:hover { color: var(--color-text-secondary); }

/* Tour-Overlay (Spotlight) */
.onb-overlay {
  position: fixed; inset: 0;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.onb-overlay.visible { opacity: 1; pointer-events: auto; }
.onb-overlay:not(.visible) { display: none; }
.onb-mask {
  position: fixed;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}
.onb-ring {
  position: fixed;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 25%, transparent),
              0 0 24px color-mix(in srgb, var(--color-accent) 40%, transparent);
  transition: top 180ms var(--ease-out), left 180ms var(--ease-out),
              width 180ms var(--ease-out), height 180ms var(--ease-out);
}
.onb-bubble {
  position: fixed;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: top 180ms var(--ease-out), left 180ms var(--ease-out);
}
.onb-bubble-arrow {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  transform: rotate(45deg);
}
.onb-bubble[data-placement="bottom"] .onb-bubble-arrow {
  top: -7px; left: 50%; margin-left: -6px;
  border-right: 0; border-bottom: 0;
}
.onb-bubble[data-placement="top"] .onb-bubble-arrow {
  bottom: -7px; left: 50%; margin-left: -6px;
  border-left: 0; border-top: 0;
}
.onb-bubble[data-placement="right"] .onb-bubble-arrow {
  left: -7px; top: 50%; margin-top: -6px;
  border-right: 0; border-top: 0;
}
.onb-bubble[data-placement="left"] .onb-bubble-arrow {
  right: -7px; top: 50%; margin-top: -6px;
  border-left: 0; border-bottom: 0;
}
.onb-bubble[data-placement="center"] .onb-bubble-arrow { display: none; }

.onb-bubble-title {
  font-size: var(--text-md); font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.onb-bubble-body {
  font-size: var(--text-sm); line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}
.onb-bubble-body code {
  font-family: var(--font-mono);
  background: var(--color-bg-surface);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}
.onb-bubble-actions {
  display: flex; align-items: center; gap: 8px;
}
.onb-bubble-spacer { flex: 1; }
.onb-bubble-count {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  font-variant-numeric: tabular-nums;
}
.onb-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 500;
  cursor: pointer;
  border: 0;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.onb-btn-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.onb-btn-primary:hover { background: var(--color-accent-hover); }
.onb-btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.onb-btn-ghost:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }

@media (max-width: 600px) {
  /* Bubble auf Mobile fix unten */
  .onb-bubble {
    top: auto !important;
    left: 16px !important;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
  .onb-bubble-arrow { display: none; }
  .onb-welcome { margin: 16px; }
  .onb-welcome-actions { flex-direction: column; }
}

/* ============================ Section-Identität =========================== */
/* Jeder Bereich bekommt eine Neon-Signatur. Cyan bleibt globaler Akzent,
   --section-accent färbt nur Sidebar-Active-State, Section-Titel-Underline
   und KPI-Akzente neu. */
body[data-section="library"]   { --section-accent: var(--neon-mint);    --section-accent-muted: var(--neon-mint-muted);    --section-accent-glow: var(--neon-mint-glow); }
body[data-section="sessions"]  { --section-accent: var(--neon-magenta); --section-accent-muted: var(--neon-magenta-muted); --section-accent-glow: var(--neon-magenta-glow); }
body[data-section="locations"] { --section-accent: var(--neon-amber);   --section-accent-muted: var(--neon-amber-muted);   --section-accent-glow: var(--neon-amber-glow); }
body[data-section="board"]     { --section-accent: var(--neon-lime);    --section-accent-muted: var(--neon-lime-muted);    --section-accent-glow: var(--neon-lime-glow); }
body[data-section="analytics"] { --section-accent: var(--neon-violet);  --section-accent-muted: var(--neon-violet-muted);  --section-accent-glow: var(--neon-violet-glow); }
body[data-section="admin"]     { --section-accent: var(--neon-coral);   --section-accent-muted: var(--neon-coral-muted);   --section-accent-glow: var(--neon-coral-glow); }
body[data-section="tools"]     { --section-accent: var(--neon-coral);   --section-accent-muted: var(--neon-coral-muted);   --section-accent-glow: var(--neon-coral-glow); }

/* Superadmin-Layout — Token-Auth only, kein User-Login. */
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 16px 24px; }
.admin-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-text-muted); margin: 0 0 8px;
}
.admin-banner {
  background: var(--neon-coral-muted);
  border: none; border-left: 3px solid var(--neon-coral);
  border-radius: 4px;
  padding: 7px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--neon-coral);
  font-weight: 600;
  font-size: 12px;
}
.admin-banner button {
  background: transparent;
  border: 1px solid var(--neon-coral);
  color: var(--neon-coral);
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
}
.admin-login-box {
  max-width: 440px;
  margin: 80px auto;
  padding: 36px;
  background: var(--color-surface, #1a1a1a);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--neon-coral);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--neon-coral-muted);
}
.admin-login-box h1 { margin: 0 0 6px; color: var(--neon-coral); letter-spacing: -0.02em; }
.admin-login-box p.hint { color: var(--color-text-muted); font-size: 13px; line-height: 1.5; margin: 0 0 28px; }
.admin-login-box label {
  display: block;
  margin: 16px 0 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.admin-login-box input {
  width: 100%;
  padding: 11px 14px;
  box-sizing: border-box;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-login-box input:hover { border-color: var(--color-text-muted); }
.admin-login-box input:focus {
  border-color: var(--neon-coral);
  box-shadow: 0 0 0 3px var(--neon-coral-muted);
}
.admin-login-box input:invalid:not(:placeholder-shown) {
  border-color: #c04040;
}
.admin-login-box button {
  margin-top: 28px;
  width: 100%;
  padding: 12px;
  background: var(--neon-coral);
  color: #000;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
.admin-login-box button:hover { filter: brightness(1.1); }
.admin-login-box button:active { transform: translateY(1px); }
.admin-two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin-bottom: 12px; }
@media (max-width: 768px) { .admin-two-col { grid-template-columns: 1fr; } }
.admin-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.admin-grid-2 { grid-template-columns: repeat(2, 1fr); }
.admin-card {
  background: var(--color-surface, #1a1a1a); border: 1px solid var(--color-border);
  border-radius: 6px; padding: 10px 12px; position: relative; overflow: hidden;
}
.admin-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--card-neon, var(--color-border));
  box-shadow: 0 0 8px var(--card-neon, transparent);
}
.admin-card.neon-cyan { --card-neon: var(--neon-cyan); }
.admin-card.neon-magenta { --card-neon: var(--neon-magenta); }
.admin-card.neon-amber { --card-neon: var(--neon-amber); }
.admin-card.neon-mint { --card-neon: var(--neon-mint); }
.admin-card.neon-coral { --card-neon: var(--neon-coral); }
.admin-card.neon-violet { --card-neon: var(--neon-violet); }
.admin-card h3 { margin: 0 0 2px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.admin-card .big { font-size: 20px; font-weight: 700; color: var(--card-neon, var(--section-accent)); line-height: 1.2; }
.admin-card .sub { font-size: 10px; color: var(--color-text-muted); margin-top: 1px; }
.admin-card.health-warn { --card-neon: var(--neon-amber); border-color: var(--neon-amber); }
.admin-card.health-crit { --card-neon: #ff5050; border-color: #ff5050; }
.admin-maintenance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 0 16px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.admin-maintenance.is-on {
  border-color: var(--neon-amber);
  background: linear-gradient(135deg, var(--neon-amber-muted), transparent 60%);
  box-shadow: 0 0 12px var(--neon-amber-muted), inset 0 0 20px var(--neon-amber-muted);
}
.admin-maintenance .m-left { display: flex; align-items: center; gap: 10px; }
.admin-maintenance .m-indicator {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.admin-maintenance .m-indicator.on {
  background: var(--neon-amber);
  box-shadow: 0 0 6px var(--neon-amber), 0 0 14px var(--neon-amber-glow);
  animation: maint-pulse 2s ease-in-out infinite;
}
.admin-maintenance .m-indicator.off {
  background: var(--neon-mint);
  box-shadow: 0 0 4px var(--neon-mint-muted);
}
@keyframes maint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.admin-maintenance .m-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.admin-maintenance .m-badge-on {
  display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 9px;
  font-weight: 700; letter-spacing: 0.06em; margin-left: 6px;
  background: var(--neon-amber); color: #000;
}
.admin-maintenance .m-detail { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.admin-maintenance button {
  padding: 6px 14px; font-size: 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--neon-coral); background: transparent; color: var(--neon-coral);
  white-space: nowrap; transition: background 0.15s, color 0.15s;
}
.admin-maintenance button:hover { background: var(--neon-coral); color: #000; }
.admin-maintenance.is-on button { border-color: var(--neon-amber); color: var(--neon-amber); }
.admin-maintenance.is-on button:hover { background: var(--neon-amber); color: #000; }
.admin-bulk-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  margin: 0 0 12px;
  background: var(--neon-coral-muted);
  border: 1px solid var(--neon-coral);
  border-radius: 6px;
  font-size: 13px;
}
.admin-bulk-bar[hidden] { display: none; }
.admin-bulk-bar span { font-weight: 600; margin-right: 8px; }
.admin-bulk-bar button { padding: 6px 12px; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); border-radius: 4px; cursor: pointer; font-size: 12px; }
.admin-bulk-bar button:hover { border-color: var(--neon-coral); color: var(--neon-coral); }
.admin-bulk-bar button.btn-delete { border-color: #c0392b; color: #e74c3c; }
.admin-bulk-bar button.btn-delete:hover { background: #e74c3c; color: #fff; }
.admin-paging { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0; }
.admin-paging span { font-size: 11px; color: var(--color-text-muted); }
.admin-paging button { padding: 3px 8px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 3px; cursor: pointer; font-size: 11px; }
.admin-paging button:hover:not(:disabled) { border-color: var(--neon-coral); color: var(--neon-coral); }
.admin-paging button:disabled { opacity: 0.3; cursor: default; }
.admin-users-table .cb-cell { width: 28px; }
.admin-users-table .cb-cell input { cursor: pointer; }
.admin-users-table { width: 100%; border-collapse: collapse; }
.admin-users-table th, .admin-users-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--color-border); font-size: 11px; }
.admin-users-table th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.admin-users-table tr:hover { background: rgba(255,255,255,0.06); cursor: pointer; }
.tier-pill { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.tier-pill.tier-pro { background: var(--neon-cyan-muted); color: var(--neon-cyan); border: 1px solid rgba(0,217,255,0.25); }
.tier-pill.tier-free { background: rgba(255,255,255,0.05); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.status-dot.dot-active { background: var(--neon-mint); box-shadow: 0 0 4px var(--neon-mint); }
.status-dot.dot-suspended { background: var(--neon-coral); box-shadow: 0 0 4px var(--neon-coral); }
.admin-users-panel {
  background: var(--color-surface, #161619);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.admin-users-panel .admin-section-label { margin-bottom: 10px; }
.admin-search { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-search input, .admin-search select {
  padding: 6px 10px; font-size: 12px;
  background: var(--color-bg, #0e0e10); border: 1px solid var(--color-border);
  color: var(--color-text); border-radius: 4px; flex: 1;
}
.admin-search input:focus, .admin-search select:focus {
  border-color: var(--neon-coral); outline: none;
  box-shadow: 0 0 0 2px var(--neon-coral-muted);
}
.admin-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: flex-end; z-index: 1000; }
.admin-drawer { width: min(480px, 92vw); background: var(--color-surface, #1a1a1a); padding: 32px 28px; overflow-y: auto; border-left: 2px solid var(--neon-coral); }
.admin-drawer h2 { margin: 0 0 4px; }
.admin-drawer .hint { color: var(--color-text-muted); font-size: 13px; margin: 0 0 20px; }
.admin-drawer-close { position: absolute; top: 12px; right: 16px; background: transparent; border: 0; color: var(--color-text); font-size: 28px; cursor: pointer; }
.admin-kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin-bottom: 24px; font-size: 13px; }
.admin-kv dt { color: var(--color-text-muted); }
.admin-kv dd { margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions button { padding: 8px 14px; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); border-radius: 4px; cursor: pointer; font-size: 13px; }
.admin-actions .btn-tier { border-color: var(--neon-coral); color: var(--neon-coral); }
.admin-actions .btn-suspend, .admin-actions .btn-delete { border-color: #c04040; color: #ff7070; }
.admin-actions .btn-unsuspend { border-color: var(--neon-lime); color: var(--neon-lime); }

/* DJ-Metriken im Admin-Drawer */
.dj-metrics-section { margin: 20px 0; }
.dj-metrics-section h3 { font-size: 15px; margin: 0 0 12px; color: var(--neon-violet); }
.dj-metrics-section h4 { font-size: 13px; margin: 16px 0 8px; color: var(--color-text-muted); }
.dj-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dj-metric-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 12px; }
.dj-metric-title { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.dj-metric-big { font-size: 28px; font-weight: 700; font-family: var(--font-mono); line-height: 1.1; }
.dj-metric-big.neon-mint { color: var(--neon-mint); }
.dj-metric-big.neon-amber { color: var(--neon-amber); }
.dj-metric-big.neon-coral { color: var(--neon-coral); }
.dj-metric-sub { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
.key-bar-stacked { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.key-seg { min-width: 2px; }
.key-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.key-legend-item { font-size: 10px; color: var(--color-text-muted); display: flex; align-items: center; gap: 3px; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.dj-metrics-bars { display: flex; flex-direction: column; gap: 6px; }
.dj-metric-row { display: flex; align-items: center; gap: 8px; }
.dj-metric-label { width: 100px; font-size: 12px; color: var(--color-text-muted); flex-shrink: 0; }
.dj-metric-bar-wrap { flex: 1; height: 14px; background: var(--color-border); border-radius: 4px; position: relative; overflow: visible; }
.dj-metric-bar { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.dj-metric-avg-marker { position: absolute; top: -2px; width: 2px; height: 18px; background: var(--color-text); opacity: 0.6; transform: translateX(-1px); }
.dj-metric-val { width: 52px; text-align: right; font-size: 12px; font-family: var(--font-mono); flex-shrink: 0; }

.dj-metric-details { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 11px; color: var(--color-text-muted); }

@media (max-width: 480px) {
  .dj-metrics-grid { grid-template-columns: 1fr; }
  .dj-metric-label { width: 80px; font-size: 11px; }
}

/* Section-Akzente: Page-Title bekommt feinen Neon-Strich, Section-Titles auch */
.page-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 8px;
  background: var(--section-accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--section-accent-glow);
}
.section-title {
  position: relative;
  padding-left: 12px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: var(--section-accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 6px var(--section-accent-glow);
}

/* ═══════════════════════════════════════════════════
   TOOLS — Camelot-Wheel + BPM-Rechner (public + authed)
   ═══════════════════════════════════════════════════ */
.tools-page { max-width: 1100px; margin: 0 auto; }
.tools-tabs {
  display: flex; gap: 4px; margin: 20px 0 24px;
  border-bottom: 1px solid var(--color-border-default);
}
.tools-tab {
  appearance: none; background: transparent; border: 0;
  padding: 12px 18px; font: inherit; font-weight: 500;
  color: var(--color-text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tools-tab:hover { color: var(--color-text-primary); }
.tools-tab.active {
  color: var(--section-accent);
  border-bottom-color: var(--section-accent);
  box-shadow: 0 1px 0 var(--section-accent-glow);
}

/* — Camelot — */
.cam-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px; align-items: start;
}
.cam-wheel-wrap { display: flex; justify-content: center; }
.cam-wheel { width: 100%; max-width: 520px; height: auto; }
.cam-bg { fill: var(--color-bg-elevated); }
.cam-center { fill: var(--color-bg-elevated); stroke: var(--color-border-default); stroke-width: 1; }
.cam-center-label {
  fill: var(--color-text-secondary);
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.cam-center-sub {
  fill: var(--color-text-tertiary);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.cam-sector {
  fill: var(--color-bg-surface); stroke: var(--color-border-default); stroke-width: 1;
  cursor: pointer; transition: fill .15s, stroke .15s;
}
.cam-sector:hover {
  fill: var(--section-accent-muted);
  stroke: var(--section-accent);
}
.cam-sector.compat {
  fill: var(--section-accent-muted);
  stroke: var(--section-accent);
}
.cam-sector.active {
  fill: var(--section-accent);
  stroke: var(--section-accent);
  filter: drop-shadow(0 0 6px var(--section-accent-glow));
}
.cam-num {
  fill: var(--color-text-primary); font-weight: 600; font-size: 12px;
  font-family: var(--font-mono);
}
.cam-key { fill: var(--color-text-tertiary); font-size: 9px; }
.cam-num.on-active, .cam-key.on-active { fill: var(--color-text-inverse); }

.cam-info-wrap {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: 12px; padding: 20px;
}
.cam-info h3 { margin: 0 0 4px; font-size: 20px; }
.cam-info h4 { margin: 20px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-secondary); }
.cam-info p { margin: 0 0 8px; font-size: 13px; }
.cam-legend { list-style: none; padding: 0; margin: 12px 0 0; }
.cam-legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 6px; }
.cam-legend .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--section-accent-muted); border: 1px solid var(--section-accent); flex: 0 0 12px; }
.cam-legend .dot.active { background: var(--section-accent); }
.cam-compat-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.cam-pill {
  width: 100%; text-align: left; padding: 8px 12px;
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-default);
  border-radius: 8px; color: var(--color-text-primary); cursor: pointer;
  font: inherit; font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px;
  transition: border-color .15s, background .15s;
}
.cam-pill:hover { border-color: var(--section-accent); background: var(--section-accent-muted); }

/* — BPM-Rechner — */
.bpm-calc { display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.bpm-section h3 { margin: 0 0 4px; font-size: 16px; }
.bpm-section p { margin: 0 0 12px; font-size: 13px; }
.bpm-input-row { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.bpm-input-row label { display: flex; flex-direction: column; gap: 6px; }
.bpm-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-secondary); }
.bpm-input-row input[type="number"] {
  width: 140px; padding: 10px 12px; font-size: 22px; font-weight: 600;
  font-family: var(--font-mono);
  background: var(--color-bg-surface); color: var(--color-text-primary);
  border: 1px solid var(--color-border-default); border-radius: 8px;
}
.bpm-input-row input[type="number"]:focus {
  border-color: var(--section-accent);
  box-shadow: 0 0 0 3px var(--section-accent-muted);
  outline: none;
}
.bpm-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.bpm-card {
  background: var(--color-bg-surface); border: 1px solid var(--color-border-default);
  border-radius: 10px; padding: 14px;
}
.bpm-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-secondary); }
.bpm-card-value { font-size: 22px; font-weight: 600; margin: 4px 0; color: var(--color-text-primary); }
.bpm-card-hint { font-size: 11px; }
.bpm-match {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; border-radius: 10px; min-width: 220px;
  background: var(--color-bg-surface); border: 1px solid var(--color-border-default);
}
.bpm-match.ok { border-color: var(--section-accent); background: var(--section-accent-muted); }
.bpm-match.warn { border-color: var(--neon-amber); background: var(--neon-amber-muted); }
.bpm-match-pct { font-size: 24px; font-weight: 700; }

@media (max-width: 860px) {
  .cam-layout { grid-template-columns: 1fr; gap: 20px; }
  .cam-wheel-wrap { order: 1; }
  .cam-info-wrap { order: 2; }
  .cam-wheel { max-width: 420px; }
}

@media (max-width: 560px) {
  .tools-tabs { margin: 14px 0 16px; gap: 0; }
  .tools-tab { padding: 10px 12px; font-size: 14px; flex: 1; text-align: center; }

  .cam-wheel { max-width: 100%; }
  /* SVG-Texte vergrößern, damit sie auf schmalen Screens lesbar bleiben. */
  .cam-num { font-size: 14px; }
  .cam-key { font-size: 10px; }
  .cam-center-label { font-size: 11px; }
  .cam-center-sub { font-size: 10px; }
  .cam-info-wrap { padding: 16px; }
  .cam-info h3 { font-size: 18px; }

  .bpm-input-row { gap: 12px; }
  .bpm-input-row input[type="number"] { width: 120px; font-size: 20px; }
  .bpm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bpm-card { padding: 10px 12px; }
  .bpm-card-value { font-size: 18px; }
  .bpm-match { min-width: 0; width: 100%; }
  .bpm-match-pct { font-size: 22px; }
}

@media (max-width: 380px) {
  .bpm-grid { grid-template-columns: 1fr; }
}

/* Sidebar-Nav: dünne Trennlinie zwischen Gruppen (kein Label, minimal Höhe). */
.sidebar-nav .nav-divider {
  height: 1px;
  margin: 8px 12px;
  background: var(--color-border-subtle);
}
