/**
 * KIRA — Zentrales Stylesheet
 * fragkira.at
 * Alle gemeinsamen Styles — Änderungen hier gelten für alle Seiten.
 */

/* ========== CSS Variablen ========== */
:root {
  --bg: #0a1628;
  --card: #111d33;
  --card-hover: #162440;
  --primary: #7a00df;
  --primary-light: #9b3ff5;
  --neon: #00ff88;
  --red: #ff4466;
  --amber: #fbbf24;
  --text: #f0f0f5;
  --text-muted: #e0e0ec;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.10);
  --radius: 16px;
  --header-bg: #111d33;
  --glow-primary: rgba(122, 0, 223, 0.35);
  --glow-neon: rgba(0, 255, 136, 0.25);

  /* Schriftgrößen */
  --fs-h1: 22px;
  --fs-h2: 20px;
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-badge: 0.65rem;
  --fs-caption: 0.75rem;
  --fs-display: 2.5rem;

  /* Erweiterte Farben */
  --blue: #3b82f6;
  --orange: #f97316;
  --sleep: #6495ed;

  /* Glasmorphism */
  --glass-bg: rgba(17, 29, 51, 0.50);

  /* Primary mit Alpha */
  --primary-alpha-30: rgba(122, 0, 223, 0.3);
}

/* Light Mode */
[data-theme="light"] {
  --bg: #f5f5f7;
  --card: #ffffff;
  --card-hover: #f0f0f2;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --glass: rgba(0, 0, 0, 0.02);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --header-bg: #ffffff;
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(122, 0, 223, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(0, 255, 136, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 40%, rgba(100, 0, 180, 0.06) 0%, transparent 50%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

[data-theme="light"] body {
  background-image: none;
}

.auto-link { color: var(--primary-light); word-break: break-all; }
.auto-link:hover { text-decoration: underline; }

/* ========== Barrierefreiheit ========== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-size: 0.85rem;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

:focus:not(:focus-visible) { outline: none; }

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  padding: 16px 0;
  border-bottom: 1px solid rgba(122, 0, 223, 0.2);
}

.header-inner {
  max-width: var(--container-width, 1000px);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

[data-theme="light"] .header {
  background: var(--header-bg);
  border-bottom-color: rgba(122, 0, 223, 0.15);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.header-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}

.header-brand {
  width: 120px;
  height: 28px;
  flex-shrink: 0;
}

.header-logo-sub {
  font-size: var(--fs-badge);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  opacity: 0.5;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* ========== Buttons ========== */
.btn-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s;
}

.btn-header-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(122, 0, 223, 0.5);
}

.btn-header-icon:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
}

.btn-header-icon.open {
  transform: rotate(45deg);
}

.btn-theme {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-theme:hover {
  border-color: var(--primary);
  background: rgba(122, 0, 223, 0.1);
  box-shadow: 0 0 12px rgba(122, 0, 223, 0.2);
}

.btn-theme:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

.btn-logout {
  background: none;
  border: 1px solid rgba(255, 68, 102, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--red);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(255, 68, 102, 0.1);
  border-color: var(--red);
}

.btn-logout:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.btn-menu {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.btn-menu:hover {
  border-color: var(--primary);
  background: rgba(122, 0, 223, 0.1);
  box-shadow: 0 0 12px rgba(122, 0, 223, 0.2);
}

.btn-menu:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

.menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.btn-menu.open .menu-bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.btn-menu.open .menu-bar:nth-child(2) {
  opacity: 0;
}

.btn-menu.open .menu-bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ========== Slide Menu ========== */
.slide-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  border-left: 1px solid rgba(122, 0, 223, 0.2);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

.slide-menu.open {
  right: 0;
}

[data-theme="light"] .slide-menu {
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  border-left-color: rgba(0, 0, 0, 0.06);
}

/* -- Menu Header -- */
.slide-menu-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-menu-title {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--neon));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 3px;
}

.header-version {
  font-size: var(--fs-badge);
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(122, 0, 223, 0.12);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* -- Laufzeit-Anzeige -- */
.kira-uptime {
  padding: 8px 20px;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 0.3px;
}

/* -- Menu Links Container -- */
.slide-menu-links {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 0, 223, 0.2) transparent;
}

/* -- Group Labels -- */
.slide-menu-group-label {
  font-size: var(--fs-badge);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.45;
  padding: 16px 20px 6px;
  margin-top: 4px;
  position: relative;
}

.slide-menu-group-label::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--glass-border);
}

/* -- Menu Links -- */
.slide-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin: 1px 8px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}

.slide-menu-link:hover {
  background: rgba(122, 0, 223, 0.08);
  color: var(--primary-light);
}

[data-theme="light"] .slide-menu-link:hover {
  background: rgba(122, 0, 223, 0.06);
}

.slide-menu-link.active {
  background: rgba(122, 0, 223, 0.12);
  color: var(--primary-light);
  font-weight: 600;
}

.slide-menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

/* -- Icons -- */
.slide-menu-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.slide-menu-link:hover .slide-menu-icon {
  background: rgba(122, 0, 223, 0.1);
  border-color: rgba(122, 0, 223, 0.2);
}

.slide-menu-link.active .slide-menu-icon {
  background: rgba(122, 0, 223, 0.15);
  border-color: rgba(122, 0, 223, 0.25);
}

/* -- Logout / Footer -- */
.slide-menu-footer {
  border-top: 1px solid var(--glass-border);
  padding: 8px 0;
}

.slide-menu-link.logout {
  color: var(--text-muted);
  opacity: 0.7;
  font-size: 0.84rem;
}

.slide-menu-link.logout:hover {
  background: rgba(255, 68, 102, 0.08);
  color: var(--red);
  opacity: 1;
}

.slide-menu-link.logout:hover .slide-menu-icon {
  background: rgba(255, 68, 102, 0.1);
  border-color: rgba(255, 68, 102, 0.2);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-back {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-back:hover {
  border-color: var(--primary);
  background: rgba(122, 0, 223, 0.1);
}

/* ========== Layout ========== */
.container {
  max-width: var(--container-width, 1000px);
  margin: 0 auto;
  padding: 20px;
}

/* Tablet: schmalerer Container */
@media (max-width: 767px) {
  .container { max-width: var(--container-width, 600px); }
}

/* ========== Sections ========== */
.section {
  margin-bottom: 28px;
}

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

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.section-title.mt { margin-top: 24px; }

/* ========== Cards ========== */
[data-theme="light"] .stat-card,
[data-theme="light"] .feed-item,
[data-theme="light"] .plan-item,
[data-theme="light"] .log-item,
[data-theme="light"] .module-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-state .icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.empty-state code {
  background: rgba(122, 0, 223, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ========== Loading ========== */
.loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Badge-Komponenten ========== */
.badge {
  display: inline-block;
  font-size: var(--fs-badge);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
}

/* Kategorien */
.badge-business   { background: rgba(122, 0, 223, 0.12); color: var(--primary-light); }
.badge-lernen     { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.badge-gesundheit { background: rgba(255, 68, 102, 0.12); color: var(--red); }
.badge-persoenlich { background: rgba(0, 255, 136, 0.12); color: var(--neon); }

/* Status */
.badge-aktiv      { background: rgba(0, 255, 136, 0.12); color: var(--neon); }
.badge-neu        { background: rgba(0, 255, 136, 0.15); color: var(--neon); font-weight: 700; animation: pulse-neu 2s ease-in-out infinite; }
@keyframes pulse-neu { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.badge-pausiert   { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.badge-abgebrochen { background: rgba(255, 68, 102, 0.12); color: var(--red); }
.badge-erledigt   { background: rgba(122, 0, 223, 0.12); color: var(--primary-light); }
.badge-konzept    { background: rgba(139, 154, 184, 0.15); color: var(--text-muted); }

/* Werkzeug: eigenes Ding, das gebaut wird. Erledigt landet es in der Werkschau */
.badge-werkzeug { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-werkzeug-schalter {
  background: var(--glass); color: var(--text-muted);
  border: 1px solid var(--glass-border); cursor: pointer;
  font-family: inherit; transition: all 0.2s;
}
.badge-werkzeug-schalter:hover { border-color: var(--blue); color: var(--blue); }
.badge-werkzeug-schalter.an { background: rgba(59, 130, 246, 0.15); color: var(--blue); border-color: rgba(59, 130, 246, 0.35); }
.badge-werkzeug-schalter:disabled { opacity: 0.5; cursor: default; }

/* Priorität */
.badge-hoch    { background: rgba(255, 68, 102, 0.12); color: var(--red); }
.badge-mittel  { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.badge-niedrig { background: rgba(139, 154, 184, 0.15); color: var(--text-muted); }

/* Weitere Kategorien */
.badge-allgemein  { background: var(--glass); color: var(--text-muted); }
.badge-kira       { background: rgba(122, 0, 223, 0.15); color: var(--primary-light); }
.badge-technik    { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-produkt    { background: rgba(0, 255, 136, 0.12); color: var(--neon); }
.badge-marketing  { background: rgba(251, 191, 36, 0.12); color: var(--amber); }

/* Rollen */
.badge-christian { background: rgba(0, 255, 136, 0.12); color: var(--neon); }
.badge-kira      { background: rgba(122, 0, 223, 0.15); color: var(--primary-light); }

/* Sonstige */
.badge-version { background: rgba(122, 0, 223, 0.12); color: var(--primary-light); letter-spacing: 0.5px; }

/* Manager-Badges (Quality-Items, Anfragen, Tasks) — Farben analog zu jourfix.chain-step */
.badge-mgr { font-weight: 700; letter-spacing: 0.4px; }
.badge-mgr-leon { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-mgr-mara { background: rgba(251, 191, 36, 0.15); color: var(--amber); }
.badge-mgr-tina { background: rgba(0, 255, 136, 0.15); color: var(--neon); }
.badge-mgr-just { background: rgba(255, 68, 102, 0.15); color: var(--red); }
.badge-mgr-finn { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-mgr-sven { background: rgba(122, 0, 223, 0.15); color: var(--primary-light); }
.badge-mgr-vera { background: rgba(155, 63, 245, 0.15); color: var(--primary-light); }

/* ========== Generische Buttons ========== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(122, 0, 223, 0.4);
  transform: translateY(-1px);
}
.btn-primary:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost:hover { border-color: var(--primary); background: rgba(122, 0, 223, 0.1); }
.btn-ghost:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger {
  background: none;
  border: 1px solid rgba(255, 68, 102, 0.3);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.88rem;
  color: var(--red);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-danger:hover { background: rgba(255, 68, 102, 0.1); border-color: var(--red); }
.btn-danger:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.btn-sm { padding: 5px 12px; font-size: var(--fs-small); border-radius: 8px; }
.btn-full { width: 100%; padding: 14px; font-size: 0.95rem; border-radius: 12px; text-align: center; margin-bottom: 20px; }

.btn-icon-round {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.9rem;
  transition: all 0.2s; flex-shrink: 0;
}
.btn-icon-round:hover { transform: scale(1.1); box-shadow: 0 4px 16px rgba(122, 0, 223, 0.5); }

/* ========== Formular-Elemente ========== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: var(--fs-small); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%; background: var(--bg);
  border: 1px solid var(--glass-border); border-radius: 10px;
  padding: 10px 14px; color: var(--text);
  font-size: 0.88rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 0, 223, 0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); opacity: 0.5; }
.form-input.is-error, .form-textarea.is-error { border-color: var(--red); }
.form-input.is-error:focus, .form-textarea.is-error:focus { box-shadow: 0 0 0 3px rgba(255, 68, 102, 0.15); }
.form-input.is-success, .form-textarea.is-success { border-color: var(--neon); }
textarea.form-textarea { resize: vertical; min-height: 80px; }
[data-theme="light"] .form-input, [data-theme="light"] .form-textarea, [data-theme="light"] .form-select {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ========== Spracheingabe (Mikrofon-Button) ========== */
.textarea-with-mic { position: relative; }
.textarea-with-mic .form-textarea,
.textarea-with-mic .notiz-textarea { padding-right: 48px; }
.btn-mic {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 50%; cursor: pointer;
  color: var(--text-muted); transition: all 0.2s;
}
.btn-mic:hover { border-color: var(--primary); color: var(--primary); background: rgba(122, 0, 223, 0.1); }
.btn-mic.recording {
  color: var(--red); border-color: var(--red);
  background: rgba(255, 68, 102, 0.12);
  animation: mic-pulse 1.5s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 102, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255, 68, 102, 0); }
}
.btn-mic.processing {
  color: var(--primary); border-color: var(--primary);
  background: rgba(122, 0, 223, 0.12);
  animation: mic-spin 1s linear infinite;
  pointer-events: none;
}
@keyframes mic-spin {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}
.btn-mic.unsupported { opacity: 0.3; cursor: not-allowed; }
[data-theme="light"] .btn-mic { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .btn-mic:hover { background: rgba(122, 0, 223, 0.08); }

/* ========== Toast / Benachrichtigungen ========== */
.toast {
  padding: 10px 14px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.toast-success { background: rgba(0, 255, 136, 0.12); border: 1px solid rgba(0, 255, 136, 0.2); color: var(--neon); }
.toast-error   { background: rgba(255, 68, 102, 0.12); border: 1px solid rgba(255, 68, 102, 0.2); color: var(--red); }
.toast-info    { background: rgba(122, 0, 223, 0.12); border: 1px solid rgba(122, 0, 223, 0.2); color: var(--primary-light); }
.toast-warning { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.2); color: var(--amber); }

/* ========== Alerts / Hinweis-Box ========== */
.alert {
  padding: 12px 16px; border-radius: 10px;
  font-size: 0.85rem; line-height: 1.5;
  display: flex; gap: 10px;
}
.alert-warning { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.2); color: var(--amber); }
.alert-info    { background: rgba(122, 0, 223, 0.08); border: 1px solid rgba(122, 0, 223, 0.15); color: var(--text); }
.alert-error   { background: rgba(255, 68, 102, 0.08); border: 1px solid rgba(255, 68, 102, 0.2); color: var(--red); }
.alert-success { background: rgba(0, 255, 136, 0.08); border: 1px solid rgba(0, 255, 136, 0.15); color: var(--neon); }
.alert strong  { color: inherit; }

/* ========== Progress Bar ========== */
.progress-bar {
  width: 100%; height: 6px;
  background: var(--glass); border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--neon));
  transition: width 0.4s ease;
}
.progress-fill.done { background: var(--neon); }
.progress-bar-lg { height: 10px; border-radius: 5px; margin-bottom: 20px; }
.progress-label {
  font-size: var(--fs-small); font-weight: 600;
  color: var(--primary-light); min-width: 36px; text-align: right;
}

/* ========== Filter Tabs ========== */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.filter-bar .filter-tabs { margin-bottom: 0; flex: 1; }
.idee-search { max-width: 220px; font-size: var(--fs-small); padding: 5px 12px; border-radius: 20px; }
.idee-gruppe { width: auto; max-width: 200px; font-size: var(--fs-small); padding: 5px 12px; border-radius: 20px; }
@media (max-width: 500px) { .idee-search, .idee-gruppe { max-width: 100%; width: 100%; } }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tab {
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--glass-border); background: none;
  font-size: var(--fs-small); font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(122, 0, 223, 0.08); }
.filter-tab.active { background: rgba(122, 0, 223, 0.15); border-color: var(--primary); color: var(--primary-light); font-weight: 600; }

/* ========== Accordion ========== */
.accordion-toggle {
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.accordion-right { display: flex; align-items: center; gap: 12px; }
.accordion-chevron {
  font-size: 12px; color: var(--text-muted);
  transition: transform 0.25s ease; flex-shrink: 0;
}
.accordion-toggle[aria-expanded="false"] .accordion-chevron { transform: rotate(-90deg); }
.accordion-body { overflow: visible; }
.accordion-body.collapsed { display: none; }

/* ========== Custom Checkbox ========== */
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 0.88rem; color: var(--text); padding: 4px 0;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--glass-border); background: var(--card);
  appearance: none; -webkit-appearance: none;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0; position: relative;
}
.checkbox-label input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.checkbox-label input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 6px; height: 10px; border: 2px solid white;
  border-top: none; border-left: none; transform: rotate(45deg);
}
.checkbox-label input[type="checkbox"]:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.checkbox-label.done span { text-decoration: line-through; color: var(--text-muted); }

/* ========== Helpers ========== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--neon));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800; letter-spacing: 3px;
}
.divider { height: 1px; background: var(--glass-border); margin: 8px 0 20px; }
.flex-1 { flex: 1; }

/* ========== Greeting ========== */
.greeting { margin-bottom: 28px; }
.greeting h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.greeting .scifi-quote {
  font-size: var(--fs-caption); font-style: italic; margin-bottom: 4px;
  color: var(--primary-light);
}
.greeting .scifi-source { font-size: 0.7rem; font-style: normal; color: var(--text-muted); }
[data-theme="light"] .greeting .scifi-quote { color: var(--primary); }
.greeting .date { color: var(--text-muted); font-size: 0.85rem; }

/* ========== Morgen-Nachricht (Dashboard, KIRA Autonomie Etappe 3) ========== */
.morgen-karte {
  display: grid; gap: 12px; padding: 16px; margin-bottom: 20px;
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
}
.morgen-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.morgen-satz { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.morgen-block {
  display: grid; gap: 4px; padding: 12px 12px 12px 16px;
  border-left: 2px solid var(--primary-light); border-radius: 8px; background: var(--glass);
}
.morgen-block.morgen-erledigt   { border-left-color: var(--neon); }
.morgen-block.morgen-gesundheit { border-left-color: var(--sleep); }
.morgen-block.morgen-erinnerung { border-left-color: var(--amber); }
.morgen-art { font-size: var(--fs-badge); text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.morgen-titel { font-size: var(--fs-small); font-weight: 600; line-height: 1.5; }
.morgen-zeilen { margin: 0; padding-left: 16px; display: grid; gap: 4px; }
.morgen-zeilen li { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.morgen-zusatz { font-size: var(--fs-caption); line-height: 1.5; }
.morgen-link { font-size: var(--fs-caption); color: var(--primary-light); text-decoration: none; justify-self: start; }
.morgen-link:hover { text-decoration: underline; }
[data-theme="light"] .morgen-karte { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* ========== Module Grid (Dashboard) ========== */
.module-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 28px;
}

/* ========== API Balance Bar (Dashboard) ========== */
.api-balance-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px; margin-bottom: 20px;
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 12px;
}
.api-balance-left {
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
}
.api-balance-label {
  font-size: var(--fs-caption); color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.api-balance-value {
  font-size: 1.1rem; font-weight: 700; color: var(--neon);
}
.api-balance-sub {
  font-size: var(--fs-caption); color: var(--text-muted);
}
.api-balance-right {
  flex: 1; max-width: 200px; display: flex; flex-direction: column; gap: 4px;
}
.api-balance-bar-track {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden;
}
.api-balance-bar-fill {
  height: 100%; background: var(--neon); border-radius: 3px;
  transition: width 0.3s ease;
}
.api-balance-meta {
  font-size: var(--fs-badge); color: var(--text-muted); text-align: right;
}
[data-theme="light"] .api-balance-bar {
  background: var(--glass-bg); border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
[data-theme="light"] .api-balance-bar-track {
  background: rgba(0,0,0,0.06);
}
/* Zweite Organisation (EVOLUTION): dieselbe Zeile, aber ohne Balken und ruhiger,
   weil sie nur informiert und nicht gegen den eigenen Deckel geht. Sitzt direkt
   unter der eigenen Zeile, deshalb dort kein doppelter Abstand. */
.api-balance-bar.fremd {
  margin-top: -12px; background: transparent;
  border-style: dashed; border-color: var(--glass-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.api-balance-bar.fremd .api-balance-value { color: var(--text-muted); font-size: 1rem; }
.api-balance-bar.fremd .api-balance-bar-fill { background: var(--text-muted); }
/* Die Warnfarben gelten auch hier, nur der Grundzustand bleibt ruhig: ein Deckel,
   der reisst, ist auf einem fremden Konto genauso eine Nachricht. */
.api-balance-bar.fremd.low .api-balance-value,
.api-balance-bar.fremd.critical .api-balance-value,
.api-balance-bar.fremd.gestoppt .api-balance-value { font-weight: 700; }

.api-balance-bar.low .api-balance-value { color: var(--amber); }
.api-balance-bar.low .api-balance-bar-fill { background: var(--amber); }
.api-balance-bar.low .api-balance-meta { color: var(--amber); font-weight: 600; }
.api-balance-bar.critical .api-balance-value { color: var(--red); }
.api-balance-bar.critical .api-balance-bar-fill { background: var(--red); }
.api-balance-bar.critical .api-balance-meta { color: var(--red); font-weight: 600; }
.api-balance-bar.gestoppt .api-balance-value { color: var(--text-muted); }
.api-balance-bar.gestoppt .api-balance-bar-fill { background: var(--text-muted); }
.api-balance-bar.gestoppt .api-balance-meta { color: var(--red); font-weight: 600; }
@media (max-width: 500px) {
  .api-balance-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .api-balance-right { max-width: 100%; }
  .api-balance-meta { text-align: left; }
}

.module-card {
  background: rgba(17, 29, 51, 0.50);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 20px;
  text-decoration: none; color: var(--text);
  transition: all 0.25s; display: flex;
  flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
.module-card.quiz       { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(0,255,136,0.08), inset 0 1px 0 rgba(255,255,255,0.08); }
.module-card.gesundheit { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(255,68,102,0.08), inset 0 1px 0 rgba(255,255,255,0.08); }
.module-card.ziele      { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(251,191,36,0.07), inset 0 1px 0 rgba(255,255,255,0.08); }
.module-card.notizen    { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(155,63,245,0.10), inset 0 1px 0 rgba(255,255,255,0.08); }
.module-card.vorhaben   { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(122,0,223,0.10), inset 0 1px 0 rgba(255,255,255,0.08); }

.module-card:hover, .module-card:active {
  background: rgba(22, 36, 64, 0.70);
  border-color: rgba(122, 0, 223, 0.45);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 32px rgba(122,0,223,0.22);
  transform: translateY(-2px);
}
.module-card.quiz:hover, .module-card.quiz:active {
  border-color: rgba(0,255,136,0.45); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 36px rgba(0,255,136,0.20);
}
.module-card.gesundheit:hover, .module-card.gesundheit:active {
  border-color: rgba(255,68,102,0.45); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 36px rgba(255,68,102,0.20);
}
.module-card.ziele:hover, .module-card.ziele:active {
  border-color: rgba(251,191,36,0.45); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 36px rgba(251,191,36,0.18);
}
.module-card.vorhaben:hover, .module-card.vorhaben:active {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 24px rgba(122,0,223,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}
.module-card.notizen:hover, .module-card.notizen:active {
  border-color: rgba(155,63,245,0.55); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 36px rgba(155,63,245,0.24);
}
[data-theme="light"] .module-card {
  background: rgba(255,255,255,0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 2px 16px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}
[data-theme="light"] .module-card:hover {
  background: rgba(255,255,255,0.92); box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 16px rgba(122,0,223,0.12);
}
.module-card:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

.module-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
}
.module-card.quiz::before { background: var(--neon); }
.module-card.notizen::before { background: var(--primary-light); }
.module-card.ziele::before { background: var(--amber); }
.module-card.gesundheit::before { background: var(--red); }
.module-card.vorhaben::before { background: var(--primary); }

.module-icon { font-size: 1.6rem; line-height: 1; }
.module-title { font-size: 0.95rem; font-weight: 600; }
.module-desc { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.4; }
.module-badge {
  display: inline-block; font-size: var(--fs-badge); padding: 3px 8px;
  border-radius: 20px; background: rgba(0,255,136,0.12);
  color: var(--neon); width: fit-content;
}
.module-badge.coming { background: var(--glass); color: var(--text-muted); }
[data-theme="light"] .module-badge.coming { background: rgba(0,0,0,0.05); }
.module-badge.red { background: rgba(255,68,102,0.12); color: var(--red); }
.module-badge.amber { background: rgba(251,191,36,0.12); color: var(--amber); }
/* Monitoring Module */
.module-card.monitoring { box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 18px rgba(59,130,246,0.08), inset 0 1px 0 rgba(255,255,255,0.08); }
.module-card.monitoring::before { background: var(--blue); }
.module-card.monitoring:hover, .module-card.monitoring:active {
  border-color: rgba(59,130,246,0.45); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 36px rgba(59,130,246,0.20);
}
.module-card-top { display: flex; justify-content: space-between; align-items: center; }
.monitor-status {
  font-size: var(--fs-badge); font-weight: 600; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.monitor-ok { background: rgba(0,255,136,0.12); color: var(--neon); }
.monitor-warnung { background: rgba(251,191,36,0.12); color: var(--amber); }
.monitor-kritisch { background: rgba(255,68,102,0.15); color: var(--red); animation: monitor-pulse 2s ease-in-out infinite; }
@keyframes monitor-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.monitor-last { font-size: var(--fs-badge); color: var(--text-muted); opacity: 0.7; margin-top: -4px; }

.module-desc-highlight { color: var(--text); font-weight: 500; font-size: var(--fs-small); }
.text-success { color: var(--neon); }

/* Quiz Tages-Tracker */
.quiz-tages-tracker { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--glass-border); }
.quiz-tracker-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; margin-bottom: 6px; }
[data-theme="light"] .quiz-tracker-bar { background: rgba(0,0,0,0.08); }
.quiz-tracker-fill { height: 100%; border-radius: 2px; background: var(--amber); transition: width 0.3s; }
.quiz-tages-tracker.done .quiz-tracker-fill { background: var(--neon); }
.quiz-tracker-text { font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }
.quiz-tages-tracker.done .quiz-tracker-text { color: var(--neon); }

/* ========== Tagesplan ========== */
.plan-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(17, 29, 51, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-radius: 12px; margin-bottom: 8px; transition: all 0.2s;
}
.plan-item {
  display: grid;
  grid-template-columns: 18px 1fr 28px auto;
  align-items: center;
}
[data-theme="light"] .plan-item {
  background: rgba(255,255,255,0.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.plan-check {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.35);
  border-radius: 4px; flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; background: none; padding: 0;
}
.plan-check:hover { border-color: var(--primary-light); background: rgba(122,0,223,0.1); }
.plan-check:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.plan-check.done { background: var(--neon); border-color: var(--neon); }
.plan-check.done svg { opacity: 1; }
.plan-check svg {
  width: 10px; height: 10px; fill: none; stroke: #000;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0;
}
[data-theme="light"] .plan-check { border-color: rgba(0,0,0,0.3); }
[data-theme="light"] .plan-check:hover { border-color: var(--primary); }

.plan-text { font-size: 0.9rem; line-height: 1.4; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-text.done { text-decoration: line-through; color: var(--text-muted); }
.plan-kat {
  font-size: var(--fs-badge); padding: 3px 8px;
  border-radius: 20px; background: rgba(122,0,223,0.15);
  color: var(--primary-light); white-space: nowrap;
  min-width: 72px; text-align: center;
}
.plan-verschoben-badge {
  font-size: var(--fs-badge); padding: 2px 6px;
  border-radius: 20px; background: rgba(251,191,36,0.15);
  color: var(--amber); white-space: nowrap; flex-shrink: 0;
}
.plan-pm-badge {
  font-size: var(--fs-badge); padding: 2px 6px;
  border-radius: 20px; background: rgba(59,130,246,0.15);
  color: var(--blue); white-space: nowrap; flex-shrink: 0;
  margin-left: 6px;
}
.plan-ua-badge {
  font-size: var(--fs-badge); padding: 2px 6px;
  border-radius: 20px; background: rgba(122,0,223,0.15);
  color: var(--primary-light); white-space: nowrap; flex-shrink: 0;
  margin-left: 6px;
}
.plan-auto-badge {
  font-size: var(--fs-badge); padding: 2px 6px;
  border-radius: 20px; background: rgba(251,191,36,0.15);
  color: var(--amber); white-space: nowrap; flex-shrink: 0;
  margin-left: 6px;
}
.plan-delete {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 0; border-radius: 6px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  opacity: 0.45; transition: all 0.2s;
}
.plan-delete svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.plan-delete:hover { color: var(--red); opacity: 1; background: rgba(255,68,102,0.1); }

.plan-tabs { display: flex; gap: 4px; }
.plan-tab {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 5px 14px; font-size: var(--fs-caption);
  color: var(--text-muted); cursor: pointer; font-weight: 600; transition: all 0.2s;
}
.plan-tab.active { background: var(--primary); border-color: var(--primary); color: white; }
.plan-tab:hover:not(.active) { border-color: var(--primary); color: var(--text); }
.plan-tab-count {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  border-radius: 20px; background: rgba(255,255,255,0.10);
  font-size: var(--fs-badge); font-weight: 600;
}
.plan-tab.active .plan-tab-count { background: rgba(255,255,255,0.22); }
[data-theme="light"] .plan-tab-count { background: rgba(0,0,0,0.08); }
[data-theme="light"] .plan-tab.active .plan-tab-count { background: rgba(255,255,255,0.25); }

/* Datums-Gruppen in den Tabs "Offen" + "Alle" */
.plan-group { margin-bottom: 20px; }
.plan-group:last-of-type { margin-bottom: 0; }
.plan-group-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-small); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
  padding: 0 4px 8px;
}
.plan-group-count {
  font-weight: 600; font-size: var(--fs-badge);
  padding: 2px 8px; border-radius: 20px;
  background: rgba(122,0,223,0.15); color: var(--primary-light);
}

/* Vier Tabs passen auf schmalen Displays nicht mehr neben den Titel:
   Titel bleibt oben, die Tabs bekommen eine eigene Zeile über die volle Breite */
@media (max-width: 620px) {
  .section-header.plan-header { flex-wrap: wrap; gap: 8px; }
  .section-header.plan-header .plan-tabs { flex-wrap: wrap; width: 100%; justify-content: flex-start; }
  .plan-tab { padding: 5px 10px; }
}

.plan-add { display: flex; gap: 8px; margin-bottom: 12px; }
.plan-add-input {
  flex: 1; background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 10px 14px; color: var(--text);
  font-family: inherit; font-size: 0.85rem;
}
.plan-add-input:focus { outline: none; border-color: var(--primary); }
.plan-add-input::placeholder { color: var(--text-muted); }
.plan-add-kat {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 8px 10px; color: var(--text);
  font-size: var(--fs-caption); cursor: pointer; min-width: 90px;
}
.plan-add-kat:focus { outline: none; border-color: var(--primary); }
.plan-add-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; border-radius: 10px; width: 40px; height: 40px;
  color: white; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.plan-add-btn:hover { box-shadow: 0 4px 15px rgba(122,0,223,0.4); }

/* PM Tasks (Kundenprojekte) */
.pm-divider {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-small); color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; padding: 12px 4px 4px; font-weight: 600;
}
.plan-item-pm {
  border-left: 3px solid var(--primary);
  display: grid; grid-template-columns: 22px 1fr auto;
  grid-template-rows: auto; gap: 0 12px; align-items: center;
}
.plan-item-pm .plan-check { grid-row: 1 / 3; }
.plan-item-pm .plan-text { grid-column: 2; font-size: 0.9rem; line-height: 1.4; }
.pm-kunde { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.2; }
.pm-projekte { color: var(--primary-light); }
.pm-meta { grid-column: 2; display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.pm-right { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pm-deadline {
  font-size: var(--fs-badge); padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; text-align: center;
}
.deadline-rot   { background: rgba(255,68,102,0.12); color: var(--red); }
.deadline-amber { background: rgba(251,191,36,0.12); color: var(--amber); }
.deadline-gruen { background: rgba(0,255,136,0.12); color: var(--neon); }
.pm-status {
  font-size: var(--fs-badge); padding: 2px 10px; border-radius: 20px;
  border: none; cursor: pointer; white-space: nowrap;
  font-weight: 600; transition: all 0.2s; font-family: inherit;
}
.pm-status-offen { background: rgba(251,191,36,0.12); color: var(--amber); }
.pm-status-offen:hover { background: rgba(251,191,36,0.25); }
.pm-status-in_bearbeitung { background: rgba(249,115,22,0.15); color: var(--orange); }
.pm-status-in_bearbeitung:hover { background: rgba(249,115,22,0.3); }
.pm-add-btn {
  background: none; border: 1px solid var(--glass-border); color: var(--primary-light);
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1; transition: all 0.2s; padding: 0;
}
.pm-add-btn:hover { background: rgba(122,0,223,0.15); border-color: var(--primary); }

/* PM Modal */
.pm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 60; display: none; align-items: center;
  justify-content: center; padding: 20px;
}
.pm-overlay.visible { display: flex; }
.pm-modal {
  background: var(--card); border: 1px solid var(--primary-alpha-30);
  border-radius: var(--radius); width: 100%; max-width: 420px;
  animation: slideUp 0.25s ease; overflow: hidden;
}
.pm-modal-header {
  padding: 16px 20px 12px; display: flex;
  justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--glass-border);
}
.pm-modal-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.pm-modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.pm-modal-close:hover { color: var(--text); background: var(--glass); }
.pm-modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.pm-modal-body label { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: -8px; }
.pm-modal-body select,
.pm-modal-body input {
  background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 10px 12px; color: var(--text);
  font-family: inherit; font-size: 0.9rem; width: 100%; box-sizing: border-box;
}
.pm-modal-body select:focus,
.pm-modal-body input:focus { outline: none; border-color: var(--primary); }
.pm-modal-footer { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.pm-btn-save {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; padding: 10px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.pm-btn-save:hover { opacity: 0.9; }
.pm-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
.pm-btn-cancel {
  background: none; border: 1px solid var(--glass-border); color: var(--text-muted);
  padding: 10px 16px; border-radius: 10px; font-size: 0.85rem; cursor: pointer;
}
.pm-btn-cancel:hover { border-color: var(--primary); color: var(--text); }

/* ========== Log / Aktivitaeten ========== */
.log-date-header {
  font-size: var(--fs-caption); font-weight: 600; color: var(--text-muted);
  padding: 8px 4px 4px; margin-top: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.log-date-header:first-child { margin-top: 0; }
.log-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  background: rgba(17, 29, 51, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-radius: 12px; margin-bottom: 8px;
}
[data-theme="light"] .log-item {
  background: rgba(255,255,255,0.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.log-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.9rem;
}
.log-icon.lauf       { background: rgba(0,255,136,0.15); }
.log-icon.notiz      { background: rgba(122,0,223,0.15); }
.log-icon.reflexion  { background: rgba(251,191,36,0.15); }
.log-icon.task       { background: rgba(255,68,102,0.15); }
.log-icon.gesundheit { background: rgba(0,255,136,0.15); }
.log-icon.quiz       { background: rgba(122,0,223,0.15); }
.log-icon.ziele      { background: rgba(251,191,36,0.15); }
.log-icon.vorhaben   { background: rgba(122,0,223,0.15); }
.log-icon.deploy     { background: rgba(0,255,136,0.15); }

.log-content { flex: 1; min-width: 0; }
.log-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.log-text {
  font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.log-time { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

/* Log Accordion Groups */
.log-group { margin-bottom: 4px; }
.log-group-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 8px 4px 4px; color: var(--text-muted);
  font-size: var(--fs-caption); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  transition: color 0.2s;
}
.log-group-header:hover { color: var(--text); }
.log-group-count { font-weight: 400; opacity: 0.6; font-size: 0.7rem; }
.log-group-chevron { font-size: var(--fs-badge); transition: transform 0.2s; opacity: 0.6; }
.log-group.open .log-group-chevron { transform: rotate(90deg); }
.log-group-body.collapsed { display: none; }

/* ========== Dashboard Tabs ========== */
.dash-tabs { display: flex; gap: 8px; margin-bottom: 0; }
.dash-tab {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px 12px 0 0; padding: 10px 18px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; border-bottom: none; position: relative;
}
.dash-tab:hover { border-color: var(--primary); color: var(--text); }
.dash-tab.active { background: var(--card); border-color: var(--primary); color: var(--primary-light); }
.dash-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--card);
}
.dash-tab-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.dash-tab-label { display: none; }
.dash-tab-count {
  font-size: var(--fs-badge); font-weight: 700; padding: 1px 7px;
  border-radius: 20px; background: rgba(122,0,223,0.12);
  color: var(--primary-light); min-width: 20px; text-align: center;
}
.dash-tab-panel {
  display: none; padding: 16px;
  background: var(--card); border: 1px solid var(--primary);
  border-radius: 0 12px 12px 12px; margin-bottom: 28px;
}
.dash-tab-panel.open { display: block; }
[data-theme="light"] .dash-tab-panel { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* ========== Notiz Modal ========== */
.notiz-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 60; display: none; align-items: flex-end;
  justify-content: center; padding: 0 12px 12px;
}
.notiz-overlay.visible { display: flex; }
.notiz-modal {
  background: var(--card); border: 1px solid var(--primary-alpha-30);
  border-radius: 20px 20px 12px 12px; width: 100%;
  max-width: 520px; max-height: 85vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.25s ease; overflow: hidden;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notiz-header {
  padding: 16px 20px 12px; display: flex;
  justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--glass-border);
}
.notiz-header h3 { font-size: 1rem; font-weight: 700; }
.notiz-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.notiz-close:hover { color: var(--text); background: var(--glass); }
.notiz-input-area { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.notiz-textarea {
  background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 12px 16px; color: var(--text);
  font-family: inherit; font-size: 0.9rem; resize: none; min-height: 80px; line-height: 1.5;
}
.notiz-textarea:focus { outline: none; border-color: var(--primary); }
.notiz-textarea::placeholder { color: var(--text-muted); }
.notiz-row { display: flex; gap: 10px; align-items: center; }
.notiz-kat-select {
  background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 8px 12px; color: var(--text);
  font-size: var(--fs-caption); flex: 1; cursor: pointer;
}
.notiz-kat-select:focus { outline: none; border-color: var(--primary); }
.notiz-save {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; border-radius: 10px; padding: 8px 20px;
  color: white; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.notiz-save:hover { box-shadow: 0 4px 15px rgba(122,0,223,0.4); }
.notiz-save:disabled { opacity: 0.5; cursor: not-allowed; }
.notiz-liste { flex: 1; overflow-y: auto; padding: 0 20px 16px; max-height: 45vh; }
.notiz-item {
  padding: 12px 0; border-bottom: 1px solid var(--glass-border);
  display: flex; gap: 10px; align-items: flex-start;
}
.notiz-item:last-child { border-bottom: none; }
.notiz-item-content { flex: 1; min-width: 0; }
.notiz-item-text { font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.notiz-item-meta {
  display: flex; gap: 8px; align-items: center;
  margin-top: 4px; font-size: 0.7rem; color: var(--text-muted);
}
.notiz-kat-badge {
  padding: 2px 8px; border-radius: 20px; font-size: var(--fs-badge);
  background: rgba(122,0,223,0.12); color: var(--primary-light);
}
.notiz-kat-badge.business   { background: rgba(122,0,223,0.12); color: var(--primary-light); }
.notiz-kat-badge.lernen     { background: rgba(251,191,36,0.12); color: var(--amber); }
.notiz-kat-badge.gesundheit { background: rgba(255,68,102,0.12); color: var(--red); }
.notiz-kat-badge.persoenlich { background: rgba(0,255,136,0.12); color: var(--neon); }
.notiz-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.notiz-action-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; border-radius: 6px; font-size: var(--fs-caption); line-height: 1;
}
.notiz-action-btn:hover { color: var(--text); background: var(--glass); }
.notiz-action-btn.pin-active { color: var(--amber); }
.notiz-action-btn.delete:hover { color: var(--red); }
.notiz-empty { text-align: center; padding: 24px 0; color: var(--text-muted); font-size: 0.85rem; }

/* ========== Passkey Banner ========== */
.passkey-banner {
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.2);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.passkey-banner-text { font-size: var(--fs-small); color: var(--text); line-height: 1.4; flex: 1; min-width: 200px; }
.passkey-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-passkey-setup {
  padding: 8px 16px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; border-radius: 10px; color: white;
  font-size: var(--fs-small); font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-passkey-setup:hover { box-shadow: 0 4px 16px rgba(122,0,223,0.4); }
.btn-passkey-dismiss {
  padding: 8px 12px; background: none; border: 1px solid var(--glass-border);
  border-radius: 10px; color: var(--text-muted); font-size: var(--fs-small); cursor: pointer;
}

/* ========== Ziel Cards ========== */
.ziel-card {
  background: rgba(17, 29, 51, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-radius: var(--radius); padding: 16px 16px 16px 20px;
  margin-bottom: 8px; transition: all 0.2s;
  position: relative; overflow: visible;
}
.ziel-card:hover {
  border-color: rgba(122,0,223,0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3), 0 0 20px rgba(122,0,223,0.12);
  transform: translateY(-2px);
}
[data-theme="light"] .ziel-card {
  background: rgba(255,255,255,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
[data-theme="light"] .ziel-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10), 0 0 12px rgba(122,0,223,0.08);
  border-color: rgba(122,0,223,0.25); transform: translateY(-2px);
}
.ziel-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: var(--radius) 0 0 var(--radius); }
.ziel-card[data-kategorie="business"]::before   { background: var(--primary-light); }
.ziel-card[data-kategorie="gesundheit"]::before  { background: var(--red); }
.ziel-card[data-kategorie="persoenlich"]::before { background: var(--neon); }
.ziel-card[data-kategorie="lernen"]::before      { background: var(--amber); }
.ziel-card.erreicht    { opacity: 0.6; }
.ziel-card.abgebrochen { opacity: 0.4; }

.ziel-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ziel-titel { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }

.ziel-desc { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.ziel-motivation {
  font-size: var(--fs-small); color: var(--text-muted); font-style: italic;
  margin-bottom: 10px; line-height: 1.4;
  padding-left: 8px; border-left: 2px solid var(--glass-border);
}
.ziel-progress { margin-bottom: 8px; }
.progress-info { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: var(--fs-caption); color: var(--text-muted); }
.progress-pct { font-size: var(--fs-small); font-weight: 600; color: var(--primary-light); }
.progress-deadline { font-size: var(--fs-small); color: var(--text-muted); }
.progress-deadline.overdue { color: var(--red); font-weight: 600; }
.ziel-meta { font-size: var(--fs-small); color: var(--text-muted); opacity: 0.45; margin-top: 6px; }

/* Ziel Actions + Overflow Menu */
.ziel-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.ziel-btn {
  padding: 5px 12px; border-radius: 8px; font-size: var(--fs-small); font-weight: 500;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.ziel-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.ziel-btn.success:hover { border-color: var(--neon); color: var(--neon); }
.ziel-btn.danger:hover { border-color: var(--red); color: var(--red); }
.ziel-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

.ziel-menu-wrap { position: relative; margin-left: auto; }
.ziel-menu-btn {
  padding: 4px 10px; border-radius: 8px; font-size: 1.1rem; line-height: 1; letter-spacing: 1px;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.ziel-menu-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.ziel-menu-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.ziel-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 10px; min-width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 20; display: none; overflow: hidden;
}
[data-theme="light"] .ziel-dropdown { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.ziel-dropdown.open { display: block; }
.ziel-dropdown-item {
  display: block; width: 100%; padding: 10px 14px; background: none; border: none;
  color: var(--text); font-size: var(--fs-small); font-weight: 500;
  text-align: left; cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.ziel-dropdown-item:hover { background: var(--glass); }
.ziel-dropdown-item.danger { color: var(--red); }
.ziel-dropdown-item.danger:hover { background: rgba(255,68,102,0.1); }
.ziel-dropdown-item:focus-visible { outline: 3px solid var(--primary-light); outline-offset: -3px; }

/* ========== Schritte-Checkliste ========== */
.schritte-section {
  display: none; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}
.schritte-section.visible { display: block; }
.schritte-list { display: grid; gap: 4px; margin-bottom: 8px; }
.schritt-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; transition: background 0.15s;
}
.schritt-item:hover { background: var(--glass); }
.schritt-check { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--neon); cursor: pointer; }
.schritt-label {
  flex: 1; font-size: var(--fs-body); color: var(--text); cursor: pointer;
  line-height: 1.4; transition: all 0.2s;
}
.schritt-item.done .schritt-label { text-decoration: line-through; color: var(--text-muted); opacity: 0.6; }
.schritt-delete {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: var(--fs-small); padding: 2px 6px; border-radius: 4px;
  opacity: 0; transition: all 0.15s;
}
.schritt-item:hover .schritt-delete { opacity: 1; }
.schritt-delete:hover { color: var(--red); background: rgba(255,68,102,0.1); }

.schritt-add { display: flex; gap: 6px; }
.schritt-add-input {
  flex: 1; padding: 6px 10px; background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: 8px; color: var(--text); font-size: var(--fs-small); font-family: inherit;
  transition: border-color 0.2s;
}
.schritt-add-input:focus { outline: none; border-color: var(--primary); }
.schritt-add-input::placeholder { color: var(--text-muted); opacity: 0.5; }
.schritt-add-btn {
  padding: 6px 10px; border: none; background: rgba(122,0,223,0.15);
  color: var(--primary-light); border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: var(--fs-small); transition: all 0.15s;
}
.schritt-add-btn:hover { background: rgba(122,0,223,0.25); }
.schritt-add-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.schritte-count { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.toggle-arrow { font-size: 10px; display: inline-block; vertical-align: middle; line-height: 1; transition: transform 0.2s; }

/* ========== Ziel-Erfolgs-Banner ========== */
.celebration-banner {
  background: linear-gradient(135deg, rgba(0,255,136,0.10), rgba(122,0,223,0.08));
  border: 1px solid rgba(0,255,136,0.25);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; text-align: center;
  animation: celebFadeIn 0.4s ease;
  position: relative; overflow: hidden;
}
.celebration-banner::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.12), transparent 70%);
  pointer-events: none;
}
.celebration-banner::after {
  content: ''; position: absolute; bottom: -30px; left: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122,0,223,0.10), transparent 70%);
  pointer-events: none;
}
.celebration-banner-icon { margin-bottom: 8px; }
.celebration-banner-icon .celebration-svg { width: 48px; height: 48px; }
.celebration-banner-title {
  margin-bottom: 4px;
}
.celebration-banner-title svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.celebration-banner-sub { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.celebration-banner-badge {
  display: inline-block; margin-top: 8px; padding: 4px 12px;
  border-radius: 20px; font-size: var(--fs-badge); font-weight: 600;
  background: rgba(0,255,136,0.12); color: var(--neon);
}

/* ========== Ziel-Celebration ========== */
.celebration-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: celebFadeIn 0.4s ease forwards;
}
.celebration-card {
  text-align: center; padding: 40px 32px;
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); max-width: 340px; width: 90%;
  animation: celebBounce 0.5s ease 0.2s both;
}
.celebration-icon { margin-bottom: 16px; }
.celebration-icon .celebration-svg { width: 64px; height: 64px; }
.celebration-title {
  font-size: var(--fs-h1); font-weight: 700; margin-bottom: 8px;
  color: var(--neon);
}
.celebration-subtitle { font-size: var(--fs-body); color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.celebration-badge {
  display: inline-block; margin-top: 12px; padding: 4px 16px;
  border-radius: 20px; font-size: var(--fs-badge); font-weight: 600;
  background: rgba(0,255,136,0.12); color: var(--neon);
}
.confetti-piece {
  position: fixed; width: 8px; height: 8px; z-index: 201;
  border-radius: 2px; pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes celebFadeIn { to { opacity: 1; } }
@keyframes celebBounce {
  0% { opacity: 0; transform: scale(0.8) translateY(20px); }
  60% { transform: scale(1.03) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ========== Form Container (Slide-Down) ========== */
.form-container {
  background: var(--card); border: 1px solid var(--primary-alpha-30);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 20px; display: none; animation: slideDown 0.25s ease;
}
.form-container.visible { display: block; }
[data-theme="light"] .form-container { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ========== Fixed Toast ========== */
.toast-fixed {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 10px 20px;
  font-size: var(--fs-small); font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 200; transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0; white-space: nowrap; pointer-events: none;
}
.toast-fixed.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-fixed.success { border-color: var(--neon); color: var(--neon); }
.toast-fixed.error   { border-color: var(--red); color: var(--red); }
.toast-fixed.info    { border-color: var(--primary-light); color: var(--primary-light); }
.toast-undo-btn {
  background: none; border: 1px solid var(--primary-light); color: var(--primary-light);
  border-radius: 8px; padding: 4px 12px; margin-left: 12px;
  font-size: var(--fs-small); font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.toast-undo-btn:hover { background: rgba(122,0,223,0.15); }

/* ========== Lernplan-Box (Quiz) ========== */
.lernplan-box {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px;
}
.lernplan-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: var(--fs-body);
}
.lernplan-spinner {
  width: 18px; height: 18px; border: 2px solid var(--glass-border);
  border-top-color: var(--primary-light); border-radius: 50%;
  animation: lernplan-spin 0.7s linear infinite;
}
@keyframes lernplan-spin { to { transform: rotate(360deg); } }
.lernplan-content.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lernplan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  text-align: center; margin-bottom: 12px;
}
.lernplan-stat-val { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.lernplan-stat-lbl { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lernplan-next {
  border-top: 1px solid var(--glass-border); padding-top: 10px;
}
.lernplan-next-label { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lernplan-next-name { display: block; font-size: var(--fs-body); font-weight: 600; color: var(--primary-light); margin: 2px 0 6px; }
.lernplan-next-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.lernplan-next-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.lernplan-next-fill.high { background: var(--neon); }
.lernplan-next-fill.mid { background: var(--amber); }
.lernplan-next-fill.low { background: var(--primary-light); }
.lernplan-next-detail { font-size: var(--fs-caption); color: var(--text-muted); }
.lernplan-tempo {
  text-align: center; font-size: var(--fs-small); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 12px; border-radius: 8px; margin-bottom: 10px;
}
.lernplan-tempo.tempo-good { background: rgba(0,255,136,0.12); color: var(--neon); }
.lernplan-tempo.tempo-warn { background: rgba(251,191,36,0.12); color: var(--amber); }
.lernplan-tempo.tempo-behind { background: rgba(255,68,102,0.12); color: var(--red); }
.lernplan-tempo.tempo-done { background: rgba(0,255,136,0.12); color: var(--neon); }
.lernplan-tempo-detail {
  font-size: var(--fs-caption); font-weight: 400;
  text-transform: none; letter-spacing: 0; margin-top: 2px; opacity: 0.85;
}

/* ========== Quiz ========== */
.quiz-stats-bar {
  display: none; background: var(--header-bg);
  padding: 8px 20px;
  border-bottom: 1px solid rgba(122,0,223,0.15);
  position: sticky; top: 57px; z-index: 99;
}
.quiz-stats-bar.visible { display: block; }
.quiz-stats-top { display: flex; justify-content: center; align-items: center; gap: 24px; margin-bottom: 8px; }
.stats { display: flex; gap: 16px; }
.stat { text-align: center; }
.stat-value.correct { color: var(--neon); }
.stat-value.wrong { color: var(--red); }
.stat-value.streak { color: var(--amber); }

.screen { display: none; }
.screen.active { display: block; }

/* Start Screen */
.start-screen { text-align: center; padding-top: 4vh; }
.start-screen h1 {
  font-size: var(--fs-h1); margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--neon));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.start-screen p { color: var(--text-muted); margin-bottom: 20px; }

/* Module Select */
.quiz-hint {
  background: rgba(122,0,223,0.06); border: 1px solid rgba(122,0,223,0.18);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  color: var(--text-muted); font-size: var(--fs-caption); line-height: 1.5;
}
.quiz-hint b { color: var(--text); font-weight: 600; }
[data-theme="light"] .quiz-hint { background: rgba(122,0,223,0.05); border-color: rgba(122,0,223,0.18); }
.module-select { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.module-group { margin-bottom: 4px; }
.module-group-header {
  background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.2);
  border-radius: 10px; padding: 12px 16px; color: var(--text);
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: all 0.2s; user-select: none;
}
.module-group-header:hover { background: rgba(122,0,223,0.15); }
.module-group-header .group-arrow { transition: transform 0.2s; font-size: var(--fs-small); }
.module-group-header.collapsed .group-arrow { transform: rotate(-90deg); }
.module-group-header .group-progress { font-size: var(--fs-small); font-weight: 400; color: var(--text-muted); margin-left: auto; margin-right: 12px; }
.module-group-items { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 0 0; }
.module-group-items.collapsed { display: none; }

.module-btn {
  background: var(--card); border: 1px solid rgba(122,0,223,0.15);
  border-radius: 10px; padding: 12px 16px; color: var(--text);
  font-size: var(--fs-body); cursor: pointer; text-align: left; transition: all 0.2s;
  display: flex; justify-content: space-between; align-items: center;
}
.module-btn:hover:not(.locked), .module-btn:focus:not(.locked) { background: var(--card-hover); border-color: var(--primary); }
.module-btn.locked { opacity: 0.4; cursor: not-allowed; }
.module-badge.locked { color: var(--text-muted); background: none; }
.module-btn:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.module-btn.selected, .module-btn[aria-pressed="true"] { border-color: var(--neon); background: rgba(0,255,136,0.08); }

/* Quiz Question */
.question-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--text-muted); font-size: var(--fs-small); }
.question-card { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; border: 1px solid rgba(122,0,223,0.2); }
.question-text { font-size: var(--fs-body); line-height: 1.6; font-weight: 600; }

.answers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.answer-btn {
  background: var(--card); border: 2px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 20px; color: var(--text);
  font-size: var(--fs-body); cursor: pointer; text-align: left; transition: all 0.2s;
  line-height: 1.5; display: flex; gap: 12px; align-items: flex-start;
}
[data-theme="light"] .answer-btn { border-color: rgba(0,0,0,0.1); }
.answer-btn:hover:not(.disabled) { border-color: var(--primary); background: var(--card-hover); }
.answer-btn:focus-visible:not(.disabled) { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.answer-btn:active:not(.disabled) { transform: scale(0.98); }

.answer-letter {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--glass); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: var(--fs-body);
}
[data-theme="light"] .answer-letter { background: rgba(0,0,0,0.06); }
.answer-btn.correct { border-color: var(--neon); background: rgba(0,255,136,0.1); }
.answer-btn.correct .answer-letter { background: var(--neon); color: #000; }
.answer-btn.wrong { border-color: var(--red); background: rgba(255,68,102,0.1); }
.answer-btn.wrong .answer-letter { background: var(--red); color: #fff; }
.answer-btn.disabled { cursor: default; opacity: 0.6; }
.answer-btn.disabled.correct { opacity: 1; }

/* Explanation */
.explanation {
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.2);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
  display: none; animation: fadeIn 0.3s ease;
}
.explanation.wrong-explanation { background: rgba(255,68,102,0.06); border-color: rgba(255,68,102,0.2); }
.explanation.visible { display: block; }
.explanation-title { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.explanation-title.correct-title { color: var(--neon); }
.explanation-title.wrong-title { color: var(--red); }
.explanation-text { line-height: 1.6; color: var(--text-muted); }

.btn-next {
  background: var(--primary); border: none; border-radius: var(--radius);
  padding: 16px; color: white; font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; width: 100%; display: none; transition: all 0.2s;
}
.btn-next.visible { display: block; }
.btn-next:hover { background: var(--primary-light); }
.btn-next:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

.btn-quit {
  background: transparent; border: 1px solid var(--text-muted);
  border-radius: var(--radius); padding: 12px; color: var(--text-muted);
  font-size: var(--fs-body); font-weight: 500; cursor: pointer;
  width: 100%; margin-top: 16px; transition: all 0.2s;
}
.btn-quit:hover { border-color: var(--red); color: var(--red); }
.btn-quit:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

/* Result Screen */
.result-screen { text-align: center; padding-top: 10vh; }
.result-circle {
  width: 160px; height: 160px; border-radius: 50%;
  margin: 0 auto 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border: 4px solid;
}
.result-circle.good { border-color: var(--neon); }
.result-circle.medium { border-color: var(--amber); }
.result-circle.bad { border-color: var(--red); }
.result-percent { font-size: var(--fs-display); font-weight: 700; }
.result-circle.good .result-percent { color: var(--neon); }
.result-circle.medium .result-percent { color: var(--amber); }
.result-circle.bad .result-percent { color: var(--red); }
.result-label { color: var(--text-muted); }
.result-message { font-size: var(--fs-h1); margin-bottom: 8px; font-weight: 600; }
.result-detail { color: var(--text-muted); margin-bottom: 32px; }
.result-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.result-buttons { display: flex; flex-direction: column; gap: 12px; }

.btn-secondary {
  background: transparent; border: 2px solid var(--primary);
  border-radius: var(--radius); padding: 16px; color: var(--primary-light);
  font-size: var(--fs-body); font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(122,0,223,0.1); }
.btn-secondary:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

/* Quiz Tabs */
.tab-bar {
  display: flex; gap: 0; margin-bottom: 24px; border-radius: 12px;
  overflow: hidden; border: 1px solid rgba(122,0,223,0.3);
}
.tab-btn {
  flex: 1; padding: 12px 16px; background: var(--card); border: none;
  color: var(--text-muted); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.tab-btn:not(:last-child) { border-right: 1px solid rgba(122,0,223,0.3); }
.tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.tab-btn:hover:not(.active) { background: var(--card-hover); }
.tab-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: -3px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Quiz Auswertung (inline) */
.aw-hero { text-align: center; margin-bottom: 24px; }
.aw-circle {
  width: 160px; height: 160px; border-radius: 50%;
  margin: 0 auto 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border: 5px solid;
}
.aw-circle.good { border-color: var(--neon); }
.aw-circle.medium { border-color: var(--amber); }
.aw-circle.bad { border-color: var(--red); }
.aw-circle.none { border-color: var(--text-muted); }
.aw-percent { font-size: var(--fs-display); font-weight: 700; }
.aw-circle.good .aw-percent { color: var(--neon); }
.aw-circle.medium .aw-percent { color: var(--amber); }
.aw-circle.bad .aw-percent { color: var(--red); }
.aw-circle.none .aw-percent { color: var(--text-muted); }
.aw-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.aw-title { font-size: var(--fs-h2); font-weight: 700; margin-bottom: 4px; }
.aw-sub { color: var(--text-muted); }

.aw-stats { display: flex; gap: 8px; margin-bottom: 24px; }
.aw-stat {
  flex: 1; background: var(--card); border-radius: 12px;
  padding: 12px; text-align: center; border: 1px solid var(--glass);
}
[data-theme="light"] .aw-stat { border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.aw-stat-val { font-size: var(--fs-h1); font-weight: 700; }
.aw-stat-val.green { color: var(--neon); }
.aw-stat-val.amber { color: var(--amber); }
.aw-stat-val.red { color: var(--red); }
.aw-stat-lbl { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.aw-empfehlung {
  background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.25);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; line-height: 1.5;
}
.aw-section-title { font-weight: 700; margin-bottom: 12px; }
.aw-section-title + .aw-section-title,
.aw-section-title.mt { margin-top: 24px; }
.quiz-module-error {
  padding: 8px 12px; background: rgba(255,68,102,0.1);
  border: 1px solid rgba(255,68,102,0.3); border-radius: 8px;
  color: var(--red); font-size: var(--fs-caption);
}
.aw-mod-item {
  background: var(--card); border-radius: 12px; padding: 12px 16px;
  margin-bottom: 6px; border: 1px solid var(--glass);
  display: flex; align-items: center; gap: 10px;
}
[data-theme="light"] .aw-mod-item { border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.aw-mod-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.aw-mod-dot.gemeistert { background: var(--neon); }
.aw-mod-dot.fast_fertig { background: var(--amber); }
.aw-mod-dot.in_arbeit { background: var(--primary-light); }
.aw-mod-dot.begonnen { background: var(--text-muted); }
.aw-mod-dot.offen { background: rgba(255,255,255,0.1); border: 1px solid var(--text-muted); }
.aw-mod-info { flex: 1; min-width: 0; }
.aw-mod-name { font-weight: 600; margin-bottom: 2px; }
.aw-mod-detail { color: var(--text-muted); }
.aw-bar-bg { height: 3px; background: var(--glass-border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
[data-theme="light"] .aw-bar-bg { background: rgba(0,0,0,0.08); }
.aw-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--neon)); transition: width 0.5s ease; }
.aw-mod-pct { font-size: var(--fs-h2); font-weight: 700; white-space: nowrap; }
.aw-mod-pct.good { color: var(--neon); }
.aw-mod-pct.medium { color: var(--amber); }
.aw-mod-pct.low { color: var(--text-muted); }

.aw-session {
  background: var(--card); border-radius: 10px; padding: 8px 12px;
  margin-bottom: 4px; display: flex; justify-content: space-between;
  align-items: center; border: 1px solid var(--glass);
}
[data-theme="light"] .aw-session { border-color: rgba(0,0,0,0.06); }
.aw-session-modul { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-session-score { font-weight: 700; margin: 0 12px; }
.aw-session-score.good { color: var(--neon); }
.aw-session-score.medium { color: var(--amber); }
.aw-session-score.bad { color: var(--red); }
.aw-session-date { color: var(--text-muted); white-space: nowrap; }
.aw-empty { text-align: center; padding: 24px; color: var(--text-muted); }
.aw-loading { text-align: center; padding: 32px; color: var(--text-muted); }

/* Zwischenprüfung Gate */
.zp-gate {
  background: var(--card); border: 2px dashed rgba(122,0,223,0.3);
  border-radius: 12px; padding: 16px; margin: 8px 0;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.zp-gate.locked { opacity: 0.5; }
.zp-gate.ready { border-color: var(--primary); border-style: solid; background: rgba(122,0,223,0.06); }
.zp-gate.ready:hover { border-color: var(--primary-light); }
.zp-gate.passed { border-color: var(--neon); border-style: solid; background: rgba(0,255,136,0.06); }
.zp-icon { font-size: 1.5rem; flex-shrink: 0; }
.zp-info { flex: 1; min-width: 0; }
.zp-title { font-weight: 700; font-size: var(--fs-body); margin-bottom: 2px; }
.zp-detail { font-size: var(--fs-caption); color: var(--text-muted); }
.zp-badge {
  font-size: var(--fs-body); font-weight: 700; color: var(--primary-light);
  background: rgba(122,0,223,0.12); padding: 4px 12px; border-radius: 20px;
  white-space: nowrap;
}
.zp-badge.locked { color: var(--text-muted); background: rgba(255,255,255,0.06); }
.zp-start-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; border-radius: 10px;
  padding: 10px 20px; font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.zp-start-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(122,0,223,0.4); }
.zp-start-btn:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }

/* Zwischenprüfung Result-Box */
.zp-result-box {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: var(--radius); margin: 20px 0;
}
.zp-result-box.passed { background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.3); }
.zp-result-box.failed { background: rgba(255,68,102,0.08); border: 1px solid rgba(255,68,102,0.3); }
.zp-result-icon { font-size: 1.5rem; flex-shrink: 0; }
.zp-result-text { font-size: var(--fs-body); line-height: 1.5; }
.zp-result-text strong { display: block; margin-bottom: 2px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

/* ========== Auswertung (Standalone) ========== */
.hero { text-align: center; margin-bottom: 28px; }
.big-circle {
  width: 180px; height: 180px; border-radius: 50%;
  margin: 0 auto 16px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border: 5px solid; position: relative;
}
.big-circle.good { border-color: var(--neon); }
.big-circle.medium { border-color: var(--amber); }
.big-circle.bad { border-color: var(--red); }
.big-circle.none { border-color: var(--text-muted); }
.big-percent { font-size: var(--fs-display); font-weight: 700; }
.big-circle.good .big-percent { color: var(--neon); }
.big-circle.medium .big-percent { color: var(--amber); }
.big-circle.bad .big-percent { color: var(--red); }
.big-circle.none .big-percent { color: var(--text-muted); }
.big-label { font-size: var(--fs-small); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.hero-title { font-size: var(--fs-h1); font-weight: 700; margin-bottom: 4px; }
.hero-sub { color: var(--text-muted); }

.stats-row { display: flex; gap: 8px; margin-bottom: 28px; }
.stat-card {
  flex: 1; background: var(--card); border-radius: 12px;
  padding: 12px; text-align: center; border: 1px solid var(--glass-border);
}
.stat-val { font-size: var(--fs-h1); font-weight: 700; }
.stat-val.green { color: var(--neon); }
.stat-val.amber { color: var(--amber); }
.stat-val.red { color: var(--red); }
.stat-lbl { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.empfehlung {
  background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.25);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 28px; line-height: 1.5;
}
.empfehlung-icon { margin-right: 8px; }

.module-item {
  background: var(--card); border-radius: 12px; padding: 12px 16px;
  margin-bottom: 8px; border: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 12px;
}
[data-theme="light"] .module-item { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.module-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.module-status.gemeistert { background: var(--neon); }
.module-status.fast_fertig { background: var(--amber); }
.module-status.in_arbeit { background: var(--primary-light); }
.module-status.begonnen { background: var(--text-muted); }
.module-status.offen { background: rgba(255,255,255,0.1); border: 1px solid var(--text-muted); }
.module-info { flex: 1; min-width: 0; }
.module-name { font-weight: 600; margin-bottom: 2px; }
.module-detail { color: var(--text-muted); }
.module-pct { font-size: var(--fs-h2); font-weight: 700; white-space: nowrap; }
.module-pct.good { color: var(--neon); }
.module-pct.medium { color: var(--amber); }
.module-pct.low { color: var(--text-muted); }

.bar-bg { height: 4px; background: var(--glass-border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
[data-theme="light"] .bar-bg { background: rgba(0,0,0,0.08); }
.bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--neon)); transition: width 0.5s ease; }

.session-item {
  background: var(--card); border-radius: 10px; padding: 12px 16px;
  margin-bottom: 8px; display: flex; justify-content: space-between;
  align-items: center; border: 1px solid var(--glass-border);
}
[data-theme="light"] .session-item { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.session-modul { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-score { font-weight: 700; margin: 0 12px; }
.session-score.good { color: var(--neon); }
.session-score.medium { color: var(--amber); }
.session-score.bad { color: var(--red); }
.session-date { color: var(--text-muted); white-space: nowrap; }

/* ========== Notizen ========== */
.notiz-card {
  background: rgba(17,29,51,0.50); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 8px; transition: all 0.25s; position: relative;
}
.notiz-card:hover {
  border-color: rgba(122,0,223,0.4);
  box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14);
  transform: translateY(-1px);
}
[data-theme="light"] .notiz-card { background: rgba(255,255,255,0.75); backdrop-filter: blur(16px); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
[data-theme="light"] .notiz-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 0 14px rgba(122,0,223,0.1); }
.notiz-card.pinned { border-left: 3px solid var(--amber); box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 16px rgba(251,191,36,0.10), inset 0 1px 0 rgba(255,255,255,0.06); }
.notiz-card.verarbeitet { opacity: 0.55; }
.notiz-card.verarbeitet .notiz-inhalt { text-decoration: line-through; }

.notiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.notiz-meta { display: flex; align-items: center; gap: 8px; }
.notiz-date { font-size: 0.7rem; color: var(--text-muted); }
.notiz-pin {
  font-size: 0.85rem; cursor: pointer; opacity: 0.4;
  background: none; border: none; padding: 4px; transition: all 0.2s;
}
.notiz-pin:hover, .notiz-pin.active { opacity: 1; }
.notiz-inhalt { font-size: 0.88rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.notiz-verarbeitet-link { display: inline-block; font-size: var(--fs-caption); color: var(--primary-light); margin-top: 6px; text-decoration: none; opacity: 0.85; transition: opacity 0.2s; }
.notiz-verarbeitet-link:hover { opacity: 1; text-decoration: underline; }
.notiz-actions { display: flex; gap: 6px; margin-top: 10px; }
.notiz-count { font-size: var(--fs-caption); color: var(--text-muted); margin-bottom: 12px; }

/* Notiz-Bilder Galerie */
.notiz-bild-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-small);
  color: var(--primary-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(122,0,223,0.08);
  margin-top: 8px;
  transition: all 0.2s;
}
.notiz-bild-badge:hover { background: rgba(122,0,223,0.15); }
.notiz-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 8px; }
.notiz-bilder.notiz-bilder-hidden { display: none; }
.notiz-bilder:empty { display: none; }
.notiz-bild-wrap { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.notiz-bild { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: opacity 0.2s; }
.notiz-bild:hover { opacity: 0.85; }
.notiz-bild-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.7); border: none; color: white;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-caption); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.notiz-bild-wrap:hover .notiz-bild-remove { opacity: 1; }
.notiz-bild-remove:hover { background: var(--red); }

/* Notiz: Bild hinzufügen */
.notiz-add-bild { margin-top: 6px; }
.notiz-add-bild-btn {
  font-size: var(--fs-caption); color: var(--text-muted); cursor: pointer;
  padding: 4px 10px; border: 1px dashed var(--glass-border); border-radius: 8px;
  transition: all 0.2s; display: inline-block;
}
.notiz-add-bild-btn:hover { border-color: var(--primary); color: var(--primary-light); }

/* Quick-Notiz Upload (kompakt) */
.quick-notiz-upload { margin-bottom: 8px; }
.upload-area-compact { padding: 10px; }
.upload-area-compact .upload-text { font-size: var(--fs-caption); }

/* Suche */
.search-bar {
  width: 100%; padding: 10px 14px;
  background: rgba(17,29,51,0.50); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.85rem; font-family: inherit;
  margin-bottom: 16px; transition: all 0.2s;
}
.search-bar:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 14px rgba(122,0,223,0.2); }
[data-theme="light"] .search-bar { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* ========== Vorhaben Tabs ========== */
.vorhaben-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 4px; overflow: hidden;
}
.vorhaben-tab {
  flex: 1; padding: 10px 8px; border-radius: calc(var(--radius) - 4px);
  background: none; border: none; text-decoration: none;
  font-size: var(--fs-body); font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; text-align: center; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.vorhaben-tab:hover { color: var(--text); }
.vorhaben-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.vorhaben-tab-badge {
  background: var(--red); color: white; font-size: var(--fs-badge);
  padding: 1px 6px; border-radius: 10px; font-weight: 700; min-width: 18px; text-align: center;
}
.vorhaben-tab.active .vorhaben-tab-badge { background: rgba(255,255,255,0.25); }
[data-theme="light"] .vorhaben-tabs { background: #fff; border-color: rgba(0,0,0,0.08); }

/* ========== Quality Reports ========== */
.quality-report-group {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 12px; overflow: hidden; margin-bottom: 8px;
}
.quality-report-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none; padding: 12px 16px; transition: background 0.15s;
}
.quality-report-header:hover { background: rgba(122,0,223,0.04); }
.quality-report-info { flex: 1; min-width: 0; }
.quality-report-titel { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.quality-report-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quality-report-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.quality-report-header .accordion-chevron {
  font-size: 12px; color: var(--text-muted);
  transition: transform 0.25s ease; flex-shrink: 0;
}
.quality-report-header.open .accordion-chevron { transform: rotate(90deg); }
.quality-report-body { display: none; border-top: 1px solid var(--glass-border); }
.quality-report-body.open { display: block; }

.quality-top-bar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.quality-top-bar .vorhaben-count { margin-bottom: 0; }
.quality-filter-toggle { display: none; margin-bottom: 8px; }
.quality-filter-toggle .accordion-chevron {
  font-size: 10px; display: inline-block; transition: transform 0.2s; margin-left: 4px;
}
.quality-filter-toggle.open .accordion-chevron { transform: rotate(90deg); }
.quality-filters { margin-bottom: 12px; }
.quality-filters .filter-tabs { margin-bottom: 8px; }
.quality-filters .filter-tabs:last-child { margin-bottom: 0; }
.quality-filters-row { display: contents; }
@media (max-width: 500px) {
  .quality-filter-toggle { display: inline-flex; }
  .quality-filters { display: none; }
  .quality-filters.open { display: block; }
  .quality-filters-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .quality-filters-row .filter-tabs { margin-bottom: 0; }
}
.quality-batch-check {
  width: 18px; height: 18px; flex-shrink: 0; margin-right: 10px; margin-top: 2px;
  accent-color: var(--primary); cursor: pointer;
}
.quality-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 16px; border-top: 1px solid var(--glass-border);
  transition: background 0.15s;
}
.quality-item:first-child { border-top: none; }
.quality-item:hover { background: rgba(122,0,223,0.03); }
.quality-item.done { opacity: 0.5; }
.quality-item-main { flex: 1; min-width: 0; }
.quality-item-badges { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.quality-item-titel { font-size: 0.9rem; font-weight: 500; line-height: 1.4; }
.quality-item-titel.done { text-decoration: line-through; color: var(--text-muted); }
.quality-item-loesung {
  font-size: var(--fs-caption); color: var(--text-muted);
  margin-top: 4px; line-height: 1.4; max-height: 40px; overflow: hidden;
  cursor: pointer; transition: max-height 0.25s ease; position: relative;
}
.quality-item-loesung::after {
  content: 'mehr...';
  position: absolute; bottom: 0; right: 0; left: 0;
  height: 20px; text-align: right;
  background: linear-gradient(to right, transparent 60%, var(--card) 90%);
  font-size: var(--fs-badge); color: var(--primary-light);
  padding-right: 4px; line-height: 20px;
}
.quality-item-loesung.expanded { max-height: none; }
.quality-item-loesung.expanded::after { display: none; }
.quality-item-erledigt {
  font-size: var(--fs-badge); color: var(--neon); margin-top: 4px;
}
.quality-item-actions {
  display: flex; gap: 6px; flex-shrink: 0; margin-left: 12px; padding-top: 2px;
}
.badge-kat {
  background: rgba(122,0,223,0.12); color: var(--primary-light);
  font-size: 14px; padding: 2px 6px;
}
.badge-aufwand {
  background: rgba(59,130,246,0.12); color: var(--blue);
  font-size: var(--fs-badge); padding: 3px 8px; border-radius: 20px;
}
.badge-red { background: rgba(255,68,102,0.12); color: var(--red); }
.badge-amber { background: rgba(251,191,36,0.12); color: var(--amber); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-projekt { background: rgba(0,255,136,0.10); color: var(--neon); font-size: var(--fs-badge); }
.btn-icon-round.success { color: var(--neon); border-color: rgba(0,255,136,0.3); }
.btn-icon-round.marked { color: var(--amber); border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.1); }
.btn-icon-round.btn-danger-subtle { color: var(--text-muted); border-color: transparent; opacity: 0.5; }
.btn-icon-round.btn-danger-subtle:hover { color: var(--red); border-color: rgba(255,68,102,0.3); opacity: 1; background: rgba(255,68,102,0.1); }
.quality-item.marked { border-left: 3px solid var(--amber); }
.badge-marked {
  background: rgba(251,191,36,0.15); color: var(--amber);
  font-size: var(--fs-badge); padding: 3px 8px; border-radius: 20px;
}
[data-theme="light"] .quality-report-group { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
[data-theme="light"] .quality-item:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .badge-muted { background: rgba(0,0,0,0.06); color: #6b7280; }
[data-theme="light"] .badge-kat { background: rgba(122,0,223,0.10); }
[data-theme="light"] .badge-aufwand { background: rgba(59,130,246,0.10); }
[data-theme="light"] .badge-red { background: rgba(255,68,102,0.10); }
[data-theme="light"] .badge-amber { background: rgba(251,191,36,0.15); }
[data-theme="light"] .badge-projekt { background: rgba(0,180,80,0.10); color: #059669; }
[data-theme="light"] .badge-marked { background: rgba(251,191,36,0.15); }
[data-theme="light"] .badge-niedrig { background: rgba(0,0,0,0.06); color: #6b7280; }

/* ========== Vorhaben ========== */
.vorhaben-card {
  background: rgba(17,29,51,0.50); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 8px; transition: all 0.25s;
  cursor: pointer; text-decoration: none; display: block; color: var(--text);
}
.vorhaben-card:hover {
  border-color: rgba(122,0,223,0.4);
  box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14);
  transform: translateY(-1px);
}
[data-theme="light"] .vorhaben-card { background: rgba(255,255,255,0.75); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.vorhaben-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.vorhaben-badges { display: flex; gap: 6px; align-items: center; }
.vorhaben-titel { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.vorhaben-beschreibung { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; }
.vorhaben-count { font-size: var(--fs-caption); color: var(--text-muted); margin-bottom: 12px; }

/* Vorhaben Detail */
.detail-header { margin-bottom: 20px; }
.detail-titel { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.detail-beschreibung { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; white-space: pre-wrap; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-box {
  background: rgba(17,29,51,0.50); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px; text-align: center;
}
[data-theme="light"] .stat-box { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.06); }
.stat-value { font-size: 1.4rem; font-weight: 700; }
.stat-value.neon { color: var(--neon); }
.stat-value.amber { color: var(--amber); }
.stat-value.muted { color: var(--text-muted); }
.stat-label { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.detail-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.btn-action {
  padding: 8px 16px; border-radius: 10px; font-size: var(--fs-caption); font-weight: 500;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.btn-action:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-action.danger:hover { border-color: var(--red); color: var(--red); }
.btn-back-list {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-small); color: var(--text-muted);
  text-decoration: none; margin-bottom: 16px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--glass); border: 1px solid var(--glass-border); transition: all 0.2s;
}
.btn-back-list:hover { border-color: var(--primary); color: var(--primary-light); }

/* Vorhaben Schritte */
.schritte-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.schritte-title { font-size: 1rem; font-weight: 700; }
.schritt-item {
  background: rgba(17,29,51,0.40); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px;
  margin-bottom: 8px; transition: all 0.2s;
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
}
.schritt-item:hover { border-color: rgba(122,0,223,0.3); }
[data-theme="light"] .schritt-item { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.05); }
.schritt-nummer {
  width: 28px; height: 28px; min-width: 28px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); font-weight: 700;
  background: rgba(122,0,223,0.15); color: var(--primary-light);
  border: 1px solid rgba(122,0,223,0.3);
}
.schritt-item[data-status="erledigt"] .schritt-nummer { background: rgba(0,255,136,0.15); color: var(--neon); border-color: rgba(0,255,136,0.3); }
.schritt-item[data-status="in_arbeit"] .schritt-nummer { background: rgba(251,191,36,0.15); color: var(--amber); border-color: rgba(251,191,36,0.3); }
.schritt-content { flex: 1; min-width: 0; }
.schritt-titel { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.schritt-item[data-status="erledigt"] .schritt-titel { text-decoration: line-through; opacity: 0.6; }
.schritt-beschreibung { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.schritt-actions { display: flex; gap: 4px; flex-shrink: 0; }
.schritt-btn {
  padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 500;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.schritt-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.schritt-btn.danger:hover { border-color: var(--red); color: var(--red); }
.schritt-btn.success { border-color: rgba(0,255,136,0.3); color: var(--neon); }
.schritt-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.schritt-progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
[data-theme="light"] .schritt-progress-bar { background: rgba(0,0,0,0.06); }
.schritt-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--neon)); transition: width 0.4s ease; }
.schritt-progress-text { font-size: var(--fs-badge); color: var(--text-muted); white-space: nowrap; min-width: 32px; text-align: right; }

/* Unteraufgaben */
.ua-toggle {
  font-size: var(--fs-caption); color: var(--text-muted);
  cursor: pointer; margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 10px 14px; border-radius: 10px; font-family: inherit; transition: all 0.2s; min-height: 44px;
}
.ua-toggle:hover { color: var(--primary-light); border-color: var(--primary); }
.ua-toggle .chevron { transition: transform 0.2s; display: inline-block; font-size: var(--fs-badge); }
.ua-toggle.open .chevron { transform: rotate(90deg); }
.ua-toggle.open { border-color: var(--primary); color: var(--primary-light); }
.ua-list { display: none; margin-top: 8px; }
.ua-list.open { display: block; }
.ua-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: var(--fs-caption); }
.ua-item:last-child { border-bottom: none; }
[data-theme="light"] .ua-item { border-color: rgba(0,0,0,0.04); }
.ua-main { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ua-id-badge { font-size: 0.6rem; color: var(--text-muted); opacity: 0.5; font-weight: 600; white-space: nowrap; }
.ua-titel { flex: 1; }
.ua-titel.done { text-decoration: line-through; opacity: 0.5; }
.ua-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.7rem; padding: 2px 4px; opacity: 0; transition: all 0.2s; }
.ua-item:hover .ua-delete { opacity: 1; }
.ua-delete:hover { color: var(--red); }
.ua-progress-row { display: flex; align-items: center; gap: 6px; }
.ua-step-btn {
  width: 22px; height: 22px; min-width: 22px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1); background: none; color: var(--text-muted);
  cursor: pointer; font-size: var(--fs-caption); font-weight: 700;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; padding: 0;
}
.ua-step-btn:hover { border-color: var(--primary); color: var(--primary-light); }
[data-theme="light"] .ua-step-btn { border-color: rgba(0,0,0,0.1); }
.ua-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
[data-theme="light"] .ua-progress-bar { background: rgba(0,0,0,0.06); }
.ua-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transition: width 0.3s ease; }
.ua-progress-fill.full { background: linear-gradient(90deg, var(--primary), var(--neon)); }
.ua-pct { font-size: var(--fs-badge); color: var(--text-muted); min-width: 30px; text-align: right; font-weight: 600; }
.ua-pct.done { color: var(--neon); }
.ua-add { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ua-add-input {
  flex: 1; min-width: 120px; padding: 6px 10px; background: rgba(17,29,51,0.40);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; color: var(--text);
  font-size: var(--fs-caption); font-family: inherit;
}
.ua-add-input:focus { outline: none; border-color: var(--primary); }
[data-theme="light"] .ua-add-input { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.08); }
.ua-add-date {
  padding: 6px 8px; background: rgba(17,29,51,0.40);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; color: var(--text-muted);
  font-size: var(--fs-caption); font-family: inherit; cursor: pointer;
}
.ua-add-date:focus { outline: none; border-color: var(--primary); color: var(--text); }
[data-theme="light"] .ua-add-date { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.08); }
.ua-add-btn {
  padding: 6px 12px; background: rgba(122,0,223,0.15); border: 1px solid rgba(122,0,223,0.3);
  border-radius: 8px; color: var(--primary-light); font-size: var(--fs-caption); font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.ua-add-btn:hover { background: rgba(122,0,223,0.25); }
/* Fälligkeitsdatum Badge */
.ua-faellig {
  font-size: var(--fs-badge); padding: 2px 7px; border-radius: 20px;
  background: rgba(59,130,246,0.12); color: var(--blue);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.ua-faellig.soon { background: rgba(251,191,36,0.15); color: var(--amber); }
.ua-faellig.overdue { background: rgba(255,68,102,0.15); color: var(--red); }
.ua-faellig:hover, .ua-date-set:hover { opacity: 0.8; }
.ua-date-set {
  background: none; border: none; cursor: pointer; font-size: 0.8rem;
  opacity: 0; transition: opacity 0.2s; padding: 0 2px;
}
.ua-item:hover .ua-date-set { opacity: 0.5; }
.ua-date-row {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 0 2px; flex-wrap: wrap;
}
.ua-date-input {
  padding: 5px 8px; background: rgba(17,29,51,0.40);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  color: var(--text); font-size: var(--fs-caption); font-family: inherit;
}
.ua-date-input:focus { outline: none; border-color: var(--primary); }
[data-theme="light"] .ua-date-input { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.1); }
.ua-date-clear {
  background: none; border: 1px solid rgba(255,68,102,0.3); color: var(--red);
  font-size: var(--fs-badge); padding: 3px 8px; border-radius: 8px; cursor: pointer;
}

/* ========== Ideen ========== */
.idee-card {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 8px; transition: all 0.2s;
}
.idee-card:hover { border-color: rgba(122,0,223,0.3); }
[data-theme="light"] .idee-card { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.idee-card.umgesetzt { opacity: 0.5; }
.idee-card.verworfen { opacity: 0.35; }

.idee-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.idee-titel { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }

.idee-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.idee-meta {
  font-size: var(--fs-small); color: var(--text-muted);
  margin-bottom: 8px; display: flex; gap: 16px; flex-wrap: wrap;
}
.idee-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.idee-btn {
  padding: 5px 12px; border-radius: 8px; font-size: var(--fs-small); font-weight: 500;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.idee-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.idee-btn.danger:hover { border-color: var(--red); color: var(--red); }
.idee-btn.success:hover { border-color: var(--neon); color: var(--neon); }
.idee-btn.vorhaben { border-color: rgba(122,0,223,0.3); color: var(--primary-light); }
.idee-btn.vorhaben:hover { border-color: var(--primary); background: rgba(122,0,223,0.1); }

/* 3-Spalten Form-Row */
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ========== Team ========== */
.mindmap-wrap { display: flex; justify-content: center; margin-bottom: 32px; margin-top: 4px; }
.mindmap-svg { width: 100%; max-width: 560px; height: auto; }
.mindmap-svg .conn-main  { stroke: rgba(155,63,245,0.8); stroke-width: 2.5; }
.mindmap-svg .conn-skill { stroke: rgba(155,63,245,0.5); stroke-width: 2; stroke-dasharray: 5,3; }
[data-theme="light"] .mindmap-svg .conn-main  { stroke: rgba(122,0,223,0.6); }
[data-theme="light"] .mindmap-svg .conn-skill { stroke: rgba(122,0,223,0.4); }
.mindmap-svg .mm-christian rect { fill: rgba(0,255,136,0.1); stroke: #00ff88; stroke-width: 1.5; }
.mindmap-svg .mm-christian .mm-role { fill: rgba(0,255,136,0.6); font-size: 9px; text-anchor: middle; }
.mindmap-svg .mm-christian .mm-name { fill: #00ff88; font-size: 15px; font-weight: 700; text-anchor: middle; }
.mindmap-svg .mm-kira rect { fill: rgba(122,0,223,0.18); stroke: #9a30ff; stroke-width: 1.5; }
.mindmap-svg .mm-kira .mm-role { fill: rgba(180,74,255,0.65); font-size: 9px; text-anchor: middle; }
.mindmap-svg .mm-kira .mm-name { fill: #b44aff; font-size: 16px; font-weight: 700; text-anchor: middle; }
.mindmap-svg .mm-skill rect { fill: rgba(122,0,223,0.08); stroke: rgba(122,0,223,0.3); stroke-width: 1; }
.mindmap-svg .mm-skill .mm-cmd  { fill: #00ff88; font-size: 12px; font-weight: 700; text-anchor: middle; font-family: 'SF Mono','Fira Code',monospace; }
.mindmap-svg .mm-skill .mm-hint { fill: rgba(255,255,255,0.5); font-size: 9px; text-anchor: middle; }
[data-theme="light"] .mindmap-svg .mm-skill .mm-hint { fill: rgba(0,0,0,0.4); }
[data-theme="light"] .mindmap-svg .mm-christian rect { fill: rgba(0,255,136,0.08); }
[data-theme="light"] .mindmap-svg .mm-kira rect     { fill: rgba(122,0,223,0.1); }
[data-theme="light"] .mindmap-svg .mm-skill rect    { fill: rgba(122,0,223,0.05); }
.mindmap-svg .mm-badge-neu { fill: rgba(0,255,136,0.15); stroke: rgba(0,255,136,0.4); stroke-width: 0.8; }
.mindmap-svg .mm-badge-neu-text { fill: #00ff88; font-size: 7px; font-weight: 700; text-anchor: middle; letter-spacing: 0.5px; }

.team-intro { margin-bottom: 28px; font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.team-connector { display: flex; justify-content: center; align-items: center; height: 36px; position: relative; }
.team-connector::before { content: ''; display: block; width: 3px; height: 100%; background: linear-gradient(to bottom, var(--primary-light), rgba(122,0,223,0.5)); border-radius: 2px; box-shadow: 0 0 8px rgba(122,0,223,0.3); }
.team-connector-label { position: absolute; font-size: var(--fs-badge); color: var(--text-muted); background: var(--bg); padding: 2px 10px; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 8px; border: 1px solid var(--glass-border); }

.person-card {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 0;
  position: relative; overflow: hidden; transition: all 0.2s;
}
.person-card:hover { border-color: rgba(122,0,223,0.4); box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14); transform: translateY(-1px); }
.person-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; }
.person-card.christian::before { background: linear-gradient(90deg, var(--neon), #00c064); }
.person-card.kira::before { background: linear-gradient(90deg, var(--primary), #b44aff); }
[data-theme="light"] .person-card { background: var(--glass-bg); backdrop-filter: blur(16px); border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.person-role { font-size: var(--fs-badge); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.person-name { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.person-desc { font-size: 0.84rem; color: var(--text); line-height: 1.55; }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.person-tag {
  font-size: 0.7rem; padding: 3px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
[data-theme="light"] .person-tag { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }

.skills-heading { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 4px 0 14px 0; display: flex; align-items: center; gap: 8px; }
.skills-heading::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }

.skill-card {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
  position: relative; overflow: hidden; transition: all 0.2s;
}
.skill-card:hover { border-color: rgba(122,0,223,0.4); box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14); transform: translateY(-1px); }
.skill-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--primary); opacity: 0.8; }
[data-theme="light"] .skill-card { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

.skill-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.skill-cmd { font-family: 'SF Mono','Fira Code',monospace; font-size: 0.95rem; font-weight: 700; color: var(--neon); }
.skill-name { font-size: var(--fs-caption); color: var(--text-muted); font-weight: 500; }
.skill-desc { font-size: 0.82rem; color: var(--text); line-height: 1.5; }
.skill-trigger { margin-top: 6px; font-size: var(--fs-caption); color: var(--text-muted); font-style: italic; }

.team-note {
  background: rgba(122,0,223,0.06); border: 1px solid rgba(122,0,223,0.18);
  border-radius: 12px; padding: 14px 18px; margin-top: 28px;
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.6;
}
.team-note strong { color: var(--primary-light); }

/* ── KI-Infrastruktur Pyramide ── */
.infra-section { margin-top: 48px; }
.infra-title {
  font-size: var(--fs-h2); font-weight: 700; text-align: center; margin-bottom: 4px;
}
.infra-subtitle {
  text-align: center; font-size: var(--fs-caption); color: var(--text-muted); margin-bottom: 24px;
}

/* ── Holographic Pyramid Viewport ── */
.pyramid-viewport {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
.pyramid-viewport .pyramid-image {
  position: absolute;
  width: 550px; height: 550px;
  right: 0;
  object-fit: contain;
  z-index: 1;
  filter: brightness(1.1) contrast(1.1);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 35%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 35%, transparent 72%);
  box-shadow: 0 0 30px rgba(122,0,223,0.2);
}

/* ── Holographic Panel ── */
.holo-panel {
  position: relative;
  width: fit-content;
  min-width: 144px;
  white-space: nowrap;
  padding: 10px 14px;
  z-index: 10;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(122,0,223,0.02) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  box-shadow:
    0 0 15px rgba(122,0,223,0.15),
    inset 0 0 10px rgba(255,255,255,0.05),
    0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.3s ease-out;
}
.holo-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  z-index: 11;
}
/* Charge-Up Animation (Batterie: unten→oben, alle bleiben bis voll, dann gemeinsam weg) */
.holo-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(to top, rgba(0,255,136,0.10) 0%, rgba(0,255,136,0.02) 100%);
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
}
/* Jedes Panel hat eigenes Timing: füllt gestaffelt, bleibt bis alle voll, gemeinsamer Fade */
.hp-6::after { animation: ch6 7s ease-in-out infinite; }
.hp-5::after { animation: ch5 7s ease-in-out infinite; }
.hp-4::after { animation: ch4 7s ease-in-out infinite; }
.hp-3::after { animation: ch3 7s ease-in-out infinite; }
.hp-2::after { animation: ch2 7s ease-in-out infinite; }
.hp-1::after { animation: ch1 7s ease-in-out infinite; }
@keyframes ch6 {
  0%    { transform: scaleY(0); opacity: 1; }
  10%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
@keyframes ch5 {
  0%    { transform: scaleY(0); opacity: 1; }
  7%    { transform: scaleY(0); opacity: 1; }
  17%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
@keyframes ch4 {
  0%    { transform: scaleY(0); opacity: 1; }
  14%   { transform: scaleY(0); opacity: 1; }
  24%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
@keyframes ch3 {
  0%    { transform: scaleY(0); opacity: 1; }
  21%   { transform: scaleY(0); opacity: 1; }
  31%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
@keyframes ch2 {
  0%    { transform: scaleY(0); opacity: 1; }
  29%   { transform: scaleY(0); opacity: 1; }
  39%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
@keyframes ch1 {
  0%    { transform: scaleY(0); opacity: 1; }
  36%   { transform: scaleY(0); opacity: 1; }
  46%   { transform: scaleY(1); opacity: 1; }
  56%   { transform: scaleY(1); opacity: 1; }
  63%   { transform: scaleY(1); opacity: 0; }
  64%   { transform: scaleY(0); opacity: 0; }
  78%   { transform: scaleY(0); opacity: 1; }
  100%  { transform: scaleY(0); opacity: 1; }
}
.holo-panel:hover,
.holo-panel:focus-visible {
  transform: scale(1.03) translateX(-5px);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 25px rgba(122,0,223,0.4);
  background: rgba(122,0,223,0.08);
  outline: none;
}
.holo-panel h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}
.holo-panel p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  font-weight: 300;
  line-height: 1.4;
  margin: 0;
}

/* Status Badges mit Glow */
.hp-badge {
  position: absolute;
  top: 8px; right: -16px;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 12;
}
.hp-active {
  color: var(--neon);
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.4);
  animation: glow-green 3s ease-in-out infinite;
}
@keyframes glow-green {
  0%, 100% { box-shadow: 0 0 4px rgba(0,255,136,0.3); }
  50% { box-shadow: 0 0 14px rgba(0,255,136,0.6), 0 0 4px rgba(0,255,136,0.3); }
}
.hp-partial {
  color: var(--amber);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.4);
  animation: glow-amber 3s ease-in-out infinite;
}
@keyframes glow-amber {
  0%, 100% { box-shadow: 0 0 4px rgba(251,191,36,0.3); }
  50% { box-shadow: 0 0 14px rgba(251,191,36,0.6), 0 0 4px rgba(251,191,36,0.3); }
}
.hp-vision {
  color: var(--red);
  background: rgba(255,68,102,0.1);
  border: 1px solid rgba(255,68,102,0.4);
  animation: glow-red 4s ease-in-out infinite;
}
@keyframes glow-red {
  0%, 100% { box-shadow: 0 0 4px rgba(255,68,102,0.3); }
  50% { box-shadow: 0 0 14px rgba(255,68,102,0.6), 0 0 4px rgba(255,68,102,0.3); }
}

/* Panel Container (vertikal zentriert, Mitte des Viewports) */
.holo-panels-wrap {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  transform: translateX(-100%);
  width: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 17px;
}
/* Connector Lines (CSS, Breite = margin-right der Textbox) */
.hp-line {
  position: absolute;
  left: 100%;
  top: 50%;
  height: 2px;
  pointer-events: none;
  z-index: 5;
}
/* Farbe von Border + Linie erbt vom Badge-Status */
.holo-panel:has(.hp-active) { border-color: rgba(0,255,136,0.3); }
.holo-panel:has(.hp-partial) { border-color: rgba(251,191,36,0.3); }
.holo-panel:has(.hp-vision) { border-color: rgba(255,68,102,0.3); }
.hp-active ~ .hp-line { background: rgba(0,255,136,0.4); }
.hp-partial ~ .hp-line { background: rgba(251,191,36,0.4); }
.hp-vision ~ .hp-line { background: rgba(255,68,102,0.4); }
.hp-1 .hp-line { width: 70px; position: absolute; }
.hp-1 .hp-line::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 40px;
  background: inherit;
  transform-origin: bottom right;
  transform: rotate(140deg);
}
.hp-2 .hp-line { width: 34px; position: absolute; }
.hp-2 .hp-line::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 27px;
  background: inherit;
  transform-origin: bottom right;
  transform: rotate(152deg);
}
.hp-3 .hp-line { width: 47px; }
.hp-4 .hp-line { width: 70px; position: absolute; }
.hp-4 .hp-line::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 40px;
  background: inherit;
  transform-origin: bottom right;
  transform: rotate(55deg);
}
.hp-5 .hp-line { width: 20px; position: absolute; }
.hp-5 .hp-line::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 85px;
  background: inherit;
  transform-origin: bottom right;
  transform: rotate(47deg);
}
.hp-6 .hp-line { width: 40px; position: absolute; }
.hp-6 .hp-line::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 30px;
  background: inherit;
}
@media (max-width: 800px) {
  .hp-line { display: none; }
}

.holo-panel.hp-3 { margin-right: 12%; }
.holo-panel.hp-4 { margin-right: 37%; }
.holo-panel.hp-5 { margin-right: 40%; }
.holo-panel.hp-6 { margin-right: 34%; }

/* ── Connector Lines (SVG) ── */
.connector-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
}
.connector-path {
  fill: none;
  stroke: rgba(255,255,255,0.2);
  stroke-width: 0.3;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease-out forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ── Status Pill ── */
.status-pill {
  position: absolute;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.6);
  color: var(--neon);
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(0,255,136,0.2);
  z-index: 20;
}
.status-pill::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
.sp-1 { top: 32%; right: 25%; }
.sp-2 { top: 45%; right: 20%; }

/* ── Mobile Fallback ── */
@media (max-width: 800px) {
  .pyramid-viewport {
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
  }
  .pyramid-viewport .pyramid-image {
    position: relative;
    width: 260px; height: 260px;
    right: auto;
    margin-bottom: 8px;
  }
  .connector-svg,
  .status-pill { display: none; }
  .holo-panels-wrap {
    position: relative;
    width: 100%;
    top: auto; bottom: auto; left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .pyramid-viewport .holo-panel {
    width: auto;
    white-space: normal;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
  .pyramid-viewport .holo-panel.hp-1 { min-width: 42%; }
  .pyramid-viewport .holo-panel.hp-2 { min-width: 50%; }
  .pyramid-viewport .holo-panel.hp-3 { min-width: 58%; }
  .pyramid-viewport .holo-panel.hp-4 { min-width: 68%; }
  .pyramid-viewport .holo-panel.hp-5 { min-width: 78%; }
  .pyramid-viewport .holo-panel.hp-6 { min-width: 88%; }
}

/* ── Light Mode ── */
[data-theme="light"] .holo-panel {
  background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(122,0,223,0.03));
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .holo-panel::before {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent);
}
[data-theme="light"] .holo-panel::after {
  background: linear-gradient(to top, rgba(0,180,100,0.08) 0%, rgba(0,180,100,0.02) 100%);
}
[data-theme="light"] .holo-panel h4 { color: var(--text); text-shadow: none; }
[data-theme="light"] .holo-panel p { color: var(--text-muted); }
[data-theme="light"] .status-pill {
  background: rgba(0,255,136,0.08);
  border-color: rgba(0,200,100,0.4);
}

.infra-note {
  background: rgba(122,0,223,0.06); border: 1px solid rgba(122,0,223,0.18);
  border-radius: 12px; padding: 14px 18px;
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.6;
}
.infra-note strong { color: var(--primary-light); }

/* ========== Hilfe ========== */
.hilfe-intro { margin-bottom: 24px; line-height: 1.6; color: var(--text-muted); }
.hilfe-section { margin-bottom: 28px; }
.hilfe-section-title { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cmd-card {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 10px; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.cmd-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary); }
[data-theme="light"] .cmd-card { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.cmd-name { font-family: 'SF Mono','Fira Code',monospace; font-size: var(--fs-h2); font-weight: 700; color: var(--neon); margin-bottom: 6px; }
.cmd-desc { color: var(--text); line-height: 1.5; }
.cmd-example { margin-top: 8px; color: var(--text-muted); font-style: italic; }
.hilfe-note {
  background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.2);
  border-radius: 12px; padding: 14px 18px; margin-top: 24px;
  color: var(--text-muted); line-height: 1.6;
}
.hilfe-note strong { color: var(--primary-light); }

/* Glass Form Container (für Vorhaben, etc.) */
.form-container-glass {
  background: rgba(17,29,51,0.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--primary-alpha-30);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 20px; display: none; animation: slideDown 0.25s ease;
}
.form-container-glass.visible { display: block; }
[data-theme="light"] .form-container-glass { background: rgba(255,255,255,0.82); backdrop-filter: blur(16px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.form-container-glass .form-input,
.form-container-glass .form-textarea,
.form-container-glass .form-select {
  background: rgba(17,29,51,0.50); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}
[data-theme="light"] .form-container-glass .form-input,
[data-theme="light"] .form-container-glass .form-textarea,
[data-theme="light"] .form-container-glass .form-select { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.1); }

/* ========== Gesundheit ========== */
/* Health Tabs */
.health-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 4px; overflow: hidden;
}
.health-tab {
  flex: 1; padding: 10px 8px; border-radius: calc(var(--radius) - 4px);
  background: none; border: none;
  color: var(--text-muted); font-size: var(--fs-small); font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-align: center; white-space: nowrap;
}
.health-tab:hover { color: var(--text); }
.health-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }

/* Star Rating */
.star-rating { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating input { display: none; }
.star-rating label {
  font-size: 1.6rem; cursor: pointer;
  color: var(--glass-border); transition: color 0.15s; line-height: 1;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: var(--amber); }

/* Upload Area */
.upload-area {
  border: 2px dashed var(--glass-border); border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: rgba(122,0,223,0.05); }
.upload-area input { display: none; }
.upload-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.6; }
.upload-text { color: var(--text-muted); line-height: 1.5; }
.upload-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 10px; }
.upload-previews:empty { display: none; }
.upload-thumb { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.7); border: none; color: white;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-caption); display: flex; align-items: center; justify-content: center;
}
.upload-thumb-remove:hover { background: var(--red); }
.upload-count { color: var(--text-muted); font-size: var(--fs-small); margin-top: 4px; }
/* Einzel-Upload Preview */
.upload-preview { position: relative; border-radius: 10px; overflow: hidden; margin-top: 10px; max-width: 200px; }
.upload-preview img { width: 100%; border-radius: 10px; }
.upload-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.7); border: none; color: white;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-caption); display: flex; align-items: center; justify-content: center;
}
.upload-remove:hover { background: var(--red); }

/* Upload-Thumb für Dokumente (in Preview-Queue) */
.upload-thumb-doc {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 8px; text-align: center; gap: 4px;
  background: var(--glass); border-radius: 10px;
}
.upload-thumb-icon { font-size: 1.5rem; }
.upload-thumb-name { font-size: var(--fs-badge); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Datei-Liste (Anhänge in Ideen/Vorhaben) */
.datei-liste { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.datei-liste:empty { display: none; }

/* Bild-Thumbnails in Datei-Liste */
.datei-thumb { position: relative; border-radius: 8px; overflow: hidden; width: 80px; height: 80px; flex-shrink: 0; }
.datei-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: opacity 0.2s; }
.datei-thumb img:hover { opacity: 0.85; }

/* Dokument-Links */
.datei-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); text-decoration: none;
  font-size: var(--fs-small); transition: all 0.2s;
  position: relative; width: 100%;
}
.datei-link:hover { border-color: var(--primary); background: rgba(122,0,223,0.05); }
.datei-icon { font-size: 1.2rem; flex-shrink: 0; }
.datei-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* Remove-Button (shared) */
.datei-remove {
  background: rgba(0,0,0,0.7); border: none; color: white;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-caption); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s; flex-shrink: 0;
}
.datei-thumb .datei-remove { position: absolute; top: 4px; right: 4px; }
.datei-thumb:hover .datei-remove,
.datei-link:hover .datei-remove { opacity: 1; }
.datei-remove:hover { background: var(--red); }

/* Datei-Badge (auf List-Cards) */
.datei-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-badge); color: var(--text-muted);
}

/* Datei-Upload-Add Button (in Detail-Views) */
.datei-add-label {
  cursor: pointer; position: relative;
}
.datei-add-label input[type="file"] { display: none; }

/* Light Mode Overrides */
[data-theme="light"] .datei-link { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
[data-theme="light"] .datei-remove { background: rgba(0,0,0,0.5); }

/* Lauf-Felder & Auto-Erkennung */
.lauf-fields { animation: fadeIn 0.2s ease; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 500px) { .form-row-4 { grid-template-columns: repeat(2, 1fr); } }
.lauf-auto-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 12px;
  background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.2);
  border-radius: 10px; font-size: var(--fs-caption); color: var(--text-muted);
}
.auto-hint-icon { font-size: 1.1rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Feed */
.feed-item {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); margin-bottom: 8px;
  overflow: hidden; transition: all 0.2s;
}
.feed-item:first-child { margin-top: 16px; }
.feed-item-body {
  padding: 16px; display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
}

/* Links: Content (Badge, Daten, Text, Bilder) */
.feed-content-left { grid-column: 1; display: flex; flex-direction: column; gap: 6px; }

/* Rechts: Sterne, Datum, Buttons */
.feed-header-right {
  grid-column: 2; grid-row: 1 / -1;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0;
}

.feed-header-left { display: flex; flex-direction: column; gap: 4px; }
.feed-kat-badge { padding: 3px 10px; border-radius: 20px; font-size: var(--fs-badge); font-weight: 600; display: inline-block; width: fit-content; }
.feed-kat-badge.lauf { background: rgba(0,255,136,0.12); color: var(--neon); }
.feed-kat-badge.kraft { background: rgba(255,68,102,0.12); color: var(--red); }
.feed-kat-badge.dehnen { background: rgba(155,63,245,0.12); color: var(--primary-light); }
.feed-kat-badge.schlaf { background: rgba(100,149,237,0.15); color: var(--sleep); }
.feed-kat-badge.allgemein { background: rgba(251,191,36,0.12); color: var(--amber); }
.feed-stars { font-size: var(--fs-body); letter-spacing: 2px; }
.feed-date { font-size: var(--fs-caption); color: var(--text-muted); }
.feed-lauf-data { font-size: var(--fs-caption); color: var(--neon); font-weight: 500; opacity: 0.9; }

/* Kommentar */
.feed-text { line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-size: 0.88rem; margin-bottom: 8px; }

/* Bilder (Thumbnails) */
.feed-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 8px; margin-bottom: 8px;
}
@media (min-width: 500px) { .feed-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .feed-gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .feed-gallery { grid-template-columns: repeat(6, 1fr); } }
.feed-gallery:empty { display: none; }
.feed-gallery img { width: 100%; height: 100px; object-fit: cover; cursor: pointer; border-radius: 8px; }
.feed-thumb { position: relative; }
.feed-thumb-remove {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,0.7); border: none; color: white;
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-caption); display: none; align-items: center; justify-content: center;
}
.feed-item.editing .feed-thumb-remove { display: flex; }
.feed-thumb-remove:hover { background: var(--red); }

/* Actions (innerhalb feed-header-right, vertikal) */
.feed-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; margin-top: 4px; }
.feed-actions .feed-btn.danger { margin-top: 8px; }
.feed-btn {
  padding: 5px 12px; border-radius: 8px; font-size: var(--fs-small); font-weight: 500;
  border: 1px solid var(--glass-border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.feed-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.feed-btn.danger:hover { border-color: var(--red); color: var(--red); }
.feed-btn.save {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; display: none;
}
.feed-item.editing .feed-btn.save { display: inline-flex; }
.feed-item.editing .feed-btn.edit { display: none; }

/* Edit-Mode */
.feed-item.editing .feed-text {
  background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 8px 12px; outline: none;
}
.feed-item.editing .feed-text:focus { border-color: var(--primary); }
.feed-add-bilder { display: none; }
.feed-item.editing .feed-add-bilder { display: inline-block; }
.feed-add-bilder-btn {
  padding: 6px 12px; border: 1px dashed var(--glass-border); border-radius: 8px;
  background: none; color: var(--text-muted); font-size: var(--fs-small);
  cursor: pointer; transition: all 0.2s;
}
.feed-add-bilder-btn:hover { border-color: var(--primary); color: var(--primary-light); }

.btn-more { width: 100%; padding: 12px; background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; color: var(--text-muted); font-size: var(--fs-body); cursor: pointer; transition: all 0.2s; margin-bottom: 20px; }
.btn-more:hover { border-color: var(--primary); color: var(--text); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox.visible { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

/* Wochen-Stats */
.week-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }

/* Fitbit */
.fitbit-section { margin-bottom: 24px; }
.fitbit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.fitbit-week-nav { display: flex; align-items: center; gap: 8px; }
.fitbit-week-label { color: var(--text-muted); min-width: 120px; text-align: center; font-size: var(--fs-small); }
.fitbit-nav-btn { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 4px 10px; color: var(--text-muted); cursor: pointer; font-size: var(--fs-body); transition: all 0.2s; }
.fitbit-nav-btn:hover { border-color: var(--primary); color: var(--text); }
.fitbit-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.fitbit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.fitbit-tile { background: var(--card); border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px 12px; text-align: center; }
[data-theme="light"] .fitbit-tile { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.fitbit-tile-icon { font-size: 1.2rem; margin-bottom: 4px; }
.fitbit-tile-value { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.fitbit-tile-label { color: var(--text-muted); margin-top: 2px; font-size: var(--fs-badge); }
.fitbit-tile-trend { margin-top: 2px; font-weight: 600; font-size: var(--fs-badge); }
.fitbit-tile-trend.up { color: var(--neon); }
.fitbit-tile-trend.down { color: var(--red); }
.fitbit-tile-trend.flat { color: var(--text-muted); }
.fitbit-tile-spark { width: 100%; height: 40px; margin-top: 6px; position: relative; }
.fitbit-tile-spark canvas { width: 100% !important; height: 40px !important; }

/* Fitbit Gesamtübersicht */
.fitbit-overview {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.fitbit-overview-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.fitbit-overview-header .section-title { margin: 0; }
.fitbit-range-btns { display: flex; gap: 4px; }
.fitbit-range-btn {
  padding: 4px 12px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: none; color: var(--text-muted); font-size: var(--fs-badge); cursor: pointer;
  transition: all 0.2s; font-weight: 600;
}
.fitbit-range-btn.active {
  background: var(--primary); border-color: var(--primary); color: white;
}
.fitbit-range-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary-light); }
.fitbit-metric-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.fitbit-metric-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--glass-border);
  background: none; color: var(--text-muted); font-size: var(--fs-badge); cursor: pointer;
  transition: all 0.2s; font-weight: 600;
}
.fitbit-metric-chip:hover { border-color: var(--primary); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fitbit-overview-chart { position: relative; width: 100%; height: 220px; }
.fitbit-empty { text-align: center; padding: 20px; color: var(--text-muted); }
.fitbit-empty .icon { font-size: 1.5rem; margin-bottom: 8px; opacity: 0.5; }
.fitbit-chart { display: flex; align-items: flex-end; gap: 4px; height: 60px; margin-bottom: 16px; padding: 0 4px; }
.fitbit-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; }
.fitbit-bar { width: 100%; border-radius: 4px 4px 0 0; background: rgba(122,0,223,0.3); min-height: 4px; transition: height 0.3s; }
.fitbit-bar.current { background: var(--primary); }
.fitbit-bar-label { color: var(--text-muted); font-size: var(--fs-badge); }
.fitbit-upload-area { border: 2px dashed var(--glass-border); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.fitbit-upload-area:hover, .fitbit-upload-area.dragover { border-color: var(--primary); background: rgba(122,0,223,0.05); }
.fitbit-upload-area input { display: none; }
.fitbit-upload-text { color: var(--text-muted); font-size: var(--fs-small); }
.fitbit-berichte-toggle { background: none; border: none; color: var(--text-muted); font-size: var(--fs-small); cursor: pointer; padding: 8px 0; width: 100%; text-align: center; }
.fitbit-berichte-toggle:hover { color: var(--text); }
.fitbit-berichte-list { display: none; margin-top: 8px; }
.fitbit-berichte-list.visible { display: block; }
.fitbit-bericht-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--glass-border); border-radius: 10px; margin-bottom: 6px; }
.fitbit-bericht-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); }
.fitbit-bericht-actions { display: flex; gap: 4px; }
.fitbit-bericht-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; font-size: var(--fs-small); }
.fitbit-bericht-btn:hover { color: var(--text); background: var(--glass); }
.fitbit-bericht-btn.delete:hover { color: var(--red); }

/* Chart Section */
.chart-section {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
[data-theme="light"] .chart-section { background: var(--glass-bg); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.chart-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.chart-title-icon { font-size: 1.1rem; }
.chart-canvas-wrap { position: relative; width: 100%; min-height: 200px; }
.chart-canvas-wrap canvas { width: 100%; max-height: 280px; }
.chart-empty { text-align: center; padding: 30px 20px; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
.chart-empty .icon { font-size: 1.5rem; margin-bottom: 8px; opacity: 0.5; }
.charts-loading { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 0.85rem; }

/* Lauf-Felder */
.lauf-fields { border: 1px solid rgba(0,255,136,0.2); border-radius: 12px; padding: 12px; margin-bottom: 14px; background: rgba(0,255,136,0.03); }
.lauf-fields-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* Form-Titel + Close */
.form-title { font-size: var(--fs-h2); font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.form-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1; }
.form-close:hover { color: var(--text); background: var(--glass); }

/* Form Submit (Gesundheit-spezifisch, rot) */
.form-submit {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--red), #ff6688);
  border: none; border-radius: 12px;
  color: white; font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.form-submit:hover { box-shadow: 0 4px 15px rgba(255,68,102,0.4); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== Vault ========== */
.vault-info { background: rgba(122,0,223,0.08); border: 1px solid rgba(122,0,223,0.2); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; font-size: var(--fs-small); color: var(--text-muted); line-height: 1.5; }
.vault-form { background: var(--card); border: 1px solid var(--primary-alpha-30); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; display: none; }
.vault-form.open { display: block; }
.vault-form input, .vault-form textarea { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--glass-border); border-radius: 10px; color: var(--text); font-size: var(--fs-body); margin-bottom: 12px; box-sizing: border-box; }
.vault-form input:focus, .vault-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(122,0,223,0.15); }
.vault-form label { display: block; font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.vault-form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.vault-group { margin-bottom: 20px; }
.vault-group-header { font-size: var(--fs-h2); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.vault-group-badge { font-size: var(--fs-small); padding: 3px 8px; border-radius: 20px; background: rgba(122,0,223,0.12); color: var(--primary-light); font-weight: 500; }
.vault-list { display: grid; gap: 8px; }
.vault-item { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 16px; transition: all 0.2s; }
.vault-item:hover { border-color: var(--primary); }
.vault-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.vault-key-name { font-weight: 600; font-size: var(--fs-body); font-family: 'Courier New',monospace; }
.vault-item-desc { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 8px; }
.vault-item-value { font-family: 'Courier New',monospace; font-size: var(--fs-small); padding: 8px 12px; background: var(--bg); border-radius: 8px; color: var(--text-muted); word-break: break-all; margin-bottom: 8px; }
.vault-item-actions { display: flex; gap: 8px; align-items: center; }
.btn-reveal, .btn-delete-vault { padding: 6px 12px; border-radius: 8px; font-size: var(--fs-small); cursor: pointer; border: 1px solid var(--glass-border); background: none; color: var(--text-muted); transition: all 0.2s; }
.btn-reveal:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-delete-vault:hover { border-color: var(--red); color: var(--red); }
.vault-meta { font-size: var(--fs-badge); color: var(--text-muted); opacity: 0.6; }
.vault-empty { text-align: center; padding: 40px 24px; color: var(--text-muted); }
.vault-empty .icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.msg-ok { background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); color: var(--neon); padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: var(--fs-small); }
.msg-error { background: rgba(255,68,102,0.1); border: 1px solid rgba(255,68,102,0.3); color: var(--red); padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: var(--fs-small); }

/* ========== Manifest ========== */
.manifest-lead { font-size: 1rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 28px; }
.manifest-lead strong { color: var(--text); }
.manifest-section { margin-bottom: 28px; }
.manifest-section-title { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.manifest-section-title::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }
.manifest-section-title .section-icon { font-size: 1rem; }

.akronym-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 400px) { .akronym-grid { grid-template-columns: 1fr; } }
.akronym-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 16px; position: relative; overflow: hidden; transition: all 0.2s; }
.akronym-card:hover { border-color: rgba(122,0,223,0.4); box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14); transform: translateY(-1px); }
.akronym-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--primary); opacity: 0.8; }
[data-theme="light"] .akronym-card { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.akronym-letter { font-size: 1.6rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 4px; }
.akronym-word { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.akronym-desc { font-size: var(--fs-caption); color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

.aufgabe-grid { display: grid; gap: 8px; }
.aufgabe-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; transition: all 0.2s; }
.aufgabe-card:hover { border-color: rgba(122,0,223,0.4); box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14); transform: translateY(-1px); }
[data-theme="light"] .aufgabe-card { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.aufgabe-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.aufgabe-text { flex: 1; }
.aufgabe-title { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.aufgabe-desc { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }

.regel-grid { display: grid; gap: 8px; }
.regel-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 16px; position: relative; overflow: hidden; transition: all 0.2s; }
.regel-card:hover { border-color: rgba(122,0,223,0.4); box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 20px rgba(122,0,223,0.14); transform: translateY(-1px); }
.regel-card.green::before  { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--neon); }
.regel-card.purple::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--primary); }
.regel-card.amber::before  { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--amber); }
.regel-card.red::before    { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--red); }
[data-theme="light"] .regel-card { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.regel-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.regel-icon { font-size: 1.1rem; }
.regel-title { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.regel-desc { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.55; }

.ethik-box { background: rgba(255,68,102,0.06); border: 1px solid rgba(255,68,102,0.2); border-radius: 12px; padding: 16px 20px; margin-bottom: 8px; }
.ethik-box-title { font-size: 0.88rem; font-weight: 700; color: var(--red); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ethik-box-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.ethik-box-text strong { color: var(--text); }

.grenze-list { list-style: none; padding: 0; margin: 0; }
.grenze-list li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--glass-border); font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.grenze-list li:last-child { border-bottom: none; }
.grenze-list .grenze-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.grenze-list strong { color: var(--text); }

.manifest-note { background: rgba(122,0,223,0.06); border: 1px solid rgba(122,0,223,0.18); border-radius: 14px; padding: 18px 20px; margin-top: 8px; font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; }
.manifest-note strong { color: var(--primary-light); }
[data-theme="light"] .ethik-box { background: rgba(255,68,102,0.04); border-color: rgba(255,68,102,0.15); }
[data-theme="light"] .manifest-note { background: rgba(122,0,223,0.04); border-color: rgba(122,0,223,0.12); }

/* ========== Papierkorb ========== */
.trash-info { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); border-radius: 12px; padding: 12px 16px; font-size: var(--fs-small); color: var(--amber); margin-bottom: 20px; line-height: 1.5; }
.trash-actions-top { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.trash-item { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; transition: all 0.2s; display: flex; align-items: center; gap: 12px; }
.trash-item:hover { border-color: rgba(122,0,223,0.3); }
[data-theme="light"] .trash-item { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.trash-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.trash-icon.vorhaben { background: rgba(122,0,223,0.12); }
.trash-icon.ziel { background: rgba(0,255,136,0.12); }
.trash-icon.idee { background: rgba(251,191,36,0.12); }
.trash-content { flex: 1; min-width: 0; }
.trash-titel { font-size: var(--fs-body); font-weight: 600; margin-bottom: 2px; }
.trash-meta { font-size: var(--fs-small); color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.trash-tage { color: var(--red); font-weight: 500; }
.trash-tage.safe { color: var(--text-muted); }
.trash-btns { display: flex; gap: 6px; flex-shrink: 0; }
.trash-btn {
  padding: 6px 12px; border-radius: 8px;
  font-size: var(--fs-small); font-weight: 500;
  border: 1px solid var(--glass-border);
  background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.trash-btn.restore:hover { border-color: var(--neon); color: var(--neon); }
.trash-btn.delete:hover { border-color: var(--red); color: var(--red); }

/* ========== Infrastruktur ========== */
.infra-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 4px;
}
.infra-tab {
  flex: 1; padding: 10px 12px; background: none; border: none; border-radius: 10px;
  color: var(--text-muted); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.infra-tab:hover { color: var(--text); background: rgba(122,0,223,0.06); }
.infra-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.infra-tab .tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tab-dot.green { background: var(--neon); }
.tab-dot.amber { background: var(--amber); }
.tab-dot.muted { background: var(--text-muted); opacity: 0.5; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.env-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--glass-border); }
.env-icon { font-size: 1.5rem; }
.env-info { flex: 1; }
.env-name { font-size: var(--fs-h2); font-weight: 700; }
.env-detail { font-size: var(--fs-small); color: var(--text-muted); }
.env-status { font-size: var(--fs-badge); padding: 3px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; }
.env-status.aktiv { background: rgba(0,255,136,0.12); color: var(--neon); }
.env-status.geplant { background: rgba(251,191,36,0.12); color: var(--amber); }

.projekt-card { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 16px; transition: all 0.2s; }
.projekt-card:hover { border-color: rgba(122,0,223,0.3); }
[data-theme="light"] .projekt-card { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.projekt-name { font-weight: 600; font-size: var(--fs-body); margin-bottom: 2px; }
.projekt-pfad { font-family: monospace; font-size: var(--fs-small); color: var(--text-muted); word-break: break-all; }
.projekt-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.infra-section { margin-bottom: 28px; }
.infra-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.infra-section-title { font-size: var(--fs-h2); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.infra-section-count { font-size: var(--fs-small); color: var(--text-muted); background: var(--glass); border: 1px solid var(--glass-border); padding: 2px 10px; border-radius: 20px; }

.infra-card { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 16px; transition: all 0.2s; }
.infra-card:hover { border-color: rgba(122,0,223,0.3); }
[data-theme="light"] .infra-card { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.infra-grid { display: grid; gap: 8px; }

.cron-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cron-name { font-size: var(--fs-body); font-weight: 600; }
.cron-intervall { font-size: var(--fs-small); padding: 2px 8px; border-radius: 20px; background: rgba(122,0,223,0.12); color: var(--primary-light); }
.cron-beschreibung { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.cron-status { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cron-status-item { font-size: var(--fs-small); color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.cron-status-item.mono { font-family: monospace; opacity: 0.6; }
.cron-status-item .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.green { background: var(--neon); box-shadow: 0 0 6px rgba(0,255,136,0.4); }
.dot.amber { background: var(--amber); box-shadow: 0 0 6px rgba(251,191,36,0.4); }
.dot.muted { background: var(--text-muted); opacity: 0.4; }
.cron-ergebnis { font-size: var(--fs-small); color: var(--text-muted); background: var(--glass); border-radius: 8px; padding: 6px 10px; margin-top: 6px; line-height: 1.4; }

.api-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.api-name { font-weight: 600; font-size: var(--fs-body); }
.api-endpoint { font-size: var(--fs-small); color: var(--text-muted); font-family: monospace; }
.api-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.api-badge { font-size: var(--fs-badge); padding: 2px 8px; border-radius: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.api-badge.auth { background: rgba(122,0,223,0.12); color: var(--primary-light); }
.api-badge.methode { background: rgba(0,255,136,0.12); color: var(--neon); }

.vault-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.vault-row-right { text-align: right; }
.vault-key { font-family: monospace; font-size: var(--fs-small); font-weight: 600; }
.vault-projekt { font-size: var(--fs-badge); padding: 2px 8px; border-radius: 20px; background: rgba(251,191,36,0.12); color: var(--amber); font-weight: 600; text-transform: uppercase; }
.vault-beschreibung { font-size: var(--fs-small); color: var(--text-muted); }
.vault-updated { font-size: var(--fs-small); color: var(--text-muted); }

.db-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.db-name { font-family: monospace; font-size: var(--fs-small); font-weight: 600; }
.db-rows { font-size: var(--fs-small); color: var(--text-muted); text-align: right; }
.db-size { font-size: var(--fs-small); color: var(--text-muted); text-align: right; }

.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 20px; }
.sys-item { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; text-align: center; }
[data-theme="light"] .sys-item { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.sys-value { font-size: var(--fs-body); font-weight: 700; color: var(--primary-light); }
.sys-label { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.infra-toggle { cursor: pointer; user-select: none; }
.infra-toggle .chevron { transition: transform 0.2s; display: inline-block; font-size: 0.7rem; }
.infra-toggle.open .chevron { transform: rotate(90deg); }
.infra-body { display: none; }
.infra-body.open { display: block; }

/* Security-Tab: Accordion-Header + Gruppen-Cards */
.infra-accordion-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none; padding: 12px 16px;
}
.infra-accordion-header .accordion-chevron {
  font-size: 12px; color: var(--text-muted);
  transition: transform 0.25s ease; flex-shrink: 0;
}
.infra-accordion-header.open .accordion-chevron { transform: rotate(90deg); }

.vault-group {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 12px; overflow: hidden;
}
[data-theme="light"] .vault-group { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.vault-log-grid { display: grid; gap: 8px; }
.vault-log-title { font-weight: 700; }
.vault-log-count { color: var(--text-muted); font-weight: 400; font-size: var(--fs-small); }
.vault-log-entry { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--glass-border); }
.vault-log-content { flex: 1; min-width: 0; }
.vault-log-name { font-size: var(--fs-body); }
.vault-log-time { color: var(--text-muted); font-size: var(--fs-small); white-space: nowrap; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.spec-item { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px 14px; text-align: center; }
[data-theme="light"] .spec-item { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.spec-value { font-size: var(--fs-body); font-weight: 700; color: var(--amber); }
.spec-label { font-size: var(--fs-badge); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.dienst-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.dienst-name { font-weight: 600; font-size: var(--fs-body); }
.dienst-zweck { font-size: var(--fs-small); color: var(--text-muted); }
.dienst-status { font-size: var(--fs-badge); padding: 2px 8px; border-radius: 20px; font-weight: 600; text-transform: uppercase; }
.dienst-status.aktiv { background: rgba(0,255,136,0.12); color: var(--neon); }
.dienst-status.geplant { background: rgba(251,191,36,0.12); color: var(--amber); }

/* ========== Custom Scrollbar (WebKit) ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ========== Responsive ========== */
@media (min-width: 401px) {
  .infra-tab .tab-label-short { display: none; }
}
@media (min-width: 500px) {
  .dash-tab-label { display: inline; }
}
@media (min-width: 768px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
  .trash-item { flex-wrap: wrap; }
  .trash-btns { width: 100%; justify-content: flex-end; }
}
@media (max-width: 480px) {
  .form-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .health-tab { font-size: var(--fs-badge); padding: 8px 4px; }
  .week-stats { gap: 6px; }
  .stat-card { padding: 10px; }
  .lauf-fields-grid { grid-template-columns: 1fr; }
  .infra-tab { font-size: var(--fs-small); padding: 8px 6px; }
  .infra-tab .tab-label-full { display: none; }
  .infra-tab .tab-label-short { display: inline; }
  .db-row { grid-template-columns: 1fr auto; }
  .db-size { display: none; }
  .container { padding: 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .greeting h1 { font-size: 1.3rem; }
  .plan-add-kat { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { flex-wrap: wrap; }
  .stat-card { min-width: calc(50% - 4px); }
  .aw-stats { flex-wrap: wrap; }
  .aw-stat { min-width: calc(50% - 4px); }
}

/* ========== Loading Overlay ========== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(10, 22, 40, 0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loading-overlay.visible { display: flex; }
[data-theme="light"] .loading-overlay { background: rgba(255, 255, 255, 0.85); }
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: var(--fs-body);
  color: var(--text);
  font-weight: 500;
}

/* ========== Werkschau ========== */
.seiten-intro {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}
.karten-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
/* Farbstreifen generisch, das Dashboard hat sie nur je Modulnamen */
.module-card.mc-primary::before { background: var(--primary-light); }
.module-card.mc-neon::before    { background: var(--neon); }
.module-card.mc-amber::before   { background: var(--amber); }
.module-card.mc-red::before     { background: var(--red); }

/* ========== Manager-Bereich ========== */
.mgr-block {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
[data-theme="light"] .mgr-block {
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mgr-zahlen {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 12px;
}
/* Textlinks: dieselbe Farbe wie .auto-link, aber ohne dessen break-all */
.mgr-block a,
.seiten-intro a { color: var(--primary-light); }
.mgr-block a:hover,
.seiten-intro a:hover { text-decoration: underline; }
.mgr-zahl { display: flex; flex-direction: column; gap: 4px; }
.mgr-zahl-wert { font-size: var(--fs-h2); font-weight: 700; color: var(--primary-light); }
.mgr-zahl-label {
  font-size: var(--fs-badge);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mgr-item { padding: 8px 0; border-top: 1px solid var(--glass-border); }
.mgr-item:first-of-type { border-top: none; padding-top: 0; }
.mgr-item-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mgr-item-titel { font-size: var(--fs-small); font-weight: 600; }
.mgr-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mgr-hinweis { margin-top: 8px; }

/* ========== Video-Transkription (v0.10.534) ========== */
/* Zwei Status-Abzeichen ergaenzen den bestehenden Satz. Sie fehlen dort, weil es
   bisher kein Modul mit genau diesen Zustaenden gab. Gleiches Muster wie oben:
   Farbe zu 12 Prozent als Flaeche, Vollton als Schrift. */
.badge-laeuft  { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.badge-fertig  { background: rgba(0, 255, 136, 0.12); color: var(--neon); }
.badge-fehler  { background: rgba(255, 68, 102, 0.12); color: var(--red); }

.vid-eingabe { display: flex; gap: 8px; margin-bottom: 8px; }
.vid-eingabe .form-input { flex: 1; min-width: 0; }
.vid-eingabe .btn-primary { flex-shrink: 0; }
.vid-meldung { margin-bottom: 16px; }

.vid-budget { margin-bottom: 20px; }
.vid-budget-zeile {
  font-size: var(--fs-caption); color: var(--text-muted);
  margin-bottom: 4px;
}
.vid-budget-zeile strong { color: var(--text); }
.vid-budget-balken {
  width: 100%; height: 6px;
  background: var(--glass); border-radius: 3px; overflow: hidden;
}
.vid-budget-fuellung {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.3s ease;
}

.vid-kopf {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 8px;
}
.vid-nummer {
  font-size: var(--fs-badge); font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.vid-titel {
  font-size: 1rem; font-weight: 600; line-height: 1.3;
  margin-bottom: 4px;
  /* Solange kein Titel bekannt ist, steht hier die volle Adresse. Ohne Umbruch
     zieht die am Handy die ganze Seite seitwaerts auf. */
  overflow-wrap: anywhere;
}
.vid-quelle {
  font-size: var(--fs-caption); margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.vid-quelle a { color: var(--primary-light); }
.vid-quelle a:hover { text-decoration: underline; }
.vid-meta {
  font-size: var(--fs-small); color: var(--text-muted);
  margin-bottom: 8px;
}

/* Aufklappen (v0.10.540): sichtbar bleibt nur die Kopfzone, alles Weitere haengt
   am Klappteil. Beim Laden ist jede Karte zu, offen ist immer hoechstens eine. */
.vid-kopfzone { cursor: pointer; }
.vid-kopfzone > *:last-child { margin-bottom: 0; }
/* Der Link in der Adresse behaelt seinen eigenen Zeiger, er klappt nicht auf. */
.vid-kopfzone a { cursor: pointer; }
.vid-karte:hover .vid-titel { color: var(--primary-light); }
.vid-kopf .badge { margin-left: auto; }
.vid-aufklapp {
  flex-shrink: 0; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--glass-border);
  border-radius: 8px; cursor: pointer; padding: 0;
}
.vid-aufklapp:hover { border-color: var(--primary); }
.vid-aufklapp:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.vid-pfeil {
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.vid-offen .vid-pfeil { transform: rotate(-135deg) translate(-2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .vid-pfeil { transition: none; }
}
.vid-body { margin-top: 4px; }
/* Was aus dem Video schon geworden ist, in Kurzform an der geschlossenen Karte. */
.vid-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.vid-schritt {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-small); color: var(--amber);
  margin-bottom: 8px;
}
/* Drei Punkte statt eines Balkens: sie zeigen Bewegung, ohne einen Fortschritt zu
   behaupten, den wir gar nicht kennen. */
.vid-punkte { display: inline-flex; gap: 4px; flex-shrink: 0; }
.vid-punkte i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber); opacity: 0.35;
  animation: vid-punkt 1.2s ease-in-out infinite;
}
.vid-punkte i:nth-child(2) { animation-delay: 0.2s; }
.vid-punkte i:nth-child(3) { animation-delay: 0.4s; }
@keyframes vid-punkt { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .vid-punkte i { animation: none; opacity: 0.7; }
}

.vid-fehler {
  font-size: var(--fs-small); line-height: 1.5; color: var(--red);
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.2);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 8px;
}

/* Feste Hoehe mit eigenem Scrollen. Ohne das waere ein Transkript von einer Stunde
   am Handy eine Seite, die man nicht mehr zu Ende scrollen mag. */
.vid-transkript {
  margin-top: 12px; padding: 12px 16px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: var(--fs-small); line-height: 1.6; color: var(--text-muted);
  max-height: 320px; overflow-y: auto;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Transkript mit Zeitmarken (v0.10.542). Die Marke steht in einer eigenen Spalte,
   damit der Text daneben eine ruhige Kante behält und nicht um die Marken herumfließt. */
.vid-abschnitt {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 10px;
  /* Der Container steht auf pre-wrap, weil ein Transkript ohne Marken seine
     Absätze aus dem Text selbst mitbringt. Hier machen die Abschnitte das, also
     dürfen die Leerzeichen des Markups nicht mehr sichtbar sein. */
  white-space: normal;
}
.vid-abschnitt:last-child { margin-bottom: 0; }
.vid-abschnitt-text { flex: 1; min-width: 0; }
.vid-marke {
  flex-shrink: 0; min-width: 44px;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-badge); font-weight: 600;
  color: var(--primary-light); text-decoration: none;
}
.vid-marke:hover { text-decoration: underline; }
/* Plattformen ohne Sprungziel: die Zeit stimmt, nur springen kann sie nicht.
   Sie sieht deshalb bewusst nicht wie ein Link aus. */
.vid-marke-tot { color: var(--text-muted); font-weight: 500; }

@media (max-width: 400px) {
  .vid-eingabe { flex-direction: column; }
  .vid-eingabe .btn-primary { width: 100%; }
}

/* Kurzfassung eines Transkripts (v0.10.535) */
.vid-kurzfassung {
  margin-top: 12px; padding: 12px 16px;
  background: rgba(122, 0, 223, 0.06);
  border: 1px solid rgba(122, 0, 223, 0.2);
  border-radius: 12px;
  font-size: var(--fs-small); line-height: 1.6; color: var(--text);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.vid-kurz-laeuft {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); white-space: normal;
}
.vid-themen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* Ziele eines Transkripts: Idee und Aufgabe (v0.10.536) */
.vid-erledigt { margin-top: 12px; display: grid; gap: 4px; }
.vid-erledigt-zeile {
  font-size: var(--fs-small); color: var(--text-muted);
  line-height: 1.5; overflow-wrap: anywhere;
}
.vid-erledigt-zeile a { color: var(--primary-light); }
.vid-erledigt-zeile a:hover { text-decoration: underline; }

/* Die Manager-Runde zu einem Transkript (v0.10.537) */
.vid-runde { margin-top: 12px; display: grid; gap: 8px; }
.vid-runde-kopf {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: var(--fs-small); font-weight: 600; color: var(--text);
}
.vid-runde-zahl { font-weight: 400; color: var(--text-muted); }
.vid-runde-zeile { overflow-wrap: anywhere; }
.vid-runde-mit {
  padding: 10px 14px;
  background: var(--card-hover);
  border: 1px solid rgba(122, 0, 223, 0.22);
  border-radius: 10px;
  display: grid; gap: 6px;
}
.vid-runde-wer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vid-runde-titel { font-size: var(--fs-caption); color: var(--text-muted); }
.vid-runde-status {
  font-size: var(--fs-caption); color: var(--text-muted);
  border: 1px solid var(--glass-border); border-radius: 999px;
  padding: 1px 8px;
}
.vid-runde-satz { font-size: var(--fs-small); line-height: 1.55; color: var(--text); }
.vid-runde-tat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
/* Die Begruendung: warum sich das Ziel lohnt, oder warum eben nichts daraus
   werden muss. Gedaempft, weil sie die Einschaetzung stuetzt und nicht ersetzt. */
.vid-runde-warum {
  font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5;
  border-left: 2px solid var(--glass-border); padding-left: 10px;
}
/* "Wenn du willst" vor dem Knopf. Ohne diesen Halbsatz liest sich die Runde wie
   eine Aufgabenliste, und dann entsteht der Artikel, weil der Knopf da ist. */
.vid-runde-angebot { font-size: var(--fs-caption); color: var(--text-muted); }
/* Bewusst KEIN eigenes Format: der erste Entwurf machte den Knopf kleiner als
   den Standard, und damit den Tippbereich noch enger als er ohnehin ist. Er
   hebt sich durch seine Stelle in der Zeile ab, nicht durch seine Groesse. */
.vid-runde-btn { align-self: start; }

/* Wer begruendet nichts zu sagen hat. Steht bewusst mit da und nicht versteckt:
   ein leerer Bereich waere nicht von "nicht gefragt" zu unterscheiden. */
.vid-runde-still {
  display: grid; gap: 5px;
  padding: 10px 14px;
  border: 1px solid var(--glass-border); border-radius: 10px;
}
.vid-runde-ohne { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vid-runde-satz-klein {
  font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5;
  flex: 1 1 200px;
}

.vid-form {
  margin-top: 12px; padding: 16px;
  background: var(--card-hover);
  border: 1px solid rgba(122, 0, 223, 0.3);
  border-radius: 12px;
}
.vid-form-kopf {
  font-size: var(--fs-small); font-weight: 600;
  margin-bottom: 12px;
}
.vid-form-hinweis {
  display: block; margin-top: 4px;
  font-size: var(--fs-caption); font-weight: 400; color: var(--text-muted);
  line-height: 1.4;
}
.vid-form .form-label { margin-top: 12px; }
.vid-form .form-label:first-of-type { margin-top: 0; }
.vid-form-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.vid-form-haken {
  display: block; margin-top: 12px;
  font-size: var(--fs-small); line-height: 1.5; cursor: pointer;
}
.vid-form-haken input { margin-right: 8px; }
.vid-form .form-actions { margin-top: 16px; }

@media (max-width: 480px) {
  .vid-form-reihe { grid-template-columns: 1fr; }
}

/* ── NOVA: Beleg im Entwurf und Beobachtungsreihe im Manager-Bereich (Etappe 4) ── */
.vid-beleg {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: rgba(0,255,136,0.06); border-left: 3px solid var(--neon);
  font-size: var(--fs-small); line-height: 1.6;
}
.vid-beleg-fehlt { background: rgba(251,191,36,0.08); border-left-color: var(--amber); }
.vid-beleg-kopf { font-weight: 600; margin-bottom: 6px; }
.vid-beleg-zeit { font-weight: 400; color: var(--text-muted); margin-left: 8px; }
.vid-beleg-text { font-style: italic; overflow-wrap: anywhere; }

.nova-kanal { padding: 12px 0; border-top: 1px solid var(--glass-border); }
.nova-kanal:first-of-type { border-top: none; }
.nova-eintrag {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.03); font-size: var(--fs-small); line-height: 1.6;
}
[data-theme="light"] .nova-eintrag { background: rgba(0,0,0,0.03); }
.nova-behauptung { font-weight: 600; overflow-wrap: anywhere; }
.nova-beleg {
  margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--neon);
  font-style: italic; overflow-wrap: anywhere;
}
.nova-beleg-fehlt { border-left-color: var(--amber); font-style: normal; }
.nova-beleg-marke {
  display: block; font-style: normal; font-weight: 600;
  font-size: var(--fs-badge); color: var(--text-muted);
}
.nova-einordnung { margin-top: 6px; overflow-wrap: anywhere; }
/* Die Reihe klappt zu (v0.10.550, VERAs Auflage). Aussehen wie die Accordions in der
   Infrastruktur, aber als echter Knopf: die dortigen Köpfe sind divs mit onclick und
   damit für die Tastatur nicht erreichbar. Ein Knopf erbt keine Schrift und keine
   Farbe, deshalb die paar Zeilen hier. */
.nova-reihe-kopf {
  width: 100%; margin-top: 10px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; color: var(--text-muted);
  font: inherit; font-size: var(--fs-small); font-weight: 600;
  text-align: left; min-height: 40px;
}
.nova-reihe-kopf:hover { border-color: var(--primary); color: var(--primary-light); }
.nova-reihe-kopf:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

/* Der Rückkanal (v0.10.547). Ein abgelehnter Eintrag bleibt lesbar, tritt aber
   zurück: er zählt nirgends mehr mit, und das soll man sehen, ohne ihn zu suchen. */
.nova-eintrag-abgelehnt { opacity: 0.6; }
.nova-eintrag-abgelehnt .nova-behauptung { text-decoration: line-through; }
/* Der INHALT tritt zurück, die Bedienung nicht. Ohne diese Zeile waren auch
   "Zurücknehmen" und "Entfernen" blass, und ein Knopf, den man schlecht liest, ist
   ein Knopf, den man nicht findet. Im Bildschirmfoto vom 08.09.2026 aufgefallen. */
.nova-eintrag-abgelehnt .nova-eintrag-aktion { opacity: 1; }
.nova-bewertung {
  font-size: var(--fs-badge); font-weight: 600;
  padding: 3px 8px; border-radius: 20px; margin-right: 8px;
}
.nova-bewertung-gut { background: rgba(0,255,136,0.12); color: var(--neon); }
.nova-bewertung-weg { background: rgba(255,68,102,0.12); color: var(--red); }
/* Die Grund-Auswahl steht in der Aktionszeile und darf sie nicht sprengen. */
.nova-grund {
  width: auto; min-height: 36px; padding: 6px 10px;
  font-size: var(--fs-small);
}

/* Das Thema (v0.10.545). Es sieht aus wie ein Etikett und nicht wie ein Satz, weil
   es genau das ist: die Achse, an der sich zwei Kanäle treffen. */
.nova-thema {
  display: inline-block; margin-top: 6px; padding: 2px 8px;
  border-radius: 999px; background: rgba(122,0,223,0.12);
  border: 1px solid rgba(122,0,223,0.3);
  font-size: var(--fs-badge); font-weight: 600; color: var(--primary-light);
}
/* Der Querschnitt steht über den Kanälen und hebt sich deshalb ab: er beantwortet
   die Frage, für die es die ganze Reihe gibt. */
.nova-querschnitt-block {
  margin-bottom: 16px; padding: 14px;
  border-radius: 12px; border: 1px solid rgba(122,0,223,0.3);
  background: rgba(122,0,223,0.05);
}
[data-theme="light"] .nova-querschnitt-block { background: rgba(122,0,223,0.06); }
.nova-verdichtung {
  margin-top: 10px; padding: 12px; border-radius: 8px;
  background: rgba(0,255,136,0.06); font-size: var(--fs-small); line-height: 1.6;
}
[data-theme="light"] .nova-verdichtung { background: rgba(0,180,100,0.08); }
.nova-verdichtung-kopf { font-weight: 600; margin-bottom: 6px; }
.nova-aktionen { margin-top: 10px; }
.nova-meldung { margin-top: 12px; }

/* ── NOVA-Nachbesserungen aus der Manager-Runde vom 08.09.2026 ────────────── */
/* VERA: die neuen Links hatten keine Farbregel und fielen auf Browser-Blau
   zurueck, rund 1,8:1 gegen die Karte. Und "entfernen" sah aus wie "Transkript". */
.nova-eintrag a,
.nova-verdichtung a,
.mgr-block .empty-state a { color: var(--primary-light); }
.nova-eintrag a:hover,
.nova-verdichtung a:hover,
.mgr-block .empty-state a:hover { text-decoration: underline; }

/* VERA: belegt gegen unbelegt war nur ein 3px-Rand, im Light Mode praktisch
   unsichtbar. Jetzt traegt jede der drei Arten eine eigene Flaeche. */
.nova-beleg {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  background: rgba(0,255,136,0.06); border-left: 3px solid var(--neon);
  font-style: italic; overflow-wrap: anywhere;
}
.nova-beleg-schwach { background: rgba(251,191,36,0.10); border-left-color: var(--amber); }
.nova-beleg-fehlt   { background: rgba(251,191,36,0.10); border-left-color: var(--amber); font-style: normal; }
.nova-beleg-schwach .nova-beleg-marke,
.nova-beleg-fehlt .nova-beleg-marke { color: var(--amber); }
[data-theme="light"] .nova-beleg { background: rgba(0,150,90,0.10); }
[data-theme="light"] .nova-beleg-schwach,
[data-theme="light"] .nova-beleg-fehlt { background: rgba(217,119,6,0.12); }

/* Dasselbe im Entwurfs-Formular, dort fehlte die Light-Mode-Regel ganz. */
.vid-beleg-schwach { background: rgba(251,191,36,0.08); border-left-color: var(--amber); }
[data-theme="light"] .vid-beleg { background: rgba(0,150,90,0.10); }
[data-theme="light"] .vid-beleg-fehlt,
[data-theme="light"] .vid-beleg-schwach { background: rgba(217,119,6,0.12); }

/* VERA: "entfernen" war ein 12px-Link direkt neben einem Navigationslink. Jetzt
   ein eigener Knopf mit ausreichender Trefferflaeche. */
/* Seit v0.10.547 stehen hier bis zu drei Bedienelemente nebeneinander (nützlich,
   Grund-Auswahl, entfernen). Ohne Umbruch schöbe das die Karte am Handy seitwärts. */
.nova-eintrag-aktion {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.nova-eintrag-aktion .idee-btn { min-height: 36px; }

/* NOVAs Kanalname und das Monatsbild kommen aus fremder Quelle. */
.nova-kanal .mgr-item-titel,
.nova-verdichtung { overflow-wrap: anywhere; }

/* Eigener Hinweis-Stil statt der Klasse aus dem Video-Formular (VERA). */
.nova-hinweis {
  display: block; margin-top: 4px;
  font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5;
}

/* Der einzige Knopf-Typ ohne eigenen Fokus-Ring (VERA). */
.idee-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.idee-btn.danger:focus-visible { outline-color: var(--red); }

/* ========== Betriebshandbuch (handbuch.php) ========== */
/* Das Handbuch ist Lesestoff, kein Dashboard. Deshalb eine eigene, engere
   Textspalte statt der Container-Breite: Fliesstext ueber die volle Breite
   eines Desktop-Fensters liest sich schlecht (VERA, Style-Guide Typografie). */
.handbuch-abschnitt .handbuch-text { max-width: 68ch; }
.handbuch-text p,
.handbuch-text li { line-height: 1.6; }
.handbuch-text h4,
.handbuch-text h5 {
  font-size: var(--fs-body); font-weight: 700;
  margin: 18px 0 6px; color: var(--text);
}
.handbuch-text ul,
.handbuch-text ol { margin: 8px 0 8px 20px; }
.handbuch-text ul ul { margin: 4px 0 4px 18px; }
.handbuch-text blockquote {
  margin: 10px 0; padding: 8px 12px;
  border-left: 3px solid var(--glass-border);
  color: var(--text-muted);
}
.handbuch-text hr { border: 0; border-top: 1px solid var(--glass-border); margin: 16px 0; }
.handbuch-text code,
.handbuch-fakten code { overflow-wrap: anywhere; }

/* Karten enthalten breite Tabellen. Sie scrollen in sich, nie die Seite. */
.handbuch-tabelle { overflow-x: auto; margin: 12px 0; }
.handbuch-tabelle table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
.handbuch-tabelle th,
.handbuch-tabelle td {
  border: 1px solid var(--glass-border);
  padding: 6px 10px; text-align: left; vertical-align: top;
}
.handbuch-tabelle th { background: var(--glass); font-weight: 700; }

.handbuch-fakten { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.handbuch-fakten dt { color: var(--text-muted); font-size: var(--fs-caption); }
.handbuch-fakten dd { margin: 0; font-size: var(--fs-small); }

.handbuch-toc { margin: 0 0 0 22px; }
.handbuch-toc li { margin-bottom: 4px; }
.handbuch-toc a { color: var(--primary-light); }
.handbuch-toc a:hover { text-decoration: underline; }

/* Eine Luecke wird im normalen Textstil benannt, nicht als Warnung. Ein
   Dokument, das seine Loecher anschreit, wirkt billig (VERA). */
.handbuch-luecke { color: var(--text-muted); font-style: italic; }
.handbuch-leise { color: var(--text-muted); font-size: var(--fs-caption); }
.handbuch-abschnitt { margin-bottom: 16px; }

@media (max-width: 600px) {
  .handbuch-fakten { grid-template-columns: 1fr; gap: 2px 0; }
  .handbuch-fakten dd { margin-bottom: 8px; }
}

/* Aufzählung in einer Hinweisbox: .alert ist ein Flex-Container, eine ul
   darin hängt sonst mit ihren Punkten links aus dem Kasten heraus. */
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert li { margin-bottom: 2px; }

/* ── Architektur-Diagramme (diagramme.php, diagramm.php) ── */
.dia-zurueck { font-size: var(--fs-caption); margin-bottom: 12px; }
.dia-zurueck a { color: var(--primary-light); }
.dia-zurueck a:hover { text-decoration: underline; }
.dia-kopf { margin-bottom: 16px; }
.dia-titel { font-size: var(--fs-h1); font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.dia-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.dia-meta-text { font-size: var(--fs-caption); color: var(--text-muted); }
.dia-auftrag { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.dia-auftrag summary { cursor: pointer; color: var(--primary-light); }
.dia-auftrag p { margin: 8px 0 0; white-space: pre-wrap; }

/* Die Diagramm-Seite braucht Breite: ein Architekturbild in 1000 Pixeln ist unlesbar. */
.container.dia-seite { max-width: 1400px; }
.dia-zusammenfassung { max-width: 900px; }

.dia-rahmen {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dia-rahmen:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.dia-rahmen:fullscreen .dia-buehne { flex: 1; height: auto; }

.dia-leiste {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--glass-border);
}
.dia-pfade { display: flex; flex-wrap: wrap; gap: 8px; }
.dia-pfad-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass);
  color: var(--text); font-family: inherit; font-size: var(--fs-small); font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.dia-pfad-chip:hover { border-color: var(--primary); }
.dia-pfad-chip:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.dia-pfad-chip.aktiv { background: rgba(122, 0, 223, 0.15); border-color: var(--primary); color: var(--primary-light); }
.dia-pfad-nr { font-size: var(--fs-badge); font-weight: 700; letter-spacing: 0.5px; color: var(--neon); }
.dia-steuerung { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dia-steuerung .btn-sm { min-width: 44px; min-height: 44px; }
.dia-zoom-wert { font-size: var(--fs-caption); color: var(--text-muted); min-width: 48px; text-align: center; }

/* Abspiel-Karte liegt im Bild unten links, damit die Zeichnung beim Abspielen im Blick bleibt.
   Als Leiste über dem Bild schob sie die Zeichnung aus dem sichtbaren Bereich (14.09.2026). */
.dia-schritt {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  width: min(460px, calc(100% - 24px));
  background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.dia-schritt[hidden] { display: none; }
.dia-schritt-kopf { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.dia-schritt-titel { font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dia-schritt-zaehler { margin-left: auto; font-size: var(--fs-caption); color: var(--text-muted); white-space: nowrap; }
.dia-schritt-aktuell { font-size: 0.88rem; line-height: 1.45; margin: 0 0 8px; }
.dia-schritt-text { font-size: var(--fs-caption); line-height: 1.5; color: var(--text-muted); margin: -4px 0 8px; }
.dia-schritt-badge { margin-left: 8px; }
.dia-schritt-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.dia-schritt-knoepfe .btn-sm { min-height: 44px; }
.dia-schritt-ende { margin-left: auto; }
.dia-pfad-chip.dia-alle { border-color: rgba(0, 255, 136, 0.35); color: var(--neon); }
.dia-pfad-chip.dia-alle.aktiv { background: rgba(0, 255, 136, 0.12); border-color: var(--neon); }

.dia-buehne {
  position: relative;
  height: 70vh;
  min-height: 420px;
  background-color: var(--bg);
  overflow: hidden;
}
.dia-buehne > .empty-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dia-svg { display: block; touch-action: none; user-select: none; cursor: grab; }
.dia-buehne.zieht .dia-svg { cursor: grabbing; }

/* Farbe je Art: gesetzt als color, SVG und Legende greifen über currentColor zu */
.art-nutzer { color: var(--text-muted); }
.art-system { color: var(--primary-light); }
.art-modul { color: var(--neon); }
.art-datenbank { color: var(--blue); }
.art-server { color: var(--amber); }
.art-cron { color: var(--orange); }
.art-extern { color: var(--sleep); }
.art-ruft_auf { color: var(--neon); }
.art-liest { color: var(--blue); }
.art-schreibt { color: var(--primary-light); }
.art-sendet { color: var(--amber); }
.art-webhook { color: var(--orange); }
.art-startet { color: var(--sleep); }
.art-hostet { color: var(--text-muted); }

.dia-zonentitel { fill: var(--text-muted); font-size: var(--fs-badge); font-weight: 700; letter-spacing: 1.5px; }
.dia-gruppe { fill: var(--glass); stroke: var(--primary); stroke-opacity: 0.45; stroke-width: 1.2; stroke-dasharray: 6 5; }
.dia-gruppentitel { fill: var(--primary-light); font-size: var(--fs-caption); font-weight: 600; }

.dia-knoten { cursor: pointer; transition: opacity 0.2s; }
.dia-knoten:focus { outline: none; }
.dia-knoten-flaeche { fill: var(--card); stroke: currentColor; stroke-opacity: 0.55; stroke-width: 1.4; }
.dia-knoten:hover .dia-knoten-flaeche,
.dia-knoten:focus-visible .dia-knoten-flaeche,
.dia-knoten.gewaehlt .dia-knoten-flaeche { stroke-opacity: 1; stroke-width: 2.4; }
.dia-knoten.unbelegt .dia-knoten-flaeche { stroke-dasharray: 5 4; }
.dia-symbol-grund { fill: currentColor; fill-opacity: 0.14; }
.dia-symbol path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dia-knoten-name { fill: var(--text); font-size: var(--fs-small); font-weight: 600; }
.dia-knoten-untertitel { fill: var(--text-muted); fill-opacity: 0.75; font-size: var(--fs-caption); }

.dia-kante { transition: opacity 0.2s; }
.dia-kante-breit { fill: none; stroke: transparent; stroke-width: 12; }
.dia-linie { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-opacity: 0.7; }
.dia-kante.asynchron .dia-linie { stroke-dasharray: 6 5; }
.dia-kante.unbelegt .dia-linie { stroke-opacity: 0.35; }
.dia-spitze { fill: currentColor; }
.dia-label { transition: opacity 0.2s; }
.dia-label text { fill: var(--text); font-size: var(--fs-caption); }
.dia-label-grund { fill: var(--bg); stroke: var(--glass-border); }
.dia-label.nur-fokus { display: none; }
.dia-label.nur-fokus.an { display: inline; }

/* Fokus: gewählter Kasten oder Rundgang bleibt, alles andere tritt zurück */
.dia-svg.fokus .dia-knoten:not(.an) { opacity: 0.18; }
.dia-svg.fokus .dia-kante:not(.an) { opacity: 0.08; }
.dia-svg.fokus .dia-label:not(.an) { opacity: 0; }
.dia-svg.fokus .dia-kante.an .dia-linie { stroke-opacity: 1; stroke-width: 2.2; }
.dia-kante.aktiv .dia-linie { stroke-width: 3; stroke-dasharray: 10 7; animation: dia-fluss 0.9s linear infinite; }
.dia-label.aktiv .dia-label-grund { stroke: var(--primary-light); }
@keyframes dia-fluss { to { stroke-dashoffset: -17; } }
@media (prefers-reduced-motion: reduce) { .dia-kante.aktiv .dia-linie { animation: none; } }

.dia-detail {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 320px; max-height: calc(100% - 24px); overflow: auto;
  background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px;
  padding: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.dia-detail[hidden] { display: none; }
.dia-detail-untertitel { font-size: var(--fs-caption); color: var(--text-muted); margin-top: 2px; }
.dia-art-badge { background: transparent; border: 1px solid currentColor; }

.dia-legende { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 12px 16px; border-top: 1px solid var(--glass-border); }
.dia-legende-gruppe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.dia-legende-titel { font-size: var(--fs-badge); font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.dia-legende-eintrag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-caption); color: var(--text-muted); }
.dia-legende-punkt { width: 12px; height: 12px; border-radius: 4px; border: 2px solid currentColor; }
.dia-legende-punkt.unbelegt { border-style: dashed; color: var(--text-muted); }
.dia-legende-linie { width: 22px; border-top: 2px solid currentColor; }
.dia-legende-linie.asynchron { border-top-style: dashed; color: var(--text-muted); }
.dia-detail-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.dia-detail-titel { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0; }
.dia-detail-abzeichen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dia-detail-text { font-size: 0.82rem; line-height: 1.5; margin: 0 0 12px; }
.dia-detail-hinweis { font-size: 0.82rem; line-height: 1.5; color: var(--amber); margin: 0 0 12px; }
.dia-detail-zwischentitel { font-size: var(--fs-caption); font-weight: 700; color: var(--text-muted); margin: 12px 0 4px; }
.dia-detail-liste { margin: 0 0 0 18px; padding: 0; font-size: 0.82rem; line-height: 1.5; }
.dia-detail-liste li { margin-bottom: 4px; overflow-wrap: anywhere; }
.dia-detail-liste code { font-size: var(--fs-caption); }
.dia-detail-stichwort { color: var(--text-muted); font-size: var(--fs-caption); }

.dia-luecken { margin-top: 20px; }
.dia-zwischentitel { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.dia-luecken-liste { margin: 0 0 0 18px; padding: 0; font-size: 0.82rem; line-height: 1.5; color: var(--text-muted); }
.dia-luecken-liste li { margin-bottom: 4px; }

.dia-zaehler { font-size: var(--fs-caption); color: var(--text-muted); text-align: right; margin-top: 4px; }
.dia-meldung { margin-bottom: 16px; }
.dia-liste { display: grid; gap: 8px; }
.dia-karte {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
}
.dia-karten-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.dia-nummer { font-size: var(--fs-badge); font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; }
.dia-zustand { margin-left: auto; }
.dia-auftrag-text { font-size: 0.88rem; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; white-space: pre-line; }
.dia-karten-meta { font-size: var(--fs-caption); color: var(--text-muted); margin-bottom: 8px; }
.dia-hinweis { margin-bottom: 8px; font-size: var(--fs-caption); }
.dia-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.dia-aktionen .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }

/* Teilen: Verwaltung in diagramm.php, geteilte Ansicht in ansehen.php */
.dia-teilen { margin-top: 28px; }
.dia-teilen-intro { font-size: 0.82rem; line-height: 1.5; color: var(--text-muted); margin: 0 0 12px; max-width: 760px; }
.dia-teilen-neu { margin-bottom: 20px; }
.dia-teilen-link { display: flex; gap: 8px; align-items: center; }
.dia-teilen-link .form-input { flex: 1; min-width: 0; font-size: var(--fs-caption); }
.dia-teilen-link .btn-sm { min-height: 44px; }
.dia-geteilt-hinweis { margin-top: 20px; font-size: var(--fs-caption); color: var(--text-muted); }
.dia-geteilt-leer { margin-top: 28px; }

@media (max-width: 767px) {
  .dia-buehne { height: 62vh; min-height: 360px; }
  .dia-detail { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 55%; }
  .dia-schritt { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .dia-leiste { padding: 12px; }
}

/* ── Offene Vorschläge der Manager-Runde (Dashboard, ab 0.10.607) ───────────
   Karten nach dem Standard-Muster, Badges nach dem Muster von .plan-group-count.
   Keine neuen Farben: die vier Ziele nutzen vorhandene Variablen. */
.triage-count {
  font-weight: 600; font-size: var(--fs-badge);
  padding: 2px 8px; border-radius: 20px;
  background: rgba(122,0,223,0.15); color: var(--primary-light);
}
.triage-intro {
  font-size: var(--fs-caption); color: var(--text-muted);
  margin: 0 0 12px; line-height: 1.5;
}
.triage-liste { display: grid; gap: 8px; }
.triage-item {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s;
}
.triage-item:hover { border-color: var(--primary); }
.triage-item.ist-erledigt { opacity: 0.45; }
.triage-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.triage-manager {
  font-weight: 700; font-size: var(--fs-badge);
  letter-spacing: 0.5px; color: var(--text);
}
.triage-ziel {
  font-size: var(--fs-badge); padding: 3px 8px; border-radius: 20px;
  background: rgba(122,0,223,0.12); color: var(--primary-light);
}
.triage-ziel-aufgabe      { background: rgba(255,68,102,0.12); color: var(--red); }
.triage-ziel-idee         { background: rgba(251,191,36,0.12); color: var(--amber); }
.triage-ziel-beobachtung  { background: rgba(59,130,246,0.12); color: var(--blue); }
.triage-ziel-webredaktion { background: rgba(0,255,136,0.12);  color: var(--neon); }
.triage-haken {
  margin-left: auto;
  background: none; border: 1px solid var(--glass-border);
  color: var(--text-muted); border-radius: 10px;
  font-size: var(--fs-badge); padding: 0 12px;
  min-height: 44px; min-width: 44px; cursor: pointer;
  transition: all 0.2s;
}
.triage-haken:hover { border-color: var(--primary); background: rgba(122,0,223,0.1); color: var(--text); }
.triage-haken:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.triage-satz { font-size: 0.88rem; line-height: 1.5; color: var(--text); }
.triage-warum {
  font-size: var(--fs-caption); color: var(--text-muted);
  line-height: 1.5; margin-top: 4px;
}
.triage-quelle {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
  margin-top: 8px; font-size: var(--fs-caption); color: var(--text-muted);
}
.triage-quelle a { color: var(--primary-light); text-decoration: none; }
.triage-quelle a:hover { text-decoration: underline; }
.triage-zum-video { margin-left: auto; }

@media (max-width: 500px) {
  .triage-kopf { flex-wrap: wrap; }
  .triage-haken { margin-left: 0; width: 100%; }
  .triage-zum-video { margin-left: 0; }
}

/* Bettzeit-Erinnerung zwischen 0 und 5 Uhr (assets/js/bettzeit.js, 0.10.650) */
.bettzeit {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9999;
  width: calc(100% - 32px); max-width: 520px; padding: 16px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--primary); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  font-size: var(--fs-body); line-height: 1.5;
}
.bettzeit button {
  margin-top: 12px; min-height: 44px; padding: 8px 16px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white;
  font: inherit; font-weight: 600; cursor: pointer;
}
.bettzeit button:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
