/*
 * ================================================================
 *  GUARD SHIELD — PREMIUM UI OVERRIDE v2.0
 *  Imported by header.ejs after styles.css
 * ================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────── */
:root {
  /* Backups specific gradients & values (defined globally) */
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
  --glass-bg: rgba(15, 23, 42, 0.6);

  /* Palette */
  --c-bg:        hsl(224, 30%, 5%);
  --c-surface:   rgba(15, 23, 42, 0.6); /* Glass surface matching backups */
  --c-surface2:  rgba(30, 41, 59, 0.4);
  --c-border:    rgba(255, 255, 255, 0.06); /* Thin borders matching backups */
  --c-border-h:  rgba(255, 255, 255, 0.12);

  --c-purple:    rgb(102, 126, 234); /* Indigo matching backups */
  --c-pink:      rgb(118, 75, 162); /* Purple matching backups */
  --c-cyan:      #4facfe;
  --c-blue:      #00f2fe;
  --c-green:     #11998e;
  --c-yellow:    hsl(42,  95%, 58%);
  --c-red:       #f5576c;

  --c-text:      hsl(220, 20%, 94%);
  --c-muted:     hsl(220, 15%, 58%);
  --c-faint:     hsl(220, 12%, 35%);

  /* Gradients */
  --grad-brand:     var(--gradient-1);
  --grad-cyan:      var(--gradient-3);
  --grad-green:     var(--gradient-success);
  --grad-danger:    var(--gradient-2);
  --grad-gold:      linear-gradient(135deg, var(--c-yellow), hsl(36,85%,50%));

  /* Shadows & Glows */
  --glow-purple:  0 0 20px rgba(102, 126, 234, 0.25);
  --glow-cyan:    0 0 20px rgba(0, 242, 254, 0.25);
  --glow-green:   0 0 20px rgba(56, 239, 125, 0.25);
  --glow-red:     0 0 20px rgba(245, 87, 108, 0.25);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.45);

  /* Typography */
  --font:      'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing / Sizing */
  --sidebar-w: 272px;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --t: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  /* Compat aliases (used by old pages) */
  --bg-color: var(--c-bg);
  --panel-bg: var(--c-surface);
  --panel-border: var(--c-border);
  --text-primary: var(--c-text);
  --text-muted: var(--c-muted);
  --accent-primary: var(--c-purple);
  --accent-secondary: var(--c-pink);
  --accent-emerald: var(--c-green);
  --accent-cyan: var(--c-cyan);
  --accent-danger: var(--c-red);
  --accent-warning: var(--c-yellow);
  --accent-primary-glow: rgba(102, 126, 234, 0.3);
  --accent-secondary-glow: rgba(118, 75, 162, 0.3);
  --accent-danger-glow: rgba(245, 87, 108, 0.3);
  --glass-shadow: var(--shadow-card);
  --transition-smooth: var(--t);
  --font-family: var(--font);
  --sidebar-width: var(--sidebar-w);
  --bg-card: var(--c-surface2);
  --border: var(--c-border);
  --bg-input: rgba(255,255,255,0.04);
}

/* ─────────────────────────────────────────────
   RESET + BASE
   ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 0% 0%,   rgba(102, 126, 234, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 242, 254, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%,  rgba(118, 75, 162, 0.05) 0%, transparent 70%);
  background-attachment: fixed;
}

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; color: inherit; outline: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-purple); }

/* ─────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────── */
.app-container { display: flex; width: 100%; min-height: 100vh; }

/* ─────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  background: rgba(8, 10, 18, 0.92);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-right: 1px solid var(--c-border);
  z-index: 200;
  transition: transform var(--t-slow);
  overflow: hidden;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: transparent;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.sidebar-logo i {
  font-size: 22px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px hsla(263,70%,65%,0.5));
}

/* Server card */
.server-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--c-border);
  margin-bottom: 18px;
  transition: var(--t);
  flex-shrink: 0;
}
.server-profile:hover { background: rgba(255,255,255,0.05); border-color: var(--c-border-h); }
.server-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--c-purple); box-shadow: var(--glow-purple); object-fit: cover; }
.server-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding-right: 2px; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 99px; }

.menu-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--c-faint);
  text-transform: uppercase;
  padding: 16px 10px 6px;
}
.menu-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-muted);
  border-left: 2px solid transparent;
  transition: var(--t);
  position: relative;
}
.menu-item a:hover {
  color: var(--c-text);
  background: rgba(255,255,255,0.04);
}
.menu-item a i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; transition: var(--t); }
.menu-item a:hover i { color: var(--c-purple); transform: scale(1.1); }

.menu-item.active a {
  color: #fff;
  background: linear-gradient(90deg, hsla(263,70%,65%,0.15) 0%, transparent 100%);
  border-left-color: var(--c-purple);
  font-weight: 600;
}
.menu-item.active a i { color: var(--c-purple); }

/* User bar */
.user-profile-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--c-border);
  margin-top: 8px;
}
.user-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--c-border); object-fit: cover; }
.user-info { flex: 1; min-width: 0; }
.user-tag { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: var(--t);
  font-size: 14px;
  text-decoration: none;
}
.logout-btn:hover { color: var(--c-red); background: hsla(0,80%,62%,0.12); border-color: hsla(0,80%,62%,0.3); }

/* ─────────────────────────────────────────────
   MAIN CONTENT
   ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 40px 44px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-w));
  animation: fadeInPage 0.35s ease both;
}
@keyframes fadeInPage { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.header-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 40%, var(--c-muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.header-subtitle { color: var(--c-muted); font-size: 14px; margin-bottom: 32px; }

/* ─────────────────────────────────────────────
   CARD SYSTEM
   ───────────────────────────────────────────── */
.glass-panel,
.chart-card,
.settings-section,
.stat-card,
.guild-card,
.command-card,
.config-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glass-panel:hover,
.chart-card:hover,
.settings-section:hover,
.stat-card:hover,
.guild-card:hover,
.command-card:hover,
.config-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  border-color: var(--c-border-h);
}

/* ─────────────────────────────────────────────
   STAT CARDS
   ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--t);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--c-border-h); box-shadow: var(--shadow-glow); }
.stat-card:hover::after { opacity: 1; }

.stat-info h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.stat-info p { font-size: 30px; font-weight: 800; color: var(--c-text); letter-spacing: -1px; }
.stat-info .stat-sub { font-size: 11px; color: var(--c-muted); margin-top: 4px; }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform var(--t);
}
.stat-card:hover .stat-icon { transform: scale(1.12) rotate(5deg); }
.stat-icon.primary { background: hsla(263,70%,65%,0.12); color: var(--c-purple); border: 1px solid hsla(263,70%,65%,0.2); }
.stat-icon.emerald { background: hsla(152,75%,48%,0.12); color: var(--c-green); border: 1px solid hsla(152,75%,48%,0.2); }
.stat-icon.cyan    { background: hsla(192,85%,55%,0.12); color: var(--c-cyan);  border: 1px solid hsla(192,85%,55%,0.2); }
.stat-icon.pink    { background: hsla(330,80%,62%,0.12); color: var(--c-pink);  border: 1px solid hsla(330,80%,62%,0.2); }
.stat-icon.yellow  { background: hsla(42,95%,58%,0.12);  color: var(--c-yellow);border: 1px solid hsla(42,95%,58%,0.2); }
.stat-icon.red     { background: hsla(0,80%,62%,0.12);   color: var(--c-red);   border: 1px solid hsla(0,80%,62%,0.2); }

/* ─────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: var(--t);
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.97) !important; }

.btn-primary {
  background: var(--grad-brand);
  color: white;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
  animation: pulse-glow 3s infinite;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.10); border-color: var(--c-border-h); transform: translateY(-1px); }

.btn-danger {
  background: hsla(0,80%,62%,0.12);
  color: var(--c-red);
  border: 1px solid hsla(0,80%,62%,0.25);
}
.btn-danger:hover { background: var(--c-red); color: white; transform: translateY(-2px); box-shadow: var(--glow-red); }

.btn-success {
  background: hsla(152,75%,48%,0.12);
  color: var(--c-green);
  border: 1px solid hsla(152,75%,48%,0.25);
}
.btn-success:hover { background: var(--c-green); color: #0a1a0f; transform: translateY(-2px); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }

/* ─────────────────────────────────────────────
   FORM CONTROLS
   ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-muted);
}

.form-control,
.form-group input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.form-group select,
.form-group textarea {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--c-text);
  font-size: 14px;
  transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}
.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--c-purple);
  box-shadow: 0 0 0 3px hsla(263,70%,65%,0.15);
  outline: none;
}

select.form-control, .form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}
select option { background: #0f1220; color: var(--c-text); }

/* ─────────────────────────────────────────────
   TOGGLE SWITCH (two variants)
   ───────────────────────────────────────────── */
/* Old .switch / .slider syntax */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--t);
}
.slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #94a3b8;
  border-radius: 50%;
  transition: var(--t);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
input:checked + .slider { background: var(--c-purple); border-color: hsla(263,70%,65%,0.4); box-shadow: 0 0 12px hsla(263,70%,65%,0.3); }
input:checked + .slider::before { transform: translateX(22px); background: white; }

/* New .toggle / .toggle-slider syntax */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--t);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: #94a3b8;
  border-radius: 50%;
  transition: var(--t);
}
.toggle input:checked + .toggle-slider { background: var(--c-purple); border-color: hsla(263,70%,65%,0.4); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: white; }

/* ─────────────────────────────────────────────
   SETTINGS ROWS
   ───────────────────────────────────────────── */
.settings-section { padding: 28px; margin-bottom: 24px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--c-border);
  gap: 20px;
}
.settings-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.settings-info { flex: 1; min-width: 0; }
.settings-title { font-size: 15px; font-weight: 600; color: var(--c-text); margin-bottom: 4px; }
.settings-desc { font-size: 12.5px; color: var(--c-muted); line-height: 1.5; }

/* Card header */
.card-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header i { color: var(--c-purple); }

/* ─────────────────────────────────────────────
   TABLE
   ───────────────────────────────────────────── */
.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--c-border); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--c-border); font-size: 13px; }
th { color: var(--c-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: rgba(255,255,255,0.015); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* ─────────────────────────────────────────────
   BADGES
   ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: hsla(263,70%,65%,0.15); color: var(--c-purple); border: 1px solid hsla(263,70%,65%,0.3); }
.badge-success { background: hsla(152,75%,48%,0.15); color: var(--c-green); border: 1px solid hsla(152,75%,48%,0.3); }
.badge-danger  { background: hsla(0,80%,62%,0.15);   color: var(--c-red);   border: 1px solid hsla(0,80%,62%,0.3); }
.badge-warning { background: hsla(42,95%,58%,0.15);  color: var(--c-yellow);border: 1px solid hsla(42,95%,58%,0.3); }
.badge-cyan    { background: hsla(192,85%,55%,0.15); color: var(--c-cyan);  border: 1px solid hsla(192,85%,55%,0.3); }

/* ─────────────────────────────────────────────
   TOAST NOTIFICATION
   ───────────────────────────────────────────── */
#gs-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  border: 1px solid;
  max-width: 380px;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
#gs-toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
#gs-toast.success { background: hsla(152,75%,48%,0.15); color: #4ade80; border-color: hsla(152,75%,48%,0.3); }
#gs-toast.error   { background: hsla(0,80%,62%,0.15);   color: #f87171; border-color: hsla(0,80%,62%,0.3); }
#gs-toast.info    { background: hsla(263,70%,65%,0.15); color: var(--c-purple); border-color: hsla(263,70%,65%,0.3); }
#gs-toast.warning { background: hsla(42,95%,58%,0.15);  color: var(--c-yellow); border-color: hsla(42,95%,58%,0.3); }

/* ─────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(102, 126, 234, 0.2); }
  50% { box-shadow: 0 0 25px rgba(102, 126, 234, 0.4); }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes glowPulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: var(--glow-purple); } }
@keyframes countUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.animate-fade { animation: fadeIn 0.35s ease both; }
.animate-slide { animation: slideUp 0.4s ease both; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface2) 50%, var(--c-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--c-purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }

/* ─────────────────────────────────────────────
   LOGIN PAGE
   ───────────────────────────────────────────── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Animated glow orbs */
.login-container::before,
.login-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
}
.login-container::before {
  width: 500px; height: 500px;
  background: hsla(263,70%,65%,0.08);
  top: -100px; left: -100px;
}
.login-container::after {
  width: 400px; height: 400px;
  background: hsla(192,85%,55%,0.06);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}
@keyframes orbFloat { from { transform: translate(0,0) scale(1); } to { transform: translate(40px, 30px) scale(1.08); } }

.login-card {
  width: min(460px, 92vw);
  padding: 48px 44px;
  text-align: center;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(40px);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  animation: slideUp 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
  z-index: 10;
}
.login-icon {
  font-size: 56px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px hsla(263,70%,65%,0.5));
  margin-bottom: 24px;
  display: block;
}
.login-card h2 { font-size: 28px; font-weight: 800; color: white; margin-bottom: 10px; letter-spacing: -0.5px; }
.login-card p { color: var(--c-muted); font-size: 14px; margin-bottom: 32px; line-height: 1.6; }

.discord-btn-wrapper { margin-bottom: 24px; }
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 24px;
  background: #5865F2;
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: var(--t);
  box-shadow: 0 8px 24px rgba(88,101,242,0.4);
}
.discord-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(88,101,242,0.6); background: #4752c4; }
.discord-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 24px;
  background: #5865F2;
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: var(--t);
  box-shadow: 0 8px 24px rgba(88,101,242,0.4);
}
.discord-login-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(88,101,242,0.6); }

/* Trust badges */
.login-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-muted);
  font-weight: 500;
}
.trust-item i { color: var(--c-green); font-size: 13px; }

/* ─────────────────────────────────────────────
   SERVER SELECTOR
   ───────────────────────────────────────────── */
.selector-container { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.selector-header { text-align: center; margin-bottom: 48px; }
.selector-header h1 {
  font-size: 38px; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 40%, var(--c-muted));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.selector-header p { color: var(--c-muted); font-size: 15px; }

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.guild-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.guild-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.guild-card:hover::before { opacity: 0.04; }
.guild-card:hover { transform: translateY(-6px); border-color: hsla(263,70%,65%,0.3); box-shadow: 0 20px 40px rgba(0,0,0,0.4), var(--glow-purple); }

.guild-avatar-large {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2.5px solid var(--c-border);
  margin-bottom: 16px;
  transition: var(--t);
  object-fit: cover;
}
.guild-card:hover .guild-avatar-large { border-color: var(--c-purple); box-shadow: var(--glow-purple); transform: scale(1.05); }
.guild-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.guild-card .guild-members { font-size: 12px; color: var(--c-muted); margin-bottom: 20px; }
.guild-card .btn { width: 100%; }

/* ─────────────────────────────────────────────
   VOICE USER CARDS
   ───────────────────────────────────────────── */
.voice-action-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: var(--t);
}
.voice-action-btn:hover { background: rgba(255,255,255,0.09); color: white; transform: translateY(-1px); }
.voice-action-btn.server-active { background: hsla(0,80%,62%,0.12); border-color: hsla(0,80%,62%,0.3); color: var(--c-red); }
.voice-action-btn.disconnect-btn:hover { background: hsla(0,80%,62%,0.15); border-color: hsla(0,80%,62%,0.3); color: var(--c-red); }

/* ─────────────────────────────────────────────
   CHARTS
   ───────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.chart-card { padding: 24px; display: flex; flex-direction: column; }

/* ─────────────────────────────────────────────
   TOP USERS LIST
   ───────────────────────────────────────────── */
.top-users-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.top-user-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--c-border);
  transition: var(--t);
}
.top-user-item:hover { background: rgba(255,255,255,0.04); border-color: var(--c-border-h); transform: translateX(4px); }
.top-user-avatar { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--c-border); object-fit: cover; }
.top-user-details { flex: 1; min-width: 0; }
.top-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-user-stats { font-size: 11px; color: var(--c-muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   LIVE READER + CHAT WINDOW
   ───────────────────────────────────────────── */
.live-reader-page { display: flex; flex-direction: column; gap: 20px; height: calc(100vh - 140px); }
.live-reader-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; }
.live-reader-toolbar h2 {
  font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, var(--c-red), hsl(25,90%,60%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.live-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-faint); flex-shrink: 0; transition: var(--t); }
.live-status-dot.connected { background: var(--c-green); box-shadow: 0 0 8px hsla(152,75%,48%,0.8); animation: pulse 2s infinite; }
.live-status-dot.error { background: var(--c-red); box-shadow: var(--glow-red); }
#liveStatusText { font-size: 13px; color: var(--c-muted); }
.live-channel-filter { background: rgba(0,0,0,0.2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--c-text); font-size: 13px; min-width: 180px; }
.live-controls { display: flex; gap: 8px; margin-left: auto; }
.live-btn { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--t); border: none; }
.live-btn-start { background: var(--grad-green); color: white; }
.live-btn-start:hover { transform: translateY(-1px); box-shadow: var(--glow-green); }
.live-btn-stop { background: hsla(0,80%,62%,0.15); color: var(--c-red); border: 1px solid hsla(0,80%,62%,0.3); }
.live-btn-stop:hover { background: hsla(0,80%,62%,0.25); }
.live-btn-clear { background: rgba(255,255,255,0.05); color: var(--c-muted); border: 1px solid var(--c-border); }
.live-btn-clear:hover { background: rgba(255,255,255,0.1); color: white; }
.live-feed-wrapper { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.live-feed-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--c-border); font-size: 13px; color: var(--c-muted); }
#liveMsgCount { color: var(--c-purple); font-weight: 700; }
.live-feed { flex: 1; overflow-y: auto; padding: 12px 20px; display: flex; flex-direction: column; gap: 6px; }
.live-msg { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); transition: background 0.15s; animation: fadeSlideIn 0.25s ease both; }
.live-msg:hover { background: rgba(255,255,255,0.025); }
.live-msg-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.06); }
.live-msg-body { flex: 1; min-width: 0; }
.live-msg-meta { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.live-msg-author { font-weight: 700; font-size: 13px; color: white; }
.live-msg-channel { font-size: 10px; color: var(--c-purple); background: hsla(263,70%,65%,0.1); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.live-msg-time { font-size: 10px; color: var(--c-faint); margin-left: auto; }
.live-msg-text { font-size: 13px; color: #c8cdd4; line-height: 1.5; word-break: break-word; }
.live-msg-attachment { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 4px 10px; background: rgba(255,255,255,0.04); border-radius: 6px; font-size: 11px; color: var(--c-cyan); border: 1px solid hsla(192,85%,55%,0.15); }
.live-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; color: var(--c-muted); text-align: center; }
.live-empty-state i { font-size: 48px; color: hsla(263,70%,65%,0.2); animation: pulse 3s infinite; }

/* ─────────────────────────────────────────────
   CHAT WINDOW (Tickets / Modmail)
   ───────────────────────────────────────────── */
.chat-window { display: flex; flex-direction: column; gap: 16px; background: #1e1f22; border-radius: var(--radius); padding: 20px; max-height: 480px; overflow-y: auto; border: 1px solid var(--c-border); }
.chat-message { display: flex; gap: 12px; animation: fadeIn 0.2s ease; }
.chat-msg-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.chat-msg-body { display: flex; flex-direction: column; }
.chat-msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.chat-msg-author { font-weight: 600; font-size: 14px; color: white; }
.chat-msg-time { font-size: 11px; color: #6b7280; }
.chat-msg-content { font-size: 13.5px; color: #dbdee1; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }

/* ─────────────────────────────────────────────
   DATABASE EXPLORER
   ───────────────────────────────────────────── */
.db-tabs-menu { display: flex; gap: 6px; border-bottom: 1px solid var(--c-border); padding-bottom: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.db-tab-btn { background: none; border: none; padding: 8px 16px; color: var(--c-muted); font-size: 13.5px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; gap: 7px; transition: var(--t); }
.db-tab-btn:hover { color: var(--c-text); background: rgba(255,255,255,0.03); }
.db-tab-btn.active { color: white; background: hsla(263,70%,65%,0.15); border: 1px solid hsla(263,70%,65%,0.25); }

.table-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 6px; cursor: pointer; background: rgba(255,255,255,0.015); border: 1px solid var(--c-border); transition: var(--t); }
.table-item:hover { background: rgba(255,255,255,0.04); border-color: var(--c-border-h); transform: translateX(3px); }
.table-item.active-table { background: hsla(263,70%,65%,0.12); border-color: hsla(263,70%,65%,0.3); }
.table-item-name { font-size: 13px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-item.active-table .table-item-name { color: white; font-weight: 700; }
.table-item-badge { background: rgba(255,255,255,0.06); color: var(--c-muted); font-size: 10px; padding: 2px 7px; border-radius: 99px; font-weight: 700; }
.table-item.active-table .table-item-badge { background: var(--c-purple); color: white; }

.sortable-th { cursor: pointer; user-select: none; padding-right: 24px !important; transition: var(--t); }
.sortable-th:hover { color: white; }
.sort-icon { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); opacity: 0.4; font-size: 10px; }
.sort-icon.asc { opacity: 1; color: var(--c-purple); }
.sort-icon.desc { opacity: 1; color: var(--c-purple); }

/* ─────────────────────────────────────────────
   LIVE BADGE (sidebar)
   ───────────────────────────────────────────── */
.live-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: hsla(0,80%,62%,0.15);
  color: var(--c-red);
  border: 1px solid hsla(0,80%,62%,0.3);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: auto;
  animation: pulse 2s infinite;
}

/* ─────────────────────────────────────────────
   EMBED BUILDER
   ───────────────────────────────────────────── */
.embed-preview {
  border-left: 4px solid;
  border-radius: 4px;
  background: #2b2d31;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   MUSIC PLAYER ADDITIONS
   ───────────────────────────────────────────── */
.music-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; cursor: pointer; }
.music-progress-fill { height: 100%; background: var(--grad-brand); border-radius: 99px; transition: width 0.5s linear; }

/* ─────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────── */
.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-muted { color: var(--c-muted) !important; }
.text-success { color: var(--c-green) !important; }
.text-danger  { color: var(--c-red)   !important; }
.text-warning { color: var(--c-yellow)!important; }
.text-cyan    { color: var(--c-cyan)  !important; }
.text-purple  { color: var(--c-purple)!important; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(0,0,0,0.3);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--c-cyan);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 24px 16px; max-width: 100vw; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .header-title { font-size: 22px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
}
