/* ================================================================
   LE Bans Panel — Premium Dark Theme
   ================================================================ */

:root {
  --bg-0: #0a0c10;
  --bg-1: #0f1219;
  --bg-2: #161b26;
  --bg-3: #1c2333;
  --bg-4: #242d3f;
  --border: #2a3348;
  --border-light: #354058;
  --fg: #e2e6ef;
  --fg-2: #9aa3b8;
  --fg-dim: #7b869c;                 /* was #5f6a80 — bumped for WCAG AA on secondary text */
  --accent: #ef4444;
  --accent-rgb: 239, 68, 68;         /* single source for rgba(var(--accent-rgb), a) tints */
  --accent-hover: #dc2626;
  --accent-glow: rgba(var(--accent-rgb), 0.15);
  --accent-glow-strong: rgba(var(--accent-rgb), 0.3);
  --good: #34d399;
  --good-bg: rgba(52, 211, 153, 0.1);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.1);
  --perm: #a78bfa;
  --perm-bg: rgba(167, 139, 250, 0.1);
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius: 0;
  --radius-sm: 0;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { height: 100%; }

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg-0);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
.ic { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
/* 2-letter ISO country chip — replaces flag emoji (brand rule: no emojis) */
.flag-chip { display: inline-block; min-width: 26px; padding: 1px 5px; font: 600 10px/1.5 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .5px; color: var(--fg-2); background: var(--bg-3); border: 1px solid var(--border); border-radius: 3px; text-align: center; text-transform: uppercase; vertical-align: middle; }
/* evasion confidence — Low (neutral / likely benign) + Moot (already handled) */
.badge.neutral { background: var(--bg-3); color: var(--fg-2); border: 1px solid var(--border); }
.badge.muted   { background: transparent; color: var(--fg-dim); border: 1px solid var(--border); }
.stat-value.accent-muted { color: var(--fg-dim); }

h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
h2 { font-size: 14px; font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 12px; }
h2 small { font-weight: 400; color: var(--fg-dim); text-transform: none; letter-spacing: 0; }

.text-dim { color: var(--fg-dim); }
.text-center { text-align: center; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.brand-title { display: block; font-weight: 700; font-size: 16px; color: var(--fg); line-height: 1.2; }
.brand-sub { display: block; font-size: 11px; color: var(--fg-dim); font-weight: 400; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--fg-2); transition: color var(--transition); }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: var(--accent); }
.nav-label { flex: 1; }
.nav-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.nav-badge.pulse { animation: pulse-badge 2s infinite; }
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-links { display: flex; gap: 16px; font-size: 12px; }
.sidebar-links a { color: var(--fg-dim); }
.sidebar-links a:hover { color: var(--accent); }

/* ================================================================
   TOPBAR
   ================================================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 18, 25, 0.85);
}

.page-title { font-size: 18px; font-weight: 600; margin: 0; }
.topbar-left { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  padding: 6px 14px 6px 6px;
  border-radius: 50px;
  border: 1px solid var(--border);
}
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.user-level { font-size: 10px; color: var(--fg-dim); }

.logout-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 16px;
  transition: all var(--transition);
}
.logout-btn:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); text-decoration: none; }

.mobile-toggle { display: none; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
main {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
}

/* ================================================================
   FLASH MESSAGES
   ================================================================ */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  animation: flash-in 0.3s ease;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.flash-icon { font-size: 16px; flex-shrink: 0; }
.flash-success { background: var(--good-bg); color: var(--good); border-color: rgba(52, 211, 153, 0.3); }
.flash-error   { background: var(--bad-bg); color: var(--bad); border-color: rgba(248, 113, 113, 0.3); }
.flash-info    { background: var(--accent-glow); color: var(--accent); border-color: rgba(239, 68, 68, 0.3); }
.flash-warning { background: var(--warn-bg); color: var(--warn); border-color: rgba(251, 191, 36, 0.3); }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

.stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--fg-dim);
}
.stat-decoration {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 24px;
  opacity: 0.15;
}

.accent-blue .stat-value { color: var(--accent); }
.accent-purple .stat-value { color: var(--perm); }
.accent-green .stat-value { color: var(--good); }
.accent-orange .stat-value { color: #f97316; }
.accent-cyan .stat-value { color: #22d3ee; }
.accent-grey .stat-value { color: var(--fg-2); }
.accent-yellow .stat-value { color: var(--warn); }
.accent-red .stat-value { color: var(--bad); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 { margin: 0; }
.card-body { padding: 0; }
.card-body.padded { padding: 20px; }
.table-wrap { overflow-x: auto; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 1000px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ================================================================
   ADMIN RANKINGS
   ================================================================ */
.admin-rankings { padding: 16px 20px; }
.admin-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.rank-pos { width: 28px; font-size: 12px; font-weight: 700; color: var(--fg-dim); text-align: center; }
.rank-name { width: 100px; font-size: 13px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar-wrap { flex: 1; height: 6px; background: var(--bg-4); border-radius: 3px; overflow: hidden; }
.rank-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #ef4444); border-radius: 3px; transition: width 0.6s ease; }
.rank-count { font-size: 13px; font-weight: 700; color: var(--accent); min-width: 30px; text-align: right; }

/* ================================================================
   TABLES
   ================================================================ */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  background: var(--bg-3);
  color: var(--fg-dim);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(42, 51, 72, 0.5);
  vertical-align: top;
  transition: background var(--transition);
}
table.data tbody tr:hover td { background: rgba(239, 68, 68, 0.04); }
table.data small { color: var(--fg-dim); font-size: 11px; }

table.data.kv { margin-top: 0; }
table.data.kv th { width: 170px; text-align: right; background: var(--bg-3); font-size: 12px; }

.player-cell { display: flex; flex-direction: column; gap: 1px; }
.player-cell strong { font-weight: 600; }
.player-cell small { font-size: 11px; color: var(--fg-dim); }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-4);
  color: var(--fg-2);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}
.badge.active { background: var(--good-bg); color: var(--good); border-color: rgba(52, 211, 153, 0.35); }
.badge.warn   { background: var(--warn-bg); color: var(--warn); border-color: rgba(251, 191, 36, 0.35); }
.badge.bad    { background: var(--bad-bg); color: var(--bad); border-color: rgba(248, 113, 113, 0.35); }
.badge.perm   { background: var(--perm-bg); color: var(--perm); border-color: rgba(167, 139, 250, 0.35); }

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.filter-bar input[type=text],
.filter-bar select {
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  min-width: 140px;
  transition: border-color var(--transition);
}
.filter-bar input[type=text]:focus,
.filter-bar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.filter-bar input[type=text] { flex: 1 1 250px; }

/* ================================================================
   FORMS
   ================================================================ */
form.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 700px;
}
form.form-card h2 { margin-top: 20px; }
form.form-card h2:first-child { margin-top: 0; }

.input-group { margin-bottom: 16px; }
.input-group label,
form.form-card label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--fg-2);
}
.input-group label { margin-bottom: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fg-dim); }

form.form-card label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--fg-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

input[type=text], input[type=number], input[type=password], textarea, select {
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
form.form-card input[type=text],
form.form-card input[type=number],
form.form-card input[type=password],
form.form-card textarea,
form.form-card select { width: 100%; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 80px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ================================================================
   BUTTONS
   ================================================================ */
button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); text-decoration: none; }
button:active, .btn:active { transform: translateY(0); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #dc5050; box-shadow: 0 4px 12px rgba(248, 113, 113, 0.25); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--fg-2); }
.btn.ghost:hover { background: var(--bg-3); color: var(--fg); border-color: var(--border-light); transform: none; box-shadow: none; }

.action-row { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
  margin-top: 24px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination a {
  padding: 7px 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}
.pagination a:hover { background: var(--bg-3); text-decoration: none; border-color: var(--border-light); }
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ================================================================
   TWO COL LAYOUT (ban_view, whois)
   ================================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ================================================================
   SECTIONS (standalone)
   ================================================================ */
section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
section h2:first-child { margin-top: 0; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-body { background: var(--bg-0); }

.login-scene {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 40px 36px;
  border-radius: 16px;
  width: 380px;
  max-width: 92%;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}
.login-brand h1 { font-size: 22px; margin: 0; font-weight: 700; }
.login-brand p { color: var(--fg-dim); font-size: 13px; margin-top: 4px; }

.login-box .input-group label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--fg-dim); margin-bottom: 6px;
}
.login-box input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
}

.login-submit {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border: none;
  letter-spacing: 0.3px;
}
.login-submit:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--fg-dim);
}
.login-footer a { color: var(--fg-dim); }
.login-footer a:hover { color: var(--accent); }
.login-footer span { margin: 0 4px; }

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrapper { margin-left: 0; }
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--fg);
    width: 38px; height: 38px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .overlay { display: block; }
  main { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   SCROLLBAR (webkit)
   ================================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ================================================================
   ANIMATION
   ================================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stat-card, .card, section, .filter-bar { animation: fadeIn 0.4s ease both; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.2s; }
.stat-card:nth-child(6) { animation-delay: 0.25s; }
.stat-card:nth-child(7) { animation-delay: 0.3s; }
.stat-card:nth-child(8) { animation-delay: 0.35s; }


/* ================================================================
   PROFILE PAGE
   ================================================================ */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.profile-avatar-large {
  width: 72px; height: 72px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 24px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.profile-hero-info { flex: 1; }
.profile-name { font-size: 24px; font-weight: 700; color: var(--fg); margin: 0; text-transform: none; letter-spacing: 0; }
.profile-username { color: var(--fg-dim); font-size: 14px; margin: 2px 0 8px; }
.profile-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.profile-avatar-small {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}

/* ================================================================
   INLINE ACTIONS (details/summary dropdowns)
   ================================================================ */
details.inline-action {
  display: inline-block;
  position: relative;
  margin-right: 4px;
}
details.inline-action summary {
  cursor: pointer;
  list-style: none;
}
details.inline-action summary::-webkit-details-marker { display: none; }
details.inline-action[open] summary { background: var(--bg-3); }

.inline-form {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  white-space: nowrap;
}
.inline-form input,
.inline-form select {
  padding: 6px 8px;
  font-size: 12px;
}


/* ================================================================
   SERVER STATUS WIDGET
   ================================================================ */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.server-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all var(--transition);
}
.server-card:hover { border-color: var(--border-light); }
.server-card.offline { opacity: 0.5; }

.server-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.server-status-dot.online {
  background: var(--good);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
  animation: pulse-dot 2s infinite;
}
.server-status-dot.off { background: var(--fg-dim); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(52, 211, 153, 0.3); }
  50% { box-shadow: 0 0 12px rgba(52, 211, 153, 0.6); }
}

.server-info { flex: 1; min-width: 0; }
.server-name { font-weight: 600; font-size: 13px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-addr { font-size: 11px; color: var(--fg-dim); margin-bottom: 6px; }
.server-map { font-size: 12px; color: var(--fg-2); margin-bottom: 4px; }
.server-offline-text { font-size: 12px; color: var(--fg-dim); font-style: italic; }

.server-players { display: flex; align-items: center; gap: 8px; }
.player-bar-wrap { flex: 1; height: 5px; background: var(--bg-4); border-radius: 3px; overflow: hidden; }
.player-bar { height: 100%; background: linear-gradient(90deg, var(--good), var(--accent)); border-radius: 3px; transition: width 0.5s ease; }
.server-players span { font-size: 12px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }

.server-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 10px;
  color: var(--fg-dim);
  white-space: nowrap;
}




/* ================================================================
   BAR CHARTS (stats page)
   ================================================================ */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 150px;
  padding-top: 10px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.bar-fill {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--accent), #ef4444);
  border-radius: 2px 2px 0 0;
  transition: height 0.5s ease;
}
.bar-col:hover .bar-fill {
  background: linear-gradient(180deg, var(--accent), #f97316);
}
.bar-label {
  font-size: 9px;
  color: var(--fg-dim);
  margin-top: 4px;
  white-space: nowrap;
}

/* ================================================================
   HEATMAP (activity by hour)
   ================================================================ */
.heatmap-row {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.15s ease;
  min-height: 36px;
}
.heatmap-cell:hover {
  transform: scale(1.15);
  z-index: 1;
}
.heatmap-hour {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}
.heatmap-count {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
}

/* ================================================================
   DAY OF WEEK CHART
   ================================================================ */
.dow-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dow-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dow-label {
  width: 36px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
}
.dow-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg-4);
  border-radius: 4px;
  overflow: hidden;
}
.dow-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ef4444);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.dow-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 30px;
  text-align: right;
}

/* ================================================================
   TEMPLATE GRID (quick ban)
   ================================================================ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.template-category {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.template-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--fg);
  transition: all var(--transition);
}
.template-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.template-reason {
  font-weight: 500;
}
.template-dur {
  font-size: 10px;
  font-weight: 700;
}

/* ================================================================
   THREE COLUMN GRID (stats)
   ================================================================ */
@media (max-width: 1100px) {
  .dashboard-grid[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================================
   MOBILE IMPROVEMENTS (Feature 10)
   ================================================================ */
@media (max-width: 768px) {
  /* Wider sidebar on mobile when open */
  .sidebar { width: 280px; }

  /* Stack dashboard grids */
  .dashboard-grid { grid-template-columns: 1fr !important; }
  .two-col { grid-template-columns: 1fr !important; }
  .form-row { grid-template-columns: 1fr !important; }

  /* Compact stat cards */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px 10px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 9px; }

  /* Compact tables */
  table.data th, table.data td { padding: 6px 8px; font-size: 11px; }

  /* Topbar compact */
  .topbar { padding: 0 12px; }
  .page-title { font-size: 15px; }
  .user-info { display: none; }

  /* Cards compact */
  .card-header { padding: 10px 14px; }
  .card-body.padded { padding: 12px; }

  /* Filter bar stack */
  .filter-bar { flex-direction: column; }
  .filter-bar input[type=text] { min-width: 100%; }

  /* Action rows wrap */
  .action-row { flex-wrap: wrap; }
  .action-row .btn { flex: 1; min-width: 120px; justify-content: center; }

  /* Profile compact */
  .profile-hero { flex-direction: column; text-align: center; padding: 20px; }
  .profile-meta { justify-content: center; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }

  /* Server grid compact */
  .server-grid { grid-template-columns: 1fr; }

  /* Heatmap compact */
  .heatmap-cell { min-height: 28px; }
  .heatmap-hour { font-size: 7px; }
  .heatmap-count { font-size: 8px; }

  /* Template grid compact */
  .template-grid { grid-template-columns: 1fr; }

  /* Admin rankings compact */
  .rank-name { width: 80px; }

  /* Inline actions */
  .inline-form { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-radius: 12px 12px 0 0; padding: 16px; }

  /* Pagination */
  .pagination { gap: 2px; }
  .pagination a { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
  main { padding: 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stat-card { padding: 10px 8px; }
  .stat-value { font-size: 20px; }
  .stat-decoration { display: none; }
  .topbar { height: 52px; }
  .login-box { padding: 28px 20px; }
  h1 { font-size: 18px; }
}

/* Touch-friendly improvements */
@media (hover: none) {
  .btn, button { min-height: 44px; }
  .nav-item { padding: 12px; }
  .pagination a { min-height: 44px; display: flex; align-items: center; }
  table.data td { padding: 10px 8px; }
}

/* LE Bans - New Feature Styles */
/* Append this to the end of assets/style.css */

/* Bar Charts */
.bar-chart { display:flex; align-items:flex-end; gap:3px; height:150px; padding-top:10px; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; min-width:0; }
.bar-fill { width:100%; min-height:2px; background:linear-gradient(180deg, var(--accent), #b91c1c); border-radius:2px 2px 0 0; transition:height 0.5s; }
.bar-col:hover .bar-fill { background:linear-gradient(180deg, #9dcaff, #5a9ff7); }
.bar-label { font-size:9px; color:#888; margin-top:4px; }

/* Heatmap */
.heatmap-row { display:grid; grid-template-columns:repeat(24, 1fr); gap:3px; }
.heatmap-cell { aspect-ratio:1; border-radius:4px; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:36px; transition:transform 0.15s; }
.heatmap-cell:hover { transform:scale(1.15); z-index:1; }
.heatmap-hour { font-size:9px; color:rgba(255,255,255,0.5); font-weight:600; }
.heatmap-count { font-size:10px; color:rgba(255,255,255,0.8); font-weight:700; }

/* Day-of-week horizontal bars */
.dow-chart { display:flex; flex-direction:column; gap:8px; }
.dow-row { display:flex; align-items:center; gap:10px; }
.dow-label { width:36px; font-size:12px; font-weight:600; color:#aaa; }
.dow-bar-wrap { flex:1; height:8px; background:#1a1f2e; border-radius:4px; overflow:hidden; }
.dow-bar { height:100%; background:linear-gradient(90deg, #f97316, var(--accent)); border-radius:4px; transition:width 0.5s; }
.dow-count { font-size:13px; font-weight:700; color:var(--accent); min-width:30px; text-align:right; }

/* Mobile responsive improvements */
@media (max-width: 900px) {
  div[style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns:1fr !important; }
}
@media (max-width: 768px) {
  .two-col { grid-template-columns:1fr !important; }
  .form-row { grid-template-columns:1fr !important; }
  .stats-grid { grid-template-columns:repeat(2, 1fr) !important; gap:8px !important; }
  .filter-bar { flex-direction:column; }
  .heatmap-cell { min-height:28px; }
  .heatmap-hour { font-size:7px; }
  .heatmap-count { font-size:8px; }
  table.data th, table.data td { padding:6px 8px; font-size:11px; }
}
@media (max-width: 480px) {
  main { padding:10px; }
  .stats-grid { grid-template-columns:repeat(2, 1fr) !important; }
  .stat-value { font-size:20px !important; }
}
/* (duplicate @media (hover:none) block merged into the one above — Pass 8) */



/* =====================================================================
   LE Bans Panel — Pass 1 style additions
   Append this to the END of /assets/style.css
   (or replace the existing "New Feature Styles" block at the bottom)
   ===================================================================== */


/* --- page header with tabs ------------------------------------------ */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}
.stats-header h1 { margin: 0; }

.stats-tabs {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 10px;
}
.tab-btn {
    background: transparent;
    color: var(--fg-2);
    border: 0;
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    letter-spacing: .3px;
}
.tab-btn:hover:not([disabled])  { color: var(--fg); background: var(--bg-3); }
.tab-btn.active                 { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.35); }
.tab-btn[disabled]              { opacity: .4; cursor: not-allowed; }

/* --- panels ---------------------------------------------------------- */
.panel {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    overflow: hidden;
    position: relative;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.panel-head h2 {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--fg-2);
}
.panel-sub {
    font-size: 11px;
    color: var(--fg-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* --- grids ----------------------------------------------------------- */
.stats-grid-7 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stats-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}
@media (max-width: 1100px) { .stats-3col { grid-template-columns: 1fr; } }

/* safety net in case .two-col isn't already defined */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* --- 7×24 heatmap ---------------------------------------------------- */
.heatmap-2d {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}
.heatmap-hours,
.heatmap-row-2d {
    display: grid;
    grid-template-columns: 44px repeat(24, 1fr);
    gap: 3px;
    align-items: center;
}
.heatmap-hours span {
    font-size: 10px;
    color: var(--fg-dim);
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.heatmap-hours span.major {
    color: var(--fg-2);
    font-weight: 700;
}
.heatmap-dlabel {
    font-size: 11px;
    color: var(--fg-2);
    font-weight: 700;
    text-align: right;
    padding-right: 8px;
    letter-spacing: .5px;
}
.heatmap-2d-cell {
    aspect-ratio: 1;
    min-height: 18px;
    border-radius: 3px;
    display: block;
    cursor: default;
    transition: transform 120ms ease, outline 120ms ease, z-index 0s;
    position: relative;
}
.heatmap-2d-cell:hover {
    transform: scale(1.35);
    outline: 1px solid var(--fg);
    z-index: 5;
}
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
    margin-top: 14px;
    font-size: 11px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: .8px;
}
.heatmap-legend span:first-child { margin-right: 6px; }
.heatmap-legend span:last-child  { margin-left: 6px; }
.heatmap-legend-cell {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    display: inline-block;
}

/* --- SVG line/area chart -------------------------------------------- */
.svg-chart {
    width: 100%;
    display: block;
    overflow: visible;
}
.svg-chart circle { transition: r 120ms ease; cursor: default; }
.svg-chart circle:hover { r: 5; }
.chart-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--fg-dim);
    font-size: 13px;
    letter-spacing: .5px;
}

/* --- duration / ratio bars ------------------------------------------ */
.dur-bars {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.dur-row {
    display: grid;
    grid-template-columns: 120px 1fr 110px;
    align-items: center;
    gap: 12px;
}
.dur-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-2);
}
.dur-bar-wrap {
    height: 10px;
    background: var(--bg-4, rgba(255,255,255,.05));
    border-radius: 5px;
    overflow: hidden;
}
.dur-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 600ms cubic-bezier(.4,0,.2,1);
}
.dur-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--fg);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.dur-count small {
    color: var(--fg-dim);
    font-weight: 400;
    font-size: 11px;
}

/* --- empty state ---------------------------------------------------- */
.empty-state {
    padding: 64px 24px;
    text-align: center;
    background: var(--bg-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.empty-state h2 {
    margin: 0 0 10px;
    color: var(--fg);
    font-size: 18px;
    text-transform: none;
    letter-spacing: 0;
}
.empty-state p { margin: 0; font-size: 13px; }
.empty-state code {
    background: var(--bg-3);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent);
}

/* --- stat-card accent colors (add any that aren't already defined) --- */
/* these layer new accents on top of your existing .accent-* classes */
.stat-card.accent-yellow::before { background: #eab308; }
.stat-card.accent-grey::before   { background: #64748b; }
.stat-card.accent-red::before    { background: var(--bad); }

/* --- misc utility --------------------------------------------------- */
.text-center { text-align: center; }






/* =====================================================================
   LE Bans Panel — Pass 3 FIX CSS
   Append to the END of /assets/style.css (or replace the previous
   Pass 3 additions block with this version).
   ===================================================================== */

/* ---------- columns menu: anchored to its button ---------- */
.cols-wrap {
    position: relative;
    display: inline-block;
}
.cols-wrap .cols-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 200px;
    z-index: 50;
    box-shadow: 0 12px 24px -10px rgba(0,0,0,.5);
}
.cols-menu strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg-2);
    margin-bottom: 8px;
}
.cols-menu .col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.cols-menu input[type=checkbox] { width: 14px; height: 14px; margin: 0 }
.cols-menu button { margin-top: 10px; width: 100%; }

/* ---------- sticky filter bar ---------- */
.bans-toolbar { margin-bottom: 14px; }
.sticky-filter {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg-0);
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
    flex-wrap: wrap;
}

.bans-toolbar .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
    margin-left: 2px;
}

/* ---------- saved-filter chips ---------- */
.saved-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}
.saved-chip {
    display: inline-flex;
    align-items: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 3px 3px 10px;
    font-size: 12px;
    gap: 4px;
}
.saved-chip a { color: var(--fg); text-decoration: none }
.saved-chip a:hover { color: var(--accent) }
.saved-chip .chip-del {
    background: transparent;
    border: 0;
    color: var(--fg-dim);
    cursor: pointer;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}
.saved-chip .chip-del:hover { background: var(--bad); color: #fff }

/* ---------- advanced builder ---------- */
.adv-builder {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 10px;
}
.adv-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.adv-row select, .adv-row input[type=text] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: var(--bg-0);
    color: var(--fg);
    border-radius: 6px;
    font-size: 13px;
}
.adv-row input[type=text] { flex: 1 1 180px; min-width: 160px; }
.adv-glue { width: 80px; font-weight: 700; color: var(--accent); }
.adv-remove { width: 28px; padding: 4px 0; }
.adv-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }

/* ---------- list header ---------- */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- bulk bar ---------- */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 10px;
    flex-wrap: wrap;
    animation: slidedown .2s ease;
}
@keyframes slidedown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bulk-count {
    font-weight: 700;
    color: var(--accent);
    font-size: 13px;
}

/* ---------- bans table tweaks ---------- */
.bans-table tr[tabindex]:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: rgba(239,68,68,.08);
}
.row-muted { opacity: .55 }
.admin-link {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px dashed var(--fg-dim);
}
.admin-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- risk badge ---------- */
.risk-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 22px;
    text-align: center;
}
.risk-clean    { background: #4b5563; }
.risk-low      { background: #10b981; }
.risk-medium   { background: #f59e0b; color: #0f1219; }
.risk-high     { background: #f97316; }
.risk-critical { background: var(--bad); box-shadow: 0 0 0 2px rgba(239,68,68,.25); }

/* ---------- linked / evidence / appeal pills ---------- */
.linked-pill, .appeal-pill, .ev-count {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
}
.linked-pill {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: var(--fg);
    cursor: pointer;
}
.linked-pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.appeal-pill {
    background: #f59e0b;
    color: #0f1219;
    text-decoration: none;
}
.appeal-pill:hover { background: #fbbf24; }
.ev-count {
    background: rgba(239,68,68,.15);
    border: 1px solid rgba(239,68,68,.4);
    color: #c4b5fd;
}

/* ---------- keyboard hints footer ---------- */
.kbd-hints {
    text-align: center;
    font-size: 11px;
    color: var(--fg-dim);
    padding: 14px 0;
    letter-spacing: .5px;
}
.kbd-hints kbd {
    display: inline-block;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 3px;
    padding: 1px 6px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
    color: var(--fg);
    margin: 0 2px;
}

/* ---------- drawer ---------- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
    z-index: 100;
    animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(640px, 100vw);
    background: var(--bg-1);
    border-left: 1px solid var(--border);
    z-index: 101;
    display: flex;
    flex-direction: column;
    animation: slideleft .22s ease;
    box-shadow: -20px 0 40px -15px rgba(0,0,0,.6);
}
@keyframes slideleft {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
}
.drawer-head h2 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; }
.drawer-close {
    background: transparent;
    border: 0;
    color: var(--fg-2);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 6px;
}
.drawer-close:hover { background: var(--bg-3, rgba(255,255,255,.08)); color: var(--fg); }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }

.drawer-ban-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.drawer-ban-id {
    font-size: 11px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.drawer-ban-head h3 { margin: 0 0 8px; font-size: 20px; }
.drawer-ids { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-ids code {
    background: var(--bg-0);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--fg-2);
}
.drawer-status { text-align: right; }

.drawer-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}
.d-tab {
    background: transparent;
    color: var(--fg-2);
    border: 0;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.d-tab:hover   { color: var(--fg); }
.d-tab.active  { color: var(--accent); border-bottom-color: var(--accent); }

.drawer-dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px 14px;
    margin: 0 0 20px;
}
.drawer-dl dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg-dim);
    padding-top: 2px;
}
.drawer-dl dd { margin: 0; color: var(--fg); font-size: 13px; }
.drawer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.drawer-history { list-style: none; padding: 0; margin: 0; }
.drawer-history li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}
.dh-when { font-size: 11px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.dh-note { color: var(--fg-2); }

/* evidence grid */
.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.ev-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ev-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: var(--bg-0);
}
.ev-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    text-decoration: none;
    color: var(--fg);
    font-size: 12px;
    min-height: 70px;
}
.ev-icon { font-size: 22px; }
.ev-url { word-break: break-all; color: var(--fg-2); }
.ev-caption { margin: 8px 10px 4px; font-size: 12px; color: var(--fg); }
.ev-card small { padding: 4px 10px 10px; font-size: 10px; }

.ev-add {
    background: var(--bg-2);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
}
.ev-add h4 {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg-2);
}

/* linked list in drawer */
.linked-list { list-style: none; padding: 0; margin: 0; }
.linked-list li { margin-bottom: 6px; }
.linked-row {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--fg);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}
.linked-row:hover { border-color: var(--accent); background: var(--bg-3, rgba(255,255,255,.04)); }
.linked-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.linked-row-mid { font-size: 12px; color: var(--fg-2); }
.link-type {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(239,68,68,.18);
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* appeals */
.appeals-list { list-style: none; padding: 0; margin: 0; }
.appeal-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.appeal-top {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: 8px; flex-wrap: wrap; font-size: 12px;
}
.appeal-msg {
    background: var(--bg-0);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 6px;
    margin: 6px 0;
    font-size: 13px;
    white-space: pre-wrap;
}
.appeal-review { font-size: 12px; margin: 6px 0 0; color: var(--fg-2); }

/* save-filter dialog */
dialog#saveFilterDlg {
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-1);
    color: var(--fg);
    min-width: 320px;
}
dialog#saveFilterDlg::backdrop { background: rgba(0,0,0,.5); }

body.drawer-open { overflow: hidden; }

@media (max-width: 720px) {
    .drawer { width: 100vw; border-left: 0; }
    .kbd-hints { display: none; }
    .sticky-filter { position: static; }
    .drawer-dl { grid-template-columns: 1fr; }
    .drawer-dl dt { padding-top: 8px; }
    .cols-wrap .cols-menu { right: auto; left: 0; }
}



/* =====================================================================
   LE Bans Panel — Pass 3 FIX 2 CSS patch
   Append to END of /assets/style.css. Does NOT remove previous rules —
   only overrides the ones that broke. Can be appended multiple times
   safely; the last rule wins.
   ===================================================================== */

/* ---------------------------------------------------------------------
   CRITICAL: drawer was auto-opening because .drawer { display:flex } in
   the earlier block beat the UA [hidden] rule. Force the HTML attribute
   to win with !important so the drawer can't leak onto the page.
   --------------------------------------------------------------------- */
.drawer[hidden],
.drawer-backdrop[hidden] {
    display: none !important;
}
/* And for the bulk bar + adv builder + cols menu, same story: */
#bulkForm[hidden],
#advBuilder[hidden],
#colsMenu[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------------
   Evidence form: stack fields vertically so narrow drawers don't crush
   the inputs into a 1-char-wide "https://imgur.com/a/..." sliver.
   --------------------------------------------------------------------- */
.ev-add .ev-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.ev-add .ev-field > span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg-2);
    font-weight: 600;
}
.ev-add .ev-field input[type="url"],
.ev-add .ev-field input[type="text"],
.ev-add .ev-field input[type="file"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: var(--bg-0);
    color: var(--fg);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}
.ev-add .ev-field input[type="file"] {
    padding: 5px;
}

/* ---------------------------------------------------------------------
   Columns menu: guarantee it anchors to its button on all screens.
   (The earlier pass 3 stylesheet had an un-wrapped .cols-menu with
   position:absolute that floated at top-left of the page.)
   --------------------------------------------------------------------- */
.cols-wrap {
    position: relative;
    display: inline-block;
}
.cols-wrap > .cols-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 200px;
    z-index: 60;
    box-shadow: 0 12px 24px -10px rgba(0,0,0,.5);
}

/* ---------------------------------------------------------------------
   Risk badge: small minimum width + centred so the "0" clean-badge
   doesn't look squished.
   --------------------------------------------------------------------- */
.risk-badge {
    min-width: 26px;
    text-align: center;
}

/* ---------------------------------------------------------------------
   Bans table: keep the last column (actions) from pushing wide content
   off-screen on mid-size monitors.
   --------------------------------------------------------------------- */
.bans-table td.row-actions {
    text-align: right;
    min-width: 120px;
}

/* ---------------------------------------------------------------------
   Mobile: drawer full-width, move cols menu so it doesn't overflow right
   --------------------------------------------------------------------- */
@media (max-width: 720px) {
    .drawer { width: 100vw; border-left: 0; }
    .kbd-hints { display: none; }
    .sticky-filter { position: static; }
    .drawer-dl { grid-template-columns: 1fr; }
    .drawer-dl dt { padding-top: 8px; }
    .cols-wrap > .cols-menu {
        right: auto;
        left: 0;
    }
}
/* =====================================================================
   LE Bans Panel — Pass 5 / 5.1 style additions
   Append to END of /assets/style.css.
   Lean version — only the bits the redesigned dashboard / geo / risk
   pages actually use. Reuses everything that already lives in the main
   stylesheet (.stat-card, .card, .admin-rankings, .server-card, etc.).
   ===================================================================== */

/* ---------- clickable stat cards ---------- */
.stat-card.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
.stat-card.card-link:hover {
    border-color: var(--border-light);
}

/* ---------- dashboard: tabbed Recent Bans / Recent Gags ---------- */
.bg-tabs {
    display: flex;
    gap: 4px;
}
.bg-tab {
    background: transparent;
    border: 0;
    color: var(--fg-2);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.bg-tab:hover { color: var(--fg); background: var(--bg-3); }
.bg-tab.active {
    color: var(--fg);
    background: var(--bg-3);
}
.bg-tab-count {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9px;
    background: var(--bg-4);
    color: var(--fg-2);
    min-width: 20px;
    text-align: center;
}
.bg-tab.active .bg-tab-count {
    background: var(--accent-glow);
    color: var(--accent);
}
.bg-tab-actions {
    display: flex;
    gap: 6px;
}

/* ---------- top-admins split bar (bans / gags) ---------- */
.rank-bar.rank-bar-gag {
    background: linear-gradient(90deg, #f97316, #fb923c);
}
/* place the gag bar inline with the ban bar (the wrap is flex by default
   in the existing CSS; if not, fall back to inline-block) */
.rank-bar-wrap {
    display: flex;
}
.rank-bar { flex-shrink: 0; }

.rank-legend {
    display: flex;
    gap: 16px;
    padding: 0 20px 14px;
    font-size: 11px;
    color: var(--fg-dim);
}
.rank-swatch {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
}
.rank-swatch.swatch-ban { background: var(--accent); }
.rank-swatch.swatch-gag { background: #f97316; }

/* ---------- server card: badge cluster ---------- */
.server-card .server-badges {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* =====================================================================
   GEO PAGE — country cards & sparklines
   ===================================================================== */
.geo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.geo-card {
    display: block;
    padding: 16px 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--fg);
    transition: border-color var(--transition), transform var(--transition);
}
.geo-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}
.geo-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.geo-flag {
    font-size: 28px;
    line-height: 1;
}
.geo-title { flex: 1; min-width: 0; }
.geo-title strong {
    display: block;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.geo-title small { font-size: 11px; color: var(--fg-dim); }
.geo-n {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.spark-mini {
    display: block;
    width: 100%;
    height: 30px;
    margin: 8px 0 12px;
}
.spark-mini rect { fill: var(--accent); opacity: .55; }
.geo-card:hover .spark-mini rect { opacity: 1; }
.geo-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.geo-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.geo-chip.geo-active { background: var(--bad-bg); color: var(--bad); }
.geo-chip.geo-perm   { background: rgba(239,68,68,.18); color: #c4b5fd; }
.geo-chip.geo-un     { background: rgba(100,116,139,.20); color: #cbd5e1; }
.geo-flag-cell {
    font-size: 18px;
    line-height: 1;
    width: 26px;
    text-align: center;
}

/* duration-bar style used in geo region rollup (inherits from existing) */
.dur-bars { display: flex; flex-direction: column; gap: 8px; }
.dur-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dur-label {
    width: 130px;
    font-size: 13px;
    color: var(--fg);
    font-weight: 500;
}
.dur-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--bg-4);
    border-radius: 4px;
    overflow: hidden;
}
.dur-bar { height: 100%; border-radius: 4px; transition: width .6s ease; }
.dur-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--fg);
    min-width: 70px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.dur-count small { color: var(--fg-dim); font-weight: 500; }

/* =====================================================================
   RISK PAGE — tabs (matches stats.php's pattern in main stylesheet)
   ===================================================================== */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.stats-header h1 { margin: 0; }
.stats-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
}
.tab-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-2);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.tab-btn:hover { color: var(--fg); }
.tab-btn.active {
    background: var(--accent);
    color: #fff;
}

/* =====================================================================
   PASS 6 — Luda Ekipa Esports visual upgrade
   ---------------------------------------------------------------------
   Re-skin layer applied on top of the existing dark theme. Keeps every
   class/markup the panel already uses and just makes them dramatic.
   ===================================================================== */

:root {
  /* New brand gradient — electric violet → hot magenta */
  --le-grad-1: #ef4444;
  --le-grad-2: #f97316;
  --le-grad-3: #06b6d4;             /* cyan for live/positive */
  --le-glow:   0 0 24px rgba(239,68,68,.45);
  --le-glow-cyan: 0 0 22px rgba(6,182,212,.40);
  --le-glow-pink: 0 0 22px rgba(249,115,22,.40);
  --le-elev: 0 14px 50px -10px rgba(0,0,0,.6),
             0 0 0 1px rgba(255,255,255,.04) inset;
}

/* Body becomes a noir canvas with a faint cyber grid + a soft purple
   radial spotlight that follows the layout. Pure CSS, GPU-cheap. */
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(239,68,68,.18), transparent 60%),
    radial-gradient(900px  500px at -10% 110%, rgba(249,115,22,.10), transparent 55%),
    linear-gradient(180deg, #07080d 0%, #0a0c10 100%);
  background-attachment: fixed;
}
body::before {
  content:'';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  z-index: 0;
}
.app-layout, .main-wrapper, main, .topbar { position: relative; z-index: 1; }

/* Tabular numerals everywhere — KPIs and tables stop dancing on update */
.stat-value, .data, .data td, .data th, code, .badge {
  font-variant-numeric: tabular-nums;
}

/* ================================================================
   BRAND MARK — animated conic ring around the LE icon
   ================================================================ */
.brand-icon {
  position: relative;
  background: linear-gradient(135deg, var(--le-grad-1), var(--le-grad-2));
  box-shadow: 0 6px 24px rgba(239,68,68,.45),
              0 0 0 1px rgba(255,255,255,.08) inset;
  z-index: 0;
}
.brand-icon::before {
  content:'';
  position: absolute; inset: -3px;
  border-radius: 13px;
  background: conic-gradient(from 0deg,
              var(--le-grad-1), var(--le-grad-2), var(--le-grad-3),
              var(--le-grad-1));
  filter: blur(6px);
  opacity: .55;
  z-index: -1;
  animation: le-spin 8s linear infinite;
}
@keyframes le-spin { to { transform: rotate(360deg); } }

/* Sidebar gets a subtle cyber edge */
.sidebar {
  background:
    linear-gradient(180deg, #0c0f17 0%, #090b11 100%);
  border-right: 1px solid rgba(239,68,68,.18);
  box-shadow: 1px 0 0 rgba(255,255,255,.02), 0 0 60px -20px rgba(239,68,68,.25);
}
.nav-item {
  position: relative;
  transition: color .15s, background .15s, transform .15s;
}
.nav-item:hover {
  background: rgba(239,68,68,.08);
  color: var(--fg);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(239,68,68,.20), rgba(239,68,68,0));
  color: #fff;
}
.nav-item.active::before {
  content:'';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--le-grad-1), var(--le-grad-2));
  box-shadow: 0 0 14px rgba(239,68,68,.6);
}
.nav-badge {
  background: linear-gradient(135deg, var(--le-grad-1), var(--le-grad-2));
  color: #fff;
  border: 0;
  box-shadow: 0 2px 10px rgba(249,115,22,.35);
}
.nav-badge.pulse { animation: le-pulse 1.6s ease-in-out infinite; }
@keyframes le-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,.65); }
  50%     { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
}

/* ================================================================
   TOPBAR — frosted with a thin gradient underline
   ================================================================ */
.topbar {
  background: rgba(10,12,16,.65);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(239,68,68,.16);
  position: sticky; top: 0;
}
.topbar::after {
  content:''; position:absolute; left:0; right:0; bottom:-1px; height:1px;
  background: linear-gradient(90deg, transparent, var(--le-grad-1) 30%, var(--le-grad-2) 70%, transparent);
  opacity: .35;
}
.user-pill {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.22);
  transition: background .15s, border-color .15s, transform .15s;
}
.user-pill:hover {
  background: rgba(239,68,68,.14);
  border-color: rgba(249,115,22,.35);
  transform: translateY(-1px);
}
.user-avatar {
  background: linear-gradient(135deg, var(--le-grad-1), var(--le-grad-2));
  box-shadow: 0 4px 14px rgba(239,68,68,.35);
}

/* ================================================================
   CARDS — lifting hover, gradient hairline, glassy fill
   ================================================================ */
.card, section.card, .form-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 40%),
    var(--bg-2);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--le-elev);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  border-color: rgba(239,68,68,.22);
  transform: translateY(-1px);
  box-shadow: 0 22px 60px -20px rgba(239,68,68,.35),
              0 0 0 1px rgba(255,255,255,.05) inset;
}
.card-header, section > h2 {
  position: relative;
}
.card-header::after, section > h2::after {
  content:''; position:absolute; left:0; bottom:0; height:1px; width:60px;
  background: linear-gradient(90deg, var(--le-grad-1), var(--le-grad-2));
  opacity:.6;
}

/* ================================================================
   STAT CARDS — KPI tiles with neon accents + animated decoration
   ================================================================ */
.stat-card {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239,68,68,.10), rgba(249,115,22,.04) 60%, transparent),
    var(--bg-2);
  border: 1px solid rgba(239,68,68,.18);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card::before {
  content:''; position:absolute; inset:-1px;
  border-radius: inherit; padding:1px;
  background: linear-gradient(135deg, transparent, rgba(239,68,68,.55), rgba(249,115,22,.45), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(239,68,68,.45); }
.stat-card:hover::before { opacity: 1; }
.stat-card.accent-blue   { border-color: rgba( 6,182,212,.30); }
.stat-card.accent-purple { border-color: rgba(167,139,250,.30); }
.stat-card.accent-orange { border-color: rgba(249,115, 22,.30); }
.stat-card.accent-green  { border-color: rgba( 52,211,153,.30); }
.stat-card.accent-cyan   { border-color: rgba(  6,182,212,.30); }
.stat-card.accent-yellow { border-color: rgba(251,191, 36,.30); }
.stat-card.accent-red    { border-color: rgba(248,113,113,.30); }
.stat-value {
  font-weight: 800; letter-spacing: -1.2px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 60%, #f9a8d4 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(239,68,68,.25);
}
.stat-decoration {
  position: absolute; right: 14px; top: 12px;
  font-size: 32px; opacity: .12;
  filter: drop-shadow(0 0 12px rgba(249,115,22,.5));
  animation: le-float 6s ease-in-out infinite;
}
@keyframes le-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ================================================================
   BUTTONS — sliding gradient on hover, glow on focus
   ================================================================ */
.btn, button[type="submit"] {
  position: relative;
  background: linear-gradient(135deg, var(--le-grad-1), var(--le-grad-2));
  border: 0; color: #fff;
  font-weight: 600; letter-spacing: .2px;
  box-shadow: 0 6px 18px -4px rgba(239,68,68,.45),
              0 0 0 1px rgba(255,255,255,.08) inset;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  background-size: 180% 100%; background-position: 0% 50%;
}
.btn:hover, button[type="submit"]:hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 10px 28px -6px rgba(249,115,22,.55),
              0 0 0 1px rgba(255,255,255,.10) inset;
}
.btn:active { transform: translateY(0); filter: brightness(.92); }
.btn:focus-visible { outline: 2px solid rgba(249,115,22,.7); outline-offset: 2px; }

.btn.ghost {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--fg);
  box-shadow: none;
}
.btn.ghost:hover {
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.45);
  color: #fff;
}
.btn.danger {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  box-shadow: 0 6px 18px -4px rgba(244,63,94,.55),
              0 0 0 1px rgba(255,255,255,.08) inset;
}
.btn.danger:hover { box-shadow: 0 10px 28px -6px rgba(244,63,94,.65); }

/* ================================================================
   INPUTS — glowing focus ring (no harsh outline)
   ================================================================ */
input[type="text"], input[type="number"], input[type="password"],
input[type="email"], input[type="url"], input[type="search"],
select, textarea {
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: var(--fg) !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  transition: border-color .15s, box-shadow .15s, background .15s !important;
}
input:focus, select:focus, textarea:focus {
  outline: 0 !important;
  border-color: rgba(239,68,68,.55) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.18), var(--le-glow) !important;
  background: rgba(239,68,68,.06) !important;
}

/* ================================================================
   BADGES — gradient pills, status colors with neon glow
   ================================================================ */
.badge {
  font-weight: 700; letter-spacing: .4px;
  border: 1px solid transparent;
}
.badge.active, .badge.good {
  background: rgba( 6,182,212,.14);
  color: #67e8f9;
  border-color: rgba( 6,182,212,.32);
  box-shadow: 0 0 10px rgba( 6,182,212,.18);
}
.badge.warn {
  background: rgba(251,191, 36,.14);
  color: #fcd34d;
  border-color: rgba(251,191, 36,.32);
}
.badge.bad {
  background: rgba(244,63, 94,.14);
  color: #fda4af;
  border-color: rgba(244,63, 94,.34);
  box-shadow: 0 0 10px rgba(244,63,94,.18);
}
.badge.perm {
  background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(249,115,22,.10));
  color: #ddd6fe;
  border-color: rgba(167,139,250,.40);
  box-shadow: 0 0 14px rgba(167,139,250,.25);
}

/* ================================================================
   TABLES — row hover lift, header gradient, cleaner separators
   ================================================================ */
.data thead th {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: var(--fg-2);
  background: linear-gradient(180deg, rgba(239,68,68,.06), transparent);
  border-bottom: 1px solid rgba(239,68,68,.18);
}
.data tbody tr {
  transition: background .15s, transform .15s;
}
.data tbody tr:hover {
  background: rgba(239,68,68,.05);
}
.data tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--le-grad-2);
}

/* ================================================================
   FLASH messages — slide-in + glow
   ================================================================ */
.flash, .cw-flash {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  animation: le-slide-in .35s cubic-bezier(.2,.8,.2,1);
  position: relative; overflow: hidden;
}
.flash::before, .cw-flash::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background: linear-gradient(180deg, var(--le-grad-1), var(--le-grad-2));
}
.flash-success, .cw-flash.success { box-shadow: 0 0 18px rgba(6,182,212,.18); }
.flash-error,   .cw-flash.error   { box-shadow: 0 0 18px rgba(244,63, 94,.22); }
.flash-warning, .cw-flash.warn    { box-shadow: 0 0 18px rgba(251,191, 36,.20); }
@keyframes le-slide-in {
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ================================================================
   SERVER CARDS — breathing online dot
   ================================================================ */
.server-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 50%),
    var(--bg-2);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.server-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239,68,68,.30);
  box-shadow: 0 14px 40px -14px rgba(239,68,68,.45);
}
.server-status-dot.online {
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34,211,238,.55);
  animation: le-led 1.8s ease-in-out infinite;
}
@keyframes le-led {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,211,238,.55), 0 0 12px rgba(34,211,238,.55); }
  50%     { box-shadow: 0 0 0 6px rgba(34,211,238,0),  0 0 18px rgba(34,211,238,.85); }
}
.server-status-dot.off {
  background: rgba(95,106,128,.6);
  box-shadow: inset 0 0 0 2px rgba(95,106,128,.4);
}
.player-bar {
  background: linear-gradient(90deg, var(--le-grad-3) 0%, var(--le-grad-1) 60%, var(--le-grad-2) 100%);
  box-shadow: 0 0 14px rgba(239,68,68,.35);
}

/* ================================================================
   ADMIN RANKINGS bars
   ================================================================ */
.rank-bar {
  background: linear-gradient(90deg, var(--le-grad-1), var(--le-grad-2));
  box-shadow: 0 0 12px rgba(249,115,22,.30);
}
.rank-bar.rank-bar-gag {
  background: linear-gradient(90deg, #f59e0b, #f43f5e);
  box-shadow: 0 0 12px rgba(245,158,11,.30);
}

/* ================================================================
   SCROLLBAR — slim cyber
   ================================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(239,68,68,.5) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--le-grad-1), var(--le-grad-2));
  border-radius: 99px;
  border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-clip: padding-box; filter: brightness(1.2); }

/* ================================================================
   SELECTION
   ================================================================ */
::selection { background: rgba(249,115,22,.35); color: #fff; }

/* ================================================================
   PUBLIC BAN-CHECKER hero (check.php) — turn it into a moment
   ================================================================ */
body > .container .brand-icon { animation: le-spin 6s linear infinite; }
.result-banned .icon { animation: le-shake 1.6s ease-in-out infinite; }
@keyframes le-shake {
  0%,100% { transform: rotate(0); }
  20%,60% { transform: rotate(-4deg); }
  40%,80% { transform: rotate(4deg); }
}
.result-clean .icon {
  filter: drop-shadow(0 0 18px rgba(34,211,238,.5));
  animation: le-float 4s ease-in-out infinite;
}

/* ================================================================
   Reduced motion — respect the OS setting
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}

/* Player-name links in bans/gags lists -> player profile */
.player-link { color: inherit; text-decoration: none; }
.player-link:hover { color: #a78bfa; text-decoration: underline; }

/* ================================================================
   BETTER TABLES — polish pass (zebra, sticky bold headers, roomy
   cells, clearer hover, rounded bordered container)
   ================================================================ */
.card .data, .table-wrap .data, .list .data { width: 100%; }
.data thead th {
  padding: 12px 14px !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 1.2px !important;
  color: var(--fg-2) !important;
  background: linear-gradient(180deg, #1b2233, #141a27) !important;
  border-bottom: 2px solid var(--le-grad-2) !important;
  position: sticky; top: 0; z-index: 3;
}
.data tbody td {
  padding: 11px 14px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
  vertical-align: middle;
}
.data tbody tr:nth-child(even) td { background: rgba(255,255,255,.022); }
.data tbody tr:hover td { background: rgba(239,68,68,.14) !important; }
.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--le-grad-2); }
.data tbody tr:last-child td { border-bottom: 0 !important; }
/* rounded, bordered frame around list tables */
.table-wrap {
  border: 1px solid var(--border, #2a3348);
  border-radius: 12px;
  overflow: auto hidden;
  background: var(--bg-2, #11151f);
}
.table-wrap .data { border: 0; }

/* =====================================================================
   LE TACTICAL — typography system + final brand pass (2026-05-31)
   Distinctive type for a CS 1.6 moderation command-center: Chakra Petch
   (techy/military display) + IBM Plex Sans (dense-data body) + JetBrains
   Mono (SteamIDs/IPs). Crimson brand already applied via recolor above.
   ===================================================================== */
:root {
  --font-display: 'Chakra Petch', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --le-grad-3:    #fbbf24;            /* brand ring third stop: amber (fire) */
  --accent:       #ef4444;
  --accent-hover: #dc2626;
}

body { font-family: var(--font-body); letter-spacing: .1px; }

/* Display face on every "command" surface */
h1, h2, h3, h4,
.brand-title, .page-title, .nav-section-label,
.card-header h2, section > h2,
.badge, .btn, button[type="submit"],
.stat-value, .stat-label, .drawer-ban-id,
.lebans-badge__title, .data thead th {
  font-family: var(--font-display);
}
h1, h2, h3, .brand-title, .page-title { letter-spacing: .2px; }
.nav-section-label { letter-spacing: 1.4px; text-transform: uppercase; }
.brand-icon { font-family: var(--font-display); font-weight: 700; letter-spacing: .5px; }
.data thead th { letter-spacing: .8px; text-transform: uppercase; font-size: 11px; }

/* Monospaced identifiers — SteamIDs, IPs, codes read crisply + align */
code, pre, kbd, .mono, samp { font-family: var(--font-mono); }

/* Crimson selection + a slim tactical scrollbar */
::selection { background: rgba(239,68,68,.32); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #6b2230 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7f1d1d, #b91c1c);
  border-radius: 8px; border: 2px solid var(--bg-1, #0f1219);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #b91c1c, #ef4444); }

/* One orchestrated page-load: content rises + fades, staggered. Motion-safe. */
@media (prefers-reduced-motion: no-preference) {
  .main-wrapper main > *,
  .app-layout main > * {
    animation: le-rise .5s cubic-bezier(.2,.7,.2,1) both;
  }
  .main-wrapper main > *:nth-child(1) { animation-delay: .02s; }
  .main-wrapper main > *:nth-child(2) { animation-delay: .07s; }
  .main-wrapper main > *:nth-child(3) { animation-delay: .12s; }
  .main-wrapper main > *:nth-child(4) { animation-delay: .17s; }
  .main-wrapper main > *:nth-child(n+5){ animation-delay: .22s; }
  @keyframes le-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* =====================================================================
   LE TACTICAL v2 — refinement polish pass (2026-05-31)
   Depth, rhythm, and micro-interactions layered over the crimson theme.
   ===================================================================== */
:root{
  --le-ring: 0 0 0 3px rgba(239,68,68,.18);
  --le-card-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.7);
}

/* Cards: crisper edge, soft top highlight, smoother lift */
.card, section.card, .form-card, .stat-card{
  border-radius: 14px;
  box-shadow: var(--le-card-shadow);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s, border-color .22s;
}
.card:hover{ transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 44px -16px rgba(239,68,68,.28); }
.card-header, section > h2{ letter-spacing:.3px; }

/* Section headings get a small crimson tick */
section > h2::before, .card-header h2::before{
  content:''; display:inline-block; width:3px; height:1em; vertical-align:-2px;
  margin-right:9px; border-radius:2px;
  background:linear-gradient(180deg,#ef4444,#f97316); box-shadow:0 0 10px rgba(239,68,68,.5);
}

/* Data tables: calmer header, snappier rows, comfortable rhythm */
.data thead th{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  color:var(--fg-2); border-bottom:1px solid var(--border);
  padding:11px 12px; position:sticky; top:0; z-index:1;
}
.data td{ padding:10px 12px; }
.data tbody tr{ transition: background .12s; }
.data tbody tr:hover td{ background:rgba(239,68,68,.07) !important; }
.data tbody tr:hover td:first-child{ box-shadow: inset 3px 0 0 #ef4444; }

/* Buttons: tactile press + consistent focus ring */
.btn, button[type="submit"]{ border-radius:9px; letter-spacing:.2px; transition:transform .12s, box-shadow .2s, filter .2s, background .2s; }
.btn:active, button[type="submit"]:active{ transform:translateY(1px) scale(.99); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:none; box-shadow:var(--le-ring);
}
.btn-sm{ border-radius:7px; }

/* Inputs/selects: unified, calm focus */
input[type=text],input[type=number],input[type=password],input[type=email],input[type=url],input[type=search],select,textarea{
  border-radius:9px !important; transition:border-color .15s, box-shadow .15s, background .15s;
}
input:focus,select:focus,textarea:focus{ box-shadow:var(--le-ring) !important; border-color:rgba(239,68,68,.5) !important; }

/* KPI / stat tiles: a touch more presence */
.stat-card .stat-value, .stat-value{ letter-spacing:-.5px; }
.stat-card{ transition:transform .2s, box-shadow .2s, border-color .2s; }
.stat-card:hover{ transform:translateY(-2px); }

/* Badges: crisp, slightly tighter */
.badge{ border-radius:7px; padding:3px 9px; letter-spacing:.5px; }

/* Flash messages: refined, with a soft glow */
.flash{ border-radius:11px; backdrop-filter:saturate(130%) blur(4px); }

/* Sidebar nav: smoother + clearer active rail (complements the theme) */
.nav-item{ border-radius:0 9px 9px 0; }
.nav-item:hover{ transform:translateX(3px); }

/* Page content rhythm */
.main-wrapper main{ padding-top:6px; }
section{ margin-bottom:22px; }
h1{ letter-spacing:.2px; }

/* Links pick up the crimson accent on hover */
a{ transition:color .12s; }

@media (prefers-reduced-motion: reduce){
  .card, .btn, .nav-item, .stat-card, .data tbody tr{ transition:none !important; }
  .card:hover, .nav-item:hover, .stat-card:hover, .btn:active{ transform:none !important; }
}

/* =====================================================================
   Native <select> dropdowns — keep the option popup readable.
   The select background was rgba(255,255,255,.03) (near-transparent),
   which made the native option list render white -> light text on white
   = unviewable. Force a solid dark background, dark color-scheme, and
   explicit <option> colors so the popup is dark on every browser.
   ===================================================================== */
:root { color-scheme: dark; }
select { background-color: var(--bg-2) !important; color: var(--fg) !important; }
select option,
select optgroup {
  background-color: var(--bg-2) !important;
  color: var(--fg) !important;
}

/* =====================================================================
   SHARP / SQUARED THEME — no rounded boxes.
   Universal override squares every element (cards, panels, buttons,
   inputs, selects, badges, chips, avatars, scoped page styles, …);
   the brand logo keeps its original rounded mark.
   ===================================================================== */
*, *::before, *::after { border-radius: 0 !important; }
.brand-icon { border-radius: 10px !important; }   /* logo unchanged */

/* =====================================================================
   PASS 8 — DUAL THEME SYSTEM + MOBILE HARDENING + COMMAND PALETTE
   (2026-06-10)
   Theme toggle (dark default / light), Ctrl+K command palette, wide
   tables scroll-in-place on mobile, real touch targets. Appended last
   on purpose: these rules must win the cascade over passes 1–7. The
   light-theme block sits at the very END of the file — keep it there.
   ===================================================================== */

/* ---- tokens that pages reference with dark fallbacks. Defining them
       for real kills the live fallback hexes (ban_add / reasons /
       motd_edit chips). They follow the active theme automatically. -- */
:root {
  --input-bg: rgba(255, 255, 255, .04);
  --text: var(--fg);
  --muted: var(--fg-dim);
  --overlay: rgba(4, 8, 18, .58);
}

/* ---- danger ghost buttons — pages adopt .btn.ghost.del ------------ */
.btn.ghost.del { color: var(--bad); }
.btn.ghost.del:hover {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: var(--bad);
}

/* ---- topbar utility buttons: theme toggle + command palette ------- */
.theme-toggle, .palette-btn {
  width: 44px; height: 44px;
  min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.theme-toggle:hover, .palette-btn:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ---- 7×24 heatmap scrolls sideways instead of crushing to 9px ----- */
.heatmap-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.heatmap-2d { min-width: 560px; }

/* ================================================================
   COMMAND PALETTE (Ctrl+K / topbar 🔍) — assets/app.js drives it
   ================================================================ */
.cmdk { position: fixed; inset: 0; z-index: 400; display: none; }
.cmdk.open { display: block; }
.cmdk-backdrop {
  position: absolute; inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cmdk-panel {
  position: relative;
  margin: 12vh auto 0;
  width: 580px;
  max-width: calc(100vw - 28px);
  background: var(--bg-1);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cmdk-in .16s cubic-bezier(.2, .8, .2, 1);
}
@keyframes cmdk-in {
  from { opacity: 0; transform: translateY(-8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 14px;
  border-bottom: 1px solid var(--border);
}
.cmdk-glyph { color: var(--fg-dim); font-size: 15px; flex-shrink: 0; }
.cmdk input.cmdk-input {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--fg) !important;
  font-size: 15px;
  font-family: var(--font-body, inherit);
  padding: 13px 0 !important;
}
.cmdk-list {
  max-height: min(420px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}
.cmdk-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  color: var(--fg-2);
  font-size: 13.5px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.cmdk-ico { width: 22px; text-align: center; flex-shrink: 0; font-size: 15px; }
.cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-label b { color: var(--accent); font-weight: 700; }
.cmdk-sec {
  font-size: 10px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--fg-dim);
  flex-shrink: 0;
}
.cmdk-item.sel {
  background: var(--accent-glow);
  color: var(--fg);
  border-left-color: var(--accent);
}
.cmdk-item.cmdk-search .cmdk-ico { color: var(--accent); }
.cmdk-empty { padding: 18px 16px; color: var(--fg-dim); font-size: 13px; text-align: center; }
.cmdk-foot {
  display: flex; gap: 14px; justify-content: flex-end;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--fg-dim);
}
.cmdk-foot kbd {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 5px;
  margin-right: 4px;
}
@media (max-width: 768px) {
  .cmdk-panel {
    width: auto; max-width: none;
    margin: 12px 10px 0;
  }
  .cmdk-list { max-height: 60vh; }
  .cmdk-foot { display: none; }
}

/* ================================================================
   MOBILE — wide tables scroll inside themselves (fixes every 5–9
   column page without touching markup) + chrome touch targets
   ================================================================ */
@media (max-width: 768px) {
  table.data {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.data::-webkit-scrollbar { height: 6px; }
  table.data::-webkit-scrollbar-track { background: transparent; }
  table.data::-webkit-scrollbar-thumb { background: var(--bg-4); }

  .logout-btn   { width: 44px; height: 44px; }
  .mobile-toggle { width: 44px; height: 44px; }

  /* open sidebar locks the page behind it */
  body.sidebar-open { overflow: hidden; }
}
.sidebar, .sidebar-nav { overscroll-behavior: contain; }

/* ---- TOUCH: real finger targets (last in file → wins source order) */
@media (hover: none) {
  table.data input[type=checkbox],
  .cols-menu input[type=checkbox] { width: 22px; height: 22px; }
  .saved-chip .chip-del { width: 32px; height: 32px; min-height: 32px; font-size: 18px; }
  .adv-remove { width: 40px; min-height: 40px; }
  .logout-btn, .mobile-toggle, .theme-toggle, .palette-btn { min-width: 44px; min-height: 44px; }
}

/* =====================================================================
   LIGHT THEME — html[data-theme="light"]
   Token flip first, then targeted overrides for the pass-6/7 hotspots
   that hardcode dark values (body canvas, sidebar, topbar, cards,
   KPI gradient text, ghost buttons, inputs, table headers, badges,
   scrollbars, selection). White-alpha "lifts" become ink-alpha
   rgba(20,30,60,…) equivalents. KEEP THIS BLOCK AT THE END OF THE FILE.
   ===================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  --bg-0: #f4f6fa;
  --bg-1: #ffffff;
  --bg-2: #eef1f6;
  --bg-3: #e4e9f2;
  --bg-4: #d8dfeb;
  --border: #d3dae6;
  --border-light: #bfc9da;
  --fg: #16203a;
  --fg-2: #4b5872;
  --fg-dim: #7d899f;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-glow: rgba(239, 68, 68, .12);
  --accent-glow-strong: rgba(239, 68, 68, .25);
  --good: #059669;  --good-bg: rgba(5, 150, 105, .10);
  --warn: #b45309;  --warn-bg: rgba(180, 83, 9, .10);
  --bad: #dc2626;   --bad-bg: rgba(220, 38, 38, .10);
  --perm: #7c3aed;  --perm-bg: rgba(124, 58, 237, .10);
  --shadow-card: 0 1px 3px rgba(20, 30, 60, .10);
  --shadow-lg: 0 10px 40px rgba(20, 30, 60, .15);
  --input-bg: #ffffff;
  --text: var(--fg);
  --muted: var(--fg-dim);
  --overlay: rgba(20, 30, 60, .40);
  --le-glow: 0 0 24px rgba(239, 68, 68, .18);
  --le-glow-cyan: 0 0 22px rgba(6, 182, 212, .16);
  --le-glow-pink: 0 0 22px rgba(249, 115, 22, .16);
  --le-elev: 0 10px 36px -12px rgba(20, 30, 60, .16),
             0 0 0 1px rgba(20, 30, 60, .03) inset;
  --le-ring: 0 0 0 3px rgba(239, 68, 68, .14);
  --le-card-shadow: 0 1px 0 rgba(255, 255, 255, .65) inset,
                    0 8px 24px -14px rgba(20, 30, 60, .22);
}

/* body canvas: airy gradient + faint ink grid (was noir + white grid) */
[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(239, 68, 68, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(249, 115, 22, .05), transparent 55%),
    linear-gradient(180deg, #eef1f7 0%, #f4f6fa 100%);
  background-attachment: fixed;
}
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(20, 30, 60, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 30, 60, .04) 1px, transparent 1px);
}

/* sidebar + nav */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(20, 30, 60, .03), 0 0 60px -20px rgba(239, 68, 68, .08);
}
[data-theme="light"] .nav-item.active { color: var(--accent-hover); }

/* topbar: frosted light */
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--border);
}

/* cards & server cards: ink-alpha lift instead of white-alpha */
[data-theme="light"] .card,
[data-theme="light"] section.card,
[data-theme="light"] .form-card {
  background: linear-gradient(180deg, rgba(20, 30, 60, .022), transparent 40%), var(--bg-2);
  border: 1px solid var(--border);
}
[data-theme="light"] .card:hover {
  border-color: rgba(239, 68, 68, .35);
  box-shadow: 0 18px 44px -18px rgba(239, 68, 68, .22),
              0 0 0 1px rgba(20, 30, 60, .04) inset;
}
[data-theme="light"] .server-card {
  background: linear-gradient(180deg, rgba(20, 30, 60, .022), transparent 50%), var(--bg-2);
  border: 1px solid var(--border);
}

/* KPI numbers: deep-ink gradient (pass-6 white→lilac is invisible here) */
[data-theme="light"] .stat-value {
  background: linear-gradient(135deg, #16203a 0%, #6d28d9 65%, #be185d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

/* ghost buttons: ink-alpha fills, accent hover keeps readable text */
[data-theme="light"] .btn.ghost {
  background: rgba(20, 30, 60, .035);
  border: 1px solid rgba(20, 30, 60, .18);
  color: var(--fg);
}
[data-theme="light"] .btn.ghost:hover {
  background: var(--accent-glow);
  border-color: rgba(239, 68, 68, .5);
  color: var(--accent-hover);
}
[data-theme="light"] .btn.ghost.del { color: var(--bad); }
[data-theme="light"] .btn.ghost.del:hover {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: var(--bad);
}

/* inputs: white fields with a real border (pass-6 forces white-alpha
   via !important, so these need !important + later source position) */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="url"],
[data-theme="light"] input[type="search"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--input-bg) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--fg) !important;
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: rgba(239, 68, 68, .55) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .13) !important;
  background: #ffffff !important;
}
[data-theme="light"] select,
[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: #ffffff !important;
  color: var(--fg) !important;
}

/* tables: light header instead of the hardcoded #1b2233 gradient */
[data-theme="light"] .data thead th {
  background: linear-gradient(180deg, #eaeef6, #e0e6f0) !important;
  color: var(--fg-2) !important;
}
[data-theme="light"] .data tbody td { border-bottom: 1px solid rgba(20, 30, 60, .08) !important; }
[data-theme="light"] .data tbody tr:nth-child(even) td { background: rgba(20, 30, 60, .025); }
[data-theme="light"] .data tbody tr:hover td { background: rgba(239, 68, 68, .07) !important; }
[data-theme="light"] table.data.kv th { background: var(--bg-3); }

/* badges: ink-on-tint (pass-6 pastel text washes out on light) */
[data-theme="light"] .badge.active,
[data-theme="light"] .badge.good {
  background: rgba(5, 150, 105, .10); color: #047857;
  border-color: rgba(5, 150, 105, .35); box-shadow: none;
}
[data-theme="light"] .badge.warn {
  background: rgba(180, 83, 9, .10); color: #b45309;
  border-color: rgba(180, 83, 9, .35);
}
[data-theme="light"] .badge.bad {
  background: rgba(220, 38, 38, .10); color: #b91c1c;
  border-color: rgba(220, 38, 38, .35); box-shadow: none;
}
[data-theme="light"] .badge.perm {
  background: rgba(124, 58, 237, .10); color: #6d28d9;
  border-color: rgba(124, 58, 237, .40); box-shadow: none;
}

/* flash hairline: ink-alpha; drop the dark frosted blur */
[data-theme="light"] .flash,
[data-theme="light"] .cw-flash { border-color: rgba(20, 30, 60, .12); backdrop-filter: none; }

/* drawers + dialog backdrops */
[data-theme="light"] .drawer { box-shadow: -20px 0 40px -15px rgba(20, 30, 60, .25); }
[data-theme="light"] .drawer-backdrop { background: var(--overlay); }
[data-theme="light"] dialog#saveFilterDlg::backdrop { background: rgba(20, 30, 60, .35); }

/* legacy chart bits with hardcoded dark greys */
[data-theme="light"] .bar-label { color: var(--fg-dim); }
[data-theme="light"] .dow-label { color: var(--fg-2); }
[data-theme="light"] .dow-bar-wrap { background: var(--bg-3); }

/* scrollbars: slate thumb (crimson-on-dark thumb reads dirty on light) */
[data-theme="light"] * { scrollbar-color: #b8c2d4 transparent; }
[data-theme="light"] ::-webkit-scrollbar-track { background: transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c4cddd, #aab6ca);
  border: 2px solid var(--bg-1);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ef4444, #dc2626); }

/* selection: ink on soft red */
[data-theme="light"] ::selection { background: rgba(239, 68, 68, .20); color: #16203a; }
