:root {
  --bg: #0a0a0f;
  --bg-card: #161622;
  --bg-hover: #1e1e2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8f0;
  --text-muted: #9494a8;
  --magenta: #e879f9;
  --magenta-dark: #a855f7;
  --legit-start: #ff00ff;
  --legit-end: #990099;
  --gradient-legit: linear-gradient(135deg, var(--legit-start), var(--legit-end));
  --green: #4ade80;
  --warn: #f87171;
  --discord: #5865f2;
  --radius: 12px;
  --font: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 121, 249, 0.35) transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 121, 249, 0.35) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 121, 249, 0.45), rgba(153, 0, 153, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232, 121, 249, 0.7), rgba(168, 85, 247, 0.75));
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--left {
  top: -120px;
  left: -160px;
  background: rgba(168, 85, 247, 0.18);
}

.bg-glow--right {
  bottom: -80px;
  right: -120px;
  background: rgba(192, 38, 211, 0.12);
}

.gradient-text {
  background: var(--gradient-legit);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo__tld {
  font-weight: 600;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 2.5rem 1.75rem;
  background: rgba(22, 22, 34, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.login-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-brand {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-lead {
  margin: 1rem 0 1.75rem;
  color: var(--text-muted);
}

.login-status {
  margin-top: 1rem;
  color: var(--warn);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--gradient-legit);
  color: white;
}

.btn--discord {
  background: var(--discord);
  color: white;
  width: 100%;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--bg-hover);
}

.btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.header__brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.subtitle {
  color: var(--text-muted);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.header__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.7rem 0.4rem 0.4rem;
  border-radius: 999px;
  background: rgba(22, 22, 34, 0.78);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.avatar {
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.header__user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.user-badge {
  font-size: 0.72rem;
  color: var(--magenta);
  line-height: 1.2;
}

.nav-layout-toggle {
  gap: 0.4rem;
}

.nav-layout-toggle__icon {
  display: inline-block;
  width: 0.85rem;
  height: 0.7rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
  opacity: 0.85;
}

.nav-layout-toggle__icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  background: currentColor;
  opacity: 0.35;
}

.nav-layout-toggle[aria-pressed="true"] .nav-layout-toggle__icon::before {
  opacity: 0.75;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 60;
}

.nav-toggle:hover {
  background: var(--bg-hover);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

.main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-bottom: 1.35rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(22, 22, 34, 0.55);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.nav-group__label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding-left: 0.2rem;
}

.nav-group .main-tabs {
  margin-bottom: 0;
}

.main-tab {
  font: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  font-weight: 500;
  font-size: 0.92rem;
}

.main-tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.main-tab.active {
  color: white;
  border-color: transparent;
  background: var(--gradient-legit);
  font-weight: 600;
}

/* Links-Navigation (Desktop) */
@media (min-width: 861px) {
  .layout.layout--nav-side {
    display: grid;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 1.35rem;
    row-gap: 0;
    max-width: 1440px;
    align-items: start;
  }

  .layout.layout--nav-side > .header {
    grid-column: 1 / -1;
    margin-bottom: 1.15rem;
  }

  .layout.layout--nav-side > .nav-backdrop {
    display: none !important;
  }

  .layout.layout--nav-side > .main-nav {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.85rem;
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin-bottom: 0;
    width: 100%;
    padding: 0.85rem 0.75rem;
  }

  .layout.layout--nav-side > .section-panel {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  .layout.layout--nav-side .nav-group {
    width: 100%;
  }

  .layout.layout--nav-side .nav-group .main-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .layout.layout--nav-side .main-tab {
    width: 100%;
    justify-content: flex-start;
  }
}

.view-label {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.stats-grid--overview {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  text-align: center;
}

.stat-card--warn {
  border-color: rgba(248, 113, 113, 0.35);
}

.stat-card__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--magenta);
}

.stat-card--warn .stat-card__value {
  color: var(--warn);
}

.stat-card__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.input,
.textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #0f0f16;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.search-form .input {
  flex: 1;
  min-width: 200px;
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.check input[type="checkbox"]::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  transform: scale(0);
  transition: transform 0.12s ease;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  background: #fff;
}

.check input[type="checkbox"]:hover {
  border-color: rgba(232, 121, 249, 0.55);
  background: rgba(232, 121, 249, 0.08);
}

.check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.25);
}

.check input[type="checkbox"]:checked {
  border-color: transparent;
  background: var(--gradient-legit);
}

.check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.check input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-results {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.muted {
  color: var(--text-muted);
}

.player-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.player-detail__head h2 {
  margin: 0;
}

.player-detail__rank {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.player-meta {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-hint.is-ok {
  color: var(--green);
}

.form-hint.is-err {
  color: var(--warn);
}

.announce-form {
  display: grid;
  gap: 0.85rem;
}

.announce-list {
  display: grid;
  gap: 0.85rem;
}

.announce-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #12121a;
}

.announce-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.announce-item p {
  margin: 0;
  white-space: pre-wrap;
}

.announce-item__meta {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

[hidden] {
  display: none !important;
}

/* ── Responsive: Tablet & Phone ─────────────────────────────── */

@media (max-width: 1100px) {
  .main-nav {
    gap: 0.85rem 1.25rem;
  }
}

@media (max-width: 860px) {
  .nav-layout-toggle {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .nav-backdrop[hidden] {
    display: none !important;
  }

  .main-nav {
    display: none;
    position: fixed;
    z-index: 50;
    top: max(4.5rem, calc(env(safe-area-inset-top) + 4rem));
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    max-height: min(70vh, calc(100vh - 6rem));
    overflow: auto;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0.75rem;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    background: rgba(18, 18, 28, 0.98);
    backdrop-filter: blur(16px);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-group {
    gap: 0.3rem;
    padding: 0.55rem 0.35rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-group:last-child {
    border-bottom: 0;
  }

  .nav-group .main-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .main-tab {
    justify-content: center;
    text-align: center;
    min-height: 2.6rem;
    border: 1px solid var(--border);
    border-radius: 10px;
  }
}

@media (max-width: 720px) {
  .layout {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .header {
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }

  .logo {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .header__user .btn--sm {
    padding: 0.35rem 0.6rem;
  }

  .user-name {
    max-width: 7.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .stat-card {
    padding: 0.85rem 0.7rem;
  }

  .stat-card__value {
    font-size: 1.35rem;
  }

  .panel-head-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .sub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding: 0.15rem;
  }

  .sub-tabs::-webkit-scrollbar {
    display: none;
  }

  .sub-tab {
    flex: 0 0 auto;
    min-height: 2.4rem;
    white-space: nowrap;
  }

  .edit-grid {
    grid-template-columns: 1fr;
  }

  .alts-manual__row {
    flex-direction: column;
    align-items: stretch;
  }

  .alts-manual__row .input,
  .alts-manual__row .btn {
    width: 100%;
  }

  #section-alts .panel-head-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  #section-alts .panel-head-row > div {
    min-width: 0;
  }

  #section-alts .panel-head-row .btn {
    width: 100%;
  }

  #section-alts .panel__hint {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .alts-card,
  .alts-card--global {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.85rem;
  }

  .alts-card__actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.4rem;
  }

  .alts-card__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .alts-card__actions .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .alts-global__pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.45rem;
    width: 100%;
  }

  .alts-global__player {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    width: 100%;
  }

  .alts-global__player > div {
    width: 100%;
  }

  .alts-global__vs {
    font-size: 0.85rem;
  }

  .alts-card__parts li {
    flex-wrap: wrap;
    gap: 0.15rem 0.5rem;
  }

  .player-actions,
  .toolbar,
  .rank-controls,
  .dev-board-head,
  .ranks-panel-head {
    flex-wrap: wrap;
  }

  .player-actions .btn,
  .mod-action-card .btn,
  .announce-form > .btn,
  .announce-form .player-actions .btn {
    width: 100%;
  }

  .mod-actions {
    grid-template-columns: 1fr;
  }

  .chart-wrap,
  .chart-wrap--sm {
    height: 220px;
  }

  .chart-wrap--tall {
    height: 260px;
  }

  .table-wrap {
    margin: 0 -0.25rem;
    border-radius: 10px;
  }

  .data-table th,
  .data-table td {
    padding: 0.55rem 0.6rem;
    font-size: 0.85rem;
  }

  .ui-modal__dialog,
  .evidence-lightbox__dialog {
    width: min(100%, calc(100vw - 1.25rem));
    margin: 0.75rem;
  }

  .evidence-lightbox__head {
    flex-direction: column;
    align-items: stretch;
  }

  .evidence-lightbox__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .evidence-lightbox__actions .btn {
    width: 100%;
  }

  .login-card {
    padding: 2rem 1.25rem;
  }

  .login-view {
    padding: 1rem;
  }

  .rank-row__main {
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    gap: 0.55rem 0.75rem;
  }

  .rank-row__main .actions-cell {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .header__user-meta {
    display: none;
  }

  .nav-toggle__text {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .health-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .nav-group .main-tabs {
    grid-template-columns: 1fr;
  }

  .players-list-panel {
    max-height: 280px;
  }

  .btn {
    min-height: 2.6rem;
  }

  .btn--sm {
    min-height: 2.35rem;
  }

  .input,
  .textarea,
  select.input {
    font-size: 16px; /* verhindert iOS-Zoom */
  }

  .alts-global__pair {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 0.35rem;
  }

  .alts-global__player {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 0.5rem;
  }

  .alts-global__vs {
    width: 100%;
    text-align: center;
    opacity: 0.7;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.05rem 0;
  }

  .alts-card__actions {
    grid-template-columns: 1fr;
  }

  .alts-card__actions .btn:last-child:nth-child(odd) {
    grid-column: auto;
  }

  #section-alts .sub-tabs {
    margin-bottom: 0.65rem;
  }
}

.players-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.players-list-panel {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 1rem;
}

.players-list-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.players-list-panel__head h2 {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #12121a;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.search-form--compact {
  margin-bottom: 0.85rem;
}

.search-form--compact .input {
  min-width: 0;
}

.player-list {
  display: grid;
  gap: 0.4rem;
}

.players-loading {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #101018;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.search-item:hover {
  border-color: rgba(232, 121, 249, 0.35);
  background: var(--bg-hover);
}

.search-item.is-active {
  border-color: rgba(232, 121, 249, 0.55);
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.12), rgba(153, 0, 153, 0.08));
}

.search-item__main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.search-item__skin {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0a0f;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.search-item__text {
  min-width: 0;
}

.search-item__text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-item__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--magenta);
  flex-shrink: 0;
}

.player-detail-wrap {
  min-width: 0;
}

.player-detail-empty,
.player-detail {
  min-height: 420px;
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 360px;
  padding: 2rem 1rem;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 0, 255, 0.22), rgba(153, 0, 153, 0.12)),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.35) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 78%, rgba(255, 255, 255, 0.28) 0 28%, transparent 29%);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.empty-state h2 {
  margin: 0;
}

.player-detail__identity {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.player-skin {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0a0a0f;
  image-rendering: pixelated;
}

.player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #101018;
}

.chip--warn {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--warn);
}

.chip--ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: var(--green);
}

.chip--off {
  border-color: rgba(148, 148, 168, 0.35);
  color: var(--text-muted);
}

.chip--report {
  border-color: rgba(232, 121, 249, 0.45);
  color: var(--magenta);
  background: rgba(232, 121, 249, 0.08);
}

.chip--server {
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.rank-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.rank-controls .input {
  min-width: 180px;
}

.accordion {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.acc-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101018;
  overflow: hidden;
}

.acc-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 1rem;
  list-style: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.acc-item summary::-webkit-details-marker {
  display: none;
}

.acc-item summary::after {
  content: '+';
  float: right;
  color: var(--text-muted);
  font-weight: 500;
}

.acc-item[open] summary {
  border-bottom: 1px solid var(--border);
}

.acc-item[open] summary::after {
  content: '–';
}

.acc-item .edit-grid,
.acc-item .mod-detail {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.sub-tab {
  font: inherit;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.sub-tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.sub-tab.active {
  color: white;
  border-color: transparent;
  background: var(--gradient-legit);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.linkish {
  background: none;
  border: none;
  color: var(--magenta);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.linkish:hover {
  text-decoration: underline;
}

.color-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
  min-width: 2.6rem;
  flex-shrink: 0;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-block;
  flex-shrink: 0;
}

.ranks-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ranks-panel-head h2 {
  margin: 0;
}

.ranks-list {
  display: grid;
  gap: 0.65rem;
}

.rank-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101018;
  overflow: hidden;
}

.rank-row.is-editing {
  border-color: rgba(232, 121, 249, 0.4);
}

.rank-row__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
}

.rank-row__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.rank-row__name {
  font-weight: 600;
}

.rank-row__edit {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.rank-inline-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.rank-inline-form .player-actions {
  grid-column: 1 / -1;
}

.actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
}

.mod-detail {
  font-size: 0.9rem;
}

.mod-detail ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
}

.chart-panel {
  margin-bottom: 0;
}

.chart-panel h2 {
  margin: 0 0 0.35rem;
}

.panel__hint {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

#stats-charts-history {
  margin-bottom: 1.35rem;
}

#stats-servers-panel {
  margin-top: 0.15rem;
}

#stats-leaderboards .sub-tabs {
  margin-top: 0.15rem;
  margin-bottom: 1.15rem;
}

.section-panel > .sub-tabs {
  margin-bottom: 1.15rem;
}

.panel > .sub-tabs,
.panel-head-row + .sub-tabs {
  margin: 0.35rem 0 0.75rem;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap--sm {
  height: 220px;
}

.chart-wrap--tall {
  height: 320px;
}

@media (max-width: 960px) {
  .players-layout {
    grid-template-columns: 1fr;
  }

  .players-list-panel {
    position: static;
    max-height: 380px;
  }

  .charts-row {
    grid-template-columns: 1fr;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.proxy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.35rem;
  align-items: stretch;
}

.proxy-panel--health {
  grid-column: 1 / -1;
}

.proxy-panel--broadcast {
  min-height: auto;
}

.proxy-panel--ab {
  grid-column: 1 / -1;
}

.health-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.health-kpis .stat-card {
  padding: 0.85rem 0.75rem;
}

.health-kpis .stat-card__value.is-bad,
#health-maint.is-bad {
  color: var(--warn);
}

.server-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.server-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.server-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.server-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.server-card__status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.server-card.is-offline {
  opacity: 0.72;
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
}

.server-card__status.is-online::before {
  background: var(--green);
}

.server-card__status.is-idle::before {
  background: #fbbf24;
}

.server-card__status.is-offline {
  color: var(--warn);
}

.server-card__status.is-offline::before {
  background: var(--warn);
}

.server-card__tps {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.server-card__tps.is-na {
  color: var(--text-muted);
}

.mm-preview {
  display: grid;
  gap: 0.45rem;
  margin: 0.35rem 0 0.85rem;
}

.mm-preview__label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.mm-preview__chat {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #1a1a1a;
  color: #fff;
  min-height: 2.75rem;
  word-break: break-word;
}

.mm-preview__empty {
  font-family: var(--font);
}

.motd-serverlist {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: linear-gradient(180deg, #3a3a3a 0%, #2b2b2b 100%);
  font-family: var(--font-mono);
  color: #fff;
}

.motd-serverlist--maint {
  border-color: #5a3a3a;
  background: linear-gradient(180deg, #3f3030 0%, #2b2222 100%);
}

.motd-serverlist__icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff00ff 0%, #990099 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.motd-serverlist__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.motd-serverlist__name {
  font-weight: 700;
  font-size: 0.92rem;
}

.motd-serverlist__players {
  color: #a8a8a8;
  font-size: 0.8rem;
}

.motd-serverlist__lines {
  font-size: 0.82rem;
  line-height: 1.35;
  min-height: 2.4em;
}

.motd-serverlist__line {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.2em;
}

.mm-obf {
  animation: mm-obf 0.08s steps(2) infinite;
}

@keyframes mm-obf {
  to {
    opacity: 0.55;
  }
}

.dev-layout {
  display: grid;
  gap: 1rem;
}

.dev-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.dev-board-head__title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.dev-board-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dev-board-count {
  font-size: 0.8rem;
}

.dev-chip-filters {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.dev-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.dev-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.dev-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.dev-chip.is-on {
  color: var(--text);
  border-color: color-mix(in srgb, #38bdf8 45%, var(--border));
  background: color-mix(in srgb, #38bdf8 14%, transparent);
}

.dev-list {
  display: grid;
  gap: 0.65rem;
}

.dev-card {
  --dev-type: #64748b;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--dev-type) 22%, var(--border));
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.75rem 1rem;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--dev-type) 10%, transparent),
      transparent 42%
    ),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.4rem;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dev-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--dev-type);
}

.dev-card--type-feature {
  --dev-type: #38bdf8;
}

.dev-card--type-bugfix {
  --dev-type: #f87171;
}

.dev-card--type-improvement {
  --dev-type: #4ade80;
}

.dev-card--type-note {
  --dev-type: #fbbf24;
}

.dev-card--done {
  opacity: 0.78;
}

.dev-card--done .dev-card__title {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.dev-card.is-editing {
  border-color: color-mix(in srgb, var(--magenta, #e879f9) 50%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--magenta, #e879f9) 10%, transparent),
      transparent 50%
    ),
    color-mix(in srgb, var(--magenta, #e879f9) 5%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--magenta, #e879f9) 18%, transparent);
}

.dev-card__head {
  min-width: 0;
}

.dev-card__meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.dev-card__type {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dev-type);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dev-type) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--dev-type) 28%, transparent);
}

.dev-card__status {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dev-card__status.is-in_progress {
  color: #fbbf24;
  background: color-mix(in srgb, #fbbf24 12%, transparent);
  border-color: color-mix(in srgb, #fbbf24 28%, transparent);
}

.dev-card__status.is-done {
  color: #4ade80;
  background: color-mix(in srgb, #4ade80 12%, transparent);
  border-color: color-mix(in srgb, #4ade80 28%, transparent);
}

.dev-card__status.is-open {
  color: #38bdf8;
  background: color-mix(in srgb, #38bdf8 12%, transparent);
  border-color: color-mix(in srgb, #38bdf8 28%, transparent);
}

.dev-card__title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.dev-card__body {
  margin: 0;
  color: var(--text-muted);
  white-space: pre-wrap;
  font-size: 0.86rem;
  line-height: 1.45;
}

.dev-card__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dev-card__foot {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dev-card__author {
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

.dev-card__sep {
  opacity: 0.55;
}

.dev-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.dev-card__actions .input--sm {
  min-width: 7rem;
  width: auto;
  padding: 0.25rem 0.4rem;
  font-size: 0.78rem;
}

.dev-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
}

.dev-tag-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--tag-color, #38bdf8) 20%, #fff);
  background: color-mix(in srgb, var(--tag-color, #38bdf8) 32%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag-color, #38bdf8) 55%, transparent);
  line-height: 1.2;
}

.dev-tag-mark--removable {
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
}

.dev-tag-mark--removable:hover {
  filter: brightness(1.12);
}

.dev-tag-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dev-tag-selected:empty,
.dev-tag-selected[hidden] {
  display: none;
}

.dev-tags-field {
  display: grid;
  gap: 0.4rem;
}

.dev-tags-field__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dev-dd {
  position: relative;
}

.dev-dd__search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dev-dd__search-wrap .input {
  width: 100%;
  padding-right: 2.2rem;
}

.dev-dd__caret-btn {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.dev-dd__caret {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  transition: transform 0.15s ease;
}

.dev-dd.is-open .dev-dd__caret {
  transform: rotate(225deg);
  margin-top: 0.1rem;
}

.dev-dd__panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  padding: 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #14141f;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.4rem;
}

.dev-dd__list {
  display: grid;
  gap: 0.15rem;
  max-height: 200px;
  overflow: auto;
}

.dev-dd__empty {
  margin: 0;
  padding: 0.55rem 0.45rem;
  font-size: 0.85rem;
}

.dev-dd__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.dev-dd__option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dev-dd__option.is-on {
  background: color-mix(in srgb, var(--tag-color, #38bdf8) 12%, transparent);
  border-color: color-mix(in srgb, var(--tag-color, #38bdf8) 28%, transparent);
}

.dev-dd__check {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.dev-dd__option.is-on .dev-dd__check {
  border-color: var(--tag-color, #38bdf8);
  background: var(--tag-color, #38bdf8);
}

.dev-dd__option.is-on .dev-dd__check::after {
  content: '';
  position: absolute;
  left: 0.22rem;
  top: 0.05rem;
  width: 0.22rem;
  height: 0.4rem;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: rotate(45deg);
}

.dev-dd__create-row {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.dev-dd__create-btn {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  border: 1px dashed color-mix(in srgb, #38bdf8 45%, var(--border));
  background: color-mix(in srgb, #38bdf8 8%, transparent);
  color: #7dd3fc;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.dev-dd__create-btn:hover {
  background: color-mix(in srgb, #38bdf8 14%, transparent);
}

.dev-dd__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dev-dd__swatch-btn {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--tag-color);
  cursor: pointer;
  padding: 0;
}

.dev-dd__swatch-btn.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.input--sm {
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  min-width: 120px;
}

@media (max-width: 720px) {
  .dev-card__actions {
    width: 100%;
  }

  .dev-card__actions .input--sm {
    flex: 1;
  }
}

.proxy-panel {
  min-height: 280px;
}

.proxy-panel--maint {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: flex-start;
}

.proxy-panel--maint .rank-controls {
  margin-top: auto;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.proxy-panel--maint .pill {
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
}

.motd-form {
  display: grid;
  gap: 0.75rem;
}

.motd-form .input {
  width: 100%;
}

@media (max-width: 900px) {
  .proxy-grid {
    grid-template-columns: 1fr;
  }
}

.overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 1rem;
  margin-top: 1.15rem;
  align-items: start;
}

.ov-live-panel,
.ov-staff-panel {
  min-height: 420px;
}

.ov-live-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 0.25rem;
}

.ov-server-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ov-server-group__head h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.ov-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.55rem;
}

.ov-player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
}

.ov-player.is-staff {
  border-color: rgba(232, 121, 249, 0.28);
  background: rgba(232, 121, 249, 0.06);
}

.ov-player__skin {
  border-radius: 8px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.ov-player__meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}

.ov-player__meta .linkish {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-player__meta .chip {
  flex-shrink: 0;
}

.ov-player > .btn {
  flex-shrink: 0;
  margin-left: auto;
}

.staff-summary {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.staff-list {
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 0.2rem;
}

.staff-cards {
  display: grid;
  gap: 0.45rem;
}

.staff-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.staff-card.is-online {
  border-color: rgba(74, 222, 128, 0.22);
  background: rgba(74, 222, 128, 0.04);
}

.staff-card img {
  border-radius: 7px;
  image-rendering: pixelated;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.staff-card__body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.35rem;
}

.staff-card__name {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.staff-card__rank {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.staff-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.ui-modal[hidden] {
  display: none !important;
}

.ui-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 12, 0.72);
  backdrop-filter: blur(6px);
}

.ui-modal__dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 1.25rem 1.3rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(232, 121, 249, 0.22);
  background: linear-gradient(165deg, #1a1a28 0%, #12121c 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  display: grid;
  gap: 0.85rem;
  animation: ui-modal-in 0.16s ease-out;
}

@keyframes ui-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ui-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.ui-modal__message {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.ui-modal__message:empty {
  display: none;
}

.ui-modal__fields {
  display: grid;
  gap: 0.65rem;
}

.ui-modal__fields label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ui-modal__fields .input {
  width: 100%;
}

.ui-modal__fields textarea.input {
  min-height: 5.5rem;
  resize: vertical;
}

.ui-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.ab-panel {
  grid-column: 1 / -1;
}

.ab-form {
  display: grid;
  gap: 0.9rem;
}

.ab-form__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.ab-interval-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ab-interval-label .input {
  width: 7rem;
}

.ab-messages {
  display: grid;
  gap: 0.65rem;
}

.ab-message {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.5rem;
}

.ab-message__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ab-message__num {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

@media (max-width: 960px) {
  .overview-split {
    grid-template-columns: 1fr;
  }

  .ov-live-panel,
  .ov-staff-panel {
    min-height: 0;
  }
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel-head-row h2 {
  margin: 0;
}

.table-wrap--scroll {
  max-height: 320px;
  overflow: auto;
}

.staff-sub {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.staff-ul {
  margin: 0;
  padding-left: 1.1rem;
}

.staff-ul li {
  margin: 0.25rem 0;
}

.mod-actions {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.alts-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.5rem 0 0.75rem;
}

.alts-global-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.alts-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.alts-card--global .alts-card__main {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.alts-global__pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  min-width: 0;
}

.alts-global__player {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.alts-global__player > div {
  min-width: 0;
  overflow: hidden;
}

.alts-global__player .linkish,
.alts-card__name .linkish {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.alts-global__player img {
  border-radius: 7px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.alts-global__vs {
  font-weight: 700;
  flex-shrink: 0;
}

.alts-card__foot {
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.alts-card--confirmed {
  border-color: rgba(74, 222, 128, 0.28);
}

.alts-card--suspected {
  border-color: rgba(248, 113, 113, 0.28);
}

.alts-card--dismissed {
  opacity: 0.55;
}

.alts-card__main {
  display: flex;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.alts-card__main > div {
  min-width: 0;
  flex: 1;
}

.alts-card__main img {
  border-radius: 7px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.alts-card__name {
  margin-bottom: 0.25rem;
  min-width: 0;
}

.alts-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.alts-card__ips {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.alts-card__evidence {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.alts-card__parts {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alts-card__parts li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.alts-card__parts li > span:first-child,
.alts-card__parts li {
  overflow-wrap: anywhere;
}

.alts-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.alts-manual {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.alts-manual__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.alts-manual__row .input {
  flex: 1 1 140px;
  min-width: 120px;
}

.alts-ips {
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.alts-ips__title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.alts-ips__list {
  display: grid;
  gap: 0.3rem;
}

.alts-ip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
}

.mod-action-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  display: grid;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
}

.mod-action-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.mod-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0.4rem 0;
}

.mod-history {
  margin-top: 1rem;
}

.mod-history details {
  margin: 0.4rem 0;
}

.evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.evidence-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  display: grid;
}

.evidence-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.evidence-card__open {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: grid;
  min-width: 0;
}

.evidence-card__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.evidence-card__preview img,
.evidence-card__preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.evidence-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.evidence-card__badge {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.evidence-card__meta {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem 0.55rem;
  min-width: 0;
}

.evidence-card__meta strong,
.evidence-card__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.evidence-card__delete {
  margin: 0 0.45rem 0.45rem;
  justify-self: start;
}

.evidence-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.evidence-lightbox[hidden] {
  display: none !important;
}

.evidence-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 14, 0.72);
  backdrop-filter: blur(6px);
}

.evidence-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-panel, #16141f);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  padding: 0.9rem 1rem 1rem;
}

.evidence-lightbox__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.evidence-lightbox__head h3 {
  margin: 0;
  font-size: 1rem;
}

.evidence-lightbox__head .muted {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.evidence-lightbox__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.evidence-lightbox__body {
  display: grid;
  place-items: center;
  min-height: 200px;
}

.evidence-lightbox__media {
  max-width: 100%;
  max-height: min(72vh, 720px);
  border-radius: 10px;
  background: #000;
}

.evidence-lightbox__frame {
  width: 100%;
  min-height: min(72vh, 720px);
  border: 0;
  border-radius: 10px;
  background: #111;
}

.btn--danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
  border: none;
}

.btn--danger:hover {
  filter: brightness(1.08);
}

.reasons-list {
  display: grid;
  gap: 0.65rem;
}

.reason-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101018;
  overflow: hidden;
}

.reason-row.is-editing {
  border-color: rgba(232, 121, 249, 0.4);
}

.reason-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  flex-wrap: wrap;
}

.reason-row__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.reason-row__name {
  font-weight: 600;
}

.reason-row__edit {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.announce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.cl-sections {
  display: grid;
  gap: 0.85rem;
}

.cl-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.65rem;
}

.cl-section textarea[name="items"] {
  min-height: 140px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.cl-preview,
.cl-preview-item {
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-top: 0.85rem;
  color: var(--text);
}

.table-wrap--perms {
  max-height: min(70vh, 720px);
}

.perms-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.perms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.perms-toolbar .input {
  flex: 1 1 240px;
  max-width: 320px;
}

.perms-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
  min-height: min(68vh, 640px);
}

.perms-sidebar {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0e0e16;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.perms-role-list {
  overflow: auto;
  max-height: min(68vh, 640px);
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  scrollbar-gutter: stable;
}

.perms-empty {
  margin: 0.75rem;
}

.perms-role {
  --role-color: #8b8b9e;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.perms-role:hover {
  background: rgba(255, 255, 255, 0.04);
}

.perms-role.is-selected {
  background: rgba(232, 121, 249, 0.1);
  border-color: rgba(232, 121, 249, 0.28);
}

.perms-role__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--role-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-color) 22%, transparent);
  flex-shrink: 0;
}

.perms-role__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.perms-role__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perms-role__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.perms-role.has-access .perms-role__meta {
  color: #86efac;
}

.perms-detail {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #12121a;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.perms-detail__empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 2rem;
  text-align: center;
}

.perms-detail__head {
  --role-color: #8b8b9e;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.perms-detail__dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--role-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--role-color) 20%, transparent);
  flex-shrink: 0;
}

.perms-detail__head h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.perms-detail__head p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

.perms-detail__list {
  padding: 0.75rem;
  display: grid;
  gap: 1rem;
  overflow: auto;
  max-height: min(68vh, 640px);
}

.perm-group {
  display: grid;
  gap: 0.4rem;
}

.perm-group__title {
  margin: 0;
  padding: 0.15rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8b8b9e);
}

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.perm-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.perm-row.is-on {
  border-color: rgba(232, 121, 249, 0.28);
  background: rgba(232, 121, 249, 0.07);
}

.perm-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.perm-row__text strong {
  font-size: 0.95rem;
}

.perm-row__text .muted {
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.perm-switch {
  position: relative;
  flex-shrink: 0;
}

.perm-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.perm-switch__ui {
  display: block;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: 999px;
  background: #2a2a38;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.perm-switch__ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #c8c8d6;
  transition: transform 0.15s ease, background 0.15s ease;
}

.perm-row.is-on .perm-switch__ui {
  background: linear-gradient(135deg, #e879f9, #990099);
  border-color: transparent;
}

.perm-row.is-on .perm-switch__ui::after {
  transform: translateX(1.05rem);
  background: #fff;
}

@media (max-width: 860px) {
  .perms-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .perms-role-list,
  .perms-detail__list {
    max-height: 320px;
  }
}

/* Reports + Chatverlauf */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.report-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 0.9rem 1rem;
}

.report-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.report-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.report-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.report-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  font-size: 0.92rem;
}

.report-card__note {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
}

.report-card__toggle {
  margin-top: 0.7rem;
}

.report-card__chat {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.report-chat__hint {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.report-chat__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 420px;
  overflow: auto;
  padding-right: 0.25rem;
}

.report-chat__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.report-chat__row.is-relevant {
  background: rgba(232, 121, 249, 0.08);
  border: 1px solid rgba(232, 121, 249, 0.18);
}

.report-chat__row.is-match {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}

.report-chat__time {
  font-size: 0.78rem;
  padding-top: 0.15rem;
}

.report-chat__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: 0.85rem;
}

.report-chat__msg {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .report-chat__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}


