/* ==========================================================================
   RetroSMP.de Dev Board — Theme
   Farben kommen aus partials/head.ejs (CSS-Variablen, aus config.branding).
   ========================================================================== */

:root {
  --text: #ffffff;
  --text-dim: #c6c6cb;
  --muted: #8f8f97;
  --danger: #F87070;
  --danger-strong: #C63535;
  --success: #F8E858;
  --warning: #F8B848;
  --radius: 10px;

  /* --- Aus dem RetroSMP-Hauptdashboard (Projekt-2-Design-System) übernommene
     Tiefen-/Radius-/Transition-Skala. Die Grundfarben (--accent, --bg, --bg-card,
     --border) sind bereits identisch (siehe config/config.js) -- das hier
     ergänzt die dort vorhandene, feinere Polish-Ebene (Schatten, Radius-Stufen,
     einheitliches Timing), die im Dev-Board bisher fehlte. */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 15px 35px rgba(0, 0, 0, 0.45), 0 5px 15px rgba(0, 0, 0, 0.30);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Neutrale Graphit-Skala -- Client-Feedback: Grau ist die Hauptfarbe im
     gesamten Dashboard, Orange bleibt reine Akzentfarbe (Buttons, aktiver
     Nav-Indikator, Glows, Badges). Keine warmen/braunen Untertöne mehr auf
     Flächen, Rahmen oder Dividern. */
  --bg-elevated: #131316;
  --bg-card-2: #1e1e22;
  --border-soft: rgba(255, 255, 255, .08);
  --text-faint: #6f6f78;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --gradient-brand: linear-gradient(90deg, #F8C848 0%, #F8B848 20%, #F88858 42%, #F88060 62%, #D88048 82%, #A01800 100%);
  --gradient-bg: linear-gradient(180deg, #0a0a0c 0%, #050506 100%);

  /* --- LED-Glow-Ebene ------------------------------------------------------
     Kleine, präzise, gesättigte Leuchtpunkte statt großflächigem Ambient-Blur
     -- siehe Redesign-Brief ("Orange LED"-Ästhetik). Diese Variablen werden
     von Buttons, Fokus-Ringen, dem aktiven Sidebar-Item und dem Karten-Flyover
     genutzt. */
  --glow-soft: 0 0 0 3px rgba(248, 136, 88, .16), 0 0 18px rgba(248, 136, 88, .18);
  --glow-strong: 0 0 0 1px rgba(248, 136, 88, .5), 0 0 22px rgba(248, 136, 88, .38), 0 0 46px rgba(248, 136, 88, .16);
  --glow-ring-sm: 0 0 8px rgba(248, 136, 88, .65), 0 0 2px rgba(248, 136, 88, .9);
  --glow-amber: 0 0 14px rgba(248, 184, 72, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background-color: var(--bg);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
}

/* ==========================================================================
   HINTERGRUND-ZEICHENEBENE -- "Orange LED"-Redesign (siehe Design-Brief): der
   Client wollte den zuvor entfernten warmen Ambient-Glow bewusst zurück, statt
   eines rein flachen Untergrunds. Zwei feine, langsam driftende Layer direkt
   auf <body>: ein technisches Punktraster + ein paar weit auseinanderliegende
   diagonale Lineal-Striche (unverändert aus dem Vorgänger-Design), ergänzt um
   zwei sehr großflächige, sehr blasse (3-5%) radiale Glow-Blobs in den Ecken
   für Atmosphäre -- kein flächendeckendes Bloom, nur dezente Tiefe.
   ========================================================================== */
body { position: relative; }
body::before, body::after {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: 0;
  pointer-events: none;
}
body::before {
  background-image:
    radial-gradient(closest-side, rgba(248, 136, 88, .035), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 96px);
  background-size: 900px 900px, auto, auto;
  background-position: -12% -10%, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat;
  animation: linework-drift-grid 140s linear infinite;
}
body::after {
  /* Nur noch der weiche Ecken-Glow -- die diagonalen Lineal-Striche wurden auf
     Wunsch entfernt, das Hintergrund-Raster besteht jetzt ausschließlich aus
     den Vierecken von body::before. */
  background-image: radial-gradient(closest-side, rgba(248, 200, 72, .035), transparent 70%);
  background-size: 1100px 1100px;
  background-position: 108% 112%;
  background-repeat: no-repeat;
  animation: linework-drift-strokes 200s linear infinite;
}
@keyframes linework-drift-grid {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-96px, -96px, 0); }
}
@keyframes linework-drift-strokes {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-40px, 30px, 0) rotate(.15deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
.app-shell, .login-wrap, .centered { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); font-size: 0.9rem; }
h1, h2, h3, h4 { margin: 0 0 0.4rem; }

/* ---------------------------------------------------------------------- */
/* Global clean scrollbars everywhere                                     */
/* ---------------------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: rgba(248,136,88,.55) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--gradient-brand); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------------------------------------------------------------------- */
/* App shell (Sidebar + Content)                                          */
/* ---------------------------------------------------------------------- */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 6px 0 30px rgba(0,0,0,.35);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
}
.sidebar, .sidebar-nav-scroll, .main, .main-content, .modal-body, .notif-dropdown, .global-search-results, .lang-select-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(248,136,88,.58) transparent;
}
.sidebar::-webkit-scrollbar, .sidebar-nav-scroll::-webkit-scrollbar, .main::-webkit-scrollbar, .main-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar, .notif-dropdown::-webkit-scrollbar, .global-search-results::-webkit-scrollbar, .lang-select-panel::-webkit-scrollbar {
  width: 5px; height: 5px;
}
.sidebar::-webkit-scrollbar-track, .sidebar-nav-scroll::-webkit-scrollbar-track, .main::-webkit-scrollbar-track, .main-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track, .notif-dropdown::-webkit-scrollbar-track, .global-search-results::-webkit-scrollbar-track, .lang-select-panel::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb, .sidebar-nav-scroll::-webkit-scrollbar-thumb, .main::-webkit-scrollbar-thumb, .main-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb, .notif-dropdown::-webkit-scrollbar-thumb, .global-search-results::-webkit-scrollbar-thumb, .lang-select-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(248,200,72,.82), rgba(248,136,88,.78));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-thumb:hover, .sidebar-nav-scroll::-webkit-scrollbar-thumb:hover, .notif-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(248,136,88,.9); background-clip: padding-box;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo-box, .logo-box-magenta {
  border: 1px solid var(--border-soft); padding: 9px; border-radius: 14px; flex-shrink: 0;
  background: var(--bg-elevated);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  position: relative;
}
.logo-box img, .logo-box-magenta img { width: 28px; height: 28px; object-fit: contain; display: block; }
.brand .name { font-weight: 800; letter-spacing: .5px; font-size: 15px; color: var(--text); }
.brand .name span { display: block; font-size: 10px; color: var(--text-faint); font-weight: 600; letter-spacing: 2px; }

.sidebar-nav-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 22px;
  margin-right: -10px; padding-right: 6px; scroll-padding-block-end: 8px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
}

.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); padding: 8px 12px 2px; font-weight: 700; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 9px 12px; border-radius: 9px; margin: 1px 0;
  font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link i, .nav-link svg { width: 16px; height: 16px; flex-shrink: 0; transition: color .18s ease, filter .18s ease; }
.nav-link:hover { background: rgba(216, 128, 72, .10); color: var(--text); transform: translateX(1px); }
/* Einheitlicher, kurzer "Pop" für JEDES Sidebar-Icon beim Hovern -- gleiche
   Kurve/Dauer für alle, statt nur einer statischen Skalierung. */
.nav-link:hover i, .nav-link:hover svg {
  color: var(--accent-2); filter: drop-shadow(0 0 5px rgba(248, 184, 72, .55));
  animation: navIconPop .42s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes navIconPop {
  0% { transform: scale(1) translateY(0); }
  45% { transform: scale(1.24) translateY(-3px); }
  100% { transform: scale(1.12) translateY(-1px); }
}
/* Bonus-Detail für Analytics: die Balken im Icon "wachsen" kurz nach, statt
   nur generisch zu skalieren -- macht das Icon selbst lesbar animiert. */
.nav-link:hover .lucide-bar-chart-3 path {
  transform-box: fill-box; transform-origin: bottom;
  animation: navChartBarGrow .5s ease both;
}
.nav-link:hover .lucide-bar-chart-3 path:nth-of-type(2) { animation-delay: .05s; }
.nav-link:hover .lucide-bar-chart-3 path:nth-of-type(3) { animation-delay: .1s; }
.nav-link:hover .lucide-bar-chart-3 path:nth-of-type(4) { animation-delay: .15s; }
@keyframes navChartBarGrow {
  0% { transform: scaleY(.4); }
  65% { transform: scaleY(1.15); }
  100% { transform: scaleY(1); }
}
/* Bonus-Detail für Einstellungen: das Zahnrad dreht sich statt nur zu poppen. */
.nav-link:hover .lucide-settings-2 { animation: navGearSpin .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes navGearSpin {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.12) rotate(90deg); }
}
.nav-link:focus-visible { outline: none; background: rgba(216, 128, 72, .12); box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px rgba(248, 136, 88, .5); }
.nav-link.active {
  background: rgba(248, 136, 88, .08);
  color: #fff;
  font-weight: 700;
}
/* LED-Leiste: schmaler, glühender Indikator am aktiven Nav-Item statt eines
   reinen Flächen-Hintergrunds -- das "Orange LED"-Signaturdetail der Sidebar,
   bewusst klein statt großflächig. */
.nav-link.active::before {
  content: ""; position: absolute; left: -16px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 6px 1px rgba(248, 136, 88, .85), 0 0 16px 2px rgba(248, 136, 88, .45);
}
.nav-link.active i, .nav-link.active svg { color: var(--accent); filter: drop-shadow(0 0 4px rgba(248, 136, 88, .5)); }
@media (prefers-reduced-motion: reduce) {
  .nav-link, .nav-link i, .nav-link svg { transition: none; }
  .nav-link:hover i,
  .nav-link:hover svg,
  .nav-link:hover .lucide-bar-chart-3 path,
  .nav-link:hover .lucide-settings-2 { animation: none; }
}

.sidebar-footer-v2 { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); position: relative; }

.notif-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color .15s ease;
}
.notif-bar:hover { border-color: rgba(248, 120, 104, .45); }
.notif-dot {
  position: absolute; top: -4px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--danger); color: #fff; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 700;
  box-shadow: 0 0 0 rgba(248, 112, 112, .6);
  animation: notifDotPulse 2.2s ease-in-out infinite;
}
@keyframes notifDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 112, 112, .55); }
  50% { box-shadow: 0 0 0 4px rgba(248, 112, 112, 0); }
}
@media (prefers-reduced-motion: reduce) { .notif-dot { animation: none; } }

.notif-dropdown, .lang-select-panel {
  position: fixed; width: 320px; max-height: 420px; z-index: 200;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .15s, transform .15s;
  display: none; flex-direction: column;
}
.notif-dropdown.open, .lang-select-panel.open { display: flex; pointer-events: auto; }
.notif-dropdown.visible, .lang-select-panel.visible { opacity: 1; transform: translateY(0); }

.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-dropdown-head h4 { font-size: 13px; }
.notif-dropdown-head button { background: none; border: none; color: var(--text-dim); font-size: 11.5px; cursor: pointer; font-weight: 600; transition: color var(--transition-fast); }
.notif-dropdown-head button:hover { color: var(--accent-2); }
#notifList { overflow-y: auto; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 10px; color: var(--muted); font-size: 12.5px; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); position: relative; }
.notif-item.unread { background: rgba(248,136,88,.05); }
.notif-icon { width: 26px; height: 26px; border-radius: 8px; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon i { width: 14px; height: 14px; color: var(--text-dim); }
.notif-item.unread .notif-icon { background: rgba(248,136,88,.12); border-color: transparent; }
.notif-item.unread .notif-icon i { color: var(--accent-2); }
.notif-title { font-size: 12.5px; font-weight: 600; }
.notif-msg { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.notif-time { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.notif-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); position: absolute; top: 14px; right: 12px; }

.language-select-bar { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.language-select-bar > label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 12px; font-weight: 600; }
.language-select-bar label i { width: 15px; height: 15px; color: var(--text-dim); margin-right: 0; }
.language-select-bar .lang-select { width: 128px; flex: 0 0 128px; }
.lang-select-trigger {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  padding: 6px 8px 6px 10px; border-radius: 9px; font-size: 12px; font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.lang-select-trigger:hover, .lang-select-trigger[aria-expanded="true"] { border-color: rgba(248,120,104,.55); background: var(--bg-card); }
.lang-select-flag { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; }
.lang-select-current { flex: 1; text-align: left; }
.lang-select-trigger .chev { width: 14px; height: 14px; color: var(--text-faint); transition: transform .18s ease; }
.lang-select-panel { padding: 6px; }
.lang-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; background: none; border: none; color: var(--text); cursor: pointer; font-size: 12.5px; }
.lang-option:hover { background: rgba(248,136,88,.08); }
.lang-option .flag { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; }
.lang-option .check { width: 14px; height: 14px; margin-left: auto; opacity: 0; color: var(--accent-2); }
.lang-option.active .check { opacity: 1; }

.sidebar-user-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-dim); }
.sidebar-user-logout { color: #F87070; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.sidebar-user-logout i { width: 16px; height: 16px; }
.sidebar-user-logout:hover { background: rgba(248, 112, 112, .12); }

/* ---------------------------------------------------------------------- */
/* Main content                                                           */
/* ---------------------------------------------------------------------- */
/* overflow-x: hidden -- der Ambiente-Glow (.main::before) wird per Animation verschoben und würde sonst eine horizontale Bildlaufleiste erzeugen. */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; height: 100vh; display: flex; justify-content: center; position: relative; }
/* Ambiente-Glow hinter den Modul-Panels -- etwas mehr "Leben" als das sehr
   dezente Body-Raster allein, bleibt aber im Viewport fix (scrollt nicht mit),
   damit es wie Hintergrundbeleuchtung wirkt statt wie ein Content-Element. */
.main::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background-image:
    radial-gradient(560px circle at 10% -6%, rgba(248, 136, 88, .10), transparent 60%),
    radial-gradient(620px circle at 96% 40%, rgba(248, 184, 72, .07), transparent 62%),
    radial-gradient(520px circle at 26% 112%, rgba(248, 136, 88, .07), transparent 60%);
  animation: mainGlowDrift 26s ease-in-out infinite;
}
@keyframes mainGlowDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(16px, -12px); }
}
@media (prefers-reduced-motion: reduce) { .main::before { animation: none; } }
.main-content { position: relative; z-index: 1; padding: 28px 34px; max-width: 1400px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: 22px; }
.page-head .eyebrow {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--accent-2); text-transform: uppercase; text-shadow: 0 0 12px rgba(248, 184, 72, .35);
}
.page-head h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.page-head h1 i { width: 24px; height: 24px; color: var(--text); }
.page-head p { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }

/* ---------------------------------------------------------------------- */
/* Cards / stat grid                                                      */
/* ---------------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm); transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-brand); transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition-normal);
}
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::before { transform: scaleX(1); }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.stat-card .stat-icon i { width: 16px; height: 16px; color: var(--text-dim); }
.stat-card .value { font-size: 26px; font-weight: 800; }
.stat-card .label { font-size: 12px; color: var(--text-dim); }

.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.panel:hover { border-color: rgba(248, 136, 88, .55); box-shadow: var(--shadow-md), 0 0 22px rgba(248, 136, 88, .07); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.panel-head h3 i { width: 16px; height: 16px; color: var(--text-dim); }
.panel-head .sub { font-size: 11.5px; color: var(--text-dim); font-weight: 400; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.quick-tile {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.quick-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-tile .icon { width: 36px; height: 36px; border-radius: 10px; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-tile .icon i { width: 18px; height: 18px; color: #1a0d05; }
.quick-tile h4 { font-size: 13.5px; }
.quick-tile p { font-size: 12px; color: var(--text-dim); margin: 2px 0 0; }

.activity-list { display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: none; }
.activity-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.activity-row .title { font-size: 12.5px; font-weight: 600; }
.activity-row .msg { font-size: 12px; color: var(--text-dim); }
.activity-row .time { font-size: 10.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ---------------------------------------------------------------------- */
/* Buttons / forms                                                        */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid transparent;
  background: var(--gradient-brand); color: #1a0d05; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.btn:hover:not(:disabled) { box-shadow: var(--shadow-md), var(--glow-soft); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-md), 0 0 0 2px var(--bg), 0 0 0 4px rgba(248, 136, 88, .55); }
.btn i { width: 15px; height: 15px; }
.btn.secondary { background: var(--bg-card); border-color: var(--border); color: var(--text); box-shadow: none; }
.btn.secondary i, .btn.secondary svg { color: var(--text-dim); transition: color var(--transition-fast); }
.btn.secondary:hover:not(:disabled) { border-color: rgba(248, 136, 88, .6); box-shadow: 0 0 0 1px rgba(248, 136, 88, .18), 0 0 16px rgba(248, 136, 88, .12); transform: none; }
.btn.secondary:hover:not(:disabled) i, .btn.secondary:hover:not(:disabled) svg { color: var(--accent); }
.btn.secondary:focus-visible { border-color: rgba(248, 136, 88, .6); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(248, 136, 88, .4); }
/* Danger ist bewusst zweitrangig: leere/ghost-Fläche in Ruhe (kein Dauer-Glow,
   keine gleichrangige Fläche zur Primäraktion), Füllung + Glow erst bei
   Hover/Focus. Gefüllter Rot-Ton ist dunkler als der Text-Rot-Ton, damit
   weißer Text darauf AA (4.5:1) erreicht. */
.btn.danger { background: transparent; border-color: rgba(248, 112, 112, .45); color: var(--danger); box-shadow: none; }
.btn.danger i, .btn.danger svg { color: var(--danger); }
.btn.danger:hover:not(:disabled) {
  background: var(--danger-strong); border-color: var(--danger-strong); color: #fff; transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(198, 53, 53, .35), 0 0 18px rgba(239, 68, 68, .3);
}
.btn.danger:hover:not(:disabled) i, .btn.danger:hover:not(:disabled) svg { color: #fff; }
.btn.danger:focus-visible {
  outline: none; background: var(--danger-strong); border-color: var(--danger-strong); color: #fff;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(248, 112, 112, .5);
}
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text-dim); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, textarea, select {
  font-family: inherit; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13px; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(248, 136, 88, 0.15), 0 0 14px rgba(248, 136, 88, .18);
}
input:disabled, textarea:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
label { font-size: 12.5px; color: var(--text-dim); display: flex; flex-direction: column; gap: 5px; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; max-width: 420px; text-align: center; }
.centered { display: flex; align-items: center; justify-content: center; height: 100vh; }

/* ---------------------------------------------------------------------- */
/* Boards overview (Planka-style board picker)                            */
/* ---------------------------------------------------------------------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
/* kan.bn-Anleihe: flache, dünn dashed-umrandete Kacheln statt satter Farbflächen
   -- unser Akzent kommt nur im Hover/Icon zum Tragen, nicht als Grundfläche. */
.board-tile {
  border-radius: var(--radius); padding: 18px; min-height: 110px; position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1.5px dashed var(--border); background: rgba(255, 255, 255, .012);
  overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.board-tile:hover {
  border-color: var(--tile-color, var(--accent)); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.35), 0 0 22px color-mix(in srgb, var(--tile-color, var(--accent)) 30%, transparent);
}
.board-tile .board-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tile-color, var(--accent)) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tile-color, var(--accent)) 35%, transparent); z-index: 1; transition: box-shadow .18s ease; }
.board-tile .board-icon i { width: 15px; height: 15px; color: var(--tile-color, var(--accent)); }
.board-tile:hover .board-icon { box-shadow: 0 0 14px color-mix(in srgb, var(--tile-color, var(--accent)) 45%, transparent); }
.board-tile h4 { z-index: 1; font-size: 14.5px; }
.board-tile .board-meta { z-index: 1; font-size: 11.5px; color: var(--text-dim); }
.board-tile-new {
  border: 1.5px dashed var(--border); border-radius: var(--radius); min-height: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-dim); cursor: pointer; font-size: 12.5px; font-weight: 600;
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.board-tile-new:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 20px rgba(248, 136, 88, .12) inset; }
.board-tile-new i { width: 22px; height: 22px; }

/* ---------------------------------------------------------------------- */
/* Kanban board (Planka-style drag & drop)                                */
/* ---------------------------------------------------------------------- */
/* flex-wrap: wrap statt nowrap -- bei schmalen Viewports (z.B. 375px) sonst
   werden "Umbenennen"/"Löschen" von einem overflow:hidden-Ancestor
   abgeschnitten und sind gar nicht mehr erreichbar. */
.board-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 16px; }
.board-toolbar .board-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; min-width: 0; }
.board-toolbar .board-title .swatch { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.board-toolbar .board-title span:not(.swatch) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-toolbar .spacer { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) {
  .board-toolbar .spacer { flex-basis: 100%; height: 0; }
}

.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kanban-column {
  background: rgba(255, 255, 255, .012); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px; min-width: 264px; max-width: 264px; flex-shrink: 0;
  display: flex; flex-direction: column; max-height: calc(100vh - 220px);
  transition: border-color .15s ease, background .15s ease;
}
.kanban-column.drag-over { border-color: var(--accent); background: rgba(248,136,88,.06); box-shadow: 0 0 0 1px rgba(248,136,88,.25) inset; }
.kanban-column-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.kanban-column-head .name { font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.kanban-column-head .count { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); background: rgba(255,255,255,.05); border-radius: 999px; padding: 1px 8px; }
.kanban-column-head button { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 6px; transition: background .15s, color .15s; }
.kanban-column-head button:hover { color: var(--danger); background: rgba(248, 112, 112, .12); }
.kanban-cards { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 30px; }
.kanban-add-card { margin-top: 8px; background: none; border: 1px dashed var(--border); color: var(--text-dim); border-radius: 8px; padding: 8px; font-size: 12px; cursor: pointer; transition: border-color .15s, color .15s, box-shadow .15s; }
.kanban-add-card:hover { color: var(--accent-2); border-color: var(--accent); box-shadow: 0 0 12px rgba(248,136,88,.1) inset; }

/* Kompakte, kan.bn-artige Kartenzeile: schmaler, weniger Innenabstand, klare
   Meta-Zeile statt großer Fläche. */
.kanban-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; cursor: grab; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.kanban-card:hover { border-color: rgba(248, 136, 88, .5); box-shadow: 0 0 0 1px rgba(248,136,88,.12), 0 0 16px rgba(248,136,88,.08); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .4; }
.kanban-card .card-top { display: flex; align-items: center; gap: 6px; }
.kanban-card .card-number { font-family: var(--font-mono); color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.kanban-card .card-attachment-badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; color: var(--accent-2);
  background: rgba(248, 184, 72, .12); border: 1px solid rgba(248, 184, 72, .25);
  border-radius: 999px; padding: 1px 7px;
}
.kanban-card .card-attachment-badge i { width: 10px; height: 10px; }
.kanban-card .card-title { font-weight: 600; line-height: 1.3; }
.kanban-card .card-meta { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 10.5px; margin-top: 1px; }
.kanban-card .card-meta i { width: 12px; height: 12px; }
.priority-chip { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

/* Checklisten-Fortschrittsring auf der Kartenzeile (kompakt, siehe Referenz). */
.card-checklist-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.card-checklist-badge svg circle:last-child { transition: stroke-dashoffset .2s ease; }
.card-checklist-badge.is-complete { color: #8fd858; }

.add-column-btn {
  min-width: 220px; flex-shrink: 0; border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent);
  cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 12px; align-self: flex-start;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.add-column-btn:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 18px rgba(248,136,88,.1) inset; }

/* ---------------------------------------------------------------------- */
/* Modal                                                                  */
/* ---------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,4,5,.68); display: none;
  align-items: center; justify-content: center; z-index: 500; padding: 20px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; animation: modalOverlayIn .18s ease both; }
@keyframes modalOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 22px;
  box-shadow: var(--shadow-xl), 0 0 40px rgba(248, 136, 88, .05);
  animation: modalBoxIn .2s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes modalBoxIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .modal-overlay.open, .modal-box { animation: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { display: flex; align-items: center; gap: 8px; }
.modal-head button { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 6px; border-radius: 8px; transition: background .15s, color .15s; }
.modal-head button:hover { background: rgba(248, 136, 88, .12); color: var(--accent-2); }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ==========================================================================
   KANBAN — Karten-Flyover (Card-Detail) -- breiter Vollbild-Flyover statt
   kleiner zentrierter Modal-Box, siehe kan.bn-Referenz: Breadcrumb-Header,
   breite Hauptspalte + schmale Meta-Sidebar rechts.
   ========================================================================== */
.card-flyover {
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  width: 100%; max-width: 1100px; height: 88vh; max-height: 880px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 50px rgba(248, 136, 88, .06);
  animation: modalBoxIn .2s cubic-bezier(.2,.8,.2,1) both;
}
@media (prefers-reduced-motion: reduce) { .card-flyover { animation: none; } }

.cf-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 12px;
}
.cf-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); min-width: 0; }
.cf-breadcrumb i { width: 13px; height: 13px; color: var(--text-faint); flex-shrink: 0; }
.cf-breadcrumb-board { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cf-breadcrumb-id {
  font-family: var(--font-mono); font-weight: 700; color: var(--accent-2);
  text-shadow: 0 0 10px rgba(248, 184, 72, .3);
}
.cf-close { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 7px; border-radius: 8px; transition: background .15s, color .15s; flex-shrink: 0; }
.cf-close:hover { background: rgba(248, 112, 112, .12); color: var(--danger); }

.cf-body { flex: 1; min-height: 0; display: flex; }
.cf-main { flex: 1 1 68%; min-width: 0; padding: 24px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.cf-sidebar {
  flex: 0 0 280px; border-left: 1px solid var(--border); padding: 22px 20px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px; background: rgba(0,0,0,.1);
}

/* Footer-Leiste außerhalb von .cf-main/.cf-sidebar -- damit "Speichern"/
   "Karte löschen" immer sichtbar bleiben, unabhängig vom Scroll-Zustand der
   Hauptspalte (langer Beschreibungstext, viele Kommentare etc.). */
.cf-footer {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 26px; border-top: 1px solid var(--border); background: var(--bg-card);
}

.cf-title-input {
  font-size: 21px; font-weight: 800; background: transparent; border: 1px solid transparent;
  padding: 6px 8px; margin: -6px -8px; border-radius: 8px; width: 100%;
}
.cf-title-input:hover { border-color: var(--border); }
.cf-title-input:focus { background: var(--bg); border-color: var(--accent); }

.cf-field-label {
  display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px;
}
.cf-desc-input { width: 100%; resize: vertical; min-height: 100px; line-height: 1.55; }

.cf-section { display: flex; flex-direction: column; gap: 12px; }
.cf-section-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 0; }
.cf-section-title i { width: 15px; height: 15px; color: var(--text-dim); }

.cf-meta-row { display: flex; flex-direction: column; gap: 6px; }
.cf-meta-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.cf-meta-value { font-size: 13px; font-weight: 600; padding: 8px 2px; }
.cf-meta-row select, .cf-meta-row input[type="date"] { width: 100%; }
.cf-meta-row input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(70%) sepia(45%) saturate(900%) hue-rotate(335deg) brightness(1.05);
  cursor: pointer;
}
.cf-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
/* Untereinander statt nebeneinander -- in der 240px schmalen Meta-Spalte
   bleibt so genug Breite für den Dateinamen, statt ihn neben dem
   Upload-Button auf ein paar Zeichen zusammenzuquetschen. */
.cf-attachment-upload { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 2px; }
.cf-attachment-upload input[type="file"] {
  width: 100%; font-size: 11px; padding: 6px 8px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Der native "Datei auswählen"-Button ist sonst Chromes hellgraues Standard-
   Widget mitten in einem sonst vollständig eigenen dunklen UI -- hier auf
   die .btn.secondary-Optik gebracht, damit die Datei-Auswahl nicht wie ein
   Fremdkörper wirkt. */
.cf-attachment-upload input[type="file"]::file-selector-button,
.cf-attachment-upload input[type="file"]::-webkit-file-upload-button {
  background: var(--bg-card-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 10px; margin-right: 10px; font-family: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.cf-attachment-upload input[type="file"]:hover::file-selector-button,
.cf-attachment-upload input[type="file"]:hover::-webkit-file-upload-button {
  border-color: rgba(248, 136, 88, .5); background: var(--bg-elevated);
}
.cf-attachment-upload .btn { align-self: flex-end; padding: 8px 10px; }

/* --- Aktivität / Kommentare (kan.bn-artiges Feed mit Avatar + Zeit) ------- */
.cf-comments { display: flex; flex-direction: column; }
.comment-item { display: flex; gap: 10px; border-top: 1px solid var(--border); padding: 10px 0; font-size: 12.5px; }
.comment-item:first-child { border-top: none; }
.comment-item .comment-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: var(--bg-elevated);
  border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--accent-2);
}
.comment-item .comment-body { min-width: 0; flex: 1; }
.comment-item .meta { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.cf-comment-input-row { display: flex; gap: 8px; margin-top: 6px; }
.cf-comment-input-row input { flex: 1; }

/* --- Checklisten ---------------------------------------------------------- */
.checklist-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: rgba(255,255,255,.014); }
.checklist-block + .checklist-block { margin-top: 10px; }
.checklist-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.checklist-head .name { font-size: 12.5px; font-weight: 700; flex: 1; min-width: 0; }
.checklist-progress { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.checklist-delete { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px; border-radius: 6px; opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.checklist-block:hover .checklist-delete { opacity: 1; }
.checklist-delete:hover { color: var(--danger); background: rgba(248,112,112,.12); }
.checklist-delete i { width: 13px; height: 13px; }

.checklist-items { display: flex; flex-direction: column; gap: 2px; }
.checklist-item-row { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 7px; transition: background .12s; }
.checklist-item-row:hover { background: rgba(255,255,255,.03); }
.checklist-item-row:hover .checklist-item-delete { opacity: 1; }
.checklist-checkbox {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 5px; border: 1.5px solid var(--border);
  background: var(--bg); cursor: pointer; appearance: none; display: grid; place-items: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.checklist-checkbox:checked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(248,136,88,.55); }
.checklist-checkbox:checked::after { content: ''; width: 4px; height: 8px; border: solid #1a0d05; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.checklist-item-text { flex: 1; min-width: 0; font-size: 12.5px; word-break: break-word; }
.checklist-item-row.is-done .checklist-item-text { color: var(--text-faint); text-decoration: line-through; }
.checklist-item-delete { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 3px; border-radius: 5px; opacity: 0; transition: opacity .15s, color .15s; flex-shrink: 0; }
.checklist-item-delete:hover { color: var(--danger); }
.checklist-item-delete i { width: 12px; height: 12px; }

.checklist-add-row { display: flex; gap: 6px; margin-top: 8px; }
.checklist-add-row input { flex: 1; font-size: 12px; padding: 7px 9px; }
.checklist-add-row button { padding: 7px 9px; }

.checklist-add-block-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px dashed var(--border); color: var(--text-dim); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; cursor: pointer; transition: border-color .15s, color .15s, box-shadow .15s;
}
.checklist-add-block-btn:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 14px rgba(248,136,88,.1) inset; }

@media (max-width: 900px) {
  .card-flyover { height: 94vh; max-height: none; }
  .cf-body { flex-direction: column; overflow-y: auto; }
  .cf-sidebar { flex: none; border-left: none; border-top: 1px solid var(--border); }
}

/* ---------------------------------------------------------------------- */
/* Legacy views (Tickets split-view, Reviews, Voice, Settings)            */
/* ---------------------------------------------------------------------- */
.split { display: flex; height: calc(100vh - 0px); }
.ticket-list-pane { width: 320px; border-right: 1px solid var(--border); overflow-y: auto; padding: 16px; flex-shrink: 0; }
.ticket-detail-pane { flex: 1; padding: 20px 26px; overflow-y: auto; display: flex; flex-direction: column; }

.ticket-item { padding: 12px; border-radius: 9px; margin-bottom: 8px; background: var(--bg-card); cursor: pointer; border: 1px solid var(--border); font-size: 12.5px; }
.ticket-item:hover { border-color: var(--accent); }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.messages { flex: 1; overflow-y: auto; margin-bottom: 14px; }
.message { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; }
.reply-box { display: flex; gap: 8px; }
.reply-box input { flex: 1; }

.review-item, .voice-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.stars i { width: 14px; height: 14px; color: var(--warning); }
.bar-row { margin: 8px 0; }
.bar-bg { background: var(--bg); border-radius: 6px; height: 16px; overflow: hidden; }
.bar-fill { background: var(--gradient-brand); height: 100%; }
.voice-item { display: flex; justify-content: space-between; align-items: center; }

#editor { width: 100%; min-height: 60vh; font-family: 'Consolas', monospace; font-size: 0.85rem; white-space: pre; resize: vertical; }
.toolbar { display: flex; gap: 10px; margin: 14px 0; align-items: center; }
.status { font-size: 12.5px; }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }

/* ---------------------------------------------------------------------- */
/* Handy / Tablet: Kopfleiste + Sidebar als Drawer                        */
/* ---------------------------------------------------------------------- */
.mobile-topbar, .sidebar-backdrop, .sidebar-close-btn { display: none; }

@media (max-width: 900px) {
  .app-shell { flex-direction: column; height: 100vh; height: 100dvh; }
  .mobile-topbar {
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
    height: 56px; padding: 0 14px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right));
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 24px rgba(0,0,0,.3); position: relative; z-index: 250;
  }
  .mobile-menu-btn, .sidebar-close-btn {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  }
  .mobile-menu-btn i, .sidebar-close-btn i { width: 20px; height: 20px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-weight: 800; font-size: 15px; letter-spacing: .4px; }
  .mobile-brand img { width: 26px; height: 26px; object-fit: contain; }
  .mobile-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 400;
    width: min(300px, 86vw); height: 100%; height: 100dvh;
    padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-105%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
  }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .sidebar-close-btn { display: inline-flex; position: absolute; top: 14px; right: 12px; width: 36px; height: 36px; z-index: 2; }
  .sidebar .brand { padding-right: 44px; }
  .sidebar .nav-link { min-height: 44px; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 350; background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }

  /* Auf Touch-Geräten scrollt das Dokument statt .main -- so klappt die Browser-Adressleiste ein und
     Pull-to-Refresh / "nach oben tippen" funktionieren. Die Kopfleiste bleibt per sticky oben. */
  .app-shell { display: block; height: auto; overflow: visible; }
  .mobile-topbar { position: sticky; top: 0; }
  .main { display: block; height: auto; min-height: calc(100dvh - 56px); overflow: visible; overflow-x: clip; }
  .main::before { position: fixed; }
  body { overflow-x: hidden; }
  /* Kanban-Board braucht eine feste Höhe (Spalten scrollen einzeln) -> dort bleibt .main der Scroll-Container. */
  body:has(.kbv-page) .app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
  body:has(.kbv-page) .main { display: flex; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
  .main-content { padding: 18px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .sidebar-backdrop { transition: none; } }

/* ==========================================================================
   LOGIN-SCREEN -- "Orange LED"-Redesign: zweigeteiltes Split-Layout (Marken-
   Moment links, Login-Karte rechts auf leicht anderem Dunkel-Ton), inspiriert
   von der PrimeBlocks-Team-Panel-Referenz. Bleibt Discord-OAuth-only, inkl.
   Discord-Connecting-Animation.
   ========================================================================== */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; overflow-y: auto; padding: 24px;
}

.login-split {
  display: flex; width: 100%; max-width: 1180px; min-height: 620px; max-height: 92vh;
  margin: auto; border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xl), 0 0 60px rgba(248, 136, 88, .05);
  animation: loginRiseIn .65s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes loginRiseIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .login-split { animation: none; }
}

/* --- Linke Spalte: Marken-Moment ----------------------------------------- */
.login-pane-brand {
  flex: 1 1 52%; position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg) 100%);
  padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between;
}
/* Feines Raster + eine dezente Ecken-Glut -- Layout-Anleihe der Referenz,
   Farbgebung/Ton bleibt unser "LED"-Orange statt PrimeBlocks-Gelb. */
.login-pane-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 64px);
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 78%);
  mask-image: linear-gradient(200deg, #000 10%, transparent 78%);
}
.login-pane-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(480px circle at 12% 108%, rgba(248, 136, 88, .10), transparent 62%);
}

/* Zwei langsam driftende, weiche Glow-Orbs für mehr Tiefe/Atmosphäre --
   rein dekorativ, daher aria-hidden + pointer-events:none. */
.login-brand-orbs { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.login-orb { position: absolute; border-radius: 50%; filter: blur(54px); animation: orbDrift ease-in-out infinite; }
.login-orb-1 {
  width: 280px; height: 280px; top: -70px; right: -70px;
  background: radial-gradient(circle, rgba(248, 136, 88, .24), transparent 70%);
  animation-duration: 17s;
}
.login-orb-2 {
  width: 230px; height: 230px; bottom: 8%; left: -70px;
  background: radial-gradient(circle, rgba(248, 184, 72, .16), transparent 70%);
  animation-duration: 21s; animation-delay: -6s;
}
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(26px, -20px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .login-orb { animation: none; } }

/* Wrapper um Header-Zeile + Zweckerklärung -- bleibt als EIN Flex-Kind von
   .login-pane-brand (neben .login-pane-copy), damit justify-content:space-between
   weiterhin nur "oben"/"unten" auf zwei Blöcke verteilt statt die Erklärung
   mittig zwischen Header und Copy zu verwaisen. */
.login-brand-top { position: relative; z-index: 1; width: 100%; }

/* Header-Zeile: Logo+Wordmark links, "System Online"-Status rechts -- ersetzt
   den vorherigen zentrierten Lockup, der bei mehr Inhalt in der Spalte
   (Float-Card, Feature-Chips) verloren wirkte. */
.login-brand-header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-brand-mark { display: flex; align-items: center; gap: 10px; }
.login-brand-mark img { width: 28px; height: 28px; object-fit: contain; }
.login-brand-mark span { font-weight: 800; font-size: 14px; letter-spacing: .3px; }

/* Kurze Zweckerklärung direkt unter dem Wordmark -- macht auf den ersten
   Blick klar, dass dies das interne Dev-Dashboard ist (nur Devs +
   Serverleitung), statt das nur implizit über die Anmeldeseite zu vermitteln. */
.login-brand-note {
  position: relative; z-index: 1; max-width: 340px; margin: 10px 0 0;
  font-size: 12px; line-height: 1.5; color: var(--text-faint);
}

.login-status-pill {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 5px 12px 5px 9px; background: rgba(255, 255, 255, .025);
}
.login-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6ee787;
  box-shadow: 0 0 8px rgba(110, 231, 135, .8);
  animation: statusDotPulse 2s ease-in-out infinite;
}
@keyframes statusDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) { .login-status-dot { animation: none; } }

/* Schwebende Glass-Card in der leeren Mitte der linken Spalte -- gibt einen
   konkreten Produkt-Hinweis (statt nur Marketing-Text) und füllt den Raum
   zwischen Header und Copy, der zuvor komplett leer war. */
.login-float-card {
  position: absolute; z-index: 1; top: 32%; right: 44px; max-width: 250px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .035); border: 1px solid var(--border-soft);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  animation: floatCardHover 5.5s ease-in-out infinite;
}
.login-float-card-icon {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); color: #1a0d05;
}
.login-float-card-icon i { width: 18px; height: 18px; }
.login-float-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.login-float-card-text strong { font-size: 12.5px; font-weight: 700; }
.login-float-card-text span { font-size: 11px; color: var(--text-faint); }
@keyframes floatCardHover {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-9px); }
}
@media (max-width: 900px) { .login-float-card { display: none; } }
@media (prefers-reduced-motion: reduce) { .login-float-card { animation: none; } }

.login-pane-copy { position: relative; z-index: 1; max-width: 420px; }

/* Kleine Feature-Chips unter dem Copy-Text -- konkretisiert "alles an einem
   Ort" statt es nur zu behaupten. */
.login-feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.login-feature-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 6px 12px;
  background: rgba(255, 255, 255, .02);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.login-feature-chip:hover { border-color: rgba(248, 136, 88, .4); color: var(--text); background: rgba(248, 136, 88, .06); }
.login-feature-chip i { width: 13px; height: 13px; color: var(--accent); }
.login-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 14px; text-shadow: 0 0 14px rgba(248, 184, 72, .35);
}
.login-headline { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.login-copy { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }

/* --- Rechte Spalte: Login-Karte ------------------------------------------- */
.login-pane-form {
  flex: 1 1 48%; background: var(--bg); display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative;
}
.login-card {
  width: 380px; max-width: 100%; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative;
}
.login-card h1 { font-size: 24px; margin: 0 0 8px; letter-spacing: -.01em; width: 100%; position: relative; z-index: 1; }
.login-card p { color: var(--text-dim); font-size: 13px; line-height: 1.5; margin-bottom: 26px; width: 100%; position: relative; z-index: 1; }
.login-card .login-alert-failed { width: 100%; }

/* Großes, sanft schwebendes Hero-Logo statt der kleinen umrandeten Box --
   der "coolere" Blickfang der Login-Karte, kein Container-Rahmen drumherum. */
.login-hero-logo {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 112px; height: 112px; margin-bottom: 22px;
  animation: heroPopIn .55s .15s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes heroPopIn {
  from { opacity: 0; transform: scale(.75) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-hero-logo { animation: none; }
}
.login-hero-logo::before {
  content: ""; position: absolute; inset: -34%; z-index: 0;
  background: radial-gradient(circle, rgba(248, 136, 88, .38), transparent 68%);
  filter: blur(20px);
  animation: heroGlowPulse 3.4s ease-in-out infinite;
}
.login-hero-logo img {
  width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1;
  animation: heroLogoFloat 4.8s ease-in-out infinite;
  filter: drop-shadow(0 10px 28px rgba(248, 136, 88, .28));
}
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes heroGlowPulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .login-hero-logo img, .login-hero-logo::before { animation: none; }
}

.login-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--accent-2); background: transparent; border: 1px solid var(--border-soft);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
  position: relative; z-index: 1; text-transform: uppercase;
}

.login-alert-failed {
  background: rgba(248, 112, 112, .10); border: 1px solid rgba(248, 112, 112, .35); color: var(--danger);
  padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px; text-align: left;
}

.login-subtext { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .login-split { flex-direction: column; max-height: none; min-height: 0; width: 100%; }
  .login-pane-brand { padding: 32px 28px; }
  .login-headline { font-size: 24px; }
  .login-pane-copy { max-width: none; }
  .login-pane-form { padding: 32px 28px; }
}
@media (max-width: 560px) {
  .login-wrap { padding: 0; }
  .login-split { border-radius: 0; min-height: 100dvh; }
  .login-pane-brand { padding: 26px 22px 20px; }
  .login-copy { display: none; }
}

/* Gleiche Primär-Behandlung wie .btn (Gradient + dunkler Text) statt einer
   eigenen flachen Akzentfarbe -- sonst wechselt die "Hauptbutton"-Optik beim
   Übergang Login -> App die Farbfamilie (Orange -> Gold) und die drei Seiten
   wirken wie drei verschiedene Systeme. */
.discord-btn {
  background: var(--gradient-brand); color: #1a0d05;
  width: 100%; padding: 14px 20px; border-radius: 12px;
  font-weight: 700; font-size: 15px; border: 1px solid transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast); outline: none; position: relative; z-index: 1;
}
.discord-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--glow-soft);
}
.discord-btn:focus-visible { outline: none; box-shadow: var(--shadow-md), 0 0 0 2px var(--bg), 0 0 0 4px rgba(248, 136, 88, .55); }
.discord-icon-svg { width: 20px; height: 20px; fill: currentColor; }

.connecting-content { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.connecting-content h2 { margin: 4px 0 6px; font-size: 19px; }
.connecting-content p { color: var(--text-dim); font-size: 13.5px; margin: 0; }

.discord-spinner-container {
  position: relative; width: 90px; height: 90px; margin: 0 auto 10px auto;
  display: flex; align-items: center; justify-content: center;
}
.spinner-ring-outer {
  position: absolute; width: 84px; height: 84px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spinRing 1.4s linear infinite;
}
.spinner-ring-inner {
  position: absolute; width: 66px; height: 66px; border-radius: 50%;
  border: 2px solid transparent; border-bottom-color: var(--accent-2); border-left-color: var(--accent-2);
  animation: spinRingReverse 1.8s linear infinite;
}
.discord-center-icon { z-index: 2; display: flex; align-items: center; justify-content: center; }
@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes spinRingReverse { to { transform: rotate(-360deg); } }

.dots-pulse { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.dots-pulse span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dotPulse 1.4s infinite ease-in-out; }
.dots-pulse span:nth-child(1) { animation-delay: 0s; }
.dots-pulse span:nth-child(2) { animation-delay: 0.2s; }
.dots-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1.4); opacity: 1; filter: drop-shadow(0 0 6px var(--accent)); }
}

.loading-bar-container { position: fixed; bottom: 0; left: 0; width: 100%; height: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.loading-bar-progress {
  width: 70%; height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #D88048 100%);
  box-shadow: 0 0 10px var(--accent);
  animation: barProgress 1.6s infinite ease-in-out;
}
@keyframes barProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(150%); }
}

/* ==========================================================================
   TOPBAR + STAT-BOXES + INSIGHTS-GRID -- 1:1 aus dem Team-Board übernommen.
   ========================================================================== */
.topbar-v2 { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 14px; flex-wrap: wrap; }
.dashboard-badge-top { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--accent); margin-bottom: 4px; }
.dashboard-title { font-size: 28px; font-weight: 800; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.btn-dark-archive {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; font-weight: 600; padding: 8px 16px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-dark-archive:hover { background: var(--bg-elevated); border-color: var(--text-dim); }
.btn-dark-archive i { width: 15px; height: 15px; }

.stat-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .stat-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .stat-grid-4 { grid-template-columns: 1fr; } }
.stat-grid-4.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.stat-box:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.stat-content { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 6px; color: var(--text); }
.stat-num.stat-blue { color: var(--accent-2); }
.stat-num.stat-orange { color: var(--accent); }
.stat-num.stat-green { color: #8fd858; }
.stat-title { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--text-dim); }
.trend-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; color: var(--text-dim); width: fit-content; }
.trend-badge i { width: 12px; height: 12px; }
.trend-up { color: #8fd858; }
.trend-down { color: #ef7a6a; }
.trend-flat, .trend-none { color: var(--text-faint); font-weight: 600; }
/* Neutral als Standard, Farbe nur dort wo sie etwas bedeutet -- statt vorher
   alle Stat-Icons pauschal in Akzent-Orange, unabhängig davon, ob die
   Kennzahl überhaupt Aufmerksamkeit braucht (siehe Client-Feedback: Orange
   nur als Akzent, nicht großflächig). Generische, seitenübergreifend
   wiederverwendbare Semantik-Klassen statt Leichen-Namen wie "icon-crown"/
   "icon-star" aus einem früheren Rank-System ohne Bezug zur jeweiligen Seite. */
.stat-icon-wrap {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-dim); flex-shrink: 0;
}
.stat-icon-wrap i { width: 20px; height: 20px; }
.stat-icon-wrap.icon-warn { color: var(--accent); border-color: rgba(216, 128, 72, .3); }
.stat-icon-wrap.icon-danger { color: var(--danger); border-color: rgba(248, 112, 112, .3); }
.stat-icon-wrap.icon-success { color: #8fd858; border-color: rgba(143, 216, 88, .3); }

.overview-insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.overview-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.overview-fill { flex: 1 1 auto; display: flex; flex-direction: column; }
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 200px; }
.chart-wrap canvas { position: absolute; inset: 0; }
.team-change-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 24px; }
@media (max-width: 900px) { .overview-insights-grid { grid-template-columns: 1fr; gap: 14px; } }
.bottom-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; min-height: 140px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.bottom-card:hover { border-color: rgba(248, 136, 88, .34); box-shadow: var(--shadow-md); }
.bottom-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.bottom-card-header > i { width: 18px; height: 18px; color: var(--text-dim); }
.bottom-card-header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.dashboard-title > i { color: var(--text); }
.overview-card-hint { display: block; margin-top: 1px; color: var(--text-faint); font-size: 10.5px; font-weight: 500; }

.team-change-list { display: flex; flex-direction: column; }
.team-change-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border);
  transition: opacity .16s ease, transform .16s ease; color: var(--text);
}
.team-change-item:last-child { border-bottom: none; }
.team-change-item.is-clickable:hover { opacity: .94; transform: translateX(1px); }
.team-change-avatar {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%;
  background-color: var(--bg-elevated); background-position: center; background-size: cover; border: 1px solid var(--border); overflow: hidden;
}
.team-change-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-change-avatar i { width: 15px; height: 15px; color: var(--text-dim); }
.team-change-avatar.is-join { color: #8fd858; }
.team-change-avatar.is-leave { color: #ef7a6a; }
.team-change-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.team-change-body strong { font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-change-body span { font-size: 11px; color: var(--text-dim); }
.team-change-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.team-change-meta time { font-size: 10.5px; color: var(--text-faint); }
.team-change-open { color: var(--accent) !important; font-size: 9px !important; font-weight: 700; }
.empty-state-v2 { text-align: center; color: var(--text-faint); font-size: 13px; padding: 20px 0; }
.empty-state-v2.compact-empty { padding: 18px 0 8px; }
.empty-state-v2 .check-icon { width: 26px; height: 26px; margin-bottom: 8px; opacity: .6; }

/* ==========================================================================
   GLOBALE SUCHE (Ctrl+K) -- 1:1 aus dem Team-Board übernommen.
   ========================================================================== */
.global-search-shell.in-topbar { position: relative; top: auto; right: auto; width: 330px; flex: 0 1 330px; }
.global-search-shell.in-topbar .global-search-results { position: absolute; top: 46px; left: 0; right: 0; z-index: 50; }
@media (max-width: 900px) { .global-search-shell.in-topbar { order: -1; width: 100%; flex-basis: 100%; } }
.global-search-box {
  height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: 11px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28); backdrop-filter: blur(14px);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.global-search-box:focus-within { border-color: rgba(248,136,88,.58); box-shadow: 0 14px 34px rgba(0,0,0,.36), 0 0 24px rgba(248,136,88,.10); }
.global-search-box input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 600 12.5px var(--font); }
.global-search-box input::placeholder { color: var(--text-faint); }
.global-search-icon { width: 17px; height: 17px; color: var(--text-dim); flex: 0 0 auto; transition: color var(--transition-fast); }
.global-search-box:focus-within .global-search-icon { color: var(--accent-2); }
.global-search-box kbd {
  flex: 0 0 auto; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px;
  color: var(--text-faint); background: rgba(255,255,255,.025); font: 600 10px/1.2 var(--font);
}
.global-search-results {
  margin-top: 8px; padding: 8px; max-height: min(500px, calc(100vh - 82px)); overflow-y: auto;
  background: rgba(15, 15, 17, .98); border: 1px solid var(--border-soft); border-radius: 13px;
  box-shadow: 0 24px 55px rgba(0,0,0,.48); backdrop-filter: blur(18px); animation: globalSearchIn .16s ease both;
}
.global-search-section { padding: 7px 9px 5px; color: var(--text-faint); font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; }
.global-search-result { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; color: var(--text); transition: background .14s ease, transform .14s ease; }
.global-search-result:hover { background: rgba(248,136,88,.08); transform: translateX(2px); }
.global-search-result-icon {
  width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px;
  color: var(--text-dim); background: var(--bg-elevated); border: 1px solid var(--border);
}
.global-search-result:hover .global-search-result-icon { color: var(--accent-2); }
.global-search-result-icon i { width: 15px; height: 15px; }
.global-search-result-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.global-search-result-copy strong { font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search-result-copy small { font-size: 10.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search-arrow { width: 14px; height: 14px; color: var(--text-faint); flex: 0 0 auto; }
.global-search-empty, .global-search-loading { min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--text-faint); font-size: 12px; }
.global-search-empty i { width: 17px; height: 17px; color: var(--text-faint); }
.global-search-loading span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: searchPulse .9s ease-in-out infinite; }
.global-search-loading span:nth-child(2) { animation-delay: .12s; }
.global-search-loading span:nth-child(3) { animation-delay: .24s; }
@keyframes globalSearchIn { from { opacity: 0; transform: translateY(-5px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes searchPulse { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* ==========================================================================
   INAKTIVITÄTS-OVERLAY ("Bist du noch da?")
   ========================================================================== */
.idle-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(4, 4, 5, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  animation: idleFadeIn .25s ease both;
}
@keyframes idleFadeIn { from { opacity: 0; } to { opacity: 1; } }
.idle-card {
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg) 100%);
  border: 1px solid var(--border-soft); border-radius: 20px;
  padding: 38px 36px; text-align: center; width: 360px; max-width: calc(100vw - 40px);
  box-shadow: var(--shadow-xl);
  cursor: default;
}
.idle-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center;
}
.idle-icon i { width: 26px; height: 26px; color: var(--accent); }
.idle-card h2 { font-size: 19px; margin: 0 0 10px; }
.idle-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin: 0 0 22px; }
.idle-card p span { color: var(--accent); font-weight: 700; }
.idle-card .btn { width: 100%; justify-content: center; }

/* ==========================================================================
   SCHNELLZUGRIFF -- flache Icon-über-Label-Leiste statt Karten mit Icon-Box
   ========================================================================== */
.quickaccess-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quickaccess-item {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; color: var(--text);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.quickaccess-item:hover { background: rgba(248, 136, 88, .06); border-color: rgba(248, 136, 88, .34); transform: translateY(-1px); }
.quickaccess-icon {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); transition: border-color .15s ease;
}
.quickaccess-item:hover .quickaccess-icon { border-color: rgba(248, 136, 88, .34); }
.quickaccess-icon i { width: 20px; height: 20px; color: var(--text-dim); transition: color var(--transition-fast); }
.quickaccess-item:hover .quickaccess-icon i { color: var(--accent); }
.quickaccess-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quickaccess-item strong { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quickaccess-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .quickaccess-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .quickaccess-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   KANBAN LABELS (Planka/Trello-Stil)
   ========================================================================== */
.card-labels { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.card-label-chip { width: 24px; height: 5px; border-radius: 3px; display: inline-block; }
.label-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-dim); font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.label-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.label-chip:hover { border-color: var(--chip-color, var(--accent)); }
.label-chip.active { background: color-mix(in srgb, var(--chip-color, var(--accent)) 18%, var(--bg-card)); border-color: var(--chip-color, var(--accent)); color: var(--text); }

/* ==========================================================================
   EMBED CREATOR (Dashboard, Embed + Components V2)
   ========================================================================== */
.eb-type-toggle { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; }
.eb-type-btn { padding: 7px 16px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); background: none; border: none; cursor: pointer; transition: all .15s; }
.eb-type-btn.active { background: var(--gradient-brand); color: #fff; }

.eb-layout { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .eb-layout { grid-template-columns: 1fr; } }

.eb-form-panel { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 180px); overflow-y: auto; }
.eb-preview-panel { position: sticky; top: 20px; }

.eb-field-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.eb-field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.eb-field-row label, .eb-field-row-2 label { font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.eb-field-row input, .eb-field-row textarea, .eb-field-row-2 input, .eb-form-panel select {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 13px; font-family: inherit;
}
.eb-field-row input:focus, .eb-field-row textarea:focus, .eb-field-row-2 input:focus, .eb-form-panel select:focus {
  outline: none; border-color: var(--accent);
}
.eb-field-row input[type="color"] { padding: 3px; height: 36px; cursor: pointer; }

.eb-field-item, .eb-block-item {
  display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; margin-bottom: 6px; position: relative;
}
.eb-field-item input { flex: 1; min-width: 0; }
.eb-inline-toggle { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.eb-remove-btn { background: none; border: none; color: var(--danger); cursor: pointer; padding: 4px; flex-shrink: 0; }
.eb-remove-btn i { width: 14px; height: 14px; }

.eb-block-item { flex-direction: column; align-items: stretch; cursor: default; transition: opacity .15s, border-color .15s; }
.eb-block-item textarea, .eb-block-item input { width: 100%; margin-top: 4px; }
.eb-block-label { font-size: 11px; font-weight: 700; color: var(--accent-2); padding-left: 20px; }
.eb-block-controls { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.eb-block-controls button { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 3px; }
.eb-block-controls button i { width: 13px; height: 13px; }
.eb-drag-handle {
  position: absolute; top: 8px; left: 6px; cursor: grab; color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; padding: 2px;
}
.eb-drag-handle:active { cursor: grabbing; }
.eb-drag-handle i { width: 14px; height: 14px; }
.eb-block-item.is-dragging { opacity: .4; }
.eb-block-item.is-drop-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.eb-template-list { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.eb-preview-channel-info { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.eb-preview-channel-info i { width: 14px; height: 14px; color: var(--text-dim); }
.eb-channel-id { margin-left: auto; font-size: 10.5px; color: var(--text-faint); font-family: monospace; }

.discord-embed { background: var(--bg); border-left: 4px solid var(--accent); border-radius: 4px; padding: 10px 14px; }
.discord-embed .title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.discord-embed .desc { font-size: 13px; color: var(--text-dim); white-space: pre-wrap; }
.discord-embed .footer { font-size: 11px; color: var(--text-faint); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.discord-embed .footer img { width: 16px; height: 16px; border-radius: 50%; }
.eb-preview-author { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.eb-preview-author img { width: 18px; height: 18px; border-radius: 50%; }
.eb-preview-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.eb-preview-field { font-size: 12px; }
.eb-preview-field strong { display: block; font-size: 11.5px; margin-bottom: 2px; }
.eb-preview-field.inline { flex: 1 1 30%; min-width: 100px; }
.eb-preview-image { max-width: 100%; border-radius: 6px; margin-top: 8px; }

.discord-v2-container { background: var(--bg); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.eb-preview-v2-text { font-size: 13px; color: var(--text-dim); white-space: pre-wrap; }
.eb-preview-v2-sep { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.eb-preview-v2-sep-lg { margin: 14px 0; }
.eb-preview-v2-gap { height: 4px; }
.eb-preview-v2-gap.eb-preview-v2-sep-lg { height: 16px; margin: 0; }
.eb-preview-v2-button { display: inline-block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 12px; }

/* ==========================================================================
   MODULE-ÜBERSICHT
   ========================================================================== */
.mods-filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.mods-filter-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer;
  transition: all .15s;
}
.mods-filter-btn:hover { border-color: var(--accent); color: var(--text); }
.mods-filter-btn.active { background: var(--gradient-brand); color: #fff; border-color: transparent; }

.mods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mods-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s;
}
.mods-card:hover { border-color: rgba(248, 136, 88, .4); transform: translateY(-1px); }
.mods-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mods-card-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(248,136,88,.14), rgba(216,128,72,.06)); border: 1px solid var(--border-soft); color: var(--accent);
}
.mods-card-icon i { width: 18px; height: 18px; }
.mods-badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.mods-badge.is-on { background: rgba(34, 197, 94, .14); color: #4ade80; border: 1px solid rgba(34, 197, 94, .3); }
.mods-badge.is-off { background: rgba(148, 148, 148, .1); color: var(--text-faint); border: 1px solid var(--border); }
.mods-card h3 { font-size: 14.5px; margin-bottom: 4px; }
.mods-card p { font-size: 12px; color: var(--text-dim); line-height: 1.4; margin-bottom: 10px; min-height: 34px; }
.mods-card-category { font-size: 10.5px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ==========================================================================
   EMBED CREATOR V2 — Mehrere Container, alle Block-Typen, Drag & Drop
   ========================================================================== */
.eb-container-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; margin-bottom: 12px; transition: opacity .15s, border-color .15s;
}
.eb-container-card.is-dragging { opacity: .4; }
.eb-container-card.is-drop-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.eb-container-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eb-container-head .eb-drag-handle { position: static; cursor: grab; }
.eb-container-title { font-size: 12px; font-weight: 700; color: var(--text); flex: 1; }
.eb-container-head input[type="color"] { width: 32px; height: 26px; padding: 2px; cursor: pointer; }

.eb-container-blocks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.eb-container-blocks .eb-block-item { margin-bottom: 0; }

.eb-add-block-row { display: flex; flex-wrap: wrap; gap: 5px; }
.eb-add-block-row button {
  background: var(--bg); border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px;
  padding: 5px 9px; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: border-color .15s, color .15s;
}
.eb-add-block-row button:hover { border-color: var(--accent); color: var(--text); }
.eb-add-block-row button i { width: 12px; height: 12px; }

.eb-preview-v2-section { display: flex; align-items: flex-start; gap: 10px; }
.eb-preview-v2-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.eb-preview-v2-gallery { display: flex; flex-wrap: wrap; gap: 6px; }
.eb-preview-v2-gallery img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.eb-preview-v2-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================================
   EMBED CREATOR — YAML-Import-Dropzone
   ========================================================================== */
.eb-dropzone {
  display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 16px;
  border: 2px dashed var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.eb-dropzone:hover, .eb-dropzone.is-drag-over { border-color: var(--accent); background: rgba(248, 136, 88, .06); }
.eb-dropzone i { width: 26px; height: 26px; color: var(--text-dim); flex-shrink: 0; transition: color var(--transition-fast); }
.eb-dropzone:hover i, .eb-dropzone.is-drag-over i { color: var(--accent); }
.eb-dropzone strong { font-size: 13px; display: block; margin-bottom: 2px; }
.eb-dropzone p { font-size: 11.5px; color: var(--text-faint); margin: 0; }

/* ==========================================================================
   TICKET-EINRICHTUNG
   ========================================================================== */
.ts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ts-type-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ts-type-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ts-type-head h3 i { width: 16px; height: 16px; color: var(--text-dim); }
.ts-emoji { font-size: 18px; line-height: 1; }
.ts-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(245, 158, 11, .14); color: var(--warning); border: 1px solid rgba(245, 158, 11, .3); }
.ts-badge.ok { background: rgba(34, 197, 94, .12); color: var(--success); border-color: rgba(34, 197, 94, .3); }
.ts-badge.off { background: rgba(255, 255, 255, .04); color: var(--text-dim); border-color: var(--border); }
.ts-section-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin: 18px 0 8px; }
.ts-roles, .ts-view-roles { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; }
.ts-chip { flex-direction: row; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 12px; color: var(--text); transition: border-color .15s, background .15s; }
.ts-chip input { display: none; }
.ts-chip:has(input:checked) { border-color: var(--accent); background: rgba(248, 136, 88, .14); }
.ts-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ts-inline { flex-direction: row; align-items: center; gap: 7px; white-space: nowrap; }
.ts-inline input { width: auto; margin: 0; }
.ts-question { display: grid; grid-template-columns: 2fr 2fr 100px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.ts-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .ts-question { grid-template-columns: 1fr; } }

/* ==========================================================================
   KANBAN — Assignee-Avatare
   ========================================================================== */
.card-assignee-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-left: auto; flex-shrink: 0;
  border: 1px solid var(--border-soft);
}
.card-assignee-empty {
  display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-faint);
}
.card-assignee-empty i { width: 11px; height: 11px; }

.eb-template-chip { display: inline-flex; align-items: center; gap: 2px; }
.eb-template-delete {
  background: var(--bg-card); border: 1px solid var(--border); border-left: none; border-radius: 0 8px 8px 0;
  color: var(--danger); padding: 5px 7px; cursor: pointer; height: 100%;
}
.eb-template-delete:hover { background: rgba(239,68,68,.12); }
.eb-template-delete i { width: 13px; height: 13px; }

/* ==========================================================================
   TEAM-KOMPONENTEN — aus dem bisherigen Teamsystem-Dashboard übernommen
   (Teamboard, UP/DERANK, Modals). Nur was die Team-Seiten wirklich nutzen.
   ========================================================================== */
:root {
  --c-neon-magenta: #F88858;
  --c-gold: #F8E858;
  --c-salmon: #F87070;
  --c-orange-gold: #F8B848;
  --c-violet: #F8B848;
  --green: #F8E858;
  --c-coral: #F87868;
  --yellow: #F8B848;
  --red: #F87070;
  --dashboard-content-max: 1240px;
  --bg-secondary: #131316;
  --border-color: #2a2a2f;
}
@keyframes rankDetailOpen { from { opacity:0; transform:translateY(-2px); } to { opacity:1; transform:none; } }
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* --- aus style.css --- */
.btn-outline { background: transparent; border: 1px solid var(--border-soft); color: var(--text); }
.btn-outline:hover { border-color: var(--c-neon-magenta); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.grid { display: grid; gap: 18px; }
.badge { display: inline-flex; align-items:center; gap:5px; padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; }
.badge-green { background: rgba(248,232,88,.14); color: var(--c-gold); }
.badge-red { background: rgba(248,112,112,.14); color: var(--c-salmon); }
.badge-yellow { background: rgba(248,184,72,.14); color: var(--c-orange-gold); }
.badge-purple { background: rgba(216, 128, 72,.14); color: var(--c-violet); }
.badge-gray { background: rgba(205,185,168,.12); color: var(--text-dim); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; color: var(--text-faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255,255,255,.015); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.form-row .field { flex: 1; min-width: 180px; }
.login-card img.logo { width: 90px; margin-bottom: 14px; }
.section-title { font-size: 14px; font-weight: 700; margin: 26px 0 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.member-card .top { display:flex; align-items:center; gap:10px; }
.member-card .top img { width: 34px; height:34px; border-radius: 50%; background:#2a2a2f; }
.member-card .top .name { font-size: 13.5px; font-weight: 700; }
.member-card .badges { display:flex; flex-wrap:wrap; gap:5px; }
.notif-item.read { opacity:.72; }
.notif-item.warn .notif-icon { color:#f7bd27; background:rgba(247,189,39,.1); border-color:rgba(247,189,39,.24); }
.notif-item.expired .notif-icon { color:#39d87a; background:rgba(37,211,102,.09); border-color:rgba(37,211,102,.2); }
.notif-copy { min-width:0; }
.stat-icon-wrap.icon-users { color: #F8B848; border-color: rgba(216, 128, 72,0.3); }
.stat-icon-wrap.icon-shield { color: #F8E858; border-color: rgba(248, 232, 88,0.3); }
.price-row.head {
  background: transparent;
  border-color: transparent;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.live {
  background: rgba(248, 232, 88, 0.12);
  color: var(--green);
}
.btn-teal-add {
  background: #F88858;
  border: none;
  color: #131316;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-teal-add:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.stat-num.stat-purple { color: #D88048; }
.stat-icon-wrap.icon-building { color: #D88048; border-color: rgba(216, 128, 72,0.3); }
.stat-icon-wrap.icon-warning { color: #F8B848; border-color: rgba(248, 184, 72,0.3); }
.search-wrap-v2 {
  margin-bottom: 12px;
}
.search-input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  width: 100%;
}
.search-input-box .search-icon {
  color: var(--text-faint);
  width: 18px;
  height: 18px;
}
.search-input-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
.last-edited-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 24px;
}
.last-edited-note svg {
  width: 14px;
  height: 14px;
}
.department-groups-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}
.dept-group-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.dept-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: rgba(255,255,255,0.015);
  border: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.dept-group-header:hover {
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.dept-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dept-group-title .green-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rank-color);
  box-shadow: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dept-group-accordion:hover .green-dot,
.dept-group-header:hover .green-dot,
.dept-group-header:focus-visible .green-dot {
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--rank-color) 26%, transparent),
    0 0 14px color-mix(in srgb, var(--rank-color) 85%, transparent);
}
.dept-group-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--rank-color);
}
.dept-group-line {
  flex: 1;
  height: 1px;
  min-width: 12px;
  background: var(--border);
}
.dept-group-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.count-pill-v2 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: color-mix(in srgb, var(--rank-color) 14%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--rank-color) 34%, var(--border));
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 26px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
}
.dept-group-chevron,
.dept-group-header svg.dept-group-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.dept-group-header:hover .dept-group-chevron {
  color: var(--rank-color);
}
.dept-group-accordion.collapsed .dept-group-chevron {
  transform: rotate(-90deg);
}
.dept-group-accordion.collapsed .dept-group-body {
  display: none;
}
.dept-group-accordion.dashboard-target {
  border-color: var(--rank-color);
  box-shadow: 0 0 24px color-mix(in srgb, var(--rank-color) 22%, transparent);
}
.member-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1400px) {
.member-card-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
.member-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
.member-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
.member-card-grid { grid-template-columns: 1fr; }
}
.teamboard-member-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.teamboard-member-card:hover {
  border-color: var(--rank-color);
  background: color-mix(in srgb, var(--rank-color) 7%, var(--bg-elevated));
  box-shadow: 0 0 14px color-mix(in srgb, var(--rank-color) 18%, transparent);
  transform: translateY(-1px);
}
.card-avatar-wrap {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
}
.card-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.default-avatar-nv {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F8C848, #4a3400);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.card-info-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.member-display-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.member-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.badge-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.badge-pill.teal { background: #193532; color: #21ae57; border: 1px solid #1c613f; }
.badge-pill.red { background: #38222e; color: #e34243; border: 1px solid #6f2d35; }
.badge-pill.yellow { background: rgba(248, 184, 72,0.25); color: #F8C848; border: 1px solid rgba(248, 184, 72,0.4); }
.badge-pill.green { background: rgba(248, 232, 88,0.2); color: #F8E858; border: 1px solid rgba(248, 232, 88,0.4); }
.badge-pill.warning { background: #343029; color: #dda925; border: 1px solid #5c4d27; }
.badge-pill.strike { background: #38222e; color: #eb4343; border: 1px solid #662b34; }
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.modal-dialog {
  background: #131316;
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  overflow: hidden;
}
.modal-dialog.user-detail-dialog {
  max-width: 680px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-icon-square {
  width: 40px;
  height: 40px;
  background: rgba(248, 136, 88,0.12);
  border: 1px solid rgba(248, 136, 88,0.3);
  border-radius: 10px;
  color: #F88858;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-title-box h2 {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 700;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}
.form-group input,
.form-group select {
  background: #17171a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #F88858;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0,0,0,0.15);
}
.btn-modal-cancel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-modal-cancel:hover { background: var(--bg-elevated); }
.user-modal-banner {
  background: linear-gradient(135deg, var(--rank-color, #F8E858), color-mix(in srgb, var(--rank-color, #F8E858) 68%, #131316));
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2a2100;
}
.banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-banner-avatar.has-image { background-size:cover !important; background-position:center !important; color:transparent; }
.user-banner-avatar {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #131316;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.user-banner-title h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 2px 0;
  color: #2a1a00;
}
.user-banner-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: #2a2100;
}
.banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-discord-profile {
  background: rgba(255,255,255,0.3);
  border: none;
  color: #2a1a00;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-discord-profile:hover { background: rgba(255,255,255,0.45); }
.modal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: #131316;
}
.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  padding: 14px 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.modal-tab-btn.active {
  color: #F88858;
  border-bottom-color: #F88858;
}
.tab-pane { display: none; }
.tab-pane.active { display: flex; flex-direction: column; gap: 20px; }
.modal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}
.section-title svg {
  width: 15px;
  height: 15px;
  color: #F88858;
}
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.user-modal-footer {
  justify-content: space-between;
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-right { display: flex; align-items: center; gap: 10px; }
.sanction-card-header.red { border-left-color: #eb4343; }
.count-pill.red { background: rgba(248, 112, 112,0.2); color: #F87070; }
.sanction-badge.red { background: #38222e; color: #eb4343; border: 1px solid #662b34; }
.btn-archive-red {
  background: #1c0800;
  border: 1px solid #5a1c0a;
  color: #F87868;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-archive-red:hover { background: #1c0800; }
.btn-dark-sec {
  background: #17171a;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.modal-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: var(--text); }
.modal-close-btn.light { color: #0a0a0c; }
.count-pill-v2 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}
.dept-group-body {
  display: block;
  padding: 16px 20px 20px 20px;
  border-top: 1px solid var(--border);
}
.statistics-cards .stat-value.accent { color:#F8C848; }
.supporter-row .rank { color:var(--text-faint); }
.empty-rank-members { grid-column:1/-1; padding:12px 4px; color:var(--text-faint); }
.badge-pill.extra { color:#c6c6cb; border:1px solid #2a2a2f; background:#1e1e22; }
.badge-pill.away { color:#F8E858; border:1px solid #9b7c00; background:rgba(248,232,88,.12); }
.badge-pill.was-away { color:#F88858; border:1px solid #9f431e; background:rgba(248,136,88,.12); }
.badge-pill.warning { color:#dda925; border:1px solid #5c4d27; background:#343029; }
.btn-reactivate { border:1px solid #F8B848; background:rgba(248, 184, 72,.1); color:#F8C848; border-radius:8px; padding:8px 13px; cursor:pointer; }
.support-status-select.is-open { color: var(--c-orange-gold); border-color: rgba(248,184,72,.35); background: rgba(248,184,72,.07); }
.support-status-select.is-closed { color: var(--c-gold); border-color: rgba(248,232,88,.25); background: rgba(248,232,88,.06); }
.global-search-shell.is-open .global-search-box {
  border-color: rgba(248,136,88,.58);
  box-shadow: 0 14px 34px rgba(0,0,0,.36), 0 0 24px rgba(248,136,88,.10);
}
.warn-details {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.warn-details.hidden {
  display: none;
}
.teamboard-member-focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 28px rgba(248,136,88,.38) !important;
}
.modal-dialog { max-height: min(88vh, 900px); display: flex; flex-direction: column; }
.user-modal-body { overflow: auto; overscroll-behavior: contain; }
.modal-dialog form { min-height: 0; }
.rank-proposal-form .full {grid-column:1/-1}
.btn-sm {padding:7px 10px!important;font-size:9px!important}
.page,
.content {
  min-width: 0;
  overflow: visible;
}
.user-modal-body,
.modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(248,136,88,.58) transparent;
}
.user-modal-body::-webkit-scrollbar,
.modal::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.user-modal-body::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
  background: transparent;
}
.user-modal-body::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(248,200,72,.82), rgba(248,136,88,.78));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.user-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(248,136,88,.9);
  background-clip: padding-box;
}
.modal-backdrop {
  z-index: 5000;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-dialog {
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header,
.modal-footer {
  flex: 0 0 auto;
}
.user-modal-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 760px) {
.modal-backdrop {
    align-items: flex-start;
    padding: 12px;
  }
.modal-dialog,
.modal-dialog.user-detail-dialog {
    max-height: calc(100dvh - 24px);
  }
}
.rank-system {padding-bottom:48px}
.rank-modal input,
.rank-modal textarea,
.rank-modal select {width:100%;background:#131316;border:1px solid var(--border);color:var(--text);border-radius:8px;padding:10px 11px;outline:none}
.proposal-pill.uprank {color:#56dfa0;background:rgba(86,223,160,.06);border-color:rgba(86,223,160,.25)}
.proposal-pill.derank {color:#ffbd56;background:rgba(255,189,86,.06);border-color:rgba(255,189,86,.25)}
.proposal-pill.entlassung {color:#ff7676;background:rgba(255,118,118,.06);border-color:rgba(255,118,118,.25)}
.proposal-state.done {color:#63d99d}
.vote-btn.up b {color:#5cdea0}
.vote-btn.down b {color:#ff7777}
.rank-modal-backdrop {position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.68);backdrop-filter:blur(5px);z-index:120000}
.rank-modal-backdrop.open {display:flex;animation:rankBackdropIn .14s ease}
.rank-modal {width:min(520px,100%);max-height:min(760px,calc(100dvh - 28px));overflow:auto;padding:20px;background:#131316;border:1px solid rgba(248,136,88,.28);border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.5);position:relative}
.rank-modal h2 {margin:5px 0;font-size:18px}
.rank-modal>p {margin:0 0 14px;color:var(--text-dim);font-size:9px;line-height:1.5}
.rank-modal form {display:grid;gap:10px}
.rank-modal label {display:grid;gap:5px;color:var(--text-dim);font-size:9px;font-weight:700}
.rank-modal textarea {min-height:82px;resize:vertical}
.rank-modal-close {position:absolute;right:12px;top:10px;border:0;background:transparent;color:var(--text-dim);font-size:24px;cursor:pointer}
.rank-modal-actions {display:flex;justify-content:flex-end;gap:7px;margin-top:3px}
.rank-system-body .module-transition-overlay {z-index:110000}
.modal-backdrop { z-index: 105000 !important; }
.rank-modal-eyebrow { color:#76a9db; }
.rank-detail-card { background:#0a1d35; border:1px solid rgba(117,164,215,.18); border-radius:12px; }
.rank-blue-row.expanded .rank-row-chevron { transform:rotate(90deg); }
.rank-action-tag { display:inline-flex; align-items:center; gap:4px; border-radius:5px; padding:4px 6px; font-size:8px; font-weight:850; white-space:nowrap; }
.rank-action-tag.uprank { color:#28d8a0; background:rgba(40,216,160,.08); border:1px solid rgba(40,216,160,.22); }
.rank-action-tag.derank { color:#ff6471; background:rgba(255,100,113,.08); border:1px solid rgba(255,100,113,.22); }
.rank-action-tag.entlassung { color:#ff6471; background:rgba(255,100,113,.08); border:1px solid rgba(255,100,113,.22); }
.rank-status-tag.done { color:#8ca9c7; background:rgba(140,169,199,.09); }
.rank-blue-row.expanded .rank-row-detail { display:block; animation:rankDetailOpen .16s ease both; }
.rank-blue-secondary.small,
.rank-blue-primary.small { min-height:30px; padding:6px 9px; font-size:9px; }
.rank-vote-button.up { color:#54dca6; }
.rank-vote-button.down { color:#ff7882; }
.rank-modal-backdrop { background:rgba(3,11,21,.76); backdrop-filter:blur(6px); }
.modal-live-list { display:grid; gap:6px; }
.modal-live-row { display:flex; gap:9px; align-items:flex-start; padding:8px 9px; background:rgba(255,255,255,.018); border:1px solid rgba(248,136,88,.08); border-radius:8px; }
.modal-live-row strong,
.modal-live-row small { display:block; }
.modal-live-row strong { font-size:9px; }
.modal-live-row small { margin-top:3px; color:var(--text-faint); font-size:8px; }
.entry-positive,
.entry-negative,
.entry-neutral { display:grid; place-items:center; width:23px; height:23px; border-radius:6px; font-weight:900; flex:0 0 auto; }
.entry-positive { color:#3edaa0; background:rgba(62,218,160,.08); }
.entry-negative { color:#ff707c; background:rgba(255,112,124,.08); }
.entry-neutral { color:#d8ae2d; background:rgba(216,174,45,.08); }
.modal-entry-actions { display:flex; gap:18px; margin-bottom:12px; }
.btn-entry-positive,
.btn-entry-negative { border:0; border-bottom:2px solid transparent; background:transparent; border-radius:0; padding:7px 2px; cursor:pointer; font-weight:800; font-size:11px; opacity:.62; transition:opacity .15s ease,border-color .15s ease,transform .15s ease; }
.btn-entry-positive {color:#48dca4}
.btn-entry-negative {color:#ff747e}
.btn-entry-positive:hover,
.btn-entry-negative:hover,
.btn-entry-positive.selected,
.btn-entry-negative.selected {opacity:1;transform:translateY(-1px)}
.btn-entry-positive.selected {border-bottom-color:#48dca4}
.btn-entry-negative.selected {border-bottom-color:#ff747e}
.quick-entry-form { display:grid; gap:7px; margin-bottom:9px; padding:10px 0; background:transparent; border:0; border-top:1px solid var(--border); border-radius:0; }
.quick-entry-form textarea {min-height:70px; width:100%; background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:7px; padding:8px;}
.quick-entry-form>div {display:flex;justify-content:flex-end;gap:6px}
.rank-back-link { display:inline-flex; margin-bottom:12px; color:#7898ba; font-size:9px; text-decoration:none; }
.rank-detail-hero { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px; background:#0a1d35; border:1px solid rgba(117,164,215,.18); border-radius:13px; border-left:2px solid #2ad7a0; }
.rank-detail-person {display:flex;align-items:center;gap:12px}
.rank-detail-avatar {width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#163556;border:1px solid rgba(117,164,215,.2);color:#d8ae2d;font-weight:900}
.rank-detail-person h1 {margin:4px 0;font-size:19px}
.rank-detail-person p {margin:0;color:#7190b2;font-size:8px}
.rank-detail-ranks {display:flex;gap:7px;align-items:center;margin-top:7px}
.rank-detail-ranks span {padding:5px 7px;border:1px solid rgba(117,164,215,.16);border-radius:6px;background:#081a30;font-size:8px}
.rank-detail-ranks b {color:#d8ae2d}
.rank-detail-votes {display:flex;align-items:center;gap:8px}
.rank-detail-votes>span {font-size:9px;color:#8aa6c4}
.rank-detail-columns {display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:10px;margin-top:10px}
.rank-detail-card {padding:14px;margin-bottom:10px}
.rank-detail-card h2 {margin:0 0 10px;font-size:13px}
.rank-detail-card h2 span {color:#6e8eaf;font-size:8px}
.rank-detail-reason {font-size:10px;line-height:1.55;color:#c4d4e7}
.rank-detail-empty {padding:24px;text-align:center;color:#6e8bab;border:1px dashed rgba(117,164,215,.15);border-radius:8px;font-size:9px}
.rank-detail-comments {display:grid;gap:6px}
.rank-detail-comments>div {padding:8px;background:#081a30;border:1px solid rgba(117,164,215,.1);border-radius:7px}
.rank-detail-comments b {display:block;color:#d8ae2d;font-size:8px}
.rank-detail-comments span {display:block;color:#b1c5db;font-size:9px;margin-top:3px}
.rank-detail-comments small {display:block;color:#5f7f9f;font-size:7px;margin-top:4px}
.rank-detail-comment {display:grid;gap:6px;margin-top:9px}
.rank-detail-comment textarea {min-height:70px;background:#081a30;border:1px solid rgba(117,164,215,.16);border-radius:7px;color:#e7f0fb;padding:8px}
.rank-detail-comment button {justify-self:end}
.rank-detail-card dl {display:grid;gap:9px;margin:10px 0 0}
.rank-detail-card dl div {border-top:1px solid rgba(117,164,215,.1);padding-top:8px}
.rank-detail-card dt {color:#6283a7;font-size:7px}
.rank-detail-card dd {margin:3px 0 0;color:#dbe8f6;font-size:9px}
.rank-detail-stat-grid {display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}
.rank-detail-stat-grid div {padding:8px;background:#081a30;border-radius:7px}
.rank-detail-stat-grid b,
.rank-detail-stat-grid span {display:block}
.rank-detail-stat-grid b {font-size:11px}
.rank-detail-stat-grid span {color:#6585a6;font-size:7px;margin-top:2px}
.rank-blue-secondary.full,
.rank-blue-primary.full {width:100%}
.rank-detail-warning {border-color:rgba(216,174,45,.25);background:rgba(216,174,45,.035)}
.rank-detail-warning strong {color:#d8ae2d;font-size:9px}
.rank-detail-warning p {color:#89a1ba;font-size:8px;line-height:1.5}
.rank-detail-warning form {margin-top:8px}
@media(max-width:1100px) {
.rank-detail-columns {grid-template-columns:1fr}
}
@media(max-width:700px) {
.rank-detail-hero {align-items:flex-start;flex-direction:column}
.rank-detail-votes {width:100%;justify-content:flex-start}
}
.rank-blue-body .rank-modal-eyebrow { color: var(--accent) !important; }
.rank-detail-card {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}
.rank-detail-person p,
.rank-detail-reason,
.rank-detail-card dt,
.rank-detail-stat-grid span,
.rank-detail-warning p { color: var(--text-faint) !important; }
.rank-detail-comment textarea {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.rank-detail-comment textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(248,136,88,.08) !important;
}
.rank-detail-comments>div,
.rank-detail-stat-grid div {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
}
.rank-detail-comments span { color: var(--text-dim) !important; }
.rank-detail-comments b { color: var(--accent) !important; }
.rank-action-tag.uprank {
  color: var(--accent) !important;
  background: rgba(248,136,88,.08) !important;
  border-color: rgba(248,136,88,.25) !important;
}
.rank-action-tag.derank,
.rank-action-tag.entlassung {
  color: var(--c-coral) !important;
  background: rgba(248,112,112,.08) !important;
  border-color: rgba(248,112,112,.24) !important;
}
.rank-status-tag.done {
  color: var(--text-dim) !important;
  background: rgba(216,128,72,.08) !important;
}
.rank-vote-button.up { color: var(--accent) !important; }
.rank-vote-button.down { color: var(--c-coral) !important; }
.rank-modal-backdrop { background: rgba(10,10,12,.78) !important; }
.rank-back-link { color: var(--text-faint) !important; }
.rank-back-link:hover { color: var(--accent) !important; }
.rank-detail-hero {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  border-left-color: var(--accent) !important;
}
.rank-detail-avatar {
  background: var(--bg-card-2) !important;
  border-color: var(--border) !important;
  color: var(--accent) !important;
}
.rank-detail-ranks span {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
}
.rank-detail-ranks b { color: var(--accent) !important; }
.rank-detail-votes>span { color: var(--text-dim) !important; }
.rank-detail-card h2 span { color: var(--text-faint) !important; }
.rank-detail-empty { border-color: rgba(216,128,72,.18) !important; color: var(--text-faint) !important; }
.rank-detail-warning {
  border-color: rgba(248,184,72,.25) !important;
  background: rgba(248,184,72,.035) !important;
}
.rank-detail-warning strong { color: var(--accent-2) !important; }
.rank-orange-system {padding:28px 34px 54px;max-width:none}
.rs-head {display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.rs-eyebrow {color:var(--accent);font-size:10px;font-weight:900;letter-spacing:1.2px}
.rs-head h1 {font-size:28px;margin:4px 0 4px;letter-spacing:-.4px}
.rs-head p {margin:0;color:var(--text-dim);font-size:11px}
.rs-kpis {display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.rs-kpis>div {background:rgba(23,23,26,.72);border:1px solid var(--border);border-radius:13px;padding:14px 16px}
.rs-kpis span {display:block;color:var(--text-dim);font-size:8px;font-weight:900;letter-spacing:1px}
.rs-kpis strong {display:block;color:var(--accent);font-size:24px;line-height:1;margin-top:7px}
.rs-kpis small {display:block;color:var(--text-faint);font-size:8px;margin-top:5px}
.rs-kpis>div:nth-child(4) strong {color:var(--c-coral)}
.rs-panel {background:rgba(23,23,26,.72);border:1px solid var(--border);border-radius:14px;margin-bottom:14px}
.rs-section-head {display:flex;align-items:center;justify-content:space-between;gap:15px}
.rs-section-head>div>span {display:block;color:var(--accent);font-size:8px;font-weight:900;letter-spacing:1px}
.rs-section-head h2 {margin:3px 0 2px;font-size:16px}
.rs-section-head p {margin:0;color:var(--text-dim);font-size:9px}
.rs-count {font-size:9px;color:var(--text-dim);white-space:nowrap}
.rs-list-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.rs-list-card {border:1px solid var(--border);background:#17171a;border-radius:10px;padding:11px;text-align:left;color:var(--text);cursor:pointer;transition:.16s ease}
.rs-list-card:hover {border-color:rgba(248,136,88,.38);background:#1e1e22;transform:translateY(-1px)}
.rs-list-card-top {display:flex;justify-content:space-between;gap:10px}
.rs-list-card-top strong {font-size:11px}
.rs-list-card-top small {font-size:8px;color:var(--text-faint)}
.rs-list-card-stats {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:9px}
.rs-list-card-stats b,
.rs-list-card-stats span {font-size:8px}
.rs-list-card-stats b:first-child {color:#53dfa0}
.rs-list-card-stats b:nth-child(2) {color:#ff777f}
.rs-list-card-stats span {color:var(--text-dim);margin-left:auto}
.rs-primary,
.rs-secondary {display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:8px;padding:9px 11px;font-size:9px;font-weight:850;cursor:pointer;text-decoration:none;white-space:nowrap}
.rs-primary {border:1px solid rgba(248,136,88,.55);background:var(--accent);color:#1b0b04}
.rs-primary:hover {filter:brightness(1.06)}
.rs-secondary {border:1px solid var(--border);background:#17171a;color:var(--text)}
.rs-secondary:hover {border-color:rgba(248,136,88,.35);background:#1e1e22}
.rs-primary svg,
.rs-secondary svg {width:13px;height:13px}
.rs-filterbar>div {position:relative}
.rs-filterbar svg {position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;color:var(--text-dim)}
.rs-filterbar input,
.rs-filterbar select {width:100%;background:#131316;border:1px solid var(--border);color:var(--text);border-radius:8px;padding:10px 11px;outline:0;font-size:9px}
.rs-filterbar input {padding-left:32px}
.rs-filterbar input:focus,
.rs-filterbar select:focus {border-color:var(--accent);box-shadow:0 0 0 2px rgba(248,136,88,.07)}
.rs-current-list {padding:15px}
.rs-current-head {display:flex;align-items:center;justify-content:space-between;gap:15px}
.rs-current-head>div:first-child>span {color:var(--accent);font-size:8px;font-weight:900;letter-spacing:1px}
.rs-current-head h2 {margin:4px 0 2px;font-size:17px}
.rs-current-head small {color:var(--text-faint);font-size:8px}
.rs-current-count {text-align:right}
.rs-current-count b {display:block;font-size:14px}
.rs-current-count span {display:block;color:var(--text-dim);font-size:8px}
.rs-current-count em {display:inline-block;margin-top:4px;font-style:normal;color:#ffbd56;font-size:8px;background:rgba(255,189,86,.08);padding:3px 5px;border-radius:5px}
.rs-filterbar {display:grid;grid-template-columns:minmax(280px,1fr) 150px 145px 150px auto;gap:8px;padding:10px;border:1px solid var(--border);border-radius:12px;background:rgba(23,23,26,.72);margin-bottom:12px}
.rs-changes {padding:15px}
.rs-proposal-list {display:grid;gap:7px;margin-top:10px}
.rs-change {border:1px solid rgba(248,136,88,.15);background:#17171a;border-radius:10px;overflow:hidden}
.rs-change:hover {border-color:rgba(248,136,88,.28)}
.rs-change.done {opacity:.96}
.rs-change-main {width:100%;display:grid;grid-template-columns:20px minmax(170px,1.1fr) minmax(190px,1fr) 105px 105px 105px;gap:10px;align-items:center;padding:12px;border:0;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.rs-chevron {display:grid;place-items:center;color:var(--text-dim);transition:.16s}
.rs-change.expanded .rs-chevron {transform:rotate(90deg);color:var(--accent)}
.rs-change-person strong {display:block;font-size:11px}
.rs-change-person small {display:block;color:var(--text-faint);font-size:7.5px;margin-top:3px}
.rs-change-ranks {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.rs-change-ranks span {padding:4px 6px;background:#131316;border:1px solid rgba(248,136,88,.12);border-radius:5px;font-size:7.5px}
.rs-change-ranks b {color:var(--accent);font-size:9px}
.rs-action,
.rs-status {display:inline-flex;justify-content:center;padding:4px 6px;border-radius:5px;font-size:7.5px;font-weight:900;white-space:nowrap}
.rs-action.uprank {color:#53dfa0;background:rgba(83,223,160,.08);border:1px solid rgba(83,223,160,.2)}
.rs-action.derank,
.rs-action.entlassung {color:#ff747d;background:rgba(255,116,125,.08);border:1px solid rgba(255,116,125,.2)}
.rs-status.open {color:#ffbd56;background:rgba(255,189,86,.08)}
.rs-status.done {color:var(--text-faint);background:rgba(255,255,255,.05)}
.rs-votes {display:flex;justify-content:flex-end;gap:7px;font-size:8px}
.rs-votes b:first-child {color:#53dfa0}
.rs-votes b:nth-child(2) {color:var(--accent)}
.rs-votes b:last-child {color:#ff747d}
.rs-change-detail {display:none;padding:0 12px 12px 32px;border-top:1px solid rgba(248,136,88,.1)}
.rs-change.expanded .rs-change-detail {display:block;animation:rankDetailOpen .16s ease both}
.rs-detail-grid {display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:7px;padding:10px 0}
.rs-detail-grid>div {padding:8px;background:#131316;border:1px solid rgba(248,136,88,.1);border-radius:7px}
.rs-detail-grid span {display:block;color:var(--text-faint);font-size:7px;font-weight:900;letter-spacing:.6px}
.rs-detail-grid p {margin:5px 0 0;font-size:8.5px;color:var(--text)}
.rs-comments {display:grid;gap:5px;margin-bottom:8px}
.rs-comments div {padding:7px 9px;background:#131316;border:1px solid rgba(248,136,88,.08);border-radius:7px;font-size:8px}
.rs-comments b {color:var(--accent);margin-right:6px}
.rs-comments span {color:var(--text-dim)}
.rs-change-actions {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.rs-vote {border:1px solid var(--border);background:#131316;border-radius:7px;padding:7px 9px;font-size:8px;cursor:pointer}
.rs-vote.up {color:#53dfa0}
.rs-vote.down {color:#ff747d}
.rs-change-actions form {display:flex;gap:5px;flex:1 1 220px}
.rs-change-actions form input {flex:1;background:#131316;border:1px solid var(--border);color:var(--text);border-radius:7px;padding:7px 9px;font-size:8px;outline:0}
.rs-empty-hero {text-align:center;padding:65px 20px;color:var(--text-dim)}
.rs-empty-hero svg {width:32px;color:var(--accent)}
.rs-empty-hero h2 {color:var(--text);margin:10px 0 4px;font-size:16px}
.rs-empty-hero p {font-size:9px}
.rs-modal {background:#131316;border:1px solid rgba(248,136,88,.28);box-shadow:0 25px 80px rgba(0,0,0,.55)}
.rs-modal h2 {color:var(--text)}
.rs-modal>p,
.rs-modal label {color:var(--text-dim)}
.rs-modal input,
.rs-modal select,
.rs-modal textarea {background:#131316;border-color:var(--border);color:var(--text)}
.rs-modal input:focus,
.rs-modal select:focus,
.rs-modal textarea:focus {border-color:var(--accent);box-shadow:0 0 0 2px rgba(248,136,88,.07)}
.rs-file-preview {padding:10px;border:1px solid rgba(248,136,88,.14);border-radius:8px;background:#17171a;color:var(--text-dim);font-size:8px}
.rs-file-preview strong {display:block;color:var(--text);font-size:10px}
.rs-file-preview span,
.rs-file-preview small {display:block;margin-top:3px}
@media(max-width:1250px) {
.rs-change-main {grid-template-columns:20px 1fr 1fr 90px 90px 90px}
.rs-filterbar {grid-template-columns:1fr 1fr 1fr}
.rs-filterbar>div {grid-column:1/-1}
}
@media(max-width:900px) {
.rank-orange-system {padding:20px 15px 40px}
.rs-head {align-items:flex-start;flex-direction:column}
.rs-kpis {grid-template-columns:1fr 1fr}
.rs-list-grid {grid-template-columns:1fr}
.rs-change-main {grid-template-columns:20px 1fr auto}
.rs-change-ranks,
.rs-action,
.rs-status,
.rs-votes {grid-column:2/-1;justify-content:flex-start}
.rs-detail-grid {grid-template-columns:1fr 1fr}
}
@media(max-width:600px) {
.rs-kpis {grid-template-columns:1fr}
.rs-detail-grid {grid-template-columns:1fr}
.rs-current-head {align-items:flex-start;flex-direction:column}
.rs-current-count {text-align:left}
.rs-filterbar {grid-template-columns:1fr}
.rs-filterbar>div {grid-column:auto}
}
.support-filter-row .field { min-width: 150px; flex: 1 1 150px; }
.support-status.offen,
.scp-status.offen { color: var(--yellow); border-color: rgba(248,184,72,.3); background: rgba(248,184,72,.06); }
.modal-subtitle { color:var(--text-dim); font-size:10px; line-height:1.5; margin-top:-5px; }
.field-help { color:var(--text-faint); font-size:9px; margin-top:-2px; }
.rs-list-description { margin: 7px 0 0; color:var(--text-faint); font-size:9px; line-height:1.4; }
.scp-status.archiviert { color:var(--text-faint); }
.scp-score.negative strong { color:var(--red); }
.scp-score.positive strong { color:var(--green); }
.scp-entry.positive strong { color:var(--green); }
.scp-entry.negative strong { color:var(--red); }
.rs-list-grid { grid-template-columns: 1fr; }
.rs-list-card { display:grid; grid-template-columns:minmax(220px,1fr) auto; grid-template-rows:auto auto; column-gap:16px; align-items:center; }
.rs-list-card-top { grid-column:1; grid-row:1; }
.rs-list-card-stats { grid-column:2; grid-row:1 / span 2; justify-content:flex-end; margin-top:0; }
.rs-list-description { grid-column:1; grid-row:2; }
@media(max-width:900px) {
.rs-list-card {grid-template-columns:1fr}
.rs-list-card-stats {grid-column:1;grid-row:2;justify-content:flex-start;margin-top:8px}
.rs-list-description {grid-row:3}
}
.rs-mini-action,
.rs-danger-action {border:1px solid var(--border);background:#131316;color:var(--text-dim);border-radius:6px;padding:4px 7px;font-size:7px;font-weight:800;cursor:pointer;margin:5px 0 0 4px}
.rs-mini-action:hover,
.rs-danger-action:hover {border-color:rgba(248,136,88,.45);color:var(--text)}
.rs-mini-action.danger,
.rs-danger-action {color:#ff747d;border-color:rgba(255,116,125,.2)}
.rs-danger-action {margin:0;padding:7px 9px}
@media(max-width:600px) {
.rs-current-count {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.rs-current-count span {width:100%}
}
.rs-list-card-stats em {font-style:normal;color:#ffbd56;background:rgba(255,189,86,.08);padding:3px 5px;border-radius:5px;font-size:8px}
.rs-list-card {
  -webkit-tap-highlight-color: transparent;
}
a.rs-list-card {
  display: block;
  text-decoration: none;
}
.rs-list-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.modal,
.user-modal-body,
.rank-modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(248,136,88,.72) rgba(10,10,12,.32);
}
.modal::-webkit-scrollbar,
.user-modal-body::-webkit-scrollbar,
.rank-modal::-webkit-scrollbar { width: 7px; height: 7px; }
.modal::-webkit-scrollbar-track,
.user-modal-body::-webkit-scrollbar-track,
.rank-modal::-webkit-scrollbar-track { background: rgba(10,10,12,.32); }
.modal::-webkit-scrollbar-thumb,
.user-modal-body::-webkit-scrollbar-thumb,
.rank-modal::-webkit-scrollbar-thumb {
  background: rgba(248,136,88,.72); border: 1px solid rgba(10,10,12,.85); border-radius: 999px;
}
.modal::-webkit-scrollbar-thumb:hover,
.user-modal-body::-webkit-scrollbar-thumb:hover,
.rank-modal::-webkit-scrollbar-thumb:hover { background: rgba(248,184,72,.92); }
.rank-orange-system .rs-list-manager { padding: 16px; }
.rank-orange-system .rs-list-create-button { white-space: nowrap; }
.rank-orange-system .rs-list-card { position: relative; min-height: 76px; cursor: pointer; }
.rank-orange-system .rs-list-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(248,136,88,.12) inset, 0 8px 25px rgba(0,0,0,.12); }
.rank-orange-system .rs-list-description { grid-column: 1; margin: 5px 0 0; color: var(--text-dim); font-size: 8px; line-height: 1.45; }
.rank-orange-system .rs-empty-list { min-height: 92px; }
.rank-orange-system .rs-current-head { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.rank-orange-system .rs-current-head > div:first-child { min-width:0; }
.rank-orange-system .rs-current-head h2 { margin:4px 0 2px; font-size:18px; }
.rank-orange-system .rs-current-head small { color:var(--text-faint); font-size:8px; }
.rank-orange-system .rs-current-head p { margin:5px 0 0; color:var(--text-dim); font-size:9px; }
.rank-orange-system .rs-current-count { display:flex; align-items:center; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.rank-orange-system .rs-current-count b { color:var(--accent); font-size:19px; }
.rank-orange-system .rs-current-count span,
.rank-orange-system .rs-current-count em { font-size:8px; color:var(--text-dim); font-style:normal; }
.rank-orange-system .rs-change-main { grid-template-columns:20px 34px minmax(150px,1.1fr) minmax(190px,1fr) 105px 90px 85px; }
.rs-target-avatar { width:34px; height:34px; border-radius:10px; background-size:cover; background-position:center; background-color:#1e1e22; border:1px solid rgba(248,136,88,.16); display:block; }
.rs-comment-item { display:flex !important; align-items:flex-start; gap:9px; padding:9px !important; }
.rs-comment-avatar { flex:0 0 30px; width:30px; height:30px; border-radius:50%; background-size:cover; background-position:center; background-color:#1e1e22; border:1px solid rgba(248,136,88,.16); }
.rs-comment-item > div { min-width:0; }
.rs-comment-item strong { display:block; color:var(--text) !important; font-size:9px; }
.rs-comment-item small { display:block; color:var(--text-faint); font-size:7px; margin-top:2px; }
.rs-comment-item p { margin:5px 0 0 !important; color:var(--text-dim); font-size:8px; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
.rs-preview-avatar { width:34px; height:34px; border-radius:50%; background-size:cover; background-position:center; border:1px solid rgba(248,136,88,.16); flex:0 0 auto; }
.rs-file-preview { display:flex; align-items:center; gap:9px; }
.rs-file-preview > div { min-width:0; }
.rs-file-preview strong,
.rs-file-preview span,
.rs-file-preview small { display:block; }
.rs-file-preview strong { color:var(--text); font-size:10px; }
.rs-file-preview span { color:var(--accent); font-size:8px; margin-top:2px; }
.rs-file-preview small { color:var(--text-faint); font-size:7px; margin-top:2px; }
.rank-orange-system .rs-change-detail { padding-left:48px; }
.rank-orange-system .rs-change-main:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
body.rank-modal-open { overflow:hidden; }
@media(max-width:1250px) {
.rank-orange-system .rs-change-main {grid-template-columns:20px 34px 1fr auto auto}
.rank-orange-system .rs-change-ranks,
.rank-orange-system .rs-action,
.rank-orange-system .rs-status,
.rank-orange-system .rs-votes {grid-column:3/-1}
.rank-orange-system .rs-change-ranks {justify-content:flex-start}
.rank-orange-system .rs-votes {justify-content:flex-start}
.rank-orange-system .rs-current-head {align-items:flex-start;flex-direction:column}
.rank-orange-system .rs-current-count {justify-content:flex-start}
}
@media(max-width:700px) {
.rank-orange-system .rs-change-main {grid-template-columns:20px 34px 1fr}
.rank-orange-system .rs-change-ranks,
.rank-orange-system .rs-action,
.rank-orange-system .rs-status,
.rank-orange-system .rs-votes {grid-column:3}
.rank-orange-system .rs-change-detail {padding-left:12px}
.rank-orange-system .rs-list-create-button {width:100%}
.rank-orange-system .rs-section-head {align-items:flex-start;flex-direction:column}
.rank-orange-system .rs-current-count {justify-content:flex-start}
}
.rank-comment-avatar { width:32px; height:32px; flex:0 0 32px; border-radius:50%; background-size:cover; background-position:center; background-color:#1e1e22; border:1px solid rgba(248,136,88,.16); }
.rank-detail-comment-item > div { min-width:0; }
.rank-detail-comment-item b { display:block; color:var(--accent) !important; font-size:9px; }
.rank-detail-comment-item small { display:block; color:var(--text-faint); font-size:7px; margin-top:2px; }
.rank-detail-comment-item span:not(.rank-comment-avatar) { display:block; color:var(--text-dim) !important; font-size:9px; margin-top:4px; white-space:pre-wrap; word-break:break-word; }
.rank-orange-system a.rs-list-card { pointer-events: auto; user-select: none; }
.rank-orange-system a.rs-list-card:active { transform: translateY(0); }
.main-content .content,
.main-content .page {
  max-width: var(--dashboard-content-max);
}
.archive-lock-dialog { max-width: 560px; }
.archive-target-card { display:flex; flex-direction:column; gap:3px; padding:12px 14px; margin-bottom:16px; border:1px solid var(--border); border-radius:10px; background:rgba(216,128,72,.06); }
.archive-target-card span { color:var(--text); font-weight:700; }
.archive-target-card small { color:var(--text-faint); font-size:10px; }
.archive-warning { display:flex; gap:9px; align-items:flex-start; margin-top:14px; padding:11px 12px; border:1px solid rgba(248,184,72,.28); border-radius:9px; background:rgba(248,184,72,.06); color:var(--text-dim); font-size:10px; line-height:1.45; }
.archive-warning svg { width:16px; min-width:16px; color:var(--warning); margin-top:1px; }
/* --- aus dashboard-v2.css --- */
.stat-card-change.positive {
  color: var(--success);
}
.stat-card-change.negative {
  color: var(--danger);
}
.category {
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.category-header.collapsed {
  border-bottom: 1px solid var(--border-color);
}
.category-toggle.collapsed {
  transform: rotate(-90deg);
}
.category-content.collapsed {
  max-height: 0;
  padding: 0 20px;
  overflow: hidden;
  visibility: hidden;
}
.category-module.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.category-module.disabled:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}
.modal-overlay.active .modal {
  transform: scale(1);
}
.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.alert {
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
@media (max-width: 768px) {
.modal {
    width: 95%;
    max-width: none;
  }
}
.modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(248,136,88,.58) transparent;
}
.modal::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.modal::-webkit-scrollbar-track {
  background: transparent;
}
.modal::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(248,200,72,.82), rgba(248,136,88,.78));
  border-radius: 999px;
}
.modal {
  max-height: calc(100dvh - 24px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
.modal {
    max-height: calc(100dvh - 24px);
    width: min(100%, 560px);
  }
}
/* --- aus teamboard (inline) --- */
.user-detail-dialog {
    width: min(92vw, 640px);
    max-width: 640px;
    max-height: calc(100dvh - 28px);
    overflow: hidden;
  }
.user-detail-dialog > form {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
.user-detail-dialog .user-modal-banner { padding: 24px 28px; }
.user-detail-dialog .modal-tabs-bar { padding: 0 28px; gap: 0; }
.user-detail-dialog .modal-tab-btn { padding: 10px 18px; }
.user-detail-dialog .user-modal-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding: 24px 28px;
  }
.user-detail-dialog .tab-pane.active { gap: 14px; }
.user-detail-dialog .modal-section { gap: 8px; }
.user-detail-dialog .modal-section + .modal-section { margin-top: 0; }
.user-detail-dialog .grid-2-col,
.user-detail-dialog .grid-3-col,
.user-detail-dialog .grid-1-col { gap: 8px; }
.user-detail-dialog .form-group { gap: 4px; }
.user-detail-dialog .form-group.full-row { grid-column: 1 / -1; }
.user-detail-dialog .section-title { margin: 8px 0 6px; }
.user-detail-dialog .field-help { margin-top: 0; }
.extra-role-dropdown { position: relative; }
.extra-role-dropdown > summary {
    min-height: 38px; display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-elevated); color: var(--text); cursor: pointer; list-style: none;
  }
.extra-role-dropdown > summary::-webkit-details-marker { display: none; }
.extra-role-dropdown > summary::after { content: '⌄'; color: var(--text-faint); }
.extra-role-dropdown[open] > summary { border-color: var(--accent); }
.extra-role-options {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 5px);
    max-height: 230px; overflow-y: auto; padding: 7px; border: 1px solid var(--border);
    border-radius: 9px; background: var(--bg-card-2); box-shadow: 0 16px 34px rgba(0,0,0,.45);
  }
.extra-role-option { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 7px; cursor: pointer; }
.extra-role-option:hover { background: rgba(248,136,88,.08); }
.extra-role-option input { width: 15px; height: 15px; accent-color: var(--accent); }
.extra-role-none { border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 10px; }
.user-detail-dialog .modal-footer {
    flex: 0 0 auto;
    padding: 16px 28px;
  }
.user-detail-dialog .user-modal-body {
    transition: opacity .16s ease, filter .16s ease;
  }
.user-detail-dialog.is-refreshing .user-modal-body {
    opacity: .72;
    filter: saturate(.9);
  }
.modal-save-feedback {
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #55e6d8;
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transition: opacity .16s ease;
  }
.modal-save-feedback.show { opacity: 1; }
.modal-save-feedback.warn { color: #f3b51b; }
.modal-save-feedback.error { color: #ff7676; }
.teamwarn-form-card {
    margin-bottom: 8px;
    border: 1px solid rgba(248,184,72,.22);
    border-radius: 10px;
    background: rgba(248,184,72,.06);
    overflow: hidden;
  }
.teamwarn-form-card + .teamwarn-form-card { margin-top: 0; }
.teamwarn-form-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-left: 3px solid #F8B848;
    background: rgba(0,0,0,.1);
    font-size: 12px;
    font-weight: 700;
  }
.teamwarn-form-title svg { width: 14px; height: 14px; color: #F8B848; }
.teamwarn-form-card:nth-child(2) .teamwarn-form-title { border-left-color: #F88858; }
.teamwarn-form-card:nth-child(3) .teamwarn-form-title { border-left-color: #F87070; }
.teamwarn-form-fields { padding: 8px; }
.teamwarn-form-fields input { width: 100%; }
.entry-live-remove { margin-left: 10px; }
@media (max-width: 720px) {
.user-detail-dialog { width: 100%; max-width: 100%; }
.user-detail-dialog .grid-2-col,
.user-detail-dialog .grid-3-col { grid-template-columns: 1fr; }
.user-detail-dialog .user-modal-banner,
.user-detail-dialog .modal-tabs-bar,
.user-detail-dialog .user-modal-body,
.user-detail-dialog .modal-footer { padding-left: 16px; padding-right: 16px; }
.user-modal-footer,
.footer-left,
.footer-right { flex-wrap: wrap; }
}

/* ==========================================================================
   TEAM-DASHBOARD — Ergänzungen (Toasts, Tabellen, Badges, Formulare, Tabs …)
   Gemeinsame Bausteine für die Team-Seiten; nutzt ausschließlich die Variablen oben.
   ========================================================================== */

[hidden] { display: none !important; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------------- Toasts ---------------- */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 5000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; padding: 11px 14px;
  background: var(--bg-card-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: 13px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast i { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }
.toast-success { border-left-color: #48c774; } .toast-success i { color: #48c774; }
.toast-error { border-left-color: var(--danger); } .toast-error i { color: var(--danger); }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .3px; background: rgba(255, 255, 255, .08); color: var(--text-dim); white-space: nowrap;
}
.badge-green { background: rgba(72, 199, 116, .15); color: #6fe09b; }
.badge-red { background: rgba(248, 112, 112, .15); color: var(--danger); }
.badge-yellow { background: rgba(248, 184, 72, .16); color: var(--warning); }
.badge-purple { background: rgba(157, 124, 240, .16); color: #b9a0ff; }
.badge-gray { background: rgba(255, 255, 255, .08); color: var(--text-dim); }
.stat-num.stat-purple { color: #b9a0ff; }

/* ---------------- Tabellen ---------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 9px 12px; font-size: 10.5px; letter-spacing: 1px; font-weight: 700;
  color: var(--text-faint); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.data-table tr.is-expired td { opacity: .55; }
.data-table .cell-actions { text-align: right; white-space: nowrap; }
.data-table .cell-actions .btn { padding: 6px 9px; }
.data-table .empty-cell { text-align: center; color: var(--muted); padding: 26px; }
.name-chip { display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 6px; background: rgba(255, 255, 255, .07); font-size: 12px; }

/* ---------------- Formulare ---------------- */
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12.5px; color: var(--text-dim); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter-row input[type="search"], .filter-row input:not([type]) { flex: 1 1 240px; }
.check-row { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.check-row input { width: auto; }
.check-stack { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.pick-list { max-height: 190px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.code-editor { width: 100%; min-height: 420px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; tab-size: 2; white-space: pre; resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col > .panel { margin-bottom: 20px; }
@media (max-width: 1000px) { .two-col, .form-row-2 { grid-template-columns: 1fr; } }

/* ---------------- Aktivitätszeilen (Teamakte) ---------------- */
.activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.activity-row:last-child { border-bottom: none; }
.activity-row .activity-text { flex: 1; min-width: 0; }
.activity-row .activity-text p { margin: 0 0 2px; font-size: 13px; }
.activity-row .activity-text small { color: var(--text-faint); font-size: 11.5px; }

/* ---------------- Tabs (Verwaltung) ---------------- */
.tab-bar { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tab-btn i { width: 15px; height: 15px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------- Pager ---------------- */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

/* ---------------- Übersicht: Abteilungs-Balken ---------------- */
.bar-row { display: grid; grid-template-columns: 170px 1fr 34px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row b { text-align: right; }

/* ---------------- Embed Creator ---------------- */
.eb-hr { border: none; border-top: 1px solid var(--border); width: 100%; margin: 16px 0; }
.eb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.eb-actions .btn { justify-content: center; }
.eb-toggles { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.eb-template-chip.active { border-color: var(--accent); color: var(--accent); }
.eb-template-chip small { color: var(--text-faint); margin-left: 4px; }
.eb-preview-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.eb-preview-desc { font-size: 13.5px; line-height: 1.5; }
.eb-preview-footer { margin-top: 10px; font-size: 11.5px; color: var(--text-dim); }
.eb-preview-field.inline { display: inline-block; min-width: 30%; margin-right: 12px; }

/* ---------------- UP / DERANK im neuen Layout ---------------- */
.main.rank-system { padding: 0; max-width: none; }
.rs-empty-inline { text-align: center; padding: 24px; color: var(--text-dim); font-size: 13px; }
.rs-empty-inline i { display: block; margin: 0 auto 8px; color: var(--accent); }

/* ---------------- Kleinigkeiten ---------------- */
input[type="color"] { height: 40px; padding: 3px; cursor: pointer; }
.rs-filterbar button svg { position: static; transform: none; margin-right: 6px; width: 14px; }
.rank-detail-card .rank-modal-eyebrow { display: block; font-size: 10px; letter-spacing: 1.4px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.sidebar-nav-scroll { padding-bottom: 28px; }

/* ==========================================================================
   MODALS (Teamboard: Teamler hinzufügen / bearbeiten / archivieren) — einheitliche Abstände
   ========================================================================== */
.modal-dialog .modal-body:not(.user-modal-body) { padding: 24px; gap: 18px; overflow-y: auto; }
.modal-dialog .form-group { margin-bottom: 0; gap: 8px; }
.modal-dialog .form-group input,
.modal-dialog .form-group select,
.modal-dialog .form-group textarea { width: 100%; box-sizing: border-box; }
.modal-dialog .form-group textarea {
  background: #17171a; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px;
  color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.5; min-height: 84px; resize: vertical; outline: none;
  transition: border-color 0.15s;
}
.modal-dialog .form-group textarea:focus { border-color: #F88858; }
.modal-dialog .field-help { font-size: 11px; line-height: 1.45; margin-top: 0; }
.modal-dialog .field-help[data-state="ok"] { color: #8fd858; }
.modal-dialog .field-help[data-state="warn"] { color: var(--warning); }
.label-optional { font-weight: 600; letter-spacing: 0; color: var(--text-faint); text-transform: none; }
.modal-dialog .modal-footer { padding: 18px 24px; }
.modal-dialog .modal-header { padding: 22px 24px; }

.archive-target-card { margin-bottom: 0; padding: 14px 16px; }
.archive-target-card small { font-size: 11px; }
.archive-warning { margin-top: 0; padding: 12px 14px; font-size: 11.5px; }

.member-lookup { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elevated); }
.member-lookup-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.member-lookup-item:hover, .member-lookup-item:focus-visible { background: rgba(248, 136, 88, .1); outline: none; }
.member-lookup-item img { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; }
.member-lookup-item span { display: flex; flex-direction: column; min-width: 0; }
.member-lookup-item strong { font-size: 13px; }
.member-lookup-item small { font-size: 11px; color: var(--text-faint); }

/* Teamakte-Modal: etwas mehr Luft zwischen den Feldern */
.user-detail-dialog .tab-pane.active { gap: 18px; }
.user-detail-dialog .modal-section { gap: 12px; }
.user-detail-dialog .grid-2-col,
.user-detail-dialog .grid-3-col,
.user-detail-dialog .grid-1-col { gap: 14px; }
.user-detail-dialog .form-group { gap: 6px; }

/* ==========================================================================
   FORMULAR-CONTROLS im Dashboard-Stil (Checkboxen, native Dropdowns, Textmarkierung)
   ========================================================================== */
:root { color-scheme: dark; }
::selection { background: rgba(248, 136, 88, .38); color: #fff; }

input[type="checkbox"]:not(.checklist-checkbox) {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 18px; height: 18px; padding: 0; margin: 0; border-radius: 5px; cursor: pointer;
  border: 1.5px solid var(--border-soft); background: var(--bg-elevated);
  display: inline-grid; place-content: center;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
input[type="checkbox"]:not(.checklist-checkbox):hover { border-color: rgba(248, 136, 88, .6); }
input[type="checkbox"]:not(.checklist-checkbox):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(248, 136, 88, .22); }
input[type="checkbox"]:not(.checklist-checkbox)::after {
  content: ''; width: 5px; height: 9px; margin-top: -2px; border: solid #1a0d05; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .12s ease;
}
input[type="checkbox"]:not(.checklist-checkbox):checked { background: var(--gradient-brand); border-color: transparent; box-shadow: 0 0 10px rgba(248, 136, 88, .35); }
input[type="checkbox"]:not(.checklist-checkbox):checked::after { transform: rotate(45deg) scale(1); }
.check-row input[type="checkbox"]:not(.checklist-checkbox), .extra-role-option input[type="checkbox"]:not(.checklist-checkbox) { width: 18px; height: 18px; }

.pick-list { padding: 6px; gap: 2px; border-radius: 10px; background: var(--bg-elevated); }
.pick-list .check-row { padding: 7px 10px; border-radius: 8px; transition: background .12s ease; }
.pick-list .check-row:hover { background: rgba(248, 136, 88, .08); }
.pick-list .muted { font-size: 11.5px; }

select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f97' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
select option { background: #17171a; color: var(--text); }

/* ==========================================================================
   TABELLEN — abgerundete Hover-Zeilen statt eckigem Rechteck
   ========================================================================== */
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table tbody tr td { transition: background .12s ease; }
.data-table tbody tr:hover td { border-bottom-color: transparent; }
.data-table tbody tr td:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.data-table tbody tr td:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

/* ==========================================================================
   UP / DERANK — Leerzustände
   ========================================================================== */
.rs-empty-inline {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
}
.rs-empty-inline > svg, .rs-empty-inline > i { width: 30px; height: 30px; margin: 0 0 6px; color: var(--accent); }
.rs-empty-inline strong { color: var(--text); font-size: 14px; font-weight: 700; }
.rs-empty-inline span { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.rs-empty-hero > svg { display: block; width: 30px; height: 30px; margin: 0 auto 6px; }
.rs-empty-hero h2 { margin: 6px 0 6px; }
.rs-empty-hero p { font-size: 12.5px; line-height: 1.5; max-width: 460px; margin: 0 auto; }

.modal-box .field-help { font-size: 11px; line-height: 1.45; margin-top: -4px; }

/* ==========================================================================
   EMBED CREATOR (Embed + Components V2) — Layout, Editor, Block-Karten, Discord-Vorschau
   ========================================================================== */
.ebx-page .ebx-intro { margin: -14px 0 20px; max-width: 900px; line-height: 1.55; }
.ebx-layout {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .7fr); gap: 18px; align-items: start;
  grid-template-areas: "editor sidebar";
}
.ebx-layout > .panel, .ebx-layout > .ebx-sidebar { margin-bottom: 0; }
.ebx-editor { grid-area: editor; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ebx-sidebar {
  grid-area: sidebar; position: sticky; top: 20px; max-height: calc(100vh - 40px); min-width: 0;
  display: flex; flex-direction: column; gap: 18px;
}
.ebx-sidebar .ebx-preview { position: static; max-height: 46vh; overflow-y: auto; flex: 0 0 auto; }
.ebx-sidebar .ebx-templates { position: static; max-height: none; flex: 1 1 auto; min-height: 160px; display: flex; flex-direction: column; }
@media (max-width: 1100px) {
  .ebx-layout { grid-template-columns: 1fr; grid-template-areas: "editor" "sidebar"; }
  .ebx-sidebar { position: static; max-height: none; }
  .ebx-sidebar .ebx-preview { max-height: none; }
  .ebx-sidebar .ebx-templates { min-height: 0; }
  .ebx-template-list { flex-direction: row !important; flex-wrap: wrap; }
  .ebx-tcard { flex: 1 1 220px; }
}

/* ---- Vorlagen-Liste ---- */
.ebx-search { position: relative; margin-bottom: 10px; }
.ebx-search :is(i, svg) { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); pointer-events: none; }
.ebx-search input { width: 100%; padding-left: 34px; }
.ebx-template-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1 1 auto; min-height: 0; padding-right: 2px; }
.ebx-tcard {
  position: relative; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated);
  cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s ease, background .15s ease;
}
.ebx-tcard:hover, .ebx-tcard:focus-visible { border-color: rgba(248, 136, 88, .5); background: rgba(248, 136, 88, .05); outline: none; }
.ebx-tcard.active { border-color: var(--accent); background: rgba(248, 136, 88, .08); box-shadow: 0 0 0 1px rgba(248, 136, 88, .18) inset; }
.ebx-tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 0; }
.ebx-tcard-top strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebx-tcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); }
.ebx-tcard-tools { display: none; position: absolute; right: 8px; bottom: 8px; gap: 2px; background: var(--bg-elevated); border-radius: 8px; }
.ebx-tcard:hover .ebx-tcard-tools, .ebx-tcard:focus-within .ebx-tcard-tools { display: flex; }
.ebx-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .4px;
  background: rgba(255, 255, 255, .08); color: var(--text-dim);
}
.ebx-tag.v2 { background: rgba(157, 124, 240, .16); color: #b9a0ff; }
.ebx-tag.accent { background: rgba(248, 136, 88, .14); color: var(--accent); }
.ebx-tag svg { width: 10px; height: 10px; }
.ebx-empty { padding: 16px; text-align: center; color: var(--text-faint); font-size: 12.5px; border: 1px dashed var(--border); border-radius: 10px; }

/* ---- Editor-Kopf ---- */
.ebx-editor-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.ebx-name { flex: 1 1 220px; display: flex; flex-direction: column; gap: 5px; }
.ebx-name label, .ebx-field label { font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.ebx-name input { width: 100%; }
.ebx-type-toggle { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; }
.ebx-type-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.ebx-type-btn svg { width: 14px; height: 14px; }
.ebx-type-btn:hover { color: var(--text); }
.ebx-type-btn.active { background: var(--gradient-brand); color: #1a0d05; }
.ebx-status { display: flex; flex-wrap: wrap; gap: 8px; min-height: 26px; }
.ebx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .06); color: var(--text-dim); }
.ebx-chip svg { width: 13px; height: 13px; }
.ebx-chip.ok { background: rgba(72, 199, 116, .13); color: #6fe09b; }
.ebx-chip.warn { background: rgba(248, 184, 72, .14); color: var(--warning); }
.ebx-chip.accent { background: rgba(248, 136, 88, .14); color: var(--accent); }

/* ---- Karten / Felder ---- */
.ebx-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ebx-card-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ebx-card-title > svg { width: 16px; height: 16px; color: var(--text-dim); }
.ebx-hint { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-faint); }
.ebx-hint.over { color: var(--danger); font-weight: 700; }
.ebx-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ebx-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 170px; min-width: 0; }
.ebx-field.ebx-grow { flex: 2 1 240px; }
.ebx-field.ebx-narrow { flex: 0 0 auto; min-width: 90px; }
.ebx-field input, .ebx-field textarea, .ebx-field select, .ebx-item input, .ebx-item textarea { width: 100%; }
.ebx-field textarea, .ebx-item textarea { resize: none; overflow: hidden; }
.ebx-field input[type="color"], .ebx-container-opts input[type="color"] { height: 38px; padding: 3px; cursor: pointer; min-width: 70px; }
.ebx-stack { display: flex; flex-direction: column; gap: 10px; }
.ebx-add { align-self: flex-start; font-size: 12px; }
.ebx-note { margin: 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.ebx-inline-check { align-self: center; padding-top: 18px; }

.ebx-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); }
.ebx-item-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ebx-item-fields.ebx-item-row { flex-direction: row; flex-wrap: wrap; }
.ebx-item-row input { flex: 1 1 130px; }
.ebx-item-row .ebx-emoji { flex: 0 1 120px; }
.ebx-item > .check-row { padding-top: 9px; white-space: nowrap; }
.ebx-icon-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-dim); cursor: pointer; transition: background .12s ease, color .12s ease;
}
.ebx-icon-btn svg { width: 15px; height: 15px; }
.ebx-icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: var(--text); }
.ebx-icon-btn.danger:hover:not(:disabled) { background: rgba(248, 112, 112, .15); color: var(--danger); }
.ebx-icon-btn:disabled { opacity: .3; cursor: default; }

/* ---- Import + Verknüpfung ---- */
.ebx-import { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.ebx-import-row { display: flex; gap: 8px; }
.ebx-import-row input { flex: 1; min-width: 0; }
.ebx-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); }
.ebx-link[hidden] { display: none; }
.ebx-link > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); }
.ebx-link.readonly > svg { color: var(--warning); }
.ebx-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ebx-link-text strong { font-size: 12.5px; }
.ebx-link-text span { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }
.ebx-link.editable { border-color: rgba(248, 136, 88, .4); background: rgba(248, 136, 88, .05); }

/* ==========================================================================
   VERWALTUNG — Berechtigungs-Matrix + grafischer Konfigurations-Editor
   ========================================================================== */
.perm-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); margin-bottom: 8px; }
.perm-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.perm-row-head code { font-size: 12.5px; }
.perm-row-head select { min-width: 240px; }
.perm-note { font-size: 11px; color: var(--text-faint); margin: 0; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.perm-chip:hover { border-color: rgba(248, 136, 88, .5); color: var(--text); }
.perm-chip.active { border-color: var(--accent); background: rgba(248, 136, 88, .14); color: var(--text); }
.perm-empty-hint { font-size: 11.5px; color: var(--text-faint); font-style: italic; margin: 0; }
.perm-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

/* ---- Grafischer Konfigurations-Editor ---- */
.cfg-mode-toggle { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; }
.cfg-mode-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.cfg-mode-btn.active { background: var(--gradient-brand); color: #1a0d05; }
.cfg-form { display: flex; flex-direction: column; gap: 12px; }
.cfg-field { display: flex; flex-direction: column; gap: 5px; }
.cfg-field label { font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.cfg-field input, .cfg-field textarea { width: 100%; }
.cfg-group { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg-card); }
.cfg-group + .cfg-group, .cfg-field + .cfg-group, .cfg-group + .cfg-field { margin-top: 12px; }
.cfg-group > summary { cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.cfg-group > summary::-webkit-details-marker { display: none; }
.cfg-group > summary::before { content: '▸'; display: inline-block; transition: transform .15s ease; color: var(--text-faint); }
.cfg-group[open] > summary::before { transform: rotate(90deg); }
.cfg-group-body { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }
.cfg-array-item { display: flex; align-items: center; gap: 8px; }
.cfg-array-item input { flex: 1; }
.cfg-array-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.cfg-array-card-head { display: flex; justify-content: space-between; align-items: center; }
.cfg-array-card-head span { font-size: 11px; font-weight: 700; color: var(--text-faint); letter-spacing: .3px; }
.cfg-icon-btn { width: 26px; height: 26px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-dim); cursor: pointer; flex: 0 0 auto; }
.cfg-icon-btn:hover { background: rgba(248, 112, 112, .15); color: var(--danger); }
.cfg-add-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px dashed var(--border);
  border-radius: 8px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.cfg-add-btn:hover { border-color: var(--accent); }
.cfg-empty-hint { font-size: 11.5px; color: var(--text-faint); font-style: italic; margin: 0; }
.code-editor[hidden], #configGraphical[hidden] { display: none; }

/* ---- Bewerbungsphase-Modal ---- */
.ebx-ap-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
}
.ebx-ap-info { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.ebx-ap-info strong { font-size: 13px; }
.ebx-ap-info small { font-size: 11.5px; color: var(--text-faint); }
.ebx-ap-status { display: flex; gap: 6px; flex-wrap: wrap; }
.ebx-ap-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ebx-ap-pill:hover { border-color: rgba(248, 136, 88, .5); color: var(--text); }
.ebx-ap-pill.active { border-color: var(--accent); background: rgba(248, 136, 88, .12); color: var(--text); }
.ebx-ap-dot { width: 14px; height: 14px; flex: 0 0 auto; }

/* ---- Options-Schalter ---- */
.ebx-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); cursor: pointer; flex-direction: row; transition: border-color .15s ease; }
.ebx-toggle:hover { border-color: rgba(248, 136, 88, .4); }
.ebx-toggle input { margin-top: 2px; }
.ebx-toggle span { display: flex; flex-direction: column; gap: 3px; }
.ebx-toggle strong { font-size: 13px; color: var(--text); }
.ebx-toggle small { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }

/* ---- Aktionsleiste ---- */
.ebx-actionbar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(19, 19, 22, .92); backdrop-filter: blur(8px); box-shadow: var(--shadow-md);
}
.ebx-actionbar-main { display: flex; flex-wrap: wrap; gap: 8px; }
.ebx-actionbar .btn[hidden] { display: none; }
.ebx-actionbar .btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---- Block-Editor ---- */
.ebx-block { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); overflow: hidden; }
.ebx-block.nested { background: var(--bg-elevated); }
.ebx-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.ebx-block-title { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text); }
.ebx-block-title svg { width: 14px; height: 14px; color: var(--accent); }
.ebx-block-tools { display: inline-flex; gap: 1px; }
.ebx-block-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ebx-block-container { border-color: rgba(248, 136, 88, .3); }
.ebx-children { padding-left: 10px; border-left: 2px solid rgba(248, 136, 88, .3); }
.ebx-accessory { padding-top: 6px; border-top: 1px dashed var(--border); }
.ebx-addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ebx-addbar > span { font-size: 11.5px; color: var(--text-faint); margin-right: 2px; }
.ebx-addbar button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px dashed var(--border); border-radius: 9px;
  background: transparent; color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.ebx-addbar button svg { width: 13px; height: 13px; }
.ebx-addbar button:hover { border-color: var(--accent); border-style: solid; color: var(--text); background: rgba(248, 136, 88, .06); }
.ebx-addbar.small button { padding: 4px 9px; font-size: 11.5px; }

/* ---- Discord-Vorschau ---- */
.ebx-discord { background: #1e1f22; border: 1px solid var(--border); border-radius: 12px; padding: 14px; color: #dbdee1; font-size: 14px; line-height: 1.4; }
.ebx-msg { display: flex; gap: 12px; }
.ebx-msg-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #2b2d31; }
.ebx-msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ebx-msg-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ebx-msg-head strong { color: #f2f3f5; font-size: 14.5px; }
.ebx-msg-head small { color: #949ba4; font-size: 11px; }
.ebx-app-tag { padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.3; }
.ebx-msg-content, .ebx-v2-text { white-space: pre-wrap; word-break: break-word; }
.ebx-discord a { color: #00a8fc; text-decoration: none; }
.ebx-discord a:hover { text-decoration: underline; }
.ebx-discord code { background: #2b2d31; border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.ebx-h1 { font-size: 22px; font-weight: 800; margin: 4px 0 2px; color: #f2f3f5; }
.ebx-h2 { font-size: 18px; font-weight: 800; margin: 4px 0 2px; color: #f2f3f5; }
.ebx-h3 { font-size: 15.5px; font-weight: 800; margin: 3px 0 1px; color: #f2f3f5; }
.ebx-sub { font-size: 11.5px; color: #949ba4; }
.ebx-li { padding-left: 4px; }

.ebx-embed { display: flex; gap: 14px; max-width: 520px; padding: 10px 14px 12px 12px; border-left: 4px solid #F88858; border-radius: 4px; background: #2b2d31; }
.ebx-embed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ebx-embed-author { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #f2f3f5; }
.ebx-embed-author img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ebx-embed-title { font-size: 15.5px; font-weight: 800; color: #f2f3f5; }
.ebx-embed-desc { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.ebx-embed-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.ebx-embed-field { grid-column: 1 / -1; font-size: 13px; min-width: 0; }
.ebx-embed-field.inline { grid-column: auto; }
.ebx-embed-field strong { display: block; font-size: 13px; color: #f2f3f5; margin-bottom: 2px; }
.ebx-embed-image { max-width: 100%; border-radius: 6px; margin-top: 4px; }
.ebx-embed-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.ebx-embed-footer { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #b5bac1; margin-top: 4px; }
.ebx-embed-footer img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

.ebx-v2-container { position: relative; display: flex; flex-direction: column; gap: 8px; max-width: 560px; padding: 12px 14px; border-left: 4px solid #4e5058; border-radius: 8px; background: #2b2d31; overflow: hidden; }
.ebx-v2-container.spoiler > *:not(.ebx-v2-spoiler) { filter: blur(8px); }
.ebx-v2-spoiler { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30, 31, 34, .5); font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #f2f3f5; }
.ebx-v2-empty { font-size: 12px; color: #949ba4; }
.ebx-v2-sep hr { border: 0; border-top: 1px solid #4e5058; margin: 4px 0; }
.ebx-v2-sep { min-height: 6px; }
.ebx-v2-sep.lg { min-height: 16px; padding: 4px 0; }
.ebx-v2-gallery { display: grid; gap: 4px; border-radius: 8px; overflow: hidden; max-width: 520px; }
.ebx-v2-gallery.n1 { grid-template-columns: 1fr; }
.ebx-v2-gallery.n2 { grid-template-columns: 1fr 1fr; }
.ebx-v2-gallery.n3, .ebx-v2-gallery.n4 { grid-template-columns: 1fr 1fr; }
.ebx-v2-gallery img { width: 100%; height: 100%; max-height: 240px; object-fit: cover; display: block; }
.ebx-v2-section { display: flex; align-items: flex-start; gap: 14px; }
.ebx-v2-section-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ebx-v2-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.ebx-v2-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ebx-v2-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; background: #4e5058; color: #fff; font-size: 13px; font-weight: 600; }
.ebx-v2-btn svg { width: 12px; height: 12px; opacity: .8; }

/* ==========================================================================
   PROTOKOLLE — Kanal-Seitenleiste + Log-Liste mit Details
   ========================================================================== */
.logs-page .logs-intro { margin: -14px 0 20px; }
.logs-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.logs-shell > .panel { margin-bottom: 0; }
@media (max-width: 960px) { .logs-shell { grid-template-columns: 1fr; } }

/* ---- Seitenleiste ---- */
.logs-side { position: sticky; top: 20px; max-height: calc(100vh - 60px); display: flex; flex-direction: column; padding: 14px; }
@media (max-width: 960px) { .logs-side { position: static; max-height: 340px; } }
.logs-side-search, .logs-search { position: relative; }
.logs-side-search { margin-bottom: 10px; }
.logs-side-search :is(i, svg), .logs-search :is(i, svg) { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); pointer-events: none; }
.logs-side-search input, .logs-search input { width: 100%; padding-left: 34px; }
.logs-tree { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.logs-ch, .logs-group-head {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.logs-ch:hover, .logs-group-head:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.logs-ch > svg, .logs-group-head > svg { width: 15px; height: 15px; flex: 0 0 auto; }
.logs-ch b { width: 15px; text-align: center; font-size: 15px; font-weight: 500; color: var(--text-faint); flex: 0 0 auto; }
.logs-ch span, .logs-group-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs-ch em, .logs-group-head em { font-style: normal; font-size: 11px; color: var(--text-faint); flex: 0 0 auto; }
.logs-ch-all { color: var(--text); font-weight: 700; margin-bottom: 6px; }
.logs-ch.empty { opacity: .55; }
.logs-ch.active { background: rgba(248, 136, 88, .14); color: #fff; font-weight: 700; box-shadow: 0 0 0 1px rgba(248, 136, 88, .28) inset; opacity: 1; }
.logs-ch.active b { color: var(--accent); }
.logs-ch.active em { color: var(--accent); }
.logs-group { margin-top: 8px; }
.logs-group-head { padding: 6px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--text-faint); }
.logs-group-head > svg { transition: transform .15s ease; }
.logs-group.collapsed .logs-group-head > svg { transform: rotate(-90deg); }
.logs-group.collapsed .logs-group-body { display: none; }
.logs-group-body { display: flex; flex-direction: column; gap: 1px; }

/* ---- Kopf / Filter ---- */
.logs-main { min-width: 0; padding: 18px 20px; }
.logs-main-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.logs-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.logs-hash { font-size: 22px; font-weight: 500; color: var(--accent); }
.logs-title h2 { font-size: 18px; margin: 0; }
.logs-group-label { font-size: 12px; color: var(--text-faint); }
.logs-search { flex: 0 1 300px; }
.logs-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 12px 0 14px; border-bottom: 1px solid var(--border); }
.logs-range { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.logs-range > svg { width: 17px; height: 17px; color: var(--text-dim); }
.logs-range label { flex-direction: row; align-items: center; gap: 7px; font-size: 12px; }
.logs-range input[type="datetime-local"] { padding: 7px 10px; font-size: 12.5px; }
.logs-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.logs-chips button {
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-dim);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.logs-chips button:hover { border-color: var(--accent); color: var(--text); background: rgba(248, 136, 88, .06); }
.logs-live { margin-left: auto; flex-direction: row; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
.logs-live svg { width: 14px; height: 14px; color: var(--accent); }

/* ---- Einträge ---- */
.logs-list { display: flex; flex-direction: column; }
.logs-entry { padding: 12px 6px; border-bottom: 1px solid var(--border-soft); border-radius: 10px; transition: background .12s ease; }
.logs-entry:last-child { border-bottom-color: transparent; }
.logs-entry:hover { background: rgba(255, 255, 255, .02); }
.logs-entry.open { background: rgba(255, 255, 255, .025); }
.logs-entry-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 6px; }
.logs-entry-main { min-width: 0; flex: 1; }
.logs-entry-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 3px; }
.logs-entry-head strong { font-size: 13px; color: #fff; }
.logs-entry-head time { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.logs-entry-msg { font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.logs-tag { padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--text-dim); font-size: 10.5px; font-weight: 700; }
.logs-level { padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.logs-level.warn { background: rgba(248, 184, 72, .16); color: var(--warning); }
.logs-level.error { background: rgba(248, 112, 112, .16); color: var(--danger); }
.logs-entry.lvl-warn { box-shadow: 2px 0 0 var(--warning) inset; }
.logs-entry.lvl-error { box-shadow: 2px 0 0 var(--danger) inset; }
.logs-details-btn, .logs-raw-btn {
  border: 0; background: transparent; color: var(--text-faint); font: inherit; font-size: 11.5px; cursor: pointer; padding: 3px 6px; border-radius: 6px; white-space: nowrap;
  transition: color .12s ease, background .12s ease;
}
.logs-details-btn:hover, .logs-raw-btn:hover { color: var(--accent); background: rgba(248, 136, 88, .08); }
.logs-detail { margin: 12px 6px 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #0e0e10; display: flex; flex-direction: column; gap: 14px; }
.logs-section h4 { margin: 0 0 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); }
.logs-section dl { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: 6px 14px; margin: 0; font-size: 12.5px; }
.logs-section dt { color: var(--text-faint); }
.logs-section dd { margin: 0; color: var(--text); word-break: break-word; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; }
.logs-raw-btn { align-self: flex-start; padding-left: 0; }
.logs-raw { margin: 0; padding: 12px 14px; border-radius: 10px; background: #08080a; border: 1px solid var(--border-soft); color: var(--text-dim); font-size: 11.5px; line-height: 1.5; overflow-x: auto; max-height: 320px; }

/* ---- Leerzustand / API-Hinweis ---- */
.logs-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 16px; text-align: center; color: var(--text-dim); }
.logs-empty > svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 6px; }
.logs-empty strong { color: var(--text); font-size: 15px; }
.logs-empty > span { font-size: 12.5px; max-width: 460px; line-height: 1.5; }
.logs-api { margin-top: 14px; padding: 14px 16px; width: min(560px, 100%); text-align: left; border: 1px solid var(--border); border-radius: 12px; background: #0e0e10; display: flex; flex-direction: column; gap: 8px; }
.logs-api code { font-size: 12px; color: var(--accent-2); word-break: break-all; }
.logs-api pre { margin: 0; padding: 10px 12px; border-radius: 8px; background: #08080a; color: var(--text-dim); font-size: 11.5px; line-height: 1.5; overflow-x: auto; }
.logs-api small { color: var(--text-faint); font-size: 11px; line-height: 1.5; }
.logs-api-status { align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.logs-api-status.on { background: rgba(72, 199, 116, .14); color: #6fe09b; }
.logs-api-status.off { background: rgba(248, 184, 72, .14); color: var(--warning); }

/* ---------------- Rollen & Rechte (views/roles.ejs) ---------------- */
.rr-title { display: flex; align-items: center; gap: 10px; }
.rr-title > i, .rr-title > svg { width: 26px; height: 26px; }
.rr-intro { margin: -14px 0 18px; font-size: 12.5px; }
.rr-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border: 1px solid rgba(248, 184, 72, .35); background: rgba(248, 184, 72, .06); border-radius: var(--radius); font-size: 13px; }
.rr-warn > svg, .rr-warn > i { width: 18px; min-width: 18px; height: 18px; color: var(--warning); margin-top: 1px; }
.rr-warn strong { display: block; margin-bottom: 2px; }
.rr-warn span { color: var(--text-dim); }
.rr-count { font-size: 11px; color: var(--text-faint); margin-left: 2px; }
.rr-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.rr-search { position: relative; flex: 1 1 260px; }
.rr-search svg, .rr-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); }
.rr-toolbar .rr-search input { width: 100%; padding-left: 34px; }
.rr-toolbar input, .rr-toolbar select { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.rr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rr-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.rr-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.rr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rr-user-head { display: flex; gap: 12px; align-items: center; }
.rr-user-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-elevated); }
.rr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rr-chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--accent-2); background: rgba(248, 136, 88, .08); border: 1px solid rgba(248, 136, 88, .28); }
.rr-chip.extra { color: #b9a0ff; background: rgba(157, 124, 240, .1); border-color: rgba(157, 124, 240, .35); }
.rr-denied { font-size: 11.5px; color: var(--text-faint); }
.rr-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rr-card-actions .btn svg { width: 14px; height: 14px; }
.rr-modal { max-width: 720px; width: 100%; }
.rr-modal .modal-body { max-height: 72vh; overflow-y: auto; padding-right: 4px; }
.rr-hint { margin: -4px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }
.rr-perm-block { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.rr-perm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; color: var(--text-dim); }
.rr-perm-head h4 { margin: 0; font-size: 13px; color: var(--text); }
.rr-link { background: none; border: none; padding: 0; color: var(--accent-2); cursor: pointer; font-size: 12px; }
.rr-link:hover { text-decoration: underline; }
.rr-perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.rr-perm { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; cursor: pointer; background: var(--bg-elevated); }
.rr-perm input[type="checkbox"]:not(.checklist-checkbox) { width: 18px !important; height: 18px; flex: none; margin: 0; }
.rr-perm span { flex: 1; min-width: 0; color: var(--text); }
.rr-perm em { font-style: normal; font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.rr-perm:has(input:checked) { border-color: rgba(248, 136, 88, .45); }
.rr-perm.fixed { opacity: .7; cursor: not-allowed; }
@media (max-width: 640px) {
  .rr-grid { grid-template-columns: 1fr; }
  .rr-modal .form-row-2 { grid-template-columns: 1fr; }
}

/* ---------------- Content-Modul (views/content.ejs) ---------------- */
.ct-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.ct-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.ct-col header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; }
.ct-col header h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.ct-col header span { font-size: 12px; color: var(--text-faint); }
.ct-col-body { display: flex; flex-direction: column; gap: 10px; }
.ct-empty { font-size: 12px; color: var(--text-faint); text-align: center; padding: 18px 0; border: 1px dashed var(--border); border-radius: 10px; }
.ct-card { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.ct-card:hover { border-color: rgba(248, 136, 88, .45); }
.ct-card.prio-hoch { border-left-color: var(--danger, #e5484d); }
.ct-card.prio-niedrig { border-left-color: var(--text-faint); }
.ct-card h4 { margin: 0; font-size: 14px; line-height: 1.35; }
.ct-card p { margin: 0; font-size: 12px; color: var(--text-dim); line-height: 1.45; overflow-wrap: anywhere; }
.ct-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ct-type { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--accent-2); }
.ct-type svg, .ct-card-meta svg, .ct-move svg { width: 13px; height: 13px; }
.ct-prio { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.ct-prio.hoch { color: #ff8a8a; background: rgba(229, 72, 77, .14); }
.ct-prio.niedrig { color: var(--text-dim); background: rgba(255, 255, 255, .06); }
.ct-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-faint); }
.ct-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ct-card-meta .late { color: #ff8a8a; }
.ct-move { display: flex; justify-content: flex-end; gap: 4px; }
.ct-move button { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 7px; padding: 2px 6px; cursor: pointer; display: inline-flex; }
.ct-move button:hover:not(:disabled) { color: var(--accent-2); border-color: rgba(248, 136, 88, .45); }
.ct-move button:disabled { opacity: .35; cursor: default; }
.ct-comments { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.ct-comment { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 12.5px; }
.ct-comment time { font-size: 11px; color: var(--text-faint); margin-left: 4px; }
.ct-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-dim); }
.ct-comment-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.ct-comment-form textarea { flex: 1; }
.ct-delete { margin-right: auto; }

/* ==========================================================================
   RECHTSKLICK-MENÜ (ganzes Dashboard) -- Logik: /js/contextmenu.js
   ========================================================================== */
.ctx-menu {
  position: fixed; z-index: 900; min-width: 232px; max-width: 300px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 5px;
  background: color-mix(in srgb, var(--bg-card-2) 94%, transparent); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: ctxIn .11s ease-out both; outline: none; scrollbar-width: thin;
}
@keyframes ctxIn { from { opacity: 0; transform: scale(.97) translateY(-3px); } to { opacity: 1; transform: none; } }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border: none; border-radius: 7px; background: none;
  color: var(--text-dim); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
}
.ctx-item:hover, .ctx-item:focus-visible, .ctx-item.open { background: rgba(255,255,255,.06); color: var(--text); outline: none; }
.ctx-item:hover .ctx-icon, .ctx-item:focus-visible .ctx-icon, .ctx-item.open .ctx-icon { color: var(--accent-2); }
.ctx-item.danger:hover, .ctx-item.danger:focus-visible { background: rgba(248,112,112,.12); color: var(--danger); }
.ctx-item.danger:hover .ctx-icon, .ctx-item.danger:focus-visible .ctx-icon { color: var(--danger); }
.ctx-item[disabled] { opacity: .4; cursor: default; background: none; }
.ctx-icon { width: 16px; height: 16px; flex-shrink: 0; display: grid; place-items: center; color: var(--text-faint); transition: color .12s ease; }
.ctx-icon :is(i, svg) { width: 15px; height: 15px; }
.ctx-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; }
.ctx-chev { width: 13px; height: 13px; color: var(--text-faint); flex-shrink: 0; }
.ctx-sep { height: 1px; margin: 4px 7px; background: var(--border-soft); }
.ctx-section { padding: 8px 9px 3px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.ctx-header { display: flex; align-items: center; gap: 10px; padding: 8px 9px 9px; margin-bottom: 3px; border-bottom: 1px solid var(--border-soft); }
.ctx-header-icon { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; color: var(--accent-2);
  background: rgba(248,136,88,.1); border: 1px solid rgba(248,136,88,.25); }
.ctx-header-icon :is(i, svg) { width: 16px; height: 16px; }
.ctx-header-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ctx-header-text strong { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-header-text span { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-faint); }
.ctx-dot.on { background: var(--success); box-shadow: 0 0 8px rgba(248,232,88,.55); }
.ctx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 2px 4px 7px; margin-bottom: 3px; border-bottom: 1px solid var(--border-soft); }
.ctx-stats div { padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.03); min-width: 0; }
.ctx-stats span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.ctx-stats strong { display: block; margin-top: 1px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-footer { margin-top: 4px; padding: 6px 9px 3px; border-top: 1px solid var(--border-soft); font-size: 10.5px; color: var(--text-faint); }
.ctx-target { outline: 1px solid rgba(248,136,88,.55) !important; outline-offset: 1px; border-radius: 8px; }
.ctx-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 950; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  padding: 9px 16px; border-radius: 999px; font-size: 12.5px; color: var(--text); background: var(--bg-card-2); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); transition: opacity .15s ease, transform .15s ease;
}
.ctx-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .ctx-menu { animation: none; } .ctx-toast { transition: none; } }

/* ==========================================================================
   TESTER-MODUL (tester.ejs / tester-detail.ejs) + Team-Aktivität: Tabellen, Balkengrafiken, Tooltip
   ========================================================================== */
.ts-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.ts-toolbar input, .ts-toolbar select { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.ts-toolbar input { flex: 1 1 220px; min-width: 180px; }
.ts-range { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); }
.ts-range button { border: none; background: none; color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.ts-range button.active { background: var(--bg-card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-soft); }
.ts-grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
@media (max-width: 1100px) { .ts-grid-2 { grid-template-columns: 1fr; } }
.ts-grid-2 > .panel { margin-bottom: 0; }
.ts-section { margin-bottom: 20px; }
.panel-head .sub { font-size: 12px; color: var(--text-faint); }

.ts-table-wrap { overflow-x: auto; }
.ts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ts-table td { padding: 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.ts-table tbody tr { cursor: pointer; transition: background var(--transition-fast); }
.ts-table tbody tr:hover { background: rgba(255,255,255,.025); }
.ts-table tbody tr.is-ended { opacity: .6; }
.ts-table .num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.ts-table th.num { text-align: right; }
.ts-person { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.ts-person img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-elevated); }
.ts-person .nm { font-weight: 700; }
.ts-person .sub { font-size: 11.5px; color: var(--text-faint); }
.ts-mc { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.ts-mc img { width: 20px; height: 20px; border-radius: 4px; image-rendering: pixelated; }
.ts-online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.ts-online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #5BD47A; box-shadow: 0 0 8px rgba(91,212,122,.7); }
.ts-prog { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.ts-prog::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--prog, var(--accent)); }
.ts-empty { padding: 26px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Säulen (Tage / Uhrzeiten): eine Reihe, eine Farbe, Höhe = Wert. */
.ts-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-top: 8px; border-bottom: 1px solid var(--border); }
.ts-bar { position: relative; flex: 1 1 0; min-width: 3px; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.ts-bar span { display: block; width: 100%; min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; transition: filter var(--transition-fast); }
.ts-bar.zero span { background: var(--border-soft); height: 2px !important; border-radius: 1px; }
.ts-bar:hover span { filter: brightness(1.25); }
.ts-bars-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-faint); margin-top: 6px; font-family: var(--font-mono); }
/* Horizontale Balken (je Server / je Tester). */
.ts-hbars { display: flex; flex-direction: column; gap: 10px; }
.ts-hbar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.ts-hbar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.ts-hbar-track { height: 10px; border-radius: 4px; background: var(--bg-elevated); overflow: hidden; }
.ts-hbar-track span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.ts-hbar-row .val { font-family: var(--font-mono); color: var(--text); white-space: nowrap; }
.ts-tip { position: fixed; z-index: 900; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--bg-card-2); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 12px; color: var(--text); white-space: nowrap; }
.ts-tip small { display: block; color: var(--text-faint); font-size: 11px; }

/* Detailseite */
.ts-profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ts-profile > img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.ts-profile h2 { margin: 0; font-size: 21px; }
.ts-profile .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-dim); }
.ts-profile .meta span { display: inline-flex; align-items: center; gap: 5px; }
.ts-profile .meta :is(i, svg) { width: 14px; height: 14px; }
.ts-profile .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ts-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.ts-kv dt { color: var(--text-faint); }
.ts-kv dd { margin: 0; }
.ts-notes { display: flex; flex-direction: column; gap: 10px; }
.ts-note { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: var(--bg-elevated); }
.ts-note-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); }
.ts-note-head strong { color: var(--text); }
.ts-note-head :is(i, svg) { width: 14px; height: 14px; }
.ts-note-head button { margin-left: auto; background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 2px; }
.ts-note-head button:hover { color: var(--danger); }
.ts-note p { margin: 6px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ts-note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ts-note-form textarea, .ts-note-form select { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
.ts-note-form .row { display: flex; gap: 8px; justify-content: space-between; }
.ts-pick { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.ts-pick button { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; background: var(--bg-elevated); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ts-pick button:hover, .ts-pick button.active { border-color: var(--accent); }
.ts-pick img { width: 26px; height: 26px; border-radius: 50%; }
.ts-pick small { color: var(--text-faint); }
.ts-ingest code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-elevated); padding: 2px 6px; border-radius: 5px; }
.ts-warn { border-color: rgba(248, 184, 72, .45); }
.ts-warn ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ts-warn li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ts-warn li img { width: 26px; height: 26px; border-radius: 50%; }
.ts-warn li .grow { flex: 1 1 200px; }
.ts-warn .btn svg { width: 14px; height: 14px; }
.panel-head h3 + .sub { margin-left: 8px; }

/* ==========================================================================
   RESPONSIVE -- Tablet (<= 900px) und Handy (<= 640px / <= 420px).
   Steht bewusst am Dateiende, damit es die Seiten-Styles darüber übersteuert.
   ========================================================================== */
img, video, canvas, svg { max-width: 100%; }
.table-wrap, .ts-table-wrap { -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .main-content code { overflow-wrap: anywhere; word-break: break-word; } }

@media (max-width: 900px) {
  .topbar-v2 { align-items: flex-start; margin-bottom: 18px; }
  .topbar-actions { flex-wrap: wrap; gap: 8px; width: 100%; }
  .dashboard-title { font-size: 24px; }
  .page-head h1 { font-size: 21px; }
  .panel { padding: 16px; }
  .bottom-card { padding: 16px; min-height: 0; }
  .modal-overlay { padding: 12px; }
  .modal-box { max-height: calc(100dvh - 24px); }
}

@media (max-width: 640px) {
  .main-content { padding: 14px 12px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .topbar-v2 { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar-actions { width: 100%; }
  .topbar-actions > .btn, .topbar-actions > button, .topbar-actions > a { flex: 1 1 auto; justify-content: center; }
  .dashboard-title { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .stat-grid-4.stat-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-grid-3 .stat-icon-wrap { display: none; }
  .stat-box { padding: 14px; align-items: flex-start; gap: 8px; min-width: 0; }
  .stat-content { min-width: 0; }
  .stat-num { font-size: 26px; }
  .stat-title { font-size: 10px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .trend-badge { font-size: 10.5px; margin-top: 4px; }
  .stat-icon-wrap { width: 32px; height: 32px; border-radius: 8px; }
  .stat-icon-wrap i, .stat-icon-wrap svg { width: 16px; height: 16px; }
  .global-search-box kbd { display: none; }
  .panel-head { flex-wrap: wrap; gap: 6px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: none !important; width: 100%; max-height: 92dvh; padding: 18px 16px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions > .btn { flex: 1 1 auto; justify-content: center; }
  /* iOS zoomt bei Eingabefeldern < 16px automatisch rein -- verhindert das. */
  input, textarea, select { font-size: 16px; }
  .data-table th, .ts-table th { white-space: nowrap; }
  .toast { min-width: 0; max-width: none; }
  .toast-host { left: 12px; right: 12px; }
  .ebx-actionbar { bottom: 8px; padding: 8px; border-radius: 12px; }
  .ebx-actionbar-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .ebx-actionbar-main .btn { justify-content: center; padding: 8px 10px; font-size: 12.5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ebx-actionbar > .btn, .ebx-actionbar > button { width: 100%; justify-content: center; }
}

@media (max-width: 340px) {
  .stat-grid-4, .stat-grid-4.stat-grid-3 { grid-template-columns: 1fr; }
  .dashboard-title { font-size: 20px; }
}
