/* ══════════════════════════════════════════════════════════════════════════
   Admin Hub — Stylesheet
   InvisionCommunity / XenForo-inspired: compact sidebar, data tables,
   professional information density, role-coloured badges.

   Loads after style.css. Uses --h-* design tokens scoped to body.hub-body
   so the public site is completely unaffected.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Hub design tokens ───────────────────────────────────────────────────────
   All hub components reference --h-* so this file is self-contained.
   We also override the key style.css vars (--muted, --border, --bg, --text)
   within hub-body so JS-generated inline styles resolve to neutral values
   rather than the site's olive-green palette.                               */

body.hub-body {
  /* Neutral dark palette (not green-tinted) */
  --h-bg:        #141414;
  --h-sidebar:   #0e0e0e;
  --h-surface:   #1c1c1c;
  --h-surface2:  #222222;
  --h-border:    #2a2a2a;
  --h-border2:   #363636;
  --h-text:      #cfcfcf;
  --h-muted:     #888888;
  --h-accent:    #c8a84b;
  --h-accent2:   #d9bb68;
  --h-accent-bg: rgba(200,168,75,0.09);
  --h-accent-bd: rgba(200,168,75,0.28);
  --h-green:     #4caf87;
  --h-red:       #e05c5c;
  --h-blue:      #7aa4ef;
  --h-r:         5px;
  --h-r-sm:      3px;

  /* Override site-level vars so JS inline styles (var(--muted) etc.) are neutral */
  --muted:  #888888;
  --text:   #cfcfcf;
  --border: #2a2a2a;
  --bg:     #141414;
  --surface: #1c1c1c;
  --accent:  #c8a84b;
  --accent2: #d9bb68;

  overflow: hidden;
  font-size: 13px;
  background: var(--h-bg);
  color: var(--h-text);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.hub {
  display: grid;
  grid-template-columns: 228px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sidebar {
  background: var(--h-sidebar);
  border-right: 1px solid var(--h-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 50px;
  border-bottom: 1px solid var(--h-border);
  flex-shrink: 0;
}
.sidebar-logo {
  font-family: var(--ff-head);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--h-text);
}
.sidebar-logo .accent { color: var(--h-accent); }
.sidebar-title {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--h-muted);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 10px;
}
.sidebar-nav::-webkit-scrollbar { width: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--h-border2); }

/* Group labels */
.snav-group-label {
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #4a4a4a;
  padding: 14px 16px 3px;
  user-select: none;
}
.sidebar-nav > .snav-group-label:first-child { padding-top: 8px; }

/* Nav items */
.snav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 16px;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: #6e6e6e;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  position: relative;
}
.snav-item svg { flex-shrink: 0; opacity: 0.6; transition: opacity 0.12s; }
.snav-item:hover {
  color: var(--h-text);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--h-border2);
}
.snav-item:hover svg { opacity: 0.85; }
.snav-item.active {
  color: var(--h-accent);
  background: var(--h-accent-bg);
  border-left-color: var(--h-accent);
  font-weight: 600;
}
.snav-item.active svg { opacity: 1; }

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--h-border);
  padding: 11px 16px;
  flex-shrink: 0;
}
.sf-user { margin-bottom: 8px; }
.sf-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--h-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-role {
  font-size: 0.67rem;
  color: var(--h-muted);
  margin-top: 2px;
}
.sf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sf-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--h-muted);
  text-decoration: none;
  transition: color 0.12s;
}
.sf-link:hover { color: var(--h-text); }
.sf-logout {
  margin-left: auto;
  background: none;
  border: 1px solid var(--h-border2);
  color: var(--h-muted);
  font-family: var(--ff-body);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--h-r-sm);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.sf-logout:hover { color: var(--h-red); border-color: rgba(224,92,92,0.4); }

/* ── Hub main ────────────────────────────────────────────────────────────── */

.hub-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--h-bg);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 24px;
  background: var(--h-sidebar);
  border-bottom: 1px solid var(--h-border);
  gap: 16px;
  flex-shrink: 0;
}
.topbar-title {
  font-family: var(--ff-head);
  font-size: 1.22rem;
  letter-spacing: 0.04em;
  color: var(--h-text);
}
.topbar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.topbar-alert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(224,92,92,0.1);
  color: #e07b5c;
  border: 1px solid rgba(224,92,92,0.25);
  border-radius: var(--h-r-sm);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.topbar-alert:hover { background: rgba(224,92,92,0.17); }

/* ── Content area ────────────────────────────────────────────────────────── */

.hub-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.hub-content::-webkit-scrollbar { width: 5px; }
.hub-content::-webkit-scrollbar-thumb { background: var(--h-border2); border-radius: 3px; }

.panel { display: none; }
.panel.active { display: block; }

/* ── Stats row ───────────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-tile {
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-top: 3px solid var(--h-accent);
  border-radius: var(--h-r);
  padding: 14px 16px 12px;
}
.stat-value {
  font-family: var(--ff-head);
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  color: var(--h-text);
  line-height: 1;
  margin-bottom: 5px;
}
.stat-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--h-muted);
}

/* ── Section card ────────────────────────────────────────────────────────── */

.section-card {
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r);
  margin-bottom: 14px;
  overflow: hidden;
}
.section-card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--h-border);
  background: var(--h-surface2);
}
.section-card-title {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--h-muted);
}
.section-card-body { padding: 14px; }

/* ── Quick actions ───────────────────────────────────────────────────────── */

.quick-action-list { display: flex; flex-direction: column; gap: 1px; }
.qa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: var(--h-r-sm);
  color: var(--h-text);
  font-family: var(--ff-body);
  font-size: 0.81rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  width: 100%;
}
.qa-item:hover { background: rgba(255,255,255,0.05); }
.qa-item svg { color: var(--h-muted); flex-shrink: 0; }
.qa-item-label { font-weight: 600; }
.qa-item-sub { font-size: 0.7rem; color: var(--h-muted); margin-top: 1px; }
.qa-item-arrow { margin-left: auto; color: var(--h-muted); opacity: 0.4; }

/* Overview pending list (future use) */
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--h-text); }
.pending-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--h-red); flex-shrink: 0; }

/* ── Toolbar (search + filter chips) ────────────────────────────────────── */

.panel-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.toolbar-search svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--h-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r-sm);
  color: var(--h-text);
  font-family: var(--ff-body);
  font-size: 0.8rem;
  padding: 6px 30px 6px 30px;
  outline: none;
  transition: border-color 0.12s;
}
.search-input:focus { border-color: var(--h-accent-bd); }
.search-input::placeholder { color: #4a4a4a; }

.search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--h-muted);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: var(--h-r-sm);
  transition: color 0.12s;
}
.search-clear:hover { color: var(--h-text); }

.chip-group { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--h-border2);
  background: none;
  color: var(--h-muted);
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover { color: var(--h-text); border-color: #555; }
.chip.active {
  background: var(--h-accent-bg);
  border-color: var(--h-accent-bd);
  color: var(--h-accent);
  font-weight: 600;
}

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.count-label { font-size: 0.7rem; color: var(--h-muted); }

/* ── Data table ──────────────────────────────────────────────────────────── */

.table-wrap {
  border: 1px solid var(--h-border);
  border-radius: var(--h-r);
  overflow: hidden;
  background: var(--h-surface);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.data-table thead {
  background: var(--h-surface2);
}
.data-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--h-muted);
  border-bottom: 1px solid var(--h-border);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(42,42,42,0.8);
  color: var(--h-text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.08s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody tr.row--admin { background: rgba(200,168,75,0.02); }
.data-table tbody tr.row--admin:hover { background: rgba(200,168,75,0.05); }
.data-table .col-empty {
  text-align: center;
  padding: 32px;
  color: var(--h-muted);
  font-size: 0.79rem;
}

.cell-primary   { font-weight: 600; font-size: 0.81rem; color: var(--h-text); }
td .cell-secondary { font-size: 0.69rem; color: var(--h-muted); margin-top: 1px; display: block; }
.cell-mono { font-family: 'Courier New', monospace; color: var(--h-muted); }

/* ── Badges & pills ──────────────────────────────────────────────────────── */

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--h-r-sm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.role-pill--top_dod      { background: rgba(224,92,92,0.12);  color: #e07b5c; border-color: rgba(224,92,92,0.28); }
.role-pill--senior_admin { background: var(--h-accent-bg);    color: var(--h-accent); border-color: var(--h-accent-bd); }
.role-pill--admin        { background: rgba(122,164,239,0.1); color: var(--h-blue);   border-color: rgba(122,164,239,0.27); }
.role-pill--trial_admin  { background: rgba(136,136,136,0.08);color: var(--h-muted);  border-color: var(--h-border2); }

.plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--h-r-sm);
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.plan-pill--active { background: rgba(76,175,135,0.1);  color: var(--h-green); border-color: rgba(76,175,135,0.25); }
.plan-pill--none   { background: rgba(136,136,136,0.07);color: var(--h-muted); border-color: var(--h-border); }

.perm-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--h-r-sm);
  font-size: 0.63rem;
  font-weight: 600;
  background: var(--h-accent-bg);
  color: var(--h-accent);
  border: 1px solid var(--h-accent-bd);
}

.temp-tag {
  font-size: 0.63rem;
  color: var(--h-accent);
  margin-left: 5px;
  opacity: 0.8;
}
.perm-tag {
  font-size: 0.63rem;
  background: rgba(224,92,92,0.1);
  color: var(--h-red);
  border-radius: var(--h-r-sm);
  padding: 1px 5px;
  margin-left: 5px;
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--h-r-sm);
  border: 1px solid transparent;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hub-badge--muted { background: rgba(255,255,255,0.04); color: var(--h-muted); border-color: var(--h-border2); }

.status-ok   { color: var(--h-green); font-size: 0.77rem; }
.status-flag { color: var(--h-red);   font-size: 0.77rem; }
.status-warn { color: var(--h-accent);font-size: 0.77rem; }

/* ── Row action buttons ──────────────────────────────────────────────────── */

.row-actions { display: flex; gap: 4px; }
.row-btn {
  padding: 4px 10px;
  border-radius: var(--h-r-sm);
  border: 1px solid var(--h-border2);
  background: rgba(255,255,255,0.04);
  color: var(--h-text);
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.row-btn:hover { background: rgba(255,255,255,0.09); border-color: #555; }
.row-btn--primary { background: var(--h-accent-bg); color: var(--h-accent); border-color: var(--h-accent-bd); }
.row-btn--primary:hover { background: rgba(200,168,75,0.17); }
.row-btn--danger  { color: var(--h-red); border-color: rgba(224,92,92,0.22); background: rgba(224,92,92,0.05); }
.row-btn--danger:hover  { background: rgba(224,92,92,0.12); border-color: rgba(224,92,92,0.38); }
.row-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Player modal ────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--h-surface);
  border: 1px solid var(--h-border2);
  border-radius: var(--h-r);
  width: 560px;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}

.modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--h-border);
  background: var(--h-surface2);
  gap: 12px;
  flex-shrink: 0;
}
.modal-title    { font-size: 0.94rem; font-weight: 700; color: var(--h-text); }
.modal-subtitle { font-size: 0.74rem; color: var(--h-muted); margin-top: 2px; }
.modal-close {
  background: none;
  border: none;
  color: var(--h-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--h-r-sm);
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--h-text); background: rgba(255,255,255,0.08); }

.modal-bd {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-bd::-webkit-scrollbar { width: 4px; }
.modal-bd::-webkit-scrollbar-thumb { background: var(--h-border2); border-radius: 2px; }

.modal-section { margin-bottom: 18px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--h-muted);
  margin-bottom: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--h-border);
}
.modal-ids {
  font-size: 0.77rem;
  color: var(--h-muted);
  line-height: 2.1;
  font-family: 'Courier New', monospace;
}

.modal-wl-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.modal-wl-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.79rem;
  color: var(--h-text);
  padding: 3px 0;
}
.modal-empty { font-size: 0.79rem; color: var(--h-muted); font-style: italic; }

/* Management controls */
.modal-controls { display: flex; flex-direction: column; gap: 9px; }
.control-row    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.control-label  {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--h-muted);
  min-width: 62px;
}
.control-select {
  background: var(--h-surface2);
  border: 1px solid var(--h-border2);
  border-radius: var(--h-r-sm);
  color: var(--h-text);
  font-family: var(--ff-body);
  font-size: 0.79rem;
  padding: 5px 8px;
  outline: none;
  flex: 1;
  min-width: 120px;
}
.control-select:focus { border-color: var(--h-accent-bd); }

.preset-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.preset-btn {
  padding: 4px 10px;
  border-radius: var(--h-r-sm);
  border: 1px solid var(--h-border2);
  background: rgba(255,255,255,0.04);
  color: var(--h-muted);
  font-family: var(--ff-body);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.12s;
}
.preset-btn:hover { color: var(--h-text); border-color: #555; background: rgba(255,255,255,0.08); }
.preset-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Roles panel ─────────────────────────────────────────────────────────── */

.role-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.role-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--h-r);
  border: 1px solid;
  min-width: 130px;
}
.role-card-name  { font-size: 0.79rem; font-weight: 600; }
.role-card-count { font-size: 0.68rem; color: var(--h-muted); margin-left: auto; }

.perm-matrix-scroll { overflow-x: auto; }
.perm-matrix-tbl {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}
.perm-matrix-tbl th {
  padding: 7px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--h-muted);
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--h-border);
}
.perm-label-th { text-align: left !important; min-width: 220px; }
.perm-role-th  { min-width: 85px; }
.perm-matrix-tbl td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(42,42,42,0.65);
  vertical-align: middle;
}
.perm-matrix-tbl tbody tr:last-child td { border-bottom: none; }
.perm-matrix-tbl tbody tr:hover { background: rgba(255,255,255,0.02); }
.perm-label-cell { }
.perm-cell { text-align: center; }
.perm-key  { font-size: 0.76rem; font-weight: 600; color: var(--h-text); font-family: 'Courier New', monospace; }
.perm-desc { font-size: 0.68rem; color: var(--h-muted); margin-top: 2px; }
.perm-check { accent-color: var(--h-accent); width: 14px; height: 14px; cursor: pointer; }
.perm-check:disabled { cursor: not-allowed; }
.perm-save-cell { text-align: center; padding: 7px 10px; }
.perm-save-btn {
  padding: 4px 13px;
  border-radius: var(--h-r-sm);
  border: 1px solid var(--h-border2);
  background: rgba(255,255,255,0.04);
  color: var(--h-text);
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.perm-save-btn:hover { background: rgba(255,255,255,0.09); }
.perm-save-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.perm-readonly-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--h-muted);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(136,136,136,0.06);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r-sm);
}

/* ══════════════════════════════════════════════════════════════════════════
   BAN EVIDENCE
   ══════════════════════════════════════════════════════════════════════════ */

/* Log-ban button */
.btn-log-ban {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: var(--h-accent-bg);
  border: 1px solid var(--h-accent-bd);
  border-radius: var(--h-r-sm);
  color: var(--h-accent);
  font-family: var(--ff-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.btn-log-ban:hover { background: rgba(200,168,75,0.16); }

/* ── Ban entry cards ─────────────────────────────────────────────────────── */

.ban-entry {
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-left: 3px solid transparent;
  border-radius: var(--h-r);
  margin-bottom: 5px;
  overflow: hidden;
  transition: border-color 0.12s;
}
.ban-entry:last-child { margin-bottom: 0; }
.ban-entry--has-media { cursor: pointer; }
.ban-entry--expanded .ban-media-zone { display: block !important; }

/* Entry header row */
.ban-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px 0;
  flex-wrap: wrap;
}
.ban-entry-player {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ban-player-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--h-text);
}
.ban-steam-id {
  font-size: 0.69rem;
  color: var(--h-muted);
  font-family: 'Courier New', monospace;
}
.ban-entry-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Entry rule / notes row */
.ban-entry-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 13px;
}
.ban-rule-label {
  font-size: 0.77rem;
  color: var(--h-muted);
  font-family: 'Courier New', monospace;
}
.ban-notes {
  font-size: 0.77rem;
  color: var(--h-text);
  white-space: pre-wrap;
  line-height: 1.5;
  opacity: 0.82;
}

/* Entry footer row */
.ban-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 13px 9px;
  gap: 8px;
}
.ban-logged-by {
  font-size: 0.71rem;
  color: var(--h-muted);
}
.ban-logged-by strong { color: var(--h-text); font-weight: 600; }
.ban-entry-actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* Ban action buttons */
.ban-action-btn {
  padding: 3px 9px;
  border-radius: var(--h-r-sm);
  border: 1px solid var(--h-border2);
  background: rgba(255,255,255,0.04);
  color: var(--h-muted);
  font-family: var(--ff-body);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.ban-action-btn:hover { color: var(--h-text); background: rgba(255,255,255,0.08); border-color: #555; }
.ban-action-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ban-delete-btn  { color: var(--h-red); border-color: rgba(224,92,92,0.2); background: rgba(224,92,92,0.05); }
.ban-delete-btn:hover  { background: rgba(224,92,92,0.12); border-color: rgba(224,92,92,0.35); }

/* ── Ban status badges ───────────────────────────────────────────────────── */

.ban-attach-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--h-r-sm);
  font-size: 0.63rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  background: rgba(122,164,239,0.08);
  color: var(--h-blue);
  border-color: rgba(122,164,239,0.22);
}

.ban-dur-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--h-r-sm);
  font-size: 0.63rem;
  font-weight: 700;
  background: rgba(136,136,136,0.1);
  color: var(--h-muted);
  border: 1px solid var(--h-border2);
}
.ban-dur--perm { background: rgba(224,92,92,0.1); color: var(--h-red); border-color: rgba(224,92,92,0.25); }

.ban-time {
  font-size: 0.67rem;
  color: var(--h-muted);
  white-space: nowrap;
}

/* ── Ban media (expandable) ──────────────────────────────────────────────── */

.ban-media-zone {
  display: none;
  background: rgba(0,0,0,0.22);
  border-top: 1px solid var(--h-border);
  padding: 11px 13px;
}
.ban-media-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ban-media-grid:empty { display: none; }
.ban-media-img-wrap {
  position: relative;
  width: 88px;
  height: 66px;
  border-radius: var(--h-r-sm);
  overflow: hidden;
  border: 1px solid var(--h-border2);
  cursor: pointer;
  flex-shrink: 0;
}
.ban-media-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ban-media-img-wrap:hover::after {
  content: '⤢';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.1rem;
}
.ban-media-video-wrap { margin-top: 6px; }
.ban-media-video-label {
  font-size: 0.7rem;
  color: var(--h-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ban-media-video-wrap video {
  width: 100%;
  max-width: 540px;
  border-radius: var(--h-r-sm);
  border: 1px solid var(--h-border2);
}
.ban-media-video-expand {
  background: none;
  border: none;
  color: var(--h-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 3px;
  opacity: 0.55;
  transition: opacity 0.12s, color 0.12s;
}
.ban-media-video-expand:hover { opacity: 1; color: var(--h-text); }

/* ── Ban list footer ─────────────────────────────────────────────────────── */

.ban-list-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 4px;
  font-size: 0.7rem;
  color: var(--h-muted);
}
#ban-list-sentinel { height: 1px; }

/* ══════════════════════════════════════════════════════════════════════════
   BAN MODALS
   ══════════════════════════════════════════════════════════════════════════ */

.ban-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.ban-modal-card {
  background: var(--h-surface);
  border: 1px solid var(--h-border2);
  border-radius: var(--h-r);
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.ban-modal-card::-webkit-scrollbar { width: 4px; }
.ban-modal-card::-webkit-scrollbar-thumb { background: var(--h-border2); border-radius: 2px; }
.ban-form-modal-card { width: 620px; }
.ban-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--h-border);
  background: var(--h-surface2);
}
.ban-modal-title { font-weight: 700; font-size: 0.91rem; }
.ban-modal-close {
  background: none;
  border: none;
  color: var(--h-muted);
  cursor: pointer;
  font-size: 1rem;
  border-radius: var(--h-r-sm);
  padding: 2px 6px;
  transition: color 0.12s, background 0.12s;
}
.ban-modal-close:hover { color: var(--h-text); background: rgba(255,255,255,0.08); }
.ban-modal-card .auth-form { padding: 18px; }

/* File upload zone */
.ban-file-zone {
  border: 1px dashed var(--h-border2);
  border-radius: var(--h-r);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ban-file-zone:hover,
.ban-file-zone.dragover { border-color: var(--h-accent-bd); background: var(--h-accent-bg); }
.ban-file-zone-text     { display: block; font-size: 0.8rem; color: var(--h-text); margin-top: 7px; }
.ban-file-browse-link   { color: var(--h-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ban-file-zone-sub      { display: block; font-size: 0.7rem; color: var(--h-muted); margin-top: 3px; }

/* File list */
.ban-file-list { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; }
.ban-file-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: var(--h-surface2);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r-sm);
  font-size: 0.76rem;
}
.ban-file-item-icon   { flex-shrink: 0; font-size: 0.88rem; }
.ban-file-item-name   { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--h-text); }
.ban-file-item-size   { color: var(--h-muted); white-space: nowrap; font-size: 0.69rem; }
.ban-file-progress    { width: 78px; height: 3px; background: var(--h-border2); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.ban-file-progress-bar { height: 100%; background: var(--h-accent); transition: width 0.2s; }
.ban-file-pct         { font-size: 0.67rem; color: var(--h-muted); white-space: nowrap; }
.ban-file-status-ok   { font-size: 0.7rem; color: var(--h-green); white-space: nowrap; }
.ban-file-status-err  { font-size: 0.7rem; color: var(--h-red);   white-space: nowrap; cursor: help; }
.ban-file-item-remove {
  background: none;
  border: none;
  color: var(--h-muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0 3px;
  transition: color 0.12s;
  flex-shrink: 0;
}
.ban-file-item-remove:hover { color: var(--h-red); }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.ban-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 1100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ban-lightbox.active { display: flex; }
.ban-lightbox img,
.ban-lightbox video {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--h-r-sm);
  box-shadow: 0 0 60px rgba(0,0,0,0.9);
}
#ban-lightbox-video { display: none; }
.ban-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: color 0.12s;
  background: none;
  border: none;
}
.ban-lightbox-close:hover { color: #fff; }
.ban-lightbox-name { font-size: 0.72rem; color: rgba(255,255,255,0.32); }

/* ══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS PANEL
   ══════════════════════════════════════════════════════════════════════════ */

.notif-section { margin-bottom: 18px; max-width: 540px; }
.notif-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--h-muted);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.notif-card {
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r);
  padding: 14px 16px;
}
.notif-sub-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.81rem;
  margin-bottom: 11px;
}
.notif-sub-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.notif-sub-dot--on  { background: var(--h-green); box-shadow: 0 0 5px rgba(76,175,135,0.4); }
.notif-sub-dot--off { background: #444; }
.notif-sub-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.notif-denied-msg   { font-size: 0.76rem; color: var(--h-red); margin-bottom: 9px; line-height: 1.5; }
.notif-feedback { font-size: 0.72rem; min-height: 1.1em; margin-top: 7px; }
.notif-feedback--ok  { color: var(--h-green); }
.notif-feedback--err { color: var(--h-red); }
.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--h-border);
  cursor: pointer;
  gap: 12px;
}
.notif-pref-row:last-of-type { border-bottom: none; }
.notif-pref-label { font-size: 0.8rem; color: var(--h-text); flex: 1; }
.notif-toggle-wrap {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 19px;
  flex-shrink: 0;
}
.notif-toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.notif-toggle-slider {
  position: absolute;
  inset: 0;
  background: #2e2e2e;
  border-radius: 20px;
  transition: background 0.18s;
  cursor: pointer;
}
.notif-toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 13px;
  height: 13px;
  background: #666;
  border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.notif-toggle-wrap input:checked + .notif-toggle-slider { background: rgba(76,175,135,0.28); }
.notif-toggle-wrap input:checked + .notif-toggle-slider::before { transform: translateX(15px); background: var(--h-green); }
.notif-prefs-actions { padding-top: 11px; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.notif-setup-card {
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  border-radius: var(--h-r);
  padding: 32px 28px;
  text-align: center;
  max-width: 440px;
}
.notif-setup-icon  { font-size: 2rem; margin-bottom: 10px; }
.notif-setup-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.notif-setup-desc  { font-size: 0.78rem; color: var(--h-muted); margin-bottom: 14px; line-height: 1.65; }

/* ── Utility buttons ─────────────────────────────────────────────────────── */

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-family: var(--ff-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--h-r-sm);
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  border: none;
}
.btn-primary { background: var(--h-accent); color: #111; border: 1px solid transparent; }
.btn-primary:hover:not(:disabled) { background: var(--h-accent2); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--h-text); border: 1px solid var(--h-border2); }
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Misc / utility ──────────────────────────────────────────────────────── */

.empty-state {
  padding: 36px;
  text-align: center;
  font-size: 0.79rem;
  color: var(--h-muted);
}
.hub-error {
  padding: 36px;
  text-align: center;
  font-size: 0.79rem;
  color: var(--h-red);
}
.perm-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--h-muted);
}
.perm-denied svg        { margin-bottom: 10px; opacity: 0.3; }
.perm-denied-title      { font-size: 0.87rem; font-weight: 600; color: var(--h-text); margin-bottom: 5px; }
.perm-denied p          { font-size: 0.78rem; }
