/**
 * CodeCraft Support — Main Stylesheet
 * Dark glassmorphism design system shared by every page.
 *
 * Design tokens live in :root — page stylesheets (admin, mod, void) should
 * reuse these variables instead of hard-coding colors.
 */

:root {
  /* Surfaces */
  --bg: #0b0f14;
  --bg-2: #14181f;
  --bg-3: #1b212b;
  --bg-secondary: var(--bg-2); /* alias used by page-level modals */

  /* Text */
  --text: #e7eaf0;
  --muted: #9ca3af;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Lines & accents */
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #21c8d0;
  --accent-2: #8b5cf6;
  --blurple: #5865f2;
  --success: #43b581;
  --warning: #faa61a;
  --danger: #f04747;

  /* Effects */
  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 18px 44px -12px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(33, 200, 208, 0.35);

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(33, 200, 208, 0.07), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, .hero-title, .title, .brand-text {
  font-family: var(--font-display);
}

::selection {
  background: rgba(33, 200, 208, 0.35);
  color: #fff;
}

/* Subtle themed scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* Consistent keyboard-focus ring everywhere */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

img { max-width: 100%; }

body.nav-open {
  overflow: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar,
.footer,
.page,
.dashboard-app {
  position: relative;
  z-index: 1;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 20, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  background: rgba(11, 15, 20, 0.92);
  box-shadow: var(--shadow-1);
  border-bottom-color: rgba(33, 200, 208, 0.12);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(33, 200, 208, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links > a:not(.btn),
.nav-links .dropdown-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links > a:not(.btn):hover,
.nav-links .dropdown-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Dropdowns ──────────────────────────────────────────────────────────── */
.dropdown {
  position: relative;
}

/* Bots trigger row: keeps the "Bots" link and chevron on the same line */
.bots-trigger {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px 6px;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  /* Never use absolute positioning — the trigger wrapper handles layout */
  position: static;
  transform: none;
}

.dropdown-toggle .chev {
  transition: transform 0.2s ease;
}

.dropdown.open .dropdown-toggle .chev,
.dropdown.hover-open .dropdown-toggle .chev {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  /* Invisible top padding bridges the gap so the menu stays open while
     the cursor travels from the trigger down into the menu */
  padding-top: 8px;
  background: transparent;
  border: none;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  box-shadow: none;
  z-index: 1001;
}

/* Inner wrapper carries the visual styling so the invisible padding area
   does not show a border/shadow gap */
.dropdown-menu-inner {
  background: linear-gradient(165deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-pop);
}

.dropdown.open .dropdown-menu,
.dropdown.hover-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-menu a i {
  width: 18px;
  text-align: center;
  color: var(--muted);
  transition: color 0.15s ease;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-menu a:hover i {
  color: var(--accent);
}

.dropdown-menu a.menu-item-danger:hover {
  background: rgba(240, 71, 71, 0.12);
  color: #ff8383;
}

.dropdown-menu a.menu-item-danger:hover i {
  color: #ff8383;
}

.menu-divider {
  height: 1px;
  margin: 6px 8px;
  background: var(--border);
}

.dropdown-menu-right {
  right: 0;
  left: auto;
}

/* ── User avatar button + menu header ───────────────────────────────────── */
.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  transition: background 0.2s ease;
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.user-avatar-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
  object-fit: cover;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.user-avatar-btn:hover img {
  border-color: var(--accent);
}

/* Desktop: compact avatar chip; name shows in the open menu */
.user-avatar-name {
  display: none;
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chev {
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.user-avatar-btn:hover .user-chev {
  color: var(--text);
}

.dropdown.open .user-chev,
.dropdown.hover-open .user-chev {
  transform: rotate(180deg);
  color: var(--text);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-info-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.45);
  object-fit: cover;
  flex-shrink: 0;
}

.user-info-text {
  min-width: 0;
}

.user-info strong {
  display: block;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info .discriminator {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:focus-visible {
  box-shadow: var(--ring);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(33, 200, 208, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(33, 200, 208, 0.1);
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: #fff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.3);
}

/* Nav CTA — sits between ghost links and primary Login */
.btn-nav {
  background: rgba(33, 200, 208, 0.1);
  border: 1px solid rgba(33, 200, 208, 0.35);
  color: var(--accent);
}

.btn-nav:hover {
  background: rgba(33, 200, 208, 0.18);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.press-3d {
  position: relative;
  transition: transform 0.1s ease;
}

.press-3d.is-pressed {
  transform: scale(0.95);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Forms (shared baseline) ────────────────────────────────────────────── */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
  font-family: inherit;
}

input[type="text"]:focus-visible,
input[type="search"]:focus-visible,
input[type="email"]:focus-visible,
input[type="url"]:focus-visible,
input[type="number"]:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* ── Page & sections ────────────────────────────────────────────────────── */
.page {
  min-height: calc(100vh - 200px);
  padding: 48px 0;
}

.page:has(.hero-bleed) {
  padding-top: 0;
}

.section {
  padding: 64px 0;
}

.section .section-title,
.section-header .section-title {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.section-header {
  margin-bottom: 48px;
}

.section-header.center {
  text-align: center;
}

.title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 600px;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(33, 200, 208, 0.1);
  border: 1px solid rgba(33, 200, 208, 0.3);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  padding: 32px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-1);
}

.glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(12px);
}

/* ── Grid ───────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ── Dashboard pickers (bot / server selection) ───────────────────────────── */
.dashboard-pick-page {
  padding-top: 28px !important;
}

.dashboard-pick-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 28px 28px;
  border-radius: 20px;
  border: 1px solid rgba(33, 200, 208, 0.22);
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(33, 200, 208, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 70% at 0% 100%, rgba(139, 92, 246, 0.1), transparent 50%),
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}

.dashboard-pick-hero h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.dashboard-pick-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
}

.dashboard-pick-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-pick-bot-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.dashboard-pick-bot-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.dashboard-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dashboard-picker-list--bots {
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  justify-content: start;
}

.dashboard-picker-list--servers {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.dashboard-picker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: dashboardFadeUp 0.4s ease backwards;
  min-height: 168px;
}

.dashboard-picker-card:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 200, 208, 0.4);
  box-shadow: 0 16px 32px -18px rgba(33, 200, 208, 0.35);
}

.dashboard-picker-list .dashboard-picker-card:nth-child(1) { animation-delay: 0.04s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(2) { animation-delay: 0.08s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(3) { animation-delay: 0.12s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(4) { animation-delay: 0.16s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(5) { animation-delay: 0.2s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(6) { animation-delay: 0.24s; }
.dashboard-picker-list .dashboard-picker-card:nth-child(n+7) { animation-delay: 0.28s; }

.dashboard-picker-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  color: var(--accent);
}

.dashboard-picker-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-picker-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.dashboard-picker-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-picker-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.dashboard-picker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-picker-badge-ready {
  color: var(--success);
  background: rgba(67, 181, 129, 0.12);
  border: 1px solid rgba(67, 181, 129, 0.3);
}

.dashboard-picker-badge-missing {
  color: var(--warning);
  background: rgba(250, 166, 26, 0.12);
  border: 1px solid rgba(250, 166, 26, 0.3);
}

.dashboard-picker-badge-bot {
  color: var(--accent);
  background: rgba(33, 200, 208, 0.12);
  border: 1px solid rgba(33, 200, 208, 0.3);
}

.dashboard-picker-card-cta {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.dashboard-picker-card:hover .dashboard-picker-card-cta {
  color: var(--accent);
}

.dashboard-picker-search {
  width: 100%;
  max-width: 360px;
  margin: 0 0 18px;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 14px 50% no-repeat;
  color: var(--text);
  font: inherit;
}

.dashboard-picker-search:focus {
  outline: none;
  border-color: rgba(33, 200, 208, 0.45);
  box-shadow: var(--ring);
}

.dashboard-picker-hint {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Dashboard app shell (per-server dashboard) ───────────────────────────
   Full-bleed, edge-to-edge layout — unlike marketing pages this isn't
   wrapped in .container, so it isn't capped at 1200px. */
.dashboard-app {
  display: flex;
  align-items: stretch;
  min-height: 100vh; /* no site navbar above this on dashboard pages */
}

.dashboard-sidebar-toggle-state {
  display: none;
}

.dashboard-mobile-bar {
  display: none;
}

.dashboard-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(20, 24, 31, 0.98), rgba(11, 15, 20, 0.98));
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 12px;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-sidebar-brand:hover {
  background: rgba(33, 200, 208, 0.08);
  border-color: rgba(33, 200, 208, 0.2);
}

.dashboard-sidebar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(33, 200, 208, 0.25);
}

.dashboard-sidebar-brand strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
  opacity: 0.85;
  font-weight: 600;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.dashboard-nav-link i {
  width: 18px;
  text-align: center;
  color: var(--muted);
}

.dashboard-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
  transform: translateX(2px);
}

.dashboard-nav-link.active {
  background: rgba(33, 200, 208, 0.12);
  color: var(--accent);
  opacity: 1;
}

.dashboard-nav-link.active i {
  color: var(--accent);
}

.dashboard-sidebar-backdrop {
  display: none;
}

.dashboard-content {
  flex: 1;
  min-width: 0;
  padding: 36px 44px 56px;
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(33, 200, 208, 0.06), transparent 50%),
    var(--bg);
}

.dashboard-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dashboard-particle {
  position: absolute;
  bottom: -20px;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 50%;
  background: rgba(139, 154, 255, 0.55);
  box-shadow: 0 0 6px 1px rgba(139, 154, 255, 0.4);
  animation: dashboardParticleRise var(--dur, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes dashboardParticleRise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: var(--peak-opacity, 0.6);
  }
  90% {
    opacity: var(--peak-opacity, 0.6);
  }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 20px));
    opacity: 0;
  }
}

.dashboard-content > *:not(.dashboard-particles) {
  position: relative;
  z-index: 1;
}

/* ── Site-wide ambient motion (soft, light particles) ─────────────────────── */
.site-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-particle {
  position: absolute;
  top: -20px;
  width: var(--size, 5px);
  height: var(--size, 5px);
  border-radius: 50%;
  background: rgba(33, 200, 208, 0.45);
  box-shadow: 0 0 10px 1px rgba(33, 200, 208, 0.18);
  animation: siteParticleFall var(--dur, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(70px);
  opacity: 0.35;
}

body::before {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: 12%;
  right: -8%;
  background: rgba(33, 200, 208, 0.22);
  animation: ambientDriftA 22s ease-in-out infinite;
}

body::after {
  width: min(360px, 48vw);
  height: min(360px, 48vw);
  bottom: 8%;
  left: -6%;
  background: rgba(139, 92, 246, 0.18);
  animation: ambientDriftB 26s ease-in-out infinite;
}

@keyframes ambientDriftA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-36px, 28px); }
}

@keyframes ambientDriftB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -24px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .site-particle {
    animation: none !important;
  }
}

@keyframes siteParticleFall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: var(--peak-opacity, 0.25);
  }
  90% {
    opacity: var(--peak-opacity, 0.25);
  }
  100% {
    transform: translateY(110vh) translateX(var(--drift, 20px));
    opacity: 0;
  }
}

/* .navbar and .footer already establish their own stacking context
   (.navbar via position: sticky + z-index: 1000) so they render above the
   fixed particle layer without help. main is the one top-level element
   that doesn't, so it gets an explicit bump here. */
body > main {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .dashboard-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(20, 24, 31, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 900;
  }

  .dashboard-mobile-bar span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
  }

  .dashboard-app {
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 950;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-pop);
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .dashboard-sidebar-toggle-state:checked ~ .dashboard-sidebar {
    transform: translateX(0);
  }

  .dashboard-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 940;
  }

  .dashboard-sidebar-toggle-state:checked ~ .dashboard-sidebar-backdrop {
    display: block;
  }

  .dashboard-content {
    padding: 20px 14px 32px;
  }

  .dashboard-picker-list,
  .dashboard-picker-list--bots,
  .dashboard-picker-list--servers {
    grid-template-columns: 1fr;
  }

  .dashboard-detail-grid,
  .dashboard-stat-strip {
    grid-template-columns: 1fr;
  }

  /* Bot / server picker — compact on phones */
  .dashboard-pick-page {
    padding-top: 16px !important;
  }

  .dashboard-pick-hero {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    gap: 8px;
  }

  .dashboard-pick-hero h1 {
    font-size: 1.25rem;
    margin-bottom: 2px;
  }

  .dashboard-pick-hero p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .dashboard-picker-list--bots .dashboard-picker-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    padding: 14px;
    min-height: 0;
    border-radius: 14px;
  }

  .dashboard-picker-list--bots .dashboard-picker-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
  }

  .dashboard-picker-list--bots .dashboard-picker-card-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.05rem;
  }

  .dashboard-picker-list--bots .dashboard-picker-card-desc {
    display: none;
  }

  .dashboard-picker-list--bots .dashboard-picker-card-foot {
    flex: 1 1 100%;
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
}

.dashboard-picker-chevron {
  flex-shrink: 0;
  opacity: 0.4;
  font-size: 0.85rem;
}

/* ── Overview tab: hero stat + secondary stats/details ────────────────────── */
@keyframes dashboardFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(33, 200, 208, 0.12), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(33, 200, 208, 0.22);
  flex-wrap: wrap;
  animation: dashboardFadeUp 0.45s ease backwards;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, rgba(88, 101, 242, 0.14), rgba(139, 92, 246, 0.1), rgba(33, 200, 208, 0.1), rgba(88, 101, 242, 0.14));
  animation: dashboardHeroSpin 16s linear infinite;
  z-index: 0;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

@keyframes dashboardHeroSpin {
  to { transform: rotate(360deg); }
}

.dashboard-hero-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--text);
  opacity: 0.75;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.dashboard-hero-back:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.09);
}

.dashboard-hero-icon {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  font-size: 32px;
  border: 2px solid rgba(139, 92, 246, 0.45);
}

.dashboard-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-hero-info {
  flex: 1;
  min-width: 220px;
}

.dashboard-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}

.dashboard-hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-pill {
  --pc: 139, 92, 246;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--pc), 0.12);
  border: 1px solid rgba(var(--pc), 0.3);
  color: rgb(var(--pc));
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dashboard-stat {
  --sc: 139, 92, 246;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(var(--sc), 0.25);
  background: rgba(var(--sc), 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: dashboardFadeUp 0.4s ease backwards;
}

.dashboard-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -12px rgba(var(--sc), 0.6);
}

.dashboard-stat-strip .dashboard-stat:nth-child(1) { animation-delay: 0.05s; }
.dashboard-stat-strip .dashboard-stat:nth-child(2) { animation-delay: 0.1s; }
.dashboard-stat-strip .dashboard-stat:nth-child(3) { animation-delay: 0.15s; }
.dashboard-stat-strip .dashboard-stat:nth-child(4) { animation-delay: 0.2s; }

.dashboard-stat-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--sc));
  background: rgba(var(--sc), 0.16);
  box-shadow: 0 0 14px -4px rgba(var(--sc), 0.5);
}

.dashboard-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
}

.dashboard-stat-label {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dashboard-detail-card {
  --pc: 139, 92, 246;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: dashboardFadeUp 0.4s ease backwards;
}

.dashboard-detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--pc), 0.4);
}

.dashboard-detail-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-detail-card-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-owner-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-owner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(250, 166, 26, 0.4);
  object-fit: cover;
}

.dashboard-owner-name {
  font-weight: 700;
}

.dashboard-owner-id {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.dashboard-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
}

.dashboard-detail-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-detail-row strong {
  font-size: 0.9rem;
}

.dashboard-channel-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.dashboard-detail-muted {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.dashboard-hero-id {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-hero-id code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.dashboard-activity-block {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  animation: dashboardFadeUp 0.4s ease backwards;
  animation-delay: 0.25s;
}

.dashboard-last-activity {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 14px 0 16px;
}

.dashboard-last-activity strong {
  color: var(--text);
}

.dashboard-time-ago {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #b794f6;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 6px;
}

.dashboard-stat-sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.dashboard-ring-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.dashboard-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dashboard-ring {
  width: 140px;
  height: 140px;
}

.dashboard-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 9;
}

.dashboard-ring-fill {
  fill: none;
  stroke: rgb(var(--sc));
  stroke-width: 9;
  stroke-linecap: round;
  transform-origin: 50px 50px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 6px rgba(var(--sc), 0.6));
  animation: dashboardRingFill 4.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--ring-delay, 0s);
}

@keyframes dashboardRingFill {
  to { stroke-dashoffset: var(--ring-offset); }
}

.dashboard-ring-pct {
  font-size: 20px;
  font-weight: 700;
  fill: var(--text);
  text-anchor: middle;
  font-family: inherit;
}

.dashboard-ring-caption {
  font-size: 9px;
  fill: var(--muted);
  text-anchor: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: inherit;
}

.dashboard-ring-label {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.dashboard-ring-sub {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-detail-grid .dashboard-detail-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-detail-grid .dashboard-detail-card:nth-child(2) { animation-delay: 0.15s; }
.dashboard-detail-grid .dashboard-detail-card:nth-child(3) { animation-delay: 0.2s; }
.dashboard-detail-grid .dashboard-detail-card:nth-child(4) { animation-delay: 0.25s; }

.dashboard-detail-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--pc));
  background: rgba(var(--pc), 0.14);
  border: 1px solid rgba(var(--pc), 0.3);
  box-shadow: 0 0 14px -4px rgba(var(--pc), 0.5);
}

.dashboard-detail-content {
  min-width: 0;
}

.dashboard-detail-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-detail-value {
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-detail-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .dashboard-hero {
    padding: 20px;
  }
}

/* ── Hero (homepage) ────────────────────────────────────────────────────── */
.hero-bleed {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bleed-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(33, 200, 208, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(139, 92, 246, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(88, 101, 242, 0.08), transparent 45%),
    linear-gradient(180deg, #0e141c 0%, var(--bg) 100%);
}

.hero-bleed-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-bleed-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 80px 0 72px;
}

.hero-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  animation: heroRise 0.7s ease both;
}

.hero-brand-mark img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(33, 200, 208, 0.3), var(--shadow-2);
}

.hero-brand-mark span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.hero-bleed .hero-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 16ch;
  margin-bottom: 16px;
  animation: heroRise 0.7s ease 0.08s both;
}

.hero-bleed .hero-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38ch;
  margin-bottom: 28px;
  animation: heroRise 0.7s ease 0.16s both;
}

.hero-bleed .btn-row {
  animation: heroRise 0.7s ease 0.24s both;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 28px;
}

.section-intro--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
}

.section-intro h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Shared modal baseline ──────────────────────────────────────────────── */
/* Pages extend these (admin/mod ship their own overrides that load after
   this file). Sizing (max-width / padding) is intentionally left to each
   page so existing modals keep their dimensions. */
.modal,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(165deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* ── Table wrapper utility ──────────────────────────────────────────────── */
/* Wrap wide tables in .table-wrap so they scroll inside their card instead
   of breaking the page layout on small screens. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: linear-gradient(180deg, transparent, rgba(20, 24, 31, 0.9));
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 80px;
}

.footer .container {
  text-align: center;
}

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.social-links a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--blurple);
  border-color: var(--blurple);
  color: #fff;
  transform: translateY(-4px);
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 14px;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 6px 4px;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-text a {
  color: var(--muted);
  text-decoration: none;
}

.footer-text a:hover {
  color: var(--text);
}

/* ── Mobile menu toggle ─────────────────────────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 10px 12px;
  margin-left: auto;
  border-radius: var(--radius-sm);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-container {
    flex-wrap: wrap;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 12px;
    background: var(--bg-2);
    border-radius: var(--radius-md);
    padding: 8px;
    border: 1px solid var(--border);
  }

  .nav-links.mobile-open {
    display: flex;
    animation: navSlide 0.2s ease-out;
  }

  @keyframes navSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-links > a,
  .nav-links > .dropdown {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  /* Comfortable 44px+ tap targets on every mobile menu row */
  .nav-links > a:not(.btn) {
    padding: 13px 16px;
  }

  .nav-links > a:not(.btn):hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .dropdown {
    width: 100%;
  }

  /* Trigger row (Bots + chevron) gets the row padding, not the outer dropdown */
  .bots-trigger {
    padding: 6px 8px 6px 4px;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .bots-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .dropdown-link {
    flex: 1;
  }

  .dropdown-toggle {
    position: static;
    margin-top: 0;
    padding: 10px 14px;
  }

  /* On mobile the outer shell is always "visible" (no absolute positioning),
     we collapse the inner wrapper instead */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-top: 0;
    margin-top: 0;
    min-width: 0;
  }

  .dropdown-menu .dropdown-menu-inner {
    display: none;
    margin-top: 6px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
  }

  .dropdown.open .dropdown-menu .dropdown-menu-inner {
    display: block;
  }

  .dropdown-menu a {
    padding: 12px 14px;
  }

  /* hover-open has no effect on touch devices */
  .dropdown.hover-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown.hover-open .dropdown-menu .dropdown-menu-inner {
    display: none;
  }

  .dropdown.open.hover-open .dropdown-menu .dropdown-menu-inner {
    display: block;
  }

  .btn-sm {
    width: 100%;
    justify-content: center;
  }

  /* Account row: full-width, left-aligned — tap to expand Logout / Admin */
  .user-dropdown {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .user-dropdown .user-avatar-btn {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  .user-dropdown .user-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .user-dropdown .user-avatar-name {
    display: block;
    flex: 1;
    text-align: left;
    max-width: none;
  }

  .user-dropdown .user-chev {
    margin-left: auto;
  }

  .user-dropdown .user-info {
    display: none;
  }

  .brand .logo {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .section {
    padding: 48px 0;
  }

  .btn-row {
    flex-direction: column;
  }

  /* Don't force every button full-width (breaks admin bot cards & toolbars).
     Marketing CTAs still stretch via .btn-row / .hero-actions. */
  .btn-row .btn,
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .container {
    padding: 0 16px;
  }

  .modal,
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    max-height: 90vh;
  }

  .footer {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 0.9rem;
  }

  .brand .logo {
    width: 32px;
    height: 32px;
  }
}

.dashboard-hidden {
  display: none !important;
}

/* ── Settings tab: form controls, host-role list ──────────────────────────── */
.dashboard-select,
.dashboard-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.dashboard-select {
  max-width: 100%;
}

.dashboard-select-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.dashboard-select:focus,
.dashboard-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.dashboard-host-role-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-host-role-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.dashboard-host-role-name {
  font-weight: 600;
  min-width: 160px;
  flex-shrink: 0;
}

.dashboard-host-role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.dashboard-pill-removable {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.15s ease;
}

.dashboard-pill-removable:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.dashboard-host-role-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Site toasts (top-right) ──────────────────────────────────────────────── */
.site-toast-host {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}

.site-toast {
  pointer-events: auto;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.site-toast--success {
  background: linear-gradient(135deg, rgba(67, 181, 129, 0.96), rgba(52, 168, 83, 0.96));
  border: 1px solid rgba(67, 181, 129, 0.5);
}

.site-toast--error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.96), rgba(220, 38, 38, 0.96));
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.site-toast--info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.96), rgba(37, 99, 235, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.site-toast--warning {
  background: linear-gradient(135deg, rgba(250, 166, 26, 0.96), rgba(217, 119, 6, 0.96));
  border: 1px solid rgba(250, 166, 26, 0.5);
}

.site-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.site-toast-inner > i {
  font-size: 1.25rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.site-toast-msg {
  flex: 1;
  line-height: 1.45;
  font-weight: 600;
}

.site-toast-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.75;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.site-toast-close:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .site-toast-host {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
