/* ============================================================
   Chizi Dashboard — style.css  v3
   Monochrome brutalist · GSG design language · Sharp edges
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds — monochrome dark (matches gsgaz.fun) */
  --bg-base:       #131313;
  --bg-surface:    #1b1b1b;
  --bg-card:       #1f1f1f;
  --bg-card-hover: #2a2a2a;
  --bg-input:      #0e0e0e;

  /* Borders */
  --border:        rgba(71,71,71,0.2);
  --border-hover:  rgba(255,255,255,0.15);

  /* Accent — white / monochrome (matches gsgaz.fun) */
  --accent:        #ffffff;
  --accent-h:      #d4d4d4;
  --accent-glow:   rgba(255,255,255,0.15);
  --accent-soft:   rgba(255,255,255,0.08);

  /* Semantic colors */
  --purple:        #a855f7;
  --purple-soft:   rgba(168,85,247,0.15);
  --green:         #10b981;
  --green-soft:    rgba(16,185,129,0.15);
  --red:           #ef4444;
  --red-soft:      rgba(239,68,68,0.15);
  --blue:          #3b82f6;
  --blue-soft:     rgba(59,130,246,0.15);
  --orange:        #f59e0b;
  --orange-soft:   rgba(245,158,11,0.15);

  /* Text */
  --text-primary:  #e2e2e2;
  --text-secondary:#c6c6c6;
  --text-muted:    #919191;

  /* Layout */
  --sidebar-w:     220px;
  --topbar-h:      64px;
  --radius:        0px;
  --radius-sm:     0px;
  --radius-xs:     0px;
  --shadow:        0 8px 32px rgba(0,0,0,0.55);
  --shadow-card:   0 2px 16px rgba(0,0,0,0.35);
  --transition:    0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ──────────────────────────────────────────────────────────
   SIDEBAR
────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  font-style: italic;
}
.sidebar-logo-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--green);
  font-family: 'Space Grotesk', sans-serif;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2.5s infinite; }
.status-dot.offline { background: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  user-select: none;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; transition: color var(--transition); }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.nav-item.active {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-weight: 600;
}
.nav-item.active svg { color: var(--accent); }
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.nav-item-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  width: 100%;
}
.nav-item-logout svg { width: 16px; height: 16px; }
.nav-item-logout:hover { background: var(--red-soft); color: var(--red); }

.api-status { display: none; }

/* ──────────────────────────────────────────────────────────
   MAIN
────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: var(--transition); }

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.3px;
}

.topbar-search {
  flex: 1;
  max-width: 360px;
  position: relative;
  margin: 0 auto;
}
.topbar-search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}
.topbar-search input:focus { border-color: var(--accent); background: rgba(124,58,237,0.06); }
.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-icon-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.topbar-icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.topbar-icon-btn.spinning svg { animation: spin 0.6s linear infinite; }
.topbar-icon-btn svg { width: 17px; height: 17px; }

.refresh-btn { border: none; }
.refresh-btn.spinning svg { animation: spin 0.6s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.api-config-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.api-config-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.api-config-btn svg { width: 17px; height: 17px; }

/* ── PAGE CONTAINER ── */
.page-container { flex: 1; padding: 28px; overflow-y: auto; }

.page { display: none; animation: fadeSlide 0.28s ease; }
.page.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb-current { color: var(--accent-h); }

.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.1;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
}
.page-header p { color: var(--text-secondary); margin-top: 6px; font-size: 14px; line-height: 1.5; }
.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-card); }

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.purple { background: var(--accent-soft); color: var(--accent-h); }
.stat-icon.red    { background: var(--red-soft);    color: var(--red); }
.stat-icon.green  { background: var(--green-soft);  color: var(--green); }
.stat-icon.blue   { background: var(--blue-soft);   color: var(--blue); }
.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }

.stat-trend {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.stat-trend.up   { background: var(--green-soft);  color: var(--green); }
.stat-trend.down { background: var(--red-soft);    color: var(--red); }
.stat-trend.neutral { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 30px; font-weight: 900; color: var(--text-primary); letter-spacing: -1.5px; line-height: 1; }

/* Mini stats (users, infractions pages) */
.mini-stats { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.mini-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  flex: 1;
  min-width: 140px;
}
.mini-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 6px; }
.mini-stat-value { font-size: 26px; font-weight: 900; color: var(--text-primary); letter-spacing: -1px; line-height: 1; }
.mini-stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.mini-stat-sub .up   { color: var(--green); }
.mini-stat-sub .alert { color: var(--orange); }

/* ── CARDS ROW ── */
.cards-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.card-header h2 { font-size: 15px; font-weight: 700; color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: -0.3px; }

.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Settings row (label + description + control) */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info { flex: 1; }
.settings-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.settings-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.settings-row-control { flex-shrink: 0; min-width: 180px; }

/* ── INFRACTION BREAKDOWN ── */
.infraction-breakdown { display: flex; flex-direction: column; gap: 14px; }
.breakdown-item { display: flex; flex-direction: column; gap: 6px; }
.breakdown-item-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.breakdown-left { display: flex; align-items: center; gap: 8px; }
.breakdown-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-warn   { background: var(--orange-soft); color: var(--orange); }
.badge-kick   { background: var(--blue-soft);   color: var(--blue); }
.badge-mute   { background: var(--purple-soft); color: var(--purple); }
.badge-ban    { background: var(--red-soft);    color: var(--red); }

.breakdown-bar-wrap { width: 100%; height: 5px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.breakdown-bar { height: 5px; border-radius: 5px; transition: width 0.9s ease; }
.bar-warn  { background: var(--orange); }
.bar-kick  { background: var(--blue); }
.bar-mute  { background: var(--purple); }
.bar-ban   { background: var(--red); }

.breakdown-count { font-weight: 700; color: var(--text-primary); font-size: 14px; min-width: 28px; text-align: right; }

/* ── BOT INFO ── */
.bot-info { display: flex; flex-direction: column; gap: 0; }
.info-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 12px; }
.info-value { color: var(--text-primary); font-weight: 700; font-size: 13px; }

/* ── ANTINUKE CARD ── */
.antinuke-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.antinuke-desc { flex: 1; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.toggle-wrap { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.toggle { position: relative; display: inline-block; width: 52px; height: 28px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--green); border-color: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(24px); background: #fff; }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.025); }

/* User avatar initials */
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  background: var(--accent);
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell-name { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.user-cell-id { font-size: 11px; color: var(--text-muted); }

/* XP progress bar */
.xp-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
}
.xp-bar-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.xp-bar-track { height: 5px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.xp-bar-fill  { height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-h)); }

/* Level badge */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-h);
  white-space: nowrap;
}

.loading-cell { text-align: center; padding: 44px !important; color: var(--text-muted); }

/* ── BADGE ── */
.badge-warning { background: var(--orange-soft); color: var(--orange); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-count { background: var(--accent-soft); color: var(--accent-h); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-left: 6px; }

/* ── TYPE BADGES ── */
.type-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.type-warn  { background: var(--orange-soft); color: var(--orange); }
.type-kick  { background: var(--blue-soft);   color: var(--blue); }
.type-mute  { background: var(--purple-soft); color: var(--purple); }
.type-ban   { background: var(--red-soft);    color: var(--red); }
.type-flood { background: var(--accent-soft); color: var(--accent-h); }
.type-filter { background: rgba(239,68,68,0.15); color: #f87171; }
.type-info { background: var(--blue-soft); color: var(--blue); }

/* Status dot in table */
.active-dot  { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-active  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-inactive { background: var(--text-muted); }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition);
}
.page-btn:hover  { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── LEADERBOARD ── */
.leaderboard-list { display: flex; flex-direction: column; gap: 10px; }
.lb-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.lb-item:hover { border-color: var(--border-hover); transform: translateX(4px); }
.lb-rank {
  font-size: 16px;
  font-weight: 800;
  min-width: 32px;
  text-align: center;
}
.lb-rank.gold   { color: #f59e0b; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #b45309; }
.lb-rank.other  { color: var(--text-muted); }
.lb-avatar {
  width: 38px; height: 38px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  flex-shrink: 0;
}
.lb-info { flex: 1; }
.lb-id   { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.lb-level-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.lb-xp { font-size: 12px; color: var(--text-muted); }

/* ── CONFIG TABS ── */
.config-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.config-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: -0.3px;
}
.config-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.config-tab.active {
  background: var(--accent);
  color: #131313;
  box-shadow: 4px 4px 0px 0px rgba(255,255,255,0.1);
}
.tab-group-label { display: none; }

.config-panel { display: none; }
.config-panel.active { display: block; animation: fadeSlide 0.22s ease; }

/* Toggle checkbox items */
.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.toggle-item:hover { background: rgba(255,255,255,0.06); }
.toggle-item input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.toggle-item span { flex: 1; }

/* Chip (for role tags) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-h);
}
.chip-remove {
  background: none;
  border: none;
  color: var(--accent-h);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.chip-remove:hover { opacity: 1; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-input::placeholder { color: var(--text-muted); }
select.form-input { cursor: pointer; }
select.form-input option { background: var(--bg-card); color: var(--text-primary); }
textarea.form-input { resize: vertical; line-height: 1.5; }

.input-row { display: flex; gap: 10px; align-items: center; }
.input-row .form-input { flex: 1; }

.btn-row { display: flex; gap: 10px; margin-top: 12px; }

.code-editor {
  width: 100%;
  background: #0d0f16;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #a5d6a7;
  padding: 14px;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  height: 360px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.6;
}
.code-editor:focus { border-color: var(--accent); }

/* ── BYPASS LIST ── */
.bypass-list { display: flex; flex-direction: column; gap: 8px; }
.bypass-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.bypass-item button {
  background: var(--red-soft);
  border: none;
  color: var(--red);
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.bypass-item button:hover { background: var(--red); color: #fff; }

/* ── CHANNELS & ROLES ── */
.channel-item, .role-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.channel-item label, .role-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.role-item { grid-template-columns: 80px 1fr 36px; }
.remove-role-btn {
  width: 36px; height: 36px;
  background: var(--red-soft);
  border: none;
  color: var(--red);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.remove-role-btn:hover { background: var(--red); color: #fff; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.btn-primary  { background: var(--accent); color: #131313; font-weight: 700; }
.btn-primary:hover  { box-shadow: 4px 4px 0px 0px rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover   { background: #f87171; box-shadow: 4px 4px 0px 0px rgba(239,68,68,0.2); transform: translateY(-2px); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── SEARCH / FILTER ── */
.search-input, .filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus, .filter-select:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.filter-select option { background: var(--bg-surface); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--red-soft); color: var(--red); }
.modal-body { padding: 20px; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  min-width: 220px;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
.toast.info    { border-color: var(--blue);   color: var(--blue); }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(40px); opacity: 0; } }

/* ── SKELETON ── */
.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-line {
  height: 32px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
}

/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

/* ── USER DETAIL MODAL ── */
.user-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.user-detail-item { background: var(--bg-surface); padding: 12px; border-radius: var(--radius-sm); }
.user-detail-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.user-detail-value { font-size: 18px; font-weight: 800; color: var(--text-primary); }

.user-infractions-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; }
.mini-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.mini-table th { color: var(--text-muted); font-size: 10px; text-transform: uppercase; padding: 6px 10px; text-align: left; }
.mini-table td { padding: 7px 10px; border-top: 1px solid var(--border); color: var(--text-secondary); }

.xp-edit-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }

/* ── LOGIN OVERLAY ── */
.login-overlay {
  position: fixed; inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 34px;
  width: 100%;
  max-width: 390px;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}
.login-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  font-style: italic;
}
.login-logo span { color: var(--text-muted); }
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 26px; font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.login-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 18px; color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; }
.login-error {
  color: var(--red);
  font-size: 13px;
  padding: 9px 13px;
  background: var(--red-soft);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* ── TOPBAR USER ── */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.topbar-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.topbar-user-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  line-height: 1;
}
.topbar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* ── FEATURE TOGGLES (overview) ── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.feature-item-info { flex: 1; }
.feature-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.feature-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .cards-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-container { padding: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .mini-stats { flex-direction: column; }
}

@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
  .user-detail-grid { grid-template-columns: 1fr; }
  .channel-item { grid-template-columns: 1fr; }
  .role-item { grid-template-columns: 80px 1fr 36px; }
  .xp-edit-row { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .page-header h1 { font-size: 26px; }
}

/* ── FILTER TAGS ── */
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--orange-soft);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.3px;
}
.filter-tag button {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.filter-tag button:hover { opacity: 1; }

.filter-tag.link-tag {
  background: var(--red-soft);
  border-color: rgba(239,68,68,0.25);
  color: var(--red);
}
.filter-tag.link-tag button { color: var(--red); }

.filter-tag.cat-nsfw { background: var(--red-soft); border-color: rgba(239,68,68,0.25); color: var(--red); }
.filter-tag.cat-nsfw button { color: var(--red); }
.filter-tag.cat-social { background: var(--blue-soft); border-color: rgba(59,130,246,0.25); color: var(--blue); }
.filter-tag.cat-social button { color: var(--blue); }
.filter-tag.cat-discord { background: var(--purple-soft); border-color: rgba(168,85,247,0.25); color: var(--purple); }
.filter-tag.cat-discord button { color: var(--purple); }
.filter-tag.cat-other { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: var(--text-secondary); }
.filter-tag.cat-other button { color: var(--text-muted); }

.cat-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.25);
  opacity: 0.85;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
}

 / *    % %  C O N F I G   T A B S    % %  * / 
 . c o n f i g - t a b   { 
     b a c k g r o u n d :   t r a n s p a r e n t ; 
     c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
     b o r d e r :   n o n e ; 
     p a d d i n g :   8 p x   1 6 p x ; 
     b o r d e r - r a d i u s :   8 p x ; 
     f o n t - s i z e :   1 3 p x ; 
     f o n t - w e i g h t :   6 0 0 ; 
     c u r s o r :   p o i n t e r ; 
     t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 } 
 . c o n f i g - t a b : h o v e r   { 
     b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; 
     c o l o r :   v a r ( - - t e x t - p r i m a r y ) ; 
 } 
 . c o n f i g - t a b . a c t i v e   { 
     b a c k g r o u n d :   v a r ( - - b g - s u r f a c e - h ) ; 
     c o l o r :   v a r ( - - t e x t - p r i m a r y ) ; 
     b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 0 , 0 , 0 , 0 . 2 ) ; 
 } 
  
 