

:root {
  color-scheme: dark;

  --dg-bg: #0b0f14;
  --dg-bg-deep: #080b10;
  --dg-sidebar: #0b0f14;
  --dg-panel: #10151c;
  --dg-panel-raised: #151c25;
  --dg-control-bg: #0d1218;
  --dg-card: linear-gradient(135deg, rgba(13, 18, 25, .94), rgba(17, 23, 32, .86));

  --dg-line: rgba(255, 255, 255, .08);
  --dg-border: rgba(255, 255, 255, .09);
  --dg-border-soft: rgba(255, 255, 255, .055);
  --dg-border-strong: rgba(255, 255, 255, .16);

  --dg-text: #e6eef6;
  --dg-text-muted: #a6b0bd;
  --dg-text-dim: #738091;

  --dg-highlight: #00bfcf;
  --dg-highlight-rgb: 0, 191, 207;
  --dg-highlight-hover: #33d4e2;
  --dg-highlight-deep: #00737c;
  --dg-highlight-soft: rgba(var(--dg-highlight-rgb), .12);

  --dg-ok: #4ade80;
  --dg-warn: #f6bd38;
  --dg-warning: var(--dg-warn);
  --dg-danger: #ef5b64;
  --dg-info: #5aa9ff;
  --dg-violet: #818cf8;

  --dg-r-sm: 8px;
  --dg-r-md: 10px;
  --dg-r-lg: 14px;
  --dg-r-xl: 16px;
  --dg-ease: cubic-bezier(.16, 1, .3, 1);
  --dg-header-h: 60px;
  --dg-header-offset: 92px;
  --dg-sidebar-w: 264px;

  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --dg-font-display: var(--font-body);
  --dg-font-body: var(--font-body);
  --dg-font-mono: var(--font-body);
}

*, *::before, *::after { box-sizing: border-box; box-shadow: none !important; text-shadow: none !important; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--dg-bg); scrollbar-color: rgba(255, 255, 255, .16) transparent; scrollbar-width: thin; }

body {
  position: relative;
  padding-top: var(--dg-header-offset);
  font: 400 14px/1.45 var(--font-body);
  color: var(--dg-text);
  background-color: var(--dg-bg);
  background-image: radial-gradient(rgba(255, 255, 255, .016) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
textarea { resize: none; }
::selection { background: rgba(var(--dg-highlight-rgb), .32); }
:focus-visible { outline: 2px solid rgba(var(--dg-highlight-rgb), .85); outline-offset: 2px; }
input:focus, input:focus-visible, textarea:focus, textarea:focus-visible, select:focus, select:focus-visible { outline: none; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: rgba(255, 255, 255, .16) padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .26) padding-box; }

.topbar {
  position: fixed;
  z-index: 70;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1260px, calc(100% - 32px));
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background-image: radial-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px), linear-gradient(105deg, rgba(12, 17, 26, .62), rgba(9, 14, 22, .58));
  background-size: 28px 28px, 100% 100%;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar-left, .topbar-right, .topbar-nav { display: flex; align-items: center; min-width: 0; }
.topbar-left { gap: 10px; justify-self: start; }
.topbar-center { display: flex; align-items: center; justify-content: center; min-width: 0; }
.topbar-right { gap: 10px; justify-self: end; }
.topbar-nav { gap: 8px; }

.topbar-brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: .2px; border-radius: 8px; }
.topbar-brand-logo { display: block; width: 30px; height: 30px; object-fit: contain; transition: transform .2s ease; }
.topbar-brand:hover .topbar-brand-logo { transform: scale(1.05); }
.topbar-brand-name { white-space: nowrap; }

.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b8c2cf;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.topbar-link:hover { border-color: rgba(255, 255, 255, .06); background: rgba(8, 13, 20, .45); color: #eef5ff; }

.sidebar-toggle {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: transparent;
  color: #c4cdd8;
  cursor: pointer;
}

.sidebar-toggle:hover { border-color: color-mix(in srgb, var(--dg-highlight) 50%, transparent); color: var(--dg-highlight); }

.site-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - var(--dg-header-offset));
}

.sidebar {
  position: sticky;
  top: var(--dg-header-offset);
  flex: 0 0 260px;
  width: 260px;
  height: calc(100vh - var(--dg-header-offset));
  border-right: 1px solid rgba(255, 255, 255, .04);
  background: transparent;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dg-highlight) 18%, transparent), transparent 50%);
  pointer-events: none;
}

.sidebar-panel { height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 36px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(150, 150, 150, .3) transparent; }
.sidebar-panel::-webkit-scrollbar { width: 5px; }
.sidebar-panel::-webkit-scrollbar-thumb { border: 0; border-radius: 4px; background: rgba(150, 150, 150, .3); }


.sidebar-divider { flex-shrink: 0; height: 1px; min-height: 1px; margin: 8px 6px; background: rgba(255, 255, 255, .12); }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.sidebar-category { display: block; }

.sidebar-group {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px 4px 3px;
  border: 0;
  background: transparent;
  color: #f4f8fc;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: color .18s ease;
}

.sidebar-group:hover { color: #fff; }
.sidebar-group::before { content: ''; grid-column: 1; justify-self: center; width: 3px; height: 12px; border-radius: 999px; background: rgba(0, 206, 220, .72); }

.sidebar-group::after {
  content: '';
  grid-column: 3;
  justify-self: center;
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: .8;
  -webkit-mask: var(--dg-icon-chevron) center/contain no-repeat;
  mask: var(--dg-icon-chevron) center/contain no-repeat;
  transition: transform .2s ease;
}

.sidebar-category.is-collapsed > .sidebar-group::after { transform: rotate(-90deg); }

.sidebar-section { list-style: none; display: flex; flex-direction: column; gap: 1px; margin: 2px 0 0; padding: 0; }
.sidebar-section--root { margin-top: 0; }
.sidebar-category.is-collapsed > .sidebar-section { display: none; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border-left: 3px solid transparent;
  border-radius: 8px;
  color: #c4cdd8;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.nav-link > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; font-size: 16px; opacity: .8; }
.nav-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }

.nav-link.active,
.sidebar-section li.active > .nav-link {
  border-left-color: var(--dg-highlight);
  background: color-mix(in srgb, var(--dg-highlight) 8%, transparent);
  color: var(--dg-highlight);
  font-weight: 600;
}

.main-content { flex: 1; min-width: 0; padding: 30px 36px 100px; overflow-x: hidden; }

.page { display: none; width: 100%; max-width: 1560px; margin: 0 auto; }
.page > .card, .page > .statistics-card, .page > .teamler-card { margin-bottom: 20px; }

.page-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.page-hero-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 56px; height: 56px; border: 2px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .06); color: #fff; font-size: 24px; }
.page-hero-logo { display: block; flex-shrink: 0; width: 56px; height: 56px; object-fit: contain; }
.page-hero-text { min-width: 0; }
.page-hero-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.page-hero h1 { margin: 0; color: #fff; font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.page-hero-sub { margin: 4px 0 0; color: var(--dg-text-muted); font-size: .9rem; }

.dg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--dg-highlight) 25%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--dg-highlight) 12%, transparent);
  color: #00d4e6;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-lead { margin: 0 0 22px; color: var(--dg-text-muted); font-size: .95rem; }

.page-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: var(--dg-highlight);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.content-grid, .teamler-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }

.card, .statistics-card, .teamler-card, .server-log-card, .report-log-card, .audit-log-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-lg);
  background: var(--dg-card);
  transition: border-color .3s var(--dg-ease), background .3s var(--dg-ease);
}

.card::before, .statistics-card::before, .teamler-card::before {
  content: '';
  position: absolute;
  inset: -1px 18px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--dg-highlight-rgb), .35), transparent);
  opacity: 0;
  transition: opacity .3s var(--dg-ease);
  pointer-events: none;
}

.card:hover::before, .statistics-card:hover::before, .teamler-card:hover::before { opacity: 1; }
.card:hover, .statistics-card:hover, .teamler-card:hover { border-color: rgba(var(--dg-highlight-rgb), .2); }

.table-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--dg-border-soft); }
.table-panel-head--actions { justify-content: flex-end; }
.table-panel-head h3 { margin: 8px 0 0; font-size: 1.25rem; line-height: 1.1; letter-spacing: -.03em; }
.table-panel-head p { margin: 10px 0 0; color: var(--dg-text-muted); max-width: 560px; }

.card-head, .server-metric, .toolbar-row, .toolbar-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-card, .home-server-group { display: grid; gap: 14px; }
.home-player-card { display: grid; gap: 10px; }
.server-metrics { display: grid; gap: 10px; }

.user-detail-header, .flag-detail, .details-box {
  padding: 12px 14px;
  border: 1px solid var(--dg-border-soft);
  border-radius: var(--dg-r-md);
  background: rgba(255, 255, 255, .025);
}

.highlight-label { color: var(--dg-text); }
.server-metric .metric-label { color: var(--dg-text); }
.highlight-value { color: var(--dg-highlight); }
.highlight-danger { color: var(--dg-danger); }
.highlight-warning { color: var(--dg-warn); }

.user-name, .metric-value, .loggedin-text { color: var(--dg-text); font-weight: 700; }
.user-meta, .metric-label, .player-list-empty { color: var(--dg-text-muted); margin: 0; }

.status-pill, .flag-badge, .staff-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(var(--dg-highlight-rgb), .3);
  border-radius: 6px;
  background: rgba(var(--dg-highlight-rgb), .1);
  color: var(--dg-highlight);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-pill-muted { border-color: var(--dg-line); background: rgba(255, 255, 255, .04); color: var(--dg-text-muted); }
.flag-badge.red { color: var(--dg-danger); border-color: rgba(239, 91, 100, .35); background: rgba(239, 91, 100, .1); }
.flag-badge.orange { color: var(--dg-warn); border-color: rgba(246, 189, 56, .35); background: rgba(246, 189, 56, .1); }
.flag-badge.blue { color: var(--dg-info); border-color: rgba(90, 169, 255, .35); background: rgba(90, 169, 255, .1); }

.player-list { display: grid; gap: 10px; }
.player-list-title { font-weight: 700; }
.player-list-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
a.player-list-entry:hover { border-color: rgba(var(--dg-highlight-rgb), .45); color: var(--dg-highlight); }
.steamid-link { color: var(--dg-text); }
.steamid-link:hover { color: var(--dg-highlight); }

.login-button, .register-button, .popup-btn, .btn-action, .btn-profile,
.btn-action_active_warn, .btn-action_active_mute, .btn-action_active_ban, .btn-action_active_wl, .btn-action_active_um, .dg-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-md);
  background: rgba(11, 15, 20, .6);
  color: var(--dg-text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s var(--dg-ease), background .2s var(--dg-ease), color .2s var(--dg-ease), transform .2s var(--dg-ease);
}

.login-button:hover, .register-button:hover, .popup-btn:hover, .btn-action:hover, .btn-profile:hover,
.btn-action_active_warn:hover, .btn-action_active_mute:hover, .btn-action_active_ban:hover, .btn-action_active_wl:hover, .btn-action_active_um:hover, .dg-table-action:hover {
  border-color: rgba(var(--dg-highlight-rgb), .45);
  background: rgba(var(--dg-highlight-rgb), .08);
  color: var(--dg-highlight);
  transform: translateY(-1px);
}

button:disabled, .popup-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.topbar-login, .login-button.topbar-login {
  min-height: 38px;
  border-color: transparent;
  background: var(--dg-highlight);
  color: #071019;
  font-weight: 700;
}

.topbar-login:hover, .login-button.topbar-login:hover { background: var(--dg-highlight-hover); border-color: transparent; color: #071019; }

.popup-btn-save, .btn-primary, .btn-action-active {
  border-color: rgba(var(--dg-highlight-rgb), .5);
  background: rgba(var(--dg-highlight-rgb), .18);
  color: #c9f7fb;
}

.popup-btn-save:hover, .btn-primary:hover, .btn-action-active:hover { background: rgba(var(--dg-highlight-rgb), .28); border-color: var(--dg-highlight); color: #fff; }
.popup-btn-cancel, .btn-secondary { color: var(--dg-text-muted); }
.popup-btn-danger, .btn-danger, .dg-table-action-danger { border-color: rgba(239, 91, 100, .5); background: rgba(239, 91, 100, .12); color: #ff9aa1; }
.popup-btn-danger:hover, .btn-danger:hover, .dg-table-action-danger:hover { border-color: var(--dg-danger); background: rgba(239, 91, 100, .2); color: #fff; }
.dg-table-action-primary { border-color: rgba(var(--dg-highlight-rgb), .5); background: rgba(var(--dg-highlight-rgb), .14); color: var(--dg-highlight); }

.topbar-account { position: relative; }

.topbar-account-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.topbar-account-trigger .small-avatar { transition: border-color .2s var(--dg-ease); }
.topbar-account-trigger:hover .small-avatar, .topbar-account-trigger[aria-expanded='true'] .small-avatar { border-color: var(--dg-highlight); }

.small-avatar {
  display: block;
  width: 36px;
  height: 36px;
  border: 2px solid var(--user-rank-color, var(--dg-line));
  border-radius: 50%;
  background: var(--dg-panel-raised);
  object-fit: cover;
}

.small-avatar-fallback { display: inline-grid; place-items: center; color: var(--dg-text); font-size: 14px; font-weight: 800; }

.user-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.2; }
.user-name { color: var(--dg-text); font-size: 14px; font-weight: 700; }
.user-meta { font-size: 12px; }
.user-meta.user-rank { display: inline-flex; align-items: center; gap: 5px; color: color-mix(in srgb, var(--user-rank-color, var(--dg-highlight)) 55%, #fff); font-weight: 700; }
.user-rank-verified { color: var(--dg-highlight); font-size: .85em; }
.user-steam { overflow-wrap: anywhere; color: var(--dg-text-dim); font-size: 11.5px; line-height: 1.35; }

.topbar-account-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-lg);
  background: linear-gradient(180deg, rgba(14, 19, 27, .99), rgba(10, 14, 20, .99));
}

.topbar-account-menu:not([hidden]) { animation: dgDropIn .22s var(--dg-ease); }

.topbar-account-menu__head { padding: 10px 11px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--dg-border-soft); }
.topbar-account-menu__divider { height: 1px; margin: 4px 6px; background: var(--dg-border-soft); }

.topbar-account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--dg-r-sm);
  background: transparent;
  color: var(--dg-text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--dg-ease), color .15s var(--dg-ease);
}

.topbar-account-menu button i { width: 15px; font-size: 15px; opacity: .85; }
.topbar-account-menu button:hover { background: rgba(var(--dg-highlight-rgb), .09); color: var(--dg-highlight); }
.topbar-account-menu button.is-danger:hover { background: rgba(239, 91, 100, .12); color: #ff9aa1; }

input[type='text'], input[type='number'], input[type='search'], input[type='password'], input[type='email'], input[type='date'], input[type='datetime-local'], textarea, select, .form-control,
.popup-input, .popup-body textarea, .popup-body input[type='number'], .popup-body input[type='text'], .select-wrapper select, #eventFilterButton, #actionFilterButton {
  width: 100%;
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-sm);
  background: rgba(255, 255, 255, .045);
  color: var(--dg-text);
  transition: border-color .2s var(--dg-ease), background .2s var(--dg-ease);
}

input::placeholder, textarea::placeholder { color: var(--dg-text-dim); }

input[type='text']:focus, input[type='number']:focus, input[type='search']:focus, input[type='password']:focus, input[type='email']:focus, textarea:focus, select:focus, .form-control:focus,
.popup-input:focus, .popup-body textarea:focus, .popup-body input:focus {
  outline: none;
  border-color: rgba(var(--dg-highlight-rgb), .65);
  background: rgba(var(--dg-highlight-rgb), .08);
}

input[type='radio'] { accent-color: var(--dg-highlight); }
.select-wrapper { width: 100%; }

.toolbar-row { flex-wrap: wrap; align-items: flex-end; gap: 18px; margin-bottom: 20px; }
.toolbar-item { flex-direction: column; align-items: flex-start; gap: 8px; }
.toolbar-item label, .popup-box label { color: var(--dg-text-muted); font-size: 12.5px; font-weight: 600; }
.dg-toolbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.dg-toolbar-block { display: grid; gap: 8px; margin: 0 !important; }
.dg-toolbar-block label, .dg-grid-length label, .dg-grid-search label { display: grid; gap: 8px; color: var(--dg-text-muted); font-size: 12.5px; font-weight: 600; }
.dg-toolbar-block-search, .dg-grid-search { margin-left: auto !important; }

.dg-control { position: relative; min-width: 0; }

.dg-control-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(11, 15, 20, .7);
  color: #fff;
  font-size: .9rem;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.dg-control-trigger::after {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  margin-left: auto;
  background: rgba(255, 255, 255, .7);
  -webkit-mask: var(--dg-icon-chevron) center/contain no-repeat;
  mask: var(--dg-icon-chevron) center/contain no-repeat;
  transition: transform .2s ease, background-color .2s ease;
}

.dg-control-trigger:hover { border-color: color-mix(in srgb, var(--dg-highlight) 40%, transparent); background: rgba(15, 20, 28, .85); }
.dg-control-trigger.is-open { border-color: var(--dg-highlight); background: rgba(15, 20, 28, .95); }
.dg-control-trigger.is-open::after { transform: rotate(180deg); background: var(--dg-highlight); }
.dg-control-trigger:disabled { cursor: not-allowed; opacity: .55; }
.dg-control-trigger-text { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.dg-control-trigger-text > span:only-child, .dg-control-trigger-placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-single-select .dg-control-trigger-text { flex-wrap: nowrap; }
.dg-role-color-dot, .role-color-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--dg-role-color, #99a7b5); }

.dg-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--dg-highlight) 35%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--dg-highlight) 18%, transparent); color: #e6eef6; font-size: .82rem; line-height: 1.2; }
.dg-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-chip-remove { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: .72rem; font-weight: 700; cursor: pointer; transition: background .15s ease; }
.dg-chip-remove:hover { background: rgba(237, 66, 69, .85); }

.dg-dropdown { position: fixed; z-index: 25000; display: flex; flex-direction: column; max-height: 340px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--dg-highlight) 30%, transparent); border-radius: 10px; background: #0b0f14; animation: dgDropIn .16s ease both; }
.dg-dropdown-search { flex-shrink: 0; width: calc(100% - 16px); min-height: 0; margin: 8px 8px 6px; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: rgba(15, 20, 28, .9); color: #fff; font-size: .88rem; outline: none; }
.dg-dropdown-search:focus { border-color: var(--dg-highlight); background: rgba(15, 20, 28, .98); }
.dg-dropdown-search::placeholder { color: rgba(255, 255, 255, .4); }
.dg-dropdown-options { list-style: none; min-height: 0; margin: 0; padding: 4px 0 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(150, 150, 150, .3) transparent; }
.dg-dropdown-option { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-left: 3px solid transparent; color: #e6eef6; font-size: .88rem; cursor: pointer; outline: none; transition: background .12s ease, color .12s ease, padding .12s ease; }
.dg-dropdown-option:hover, .dg-dropdown-option:focus-visible { background: color-mix(in srgb, var(--dg-highlight) 18%, transparent); color: var(--dg-highlight); padding-left: 17px; }
.dg-dropdown-option.active { border-left-color: var(--dg-highlight); background: color-mix(in srgb, var(--dg-highlight) 28%, transparent); color: var(--dg-highlight); font-weight: 600; }
.dg-dropdown.is-multi .dg-dropdown-option.active { border-left-color: transparent; background: color-mix(in srgb, var(--dg-highlight) 12%, transparent); }
.dg-dropdown-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-dropdown-option small { flex-shrink: 0; color: var(--dg-text-dim); font-size: .75rem; font-weight: 500; }
.dg-dropdown-check { position: relative; display: inline-block; flex-shrink: 0; width: 16px; height: 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; }
.dg-dropdown-option.active .dg-dropdown-check { border-color: var(--dg-highlight); background: var(--dg-highlight); }
.dg-dropdown-option.active .dg-dropdown-check::after { content: ''; position: absolute; inset: 1px; background: #071019; -webkit-mask: var(--dg-icon-ok) center/12px no-repeat; mask: var(--dg-icon-ok) center/12px no-repeat; }
.dg-dropdown-empty { padding: 12px 14px; color: var(--dg-text-muted); font-size: .85rem; text-align: center; }
.dg-channel-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; font-size: .92rem; line-height: 1; }
.dg-channel-icon--text { color: rgba(255, 255, 255, .65); font-weight: 700; }
.dg-channel-icon--missing { color: var(--dg-warn); }
.dg-dropdown-option:hover .dg-channel-icon--text, .dg-dropdown-option:focus-visible .dg-channel-icon--text, .dg-dropdown-option.active .dg-channel-icon--text { color: inherit; }
.dg-discord-id { color: var(--dg-text-dim); font-size: .78rem; font-weight: 500; }
.dg-control-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; width: 0; height: 0; margin: 0; opacity: 0; pointer-events: none; }
.slider { position: relative; display: inline-block; flex-shrink: 0; width: 46px; height: 24px; border-radius: 24px; background: rgba(255, 255, 255, .2); transition: background .4s; }
.slider::before { content: ''; position: absolute; left: 2px; bottom: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .4s; }
.switch input:checked + .slider { background: var(--dg-highlight); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--dg-highlight); outline-offset: 2px; }
.switch-text { color: #fff; font-size: .95rem; font-weight: 500; white-space: nowrap; }

.dg-native-select { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }

.dg-search-control { min-width: 280px; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border: 1px solid var(--dg-line); border-radius: var(--dg-r-md); background: rgba(11, 15, 20, .7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .2s var(--dg-ease); }
.dg-search-control:focus-within { border-color: rgba(var(--dg-highlight-rgb), .55); }
.dg-search-icon { color: var(--dg-text-muted); }
.dg-search-input { width: 100%; min-width: 0; min-height: 0 !important; border: 0 !important; padding: 0 !important; background: transparent !important; color: var(--dg-text) !important; }
.dg-search-input:focus { outline: none; }

.popup-overlay, .modal-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 10, 14, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#pop-overlay-usermanager { z-index: 1300; }

.popup-box, .modal-content, .dg-confirm-dialog {
  position: relative;
  width: min(640px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-xl);
  background: linear-gradient(180deg, rgba(14, 19, 27, .985), rgba(10, 14, 20, .985));
}

.popup-box::before, .modal-content::before, .dg-confirm-dialog::before {
  content: '';
  position: absolute;
  inset: -1px 20px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--dg-highlight-rgb), .6), transparent);
  pointer-events: none;
}

.popup-box h3, .modal-content h3 { margin: 0; color: var(--dg-text); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

.popup-player { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid rgba(var(--dg-highlight-rgb), .2); border-radius: var(--dg-r-md); background: rgba(var(--dg-highlight-rgb), .06); }
.popup-player > span, .popup-section-label { color: var(--dg-text-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.popup-player strong { color: var(--dg-text); }
.popup-player small { color: var(--dg-text-muted); font-size: .86em; font-weight: 600; }
.popup-body { display: grid; gap: 12px; margin: 0; min-width: 0; }
.popup-message { min-height: 18px; color: var(--dg-text-muted); }
.popup-buttons, .profile-action-buttons, .ban-action-buttons, .user-tab-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.profile-action-buttons { margin-top: 20px; }
[id^='pop-']:not([id^='pop-overlay-']), .popup-box, .modal-content { max-width: calc(100vw - 32px); }
.popup-body textarea, .popup-body input, [id^='popup-body-'] textarea, [id^='popup-body-'] input, [id^='popup-body-'] select { max-width: 100%; }
.popup-preset-label { display: grid; gap: 6px; color: var(--dg-text-muted); }

.dg-confirm-overlay { position: fixed; z-index: 2400; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(7, 10, 14, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.dg-confirm-dialog { width: min(440px, 100%); gap: 0; }
.dg-confirm-dialog h3, .dg-confirm-dialog p { margin: 0; }
.dg-confirm-dialog p { margin-top: 10px; color: var(--dg-text-muted); }
.dg-confirm-dialog .popup-buttons { margin-top: 22px; }

.duration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px; }
.duration-grid-modal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.duration-field { display: grid; gap: 6px; }
.trennstrich { height: 1px; margin: 18px 0; background: var(--dg-border-soft); }
.details-box, .audit-details { margin-top: 18px; }
.audit-toolbar-row { margin: 5px 0; }
#audit-details-content { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--dg-text-muted); }

.status-notif-wrapper { position: fixed; top: 80px; right: 20px; z-index: 2147483647; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.global-info-popup { display: none; }

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--dg-line);
  border-left: 3px solid var(--toast-accent, var(--dg-highlight));
  border-radius: var(--dg-r-lg);
  background: #0f151d;
  color: var(--dg-text);
  font-size: 13.5px;
  font-weight: 500;
  animation: dgToastIn .35s var(--dg-ease);
}

.toast::before {
  content: '';
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--toast-accent, var(--dg-highlight)) 16%, transparent);
  -webkit-mask: none;
  mask: none;
  background-image: none;
}

.toast::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 12px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  background: var(--toast-accent, var(--dg-highlight));
  -webkit-mask: var(--toast-icon, var(--dg-icon-info)) center/16px no-repeat;
  mask: var(--toast-icon, var(--dg-icon-info)) center/16px no-repeat;
}

.toast.toast-success { --toast-accent: var(--dg-ok); --toast-icon: var(--dg-icon-ok); }
.toast.toast-error { --toast-accent: var(--dg-danger); --toast-icon: var(--dg-icon-err); }
.toast.toast-warning { --toast-accent: var(--dg-warn); --toast-icon: var(--dg-icon-warn); }

.rank-select-wrapper { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.rank-update-status { color: var(--dg-text-muted); font-size: 12px; white-space: nowrap; }
.team-member-empty { padding: 18px 0 4px; color: var(--dg-text-muted); }
.is-hidden { display: none !important; }

.site-footer { position: relative; z-index: 1; padding: 0 36px 28px; }
.site-footer-inner { position: relative; max-width: 1280px; min-height: 58px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 4px; border-top: 1px solid var(--dg-line); color: var(--dg-text-dim); font-size: 13px; }
.site-footer-inner::before { content: ''; position: absolute; top: -1px; left: 0; width: 220px; height: 1px; background: linear-gradient(90deg, rgba(var(--dg-highlight-rgb), .6), transparent); }
.footer-link { transition: color .2s var(--dg-ease); }
.footer-link:hover { color: var(--dg-highlight); }

.legal-body { padding-top: 24px; }
.legal-page { position: relative; z-index: 1; width: min(100% - 32px, 820px); margin: 0 auto; padding: 24px 0 64px; }
.legal-page__back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--dg-text-muted); font-size: 13px; }
.legal-page__back:hover { color: var(--dg-highlight); }
.legal-page h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.legal-page h2 { margin: 32px 0 10px; color: var(--dg-highlight); font-size: 17px; }
.legal-page p, .legal-page li { color: var(--dg-text-muted); line-height: 1.65; }
.legal-page__notice { margin: 20px 0 8px; padding: 14px 16px; border: 1px solid rgba(var(--dg-highlight-rgb), .3); border-radius: var(--dg-r-md); background: var(--dg-highlight-soft); color: var(--dg-text); font-size: 13px; }
.legal-placeholder { padding: 1px 6px; border-radius: 5px; background: rgba(246, 189, 56, .14); color: var(--dg-warn); font-weight: 600; }

body[data-default-page='home'] #home,
body[data-default-page='team'] #team,
body[data-default-page='role'] #role,
body[data-default-page='ban'] #ban,
body[data-default-page='mute'] #mute,
body[data-default-page='warn'] #warn,
body[data-default-page='watchlist'] #watchlist,
body[data-default-page='usermanager'] #usermanager,
body[data-default-page='serverlogs'] #serverlogs,
body[data-default-page='reportlogs'] #reportlogs,
body[data-default-page='appeals'] #appeals,
body[data-default-page='audit'] #audit,
body[data-default-page='adminuser'] #adminuser,
body[data-default-page='panel-perms'] #panel-perms,
body[data-default-page='ingame-perms'] #ingame-perms,
body[data-default-page='queryservers'] #queryservers,
body[data-default-page='moderation-config'] #moderation-config,
body[data-default-page='whitelist'] #whitelist,
body[data-default-page='serverconsole'] #serverconsole,
body[data-default-page='stats'] #stats,
body[data-default-page='ipbans'] #ipbans,
body[data-default-page='notifications'] #notifications {
  display: block;
}

@media (max-width: 1100px) {
  .sidebar { flex-basis: 232px; width: 232px; }
  .main-content { padding: 24px 24px 80px; }
}

@media (max-width: 860px) {
  .site-shell { display: block; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .sidebar-toggle { display: inline-grid; }
  .topbar-center { display: none; }

  .sidebar {
    position: fixed;
    z-index: 65;
    top: calc(var(--dg-header-offset) - 6px);
    left: 12px;
    bottom: 12px;
    width: min(300px, calc(100vw - 24px));
    height: auto;
    flex: none;
    overflow-y: auto;
    border: 1px solid var(--dg-line);
    border-radius: var(--dg-r-xl);
    background: rgba(10, 14, 20, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transform: translateX(calc(-100% - 24px));
    visibility: hidden;
    transition: transform .3s var(--dg-ease), visibility .3s;
  }

  .sidebar::after { display: none; }
  body.is-sidebar-open .sidebar { transform: translateX(0); visibility: visible; }
  body.is-sidebar-open .site-shell::before { content: ''; position: fixed; z-index: 60; inset: 0; background: rgba(5, 8, 12, .6); }
  .main-content { padding: 20px 16px 60px; }
  .site-footer { padding: 0 16px 24px; }
}

@media (max-width: 640px) {
  :root { --dg-header-offset: 84px; --dg-header-h: 54px; }
  .topbar { top: 8px; width: calc(100% - 16px); padding: 8px 10px; border-radius: 12px; }
  .topbar-brand-name { display: none; }
  .page-hero { gap: 12px; margin-bottom: 20px; }
  .page-hero h1 { font-size: 1.35rem; }
  .page-hero-icon, .page-hero-logo { width: 46px; height: 46px; font-size: 20px; }
  .status-notif-wrapper { right: 10px; left: 10px; width: auto; }
  .card, .statistics-card, .teamler-card { padding: 16px; }
  .duration-grid-modal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

:root {
  --dg-icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  --dg-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --dg-icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --dg-icon-err: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  --dg-icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --dg-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
}
