/* ═══════════════════════════════════════════════════════════════
   SWIVEL DASHBOARD - Cosmic Design System
   Premium dark theme with cosmic navy gradients
═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors - Matte Dark Grey Palette */
  --bg-primary: #141416;
  --bg-secondary: #19191d;
  --bg-card: rgba(28, 28, 32, 0.85);
  --bg-elevated: rgba(36, 36, 42, 0.85);
  --bg-hover: rgba(46, 46, 52, 0.8);

  /* Accent Colors - Neutral Grey */
  --accent: #9ca3af;
  --accent-light: #d1d5db;
  --accent-dark: #6b7280;
  --accent-glow: rgba(255, 255, 255, 0.06);

  /* Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  /* Text */
  --text-primary: #e8e8ec;
  --text-secondary: #8e8e96;
  --text-muted: #5c5c66;
  --text-disabled: #3a3a42;
  --text-light: #e8e8ec;

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-accent: var(--accent);

  /* Glassmorphism */
  --glass-bg: rgba(22, 22, 26, 0.7);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-blur: blur(16px);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 24px var(--accent-glow);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --max-width: 1400px;
  --header-height: 60px;
  --sidebar-width: 280px;

  /* Spacing System */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-9: 2.25rem;
  --space-10: 2.5rem;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #18181b;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

/* ─── Typography ────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.main-content {
  flex: 1;
  padding: var(--space-4) 0;
  background: transparent;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  z-index: 1;
}

/* ─── Header ────────────────────────────────────────────────── */
.modern-header {
  background: rgba(16, 16, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: 100%;
}



.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-6);
  padding: 0 var(--space-4);
}

/* Brand */
.brand-section {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand-section .brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  transition: transform var(--transition-fast);
  height: 100%;
  min-width: fit-content;
  margin-top: -2px; /* Nudge up slightly to center text */
}

.brand-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.brand-section .brand-logo:hover {
  transform: scale(1.02);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.brand-icon i {
  font-size: 1.1rem;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #e879f9 100%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.brand-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

/* Navigation */
.nav-section {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px; /* Hardcoded fallback for var(--space-6) */
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--accent);
  background: var(--info-bg);
}

.nav-link.roblox-linked {
  color: #22c55e;
}

.nav-link.roblox-linked i {
  color: #e2231a;
}

/* Roblox Verify Button */
.roblox-verify-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, #e2231a 0%, #b81c14 100%);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.roblox-verify-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(226, 35, 26, 0.4);
  color: white;
}

.roblox-verify-btn.verified {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.roblox-verify-btn.verified:hover {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* User Section */
.user-section {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  object-fit: cover;
  background: var(--bg-elevated);
}

.login-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: #5865F2;
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.login-button:hover {
  background: #4752c4;
  transform: translateY(-1px);
  color: white;
}

.logout-button-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.logout-button-header:hover {
  background: var(--danger);
  color: white;
}

/* User Dropdown */
.user-dropdown-container {
  position: relative;
}

.user-section {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.03); /* Subtle background */
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  height: 42px;
}

.user-profile-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.user-name-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-btn .dropdown-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.user-dropdown-container.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: rgba(24, 24, 28, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.03);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  overflow: hidden;
  padding: 0;
}

.user-dropdown-container.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dropdown Header (replaces banner + profile) */
.user-dropdown-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.user-dropdown-tag {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.user-dropdown-menu {
  padding: 0.35rem;
}

/* User Avatar */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

/* Dropdown Menu Items */
.dropdown-menu-section {
  padding: 0.3rem 0.4rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  border-radius: 8px;
  margin: 1px 0;
  letter-spacing: 0.01em;
}

.dropdown-item i:not(.menu-icon i) {
  width: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item:hover i {
  color: var(--text-primary);
}

/* Dev item - normal styling, not purple */
.dropdown-item-dev {
  color: rgba(255, 255, 255, 0.7);
}

.dropdown-item-dev i {
  color: rgba(255, 255, 255, 0.4) !important;
}

.dropdown-item-dev:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.dropdown-item-dev:hover i {
  color: var(--text-primary) !important;
}

/* Danger item */
.dropdown-item-danger {
  color: #f87171;
}

.dropdown-item-danger i {
  color: #f87171 !important;
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 0.2rem 0.5rem;
}

/* Dropdown Footer */
.dropdown-footer {
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.dropdown-footer span {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.dropdown-footer i {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.15);
}

/* Dev Button */
.dev-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.dev-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.card-title i {
  color: var(--accent);
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-glow);
  color: white;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: #000;
}

.btn-warning:hover {
  background: #d97706;
  color: #000;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent);
  color: white;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1rem;
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 12px;
  padding-right: var(--space-10);
}

/* Toggle Switch */
.form-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.form-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.form-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.form-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.form-switch input:checked+.slider {
  background: var(--accent);
  border-color: var(--accent);
}

.form-switch input:checked+.slider:before {
  background: white;
  transform: translateX(22px);
}

/* ─── Server Cards ──────────────────────────────────────────── */
.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.server-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.server-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.server-item img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 3px solid var(--border);
  margin-bottom: var(--space-4);
  transition: var(--transition-normal);
}

.server-item:hover img {
  border-color: var(--accent);
}

.server-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.server-id {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Bot Status Badge */
.bot-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--space-3);
}

.bot-status.online {
  background: var(--success-bg);
  color: var(--success);
}

.bot-status.offline {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ─── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.9rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
  background: var(--info-bg);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--info-bg);
  color: var(--accent);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ─── Tables ────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

/* ─── Modals ────────────────────────────────────────────────── */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
  color: var(--text-secondary);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--text-primary);
}

/* ─── Footer ────────────────────────────────────────────────── */
.modern-footer {
  background: rgba(6, 9, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-brand .brand-logo i {
  font-size: 1.5rem;
  color: var(--accent);
}

.footer-brand .brand-logo span {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.footer-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
  opacity: 0.7;
}

.footer-stats {
  display: none !important; /* Force hide stats as requested */
  gap: var(--space-6);
}

.stat-item {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.stat-item i {
  color: var(--accent);
}

/* ─── Status Bar ────────────────────────────────────────────── */
.status-bar {
  background: var(--danger);
  color: white;
  padding: var(--space-3) 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-bar.maintenance {
  background: var(--warning);
  color: #000;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── Selection ─────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: white;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .nav-section {
    display: none;
  }

  .header-content {
    gap: var(--space-4);
  }

  .server-list {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .footer-stats {
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
  }
}

/* ═══════════════════════════════════════════════════════════════
   FEATURE PANELS - Consistent Enable/Disable Styling
═══════════════════════════════════════════════════════════════ */

/* Feature Panel Container */
.feature-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  margin-bottom: var(--space-4);
}

.feature-panel:hover {
  border-color: var(--border-light);
}

/* Panel Header with Toggle */
.feature-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, rgba(156, 163, 175, 0.1) 100%);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feature-panel-header:hover {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, rgba(156, 163, 175, 0.15) 100%);
}

.feature-panel-header.collapsed {
  border-bottom: none;
}

.feature-panel-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.feature-panel-title i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 24px;
  text-align: center;
}

.feature-panel-title h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.feature-panel-title .description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: var(--space-2);
}

/* Panel Controls */
.feature-panel-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.feature-panel-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feature-panel-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.feature-panel-toggle.enabled {
  background: var(--accent);
  border-color: var(--accent);
}

.feature-panel-toggle.enabled::after {
  background: white;
  transform: translateX(24px);
}

.feature-panel-expand {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.feature-panel-expand.expanded {
  transform: rotate(180deg);
}

/* Panel Body */
.feature-panel-body {
  padding: var(--space-6);
  display: none;
}

.feature-panel-body.expanded {
  display: block;
}

/* Disabled State */
.feature-panel.disabled {
  opacity: 0.7;
}

.feature-panel.disabled .feature-panel-header {
  background: var(--bg-elevated);
}

.feature-panel.disabled .feature-panel-title i {
  color: var(--text-muted);
}

/* Enable Prompt (shown when disabled) */
.feature-enable-prompt {
  text-align: center;
  padding: var(--space-10);
  color: var(--text-muted);
}

.feature-enable-prompt i {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.feature-enable-prompt p {
  margin: 0;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM EFFECTS
═══════════════════════════════════════════════════════════════ */

.glass-card {
  background: rgba(22, 22, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.glass-header {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.2) 0%, rgba(156, 163, 175, 0.2) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Glow Effects */
.glow-accent {
  box-shadow: 0 0 40px rgba(156, 163, 175, 0.3);
}

.glow-success {
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.3);
}

.glow-danger {
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   MODERN SERVER CARDS (Dashboard Grid)
═══════════════════════════════════════════════════════════════ */

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.server-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.server-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #6b7280 50%, #06b6d4 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.server-card-modern:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(156, 163, 175, 0.2);
}

.server-card-modern:hover::before {
  opacity: 1;
}

.server-card-modern.pinned::before {
  opacity: 1;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.server-icon-modern {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  border: 2px solid var(--border);
  overflow: hidden;
}

.server-icon-modern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-info-modern {
  flex: 1;
  min-width: 0;
}

.server-name-modern {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.owner-badge-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: linear-gradient(135deg, #a855f7 0%, #4b5563 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.server-stats {
  display: flex;
  gap: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.server-stat {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.server-stat i {
  color: var(--text-muted);
}

.server-stat.online i {
  color: var(--success);
}

/* Server Status Indicator */
.server-status-indicator {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.server-status-indicator.inactive {
  background: var(--text-muted);
  box-shadow: none;
}

.server-status-indicator.maintenance {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning);
}

.server-status-indicator.blacklisted {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD PAGE HEADER
═══════════════════════════════════════════════════════════════ */

.dashboard-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border);
  padding: var(--space-10) 0;
  margin-bottom: var(--space-8);
}

.dashboard-header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.dashboard-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-6);
}

.dashboard-stat {
  display: flex;
  flex-direction: column;
}

.dashboard-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.dashboard-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATES
═══════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-hover) 50%, var(--bg-elevated) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Skeleton text line */
.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text.lg {
  height: 1.5rem;
}

.skeleton-text.sm {
  height: 0.75rem;
}

.skeleton-text.title {
  height: 2rem;
  width: 60%;
  margin-bottom: 1rem;
}

/* Skeleton circle (for avatars) */
.skeleton-circle {
  border-radius: 50%;
}

.skeleton-circle.sm {
  width: 32px;
  height: 32px;
}

.skeleton-circle.md {
  width: 48px;
  height: 48px;
}

.skeleton-circle.lg {
  width: 64px;
  height: 64px;
}

/* Skeleton card */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.skeleton-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.skeleton-card-title {
  height: 1.25rem;
  width: 70%;
  margin-bottom: 0.75rem;
}

.skeleton-card-desc {
  height: 0.875rem;
  width: 90%;
  margin-bottom: 0.5rem;
}

.skeleton-card-desc.short {
  width: 60%;
}

/* Skeleton button */
.skeleton-button {
  height: 40px;
  width: 120px;
  margin-top: 1rem;
}

/* Skeleton toggle */
.skeleton-toggle {
  width: 52px;
  height: 28px;
  border-radius: 14px;
}

/* Skeleton grid for module cards */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Page skeleton wrapper */
.page-skeleton {
  padding: 2rem;
}

.page-skeleton .skeleton-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-skeleton .skeleton-header .skeleton-circle {
  flex-shrink: 0;
}

.page-skeleton .skeleton-header-content {
  flex: 1;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-overlay .spinner-container {
  text-align: center;
  color: var(--text-primary);
}

.loading-overlay .spinner-large {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

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

/* Fade in animation for when loading completes */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ─── Sidebar Toggle Button ─────────────────────────────── */
.nav-links {
  display: flex !important;
  gap: 32px !important;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-links li {
  display: block;
  margin-right: 24px !important;
}

.nav-links li:last-child {
  margin-right: 0 !important;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 2px; /* Slight nudge down from the top */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
  z-index: 100;
  margin-right: var(--space-2);
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* Show toggle on guild pages — JS adds guild context */
body .sidebar-toggle {
  display: flex;
  margin-left: 0; /* Remove potential legacy margin */
}

/* ─── Sidebar Backdrop ──────────────────────────────────── */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ─── Dashboard Sidebar Drawer ──────────────────────────── */
.dash-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 270px;
  height: 100vh;
  background: #0d1117;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.25rem 0;
}

.dash-sidebar.open {
  transform: translateX(0);
}

.dash-sidebar::-webkit-scrollbar {
  width: 4px;
}

.dash-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Sidebar Server Info */
.sidebar-server {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem 0.75rem;
}

.sidebar-server-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-server-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5865F2, #4752c4);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-server-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Sections */
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.5rem 1.25rem;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.75rem;
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  padding: 0.5rem 0.75rem 0.3rem;
}

/* Sidebar Links */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  color: #9ca3af;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s;
  text-decoration: none;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f5;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #6b7280;
  transition: color 0.15s;
}

.sidebar-link:hover i {
  color: #a5b4fc;
}

/* Disabled module links */
.sidebar-link.disabled {
  opacity: 0.45;
  cursor: default;
}

.sidebar-link.disabled:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #9ca3af;
}

.sidebar-link.disabled i {
  color: #4b5563;
}

/* Module status dot */
.sidebar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: auto;
  background: #4b5563;
  flex-shrink: 0;
}

.sidebar-status-dot.enabled {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* ─── Module Enable Prompt ──────────────────────────────── */
.module-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.module-prompt-overlay.open {
  opacity: 1;
  visibility: visible;
}

.module-prompt {
  background: rgba(22, 22, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.module-prompt-overlay.open .module-prompt {
  transform: scale(1);
}

.module-prompt-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 1rem;
}

.module-prompt h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0f0f5;
  margin: 0 0 0.5rem;
}

.module-prompt p {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.module-prompt-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-prompt-cancel {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-prompt-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f5;
}

.btn-prompt-enable {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-prompt-enable:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-prompt-enable:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}