@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #0a0a12;
  --sidebar: rgba(14, 14, 24, 0.85);
  --card: rgba(22, 22, 36, 0.72);
  --card-hover: rgba(30, 30, 48, 0.8);
  --input: rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f8;
  --muted: #9b9bb0;
  --accent: #8b5cf6;
  --accent-2: #3b82f6;
  --gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #3b82f6 100%);
  --green: #22c55e;
  --red: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font: 15px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139, 92, 246, 0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

a { color: #a5b4fc; text-decoration: none; }
a:hover { color: #c4b5fd; }
code { background: rgba(139, 92, 246, 0.12); color: #c4b5fd; padding: 2px 7px; border-radius: 6px; font-size: 12.5px; }
h1, h2 { margin: 0; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ── Layout ─────────────────────────────── */
#app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* Sternenhimmel (particles.js) liegt hinter allem */
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-card { position: relative; z-index: 1; }

/* Mond oben rechts im Hintergrund – schwebt sanft, Schein "atmet", Oberfläche dreht sich langsam */
#moon {
  position: fixed; z-index: 0; pointer-events: none;
  top: clamp(40px, 9vh, 110px); right: clamp(30px, 7vw, 140px);
  width: clamp(130px, 15vw, 250px); aspect-ratio: 1;
  opacity: 0.9;
  animation: moonFloat 11s ease-in-out infinite alternate;
}
#moon svg {
  position: relative; width: 100%; height: 100%;
  filter: drop-shadow(0 0 12px rgba(196, 181, 253, 0.55)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
  animation: moonGlow 7s ease-in-out infinite alternate;
}
#moon .moon-surface { transform-origin: 100px 100px; animation: moonSpin 240s linear infinite; }
@keyframes moonFloat { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-16px) rotate(3deg); } }
@keyframes moonGlow {
  from { filter: drop-shadow(0 0 8px rgba(196, 181, 253, 0.4)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.2)); }
  to { filter: drop-shadow(0 0 16px rgba(196, 181, 253, 0.7)) drop-shadow(0 0 42px rgba(139, 92, 246, 0.4)); }
}
@keyframes moonSpin { to { transform: rotate(360deg); } }
/* Im Dashboard etwas dezenter als auf der Login-Seite */
body:not(.login-page) #moon { opacity: 0.7; }
@media (max-width: 860px) { #moon { width: 110px; top: 18px; right: 18px; opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { #moon, #moon svg, #moon .moon-surface { animation: none; } }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.brand-logo {
  width: 58px; height: 58px; object-fit: contain; flex-shrink: 0; margin: -6px -4px -6px -6px;
  filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.55));
  transition: transform .3s;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand-version { font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-top: -2px; }
.brand-name {
  font-size: 20px; font-weight: 800; letter-spacing: 0.22em;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 60%, #93c5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.server {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.server img, .noicon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.noicon { background: var(--gradient); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.server strong { display: block; font-size: 15px; }

.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.nav {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left;
  position: relative; transition: background .15s, color .15s;
}
.nav span {
  width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 9px; background: rgba(255, 255, 255, 0.04); font-size: 16px;
  transition: background .15s, transform .15s;
}
.nav:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav:hover span { transform: scale(1.06); }
.nav.active { background: rgba(139, 92, 246, 0.14); color: #fff; }
.nav.active span { background: var(--gradient); box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45); }
.nav.active::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--gradient);
}

.me {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
}
.me img { width: 38px; height: 38px; border-radius: 50%; background: var(--gradient); }
.me > div { flex: 1; min-width: 0; }
.me strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inhalt mittig im freien Bereich neben der Seitenleiste */
main { flex: 1; min-width: 0; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 48px 140px; }
main.enter { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 26px; }
.page-head h1 {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #c4b5fd 70%, #93c5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { margin: 6px 0 0; font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.card h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card > .muted { margin-top: 0; }
.card ul { margin: 6px 0 0; padding-left: 20px; }
.card li { margin: 4px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }

/* ── Übersicht ──────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.status {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 14px; align-items: center;
  backdrop-filter: blur(12px);
  transition: transform .15s, border-color .15s, background .15s;
}
.status:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--card-hover); }
.status-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}
.status.on .status-icon { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(59, 130, 246, 0.2)); border-color: rgba(139, 92, 246, 0.35); }
.status > div:nth-child(2) { flex: 1; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #4b4b5c; flex-shrink: 0; position: relative; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15), 0 0 12px var(--green); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.sticky { position: sticky; top: 24px; }
.row { display: grid; grid-template-columns: 1fr 130px; gap: 12px; }

/* ── Formular ───────────────────────────── */
.field { margin: 16px 0; }
.field > label, .sub {
  display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 7px;
}
.sub { margin-top: 18px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 7px; }

input, select, textarea {
  width: 100%;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #66667a; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
  background: rgba(0, 0, 0, 0.45);
}
select {
  appearance: none; cursor: pointer; padding-right: 36px;
  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='%239b9bb0' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
select option { background: #16161f; }
textarea { resize: vertical; }
input.color { padding: 4px; height: 42px; cursor: pointer; max-width: 130px; }
input.color::-webkit-color-swatch-wrapper { padding: 0; }
input.color::-webkit-color-swatch { border: 0; border-radius: 7px; }

.chips { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.toggle { display: flex; align-items: center; gap: 12px; margin: 14px 0; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.slider {
  width: 44px; height: 25px; border-radius: 13px; background: rgba(255, 255, 255, 0.12);
  position: relative; transition: background .2s, box-shadow .2s; flex-shrink: 0;
}
.slider::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; transition: left .2s cubic-bezier(.4, 1.4, .6, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.toggle input:checked + .slider { background: var(--gradient); box-shadow: 0 0 14px rgba(139, 92, 246, 0.4); }
.toggle input:checked + .slider::after { left: 22px; }

/* ── Buttons ────────────────────────────── */
.btn {
  background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid transparent; border-radius: 10px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.primary { background: var(--gradient); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35); }
.btn.primary:hover { box-shadow: 0 8px 28px rgba(139, 92, 246, 0.55); filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--border-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn.danger { color: #fca5a5; }
.btn.danger:hover { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.08); }
.btn.icon { background: transparent; color: var(--muted); padding: 7px 10px; border: 0; }
.btn.icon:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.08); transform: none; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.actions.left { justify-content: flex-start; }

/* ── Listen ─────────────────────────────── */
.add-row { display: flex; gap: 10px; margin: 12px 0; }
.list-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  padding: 9px 14px; border-radius: 10px; margin-top: 8px;
}

.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.role-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.role-item:hover { border-color: var(--border-strong); }
.role-item:has(input:checked) { border-color: rgba(139, 92, 246, 0.5); background: rgba(139, 92, 246, 0.1); }
.role-item input { width: auto; accent-color: var(--accent); }
.role-item.disabled { opacity: .45; cursor: not-allowed; }
.role-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }

.entries { display: flex; flex-direction: column; gap: 8px; }
.entry { display: grid; grid-template-columns: 90px 1fr 1fr 40px; gap: 8px; align-items: center; }
.entry .emoji { text-align: center; font-size: 18px; }

.badge {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border); white-space: nowrap;
}
.badge.ok { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.3); color: #86efac; }
.alert {
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3); color: #fcd34d;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 18px;
}

.version-alert { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.1); color: #fecaca; line-height: 1.7; }
.version-alert strong { color: #fca5a5; }

/* ── Speicher-Leiste & Toasts ───────────── */
.savebar {
  position: fixed; left: calc(50% + 130px); bottom: 24px; transform: translate(-50%, 160%);
  background: rgba(20, 20, 32, 0.92); backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.15);
  border-radius: 14px; padding: 10px 12px 10px 20px;
  display: flex; gap: 12px; align-items: center; z-index: 10;
  transition: transform .3s cubic-bezier(.3, 1.3, .5, 1);
}
.savebar.show { transform: translate(-50%, 0); }
.savebar > span::before { content: "● "; color: #fbbf24; }

#toasts { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 20; }
.toast {
  background: rgba(20, 20, 32, 0.95); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-left: 4px solid var(--green);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); max-width: 380px;
  animation: toastIn .3s cubic-bezier(.3, 1.3, .5, 1);
}
.toast.err { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ── Embed-Vorschau (im Discord-Look) ───── */
.preview { background: #313338; border-radius: 12px; padding: 16px; min-height: 120px; border: 1px solid var(--border); font-family: "gg sans", "Inter", sans-serif; }
.pv-content { white-space: pre-wrap; margin-bottom: 6px; }
.pv-embed { display: flex; gap: 12px; background: #2b2d31; border-left: 4px solid; border-radius: 4px; padding: 12px 16px; max-width: 520px; }
.pv-body { flex: 1; min-width: 0; }
.pv-author { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pv-title { font-weight: 700; margin-bottom: 6px; }
.pv-title.link { color: #00a8fc; }
.pv-desc { white-space: pre-wrap; font-size: 14px; }
.pv-image { max-width: 100%; border-radius: 4px; margin-top: 12px; }
.pv-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.pv-footer { font-size: 12px; color: #b5bac1; margin-top: 10px; }
.pv-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pv-btn { padding: 6px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; background: #4e5058; }
.pv-btn.primary { background: #5865f2; }
.pv-btn.success { background: #248046; }
.pv-btn.danger { background: #da373c; }

/* ── Buttons im Embed-Baukasten ─────────── */
.btn-entry { display: grid; grid-template-columns: 70px 1fr 170px 40px; gap: 8px; align-items: center; }
.btn-entry .emoji { text-align: center; font-size: 18px; }
.btn-entry .full { grid-column: 2 / 4; }
.btn-options { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); border-radius: 12px; padding: 6px 16px 14px; margin-top: 14px; }

.stat { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 10px; transition: border-color .15s; }
.stat[open] { border-color: rgba(139, 92, 246, 0.35); }
.stat summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; }
.stat summary::-webkit-details-marker { display: none; }
.stat summary::before { content: "▸"; color: var(--muted); transition: transform .2s; margin-right: 4px; }
.stat[open] summary::before { transform: rotate(90deg); }
.stat-counts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.stat-body { margin-top: 14px; }
.stat-btn { margin-bottom: 12px; }
a.btn { display: inline-block; text-decoration: none; color: #fff; }

/* ── Twitch-Streamer ────────────────────── */
.streamers { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.streamer {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color .15s, background .15s;
}
.streamer:hover { border-color: var(--border-strong); }
.streamer[open] { border-color: rgba(145, 70, 255, 0.5); background: rgba(145, 70, 255, 0.06); }
.streamer summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.streamer summary::-webkit-details-marker { display: none; }
.streamer summary::after { content: "▾"; color: var(--muted); transition: transform .2s; margin-left: 2px; }
.streamer[open] summary::after { transform: rotate(180deg); }
.streamer-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 800; background: linear-gradient(135deg, #9146ff, #6366f1); box-shadow: 0 0 14px rgba(145, 70, 255, 0.45);
}
.streamer-name { flex: 1; min-width: 0; }
.streamer-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.streamer-preview {
  margin-top: 6px; padding: 10px 12px; border-radius: 10px; font-size: 14px; white-space: pre-wrap;
  background: #313338; border-left: 3px solid #9146ff;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn.small-btn { padding: 6px 12px; font-size: 13px; }
@media (max-width: 860px) { .row2 { grid-template-columns: 1fr; } }

/* ── Gesendete Embeds / Bearbeiten ──────── */
.edit-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; margin-bottom: 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.45);
}
.edit-banner > span { flex: 1; min-width: 200px; }
.sent-item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; margin-top: 8px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
}
.sent-item:hover { border-color: var(--border-strong); }
.sent-item.active { border-color: rgba(139, 92, 246, 0.55); background: rgba(139, 92, 246, 0.08); }
.sent-info { flex: 1; min-width: 200px; }
.sent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sent-actions .btn { padding: 7px 13px; font-size: 14px; }
select:disabled { opacity: .6; cursor: not-allowed; }

/* ── Berechtigungen ─────────────────────── */
.perm-wrap { overflow-x: auto; }
.perm { width: 100%; border-collapse: collapse; }
.perm th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 8px; text-align: center; white-space: nowrap; }
.perm th:first-child, .perm td:first-child { text-align: left; }
.perm td { padding: 11px 8px; text-align: center; border-top: 1px solid var(--border); }
.perm td:first-child { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 500; }
.perm input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.perm th:last-child, .perm td:last-child { border-left: 1px solid var(--border); }
.perm tbody tr { transition: background .15s; }
.perm tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.perm .admin-row td:last-child { border-left: 0; text-align: left; }

/* ── Willkommens-Karte (Übersicht) ──────── */
.welcome-card {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.08)), var(--card);
  border-color: rgba(139, 92, 246, 0.28);
}
.welcome-card h2 { font-size: 19px; margin-bottom: 4px; }
.welcome-card p { margin: 0; line-height: 1.65; }
.welcome-card .accent { color: #c4b5fd; font-weight: 600; }
.welcome-logo {
  width: 84px; height: 84px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(124, 92, 255, 0.55));
  animation: hover 4s ease-in-out infinite;
}
@media (max-width: 600px) { .welcome-card { flex-direction: column; text-align: center; } }

/* ── Icons ──────────────────────────────── */
.icon { flex-shrink: 0; vertical-align: middle; }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
h2 .with-icon { gap: 10px; }
h2 .with-icon .icon { color: #a78bfa; }
.btn .with-icon { gap: 7px; }
.btn.icon { display: inline-grid; place-items: center; }
.nav span .icon { width: 18px; height: 18px; }
.nav.active span .icon { color: #fff; }
.status-icon .icon { color: #a5b4fc; }
.status.on .status-icon .icon { color: #ddd6fe; filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6)); }
.toggle .with-icon .icon { color: #a5b4fc; }
.alert > .icon { margin: -3px 6px 0 0; }
.alert .with-icon .icon { margin-top: -2px; }
.edit-banner .icon { color: #c4b5fd; margin: -2px 4px 0 0; }
.lock { display: inline-flex; color: #fbbf24; margin-left: auto; }
.me .with-icon { gap: 5px; color: #fcd34d; }
.toast { display: flex; align-items: flex-start; gap: 10px; }
.toast > .icon { color: var(--green); margin-top: 1px; }
.toast.err > .icon { color: var(--red); }
.loading .with-icon { justify-content: center; }

/* ── Login & Laden ──────────────────────── */
.loading { margin: 20vh auto; text-align: center; }
.login-page { display: grid; place-items: center; min-height: 100vh; overflow: hidden; }
.login-page::before, .login-page::after {
  content: ""; position: fixed; width: 480px; height: 480px; border-radius: 50%;
  filter: blur(90px); opacity: .45; z-index: -1; animation: float 12s ease-in-out infinite alternate;
}
.login-page::before { background: #a855f7; top: -120px; left: -100px; }
.login-page::after { background: #3b82f6; bottom: -140px; right: -100px; animation-delay: -6s; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.1); } }

.login-card {
  background: rgba(18, 18, 30, 0.7); backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: 44px 40px; border-radius: 24px; width: 380px; text-align: center;
}
.login-card h1 { font-size: 26px; font-weight: 800; margin-top: 18px; }
.login-card p { margin: 8px 0 0; }
.login-logo {
  display: block; width: 150px; height: 150px; margin: -20px auto -6px; object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(124, 92, 255, 0.6));
  animation: hover 4s ease-in-out infinite;
}
@keyframes hover { 50% { transform: translateY(-8px); } }
.btn.discord {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #5865f2; text-decoration: none; padding: 13px 16px; margin-top: 26px; font-size: 15px;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
}
.btn.discord:hover { background: #6773f5; box-shadow: 0 10px 30px rgba(88, 101, 242, 0.6); }
.error { color: #fca5a5; min-height: 1.5em; margin-top: 16px !important; font-size: 14px; }

@media (max-width: 860px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .nav { width: auto; }
  .nav.active::before { display: none; }
  main { padding: 24px 16px 130px; }
  .page-head h1 { font-size: 26px; }
  .two-col { grid-template-columns: 1fr; }
  .savebar { left: 50%; width: calc(100% - 24px); }
  .entry { grid-template-columns: 70px 1fr 40px; }
  .entry input:not(.emoji) { grid-column: 1 / -1; grid-row: 2; }
  .btn-entry { grid-template-columns: 60px 1fr 40px; }
  .btn-entry select, .btn-entry .full { grid-column: 1 / -1; }
}

.login-card h1.noctis {
  font-size: 34px; letter-spacing: 0.25em; margin-right: -0.25em;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 60%, #93c5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
