:root {
  --bg: #071014;
  --bg-2: #0c171c;
  --card: rgba(14, 28, 34, 0.88);
  --line: rgba(140, 210, 190, 0.14);
  --text: #eef7f4;
  --muted: #8fa8a1;
  --accent: #3dffa8;
  --accent-2: #7cf0d0;
  --purple: #3dffa8;
  --purple-2: #7cf0d0;
  --ok: #3dffa8;
  --danger: #ff6b7a;
  --radius: 18px;
  --nav-h: 72px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Syne", "Manrope", sans-serif;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(61, 255, 168, 0.16), transparent 55%),
    radial-gradient(800px 420px at 100% 8%, rgba(40, 140, 160, 0.18), transparent 50%),
    linear-gradient(180deg, #061014 0%, #071418 45%, #050d10 100%);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, Consolas, monospace; background: rgba(255,255,255,0.06); padding: 0.1em 0.4em; border-radius: 6px; }

.nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 5vw;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7, 16, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.nav-links > a:not(.btn):not(.user-chip) { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #2be09a, #7cf0d0);
  color: #042018;
  box-shadow: 0 12px 30px rgba(61, 255, 168, 0.22);
}
.btn-primary:hover { color: #042018; filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-lg { min-height: 52px; padding: 0 24px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; }
.logout-form { display: inline; margin: 0; }
.logout-form .btn { font: inherit; }

.hero, .features, .legal-page, .stats, .cta-band { width: min(1120px, 92vw); margin: 0 auto; }
.hero-bleed {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 48px 5vw 64px;
  overflow: hidden;
  margin: 0;
  max-width: none;
  animation: heroIn 0.7s ease both;
}
.hero-glow {
  position: absolute;
  inset: -20% 20% auto -10%;
  height: 70%;
  background: radial-gradient(circle, rgba(61, 255, 168, 0.18), transparent 68%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.brand-mark {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  line-height: 0.95;
  text-shadow: 0 0 40px rgba(61, 255, 168, 0.25);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 700;
  max-width: 16ch;
}
.lead, .section-lead, .muted { color: var(--muted); line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  animation: floatY 5.5s ease-in-out infinite;
}
.hero-visual img {
  width: min(380px, 72%);
  filter: drop-shadow(0 30px 50px rgba(61, 255, 168, 0.22));
}

.section-head { margin-bottom: 28px; }
.section-head h2, .cta-band h2, .features h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 8px;
}
.features { padding: 28px 0 72px; }
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-strip article {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.feature-strip h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
}
.feature-strip p { margin: 0; color: var(--muted); line-height: 1.6; }

.cta-band {
  margin: 0 auto 88px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(61, 255, 168, 0.08), transparent 45%),
    rgba(10, 22, 26, 0.9);
}
.cta-inner { max-width: 520px; }
.cta-inner p { color: var(--muted); margin: 8px 0 22px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.card, .dash-side, .dash-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 20px; }
.card h3 { margin: 0 0 8px; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.legal-page { padding: 40px 0 80px; }
.legal-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-page h2 { margin-top: 28px; }
.legal-page ul { color: var(--muted); line-height: 1.7; }

.footer { border-top: 1px solid var(--line); padding: 40px 5vw 48px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid a { display: block; margin: 6px 0; color: var(--muted); }
.footer h4 { color: #fff; margin: 0 0 10px; }
.legal { margin-top: 24px; font-size: 0.85rem; }

.dashboard {
  width: min(1280px, 94vw);
  margin: 20px auto 72px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 180px);
}
.dash-side { padding: 16px; height: fit-content; position: sticky; top: calc(var(--nav-h) + 12px); }
.dash-main { padding: 22px; min-width: 0; }
.guild-picker label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.module-nav { display: grid; gap: 4px; margin-top: 14px; }
.module-nav button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.module-nav button.active, .module-nav button:hover { background: rgba(61, 255, 168, 0.12); color: #fff; }
.dash-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.dash-status { color: var(--muted); }
.modules-toggle { display: none; }

select, input[type="text"], input[type="color"], textarea, input:not([type="checkbox"]) {
  width: 100%;
  background: #0a1418;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.form-grid { display: grid; gap: 16px; }
.row { display: grid; gap: 6px; font-weight: 650; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.switch-ui {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #243038;
  pointer-events: none;
  transition: background 0.15s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.switch input:checked + .switch-ui { background: var(--purple); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--purple); outline-offset: 2px; }
.savebar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: rgba(139, 92, 246, 0.14); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 0.85rem; }
button.chip { cursor: pointer; font: inherit; color: inherit; }
.toast { color: var(--ok); }
.error { color: var(--danger); }
.bot-status, .bot-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.bot-live { margin-top: 18px; }
.bot-status i, .bot-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}
.bot-status.is-on, .bot-live.is-on { color: var(--ok); }
.bot-status.is-on i, .bot-live.is-on i {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero, .hero-bleed, .dashboard, .footer-grid, .stats, .feature-strip { grid-template-columns: 1fr; }
  .hero-bleed { min-height: auto; padding-top: 36px; }
  .hero-visual { order: -1; }
  .hero-visual img { width: min(220px, 55%); }
  .dash-side { position: static; display: none; }
  body.dash-nav-open .dash-side { display: block; }
  .modules-toggle { display: inline-flex; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    padding: 12px 5vw 20px;
    background: rgba(8, 6, 15, 0.96);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
  }
  body.nav-open .nav-links { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .hero-actions .btn { width: 100%; }
}

/* —— Dashboard Rayith —— */
.is-dashboard {
  --bg: #060d10;
  --surface: #0a1418;
  --card: #0f1a1f;
  --card-2: #122026;
  --line: rgba(140, 210, 190, 0.12);
  --text: #eef7f4;
  --muted: #8fa8a1;
  --accent: #3dffa8;
  --accent-2: #7cf0d0;
  --purple: #3dffa8;
  --purple-2: #7cf0d0;
  --radius: 16px;
  --nav-h: 60px;
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(61, 255, 168, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(40, 140, 160, 0.1), transparent 50%),
    #060d10;
  color-scheme: dark;
}
.is-dashboard .nav {
  padding: 0 28px;
  min-height: var(--nav-h);
  background: rgba(6, 13, 16, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.is-dashboard .brand { letter-spacing: 0.1em; font-family: var(--display); }
.is-dashboard .btn { border-radius: 12px; min-height: 42px; }
.is-dashboard .btn-primary {
  background: linear-gradient(135deg, #2be09a, #7cf0d0);
  color: #042018;
  box-shadow: 0 10px 28px rgba(61, 255, 168, 0.18);
}
.is-dashboard .btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.is-dashboard .btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
}
.is-dashboard .switch input:checked + .switch-ui { background: var(--accent); }
.is-dashboard .switch-ui { background: #243038; }
.is-dashboard .module-nav { margin-top: 0; }
.is-dashboard select,
.is-dashboard input:not([type="checkbox"]):not([type="color"]),
.is-dashboard textarea {
  background: var(--surface);
  border-radius: 12px;
  border-color: var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.is-dashboard select:focus,
.is-dashboard input:not([type="checkbox"]):not([type="color"]):focus,
.is-dashboard textarea:focus {
  outline: none;
  border-color: rgba(61, 255, 168, 0.45);
  box-shadow: 0 0 0 3px rgba(61, 255, 168, 0.12);
}
.is-dashboard .site-only { display: none !important; }
.is-dashboard .footer { display: none; }
.is-dashboard main { min-height: calc(100vh - var(--nav-h)); }
.is-dashboard .dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 0;
}
.is-dashboard .dashboard.is-picking { grid-template-columns: 1fr; }
.is-dashboard .dashboard.is-picking .dash-side { display: none; }
.is-dashboard .dash-side,
.is-dashboard .dash-main {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border: 0;
}
.is-dashboard .dash-side {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow: auto;
  padding: 18px 14px 28px;
  background: rgba(10, 20, 24, 0.92);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.is-dashboard .dash-main {
  padding: 32px clamp(20px, 4vw, 48px) 80px;
  min-width: 0;
  max-width: 1180px;
}
.side-top { display: grid; gap: 12px; margin-bottom: 14px; }
.side-back, .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--accent-2);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  width: fit-content;
}
.side-back:hover, .back-link:hover { color: #fff; }
.guild-card {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(61, 255, 168, 0.06), transparent 55%), var(--card);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guild-card:hover { border-color: rgba(61, 255, 168, 0.35); transform: translateY(-1px); }
.guild-card img, .guild-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #1a2a30;
  flex: 0 0 44px;
}
.guild-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--display);
  color: var(--accent);
}
.guild-fallback.lg { width: 56px; height: 56px; font-size: 1.25rem; border-radius: 14px; flex: 0 0 56px; }
.guild-card span { display: grid; min-width: 0; gap: 2px; }
.guild-card strong { font-size: 0.94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card small { color: var(--muted); font-size: 0.75rem; }
.side-search-wrap, .search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.side-search-wrap:focus-within,
.search-wrap:focus-within {
  border-color: rgba(61, 255, 168, 0.4);
  box-shadow: 0 0 0 3px rgba(61, 255, 168, 0.1);
  color: var(--text);
}
.side-search, .search-bar {
  width: 100%;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  border-radius: 0 !important;
  color: var(--text);
  font: inherit;
}
.module-nav { display: grid; gap: 3px; }
.module-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease;
}
.module-nav button .mod-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 28px;
}
.module-nav button .mod-ico svg { width: 14px; height: 14px; }
.module-nav button.active,
.module-nav button:hover {
  background: rgba(61, 255, 168, 0.1);
  color: #fff;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.page-head-hero { margin-bottom: 4px; }
.is-dashboard .page-head h1,
.is-dashboard .dash-head h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  margin: 6px 0 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.dash-meta { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.page-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-pill {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}
.stat-pill strong {
  font-family: var(--display);
  font-size: 1.25rem;
  color: #fff;
}
.stat-pill span { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.stat-pill.is-ok strong { color: var(--accent); }
.guild-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.guild-title-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.dash-toast {
  position: fixed;
  top: calc(var(--nav-h) + 18px);
  right: 22px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(320px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 24px));
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  background: rgba(10, 20, 24, 0.92);
  border: 1px solid rgba(61, 255, 168, 0.35);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.dash-toast.is-show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.dash-toast-ico {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  background: rgba(61, 255, 168, 0.16);
  color: var(--accent);
}
.dash-toast.is-error {
  border-color: rgba(255, 107, 122, 0.4);
}
.dash-toast.is-error .dash-toast-ico {
  background: rgba(255, 107, 122, 0.16);
  color: #ff6b7a;
}
.dash-toast.is-busy .dash-toast-ico {
  background: rgba(124, 240, 208, 0.14);
  color: var(--accent-2);
}
.dash-toast-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  font-size: 0.92rem;
}
.dash-toast-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
}
.dash-toast-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.dash-view { display: grid; gap: 20px; }
.dash-view > form { display: grid; gap: 16px; }

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.server-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(165deg, rgba(61, 255, 168, 0.05), transparent 42%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.server-card:hover {
  border-color: rgba(61, 255, 168, 0.32);
  transform: translateY(-2px);
  background:
    linear-gradient(165deg, rgba(61, 255, 168, 0.09), transparent 42%),
    var(--card-2);
}
.server-card-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.server-card-top img,
.server-card-top .guild-fallback { flex: 0 0 56px; }
.server-card-info { display: grid; gap: 4px; min-width: 0; }
.server-card-info strong {
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}
.server-meta em { font-style: normal; font-weight: 650; color: #c8ddd6; }
.server-meta .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7f78;
  display: inline-block;
}
.server-meta .dot.on {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 255, 168, 0.18);
}
.server-card .btn { width: 100%; }
.server-card.is-missing { opacity: 0.72; }
.server-card.has-bot { border-color: rgba(61, 255, 168, 0.22); }
.invite-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-weight: 700;
  width: fit-content;
  padding: 4px 0;
}
.invite-link:hover { color: #fff; }
.invite-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.1rem;
  line-height: 1;
}

.module-section { display: grid; gap: 12px; }
.module-section h2 {
  margin: 4px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.module-card {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.module-card:hover {
  border-color: rgba(61, 255, 168, 0.4);
  background: var(--card-2);
  transform: translateY(-2px);
}
.module-card span { display: grid; gap: 3px; min-width: 0; flex: 1; }
.module-card strong { font-size: 0.98rem; }
.module-card small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.mod-arrow { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s ease, transform 0.15s ease; flex: 0 0 auto; }
.module-card:hover .mod-arrow { opacity: 1; transform: none; color: var(--accent-2); }
.mod-ico {
  --mod: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  color: var(--mod);
  background: color-mix(in srgb, var(--mod) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--mod) 28%, transparent);
}
.mod-ico svg { width: 20px; height: 20px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.panel-head {
  padding: 18px 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 0.84rem; }
.panel-body { padding: 10px 10px 12px; }
.set-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.05fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  margin: 0 4px;
  border-radius: 12px;
  border-top: 0;
}
.set-row + .set-row { border-top: 1px solid var(--line); border-radius: 0; }
.set-row.is-stack {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
}
.set-copy strong { display: block; font-size: 0.94rem; }
.set-copy p { margin: 5px 0 0; color: var(--muted); font-size: 0.8rem; font-weight: 500; line-height: 1.4; }
.set-ctrl {
  min-width: 0;
  display: grid;
  gap: 8px;
  justify-items: stretch;
  align-items: center;
}
.set-ctrl .switch { justify-self: end; margin-left: auto; }
.set-ctrl input:not([type="checkbox"]),
.set-ctrl select,
.set-ctrl textarea { width: 100%; }
.form-stack { display: grid; gap: 0; margin-top: 8px; }
.color-field {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  justify-self: end;
}
.color-field input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 8px;
}
.mini-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
}
.mini-panel h4 { margin: 0 0 10px; font-size: 0.86rem; color: #d7ebe4; }
.pick-box {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.pick-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.pick-toolbar-mini { justify-content: flex-end; }
.pick-search {
  flex: 1;
  min-width: 0;
  width: auto !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
}
.pick-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.16) transparent;
}
.check-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--card);
  color: #dceee8;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check-chip:hover { background: var(--card-2); border-color: rgba(255,255,255,0.06); }
.check-chip:has(input:checked) {
  border-color: rgba(61, 255, 168, 0.55);
  background: rgba(61, 255, 168, 0.12);
}
.check-chip.is-hidden { display: none; }
.check-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.check-ui {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #4a5c57;
  background: var(--surface);
  position: relative;
}
.check-chip:has(input:checked) .check-ui {
  background: var(--accent);
  border-color: var(--accent);
}
.check-chip:has(input:checked) .check-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #042018;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-panel .pick-box { background: transparent; border: 0; }
.mini-panel .pick-toolbar { padding: 0 0 8px; background: transparent; border: 0; }
.mini-panel .check-grid { max-height: 220px; padding: 0; }

.perm-cmd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 6px;
  flex-wrap: wrap;
}
.perm-cmd-toolbar .perm-cmd-filter {
  max-width: 300px;
  height: 38px !important;
  padding: 0 14px !important;
}
.perm-cmd-board { display: grid; gap: 10px; padding: 6px 10px 14px; }
.perm-cat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.perm-cat summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  font-weight: 750;
  font-size: 0.92rem;
}
.perm-cat summary::-webkit-details-marker { display: none; }
.perm-cat summary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.perm-cmd-list { display: grid; gap: 5px; padding: 0 10px 12px; }
.perm-cmd-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.perm-cmd-row:hover { border-color: var(--line); }
.perm-cmd-row.is-hidden { display: none; }
.perm-cmd-name { min-width: 0; display: grid; gap: 2px; }
.perm-cmd-name strong { font-size: 0.9rem; }
.perm-cmd-name small { color: var(--muted); font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-cmd-row select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.82rem;
}
.empty-hint { color: var(--muted); font-size: 0.9rem; margin: 0; }
.empty-state {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(61, 255, 168, 0.05), transparent 50%),
    var(--card);
}
.savebar {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(6, 13, 16, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  z-index: 5;
}
.embed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.embed-editor { display: grid; gap: 16px; }
.embed-preview-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.nav-group {
  margin: 0 0 10px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.discord-embed {
  background: #1a2428;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px 14px;
  color: #d7ebe4;
  font-size: 0.92rem;
  line-height: 1.45;
}
.de-author { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.de-title { margin: 0 0 6px; font-weight: 800; color: #fff; }
.de-desc { margin: 0; white-space: pre-wrap; }
.de-fields { display: grid; gap: 8px; margin-top: 10px; }
.de-fields strong { display: block; font-size: 0.78rem; color: #fff; }
.de-image { margin-top: 10px; border-radius: 8px; max-height: 180px; object-fit: cover; }
.de-footer { margin: 10px 0 0; font-size: 0.75rem; color: #9bb0a9; }
.raid-list { display: grid; gap: 10px; }
.raid-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.raid-card[open] { border-color: rgba(61, 255, 168, 0.28); }
.raid-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
}
.raid-card summary::-webkit-details-marker { display: none; }
.raid-name { font-size: 0.98rem; }
.raid-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.raid-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}
.raid-pill.on { background: rgba(61, 255, 168, 0.14); color: var(--accent); }
.raid-pill.warn { background: rgba(255, 107, 122, 0.14); color: #ff6b7a; }
.raid-body { border-top: 1px solid var(--line); }
.raid-body .set-row:first-child { border-top: 0; }
.chip {
  background: rgba(61, 255, 168, 0.1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 0.85rem;
}
button.chip { cursor: pointer; font: inherit; color: inherit; }
.modules-toggle { display: none; }

.ticket-options-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 4px;
  flex-wrap: wrap;
}
.ticket-options-list {
  display: grid;
  gap: 10px;
  padding: 6px 10px 14px;
}
.ticket-option {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.ticket-option[open] { border-color: rgba(61, 255, 168, 0.28); }
.ticket-option summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 750;
}
.ticket-option summary::-webkit-details-marker { display: none; }
.ticket-option-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-option summary .btn {
  min-height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
}
.ticket-option-body { border-top: 1px solid var(--line); padding-bottom: 6px; }
.ticket-option-body textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}
.ticket-empty { padding: 8px 4px 4px; }

.music-shell { display: grid; gap: 16px; }
.music-status-line { min-height: 24px; }
.music-online, .music-offline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}
.music-online { color: var(--accent); }
.music-offline { color: #ff6b7a; }
.music-online i, .music-offline i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}
.music-now {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(244, 114, 182, 0.1), transparent 50%),
    var(--card);
}
.music-now.is-empty { opacity: 0.85; }
.music-art {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 88px;
  background: #1a2a30;
}
.music-art-empty {
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--accent-2);
  border: 1px solid var(--line);
}
.music-now-meta { min-width: 0; display: grid; gap: 6px; }
.music-now-meta strong {
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-now-meta p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.music-chip {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(61, 255, 168, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}
.music-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 4px;
}
.music-volume-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px 16px;
}
.music-volume-row label { color: var(--muted); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.music-volume-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.music-queue { list-style: none; margin: 0; padding: 8px 10px 14px; display: grid; gap: 6px; }
.music-queue li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid transparent;
}
.music-q-pos { color: var(--muted); font-weight: 800; font-size: 0.8rem; }
.music-q-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.music-q-dur { color: var(--muted); font-size: 0.8rem; }
.music-play-form { display: grid; gap: 12px; }

@media (max-width: 1100px) {
  .perm-grid, .embed-layout, .set-row { grid-template-columns: 1fr; }
  .embed-preview-wrap { position: static; }
  .perm-cmd-row { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .is-dashboard .dashboard { grid-template-columns: 1fr; }
  .is-dashboard .dash-side {
    display: none;
    position: fixed;
    inset: var(--nav-h) auto 0 0;
    width: min(300px, 88vw);
    z-index: 30;
    height: auto;
    box-shadow: 20px 0 50px rgba(0,0,0,0.45);
  }
  body.dash-nav-open .dash-side { display: block; }
  .is-dashboard .dashboard.is-picking .dash-side { display: none; }
  .is-dashboard .modules-toggle {
    display: inline-flex;
    text-align: center;
    border: 1px solid var(--line);
    background: var(--card);
    color: #fff;
    min-height: 40px;
    padding: 0 14px;
  }
  .page-stats { display: none; }
  .server-grid { grid-template-columns: 1fr; }
}
