/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Ausbilden24 LMS â€“ Hauptstylesheet
   Farben: primary #1e3c6e  accent #e8601a
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
:root {
  --primary:    #1e3c6e;
  --primary-dk: #152d52;
  --accent:     #e8601a;
  --accent-dk:  #c44e12;
  --bg:         #f0f4f8;
  --card:       #ffffff;
  --text:       #1a2535;
  --muted:      #6b7a8d;
  --success:    #27ae60;
  --success-bg: #d4edda;
  --danger:     #e74c3c;
  --danger-bg:  #fde8e6;
  --warn:       #f39c12;
  --warn-bg:    #fff3cd;
  --border:     #dde3ec;
  --radius:     10px;
  --shadow:     0 2px 10px rgba(0,0,0,0.07);
}

/* â”€â”€ Dark Mode â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
[data-theme="dark"] {
  --bg:      #0f1117;
  --card:    #1a1f2e;
  --text:    #e2e8f0;
  --muted:   #8896a7;
  --border:  #2d3748;
  --shadow:  0 2px 10px rgba(0,0,0,0.35);
  --success-bg: #1a3328;
  --danger-bg:  #3b1a1a;
  --warn-bg:    #3b2e0e;
}
[data-theme="dark"] .site-header       { background: #1a1f2e; }
[data-theme="dark"] .user-dropdown     { background: #1a1f2e; }
[data-theme="dark"] .main-nav          { background: #1a1f2e; }
[data-theme="dark"] .nav-mobile-controls { border-top-color: #2d3748; }
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active   { background: #252d40; }
[data-theme="dark"] .form-control      { background: #252d40; color: var(--text); border-color: var(--border); }
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"] { color-scheme: dark; }
[data-theme="dark"] .form-control:disabled { background: #1a1f2e; }
[data-theme="dark"] .login-card        { background: #1a1f2e; }
[data-theme="dark"] .q-card,
[data-theme="dark"] .res-card,
[data-theme="dark"] .fg-done-card      { background: #1a1f2e; }
[data-theme="dark"] .data-table        { background: #1a1f2e; }
[data-theme="dark"] .data-table th     { background: #152d52; }
[data-theme="dark"] .data-table tr:hover td { background: #222836; }
[data-theme="dark"] .dash-section-head { background: #222836; }
[data-theme="dark"] .ans:hover:not(.locked) { background: #252d40; }
[data-theme="dark"] .ans.sel           { background: #1e2d4a; }
[data-theme="dark"] .ans.ok            { background: #1a3328; color: var(--text); }
[data-theme="dark"] .ans.miss          { background: #112b1c; color: var(--text); }
[data-theme="dark"] .ans.bad           { background: var(--danger-bg); color: var(--text); }
[data-theme="dark"] .rev-ans.ok        { background: #1a3328; color: var(--text); }
[data-theme="dark"] .rev-ans.miss      { background: #112b1c; color: var(--text); }
[data-theme="dark"] .rev-ans.bad       { background: var(--danger-bg); color: var(--text); }
[data-theme="dark"] .rev-ans.skip      { background: #1e2233; color: var(--text); }
[data-theme="dark"] .model-box         { background: #1e2d4a; }
[data-theme="dark"] .wiki-card         { background: #1a1f2e; }
[data-theme="dark"] .certificate-frame { background: #1a1f2e; }
[data-theme="dark"] .cert-inner        { background: linear-gradient(160deg,#1a1f2e,#1e2a3e); }
[data-theme="dark"] .fg-textarea       { background: #252d40; color: var(--text); }
[data-theme="dark"] .fg-rev-model      { background: #1e2d4a; }
[data-theme="dark"] .fg-rev-user       { background: #252d40; }
[data-theme="dark"] .user-dropdown a:hover { background: #252d40; }
[data-theme="dark"] .method-card       { background: #1a1f2e; color: var(--text); }
[data-theme="dark"] select.form-control option { background: #1a1f2e; }

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; height: auto; }

/* â”€â”€ Header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  padding: 10px 20px 10px 0;
  display: flex;
  align-items: center;
}

.logo { height: 44px; display: block; }
.logo-link {
  flex-shrink: 0;
  width: 270px;
  padding-left: 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  align-items: center;
}

.nav-link {
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--bg); color: var(--primary); text-decoration: none; }
.nav-link.active { font-weight: 700; }
.nav-cert  { color: var(--accent); font-weight: 700; }
.nav-admin { color: var(--danger); }

.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-left: 16px; }

.lang-form { display: flex; align-self: stretch; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  height: 100%; background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 5px 12px;
  font-size: 0.82rem; font-weight: 500; cursor: pointer; color: var(--text);
  transition: border-color 0.13s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--primary); }
.lang-btn img { display: block; flex-shrink: 0; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 5px 10px;
  cursor: pointer; font-size: 0.88rem; color: var(--text);
  transition: border-color 0.13s;
}
.user-btn:hover { border-color: var(--primary); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { font-weight: 500; }
.chevron-svg {
  width: 12px; height: 12px; flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.user-btn.open .chevron-svg { transform: rotate(180deg); }

.user-dropdown {
  display: none; position: absolute; right: 0; top: 110%;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 160px; overflow: hidden; z-index: 300;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block; padding: 10px 16px;
  font-size: 0.88rem; color: var(--text);
  transition: background 0.12s;
}
.user-dropdown a:hover { background: var(--bg); text-decoration: none; }
.user-dropdown .logout { color: var(--danger); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: all 0.2s;
}

.header-progress {
  background: var(--border); height: 3px;
}
.header-progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  height: 100%;
  transition: width 0.5s ease;
}

/* â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.main-content { flex: 1; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}
.container.narrow { max-width: 560px; }

.page-title { font-size: 1.6rem; color: var(--primary); margin-bottom: 24px; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header .page-title { margin-bottom: 0; }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 7px; border: none;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background 0.14s, transform 0.1s, box-shadow 0.14s;
  line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-primary  { background: var(--primary);  color: white; text-decoration: none; }
.btn-primary:hover:not(:disabled)  { background: var(--primary-dk); color: white; text-decoration: none; }
.btn-accent   { background: var(--accent);   color: white; }
.btn-accent:hover:not(:disabled)   { background: var(--accent-dk); color: white; text-decoration: none; }
.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover:not(:disabled)  { background: var(--primary); color: white; text-decoration: none; }
.btn-danger   { background: var(--danger);   color: white; }
.btn-danger:hover:not(:disabled)   { background: #c0392b; color: white; text-decoration: none; }
.btn-gray     { background: #e2e8f0; color: var(--text); }
.btn-gray:hover:not(:disabled)     { background: #cbd5e0; text-decoration: none; }
[data-theme="dark"] .btn-gray      { background: #2d3748; color: #e2e8f0; }
[data-theme="dark"] .btn-gray:hover:not(:disabled) { background: #374151; }
.btn-success  { background: var(--success); color: white; }
.btn-warn     { background: var(--warn); color: white; }
.btn-zoom     { background: #2d8cff; color: white; font-size: 1rem; padding: 12px 24px; }
.btn-zoom:hover { background: #1a7ae0; color: white; text-decoration: none; }
.btn-sm       { padding: 6px 13px; font-size: 0.82rem; }
.btn-full     { width: 100%; }

/* â”€â”€ Forms â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.87rem;
  font-weight: 600; margin-bottom: 6px; color: var(--text);
}
.form-control {
  width: 100%; padding: 9px 13px;
  border: 2px solid var(--border); border-radius: 7px;
  font-size: 0.95rem; font-family: inherit; color: var(--text);
  transition: border-color 0.13s; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control:disabled { background: #f5f7fa; color: var(--muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-check { margin-bottom: 16px; }
.form-check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; font-size: 0.9rem; }
.form-check input { width: 16px; height: 16px; cursor: pointer; }

.form-actions { display: flex; gap: 10px; margin-top: 24px; }

hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}

/* â”€â”€ Alerts / Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert {
  padding: 13px 18px; border-radius: 8px;
  margin-bottom: 20px; font-size: 0.92rem;
}
.alert-success { background: var(--success-bg); color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: var(--danger-bg);  color: #721c24; border: 1px solid #f5c6cb; }
.alert-warn    { background: var(--warn-bg);    color: #856404; border: 1px solid #ffeeba; }

.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 0.76rem; font-weight: 700;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warn    { background: var(--warn-bg);    color: var(--warn); }
.badge-gray    { background: #e9ecef;           color: var(--muted); }

/* â”€â”€ Login-Seite â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-body { background: #ffffff; }

#net-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  display: block;
}

.login-wrap {
  min-height: 100vh; display: flex;
  flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
  position: relative; z-index: 1;
}
.login-card {
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  padding: 40px 36px; width: 100%; max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 50px; }
.login-title { font-size: 1.4rem; color: var(--primary); text-align: center; margin-bottom: 24px; }
.login-remember {
  display: flex; align-items: center; margin-bottom: 14px;
}
.login-remember label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--muted); cursor: pointer; user-select: none;
}
.login-remember input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary);
}
.login-footer { margin-top: 18px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.login-legal {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 4px 6px;
  font-size: 0.72rem;
}
.login-legal a { color: var(--muted); text-decoration: none; }
.login-legal a:hover { color: var(--primary); text-decoration: underline; }
.login-legal-sep { color: var(--border); }

/* â”€â”€ Demo-Sperre â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.demo-locked-wrap {
  max-width: 520px; margin: 80px auto; text-align: center;
  padding: 48px 32px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.demo-locked-icon  { font-size: 3rem; margin-bottom: 16px; }
.demo-locked-title { font-size: 1.25rem; margin-bottom: 14px; color: var(--text); }
.demo-locked-text  { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 28px; }
.demo-locked-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.demo-locked-hint  { margin-top: 24px; font-size: 0.8rem; color: var(--muted); }
.btn-lg { font-size: 1rem; padding: 13px 28px; }

.demo-consent-group { margin-top: 16px; }
.demo-consent-label {
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; font-size: 0.8rem; color: var(--muted); line-height: 1.5;
}
.demo-consent-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--primary); }
.demo-consent-label a { color: var(--primary); text-decoration: underline; }

/* â”€â”€ Kaufseite â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.price-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: white; border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 24px; text-align: center;
}
.price-amount { font-size: 2.5rem; font-weight: 900; display: block; }
.price-vat    { font-size: 0.88rem; opacity: 0.8; display: block; margin-bottom: 8px; }
.price-note   { font-size: 0.85rem; opacity: 0.75; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.method-card {
  border: 2px solid var(--border); border-radius: 8px;
  padding: 12px 8px; text-align: center;
  cursor: pointer; font-size: 0.85rem; font-weight: 500;
  transition: border-color 0.13s, background 0.13s;
}
.method-card input { display: none; }
.method-card.active, .method-card:has(input:checked) {
  border-color: var(--primary); background: #eef2fa;
}

/* â”€â”€ Dashboard Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-layout {
  display: flex;
  min-height: calc(100vh - 73px - 110px);
  max-width: 100%;
}

.dash-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: #dde3ec;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-sidebar-top {
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.09);
}

.dash-product-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; margin-bottom: 14px;
}
.dash-product-row .reward-title-badge { font-size: 0.72rem; padding: 2px 9px; }

.dash-progress { }
.dash-progress-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 6px;
  color: var(--text);
}
.dash-progress small { font-size: 0.75rem; color: var(--muted); margin-top: 5px; display: block; }

.dash-nav { flex: 1; padding: 8px 0; overflow-y: auto; }

.dash-nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; border-left: 3px solid transparent;
  cursor: pointer; font-size: 0.85rem; font-weight: 500;
  text-align: left; color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.dash-nav-item:hover { background: rgba(0,0,0,0.06); }
.dash-nav-item.active {
  background: var(--card);
  border-left-color: var(--accent);
  font-weight: 700; color: var(--primary);
}
.dash-nav-icon  { font-size: 1rem; flex-shrink: 0; }
.dash-nav-label { flex: 1; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dash-nav-badge {
  font-size: 0.7rem; background: var(--border);
  color: var(--muted); padding: 1px 6px;
  border-radius: 10px; flex-shrink: 0; font-weight: 600;
}
.dash-nav-badge.done { background: var(--success-bg); color: var(--success); }

/* Treeview */
.dash-tree-head {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; border-left: 3px solid transparent;
  cursor: pointer; font-size: 0.85rem; font-weight: 500;
  text-align: left; color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.dash-tree-head:hover { background: rgba(0,0,0,0.06); }
.dash-tree-item.open .dash-tree-head {
  background: rgba(0,0,0,0.05);
  border-left-color: var(--accent);
  color: var(--primary); font-weight: 700;
}
.dash-tree-chevron {
  font-size: 0.6rem; color: var(--muted);
  margin-left: auto; flex-shrink: 0;
  transition: transform 0.2s;
}
.dash-tree-item.open .dash-tree-chevron { transform: rotate(90deg); }

.dash-tree-children {
  display: none;
  background: rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.dash-tree-item.open .dash-tree-children { display: block; }

.dash-tree-module {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 12px 7px 32px;
  font-size: 0.82rem; color: var(--text);
  text-decoration: none; transition: background 0.12s;
  border-left: 3px solid transparent;
  line-height: 1.4;
}
.dash-tree-module:hover { background: rgba(0,0,0,0.06); text-decoration: none; color: var(--primary); }
.dash-tree-module.done   { color: var(--muted); }
.dash-tree-module.active      { background: rgba(232,96,26,0.12); color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
.dash-tree-module.done.active { color: var(--accent); }
.dash-tree-module.active .dash-tree-status { color: var(--accent); }
.dash-tree-status {
  font-size: 0.72rem; flex-shrink: 0; width: 14px;
  margin-top: 2px; text-align: center;
}
.dash-tree-module.done .dash-tree-status { color: var(--success); }
.dash-tree-module-title { flex: 1; }
.mod-num {
  display: inline-block; min-width: 22px; margin-right: 4px;
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Dark Mode Treeview */
[data-theme="dark"] .dash-tree-head:hover  { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .dash-tree-item.open .dash-tree-head { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .dash-tree-children    { background: rgba(255,255,255,0.03); border-bottom-color: var(--border); }
[data-theme="dark"] .dash-tree-module:hover  { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .dash-tree-module.active { background: rgba(232,96,26,0.22); }

/* â”€â”€ Dashboard Willkommen â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-welcome {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.dash-access-pill {
  flex-shrink: 0; font-size: 0.8rem; font-weight: 500;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--success-bg); color: var(--success);
  white-space: nowrap; align-self: center;
}
.dash-access-pill.warn    { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn); }
.dash-access-pill.expired { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

/* â”€â”€ Badge-Pfad â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-badge-section { margin: 24px 0; }
.dash-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 14px;
}
.badge-trail {
  display: flex; align-items: center; overflow: hidden; gap: 0;
}
.badge-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0; min-width: 52px;
}
.badge-step-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: var(--bg); border: 2px solid var(--border);
}
.badge-step.done   .badge-step-icon { background: var(--success-bg); border-color: var(--success); }
.badge-step.next   .badge-step-icon { background: #fff4ec; border-color: var(--accent); border-width: 2px; box-shadow: 0 0 0 3px rgba(232,96,26,0.12); }
.badge-step.locked .badge-step-icon { opacity: 0.3; filter: grayscale(1); }
.badge-step-label {
  font-size: 0.58rem; text-align: center; color: var(--muted);
  max-width: 52px; line-height: 1.2;
}
.badge-step.done   .badge-step-label { color: var(--success); font-weight: 600; }
.badge-step.next   .badge-step-label { color: var(--accent);  font-weight: 600; }
.badge-connector {
  flex: 1; height: 2px; background: var(--border); min-width: 6px; flex-shrink: 1;
}
.badge-connector.done { background: var(--success); }

.next-badge-hint {
  margin-top: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.nbh-text { font-size: 0.88rem; color: var(--text); margin-bottom: 10px; }
.nbh-bar-row { display: flex; align-items: center; gap: 12px; }
.nbh-bar {
  flex: 1; height: 7px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.nbh-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s; }
.nbh-count { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* â”€â”€ Dashboard Zufallsfrage â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-daily-q {
  margin: 28px 0;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  padding: 12px 16px 18px;
}
.dash-daily-q .q-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.dash-daily-q .q-text { font-size: 1rem; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.daily-q-actions { margin-top: 14px; }

/* ── Begriffslernkarten ─────────────────────────────────── */
.lk-wrap { max-width: 720px; margin: 0 auto; padding: 0 0 40px; }
.lk-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.lk-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.lk-subtitle { color: var(--muted); font-size: .88rem; margin: 0; }
.lk-progress-bar { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.lk-progress-bar--desktop { align-items: flex-end; }
.lk-prog-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.lk-prog-fill  { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.lk-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px 28px 20px; margin-bottom: 16px; }
.lk-card-tag { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--primary); background: var(--hover); border-radius: 20px; padding: 3px 12px; margin-bottom: 14px; }
.lk-question { font-size: 1.1rem; font-weight: 600; line-height: 1.6; margin: 0 0 18px; color: var(--text); }
.lk-textarea { width: 100%; resize: vertical; }
.lk-answer-area { background: var(--hover); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.lk-answer-head { font-size: .9rem; font-weight: 700; margin: 0 0 12px; color: var(--primary); }
.lk-wiki-body { font-size: .93rem; line-height: 1.7; }
.lk-wiki-body h2 { font-size: 1rem; margin: 16px 0 6px; }
.lk-wiki-ref { display: inline-block; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.lk-controls { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) {
  .lk-controls { flex-direction: column; }
  .lk-controls .btn { width: 100%; }
}
.lk-w-tag { font-size: .75rem; font-weight: 600; color: var(--primary); background: var(--hover); border-radius: 20px; display: inline-block; padding: 2px 10px; margin-bottom: 10px; }
.lk-w-question { font-size: .95rem; font-weight: 600; line-height: 1.55; margin: 0 0 12px; }
.lk-w-textarea { width: 100%; resize: none; margin-bottom: 10px; }
.lk-w-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
@media (max-width: 600px) {
  .lk-w-actions { flex-direction: column; }
  .lk-w-actions .btn { width: 100%; }
}
.lk-w-answer-head { font-size: .82rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.lk-w-answer-body { font-size: .87rem; line-height: 1.65; }
.lk-w-answer-body h2 { font-size: .9rem; margin: 10px 0 4px; }
.embed-lernkarten { padding-top: 4px; }

/* â”€â”€ News & Freitext â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-freetext {
  margin-top: 24px; padding: 16px 18px;
  background: var(--bg); border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  font-size: 0.9rem; line-height: 1.65; color: var(--text);
}
.dash-news {
  margin-top: 28px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  padding: 0 16px;
}
.dash-news .dash-section-label { padding-top: 12px; }
.news-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; margin-bottom: 4px; }
.news-item-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  margin-bottom: 4px;
}
.news-item-title  { font-weight: 600; font-size: 0.93rem; color: var(--text); margin-bottom: 2px; }
.news-item-date   { font-size: 0.75rem; color: var(--muted); }
.news-item-teaser { font-size: 0.87rem; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.news-item-body   {
  font-size: 0.87rem; color: var(--text); line-height: 1.6;
  margin-top: 10px; display: none;
}
.news-item-body.news-body-open { display: block; }

/* â”€â”€ Praxisaufgaben â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.aufgabe-box {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--hover);
}
.aufgabe-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.aufgabe-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 700; padding: 4px 12px;
  border-radius: 20px;
}
.aufgabe-badge-praxis { background: #e8f4fd; color: #1565c0; border: 1px solid #90caf9; }
.aufgabe-badge-master { background: #fff8e1; color: #e65100; border: 1px solid #ffcc02; }
[data-theme="dark"] .aufgabe-badge-praxis { background: #1a2a3a; color: #90caf9; }
[data-theme="dark"] .aufgabe-badge-master { background: #2a1f0a; color: #ffcc02; }
.aufgabe-optional { font-size: 0.75rem; color: var(--muted); }
.aufgabe-task-text {
  font-size: 0.95rem; line-height: 1.65;
  padding: 16px; background: var(--card);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}
/* ── Quiz-Fragen-Picker (Admin) ─────────────────────────────── */
.qp-row { display:flex;align-items:center;gap:6px;padding:5px 8px;background:var(--card);border:1px solid var(--border);border-radius:5px;font-size:.82rem; }
.qp-text { flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.qp-empty { font-size:.83rem;color:var(--muted);padding:8px 4px; }
.qp-row button { background:none;border:none;cursor:pointer;font-size:.88rem;flex-shrink:0;padding:1px 3px;line-height:1;border-radius:3px; }
.qp-row button:hover { opacity:.65; }
/* ── Praxisaufgaben-Hinweise ───────────────────────────────── */
.aufgabe-hint-wrap { margin-top: 14px; }
.aufgabe-hint-btn { font-size: .83rem; }
.aufgabe-hint {
  margin-top: 12px; padding: 16px 18px;
  background: var(--warn-bg);
  border-left: 4px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .93rem; line-height: 1.65;
}
.aufgabe-hint p:first-child { margin-top: 0; }
.aufgabe-hint p:last-child  { margin-bottom: 0; }
[data-theme="dark"] .aufgabe-hint { border-left-color: var(--warn); }
.aufgabe-form .form-control { background: var(--card); }
.aufgabe-draft-hint { font-size:.78rem;color:var(--muted);margin-top:5px;min-height:1.2em }
.aufgabe-draft-ts   { color:var(--muted) }
.aufgabe-draft-ok   { display:none;color:var(--success);font-weight:600 }
.aufgabe-once-notice {
  font-size:.82rem;color:#d97706;
  background:rgba(217,119,6,.08);border:1px solid rgba(217,119,6,.22);
  border-radius:calc(var(--radius) - 2px);padding:8px 12px;margin:16px 0 12px;
}
[data-theme="dark"] .aufgabe-once-notice { color:#fbbf24;background:rgba(251,191,36,.08);border-color:rgba(251,191,36,.2) }
.aufgabe-actions { display:flex;gap:10px;align-items:center;flex-wrap:wrap }
.aufgabe-actions .btn { flex:1;min-width:0 }
@media (max-width:768px) {
  .aufgabe-actions { flex-direction:column;align-items:stretch }
  .aufgabe-actions .btn { flex:unset;width:100% }
}

/* â”€â”€ Admin Praxisaufgaben â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sub-date-green  { color: var(--success); font-weight: 600; }
.sub-date-yellow { color: var(--warn);    font-weight: 600; }
.sub-date-red    { color: var(--danger);  font-weight: 600; }
.sub-body-preview { font-size: 0.875rem; line-height: 1.5; }
.sub-detail-label {
  font-size:.74rem;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px;
}
.btn-link {
  background: none; border: none; padding: 0;
  color: var(--primary); cursor: pointer; font-size: 0.8rem;
  text-decoration: underline;
}
.btn-link:hover { color: var(--accent); }

/* â”€â”€ Feedback Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.module-feedback-bar {
  display: flex; justify-content: flex-end;
  margin-top: 8px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.btn-feedback {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.82rem;
  padding: 5px 10px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.btn-feedback:hover { color: var(--primary); background: var(--bg); }

/* â”€â”€ Modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  width: 100%; max-width: 500px; margin: 20px;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 1.05rem; color: var(--text); }
.modal-close {
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 4px;
  transition: background 0.13s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

/* â”€â”€ Embed Modul â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.embed-module { padding: 20px 24px; }
.embed-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.embed-back-btn {
  background: none; border: 1px solid var(--border); color: var(--primary);
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.875rem;
  transition: background 0.15s;
}
.embed-back-btn:hover { background: var(--bg); }
.embed-header-right { display: flex; align-items: center; gap: 8px; }
.embed-loading { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 0.95rem; }

.dash-main {
  flex: 1; background: var(--card);
  padding: 32px 36px; min-width: 0;
  overflow: auto;
}

.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* Startseite */
.dash-welcome { margin-bottom: 28px; }
.dash-welcome-title { font-size: 1.6rem; color: var(--primary); margin-bottom: 6px; }
.dash-welcome-sub   { color: var(--muted); font-size: 0.92rem; }

.dash-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.dash-stat-card {
  background: var(--bg); border-radius: 10px;
  padding: 20px 16px; text-align: center;
  border: 1px solid var(--border);
}
.dash-stat-val { font-size: 2.2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.dash-stat-lbl { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

.dash-next-module {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--bg);
}
.dash-next-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); padding: 10px 16px 6px;
}
.dash-next-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; font-weight: 600; font-size: 0.95rem;
  color: var(--primary); transition: background 0.12s;
}
.dash-next-link:hover { background: var(--bg); text-decoration: none; }

/* Topic Panel */
.dash-topic-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.dash-topic-icon  { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.dash-topic-title { font-size: 1.3rem; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.dash-topic-desc  { color: var(--muted); font-size: 0.88rem; }

.dash-module-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}

/* Dark Mode Sidebar */
[data-theme="dark"] .dash-sidebar     { background: #0d1018; }
[data-theme="dark"] .dash-sidebar-close { background: rgba(255,255,255,0.08); color: var(--text); }
[data-theme="dark"] .dash-sidebar-top { border-bottom-color: var(--border); }
[data-theme="dark"] .dash-nav-item:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .dash-nav-item.active { background: var(--card); }
[data-theme="dark"] .dash-main      { background: var(--card); }
[data-theme="dark"] .dash-stat-card { background: #252d40; }

.dash-stat-card-link {
  display: block; text-decoration: none; color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.dash-stat-card-link:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.dash-level-card { text-align: center; }
.lvl-bar-wrap { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.lvl-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.lvl-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s; }
.lvl-pts { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

.dash-webinar-card {
  grid-column: span 2;
  background: var(--accent) !important;
  border-color: var(--accent-dk) !important;
  color: white;
}
.dash-webinar-card .dash-stat-val,
.dash-webinar-card .dash-stat-lbl { color: white !important; }
.dash-webinar-topic-link {
  display: block; margin-top: 10px;
  font-size: 0.8rem; color: rgba(255,255,255,0.85);
  text-decoration: none; line-height: 1.4;
}
.dash-webinar-topic-link:hover { color: white; text-decoration: underline; }

/* â”€â”€ Dashboard header + customize link â”€ */
.dash-cards-header {
  display: flex; justify-content: flex-end; align-items: center;
  margin-bottom: 8px;
}
.dash-customize-link {
  font-size: 0.78rem; color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.dash-customize-link:hover { color: var(--primary); background: var(--hover); text-decoration: none; }

/* â”€â”€ Header status picker â”€ */
.status-picker { position: relative; display: flex; align-self: stretch; align-items: center; }
.status-picker-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; cursor: pointer;
  padding: 5px 10px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.13s;
}
.status-picker-btn:hover { border-color: var(--primary); }
.status-picker-btn .status-dot { width: 13px; height: 13px; }

.status-picker-dd {
  display: none; position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 188px; padding: 5px 0; z-index: 300;
}
.status-picker-dd.open { display: block; }

.status-picker-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 16px;
  background: none; border: none; cursor: pointer;
  font-size: 0.875rem; color: var(--text); text-align: left;
  transition: background 0.1s;
}
.status-picker-opt:hover { background: var(--hover); }
.status-picker-opt.active { font-weight: 600; }

.status-picker-hint {
  font-size: 0.72rem; color: var(--muted);
  padding: 7px 16px 5px; margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* â”€â”€ Status dots â”€ */
.status-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0; position: relative;
  vertical-align: middle;
}
.status-dot-lg { width: 14px; height: 14px; }

.status-online   { background: #6bb700; }
.status-away     { background: #f5a623; }
.status-dnd      { background: #c4314b; }
.status-dnd::after {
  content: ''; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 60%; height: 2px; background: white; border-radius: 1px;
}
.status-offline  { background: transparent; border: 2px solid #8a8886; box-sizing: border-box; }
.status-inactive { background: #d4a0a8; }

/* Status selector on profile page */
.status-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.status-option {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border: 1.5px solid var(--border);
  border-radius: 20px; cursor: pointer; font-size: 0.85rem;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.status-option input[type="radio"] { display: none; }
.status-option:has(input:checked),
.status-option-active {
  border-color: var(--primary);
  background: var(--hover);
  font-weight: 500;
}
.status-option:hover { border-color: var(--primary); }

/* â”€â”€ Profile cert card â”€ */
.profile-cert-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  border-color: #c7d4f7;
}
.profile-cert-icon { font-size: 2.5rem; flex-shrink: 0; }
[data-theme="dark"] .profile-cert-card { background: linear-gradient(135deg, #1e2a45 0%, #1a2035 100%); border-color: #2d3f6b; }

/* â”€â”€ Profile page layout â”€ */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.profile-row > .card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.profile-row > .card form { flex: 1; display: flex; flex-direction: column; }
.profile-row > .card form > .btn { margin-top: auto; }
@media (max-width: 700px) {
  .profile-row { flex-direction: column; }
  .profile-row > .card { display: block; }
}

/* â”€â”€ Profile fields grid â”€ */
.profile-fields-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: end;
}
@media (max-width: 560px) { .profile-fields-grid { grid-template-columns: 1fr; } }

/* â”€â”€ Profile card toggle grid â”€ */
.card-toggle-grid { display: flex; flex-direction: column; gap: 2px; }
.card-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.card-toggle-row:last-child { border-bottom: none; }
.card-toggle-label { font-size: 0.9rem; color: var(--text); user-select: none; display: flex; flex-direction: column; gap: 2px; }
.card-toggle-hint { font-size: 0.76rem; color: var(--muted); font-weight: 400; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 12px; cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

[data-theme="dark"] .toggle-slider { background: #3a4155; }
[data-theme="dark"] .toggle-slider::before { background: #e2e8f0; }
[data-theme="dark"] .toggle-switch input:checked + .toggle-slider { background: var(--primary); }

/* â”€â”€ Dashboard (alte Karten â€” nicht mehr genutzt) â”€ */
.progress-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px;
  box-shadow: var(--shadow); margin-bottom: 28px;
}
.progress-card-head {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; font-weight: 600; margin-bottom: 10px;
}
.pct-label { color: var(--primary); font-size: 1rem; font-weight: 800; }
.progress-track { background: var(--border); border-radius: 10px; height: 8px; overflow: hidden; margin-bottom: 8px; }
.progress-fill  { background: linear-gradient(90deg, var(--primary), var(--accent)); height: 100%; border-radius: 10px; transition: width 0.5s ease; }

.topic-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden;
}
.topic-head {
  background: var(--primary); color: white;
  padding: 14px 20px; display: flex;
  align-items: center; justify-content: space-between;
  cursor: pointer; gap: 12px;
}
.topic-head-left { display: flex; align-items: center; gap: 12px; }
.topic-icon { font-size: 1.2rem; flex-shrink: 0; }
.topic-title { font-size: 0.97rem; font-weight: 700; }
.topic-desc  { font-size: 0.8rem; opacity: 0.8; margin-top: 2px; }
.topic-progress { font-size: 0.85rem; background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }

.topic-card.collapsed .topic-body { display: none; }

.topic-body { padding: 0; }
.module-list { display: flex; flex-direction: column; }

.module-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; border-bottom: 1px solid var(--border);
  color: var(--text); transition: background 0.12s;
}
.module-row:last-child { border-bottom: none; }
.module-row:hover { background: var(--bg); text-decoration: none; }
.module-row.module-done .module-title { color: var(--muted); }

.module-status { width: 24px; flex-shrink: 0; text-align: center; }
.module-status .check { color: var(--success); font-weight: 700; font-size: 1.1rem; }
.module-status .dot   { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: inline-block; }
.module-title  { flex: 1; font-size: 0.92rem; }
.module-arrow  { color: var(--muted); font-size: 0.9rem; }

.special-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px; }

.cert-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* â”€â”€ Modul-Seite â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.breadcrumb {
  display: flex; gap: 6px; align-items: center;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--border); }
.breadcrumb span:last-child { color: var(--text); }

.module-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.module-h1 { font-size: 1.5rem; color: var(--primary); }
.module-hf-tag { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--hover); border: 1px solid var(--border); border-radius: 4px; padding: 3px 9px; white-space: nowrap; flex-shrink: 0; letter-spacing: .3px; }

.module-section { margin-bottom: 32px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.82rem; }

.video-wrap {
  position: relative; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: var(--radius);
  background: #000; box-shadow: var(--shadow);
  max-width: 816px; margin: 0 auto;
}
.video-wrap iframe, .video-wrap video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

.module-text.prose { line-height: 1.75; }
.module-placeholder { color: var(--muted); font-style: italic; padding: 32px 0; text-align: center; }
.module-placeholder p { margin: 0 0 8px; }
.module-placeholder-hint { font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 16px !important; font-style: normal; }
.prose p     { margin-bottom: 1em; }
.prose h2    { color: var(--primary); margin: 1.5em 0 0.5em; }
.prose h3    { color: var(--primary); margin: 1.2em 0 0.4em; }
.prose ul,
.prose ol    { padding-left: 1.5em; margin-bottom: 1em; }
.prose li    { margin-bottom: 0.3em; }
.prose strong { font-weight: 700; }

.quiz-done-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--success-bg); color: var(--success);
  border-radius: 8px; padding: 14px 18px;
  font-weight: 600; margin-bottom: 16px;
}
@media (max-width: 768px) {
  .quiz-done-banner { flex-direction: column; align-items: center; gap: 10px; }
  .quiz-done-text { display: flex; align-items: center; gap: 8px; }
  .quiz-done-banner #btn-retry-quiz { width: 100%; }
}
.check-big { font-size: 1.4rem; }

/* ── Kurs-Bewertung (complete-Step) ─────────────────────────── */
.course-rating-box {
  margin: 0 auto 28px;
  max-width: 420px;
  text-align: center;
}
.course-rating-box .fb-star-rating { justify-content: center; width: 100%; margin-bottom: 0; }
.course-rating-title {
  font-size: 1rem; font-weight: 600; margin-bottom: 14px; color: var(--text);
}
.course-rating-comment {
  margin-bottom: 8px; resize: vertical; font-size: 0.88rem;
}
.course-rating-hint {
  font-size: 0.78rem; color: var(--muted); margin-bottom: 20px;
}

/* ── Wizard ──────────────────────────────────────────────────── */
.module-wizard {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 32px;
}

/* Progress bar */
.wizard-progress {
  display: flex; align-items: center;
  padding: 20px 24px 0;
  gap: 0;
  overflow-x: auto;
}
.wiz-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex-shrink: 0; cursor: default;
  min-width: 52px;
}
.wiz-step.done { cursor: pointer; }
.wiz-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  background: var(--border); color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.wiz-step.active .wiz-dot { background: var(--primary); color: #fff; }
.wiz-step.done   .wiz-dot { background: var(--success); color: #fff; }
.wiz-label {
  font-size: 0.72rem; color: var(--muted); white-space: nowrap;
  transition: color 0.2s;
}
.wiz-step.active .wiz-label { color: var(--primary); font-weight: 600; }
.wiz-step.done   .wiz-label { color: var(--success); }
.wiz-connector {
  flex: 1; height: 2px; background: var(--border);
  min-width: 20px; margin-bottom: 18px;
  transition: background 0.2s;
}
.wiz-connector.done { background: var(--success); }
.wiz-hidden { display: none !important; }

/* Panels */
.wizard-panel        { display: none; }
.wizard-panel.active { display: block; }

.wizard-content {
  padding: 28px 28px 8px;
}

/* Nav row */
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* Complete step */
.wizard-complete-step .wizard-content { padding-bottom: 0; }
.wizard-done-msg {
  text-align: center; padding: 20px 0 8px;
}
.wizard-done-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--success-bg); color: var(--success);
  font-size: 2rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.wizard-done-msg h2 { color: var(--success); margin-bottom: 8px; }

/* Info / Quellen */
.module-info { color: var(--muted); line-height: 1.7; }

/* Quellen-Box (immer sichtbar unterhalb Wizard) */
.module-sources {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.module-sources-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); margin-bottom: 10px;
}
.module-sources-body {
  font-size: 0.88rem; color: var(--muted); line-height: 1.45;
}
.module-sources-body a { color: var(--accent); text-decoration: underline; }
.module-sources-body a:hover { color: var(--accent-dk); }
.module-sources-body ul, .module-sources-body ol { padding-left: 1.3em; margin: 2px 0 4px; }
.module-sources-body li { margin-bottom: 2px; }
.module-sources-body p { margin-bottom: 0.4em; }

.module-nav {
  display: flex; justify-content: space-between;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* â”€â”€ Quiz (Engine-Styles, identisch mit Original) â”€ */
.quiz-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.quiz-meta-title { font-size: 0.92rem; font-weight: 700; color: var(--primary); }
.quiz-meta-count { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.timer-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary); color: white;
  padding: 7px 16px; border-radius: 20px;
  font-weight: 700; font-size: 1rem;
}
.timer-box.warn   { background: var(--accent); }
.timer-box.urgent { background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.75} }

.q-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; margin-bottom: 18px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.q-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.q-card-header .q-badge { margin-bottom: 0; }

/* Merken-Button */
.btn-fav { font-size: 0.88rem; }
.btn-fav-active {
  background: var(--warn-bg) !important;
  color: var(--warn) !important;
  border-color: var(--warn) !important;
}
.btn-fav-active:hover { background: #fde8b0 !important; }

/* Abort-Button schiebt alles andere nach rechts */
.quiz-actions #btn-abort { margin-right: auto; }

.q-badge {
  display: inline-block; font-size: 0.73rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Merkzettel-Seite */
.fav-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.fav-item {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: 4px 12px; align-items: start;
}
.fav-item-source {
  grid-column: 1 / -1; font-size: 0.75rem; color: var(--muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.fav-item-text { font-size: 0.95rem; line-height: 1.55; }
.fav-item-actions {
  grid-row: 1 / 3; align-self: center;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.fav-practice-btn {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 0.95rem; padding: 6px 8px;
  border-radius: 6px; transition: color 0.15s, background 0.15s; line-height: 1;
}
.fav-practice-btn:hover { background: var(--hover); }
.fav-remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.9rem; padding: 6px 8px;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.fav-remove-btn:hover { color: var(--danger); background: var(--danger-bg); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }

/* â”€â”€ Header message bell â”€ */
.msg-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 5px 10px; border-radius: 8px; color: var(--text);
  border: 1.5px solid var(--border);
  transition: border-color 0.13s, color 0.13s; text-decoration: none;
  align-self: stretch;
}
.msg-bell:hover, .msg-bell.active { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.msg-badge {
  position: absolute; top: 0; right: 0;
  background: #c4314b; color: #fff;
  font-size: 0.6rem; font-weight: 700; line-height: 1;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

/* â”€â”€ Messages inbox â”€ */
.msg-inbox-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.msg-inbox-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #c4314b; color: #fff; font-size: 0.72rem; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; margin-left: 8px; vertical-align: middle;
}
.msg-inbox-list { display: flex; flex-direction: column; gap: 2px; }

.msg-conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: background 0.12s, box-shadow 0.12s;
}
.msg-conv-row:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.msg-conv-unread { border-left: 3px solid var(--primary); }
.msg-conv-avatar { flex-shrink: 0; }
.msg-conv-body { flex: 1; min-width: 0; }
.msg-conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.msg-conv-name { font-weight: 600; font-size: 0.9rem; }
.msg-conv-unread .msg-conv-name { color: var(--primary); }
.msg-conv-time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.msg-conv-preview { font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.msg-conv-unread .msg-conv-preview { color: var(--text); font-weight: 500; }
.msg-conv-badge {
  flex-shrink: 0; background: var(--primary); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}

/* â”€â”€ Message thread â”€ */
.msg-thread-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.msg-thread-user { display: flex; align-items: center; gap: 10px; }
.msg-thread-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.msg-btn-danger { color: var(--danger) !important; border-color: var(--danger) !important; }

.msg-status-banner {
  background: var(--hover); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 14px;
}

.msg-thread-body {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px; margin-bottom: 20px;
}
.msg-thread-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 0.875rem; }

.msg-bubble-wrap {
  display: flex; flex-direction: column; max-width: 72%;
  position: relative;
}
.msg-mine   { align-self: flex-end; align-items: flex-end; }
.msg-theirs { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.9rem; line-height: 1.5; word-break: break-word;
}
.msg-mine   .msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-theirs .msg-bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.msg-meta { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }

/* Delete button â€“ eigene Nachrichten */
.msg-delete-form { display: contents; }
.msg-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.72rem; padding: 2px 4px;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
  align-self: flex-end; order: -1;
  margin-bottom: 2px; line-height: 1;
}
.msg-bubble-wrap:hover .msg-delete-btn { opacity: 1; }
.msg-delete-btn:hover { color: var(--danger); }

.msg-reply-form { border-top: 1px solid var(--border); padding-top: 16px; }
.msg-reply-input { resize: vertical; min-height: 72px; }

/* Inbox conversation row with delete */
.msg-conv-wrap { position: relative; }
.msg-conv-delete-form { display: contents; }
.msg-conv-delete-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.8rem; padding: 6px 8px;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
  border-radius: var(--radius);
  line-height: 1;
}
.msg-conv-wrap:hover .msg-conv-delete-btn { opacity: 1; }
.msg-conv-delete-btn:hover { color: var(--danger); background: var(--hover); }

[data-theme="dark"] .msg-theirs .msg-bubble { background: #252d40; }
[data-theme="dark"] .msg-conv-row { background: #1e2537; }
[data-theme="dark"] .msg-conv-row:hover { background: #252d40; }
[data-theme="dark"] .msg-badge { border-color: #1a1f2e; }

/* â”€â”€ Help â”€ */
.help-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.help-breadcrumb {
  font-size: 0.82rem; color: var(--muted); margin-bottom: 16px;
}
.help-breadcrumb a { color: var(--muted); text-decoration: none; }
.help-breadcrumb a:hover { color: var(--primary); }

.help-category { margin-bottom: 32px; }
.help-cat-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.help-article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.help-article-card-link { text-decoration: none; color: var(--text); }
.help-article-card-link:hover { text-decoration: none; }
.help-article-preview {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  height: 100%; display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.help-article-card-link:hover .help-article-preview {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09); transform: translateY(-2px);
}
.help-article-preview-title { font-weight: 600; font-size: 0.92rem; }
.help-article-preview-excerpt { font-size: 0.8rem; color: var(--muted); flex: 1; }
.help-article-preview-more { font-size: 0.78rem; color: var(--primary); margin-top: 6px; }

.help-contact-box {
  display: flex; align-items: center; gap: 16px;
  background: var(--hover); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-top: 8px;
}
.help-contact-icon { font-size: 2rem; flex-shrink: 0; }

/* Single article */
.help-article-card { padding: 28px 32px; }
.help-article-category {
  font-size: 0.78rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px;
}
.help-article-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.help-article-body { line-height: 1.8; }
.help-back-row {
  display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap;
}

[data-theme="dark"] .help-article-preview { background: #1e2537; }

/* â”€â”€ Forum â”€ */
.forum-breadcrumb {
  font-size: 0.82rem; color: var(--muted); margin-bottom: 16px;
}
.forum-breadcrumb a { color: var(--muted); text-decoration: none; }
.forum-breadcrumb a:hover { color: var(--primary); }

/* Overview */
.forum-overview { display: flex; flex-direction: column; gap: 12px; }
.forum-cat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex;
  align-items: stretch; overflow: hidden;
  transition: box-shadow 0.15s;
}
.forum-cat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.forum-cat-link {
  display: flex; align-items: center; gap: 16px;
  flex: 1; padding: 18px 20px; text-decoration: none; color: var(--text);
}
.forum-cat-link:hover { text-decoration: none; color: var(--text); }
.forum-cat-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.forum-cat-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.forum-cat-desc { font-size: 0.8rem; color: var(--muted); }
.forum-cat-stats {
  display: flex; align-items: center; gap: 0;
  border-left: 1px solid var(--border); flex-shrink: 0;
}
.forum-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 20px; border-right: 1px solid var(--border); min-width: 80px;
}
.forum-stat:last-child { border-right: none; }
.forum-stat-val { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.forum-stat-lbl { font-size: 0.7rem; color: var(--muted); text-align: center; }
.forum-stat-last {
  align-items: flex-start; min-width: 220px; padding: 12px 16px;
  max-width: 260px;
}
.forum-last-thread {
  font-size: 0.8rem; color: var(--text); text-decoration: none;
  font-weight: 500; display: block; margin: 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.forum-last-thread:hover { color: var(--primary); }

/* Category header */
.forum-cat-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}

/* Thread list */
.forum-thread-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.forum-thread-list-head {
  display: grid; grid-template-columns: 1fr 90px 200px;
  padding: 8px 16px; background: var(--hover);
  font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.forum-thread-row {
  display: grid; grid-template-columns: 1fr 90px 200px;
  padding: 14px 16px; border-top: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background 0.12s;
}
.forum-thread-row:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.forum-thread-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.forum-thread-title { font-weight: 600; font-size: 0.92rem; }
.forum-thread-author { font-size: 0.75rem; color: var(--muted); }
.forum-col-center { display: flex; align-items: center; justify-content: center; }
.forum-col-right { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.forum-thread-replies { font-weight: 700; font-size: 1rem; color: var(--primary); }
.forum-thread-last { font-size: 0.75rem; color: var(--muted); }
.forum-thread-time { font-size: 0.72rem; color: var(--muted); }
.forum-badge {
  display: inline-flex; align-items: center; font-size: 0.7rem;
  padding: 1px 6px; border-radius: 4px; margin-right: 4px; vertical-align: middle;
}
.forum-badge-pin  { background: #fff8e1; color: #b45309; }
.forum-badge-lock { background: #fee2e2; color: #b91c1c; }

/* Thread head */
.forum-thread-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.forum-admin-bar { display: flex; gap: 8px; flex-shrink: 0; }

/* Post list */
.forum-post-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.forum-post {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); overflow: hidden; margin-bottom: 12px;
}
.forum-author {
  width: 160px; flex-shrink: 0; padding: 20px 14px;
  background: var(--hover); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.forum-author-name { font-weight: 700; font-size: 0.85rem; word-break: break-word; }
.forum-author-name-link { color: inherit; text-decoration: none; }
.forum-author-name-link:hover { color: var(--primary); text-decoration: underline; }
.forum-author-role { font-size: 0.72rem; color: var(--muted); }
.forum-author-posts { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }
.forum-author-msg { margin-top: 8px; width: 100%; font-size: 0.75rem; padding: 4px 8px; }
.forum-post-content { flex: 1; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; }
.forum-post-body { flex: 1; font-size: 0.9rem; line-height: 1.7; word-break: break-word; white-space: pre-wrap; }
.forum-post-meta { font-size: 0.72rem; color: var(--muted); margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.forum-post-edit-link { color: var(--primary); text-decoration: none; cursor: pointer; }
.forum-post-edit-link:hover { text-decoration: underline; }

.forum-reply-card { margin-top: 8px; }

@media (max-width: 700px) {
  .forum-thread-list-head,
  .forum-thread-row { grid-template-columns: 1fr 60px; }
  .forum-col-right { display: none; }
  .forum-cat-stats { flex-direction: column; }
  .forum-stat-last { display: none; }
  .forum-author { width: 120px; }
  /* Badge in Threadliste: nicht auf volle Breite strecken */
  .forum-thread-main .forum-badge { align-self: flex-start; }
  /* Badge im Threadtitel (h1): über den Titel, nicht daneben */
  .page-title .forum-badge {
    display: block; width: fit-content;
    margin-right: 0; margin-bottom: 6px;
  }
}
@media (max-width: 500px) {
  .forum-post { flex-direction: column; }
  .forum-author {
    width: 100%; flex-direction: row; align-items: center; gap: 12px;
    border-right: none; border-bottom: 1px solid var(--border); padding: 12px 16px;
  }
  .forum-author .user-card-avatar-wrap { margin: 0 !important; flex-shrink: 0; }
  .forum-author-info { display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; }
  .forum-author-msg { width: auto; margin-top: 4px; }
}

[data-theme="dark"] .forum-cat-card { background: #1e2537; }
[data-theme="dark"] .forum-badge-pin  { background: #3d2e00; color: #fbbf24; }
[data-theme="dark"] .forum-badge-lock { background: #3b0000; color: #f87171; }
[data-theme="dark"] .forum-post { background: #1e2537; }
[data-theme="dark"] .forum-author { background: #252d40; }

/* â”€â”€ User list â”€ */
.user-list-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.user-list-meta { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.user-list-search-form { flex: 0 1 320px; }
.user-list-search { height: 36px; font-size: 0.875rem; }
.user-list-filters { display: flex; gap: 8px; margin-bottom: 20px; }

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 16px;
}

.user-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 16px 18px;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 4px; position: relative;
  transition: box-shadow 0.15s, transform 0.15s;
}
.user-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.10); transform: translateY(-2px); }

.user-card-avatar-wrap { position: relative; display: inline-block; margin-bottom: 8px; }
.user-card-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; display: block;
}
.user-card-initial {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; line-height: 1;
}
.user-card-status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid var(--card); box-sizing: border-box;
}

.user-card-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.user-card-name-link { color: inherit; text-decoration: none; }
.user-card-name-link:hover { color: var(--primary); text-decoration: underline; }
.user-card-meta {
  font-size: 0.75rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.user-card-loc  { margin-top: 2px; -webkit-line-clamp: unset; overflow: visible; display: block; }
.user-card-status-label {
  font-size: 0.72rem; color: var(--muted);
  margin-top: 6px; margin-bottom: 2px;
}
.user-card-contact { margin-top: auto; padding-top: 10px; width: 100%; }

/* Favoriten-Button auf User-Karten */
.user-card-fav-form { position: absolute; top: 8px; right: 8px; }
.user-card-fav-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.15rem; line-height: 1; padding: 4px;
  color: var(--muted); opacity: 0;
  transition: opacity 0.15s, color 0.15s, transform 0.12s;
  border-radius: 50%;
}
.user-card:hover .user-card-fav-btn,
.user-card-fav-btn.is-fav { opacity: 1; }
.user-card-fav-btn.is-fav { color: #e11d48; }
.user-card-fav-btn:hover { color: #e11d48; transform: scale(1.2); }

[data-theme="dark"] .user-card { background: #1e2537; }
[data-theme="dark"] .user-card-status-dot { border-color: #1e2537; }

[data-theme="dark"] .fav-item { background: #1a1f2e; }
.q-badge.single   { background: #eef1f6; color: var(--muted); }
.q-badge.multiple { background: #fff3ec; color: var(--accent); }
.q-badge.fach     { background: #ede9ff; color: #5b4fcf; }
.q-text { font-size: 1.02rem; line-height: 1.7; white-space: pre-wrap; margin-bottom: 20px; }

.answers { display: flex; flex-direction: column; gap: 9px; }
.ans {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: 8px;
  border: 2px solid var(--border); cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
  user-select: none;
}
.ans:hover:not(.locked) { border-color: var(--primary); background: #f7f9fc; }
.ans.locked { cursor: default; }
.ans.sel  { border-color: var(--primary); background: #eef2fa; }
.ans.ok   { border-color: var(--success); background: var(--success-bg); }
.ans.bad  { border-color: var(--danger);  background: var(--danger-bg); }
.ans.miss { border-color: var(--success); background: #f0fdf4; }
.ans-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; margin-top: 1px;
}
.ans.sel  .ans-dot { background: var(--primary); border-color: var(--primary); color: white; }
.ans.ok   .ans-dot { background: var(--success); border-color: var(--success); color: white; }
.ans.bad  .ans-dot { background: var(--danger);  border-color: var(--danger);  color: white; }
.ans.miss .ans-dot { background: #9ecca9; border-color: var(--success); color: white; }
.ans-label { flex: 1; font-size: 0.94rem; line-height: 1.5; }

.quiz-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center;
}

.res-card {
  background: var(--card); border-radius: var(--radius);
  padding: 40px 32px; text-align: center;
  border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 20px;
}
.res-pct  { font-size: 4rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.res-sub  { color: var(--muted); margin-bottom: 16px; }
.res-verdict {
  display: inline-block; padding: 8px 26px;
  border-radius: 30px; font-size: 1rem; font-weight: 700; margin-bottom: 8px;
}
.res-verdict.pass { background: var(--success-bg); color: var(--success); }
.res-verdict.fail { background: var(--danger-bg);  color: var(--danger); }
.res-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; }
.res-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 24px; }
.res-stat-val { font-size: 2rem; font-weight: 800; }
.res-stat-lbl { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.res-actions  { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.model-box {
  background: linear-gradient(135deg,#eef2fa,#e8f4fd);
  border: 1.5px solid var(--primary); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 16px;
}
.model-box-lbl  { font-size: 0.73rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px; }
.model-box-text { font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; }

.fg-textarea {
  width: 100%; min-height: 130px; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.93rem; line-height: 1.6;
  color: var(--text); resize: vertical;
}
.fg-textarea:focus { outline: none; border-color: var(--primary); }
.fg-textarea:disabled { background: #f8f9fa; color: var(--muted); }
.fg-user-lbl { font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }

.fg-done-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 40px 32px; text-align: center; }
.fg-done-icon  { font-size: 3.5rem; margin-bottom: 10px; }
.fg-done-title { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.fg-done-sub   { color: var(--muted); }

.review-section, .review-hd { margin-top: 32px; }
.review-hd { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.rev-q { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px 20px; margin-bottom: 12px; }
.rev-q-hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.rev-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: white; font-size: 0.78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rev-num.ok  { background: var(--success); }
.rev-num.bad { background: var(--danger); }
.rev-q-text  { font-size: 0.93rem; font-weight: 600; line-height: 1.4; white-space: pre-wrap; }
.rev-ans-list { display: flex; flex-direction: column; gap: 5px; }
.rev-ans { padding: 7px 12px; border-radius: 6px; font-size: 0.86rem; line-height: 1.4; border-left: 3px solid transparent; }
.rev-ans.ok   { background: var(--success-bg); border-left-color: var(--success); }
.rev-ans.bad  { background: var(--danger-bg);  border-left-color: var(--danger); }
.rev-ans.miss { background: #f0fdf4;            border-left-color: #9ecca9; }
.rev-ans.skip { background: #f8f9fa;            border-left-color: var(--border); }

.fg-rev-q { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 18px 22px; margin-bottom: 14px; }
.fg-rev-q-text { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; white-space: pre-wrap; }
.fg-rev-lbl { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.fg-rev-lbl.m { color: var(--primary); }
.fg-rev-lbl.u { color: var(--muted); margin-top: 10px; }
.fg-rev-model { background: #eef2fa; border-left: 3px solid var(--primary); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 0.88rem; line-height: 1.65; white-space: pre-wrap; }
.fg-rev-user  { background: #fafafa; border-left: 3px solid var(--border); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 0.88rem; line-height: 1.65; color: var(--muted); white-space: pre-wrap; font-style: italic; }

/* â”€â”€ Loader â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.loader { text-align: center; padding: 60px 20px; color: var(--muted); }
.loader-spin {
  width: 40px; height: 40px;
  border: 4px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* â”€â”€ Webinar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.webinar-page { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }

.webinar-hero {
  background: linear-gradient(135deg, var(--primary), #2a5298);
  border-radius: var(--radius); padding: 36px 32px; color: white;
}
.webinar-title    { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.webinar-subtitle { font-size: 1rem; opacity: 0.85; }

.webinar-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 32px;
}
.webinar-section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 16px;
}
.webinar-steps {
  padding-left: 1.4em; display: flex; flex-direction: column; gap: 18px;
}
.webinar-steps li { line-height: 1.7; }
.webinar-hint {
  margin-top: 20px; padding: 14px 18px;
  background: var(--warn-bg); border-left: 3px solid var(--warn);
  border-radius: 6px; font-size: 0.92rem; line-height: 1.6;
}
.webinar-room-card { border-top: 3px solid #2d8cff; }
.webinar-room-card p { line-height: 1.7; }

/* Webinar curriculum */
.webinar-curriculum { display: flex; flex-direction: column; gap: 0; }
.wc-block {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.wc-block:last-child { border-bottom: 1px solid var(--border); }
.wc-webinar-label {
  font-weight: 600; font-size: 0.95rem;
  color: var(--text); margin-bottom: 4px;
}
.wc-hf {
  font-size: 0.82rem; color: var(--primary);
  font-weight: 500; margin-bottom: 6px;
}
.wc-modules {
  margin: 0; padding-left: 1.2em;
  display: flex; flex-direction: column; gap: 2px;
  list-style: disc;
}
.wc-modules li { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.wc-module-link { color: inherit; text-decoration: none; }
.wc-module-link:hover { text-decoration: underline; color: var(--primary); }
.webinar-room-card a:not(.btn) { color: var(--accent); text-decoration: underline; }
.btn-lg { font-size: 1.05rem; padding: 14px 36px; }

/* Feedback-Modal Sternbewertung */
.fb-star-rating { display: flex; gap: 4px; margin-bottom: 4px; }
.fb-star { font-size: 1.9rem; color: var(--border); cursor: pointer; transition: color .1s; line-height: 1; user-select: none; }
.fb-star.fb-star-on    { color: #f59e0b; }
.fb-star.fb-star-hover { color: #fbbf24; }
#fb-star-label { font-size: .82rem; color: var(--muted); min-height: 1.2em; }

/* Modul-Rating */
.mod-rating-wrap { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); text-align: left; }
.mod-rating-prompt { font-size: .93rem; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.mod-rating-done   { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.mod-rating-stars  { margin-bottom: 10px; }
.mod-rating-comment { max-width: 420px; margin-top: 4px; }

/* Wiki-Feedback */
.wiki-fb-wrap   { margin-top: 32px; padding: 18px 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.wiki-fb-prompt { font-size: .93rem; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.wiki-fb-done   { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.wiki-fb-btn    { min-width: 90px; }
.wiki-fb-active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }

[data-theme=”dark”] .webinar-card { background: #1a1f2e; }

/* Webinar-Feedback */
.wfb-qi-row { display: flex; flex-direction: column; gap: 18px; margin: 18px 0 6px; }
.wfb-qi-item { display: flex; flex-direction: column; gap: 8px; }
.wfb-qi-label { font-size: 0.93rem; font-weight: 600; color: var(--text); }
.wfb-qi-desc  { font-size: 0.80rem; color: var(--muted); margin-top: -4px; }
.star-group { display:flex; flex-direction:row-reverse; justify-content:flex-start; gap:0; margin-bottom:10px; }
.star-opt input { display:none; }
.star-opt span { font-size:2rem; color:var(--border); cursor:pointer; transition:color .1s; line-height:1.2; padding:0 2px; user-select:none; }
.star-opt:has(input:checked) span,
.star-opt:has(input:checked) ~ .star-opt span { color:#f59e0b; }
.star-group:hover .star-opt span { color:var(--border); }
.star-group:hover .star-opt:hover span,
.star-group:hover .star-opt:hover ~ .star-opt span { color:#f59e0b; }
.wfb-scale-hint { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--muted); padding: 0 2px; }
.wfb-date-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 4px; }
.wfb-date-row .form-group { margin: 0; }

/* â”€â”€ Wiki â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.wiki-search-wrap { margin-bottom: 16px; }
.wiki-tag-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wiki-tag-btn {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 14px; font-size: .82rem;
  cursor: pointer; color: var(--muted); transition: all .13s;
}
.wiki-tag-btn:hover { border-color: var(--primary); color: var(--primary); }
.wiki-tag-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.wiki-alpha-filter {
  display: flex; flex-wrap: wrap; gap: 3px;
  padding: 10px 0 20px; border-top: 1px solid var(--border); margin-top: 4px;
}
.wiki-alpha-btn {
  background: none; border: 1px solid transparent;
  border-radius: 5px; padding: 2px 7px; font-size: .78rem; font-weight: 600;
  cursor: pointer; color: var(--muted); transition: all .12s; min-width: 26px; text-align: center;
}
.wiki-alpha-btn:hover { border-color: var(--border); color: var(--text); }
.wiki-alpha-btn.active { background: var(--hover); border-color: var(--border); color: var(--primary); }
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.wiki-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px;
  display: flex; flex-direction: column; height: 100%; box-shadow: var(--shadow);
  transition: transform 0.13s, box-shadow 0.13s;
}
.wiki-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); text-decoration: none; }
.wiki-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.wiki-card-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.wiki-card-desc  {
  font-size: 0.85rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.wiki-card-tags  { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 10px; }
.wiki-tag-chip {
  display: inline-block; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 9px; font-size: .74rem;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
a.wiki-tag-chip:hover { border-color: var(--primary); color: var(--primary); }
[data-theme="dark"] .wiki-tag-btn { background: #1a1f2e; }
[data-theme="dark"] .wiki-tag-chip { background: #0f1117; }

.wiki-article h1 { font-size: 1.6rem; color: var(--primary); margin-bottom: 6px; }

/* Admin-Buttons auf Wiki-Karten */
.wiki-card-wrap { position: relative; }
.wiki-admin-btns {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s; z-index: 2;
}
.wiki-card-wrap:hover .wiki-admin-btns { opacity: 1; }
.wiki-admin-btn {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 8px; font-size: .78rem;
  cursor: pointer; box-shadow: var(--shadow); line-height: 1.4;
}
.wiki-admin-btn:hover       { background: var(--primary); color: #fff; border-color: var(--primary); }
.wiki-admin-del:hover       { background: var(--danger);  color: #fff; border-color: var(--danger); }

/* Wiki Modal */
.wm-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 1000;
  align-items: flex-start; justify-content: center;
  padding: 32px 16px; overflow-y: auto;
}
.wm-backdrop.open { display: flex; }
.wm-modal {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 10px 48px rgba(0,0,0,.22);
  width: 100%; max-width: 780px;
  padding: 28px; position: relative; flex-shrink: 0;
}
.wm-title { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 0 0 20px; }
.wm-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.1rem;
  cursor: pointer; color: var(--muted); line-height: 1; padding: 4px;
}
.wm-close:hover { color: var(--danger); }
[data-theme="dark"] .wm-modal { background: var(--card); }

.prose-page .prose { margin: 20px 0 32px; }

/* â”€â”€ Zertifikat â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cert-page .cert-actions { display: flex; gap: 12px; margin-bottom: 28px; }

.certificate-frame {
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(30,60,110,0.18);
  padding: 20px; max-width: 720px; margin: 0 auto;
  border: 2px solid var(--border);
}
.cert-inner {
  border: 3px solid var(--primary); border-radius: 12px;
  padding: 48px 56px; text-align: center;
  background: linear-gradient(160deg, #fafcff 0%, #f5f8ff 100%);
}
.cert-logo img { height: 56px; margin-bottom: 28px; }
.cert-title    { font-size: 2.2rem; color: var(--primary); font-weight: 900; letter-spacing: 0.5px; margin-bottom: 6px; }
.cert-subtitle { font-size: 1rem; color: var(--muted); margin-bottom: 36px; }
.cert-name     { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; font-style: italic; }
.cert-text     { font-size: 1.05rem; color: var(--text); line-height: 1.7; margin-bottom: 32px; }
.cert-meta     { font-size: 0.9rem; color: var(--muted); margin-bottom: 32px; }
.cert-seal {
  display: flex; justify-content: center;
}
.seal-ring {
  width: 90px; height: 90px; border-radius: 50%;
  border: 4px solid var(--primary); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px;
  text-align: center; padding: 10px;
}

/* â”€â”€ Admin â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px;
  text-align: center; box-shadow: var(--shadow);
}
.stat-val { font-size: 2.4rem; font-weight: 900; color: var(--primary); }
.stat-lbl { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.admin-actions { display: flex; gap: 12px; }

.search-form { display: flex; gap: 10px; margin-bottom: 20px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); }
.data-table th {
  padding: 11px 16px; background: var(--primary); color: white;
  font-size: 0.82rem; font-weight: 600; text-align: left;
}
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }
.actions-cell { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; }
.empty-row { text-align: center; color: var(--muted); padding: 28px; }
.muted { color: var(--muted); font-size: 0.85rem; }

.quick-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; }

/* â”€â”€ Tag-System â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.product-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.product-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: white; padding: 4px 14px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.3px;
}

.tag-pill {
  display: inline-block; background: #eef2fa;
  color: var(--primary); border: 1px solid #cdd8ed;
  border-radius: 12px; padding: 2px 9px;
  font-size: 0.75rem; font-weight: 600; margin-right: 4px;
}

.tag-checkboxes { display: flex; flex-direction: column; gap: 8px; }
.tag-check-label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500;
  transition: border-color 0.13s, background 0.13s;
}
.tag-check-label:has(input:checked) {
  border-color: var(--primary); background: #eef2fa;
}
.tag-check-label input { width: 16px; height: 16px; cursor: pointer; }
[data-theme="dark"] .tag-check-label:has(input:checked) { background: #1e3a5f; }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 6px; display: block; }

/* â”€â”€ Admin Dashboard Grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.dash-section {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden;
}
.dash-wide { grid-column: 1 / -1; }
.dash-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.dash-section-head h2 { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin: 0; }

/* Activity Feed */
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.activity-dot.pass    { background: var(--success); }
.activity-dot.fail    { background: var(--danger); }
.activity-dot.neutral { background: var(--muted); }
.activity-body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.activity-user   { font-weight: 600; }
.activity-module { color: var(--muted); }
.activity-time   { color: var(--muted); font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }

/* Mini Progress Bar */
.mini-progress-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.mini-progress-track {
  flex: 1; height: 6px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.mini-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}
.mini-progress-fill.complete { background: var(--success); }
.mini-pct { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* Score Badge */
.score-badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 0.78rem; font-weight: 700;
}
.score-badge.pass { background: var(--success-bg); color: var(--success); }
.score-badge.fail { background: var(--danger-bg);  color: var(--danger); }

/* â”€â”€ Reward / Badge System â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.reward-title-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  color: white; padding: 3px 12px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}

.reward-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.reward-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600;
  border: 2px solid var(--border);
  transition: transform 0.15s;
}
.reward-chip.earned {
  background: linear-gradient(135deg, #fff8f3, #fff);
  border-color: var(--accent); color: var(--accent-dk);
}
.reward-chip.locked {
  background: var(--bg); color: var(--muted);
  opacity: 0.55; filter: grayscale(0.6);
}
.reward-chip-icon { font-size: 1rem; }
.reward-chip-label { white-space: nowrap; }

/* Badge collection auf Profilseite */
.badge-collection {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.badge-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 12px; border-radius: 12px;
  border: 2px solid var(--border); gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.badge-item.earned {
  border-color: var(--accent);
  background: linear-gradient(160deg, #fff8f3, #fff);
  box-shadow: 0 2px 12px rgba(232,96,26,0.12);
}
.badge-item.locked {
  opacity: 0.45; filter: grayscale(0.7);
}
.badge-item.earned:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,96,26,0.18); }
.badge-item-icon  { font-size: 2rem; }
.badge-item-title { font-size: 0.82rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.badge-item-desc  { font-size: 0.73rem; color: var(--muted); line-height: 1.4; }
.badge-item-check { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-top: 2px; }

/* Toast Notification */
.reward-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--accent); color: white;
  padding: 14px 20px; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.92rem; font-weight: 600;
  animation: toastIn 0.3s ease, toastOut 0.4s ease 4s forwards;
  max-width: 320px;
}
.reward-toast-icon { font-size: 1.6rem; flex-shrink: 0; }
.reward-toast-text { line-height: 1.4; }
.reward-toast-title { font-size: 1rem; display: block; }
.reward-toast-sub   { font-size: 0.8rem; opacity: 0.85; display: block; }
@keyframes toastIn  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; pointer-events:none; } }

/* â”€â”€ Skip Link â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--primary); color: white;
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  font-size: 0.9rem; font-weight: 600; z-index: 9999;
  transition: top 0.15s; text-decoration: none;
}
.skip-link:focus { top: 0; outline: 3px solid var(--accent); }

/* â”€â”€ Zugangsinfoblock (Profil) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.access-info {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  border: 2px solid var(--border); margin-bottom: 18px;
}
.access-info-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.access-ok      { border-color: var(--success); background: var(--success-bg); }
.access-ok      .access-info-dot { background: var(--success); }
.access-warn    { border-color: var(--warn);    background: var(--warn-bg); }
.access-warn    .access-info-dot { background: var(--warn); }
.access-expired { border-color: var(--danger);  background: var(--danger-bg); }
.access-expired .access-info-dot { background: var(--danger); }
.access-none    { border-color: var(--border);  background: var(--bg); }
.access-none    .access-info-dot { background: var(--muted); }

.access-info-body { display: flex; flex-direction: column; gap: 2px; }
.access-info-status   { font-weight: 700; font-size: 0.92rem; }
.access-info-date     { font-size: 0.85rem; color: var(--muted); }
.access-info-remaining { font-size: 0.85rem; }
.access-info-remaining strong { color: var(--text); }
.access-warn .access-info-remaining strong { color: var(--warn); }

/* â”€â”€ Toggle Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toggle-btn {
  width: 52px; height: 28px; border-radius: 14px;
  background: var(--border); border: none; cursor: pointer;
  position: relative; transition: background 0.2s;
  flex-shrink: 0; padding: 0;
}
.toggle-btn.on { background: var(--primary); }
.toggle-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: white; transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25); display: block;
}
.toggle-btn.on .toggle-knob { transform: translateX(24px); }

/* â”€â”€ Settings Page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.settings-section-title {
  font-size: 1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 16px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.settings-row-info { flex: 1; }
.settings-row-label { font-weight: 600; font-size: 0.95rem; }
.settings-row-desc  { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* â”€â”€ Avatar Picker â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.avatar-preview-wrap {
  display: flex; justify-content: center; margin-bottom: 20px;
}
.avatar-preview-img {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary); box-shadow: var(--shadow);
}
.avatar-preview-initial {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 2.5rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--primary);
}
.avatar-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.avatar-option {
  border: 3px solid transparent; border-radius: 50%;
  padding: 0; cursor: pointer; background: none;
  transition: border-color 0.15s, transform 0.15s;
  aspect-ratio: 1 / 1; overflow: hidden;
}
.avatar-option img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
}
.avatar-option:hover  { border-color: var(--primary); transform: scale(1.06); }
.avatar-option:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.avatar-option.selected { border-color: var(--accent); }
.avatar-upload-row {
  padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.avatar-upload-hint { font-size: 0.8rem; color: var(--muted); }

/* header avatar image */
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

/* â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 16px 20px 12px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; flex-wrap: wrap; gap: 8px; }
.footer-inner a { color: rgba(255,255,255,0.7); }
.footer-inner a:hover { color: white; }
.footer-nav a { margin-left: 16px; }
.footer-nav a:first-child { margin-left: 0; }
.footer-credit { max-width: 1200px; margin: 8px auto 0; font-size: 0.75rem; color: rgba(255,255,255,0.45); padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-credit a { color: rgba(255,255,255,0.45); }
.footer-credit a:hover { color: rgba(255,255,255,0.75); }
.footer-version { opacity: 0.55; font-size: 0.78rem; margin-left: 8px; }

/* â”€â”€ Nach-oben-Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--primary); color: white;
  border: none; cursor: pointer; font-size: 1.4rem; line-height: 44px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.15s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover   { background: var(--primary-dk); transform: translateY(-3px); }

/* â”€â”€ Vorstellung Step â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.vorstellung-step { max-width: 540px; }
.vorstellung-header { text-align: center; margin-bottom: 28px; padding: 24px 16px 0; }
.vorstellung-icon { font-size: 2.6rem; margin-bottom: 10px; }
.vorstellung-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; }
.vorstellung-desc { color: var(--muted); font-size: 0.875rem; line-height: 1.5; margin: 0; }
.vorstellung-desc a { color: var(--accent); }
.vorstellung-form { padding: 0 4px; }
.v-optional {
  display: inline-block; font-size: 0.72rem; font-weight: 500;
  color: var(--muted); background: var(--bg);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px; vertical-align: middle; margin-left: 6px;
}
.vorstellung-actions { margin-top: 22px; }

/* â”€â”€ Achievements / Erfolge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-achievement-section {
  margin-top: 28px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  padding: 12px 16px 18px;
}
.dash-ach-score {
  display: flex; align-items: center; gap: 18px;
  background: var(--card);
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.dash-ach-score-stat { display: flex; align-items: baseline; gap: 6px; }
.dash-ach-score-val  { font-size: 1.5rem; font-weight: 700; color: var(--primary); line-height: 1; }
.dash-ach-score-lbl  { font-size: 0.82rem; color: var(--muted); }
.dash-ach-score-divider { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
.dash-ach-score-link {
  margin-left: auto; font-size: 0.82rem; color: var(--primary);
  text-decoration: none; white-space: nowrap;
}
.dash-ach-score-link:hover { text-decoration: underline; }
.achievement-grid {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  justify-content: center;
}
.achievement-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 14px 12px 10px;
  border-radius: 12px; text-align: center; cursor: default;
  min-width: 74px; flex: 0 0 auto;
  border: 1.5px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}
.achievement-item.locked {
  opacity: 0.35; filter: grayscale(1);
}
.achievement-item.earned {
  background: var(--hover); border-color: var(--border);
}
.achievement-item.earned:hover { transform: translateY(-2px); }
.achievement-icon { font-size: 2rem; line-height: 1; }
.achievement-title {
  font-size: 0.67rem; font-weight: 600; color: var(--text);
  line-height: 1.3; max-width: 80px;
}
.achievement-progress {
  font-size: 0.65rem; color: var(--primary); font-weight: 700;
}
.achievement-check {
  font-size: 0.65rem; color: var(--success); font-weight: 700;
}

.achievement-toast { border-left: 3px solid var(--accent); }

/* Gamification deaktiviert â€” Hinweis */
.dash-gamification-off {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 20px; font-size: 0.9rem; color: var(--muted);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.dash-gamification-off a { color: var(--primary); font-weight: 600; }
.dash-gam-dismiss-btn {
  margin-left: auto; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  font-size: 0.78rem; color: var(--muted); padding: 4px 0;
  text-decoration: underline;
}
.dash-gam-dismiss-btn:hover { color: var(--text); }

/* Gamification sub-toggle disabled state */
.toggle-row-disabled { opacity: 0.4; pointer-events: none; }

/* â”€â”€ Highscore / Leaderboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.leaderboard-section {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px 12px; margin-bottom: 28px;
}
.leaderboard-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.leaderboard-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.leaderboard-my-rank { margin-left: auto; font-size: 0.85rem; color: var(--muted); }
.leaderboard-list { display: flex; flex-direction: column; gap: 2px; }
.leaderboard-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 8px;
  transition: background 0.12s;
}
.leaderboard-row:hover { background: var(--hover); }
.leaderboard-row-me { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.leaderboard-row-me:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.lb-rank { width: 32px; text-align: center; flex-shrink: 0; }
.lb-medal { font-size: 1.3rem; line-height: 1; }
.lb-num   { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.lb-avatar-wrap { flex-shrink: 0; }
.lb-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
}
.lb-initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 0.9rem; font-weight: 700;
}
.lb-name  { flex: 1; font-size: 0.9rem; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-points { flex-shrink: 0; font-size: 0.95rem; font-weight: 700; color: var(--primary); }
.lb-pts-lbl { font-size: 0.75rem; font-weight: 400; color: var(--muted); }

.lb-show-all {
  display: block; text-align: center;
  margin-top: 10px; padding: 8px;
  font-size: 0.85rem; color: var(--primary);
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.lb-show-all:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .leaderboard-section { padding: 16px 14px 10px; }
}

/* â”€â”€ Dashboard Mobile Hamburger â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-nav-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 399;
}
.dash-nav-backdrop.open { display: block; }

.dash-mobile-bar  { display: none; }
.dash-sidebar-close { display: none; }

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 900px) {
  /* Sidebar wird zum Drawer */
  .dash-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 290px; max-width: 88vw;
    z-index: 400; overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 28px rgba(0,0,0,0.22);
    border-right: none;
  }
  .dash-sidebar.dash-sidebar-open { transform: translateX(0); }

  /* SchlieÃŸen-Button oben rechts im Drawer */
  .dash-sidebar-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.08); border: none;
    font-size: 1rem; cursor: pointer; color: var(--text);
    z-index: 1;
  }
  .dash-sidebar-close:hover { background: rgba(0,0,0,0.14); }

  .dash-mobile-bar {
    display: flex; align-items: center;
    position: sticky; top: 73px; z-index: 150;
    background: transparent;
    padding: 4px 16px 4px;
  }
  .dash-ham-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary); border: none;
    border-radius: 8px; padding: 5px 12px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    color: #fff; transition: background 0.12s;
  }
  .dash-ham-btn:hover { background: var(--accent); }
  [data-theme="dark"] .dash-ham-btn { background: #fff; color: #1a1f2e; }
  [data-theme="dark"] .dash-ham-btn:hover { background: #e8eaf0; }

  .dash-main { padding: 16px; }
}

/* Dark/language controls: desktop only in header-right; mobile inside hamburger menu */
.nav-mobile-controls { display: none; }

@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; padding: 12px; flex-direction: column;
    border-bottom: 2px solid var(--accent); box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  .main-nav.open { display: flex; }
  .hamburger { display: flex; }
  .user-name  { display: none; }
  .header-right .lang-form { display: none; }

  .nav-mobile-controls {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding-top: 10px; margin-top: 6px;
    border-top: 1px solid var(--border);
  }
  .nav-mobile-controls .lang-btn { flex: 1; justify-content: center; }

  .logo-link  { width: auto; flex-shrink: 1; min-width: 0; }
  .logo       { height: 36px; max-width: 180px; object-fit: contain; object-position: left; }
  .header-inner { padding-right: 12px; }
  .header-right { gap: 8px; padding-left: 8px; }

  .method-grid { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .dash-grid   { grid-template-columns: 1fr; }
  .dash-wide   { grid-column: 1; }

  .module-nav { flex-direction: column; gap: 10px; }
  .module-nav .btn { width: 100%; justify-content: center; }

  .wizard-content { padding: 20px 16px 4px; }
  .wizard-nav     { padding: 14px 16px 20px; }
  .wizard-progress {
    padding: 16px 12px 0;
    justify-content: center;
    gap: 10px;
    overflow: visible;
  }
  .wizard-progress .wiz-label     { display: none; }
  .wizard-progress .wiz-connector { display: none; }
  .wizard-progress .wiz-step { min-width: 36px; }
  .wizard-progress .wiz-dot  { width: 36px; height: 36px; font-size: 0.85rem; }

  .cert-inner { padding: 28px 20px; }
  .cert-title { font-size: 1.6rem; }
  .cert-name  { font-size: 1.5rem; }

  .quiz-actions { flex-direction: column; gap: 8px; }
  .quiz-actions .btn, .quiz-actions button { width: 100%; }
  .quiz-actions #btn-next   { order: 1; }
  .quiz-actions #btn-fav    { order: 2; }
  .quiz-actions #btn-reveal { order: 3; }
  .quiz-actions #btn-abort  { order: 4; margin-right: 0; }
}

@media (max-width: 480px) {
  .container { padding: 16px 12px 40px; }
  .q-card    { padding: 18px 14px; }
  .res-card  { padding: 28px 16px; }
  .login-card { padding: 28px 20px; }
  .stats-grid { grid-template-columns: 1fr; }

  .logo       { height: 28px; max-width: 130px; }
  .header-right { gap: 6px; padding-left: 6px; }
}

/* Badge-Trail: Desktop / Mobile */
.badge-trail-mobile  { display: none; }
@media (max-width: 768px) {
  .badge-trail-desktop { display: none; }
  .badge-trail-mobile  { display: flex; justify-content: center; padding: 8px 0 4px; }
}

/* â”€â”€ Admin Sub-Navigation â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-subnav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px 16px;
  margin-bottom: 24px;
  overflow: visible;
}
.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-item:hover { background: var(--hover); color: var(--text); }
.admin-nav-item.active { background: var(--primary); color: #fff; }
.admin-nav-item.has-badge { color: var(--danger); }
.admin-nav-badge {
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 0.7rem;
  line-height: 1.6;
}
.admin-nav-item.active .admin-nav-badge { background: rgba(255,255,255,0.35); }

/* -- Admin Nav Dropdowns -- */
.admin-nav-group { position: relative; }
.admin-nav-group-label { cursor: pointer; user-select: none; }
.admin-nav-group-label::after { content: ' \25be'; font-size: .68rem; opacity: .65; }
.admin-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
  min-width: 175px;
  z-index: 300;
  padding: 4px;
  padding-top: 8px;
}
.admin-nav-group:hover .admin-nav-dropdown,
.admin-nav-group.open  .admin-nav-dropdown { display: block; }
.admin-nav-dropdown .admin-nav-item { display: flex; border-radius: 6px; }
[data-theme="dark"] .admin-nav-dropdown {
  background: #1a1f2e;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
}

/* â”€â”€ Admin Charts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-charts-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;
}
.admin-chart-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.admin-chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.admin-chart-wrap {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-chart-legend {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.acl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .admin-charts-row { flex-direction: column; }
  .admin-subnav { padding: 6px 12px; }
}

/* â”€â”€ Admin KPI header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-kpi-val { font-size: 1.9rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.admin-kpi-lbl { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* â”€â”€ Payment chart filter buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pay-chart-filters { display: flex; gap: 3px; }
.pay-cf-btn {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pay-cf-btn:hover { background: var(--hover); color: var(--text); }
.pay-cf-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* -- Gamification stats bar (profile page) ------------------------------ */
.gam-stats-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.gam-stat { display: flex; align-items: baseline; gap: 6px; }
.gam-stat-val { font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1; }
.gam-stat-lbl { font-size: 0.82rem; color: var(--muted); }
.gam-stat-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
.gam-stat-link {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.gam-stat-link:hover { text-decoration: underline; }

/* ── Demo-Zugang ─────────────────────────────────────────────────── */
.demo-banner {
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  color: #92400e;
  padding: 10px 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}
[data-theme="dark"] .demo-banner {
  background: #3b2a00;
  border-color: #78500a;
  color: #fcd34d;
}
.demo-banner-link {
  font-weight: 600;
  color: #92400e;
  text-decoration: underline;
  white-space: nowrap;
}
[data-theme="dark"] .demo-banner-link { color: #fcd34d; }
.demo-banner-link:hover { opacity: 0.8; }

.demo-profile-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.875rem;
  color: #92400e;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
[data-theme="dark"] .demo-profile-notice {
  background: #3b2a00;
  border-color: #78500a;
  color: #fcd34d;
}
.demo-profile-notice-link {
  font-weight: 600;
  color: #92400e;
  text-decoration: underline;
  white-space: nowrap;
}
[data-theme="dark"] .demo-profile-notice-link { color: #fcd34d; }

.demo-feature-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
}
.demo-lock-icon { font-size: 2rem; line-height: 1; }
.demo-lock-text { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ── Gründer-Auszeichnung ────────────────────────────────────────── */
.founder-badge {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%);
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(245,158,11,0.15);
}
[data-theme="dark"] .founder-badge {
  background: linear-gradient(135deg, #3b2a00 0%, #4a3400 100%);
  border-color: #b45309;
  box-shadow: 0 2px 12px rgba(180,83,9,0.25);
}
.founder-badge-icon { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }
.founder-badge-body { flex: 1; }
.founder-badge-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 3px;
}
[data-theme="dark"] .founder-badge-title { color: #fcd34d; }
.founder-badge-desc { font-size: 0.83rem; color: #b45309; }
[data-theme="dark"] .founder-badge-desc  { color: #fbbf24; }
.founder-badge-excl {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #92400e;
  background: #fde68a;
  border: 1px solid #f59e0b;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="dark"] .founder-badge-excl {
  background: #78500a;
  border-color: #b45309;
  color: #fcd34d;
}

/* ── Gründer-Kennzeichnung im Chat ───────────────────────────────── */
.msg-founder-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #92400e;
  background: #fde68a;
  border: 1px solid #f59e0b;
  border-radius: 20px;
  padding: 1px 7px;
  vertical-align: middle;
  white-space: nowrap;
}
[data-theme="dark"] .msg-founder-chip {
  background: #78500a;
  border-color: #b45309;
  color: #fcd34d;
}
.msg-founder-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #b45309;
}
[data-theme="dark"] .msg-founder-label { color: #fbbf24; }

.msg-instructor-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent-dk);
  border-radius: 20px;
  padding: 1px 7px;
  vertical-align: middle;
  white-space: nowrap;
}
[data-theme="dark"] .msg-instructor-chip {
  background: #c44e12;
  border-color: #e8601a;
}
.msg-instructor-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
[data-theme="dark"] .msg-instructor-label { color: #fb923c; }

.user-card-hidden-hint {
  font-size: 0.75rem;
  margin-left: 4px;
  opacity: 0.6;
  vertical-align: middle;
  cursor: default;
}

/* ── Barrierefreiheit ─────────────────────────────────────────────────────── */

/* Große Schrift: skaliert alle rem-Werte */
html[data-font="large"] { font-size: 112%; }

/* Hoher Kontrast – Hellmodus */
html[data-contrast="high"] {
  --text:   #000000;
  --muted:  #3a3a3a;
  --border: #5a5a5a;
  --card:   #ffffff;
  --bg:     #f5f5f5;
}
html[data-contrast="high"] .site-header { border-bottom-width: 4px; }
html[data-contrast="high"] .card,
html[data-contrast="high"] .q-card,
html[data-contrast="high"] .res-card    { border: 2px solid var(--border); }
html[data-contrast="high"] .btn         { border-width: 2px; font-weight: 600; }
html[data-contrast="high"] .nav-link    { font-weight: 600; }
html[data-contrast="high"] a            { text-decoration: underline; }
html[data-contrast="high"] a.btn,
html[data-contrast="high"] a.nav-link,
html[data-contrast="high"] a.logo-link  { text-decoration: none; }
html[data-contrast="high"] .form-control { border-width: 2px; }
html[data-contrast="high"] .ans         { border-width: 2px; }

/* Hoher Kontrast – Dunkelmodus */
html[data-contrast="high"][data-theme="dark"] {
  --text:   #ffffff;
  --muted:  #d0d0d0;
  --border: #9a9a9a;
  --card:   #0a0a0a;
  --bg:     #000000;
}
html[data-contrast="high"][data-theme="dark"] .site-header { background: #000; }
html[data-contrast="high"][data-theme="dark"] .main-nav    { background: #000; }

/* Tastaturnavigation – sichtbare Fokus-Ringe für alle interaktiven Elemente */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.form-control:focus-visible,
.fg-textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}
.toggle-btn:focus-visible { outline-offset: 4px; }

/* Badge "Immer aktiv" in Einstellungen */
.settings-row-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--success-bg);
  color: var(--success);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Row-Action-Dropdown (Nutzerliste) */
.row-drop-wrap { position: relative; display: inline-block; }
.row-drop-menu {
  display: none; position: fixed;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 170px; overflow: hidden; z-index: 400;
}
[data-theme="dark"] .row-drop-menu { background: #1a1f2e; }
.row-drop-menu.open { display: block; }
.row-drop-menu a,
.row-drop-menu button.row-drop-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 16px; font-size: 0.88rem; color: var(--text);
  background: none; border: none; cursor: pointer;
  transition: background 0.12s; white-space: nowrap;
}
.row-drop-menu a:hover,
.row-drop-menu button.row-drop-item:hover { background: var(--hover); text-decoration: none; }
.row-drop-menu .drop-danger { color: var(--danger); }
.row-drop-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
[data-theme="dark"] .row-drop-menu a:hover,
[data-theme="dark"] .row-drop-menu button.row-drop-item:hover { background: #252d40; }

/* ═══════════════════════════════════════════════════════════════
   GLOBAL SEARCH
   ═══════════════════════════════════════════════════════════════ */

/* ── Desktop search bar inside main-nav ── */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.header-search-form {
  display: flex;
  align-items: center;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: visible;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,60,110,.12);
}
.header-search-input {
  background: transparent;
  border: none;
  outline: none;
  padding: 5px 4px 5px 14px;
  font-size: 0.85rem;
  color: var(--text);
  width: 160px;
  transition: width 0.2s;
}
.header-search-input:focus { width: 220px; }
.header-search-input::placeholder { color: var(--muted); }
.header-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 10px 5px 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.header-search-btn:hover { color: var(--primary); }

/* ── Live-dropdown ── */
.header-search-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 340px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  z-index: 1100;
  overflow: hidden;
}
.header-search-dd.open { display: block; }
.hsd-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.hsd-item:last-of-type { border-bottom: none; }
.hsd-item:hover { background: var(--hover); text-decoration: none; }
.hsd-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.hsd-badge--wiki  { color: #2563eb; }
.hsd-badge--kurs  { color: #059669; }
.hsd-badge--forum { color: #d97706; }
[data-theme="dark"] .hsd-badge--wiki  { color: #60a5fa; }
[data-theme="dark"] .hsd-badge--kurs  { color: #34d399; }
[data-theme="dark"] .hsd-badge--forum { color: #fbbf24; }
.hsd-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.hsd-snippet {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hsd-empty {
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
.hsd-all {
  display: block;
  padding: 9px 14px;
  font-size: 0.82rem;
  color: var(--primary);
  background: var(--hover);
  text-decoration: none;
  text-align: center;
  font-weight: 600;
}
.hsd-all:hover { text-decoration: underline; }
.header-search-dd mark,
.search-result-title mark,
.search-result-snippet mark {
  background: rgba(232,96,26,.18);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
[data-theme="dark"] .header-search-dd mark,
[data-theme="dark"] .search-result-title mark,
[data-theme="dark"] .search-result-snippet mark {
  background: rgba(232,96,26,.3);
}

/* ── Mobile search in nav hamburger ── */
.nav-mobile-search {
  display: none;
  padding: 10px 16px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-search-wrap {
  display: flex;
  align-items: center;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.mobile-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 8px 8px 14px;
  font-size: 0.9rem;
  color: var(--text);
}
.mobile-search-input::placeholder { color: var(--muted); }
.mobile-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
}

/* show mobile search inside open hamburger nav */
.main-nav.open .nav-mobile-search { display: block; }

/* hide desktop search on small screens */
@media (max-width: 768px) {
  .header-search { display: none; }
}

/* ── Search results page ── */
.search-page { padding-top: 28px; }
.search-page-form { margin: 20px 0 32px; }
.search-page-input-wrap {
  display: flex;
  gap: 0;
  max-width: 560px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-page-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,60,110,.1);
}
.search-page-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 16px;
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
}
.search-page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.search-page-btn:hover { opacity: .88; }
.search-count {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Search filter tabs */
.sr-tabs { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:24px; flex-wrap:wrap; }
.sr-tab  { padding:8px 16px; font-size:.88rem; font-weight:600; cursor:pointer; border:none;
           background:none; color:var(--muted); border-bottom:3px solid transparent; margin-bottom:-2px;
           border-radius:6px 6px 0 0; transition:color .15s; display:flex; align-items:center; gap:6px; }
.sr-tab:hover  { color:var(--text); }
.sr-tab.active { color:var(--primary); border-bottom-color:var(--primary); background:var(--hover); }
.sr-tab-count  { font-size:.72rem; font-weight:700; padding:1px 7px; border-radius:20px;
                 background:var(--border); color:var(--muted); line-height:1.6; }
.sr-tab.active .sr-tab-count { background:var(--primary); color:#fff; }

/* Quiz search result items */
.search-quiz-item { flex-direction:column; align-items:flex-start; gap:6px; }
.srq-source { font-size:.75rem; font-weight:700; color:var(--primary); text-transform:uppercase;
              letter-spacing:.04em; }
.srq-question { font-size:.93rem; font-weight:600; color:var(--text); line-height:1.45; }
.srq-actions  { display:flex; gap:8px; margin-top:4px; }
.search-empty {
  color: var(--muted);
  margin-top: 16px;
}
.search-section { margin-bottom: 36px; }
.search-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.search-section-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--hover);
  border-radius: 20px;
  padding: 1px 8px;
}
.search-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-result-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: box-shadow 0.15s;
}
.search-result-item:hover { box-shadow: var(--shadow); }
.search-result-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 4px;
}
.search-result-title:hover { text-decoration: underline; }
.search-result-snippet {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Re-engagement (Admin Inaktive Nutzer) ── */
.reeng-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.reeng-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  background: var(--card);
  list-style: none;
  user-select: none;
}
.reeng-summary::-webkit-details-marker { display: none; }
.reeng-summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: .8rem; }
details.reeng-group[open] .reeng-summary::after { content: "▴"; }
.reeng-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
}
.reeng-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.reeng-group > form { padding: 0 16px 14px; }

/* ── Merkzettel Sektionen & Flashcards ── */
.fav-section-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.fav-section-count {
  font-size: 0.78rem; font-weight: 500; color: var(--muted);
  background: var(--hover); border-radius: 20px; padding: 1px 8px;
}
.fav-flashcard-list {
  display: flex; flex-direction: column; gap: 8px;
}
.fav-flash-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.fav-flash-tag {
  font-size: 0.75rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.fav-flash-q {
  font-size: 0.93rem; font-weight: 600; color: var(--text);
  margin-bottom: 10px; line-height: 1.5;
}
.fav-flash-answer {
  background: var(--hover); border-radius: calc(var(--radius) - 2px);
  padding: 12px 14px; margin-bottom: 10px;
}
.fav-flash-answer-head {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.fav-flash-answer-body {
  font-size: 0.88rem; color: var(--text); line-height: 1.6;
}
.fav-flash-actions {
  display: flex; align-items: center; gap: 8px;
}
.btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem; padding: 4px 6px;
  border-radius: var(--radius); transition: color .15s;
}
.btn-icon:hover { color: var(--danger); }

/* ── Admin: UI-Einstellungen Badges ── */
.ui-pref-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
  margin-right: 2px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.ui-pref-lang  { background: rgba(30,60,110,.12); color: var(--primary); }
.ui-pref-dark  { background: rgba(30,30,60,.12);  color: #6366f1; font-size: .85rem; }
.ui-pref-light { background: rgba(240,180,40,.15); color: #b45309; font-size: .85rem; }
.ui-pref-acc   { background: var(--hover); color: var(--muted); }
[data-theme="dark"] .ui-pref-lang  { background: rgba(100,140,220,.2); }
[data-theme="dark"] .ui-pref-dark  { background: rgba(100,100,220,.2); }
[data-theme="dark"] .ui-pref-light { background: rgba(240,180,40,.2); }

/* ── Public page controls (login / demo / forgot) ── */
.pub-controls {
  position: fixed;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1000;
}
.pub-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pub-ctrl-btn:hover {
  background: rgba(255,255,255,0.30);
  text-decoration: none;
}
.pub-ctrl-btn.pub-lang-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
[data-theme="dark"] .pub-ctrl-btn {
  background: rgba(20,26,46,0.70);
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
}
[data-theme="dark"] .pub-ctrl-btn:hover {
  background: rgba(20,26,46,0.90);
}
[data-theme="dark"] .pub-ctrl-btn.pub-lang-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
