
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Reset & Variables ────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent: #C8102E;
  --accent-dim: rgba(200,16,46,0.18);
  --accent-hover: #a00c24;
  --bg: #080808;
  --bg-secondary: #0d0d0d;
  --surface: rgba(255,255,255,0.02);
  --surface-hover: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.06);
  --border-accent: rgba(200,16,46,0.3);
  --text: #e8e6e1;
  --text-muted: rgba(232,230,225,0.4);
  --text-faint: rgba(232,230,225,0.18);
  --danger: #C8102E;
  --danger-hover: #a00c24;
  --warning: #c4922a;
  --success: #4a7c59;
  --sidebar-w: 220px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* ── Grain overlay ───────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  background-repeat: repeat;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  letter-spacing: 0.01em;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.4;
  pointer-events: none;
}

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

.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 87% 100%, 0 100%);
}
.logo-icon svg { width: 16px; height: 16px; fill: #fff; }

.logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--text);
}
.logo-text span { color: var(--accent); }

.sidebar-nav {
  flex: 1;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 10px 4px;
  margin-top: 4px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.12s, background 0.12s;
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0;
  background: var(--accent);
  transition: height 0.15s ease;
}

.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link:hover::before { height: 60%; }
.nav-link.active { color: var(--text); background: var(--accent-dim); }
.nav-link.active::before { height: 100%; }
.nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 0.5px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}

.avatar { width: 30px; height: 30px; border-radius: 0; object-fit: cover; flex-shrink: 0; background: var(--accent); }
.avatar-fallback {
  width: 30px; height: 30px;
  background: var(--accent-dim);
  border: 0.5px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier Prime', monospace;
  font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 11px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-tag { font-family: 'Courier Prime', monospace; font-size: 10px; color: var(--text-faint); margin-top: 1px; }

.logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); padding: 4px;
  transition: color 0.15s; display: flex;
}
.logout-btn:hover { color: var(--accent); }
.logout-btn svg { width: 14px; height: 14px; }

/* ── Main layout ─────────────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; padding: 44px 36px; max-width: 1160px; }

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.18s ease; }

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

.page-header { margin-bottom: 36px; }
.page-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 0.06em;
  line-height: 0.9;
  color: var(--text);
}
.page-header p {
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 36px;
  background: var(--border);
  border: 0.5px solid var(--border);
}

.stat-card {
  background: var(--bg-secondary);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.stat-card:hover::after { width: 100%; }

.stat-label {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  color: var(--text-faint);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.stat-label svg { width: 12px; height: 12px; }

.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
}

.stat-sub {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-card {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}

.table-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
}

.table-head {
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

.table-head h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text);
}

.table-head span {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  color: var(--text-faint);
}

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 0.5px solid var(--border); }

th {
  padding: 10px 20px;
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-faint);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

td {
  padding: 13px 20px;
  font-size: 12px;
  font-weight: 300;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: rgba(200,16,46,0.04); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-ban            { background: rgba(200,16,46,0.1);  color: #e05060; border: 0.5px solid rgba(200,16,46,0.25); }
.badge-kick           { background: rgba(196,146,42,0.1); color: #c4922a; border: 0.5px solid rgba(196,146,42,0.25); }
.badge-warn           { background: rgba(232,230,225,0.05); color: rgba(232,230,225,0.5); border: 0.5px solid rgba(232,230,225,0.12); }
.badge-mute,
.badge-timeout        { background: rgba(74,124,89,0.1);  color: #4a7c59; border: 0.5px solid rgba(74,124,89,0.25); }
.badge-open           { background: rgba(74,124,89,0.1);  color: #4a7c59; border: 0.5px solid rgba(74,124,89,0.25); }
.badge-closed         { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 0.5px solid var(--border); }
.badge-claimed        { background: rgba(200,16,46,0.08); color: #c84060; border: 0.5px solid rgba(200,16,46,0.2); }
.badge-role_add       { background: rgba(74,124,89,0.1);  color: #4a7c59; border: 0.5px solid rgba(74,124,89,0.25); }
.badge-role_remove    { background: rgba(200,16,46,0.1);  color: #e05060; border: 0.5px solid rgba(200,16,46,0.25); }
.badge-unban          { background: rgba(74,124,89,0.1);  color: #4a7c59; border: 0.5px solid rgba(74,124,89,0.25); }
.badge-timeout_remove { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 0.5px solid var(--border); }

.empty-state {
  padding: 48px 20px;
  text-align: center;
  font-family: 'Courier Prime', monospace;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.loading {
  padding: 48px 20px;
  text-align: center;
  font-family: 'Courier Prime', monospace;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Staff bars ──────────────────────────────────────────────────────────── */
.staff-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  transition: background 0.1s;
}
.staff-row:last-child { border-bottom: none; }
.staff-row:hover { background: rgba(200,16,46,0.04); }

.staff-rank {
  font-family: 'Courier Prime', monospace;
  font-size: 11px; color: var(--text-faint); width: 20px; text-align: center; flex-shrink: 0;
}

.staff-name { font-size: 12px; font-weight: 300; flex: 1; letter-spacing: 0.02em; }

.staff-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; font-weight: 400; color: var(--accent);
  letter-spacing: 0.04em;
  min-width: 32px; text-align: right; flex-shrink: 0;
}

.staff-bar-wrap { width: 100px; height: 1px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.staff-bar { height: 1px; background: var(--accent); transition: width 0.6s ease; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  font-family: 'Courier Prime', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; border: none;
  transition: background 0.12s, color 0.12s, opacity 0.12s;
}
.btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger  { background: transparent; color: var(--accent); border: 0.5px solid rgba(200,16,46,0.35); }
.btn-danger:hover { background: var(--accent-dim); }
.btn-ghost   { background: transparent; color: var(--text-muted); border: 0.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 10px; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Search bar ──────────────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-input {
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--border);
  padding: 7px 12px 7px 30px;
  color: var(--text);
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  width: 200px; outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.04em;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-faint); text-transform: uppercase; font-size: 10px; letter-spacing: 0.1em; }
.search-icon {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: var(--text-faint); pointer-events: none;
}

/* ── Form inputs ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  color: var(--text-faint);
  margin-bottom: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--border);
  padding: 8px 0;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--accent); }
.form-select option { background: #0d0d0d; }
.form-textarea { resize: vertical; min-height: 80px; border: 0.5px solid var(--border); padding: 10px; }
.form-textarea:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: #0d0d0d;
  border: 0.5px solid var(--border);
  border-top: 1px solid var(--accent);
  padding: 32px;
  width: 440px; max-width: 95vw;
  transform: translateY(8px); transition: transform 0.2s;
  max-height: 90vh; overflow-y: auto;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; border-top: 0.5px solid var(--border); padding-top: 20px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 6px; z-index: 999; }

.toast {
  background: #0d0d0d;
  border: 0.5px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 12px 16px;
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 10px;
  min-width: 220px; max-width: 320px;
  animation: toastIn 0.18s ease;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.toast-icon { width: 14px; height: 14px; flex-shrink: 0; }
.toast.success { border-left-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left-color: var(--accent); }
.toast.error .toast-icon { color: var(--accent); }

/* ── Member profile panel ────────────────────────────────────────────────── */
.profile-panel {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  border-top: 1px solid var(--accent);
  padding: 28px;
  margin-bottom: 24px;
  display: none;
}
.profile-panel.visible { display: block; animation: fadeIn 0.2s ease; }

.profile-top { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }

.profile-avatar {
  width: 52px; height: 52px;
  object-fit: cover;
  background: var(--accent);
}

.profile-avatar-fallback {
  width: 52px; height: 52px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; font-weight: 400; color: var(--accent);
}

.profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}
.profile-tag {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.profile-meta-item {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  color: var(--text-muted);
  border: 0.5px solid var(--border);
  padding: 3px 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-history h4 {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--text-faint);
}

/* ── Role tags ───────────────────────────────────────────────────────────── */
.role-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  border: 0.5px solid var(--border);
  margin: 2px;
}
.role-dot { width: 6px; height: 6px; flex-shrink: 0; }

/* ── Role manager ────────────────────────────────────────────────────────── */
.role-list { display: flex; flex-direction: column; gap: 1px; max-height: 320px; overflow-y: auto; }

.role-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  transition: background 0.1s; cursor: default;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
}
.role-item:last-child { border-bottom: none; }
.role-item:hover { background: var(--surface-hover); }
.role-item-dot { width: 8px; height: 8px; flex-shrink: 0; }
.role-item-name { flex: 1; font-size: 12px; font-weight: 300; letter-spacing: 0.02em; }
.role-item-members {
  font-family: 'Courier Prime', monospace;
  font-size: 10px; color: var(--text-faint); margin-right: 8px;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.toggle-switch { position: relative; width: 32px; height: 18px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.2s;
  border: 0.5px solid var(--border);
}
.toggle-track::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.3);
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-track { background: rgba(200,16,46,0.2); border-color: var(--border-accent); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(14px); background: var(--accent); }

/* ── Channel list ────────────────────────────────────────────────────────── */
.channel-category {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 16px 0 6px;
}
.channel-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
}
.channel-item:last-child { border-bottom: none; }
.channel-name {
  flex: 1; font-size: 12px;
  font-family: 'Courier Prime', monospace;
  font-weight: 400; letter-spacing: 0.02em;
}
.channel-type {
  font-family: 'Courier Prime', monospace;
  font-size: 9px; color: var(--text-faint); width: 60px;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ── Settings ────────────────────────────────────────────────────────────── */
.settings-section { margin-bottom: 36px; }
.settings-section h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 4px;
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
}
.setting-row:last-child { border-bottom: none; }
.setting-info .setting-name { font-size: 12px; font-weight: 400; letter-spacing: 0.02em; }
.setting-info .setting-desc {
  font-family: 'Courier Prime', monospace;
  font-size: 10px; color: var(--text-faint); margin-top: 3px; letter-spacing: 0.04em;
}

/* ── Ban list ────────────────────────────────────────────────────────────── */
.ban-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  transition: background 0.1s;
}
.ban-item:last-child { border-bottom: none; }
.ban-item:hover { background: rgba(200,16,46,0.04); }

.ban-avatar {
  width: 28px; height: 28px;
  background: rgba(200,16,46,0.15);
  border: 0.5px solid rgba(200,16,46,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier Prime', monospace;
  font-size: 11px; color: var(--accent); flex-shrink: 0;
}
.ban-name { flex: 1; font-size: 12px; font-weight: 300; }
.ban-reason {
  font-family: 'Courier Prime', monospace;
  font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em;
}
.ban-id {
  font-family: 'Courier Prime', monospace;
  font-size: 10px; color: var(--text-faint); letter-spacing: 0.04em;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 2px; height: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(200,16,46,0.3); }
::-webkit-scrollbar-thumb:hover { background: rgba(200,16,46,0.6); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; padding: 24px 16px; }
}
/* Two-column wrapper */
.roles-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
 
.roles-list-col { min-width: 0; }
.roles-editor-col { min-width: 0; }
 
/* Role list items — clickable, with active state */
.role-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
  position: relative;
}
.role-list-item:last-child { border-bottom: none; }
.role-list-item:hover { background: rgba(200,16,46,0.04); }
.role-list-item.active {
  background: rgba(200,16,46,0.08);
}
.role-list-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}
.role-list-item .role-item-name {
  flex: 1;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
/* Editor card */
.roles-editor-card {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
 
.roles-editor-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
 
/* Color picker native input style reset */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: 0.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: none; }
 
/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
  .roles-layout {
    grid-template-columns: 1fr;
  }
  .roles-editor-card {
    position: static;
    max-height: none;
  }
}
