/* ===================================================================
   members.css — Weber Webdesign-System · Mitgliederbereich
   =================================================================== */

/* ── Fonts (self-hosted Inter, wie Hauptseite) ───────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('../../../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../../../fonts/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── CSS Variables ───────────────────────────────────────────────── */
:root {
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --surface-2:     #F1F5F9;
  --text:          #0F172A;
  --text-muted:    #475569;
  --border:        #E2E8F0;
  --primary:       #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft:  #DBEAFE;
  --accent:        #7C3AED;
  --gradient-brand: linear-gradient(120deg, #2563EB 0%, #7C3AED 100%);
  --radius:        12px;
  --radius-sm:     8px;
  --shadow-sm:     0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow:        0 4px 14px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg:     0 18px 40px -12px rgba(15,23,42,.18);
}

[data-theme="dark"] {
  --bg:           #0F172A;
  --surface:      #1E293B;
  --surface-2:    #162032;
  --text:         #F1F5F9;
  --text-muted:   #94A3B8;
  --border:       #334155;
  --primary:      #3B82F6;
  --primary-hover:#2563EB;
  --primary-soft: #1e3a6e;
  --accent:       #A78BFA;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.2), 0 1px 3px rgba(0,0,0,.15);
  --shadow:       0 4px 14px rgba(0,0,0,.28);
}

/* ── Reset / Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background 600ms ease,
    background-color 600ms ease,
    color 600ms ease,
    border-color 600ms ease,
    box-shadow 600ms ease !important;
}

html {
  font-size: 112.5%; /* 18px base — skaliert alle rem-Werte */
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Aurora gradient background */
body::before {
  content: '';
  position: fixed;
  inset: -15vh -15vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 14% 18%, color-mix(in srgb, var(--primary) 18%, transparent) 0%, transparent 72%),
    radial-gradient(34% 42% at 86% 26%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 72%),
    radial-gradient(40% 38% at 52% 88%, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 70%);
  filter: blur(60px) saturate(120%);
  opacity: .65;
  animation: aurora-drift 32s ease-in-out infinite alternate;
}
[data-theme="dark"] body::before { opacity: .9; filter: blur(72px) saturate(140%); }
@keyframes aurora-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%,-1.5%,0) scale(1.07); }
  100% { transform: translate3d(-1.5%,1.5%,0) scale(1.05); }
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.alert--error   { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.alert--success { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.alert--warning { background:#fffbeb; color:#92400e; border-color:#fde68a; }

[data-theme="dark"] .alert--error   { background:#450a0a; color:#fca5a5; border-color:#7f1d1d; }
[data-theme="dark"] .alert--success { background:#052e16; color:#86efac; border-color:#14532d; }
[data-theme="dark"] .alert--warning { background:#431407; color:#fcd34d; border-color:#78350f; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .35rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: .65rem .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.btn-login {
  width: 100%;
  padding: .75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  margin-top: .25rem;
}
.btn-login:hover { background: var(--primary-hover); }

/* ── Login Page ──────────────────────────────────────────────────── */
.login-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-wrap {
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: block;
  margin-bottom: 2rem;
  text-decoration: none;
}
.login-logo:hover { opacity: .85; }
.login-logo-img {
  width: 100%;
  height: auto;
  display: block;
}
.login-logo-img--dark  { display: none; }
[data-theme="dark"] .login-logo-img--light { display: none; }
[data-theme="dark"] .login-logo-img--dark  { display: block; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--radius) var(--radius) 0 0;
}

.login-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .3rem;
}

.login-sub {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-help {
  margin-top: 1.25rem;
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Portal Header ───────────────────────────────────────────────── */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}

.portal-header.is-scrolled {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent);
  box-shadow: var(--shadow-sm);
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.portal-logo:hover { text-decoration: none; }

.portal-logo-img {
  height: 60px;
  width: auto;
  display: block;
}
.portal-logo-img--dark  { display: none; }
[data-theme="dark"] .portal-logo-img--light { display: none; }
[data-theme="dark"] .portal-logo-img--dark  { display: block; }

.portal-header-right {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .875rem;
}

.portal-user { color: var(--text-muted); }

.btn-logout,
.btn-back {
  padding: .3rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
  cursor: pointer;
  font-family: inherit;
}
.btn-logout:hover,
.btn-back:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

/* ── Portal Footer ───────────────────────────────────────────────── */
.portal-footer {
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.portal-footer__copy {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .6rem;
}

.portal-footer__rights {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 76ch;
  opacity: .75;
}

/* ── Neural Canvas ───────────────────────────────────────────────── */
#neuralCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  opacity: .4;
}
[data-theme="dark"] #neuralCanvas { opacity: .65; }
.portal-page > *:not(canvas):not(#hero):not(.portal-header) { position: relative; z-index: 1; }

/* ── Portal Main ─────────────────────────────────────────────────── */
.portal-main { padding: 2.5rem 1.5rem 4rem; }

.portal-container {
  max-width: 960px;
  margin: 0 auto;
}

.portal-container--narrow {
  max-width: 760px;
}

/* ── Dashboard Hero ──────────────────────────────────────────────── */
.dash-hero {
  margin-bottom: 2rem;
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.dash-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

.dash-hero h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .3rem; letter-spacing: -.01em; }
.dash-hero p  { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.dash-progress {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.dash-progress__bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.dash-progress__fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.dash-progress__label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 2.5rem;
  text-align: right;
}

/* ── Continue Card ───────────────────────────────────────────────── */
.dash-continue {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: background .15s;
}

.dash-continue:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }

.dash-continue__meta { display: flex; flex-direction: column; gap: .15rem; min-width: 80px; }
.dash-continue__kicker { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.dash-continue__phase  { font-size: .72rem; opacity: .75; }
.dash-continue__title  { flex: 1; font-size: .95rem; font-weight: 600; }
.dash-continue__arrow  { font-size: 1.1rem; opacity: .85; }

/* ── Phase Group ─────────────────────────────────────────────────── */
.phase-group { margin-bottom: 2.5rem; }

.phase-group--bonus {
  padding: 1.25rem 1.5rem;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
}

.phase-group--bonus .phase-label { color: var(--primary); }

/* Bonus · Vertiefung — tiefere Themen am Kursende */
.phase-group--vertiefung {
  margin-top: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  background: color-mix(in srgb, var(--text-muted) 5%, transparent);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
}
.phase-group--vertiefung .phase-label {
  color: var(--text-muted);
  letter-spacing: .1em;
}
.phase-group--vertiefung .phase-label::before {
  content: '★ ';
  opacity: .6;
}

/* Bonus · Für Unternehmer — praxisnahe Bonus-Module */
.phase-group--unternehmer {
  margin-top: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  opacity: .9;
}
.phase-group--unternehmer .phase-label {
  color: var(--primary);
  letter-spacing: .1em;
}
.phase-group--unternehmer .phase-label::before {
  content: '+ ';
}

.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.phase-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
}

.phase-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.phase-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Module Grid ─────────────────────────────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 700px) { .module-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .module-grid { grid-template-columns: 1fr; } }

.module-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .2s, transform .2s;
  position: relative;
  overflow: hidden;
}

.module-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.module-card:hover::after { transform: scaleX(1); }
.module-card--done::after  { transform: scaleX(1); background: #22c55e; }
.module-card--current::after { transform: scaleX(1); }

.module-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.module-card--done {
  border-color: #22c55e;
}

.module-card--done .module-card-title { opacity: .7; }

.module-card--current {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.module-card--soon {
  opacity: .55;
  cursor: default;
  pointer-events: none;
}

.module-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .1rem;
}

.module-num {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
}

.module-card__check { display: flex; align-items: center; }

.module-card__badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.module-card__badge--current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.module-card__badge--bonus {
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
  border-color: var(--border);
  color: var(--text-muted);
  font-style: italic;
}

.module-card-title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.module-card__phase-sub {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: .5rem;
}

/* ── Prompt-Block ─────────────────────────────────────────────────── */
.prompt-block {
  margin: .75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  overflow: hidden;
}
.prompt-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .75rem;
  background: rgba(59,130,246,.1);
  border-bottom: 1px solid var(--border);
}
.prompt-block__label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #3B82F6;
}
.prompt-copy-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .2rem .55rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.prompt-copy-btn:hover { color: var(--text); border-color: #3B82F6; }
.prompt-copy-btn--done { color: #22c55e !important; border-color: #22c55e !important; }
.prompt-block .code-block { margin: 0; border: none; border-radius: 0; }

.module-card__bullets {
  list-style: none;
  padding: 0;
  margin: .4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.module-card__bullets li {
  font-size: .72rem;
  color: var(--text-muted);
  padding-left: .9rem;
  position: relative;
  line-height: 1.4;
}
.module-card__bullets li::before {
  content: '·';
  position: absolute;
  left: .2rem;
  color: var(--accent, #3B82F6);
  font-weight: 700;
}

.module-badge {
  display: inline-block;
  margin-top: .2rem;
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .4rem;
  align-self: flex-start;
}

/* ── Completion Button ───────────────────────────────────────────── */
.module-complete-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.btn-complete:hover {
  border-color: #22c55e;
  color: #166534;
  background: #f0fdf4;
}

.btn-complete--done {
  border-color: #22c55e;
  color: #166534;
  background: #f0fdf4;
}

[data-theme="dark"] .btn-complete--done {
  background: #052e16;
  color: #86efac;
  border-color: #14532d;
}

.btn-next-module {
  display: inline-flex;
  align-items: center;
  padding: .65rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.btn-next-module:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }

/* ── Dark Mode Toggle ───────────────────────────────────────────── */
.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  font-family: inherit;
  flex-shrink: 0;
}
.btn-theme:hover {
  color: var(--text);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.btn-theme svg { width: 15px; height: 15px; }

/* ── Module Page ─────────────────────────────────────────────────── */
.module-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.module-phase-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: .5rem;
}

.module-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%,
      color-mix(in srgb, var(--primary) 12%, transparent) 0%,
      transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 2rem;
}

.video-placeholder__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 14%, transparent),
              0 0 0 24px color-mix(in srgb, var(--primary) 7%, transparent);
}

.video-placeholder__icon svg {
  width: 26px;
  height: 26px;
  margin-left: 3px; /* optische Zentrierung Play-Dreieck */
}

.video-placeholder__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 99px;
  padding: .25rem .75rem;
}

.video-placeholder__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

.video-placeholder__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.video-placeholder__sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

.module-body { margin-bottom: 2rem; }

.module-body-hint {
  color: var(--text-muted);
  font-size: .9rem;
  font-style: italic;
}

}

/* ── Bonus Module Extras ─────────────────────────────────── */
.module-bonus-intro {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text);
}

.module-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}

.shortcut-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--surface);
}

.shortcut-table thead tr {
  background: var(--surface-2);
}

.shortcut-table th {
  text-align: left;
  padding: .65rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.shortcut-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.shortcut-table tr:last-child td { border-bottom: none; }

.shortcut-table tr:hover td {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

kbd {
  display: inline-block;
  padding: .1rem .4rem;
  font-size: .8em;
  font-family: 'Inter', monospace;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text);
  white-space: nowrap;
}

.module-intro-text {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: .5rem;
}

/* ── Code Blocks ─────────────────────────────────────────── */
.code-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  margin: .75rem 0;
  overflow-x: auto;
}

.code-block code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: .82rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre;
}

.code-comment { color: var(--text-muted); font-style: italic; }

code:not(.code-block code) {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: .82em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .35rem;
  color: var(--primary);
}

/* ── Time Saving Badge ───────────────────────────────────── */
.time-saving-badge {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: .85rem;
  padding: .7rem 1rem;
  background: color-mix(in srgb, #22c55e 8%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  color: var(--text);
  line-height: 1.55;
}

.time-saving-badge__icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }

/* ── Allow Cards ─────────────────────────────────────────── */
.allow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin: .75rem 0;
}

@media (max-width: 600px) { .allow-cards { grid-template-columns: 1fr; } }

.allow-card {
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.allow-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: .5rem;
  margin-bottom: 0;
}

.allow-card__label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
  letter-spacing: .04em;
}

.allow-card__label--once   { background: #fef9c3; color: #854d0e; }
.allow-card__label--always { background: #dcfce7; color: #166534; }
.allow-card__label--deny   { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .allow-card__label--once   { background: #422006; color: #fcd34d; }
[data-theme="dark"] .allow-card__label--always { background: #052e16; color: #86efac; }
[data-theme="dark"] .allow-card__label--deny   { background: #450a0a; color: #fca5a5; }

.inline-list {
  padding-left: 1.2rem;
  margin: .5rem 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .88rem;
  color: var(--text-muted);
}

/* ── Module Content ──────────────────────────────────────── */
.module-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.module-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}

/* Lernziele */
.module-objectives {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.module-objectives__title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: .85rem;
}

.module-objectives__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.module-objectives__list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .9rem;
  line-height: 1.5;
}

.module-objectives__list li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: .15rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%2322c55e' stroke-width='1.5'/%3E%3Cpath d='M5 8l2 2 4-4' stroke='%2322c55e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Schritte */
.module-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.module-step {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.module-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 35%, transparent);
  margin-top: .1rem;
}

.module-step__title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.module-step__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.module-step__body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.module-step__sub {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  margin-top: .25rem;
}

.module-step__body p,
.module-step__body li {
  font-size: .925rem;
  line-height: 1.7;
  color: var(--text);
}

.module-step__body ul,
.module-step__body ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.module-step__body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Code-Blöcke */
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: .875rem;
  color: var(--text);
  overflow-x: auto;
}

/* Hinweis-Box */
.module-note {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Abschluss-Checkliste */
.module-checklist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.module-checklist__title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .35rem;
}

.module-checklist__sub {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.module-checklist__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.module-checklist__list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .9rem;
  line-height: 1.5;
}

.module-checklist__list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: .2rem;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.module-checklist__list label { cursor: pointer; }

.module-downloads {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.module-downloads h2 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

.module-downloads ul { list-style: none; }
.module-downloads li { margin-bottom: .4rem; }
.module-downloads a { font-size: .9rem; font-weight: 500; }

.module-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}

.module-nav-btn {
  display: inline-block;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.module-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.module-nav-btn--next {
  margin-left: auto;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.module-nav-btn--next:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

/* ── Admin ───────────────────────────────────────────────────────── */
.admin-page {
  min-height: 100svh;
  background: var(--bg);
}

.admin-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section h2 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.admin-form-row {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.admin-form-row .form-group {
  flex: 1 1 160px;
  margin-bottom: 0;
}

.btn-create {
  padding: .65rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-create:hover { background: var(--primary-hover); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.admin-table th {
  text-align: left;
  padding: .5rem .75rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.row--inactive { opacity: .5; }

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge--active   { background:#dcfce7; color:#166534; }
.badge--inactive { background:#fee2e2; color:#991b1b; }
.badge--pending  { background:#fef9c3; color:#854d0e; }
[data-theme="dark"] .badge--active   { background:#052e16; color:#86efac; }
[data-theme="dark"] .badge--inactive { background:#450a0a; color:#fca5a5; }
[data-theme="dark"] .badge--pending  { background:#422006; color:#fde68a; }

.admin-actions {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-small {
  padding: .28rem .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: .75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .1s, color .1s;
}
.btn-small:hover           { border-color: var(--primary); color: var(--primary); }
.btn-small--danger         { color: #dc2626; border-color: transparent; }
.btn-small--danger:hover   { border-color: #dc2626; background: #fef2f2; }

.text-muted { color: var(--text-muted); }

code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .85em;
  font-family: 'Consolas', 'Courier New', monospace;
}

/* ── KI-Kacheln (Modul 2) ──────────────────────────────────────── */
.ki-kacheln {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}
.ki-kachel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ki-kachel__icon { font-size: 1.5rem; line-height: 1; }
.ki-kachel__title { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0; }
.ki-kachel__text { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
@media (max-width: 900px) { .ki-kacheln { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .ki-kacheln { grid-template-columns: 1fr; } }

/* ── Copilot-Grid (Modul 2) ────────────────────────────────────── */
.copilot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}
.copilot-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
}
.copilot-block__title { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0 0 .5rem; }
.copilot-block__text  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
@media (max-width: 700px) { .copilot-grid { grid-template-columns: 1fr; } }

/* ── Module Callout ────────────────────────────────────────────── */
.module-callout {
  background: var(--primary-soft, #dbeafe);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  font-size: .875rem;
  line-height: 1.6;
  margin: 1rem 0;
}
