/* ============================================================
   SaaS Boilerplate — app.css
   Vollständige UI-Implementierung gemäß ui-implementation-plan.md
   ============================================================

   INHALTSVERZEICHNIS
   ──────────────────
   1.  DESIGN TOKENS (CSS Custom Properties)
   2.  RESET & BASE
   3.  TYPOGRAFIE
   4.  LAYOUT UTILITIES
   5.  KOMPONENTEN — Buttons
   6.  KOMPONENTEN — Forms
   7.  KOMPONENTEN — Alerts & Flash
   8.  KOMPONENTEN — Cards
   9.  KOMPONENTEN — Badges
   10. KOMPONENTEN — Pagination
   11. LAYOUT — Navigation
   12. LAYOUT — Footer
   13. LAYOUT — Auth
   14. LAYOUT — Page Hero (generisch)
   15. SECTIONS — CMS Hero
   16. SECTIONS — Features Grid
   17. SECTIONS — CTA Block
   18. SECTIONS — FAQ
   19. SECTIONS — Image + Text
   20. SECTIONS — Text Block / Prose
   21. MODUL — Blog
   22. MODUL — Courses (Public)
   23. MODUL — Learn Interface
   24. RESPONSIVE (Mobile-First Breakpoints)
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  /* Farben — Light-Mode Defaults (werden durch Theme-Middleware überschrieben) */
  --color-primary:       #4F46E5;
  --color-secondary:     #10B981;
  --color-accent:        #F59E0B;
  --color-bg:            #FFFFFF;
  --color-text:          #1F2937;
  --color-text-muted:    #6B7280;
  --color-border:        #E5E7EB;
  --color-success:       #10B981;
  --color-warning:       #F59E0B;
  --color-danger:        #EF4444;
  --color-info:          #3B82F6;

  /* Dark-Mode Oberflächen-Farben (intern, nicht durch Theme überschrieben) */
  --color-surface:       #FFFFFF;
  --color-surface-2:     #F9FAFB;
  --color-surface-3:     #F3F4F6;

  /* Typografie — System-Fonts only */
  --font-heading:        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:           system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-base:      16px;
  --line-height-base:    1.6;

  /* Layout */
  --container-max-width: 1280px;
  --border-radius:       8px;
  --border-radius-sm:    4px;
  --border-radius-lg:    16px;

  /* Schatten */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.10);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);

  /* Übergänge */
  --transition:  .15s ease;
}

/* Dark-Mode entfernt — Design wird ausschließlich über das Theme-Modul gesteuert */


/* ============================================================
   2. RESET & BASE
   ============================================================ */

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

[hidden] { display: none !important; }

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  min-height: 100vh;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}


/* ============================================================
   3. TYPOGRAFIE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { line-height: var(--line-height-base); }

small { font-size: .875em; }

strong { font-weight: 700; }

code {
  background: #F3F4F6;
  padding: .2em .4em;
  border-radius: 3px;
  font-size: .9em;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: .875rem;
}


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   5. KOMPONENTEN — Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: var(--border-radius);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) { opacity: .88; }

/* Varianten */
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
  opacity: 1;
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn--warning {
  background: var(--color-warning);
  color: #fff;
  border-color: var(--color-warning);
}

.btn--neutral {
  background: #F3F4F6;
  color: var(--color-text);
  border-color: #E5E7EB;
}

.btn--neutral:hover:not(:disabled) {
  background: #E5E7EB;
  opacity: 1;
}

/* Größen */
.btn--sm  { padding: .375rem .875rem; font-size: .8rem; }
.btn--lg  { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn--xl  { padding: 1.25rem 3rem; font-size: 1.15rem; }
.btn--full { width: 100%; }

/* Icon-Button */
.btn-icon { flex-shrink: 0; }


/* ============================================================
   6. KOMPONENTEN — Forms
   ============================================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .375rem;
  color: #374151;
}

.form-label--required::after {
  content: ' *';
  color: var(--color-danger);
}

.form-input {
  width: 100%;
  padding: .625rem .875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: .875rem;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

.form-input:disabled {
  background: #F9FAFB;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form-input--sm {
  padding: .375rem .625rem;
  font-size: .8rem;
}

.form-input--error {
  border-color: var(--color-danger);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

.form-hint {
  display: block;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-top: .375rem;
  line-height: 1.5;
}

.form-error {
  font-size: .8rem;
  color: var(--color-danger);
  margin-top: .375rem;
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Color Input */
input[type="color"].form-input {
  padding: .25rem .375rem;
  height: 2.5rem;
  cursor: pointer;
}


/* ============================================================
   7. KOMPONENTEN — Alerts & Flash
   ============================================================ */

/* Flash (globale Benachrichtigungen) */
.flash {
  padding: .875rem 1.25rem;
  margin: 1rem auto;
  max-width: var(--container-max-width);
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: opacity .3s;
}

.flash--success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.flash--error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.flash--info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.flash--warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

/* Alert (inline Benachrichtigungen) */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .875rem 1rem;
  border-radius: var(--border-radius);
  font-size: .875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.alert svg { flex-shrink: 0; margin-top: .1rem; }

.alert--success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert--error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert--info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.alert--warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

.alert--dismissible {
  position: relative;
  padding-right: 2.75rem;
}

.alert__close {
  position: absolute;
  top: .625rem;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  font-size: 1.1rem;
  line-height: 1;
  padding: .2rem;
}

.alert__close:hover { opacity: 1; }


/* ============================================================
   8. KOMPONENTEN — Cards
   ============================================================ */

.card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.card + .card { margin-top: 1rem; }

.card__header {
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--color-border);
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
}


/* ============================================================
   9. KOMPONENTEN — Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: .2em .65em;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
}

.badge--primary   { background: #EEF2FF; color: var(--color-primary); }
.badge--success   { background: #D1FAE5; color: #065F46; }
.badge--warning   { background: #FEF3C7; color: #92400E; }
.badge--danger    { background: #FEE2E2; color: #991B1B; }
.badge--neutral   { background: #F3F4F6; color: #6B7280; }
.badge--published { background: #D1FAE5; color: #065F46; }
.badge--draft     { background: #FEF3C7; color: #92400E; }
.badge--archived  { background: #F3F4F6; color: #6B7280; }


/* ============================================================
   10. KOMPONENTEN — Pagination
   ============================================================ */

.pagination {
  display: flex;
  gap: .375rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .75rem;
  border-radius: var(--border-radius-sm);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pagination a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .active,
.pagination [aria-current="page"] {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .disabled {
  opacity: .4;
  pointer-events: none;
}


/* ============================================================
   11. LAYOUT — Navigation
   ============================================================ */

.site-header {
  background: var(--color-nav-bg, #FFFFFF);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.nav__brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}

.nav__logo {
  height: 2rem;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav__links a {
  text-decoration: none;
  color: var(--color-nav-text, #1F2937);
  font-weight: 500;
  font-size: .9rem;
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-primary);
}

.nav__actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}

/* Mobile Nav Toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: .375rem;
  border-radius: var(--border-radius-sm);
}

.nav__toggle:hover { background: #F3F4F6; }

/* Lang Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 4px);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background .15s, border-color .15s;
  color: inherit;
  text-decoration: none;
}

.lang-switcher__btn:hover {
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.1);
}

.lang-switcher__btn--active {
  cursor: default;
  border-color: var(--color-primary, #4F46E5);
  background: rgba(79,70,229,.08);
}

/* Error Pages */
.error-page { padding: 4rem 0; text-align: center; }
.error-page h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.error-page p  { margin-bottom: 2rem; color: var(--color-text-muted); }
.error-stack   { background: #1e1e1e; color: #d4d4d4; padding: 1.5rem; border-radius: var(--border-radius); text-align: left; font-size: .8rem; overflow-x: auto; margin: 1rem 0 2rem; }


/* ============================================================
   12. LAYOUT — Footer
   ============================================================ */

.site-footer {
  background: var(--color-footer-bg, #FFFFFF);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer__copy {
  color: var(--color-footer-text, #6B7280);
  font-size: .875rem;
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
}

.site-footer__links a {
  color: var(--color-footer-text, #6B7280);
  font-size: .875rem;
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer__links a:hover { color: var(--color-primary); }

.site-footer__social {
  display: flex;
  gap: .625rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-footer-text, #6B7280);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.social-link:hover {
  color: var(--color-primary);
  background: #F3F4F6;
}

.site-footer__newsletter-link {
  color: var(--color-footer-text, #6B7280);
  font-size: .875rem;
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer__newsletter-link:hover { color: var(--color-primary); }

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111827;
  color: #F9FAFB;
  padding: 1rem 1.5rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 500;
  box-shadow: 0 -4px 16px rgba(0,0,0,.2);
}

.cookie-banner p {
  font-size: .875rem;
  color: #D1D5DB;
  flex: 1;
}

.cookie-banner__actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}


/* ============================================================
   13. LAYOUT — Auth
   ============================================================ */

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fixe Farben — unabhängig vom Theme (verhindert weißer-Text-auf-weißem-Hintergrund) */
  background: #F3F4F6;
  color: #1F2937;
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo img {
  max-height: 48px;
  margin: 0 auto;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.auth-card {
  background: #ffffff;
  color: #1F2937;  /* fix — unabhängig vom Theme */
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;  /* fix — unabhängig vom Theme */
  margin-bottom: .375rem;
}

.auth-subtitle {
  color: #6B7280;  /* fix — unabhängig vom Theme */
  font-size: .9rem;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--color-text-muted);
}

.auth-footer {
  color: #6B7280;  /* fix — unabhängig vom Theme */
}

.auth-footer a {
  color: #4F46E5;  /* fix — Primärfarbe als Fallback */
  font-weight: 600;
  text-decoration: none;
}

/* Check-Email / Success State */
.auth-success {
  text-align: center;
  padding: 1rem 0;
}

.auth-success__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.auth-success__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.auth-success__text {
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* ============================================================
   14. LAYOUT — Page Hero (generisch)
   ============================================================ */

.page-hero {
  background: linear-gradient(135deg, #F9FAFB 0%, #EFF6FF 100%);
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: .5rem;
}

.page-hero__subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 560px;
}

/* Startseite — Hero (home.hbs) */
.hero {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, #F9FAFB 0%, #EFF6FF 100%);
}

.hero__content { max-width: 680px; margin: 0 auto; }

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__cta { padding: .875rem 2rem; font-size: 1rem; }

/* Startseite — Sections */
.section { padding: 4rem 0; }
.section--blog-preview { background: #F9FAFB; }
.section--courses { background: #fff; }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section__title { font-size: 1.75rem; font-weight: 700; }

.section__link {
  font-size: .9rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.section__link:hover { text-decoration: underline; }


/* ============================================================
   15. SECTIONS — CMS Hero
   ============================================================ */

.section--hero {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.hero-overlay,
.section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 0;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* text-align:left → linksbündig */
.hero-container--left .hero-subheadline {
  margin-left: 0;
  margin-right: auto;
}
.hero-container--left .hero-cta {
  justify-content: flex-start;
}

/* text-align:right → rechtsbündig */
.hero-container--right .hero-subheadline {
  margin-left: auto;
  margin-right: 0;
}
.hero-container--right .hero-cta {
  justify-content: flex-end;
}

/* Wenn Overlay aktiv, Text weiß */
.section--hero:has(.hero-overlay) .hero-headline,
.section--hero:has(.section-overlay) .hero-headline,
.section--hero:has(.hero-overlay) .hero-subheadline,
.section--hero:has(.section-overlay) .hero-subheadline {
  color: #fff;
}

.section--hero:has(.hero-overlay) .hero-subheadline,
.section--hero:has(.section-overlay) .hero-subheadline {
  color: rgba(255,255,255,.85);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
  justify-content: center; /* default: center — wird bei text-align:left überschrieben (s.o.) */
}

.btn--lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn--xl { padding: 1.25rem 3rem; font-size: 1.15rem; }


/* ============================================================
   16. SECTIONS — Features Grid
   ============================================================ */

.section--features { padding: 4rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  gap: 1.5rem;
}

.features-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.features-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.features-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.75rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.feature-desc {
  color: var(--color-text-muted);
  font-size: .9rem;
  line-height: 1.6;
}

.feature-link {
  display: inline-block;
  margin-top: .75rem;
  color: var(--color-primary);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.feature-link:hover { text-decoration: underline; }


/* ============================================================
   17. SECTIONS — CTA Block
   ============================================================ */

.section--cta { padding: 4rem 0; }

.section--cta-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
}

.section--cta-gradient .cta-headline,
.section--cta-gradient .cta-subheadline {
  color: #fff;
}

.section--cta-solid {
  background: var(--color-primary);
  color: #fff;
}

.section--cta-solid .cta-headline,
.section--cta-solid .cta-subheadline {
  color: #fff;
}

.section--cta-outline-box .cta-inner {
  border: 2px solid var(--color-primary);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
}

.cta-inner { text-align: center; }

.cta-headline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: .75rem;
}

.cta-subheadline {
  font-size: 1.1rem;
  opacity: .85;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}


/* ============================================================
   18. SECTIONS — FAQ
   ============================================================ */

.section--faq { padding: 4rem 0; }

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  gap: 1rem;
  user-select: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question span { flex: 1; }

.faq-chevron {
  transition: transform .25s ease;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 0 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  animation: faqOpen .2s ease;
}

@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   19. SECTIONS — Image + Text
   ============================================================ */

.section--image-text { padding: 4rem 0; }

.image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-width: 0;
}

.image-text > * {
  min-width: 0;
}

.image-text--right {
  direction: rtl;
}

.image-text--right > * {
  direction: ltr;
}

.image-text__image { }

.image-text__img {
  width: 100%;
  height: auto;
}

.image-text__img--rounded {
  border-radius: var(--border-radius);
}

.image-text__img--circle {
  border-radius: 50%;
  aspect-ratio: 1;
  object-fit: cover;
}

.image-text__img--square {
  border-radius: 0;
}

.image-text__content { }


/* ============================================================
   20. SECTIONS — Text Block / Prose
   ============================================================ */

.section--text { padding: 4rem 0; }

.prose {
  line-height: 1.8;
  color: var(--color-text);
  max-width: 72ch;
}

.prose h1 { font-size: 2rem; margin: 1.5rem 0 .75rem; }
.prose h2 { font-size: 1.5rem; margin: 1.5rem 0 .5rem; }
.prose h3 { font-size: 1.25rem; margin: 1.25rem 0 .5rem; }
.prose h4 { font-size: 1.1rem; margin: 1rem 0 .5rem; }

.prose p { margin-bottom: 1rem; }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* FIX Bug 11: list-style-type explizit setzen — globaler Reset (ul,ol{list-style:none}) überschreiben */
.prose ul { list-style: disc; list-style-type: disc; }
.prose ol { list-style: decimal; list-style-type: decimal; }

.prose li { margin-bottom: .375rem; }

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

.prose a:hover { opacity: .8; }

.prose blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.prose code {
  background: #F3F4F6;
  padding: .2em .4em;
  border-radius: 3px;
  font-size: .9em;
}

.prose pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose img {
  max-width: 100%;
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose th, .prose td {
  padding: .625rem .875rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.prose th {
  background: #F9FAFB;
  font-weight: 600;
}

/* Blog Content (Quill-Output) */
.blog-content h1 { font-size: 2rem; margin: 1.5rem 0 .75rem; }
.blog-content h2 { font-size: 1.5rem; margin: 1.25rem 0 .5rem; }
.blog-content h3 { font-size: 1.25rem; margin: 1rem 0 .5rem; }
.blog-content p  { line-height: 1.8; margin-bottom: 1rem; }
.blog-content img { max-width: 100%; border-radius: var(--border-radius); }
.blog-content blockquote { border-left: 4px solid var(--color-primary); padding-left: 1rem; color: var(--color-text-muted); font-style: italic; }
.blog-content code { background: #F3F4F6; padding: .2em .4em; border-radius: 3px; font-size: .9em; }
.blog-content pre  { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 1rem 0; }
/* FIX: list-style-type explizit setzen, da globaler Reset (ul,ol{list-style:none}) greift */
.blog-content ul { padding-left: 1.5rem; margin-bottom: 1rem; list-style-type: disc; }
.blog-content ol { padding-left: 1.5rem; margin-bottom: 1rem; list-style-type: decimal; }
.blog-content li { margin-bottom: .375rem; }
.blog-content a { color: var(--color-primary); }


/* ============================================================
   21. MODUL — Blog
   ============================================================ */

/* Blog-Übersicht */
/* ── Theme-Isolation: Blog-Seiten haben weißen/hellen Hintergrund.
   Das Theme-Modul überschreibt --color-text global auf <html>.
   Alle Blog-Elemente auf hellem Hintergrund brauchen harte Farbwerte. ── */
.blog-wrap,
.blog-post-wrap {
  color: #111827;
}

.blog-wrap a,
.blog-post-wrap a {
  color: inherit;
}

.blog-wrap .post-card-title a,
.blog-wrap .post-card-title a:visited,
.blog-post-wrap .post-title {
  color: #111827;
}

.blog-wrap .post-card-excerpt,
.blog-wrap .post-card-meta,
.blog-post-wrap .post-lead {
  color: #4B5563;
}

.blog-wrap { }

.blog-hero {
  background: linear-gradient(135deg, #F9FAFB 0%, #EFF6FF 100%);
  padding: 3rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  /* Theme-Isolation: heller Hintergrund → immer dunkler Text */
  color: #111827;
}

.blog-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #111827;
}

.blog-hero-subtitle {
  color: #6B7280;
  margin-top: .5rem;
  font-size: 1.1rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.blog-main { min-width: 0; }

.blog-sidebar { }

.blog-search {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.blog-search .form-input { flex: 1; }

/* Post-Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Post-Karte */
.post-card {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  /* Theme-Isolation: weiße Karte → immer dunkler Text */
  color: #111827;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card--featured {
  grid-column: 1 / -1;
}

.post-card-img-wrap {
  display: block;
  overflow: hidden;
  position: relative;
}

.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform .3s ease;
}

.post-card-img-wrap:hover .post-card-img {
  transform: scale(1.04);
}

.post-card-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--color-accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2em .65em;
  border-radius: 9999px;
  z-index: 1;
}

/* Placeholder Cover */
.post-card__cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #E5E7EB;
  display: block;
}

.post-card__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
}

.post-card-body {
  padding: 1.25rem;
}

.post-card-cats {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
  margin-bottom: .625rem;
}

.post-cat-badge {
  background: #EFF6FF;
  color: var(--color-primary);
  font-size: .75rem;
  font-weight: 600;
  padding: .2em .65em;
  border-radius: 9999px;
  text-decoration: none;
  transition: background var(--transition);
}

.post-cat-badge:hover {
  background: var(--color-primary);
  color: #fff;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.35;
}

.post-card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: .75rem;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #F3F4F6;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.post-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.meta-sep { opacity: .4; }

.post-read-link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.post-read-link:hover { text-decoration: underline; }

/* Ältere Klassen (Kompatibilität) */
.post-card__body { padding: 1.25rem; }
.post-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.post-card__title a { color: var(--color-text); text-decoration: none; }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__meta { font-size: .8rem; color: var(--color-text-muted); }
.post-card__excerpt { font-size: .9rem; color: var(--color-text-muted); margin: .5rem 0; line-height: 1.5; }
.post-card__readmore { display: inline-block; margin-top: .75rem; font-size: .85rem; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.post-card__readmore:hover { text-decoration: underline; }
.post-card__cover--placeholder { display: block; }

/* Blog-Einzelartikel */
.blog-post-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--color-border); margin-bottom: 2rem; }
.blog-post-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.blog-post-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; color: var(--color-text-muted); font-size: .875rem; }
.blog-post-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--border-radius); margin-bottom: 2rem; }


/* ============================================================
   22. MODUL — Courses (Public)
   ============================================================ */

/* Kurs-Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Kurs-Karte */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.course-card__cover-link {
  display: block;
  overflow: hidden;
}

.course-card__cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #E5E7EB;
  display: block;
  transition: transform .3s ease;
}

.course-card__cover-link:hover .course-card__cover {
  transform: scale(1.04);
}

.course-card__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
}

.course-card__body { padding: 1.25rem; }

.course-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.35;
}

.course-card__title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.course-card__title a:hover { color: var(--color-primary); }

.course-card__description,
.course-card__desc {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #F3F4F6;
}

.course-card__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.course-card__price--free {
  color: var(--color-success);
}

/* Kurs-Detail */
.course-detail-hero {
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  color: #fff;
  padding: 4rem 0;
}

.course-detail-hero h1 { color: #fff; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state__icon {
  color: var(--color-border);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.empty-state__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.empty-state__text {
  color: var(--color-text-muted);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Fortschrittsbalken */
.progress-bar {
  background: #E5E7EB;
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar__fill {
  background: var(--color-primary);
  height: 100%;
  border-radius: 9999px;
  transition: width .3s ease;
}

/* Video-Embed */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* ============================================================
   23. MODUL — Learn Interface
   ============================================================ */

.learn-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.learn-sidebar {
  background: #F9FAFB;
  color: #374151;
  border-right: 1px solid #E5E7EB;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #6B7280;
  cursor: pointer;
  padding: .75rem 1rem;
  align-self: flex-end;
  transition: color var(--transition);
}

.sidebar-close:hover { color: #111827; }

.sidebar-course-title {
  padding: 1.25rem;
  border-bottom: 1px solid #E5E7EB;
}

.sidebar-course-link {
  color: #6B7280;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  transition: color var(--transition);
  display: block;
}

.sidebar-course-link:hover { color: #111827; }

.sidebar-progress {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #E5E7EB;
}

.progress-text {
  font-size: .75rem;
  color: #6B7280;
  margin-top: .5rem;
  display: block;
}

.sidebar-curriculum {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0;
}

.sidebar-section { }

.sidebar-section__title {
  padding: .75rem 1.25rem .25rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #9CA3AF;
  font-weight: 700;
}

.sidebar-lessons { }

.sidebar-lesson { }

.sidebar-lesson__link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem 1.25rem;
  text-decoration: none;
  color: #4B5563;
  font-size: .875rem;
  transition: background var(--transition), color var(--transition);
}

.sidebar-lesson__link:hover {
  background: #E5E7EB;
  color: #111827;
}

.sidebar-lesson--current .sidebar-lesson__link {
  background: #EEF2FF;
  color: var(--color-primary);
  font-weight: 600;
}

.sidebar-lesson--done .sidebar-lesson__link {
  color: #059669;
}

.sidebar-lesson__icon { flex-shrink: 0; }
.sidebar-lesson__title { flex: 1; line-height: 1.4; }

/* Learn Content */
.learn-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 860px;
}

.learn-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.learn-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: .375rem .625rem;
  cursor: pointer;
  color: var(--color-text);
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  gap: 1rem;
}

/* Ältere Klassen (Kompatibilität) */
.lesson-layout { display: flex; min-height: 100vh; }
.lesson-sidebar { width: 300px; background: #1F2937; color: #D1D5DB; overflow-y: auto; flex-shrink: 0; }
.lesson-sidebar__title { padding: 1.25rem; font-weight: 700; color: #F9FAFB; border-bottom: 1px solid #374151; }
.lesson-sidebar__section { padding: .75rem 1.25rem .25rem; font-size: .75rem; text-transform: uppercase; color: #6B7280; font-weight: 600; }
.lesson-sidebar__lesson { display: flex; align-items: center; gap: .5rem; padding: .5rem 1.25rem; font-size: .875rem; color: #9CA3AF; cursor: pointer; }
.lesson-sidebar__lesson.active { color: #F9FAFB; background: #374151; }
.lesson-sidebar__lesson.completed { color: #34D399; }
.lesson-content { flex: 1; padding: 2rem; overflow-y: auto; max-width: 800px; }


/* ============================================================
   24. RESPONSIVE (Mobile-First Breakpoints)
   ============================================================ */

/* Issue 1: Nav-Utility-Klassen für Mobile/Desktop-Sichtbarkeit */
.nav__mobile-only { display: none; }

/* Issue 13: Tickets/Admin-Links im Dropdown hervorheben */
.nav__links .nav__highlight-link {
  font-weight: 700;
  color: var(--color-secondary, #10B981) !important;
}

/* ── lg: ≤ 1024px ── */
@media (max-width: 1024px) {

  /* Issue 12: Tablet bekommt auch das Mobile-Dropdown-Menü */
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: .75rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .nav__links.open {
    display: flex;
  }
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav__desktop-only { display: none !important; }
  .nav__mobile-only  { display: list-item; }

  /* Issue 14: Blog-Hero Tablet Padding */
  .blog-hero {
    padding: 2.5rem 1.25rem;
  }
  /* Blog-Layout auf Tablet einspaltig */
  .blog-layout {
    grid-template-columns: 1fr;
  }
  /* Issue 4: Blog-Layout seitlicher Rand auf Tablet */
  .blog-layout.container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  /* Blog-Sidebar auf Tablet ausblenden */
  .blog-sidebar {
    display: none;
  }

  /* Learn Interface: Sidebar als Overlay */
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .learn-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 300;
    transition: left .25s ease;
    width: 280px;
  }

  .learn-sidebar.open {
    left: 0;
  }

  .sidebar-close {
    display: flex;
  }

  .learn-toggle {
    display: flex;
    align-items: center;
    gap: .375rem;
  }

  /* Issue 3: Image-Text — Gap auf Tablet reduzieren (bleibt zweispaltig) */
  .image-text {
    gap: 1.5rem;
  }

}

/* ── md: ≤ 768px ── */
@media (max-width: 768px) {

  /* Navigation: Mobile */
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: .75rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Issue 1: Admin/Tickets-Buttons auf Mobile im Dropdown anzeigen,
     im nav__actions ausblenden */
  .nav__desktop-only { display: none !important; }
  .nav__mobile-only  { display: list-item; }

  .site-header {
    position: sticky;
    top: 0;
  }

  /* Issue 14: Blog — seitliches Padding auf Mobile */
  .blog-wrap {
    overflow-x: hidden;
  }
  .blog-layout.container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Blog: einspaltig */
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .post-card--featured {
    grid-template-columns: 1fr;
  }

  /* Lesson Sidebar (alt) */
  .lesson-sidebar {
    display: none;
  }

  .lesson-sidebar.open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    width: 280px;
  }

  /* KPI Grid: 2 Spalten */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero { padding: 3rem 0; }
  .section--hero { padding: 3rem 0; }

  /* CTA */
  .section--cta-outline-box .cta-inner {
    padding: 2rem 1.5rem;
  }

  /* Issue 3: Image-Text — Gap auf Mobile reduzieren (bleibt zweispaltig) */
  .image-text {
    gap: 1rem;
  }

  /* Issue 4: Blog-Hero Mobile Padding */
  .blog-hero {
    padding: 2rem 1rem;
  }

  /* Issue 9: Media-Explorer Sidebar stapeln */
  .media-explorer {
    flex-direction: column;
  }
  .media-folder-sidebar {
    width: 100%;
  }
}

/* ── sm: ≤ 480px ── */
@media (max-width: 480px) {

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .hero__title { font-size: 1.75rem; }
  .hero-headline { font-size: 1.75rem; }

  .auth-card { padding: 1.5rem; }

  .nav { padding: .875rem 1rem; gap: 1rem; }

  .btn--lg { padding: .875rem 1.75rem; font-size: 1rem; }

  .features-grid--cols-2,
  .features-grid--cols-3,
  .features-grid--cols-4 {
    grid-template-columns: 1fr;
  }

  .courses-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   25. AUTH — Erweiterte Zustände (check-email, login-error)
   ============================================================ */

.auth-card--success { border-top: 4px solid var(--color-success); }
.auth-card--error   { border-top: 4px solid var(--color-danger); }

.auth-icon-wrapper {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.auth-icon--success { background: #D1FAE5; color: var(--color-success); }
.auth-icon--error   { background: #FEE2E2; color: var(--color-danger); }

.auth-email-highlight { color: var(--color-primary); font-weight: 600; }

.info-box {
  background: #F9FAFB;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin: 1rem 0;
}

.info-box--warning {
  background: #FEF3C7;
  border-color: #FCD34D;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  line-height: 1.5;
}

.info-list svg { flex-shrink: 0; margin-top: .1rem; color: var(--color-success); }

.countdown-wrapper {
  margin: 1rem 0;
}

.countdown-text {
  font-size: .875rem;
  color: var(--color-text-muted);
  margin-bottom: .5rem;
}

.countdown-timer {
  font-weight: 700;
  color: var(--color-success);
  font-variant-numeric: tabular-nums;
}

.countdown-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 9999px;
  overflow: hidden;
}

.countdown-bar-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: 9999px;
  transition: width 1s linear, background-color .5s;
  width: 100%;
}

.auth-divider {
  text-align: center;
  color: var(--color-text-muted);
  font-size: .875rem;
  margin: 1.25rem 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--color-border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-actions-secondary { margin-top: 1rem; }

.auth-hint {
  font-size: .875rem;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
  line-height: 1.5;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .8rem;
  color: var(--color-text-muted);
}

.auth-footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.auth-footer-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.auth-help {
  text-align: center;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--color-text-muted);
}

.auth-help a {
  color: var(--color-primary);
  text-decoration: none;
}

.auth-help a:hover { text-decoration: underline; }


/* ============================================================
   26. BLOG — Post-Detail-Seite
   ============================================================ */

.blog-post-wrap { }

.post-header {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.post-cats {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.post-author-name {
  font-weight: 600;
  font-size: .9rem;
  display: block;
  color: #111827;
}

.post-meta-sub {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.post-share {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #E5E7EB;
  color: #374151;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  background: none;
  font-family: inherit;
}

.share-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.post-cover {
  margin-bottom: 2rem;
}

/* FIX Bug 9: Coverbild volle Breite — kein Container-Padding, kein max-width */
.post-cover--full {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

.post-cover-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* Volle Breite: kein border-radius, kein max-width */
.post-cover-img--full {
  border-radius: 0;
  max-width: none;
  display: block;
}

.post-content-wrap {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.post-content { }

.post-tags {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.post-tags-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: .25em .75em;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 500;
  background: #F3F4F6;
  color: #374151;
  text-decoration: none;
  border: 1px solid #E5E7EB;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.tag-pill:hover,
.tag-pill.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.post-author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #F9FAFB;
  border-radius: var(--border-radius);
  border: 1px solid #E5E7EB;
  margin-top: 2rem;
  /* Theme-Isolation */
  color: #111827;
}

.author-box-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-label {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: .25rem;
}

.author-box-name {
  font-weight: 700;
  font-size: 1rem;
}

.related-posts {
  padding: 3rem 0;
  background: #F9FAFB;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.post-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.post-card-title--sm {
  font-size: .95rem;
}

.post-card-date {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-top: .375rem;
  display: block;
}


/* ============================================================
   27. BLOG — Sidebar-Widgets & Pagination
   ============================================================ */

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  /* Theme-Isolation: weiße Sidebar → immer dunkler Text */
  color: #111827;
}

.sidebar-widget-title {
  font-size: .9rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: .875rem;
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.sidebar-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .625rem;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: #374151;
  font-size: .875rem;
  transition: background var(--transition), color var(--transition);
}

.sidebar-list-item:hover,
.sidebar-list-item.active {
  background: #EEF2FF;
  color: var(--color-primary);
}

.sidebar-count {
  font-size: .75rem;
  color: var(--color-text-muted);
  background: #F3F4F6;
  padding: .1em .5em;
  border-radius: 9999px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}

.rss-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: #F97316;
  text-decoration: none;
  font-weight: 600;
}

.rss-link:hover { text-decoration: underline; }

.blog-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: var(--color-text);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pagination-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination-info {
  font-size: .875rem;
  color: var(--color-text-muted);
}


/* ============================================================
   28. PAYMENT — Checkout-Success
   ============================================================ */

.checkout-success-page {
  max-width: 560px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.checkout-success-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.checkout-success-banner__icon {
  color: var(--color-success);
  flex-shrink: 0;
}

.checkout-success-banner__content { }

.checkout-success-banner__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #065F46;
  margin-bottom: .25rem;
}

.checkout-success-banner__subtitle {
  color: #065F46;
  font-size: .9rem;
}

.checkout-success-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.checkout-success-card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: #F9FAFB;
}

.checkout-success-card__title {
  font-size: .9rem;
  font-weight: 700;
}

.checkout-success-card__body {
  padding: 1.25rem;
}

.checkout-success-card__footer {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.checkout-success-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .625rem 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: .875rem;
}

.checkout-success-detail:last-child { border-bottom: none; }

.checkout-success-detail__label { color: var(--color-text-muted); }

.checkout-success-detail__value { font-weight: 600; }

.checkout-success-detail__value--course { color: var(--color-primary); }

.checkout-success-cta { flex: 1; }


/* ============================================================
   29. COURSES — Course-Detail (Hero, Curriculum, CTA-Box)
   Inline-Styles aus course-detail.hbs extrahiert
   ============================================================ */

.container--md {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.course-hero {
  background: #F9FAFB;
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0;
}

.course-hero__inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.course-hero__content { }

.course-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.course-hero__desc {
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.course-hero__meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .9rem;
  color: var(--color-text-muted);
}

.course-hero__cta {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.course-hero__price {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.price-label {
  color: var(--color-text-muted);
  font-size: .9rem;
}

.price-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.price-amount--free { color: var(--color-success); }

.course-hero__cover {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.course-hero__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Curriculum */
.course-curriculum { padding: 4rem 0; }

.curriculum-list {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.curriculum-section {
  border-bottom: 1px solid var(--color-border);
}

.curriculum-section:last-child { border-bottom: none; }

.curriculum-section__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #F9FAFB;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
  font-family: inherit;
  font-size: .9rem;
}

.curriculum-section__header:hover { background: #F3F4F6; }

.curriculum-section__title {
  font-weight: 600;
  flex: 1;
}

.curriculum-section__meta {
  font-size: .85rem;
  color: var(--color-text-muted);
}

.curriculum-section__chevron {
  transition: transform .2s;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.curriculum-section__header[aria-expanded="false"] .curriculum-section__chevron {
  transform: rotate(-90deg);
}

.curriculum-lessons {
  list-style: none;
}

/* [hidden] wird global im Reset abgedeckt */

.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  border-top: 1px solid #F3F4F6;
  font-size: .9rem;
}

.lesson-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.lesson-icon--preview { color: var(--color-primary); }
.lesson-icon--locked  { color: var(--color-text-muted); }

.lesson-title {
  flex: 1;
  color: var(--color-text);
}

.lesson-title--preview {
  color: var(--color-primary);
  text-decoration: none;
}

.lesson-title--preview:hover { text-decoration: underline; }

.preview-badge {
  font-size: .75rem;
  background: #EEF2FF;
  color: var(--color-primary);
  padding: .15em .5em;
  border-radius: 4px;
  margin-left: .375rem;
}

.lesson-duration {
  font-size: .8rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* CTA-Box (unten) */
.course-cta-bottom {
  padding: 3rem 0;
  background: #F9FAFB;
  border-top: 1px solid var(--color-border);
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-box__text { }

.cta-box__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .375rem;
}

.cta-box__desc {
  color: var(--color-text-muted);
}

.cta-box__action {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cta-box__price strong {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Learn-Interface — Ergänzungen (Inline-Styles aus lesson.hbs) */
.learn-main {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  color: #111827;
}

.learn-topbar {
  display: none;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.learn-topbar__title {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.learn-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
  background: var(--color-bg, #ffffff);
  color: var(--color-text, #1F2937);
}

/* Learn interface: main area uses theme colors */
.learn-main,
.learn-main .learn-content,
.learn-main .lesson-header,
.learn-main .lesson-title,
.learn-main .lesson-text-content,
.learn-main .lesson-navigation,
.learn-main .lesson-downloads {
  background-color: var(--color-bg, #ffffff);
  color: var(--color-text, #1F2937);
}

/* ── Eingebettetes Video (iframe) ────────────────────────── */
.lesson-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #000;
}

.lesson-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Custom Video Player (.cvp) ──────────────────────────── */
.cvp {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  user-select: none;
}

/* Vertikales Video */
.cvp--vertical {
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}

/* Lade-Spinner */
.cvp__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: #9CA3AF;
  font-size: .875rem;
  background: #111;
  z-index: 2;
}

/* Video-Element */
.cvp__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Tap-Overlay (unsichtbare Klick-Fläche über dem Video) */
.cvp__tap-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flash-Icon bei Tap */
.cvp__tap-icon {
  font-size: 3rem;
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.cvp__tap-overlay--show .cvp__tap-icon {
  animation: cvpTapFade .6s forwards;
}

@keyframes cvpTapFade {
  0%   { opacity: 1; transform: scale(1.1); }
  60%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.9); }
}

/* Controls-Leiste */
.cvp__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 2rem .75rem .5rem;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

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

/* Progress-Bar */
.cvp__progress {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: height .15s;
}

.cvp__progress:hover { height: 6px; }

.cvp__progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--color-primary, #4F46E5);
  border-radius: 2px;
  pointer-events: none;
  width: 0;
}

.cvp__progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  transition: transform .15s;
  left: 0;
}

.cvp__progress:hover .cvp__progress-thumb { transform: translate(-50%, -50%) scale(1); }

/* Controls-Bar */
.cvp__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.cvp__bar-left,
.cvp__bar-right {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Buttons */
.cvp__btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: .375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .15s;
  flex-shrink: 0;
}

.cvp__btn:hover { background: rgba(255,255,255,.15); }

/* Zeit-Anzeige */
.cvp__time {
  font-size: .75rem;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  padding: 0 .25rem;
  font-variant-numeric: tabular-nums;
}

/* Lautstärke-Slider */
.cvp__volume {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.cvp__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.cvp__volume::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

/* Spin-Animation (Lade-Spinner) */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Lesson Header */
.lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.lesson-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.lesson-duration-badge {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.lesson-text-content { margin-bottom: 2.5rem; }

/* Lesson Navigation */
.lesson-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.lesson-nav__prev { flex: 1; }
.lesson-nav__next { flex: 1; text-align: right; }
.lesson-nav__complete { flex-shrink: 0; }

/* Completion Banner */
.completion-banner {
  background: #ECFDF5;
  border: 1px solid var(--color-success);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.completion-banner__icon  { font-size: 3rem; margin-bottom: .75rem; }
.completion-banner__title { font-size: 1.5rem; font-weight: 700; color: #065F46; margin-bottom: .5rem; }
.completion-banner__text  { color: #065F46; margin-bottom: 1.25rem; }

/* btn--success (global) */
.btn--success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.btn--success:hover:not(:disabled) { opacity: .88; }

/* ── Materialien / Downloads ─────────────────────────────── */
.lesson-downloads {
  margin: 2rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.lesson-downloads__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.25rem;
  font-size: .9rem;
  font-weight: 700;
  background: #F9FAFB;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  margin: 0;
}

.lesson-downloads__list {
  list-style: none;
  padding: .375rem 0;
}

.lesson-download-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem 1.25rem;
  color: var(--color-text-muted);
  transition: background var(--transition);
}

.lesson-download-item:hover {
  background: #F3F4F6;
}

.lesson-download-item svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.lesson-download-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
  font-size: .9rem;
  font-family: inherit;
  text-align: left;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.lesson-download-btn:hover {
  color: var(--color-text);
}



/* Sidebar-Toggle: beide Klassen unterstützen */
.learn-sidebar.is-open { left: 0; }

/* Responsive Ergänzungen für Learn */
@media (max-width: 1024px) {
  .course-hero__inner { grid-template-columns: 1fr; }
  .cta-box { flex-direction: column; align-items: flex-start; }

  /* Sidebar auf Tablet als Overlay (wie Mobile) */
  .learn-topbar { display: flex; }
  .learn-content { padding: 1.5rem 1.25rem 4rem; }
}

@media (max-width: 768px) {
  .learn-content { padding: 1.5rem 1rem 4rem; }
  .lesson-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .checkout-success-page { margin: 2rem auto; }
  .checkout-success-banner { flex-direction: column; text-align: center; }
}


/* ============================================================
   SECTION — Overlay & Hintergrundbild (alle Section-Typen)
   ============================================================ */

/* Sections mit Hintergrundbild brauchen position:relative für das Overlay */
.section--has-overlay {
  position: relative;
}

/* Inhalt über dem Overlay (z-index:1 wird inline gesetzt, hier als Fallback) */
.section--has-overlay > .container {
  position: relative;
  z-index: 1;
}

/* Textfarbe bei Hintergrundbild-Sections auf hell setzen */
.section--has-overlay .section-title,
.section--has-overlay .section-subtitle,
.section--has-overlay .cta-headline,
.section--has-overlay .cta-subheadline,
.section--has-overlay h2,
.section--has-overlay h3,
.section--has-overlay p {
  color: #fff;
}

/* CTA-Block mit Hintergrundbild */
.section--cta-image {
  padding: 4rem 0;
  color: #fff;
}

.section--cta-image .cta-headline,
.section--cta-image .cta-subheadline {
  color: #fff;
}

/* BUG-6 Fix: Gradient-CTA h2 explizit weiß (Fallback für generische h2-Elemente) */
.section--cta-gradient h2,
.section--cta-gradient h3,
.section--cta-solid h2,
.section--cta-solid h3 {
  color: #fff;
}


/* ============================================================
   MEDIA-MODUL — Detail-Panel, Tabellen-Ansicht, Ordner-Sidebar
   ============================================================ */

/* ── Media-Explorer Layout ─────────────────────────────────── */
.media-explorer {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.media-explorer__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* ── Ordner-Sidebar ────────────────────────────────────────── */
.media-folder-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px;
  color: #111827;
}

.media-folder-sidebar__title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  position: relative;
}

.folder-item__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-size: .875rem;
  color: #111827;  /* fix — schwarz auf weißem Sidebar-Hintergrund */
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background var(--transition);
}

.folder-item__link:hover { background: #F3F4F6; }
.folder-item__link--active {
  background: var(--color-primary, #4F46E5);
  color: #fff;
}

.folder-item__actions {
  display: none;
  gap: 2px;
  flex-shrink: 0;
  padding-right: 4px;
}

.folder-item:hover .folder-item__actions { display: flex; }

.folder-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: .75rem;
  color: var(--color-text-muted, #6B7280);
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}

.folder-action-btn:hover { background: #F3F4F6; color: #1F2937; }
.folder-action-btn--danger:hover { background: #FEE2E2; color: #DC2626; }

.folder-item__input {
  flex: 1;
  font-size: .875rem;
  padding: 4px 8px;
  border: 1px solid var(--color-primary, #4F46E5);
  border-radius: 6px;
  outline: none;
  background: #fff;
}

.folder-sidebar__footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #E5E7EB);
}

/* ── Detail-Panel ──────────────────────────────────────────── */
.media-detail-panel {
  width: 280px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  color: #111827;
}

.media-detail-panel--open { display: flex; }

.media-detail-preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-surface-3, #F3F4F6);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-detail-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-detail-preview__icon {
  font-size: 2.5rem;
  color: var(--color-text-muted, #6B7280);
}

.media-detail-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text, #1F2937);
  margin: 0;
  word-break: break-all;
}

.media-detail-meta {
  font-size: .75rem;
  color: var(--color-text-muted, #6B7280);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-detail-field label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.media-detail-field input,
.media-detail-field select {
  font-size: .8125rem;
  padding: 5px 8px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text, #1F2937);
  width: 100%;
}

.media-detail-field input:focus,
.media-detail-field select:focus {
  outline: none;
  border-color: var(--color-primary, #4F46E5);
}

.media-detail-url {
  display: flex;
  gap: 6px;
  align-items: center;
}

.media-detail-url input {
  flex: 1;
  font-size: .75rem;
  font-family: monospace;
  background: var(--color-surface-3, #F3F4F6);
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--color-text-muted, #6B7280);
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #E5E7EB);
}

.media-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text-muted, #6B7280);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}

.media-detail-close:hover { background: var(--color-surface-3, #F3F4F6); }

/* ── Tabellen-Ansicht ──────────────────────────────────────── */
.media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.media-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--color-border, #E5E7EB);
  white-space: nowrap;
}

.media-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.media-table th.sortable:hover { color: var(--color-primary, #4F46E5); }
.media-table th.sort-active { color: var(--color-primary, #4F46E5); }

.media-table th.sort-asc::after  { content: ' ↑'; }
.media-table th.sort-desc::after { content: ' ↓'; }

.media-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  vertical-align: middle;
}

.media-table tr:hover td { background: #F9FAFB; }

.media-table__thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.media-table__thumb-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-3, #F3F4F6);
  border-radius: 4px;
  font-size: 1.25rem;
}

.media-table__name {
  font-weight: 500;
  color: #1F2937;  /* fix — nicht var(--color-text) da Admin-Theme dark sein kann */
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-table__name-input {
  font-size: .875rem;
  padding: 3px 6px;
  border: 1px solid var(--color-primary, #4F46E5);
  border-radius: 4px;
  width: 100%;
  max-width: 240px;
}

.media-table__actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ── Inline-Rename im Grid ─────────────────────────────────── */
.media-item__name-input {
  font-size: .8125rem;
  padding: 2px 6px;
  border: 1px solid var(--color-primary, #4F46E5);
  border-radius: 4px;
  width: 100%;
  background: #fff;
}

/* ── Media-Item: aktiv/ausgewählt ──────────────────────────── */
.media-item--selected {
  outline: 2px solid var(--color-primary, #4F46E5);
  outline-offset: 2px;
}

/* ── View-Toggle Buttons ───────────────────────────────────── */
.view-btn {
  padding: 5px 10px;
  border: 1px solid var(--color-border, #E5E7EB);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8125rem;
  color: var(--color-text-muted, #6B7280);
  transition: background var(--transition), color var(--transition);
}

.view-btn.active,
.view-btn:hover {
  background: var(--color-primary, #4F46E5);
  color: #fff;
  border-color: var(--color-primary, #4F46E5);
}

/* Kurs-Titel immer dunkel */
.course-hero__title,
.course-card__title,
.course-card__title a,
.my-courses-section h1,
.my-courses-section .page-title,
.my-course-card__title,
.my-course-card__title a {
  color: var(--color-text, #111827) !important;
}


/* ============================================================
   25. MODUL — Tickets (Public)
   ============================================================ */

/* ── Page Layout ─────────────────────────────────────────── */

.tickets-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.tickets-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tickets-page__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 .25rem;
}

.tickets-page__subtitle {
  color: var(--color-text-muted);
  margin: 0;
  font-size: .9375rem;
}

/* ── Status & Priority Badges ────────────────────────────── */

.ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

.ticket-badge--lg {
  font-size: .875rem;
  padding: .3rem .9rem;
}

/* Status */
.ticket-badge--open        { background: #DBEAFE; color: #1D4ED8; }
.ticket-badge--in_progress { background: #FEF3C7; color: #92400E; }
.ticket-badge--waiting     { background: #EDE9FE; color: #5B21B6; }
.ticket-badge--resolved    { background: #D1FAE5; color: #065F46; }
.ticket-badge--closed      { background: #F3F4F6; color: #6B7280; }

/* Priority */
.ticket-badge--priority-low    { background: #F3F4F6; color: #6B7280; }
.ticket-badge--priority-normal { background: #EFF6FF; color: #3B82F6; }
.ticket-badge--priority-high   { background: #FEF3C7; color: #B45309; }
.ticket-badge--priority-urgent { background: #FEE2E2; color: #B91C1C; }

/* ── Ticket List ─────────────────────────────────────────── */

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
}

.ticket-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--border-radius, 8px);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.ticket-card:hover {
  border-color: var(--color-primary, #4F46E5);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ticket-card__main {
  flex: 1;
  min-width: 0;
}

.ticket-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .4rem;
}

.ticket-card__number {
  font-size: .75rem;
  font-family: ui-monospace, monospace;
  background: var(--color-surface-3, #F3F4F6);
  color: var(--color-text-muted);
  padding: .1rem .45rem;
  border-radius: 4px;
}

.ticket-card__subject {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-card__category {
  font-size: .8125rem;
  color: var(--color-text-muted);
  margin: 0;
}

.ticket-card__aside {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.ticket-card__date {
  font-size: .8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ticket-card__arrow {
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.ticket-card:hover .ticket-card__arrow {
  transform: translateX(3px);
  color: var(--color-primary);
}

/* ── Empty State ─────────────────────────────────────────── */

.tickets-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-surface-2, #F9FAFB);
  border: 1px dashed var(--color-border, #E5E7EB);
  border-radius: var(--border-radius-lg, 16px);
}

.tickets-empty__icon {
  color: var(--color-border);
  margin-bottom: 1.25rem;
}

.tickets-empty__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  color: var(--color-text);
}

.tickets-empty__text {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ── New Ticket Form ─────────────────────────────────────── */

.ticket-form-wrap {
  max-width: 680px;
}

.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ticket-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .ticket-form__row { grid-template-columns: 1fr; }
}

.ticket-form__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: .5rem;
}

.form-required {
  color: var(--color-danger, #EF4444);
}

.form-hint {
  font-size: .8125rem;
  color: var(--color-text-muted);
  margin: .375rem 0 0;
}

/* ── TipTap Public Editor ────────────────────────────────── */

.tiptap-wrapper {
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--border-radius, 8px);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tiptap-wrapper:focus-within {
  border-color: var(--color-primary, #4F46E5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.tiptap-public-editor {
  min-height: 180px;
  padding: .875rem 1rem;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--color-text);
  outline: none;
  cursor: text;
}

.tiptap-public-editor .tiptap {
  outline: none;
  min-height: 160px;
}

.tiptap-public-editor p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: var(--color-text-muted, #9CA3AF);
  pointer-events: none;
  float: left;
  height: 0;
}

/* ── Ticket Detail ───────────────────────────────────────── */

.ticket-detail__breadcrumb {
  margin-bottom: .375rem;
}

.ticket-detail__back {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.ticket-detail__back:hover {
  color: var(--color-primary);
}

.ticket-detail__number {
  font-size: .8125rem;
  font-family: ui-monospace, monospace;
  background: var(--color-surface-3, #F3F4F6);
  color: var(--color-text-muted);
  padding: .15rem .5rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: .25rem;
}

.ticket-detail__status-wrap {
  flex-shrink: 0;
  padding-top: .5rem;
}

/* ── Meta Bar ────────────────────────────────────────────── */

.ticket-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: .875rem 1.25rem;
  margin-bottom: 1.75rem;
}

.ticket-meta-bar__item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.ticket-meta-bar__label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
}

.ticket-meta-bar__value {
  font-size: .9375rem;
  color: var(--color-text);
}

/* ── Message Thread ──────────────────────────────────────── */

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.ticket-msg {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
}

.ticket-msg--staff {
  flex-direction: row-reverse;
}

.ticket-msg__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-msg--user .ticket-msg__avatar {
  background: var(--color-surface-3, #F3F4F6);
  color: var(--color-text-muted);
}

.ticket-msg--staff .ticket-msg__avatar {
  background: var(--color-primary, #4F46E5);
  color: #fff;
}

.ticket-msg__bubble {
  flex: 1;
  min-width: 0;
  max-width: 85%;
}

.ticket-msg__header {
  display: flex;
  align-items: baseline;
  gap: .625rem;
  margin-bottom: .375rem;
}

.ticket-msg--staff .ticket-msg__header {
  flex-direction: row-reverse;
}

.ticket-msg__author {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

.ticket-msg__time {
  font-size: .75rem;
  color: var(--color-text-muted);
}

.ticket-msg__body {
  background: var(--color-surface-2, #F9FAFB);
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--border-radius, 8px);
  padding: .875rem 1rem;
  font-size: .9375rem;
  line-height: 1.7;
}

.ticket-msg--staff .ticket-msg__body {
  background: #EEF2FF;
  border-color: #C7D2FE;
}

/* ── Reply Form ──────────────────────────────────────────── */

.ticket-reply {
  margin-top: .5rem;
}

.ticket-reply__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.ticket-reply__actions {
  margin-top: .875rem;
}

/* ── Closed / Resolved Notice ────────────────────────────── */

.ticket-closed-notice,
.ticket-resolved-notice {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .875rem 1.125rem;
  border-radius: var(--border-radius, 8px);
  font-size: .9375rem;
  margin-top: 1.5rem;
}

.ticket-closed-notice {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}

.ticket-resolved-notice {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .tickets-page__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-detail__status-wrap {
    padding-top: 0;
  }

  .ticket-msg__bubble {
    max-width: 100%;
  }

  .ticket-meta-bar {
    gap: 1rem;
  }
}
