/* ═══════════════════════════════════════════════════════════════
   DISSIDENT CENTRAL HUB — SIGINT Terminal UI
   Aesthetic: Military-grade ops dashboard, electric cyan on void
   Fonts: JetBrains Mono + DM Sans
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Variables ── */
:root {
  --void:      #04060A;
  --base:      #080C12;
  --surface:   #0C1118;
  --elevated:  #111923;
  --panel:     #162030;
  --raised:    #1C2940;

  --border:    rgba(0, 212, 255, 0.07);
  --border-md: rgba(0, 212, 255, 0.15);
  --border-hi: rgba(0, 212, 255, 0.30);

  --cyan:      #00D4FF;
  --cyan-dim:  rgba(0, 212, 255, 0.08);
  --cyan-glow: rgba(0, 212, 255, 0.20);
  --cyan-mid:  rgba(0, 212, 255, 0.50);

  --green:     #00FF88;
  --green-dim: rgba(0, 255, 136, 0.08);
  --amber:     #FFB830;
  --amber-dim: rgba(255, 184, 48, 0.08);
  --red:       #FF4455;
  --red-dim:   rgba(255, 68, 85, 0.08);
  --purple:    #BD93F9;

  --text-0:  #E2EBF5;
  --text-1:  #7A94B0;
  --text-2:  #3D5470;
  --text-3:  #1F3050;

  --font-ui:   'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --sidebar-w: 230px;
  --nav-h:     52px;
  --r:         5px;
  --r-lg:      9px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text-0);
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--raised); border-radius: 2px; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  min-width: 0;
  background: var(--base);
  position: relative;
}

/* Subtle hex grid background on main content area */
.main::before {
  content: '';
  position: fixed;
  top: var(--nav-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zM28 100L0 84V50l28-16 28 16v34L28 100z' fill='none' stroke='%2300D4FF' stroke-opacity='0.025' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1320px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border-md);
  display: flex;
  flex-direction: column;
  z-index: 300;
  overflow: hidden;
}

/* CRT scanline texture */
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 212, 255, 0.015) 3px,
    rgba(0, 212, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Top cyan glow line */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-mid), transparent);
  z-index: 2;
}

.sidebar__brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 2;
}

.sidebar__logo {
  width: 32px; height: 32px;
  background: transparent;
  border: 1.5px solid var(--cyan);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--cyan);
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--cyan-glow), inset 0 0 12px var(--cyan-dim);
  letter-spacing: -0.02em;
}

.sidebar__wordmark { line-height: 1; }
.sidebar__name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: 0.02em;
}

.sidebar__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-top: 2px;
  opacity: 0.7;
}

/* Blinking cursor after version text */
.sidebar__sub::after {
  content: '▊';
  animation: blink 1.2s step-end infinite;
  opacity: 0.8;
}

@keyframes blink { 0%,100% { opacity: 0.8; } 50% { opacity: 0; } }

.sidebar__nav {
  flex: 1;
  padding: 10px 8px;
  overflow-y: auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  z-index: 2;
}

.sidebar__group-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 9px 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--text-1);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 400;
  transition: background 0.1s, color 0.1s;
  position: relative;
  letter-spacing: 0.01em;
}

.sidebar__link svg { flex-shrink: 0; opacity: 0.55; transition: opacity 0.1s; width: 14px; height: 14px; }
.sidebar__link:hover { background: var(--elevated); color: var(--text-0); }
.sidebar__link:hover svg { opacity: 0.9; }

.sidebar__item--active .sidebar__link {
  background: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 500;
}

.sidebar__item--active .sidebar__link svg { opacity: 1; color: var(--cyan); }

.sidebar__item--active .sidebar__link::before {
  content: '';
  position: absolute;
  left: -1px; top: 25%; bottom: 25%;
  width: 2px;
  background: var(--cyan);
  border-radius: 0 1px 1px 0;
  box-shadow: 0 0 10px var(--cyan);
}

.sidebar__divider { height: 1px; background: var(--border); margin: 4px 8px; }

.sidebar__footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.sidebar__avatar {
  width: 28px; height: 28px;
  border: 1.5px solid var(--border-md);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  flex-shrink: 0;
}

.sidebar__uname {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-0);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__role {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-2);
  display: block;
  letter-spacing: 0.06em;
}

.sidebar__logout {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
  cursor: pointer;
  letter-spacing: 0.06em;
  padding: 0;
  transition: color 0.1s;
}

.sidebar__logout:hover { color: var(--red); }

/* ── Navbar ── */
.navbar {
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.navbar__toggle {
  display: none;
  background: none; border: none;
  color: var(--text-1); cursor: pointer; padding: 4px;
}

.navbar__path {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

.navbar__path-sep { color: var(--text-3); }
.navbar__path-cur { color: var(--text-1); }

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

/* Bot status pill */
.bot-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-1);
  transition: border-color 0.2s;
}

.bot-pill--online  { border-color: rgba(0, 255, 136, 0.25); color: var(--green); }
.bot-pill--offline { border-color: rgba(255, 68, 85, 0.25); color: var(--red); }

.bot-pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  flex-shrink: 0;
}

.bot-pill--online  .bot-pill__dot { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s ease-in-out infinite; }
.bot-pill--offline .bot-pill__dot { background: var(--red); }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ── Page header ── */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.page-header__title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.page-header__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.stat-card:hover { border-color: var(--border-md); transform: translateY(-1px); }

/* Top accent line on hover */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-mid), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover::before { opacity: 1; }

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 9px;
}

.stat-card__val {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card__val--online  { color: var(--green); }
.stat-card__val--offline { color: var(--red); }
.stat-card__val--cyan    { color: var(--cyan); }
.stat-card__val--mono    { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0; }
.stat-card__val--sm      { font-size: 16px; }

/* ── Section ── */
.section { margin-bottom: 24px; }

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

.section__title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ── Server list ── */
.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.server-card:hover {
  background: var(--elevated);
  border-color: var(--border-md);
  transform: translateY(-1px);
}

.server-card__icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.server-card__icon--placeholder {
  background: var(--cyan-dim);
  border: 1px solid var(--border-md);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-card__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  margin-top: 2px;
}

/* ── Auth ── */
.auth-body {
  min-height: 100vh;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated scan line */
.auth-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(0,212,255,0.02) 60px, rgba(0,212,255,0.02) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(0,212,255,0.02) 60px, rgba(0,212,255,0.02) 61px);
  pointer-events: none;
}

.auth-body::after {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 12px;
  padding: 38px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 80px rgba(0,212,255,0.06), 0 30px 60px rgba(0,0,0,0.5);
}

/* Cyan corner accent */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 60px;
  border-top: 1.5px solid var(--cyan);
  border-left: 1.5px solid var(--cyan);
  border-radius: 12px 0 0 0;
  box-shadow: -4px -4px 20px var(--cyan-glow);
}

.auth-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-bottom: 1.5px solid var(--cyan);
  border-right: 1.5px solid var(--cyan);
  border-radius: 0 0 12px 0;
  box-shadow: 4px 4px 20px var(--cyan-glow);
}

.auth-brand {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  width: 48px; height: 48px;
  border: 2px solid var(--cyan);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--cyan);
  margin: 0 auto 14px;
  box-shadow: 0 0 24px var(--cyan-glow), inset 0 0 24px var(--cyan-dim);
}

.auth-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 4px;
}

.auth-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.08em;
}

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Inputs ── */
.field { display: flex; flex-direction: column; gap: 5px; }

.field__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field__input {
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  padding: 9px 12px;
  color: var(--text-0);
  font-size: 13px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}

.field__input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.field__input::placeholder { color: var(--text-3); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: all 0.12s;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn--primary {
  background: var(--cyan);
  color: var(--void);
  font-weight: 600;
  box-shadow: 0 0 24px var(--cyan-glow);
}
.btn--primary:hover { filter: brightness(1.1); box-shadow: 0 0 32px var(--cyan-glow); }

.btn--discord { background: #5865F2; color: #fff; width: 100%; box-shadow: 0 4px 16px rgba(88,101,242,0.3); }
.btn--discord:hover { background: #4a56e2; }

.btn--ghost {
  background: var(--elevated);
  color: var(--text-1);
  border: 1px solid var(--border-md);
}
.btn--ghost:hover { background: var(--panel); border-color: var(--border-hi); color: var(--text-0); }

.btn--danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,68,85,0.2); }
.btn--danger:hover { background: rgba(255,68,85,0.15); }
.btn--sm { padding: 5px 12px; font-size: 11.5px; }
.btn--full { width: 100%; }

/* ── Forms ── */
.auth-form { display: flex; flex-direction: column; gap: 12px; }

/* ── Alerts ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-bottom: 12px;
  border-left: 2px solid;
}
.alert--danger  { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.alert--warning { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.alert--success { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.alert--info    { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.badge--default  { background: var(--elevated); color: var(--text-1); border-color: var(--border); }
.badge--online   { background: var(--green-dim); color: var(--green); border-color: rgba(0,255,136,0.2); }
.badge--offline  { background: var(--red-dim); color: var(--red); border-color: rgba(255,68,85,0.2); }
.badge--admin    { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(0,212,255,0.2); }
.badge--stale    { background: var(--amber-dim); color: var(--amber); border-color: rgba(255,184,48,0.2); }

/* ── Tables ── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--border);
  background: var(--base);
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-0);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.08s; }
.data-table tbody tr:hover td { background: var(--elevated); }

.td-mono { font-family: var(--font-mono); font-size: 11px; color: var(--text-1); }

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}

.card__title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.card__row:last-child { border-bottom: none; padding-bottom: 0; }
.card__label { color: var(--text-1); }
.card__value { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); }

/* ── Empty state ── */
.empty {
  background: var(--surface);
  border: 1px dashed var(--border-md);
  border-radius: var(--r-lg);
  padding: 48px;
  text-align: center;
}

.empty p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 2;
}

.empty-inline {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  padding: 32px;
  text-align: center;
}

/* ── Back link ── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.1s;
  letter-spacing: 0.04em;
}
.back:hover { color: var(--cyan); }

/* ── Latency sparkline area ── */
.latency-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.latency-chart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.latency-chart__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.latency-chart__val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
}

.latency-chart__val span {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 400;
}

canvas#latency-canvas {
  width: 100%;
  height: 48px;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .layout.sidebar-open .sidebar { transform: translateX(0); }
  .main::before { left: 0; }
  .navbar__toggle { display: flex; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Utility ── */
.mono { font-family: var(--font-mono); }
.tc  { color: var(--cyan); }
.tg  { color: var(--green); }
.tr  { color: var(--red); }
.ta  { color: var(--amber); }
.t1  { color: var(--text-1); }
.t2  { color: var(--text-2); }

/* ── Notification bell ── */
.notif-bell {
  position: relative;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--text-1);
  transition: border-color 0.1s, color 0.1s;
}
.notif-bell:hover { border-color: var(--border-md); color: var(--text-0); }

.notif-bell__count {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--base);
}

.notif-panel {
  position: fixed;
  top: var(--nav-h);
  right: 20px;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
}

.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--base);
}

.notif-panel__list { max-height: 360px; overflow-y: auto; }
.notif-panel__empty { padding: 24px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.08s;
}
.notif-item:hover { background: var(--elevated); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { border-left: 2px solid var(--cyan); }
.notif-item__title { font-size: 12.5px; font-weight: 500; color: var(--text-0); margin-bottom: 2px; }
.notif-item__body { font-size: 11px; color: var(--text-2); font-family: var(--font-mono); }
.notif-item__time { font-size: 10px; color: var(--text-3); font-family: var(--font-mono); margin-top: 3px; }

/* ── Sidebar avatar ── */
.sidebar__avatar-img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-md);
  flex-shrink: 0;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.1s;
  font-family: var(--font-ui);
  text-decoration: none;
  display: inline-block;
  margin-bottom: -1px;
}

.tab:hover { color: var(--text-0); }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── Toggle switch ── */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--raised);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.toggle__track::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; top: 2px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.toggle input:checked + .toggle__track { background: var(--cyan-dim); border-color: var(--cyan); }
.toggle input:checked + .toggle__track::before { transform: translateX(16px); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ── Form row ── */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.form-row:last-child { border-bottom: none; }
.form-row__left { flex: 1; min-width: 0; }
.form-row__label { font-size: 13px; color: var(--text-0); font-weight: 500; }
.form-row__help { font-size: 11px; color: var(--text-2); font-family: var(--font-mono); margin-top: 2px; }

/* ── Command list ── */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
}

.cmd-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.1s;
}
.cmd-item:hover { border-color: var(--border-md); }
.cmd-item.disabled { opacity: 0.5; }
.cmd-item__name { font-family: var(--font-mono); font-size: 12px; color: var(--text-0); }
.cmd-item__cog  { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); margin-top: 1px; }

/* ── Mod case list ── */
.case-list { display: flex; flex-direction: column; gap: 6px; }
.case-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.case-item__num { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); min-width: 30px; }
.case-action {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 56px;
  justify-content: center;
}
.case-action--warn   { background: var(--amber-dim); color: var(--amber); }
.case-action--mute   { background: var(--purple-dim, rgba(189,147,249,.1)); color: var(--purple); }
.case-action--kick   { background: var(--red-dim); color: var(--red); }
.case-action--ban    { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,68,85,.2); }
.case-action--unban  { background: var(--green-dim); color: var(--green); }
.case-action--unmute { background: var(--green-dim); color: var(--green); }
.case-item__target { flex: 1; font-size: 12.5px; color: var(--text-0); font-weight: 500; }
.case-item__reason { font-size: 11.5px; color: var(--text-1); flex: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-item__meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); white-space: nowrap; }

/* ── Ticket list ── */
.ticket-list { display: flex; flex-direction: column; gap: 6px; }
.ticket-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.1s, background 0.1s;
}
.ticket-item:hover { border-color: var(--border-md); background: var(--elevated); }
.ticket-num { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); min-width: 40px; }
.ticket-subject { flex: 1; font-size: 12.5px; font-weight: 500; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-opener { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); }
.ticket-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); white-space: nowrap; }

/* priority badges */
.pri--urgent { background: var(--red-dim); color: var(--red); border-color: rgba(255,68,85,.2); }
.pri--high   { background: var(--amber-dim); color: var(--amber); border-color: rgba(255,184,48,.2); }
.pri--normal { background: var(--elevated); color: var(--text-1); }
.pri--low    { background: var(--elevated); color: var(--text-2); }

/* ── Server guild card ── */
.guild-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.guild-header__icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-md);
  flex-shrink: 0;
}
.guild-header__icon--placeholder {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--cyan-dim);
  border: 1px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}
.guild-header__name { font-size: 20px; font-weight: 600; color: var(--text-0); }
.guild-header__id { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); margin-top: 2px; }
.guild-header__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Input overrides for settings ── */
.field__input--inline {
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  padding: 6px 10px;
  color: var(--text-0);
  font-size: 12.5px;
  font-family: var(--font-mono);
  outline: none;
  width: 100%;
  max-width: 280px;
  transition: border-color 0.1s;
}
.field__input--inline:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-dim); }

/* ── Sidebar badge ── */
.sidebar__badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}
