/*
  THE LOOK of the dashboard. Plain CSS, no build step.

  All colors live in the variables just below (":root"). Change --purple and the
  whole site changes color.
*/

:root {
  --bg: #0b0b10;           /* page background */
  --bg-2: #0f0f16;         /* sidebar */
  --card: #13131c;         /* boxes */
  --card-2: #191924;       /* boxes inside boxes, inputs */
  --border: #24243a;
  --border-2: #2f2f48;
  --text: #ececf3;
  --muted: #8d8da6;
  --purple: #8b5cf6;
  --purple-2: #6d28d9;
  --purple-glow: rgba(139, 92, 246, 0.45);
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --gold: #facc15;
  --discord: #5865f2;
  --radius: 14px;
  --sidebar-w: 264px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: #b69cff; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--card-2); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; color: #d6c8ff; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.w-100 { width: 100%; }

/* ───────────────────────── buttons ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
  background: var(--card-2); transition: transform .12s, background .15s, box-shadow .15s, opacity .15s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn .i { width: 16px; height: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 6px 20px -6px var(--purple-glow); }
.btn-primary:hover { box-shadow: 0 8px 26px -6px var(--purple-glow); }
.btn-ghost { background: transparent; border-color: var(--border-2); }
.btn-ghost:hover { background: var(--card-2); }
.btn-dark { background: rgba(10, 10, 16, .75); border-color: rgba(255,255,255,.06); }
.btn-dark:hover { background: rgba(10, 10, 16, .95); }
.btn-gold { background: linear-gradient(135deg, #fde047, #eab308); color: #1a1405; }
.btn-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.btn-discord { background: var(--discord); box-shadow: 0 10px 30px -10px rgba(88, 101, 242, .8); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-btn { background: none; border: 0; color: var(--text); padding: 6px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--card-2); }

/* ───────────────────────── page frame ───────────────────────── */
.demo-bar { background: linear-gradient(90deg, #7c3aed, #db2777); color: #fff; text-align: center; font-size: 12.5px; font-weight: 600; padding: 4px; }
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 12px 30px;
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.server-switch { position: relative; margin-bottom: 14px; }
.server-current {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.server-current:hover { border-color: var(--border-2); }
.server-current img, .menu-item img { width: 32px; height: 32px; border-radius: 10px; }
.server-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-letter {
  width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--purple-2)); font-weight: 700; color: #fff;
}
.server-letter.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.server-letter.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }

.nav-group { margin-top: 16px; }
.nav-title { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6f6f88; padding: 0 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: #b4b4c8; font-weight: 500; text-decoration: none !important; transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--card); color: var(--text); }
.nav-link.active { background: linear-gradient(90deg, rgba(139, 92, 246, .22), rgba(139, 92, 246, .04)); color: #fff; box-shadow: inset 2px 0 0 var(--purple); }
.nav-link.active .i { color: #c4b5fd; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 28px;
  border-bottom: 1px solid var(--border); background: rgba(11, 11, 16, .85); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { flex: 1; }
.brand { flex: 1; font-weight: 700; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.plan-free { font-size: 12.5px; color: var(--muted); border: 1px solid var(--border-2); padding: 3px 10px; border-radius: 99px; }
.user-box { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 5px 8px; border-radius: 10px; }
.user-btn:hover { background: var(--card); }
.user-btn img { width: 32px; height: 32px; border-radius: 50%; }

.menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; min-width: 220px;
  background: #16161f; border: 1px solid var(--border-2); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); max-height: 60vh; overflow-y: auto;
}
.menu-right { left: auto; right: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none !important; font-weight: 500; }
.menu-item:hover, .menu-item.active { background: var(--card-2); }
.menu-item.danger { color: #fca5a5; }

.content { padding: 30px 28px 120px; max-width: 1280px; width: 100%; }
.page-head { padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head.center { border: 0; text-align: center; }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; margin: 34px 0 16px; }
.section-title .i { width: 20px; height: 20px; color: #c4b5fd; }
.group-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8d8da6; margin: 26px 0 12px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 12px 0;
  background: rgba(59, 130, 246, .08); border: 1px solid rgba(59, 130, 246, .25); color: #c7d7fe;
}
.notice .i { color: #93c5fd; margin-top: 2px; }
.alert { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); color: #fecaca; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }

/* ───────────────────────── badges & chips ───────────────────────── */
.badge-plus {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; vertical-align: middle;
  background: rgba(250, 204, 21, .13); color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
}
.badge-plus .i { width: 13px; height: 13px; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 7px; }
.chip .i { width: 13px; height: 13px; }
.chip.up { color: #4ade80; background: rgba(34, 197, 94, .12); }
.chip.down { color: #f87171; background: rgba(239, 68, 68, .12); }
.chip.flat { color: var(--muted); background: var(--card-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.online { background: var(--green); }
.status-pill { padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: 12.5px; }
.status-pill.on { color: #4ade80; background: rgba(34, 197, 94, .12); }
.status-pill.off { color: var(--muted); background: var(--card-2); }

/* ───────────────────────── on/off switch ───────────────────────── */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: #2a2a3c; border-radius: 99px; transition: background .2s, box-shadow .2s; }
.slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; transition: transform .2s cubic-bezier(.4, 1.4, .6, 1); box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 0 14px -2px var(--purple-glow); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.switch.is-disabled { opacity: .45; cursor: not-allowed; }

/* ───────────────────────── Overview ───────────────────────── */
.server-hero {
  display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: var(--radius);
  background: radial-gradient(120% 160% at 0% 0%, rgba(139, 92, 246, .22), transparent 55%), var(--card);
  border: 1px solid var(--border);
}
.server-hero img { width: 64px; height: 64px; border-radius: 18px; }
.server-hero h2 { font-size: 20px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; color: var(--muted); font-weight: 500; }
.hero-stats span { display: inline-flex; align-items: center; gap: 6px; }
.hero-stats .i { width: 16px; height: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  position: relative; display: block; padding: 18px 18px 0; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, #16161f, #111119); border: 1px solid var(--border); color: var(--text);
  text-decoration: none !important; transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.stat-label { font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; margin: 2px 0 6px; }
.stat-change { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.spark { display: block; width: calc(100% + 36px); margin: 14px -18px 0; height: 84px; }
.spark.big { height: 170px; width: 100%; margin: 12px 0 0; }

.plugins-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 12px; min-width: 260px; color: var(--muted);
}
.search:focus-within { border-color: var(--purple); }
.search input { background: none; border: 0; outline: 0; color: var(--text); font: inherit; padding: 9px 0; width: 100%; }

.plugin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plugin-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 220px; padding: 18px;
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(90% 80% at 100% 100%, rgba(124, 58, 237, .55), rgba(91, 33, 182, .18) 45%, transparent 70%),
    linear-gradient(180deg, #17131f, #120f19);
  border: 1px solid rgba(139, 92, 246, .32);
  box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 18px 40px -24px rgba(124, 58, 237, .7);
  transition: transform .18s, box-shadow .18s, border-color .18s, filter .25s;
}
/* The soft purple light along the bottom edge. */
.plugin-card::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .9), transparent); opacity: .6;
}
.plugin-card:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, .6); box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 24px 50px -20px rgba(124, 58, 237, .9); }
.plugin-card.is-off { filter: saturate(.35) brightness(.85); }
.plugin-card.is-off:hover { filter: saturate(.8) brightness(.95); }
.plugin-top { display: flex; align-items: flex-start; gap: 12px; }
.plugin-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(12, 12, 18, .7); border: 1px solid rgba(255,255,255,.08); color: #e4dcff;
}
.plugin-icon .i { width: 21px; height: 21px; }
.plugin-icon.lg { width: 60px; height: 60px; border-radius: 16px; }
.plugin-icon.lg .i { width: 28px; height: 28px; }
.plugin-name { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 2px; }
.plugin-name h4 { font-size: 15.5px; font-weight: 700; }
.plugin-card p { margin: 0; flex: 1; color: #b3b0c8; font-size: 13.5px; }
.plugin-card .btn { align-self: flex-start; }

/* ───────────────────────── server picker ───────────────────────── */
.topbar-plain { position: static; }
.servers-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.server-card {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border);
  padding: 26px 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  transition: transform .15s, border-color .15s;
}
.server-card:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .5); }
.server-card-bg {
  position: absolute; inset: 0 0 50% 0; background: radial-gradient(100% 100% at 50% 0%, rgba(139, 92, 246, .35), transparent 70%);
  background-size: cover; background-position: center; filter: blur(24px) saturate(1.4); opacity: .6; z-index: 0;
}
.server-card > *:not(.server-card-bg) { position: relative; }
.server-card-icon { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }
.server-card-icon.letter { display: grid; place-items: center; font-size: 30px; font-weight: 800; background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.server-card-name { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.server-card.no-bot .server-card-icon { filter: grayscale(.8); opacity: .7; }

/* ───────────────────────── login page ───────────────────────── */
.center-page { min-height: 100vh; display: grid; place-items: center; }
.hero { position: relative; text-align: center; max-width: 560px; padding: 40px 24px; }
.hero-glow { position: absolute; inset: -120px; background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, .35), transparent 60%); z-index: -1; filter: blur(20px); }
.hero-logo { font-size: 56px; margin-bottom: 8px; filter: drop-shadow(0 10px 30px var(--purple-glow)); }
.hero h1 { font-size: 40px; font-weight: 800; }
.hero p { color: var(--muted); font-size: 15.5px; margin: 14px 0 28px; }
.hero .fine { font-size: 12.5px; margin-top: 18px; }
.grad { background: linear-gradient(90deg, #c4b5fd, var(--purple), #e879f9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────────────────────── feature (Explore) page ───────────────────────── */
.module-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.module-title { flex: 1; }
.module-title h1 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.module-title p { margin: 4px 0 0; color: var(--muted); }
.plus-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 18px;
  border-radius: 12px; background: rgba(250, 204, 21, .07); border: 1px solid rgba(250, 204, 21, .3); color: #fde68a;
}
.plus-banner .i { color: var(--gold); }

.module-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.module-layout.no-preview { grid-template-columns: minmax(0, 820px); }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.step.open { border-color: var(--border-2); }
.step-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: none; border: 0;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.step-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 700;
  background: rgba(139, 92, 246, .16); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, .35);
}
.step.open .step-num { background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; border-color: transparent; }
.step-title { flex: 1; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; }
.step-title small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.step-arrow { transition: transform .2s; color: var(--muted); }
.step.open .step-arrow { transform: rotate(180deg); }
.step-body { display: none; padding: 4px 18px 18px 62px; }
.step.open .step-body { display: block; }

.field { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.04); }
.field:first-child { border-top: 0; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.field-row.inline { padding: 0; border: 0; gap: 12px; }
.field.is-locked { opacity: .6; }
.q { display: block; font-weight: 600; margin-bottom: 2px; }
.small-q { margin-bottom: 8px; }
.tip { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.field-row .tip { margin-bottom: 0; }

.input {
  width: 100%; background: var(--card-2); border: 1px solid var(--border); color: var(--text); font: inherit;
  padding: 10px 12px; border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
textarea.input { resize: vertical; min-height: 90px; }
.input-number { width: 120px; }
.number-row { display: flex; align-items: center; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap .counter { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ph-chip {
  background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .3); color: #c4b5fd; border-radius: 7px;
  padding: 2px 8px; font: 12px ui-monospace, Consolas, monospace; cursor: pointer;
}
.ph-chip:hover { background: rgba(139, 92, 246, .22); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card-2); border: 1px solid var(--border); padding: 4px; border-radius: 11px; }
.segmented button, .segmented a {
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  text-decoration: none !important;
}
.segmented button:hover, .segmented a:hover { color: var(--text); }
.segmented .active { background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; }
.segmented.links { margin-bottom: 18px; }

/* Channel / role pickers (built by app.js). */
.picker { position: relative; }
.picker-box {
  min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 36px 6px 8px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; position: relative;
}
.picker-box:hover { border-color: var(--border-2); }
.picker.open .picker-box { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.picker-box > .i { position: absolute; right: 10px; color: var(--muted); }
.picker-placeholder { color: var(--muted); padding: 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: #23233a; border-radius: 7px; padding: 3px 6px 3px 8px; font-weight: 500; font-size: 13px; }
.pill .x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; }
.pill .x:hover { color: var(--text); }
.pill .i { width: 14px; height: 14px; color: var(--muted); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; background: #99aab5; flex-shrink: 0; }
.picker-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #16161f; border: 1px solid var(--border-2);
  border-radius: 12px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); overflow: hidden;
}
.picker-pop input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--border); padding: 11px 14px; color: var(--text); font: inherit; outline: none; }
.picker-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.picker-cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f6f88; padding: 8px 8px 4px; }
.picker-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.picker-opt:hover, .picker-opt.hl { background: var(--card-2); }
.picker-opt.sel { color: #c4b5fd; }
.picker-opt.sel::after { content: "✓"; margin-left: auto; }
.picker-opt .i { width: 15px; height: 15px; color: var(--muted); }
.picker-none { color: var(--muted); padding: 10px; text-align: center; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; min-height: 44px; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; align-items: center; }
.tags:focus-within { border-color: var(--purple); }
.tags input { flex: 1; min-width: 140px; background: none; border: 0; outline: 0; color: var(--text); font: inherit; padding: 4px; }
.color-row input[type=color] { width: 60px; height: 36px; border: 1px solid var(--border); background: var(--card-2); border-radius: 8px; padding: 2px; }

.cmd-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.cmd-list li { display: flex; gap: 12px; align-items: baseline; }
.cmd-list code { flex-shrink: 0; }
.cmd-list span { color: var(--muted); font-size: 13px; }

/* Live preview: a little fake Discord. */
.preview-col { position: sticky; top: 82px; }
.preview-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.preview-head { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.preview-head .small { margin-left: auto; font-weight: 400; }
.discord { background: #313338; border-radius: 10px; padding: 6px 0; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; color: #dbdee1; font-size: 14.5px; max-height: 70vh; overflow-y: auto; }
.d-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #949ba4; padding: 10px 14px 2px; display: flex; gap: 6px; align-items: center; }
.d-label .i { width: 13px; height: 13px; }
.d-msg { display: flex; gap: 12px; padding: 6px 14px; }
.d-msg:hover { background: #2e3035; }
.d-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.d-body { min-width: 0; flex: 1; }
.d-name { font-weight: 600; color: #f2f3f5; display: flex; align-items: center; gap: 6px; }
.d-time { font-size: 11px; color: #949ba4; font-weight: 400; }
.app-tag { background: var(--discord); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .02em; }
.d-text { white-space: pre-wrap; word-wrap: break-word; }
.d-text strong { color: #f2f3f5; }
.d-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.d-embed { display: flex; margin-top: 4px; max-width: 100%; background: #2b2d31; border-radius: 4px; border-left: 4px solid var(--purple); padding: 10px 14px 12px 12px; gap: 12px; }
.d-embed-main { flex: 1; min-width: 0; }
.d-embed-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.d-embed img { width: 64px; height: 64px; border-radius: 6px; }
.d-empty { color: #949ba4; font-style: italic; }
.d-voice { display: flex; align-items: center; gap: 8px; margin: 4px 14px 8px; padding: 6px 8px; border-radius: 6px; color: #949ba4; font-weight: 500; }
.d-voice:hover { background: #393c41; color: #dbdee1; }

.save-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; width: min(760px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px;
  background: #16161f; border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.9);
  animation: pop .2s ease-out;
}
.save-bar > span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.save-bar > div { display: flex; gap: 8px; }
.layout:has(.sidebar) .save-bar { left: calc(50% + var(--sidebar-w) / 2); }
.save-bar.shake { animation: shake .4s; }
@keyframes pop { from { transform: translate(-50%, 20px); opacity: 0; } }
@keyframes shake { 25% { transform: translate(calc(-50% - 6px), 0); } 75% { transform: translate(calc(-50% + 6px), 0); } }

/* ───────────────────────── panels (Profile, Commands, ...) ───────────────────────── */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.panel-foot { display: flex; justify-content: flex-end; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--border); }

.profile-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
.profile-card { background: #232428; border-radius: 12px; overflow: hidden; }
.profile-banner { height: 90px; background: linear-gradient(135deg, #6d28d9, #8b5cf6 50%, #db2777); }
.profile-avatar { position: relative; width: 84px; height: 84px; margin: -42px 0 0 16px; }
.profile-avatar img { width: 84px; height: 84px; border-radius: 50%; border: 6px solid #232428; background: #232428; }
.dot.big { position: absolute; right: 2px; bottom: 4px; width: 20px; height: 20px; border: 4px solid #232428; }
.profile-body { padding: 8px 16px 16px; }
.profile-name { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.profile-status { margin-top: 12px; padding: 10px 12px; background: #1b1c1f; border-radius: 8px; font-size: 13px; color: #dbdee1; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.plan-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan-card.plus { background: radial-gradient(100% 100% at 100% 0%, rgba(250, 204, 21, .12), transparent 60%), var(--card); border-color: rgba(250, 204, 21, .35); }
.plan-card.current { box-shadow: 0 0 0 2px var(--purple); }
.plan-name { font-weight: 700; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.plan-name .i { color: var(--gold); }
.plan-price { font-size: 28px; font-weight: 800; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; flex: 1; align-content: start; }
.checks li { display: flex; gap: 8px; align-items: flex-start; color: #cfcfe0; }
.checks .i { color: var(--green); width: 16px; height: 16px; margin-top: 3px; }
.plan-tag { align-self: flex-start; padding: 4px 12px; border-radius: 99px; background: rgba(139, 92, 246, .16); color: #c4b5fd; font-weight: 700; font-size: 12.5px; }
.plan-tag.gold { background: rgba(250, 204, 21, .14); color: var(--gold); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .segmented.links { margin: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.chart-card { background: linear-gradient(180deg, #16161f, #111119); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 4px; }

.cmd-panel { padding: 16px 18px 6px; }
.cmd-panel .panel-head { margin-bottom: 4px; padding-bottom: 12px; }
.cmd-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.04); }
.cmd-row:first-of-type { border-top: 0; }
.cmd-row > div { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

.log-list { padding: 6px 0; }
.log-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.04); }
.log-row:first-child { border-top: 0; }
.log-row img { width: 36px; height: 36px; border-radius: 50%; }
.log-main { flex: 1; min-width: 0; }
.source { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.source .i { width: 13px; height: 13px; }
.source.dashboard { background: rgba(139, 92, 246, .14); color: #c4b5fd; }
.source.discord { background: rgba(88, 101, 242, .14); color: #a5b0ff; }

/* ───────────────────────── pop-up messages ───────────────────────── */
#toasts { position: fixed; top: 76px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; max-width: 380px;
  background: #1a1a25; border: 1px solid var(--border-2); box-shadow: 0 14px 40px -10px rgba(0,0,0,.8);
  font-weight: 500; animation: toast-in .25s ease-out;
}
.toast.ok { border-color: rgba(34, 197, 94, .4); }
.toast.ok .i { color: var(--green); }
.toast.err { border-color: rgba(239, 68, 68, .45); }
.toast.err .i { color: var(--red); }
.toast.bye { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }

/* ───────────────────────── phones and small screens ───────────────────────── */
.only-mobile { display: none; }
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .plugin-grid { grid-template-columns: repeat(2, 1fr); }
  .module-layout { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-flex; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .sidebar.open { transform: none; }
  .content { padding: 22px 16px 120px; }
  .topbar { padding: 0 16px; }
  .plugin-grid, .chart-grid, .plan-grid, .profile-layout { grid-template-columns: 1fr; }
  .step-body { padding-left: 18px; }
  .layout:has(.sidebar) .save-bar { left: 50%; }
  .user-btn span { display: none; }
  .search { min-width: 0; width: 100%; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .hero h1 { font-size: 30px; }
  .log-row { flex-wrap: wrap; }
}
.chart-tip { z-index: 5; }

/* Step numbers count themselves (1, 2, 3...) so steps can be added anywhere. */
.steps { counter-reset: step; }
.step-num::before { counter-increment: step; content: counter(step); }

/* ───────────────────────── Manage sections (lists) ───────────────────────── */
.rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.row-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main .muted { overflow: hidden; text-overflow: ellipsis; }
.icon-btn.danger { color: #f87171; }
.icon-btn.danger:hover { background: rgba(239, 68, 68, .12); }
.sub-form { margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--border-2); }
.inline-form { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: end; }
.inline-form .field { border: 0; padding: 0; }
.inline-form .btn { margin-bottom: 2px; }
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.big-emoji { font-size: 20px; }
.level-badge { background: rgba(139, 92, 246, .16); color: #c4b5fd; font-weight: 700; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; }
.rank { display: inline-block; min-width: 28px; font-weight: 800; color: #c4b5fd; }
.q-input { margin-top: 6px; }
.q-list { margin: 4px 0 0; padding-left: 18px; }
.w-auto { width: auto; }
details.row-item { display: block; }
details.row-item summary { cursor: pointer; list-style: none; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
details.row-item summary .status-pill { margin-left: auto; }
.qa { padding: 8px 0 0 30px; }
form .btn[type=submit] { margin-top: 10px; }
#eb-mode { margin-bottom: 12px; }
.eb-button { flex-wrap: wrap; }
.eb-button .input { flex: 1; min-width: 140px; }
.eb-button .picker { flex: 1; min-width: 180px; }
.d-embed-author { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.d-embed-footer { font-size: 12px; color: #b5bac1; margin-top: 8px; }
.d-embed .d-embed-image { width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 6px; margin-top: 10px; }
.d-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.d-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; color: #fff; }
.d-btn .i { width: 13px; height: 13px; }
.d-btn.blue { background: #5865f2; }
.d-btn.grey { background: #4e5058; }
.d-btn.green { background: #248046; }
.d-btn.red { background: #da373c; }
@media (max-width: 860px) { .inline-form { grid-template-columns: 1fr; } }
