/* === DSB-Portal · Apple-like Design · Akzentfarbe #91251e === */

:root {
  --accent: #91251e;
  --accent-light: #b53326;
  --accent-dark: #7a1e19;
  --accent-soft: #fef2f2;
  --bg: #fafafa;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --border: #e5e5e5;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #71717a;
  --text-soft: #a1a1aa;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 6px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .12s; }
a:hover { color: var(--accent); }

input, textarea, select, button { font: inherit; color: inherit; }

input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),
textarea, select {
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 13px;
  background: #fff;
  width: 100%;
  font-size: 14.5px;
  transition: border-color .12s, box-shadow .12s;
}
input[type=checkbox], input[type=radio] {
  width: auto; margin: 0; accent-color: var(--accent); flex: 0 0 auto;
}
input[type=file] {
  width: auto; border: 1px dashed var(--border-strong);
  padding: 8px; border-radius: 8px; background: var(--bg-alt);
  font-size: 13px; cursor: pointer;
}
input[type=file]:hover { border-color: var(--accent); background: #fff; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(145, 37, 30, 0.12);
}
button { cursor: pointer; border: none; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
table { width: 100%; border-collapse: collapse; }
img { max-width: 100%; height: auto; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; background: var(--bg-alt); padding: 1.5px 6px; border-radius: 4px;
}

/* === Tailwind-Subset === */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-32 { width: 8rem; }
.h-1 { height: 4px; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:col-span-2 { grid-column: span 2; }
}
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-1 { grid-column: span 1; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; min-width: 0; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-2 { padding-inline: 8px; }
.px-3 { padding-inline: 12px; }
.px-4 { padding-inline: 16px; }
.px-6 { padding-inline: 24px; }
.py-1 { padding-block: 4px; }
.py-1\.5 { padding-block: 6px; }
.py-2 { padding-block: 8px; }
.py-2\.5 { padding-block: 10px; }
.py-3 { padding-block: 12px; }
.py-4 { padding-block: 16px; }
.py-6 { padding-block: 24px; }
.py-8 { padding-block: 32px; }
.py-10 { padding-block: 40px; }
.py-16 { padding-block: 64px; }
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.ml-1 { margin-left: 4px; }
.mr-1 { margin-right: 4px; }
.ml-4 { margin-left: 16px; }
.ml-12 { margin-left: 48px; }
.mr-12 { margin-right: 48px; }
.mt-0\.5 { margin-top: 2px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-1\.5 > * + * { margin-top: 6px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 13.5px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 26px; line-height: 1.25; }
.text-3xl { font-size: 32px; line-height: 1.2; }
.text-5xl { font-size: 48px; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-nowrap { white-space: nowrap; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.uppercase { text-transform: uppercase; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.bg-white { background: #fff; }
.bg-neutral-50 { background: #fafafa; }
.bg-neutral-100 { background: #f5f5f5; }
.bg-\[\#91251e\] { background: var(--accent); }
.bg-accent { background: var(--accent); }
.bg-accent-soft { background: var(--accent-soft); }
.bg-blue-50 { background: #eff6ff; }
.bg-red-50 { background: #fef2f2; }
.bg-amber-50 { background: #fffbeb; }
.bg-emerald-50 { background: #ecfdf5; }
.text-white { color: #fff; }
.text-neutral-400 { color: #a1a1aa; }
.text-neutral-500 { color: #71717a; }
.text-neutral-600 { color: #525252; }
.text-neutral-700 { color: #404040; }
.text-neutral-800 { color: #262626; }
.text-neutral-900 { color: #18181b; }
.text-\[\#91251e\] { color: var(--accent); }
.text-accent { color: var(--accent); }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-amber-800 { color: #92400e; }
.text-blue-800 { color: #1e40af; }
.text-emerald-600 { color: #059669; }
.text-emerald-800 { color: #065f46; }
.border { border: 1px solid var(--border); }
.border-0 { border: 0; }
.border-2 { border-width: 2px; }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-neutral-100 { border-color: #f5f5f5; }
.border-neutral-200 { border-color: var(--border); }
.border-neutral-300 { border-color: var(--border-strong); }
.border-\[\#91251e\] { border-color: var(--accent); }
.border-red-200 { border-color: #fecaca; }
.border-red-300 { border-color: #fca5a5; }
.border-amber-200 { border-color: #fde68a; }
.border-blue-200 { border-color: #bfdbfe; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-300 { border-color: #6ee7b7; }

.rounded { border-radius: 6px; }
.rounded-md { border-radius: 8px; }
.rounded-lg { border-radius: 10px; }
.rounded-xl { border-radius: 14px; }
.rounded-2xl { border-radius: 16px; }
.rounded-3xl { border-radius: 22px; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.transition { transition: all 0.12s ease-in-out; }
.hover\:border-\[\#91251e\]:hover { border-color: var(--accent); }
.hover\:bg-\[\#7a1e19\]:hover { background: var(--accent-dark); }
.hover\:bg-accent-dark:hover { background: var(--accent-dark); }
.hover\:text-\[\#91251e\]:hover { color: var(--accent); }
.hover\:bg-neutral-50:hover { background: #fafafa; }
.hover\:bg-neutral-100:hover { background: var(--bg-alt); }
.hover\:shadow:hover { box-shadow: var(--shadow); }
.hover\:shadow-sm:hover { box-shadow: var(--shadow-sm); }
.focus\:border-\[\#91251e\]:focus { border-color: var(--accent); }
.focus\:ring-\[\#91251e\]:focus { box-shadow: 0 0 0 4px rgba(145,37,30,0.12); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-help { cursor: help; }
.break-all { word-break: break-all; }
.divide-y > * + * { border-top: 1px solid var(--border); }
.divide-neutral-100 > * + * { border-top-color: #f5f5f5; }
.divide-neutral-200 > * + * { border-top-color: var(--border); }

/* === Komponenten === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; font-weight: 500; font-size: 14px;
  border: 1px solid transparent; transition: all .12s; cursor: pointer; text-decoration: none;
}
.btn-primary, a.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, a.btn-primary:hover, .btn-primary:focus { background: var(--accent-dark); color: #fff !important; }
.btn-ghost, a.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover, a.btn-ghost:hover { background: var(--bg-alt); color: var(--text) !important; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-padded { padding: 24px; }

.list-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 14px 18px; text-decoration: none; color: inherit;
  border-bottom: 1px solid #f5f5f5; transition: background .12s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fafafa; }
.list-row__main { flex: 1 1 auto; min-width: 0; }
.list-row__title { font-weight: 500; color: #18181b; line-height: 1.3; text-align: left; }
.list-row__meta { font-size: 12.5px; color: #71717a; margin-top: 3px; text-align: left; }
.list-row__aside { flex: 0 0 auto; font-size: 12.5px; color: #a1a1aa; text-align: right; white-space: nowrap; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em; }
.badge-neutral { background: var(--bg-alt); color: var(--text-muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warn { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }

/* Auth */
.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 20px;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.auth-card {
  width: 100%; max-width: 400px; background: #fff;
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 36px 32px;
}
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-logo { height: 44px; width: auto; margin: 0 auto 14px; display: block; }
.auth-title { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.auth-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12.5px; }
.auth-foot a { color: var(--text-muted); }
.auth-foot a:hover { color: var(--accent); }
.auth-mini-footer {
  margin-top: 30px; font-size: 12px; color: var(--text-soft);
  display: flex; gap: 16px;
}
.auth-mini-footer a:hover { color: var(--accent); }

/* Header */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  max-width: 1152px; margin: 0 auto;
  padding: 11px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.site-brand img { height: 32px; width: auto; border-radius: 6px; }
.site-brand__name { font-weight: 600; font-size: 14.5px; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.site-context {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
  color: var(--accent); font-weight: 500; font-size: 14px;
}
.site-context select {
  background: transparent; border: 0; color: var(--text); font-weight: 400;
  font-size: 13px; padding: 2px 22px 2px 6px; cursor: pointer; width: auto;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
}
.site-context select:focus { box-shadow: none; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 13.5px; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted); }
.site-nav a:hover, .site-nav a.is-active { color: var(--accent); }
.site-nav__logout { color: var(--text-soft); font-size: 13px; }
.site-nav__logout:hover { color: var(--accent); }

/* Dropdown im Header */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown__toggle {
  background: transparent; border: 0; color: var(--text-muted);
  font-size: 13.5px; font-family: inherit; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 2px;
}
.nav-dropdown__toggle:hover { color: var(--accent); }
.nav-dropdown__menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 220px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .12s, visibility .12s, transform .12s;
  transform: translateX(-50%) translateY(-4px);
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown__menu::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 14px;
}
.nav-dropdown__menu a {
  display: block; padding: 9px 12px; font-size: 14px; border-radius: 8px;
  color: var(--text); white-space: nowrap;
}
.nav-dropdown__menu a:hover { background: var(--accent-soft); color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 56px;
  padding: 20px 24px; text-align: center; font-size: 12.5px; color: var(--text-soft);
}
.site-footer a { color: var(--text-muted); margin: 0 8px; }
.site-footer a:hover { color: var(--accent); }

/* Main */
.site-main { max-width: 1152px; margin: 0 auto; padding: 36px 24px 64px; }

/* Mobile */
@media (max-width: 640px) {
  .site-header__inner { padding: 9px 14px; }
  .site-main { padding: 24px 14px 40px; }
  .max-w-6xl { padding-left: 12px; padding-right: 12px; }
  .site-nav { gap: 14px; font-size: 13px; }
  .site-context { font-size: 13px; }
  .site-brand__name { display: none; }
  .text-2xl { font-size: 22px; }
}

/* WYSIWYG */
.wysiwyg-wrapper { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.wysiwyg-toolbar {
  display: flex; flex-wrap: wrap; gap: 3px; padding: 7px 9px;
  background: #fafafa; border-bottom: 1px solid var(--border);
}
.wysiwyg-toolbar button {
  padding: 4px 11px; font-size: 13px; background: #fff;
  border: 1px solid var(--border-strong); border-radius: 5px; cursor: pointer; line-height: 1;
}
.wysiwyg-toolbar button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.wysiwyg-toolbar .sep { width: 1px; background: var(--border-strong); margin: 4px 4px; }
.wysiwyg-editor { min-height: 280px; padding: 16px 18px; font-size: 15px; line-height: 1.6; outline: none; }
.wysiwyg-editor:focus { box-shadow: inset 0 0 0 2px rgba(145, 37, 30, 0.12); }
.wysiwyg-editor h2 { font-size: 22px; font-weight: 600; margin: 12px 0 8px; }
.wysiwyg-editor h3 { font-size: 18px; font-weight: 600; margin: 10px 0 6px; }
.wysiwyg-editor p { margin: 0 0 10px; }
.wysiwyg-editor ul, .wysiwyg-editor ol { padding-left: 24px; margin: 8px 0; }
.wysiwyg-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.wysiwyg-editor a { color: var(--accent); text-decoration: underline; }

/* Schulung Fragen */
.answer-options { display: flex; flex-direction: column; gap: 9px; }
.answer-option {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; border: 1px solid var(--border-strong); border-radius: 10px;
  cursor: pointer; background: #fff; transition: all 0.12s; font-size: 15px;
}
.answer-option:hover { border-color: var(--accent); background: #fafafa; }
.answer-option input[type=radio] { width: 18px; height: 18px; }
.answer-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Prose */
.prose h1, .prose h2 { font-weight: 600; margin: 16px 0 8px; letter-spacing: -0.015em; }
.prose h2 { font-size: 22px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 14px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 24px; margin: 8px 0 12px; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose strong { font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 14px; margin: 12px 0; color: #525252; }
.schulung-warning {
  border: 2px solid var(--accent); background: var(--accent-soft);
  padding: 13px 15px; border-radius: 10px; margin: 10px 0;
}
.prose .schulung-warning strong { color: var(--accent); }

/* Stat / Quick-Action */
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; transition: all .12s; text-decoration: none; color: inherit; display: block;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-card__label { font-size: 13px; color: var(--text-muted); }
.stat-card__value { font-size: 30px; font-weight: 600; margin-top: 4px; letter-spacing: -0.025em; }
.stat-card__hint { font-size: 12px; color: var(--text-soft); margin-top: 8px; }
.stat-card.is-alert { border-color: var(--accent); }
.stat-card.is-alert .stat-card__value { color: var(--accent); }

.quick-action {
  display: block; background: #fff;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; transition: all .12s; text-decoration: none; color: inherit;
}
.quick-action:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.quick-action.is-primary { border: 2px solid var(--accent); }
.quick-action.is-primary:hover { background: var(--accent-soft); }
.quick-action__title { font-weight: 500; font-size: 14.5px; }
.quick-action.is-primary .quick-action__title { color: var(--accent); }
.quick-action__sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* Page-Header */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-header h1 { font-size: 26px; }
.page-header__sub { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.page-back { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: inline-block; }
.page-back:hover { color: var(--accent); }

.section-title { font-size: 16.5px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.form-grid { display: grid; gap: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.topic-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.topic-card.is-important { border: 2px solid var(--accent); }
.topic-card__title { font-weight: 500; }
.topic-card__meta { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; }
.topic-card__body { font-size: 14px; color: var(--text); margin-top: 8px; white-space: pre-line; }

/* Handbuch-Bausteine */
.section-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all .12s;
}
.section-toggle:hover { border-color: var(--accent); }
.section-toggle.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.section-toggle__title { font-weight: 500; font-size: 14.5px; }
.section-toggle__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.section-toggle input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; }

/* === Benachrichtigungen (Bell + List) === */
.nav-bell { position: relative; display: inline-flex; align-items: center; }
.nav-bell__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; color: var(--text);
  text-decoration: none; transition: background .12s, color .12s;
  position: relative;
}
.nav-bell__btn:hover { background: var(--accent-soft); color: var(--accent); }
.nav-bell__icon { font-size: 17px; line-height: 1; }
.nav-bell__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 600;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: transparent;
}
.notif-item:last-child { border-bottom: none; }
.notif-item--unread { background: var(--accent-soft); }
.notif-item__icon { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title { font-weight: 500; font-size: 14.5px; color: var(--text); }
.notif-item__text { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.notif-item__meta { font-size: 11.5px; color: var(--text-soft); margin-top: 5px; }
.notif-item__actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-sm { font-size: 12px; padding: 4px 9px; min-height: 28px; }

.empty-state { text-align: center; padding: 60px 24px; }
.empty-state__icon { font-size: 38px; opacity: .6; }
.empty-state__text { font-size: 14px; color: var(--text-muted); margin-top: 10px; }

/* === Dark Mode === */
body.theme-dark {
  --bg: #0f0f10;
  --bg-soft: #18181b;
  --text: #e9e9ea;
  --text-muted: #a1a1aa;
  --text-soft: #71717a;
  --border: #2a2a2e;
  --accent-soft: #3a1212;
  --card-bg: #18181b;
}
body.theme-dark .card,
body.theme-dark .site-header,
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select { background-color: var(--card-bg); color: var(--text); border-color: var(--border); }
body.theme-dark .site-header { background-color: var(--bg-soft); }
body.theme-dark .badge-neutral { background: #27272a; color: #d4d4d8; }
body.theme-dark table thead { background-color: #1c1c1f !important; }
body.theme-dark .btn-primary, body.theme-dark a.btn-primary { color: #fff !important; }

/* === Statistik-Bars === */
.stats-bars { display: flex; align-items: flex-end; gap: 7px; height: 130px; padding: 8px 0; }
.stats-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.stats-bar__fill {
  width: 100%; max-width: 24px;
  background: var(--accent); border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: opacity .15s;
}
.stats-bar__fill:hover { opacity: 0.8; }
.stats-bar__fill--green { background: #16a34a; }
.stats-bar__label { font-size: 9.5px; color: var(--text-soft); margin-top: 4px; }
.stats-bar__value { font-size: 10.5px; font-weight: 500; }

/* === Onboarding-Checkliste === */
.onboarding-step {
  padding: 9px 13px; border-radius: 8px;
  background: #fafafa; font-size: 13.5px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.onboarding-step.is-done { background: #dcfce7; color: #14532d; text-decoration: line-through; opacity: .85; }
.onboarding-step a { margin-left: auto; color: var(--accent); }

.btn-active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* === Globale Suche (⌘K) === */
.search-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.search-modal.is-open { display: block; }
.search-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.search-modal__panel {
  position: relative; max-width: 640px; margin: 80px auto 0;
  background: #fff; border-radius: 14px; box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  overflow: hidden;
}
body.theme-dark .search-modal__panel { background: var(--card-bg); color: var(--text); }
.search-modal__panel input {
  width: 100%; padding: 18px 22px; font-size: 17px;
  border: none; outline: none; background: transparent;
  border-bottom: 1px solid var(--border);
}
body.theme-dark .search-modal__panel input { color: var(--text); }
.search-modal__hint { padding: 8px 22px; font-size: 11.5px; color: var(--text-soft); background: #fafafa; border-bottom: 1px solid var(--border); }
body.theme-dark .search-modal__hint { background: #1c1c1f; }
.search-modal__list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.search-modal__list li { display: flex; align-items: center; gap: 12px; padding: 11px 22px; cursor: pointer; border-bottom: 1px solid var(--border); }
.search-modal__list li:hover, .search-modal__list li.is-selected { background: var(--accent-soft); }
.search-modal__type {
  display: inline-block; font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
  background: #f3f4f6; color: var(--text-muted); flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500;
}
body.theme-dark .search-modal__type { background: #27272a; color: #d4d4d8; }
.search-modal__title { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-modal__sub { font-size: 12px; color: var(--text-soft); flex-shrink: 0; }
.search-modal__empty { padding: 20px 22px; color: var(--text-muted); font-size: 13.5px; text-align: center; }

/* Trigger-Button im Header */
.nav-search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text-muted);
  font-size: 13px; cursor: pointer;
  transition: border-color .12s, color .12s;
}
.nav-search-trigger:hover { border-color: var(--accent); color: var(--accent); }
.nav-search-trigger__kbd {
  font-family: ui-monospace,monospace; font-size: 11px;
  padding: 1px 5px; border-radius: 4px; background: #e5e5e5; color: var(--text-muted);
}
body.theme-dark .nav-search-trigger__kbd { background: #2a2a2e; }

/* === Drag-and-Drop === */
.dropzone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 22px 18px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fafafa;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone--over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__hint { font-size: 13.5px; color: var(--text-muted); }
.dropzone__files { margin-top: 10px; text-align: left; font-size: 12.5px; color: var(--text); }
.dropzone__file { padding: 2px 0; }
body.theme-dark .dropzone { background: #1c1c1f; }
