/*
 * KZG V4.6.1 Layout Correction
 * Visual-only correction layer for CSS-Bans 6.4.1 + KZG V4.6 Fortress.
 * Loaded after V4.6 so it can neutralise stale/high-specificity V4.3/V4.4 rules.
 */
:root{
  --k461-bg:#090c10;
  --k461-surface:#101419;
  --k461-surface-2:#14191f;
  --k461-border:#252c34;
  --k461-border-strong:#333c46;
  --k461-text:#f3f5f7;
  --k461-muted:#8d98a4;
  --k461-red:#ee434b;
  --k461-red-soft:rgba(238,67,75,.12);
  --k461-green:#39c977;
  --k461-blue:#62a9ff;
  --k461-purple:#a77af5;
}

/* ==========================================================
   TOP BAR — compact floating control dock, never a full strip
   ========================================================== */
html[data-kzg-ui-theme|="modern"] body .header-container,
html[data-kzg-ui-theme|="modern"] body .header-container.kzg-v46-header{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  pointer-events:none!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .navbar,
html[data-kzg-ui-theme|="modern"] body .header-container .header.navbar{
  width:max-content!important;
  min-width:0!important;
  max-width:calc(100vw - 286px)!important;
  min-height:54px!important;
  height:auto!important;
  margin-left:auto!important;
  margin-right:18px!important;
  padding:6px 8px!important;
  border:1px solid var(--k461-border)!important;
  border-radius:12px!important;
  background:rgba(12,15,19,.97)!important;
  box-shadow:0 8px 26px rgba(0,0,0,.28)!important;
  pointer-events:auto!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .navbar-item{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  width:auto!important;
  margin:0!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .sidebarCollapse{
  display:none!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .nav-item,
html[data-kzg-ui-theme|="modern"] body .header-container .nav-link{
  margin:0!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .nav-link{
  min-width:38px!important;
  min-height:38px!important;
  display:grid!important;
  place-items:center!important;
  padding:7px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .nav-link:hover{
  background:#151a20!important;
  border-color:#29313a!important;
}
html[data-kzg-ui-theme|="modern"] body #language-dropdown{
  width:112px!important;
  min-width:112px!important;
  max-width:112px!important;
  height:38px!important;
  padding:6px 26px 6px 9px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  background-color:#0d1116!important;
  border-color:#29313a!important;
  border-radius:9px!important;
  color:#dbe1e7!important;
  font-size:11px!important;
}
html[data-kzg-ui-theme|="modern"] body .header-container .avatar,
html[data-kzg-ui-theme|="modern"] body .header-container .avatar img{
  width:36px!important;
  height:36px!important;
}

/* Global search — exists on every main page after the V4.6.1 JS runs. */
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  width:360px!important;
  max-width:36vw!important;
  min-width:250px!important;
  height:38px!important;
  margin:0!important;
  padding:0 9px!important;
  border:1px solid #29313a!important;
  border-radius:9px!important;
  background:#0d1116!important;
  box-shadow:none!important;
  inset:auto!important;
  transform:none!important;
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search:focus-within{
  border-color:#6d3539!important;
  box-shadow:0 0 0 3px rgba(238,67,75,.07)!important;
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search > i{
  flex:0 0 auto;
  margin-right:7px;
  color:#718092;
  font-size:11px;
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search input,
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search #kzg-v4-dashboard-search{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#e8edf2!important;
  font-size:11px!important;
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search input::placeholder{color:#68778a!important;opacity:1!important;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-results{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:25000;
  max-height:390px;
  overflow:auto;
  padding:6px;
  border:1px solid #2c343d;
  border-radius:10px;
  background:#0f1419;
  box-shadow:0 18px 48px rgba(0,0,0,.46);
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result{
  width:100%;
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#dce3e9;
  text-align:left;
}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result:hover{background:#171d24;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result i{color:#8491a0;text-align:center;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result small{display:block;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7f8b98;font-size:9px;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-result em{font-style:normal;color:#657281;font-size:9px;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-search-empty{padding:12px;color:#7f8c99;font-size:10px;}

/* Remove the V4.6 double header offset. CSS-Bans already reserves header space. */
html[data-kzg-ui-theme|="modern"] body #content.main-content{
  padding-top:18px!important;
}
html[data-kzg-ui-theme|="modern"] body .layout-px-spacing{
  padding-left:20px!important;
  padding-right:20px!important;
}

/* ==========================================================
   SIDEBAR — force the intended KZG red active state over old
   indigo/high-specificity legacy selectors.
   ========================================================== */
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active > a,
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.menu.active > a,
html[data-kzg-ui-theme|="modern"] body #sidebar ul.menu-categories li.menu.active > .dropdown-toggle,
html[data-kzg-ui-theme|="modern"] body #sidebar ul.menu-categories li.active > .dropdown-toggle{
  background:var(--k461-red-soft)!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 var(--k461-red)!important;
  border-color:transparent!important;
}
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active > a i,
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active > a svg,
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.menu.active > a i,
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.menu.active > a svg{
  color:var(--k461-red)!important;
  stroke:var(--k461-red)!important;
  filter:none!important;
  text-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li a:hover{
  background:#12171d!important;
  color:#eef1f4!important;
  transform:none!important;
}
html[data-kzg-ui-theme|="modern"] body #sidebar .badge,
html[data-kzg-ui-theme|="modern"] body #sidebar .sidebar-label{
  box-shadow:none!important;
}

/* ==========================================================
   DASHBOARD — compact intro, neutral alerts, less glow/clutter
   ========================================================== */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{
  max-width:1580px!important;
  margin:0 auto!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{
  width:min(760px,100%)!important;
  min-height:0!important;
  padding:17px 21px!important;
  margin:0 0 14px 0!important;
  border-radius:11px!important;
  background:#101419!important;
  border:1px solid #252c34!important;
  box-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero:before,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero:after{display:none!important;content:none!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero h1{
  margin:0 0 5px!important;
  font-size:27px!important;
  line-height:1.12!important;
  letter-spacing:-.03em!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero p{
  margin:0!important;
  max-width:620px!important;
  color:#8d98a4!important;
  font-size:12px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-eyebrow,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero-meta{
  display:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero-logo{
  max-width:56px!important;
  max-height:56px!important;
  opacity:.9!important;
}

html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .alert-success,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .alert.alert-success,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .alert[class*="success"]{
  min-height:44px!important;
  margin:0 0 14px!important;
  padding:10px 14px!important;
  border:1px solid rgba(57,201,119,.28)!important;
  border-radius:9px!important;
  background:#0d1a16!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#72dda6!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .alert-success:before,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .alert-success:after{display:none!important;background:none!important;content:none!important;}

/* KPI cards: consistent surfaces; accents convey meaning without neon panels. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats .card,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats [class*="card"]{
  min-height:86px!important;
  background:#101419!important;
  border:1px solid #252c34!important;
  box-shadow:none!important;
  filter:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats .card-body{padding:13px 15px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats i,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats [class*="stat-icon"]{
  box-shadow:none!important;
  text-shadow:none!important;
  filter:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats h1{font-size:24px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-stats p{font-size:10px!important;}

/* Do not trap the dashboard in a second vertical scroll container. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-v46-server-reserve,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .table-responsive:has(#serverList){
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:visible!important;
  overflow-x:auto!important;
  scrollbar-gutter:auto!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList > tr{height:62px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList .kzg-v44-map-thumb,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList .kzg-v43-map-thumb,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList .kzg-v44-map-thumb img,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList .kzg-v43-map-thumb img{
  width:90px!important;
  min-width:90px!important;
  height:50px!important;
}

/* Legacy chart/top-player blocks are not part of the compact operations home. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .top-players{display:none!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .chart-section{display:block!important;margin-top:14px!important;}

/* Recent moderation cards should be readable, not micro text. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #recentBans td,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #recentMutes td{font-size:10.5px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-v44-recent-row small{font-size:8.5px!important;}

/* ==========================================================
   BANS / MUTES / ADMINS LISTS — compact toolbar + clear header
   ========================================================== */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page #content .middle-content{
  max-width:1580px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-card{
  margin-top:0!important;
  border:1px solid #283039!important;
  border-radius:12px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-card > .card-header,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header{
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:10px 15px!important;
  background:#11161b!important;
  border-bottom:1px solid #283039!important;
  text-align:left!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header h1,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header h2,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header h3,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header h4,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header h5,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-header strong{
  margin:0!important;
  text-align:left!important;
  font-size:18px!important;
  line-height:1.2!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-bans .kzg-v47-list-header .btn-success,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-bans .kzg-v47-list-card .btn-success{
  background:var(--k461-red)!important;
  border-color:var(--k461-red)!important;
  box-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-bans .kzg-v47-list-header .btn-success:hover,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-bans .kzg-v47-list-card .btn-success:hover{
  background:#d83a42!important;
  border-color:#d83a42!important;
}

html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-list-card > .card-body{
  padding:14px 16px 16px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dataTables_wrapper,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dt-container{
  color:#9aa4ae!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0 0 12px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools .dataTables_length,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools .dt-length,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools .dataTables_filter,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools .dt-search,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools .kzg-v47-native-filter{
  margin:0!important;
  width:auto!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dataTables_filter label,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dt-search label,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-native-filter label{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  color:#84909d!important;
  font-size:10px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dataTables_filter input,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dt-search input,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-native-filter input{
  width:280px!important;
  min-width:220px!important;
  height:36px!important;
  margin:0!important;
  padding:0 10px!important;
  border:1px solid #29313a!important;
  border-radius:8px!important;
  background:#0d1116!important;
  color:#e8ecef!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dataTables_length select,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dt-length select{
  height:36px!important;
  border-radius:8px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table thead th{
  padding:10px 10px!important;
  background:#162334!important;
  color:#aebdce!important;
  font-size:9.5px!important;
  letter-spacing:.045em!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody td{
  padding:10px!important;
  color:#d7dde3!important;
  font-size:11px!important;
  vertical-align:middle!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody tr{
  border-bottom:1px solid #1d242b!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody tr:hover{background:#12181e!important;}

/* Clean up legacy oversized page/card whitespace. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page #content .card{margin-bottom:18px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page #content .card-header.text-center{text-align:left!important;}

/* ==========================================================
   Responsive behaviour
   ========================================================== */
@media (max-width:1199px){
  html[data-kzg-ui-theme|="modern"] body .header-container .navbar{max-width:calc(100vw - 245px)!important;margin-right:12px!important;}
  html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search{width:300px!important;min-width:200px!important;max-width:32vw!important;}
  html[data-kzg-ui-theme|="modern"] body #language-dropdown{width:98px!important;min-width:98px!important;max-width:98px!important;}
}
@media (max-width:991px){
  html[data-kzg-ui-theme|="modern"] body .header-container .navbar{max-width:calc(100vw - 24px)!important;margin-right:12px!important;}
  html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search{width:min(330px,46vw)!important;min-width:0!important;max-width:46vw!important;}
  html[data-kzg-ui-theme|="modern"] body #content.main-content{padding-top:14px!important;}
  html[data-kzg-ui-theme|="modern"] body .layout-px-spacing{padding-left:12px!important;padding-right:12px!important;}
}
@media (max-width:720px){
  html[data-kzg-ui-theme|="modern"] body .header-container .navbar{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;margin:0 8px!important;}
  html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search{flex:1 1 auto!important;width:auto!important;max-width:none!important;min-width:0!important;}
  html[data-kzg-ui-theme|="modern"] body #language-dropdown{display:none!important;}
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{width:100%!important;}
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-table-tools{align-items:stretch!important;flex-direction:column!important;}
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dataTables_filter input,
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .dt-search input,
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page .kzg-v47-native-filter input{width:100%!important;min-width:0!important;}
}

/* KZG V4.8 stable theme matrix */
html[data-kzg-ui-theme="classic"] body .kzg-v47-theme-button,html[data-kzg-ui-theme="classic"] body .kzg-v47-global-search{background:var(--bs-body-bg,#191e3a)}
html[data-kzg-ui-theme="refined"] body{background:#0d1015!important;color:#e8ebef}
html[data-kzg-ui-theme="refined"] body .sidebar-wrapper{background:#11151b!important;border-right:1px solid #292f38!important;box-shadow:none!important}
html[data-kzg-ui-theme="refined"] body .sidebar-wrapper .menu-categories li.active>a{background:rgba(229,72,80,.10)!important;box-shadow:inset 3px 0 0 #e54850!important;color:#fff!important}
html[data-kzg-ui-theme="refined"] body #content .card{border:1px solid #292f38!important;border-radius:10px!important;background:#12171d!important;box-shadow:0 6px 20px rgba(0,0,0,.16)!important}
html[data-kzg-ui-theme="refined"] body #content .card-header{background:#151a20!important;border-bottom:1px solid #292f38!important}
html[data-kzg-ui-theme="refined"] body #content table thead th{background:#17202b!important;color:#aeb9c4!important}
html[data-kzg-ui-theme="refined"] body #content table tbody tr:hover{background:#151b22!important}
html[data-kzg-ui-theme="refined"] body .btn-primary{background:#d9434b!important;border-color:#d9434b!important}
html[data-kzg-ui-theme="refined"] body .form-control,html[data-kzg-ui-theme="refined"] body .form-select{background:#0f1419!important;border-color:#303842!important;color:#e6ebef!important}
html[data-kzg-ui-theme="refined"] body .header-container{background:transparent!important;box-shadow:none!important;border:0!important}
html[data-kzg-ui-theme="refined"] body .header-container .navbar{width:max-content!important;margin-left:auto!important;margin-right:18px!important;border:1px solid #292f38!important;border-radius:11px!important;background:#11161c!important;padding:6px 8px!important;box-shadow:0 8px 24px rgba(0,0,0,.22)!important}
html[data-kzg-ui-theme="refined"] body #content.main-content{padding-top:18px!important}
html[data-kzg-ui-theme|="modern"] body .header-container{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;pointer-events:none!important}
html[data-kzg-ui-theme|="modern"] body .header-container .navbar{pointer-events:auto!important;width:max-content!important;max-width:calc(100vw - 286px)!important;margin-left:auto!important;margin-right:18px!important;border:1px solid #29313a!important;border-radius:12px!important;background:rgba(12,15,19,.97)!important;box-shadow:0 8px 26px rgba(0,0,0,.28)!important;padding:6px 8px!important}
html[data-kzg-ui-theme|="modern"] body .header-container .navbar-item{display:flex!important;align-items:center!important;gap:7px!important;width:auto!important}
html[data-kzg-ui-theme|="modern"] body .header-container .sidebarCollapse{display:none!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{width:min(720px,100%)!important;min-height:0!important;padding:15px 19px!important;margin:0 0 14px!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero h1{font-size:26px!important;margin-bottom:4px!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero p{font-size:11px!important;margin:0!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .chart-section{display:block!important;margin-top:14px!important;background:transparent!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .chart-section .card{min-height:0!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .chart-section .card-body{padding:10px 12px!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area,html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-avg{min-height:175px!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .interval-container{padding:8px 12px!important;margin:0!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .top-players{display:none!important}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-bans .kzg-v47-list-header .btn-success{background:#e54850!important;border-color:#e54850!important}
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active>a,html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.menu.active>a{background:rgba(229,72,80,.11)!important;color:#fff!important;box-shadow:inset 3px 0 0 #e54850!important}
html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active>a i,html[data-kzg-ui-theme|="modern"] body #sidebar .menu-categories li.active>a svg{color:#e54850!important;stroke:#e54850!important}
@media(max-width:991px){html[data-kzg-ui-theme|="modern"] body .header-container .navbar{max-width:calc(100vw - 24px)!important;margin-right:12px!important}}
@media(max-width:720px){html[data-kzg-ui-theme|="modern"] body .header-container .navbar,html[data-kzg-ui-theme="refined"] body .header-container .navbar{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;margin:0 8px!important}}


/* ==========================================================
   KZG V4.8 STABILITY / VISUAL QA HOTFIX
   Independent theme attribute prevents V4.6 dark-mode races.
   ========================================================== */
@media (min-width: 992px){
  html[data-kzg-ui-theme|="modern"] body .header-container,
  html[data-kzg-ui-theme="refined"] body .header-container{
    position:fixed!important;
    top:10px!important;
    right:18px!important;
    left:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    transform:none!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    pointer-events:none!important;
  }
  html[data-kzg-ui-theme|="modern"] body .header-container .navbar,
  html[data-kzg-ui-theme="refined"] body .header-container .navbar{
    position:relative!important;
    inset:auto!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    transform:none!important;
    pointer-events:auto!important;
  }
  html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search,
  html[data-kzg-ui-theme="refined"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme="refined"] body .kzg-v46-top-search.kzg-v47-global-search{
    flex:0 0 360px!important;
    width:360px!important;
    min-width:360px!important;
    max-width:360px!important;
  }
}

/* Welcome card: intentionally compact, never full width. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{
  width:min(520px,100%)!important;
  max-width:520px!important;
  min-height:0!important;
  padding:10px 14px!important;
  margin:0 0 12px!important;
  overflow:hidden!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero h1{
  font-size:22px!important;
  line-height:1.08!important;
  margin:0 0 2px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero p{
  font-size:10px!important;
  line-height:1.25!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v48-guest.kzg-v47-dashboard .kzg-modern-hero p{display:none!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v48-guest.kzg-v47-dashboard .kzg-modern-hero{padding-top:12px!important;padding-bottom:12px!important;}

/* Brand strip belongs to the sidebar, not an old blue theme fragment. */
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .nav-logo{
  background:#0c1014!important;
  border-color:#20262d!important;
  box-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-text .nav-link{color:#f2f4f6!important;}

/* Collapsed rail: no legacy electric-blue active square. */
@media (min-width:992px){
  html[data-kzg-ui-theme|="modern"] body.kzg-v44-sidebar-collapsed #sidebar #kzg-v4-main-menu>li.menu.active>a,
  html[data-kzg-ui-theme|="modern"] body.kzg-v44-sidebar-collapsed #sidebar .menu-categories>li.menu.active>a,
  html[data-kzg-ui-theme|="modern"] body.kzg-v44-sidebar-collapsed #sidebar .menu-categories>li.active>a{
    background:rgba(229,72,80,.09)!important;
    border:1px solid rgba(229,72,80,.20)!important;
    box-shadow:none!important;
    border-radius:10px!important;
  }
  html[data-kzg-ui-theme|="modern"] body.kzg-v44-sidebar-collapsed #sidebar .menu-categories>li.active>a i,
  html[data-kzg-ui-theme|="modern"] body.kzg-v44-sidebar-collapsed #sidebar .menu-categories>li.active>a svg{
    color:#e54850!important;stroke:#e54850!important;
  }
}

/* Moderation lists: never inject dashboard/server map art into ID cells. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody .kzg-v43-map-thumb,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody .kzg-v44-map-thumb,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-list-page table tbody .kzg-v44-map-fallback{
  display:none!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v48-guest.kzg-v47-list-page th.kzg-v48-ip-col,
html[data-kzg-ui-theme|="modern"] body.kzg-v48-guest.kzg-v47-list-page td.kzg-v48-ip-col{display:none!important;}

/* Charts: fill the space the card already owns, without enlarging the outer cards. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .chart-section .card-body{padding:8px 10px!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-average,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-avg{
  height:225px!important;
  min-height:225px!important;
  max-height:225px!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area .apexcharts-canvas,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-average .apexcharts-canvas,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-avg .apexcharts-canvas,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area svg,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-average svg,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #s-line-area-avg svg{max-height:225px!important;}

/* Scrolling/performance: remove expensive paint effects from persistent surfaces. */
html{scroll-behavior:auto!important;}
html[data-kzg-ui-theme|="modern"] body,
html[data-kzg-ui-theme|="modern"] body #content,
html[data-kzg-ui-theme|="modern"] body .main-container,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper,
html[data-kzg-ui-theme|="modern"] body .header-container{background-attachment:scroll!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html[data-kzg-ui-theme|="modern"] body .card,
html[data-kzg-ui-theme|="modern"] body .widget,
html[data-kzg-ui-theme|="modern"] body .kzg-v46-stat-action,
html[data-kzg-ui-theme|="modern"] body #sidebar a{transition:none!important;}
html[data-kzg-ui-theme|="modern"] body .kzg-v46-stat-action:hover{transform:none!important;}
html[data-kzg-ui-theme|="modern"] body .kzg-v47-overlay{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}

@media(max-width:991px){
  html[data-kzg-ui-theme|="modern"] body .header-container,
  html[data-kzg-ui-theme="refined"] body .header-container{position:relative!important;top:auto!important;right:auto!important;width:100%!important;pointer-events:auto!important;}
  html[data-kzg-ui-theme|="modern"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme|="modern"] body .kzg-v46-top-search.kzg-v47-global-search,
  html[data-kzg-ui-theme="refined"] body .kzg-v47-global-search,
  html[data-kzg-ui-theme="refined"] body .kzg-v46-top-search.kzg-v47-global-search{min-width:0!important;width:min(330px,46vw)!important;max-width:46vw!important;flex:0 1 auto!important;}
}


/* ==========================================================
   KZG V4.9 VISUAL POLISH
   Continuous dashboard blend + capped server summary + Modern Dark.
   ========================================================== */

/* One continuous Modern-family page surface. Remove the hard slab/hero start-stop. */
html[data-kzg-ui-theme|="modern"] body{
  background:
    radial-gradient(1100px 560px at 78% -80px, rgba(196,28,52,.12), transparent 63%),
    radial-gradient(900px 520px at 46% 0, rgba(29,60,112,.08), transparent 66%),
    linear-gradient(180deg,#090d12 0%,#090c10 52%,#080b0e 100%)!important;
  background-attachment:scroll!important;
}
html[data-kzg-ui-theme|="modern"] body .main-container,
html[data-kzg-ui-theme|="modern"] body #content,
html[data-kzg-ui-theme|="modern"] body #content.main-content,
html[data-kzg-ui-theme|="modern"] body .layout-px-spacing,
html[data-kzg-ui-theme|="modern"] body .middle-content{
  background:transparent!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:0!important;
  top:0!important;
  right:0!important;
  width:min(1120px,72vw)!important;
  height:430px!important;
  pointer-events:none!important;
  background:
    radial-gradient(ellipse at 80% 28%,rgba(221,34,57,.18),transparent 36%),
    linear-gradient(90deg,transparent 0%,rgba(9,13,18,.18) 26%,rgba(11,14,19,.74) 100%)!important;
  opacity:.95!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .main-container,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #content,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .layout-px-spacing,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .middle-content,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{
  position:relative!important;
  z-index:1!important;
}

/* Pull dashboard up into the same visual band as the fixed control dock. */
@media (min-width:992px){
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{
    margin-top:-56px!important;
  }
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{
  width:min(500px,100%)!important;
  max-width:500px!important;
  padding:8px 13px!important;
  margin-bottom:10px!important;
  background:linear-gradient(100deg,rgba(16,20,25,.94),rgba(13,17,22,.86))!important;
  border-color:rgba(55,63,73,.72)!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero h1{font-size:21px!important;}

/* Brand header uses exactly the sidebar surface: no two-tone rectangle. */
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .nav-logo{
  background-color:#0a0e13!important;
  border-color:#1d252d!important;
  box-shadow:none!important;
}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .nav-logo{
  background-image:none!important;
}

/* Dashboard summary only: six population-sorted server rows, no nested scrollbar. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .table-responsive:has(#serverList),
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-v46-server-reserve{
  max-height:none!important;
  overflow:visible!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList>tr:nth-child(n+7){display:none!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList>tr{height:58px!important;}

/* Keep recent moderation panels compact enough to remain together beside Servers. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .card:has(#recentBans),
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .card:has(#recentMutes){
  min-height:0!important;
  height:auto!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #recentBans>tr,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #recentMutes>tr{height:auto!important;}

/* The fixed utility dock sits over the same blended canvas, not a separate page strip. */
@media (min-width:992px){
  html[data-kzg-ui-theme|="modern"] body .header-container{z-index:5000!important;}
  html[data-kzg-ui-theme|="modern"] body .header-container .navbar{
    background:rgba(10,14,19,.94)!important;
    border-color:rgba(49,58,68,.86)!important;
  }
}

/* ----------------------------------------------------------
   MODERN DARK — same Modern layout, alternate blue/crimson palette only.
   Palette sampled from the supplied reference; layout remains identical.
   ---------------------------------------------------------- */
html[data-kzg-ui-theme="modern-dark"]{
  --k461-bg:#05090f;
  --k461-surface:#0a111a;
  --k461-surface-2:#0d1722;
  --k461-border:#1d2b3b;
  --k461-border-strong:#2a4058;
  --k461-text:#f2f6fb;
  --k461-muted:#8191a6;
  --k461-red:#ff344f;
  --k461-red-soft:rgba(255,52,79,.12);
  --k461-blue:#2387ff;
  --k461-purple:#637dff;
  --k47-accent:#ff344f;
  --k47-bg:#060b12;
  --k47-surface:#0b121c;
  --k47-border:#203044;
  --k47-text:#edf4fb;
  --k47-muted:#7f91a7;
}
html[data-kzg-ui-theme="modern-dark"] body{
  background:
    radial-gradient(950px 600px at 16% -70px,rgba(27,104,228,.20),transparent 62%),
    radial-gradient(900px 580px at 91% 5%,rgba(239,31,66,.19),transparent 58%),
    linear-gradient(180deg,#050a12 0%,#070c13 54%,#05090e 100%)!important;
}
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard::before{
  background:
    linear-gradient(90deg,rgba(7,12,19,0) 0%,rgba(9,16,27,.20) 28%,rgba(8,12,19,.78) 100%),
    radial-gradient(ellipse at 84% 28%,rgba(239,31,66,.23),transparent 38%),
    radial-gradient(ellipse at 35% 12%,rgba(30,101,228,.17),transparent 48%)!important;
}
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper{
  background-image:
    linear-gradient(rgba(3,7,12,.55),rgba(3,7,12,.55)),
    url('/theme/kzg-v4.9/modern-dark-sidebar.webp')!important;
  background-size:cover!important;
  background-position:center top!important;
  background-repeat:no-repeat!important;
  background-color:#050a10!important;
}
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .nav-logo{
  background:rgba(5,10,16,.80)!important;
  border-color:rgba(45,70,98,.55)!important;
}
html[data-kzg-ui-theme="modern-dark"] body #sidebar .menu-categories li.active>a,
html[data-kzg-ui-theme="modern-dark"] body #sidebar .menu-categories li.menu.active>a{
  background:linear-gradient(90deg,rgba(255,52,79,.16),rgba(25,91,183,.08))!important;
  box-shadow:inset 3px 0 0 #ff344f!important;
}
html[data-kzg-ui-theme="modern-dark"] body #sidebar .menu-categories li.active>a i,
html[data-kzg-ui-theme="modern-dark"] body #sidebar .menu-categories li.active>a svg{color:#ff344f!important;stroke:#ff344f!important;}
html[data-kzg-ui-theme="modern-dark"] body .header-container .navbar,
html[data-kzg-ui-theme="modern-dark"] body .kzg-v47-global-search,
html[data-kzg-ui-theme="modern-dark"] body .kzg-v46-top-search.kzg-v47-global-search{
  background:rgba(6,12,20,.95)!important;
  border-color:#21344b!important;
}
html[data-kzg-ui-theme="modern-dark"] body .kzg-v47-global-search:focus-within{
  border-color:#a32643!important;
  box-shadow:0 0 0 3px rgba(255,52,79,.07)!important;
}
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-hero,
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-stats .card,
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-stats [class*="card"]{
  background:linear-gradient(105deg,rgba(10,18,29,.95),rgba(10,14,22,.92))!important;
  border-color:#1e3044!important;
}
html[data-kzg-ui-theme="modern-dark"] body .card,
html[data-kzg-ui-theme="modern-dark"] body .widget{border-color:#1d2d40!important;}

@media(max-width:991px){
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{margin-top:0!important;}
}
html[data-kzg-ui-theme="modern-dark"] body #sidebar,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper.kzg-v4-sidebar{
  background-color:transparent!important;
}

/* ==========================================================
   KZG V5.0 BLEND + LAYOUT CORRECTION
   Fixes V4.9 hard background blocks and restores the dashboard
   server viewport used before the six-row cap regression.
   ========================================================== */

/* Modern family: use the supplied artwork as the actual page canvas.
   The first gradient darkens/fades the image into the normal page surface,
   so there is no rectangular hero start/stop. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard{
  background-color:#070a0e!important;
  background-image:
    linear-gradient(180deg,rgba(5,8,12,.25) 0%,rgba(6,9,13,.40) 42%,rgba(7,10,14,.76) 72%,#070a0e 100%),
    url('/theme/kzg-v5.0/modern-main.webp')!important;
  background-size:calc(100% - 232px) auto!important;
  background-position:right top!important;
  background-repeat:no-repeat!important;
  background-attachment:scroll!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard::before{display:none!important;content:none!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .main-container,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #content,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #content.main-content,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .layout-px-spacing,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .middle-content,
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{
  background:transparent!important;
}

/* Header/search must sit on the same canvas, never its own opaque page-wide slab. */
html[data-kzg-ui-theme|="modern"] body .header-container{background:transparent!important;box-shadow:none!important;border:0!important;}
html[data-kzg-ui-theme|="modern"] body .header-container .navbar{
  background:rgba(7,10,14,.88)!important;
  border-color:rgba(66,75,86,.62)!important;
  box-shadow:0 6px 20px rgba(0,0,0,.22)!important;
}

/* Keep the dashboard tucked into the top composition without colliding with the dock. */
@media (min-width:992px){
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{margin-top:-54px!important;}
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-hero{
  width:min(480px,100%)!important;
  max-width:480px!important;
  padding:7px 12px!important;
  margin-bottom:10px!important;
  background:rgba(10,14,19,.82)!important;
  border-color:rgba(63,72,82,.58)!important;
}

/* Sidebar is one coherent surface, including the KZG brand header. */
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .nav-logo{
  background-color:#080b0f!important;
  border-color:#1d232a!important;
}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .nav-logo{background-image:none!important;}

/* Bottom-only three-person sidebar scene. 65% dark veil + upward fade. */
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper{position:fixed!important;overflow:hidden!important;}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  left:0!important;right:0!important;bottom:0!important;
  height:min(430px,48vh)!important;
  pointer-events:none!important;
  background-image:
    linear-gradient(180deg,#080b0f 0%,rgba(8,11,15,.82) 16%,rgba(8,11,15,.65) 40%,rgba(8,11,15,.65) 100%),
    url('/theme/kzg-v5.0/modern-sidebar-bottom.webp')!important;
  background-size:cover!important;
  background-position:center bottom!important;
  background-repeat:no-repeat!important;
  opacity:1!important;
}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper::after{
  content:""!important;position:absolute!important;z-index:1!important;left:0;right:0;bottom:0;height:min(430px,48vh)!important;
  pointer-events:none!important;background:linear-gradient(180deg,#080b0f 0%,transparent 36%,transparent 100%)!important;
}
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper #sidebar,
html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper .theme-brand{position:relative!important;z-index:2!important;}

/* Restore the pre-V4.9 dashboard server viewport: all servers exist and can scroll. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList>tr:nth-child(n+7){display:table-row!important;}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .table-responsive:has(#serverList),
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-v46-server-reserve{
  height:clamp(430px,49vh,590px)!important;
  min-height:clamp(430px,49vh,590px)!important;
  max-height:clamp(430px,49vh,590px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable!important;
}
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard #serverList>tr{height:62px!important;}

/* Keep the two right-side moderation cards sharing the same server-column height. */
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .card:has(#recentBans),
html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .card:has(#recentMutes){
  min-height:0!important;
  max-height:none!important;
}

/* Modern Dark: same structure, darker navy/black interpretation of the supplied blue/red palette. */
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard{
  background-color:#03070c!important;
  background-image:
    linear-gradient(180deg,rgba(2,6,11,.56) 0%,rgba(3,8,14,.67) 40%,rgba(3,7,12,.88) 73%,#03070c 100%),
    linear-gradient(110deg,rgba(18,68,145,.18),transparent 48%,rgba(184,22,49,.16)),
    url('/theme/kzg-v5.0/modern-main.webp')!important;
}
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .theme-brand,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .navbar-nav.theme-brand,
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper .nav-logo{background-color:#03070c!important;}
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper::before{
  background-image:
    linear-gradient(180deg,#03070c 0%,rgba(3,7,12,.86) 16%,rgba(3,7,12,.65) 40%,rgba(3,7,12,.65) 100%),
    url('/theme/kzg-v5.0/modern-sidebar-bottom.webp')!important;
}
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper::after{background:linear-gradient(180deg,#03070c 0%,transparent 36%,transparent 100%)!important;}
html[data-kzg-ui-theme="modern-dark"] body .header-container .navbar{background:rgba(3,8,14,.91)!important;border-color:rgba(37,59,84,.72)!important;}
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-hero,
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-stats .card,
html[data-kzg-ui-theme="modern-dark"] body.kzg-v47-dashboard .kzg-modern-stats [class*="card"]{
  background:rgba(5,10,16,.90)!important;border-color:#172536!important;
}

@media(max-width:991px){
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard{background-size:cover!important;background-position:center top!important;}
  html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper::before,
  html[data-kzg-ui-theme|="modern"] body .sidebar-wrapper::after{display:none!important;}
  html[data-kzg-ui-theme|="modern"] body.kzg-v47-dashboard .kzg-modern-dashboard{margin-top:0!important;}
}
/* Ensure the older V4.9 full-height Modern Dark sidebar image cannot remain underneath V5.0. */
html[data-kzg-ui-theme="modern-dark"] body .sidebar-wrapper{background-image:none!important;}
