/* ==========================================================================
   Nova Dashboard – dunkel, lila, gläsern
   ========================================================================== */

@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('/fonts/poppins-500.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('/fonts/poppins-600.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 800; font-display: swap; src: url('/fonts/poppins-800.ttf') format('truetype'); }

:root {
  --bg: #07050f;
  --bg-2: #0d0920;
  --panel: rgba(22, 16, 46, 0.55);
  --panel-solid: #140f2b;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.07);
  --line: rgba(196, 170, 255, 0.10);
  --line-hi: rgba(196, 170, 255, 0.22);
  --text: #efeaff;
  --muted: #a9a0d0;
  --dim: #6e6696;
  --nova: #a15cff;
  --violet: #7c5cff;
  --blurple: #5865f2;
  --pink: #e35cff;
  --cyan: #5cd2ff;
  --ok: #57f287;
  --warn: #fee75c;
  --bad: #ff5c7a;
  --grad: linear-gradient(135deg, #c084fc 0%, #a15cff 35%, #6d5dfc 70%, #5cd2ff 100%);
  --grad-hot: linear-gradient(135deg, #e35cff 0%, #a15cff 50%, #6d5dfc 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  --glow: 0 0 40px -6px rgba(161, 92, 255, 0.55);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; }
::selection { background: rgba(161, 92, 255, 0.45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(161, 92, 255, 0.25); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(161, 92, 255, 0.45); }
:focus-visible { outline: 2px solid var(--nova); outline-offset: 2px; border-radius: 8px; }

/* ---------- Hintergrund: Aurora, Raster, Sterne, Körnung ---------- */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.b1 { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: radial-gradient(circle, #7c3aed, transparent 65%); animation: drift1 26s ease-in-out infinite; }
.b2 { width: 46vw; height: 46vw; right: -14vw; top: 10vh; background: radial-gradient(circle, #c026d3, transparent 65%); opacity: 0.35; animation: drift2 32s ease-in-out infinite; }
.b3 { width: 60vw; height: 60vw; left: 20vw; bottom: -38vw; background: radial-gradient(circle, #4f46e5, transparent 65%); opacity: 0.45; animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift2 { 50% { transform: translate(-10vw, 12vh) scale(0.9); } }
@keyframes drift3 { 50% { transform: translate(-6vw, -10vh) scale(1.08); } }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(196, 170, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(196, 170, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.stars {
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 80%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #d8b4fe99, transparent), radial-gradient(1px 1px at 85% 15%, #fff7, transparent),
    radial-gradient(1px 1px at 10% 85%, #fff5, transparent), radial-gradient(1.5px 1.5px at 60% 20%, #c4b5fd88, transparent);
  background-size: 420px 420px;
  animation: twinkle 120s linear infinite;
  opacity: 0.6;
}
@keyframes twinkle { to { transform: translateY(420px); } }
.grain {
  position: absolute; inset: 0; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#app { position: relative; z-index: 1; min-height: 100vh; }

/* ---------- Glas-Karten mit Licht unter der Maus ---------- */

.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 60%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  isolation: isolate;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
/* Lichtkegel im Inneren */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), rgba(161, 92, 255, 0.13), transparent 42%);
  opacity: 0; transition: opacity .35s;
}
/* leuchtender Rand, folgt der Maus */
.glass::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), rgba(214, 170, 255, 0.75), rgba(109, 93, 252, 0.25) 40%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.glow-zone:hover .glass::after, .glow-zone:hover .glass::before, .glass:hover::after, .glass:hover::before { opacity: 1; }
.glass.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 18px 50px -20px rgba(161, 92, 255, 0.5); }

/* ---------- Grundgerüst ---------- */

.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 14, 42, 0.65), rgba(10, 7, 22, 0.55));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; }
.brand .orb { position: relative; width: 44px; height: 44px; flex: none; }
.brand .orb img { width: 100%; height: 100%; border-radius: 14px; object-fit: cover; position: relative; z-index: 1; }
.brand .orb::before {
  content: ''; position: absolute; inset: -3px; border-radius: 16px; background: var(--grad); filter: blur(10px); opacity: .7;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; transform: scale(.94); } }
.brand b { font-family: var(--font); font-weight: 800; font-size: 20px; letter-spacing: .02em; display: block; line-height: 1.1; }
.brand small { color: var(--dim); font-size: 12px; }

.nav-label { color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s, background .2s;
}
.nav a svg { width: 19px; height: 19px; flex: none; transition: transform .3s var(--ease), color .2s; }
.nav a:hover { color: var(--text); background: var(--glass-hi); }
.nav a:hover svg { transform: scale(1.12) rotate(-4deg); color: #d8b4fe; }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(161, 92, 255, 0.28), rgba(109, 93, 252, 0.08)); box-shadow: inset 0 0 0 1px rgba(196, 170, 255, 0.18); }
.nav a.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--grad); box-shadow: 0 0 14px #a15cff;
}
.nav a.active svg { color: #d8b4fe; }
.nav a .badge { margin-left: auto; }

.me {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line);
}
.me img { width: 38px; height: 38px; border-radius: 50%; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--muted); font-size: 12px; }

.main { padding: 28px clamp(16px, 3.5vw, 48px) 80px; min-width: 0; max-width: 1400px; }
.page.enter { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.card { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; }
.card-head p { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.card-head .ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, rgba(161, 92, 255, 0.35), rgba(109, 93, 252, 0.15)); color: #e9d5ff;
  box-shadow: inset 0 0 0 1px rgba(214, 170, 255, 0.25), 0 6px 20px -8px rgba(161, 92, 255, .8);
}
.card-head .ico svg { width: 19px; height: 19px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }

/* ---------- Hero (Übersicht) ---------- */

.hero { overflow: hidden; padding: 0; margin-bottom: 18px; }
/* Banner immer ganz und mittig; die Seiten füllt eine weichgezeichnete Kopie (passt bei jeder Breite) */
.hero-banner {
  height: clamp(150px, 15vw, 230px); position: relative; isolation: isolate; overflow: hidden;
  background: var(--grad-hot);
}
.hero-banner::before {
  content: ''; position: absolute; inset: -40px; z-index: -1;
  background: var(--banner) center / cover no-repeat; filter: blur(28px) saturate(1.3) brightness(.8);
}
.hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(13, 9, 32, .95)), var(--banner) center / contain no-repeat;
}
.hero-body { display: flex; align-items: flex-end; gap: 20px; padding: 0 26px 24px; margin-top: -56px; position: relative; flex-wrap: wrap; }
.hero-icon { width: 104px; height: 104px; border-radius: 28px; border: 4px solid #120c28; background: #120c28; object-fit: cover; box-shadow: var(--glow); }
.hero-icon.fallback { display: grid; place-items: center; font-family: var(--font); font-size: 40px; font-weight: 800; background: var(--grad); }
.hero-title { flex: 1; min-width: 220px; padding-bottom: 4px; }
.hero-title h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.hero-title p { margin: 2px 0 0; color: var(--muted); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(87, 242, 135, 0.08); border: 1px solid rgba(87, 242, 135, 0.25); color: #b9fbd0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(87, 242, 135, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(87, 242, 135, 0); } 100% { box-shadow: 0 0 0 0 rgba(87, 242, 135, 0); } }

.stat { padding: 20px 22px; overflow: hidden; }
.stat .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .label svg { width: 16px; height: 16px; color: #c4b5fd; }
.stat .value { font-family: var(--font); font-size: 34px; font-weight: 800; margin-top: 6px; line-height: 1.1; }
.stat .sub { color: var(--dim); font-size: 12px; margin-top: 4px; }
.stat .spark { position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--grad); opacity: .14; filter: blur(20px); transition: opacity .3s, transform .5s var(--ease); }
.stat:hover .spark { opacity: .35; transform: scale(1.3); }

.quick { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; }
.quick .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--glass-hi); border: 1px solid var(--line); transition: all .3s var(--ease); flex: none; }
.quick .ico svg { width: 21px; height: 21px; color: #d8b4fe; }
.quick:hover .ico { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.quick:hover .ico svg { color: #fff; }
.quick b { display: block; font-weight: 600; }
.quick small { color: var(--muted); }
.quick .arrow { margin-left: auto; color: var(--dim); transition: transform .3s var(--ease), color .2s; }
.quick:hover .arrow { transform: translateX(4px); color: var(--text); }

/* ---------- Buttons, Eingaben ---------- */

.btn {
  --b: var(--glass-hi);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--line-hi); background: var(--b); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .3s, background .2s, border-color .2s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: rgba(214, 170, 255, .45); background: rgba(255, 255, 255, .1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad-hot); background-size: 160% 160%; border-color: transparent; box-shadow: 0 8px 26px -10px rgba(161, 92, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { background-position: 100% 50%; box-shadow: 0 10px 34px -8px rgba(161, 92, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn.primary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); background-size: 250% 100%; background-position: 150% 0;
  transition: background-position .8s var(--ease);
}
.btn.primary:hover::after { background-position: -50% 0; }
.btn.danger { color: #ffb3c1; border-color: rgba(255, 92, 122, .3); background: rgba(255, 92, 122, .08); }
.btn.danger:hover { background: rgba(255, 92, 122, .18); border-color: rgba(255, 92, 122, .55); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--glass-hi); color: var(--text); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 8px; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }

.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(8, 5, 20, .5);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: rgba(161, 92, 255, .7); box-shadow: 0 0 0 4px rgba(161, 92, 255, .15); background: rgba(8, 5, 20, .7); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

/* ---------- Auswahl-Feld (Picker) ---------- */

.picker { position: relative; }
.picker-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid var(--line-hi); background: rgba(8, 5, 20, .5); transition: border-color .2s, background .2s, box-shadow .2s;
}
.picker-btn:hover { border-color: rgba(214, 170, 255, .4); background: rgba(20, 12, 44, .6); }
.picker.open .picker-btn { border-color: rgba(161, 92, 255, .7); box-shadow: 0 0 0 4px rgba(161, 92, 255, .15); }
.picker-btn .val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.picker-btn .placeholder { color: var(--dim); }
.picker-btn .val img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.picker-btn .chev { color: var(--dim); transition: transform .25s var(--ease); width: 16px; height: 16px; flex: none; }
.picker.open .chev { transform: rotate(180deg); color: var(--text); }
.pop {
  position: fixed; z-index: 100; min-width: 240px; max-height: 340px; display: flex; flex-direction: column; padding: 6px;
  background: rgba(20, 14, 42, .92); border: 1px solid var(--line-hi); border-radius: 14px;
  box-shadow: 0 24px 70px -10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(161, 92, 255, .1), var(--glow);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  animation: popIn .18s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.pop .input { padding: 8px 12px; margin-bottom: 6px; }
.pop-list { overflow-y: auto; }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.opt:hover, .opt.hi { background: linear-gradient(90deg, rgba(161, 92, 255, .25), rgba(161, 92, 255, .05)); }
.opt.sel { color: #e9d5ff; }
.opt.sel::after { content: '✓'; margin-left: auto; color: var(--nova); font-weight: 800; }
.opt.disabled { opacity: .4; cursor: not-allowed; }
.opt .hint { margin-left: auto; color: var(--dim); font-size: 12px; }
.opt-group { color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 10px 10px 4px; }
.opt img { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.empty-opt { padding: 14px; color: var(--dim); text-align: center; font-size: 13px; }

/* ---------- Kleine Bausteine ---------- */

.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #99aab5; box-shadow: 0 0 10px currentColor; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; max-width: 100%;
}
.chip .role-dot { width: 8px; height: 8px; }
.mention { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 6px; background: rgba(88, 101, 242, .22); color: #c9cdfb; font-weight: 600; }
.mention.role { background: color-mix(in srgb, var(--c, #a15cff) 20%, transparent); color: color-mix(in srgb, var(--c, #a15cff) 60%, white); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: rgba(161, 92, 255, .18); color: #e9d5ff; border: 1px solid rgba(161, 92, 255, .3);
}
.badge.ok { background: rgba(87, 242, 135, .1); color: #b9fbd0; border-color: rgba(87, 242, 135, .25); }
.badge.warn { background: rgba(254, 231, 92, .1); color: #fff3b0; border-color: rgba(254, 231, 92, .25); }
.badge.bad { background: rgba(255, 92, 122, .1); color: #ffc2ce; border-color: rgba(255, 92, 122, .3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: #241a45; }
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 52px; height: 52px; }
.empty { text-align: center; color: var(--dim); padding: 26px 10px; font-size: 14px; }
.empty svg { width: 34px; height: 34px; margin: 0 auto 8px; display: block; color: rgba(196, 170, 255, .35); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-hi), transparent); margin: 18px 0; border: 0; }
.locked { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px dashed var(--line); }
.locked svg { width: 16px; height: 16px; flex: none; }

/* ---------- Einstellungen ---------- */

.setting { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.setting .top { display: flex; gap: 14px; align-items: flex-start; }
.setting .top h3 { font-size: 15px; }
.setting .top p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.setting .state { margin-left: auto; }

.rank-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rank-emoji { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--glass-hi); font-size: 17px; }

/* ---------- Team ---------- */

.rank-col { padding: 18px; }
.rank-col h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 14px; }
.rank-col h3 .count { margin-left: auto; }
.member {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; transition: background .2s;
}
.member:hover { background: var(--glass-hi); }
.member .info { min-width: 0; flex: 1; }
.member .info b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .info small { color: var(--dim); font-size: 12px; }
.member .acts { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.member:hover .acts, .member:focus-within .acts { opacity: 1; }
.av-wrap { position: relative; }
.av-wrap::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, #e35cff, #a15cff, #6d5dfc, #5cd2ff, #e35cff); z-index: -1; opacity: 0; transition: opacity .3s; animation: spin 4s linear infinite; }
.member:hover .av-wrap::after { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.owner-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 18px; }
.crown { font-size: 22px; filter: drop-shadow(0 0 10px #fbbf24); }

/* ---------- Rollen ---------- */

.cat-title { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-weight: 600; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.cat-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-hi), transparent); }
.role-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.role-item:hover { background: var(--glass-hi); }
.role-item .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-item .acts { opacity: 0; transition: opacity .2s; }
.role-item:hover .acts, .role-item:focus-within .acts { opacity: 1; }
.give-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.give-role {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--glass); transition: all .25s var(--ease);
}
.give-role:hover { border-color: var(--line-hi); background: var(--glass-hi); transform: translateY(-2px); }
.give-role .name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.give-role .tog { width: 36px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .1); position: relative; transition: background .3s; flex: none; }
.give-role .tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.give-role.on { border-color: color-mix(in srgb, var(--c, #a15cff) 55%, transparent); background: color-mix(in srgb, var(--c, #a15cff) 12%, transparent); box-shadow: 0 0 24px -10px var(--c, #a15cff); }
.give-role.on .tog { background: var(--c, var(--nova)); }
.give-role.on .tog::after { transform: translateX(16px); }
.give-role.busy { opacity: .5; pointer-events: none; }

/* ---------- Moderation ---------- */

.mod-target { display: flex; align-items: center; gap: 16px; padding: 14px; margin-bottom: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.mod-target .info b { display: block; font-size: 17px; font-weight: 600; }
.mod-target .info small { color: var(--dim); }
.mod-target .av-wrap::after { opacity: 1; }
.ban-list { max-height: 420px; overflow-y: auto; }
textarea.input { resize: vertical; min-height: 84px; font-family: inherit; }

/* ---------- Willkommen ---------- */

.preview-frame { border-radius: 16px; overflow: hidden; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); aspect-ratio: 1000 / 360; display: grid; place-items: center; position: relative; }
.preview-frame:has(img) { aspect-ratio: auto; }
.preview-frame img { width: 100%; height: auto; }
.preview-frame .shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(161, 92, 255, .15) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Aktivität ---------- */

.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); align-items: start; }
.feed-item:last-child { border-bottom: 0; }
.feed-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: var(--glass-hi); }
.feed-ico.success { background: rgba(87, 242, 135, .12); box-shadow: inset 0 0 0 1px rgba(87, 242, 135, .25); }
.feed-ico.denied { background: rgba(254, 231, 92, .1); box-shadow: inset 0 0 0 1px rgba(254, 231, 92, .2); }
.feed-ico.error { background: rgba(255, 92, 122, .12); box-shadow: inset 0 0 0 1px rgba(255, 92, 122, .3); }
.feed-ico.info { background: rgba(161, 92, 255, .14); box-shadow: inset 0 0 0 1px rgba(161, 92, 255, .3); }
.feed-item b { font-weight: 600; font-size: 14px; }
.feed-item .lines { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
.feed-item time { color: var(--dim); font-size: 12px; white-space: nowrap; }

/* ---------- Befehle ---------- */

.cmd { padding: 20px; }
.cmd-name { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 17px; font-weight: 700; }
.cmd-name .slash { color: var(--nova); }
.sub { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; flex-wrap: wrap; }
.sub code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; color: #e9d5ff; background: rgba(161, 92, 255, .12); padding: 2px 8px; border-radius: 7px; }
.sub .opt-chip { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.sub .opt-chip.req { color: #fbcfe8; border-color: rgba(227, 92, 255, .35); }

/* ---------- Statistik ---------- */

/* Diagramm-Farben: geprüft mit dem Palette-Validator (CVD + Kontrast auf --panel-solid) */
:root { --series-join: #3987e5; --series-leave: #d95926; --chart-ink: #a9a0d0; --chart-line: rgba(196, 170, 255, .28); }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin: -4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sw.join { background: var(--series-join); }
.sw.leave { background: var(--series-leave); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .baseline { stroke: var(--chart-line); stroke-width: 1; }
.chart .tick { fill: var(--chart-ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar.join { fill: var(--series-join); }
.chart .bar.leave { fill: var(--series-leave); }
.chart .hit { fill: transparent; }
.chart .col.on .hit { fill: rgba(196, 170, 255, .07); }
.chart-tip {
  position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 5; min-width: 130px;
  padding: 8px 12px; border-radius: 10px; font-size: 13px; background: rgba(20, 14, 42, .95); border: 1px solid var(--line-hi);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .7);
}
.chart-tip div { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.chart-tip div b { margin-left: auto; color: var(--text); padding-left: 10px; }
.table-view { margin-top: 12px; color: var(--muted); font-size: 13px; }
.table-view summary { cursor: pointer; }
.table-view table { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.table-view th { color: var(--text); font-weight: 600; }

.meter-card { padding: 18px 20px; }
.meter-card .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.meter-card .label svg { width: 16px; height: 16px; color: #c4b5fd; }
.meter-value { font-family: var(--font); font-size: 28px; font-weight: 800; margin: 6px 0 10px; }
.meter { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.meter .ok { background: var(--ok); }
.meter .warn { background: var(--warn); }
.meter .bad { background: var(--bad); }
.meter-card .sub { color: var(--dim); font-size: 12px; margin-top: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.kv div { padding: 12px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.kv span { color: var(--dim); font-size: 12px; }
.kv b { font-weight: 600; }

/* ---------- Minecraft ---------- */

.row > .input { flex: 1; width: auto; min-width: 160px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(8, 5, 20, .5); border: 1px solid var(--line-hi); align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--grad-hot); color: #fff; }
.mc-head { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font); font-weight: 800; background: linear-gradient(135deg, #5b8c32, #3c6b22); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); flex: none; }
.chips { gap: 6px; }

/* ---------- Dialog ---------- */

/* flex + margin:auto = mittig, solange es passt; sonst scrollbar (kleine Bildschirme) */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(4, 2, 12, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; overflow-y: auto; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { margin: auto; width: min(520px, 100%); padding: 26px; animation: modalIn .35s var(--ease); background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), rgba(20, 14, 42, .9); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal h2 { font-size: 20px; margin-bottom: 4px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- Toasts ---------- */

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px;
  background: rgba(20, 14, 42, .92); border: 1px solid var(--line-hi); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); animation: toastIn .4s var(--ease); position: relative; overflow: hidden;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ok); }
.toast.bad::before { background: var(--bad); }
.toast .t-ico { font-size: 16px; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Login ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(460px, 100%); padding: 40px 34px 30px; text-align: center; }
.login-orb { width: 120px; height: 120px; margin: 0 auto 22px; position: relative; }
.login-orb img { width: 100%; height: 100%; border-radius: 34px; position: relative; z-index: 1; object-fit: cover; }
.login-orb::before { content: ''; position: absolute; inset: -14px; border-radius: 44px; background: conic-gradient(from 0deg, #e35cff, #a15cff, #6d5dfc, #5cd2ff, #e35cff); filter: blur(22px); opacity: .7; animation: spin 8s linear infinite; }
.login-orb::after { content: ''; position: absolute; inset: -3px; border-radius: 37px; background: conic-gradient(from 0deg, #e35cff, #a15cff, #6d5dfc, #5cd2ff, #e35cff); animation: spin 4s linear infinite; }
.login h1 { font-size: 34px; font-weight: 800; }
.login .tag { color: var(--muted); margin: 6px 0 28px; }
.btn.discord { width: 100%; background: linear-gradient(135deg, #5865f2, #a15cff); border: 0; padding: 15px; font-size: 16px; box-shadow: 0 10px 34px -10px #7c5cff; }
.btn.discord:hover { box-shadow: 0 14px 40px -8px #a15cff; transform: translateY(-2px); }
.btn.discord svg { width: 22px; height: 22px; }
.privacy { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; text-align: left; line-height: 1.6; }
.privacy b { color: var(--muted); }
.login .error { margin: -10px 0 18px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 92, 122, .1); border: 1px solid rgba(255, 92, 122, .3); color: #ffc2ce; font-size: 14px; }

.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.boot img { width: 72px; height: 72px; border-radius: 22px; animation: pulse 1.6s ease-in-out infinite; }

.demo-flag { position: fixed; top: 14px; right: 14px; z-index: 50; }

/* ---------- Mobil ---------- */

.mobile-top { display: none; }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 80; left: 0; top: 0; width: 280px; transform: translateX(-105%); transition: transform .35s var(--ease); }
  .side.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
  .mobile-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: sticky; top: 0; z-index: 40; background: rgba(10, 7, 22, .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .mobile-top img { width: 32px; height: 32px; border-radius: 10px; }
  .mobile-top b { font-family: var(--font); font-weight: 800; }
  .main { padding: 20px 16px 80px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .rank-row { grid-template-columns: 1fr; gap: 8px; }
  .member .acts, .role-item .acts { opacity: 1; }
}
@media (max-width: 520px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat .value { font-size: 26px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
