/* SDVN Control Center visual system v2. Bootstrap 5.3.8 and Bootstrap Icons 1.13.1 are vendored locally. */
:root,
html[data-theme="abyss"] {
  --bg: #0a0f17;
  --bg-elevated: #0f1622;
  --surface: #151c27;
  --surface-2: #1a2230;
  --surface-3: #202a3b;
  --border: #2a374b;
  --border-soft: #202b3c;
  --text: #f3f6fb;
  --text-soft: #9eacc0;
  --text-muted: #718198;
  --accent: #4d8dff;
  --accent-strong: #3b82f6;
  --accent-soft: rgba(77,141,255,.15);
  --success: #35c58b;
  --warning: #f4b860;
  --danger: #f36c7d;
  --sidebar-width: 254px;
  --topbar-height: 54px;
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 14px;
  --shadow: 0 22px 60px rgba(0,0,0,.26);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Daily Claims */
.reward-server-selector {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: min(22rem, 100%);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reward-server-selector select { flex: 1; min-width: 0; text-transform: none; }

.reward-scope-banner {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1rem;
  padding: .72rem .9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text-muted);
  font-size: .82rem;
}

.reward-scope-banner > i { color: var(--accent); }
.reward-scope-banner > strong { color: var(--text); font-size: .9rem; }
.reward-scope-banner .status-chip { margin-left: auto; }

.reward-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(20rem, .88fr);
  gap: 1rem;
  align-items: start;
}

.reward-page-grid > .empty-state { grid-column: 1 / -1; }

.reward-daily-card {
  position: relative;
  overflow: hidden;
  min-height: 29rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background:
    radial-gradient(circle at 88% 6%, color-mix(in srgb, var(--accent) 28%, transparent) 0, transparent 35%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 94%, var(--accent)), var(--surface));
}

.reward-daily-card::after {
  content: "";
  position: absolute;
  width: 16rem;
  height: 16rem;
  right: -6rem;
  bottom: -7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 2.4rem color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 4.8rem color-mix(in srgb, var(--accent) 2%, transparent);
  pointer-events: none;
}

.reward-hero-top,
.reward-actions,
.reward-history-row,
.reward-audit-row {
  display: flex;
  align-items: center;
}

.reward-hero-top { justify-content: space-between; gap: 1rem; }
.reward-hero-top h2 { margin: .35rem 0 0; font-size: clamp(1.35rem, 2.5vw, 2rem); }

.reward-amount {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin: clamp(2rem, 6vw, 4rem) 0 .5rem;
  color: var(--accent);
}

.reward-amount > span { font-size: 2rem; font-weight: 300; }
.reward-amount > strong { color: var(--text); font-size: clamp(3.5rem, 8vw, 6.5rem); line-height: .9; letter-spacing: -.075em; }
.reward-amount > small { color: var(--text-muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.reward-hero-copy { max-width: 38rem; margin: 1rem 0 1.5rem; color: var(--text-muted); }

.reward-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0 1.5rem;
}

.reward-facts .metric-card { min-height: 7rem; background: color-mix(in srgb, var(--surface-2) 74%, transparent); backdrop-filter: blur(12px); }

.reward-actions {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
}

.reward-claim-button {
  min-width: 12rem;
  padding: .9rem 1.25rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast, #06100c);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 24%, transparent);
  font-weight: 800;
}

.reward-claim-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.reward-claim-button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.reward-pending-copy { display: grid; gap: .25rem; }
.reward-pending-copy small { color: var(--text-muted); }

.reward-history-panel,
.reward-policy-panel,
.reward-audit-panel { padding: 1.1rem; }

.reward-history-list,
.reward-audit-list { display: grid; gap: .4rem; }

.reward-history-row,
.reward-audit-row {
  gap: .8rem;
  min-height: 4.25rem;
  padding: .7rem .2rem;
  border-top: 1px solid var(--border);
}

.reward-history-icon {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--accent);
}

.reward-history-row > div,
.reward-audit-row > div { display: grid; flex: 1; gap: .15rem; min-width: 0; }
.reward-history-row small,
.reward-audit-row small { color: var(--text-muted); font-size: .76rem; }
.reward-audit-row > i { color: var(--accent); font-size: 1.05rem; }

.reward-policy-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.reward-policy-toggle,
.reward-policy-reason,
.reward-policy-form > button { grid-column: 1 / -1; }

.reward-policy-toggle {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.reward-policy-toggle input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.reward-policy-note { margin: .9rem 0 0; color: var(--text-muted); font-size: .78rem; }

@media (max-width: 980px) {
  .reward-page-grid { grid-template-columns: 1fr; }
  .reward-daily-card { min-height: auto; }
}

@media (max-width: 620px) {
  .reward-server-selector { width: 100%; align-items: stretch; flex-direction: column; }
  .reward-facts,
  .reward-policy-form { grid-template-columns: 1fr; }
  .reward-policy-toggle,
  .reward-policy-reason,
  .reward-policy-form > button { grid-column: auto; }
  .reward-actions { align-items: stretch; flex-direction: column; }
  .reward-claim-button { width: 100%; }
  .reward-amount > strong { font-size: 4rem; }
}
html[data-theme="jungle"] { --accent:#42c78a; --accent-strong:#22a96c; --accent-soft:rgba(66,199,138,.14); }
html[data-theme="ember"] { --accent:#f08a55; --accent-strong:#df6c35; --accent-soft:rgba(240,138,85,.14); }
html[data-theme="nebula"] { --accent:#a47cf3; --accent-strong:#875be0; --accent-soft:rgba(164,124,243,.14); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:linear-gradient(180deg,#0a0f17 0%,#0b111b 45%,#0a0f17 100%);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
::selection { background: rgba(79,140,255,.35); }
.icon-sprite { position:absolute; width:0; height:0; overflow:hidden; }

.center-stage {
  min-height: 100vh; display:flex; align-items:center; justify-content:center; gap:18px;
  color:var(--text-soft); background:radial-gradient(circle at 50% 20%,#17243a 0,transparent 42%),var(--bg);
}
.center-stage strong { display:block; color:var(--text); font-size:17px; }
.center-stage p { margin:3px 0 0; }
.boot-logo { position:relative; display:grid; place-items:center; width:52px; height:52px; color:var(--accent); font-size:48px; }
.boot-logo span { position:absolute; color:white; font-weight:800; font-size:17px; }

.login-layout { min-height:100vh; display:grid; grid-template-columns:minmax(420px, .85fr) minmax(520px, 1.15fr); background:var(--bg); }
.login-panel { display:flex; flex-direction:column; justify-content:center; padding:clamp(40px,7vw,110px); border-right:1px solid var(--border-soft); }
.brand-lockup { display:flex; align-items:center; gap:12px; }
.brand-lockup > div { display:flex; flex-direction:column; line-height:1.15; }
.brand-lockup strong { letter-spacing:.08em; font-size:17px; }
.brand-lockup small { color:var(--text-muted); font-size:10px; letter-spacing:.16em; margin-top:4px; }
.brand-mark { position:relative; width:38px; height:38px; display:grid; place-items:center; color:var(--accent); font-size:36px; }
.brand-mark b { position:absolute; color:white; font-size:13px; }
.login-copy { margin:clamp(72px,11vh,120px) 0 42px; max-width:580px; }
.signal-pill { display:inline-flex; align-items:center; gap:8px; color:var(--text-soft); border:1px solid var(--border); border-radius:999px; padding:6px 11px; font-size:11px; font-weight:700; letter-spacing:.08em; }
.signal-pill i { width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 0 4px rgba(53,197,139,.12); }
.login-copy h1 { margin:24px 0 18px; font-size:clamp(42px,5vw,70px); line-height:1.02; letter-spacing:-.045em; font-weight:720; }
.login-copy p { margin:0; max-width:520px; color:var(--text-soft); font-size:16px; }
.steam-button { max-width:430px; min-height:54px; display:flex; align-items:center; justify-content:center; gap:12px; border:0; background:var(--accent-strong); box-shadow:0 14px 34px rgba(52,120,246,.25); }
.steam-button .bi-arrow-right { margin-left:auto; }
.login-note { margin:14px 0 0; color:var(--text-muted); font-size:12px; }
.login-aside { position:relative; overflow:hidden; display:flex; align-items:flex-end; padding:clamp(44px,7vw,104px); background:linear-gradient(145deg,#101a2b 0%,#0b111b 60%,#111927 100%); }
.login-aside::before { content:""; position:absolute; inset:0; opacity:.28; background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px); background-size:44px 44px; mask-image:linear-gradient(to bottom,black,transparent 85%); }
.login-glow { position:absolute; width:600px; height:600px; right:-180px; top:-180px; border-radius:50%; background:radial-gradient(circle,rgba(79,140,255,.25),transparent 66%); }
.aside-content { position:relative; z-index:1; width:100%; }
.aside-content h2 { margin:18px 0 38px; font-size:clamp(34px,4vw,58px); letter-spacing:-.04em; line-height:1.06; }
.login-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.login-metrics article { min-height:126px; padding:18px; display:flex; flex-direction:column; justify-content:flex-end; border:1px solid rgba(255,255,255,.09); border-radius:var(--radius); background:rgba(13,18,28,.62); backdrop-filter:blur(12px); }
.login-metrics i { color:var(--accent); font-size:22px; margin-bottom:auto; }
.login-metrics span { color:var(--text-muted); font-size:11px; text-transform:uppercase; letter-spacing:.1em; }
.login-metrics strong { margin-top:4px; font-size:14px; }

.app-shell { min-height:100vh; display:block; background:var(--bg); }
.sidebar { position:fixed; z-index:50; inset:0 auto 0 0; width:var(--sidebar-width); display:flex; flex-direction:column; background:#0c1119; border-right:1px solid #253044; }
.sidebar-brand { flex:0 0 var(--topbar-height); min-height:var(--topbar-height); padding:0 15px; border-bottom:1px solid var(--border-soft); }
.sidebar-brand .brand-mark { width:31px; height:31px; font-size:30px; }
.sidebar-brand .brand-mark b { font-size:11px; }
.sidebar-brand .brand-lockup strong { font-size:15px; letter-spacing:.01em; }
.sidebar-brand .brand-lockup small { font-size:9px; letter-spacing:.1em; }
.environment-badge { margin-left:auto; padding:3px 7px; border:1px solid rgba(244,184,96,.35); border-radius:5px; color:var(--warning); background:rgba(244,184,96,.08); font-size:9px; font-weight:800; letter-spacing:.12em; }
#main-nav { flex:1; overflow-y:auto; padding:16px 8px 24px; scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.nav-label { margin:18px 8px 7px; color:#66768d; font-size:10px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.nav-label:first-child { margin-top:2px; }
.nav-item { position:relative; width:100%; min-height:36px; margin:1px 0; padding:0 10px; display:flex; align-items:center; gap:10px; color:#a6b2c4; border:1px solid transparent; border-radius:7px; background:transparent; text-align:left; transition:background .15s,color .15s,border-color .15s; }
.nav-item > i { flex:0 0 19px; width:19px; font-size:15px; text-align:center; color:#7e8ca1; }
.nav-item:hover { color:#f7f9fc; background:#151e2d; }
.nav-item.active { color:#f5f8ff; background:#1b2638; border-color:rgba(77,141,255,.25); }
.nav-item.active::before { content:""; position:absolute; left:-8px; top:7px; bottom:7px; width:3px; border-radius:0 3px 3px 0; background:var(--accent); }
.nav-item.active > i { color:#72a6ff; }
.nav-copy { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:580; }
.sidebar-foot { min-height:58px; padding:10px 15px; display:flex; align-items:center; gap:11px; border-top:1px solid var(--border-soft); background:#0a0f17; }
.sidebar-foot > div { display:flex; flex-direction:column; min-width:0; }
.sidebar-foot strong { font-size:12px; }
.sidebar-foot small { color:var(--text-muted); font-size:10px; }
.system-dot { flex:0 0 9px; width:9px; height:9px; border-radius:50%; background:var(--danger); box-shadow:0 0 0 4px rgba(243,108,125,.1); }
.system-dot.online { background:var(--success); box-shadow:0 0 0 4px rgba(53,197,139,.1); }

.workspace { min-height:100vh; margin-left:var(--sidebar-width); }
.topbar { position:sticky; z-index:40; top:0; min-height:var(--topbar-height); padding:0 17px; display:flex; align-items:center; gap:14px; border-bottom:1px solid #263246; background:rgba(10,15,23,.94); backdrop-filter:blur(18px); }
#menu-button { display:none; }
.topbar-title { min-width:150px; display:flex; align-items:center; }
.topbar-title::before { content:"SDVN"; margin-right:13px; color:#dbe5f5; font-size:14px; font-weight:760; letter-spacing:.02em; }
.topbar-title .eyebrow { display:none; }
.topbar-title h1 { margin:0; font-size:14px; line-height:1.2; font-weight:650; letter-spacing:-.015em; }
.topbar-spacer { flex:1; }
.server-switcher,.theme-control { min-height:32px; display:flex; align-items:center; gap:8px; padding:0 10px; color:var(--text-muted); border:1px solid var(--border); border-radius:7px; background:#121a27; }
.server-switcher { display:none; }
.server-switcher span { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.server-switcher select,.theme-control select { max-width:190px; color:var(--text); border:0; outline:0; background:transparent; font-weight:600; }
.theme-control select { width:86px; }
.discord-auth-button { min-height:38px; padding:0 12px; display:inline-flex; align-items:center; gap:8px; border:1px solid rgba(88,101,242,.42); border-radius:8px; color:#cfd3ff; background:rgba(88,101,242,.13); font-weight:650; text-decoration:none; }
.account-cluster { display:flex; align-items:center; gap:8px; padding-left:11px; border-left:1px solid var(--border-soft); }
.account-avatar { width:29px; height:29px; display:grid; place-items:center; border:1px solid var(--border); border-radius:50%; color:var(--accent); background:var(--surface-2); }
.account-copy { display:flex; flex-direction:column; min-width:76px; max-width:150px; }
.account-copy strong,.account-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-copy strong { font-size:11px; }
.account-copy span { color:var(--text-muted); font-size:9px; text-transform:capitalize; }
.ghost-button,.icon-button { min-height:31px; padding:0 9px; display:inline-flex; align-items:center; justify-content:center; gap:7px; color:var(--text-soft); border:1px solid var(--border); border-radius:7px; background:#121a27; }
.ghost-button:hover,.icon-button:hover { color:var(--text); background:var(--surface-2); }
.discord-gate { margin:16px 32px 0; padding:13px 15px; display:flex; align-items:center; justify-content:space-between; gap:16px; border:1px solid rgba(88,101,242,.4); border-radius:11px; background:rgba(88,101,242,.1); }
.discord-gate > div { display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:9px; }
.discord-gate i { color:#8791ff; font-size:20px; }
.discord-gate span { color:var(--text-soft); }
.discord-bot-panel { max-width:920px; display:grid; gap:18px; }
.discord-bot-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.discord-bot-field { display:grid; gap:7px; color:var(--text); font-weight:650; }
.discord-bot-field:first-child { grid-column:1 / -1; }
.discord-bot-field small { color:var(--text-soft); font-weight:400; }
.discord-bot-field input { width:100%; min-height:42px; border:1px solid var(--border); border-radius:8px; background:var(--surface-raised); color:var(--text); padding:9px 11px; }
.discord-bot-toggle,.discord-bot-actions { grid-column:1 / -1; display:flex; align-items:center; gap:10px; }
.discord-bot-instructions { grid-column:1 / -1; padding:16px; border:1px solid rgba(88,101,242,.35); border-radius:10px; background:rgba(88,101,242,.08); display:grid; gap:8px; }
.discord-bot-instructions p { margin:0; color:var(--text-soft); }
.discord-bot-instructions code { overflow-wrap:anywhere; color:#cfd3ff; }
.discord-bot-actions { justify-content:flex-end; }
.btn-discord { color:#fff; background:#5865f2; border-color:#5865f2; }
.btn[aria-disabled="true"] { pointer-events:none; opacity:.5; }
.status-badge { width:max-content; min-height:25px; padding:3px 9px; display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); background:var(--surface-2); font-size:10px; font-weight:750; letter-spacing:.035em; }
.status-badge.success { color:var(--success); border-color:rgba(53,197,139,.28); background:rgba(53,197,139,.08); }
.status-badge.warning { color:var(--warning); border-color:rgba(244,184,96,.32); background:rgba(244,184,96,.09); }
.status-badge.danger { color:var(--danger); border-color:rgba(244,99,99,.3); background:rgba(244,99,99,.08); }
.discord-role-catalog { max-width:1180px; margin-top:20px; display:grid; gap:17px; }
.discord-role-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.discord-role-header-copy h3 { margin:4px 0 5px; font-size:18px; letter-spacing:-.02em; }
.discord-role-header-copy p { max-width:700px; margin:0; color:var(--text-soft); font-size:13px; }
.discord-role-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.discord-role-meta { padding:10px 13px; display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid var(--border-soft); border-radius:9px; background:var(--surface-raised); }
.discord-role-meta strong { font-size:12px; }
.discord-role-meta span { color:var(--text-muted); font-size:11px; }
.discord-role-notice { margin:0; padding:10px 12px; border:1px solid var(--border-soft); border-radius:8px; color:var(--text-soft); background:rgba(116,137,168,.06); font-size:12px; }
.discord-role-notice.warning { color:var(--warning); border-color:rgba(244,184,96,.3); background:rgba(244,184,96,.07); }
.discord-role-notice.danger { color:#ff9b9b; border-color:rgba(244,99,99,.3); background:rgba(244,99,99,.07); }
.discord-role-workspace { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(280px,1fr); gap:18px; align-items:start; }
.discord-role-browser,.discord-role-inspector { min-width:0; padding:15px; border:1px solid var(--border); border-radius:10px; background:var(--surface-raised); }
.discord-role-search { min-height:39px; padding:0 11px; display:flex; align-items:center; gap:9px; border:1px solid var(--border); border-radius:8px; color:var(--text-muted); background:#0c121c; }
.discord-role-search:focus-within { border-color:rgba(67,139,246,.7); box-shadow:0 0 0 3px rgba(67,139,246,.11); }
.discord-role-search input { width:100%; min-width:0; border:0; outline:0; color:var(--text); background:transparent; }
.discord-role-list { margin-top:13px; display:flex; flex-wrap:wrap; gap:8px; }
.discord-role-item { min-height:34px; max-width:100%; padding:5px 10px; display:inline-flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:999px; color:var(--text-soft); background:#0c121c; transition:border-color .15s ease,background .15s ease,color .15s ease; }
.discord-role-item:hover { color:var(--text); border-color:rgba(118,170,255,.5); }
.discord-role-item:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.discord-role-item.selected { color:var(--text); border-color:rgba(67,139,246,.62); background:rgba(67,139,246,.14); }
.discord-role-dot { width:9px; height:9px; flex:0 0 auto; border-radius:50%; box-shadow:0 0 0 1px rgba(255,255,255,.12); }
.discord-role-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:650; }
.discord-role-check { width:0; overflow:hidden; opacity:0; color:var(--accent); transition:width .15s ease,opacity .15s ease; }
.discord-role-item.selected .discord-role-check { width:14px; opacity:1; }
.discord-role-empty { margin:14px 0 0; color:var(--text-muted); font-size:12px; }
.discord-role-inspector { display:grid; gap:11px; }
.discord-role-inspector h4 { margin:0; font-size:15px; }
.discord-role-inspector > p { margin:0; color:var(--text-muted); font-size:12px; }
.discord-role-inspector-selection { min-height:48px; display:flex; flex-wrap:wrap; align-content:flex-start; gap:7px; }
.discord-role-selected-pill { min-height:28px; padding:3px 9px; display:inline-flex; align-items:center; gap:7px; border:1px solid var(--border); border-radius:999px; color:var(--text-soft); background:#0c121c; font-size:11px; font-weight:650; }
.discord-role-inspector-result { padding:11px; border:1px solid var(--border-soft); border-radius:8px; color:var(--text-muted); background:rgba(116,137,168,.06); line-height:1.5; }
.discord-role-inspector-result.selected { color:#b7c9e3; border-color:rgba(88,101,242,.3); background:rgba(88,101,242,.08); }
.discord-policy-toggle { display:flex; align-items:center; gap:9px; font-size:12px; font-weight:650; }
.discord-policy-toggle input { width:16px; height:16px; accent-color:var(--accent); }
.discord-policy-form { display:grid; grid-template-columns:minmax(0,1fr) 82px 96px; gap:8px; padding-top:11px; border-top:1px solid var(--border-soft); }
.discord-policy-form .discord-policy-parameters,.discord-policy-form button { grid-column:1/-1; }
.discord-policy-parameters { resize:vertical; font-family:var(--font-mono,monospace); font-size:11px; }
.discord-policy-rules { display:grid; gap:7px; padding-top:11px; border-top:1px solid var(--border-soft); }
.discord-policy-rule { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 9px; border:1px solid var(--border-soft); border-radius:8px; background:#0c121c; }
.discord-policy-rule > div { min-width:0; display:grid; gap:2px; }
.discord-policy-rule strong,.discord-policy-rule span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.discord-policy-rule strong { font-size:11px; }
.discord-policy-rule span { color:var(--text-muted); font-size:10px; }
.profile-discord-card { display:grid; gap:14px; overflow:hidden; }
.profile-discord-head > div:first-child { display:grid; gap:3px; }
.profile-discord-head h3 { margin:0; }
.profile-discord-controls { min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.discord-player-target-select { width:min(240px,42vw); min-height:34px; padding:5px 30px 5px 9px; font-size:12px; }
.discord-link-copy { margin:0; max-width:680px; color:var(--text-soft); font-size:13px; line-height:1.6; }
.discord-connect-button { width:max-content; text-decoration:none; }
.discord-link-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.discord-link-meta > div { padding:9px 10px; display:grid; gap:3px; border:1px solid var(--border-soft); border-radius:8px; background:var(--surface-raised); }
.discord-link-meta span { color:var(--text-muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
.discord-link-meta strong { overflow:hidden; text-overflow:ellipsis; font-size:12px; }
.discord-link-notice { margin:0; padding:10px 11px; border:1px solid var(--border-soft); border-radius:8px; color:var(--text-soft); font-size:12px; }
.discord-link-notice.warning { color:var(--warning); border-color:rgba(244,184,96,.3); background:rgba(244,184,96,.07); }
.discord-link-notice.danger { color:#ff9b9b; border-color:rgba(244,99,99,.3); background:rgba(244,99,99,.07); }
.discord-link-block { display:grid; gap:8px; }
.discord-link-block > strong { font-size:12px; }
.discord-link-pills { display:flex; flex-wrap:wrap; gap:7px; }
.discord-entitlement-pill { padding:5px 9px; border:1px solid rgba(67,139,246,.35); border-radius:999px; color:#c8dafa; background:rgba(67,139,246,.1); font:600 11px var(--font-mono,monospace); }
.discord-link-actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:2px; }

.garage-entitlement-notice { min-height:48px; padding:11px 14px; display:flex; align-items:center; gap:12px; border:1px solid var(--border-soft); border-radius:9px; color:var(--text-soft); background:var(--surface-raised); font-size:12px; }
.garage-entitlement-notice.ready { color:#9fe3c1; border-color:rgba(42,188,131,.3); background:rgba(42,188,131,.07); }
.garage-entitlement-notice.warning { color:var(--warning); border-color:rgba(244,184,96,.3); background:rgba(244,184,96,.07); }
.garage-entitlement-notice .small-button { margin-left:auto; flex:0 0 auto; }
.garage-benefit-sources { margin-top:-7px; padding:0 3px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--text-muted); font-size:11px; }
.garage-benefit-sources strong { margin-right:4px; color:var(--text-soft); }
.garage-benefit-sources span:nth-of-type(2n) { padding:3px 7px; border:1px solid var(--border-soft); border-radius:999px; color:#bed1ef; background:rgba(67,139,246,.08); }
.garage-benefit-page { display:grid; gap:18px; min-width:0; }
.garage-benefit-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.garage-benefit-metric { min-height:94px; padding:16px; display:flex; align-items:center; gap:13px; border:1px solid var(--border); border-radius:11px; background:linear-gradient(145deg,var(--surface-raised),rgba(18,27,42,.82)); }
.garage-benefit-metric > i { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border:1px solid rgba(67,139,246,.3); border-radius:8px; color:#8bb8ff; background:rgba(67,139,246,.1); }
.garage-benefit-metric div { min-width:0; display:grid; gap:5px; }
.garage-benefit-metric span { overflow:hidden; color:var(--text-muted); font-size:10px; font-weight:750; letter-spacing:.08em; text-overflow:ellipsis; white-space:nowrap; }
.garage-benefit-metric strong { overflow:hidden; color:var(--text); font-size:19px; text-overflow:ellipsis; white-space:nowrap; }
.garage-benefit-metrics.is-stale { opacity:.78; }
.garage-benefit-panel { min-width:0; overflow:hidden; padding:0; }
.garage-benefit-head { margin:0; padding:18px 20px; }
.garage-benefit-head > div { min-width:0; }
.garage-benefit-head h3 { margin:4px 0; }
.garage-benefit-head p { margin:0; color:var(--text-muted); font-size:12px; }
.garage-benefit-catalog-status { margin:0 16px 14px; padding:9px 11px; border:1px solid var(--border-soft); border-radius:8px; color:var(--text-muted); background:rgba(116,137,168,.05); font-size:11px; }
.garage-benefit-catalog-status.ready { color:#9fe3c1; border-color:rgba(42,188,131,.25); }
.garage-benefit-catalog-status.warning { color:var(--warning); border-color:rgba(244,184,96,.28); }
.garage-benefit-form { min-width:0; border-top:1px solid var(--border-soft); }
.garage-benefit-toolbar { padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--border-soft); }
.garage-benefit-search { width:min(360px,52vw); display:flex; align-items:center; gap:9px; }
.garage-benefit-search .control-input { width:100%; }
.garage-benefit-search i { color:var(--text-muted); }
.garage-benefit-toggle { margin:0; flex:0 0 auto; }
.garage-benefit-table-wrap { max-width:100%; overflow:auto; }
.garage-benefit-table { width:100%; min-width:720px; border-collapse:collapse; }
.garage-benefit-table th { padding:10px 15px; color:var(--text-muted); background:rgba(9,14,23,.52); font-size:10px; font-weight:750; letter-spacing:.08em; text-align:left; text-transform:uppercase; }
.garage-benefit-table td { padding:11px 15px; border-top:1px solid var(--border-soft); vertical-align:middle; }
.garage-benefit-role { display:flex; align-items:center; gap:9px; min-width:210px; }
.garage-benefit-role strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.garage-benefit-number { width:128px; min-width:100px; }
.garage-benefit-result { color:var(--text-muted); font-size:11px; white-space:nowrap; }
.garage-benefit-footer { position:sticky; bottom:0; z-index:2; min-height:62px; padding:11px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid var(--border); background:rgba(12,18,28,.96); backdrop-filter:blur(12px); }
.garage-benefit-footer > span { color:var(--text-muted); font:600 11px var(--font-mono,monospace); }
.garage-benefit-actions { display:flex; justify-content:flex-end; gap:9px; }

.content { width:100%; max-width:1900px; margin:0 auto; padding:31px 32px 58px; }
.content > * { min-width:0; }
.view-heading,.section-heading { margin:0 0 22px; display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.view-heading h2,.section-heading h2 { margin:0; font-size:25px; font-weight:690; letter-spacing:-.03em; }
.view-heading p,.section-heading p { margin:6px 0 0; color:#91a1b8; font-size:13px; }
.eyebrow { color:#76aaff; font-size:10px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }

.panel,.control-card,.metric-card,.server-card,.overview-card,.player-center-section,.garage-summary-item,.card,.ticket-card,.ticket-filters {
  border:1px solid #2a374b; border-radius:13px; background:#151c27; box-shadow:none;
}
.panel { padding:23px; }
.panel + .panel { margin-top:18px; }
.panel-head { min-height:34px; margin:0 0 18px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.panel-head h2,.panel-head h3 { margin:0; font-size:14px; font-weight:680; }
.panel-head > span { color:var(--text-muted); font-size:11px; }
.metric-grid,.control-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.metric-card { min-height:126px; padding:19px 21px; display:flex; flex-direction:column; justify-content:space-between; }
.metric-card span { color:var(--text-muted); font-size:11px; font-weight:700; text-transform:none; letter-spacing:.01em; }
.metric-card strong { margin-top:10px; color:#f7f9fc; font-size:31px; font-weight:700; letter-spacing:-.035em; }
.metric-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.metric-card-head small { color:#93a4ba; font-size:11px; }
.metric-card-head i { width:34px; height:34px; display:grid; place-items:center; border:1px solid rgba(77,141,255,.24); border-radius:9px; color:#72a6ff; background:rgba(77,141,255,.09); font-size:15px; }
.metric-card.warn .metric-card-head i { color:var(--warning); border-color:rgba(244,184,96,.25); background:rgba(244,184,96,.08); }
.overview-heading { margin-bottom:20px; display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.overview-hero-copy h2 { margin:0; font-size:25px; letter-spacing:-.03em; }
.overview-hero-copy p { margin:6px 0 0; color:#91a1b8; font-size:13px; }
.quick-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.overview-pair-selector { min-width:220px; display:grid; gap:5px; color:var(--text-muted); font-size:10px; font-weight:750; }
.overview-pair-selector .control-input { min-height:34px; padding:0 32px 0 10px; }
.quick-action { min-height:34px; padding:0 12px; border:1px solid #33415a; border-radius:7px; color:#d7deea; background:#182131; font-size:11px; font-weight:700; }
.quick-action:hover { border-color:var(--accent); background:#1c2d4a; }
.overview-grid,.server-grid,.garage-admin-dino-grid,.player-profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.overview-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,.7fr); gap:18px; }
.overview-truth-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); }
.overview-truth-details[data-status="fresh"] { border-color:rgba(53,197,139,.28); }
.overview-truth-details[data-status="stale"] { border-color:rgba(244,184,96,.3); }
.overview-truth-details[data-status="offline"] { border-color:rgba(239,103,103,.28); }
.overview-truth-list { margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid var(--border-soft); border-radius:10px; background:var(--border-soft); }
.overview-truth-list > div { min-width:0; padding:13px 14px; background:var(--surface); }
.overview-truth-list dt { color:var(--text-muted); font-size:10px; }
.overview-truth-list dd { margin:5px 0 0; overflow:hidden; color:var(--text); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.overview-truth-note { margin:14px 0 0; color:var(--text-muted); font-size:11px; line-height:1.6; }
.server-workspace { display:grid; gap:18px; }
.server-workspace-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr); gap:18px; align-items:start; }
.server-workspace-truth-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
.server-workspace-operations { display:grid; gap:14px; }
.capability-list { display:flex; flex-wrap:wrap; gap:7px; }
.capability-chip { max-width:100%; padding:6px 9px; overflow:hidden; border:1px solid rgba(88,166,255,.22); border-radius:999px; color:#b9d8ff; background:rgba(88,166,255,.08); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.server-workspace-actions { display:grid; gap:8px; }
.server-workspace-actions .small-button { width:100%; justify-content:flex-start; }
.module-panel { padding-bottom:8px; }
.module-list { display:grid; padding:6px 10px; }
.module-link { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px 8px; border:0; border-bottom:1px solid var(--border-soft); color:var(--text); background:transparent; text-align:left; }
.module-link:last-child { border-bottom:0; }
.module-link:hover { background:var(--surface-2); }
.module-link-icon { width:30px; height:30px; display:grid; place-items:center; border-radius:8px; color:#72a6ff; background:#192947; font-size:11px; font-weight:800; }
.module-link-copy { min-width:0; }
.module-link-copy strong,.module-link-copy small { display:block; }
.module-link-copy strong { font-size:12px; }
.module-link-copy small { margin-top:2px; overflow:hidden; color:var(--text-muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.module-link-arrow { color:var(--text-muted); }
.overview-card,.server-card,.control-card { padding:21px; }

.table-wrap { width:100%; overflow:auto; border:1px solid #2a374b; border-radius:12px; background:#151c27; }
table { width:100%; margin:0; border-collapse:separate; border-spacing:0; color:var(--text); }
th { position:sticky; top:0; z-index:1; padding:12px 14px; color:#8191a7; background:#121923; border-bottom:1px solid #2a374b; font-size:10px; font-weight:800; letter-spacing:.08em; text-align:left; text-transform:uppercase; white-space:nowrap; }
td { padding:13px 14px; border-bottom:1px solid #202b3c; color:#cad3df; vertical-align:middle; }
tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:#1a2331; }
.mono { font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:.92em; }
.muted { color:var(--text-muted) !important; }
.warning { color:var(--warning) !important; }
.danger { color:var(--danger) !important; }
.status,.badge { display:inline-flex; align-items:center; min-height:22px; padding:2px 8px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); color:var(--text-soft); font-size:10px; font-weight:750; }
.status.online,.badge.success { color:var(--success); border-color:rgba(53,197,139,.25); background:rgba(53,197,139,.08); }

.toolbar { margin-bottom:18px; display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.control-input,.filter-select,.automation-textarea,input,select,textarea { color:var(--text); border:1px solid #2b394e; border-radius:7px; background:#101823; outline:none; }
.control-input,.filter-select,input,select { min-height:36px; padding:7px 10px; }
textarea,.automation-textarea { padding:10px 12px; resize:vertical; }
.control-input:focus,.filter-select:focus,input:focus,select:focus,textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.field-label { display:flex; flex-direction:column; gap:7px; color:var(--text-soft); font-size:11px; font-weight:650; }
.small-button,.player-center-action,.garage-primary-action,.garage-compensate-button { min-height:34px; padding:7px 11px; display:inline-flex; align-items:center; justify-content:center; gap:7px; color:white; border:1px solid transparent; border-radius:7px; background:#3d83f6; font-size:12px; font-weight:680; }
.small-button:hover,.player-center-action:hover { filter:brightness(1.08); }
.small-button.secondary,.secondary { color:var(--text-soft); border-color:#334258; background:#1b2534; }
.small-button.danger,.danger.small-button { color:#ffd9df; border-color:rgba(243,108,125,.3); background:rgba(243,108,125,.11); }
button:disabled { opacity:.45; cursor:not-allowed; }

.automation-form-grid,.garage-field-grid-3,.configuration-form,.player-center-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.nav-icon { width:18px; height:18px; flex:0 0 18px; }
.garage-range-controls { display:grid; grid-template-columns:minmax(100px,1fr) 92px; gap:10px; align-items:center; }
.player-center-two-column,.garage-compensation-layout,.player-dinosaur-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.timeline { display:flex; flex-direction:column; gap:10px; }
.timeline-item,.player-center-record,.moderation-registry-row { padding:14px; border:1px solid var(--border-soft); border-radius:10px; background:var(--surface-2); }
.empty-state,.error-state,.skeleton { min-height:180px; padding:30px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px dashed #304057; border-radius:var(--radius); color:var(--text-muted); background:#121a25; }

.player-center-dialog,.result-dialog,.garage-compensation-dialog,.garage-editor-dialog { width:min(1120px,calc(100vw - 32px)); max-height:calc(100vh - 32px); padding:0; overflow:hidden; color:var(--text); border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg-elevated); box-shadow:var(--shadow); }
.player-center-dialog::backdrop,.result-dialog::backdrop,.garage-compensation-dialog::backdrop,.garage-editor-dialog::backdrop { background:rgba(2,5,10,.78); backdrop-filter:blur(4px); }
.player-center-dialog-head,.result-dialog-head { min-height:62px; padding:0 20px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border-soft); }
.player-center-body,.garage-compensation-form,.garage-editor-form { max-height:calc(100vh - 96px); overflow:auto; padding:20px; }
.player-profile-tabs { display:flex; gap:4px; padding:4px; overflow:auto; border:1px solid var(--border-soft); border-radius:10px; background:#0c121c; }
.player-profile-tabs button { min-height:34px; padding:0 11px; color:var(--text-soft); border:0; border-radius:7px; background:transparent; white-space:nowrap; }
.player-profile-tabs button.active { color:white; background:var(--surface-3); }
.player-profile-page { display:grid; gap:16px; font-size: 15px; }

.economy-page { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(460px,1.28fr); gap:16px; align-items:start; }
.economy-policy-card,.economy-wallet-card { display:grid; gap:18px; }
.economy-policy-form { display:grid; gap:14px; }
.economy-toggle { min-height:46px; padding:0 13px; display:flex; align-items:center; gap:10px; border:1px solid var(--border-soft); border-radius:9px; background:var(--surface-2); color:var(--text-soft); }
.economy-toggle input { width:17px; height:17px; accent-color:var(--accent); }
.status-chip { display:inline-flex; align-items:center; min-height:25px; padding:0 9px; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); background:var(--surface-2); font-size:10px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.status-chip.online { color:var(--success); border-color:rgba(53,197,139,.28); background:rgba(53,197,139,.08); }
.economy-wallet-lookup { display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:10px; }
.economy-balance-summary,.profile-wallet-balance { padding:20px; display:flex; flex-direction:column; gap:5px; border:1px solid rgba(79,140,255,.28); border-radius:12px; background:linear-gradient(135deg,var(--accent-soft),var(--surface-2)); }
.economy-balance-summary strong,.profile-wallet-balance strong { font-size:clamp(24px,3vw,36px); letter-spacing:-.035em; }
.economy-balance-summary small,.profile-wallet-balance small { color:var(--text-muted); }
.economy-adjust-form { display:grid; grid-template-columns:140px minmax(180px,1fr) auto; gap:10px; }
.economy-transactions { display:grid; gap:8px; }
.economy-pending { padding:13px 14px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 14px; align-items:center; border:1px solid rgba(244,181,64,.38); border-radius:9px; background:rgba(244,181,64,.08); }
.economy-pending > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-muted); }
.economy-pending > button { grid-column:2; grid-row:1 / span 2; }
.economy-transaction { padding:12px 14px; display:grid; grid-template-columns:72px minmax(0,1fr) auto; gap:13px; align-items:center; border:1px solid var(--border-soft); border-radius:9px; background:var(--surface-2); }
.economy-transaction > strong { font-variant-numeric:tabular-nums; }
.economy-transaction > div { min-width:0; display:flex; flex-direction:column; }
.economy-transaction > div span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.economy-transaction small { color:var(--text-muted); }
.positive { color:var(--success)!important; }
.negative { color:var(--danger)!important; }
.profile-wallet-card { display:grid; gap:14px; }
.profile-wallet-history { display:grid; gap:7px; }
.profile-wallet-history > div { padding:9px 2px; display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border-soft); }

.result-dialog.automation-editor-dialog {
  box-sizing:border-box;
  width:min(980px,calc(100vw - 32px));
  height:min(900px,calc(100vh - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height:calc(100dvh - 32px);
  overflow:hidden;
}
.automation-editor-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.automation-editor-body {
  display:grid; align-content:start; gap:16px; min-height:0; padding:20px;
  overflow-y: auto; overscroll-behavior:contain; scrollbar-gutter:stable;
}
.automation-editor-footer {
  min-height:68px; padding:12px 20px; display:flex; align-items:center;
  justify-content:flex-end; gap:10px; border-top:1px solid var(--border-soft);
  background:var(--surface);
}

.status-banner { position:fixed; z-index:1000; left:50%; top:18px; transform:translateX(-50%); max-width:min(680px,calc(100vw - 32px)); padding:11px 16px; border:1px solid var(--border); border-radius:10px; background:#182234; color:var(--text); box-shadow:var(--shadow); }
.sidebar-scrim { display:none; }

@media (max-width: 1180px) {
  :root { --sidebar-width:238px; }
  .topbar { padding-inline:20px; gap:12px; }
  .content { padding:26px 22px 48px; }
  .metric-grid,.control-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .theme-control { display:none; }
  .account-copy { display:none; }
}
@media (max-width: 900px) {
  .login-layout { grid-template-columns:1fr; }
  .login-panel { min-height:100vh; padding:42px 28px; }
  .login-aside { display:none; }
  .sidebar { transform:translateX(-100%); transition:transform .2s ease; box-shadow:var(--shadow); }
  .workspace { margin-left:0; }
  body.menu-open .sidebar { transform:translateX(0); }
  #menu-button { display:inline-flex; }
  .sidebar-scrim { position:fixed; z-index:45; inset:0; width:100%; border:0; background:rgba(2,5,10,.64); }
  body.menu-open .sidebar-scrim { display:block; }
  .topbar-title { min-width:0; }
  .topbar-title .eyebrow { display:none; }
  .server-switcher span,.server-switcher > i,.discord-auth-button span,.ghost-button span { display:none; }
  .server-switcher select { max-width:130px; }
  .overview-grid,.server-grid,.garage-admin-dino-grid,.player-profile-grid,.player-center-two-column,.garage-compensation-layout,.player-dinosaur-layout,.economy-page { grid-template-columns:1fr; }
  .discord-role-workspace { grid-template-columns:1fr; }
  .garage-benefit-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .automation-form-grid,.garage-field-grid-3,.configuration-form,.player-center-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .discord-bot-form { grid-template-columns:1fr; }
  .discord-role-header,.discord-role-meta { align-items:flex-start; flex-direction:column; }
  .discord-role-header-actions { width:100%; justify-content:flex-start; }
  .discord-role-item { width:100%; border-radius:8px; }
  .discord-role-check { margin-left:auto; }
  .discord-policy-form,.discord-link-meta { grid-template-columns:1fr; }
  .discord-policy-form .discord-policy-parameters,.discord-policy-form button { grid-column:1; }
  .topbar { min-height:62px; padding:8px 12px; gap:8px; }
  .topbar-title { display:none; }
  .topbar-spacer { flex:1; }
  .account-cluster { padding-left:8px; }
  .server-switcher { max-width:132px; }
  .content { padding:19px 13px 35px; }
  .discord-gate { margin:12px 13px 0; align-items:flex-start; }
  .discord-gate > div { grid-template-columns:auto 1fr; }
  .discord-gate span { grid-column:1 / -1; }
  .metric-grid,.control-grid,.automation-form-grid,.garage-field-grid-3,.configuration-form,.player-center-stat-grid { grid-template-columns:1fr; }
  .garage-benefit-metrics { grid-template-columns:1fr; }
  .garage-benefit-toolbar,.garage-benefit-footer { align-items:stretch; flex-direction:column; }
  .garage-benefit-search { width:100%; }
  .garage-benefit-actions { display:grid; grid-template-columns:1fr; }
  .garage-benefit-actions .small-button { width:100%; }
  .economy-wallet-lookup,.economy-adjust-form,.economy-pending { grid-template-columns:1fr; }
  .economy-pending > button { grid-column:auto; grid-row:auto; }
  .panel { padding:17px; }
  .overview-hero { padding:20px; }
  .login-copy { margin:70px 0 36px; }
  .login-copy h1 { font-size:42px; }
  .view-heading,.section-heading { align-items:flex-start; flex-direction:column; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }

/* Server-scoped shell and shared operational context. */
.server-navigation { margin-top:10px; padding-top:1px; border-top:1px solid var(--border-soft); }
.server-navigation-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.nav-count { min-width:21px; height:19px; margin:16px 8px 5px 0; display:grid; place-items:center; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); background:var(--surface); font-size:9px; font-weight:800; }
.server-roster { display:grid; gap:2px; max-height:154px; overflow:auto; padding:0 2px 3px; scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.server-roster-item { position:relative; width:100%; min-height:42px; padding:5px 8px; display:grid; grid-template-columns:18px minmax(0,1fr) auto 7px; align-items:center; gap:8px; border:1px solid transparent; border-radius:8px; color:var(--text-soft); background:transparent; text-align:left; }
.server-roster-item:hover { border-color:var(--border-soft); background:#131c29; }
.server-roster-item.active { border-color:rgba(77,141,255,.24); background:#192438; }
.server-roster-item > i { color:#7e8ca1; }
.server-roster-copy { min-width:0; display:grid; line-height:1.2; }
.server-roster-copy strong,.server-roster-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.server-roster-copy strong { color:var(--text); font-size:11px; }
.server-roster-copy small { margin-top:3px; color:var(--text-muted); font-size:9px; }
.server-roster-players { color:var(--text-soft); font-size:10px; font-variant-numeric:tabular-nums; }
.server-roster-status,.server-status-dot { width:7px; height:7px; border-radius:50%; background:var(--danger); }
.server-roster-status.ok,.server-status-dot.ok { background:var(--success); box-shadow:0 0 8px rgba(53,197,139,.38); }
.server-roster-status.stale,.server-status-dot.stale { background:var(--warning); }
.active-server-navigation { margin:8px 2px 0; padding-top:9px; border-top:1px solid var(--border-soft); }
.active-server-summary { min-height:38px; margin:0 5px 5px; padding:7px 8px; display:grid; grid-template-columns:8px minmax(0,1fr); gap:2px 8px; align-items:center; border-radius:8px; background:#101722; }
.active-server-summary > span:not(.server-status-dot),.active-server-summary small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.active-server-summary > span:not(.server-status-dot) { color:var(--text); font-size:11px; font-weight:700; }
.active-server-summary small { grid-column:2; color:var(--text-muted); font-size:9px; }
.server-group-toggle { width:100%; min-height:28px; padding:0 8px; display:flex; align-items:center; justify-content:space-between; border:0; color:#66768d; background:transparent; font-size:9px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.server-group-toggle i { transition:transform .16s ease; }
.server-group-toggle[aria-expanded="false"] i { transform:rotate(-90deg); }
.server-group-items { padding-left:8px; border-left:1px solid var(--border-soft); }
.server-group-items .nav-item::before { left:-11px; }

.system-health { min-height:28px; padding:0 10px; display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); background:#101722; font-size:10px; font-weight:650; white-space:nowrap; }
.system-health.online { color:var(--success); border-color:rgba(53,197,139,.26); background:rgba(53,197,139,.07); }
.system-health .system-dot { width:6px; height:6px; flex-basis:6px; box-shadow:none; }

.server-context-header { margin-bottom:18px; }
.server-breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--text-muted); font-size:11px; }
.server-breadcrumb i { font-size:9px; }
.server-breadcrumb-link { padding:0; border:0; color:#8e9db2; background:transparent; }
.server-breadcrumb-link:hover { color:var(--accent); }
.server-context-title { margin-top:13px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.server-context-title h2 { margin:0; color:var(--text); font-size:25px; letter-spacing:-.025em; }
.server-context-header > p { margin:5px 0 0; color:var(--text-soft); font-size:12px; }
.server-metric-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.server-metric-strip .metric-card { min-height:112px; }

.players-panel { padding:0; overflow:hidden; }
.players-panel-head { min-height:57px; margin:0; padding:0 18px; border-bottom:1px solid var(--border-soft); }
.players-toolbar { padding:12px 18px; display:flex; align-items:center; flex-wrap:wrap; gap:9px; border-bottom:1px solid var(--border-soft); background:#121923; }
.player-search-field { position:relative; flex:1 1 260px; min-width:200px; }
.player-search-field .player-search-input { width:100%; padding-left:34px; }
.player-search-icon { position:absolute; z-index:1; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); pointer-events:none; }
.player-filter-group { padding:3px; display:flex; align-items:center; gap:2px; border:1px solid var(--border); border-radius:9px; background:#0d141f; }
.player-filter-group button { min-height:28px; padding:0 10px; border:0; border-radius:6px; color:var(--text-muted); background:transparent; font-size:11px; font-weight:650; }
.player-filter-group button.active { color:#fff; background:#24324a; box-shadow:inset 0 0 0 1px rgba(77,141,255,.2); }
.players-toolbar .filter-select { width:auto; max-width:185px; }

button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

@media (max-width:1180px) {
  .system-health { display:none; }
  .overview-truth-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .server-metric-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:1100px) {
  .overview-layout { grid-template-columns:1fr; }
  .module-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
}
@media (max-width:900px) {
  .server-workspace-layout { grid-template-columns:1fr; }
}
@media (max-width:900px) {
  .server-switcher:not([hidden]) { display:flex; }
  .server-roster { max-height:none; }
}
@media (max-width:600px) {
  .overview-heading { align-items:stretch; flex-direction:column; }
  .quick-actions { justify-content:flex-start; }
  .overview-pair-selector { width:100%; }
  .overview-truth-metrics,.overview-truth-list { grid-template-columns:1fr; }
  .server-workspace-truth-list { grid-template-columns:1fr; }
  .module-list { grid-template-columns:1fr; }
  .server-context-title h2 { font-size:20px; }
  .server-metric-strip { grid-template-columns:1fr 1fr; gap:9px; }
  .server-metric-strip .metric-card { min-height:100px; padding:14px; }
  .server-metric-strip .metric-card strong { font-size:22px; }
  .players-toolbar { align-items:stretch; }
  .player-search-field { flex-basis:100%; }
  .player-filter-group { flex:1 1 auto; }
  .player-filter-group button { flex:1; }
  .players-toolbar .filter-select { flex:1 1 145px; max-width:none; }
}
/* Ticket workspace */
.ticket-workspace { display:grid; grid-template-columns:minmax(300px, .95fr) minmax(360px, 1.35fr); gap:1.25rem; align-items:start; }
.ticket-column { display:grid; gap:1.25rem; min-width:0; }
.ticket-card, .ticket-filters { border-color:var(--bs-border-color); box-shadow:0 8px 30px rgb(0 0 0 / .08); }
.ticket-card .card-body, .ticket-filters .card-body { padding:1.25rem; }
.ticket-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; align-items:center; }
.ticket-server-picker { width:auto; min-width:220px; max-width:100%; }
.ticket-list { display:grid; gap:.5rem; max-height:min(56rem,70vh); overflow:auto; }
.ticket-list-item { display:grid; gap:.3rem; width:100%; border:1px solid var(--bs-border-color); border-radius:.8rem; background:var(--bs-tertiary-bg); color:var(--bs-body-color); text-align:left; padding:.9rem 1rem; transition:border-color .15s,background .15s; }
.ticket-list-item:hover,.ticket-list-item.active { border-color:var(--bs-primary); background:var(--bs-secondary-bg); }
.ticket-list-heading { display:flex; justify-content:space-between; gap:.5rem; align-items:start; }
.ticket-list-heading strong { overflow-wrap:anywhere; }
.ticket-list-meta,.ticket-eyebrow { color:var(--bs-secondary-color); font-size:.8rem; letter-spacing:.035em; }
.ticket-thread { display:grid; gap:.8rem; max-height:52vh; overflow:auto; padding:.25rem 0 1rem; margin-bottom:1rem; border-bottom:1px solid var(--bs-border-color); }
.ticket-message { padding:.9rem 1rem; border:1px solid var(--bs-border-color); border-radius:.8rem; background:var(--bs-tertiary-bg); }
.ticket-message p { white-space:pre-wrap; overflow-wrap:anywhere; }
.ticket-message-head { color:var(--bs-secondary-color); font-size:.77rem; margin-bottom:.45rem; }
.ticket-message.ticket-internal { border-left:3px solid var(--bs-warning); background:color-mix(in srgb,var(--bs-warning) 8%,var(--bs-tertiary-bg)); }
.ticket-admin-controls { display:grid; grid-template-columns:1fr 1fr auto; gap:.6rem; align-items:center; margin:1rem 0; }
.ticket-assign-form,.ticket-reply-form { margin-top:1.25rem; }
.ticket-owner-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; margin-top:1.25rem; }
.ticket-category-row { display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center; padding:.7rem 0; border-bottom:1px solid var(--bs-border-color); }
.ticket-category-row small { flex:1; }
.ticket-audit { margin-top:1rem; border-top:1px solid var(--bs-border-color); padding-top:.8rem; }
.ticket-audit summary { cursor:pointer; margin-bottom:.5rem; }
@media (max-width:1100px) { .ticket-workspace { grid-template-columns:minmax(0,1fr); } .ticket-owner-grid { grid-template-columns:minmax(0,1fr); } .ticket-list { max-height:30rem; } }
@media (max-width:600px) { .ticket-filter-grid,.ticket-admin-controls { grid-template-columns:minmax(0,1fr); } .ticket-card .card-body,.ticket-filters .card-body { padding:1rem; } .ticket-list { max-height:24rem; } }

/* Final ticket tokens: this comes after the legacy component block so Bootstrap
   cannot reintroduce a different surface or spacing rhythm. */
.ticket-workspace { grid-template-columns:minmax(330px,.9fr) minmax(440px,1.35fr); gap:18px; }
.ticket-column { gap:18px; }
.ticket-card,.ticket-filters { border-color:#2a374b; border-radius:13px; background:#151c27; box-shadow:none; }
.ticket-card .card-body,.ticket-filters .card-body { padding:21px; }
.ticket-filter-grid { gap:9px; }
.ticket-filter-grid select,.ticket-filter-grid input,.ticket-server-picker { min-width:0; width:100%; }
.ticket-list { gap:7px; max-height:min(58rem,72vh); }
.ticket-list-item { border-color:#2a374b; border-radius:9px; background:#111923; color:var(--text); padding:12px 13px; }
.ticket-list-item:hover,.ticket-list-item.active { border-color:#4d8dff; background:#1a2638; }
.ticket-list-meta,.ticket-eyebrow { color:var(--text-muted); }
.ticket-thread { max-height:56vh; }
.ticket-message { border-color:#2b394d; border-radius:9px; background:#111923; }
.ticket-message.ticket-internal { background:rgba(244,184,96,.08); }
.ticket-owner-grid { gap:18px; }
@media (max-width:960px) {
  .ticket-workspace { grid-template-columns:minmax(0,1fr); }
  .ticket-list { max-height:31rem; }
}

/* Revisioned Game.ini editor v2 */
.configuration-status-grid { margin-bottom:16px; }
.configuration-default-notice {
  display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; padding:15px 17px;
  border:1px solid rgba(77,141,255,.25); border-radius:12px;
  background:linear-gradient(115deg,rgba(77,141,255,.10),rgba(21,28,39,.92));
}
.configuration-default-notice > div { display:grid; gap:4px; }
.configuration-default-notice strong { color:var(--text); font-size:13px; }
.configuration-default-notice p { margin:0; color:var(--text-soft); font-size:12px; line-height:1.55; }
.configuration-pending-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; padding:15px 17px; border:1px solid rgba(244,184,96,.3); border-radius:12px; background:rgba(244,184,96,.08); }
.configuration-pending-notice > div { display:grid; gap:4px; }
.configuration-pending-notice strong { font-size:13px; }
.configuration-pending-notice p { margin:0; color:var(--text-soft); font-size:11px; }
.configuration-materialize-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:10px; }
.configuration-materialize-row { display:flex; align-items:center; gap:9px; padding:8px 10px; border:1px solid var(--border-soft); border-radius:8px; background:rgba(13,20,31,.65); cursor:pointer; }
.configuration-materialize-row > span { display:grid; gap:2px; }
.configuration-materialize-row strong { font-size:11px; }
.configuration-materialize-row small { color:var(--text-muted); font-size:9px; }
.configuration-materialize-row input { min-height:0; accent-color:var(--accent); }
.configuration-experimental { opacity:.66; cursor:not-allowed; }
.configuration-experimental-label { color:var(--warning)!important; }
.configuration-panel { padding:0; overflow:hidden; }
.configuration-panel-head { min-height:72px; margin:0; padding:16px 20px; border-bottom:1px solid var(--border-soft); }
.configuration-panel-head > div { display:grid; gap:4px; }
.configuration-panel-head h3,.configuration-panel-head p { margin:0; }
.configuration-panel-head p { color:var(--text-muted); font-size:11px; }
.configuration-revision { padding:6px 9px; border:1px solid var(--border-soft); border-radius:7px; color:var(--text-soft); background:#0d141f; }
.configuration-form-v2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; }
.configuration-setting-group { min-width:0; padding:20px; border-bottom:1px solid var(--border-soft); }
.configuration-setting-group:nth-child(odd) { border-right:1px solid var(--border-soft); }
.configuration-setting-head { display:grid; gap:4px; margin-bottom:15px; }
.configuration-setting-head h4,.configuration-setting-head p { margin:0; }
.configuration-setting-head h4 { font-size:13px; letter-spacing:.01em; }
.configuration-setting-head p { color:var(--text-muted); font-size:11px; line-height:1.5; }
.configuration-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.configuration-field { display:flex; min-width:0; flex-direction:column; gap:7px; color:var(--text-soft); font-size:11px; font-weight:650; }
.configuration-field-title { display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--text-soft); }
.configuration-default-chip { padding:2px 6px; border:1px solid rgba(77,141,255,.25); border-radius:999px; color:#8fb8ff; background:rgba(77,141,255,.08); font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.configuration-toggle-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.configuration-toggle-card { min-height:70px; padding:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--border-soft); border-radius:10px; background:var(--surface-2); cursor:pointer; }
.configuration-toggle-card:hover { border-color:var(--border); background:var(--surface-3); }
.configuration-toggle-copy { min-width:0; display:grid; gap:5px; }
.configuration-toggle-copy > small { color:var(--text-muted); font-size:10px; line-height:1.35; }
.configuration-switch { width:34px; height:18px; flex:0 0 auto; accent-color:var(--accent); }
.configuration-number-wrap { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:#0d141f; }
.configuration-number-wrap:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.configuration-number-wrap input { border:0; box-shadow:none!important; background:transparent; }
.configuration-number-wrap > span { padding:0 11px; color:var(--text-muted); font-size:10px; }
.configuration-classes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:310px; overflow:auto; padding:2px; border:0; }
.configuration-class { min-height:38px; padding:8px 10px; display:flex; align-items:center; gap:9px; border:1px solid var(--border-soft); border-radius:8px; background:var(--surface-2); color:var(--text-soft); cursor:pointer; }
.configuration-class:hover { border-color:var(--border); background:var(--surface-3); }
.configuration-class input { min-height:0; accent-color:var(--accent); }
.configuration-save-bar { grid-column:1/-1; padding:17px 20px; display:grid; grid-template-columns:minmax(220px,.72fr) minmax(360px,1.28fr); gap:20px; align-items:end; background:#101722; }
.configuration-diff-summary { min-height:47px; display:flex; flex-direction:column; justify-content:center; gap:4px; color:var(--text-muted); }
.configuration-diff-summary strong { color:var(--text-soft); font-size:12px; }
.configuration-diff-summary span { font-size:10px; line-height:1.45; }
.configuration-diff-summary.has-changes strong { color:#8fb8ff; }
.configuration-save-actions { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:10px; align-items:end; }
.configuration-save-actions .small-button { min-height:38px; }
.configuration-history { margin-top:16px; }
.configuration-history-list { display:grid; gap:8px; }
.configuration-history-row { padding:13px 14px; display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid var(--border-soft); border-radius:9px; background:var(--surface-2); }
.configuration-history-row > div { min-width:0; display:grid; gap:4px; }
.configuration-history-row span,.configuration-history-row code { overflow:hidden; color:var(--text-muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }

@media (max-width:1100px) {
  .configuration-form-v2 { grid-template-columns:1fr; }
  .configuration-setting-group:nth-child(odd) { border-right:0; }
  .configuration-save-bar { grid-template-columns:1fr; }
}
@media (max-width:680px) {
  .configuration-panel-head,.configuration-history-row,.configuration-pending-notice { align-items:flex-start; }
  .configuration-field-grid,.configuration-toggle-grid,.configuration-classes,.configuration-save-actions,.configuration-materialize-grid { grid-template-columns:1fr; }
  .configuration-setting-group,.configuration-save-bar { padding:16px; }
  .configuration-history-row,.configuration-pending-notice { flex-direction:column; }
}

/* Gate 3: dedicated ban registry workspace. */
.bans-truth-card {
  display:grid; grid-template-columns:auto minmax(0,1fr); gap:5px 14px; align-items:center;
  margin:0 0 18px; padding:18px; border:1px solid var(--border-soft); border-radius:14px;
  background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),var(--surface));
}
.bans-truth-card .status { grid-row:1/3; align-self:start; white-space:nowrap; }
.bans-truth-card strong { color:var(--text); font-size:15px; }
.bans-truth-card p { grid-column:2; margin:0; color:var(--text-muted); font-size:12px; line-height:1.55; }
.bans-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.bans-filter { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:10px; margin:0 0 14px; }
.bans-create { display:grid; gap:16px; margin:0 0 18px; padding:18px; border-color:color-mix(in srgb,var(--red,#ef6b73) 34%,var(--border-soft)); }
.bans-section-heading { display:flex; align-items:center; gap:12px; }
.bans-section-heading > div:last-child { display:grid; gap:3px; }
.bans-section-heading small { color:var(--text-muted); }
.bans-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; font-weight:900; }
.bans-icon.danger { color:#ffacb2; background:rgba(239,107,115,.13); }
.bans-create-fields { display:grid; grid-template-columns:minmax(180px,.65fr) minmax(260px,1.35fr) auto; gap:10px; }
.bans-list { display:grid; gap:10px; }
.bans-entry-row {
  display:grid; grid-template-columns:minmax(220px,.85fr) minmax(420px,1.4fr) auto; gap:18px; align-items:center;
  padding:18px; border:1px solid var(--border-soft); border-radius:13px; background:var(--surface);
}
.bans-entry-identity { min-width:0; display:grid; justify-items:start; gap:7px; }
.bans-entry-identity strong,.bans-entry-identity p { max-width:100%; overflow-wrap:anywhere; }
.bans-entry-identity p { margin:0; color:var(--text-soft); font-size:12px; line-height:1.5; }
.bans-entry-facts { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; }
.bans-entry-facts > div { min-width:0; display:grid; gap:3px; }
.bans-entry-facts dt { color:var(--text-muted); font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.bans-entry-facts dd { min-width:0; margin:0; overflow-wrap:anywhere; color:var(--text-soft); font-size:11px; }
.bans-registry-only { grid-column:1/-1; margin:0; color:var(--amber); font-size:11px; }
.bans-entry-actions { justify-content:flex-end; }
.bans-timeline-row {
  display:grid; grid-template-columns:12px minmax(190px,.8fr) minmax(150px,.6fr) minmax(220px,1fr);
  gap:12px; align-items:center; padding:15px 18px; border:1px solid var(--border-soft); border-radius:12px; background:var(--surface);
}
.bans-timeline-mark { width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.bans-timeline-row small { color:var(--text-muted); }
@media (max-width:1050px) {
  .bans-entry-row { grid-template-columns:minmax(0,1fr); align-items:start; }
  .bans-entry-actions { justify-content:flex-start; }
}
@media (max-width:680px) {
  .bans-truth-card { grid-template-columns:minmax(0,1fr); }
  .bans-truth-card .status { grid-row:auto; }
  .bans-truth-card p { grid-column:auto; }
  .bans-filter,.bans-create-fields,.bans-entry-facts,.bans-timeline-row { grid-template-columns:minmax(0,1fr); }
  .bans-create-fields .small-button { width:100%; }
}

/* Exact-pair configuration template library. */
.configuration-templates-root { display:grid; gap:16px; min-width:0; }
.configuration-template-layout {
  display:grid;
  grid-template-columns:minmax(270px,.72fr) minmax(480px,1.55fr);
  gap:16px;
  align-items:start;
}
.configuration-template-list-panel,
.configuration-template-editor { min-width:0; min-height:31rem; padding:0; overflow:hidden; }
.configuration-template-list-panel > .panel-head,
.configuration-template-form > .panel-head { min-height:64px; margin:0; padding:16px 18px; border-bottom:1px solid var(--border-soft); }
.configuration-template-list { display:grid; gap:5px; max-height:calc(100vh - 19rem); min-height:12rem; overflow:auto; padding:10px; scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.configuration-template-item {
  width:100%; min-height:80px; padding:12px 13px; display:grid; gap:5px;
  border:1px solid transparent; border-radius:10px; color:var(--text-soft);
  background:#111923; text-align:left; transition:border-color .14s ease,background-color .14s ease;
}
.configuration-template-item:hover { border-color:var(--border); background:var(--surface-2); }
.configuration-template-item.active { border-color:var(--accent); background:linear-gradient(120deg,rgba(77,141,255,.14),var(--surface-2)); box-shadow:inset 3px 0 0 var(--accent); }
.configuration-template-item strong { color:var(--text); font-size:13px; overflow-wrap:anywhere; }
.configuration-template-item span { color:var(--text-soft); font-size:11px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.configuration-template-item small { color:var(--text-muted); font-size:9px; }
.configuration-template-form { display:grid; min-height:31rem; }
.configuration-template-metadata { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:12px; padding:18px; border-bottom:1px solid var(--border-soft); }
.configuration-template-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:18px; }
.configuration-template-field {
  min-width:0; min-height:82px; padding:11px; display:grid; grid-template-columns:18px minmax(0,1fr);
  align-items:start; gap:9px; border:1px solid var(--border-soft); border-radius:10px;
  background:var(--surface-2); cursor:pointer;
}
.configuration-template-field:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.configuration-template-field > input { margin-top:3px; accent-color:var(--accent); }
.configuration-template-field-copy { min-width:0; display:grid; gap:7px; }
.configuration-template-field-copy strong { color:var(--text-soft); font-size:11px; }
.configuration-template-field-copy .control-input { width:100%; min-width:0; }
.configuration-template-field-copy textarea { resize:vertical; }
.configuration-template-actions { padding:16px 18px; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:9px; border-top:1px solid var(--border-soft); background:#101722; }
.configuration-template-form > .read-only-note { margin:0; padding:0 18px 17px; background:#101722; }
.configuration-template-pending { margin:0; border-color:rgba(244,184,96,.32); background:rgba(244,184,96,.08); color:var(--text-soft); }
.configuration-template-pending p { color:var(--text-muted); }
.configuration-template-item:disabled,
.configuration-template-form button:disabled,
.configuration-template-field input:disabled,
.configuration-template-field select:disabled,
.configuration-template-field textarea:disabled { cursor:not-allowed; opacity:.56; }

@media (max-width:1050px) {
  .configuration-template-layout { grid-template-columns:minmax(0,1fr); }
  .configuration-template-list-panel,.configuration-template-editor { min-height:0; }
  .configuration-template-list { max-height:24rem; min-height:0; }
}
@media (max-width:680px) {
  .configuration-template-metadata,.configuration-template-fields { grid-template-columns:minmax(0,1fr); padding:14px; }
  .configuration-template-actions { align-items:stretch; flex-direction:column; padding:14px; }
  .configuration-template-actions .btn { width:100%; }
  .configuration-template-list-panel > .panel-head,.configuration-template-form > .panel-head { padding:14px; }
}

/* Gate 2a: exact-pair player directory. */
.player-directory-panel { padding:0; overflow:hidden; }
.player-directory-panel .panel-head { min-height:64px; margin:0; padding:16px 18px; border-bottom:1px solid var(--border-soft); }
.player-directory-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) repeat(3,minmax(130px,auto)); }
.player-directory-toolbar .player-search-input { width:100%; min-width:0; }
.player-directory-toolbar .filter-select { width:100%; max-width:none; }
.player-directory-table { min-width:960px; }
.player-directory-table td:first-child { color:var(--text); font-weight:700; }
.player-directory-table td { vertical-align:middle; }
.player-directory-cards { display:none; }
.player-directory-empty { padding:42px 18px; color:var(--text-muted); text-align:center; }
.player-directory-more { display:block; margin:16px auto; min-width:150px; }
.player-directory-more[hidden],.player-directory-empty[hidden] { display:none; }
.player-directory-card { padding:14px; border:1px solid var(--border-soft); border-radius:11px; background:var(--surface-2); }
.player-directory-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.player-directory-table tbody tr,.player-directory-card { cursor:pointer; transition:border-color .15s ease,background .15s ease,transform .15s ease; }
.player-directory-table tbody tr:hover,.player-directory-table tbody tr:focus-visible { background:color-mix(in srgb,var(--accent) 8%,transparent); outline:none; }
.player-directory-card:hover,.player-directory-card:focus-visible { border-color:color-mix(in srgb,var(--accent) 42%,var(--border-soft)); transform:translateY(-1px); outline:none; }
.player-directory-card-grid { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 12px; margin:14px 0 0; }
.player-directory-card-grid dt { color:var(--text-muted); font-size:10px; }
.player-directory-card-grid dd { min-width:0; margin:0; overflow-wrap:anywhere; color:var(--text-soft); font-size:11px; text-align:right; }
#player-directory-truth-message { margin:12px 18px 0; }
@media (max-width:920px) {
  .player-directory-toolbar { grid-template-columns:minmax(0,1fr) repeat(3,minmax(0,1fr)); }
  .player-directory-toolbar .player-search-input { grid-column:1/-1; }
}

@media (max-width:680px) {
  .player-directory-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .player-directory-toolbar { grid-template-columns:minmax(0,1fr); padding:14px; }
  .player-directory-toolbar .player-search-input { grid-column:auto; }
  .player-directory-desktop { display:none; }
  .player-directory-cards { display:grid; gap:10px; padding:14px; }
  .player-directory-panel .panel-head { align-items:flex-start; gap:8px; }
}
.messages-layout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.message-composer,
.message-history,
.profile-inbox-card { min-width: 0; }

.message-search-row,
.message-composer-footer,
.message-history-head,
.profile-inbox-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-search-row .control-input { flex: 1; }
.message-recipient-results {
  display: grid;
  gap: 7px;
  max-height: 310px;
  overflow: auto;
  margin: 14px 0;
  padding-right: 4px;
}

.message-player-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
}

.message-player-result:hover,
.message-player-result.selected { border-color: var(--accent); }
.message-player-result > span { display: grid; gap: 2px; }
.message-player-result small { color: var(--muted); }
.message-recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  margin-bottom: 12px;
}

.message-recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border));
  border-radius: 999px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--text);
}

.message-body-input { resize: vertical; min-height: 132px; }
.message-composer-footer { margin-top: 10px; }
.message-history-list,
.profile-inbox-list { display: grid; gap: 10px; }
.message-history-row,
.profile-inbox-message {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
}

.profile-inbox-message.unread {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
  box-shadow: inset 3px 0 0 var(--accent);
}

.message-history-body,
.profile-inbox-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-history-head time,
.profile-inbox-message-head time,
.message-history-row small { color: var(--muted); }
@media (max-width: 980px) {
  .messages-layout { grid-template-columns: 1fr; }
}
