/* Botify Dashboard – Schwarz / Blau */
:root {
  --bg: #04060b;
  --bg-2: #070a12;
  --surface: #0a0f1a;
  --surface-2: #0e1524;
  --surface-3: #131c2f;
  --border: #172238;
  --border-2: #22314f;
  --text: #e8eefb;
  --muted: #8a98b3;
  --faint: #5b6882;
  --blue: #3b82f6;
  --blue-2: #2563eb;
  --blue-3: #1d4ed8;
  --sky: #60a5fa;
  --cyan: #22d3ee;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .8);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(34, 211, 238, .06), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky); text-decoration: none; }
a:hover { color: #93c5fd; }
button { font: inherit; color: inherit; }
::selection { background: rgba(59, 130, 246, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1b2740; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex: none; }

.boot { display: grid; place-items: center; min-height: 100vh; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border-2); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface-2); font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: #2c3f63; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb); border-color: #3b82f6; color: #fff;
  box-shadow: 0 8px 24px -10px rgba(59, 130, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn.primary:hover { background: linear-gradient(180deg, #4f8ff7, #2f6df0); }
.btn.danger { color: #fca5a5; border-color: #4b1d24; background: rgba(239, 68, 68, .06); }
.btn.danger:hover { background: rgba(239, 68, 68, .14); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.icon { width: 42px; padding: 0; }

/* ---------- Topbar (Serverliste) ---------- */
.shell { max-width: 1240px; margin: 0 auto; padding: 16px 20px 40px; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border-radius: 22px;
  background: rgba(10, 15, 26, .85); border: 1px solid var(--border); backdrop-filter: blur(12px);
  position: sticky; top: 12px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--display); letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--sky); }
.spacer { flex: 1; }
.userchip {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.userchip img { width: 32px; height: 32px; border-radius: 50%; }
.userchip b { display: block; font-size: 13px; line-height: 1.2; }
.userchip small { color: var(--muted); font-size: 11px; }

.hero { display: flex; align-items: flex-end; gap: 24px; justify-content: space-between; margin: 56px 8px 28px; flex-wrap: wrap; }
.hero h1, .page-title {
  font: 700 clamp(40px, 7vw, 76px)/0.95 var(--display); letter-spacing: -.04em; margin: 0;
  background: linear-gradient(180deg, #fff 30%, #9db8e8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); margin: 14px 0 0; font-size: 16px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; min-width: min(340px, 100%);
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border-2); color: var(--muted);
}
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; min-width: 0; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }

.group-label {
  display: flex; align-items: center; gap: 10px; margin: 28px 8px 14px;
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.group-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.group-label .dot.off { background: var(--faint); box-shadow: none; }

.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.guild-card {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; color: var(--text);
  animation: fade-up .3s both;
}
.guild-card:hover { border-color: #2a4a86; transform: translateY(-2px); box-shadow: 0 14px 40px -18px rgba(37, 99, 235, .55); color: var(--text); }
.guild-card .gicon { position: relative; flex: none; }
.gicon img, .gicon .letter {
  width: 54px; height: 54px; border-radius: 16px; object-fit: cover; display: grid; place-items: center;
  background: var(--surface-3); font: 700 20px var(--display); color: var(--muted);
}
.gicon .status { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--faint); border: 3px solid var(--surface); }
.gicon .status.on { background: var(--green); }
.guild-card b { display: block; font-weight: 650; line-height: 1.3; word-break: break-word; }
.guild-card small { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; }
.guild-card small svg { width: 14px; height: 14px; }
.guild-card.not-installed { opacity: .82; }
.guild-card.not-installed .gicon img { filter: grayscale(.6); }
.guild-card .crown { margin-left: auto; color: #fbbf24; }

/* ---------- Layout mit Sidebar ---------- */
.layout { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: rgba(7, 10, 18, .92); border-right: 1px solid var(--border); backdrop-filter: blur(10px); z-index: 30;
}
.side-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; }
.side-head img, .side-head .letter { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; }
.side-head b { font: 700 14px var(--display); letter-spacing: .02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search { margin: 0 12px 6px; }
.side-search input {
  width: 100%; height: 42px; border-radius: 999px; padding: 0 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; outline: 0;
}
.side-search input:focus { border-color: var(--blue); }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.nav-label { font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px;
  color: #c9d4ea; font-weight: 500; font-size: 14px; position: relative; border: 1px solid transparent;
}
.nav a:hover { background: var(--surface-2); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(59, 130, 246, .18), rgba(59, 130, 246, .04)); border-color: rgba(59, 130, 246, .45); color: #fff; }
.nav a.active svg { color: var(--sky); }
.nav a svg { color: var(--muted); }
.nav a .st { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.nav a .st.on { background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, .6); }
.nav a .st.partial { background: var(--orange); }
.nav a .st.disabled { background: var(--red); }
.side-foot { border-top: 1px solid var(--border); padding: 10px 8px; }
.side-foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #c9d4ea; font-size: 14px; }
.side-foot a:hover { background: var(--surface-2); color: #fff; }
.side-foot small { display: block; color: var(--faint); font-size: 11.5px; padding: 6px 12px 0; }

.main { min-width: 0; padding: 40px clamp(16px, 4vw, 64px) 120px; }
.main-inner { max-width: 1100px; margin: 0 auto; animation: fade-up .25s both; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-title { font-size: clamp(34px, 5vw, 58px); }
.page-sub { color: var(--muted); margin: 10px 0 0; max-width: 640px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mobile-bar { display: none; }

/* ---------- Karten ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface), rgba(10, 15, 26, .7)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { margin: 0 0 4px; font: 700 18px var(--display); letter-spacing: -.01em; }
.card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.stat { position: relative; overflow: hidden; }
.stat .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(59, 130, 246, .12); color: var(--sky); border: 1px solid rgba(59, 130, 246, .25); }
.stat .num { font: 700 46px/1 var(--display); margin: 22px 0 8px; letter-spacing: -.03em; }
.stat .lbl { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat.glow::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: radial-gradient(circle, rgba(37, 99, 235, .45), transparent 65%); }
.stat .big { font: 700 18px var(--display); margin-top: 46px; position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font: 500 11px var(--mono); letter-spacing: .04em; background: rgba(59, 130, 246, .12); color: var(--sky); border: 1px solid rgba(59, 130, 246, .25);
}
.pill.green { background: rgba(34, 197, 94, .1); color: #86efac; border-color: rgba(34, 197, 94, .25); }
.pill.orange { background: rgba(245, 158, 11, .1); color: #fcd34d; border-color: rgba(245, 158, 11, .25); }
.pill.red { background: rgba(239, 68, 68, .1); color: #fca5a5; border-color: rgba(239, 68, 68, .25); }
.pill.gray { background: var(--surface-2); color: var(--muted); border-color: var(--border-2); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; padding: 7px 14px; white-space: nowrap; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--blue); color: #fff; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; margin-top: 18px; }
.bars div { flex: 1; min-width: 2px; background: linear-gradient(180deg, var(--sky), var(--blue-3)); border-radius: 4px 4px 1px 1px; opacity: .9; position: relative; }
.bars div:hover { opacity: 1; filter: brightness(1.2); }
.bars div.zero { background: var(--surface-3); }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0; }

.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.legend { flex: 1; min-width: 180px; display: grid; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-row span:last-child { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: 12px; }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 99px; transition: width .4s; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.cat-box { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.cat-box div:first-child { display: flex; justify-content: space-between; font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }
.cat-box span { font: 500 12px var(--mono); color: var(--muted); }

.feed { display: grid; gap: 2px; }
.feed-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed-row:last-child { border: 0; }
.feed-row .ico { width: 30px; height: 30px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--sky); flex: none; }
.feed-row .ico svg { width: 15px; height: 15px; }
.feed-row time { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.feed-row .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Module-Übersicht ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mod-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .15s; }
.mod-card:hover { border-color: var(--border-2); }
.mod-card .top { display: flex; align-items: center; gap: 12px; }
.mod-card .mi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(59, 130, 246, .1); color: var(--sky); border: 1px solid rgba(59, 130, 246, .22); flex: none; }
.mod-card b { font-weight: 650; }
.mod-card p { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1; }
.mod-card .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Formulare ---------- */
.section { margin-bottom: 16px; }
.section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary .chev { transition: transform .2s; color: var(--muted); }
.section[open] > summary .chev { transform: rotate(180deg); }
.section .body { margin-top: 18px; display: grid; gap: 18px; }
.section .body.grid2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > label, .field .flabel { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field .help { color: var(--faint); font-size: 12.5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; outline: 0; transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
textarea.code { font: 13px/1.55 var(--mono); min-height: 360px; white-space: pre; tab-size: 2; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .14); }
select.input { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a98b3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select.input option, select.input optgroup { background: var(--surface); }
.field.changed .input, .field.changed .chips, .field.changed .switch-row { border-color: rgba(96, 165, 250, .7); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); min-height: 48px; }
.switch-row span { font-size: 14px; font-weight: 500; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 99px; transition: background .2s, border-color .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9aa6bd; transition: transform .2s, background .2s; }
.switch input:checked + i { background: var(--blue); border-color: var(--blue); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px rgba(59, 130, 246, .25); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px; min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--border-2); font-size: 13px; max-width: 100%; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; padding: 0; }
.chip button:hover { background: rgba(239, 68, 68, .2); color: #fca5a5; }
.chip button svg { width: 13px; height: 13px; }
.chips select, .chips input { flex: 1; min-width: 140px; height: 30px; border: 0; background: transparent; color: var(--muted); outline: 0; font: inherit; font-size: 13.5px; }
.chips select option { background: var(--surface); color: var(--text); }

.color-row { display: flex; gap: 10px; }
.color-row input[type=color] { width: 48px; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-2); padding: 4px; cursor: pointer; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; font-size: 13.5px; }
.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.check:hover { border-color: var(--border-2); }

.coll { display: grid; gap: 12px; }
.coll-item { border: 1px solid var(--border-2); border-radius: 14px; background: var(--bg-2); }
.coll-item > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-weight: 600; }
.coll-item > summary::-webkit-details-marker { display: none; }
.coll-item .coll-body { padding: 0 14px 14px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.savebar {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); z-index: 50; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: rgba(14, 21, 36, .96); border: 1px solid rgba(59, 130, 246, .5);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .9), 0 0 0 6px rgba(59, 130, 246, .08); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); backdrop-filter: blur(10px);
  max-width: calc(100vw - 32px); visibility: hidden; opacity: 0;
}
.savebar.show { transform: translate(-50%, 0); visibility: visible; opacity: 1; }
.savebar span { font-weight: 600; font-size: 14px; white-space: nowrap; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(59, 130, 246, .07); border: 1px solid rgba(59, 130, 246, .25); color: #c7d7f5; font-size: 14px; margin-bottom: 16px; }
.notice.warn { background: rgba(245, 158, 11, .07); border-color: rgba(245, 158, 11, .3); color: #fde68a; }
.notice.err { background: rgba(239, 68, 68, .07); border-color: rgba(239, 68, 68, .3); color: #fecaca; }
.notice svg { margin-top: 2px; }
code, .kbd { font: 12.5px var(--mono); background: var(--surface-3); border: 1px solid var(--border-2); padding: 2px 7px; border-radius: 6px; color: #bfd3f8; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); text-align: center; padding: 44px 36px; }
.login-card img { width: 72px; height: 72px; margin-bottom: 18px; filter: drop-shadow(0 12px 30px rgba(37, 99, 235, .6)); }
.login-card h1 { font: 700 34px var(--display); margin: 0 0 8px; letter-spacing: -.03em; }
.login-card p { color: var(--muted); margin: 0 0 28px; }
.discord-btn { background: #5865f2; border-color: #5865f2; color: #fff; height: 50px; padding: 0 26px; font-size: 15px; }
.discord-btn:hover { background: #4752c4; }

#toasts { position: fixed; right: 20px; top: 20px; display: grid; gap: 10px; z-index: 100; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 14px; animation: fade-up .2s both; max-width: 380px; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: 12.5px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--border); }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.preview-img { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; border: 1px solid var(--border-2); background: var(--surface-3); }

@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 290px; transform: translateX(-100%); transition: transform .25s; box-shadow: 30px 0 60px rgba(0, 0, 0, .6); }
  .sidebar.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; position: sticky; top: 0; z-index: 25; background: rgba(4, 6, 11, .9); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
  .main { padding-top: 24px; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .num { font-size: 34px; }
  .card { padding: 16px; }
  .userchip div { display: none; }
  .userchip { padding: 4px; }
  .hero { margin-top: 36px; }
  .savebar span { display: none; }
}

/* ---------- Logo ---------- */
.brand img.wordmark { width: auto; height: 22px; }
.brand span { font: 600 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--border-2); }
.login-card img.login-logo { width: 200px; height: auto; filter: drop-shadow(0 10px 30px rgba(37, 117, 255, .45)); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 4px; }
.side-brand img { height: 16px; }

/* ---------- Formular-Raster ---------- */
.grid2f { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid.cols-3f { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mini-row { flex-wrap: nowrap; align-items: flex-start; }
.mini-row textarea.input { min-height: 44px; }

/* ---------- Composer + Vorschau ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.composer-form { display: grid; gap: 16px; }
.pv-sticky { position: sticky; top: 20px; }
.pv-wrap { background: #313338; border-radius: 14px; padding: 16px; color: #dbdee1; font-size: 14.5px; line-height: 1.45; border: 1px solid #1e1f22; }
.pv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pv-head img { width: 36px; height: 36px; border-radius: 50%; }
.pv-head b { color: #fff; }
.pv-badge { background: #5865f2; color: #fff; font: 700 10px var(--font); padding: 1px 5px; border-radius: 4px; }
.pv { padding-left: 44px; display: grid; gap: 6px; }
.pv .muted { color: #949ba4; }
.pv code { background: #2b2d31; border: 0; color: #dbdee1; }
.pv-embed, .pv-container { background: #2b2d31; border-left: 4px solid #3b82f6; border-radius: 6px; padding: 10px 14px 14px; max-width: 520px; display: grid; gap: 8px; }
.pv-container { border-left-width: 4px; border-radius: 8px; }
.pv-title, .pv-h { font-weight: 700; color: #fff; font-size: 16px; }
.pv-h { font-size: 19px; }
.pv-author { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: #fff; }
.pv-author img { width: 22px; height: 22px; border-radius: 50%; }
.pv-row { display: flex; gap: 12px; align-items: flex-start; }
.pv-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; flex: none; }
.pv-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 6px; }
.pv-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pv-fields > div { flex: 1 1 100%; }
.pv-fields > div.inline { flex: 1 1 28%; }
.pv-footer { font-size: 12px; }
.pv-sep { height: 1px; background: #4e5058; margin: 2px 0; }
.pv-sep.space { background: transparent; }
.pv-sep.large { margin: 10px 0; }
.pv-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-btn { background: #4e5058; color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.pv-text { word-break: break-word; }
.mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 3px; }

/* ---------- Branding ---------- */
.branding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-bottom: 8px; }
.banner-preview { height: 120px; border-radius: 14px; border: 1px dashed var(--border-2); background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.lock-card { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 6px; }
.lock-card .sub { max-width: 520px; }
.lock-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .3); color: var(--sky); margin-bottom: 8px; }
.lock-ico svg { width: 28px; height: 28px; }

@media (max-width: 1000px) { .composer { grid-template-columns: 1fr; } .pv-sticky { position: static; } }
.card > .grid2f, .card > .field { margin-bottom: 14px; }

/* ---------- Discord-Login ---------- */
.discord-btn { width: 100%; max-width: 320px; height: 52px; gap: 12px; background: #5865f2; border-color: #5865f2; color: #fff !important; font-size: 15.5px; box-shadow: 0 10px 30px -12px rgba(88, 101, 242, .9); }
.discord-btn:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.discord-btn svg { flex: none; }
.discord-btn.loading { opacity: .75; pointer-events: none; }
.login-card .notice { margin: 0 0 20px; }
.login-hint { font-size: 12.5px !important; color: var(--faint) !important; margin: 16px 0 0 !important; }

/* ---------- Keine Textauswahl mit der Maus (Eingabefelder bleiben bedienbar) ---------- */
html, body { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; -moz-user-select: text; user-select: text; }
img { -webkit-user-drag: none; user-drag: none; }
