/* ============================================
   GUARDBOT DASHBOARD — Global Tokens
   ============================================ */
:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1e;
  --bg-card: rgba(15, 15, 30, 0.85);
  --bg-card-hover: rgba(20, 20, 40, 0.95);
  --primary: #00d4ff;
  --primary-dim: rgba(0, 212, 255, 0.15);
  --accent: #a855f7;
  --success: #2ed573;
  --warning: #ffa502;
  --danger: #ff4757;
  --text-primary: #e8e8f0;
  --text-secondary: #8b8ba3;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 212, 255, 0.2);
  --font-primary: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: #000; }

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: left 0.1s ease-out, top 0.1s ease-out;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: gradientSlide 3s ease infinite;
}

@keyframes gradientSlide {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

.sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.sidebar-logo span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.sidebar-back:hover { color: var(--primary); }

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 90;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo img { width: 28px; height: 28px; border-radius: 50%; }

.mobile-logo span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.dashboard-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 48px 48px 80px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.dash-section {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.dash-section.active { display: block; }

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

.dash-header {
  margin-bottom: 40px;
}

.dash-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.dash-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.08), 0 0 0 1px rgba(0, 212, 255, 0.1);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================================
   MODULE GRID (Overview)
   ============================================ */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 212, 255, 0.04);
  background: var(--bg-card-hover);
}

.module-card:hover::before { opacity: 1; }

.module-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.module-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.module-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-critical { background: rgba(255, 71, 87, 0.15); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.2); }
.badge-important { background: rgba(0, 212, 255, 0.1); color: var(--primary); border: 1px solid rgba(0, 212, 255, 0.15); }
.badge-fun { background: rgba(168, 85, 247, 0.1); color: var(--accent); border: 1px solid rgba(168, 85, 247, 0.15); }
.badge-growth { background: rgba(46, 213, 115, 0.1); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.15); }

/* ============================================
   FEATURE DETAIL GRID
   ============================================ */
.feature-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.feature-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.feature-detail-card:hover {
  border-color: var(--border-hover);
}

.feature-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.feature-detail-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.feature-detail-card > h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-detail-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-on {
  background: rgba(46, 213, 115, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 213, 115, 0.2);
}

.status-off {
  background: rgba(139, 139, 163, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(139, 139, 163, 0.2);
}

/* ============================================
   CONFIG DISPLAY
   ============================================ */
.feature-config {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.config-row:last-child { border-bottom: none; }

.config-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.config-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.config-value.enabled {
  color: var(--success);
}

/* ============================================
   COMMANDS LIST
   ============================================ */
.commands-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.commands-list h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.command-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.command-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.command-item code {
  background: rgba(0, 212, 255, 0.08);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  white-space: nowrap;
  min-width: 240px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

.command-item span {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.command-item.highlight {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.1);
}

.command-item.highlight code {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent);
  border-color: rgba(168, 85, 247, 0.15);
}

/* ============================================
   ESCALATION CARD
   ============================================ */
.escalation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 20px;
}

.escalation-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.escalation-card > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.escalation-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.escalation-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  color: #000;
  flex-shrink: 0;
}

.escalation-step strong {
  display: block;
  font-size: 0.9rem;
}

.escalation-step span {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.escalation-arrow {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .feature-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-header { display: flex; }
  .dashboard-main {
    margin-left: 0;
    padding: 72px 20px 60px;
  }
  .dash-header h1 { font-size: 1.8rem; }
  .module-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 20px 16px; }
  .stat-number { font-size: 1.8rem; }
  .command-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .command-item code { min-width: auto; }
  .escalation-steps { flex-direction: column; align-items: stretch; }
  .escalation-arrow { text-align: center; transform: rotate(90deg); }
  .cursor-glow { display: none; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-main { padding: 72px 14px 40px; }
}

/* ============================================
   HIDDEN UTILITY
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   SIDEBAR AUTH
   ============================================ */
.sidebar-auth {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.login-btn:hover {
  background: #4752C4;
  transform: translateY(-1px);
}

.login-btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  width: auto;
  display: inline-flex;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.user-logout {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.user-logout:hover { color: var(--danger); }

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

/* ============================================
   LOGIN PROMPT
   ============================================ */
.login-prompt {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.login-prompt-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.login-prompt h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.login-prompt p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ============================================
   SERVER PICKER
   ============================================ */
.server-picker h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

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

.server-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.server-card.server-no-bot {
  opacity: 0.6;
}

.server-card.server-no-bot:hover {
  border-color: var(--warning);
  opacity: 0.8;
}

.server-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.server-card-icon span {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.server-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.server-card-status {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.no-servers {
  color: var(--text-secondary);
  text-align: center;
  padding: 40px;
}

/* ============================================
   CONFIG PANEL
   ============================================ */
.config-panel-header {
  margin-bottom: 32px;
}

.back-to-servers {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
  display: inline-block;
}

.back-to-servers:hover { color: var(--primary); }

.config-server-name {
  display: flex;
  align-items: center;
  gap: 16px;
}

.config-server-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.config-server-name h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.config-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}

.config-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.config-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.config-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ============================================
   SELECT DROPDOWNS
   ============================================ */
.config-select {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8ba3' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.config-select:hover { border-color: var(--border-hover); }
.config-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}

.config-select option {
  background: #1a1a2e;
  color: var(--text-primary);
}

/* ============================================
   TOGGLE SWITCHES
   ============================================ */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.config-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 0;
}

.config-toggle input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.config-toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.config-toggle input:checked + .toggle-slider::after {
  left: 23px;
  background: #fff;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  user-select: none;
}

/* ============================================
   CONFIG NOTICE
   ============================================ */
.config-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
}

.config-notice span {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.config-notice p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.config-notice code {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* ============================================
   LOADING
   ============================================ */
.loading-placeholder {
  height: 80px;
  pointer-events: none;
}

.loading-shimmer {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* ============================================
   RESPONSIVE ADDITIONS
   ============================================ */
@media (max-width: 768px) {
  .toggle-grid { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .config-select { max-width: 100%; }
  .login-prompt { padding: 40px 24px; }
}

/* ============================================
   SECRET ADMIN KEY
   ============================================ */
.admin-secret-key {
  display: block;
  margin-top: 10px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  user-select: none;
}
.admin-secret-key:hover {
  color: rgba(0, 212, 255, 0.4);
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */
.admin-bot-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.admin-bot-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.admin-bot-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-bot-id {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.admin-bot-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--success);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s ease infinite;
}

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

.admin-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
}

.admin-guild-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-guild-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  margin-left: auto;
  white-space: nowrap;
}

/* Guild badges in server picker */
.guild-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.guild-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.badge-owner  { background: rgba(255, 215, 0, 0.15); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.badge-admin  { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.badge-manage { background: rgba(0, 212, 255, 0.1);  color: #67e8f9; border: 1px solid rgba(0,212,255,0.25); }
.badge-active { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-add    { background: rgba(99, 102, 241, 0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }

/* ==========================================
   CONFIG TABS
   ========================================== */
.config-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.config-tab {
  padding: 8px 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.config-tab:hover { background: rgba(0,212,255,0.08); color: rgba(255,255,255,0.8); }
.config-tab.active { background: linear-gradient(135deg,rgba(0,212,255,0.18),rgba(168,85,247,0.12)); border-color: rgba(0,212,255,0.4); color: #00d4ff; }
.config-tab-content { display: none; }
.config-tab-content.active { display: block; }

/* CONFIG INPUTS */
.config-label { display: block; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.config-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  font-family: inherit;
}
.config-input:focus { outline: none; border-color: rgba(0,212,255,0.5); background: rgba(0,212,255,0.05); }
.config-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.88rem;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s;
}
.config-textarea:focus { outline: none; border-color: rgba(0,212,255,0.5); }
.config-row { display: flex; gap: 12px; flex-wrap: wrap; }
.config-field { flex: 1; min-width: 160px; }

/* Config Save Bar */
.config-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 0;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(to top, #0a0a1a 60%, transparent);
  z-index: 10;
}
.save-status { font-size: 0.88rem; font-weight: 600; }
.btn-save-config {
  padding: 12px 28px;
  background: linear-gradient(135deg, #00d4ff, #a855f7);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-save-config:hover { opacity: 0.88; transform: translateY(-1px); }

/* Accent Picker */
.config-accent-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.accent-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.accent-btn:hover { transform: scale(1.15); }
.accent-btn.active { border-color: #fff; box-shadow: 0 0 10px currentColor; transform: scale(1.15); }

/* ==========================================
   ADMIN QUICK ACTIONS
   ========================================== */
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.admin-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.admin-action-btn:hover { transform: translateY(-3px); background: rgba(255,255,255,0.08); }
.action-icon { font-size: 1.5rem; }
.btn-invite { border-color: rgba(88,101,242,0.5); }
.btn-invite:hover { background: rgba(88,101,242,0.12); }
.btn-devportal { border-color: rgba(0,212,255,0.3); }
.btn-devportal:hover { background: rgba(0,212,255,0.08); }
.btn-refresh { border-color: rgba(34,197,94,0.3); }
.btn-refresh:hover { background: rgba(34,197,94,0.08); }
.btn-vercel { border-color: rgba(255,255,255,0.2); }
.btn-logs { border-color: rgba(251,191,36,0.3); }
.btn-logs:hover { background: rgba(251,191,36,0.08); }
.btn-support { border-color: rgba(168,85,247,0.3); }
.btn-support:hover { background: rgba(168,85,247,0.08); }

/* ==========================================
   MODERATION TOOL
   ========================================== */
.admin-mod-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-btn {
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.mod-ban { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.mod-ban:hover { background: rgba(239,68,68,0.35); }
.mod-kick { background: rgba(251,146,60,0.2); color: #fb923c; border: 1px solid rgba(251,146,60,0.4); }
.mod-kick:hover { background: rgba(251,146,60,0.35); }
.mod-unban { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.mod-unban:hover { background: rgba(34,197,94,0.28); }
.mod-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.mod-result.success { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.mod-result.error   { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.mod-result.warn    { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.mod-result.hidden  { display: none; }

.dashboard-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1200;
  pointer-events: none;
}

.dashboard-toast {
  min-width: 260px;
  max-width: min(420px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 10, 26, 0.96);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  color: var(--text-primary);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.dashboard-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.dashboard-toast-success { border-color: rgba(34,197,94,0.3); }
.dashboard-toast-error { border-color: rgba(239,68,68,0.3); }
.dashboard-toast-warn { border-color: rgba(251,191,36,0.3); }
.dashboard-toast-info { border-color: rgba(0,212,255,0.24); }

.dashboard-toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
}

.dashboard-toast-success .dashboard-toast-icon {
  background: rgba(34,197,94,0.14);
  color: #4ade80;
}

.dashboard-toast-error .dashboard-toast-icon {
  background: rgba(239,68,68,0.14);
  color: #f87171;
}

.dashboard-toast-warn .dashboard-toast-icon {
  background: rgba(251,191,36,0.14);
  color: #fbbf24;
}

.dashboard-toast-info .dashboard-toast-icon {
  background: rgba(0,212,255,0.12);
  color: var(--primary);
}

.dashboard-toast-copy {
  flex: 1;
  min-width: 0;
}

.dashboard-toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.dashboard-toast-text {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.dashboard-toast-close {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px;
}

.dashboard-confirm {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 18, 0.68);
  backdrop-filter: blur(12px);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dashboard-confirm.show {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-confirm-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(10,14,27,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.45);
}

.dashboard-confirm-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.dashboard-confirm-text {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.92rem;
}

.dashboard-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.dashboard-confirm-btn {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-confirm-btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}

.dashboard-confirm-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
}

.dashboard-confirm-btn-primary {
  background: linear-gradient(135deg, rgba(0,212,255,0.95), rgba(0,91,181,0.95));
  color: #fff;
  border-color: rgba(0,212,255,0.28);
}

.dashboard-confirm-btn-primary:hover {
  filter: brightness(1.08);
}

.dashboard-confirm-btn-danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.95), rgba(185,28,28,0.95));
  color: #fff;
  border-color: rgba(239,68,68,0.3);
}

.dashboard-confirm-btn-danger:hover {
  filter: brightness(1.08);
}

.profile-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 30px;
  margin-top: 20px;
  align-items: start;
}

.profile-editor-card,
.profile-preview-panel {
  cursor: default;
  transform: none !important;
}

.profile-editor-card:hover,
.profile-preview-panel:hover {
  transform: none !important;
}

.profile-editor-section {
  display: grid;
  gap: 18px;
}

.profile-section-heading {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.profile-section-copy {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.profile-panel-split {
  display: grid;
  gap: 16px;
}

.profile-field-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.profile-text-count {
  font-size: 0.76rem;
  color: #93c5fd;
}

.profile-helper-text {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.77rem;
  line-height: 1.5;
}

.profile-editor-card .config-select {
  max-width: 100%;
}

.profile-color-input {
  width: 100%;
  max-width: 100%;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  padding: 6px;
  cursor: pointer;
}

.profile-visibility-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(99,102,241,0.08));
  border: 1px solid rgba(255,255,255,0.1);
}

.profile-visibility-toggle {
  align-items: flex-start;
  padding: 0;
}

.profile-visibility-state {
  display: grid;
  gap: 4px;
}

.profile-visibility-title {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-visibility-hint {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-action-btn {
  flex: 1;
  min-width: 190px;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.profile-action-btn-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #00d4ff, #005bb5);
}

.profile-action-btn-primary:hover {
  filter: brightness(1.08);
}

.profile-action-btn-secondary {
  border: 1px solid rgba(255,255,255,0.12);
  color: #d4d4d8;
  background: rgba(255,255,255,0.06);
}

.profile-action-btn-secondary:hover {
  border-color: rgba(125,211,252,0.35);
  background: rgba(125,211,252,0.08);
}

.profile-result-link {
  color: #7dd3fc;
  text-decoration: none;
}

.profile-result-link:hover {
  text-decoration: underline;
}

.profile-preview-card {
  background: rgba(20,20,35,0.4);
  backdrop-filter: blur(25px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.profile-preview-banner {
  position: relative;
  height: 110px;
  background: linear-gradient(135deg, #00d4ff, #005bb5);
}

.profile-visibility-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
}

.profile-visibility-badge.public {
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.28);
  color: #bbf7d0;
}

.profile-visibility-badge.private {
  background: rgba(251,191,36,0.16);
  border-color: rgba(251,191,36,0.26);
  color: #fde68a;
}

.profile-preview-body {
  position: relative;
  padding: 22px;
}

.profile-preview-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  position: absolute;
  top: -38px;
  left: 22px;
  object-fit: cover;
}

.profile-preview-head {
  display: grid;
  gap: 8px;
  padding-top: 46px;
}

.profile-preview-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
}

.profile-preview-headline {
  color: #d4d4d8;
  font-size: 0.94rem;
  font-weight: 600;
}

.profile-preview-bio {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  min-height: 48px;
  white-space: pre-wrap;
}

.profile-preview-meta,
.profile-preview-traits,
.profile-preview-interests,
.profile-preview-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.profile-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f4f4f5;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.profile-preview-pill.subtle {
  color: #cbd5e1;
  background: rgba(15,23,42,0.36);
}

.profile-preview-pill.empty {
  color: #94a3b8;
  background: rgba(148,163,184,0.08);
  border-style: dashed;
}

.profile-preview-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 0.81rem;
  line-height: 1.5;
}

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

@media (max-width: 768px) {
  .config-tabs { gap: 4px; }
  .config-tab { padding: 7px 12px; font-size: 0.78rem; }
  .config-row { flex-direction: column; }
  .admin-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-actions {
    flex-direction: column;
  }
  .profile-action-btn {
    width: 100%;
    min-width: 0;
  }
  .profile-preview-footer {
    flex-direction: column;
  }
  .dashboard-toast-stack {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
  .dashboard-confirm-actions {
    flex-direction: column-reverse;
  }
  .dashboard-confirm-btn {
    width: 100%;
  }
}
