/* ── Reset & variables ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #080a0f;
  --bg2:         #0d1117;
  --bg3:         #111827;
  --sidebar-w:   260px;
  --blue:        #1c1c1c;
  --blue-mid:    #6b7280;
  --blue-bright: #d1d5db;
  --white:       #f9fafb;
  --white-dim:   #9ca3af;
  --accent:      #ffffff;
  --border:      rgba(255,255,255,0.08);
  --glow:        rgba(209,213,219,0.1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --radius:       12px;
  --transition:   0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  opacity: 0.5;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-bright);
  box-shadow: 0 0 14px rgba(209,213,219,0.15);
}

.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  letter-spacing: 0.02em;
}

.sidebar-logo-text em {
  font-style: italic;
  color: var(--blue-bright);
}

/* Nav links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--blue) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
}

.nav-link:hover::before, .nav-link.active::before {
  opacity: 1;
}

.nav-link.active {
  border-left: 2px solid var(--blue-bright);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.nav-link span:last-child { position: relative; z-index: 1; }

/* Sidebar footer */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-invite-sm {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: linear-gradient(135deg, #374151, #6b7280);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: filter var(--transition), transform var(--transition);
}

.btn-invite-sm:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.sidebar-credit {
  font-size: 11px;
  color: var(--white-dim);
  opacity: 0.5;
}

/* ── Main content area ─────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 0;
}

/* ── Page header ───────────────────────────────────────────────────── */
.page-header {
  padding: 60px 60px 40px;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--white-dim);
  font-size: 16px;
  max-width: 600px;
}

.page-body {
  padding: 40px 60px 80px;
}

/* ── Stat cards ────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6b7280, #d1d5db);
}

.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.stat-value.live { color: var(--blue-bright); }

/* ── Feature section ───────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.5s ease both;
}

.feature-card:hover {
  border-color: rgba(209,213,219,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(209,213,219,0.08);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--white-dim);
  line-height: 1.6;
}

/* ── Commands page ─────────────────────────────────────────────────── */
.cmd-category {
  margin-bottom: 48px;
}

.cmd-category-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmd-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  transition: border-color var(--transition);
}

.cmd-item:hover { border-color: rgba(209,213,219,0.2); }

.cmd-name {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  word-break: break-all;
}

.cmd-desc {
  font-size: 13.5px;
  color: var(--white-dim);
  line-height: 1.5;
}

.cmd-example {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

/* ── Invite page ───────────────────────────────────────────────────── */
.invite-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  min-height: 60vh;
}

.invite-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--blue-bright);
  box-shadow: 0 0 60px rgba(209,213,219,0.15);
  margin-bottom: 32px;
  animation: float 4s ease-in-out infinite;
}

.invite-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}

.invite-hero p {
  color: var(--white-dim);
  max-width: 480px;
  margin-bottom: 40px;
  font-size: 15px;
}

.btn-invite-lg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: linear-gradient(135deg, #374151, #6b7280);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-invite-lg:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.invite-perms {
  margin-top: 48px;
  text-align: left;
  max-width: 420px;
  width: 100%;
}

.invite-perms h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 14px;
}

.perm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--white-dim);
}

.perm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  flex-shrink: 0;
}

/* ── Privacy page ──────────────────────────────────────────────────── */
.prose {
  max-width: 740px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li {
  font-size: 14.5px;
  color: var(--white-dim);
  line-height: 1.8;
  margin-bottom: 12px;
}

.prose ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.prose strong { color: var(--white); }

/* ── Hero gradient blob ────────────────────────────────────────────── */
.hero-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

/* ── CTA strip ─────────────────────────────────────────────────────── */
.cta-strip {
  background: linear-gradient(135deg, var(--bg3) 0%, rgba(55,65,81,0.3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
}

.cta-strip h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.cta-strip p {
  color: var(--white-dim);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Icons ─────────────────────────────────────────────────────────── */
.cat-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.85;
  flex-shrink: 0;
}

.feature-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.75;
  display: block;
  margin-bottom: 16px;
}

/* ── Animations ────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Mobile hamburger ──────────────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  }
  .main-content {
    margin-left: 0;
  }
  .page-header, .page-body {
    padding-left: 24px;
    padding-right: 24px;
  }
  .page-header { padding-top: 72px; }
  .hamburger { display: flex; }
  .sidebar-overlay.open { display: block; }
  .cmd-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cta-strip {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .page-header h1 { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Dashboard ─────────────────────────────────────────────────────── */

/* Sidebar user */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-username {
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout-sm {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-logout-sm:hover {
  background: rgba(239,68,68,0.25);
}

/* Guild grid */
.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--white);
  transition: all var(--transition);
}

.guild-card:hover:not(.disabled) {
  border-color: rgba(209,213,219,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.guild-card.disabled {
  opacity: 0.7;
  cursor: pointer;
}

.guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.guild-icon-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--white-dim);
  flex-shrink: 0;
}

.guild-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guild-name {
  font-weight: 600;
  font-size: 14px;
}

.guild-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
}

.guild-status.active {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
}

.guild-status.inactive {
  background: rgba(107,114,128,0.15);
  color: var(--white-dim);
  border: 1px solid var(--border);
}

.guild-arrow {
  color: var(--white-dim);
  font-size: 16px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--white-dim);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* Panel cards */
.panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.panel-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition);
}

.panel-card:hover {
  border-color: rgba(209,213,219,0.2);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-emoji {
  font-size: 20px;
}

.panel-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  flex: 1;
}

.panel-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.panel-color-dot.blurple { background: #5865f2; }
.panel-color-dot.green   { background: #57f287; }
.panel-color-dot.red     { background: #ed4245; }
.panel-color-dot.grey    { background: #4f545c; }

.panel-meta {
  font-size: 12px;
  color: var(--white-dim);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.panel-welcome {
  font-size: 12.5px;
  color: var(--white-dim);
  line-height: 1.5;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Tickets table */
.tickets-table {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tickets-header {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 100px 120px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-dim);
  border-bottom: 1px solid var(--border);
}

.ticket-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 100px 120px;
  padding: 14px 20px;
  font-size: 13px;
  color: var(--white-dim);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.ticket-row:last-child { border-bottom: none; }
.ticket-row:hover { background: rgba(255,255,255,0.02); }

.ticket-id {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--white);
}

.ticket-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
  text-transform: capitalize;
}

.ticket-status.open   { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.ticket-status.closed { background: rgba(107,114,128,0.15); color: var(--white-dim); border: 1px solid var(--border); }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #374151, #6b7280);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white-dim);
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: var(--white); }

.btn-secondary-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white-dim);
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary-sm:hover { border-color: rgba(255,255,255,0.2); color: var(--white); }

.btn-danger-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #f87171;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger-sm:hover { background: rgba(239,68,68,0.2); }

/* Form styles */
.panel-form {
  max-width: 760px;
}

.form-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(209,213,219,0.4);
}

.form-group select option {
  background: var(--bg3);
  color: var(--white);
}

.form-hint {
  font-size: 11px;
  color: var(--white-dim);
  opacity: 0.6;
}

.roles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--white-dim);
  transition: all var(--transition);
}

.role-checkbox:hover { border-color: rgba(255,255,255,0.2); color: var(--white); }

.role-checkbox input { display: none; }

.role-checkbox:has(input:checked) {
  border-color: rgba(209,213,219,0.4);
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

.role-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Toggle */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--white-dim);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.toggle-label input { display: none; }

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 11px;
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white-dim);
  top: 2px;
  left: 2px;
  transition: transform var(--transition), background var(--transition);
}

.toggle-label:has(input:checked) .toggle-track {
  background: rgba(34,197,94,0.3);
  border-color: rgba(34,197,94,0.4);
}

.toggle-label:has(input:checked) .toggle-track::after {
  transform: translateX(18px);
  background: #4ade80;
}

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

/* ── Panel Editor Layout ───────────────────────────────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1200px) {
  .editor-layout { grid-template-columns: 1fr; }
}

/* ── Variables ─────────────────────────────────────────────────────── */
.vars-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.var-tag {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(88,101,242,0.15);
  border: 1px solid rgba(88,101,242,0.3);
  color: #a5b4fc;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.var-tag:hover {
  background: rgba(88,101,242,0.3);
  color: #c7d2fe;
}

/* ── Searchable select ─────────────────────────────────────────────── */
.searchable-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--white);
  font-size: 13px;
  outline: none;
}

.options-list {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.options-list::-webkit-scrollbar { width: 4px; }
.options-list::-webkit-scrollbar-track { background: transparent; }
.options-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--white-dim);
  transition: all var(--transition);
}

.option-checkbox:hover { background: rgba(255,255,255,0.05); color: var(--white); }

.option-checkbox:has(input:checked) {
  background: rgba(88,101,242,0.15);
  color: var(--white);
}

.option-checkbox input { display: none; }
.option-emoji { font-size: 14px; }

/* ── Questions ─────────────────────────────────────────────────────── */
.question-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.question-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.question-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white-dim);
  text-transform: uppercase;
}

.question-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(107,114,128,0.2);
  color: var(--white-dim);
  border: 1px solid var(--border);
}

/* ── Preview Panel ─────────────────────────────────────────────────── */
.preview-panel {
  position: sticky;
  top: 24px;
}

.preview-header {
  margin-bottom: 16px;
}

.preview-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
}

.preview-hint {
  font-size: 12px;
  color: var(--white-dim);
  opacity: 0.7;
}

.preview-sub-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 10px;
}

.preview-section { }

/* ── Discord Mock ──────────────────────────────────────────────────── */
.discord-mock {
  background: #313338;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.discord-channel-header {
  background: #2b2d31;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f2f3f5;
  border-bottom: 1px solid rgba(0,0,0,0.2);
}

.discord-hash {
  color: #80848e;
  font-size: 18px;
  font-weight: 700;
}

.discord-messages {
  padding: 16px;
}

.discord-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.discord-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.discord-msg-content {
  flex: 1;
  min-width: 0;
}

.discord-username {
  font-size: 13px;
  font-weight: 600;
  color: #f2f3f5;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.discord-bot-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  background: #5865f2;
  border-radius: 3px;
  letter-spacing: 0.04em;
  color: #fff;
}

.discord-embed {
  display: flex;
  background: #2b2d31;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(0,0,0,0.2);
}

.discord-embed-bar {
  width: 4px;
  flex-shrink: 0;
  background: #5865f2;
}

.discord-embed-body {
  padding: 10px 14px;
  flex: 1;
}

.discord-embed-title {
  font-size: 14px;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 6px;
}

.discord-embed-desc {
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.5;
}

.discord-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.discord-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  cursor: default;
  font-family: var(--font-body);
  transition: filter 0.1s;
}

/* ── Discord Modal Mock ────────────────────────────────────────────── */
.discord-modal-mock {
  background: #313338;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.discord-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-question {
  margin-bottom: 14px;
}

.modal-q-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b5bac1;
  margin-bottom: 6px;
}

.modal-q-input {
  width: 100%;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 8px 10px;
  color: #dbdee1;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  resize: vertical;
}

.modal-q-input option {
  background: #1e1f22;
}

/* ── Panel action buttons ──────────────────────────────────────────── */
.panel-action-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: filter var(--transition), transform var(--transition);
}
.panel-action-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }

.edit-btn   { background: rgba(34,197,94,0.2); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.resend-btn { background: rgba(88,101,242,0.2); color: #a5b4fc; border: 1px solid rgba(88,101,242,0.3); }
.delete-btn { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }

/* ── Delete confirmation modal ─────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
}
.modal-backdrop.open { display: block; }

.modal-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-box.open { display: block; animation: fadeUp 0.2s ease; }

.modal-icon { font-size: 40px; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.modal-desc { font-size: 14px; color: var(--white-dim); margin-bottom: 28px; line-height: 1.6; }

.modal-actions { display: flex; gap: 12px; justify-content: center; }

.modal-btn {
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.modal-btn.cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white-dim);
}
.modal-btn.cancel:hover { border-color: rgba(255,255,255,0.2); color: var(--white); }
.modal-btn.confirm-delete {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}
.modal-btn.confirm-delete:hover { background: rgba(239,68,68,0.35); }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #f2f3f5;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Send panel bar ────────────────────────────────────────────────── */
.send-panel-bar {
  position: fixed;
  bottom: 0; left: var(--sidebar-w); right: 0;
  background: var(--bg2);
  border-top: 1px solid rgba(34,197,94,0.3);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 200;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.send-panel-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.send-channel-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  min-width: 220px;
}

/* ── Colour picker row ─────────────────────────────────────────────── */
.color-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 900px) {
  .send-panel-bar { left: 0; padding: 16px 20px; flex-direction: column; align-items: flex-start; }
  .send-panel-controls { width: 100%; }
  .send-channel-select { flex: 1; }
}

/* ── Button colour swatch picker ───────────────────────────────────── */
.btn-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
  position: relative;
}

.swatch:hover { transform: scale(1.15); }

.swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.swatch-picker {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px dashed rgba(255,255,255,0.3);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
  position: relative;
}
.swatch-picker:hover { border-color: rgba(255,255,255,0.6); transform: scale(1.1); }
.swatch-picker.active { border-color: #fff; }

.swatch-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Server pill ──────────────────────────────────────────────────────────── */
.server-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 0 12px 8px;
  overflow: hidden;
}
.server-pill-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}
.server-pill-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.server-pill-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sidebar section labels ───────────────────────────────────────────────── */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-dim);
  padding: 16px 16px 4px;
  opacity: 0.6;
}
.nav-back {
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.nav-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Module grid ──────────────────────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.module-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px 20px;
  text-decoration: none;
  color: var(--white);
  transition: all var(--transition);
  display: block;
  overflow: hidden;
}
.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.module-card.module-soon {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.module-num {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--white-dim);
  opacity: 0.4;
  font-family: var(--font-display);
}
.module-badge {
  position: absolute;
  top: 14px; right: 38px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.4;
}
.module-icon {
  font-size: 30px;
  margin-bottom: 12px;
}
.module-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--white);
}
.module-card p {
  font-size: 13px;
  color: var(--white-dim);
  line-height: 1.5;
  margin: 0;
}

/* ── Stats grid ───────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-dim);
  opacity: 0.7;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
}

/* ── Back link ────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-block;
  color: var(--white-dim);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 14px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--white); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert-success {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── Ticket chat layout ───────────────────────────────────────────────────── */
.ticket-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: 1fr; }
}

.ticket-chat-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ticket-chat {
  height: 520px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.ticket-send-box {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}
.ticket-send-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  width: 100%;
}
.ticket-send-input:focus { border-color: var(--accent); }

/* ── Chat messages ────────────────────────────────────────────────────────── */
.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chat-msg.msg-bot .chat-body {
  background: rgba(88,101,242,0.08);
  border-radius: 0 10px 10px 10px;
  padding: 10px 14px;
}
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-avatar-letter {
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
}
.chat-body { flex: 1; }
.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
}
.chat-bot-tag {
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.chat-time {
  font-size: 11px;
  color: var(--white-dim);
  opacity: 0.6;
}
.chat-content {
  font-size: 14px;
  color: var(--white-dim);
  line-height: 1.5;
  word-break: break-word;
}

/* ── Ticket right sidebar ─────────────────────────────────────────────────── */
.ticket-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tsb-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}
.tsb-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-dim);
  opacity: 0.6;
  margin-bottom: 4px;
}
.tsb-value {
  font-size: 13px;
  color: var(--white);
  font-weight: 500;
}

/* ── Ticket status badge ──────────────────────────────────────────────────── */
.ticket-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}
.ticket-status.open   { background: rgba(34,197,94,0.15); color: #4ade80; }
.ticket-status.closed { background: rgba(239,68,68,0.15); color: #f87171; }

/* ── Discord embed preview ────────────────────────────────────────────────── */
.discord-embed {
  background: #2b2d31;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  max-width: 360px;
}
.discord-embed-bar {
  width: 4px;
  flex-shrink: 0;
}
.discord-embed-body {
  padding: 12px 16px;
  flex: 1;
}
.discord-embed-title {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-bottom: 10px;
}
.discord-embed-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.discord-embed-field-name {
  font-size: 11px;
  font-weight: 700;
  color: #dbdee1;
  margin-bottom: 2px;
}
.discord-embed-field-value {
  font-size: 13px;
  color: #b5bac1;
}
.discord-embed-footer {
  font-size: 11px;
  color: #87898c;
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

/* ── Form sections ────────────────────────────────────────────────────────── */
.form-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Sidebar avatar fallback ──────────────────────────────────────────────── */
.sidebar-avatar-fallback {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

/* ── Global toast (moved to base) ────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #f2f3f5;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  z-index: 600;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Fix 4: Server homepage stat pills ───────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.stat-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 130px;
  flex: 1;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  display: block;
}
.stat-lbl {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-dim);
  opacity: 0.65;
  display: block;
}

/* ── Panel Editor ─────────────────────────────────────────────── */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .15s;
}
.checkbox-item:hover { background: rgba(255,255,255,.05); }
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Discord button preview */
.discord-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #5865f2;
  cursor: default;
  user-select: none;
  margin-right: 6px;
  margin-bottom: 4px;
}
.discord-btn-preview.green  { background: #3ba55c; }
.discord-btn-preview.red    { background: #ed4245; }
.discord-btn-preview.grey,
.discord-btn-preview.gray   { background: #4f545c; }

/* Embed preview title */
.discord-embed-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}

/* ── Ticket chat images ──────────────────────────────────────────────────── */
.chat-img {
  max-width: 320px;
  max-height: 240px;
  border-radius: 8px;
  margin-top: 6px;
  display: block;
  cursor: pointer;
  transition: opacity .15s;
}
.chat-img:hover { opacity: .85; }

/* ── Module card image icons ─────────────────────────────────────────────── */
.module-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.85;
}

/* ── Sidebar nav image icons (half size of module cards) ─────────────────── */
.nav-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.7;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nav-link:hover .nav-icon-img,
.nav-link.active .nav-icon-img {
  opacity: 1;
}