/* ================================================================
   Forum – Modern Dark Refresh
   Discord/GitHub-inspiriert · Monochrome Basis · Indigo-Akzent
   ================================================================ */

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

/* ── LIGHT MODE ── */
:root {
  --color-accent:       #4f46e5;
  --color-accent-hover: #4338ca;
  --color-accent-soft:  rgba(79,70,229,.10);
  --color-accent-ring:  rgba(79,70,229,.25);
  --color-danger:       #dc2626;
  --color-success:      #16a34a;
  --color-warning:      #d97706;

  --bg-body:     #f7f7f8;
  --bg-surface:  #ffffff;
  --bg-surface2: #f3f3f5;
  --bg-surface3: #e8e8eb;
  --bg-header:   #ffffff;
  --bg-header-border: #e8e8eb;
  --bg-thead:    #f3f3f5;

  --border:        #e6e6e9;
  --border-strong: #d4d4d8;

  --text-base:    #18181b;
  --text-muted:   #71717a;
  --text-faint:   #a1a1aa;
  --text-on-dark: #ffffff;
  --text-link:    #18181b;
  --text-link-hover: #4f46e5;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── DARK MODE (Discord/GitHub-Stil) ── */
[data-theme="dark"] {
  --color-accent:       #818cf8;
  --color-accent-hover: #a5b4fc;
  --color-accent-soft:  rgba(129,140,248,.12);
  --color-accent-ring:  rgba(129,140,248,.35);
  --color-danger:       #f87171;
  --color-success:      #4ade80;
  --color-warning:      #fbbf24;

  --bg-body:     #0a0a0b;
  --bg-surface:  #131316;
  --bg-surface2: #1a1a1f;
  --bg-surface3: #24242b;
  --bg-header:   #0f0f12;
  --bg-header-border: #1f1f24;
  --bg-thead:    #18181d;

  --border:        #24242b;
  --border-strong: #34343d;

  --text-base:    #e7e7ea;
  --text-muted:   #9b9ba3;
  --text-faint:   #5e5e68;
  --text-on-dark: #ffffff;
  --text-link:    #e7e7ea;
  --text-link-hover: #a5b4fc;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
}

/* ── GLOBAL ── */
html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-base);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-link-hover); text-decoration: none; }
img { max-width: 100%; }

code {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── LAYOUT ── */
#app { min-height: 100vh; display: flex; flex-direction: column; }
#wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 20px 20px;
  flex: 1;
  width: 100%;
}

/* ── HEADER ── */
#site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--bg-header-border);
  backdrop-filter: saturate(180%) blur(12px);
}

/* ── Zeile 0: Logo-Banner ── */
.header-banner {
  padding: 0 20px;
  border-bottom: 1px solid var(--bg-header-border);
  background: linear-gradient(180deg, var(--bg-surface2) 0%, var(--bg-header) 100%);
}
.header-banner .header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: 130px;
  padding: 16px 0;
}
#forum-logo-banner {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-base);
  transition: transform var(--transition);
}
#forum-logo-banner:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
#forum-logo-banner img,
#forum-logo-banner svg {
  max-height: 100px;
  height: auto;
  width: auto;
  display: block;
  /* Im Light-Mode bleibt currentColor schwarz, im Dark-Mode weiß */
  color: var(--text-base);
}
/* Inline-SVG hat ohne explizite Höhe oft 0 Pixel – garantiere Mindesthöhe */
#forum-logo-banner svg {
  height: 100px;
}
@media (max-width: 700px) {
  #forum-logo-banner svg { height: 60px; }
}

/* ── Zeile 1: Top-Bar ── */
.header-top {
  padding: 0 20px;
}
.header-top .header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  flex-wrap: wrap;
}

/* Mobile: Banner kompakter */
@media (max-width: 700px) {
  .header-banner .header-inner { min-height: 80px; padding: 10px 0; }
  #forum-logo-banner img, #forum-logo-banner svg { max-height: 60px; }
}

/* Search bar */
#header-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  gap: 8px;
}
#quicksearch-wrap {
  position: relative;
  flex: 1;
  display: flex;
}
#quicksearch-wrap input {
  flex: 1;
  min-width: 0;
}
#header-search input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface2);
  color: var(--text-base);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: all var(--transition);
}
#header-search input::placeholder { color: var(--text-faint); }
#header-search input:focus {
  background: var(--bg-surface);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
}
#header-search button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface2);
  color: var(--text-base);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
#header-search button:hover {
  background: var(--bg-surface3);
  border-color: var(--border-strong);
}

/* User-Bereich rechts */
#header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}
.user-icon:hover {
  background: var(--bg-surface2);
  color: var(--text-base);
  text-decoration: none;
}
.user-icon .nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  margin: 0;
}
.nav-badge {
  background: var(--color-accent);
  color: #fff;
  border-radius: 10px;
  min-width: 18px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
  line-height: 1.5;
  text-align: center;
}

/* User-Menü Dropdown */
.user-menu {
  position: relative;
}
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 10px 4px 4px;
  color: var(--text-base);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.user-menu-toggle:hover {
  background: var(--bg-surface2);
}
.user-menu-avatar {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface2);
  display: block;
  flex-shrink: 0;
}
.user-menu-name {
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 200;
  animation: qs-slide 150ms ease-out;
}
.user-menu.open .user-menu-dropdown { display: block; }
.user-menu-dropdown a,
.user-menu-dropdown .user-menu-theme-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-base);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
}
.user-menu-dropdown a:hover,
.user-menu-dropdown .user-menu-theme-btn:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.user-menu-logout {
  color: var(--color-danger) !important;
}

/* ── Zeile 2: Hauptnavigation ── */
.header-nav-main {
  padding: 0 20px;
  background: var(--bg-header);
  border-top: 1px solid var(--bg-header-border);
}
.header-nav-main .header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav-main .header-inner::-webkit-scrollbar { display: none; }
.header-nav-main a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.header-nav-main a:hover {
  color: var(--text-base);
  background: var(--bg-surface2);
  text-decoration: none;
}
.header-nav-main a.active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  font-weight: 600;
}

/* Mobile-Anpassungen */
@media (max-width: 700px) {
  .user-menu-name { display: none; }
  .header-top .header-inner { gap: 10px; height: 56px; }
  .header-nav-main a { padding: 6px 10px; font-size: 12px; }
}

/* ── BREADCRUMB ── */
#breadcrumb {
  background: transparent;
  border-bottom: none;
  padding: 14px 20px 4px;
  font-size: 12px;
  color: var(--text-muted);
}
#breadcrumb .bc-inner { max-width: 1320px; margin: 0 auto; }
#breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
#breadcrumb a:hover { color: var(--color-accent); }
#breadcrumb .sep { margin: 0 8px; opacity: .4; }

/* ── FLASH MESSAGES ── */
.flash {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
}
.flash-info    { background: var(--bg-surface2); color: var(--text-base); border-left: 3px solid #777; }
.flash-success { background: var(--bg-surface2); color: var(--text-base); border-left: 3px solid var(--color-success); }
.flash-error   { background: var(--bg-surface2); color: var(--text-base); border-left: 3px solid var(--color-danger); }

/* ── PAGE CONTENT ── */
.page-content { padding: 20px 0 40px; }

/* ── CARD ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
/* Cards die Action-Dropdowns enthalten dürfen nicht clippen,
   sonst werden die Menüs unten/seitlich abgeschnitten. */
.card:has(.action-dropdown),
.form-card:has(.action-dropdown) {
  overflow: visible;
}
.card-header {
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header .card-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.card-body { padding: 0; }

/* ── CATEGORY BLOCK ── */
.category-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 18px 4px 8px;
}
.category-label:first-child { padding-top: 8px; }

/* ── FORUM TABLE ── */
.forum-table {
  width: 100%;
  border-collapse: collapse;
}
.forum-table th {
  background: var(--bg-thead);
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.forum-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13px;
}
.forum-table tr:last-child td { border-bottom: none; }
.forum-table tr:hover td { background: var(--bg-surface2); }

.board-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  filter: grayscale(.3);
}
.board-title-link { font-weight: 600; color: var(--text-base); font-size: 14px; }
.board-title-link:hover { color: var(--text-link-hover); }
.board-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-cell { text-align: center; font-size: 13px; color: var(--text-muted); }
.last-post-cell { font-size: 12px; color: var(--text-muted); }
.last-post-cell a { color: var(--text-base); }

/* ── THREAD TABLE ── */
.thread-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  filter: grayscale(.3);
}
.thread-icon-wrap.sticky  { background: #3a3a30; }
.thread-icon-wrap.closed  { background: #2a2a2a; }
[data-theme="dark"] .thread-icon-wrap.sticky { background: #3a3a30; }
[data-theme="dark"] .thread-icon-wrap.closed { background: #1a1a1a; }

.thread-title-link { font-weight: 600; color: var(--text-base); }
.thread-title-link:hover { color: var(--text-link-hover); }
.thread-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  margin-right: 4px;
  border: 1px solid var(--border);
}
.badge-sticky { background: var(--bg-surface3); color: var(--text-base); }
.badge-closed { background: var(--bg-surface3); color: var(--text-muted); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  border-color: var(--color-accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--color-accent-ring);
}
[data-theme="dark"] .btn-primary { color: #fff; }
[data-theme="dark"] .btn-primary:hover { color: #fff; }

.btn-danger  { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-danger:hover  { background: #b91c1c; color: #fff; border-color: #b91c1c; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-base);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-surface2);
  color: var(--text-base);
  border-color: var(--border-strong);
  text-decoration: none;
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* ── FORMS ── */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}
.form-card h2 { font-size: 18px; margin-bottom: 20px; font-weight: 600; letter-spacing: -.3px; }
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font-size: 12px; font-weight: 500;
  margin-bottom: 6px; color: var(--text-muted);
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=number],
.form-row input[type=datetime-local],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font);
  background: var(--bg-surface);
  color: var(--text-base);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-row textarea { min-height: 160px; resize: vertical; }
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
}
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-row input[type=checkbox] { margin-right: 6px; vertical-align: middle; }

/* ── BB TOOLBAR ── */
.bb-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 6px;
}
.bb-toolbar button {
  padding: 4px 10px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-base);
  font-size: 12px; font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition);
}
.bb-toolbar button:hover { background: var(--bg-surface3); border-color: var(--border-strong); }

/* ── POSTS ── */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-header {
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-muted);
}
.post-header a { color: var(--text-muted); font-weight: 600; }
.post-header a:hover { color: var(--text-base); }
.post-body { display: flex; }
.post-user-col {
  width: 160px; min-width: 160px;
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  background: var(--bg-surface2);
}
.post-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
  filter: grayscale(.15);
}
.post-username { font-weight: 700; font-size: 13px; }
.post-username a { color: var(--text-base); }
.post-username a:hover { color: var(--text-link-hover); }
.rank-title { font-size: 11px; }
.rank-stars { font-size: 10px; margin-top: 2px; letter-spacing: 1px; filter: grayscale(.5); }
.star { font-size: 11px; }
.post-count-label { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
/* ── ROLLEN-TAGS (einheitlich überall) ── */
.role-tag {
  display: inline-block;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .3px;
  line-height: 1.5;
  vertical-align: 1px;
  white-space: nowrap;
}
.role-tag-admin   { background: #dc2626; }
.role-tag-mod     { background: #f59e0b; }
.role-tag-fmod    { background: #f59e0b; }
.role-tag-banned  { background: #6b7280; }

/* Größere Variante für Profil-Hero und Post-Karte */
.role-tag-lg {
  font-size: 11px;
  padding: 3px 12px;
}

/* Legacy-Aliases (alte Klassen bleiben funktional, leiten auf neuen Stil um) */
.post-admin-badge,
.post-mod-badge,
.post-banned-badge,
.member-role-tag {
  display: inline-block;
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .3px;
  line-height: 1.5;
  background: #f59e0b;
  border: none;
  margin: 0;
}
.post-admin-badge  { background: #dc2626 !important; }
.post-mod-badge    { background: #f59e0b !important; }
.post-banned-badge { background: #6b7280 !important; }

[data-theme="dark"] .post-admin-badge,
[data-theme="dark"] .post-mod-badge,
[data-theme="dark"] .post-banned-badge {
  color: #fff !important;
}

.post-content-col { padding: 16px; flex: 1; min-width: 0; }
.post-text { font-size: 13px; line-height: 1.75; word-wrap: break-word; }
.post-signature {
  border-top: 1px dashed var(--border);
  margin-top: 14px; padding-top: 10px;
  font-size: 12px; color: var(--text-muted);
}
.post-footer {
  border-top: 1px solid var(--border);
  padding: 6px 16px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface2);
}
.post-action { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.post-action:hover { color: var(--text-base); text-decoration: none; }
.post-ip code { background: transparent; padding: 0; color: var(--text-muted); font-size: 12px; }
.post-ip:hover code { color: var(--text-base); }

/* ── MOD BAR ── */
.mod-bar {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.mod-bar a { color: var(--text-base); font-weight: 600; }

/* ── PROFILE ── */
.profile-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex; gap: 24px; align-items: flex-start;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.profile-hero-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  object-fit: cover; flex-shrink: 0;
  filter: grayscale(.15);
}
.profile-hero-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.profile-stat { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.profile-stat strong { color: var(--text-base); }

/* ── PM ── */
.pm-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.pm-list-item:last-child { border-bottom: none; }
.pm-list-item:hover { background: var(--bg-surface2); }
.pm-list-item.unread { background: var(--bg-surface2); font-weight: 600; border-left: 3px solid var(--text-base); }
.pm-subject a { font-size: 13px; color: var(--text-base); }
.pm-subject a:hover { color: var(--text-link-hover); }
.pm-meta { margin-left: auto; font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 16px 0; flex-wrap: wrap; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted);
  transition: all var(--transition);
}
.pagination a.active { background: var(--color-accent); color: var(--bg-surface); border-color: var(--color-accent); }
[data-theme="dark"] .pagination a.active { color: #000; }
.pagination a:hover:not(.active) { background: var(--bg-surface2); color: var(--text-base); text-decoration: none; }

/* ── SEARCH ── */
.search-result {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.search-result-header {
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.search-result-body { padding: 12px 16px; font-size: 13px; line-height: 1.7; color: var(--text-muted); }
mark {
  background: var(--text-base);
  color: var(--bg-surface);
  padding: 0 3px; border-radius: 2px; font-weight: 600;
}

/* ── BB-CODE STYLES ── */
pre.bb-code {
  background: var(--bg-surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  margin: 8px 0;
  overflow-x: auto;
}
blockquote.bb-quote {
  background: var(--bg-surface2);
  border-left: 3px solid var(--color-accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  color: var(--text-base);
  font-size: 13px;
  position: relative;
}
blockquote.bb-quote::before {
  content: "💬";
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 14px;
  opacity: .4;
}
blockquote.bb-quote cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
blockquote.bb-quote cite .quote-link {
  color: var(--color-accent);
  text-decoration: none;
}
blockquote.bb-quote cite .quote-link:hover {
  text-decoration: underline;
}
/* Verschachtelte Quotes etwas einrücken */
blockquote.bb-quote blockquote.bb-quote {
  margin-top: 8px;
  background: var(--bg-surface);
}

/* ── SECTION HEADING ── */
.section-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-base);
  letter-spacing: -.3px;
  padding: 20px 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.section-heading > span:last-child {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── ADMIN ── */
.admin-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}
.admin-sidebar {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* sticky entfernt – Menü scrollt jetzt normal mit der Seite */
  box-shadow: var(--shadow-sm);
}
.admin-sidebar-title {
  display: none;
}
.admin-sidebar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  flex-wrap: wrap;
  /* Kein overflow mehr nötig - Items sind durch Gruppen kompakt */
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
}
.admin-nav-item:hover {
  background: var(--bg-surface2);
  color: var(--text-base);
  text-decoration: none;
}
.admin-nav-item.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}
.admin-content {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.admin-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: -.3px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 12px; margin-bottom: 20px; }
.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}
.stat-box:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-box .stat-icon { font-size: 28px; margin-bottom: 6px; filter: grayscale(.2); }
.stat-box .stat-num { font-size: 26px; font-weight: 800; color: var(--text-base); }
.stat-box .stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* ── FOOTER ── */
#site-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 40px;
}
#site-footer a { color: var(--text-muted); transition: color var(--transition); }
#site-footer a:hover { color: var(--color-accent); }

/* ── INSTALL WIZARD ── */
.install-wrap {
  max-width: 640px; margin: 40px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.install-header {
  background: var(--bg-header);
  padding: 28px 32px;
  color: #fff;
}
.install-header h1 { font-size: 22px; font-weight: 800; }
.install-header p  { font-size: 13px; opacity: .65; margin-top: 4px; }
.install-steps {
  display: flex; padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface2);
  flex-wrap: wrap;
}
.install-step {
  padding: 12px 16px;
  font-size: 12px; font-weight: 600;
  color: var(--text-faint);
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent;
}
.install-step.active { color: var(--text-base); border-bottom-color: var(--text-base); }
.install-step.done   { color: var(--text-muted); }
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.install-step.active .step-num { background: var(--text-base); color: var(--bg-surface); }
.install-step.done   .step-num { background: var(--text-muted); color: var(--bg-surface); }
.install-body { padding: 28px 32px; }
.install-body h2 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.req-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.req-row:last-child { border-bottom: none; }
.req-ok   { color: var(--color-success); font-weight: 600; }
.req-fail { color: var(--color-danger);  font-weight: 600; }
.req-warn { color: var(--color-warning); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .header-inner { height: auto; padding: 10px 0; gap: 8px; }
  #header-search { max-width: 100%; order: 3; flex-basis: 100%; }
  .post-user-col { width: 100px; min-width: 100px; }
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .form-card { padding: 20px; }
  .install-wrap { margin: 0; border-radius: 0; }
  .post-body { flex-direction: column; }
  .post-user-col { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ════════════ v0.2 FEATURES ════════════ */

/* Notification Badge - Pulse für neue */
.nav-badge { animation: badge-pulse 2s ease-in-out infinite; }
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* Anhänge */
.attachment-preview img { transition: transform var(--transition); }
.attachment-preview img:hover { transform: scale(1.05); }

/* Polls */
.poll-option-bar {
  background: linear-gradient(90deg, var(--text-base), var(--border-strong));
  height: 8px; border-radius: 4px;
  transition: width 400ms cubic-bezier(.4,0,.2,1);
}

/* Notifications list */
.pm-list-item.unread .pm-subject a {
  font-weight: 700;
}

/* Details/Summary für ausklappbare Bereiche */
details summary { user-select: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 200ms;
  margin-right: 4px;
}
details[open] summary::before {
  transform: rotate(90deg);
}

/* Sprach-Toggle Hover */
#header-nav a[href*="?lang="]:hover {
  background: rgba(255,255,255,.15);
}

/* File-Input modernisieren */
input[type="file"] {
  padding: 8px;
  background: var(--bg-surface2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  color: var(--text-muted);
  font-size: 12px;
}
input[type="file"]:hover { background: var(--bg-surface3); }
input[type="file"]::file-selector-button {
  background: var(--text-base);
  color: var(--bg-surface);
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 10px;
  font-weight: 600;
  font-size: 12px;
}

/* ════════════ SMILEYS ════════════ */

.smiley {
  display: inline-block;
  font-size: 1.15em;
  vertical-align: -2px;
  cursor: help;
  line-height: 1;
}

.smiley-picker {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 420px;
  animation: smiley-pop 150ms ease-out;
}
@keyframes smiley-pop {
  from { opacity: 0; transform: translateY(-4px) scale(.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.smiley-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 20px;
  cursor: pointer;
  transition: all 120ms;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smiley-btn:hover {
  background: var(--bg-surface2);
  border-color: var(--border);
  transform: scale(1.2);
}

@media (max-width: 500px) {
  .smiley-picker { max-width: 100%; }
  .smiley-btn { width: 32px; height: 32px; font-size: 18px; }
}

/* ════════════ QUICK-SEARCH ════════════ */

#quicksearch-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  animation: qs-slide 150ms ease-out;
}
#quicksearch-dropdown.open { display: block; }
@keyframes qs-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qs-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  padding: 10px 14px 6px;
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.qs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-base);
  text-decoration: none;
  transition: background var(--transition);
  cursor: pointer;
}
.qs-item:hover,
.qs-item.qs-selected {
  background: var(--bg-surface2);
  text-decoration: none;
}
.qs-item:last-of-type { border-bottom: none; }

.qs-item-main {
  flex: 1;
  min-width: 0;
}
.qs-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-item-title mark {
  background: var(--text-base);
  color: var(--bg-surface);
  padding: 0 2px;
  border-radius: 2px;
}

.qs-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  filter: grayscale(.15);
}

.qs-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: 1px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.qs-badge-admin  { background: var(--text-base); color: var(--bg-surface); }
.qs-badge-mod    { background: var(--bg-surface3); color: var(--text-base); border: 1px solid var(--border-strong); }
.qs-badge-banned { background: #dc2626; color: #fff; }

.qs-loading,
.qs-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.qs-all {
  display: block;
  padding: 10px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-surface2);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
  position: sticky;
  bottom: 0;
}
.qs-all:hover {
  background: var(--bg-surface3);
  color: var(--text-base);
  text-decoration: none;
}

@media (max-width: 700px) {
  #quicksearch-dropdown {
    max-height: 300px;
  }
}

/* ════════════ REACTIONS ════════════ */

.reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  position: relative;
}

.reaction-pill,
.reaction-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-base);
  cursor: pointer;
  transition: all 150ms;
  font-family: var(--font);
  line-height: 1.2;
}
.reaction-pill:hover,
.reaction-add:hover {
  background: var(--bg-surface3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.reaction-pill.by-me {
  background: var(--text-base);
  color: var(--bg-surface);
  border-color: var(--text-base);
  font-weight: 600;
}
[data-theme="dark"] .reaction-pill.by-me { color: #000; }
.reaction-emoji { font-size: 13px; line-height: 1; }
.reaction-count { font-weight: 600; }
.reaction-add { padding: 3px 8px; color: var(--text-muted); }

.reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  animation: smiley-pop 150ms ease-out;
}
.reaction-picker-btn {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 120ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reaction-picker-btn:hover {
  background: var(--bg-surface2);
  transform: scale(1.25);
}

/* ════════════ ACHIEVEMENTS ════════════ */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.achievement-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  transition: all var(--transition);
}
.achievement-card.earned {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.achievement-card.locked {
  opacity: .45;
  filter: grayscale(.8);
}
.achievement-card:hover { transform: translateY(-3px); }
.achievement-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 8px;
}
.achievement-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-base);
  margin-bottom: 4px;
}
.achievement-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 30px;
  line-height: 1.4;
}
.achievement-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.achievement-points {
  font-weight: 700;
  color: var(--text-base);
  background: var(--bg-surface3);
  padding: 1px 8px;
  border-radius: 10px;
}
.achievement-earned {
  color: var(--color-success);
  font-weight: 600;
}
.achievement-locked {
  color: var(--text-faint);
}

/* ════════════ TAGS ════════════ */

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 150ms;
  line-height: 1.4;
}
.tag-chip:hover {
  background: var(--bg-surface2);
  text-decoration: none;
  transform: translateY(-1px);
}

.tag-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  background: var(--bg-surface);
  transition: all 150ms;
}
.tag-checkbox:hover { background: var(--bg-surface2); }
.tag-checkbox input[type="checkbox"]:checked + span {
  font-weight: 700;
}
.tag-checkbox:has(input:checked) {
  background: var(--bg-surface2);
  box-shadow: inset 0 0 0 1px currentColor;
}

/* ════════════ STARTSEITEN-STATISTIKBOXEN ════════════ */

.info-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.info-box {
  margin-bottom: 0;
}
.online-users {
  font-size: 13px;
  line-height: 1.7;
  max-height: 200px;
  overflow-y: auto;
}
.online-users a {
  text-decoration: none;
  transition: opacity var(--transition);
}
.online-users a:hover {
  opacity: .7;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .info-boxes {
    grid-template-columns: 1fr;
  }
}

/* ════════════ ONLINE-STATUS-PUNKT ════════════ */

.online-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: 1px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-surface);
  position: relative;
}
/* Subtiler Pulse-Effekt nur bei aktiver Online-Anzeige (grün) */
.online-dot[style*="22c55e"] {
  animation: online-pulse 2.5s ease-in-out infinite;
}
@keyframes online-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 0 rgba(34,197,94,.5); }
  50%      { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(34,197,94,0); }
}

/* In der post-username-Spalte (zentriert) */
.post-username {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ════════════ v0.5 FEATURES ════════════ */

/* Profil-Banner */
.profile-banner {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.profile-hero.with-banner {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: 0;
}

/* Ungelesen-Status */
.thread-unread .thread-title-link {
  font-weight: 800;
}
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-base);
  margin-right: 6px;
  vertical-align: 2px;
  animation: unread-pulse 2.5s ease-in-out infinite;
}
@keyframes unread-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* Editor mit Tabs (Live-Vorschau) */
#editor-wrap {
  margin-bottom: 4px;
}
.editor-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.editor-tab {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 150ms;
  font-family: var(--font);
}
.editor-tab.active {
  background: var(--bg-surface);
  color: var(--text-base);
  font-weight: 600;
  border-bottom-color: var(--bg-surface);
}
.editor-tab:hover:not(.active) {
  background: var(--bg-surface3);
}
.editor-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  animation: status-show 200ms forwards;
  font-style: italic;
}
.editor-status:empty {
  display: none;
}
@keyframes status-show {
  to { opacity: 1; }
}

/* ════════════ FORUM-MODERATOREN ════════════ */

.mod-cell {
  vertical-align: top;
  padding: 14px 12px;
  font-size: 12px;
}
.board-mods-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  line-height: 1.5;
}
.board-mods-list a {
  text-decoration: none;
  transition: opacity var(--transition);
}
.board-mods-list a:hover {
  opacity: .7;
  text-decoration: underline;
}
.board-mods-list a:not(:last-child)::after {
  content: ',';
  color: var(--text-muted);
  font-weight: 400;
}

@media (max-width: 900px) {
  .mod-cell { display: none; }
}

/* ════════════ MITGLIEDER-SEITE ════════════ */

.team-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.team-section:last-child {
  border-bottom: none;
}
.team-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}
.team-card:hover {
  background: var(--bg-surface3);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.team-avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  filter: grayscale(.15);
}
.team-info {
  flex: 1;
  min-width: 0;
}
.team-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  margin-bottom: 2px;
}
.team-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Member-Listen-Avatar */
.member-list-avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.member-role-tag {
  display: inline-block;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
  vertical-align: 1px;
}

/* ════════════ DESIGN REFRESH POLISH ════════════ */

/* Sanfter Hover-Lift bei Karten in der Forenübersicht */
.forum-table tr {
  transition: background var(--transition);
}

/* Akzentfarbe für aktive UI-Elemente */
.thread-title-link {
  font-weight: 600;
  color: var(--text-base) !important;
  transition: color var(--transition);
}
.thread-title-link:hover {
  color: var(--color-accent) !important;
  text-decoration: none;
}
.board-title-link {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-base) !important;
  transition: color var(--transition);
}
.board-title-link:hover {
  color: var(--color-accent) !important;
  text-decoration: none;
}

/* Avatar-Schatten für Tiefe */
.post-avatar, .profile-hero-avatar {
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Subtile Hover-Lift für interaktive Karten */
.team-card,
.achievement-card,
.stat-box {
  transition: all var(--transition);
}

/* Scrollbar im Dark Mode subtiler */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-body);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--bg-surface3);
  border-radius: 10px;
  border: 2px solid var(--bg-body);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Selection-Highlight */
::selection {
  background: var(--color-accent-soft);
  color: var(--text-base);
}

/* Subtile Animationen beim Page-Load */
.card, .form-card {
  animation: fade-in 300ms cubic-bezier(.4,0,.2,1);
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Akzent für gelesen-Status */
.unread-dot {
  background: var(--color-accent) !important;
}

/* Margin-Top für Tags im Post-/Profil-Kontext */
.post-user-col .post-admin-badge,
.post-user-col .post-mod-badge,
.post-user-col .post-banned-badge {
  margin-top: 6px;
}
.profile-hero-info .post-admin-badge,
.profile-hero-info .post-mod-badge,
.profile-hero-info .post-banned-badge {
  margin-left: 4px;
  vertical-align: 2px;
}

/* ════════════ ACTION DROPDOWN ════════════ */

.action-dropdown {
  position: relative;
  display: inline-block;
}
.action-dropdown-toggle {
  /* normal styling – nutzt btn/btn-sm-Größe */
}
/* Spezialvariante für reine Icon-⋯-Buttons (Admin-User-Liste) */
.action-dropdown-toggle.action-toggle-icon {
  font-size: 16px;
  padding: 3px 10px;
  line-height: 1;
  letter-spacing: 1px;
}
.action-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: none;
  z-index: 100;
  animation: qs-slide 150ms ease-out;
}
.action-dropdown.open .action-dropdown-menu {
  display: block;
}
.action-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-base);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}
.action-dropdown-menu a:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}
.action-dropdown-menu .action-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.action-dropdown-menu .action-danger {
  color: var(--color-danger);
}
.action-dropdown-menu .action-danger:hover {
  background: rgba(220,38,38,.1);
}

/* ════════════ @MENTION AUTOCOMPLETE ════════════ */

#mention-popup {
  position: absolute;
  min-width: 240px;
  max-width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}
.mention-item:hover,
.mention-item.active {
  background: var(--color-accent-soft);
}
.mention-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.mention-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
}
.mention-empty {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── @Mention-Highlighting in Posts ── */
.post-text a.mention {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--color-accent-soft);
  transition: background var(--transition);
}
.post-text a.mention:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* ════════════ FREIGABE-STATUS ════════════ */

.post-pending {
  opacity: .75;
  border: 1px dashed var(--color-warning) !important;
  position: relative;
}
.post-pending-bar {
  background: rgba(217,119,6,.12);
  color: var(--color-warning);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(217,119,6,.3);
  margin: -1px -1px 0 -1px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ════════════ MOD-EDIT-MARKER ════════════ */

.mod-edit-notice {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.3);
  border-left: 3px solid var(--color-danger);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-danger);
}
.mod-edit-notice strong {
  font-weight: 700;
}
.mod-edit-notice .mod-edit-date {
  color: var(--color-danger);
  opacity: .7;
  margin-left: 6px;
}
.mod-edit-notice .mod-edit-reason {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(220,38,38,.3);
  color: var(--color-danger);
  font-style: italic;
}

/* ════════════ ADMIN NAV GROUPS ════════════ */

.admin-nav-group {
  position: relative;
  display: inline-block;
}
.admin-nav-group-toggle {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: transparent;
}
.admin-nav-group-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 60;
  animation: qs-slide 150ms ease-out;
}
.admin-nav-group.open .admin-nav-group-menu {
  display: block;
}
.admin-nav-subitem {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-base);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}
.admin-nav-subitem:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}
.admin-nav-subitem.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}

/* ════════════ BOT-ANZEIGE in Online-Liste ════════════ */

.online-bot-row td {
  background: rgba(129,140,248,.04);
}
.online-bot {
  color: var(--color-accent);
  font-weight: 500;
  font-size: 13px;
  cursor: help;
  border-bottom: 1px dotted var(--color-accent);
}

/* ════════════ NOTIFICATION-ROW mit Lösch-Button ════════════ */

.notif-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--bg-surface2); }
.notif-row.unread {
  background: var(--color-accent-soft);
}
.notif-row.unread:hover {
  background: var(--color-accent-soft);
  filter: brightness(1.1);
}
.notif-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}
.notif-delete:hover {
  background: rgba(220,38,38,.15);
  color: var(--color-danger);
  text-decoration: none;
  transform: scale(1.1);
}

/* ════════════ TASTATUR-SHORTCUTS ════════════ */

#shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(6px);
  animation: shortcuts-fadein 200ms ease-out;
}
@keyframes shortcuts-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.shortcuts-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 580px;
  width: 92%;
  max-height: 80vh;
  overflow-y: auto;
  animation: shortcuts-slide 250ms cubic-bezier(.4,0,.2,1);
}
@keyframes shortcuts-slide {
  from { opacity: 0; transform: translateY(-20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.shortcuts-header h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}
.shortcuts-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}
.shortcuts-close:hover {
  background: var(--bg-surface2);
  color: var(--color-danger);
}
.shortcuts-body {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.shortcuts-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.shortcut-row span {
  color: var(--text-muted);
}
.shortcut-row kbd {
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-surface2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-base);
}
.shortcuts-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 600px) {
  .shortcuts-body { grid-template-columns: 1fr; gap: 16px; }
}

/* Post-Highlight beim Springen via Shortcut */
.post-card.post-highlighted {
  box-shadow: 0 0 0 2px var(--color-accent);
  transition: box-shadow 1.5s ease-out;
}

/* ════════════ DASHBOARD ════════════ */

/* Hero-Bereich */
.dashboard-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  background: linear-gradient(135deg, var(--color-accent-soft), var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.dashboard-hero-avatar img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--bg-surface);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.dashboard-hero-info {
  flex: 1;
  min-width: 0;
}
.dashboard-hero-info h1 {
  font-size: 24px;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-hero-rank {
  display: inline-block;
  font-size: 13px;
  color: var(--text-base);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  padding: 3px 10px;
  border-radius: 12px;
  margin: 4px 0 8px;
  font-weight: 500;
}
.dashboard-hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.dashboard-hero-meta strong {
  color: var(--text-base);
}
.dashboard-hero-sep {
  color: var(--text-faint);
}
@media (max-width: 700px) {
  .dashboard-hero-sep { display: none; }
}
.dashboard-hero-streak {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.streak-flame {
  font-size: 36px;
  filter: grayscale(.7);
  opacity: .5;
  transition: all var(--transition);
}
.streak-flame.streak-active {
  filter: none;
  opacity: 1;
  animation: flame-pulse 2s ease-in-out infinite;
}
@keyframes flame-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.streak-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
}
.streak-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}
.streak-best {
  font-size: 11px;
  color: #f59e0b;
  margin-top: 4px;
}

/* Stats-Grid */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.dash-stat {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform var(--transition);
}
.dash-stat:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.dash-stat-accent {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.dash-stat-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-base);
}
.dash-stat-accent .dash-stat-num {
  color: var(--color-accent);
}
.dash-stat-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* Heatmap */
.heatmap-wrap {
  overflow-x: auto;
}
.heatmap-grid {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--bg-surface2);
  transition: transform 80ms;
  cursor: help;
}
.heatmap-cell:hover { transform: scale(1.4); z-index: 2; position: relative; }
.heatmap-l0 { background: var(--bg-surface2); }
.heatmap-l1 { background: rgba(129,140,248,.25); }
.heatmap-l2 { background: rgba(129,140,248,.5); }
.heatmap-l3 { background: rgba(129,140,248,.75); }
.heatmap-l4 { background: var(--color-accent); }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  justify-content: flex-end;
}

/* 2-Spalten-Grid für die Boxen */
.dashboard-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 800px) {
  .dashboard-cols { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-hero { flex-direction: column; text-align: center; }
}

/* Dash-Listen */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}
a.dash-list-item:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}
.dash-list-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dash-list-main {
  flex: 1;
  min-width: 0;
}
.dash-list-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-list-snippet {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.dash-list-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  flex-shrink: 0;
  padding: 4px 8px;
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
}

/* Achievement-Progress-Bar */
.dash-ach-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.dash-ach-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #a855f7);
  transition: width 600ms ease-out;
}

/* ════════════ ERWEITERTE SUCHE ════════════ */

.search-form { margin-bottom: 18px; }

.search-main-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-main-row input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  font-size: 14px;
}

.search-filters {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.search-filters.open { display: block; }

.search-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}
@media (max-width: 700px) {
  .search-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .search-filter-grid { grid-template-columns: 1fr; }
}

.search-filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.search-chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-base);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.search-chk:hover { background: var(--bg-surface2); }
.search-chk input { margin: 0; }

.search-save-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

/* Gespeicherte-Suchen-Bar */
.saved-searches-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.saved-searches-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  flex-shrink: 0;
}
.saved-searches-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.saved-search-chip {
  display: inline-flex;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
  font-size: 12px;
  transition: all var(--transition);
}
.saved-search-chip:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.saved-search-chip a {
  padding: 4px 12px;
  color: var(--text-base);
  text-decoration: none;
}
.saved-search-chip a:hover { text-decoration: none; }
.saved-search-x {
  padding: 4px 8px;
  color: var(--text-faint);
  border-left: 1px solid var(--border);
}
.saved-search-x:hover {
  background: rgba(220,38,38,.15);
  color: var(--color-danger);
}

/* Such-Ergebnisse */
.search-result {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}
.search-result-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-base);
  margin-bottom: 6px;
}
.search-result-snippet {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}
.search-result-snippet mark {
  background: var(--color-accent);
  color: white;
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 500;
}
.search-result-stats {
  font-size: 11px;
  color: var(--text-faint);
}

/* ════════════ MOBILE NAV TOGGLE ════════════ */

.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-base);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
}
.mobile-nav-toggle:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.mobile-nav-toggle .hamburger-icon {
  font-size: 16px;
  line-height: 1;
}

.header-nav-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav-items::-webkit-scrollbar { display: none; }

@media (max-width: 700px) {
  /* Logo-Banner kompakter machen */
  .header-banner .header-inner {
    min-height: 70px;
    padding: 8px 0;
  }
  #forum-logo-banner img, #forum-logo-banner svg { max-height: 50px; }

  /* Such-Zeile: Suche + Icons in 1 Reihe, optional Wrap */
  .header-top .header-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    height: auto;
    min-height: 50px;
  }
  #header-search { order: 1; width: 100%; max-width: none; }
  .user-actions { order: 2; }

  /* Hamburger sichtbar + Menü versteckt by default */
  .mobile-nav-toggle { display: inline-flex; }

  .header-nav-main { padding: 0; }
  .header-nav-main .header-inner {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 14px;
  }

  .header-nav-items {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    overflow: visible;
  }
  .header-nav-items.open {
    display: flex;
  }
  .header-nav-items a {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }
}

/* ════════════ FORUM-TABELLE → MOBILE CARDS ════════════ */

@media (max-width: 700px) {
  .forum-table-responsive thead {
    display: none;
  }
  .forum-table-responsive tbody, 
  .forum-table-responsive tr, 
  .forum-table-responsive td {
    display: block;
    width: 100% !important;
    border: none;
  }
  .forum-table-responsive tr.forum-row {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 44px 1fr 1fr;
    grid-template-areas:
      "icon main    main"
      "icon threads beitraege"
      ".    last    last"
      ".    mods    mods";
    gap: 4px 12px;
    align-items: start;
  }
  .forum-table-responsive tr.forum-row:last-child { border-bottom: none; }

  .forum-table-responsive .forum-icon-cell {
    grid-area: icon;
    padding: 0;
  }
  .forum-table-responsive .forum-icon-cell .board-icon-wrap {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .forum-table-responsive .forum-main-cell {
    grid-area: main;
    padding: 0;
  }
  .forum-table-responsive .forum-main-cell .board-title-link {
    font-size: 15px;
    font-weight: 600;
  }
  .forum-table-responsive .forum-main-cell .board-desc {
    font-size: 12px;
    margin-top: 2px;
  }

  /* Stat-Zellen: Threads links, Beiträge rechts daneben */
  .forum-table-responsive .stat-cell {
    padding: 0;
    font-size: 12px;
    text-align: left;
    color: var(--text-muted);
  }
  .forum-table-responsive .stat-cell::before {
    content: attr(data-label) ": ";
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-right: 4px;
  }
  .forum-table-responsive .stat-cell:nth-of-type(3) { grid-area: threads; }
  .forum-table-responsive .stat-cell:nth-of-type(4) { grid-area: beitraege; }

  /* Letzter Beitrag */
  .forum-table-responsive .last-post-cell {
    grid-area: last;
    padding: 8px 0 0 0;
    font-size: 12px;
    border-top: 1px dashed var(--border);
    margin-top: 4px;
  }
  .forum-table-responsive .last-post-cell::before {
    content: "📌 " attr(data-label) ": ";
    display: block;
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 3px;
  }

  /* Mods */
  .forum-table-responsive .mod-cell {
    grid-area: mods;
    padding: 4px 0 0 0;
    font-size: 12px;
  }
  .forum-table-responsive .mod-cell::before {
    content: "🛡️ " attr(data-label) ": ";
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-right: 4px;
  }
  .forum-table-responsive .mod-cell .board-mods-list {
    display: inline;
  }
}

/* ════════════ THREAD-TABELLE → MOBILE CARDS ════════════ */

@media (max-width: 700px) {
  .thread-table-responsive thead { display: none; }
  .thread-table-responsive tbody,
  .thread-table-responsive tr,
  .thread-table-responsive td {
    display: block;
    width: 100% !important;
    border: none;
  }
  .thread-table-responsive tr.thread-row {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
    grid-template-areas:
      "icon main main"
      ".    replies views"
      ".    last    last";
    gap: 4px 12px;
    align-items: start;
  }
  .thread-table-responsive tr.thread-row:last-child { border-bottom: none; }

  .thread-table-responsive .thread-icon-cell {
    grid-area: icon;
    padding: 0;
  }
  .thread-table-responsive .thread-main-cell {
    grid-area: main;
    padding: 0;
  }
  .thread-table-responsive .thread-main-cell .thread-title-link {
    font-size: 15px;
    font-weight: 600;
  }
  .thread-table-responsive .thread-main-cell .thread-meta {
    font-size: 11px;
  }

  .thread-table-responsive .stat-cell {
    padding: 0;
    font-size: 12px;
    text-align: left;
    color: var(--text-muted);
  }
  .thread-table-responsive .stat-cell::before {
    content: attr(data-label) ": ";
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-right: 4px;
  }
  .thread-table-responsive .stat-cell:nth-of-type(3) { grid-area: replies; }
  .thread-table-responsive .stat-cell:nth-of-type(4) { grid-area: views; }

  .thread-table-responsive .last-post-cell {
    grid-area: last;
    padding: 8px 0 0 0;
    font-size: 12px;
    border-top: 1px dashed var(--border);
    margin-top: 4px;
  }
  .thread-table-responsive .last-post-cell::before {
    content: "📌 " attr(data-label) ": ";
    display: block;
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 3px;
  }
}

/* ════════════ MOD-BEREICH ════════════ */

.mod-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.mod-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.mod-nav a:hover {
  color: var(--text-base);
  background: var(--bg-surface2);
  text-decoration: none;
}
.mod-nav a.active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  font-weight: 600;
}

/* ════════════ BRANDING - Header Slogan ════════════ */

.header-slogan {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  align-self: center;
  max-width: 320px;
}

@media (max-width: 700px) {
  .header-slogan {
    display: none;
  }
}

/* ════════════ BRANDING - Color Picker ════════════ */

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.color-option:hover {
  border-color: var(--border-strong);
}
.color-option.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.color-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}
.color-label {
  font-size: 12px;
  color: var(--text-base);
}

/* ════════════ SHOUTBOX ════════════ */

.shoutbox-card {
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
}
.shoutbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--color-accent-soft), var(--bg-surface));
  border-bottom: 1px solid var(--border);
}
.shoutbox-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-base);
}
.shoutbox-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.shoutbox-toggle:hover {
  background: var(--bg-surface2);
  color: var(--text-base);
}
.shoutbox-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}
.shoutbox-empty {
  color: var(--text-faint);
  font-size: 13px;
  font-style: italic;
  padding: 20px;
  text-align: center;
}
.shoutbox-msg {
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.shoutbox-msg:hover {
  background: var(--bg-surface2);
}
.shoutbox-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}
.shoutbox-msg-body {
  flex: 1;
  min-width: 0;
}
.shoutbox-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 2px;
}
.shoutbox-name {
  font-weight: 600;
  color: var(--text-base);
  font-size: 12px;
}
.shoutbox-time {
  color: var(--text-faint);
  margin-left: auto;
}
.shoutbox-del {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0 4px;
  font-size: 11px;
  opacity: 0;
  transition: all var(--transition);
}
.shoutbox-msg:hover .shoutbox-del { opacity: 1; }
.shoutbox-del:hover { color: var(--color-danger); }
.shoutbox-msg-text {
  font-size: 13px;
  color: var(--text-muted);
  word-wrap: break-word;
  line-height: 1.4;
}
.shoutbox-form {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface2);
}
.shoutbox-form input[type="text"] {
  flex: 1;
  padding: 7px 12px;
  font-size: 13px;
}
.shoutbox-login-hint {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-surface2);
}

/* ════════════ MODULE-VERWALTUNG ════════════ */

.modules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.module-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.module-card.is-enabled {
  border-left: 3px solid #10b981;
}
.module-icon {
  font-size: 30px;
  flex-shrink: 0;
}
.module-content {
  flex: 1;
  min-width: 0;
}
.module-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-base);
  margin-bottom: 2px;
}
.module-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.module-meta {
  font-size: 11px;
  color: var(--text-faint);
}
.module-meta code {
  background: var(--bg-surface2);
  padding: 1px 5px;
  border-radius: 3px;
}
.module-toggle {
  flex-shrink: 0;
}

/* ════════════ ROLLEN-AVATARE ADMIN ════════════ */

.role-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.role-avatar-box {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.role-avatar-preview {
  flex-shrink: 0;
}
.role-avatar-preview img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg-body);
}
.role-avatar-controls {
  flex: 1;
  min-width: 0;
}
.role-avatar-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-base);
  margin-bottom: 4px;
}
.role-avatar-status {
  font-size: 11px;
  margin-bottom: 6px;
}

/* ════════════ MEDIA-EDIT (Avatar/Banner mit Vorschau) ════════════ */

.media-edit-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.media-edit-preview {
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-surface2);
  object-fit: cover;
}
.media-edit-preview.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.media-edit-preview.banner-preview {
  width: 160px;
  height: 60px;
  border-radius: var(--radius-sm);
}
.media-edit-preview.media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 11px;
  font-style: italic;
}
.media-edit-controls {
  flex: 1;
  min-width: 0;
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.checkbox-line:hover {
  border-color: var(--color-danger);
  color: var(--text-base);
}
.checkbox-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-danger);
}

@media (max-width: 600px) {
  .media-edit-row { flex-direction: column; }
  .media-edit-preview.banner-preview { width: 100%; max-width: 280px; }
}

/* ════════════ AVATAR-LIGHTBOX ════════════ */

.avatar-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease-out;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.avatar-lightbox.open {
  display: flex;
  opacity: 1;
}
.avatar-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
.avatar-lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: avatarPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes avatarPop {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
#avatar-lightbox-img {
  max-width: min(90vw, 400px);
  max-height: 60vh;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.15);
  background: var(--bg-surface);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.avatar-lightbox-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#avatar-lightbox-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.avatar-lightbox-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

/* Hover-Effekt: Cursor + leichte Vergrößerung bei zoombaren Avataren */
.zoomable-avatar {
  cursor: zoom-in;
  transition: transform .2s, filter .2s;
}
.zoomable-avatar:hover {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* ════════════ FAQ-MODUL ════════════ */

.faq-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.faq-cat-nav a {
  padding: 6px 12px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.faq-cat-nav a:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}

.faq-category {
  margin-bottom: 24px;
}
.faq-cat-title {
  font-size: 18px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-empty {
  padding: 14px;
  color: var(--text-faint);
  font-style: italic;
  font-size: 13px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.faq-item[open] {
  border-color: var(--color-accent);
}
.faq-item.faq-hidden {
  opacity: 0.55;
  border-style: dashed;
}
.faq-question {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 14px;
  user-select: none;
  transition: background var(--transition);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover {
  background: var(--bg-surface2);
}
.faq-q-text {
  flex: 1;
}
.faq-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform .2s;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-status-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--color-warning);
  color: #fff;
  border-radius: 4px;
}
.faq-answer-wrap {
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}
.faq-answer {
  padding-top: 12px;
  font-size: 13px;
  color: var(--text-base);
  line-height: 1.6;
}
.faq-answer p { margin: 6px 0; }

.faq-admin-edit {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg-surface2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}
.faq-admin-edit summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
}
.faq-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.faq-edit-form label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.faq-edit-form input[type="text"],
.faq-edit-form textarea,
.faq-edit-form select {
  width: 100%;
}
.faq-edit-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* ════════════ DESIGN-EDITOR ════════════ */

.design-editor {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) {
  .design-editor { grid-template-columns: 1fr; }
}
.design-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.design-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.design-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.design-tab-btn:hover { color: var(--text-base); }
.design-tab-btn.active {
  background: var(--bg-surface);
  color: var(--color-accent);
  font-weight: 600;
}
.design-tab-pane { display: none; }
.design-tab-pane.active { display: block; }
.design-tab-pane h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.color-input-row:last-child { border-bottom: none; }
.color-input-row label {
  flex: 1;
  font-size: 13px;
  color: var(--text-base);
  display: flex;
  flex-direction: column;
}
.color-input-row label .form-hint {
  margin-top: 0;
  font-size: 11px;
  color: var(--text-faint);
}
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-input-wrap input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}
.color-input-wrap input[type="text"] {
  width: 80px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  text-transform: uppercase;
}

.design-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.design-preview {
  position: sticky;
  top: 100px;
}
.design-preview-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 0 4px;
}
.design-preview-label a {
  font-size: 11px;
}

/* ════════════ DESIGN-EDITOR – ETAPPE 2 ════════════ */

/* Tabs scrollbar bei vielen Tabs */
.design-tabs {
  flex-wrap: wrap;
  overflow-x: auto;
}

/* Theme-Presets-Grid */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.theme-preset {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}
.theme-preset:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.theme-preset-preview {
  display: flex;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.theme-preset-preview span {
  flex: 1;
  display: block;
}
.theme-preset-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.theme-preset-info strong {
  font-size: 13px;
  color: var(--text-base);
}
.theme-preset-info span {
  font-size: 11px;
  color: var(--text-muted);
}
.theme-preset-apply {
  align-self: flex-start;
  font-size: 11px;
}
.theme-preset-apply:disabled {
  opacity: 0.7;
}

/* Color-Picker-Grid (für Akzentfarben im Identity-Tab) */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.color-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  position: relative;
  transition: all var(--transition);
}
.color-option:hover {
  border-color: var(--color-accent);
}
.color-option.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.color-label {
  font-size: 11px;
  color: var(--text-base);
}

.design-actions {
  align-items: center;
}

/* ════════════ HEADER-STILE & DENSITY ════════════ */

/* Density: beeinflusst Padding via --density-factor */
body.density-compact     { --density-factor: 0.75; }
body.density-normal      { --density-factor: 1; }
body.density-comfortable { --density-factor: 1.25; }

/* Card-Padding skaliert mit Density */
body .card,
body .form-card,
body .post-card {
  padding: calc(16px * var(--density-factor, 1));
}
body .post-card-inner {
  padding: calc(14px * var(--density-factor, 1));
}
body .board-row,
body .thread-row {
  padding: calc(12px * var(--density-factor, 1)) calc(16px * var(--density-factor, 1));
}

/* Header-Stile */

/* Default: nichts ändern */

/* Zentriert: Logo mittig, Banner zentrierter Inhalt */
body.header-centered .header-banner {
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body.header-centered .header-banner-text {
  text-align: center;
  align-items: center;
}
body.header-centered .header-banner-logo {
  margin: 0 auto;
}

/* Kompakt: Banner kleiner, weniger Padding */
body.header-compact .header-banner {
  padding-top: 14px;
  padding-bottom: 14px;
}
body.header-compact .header-banner-logo img {
  max-height: 50px;
}
body.header-compact .header-banner-slogan {
  display: none;
}

/* ════════════ COOKIE-BANNER ════════════ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--bg-surface);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  padding: 12px 14px;
  animation: cookieSlideUp .3s ease-out;
}
@keyframes cookieSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  color: var(--text-base);
  line-height: 1.5;
}

/* ════════════ AKTIVE SESSIONS (Remember-Me) ════════════ */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  transition: border-color var(--transition);
}
.session-row:hover { border-color: var(--border-strong); }
.session-row.session-current {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.session-info {
  flex: 1;
  min-width: 220px;
}
.session-info strong {
  font-size: 13px;
  color: var(--text-base);
}
.session-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  padding: 2px 6px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 4px;
}
.session-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.session-meta code {
  background: var(--bg-surface);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
}

/* ════════════ ADMIN-TABELLEN MOBILE-RESPONSIVE ════════════
 * Strategie 1: Default = Card-Layout auf Mobile (via JS-injizierte data-label)
 * Strategie 2: Opt-out per Klasse .forum-table-keep-wide → Horizontal-Scroll-Wrapper
 */

/* Horizontal-Scroll-Wrapper: für komplexe Tabellen die nicht zu Cards passen */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  position: relative;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-track { background: var(--bg-surface2); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.table-scroll table {
  min-width: 600px;  /* zwingt horizontales Scrollen statt zerquetschen */
}

@media (max-width: 700px) {
  /* Default: alle Admin-Tabellen werden zu Cards */
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) {
    background: transparent;
    border: none;
  }
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) thead {
    display: none;  /* Header verstecken – wir nutzen data-label */
  }
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) tbody,
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) tr,
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td {
    display: block;
    width: 100%;
  }
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) tr {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td {
    border: none;
    padding: 5px 0;
    position: relative;
    text-align: left !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
    font-size: 13px;
  }
  /* Label aus data-label vor den Wert */
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 80px;
  }
  /* Leere Zellen verstecken (z.B. spacer/dividers) */
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td:empty {
    display: none;
  }
  /* Action-Buttons-Zelle besser nutzen */
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td.actions-cell,
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td:has(form),
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td:has(.btn) {
    border-top: 1px dashed var(--border);
    margin-top: 4px;
    padding-top: 8px;
  }
  /* Lange Texte umbrechen statt cutten */
  .forum-table:not(.forum-table-keep-wide):not(.forum-table-responsive):not(.thread-table-responsive) td {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}
