:root {
  --bg-0: #030915;
  --bg-1: #08152a;
  --bg-2: #0d2442;
  --panel: rgba(6, 16, 34, 0.9);
  --panel-strong: rgba(5, 13, 28, 0.96);
  --line: rgba(201, 167, 85, 0.3);
  --line-soft: rgba(151, 170, 201, 0.24);
  --text: #e8edf5;
  --muted: #95a6c3;
  --gold: #c9a755;
  --gold-soft: #edd59a;
  --danger: #ef7b71;
  --ok: #69d8aa;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
  --font-title: "Bebas Neue", "Oswald", "Franklin Gothic Medium", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Trebuchet MS", "Segoe UI", sans-serif;
  --logo-login-scale: 170% auto;
  --logo-login-position: center 52%;
  --logo-side-scale: 195% auto;
  --logo-side-position: center 50%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 167, 85, 0.72) rgba(7, 16, 32, 0.86);
}

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

*::-webkit-scrollbar-track {
  background: rgba(7, 16, 32, 0.92);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(7, 16, 32, 0.92);
  background: linear-gradient(180deg, #d7b35f, #a6792d);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e2c77b, #b18636);
}

body.staff-body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(1050px 700px at -12% -18%, #1a3d71 0%, transparent 58%),
    radial-gradient(880px 650px at 112% -30%, #143764 0%, transparent 52%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
}

body.staff-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4px;
}

.panel {
  background: linear-gradient(155deg, rgba(8, 20, 40, 0.92), rgba(6, 14, 29, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  color: #f8fbff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-discord {
  background: linear-gradient(135deg, #6673ff, #4f5dff);
  box-shadow: 0 10px 24px rgba(79, 93, 255, 0.34);
}

.btn-gold {
  background: linear-gradient(135deg, #d7b35f, #ad7f30);
  color: #1f190a;
  border-color: rgba(237, 213, 154, 0.35);
}

.btn-soft {
  background: rgba(151, 170, 201, 0.18);
  border-color: rgba(151, 170, 201, 0.3);
}

.pill {
  border: 1px solid rgba(105, 216, 170, 0.4);
  background: rgba(105, 216, 170, 0.12);
  color: var(--ok);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 10px;
}

.pill.offline {
  border-color: rgba(239, 123, 113, 0.4);
  background: rgba(239, 123, 113, 0.12);
  color: var(--danger);
}

.logo-block {
  width: min(420px, 92vw);
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  border: 1px solid rgba(201, 167, 85, 0.35);
  background:
    linear-gradient(180deg, rgba(3, 10, 22, 0.1), rgba(3, 10, 22, 0.4)),
    url("/assets/img/dojqc-logo.png"),
    url("/assets/img/dojqc-logo-fallback.svg"),
    radial-gradient(circle at 30% 20%, #172f58, #081731 68%, #041022 100%);
  background-size: cover, var(--logo-login-scale), 88% auto, cover;
  background-position: center, var(--logo-login-position), center, center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(237, 213, 154, 0.16), var(--shadow);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(980px, 100%);
  padding: clamp(20px, 3.2vw, 34px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}

.login-copy h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  letter-spacing: 1px;
  line-height: 0.95;
}

.login-copy .accent {
  color: var(--gold-soft);
}

.login-copy p {
  color: var(--muted);
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.login-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 85, 0.28);
  background: rgba(201, 167, 85, 0.13);
  color: var(--gold-soft);
  font-size: 0.82rem;
}

.shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar {
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #2f5960, #274d53) !important;
  border-color: rgba(176, 214, 222, 0.3) !important;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(201, 167, 85, 0.32);
  background:
    linear-gradient(180deg, rgba(3, 10, 22, 0.08), rgba(3, 10, 22, 0.32)),
    url("/assets/img/dojqc-logo.png"),
    url("/assets/img/dojqc-logo-fallback.svg"),
    radial-gradient(circle at 30% 20%, #172f58, #081731 68%, #041022 100%);
  background-size: cover, 190% auto, contain, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
}

.topbar-title {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: 0.8px;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1;
  color: #eff6ff;
}

.topbar-sub {
  margin: 0;
  color: #c5d6ef;
  font-size: 0.78rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .btn {
  padding: 7px 11px;
  font-size: 0.86rem;
}

.topbar .pill {
  font-size: 0.72rem;
  padding: 5px 9px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(197, 214, 239, 0.28);
  background: rgba(8, 30, 37, 0.34);
  min-width: 180px;
}

.user-chip strong {
  display: block;
  line-height: 1.1;
}

.user-chip span {
  color: #c5d6ef;
  font-size: 0.76rem;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(201, 167, 85, 0.38);
  background: linear-gradient(135deg, #d8ba6d, #8a6730);
  color: #0b1730;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  letter-spacing: 0.5px;
  background-size: cover;
  background-position: center;
}

.user-avatar.has-image {
  color: transparent;
}

.top-tabs {
  margin-top: 0;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(7, 18, 37, 0.95), rgba(11, 27, 51, 0.95)) !important;
  border: 1px solid rgba(201, 167, 85, 0.3) !important;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(2, 8, 18, 0.42);
}

.top-tabs a,
.top-tabs .nav-link {
  text-decoration: none;
  color: #d4e0f4;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  background: transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.top-tabs .nav-link:hover {
  background: rgba(151, 170, 201, 0.14);
  color: #f3f8ff;
}

.top-tabs .nav-link.active {
  border-bottom-color: rgba(237, 213, 154, 0.72);
  color: var(--gold-soft);
  background: rgba(201, 167, 85, 0.14);
}

.top-tabs-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-tabs-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.top-tabs-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-tabs .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-right: 0;
  margin-right: 2px;
  padding: 4px 12px 4px 2px;
  border-bottom: 0;
  min-width: 230px;
}

.nav-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(201, 167, 85, 0.45);
  background:
    linear-gradient(180deg, rgba(3, 10, 22, 0.04), rgba(3, 10, 22, 0.25)),
    url("/assets/img/dojqc-logo.png"),
    url("/assets/img/dojqc-logo-fallback.svg"),
    radial-gradient(circle at 30% 20%, #172f58, #081731 68%, #041022 100%);
  background-size: cover, 185% auto, contain, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
}

.nav-brand-text {
  color: #f3f8ff;
  font-family: var(--font-title);
  letter-spacing: 1px;
  font-size: 1.05rem;
}

.nav-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(151, 170, 201, 0.26) !important;
  background: rgba(8, 18, 36, 0.7) !important;
  min-width: 180px;
}

.nav-profile:hover {
  border-color: rgba(201, 167, 85, 0.46) !important;
  background: rgba(14, 30, 58, 0.82) !important;
}

.nav-profile.active {
  border-color: rgba(201, 167, 85, 0.54) !important;
  box-shadow: inset 0 0 0 1px rgba(201, 167, 85, 0.18);
}

.nav-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}

.nav-profile-meta {
  display: grid;
  line-height: 1.15;
  min-width: 0;
}

.nav-profile-meta strong {
  color: #f3f8ff;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-profile-meta span {
  color: #b7c8e2;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-logout {
  padding: 8px 11px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.nav-ace-link {
  border: 1px solid rgba(201, 167, 85, 0.36) !important;
  background: rgba(201, 167, 85, 0.13) !important;
  color: #ecd9a8 !important;
  padding: 9px 12px !important;
}

.nav-ace-link:hover {
  border-color: rgba(237, 213, 154, 0.6) !important;
  background: rgba(201, 167, 85, 0.2) !important;
}

.nav-ace-link.active {
  border-color: rgba(237, 213, 154, 0.78) !important;
  background: rgba(201, 167, 85, 0.28) !important;
  color: #fff4d8 !important;
}

.page-main {
  margin-top: 10px;
}

.hub-home {
  position: relative;
  overflow: hidden;
}

.hub-home::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 167, 85, 0.16), transparent 66%);
  pointer-events: none;
}

.home-hero {
  border: 1px solid rgba(201, 167, 85, 0.32);
  border-radius: 14px;
  padding: clamp(12px, 1.8vw, 18px);
  background: linear-gradient(140deg, rgba(11, 30, 56, 0.86), rgba(8, 19, 39, 0.92));
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.home-kicker {
  margin: 0;
  letter-spacing: 1.1px;
  font-size: 0.74rem;
  color: var(--gold-soft);
}

.home-hero-copy h2 {
  margin-top: 6px;
}

.home-hero-visual {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.24);
  background:
    linear-gradient(180deg, rgba(3, 10, 22, 0.08), rgba(3, 10, 22, 0.4)),
    radial-gradient(circle at 20% 10%, rgba(24, 73, 126, 0.5), transparent 55%),
    linear-gradient(135deg, rgba(9, 22, 43, 0.9), rgba(7, 17, 32, 0.92));
  padding: 14px;
  display: grid;
  align-content: space-between;
  min-height: 220px;
}

.home-hero-visual p {
  margin: 0;
  color: #c0d2ef;
  font-size: 0.86rem;
}

.infra-board {
  align-content: start;
  gap: 10px;
}

.infra-board h3 {
  margin: 0;
}

.infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.infra-item {
  border-radius: 10px;
  border: 1px solid rgba(151, 170, 201, 0.26);
  background: rgba(7, 18, 34, 0.72);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.infra-item span {
  color: #a5bbdb;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.infra-item strong {
  color: #eef4ff;
  font-size: 0.96rem;
}

.infra-foot {
  color: #bad0f1;
  font-size: 0.86rem;
}

.kpi-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.74), rgba(8, 16, 32, 0.88));
  padding: 12px;
  min-height: 124px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.kpi-label {
  margin: 0;
  color: #c4d3ea;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.kpi-line {
  min-height: 34px;
  display: flex;
  align-items: center;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.kpi-foot {
  margin: 0;
  color: #95a6c3;
  font-size: 0.86rem;
}

.quick-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.74), rgba(8, 16, 32, 0.88));
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.quick-card h3 {
  margin: 0;
}

.quick-card p {
  margin: 0;
  color: #9cb0d0;
}

.quick-label {
  color: #c4d3ea !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.quick-metric {
  margin-top: 3px;
}

.quick-metric strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1.15;
}

.quick-metric span {
  color: #9cb0d0;
  font-size: 0.86rem;
}

.home-columns {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
  align-items: start;
}

.home-columns.single-column {
  grid-template-columns: 1fr;
}

.home-block {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.76), rgba(8, 16, 32, 0.9));
  padding: 12px;
}

.home-block-head h3 {
  margin: 0;
}

.home-block-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.timeline-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.timeline-item {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.24);
  background: linear-gradient(145deg, rgba(10, 24, 45, 0.82), rgba(7, 17, 32, 0.92));
  padding: 10px 11px;
  display: grid;
  gap: 5px;
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-tag {
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 85, 0.42);
  background: rgba(201, 167, 85, 0.13);
  color: var(--gold-soft);
  font-size: 0.7rem;
  letter-spacing: 0.7px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.timeline-tag.timeline-tag-create {
  border-color: rgba(105, 216, 170, 0.48);
  background: rgba(105, 216, 170, 0.16);
  color: #9bf0c6;
}

.timeline-tag.timeline-tag-update {
  border-color: rgba(151, 170, 201, 0.5);
  background: rgba(151, 170, 201, 0.2);
  color: #d8e6ff;
}

.timeline-tag.timeline-tag-delete {
  border-color: rgba(239, 123, 113, 0.5);
  background: rgba(239, 123, 113, 0.15);
  color: #ffb1ab;
}

.timeline-time {
  color: #9eb1d0;
  font-size: 0.76rem;
}

.timeline-title {
  margin: 0;
  font-weight: 700;
}

.timeline-meta {
  margin: 0;
  color: #9ab0d4;
  font-size: 0.87rem;
}

.queue-block {
  display: grid;
  gap: 10px;
  align-content: start;
}

.queue-grid {
  display: grid;
  gap: 8px;
}

.queue-card {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.24);
  background: linear-gradient(145deg, rgba(10, 24, 45, 0.82), rgba(7, 17, 32, 0.92));
  padding: 12px;
}

.queue-label {
  margin: 0 0 5px;
  color: #b2c4df;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.85px;
}

.queue-value {
  display: block;
  font-size: 1.42rem;
  line-height: 1;
  margin-bottom: 5px;
}

.queue-card .sub {
  margin: 0;
}

.queue-summary {
  margin-top: 0;
  border-top: 1px dashed rgba(151, 170, 201, 0.26);
  padding-top: 10px;
}

.shell-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}

.sidebar {
  padding: 14px;
}

.sidebar-logo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid rgba(201, 167, 85, 0.28);
  background:
    linear-gradient(180deg, rgba(3, 10, 22, 0.05), rgba(3, 10, 22, 0.35)),
    url("/assets/img/dojqc-logo.png"),
    url("/assets/img/dojqc-logo-fallback.svg"),
    radial-gradient(circle at 30% 20%, #172f58, #081731 68%, #041022 100%);
  background-size: cover, var(--logo-side-scale), contain, cover;
  background-position: center, var(--logo-side-position), center, center;
  background-repeat: no-repeat;
}

.sidebar-user {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px;
  background: rgba(8, 18, 36, 0.7);
}

.sidebar-user strong {
  display: block;
  font-size: 1rem;
}

.sidebar-user span {
  color: var(--muted);
  font-size: 0.84rem;
}

.side-nav {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.side-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 9px 10px;
  background: rgba(8, 18, 36, 0.64);
  font-weight: 700;
}

.side-nav a.active {
  border-color: rgba(237, 213, 154, 0.45);
  box-shadow: inset 0 0 0 1px rgba(237, 213, 154, 0.18);
  color: var(--gold-soft);
}

.side-actions {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.content {
  padding: 16px;
}

.content h2 {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: 1px;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.sanctions-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.sanctions-header-copy {
  flex: 1 1 320px;
  min-width: 240px;
}

.sanctions-header-copy .sub {
  margin-bottom: 0;
}

.sanctions-global-search {
  margin-left: auto;
  flex: 1 1 430px;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sanctions-global-search input {
  flex: 1 1 auto;
  min-width: 230px;
}

.sanctions-global-search .btn {
  white-space: nowrap;
}

.sub {
  margin-top: 4px;
  color: var(--muted);
}

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.card {
  grid-column: span 4;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.78), rgba(8, 16, 32, 0.9));
  padding: 12px;
}

.card h3,
.card h4 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow-x: auto;
}

.bans-toolbar {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.bans-toolbar input {
  flex: 1 1 320px;
  max-width: 540px;
}

.staff-filter-control {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.staff-filter-control select {
  min-width: 220px;
  max-width: 320px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.bans-table {
  min-width: 980px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid rgba(151, 170, 201, 0.15);
  text-align: left;
}

th {
  color: var(--gold-soft);
  background: rgba(201, 167, 85, 0.12);
}

tr:last-child td {
  border-bottom: 0;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reason-preview {
  display: inline-block;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.duration-permanent {
  color: #ff7d73;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(151, 170, 201, 0.35);
  background: rgba(151, 170, 201, 0.12);
  color: #d3e2fb;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.status-pill.status-active {
  border-color: rgba(105, 216, 170, 0.45);
  background: rgba(105, 216, 170, 0.16);
  color: #9bf0c6;
}

.status-pill.status-expired {
  border-color: rgba(239, 123, 113, 0.45);
  background: rgba(239, 123, 113, 0.14);
  color: #ffb1ab;
}

.status-pill.status-unknown {
  border-color: rgba(201, 167, 85, 0.45);
  background: rgba(201, 167, 85, 0.14);
  color: #efdba8;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.btn-danger {
  background: linear-gradient(135deg, #d46e65, #b4473f);
  border-color: rgba(239, 123, 113, 0.45);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 18, 0.68);
  display: grid;
  place-items: start center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1000;
}

.modal-card {
  width: min(760px, 100%);
  padding: 14px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.confirm-card {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.modal-head h3 {
  margin: 0;
}

.form-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
}

.field-full {
  grid-column: 1 / -1;
}

.match-list {
  border: 1px solid rgba(151, 170, 201, 0.22);
  border-radius: 10px;
  background: rgba(7, 16, 32, 0.78);
  max-height: 170px;
  overflow-y: auto;
}

.match-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.match-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.match-item:hover {
  background: rgba(151, 170, 201, 0.14);
}

.rules-selected {
  border: 1px solid rgba(151, 170, 201, 0.22);
  border-radius: 10px;
  background: rgba(7, 16, 32, 0.62);
  min-height: 42px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
}

.rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 85, 0.38);
  background: rgba(201, 167, 85, 0.16);
  color: #f1dcab;
  padding: 5px 10px;
  max-width: 100%;
}

.rule-chip-text {
  font-size: 0.8rem;
  line-height: 1.15;
}

.rule-chip-remove {
  border: 0;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  background: rgba(239, 123, 113, 0.22);
  color: #ffd6d2;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
}

.rule-chip-remove:hover {
  background: rgba(239, 123, 113, 0.36);
}

.duration-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.duration-custom input {
  flex: 1 1 auto;
}

.duration-custom select {
  width: auto;
  min-width: 130px;
}

.duration-suffix {
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 74px;
}

.proof-paste {
  border: 1px dashed rgba(201, 167, 85, 0.45);
  border-radius: 10px;
  min-height: 56px;
  padding: 11px 12px;
  background: rgba(7, 16, 32, 0.68);
  color: #d7e3f8;
  cursor: text;
}

.proof-paste:focus {
  outline: 0;
  border-color: rgba(237, 213, 154, 0.82);
  box-shadow: inset 0 0 0 1px rgba(237, 213, 154, 0.18);
}

.proof-help {
  margin: 0;
  color: #95a6c3;
  font-size: 0.82rem;
}

.proof-preview {
  border: 1px solid rgba(151, 170, 201, 0.25);
  border-radius: 12px;
  padding: 10px;
  background: rgba(7, 16, 32, 0.82);
  display: grid;
  gap: 10px;
}

.proof-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(151, 170, 201, 0.2);
  background: rgba(3, 10, 22, 0.72);
  cursor: zoom-in;
}

.modal-view-card {
  width: min(860px, 100%);
}

.ban-view-sheet {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.ban-view-header {
  border: 1px solid rgba(201, 167, 85, 0.3);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(11, 30, 56, 0.88), rgba(8, 19, 39, 0.93));
  padding: 12px;
}

.ban-view-code {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: 1px;
  font-size: 1.46rem;
  color: var(--gold-soft);
}

.ban-view-code.ban-status-active {
  color: #9bf0c6;
}

.ban-view-code.ban-status-expired {
  color: #ffb1ab;
}

.ban-view-code.ban-status-unknown {
  color: var(--gold-soft);
}

.ban-view-header .sub {
  margin: 2px 0 0;
}

.ban-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ban-view-row {
  border: 1px solid rgba(151, 170, 201, 0.24);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.74), rgba(8, 16, 32, 0.88));
  padding: 10px;
  display: grid;
  gap: 5px;
}

.ban-view-row span {
  color: #9db3d6;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.ban-view-row strong {
  font-size: 1.03rem;
  word-break: break-word;
}

.ban-view-block {
  border: 1px solid rgba(151, 170, 201, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(10, 24, 45, 0.82), rgba(7, 17, 32, 0.92));
  padding: 12px;
}

.ban-view-label {
  margin: 0 0 8px;
  color: #c5d5ef;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ban-view-text {
  margin: 0;
  white-space: pre-wrap;
  color: #e9f0fb;
}

.ban-proof-link {
  margin: 0;
  word-break: break-all;
  color: #d7e4fa;
}

.ban-proof-link a {
  color: var(--gold-soft);
  text-decoration: underline;
}

.ban-proof-image {
  margin-top: 10px;
}

.ban-proof-image img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.26);
  background: rgba(3, 10, 22, 0.72);
  cursor: zoom-in;
}

.image-zoom-backdrop {
  background: rgba(2, 8, 18, 0.82);
  z-index: 1200;
}

.image-zoom-card {
  width: min(1120px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  gap: 10px;
}

.image-zoom-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-zoom-viewport {
  border: 1px solid rgba(151, 170, 201, 0.24);
  border-radius: 12px;
  background: rgba(3, 10, 22, 0.72);
  min-height: min(78vh, 680px);
  display: grid;
  place-items: center;
  overflow: auto;
}

.image-zoom-viewport img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  transition: transform 0.12s ease;
  will-change: transform;
}

@media (max-width: 680px) {
  .image-zoom-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.notice {
  margin-top: 12px;
  border: 1px dashed rgba(151, 170, 201, 0.35);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
}

.notice.error {
  border-color: rgba(239, 123, 113, 0.5);
  color: var(--danger);
}

.stack {
  display: grid;
  gap: 10px;
}

textarea,
input,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  padding: 10px 11px;
  background: rgba(7, 16, 32, 0.82);
  color: var(--text);
  font-family: inherit;
}

input[readonly] {
  opacity: 0.86;
  background: rgba(10, 22, 43, 0.82);
}

.toolbar {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.78), rgba(8, 16, 32, 0.9));
  padding: 14px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  border: 1px solid rgba(201, 167, 85, 0.4);
  background: linear-gradient(135deg, #d8ba6d, #8a6730);
  display: grid;
  place-items: center;
  color: #0b1730;
  font-family: var(--font-title);
  font-size: 1.15rem;
  background-size: cover;
  background-position: center;
}

.profile-avatar.has-image {
  color: transparent;
}

.profile-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(151, 170, 201, 0.16);
  padding-bottom: 8px;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row .label {
  color: var(--muted);
  font-size: 0.88rem;
}

.perm-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.perm-chip {
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 85, 0.34);
  background: rgba(201, 167, 85, 0.14);
  color: var(--gold-soft);
  padding: 4px 9px;
  font-size: 0.78rem;
}

.ace-page {
  display: grid;
  gap: 12px;
}

.ace-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ace-stat-card {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.26);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.78), rgba(8, 16, 32, 0.92));
  padding: 12px;
  display: grid;
  gap: 6px;
}

.ace-stat-label {
  margin: 0;
  color: #b7c8e2;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ace-stat-value {
  font-size: 1.32rem;
  line-height: 1.1;
  color: #f0f6ff;
}

.ace-stat-meta {
  margin: 0;
  color: #98accd;
  font-size: 0.84rem;
}

.ace-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  align-items: start;
}

.ace-block {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.78), rgba(8, 16, 32, 0.92));
  padding: 12px;
}

.ace-block h3 {
  margin: 0;
}

.ace-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ace-role-list {
  display: grid;
  gap: 10px;
}

.ace-role-card {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(145deg, rgba(10, 24, 45, 0.84), rgba(7, 17, 32, 0.94));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.ace-role-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.ace-role-head h4 {
  margin: 0;
}

.ace-subtitle {
  margin: 0;
  color: #b9cbe7;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

.ace-permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
}

.ace-perm-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(151, 170, 201, 0.22);
  border-radius: 10px;
  background: rgba(7, 16, 32, 0.72);
  padding: 7px 9px;
  min-height: 34px;
}

.ace-perm-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.ace-perm-check span {
  color: #dce8fb;
  font-size: 0.82rem;
  word-break: break-word;
}

.ace-user-grid {
  margin-top: 10px;
}

.ace-user-override-list {
  display: grid;
  gap: 8px;
}

.ace-user-row {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.24);
  background: linear-gradient(145deg, rgba(10, 24, 45, 0.84), rgba(7, 17, 32, 0.94));
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.ace-user-row-info h4 {
  margin: 0;
}

.panel-lite {
  border-radius: 12px;
  border: 1px solid rgba(151, 170, 201, 0.25);
  background: linear-gradient(140deg, rgba(8, 20, 40, 0.78), rgba(8, 16, 32, 0.9));
  padding: 12px;
}

.players-page {
  display: grid;
  gap: 12px;
}

.players-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.players-toolbar input {
  flex: 1 1 320px;
}

.players-toolbar select {
  width: auto;
  min-width: 160px;
}

.players-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.players-list {
  min-width: 0;
  width: 100%;
}

.players-table-wrap {
  margin-top: 0;
}

.players-table {
  min-width: 1250px;
}

.players-discord-cell {
  display: grid;
  gap: 2px;
}

.players-discord-cell strong {
  line-height: 1.1;
}

.players-discord-cell span {
  color: #9eb1d0;
  font-size: 0.82rem;
}

.status-pill.status-watch {
  border-color: rgba(239, 123, 113, 0.5);
  background: rgba(239, 123, 113, 0.14);
  color: #ffb1ab;
}

.status-pill.status-good {
  border-color: rgba(105, 216, 170, 0.48);
  background: rgba(105, 216, 170, 0.16);
  color: #9bf0c6;
}

.status-pill.status-flagged {
  border-color: rgba(201, 167, 85, 0.5);
  background: rgba(201, 167, 85, 0.16);
  color: #efdba8;
}

.status-pill.status-neutral {
  border-color: rgba(151, 170, 201, 0.38);
  background: rgba(151, 170, 201, 0.14);
  color: #d6e5fb;
}

.player-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-badges {
  max-width: 270px;
}

.player-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 85, 0.35);
  background: rgba(201, 167, 85, 0.14);
  color: #f0dcac;
  font-size: 0.75rem;
  padding: 3px 8px;
  line-height: 1.2;
}

.players-profile-sheet {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.players-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.players-profile-head h3 {
  margin: 0;
}

.players-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-badge-control {
  display: grid;
  gap: 6px;
}

.players-info-grid {
  margin-top: 2px;
}

.players-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.players-alias-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.players-mini-title {
  margin: 0 0 6px;
  color: #a4b9da;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.players-list-inline {
  margin: 0;
  padding-left: 18px;
  color: #dce7fa;
  display: grid;
  gap: 4px;
}

.players-note-list {
  display: grid;
  gap: 8px;
}

.players-note-item {
  border: 1px solid rgba(151, 170, 201, 0.24);
  border-radius: 10px;
  background: rgba(7, 16, 32, 0.6);
  padding: 9px 10px;
}

.players-note-meta {
  margin: 0;
  color: #9bb1d4;
  font-size: 0.78rem;
}

.players-note-content {
  margin: 6px 0 0;
  white-space: pre-wrap;
  color: #ecf3ff;
}

.players-note-form {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.players-timeline {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.players-profile-modal {
  width: min(1080px, 100%);
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .login-card {
    grid-template-columns: 1fr;
  }

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

  .card {
    grid-column: span 6;
  }

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

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

  .ace-layout {
    grid-template-columns: 1fr;
  }

  .players-layout {
    grid-template-columns: 1fr;
  }

  .players-alias-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    min-height: 170px;
  }

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

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .ban-view-grid {
    grid-template-columns: 1fr;
  }

  .top-tabs {
    overflow: visible;
    flex-wrap: wrap;
    padding: 9px;
  }

  .top-tabs-left {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .top-tabs-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-tabs-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .top-tabs .nav-brand {
    min-width: 170px;
  }

  .nav-profile {
    min-width: 0;
    flex: 1;
  }

  .sanctions-global-search {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .card {
    grid-column: span 12;
  }

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

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

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

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

  .nav-profile-meta span {
    display: none;
  }

  .sanctions-global-search {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-filter-control {
    margin-left: 0;
    width: 100%;
  }

  .staff-filter-control select {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
}
