:root {
  color-scheme: dark;
  --bg: #0b1624;
  --bg-deep: #07101b;
  --bg-elev: rgba(14, 30, 49, 0.62);
  --bg-card: rgba(17, 36, 58, 0.52);
  --bg-card-solid: #11243a;
  --border: rgba(130, 175, 222, 0.18);
  --border-strong: rgba(145, 192, 238, 0.30);
  --rim-light: rgba(215, 236, 255, 0.12);
  --text: #edf4ff;
  --muted: #90abc9;
  --accent: #3e86ca;
  --accent-bright: #7ebcf7;
  --accent-hover: #2d6ca6;
  --cyan: #67d4f6;
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #10b981;
  --sidebar-w: 296px;
  --shadow-3d-sm:
    inset 0 1px 0 var(--rim-light),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 6px 16px -4px rgba(0, 0, 0, 0.55);
  --shadow-3d-md:
    inset 0 1px 0 var(--rim-light),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 18px 36px -10px rgba(2, 4, 10, 0.78);
  --shadow-3d-lg:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 32px 64px -16px rgba(0, 0, 0, 0.85);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

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

body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Transparent Overlay Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-track-piece { background: transparent !important; }
::-webkit-scrollbar-corner { background: transparent !important; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 188, 247, 0.42);
  border-color: rgba(176, 216, 255, 0.2);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; line-height: 1.45; }

/* Ambient 3D Stage Background */
.ambient-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1080px 640px at 84% 88%, rgba(38, 86, 140, 0.22), transparent 64%),
    radial-gradient(920px 580px at 12% 8%, rgba(52, 110, 172, 0.13), transparent 60%),
    linear-gradient(162deg, #09131f 0%, #0d1d30 52%, #132841 100%);
}
.starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.ambient-grid {
  display: none;
}
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.18;
}
.orb-indigo { width: 460px; height: 460px; left: -120px; top: -110px; background: #1c446e; }
.orb-cyan { width: 380px; height: 380px; right: -100px; top: 120px; background: #22588c; opacity: 0.16; }
.orb-emerald { width: 420px; height: 420px; right: 16%; bottom: -160px; background: #183d64; opacity: 0.15; }

/* Tactile 3D Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.89rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  position: relative;
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.16s ease, filter 0.15s ease, background 0.15s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 3px 0 rgba(4, 6, 12, 0.8),
    0 8px 18px -4px rgba(0, 0, 0, 0.55);
}
.btn-icon { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 5px 0 rgba(4, 6, 12, 0.82),
    0 14px 24px -6px rgba(0, 0, 0, 0.65);
}
.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(4, 6, 12, 0.8);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-lg { width: 100%; padding: 14px 20px; font-size: 0.98rem; border-radius: 6px; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; border-radius: 5px; }

.btn-discord {
  background: linear-gradient(180deg, #25507d 0%, #153152 100%);
  border-color: rgba(110, 168, 224, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(215, 235, 255, 0.22),
    0 3px 0 #091829,
    0 10px 20px -6px rgba(14, 42, 74, 0.65);
}
.btn-discord:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(225, 242, 255, 0.26),
    0 5px 0 #091829,
    0 15px 24px -6px rgba(32, 78, 128, 0.68);
}
.btn-danger {
  background: linear-gradient(180deg, #98242a 0%, #681318 100%);
  border-color: rgba(248, 113, 113, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 3px 0 #38090c,
    0 10px 18px -6px rgba(120, 20, 25, 0.55);
}
.btn-warn {
  background: linear-gradient(180deg, #9e5f08 0%, #6b3c04 100%);
  border-color: rgba(251, 191, 36, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 3px 0 #3d2102,
    0 10px 18px -6px rgba(125, 72, 6, 0.48);
}
.btn-ok {
  background: linear-gradient(180deg, #0d7453 0%, #064b35 100%);
  border-color: rgba(52, 211, 153, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 3px 0 #03291c,
    0 10px 18px -6px rgba(8, 86, 61, 0.52);
}
.btn-secondary {
  background: linear-gradient(180deg, rgba(16, 35, 58, 0.94) 0%, rgba(9, 21, 36, 0.98) 100%);
  border-color: rgba(120, 168, 216, 0.22);
  color: var(--text);
}
.btn-ghost {
  background: linear-gradient(180deg, rgba(12, 27, 46, 0.88) 0%, rgba(7, 17, 30, 0.94) 100%);
  border-color: rgba(120, 168, 216, 0.19);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(210, 232, 255, 0.08), 0 4px 12px rgba(3, 8, 16, 0.55);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 30, 50, 0.94), rgba(8, 18, 32, 0.98));
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-3d-sm);
}
.icon-btn svg { width: 18px; height: 18px; }
.mobile-only { display: none; }

.input {
  width: 100%;
  background-color: rgba(12, 26, 44, 0.62);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 13px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.48),
    0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.input:hover {
  border-color: rgba(126, 188, 247, 0.34);
  background-color: rgba(15, 33, 54, 0.64);
}
.input:focus {
  outline: none;
  border-color: rgba(62, 134, 202, 0.78);
  background-color: rgba(14, 30, 49, 0.66);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.55),
    0 0 0 3px rgba(62, 134, 202, 0.2);
}
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px 15px;
}
select.input::-ms-expand { display: none; }
select.input option {
  background-color: #0f2035;
  color: #f1f5ff;
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  cursor: pointer;
  opacity: 0.65;
  background: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }
.input-sm { padding: 7px 11px; font-size: 0.84rem; width: auto; min-width: 155px; }
select.input-sm { padding-right: 32px; background-position: right 9px center; }

/* 3D Interactive Tilt Surface */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)) translateZ(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, border-color 0.2s ease;
  will-change: transform;
}

/* Login View */
.login-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 450px;
  background: linear-gradient(165deg, rgba(19, 39, 63, 0.54) 0%, rgba(11, 24, 39, 0.66) 100%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 36px 32px 30px;
  box-shadow: var(--shadow-3d-lg);
  overflow: hidden;
  text-align: center;
}
.login-card-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 220px;
  background: radial-gradient(circle, rgba(62, 134, 202, 0.26) 0%, transparent 70%);
  pointer-events: none;
}
.login-emblem {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.emblem-cube {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(62, 134, 202, 0.35), rgba(14, 30, 49, 0.84));
  border: 1.5px solid rgba(176, 216, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 14px 32px rgba(45, 108, 166, 0.52);
  transform: translateZ(20px);
}
.emblem-logo,
.brand-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #cde6ff;
  background: rgba(62, 134, 202, 0.16);
  border: 1px solid rgba(126, 188, 247, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  letter-spacing: -0.025em;
}
.login-card > p.muted {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.login-note { margin: 18px 0 0; font-size: 0.8rem; color: var(--muted); }

.banner {
  border-radius: 6px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 0.86rem;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.banner-warn { background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.38); color: #fecaca; }
.banner-info { background: rgba(245, 158, 11, 0.13); border: 1px solid rgba(245, 158, 11, 0.38); color: #fde68a; }
.banner-info p { margin: 6px 0 0; }

/* App Shell: Fixed Left Sidebar + Right Workspace */
.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: linear-gradient(175deg, rgba(13, 28, 46, 0.62) 0%, rgba(9, 20, 34, 0.72) 100%);
  backdrop-filter: blur(24px) saturate(140%);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.05),
    18px 0 48px -12px rgba(0, 0, 0, 0.72);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(62, 134, 202, 0.3), rgba(14, 30, 49, 0.80));
  border: 1px solid rgba(176, 216, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 20px rgba(45, 108, 166, 0.42);
}
.brand-text { min-width: 0; flex: 1; }
.brand-name { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.brand-sub { font-size: 0.72rem; color: #9bcdf9; font-weight: 600; letter-spacing: 0.02em; }

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 18px;
}
.nav-section-label {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7ea0c4;
  padding: 12px 8px 4px;
  margin-top: 6px;
  border-top: 1px solid rgba(130, 175, 222, 0.12);
}
.nav-section-label:first-child {
  padding-top: 2px;
  margin-top: 0;
  border-top: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: linear-gradient(165deg, rgba(12, 26, 44, 0.72) 0%, rgba(7, 17, 30, 0.82) 100%);
  border: 1px solid rgba(120, 168, 216, 0.14);
  color: var(--muted);
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
  position: relative;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease, color 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.tab-btn:hover {
  color: var(--text);
  transform: translateX(3px);
  border-color: rgba(126, 188, 247, 0.34);
  background: linear-gradient(165deg, rgba(18, 38, 62, 0.88) 0%, rgba(10, 22, 38, 0.94) 100%);
  box-shadow: var(--shadow-3d-sm);
}
.tab-btn.active {
  color: #fff;
  transform: translateX(3px);
  border-color: rgba(110, 168, 224, 0.52);
  background: linear-gradient(135deg, rgba(28, 63, 102, 0.70) 0%, rgba(13, 33, 58, 0.80) 100%);
  box-shadow:
    inset 0 1px 0 rgba(215, 235, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 8px 18px -6px rgba(14, 42, 74, 0.72);
}
.tab-btn.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #7ebcf7, #2b649c);
  box-shadow: 0 0 10px rgba(110, 168, 224, 0.8);
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(130, 175, 222, 0.14);
  background: linear-gradient(155deg, rgba(14, 31, 52, 0.95), rgba(7, 17, 30, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 10px rgba(0, 0, 0, 0.5);
}
.nav-icon svg { width: 16px; height: 16px; }
.nav-icon-danger { color: #f87171; }
.nav-icon-warn { color: #fbbf24; }
.nav-icon-ok { color: #34d399; }
.nav-icon-accent { color: #9bcdf9; }
.nav-icon-cyan { color: #22d3ee; }
.nav-icon-emerald { color: #34d399; }

.tab-btn.active .nav-icon {
  background: linear-gradient(145deg, #244f7d, #133052);
  color: #fff;
  border-color: rgba(160, 206, 250, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 5px 12px rgba(10, 30, 56, 0.65);
}

.nav-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nav-label {
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}
.nav-hint {
  font-size: 0.7rem;
  color: #7e9ec0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-btn.active .nav-hint { color: #cde6ff; }

.nav-badge {
  font-size: 0.71rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.38); }
.badge-warn { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.38); }
.badge-ok { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.36); }
.badge-accent { background: rgba(62, 134, 202, 0.24); color: #cde6ff; border: 1px solid rgba(62, 134, 202, 0.45); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.status-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(13, 28, 46, 0.78), rgba(9, 20, 34, 0.84));
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.05);
}
.status-dock-text { min-width: 0; }
.status-dock-title { font-size: 0.78rem; font-weight: 700; color: #e2e8f0; }

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok), 0 0 4px #fff;
  animation: beacon 2.4s ease-in-out infinite;
}
@keyframes beacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.88); }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 22, 0.68);
  backdrop-filter: blur(4px);
  z-index: 35;
}

/* Workspace Right Area */
.workspace {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(11, 24, 39, 0.58);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.55);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em; }
.topbar-sub { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(165deg, rgba(14, 30, 50, 0.88), rgba(8, 19, 34, 0.94));
  border: 1px solid rgba(125, 170, 215, 0.22);
  padding: 5px 12px 5px 6px;
  border-radius: 6px;
  box-shadow: var(--shadow-3d-sm);
}
.user-pill img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(126, 188, 247, 0.45);
}
.user-name { font-size: 0.84rem; font-weight: 700; line-height: 1.15; }
.user-role { font-size: 0.7rem; color: #9bcdf9; font-weight: 600; }

.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 26px 40px;
}

/* 3D KPI Metric Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(20, 42, 68, 0.50) 0%, rgba(11, 24, 39, 0.62) 100%);
  backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-3d-md);
}
.stat-card:hover {
  --ty: -3px;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-3d-lg);
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.stat-icon svg { width: 17px; height: 17px; }
.stat-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transform: translateZ(12px);
}
.stat-bar {
  margin-top: 12px;
  height: 3px;
  border-radius: 999px;
  opacity: 0.75;
}

.stat-danger .stat-value { color: #f87171; }
.stat-danger .stat-icon { background: rgba(239, 68, 68, 0.18); color: #f87171; border-color: rgba(239, 68, 68, 0.35); }
.stat-danger .stat-bar { background: linear-gradient(90deg, #ef4444, transparent); }

.stat-warn .stat-value { color: #fbbf24; }
.stat-warn .stat-icon { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
.stat-warn .stat-bar { background: linear-gradient(90deg, #f59e0b, transparent); }

.stat-ok .stat-value { color: #34d399; }
.stat-ok .stat-icon { background: rgba(16, 185, 129, 0.18); color: #34d399; border-color: rgba(16, 185, 129, 0.35); }
.stat-ok .stat-bar { background: linear-gradient(90deg, #10b981, transparent); }

.stat-info .stat-value { color: #9bcdf9; }
.stat-info .stat-icon { background: rgba(62, 134, 202, 0.2); color: #9bcdf9; border-color: rgba(62, 134, 202, 0.4); }
.stat-info .stat-bar { background: linear-gradient(90deg, #4a93d6, #22d3ee, transparent); }

/* Tab Panels */
.tab-panel { display: none; animation: panelIn 0.2s ease-out; }
.tab-panel.active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 20px;
  align-items: start;
}
.side-stack { display: flex; flex-direction: column; gap: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 3D Glass & Obsidian Cards */
.card {
  background: linear-gradient(165deg, rgba(18, 38, 61, 0.50) 0%, rgba(11, 24, 39, 0.62) 100%);
  backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow-3d-md);
}
.card h2 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-head h2 { margin: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.form-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.form-stack label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

.list-stack { display: flex; flex-direction: column; gap: 12px; }
.item-card {
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.48) 0%, rgba(10, 22, 37, 0.60) 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 15px 17px;
  box-shadow: var(--shadow-3d-sm);
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.15s ease, box-shadow 0.18s ease;
}
.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 188, 247, 0.34);
  box-shadow: var(--shadow-3d-md);
}
.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.item-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-meta { font-size: 0.81rem; color: var(--muted); margin-top: 6px; }
.item-reason { margin: 8px 0; font-size: 0.93rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.item-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.pill-pending { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.pill-approved { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.pill-dismissed, .pill-revoked { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.28); }
.pill-active { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.pill-accent { background: rgba(62, 134, 202, 0.24); color: #cde6ff; border: 1px solid rgba(62, 134, 202, 0.48); }
.pill-zerox { background: rgba(34, 211, 238, 0.18); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.42); }
.pill-warn-dirty { background: rgba(245, 158, 11, 0.26); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.55); }

/* Linked Members & Verifs */
.member-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
  background: #090d16;
  border: 2px solid var(--border-strong);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}
.member-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.roblox-link-strip {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.roblox-link-strip.unlinked {
  background: rgba(14, 30, 49, 0.54);
  border-color: var(--border);
  color: var(--muted);
}
.link-ext {
  color: #6ee7b7;
  font-weight: 700;
  text-decoration: none;
}
.link-ext:hover { text-decoration: underline; }

/* Role Permissions */
.role-perms-header-card { margin-bottom: 18px; }
.role-perms-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.role-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}
.role-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: linear-gradient(165deg, rgba(13, 28, 47, 0.78), rgba(8, 18, 32, 0.86));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.role-item-btn:hover {
  transform: translateX(2px);
  border-color: rgba(126, 188, 247, 0.42);
  background: linear-gradient(165deg, rgba(24, 48, 76, 0.88), rgba(14, 30, 49, 0.88));
}
.role-item-btn.active {
  border-color: rgba(110, 168, 224, 0.62);
  background: linear-gradient(135deg, rgba(28, 63, 102, 0.62), rgba(13, 33, 58, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 18px -6px rgba(45, 108, 166, 0.5);
}
.role-item-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.role-item-name {
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-item-sub { font-size: 0.73rem; color: var(--muted); }
.role-dot, .role-dot-lg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.role-dot-lg { width: 14px; height: 14px; }

.role-editor-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.role-flags-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.role-cmd-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.bot-filter-group {
  display: inline-flex;
  background: rgba(9, 13, 24, 0.52);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}
.bot-filter-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 5px;
  padding: 6px 11px;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.bot-filter-btn.active {
  background: linear-gradient(180deg, #25507d, #153152);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px rgba(45, 108, 166, 0.45);
}

.role-cmd-groups { display: flex; flex-direction: column; gap: 16px; }
.cmd-group-box {
  background: linear-gradient(165deg, rgba(16, 23, 40, 0.5), rgba(9, 13, 24, 0.62));
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 15px;
  box-shadow: var(--shadow-3d-sm);
}
.cmd-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cmd-group-title {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 10px;
}
.cmd-toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(165deg, rgba(24, 33, 56, 0.52), rgba(13, 18, 32, 0.64));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.cmd-toggle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 188, 247, 0.45);
}
.cmd-toggle-card.checked {
  border-color: rgba(16, 185, 129, 0.62);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(6, 78, 59, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(110, 231, 183, 0.2),
    0 8px 18px -6px rgba(16, 185, 129, 0.3);
}
.cmd-toggle-card.readonly { cursor: default; }
.cmd-toggle-card input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  margin: 2px 0 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(9, 13, 24, 0.65);
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.06);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.cmd-toggle-card:hover input[type="checkbox"]:not(:disabled):not(:checked) {
  border-color: rgba(126, 188, 247, 0.65);
  background: rgba(17, 24, 42, 0.8);
}
.cmd-toggle-card input[type="checkbox"]:checked {
  border-color: rgba(52, 211, 153, 0.88);
  background: linear-gradient(145deg, #10b981 0%, #059669 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 0 12px rgba(16, 185, 129, 0.45);
}
.cmd-toggle-card input[type="checkbox"]:checked::after {
  content: "";
  width: 12px;
  height: 12px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.cmd-toggle-card input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 134, 202, 0.28);
}
.cmd-toggle-card input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: default;
}
.cmd-toggle-body { min-width: 0; flex: 1; }
.cmd-toggle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.cmd-name-code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}
.cmd-desc { font-size: 0.78rem; color: var(--muted); margin-top: 4px; line-height: 1.38; }

.check-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.check-bar .input { flex: 1; }
.check-result { display: grid; gap: 14px; }
.profile-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.48), rgba(10, 22, 37, 0.60));
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-3d-sm);
}
.profile-box img {
  width: 72px;
  height: 72px;
  border-radius: 7px;
  background: #070910;
  border: 2px solid var(--border-strong);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
}
.role-chip {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 66, 0.85);
  border: 1px solid var(--border);
  margin: 2px 4px 2px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.empty-state { text-align: center; color: var(--muted); padding: 32px 14px; font-size: 0.92rem; }

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-3d-md);
}
.toast.ok { border-color: rgba(16, 185, 129, 0.7); }
.toast.err { border-color: rgba(239, 68, 68, 0.7); }

/* Bot Presence & 3D Discord Preview */
.presence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 20px;
  align-items: start;
}
.presence-controls-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.presence-toggle-card {
  height: 100%;
  margin: 0;
}
.presence-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.50), rgba(10, 22, 37, 0.58));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 13px;
  box-shadow: var(--shadow-3d-sm);
}
.presence-field-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.presence-vars-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 7px;
  background: rgba(9, 20, 34, 0.50);
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}
.presence-vars-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}
.presence-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.var-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(165deg, rgba(14, 31, 52, 0.90), rgba(8, 19, 34, 0.95));
  border: 1px solid rgba(126, 188, 247, 0.28);
  color: #e6f2ff;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.14s ease, filter 0.14s ease;
}
.var-chip-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(126, 188, 247, 0.6);
  filter: brightness(1.08);
}
.var-chip-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.var-chip-val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.32);
  padding: 1px 6px;
  border-radius: 6px;
}

.presence-slides-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.presence-slides-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.presence-slide-card {
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.52) 0%, rgba(10, 22, 37, 0.60) 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 14px 15px;
  box-shadow: var(--shadow-3d-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}
.presence-slide-card.live-slide {
  border-color: rgba(16, 185, 129, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(110, 231, 183, 0.16),
    0 10px 22px -6px rgba(16, 185, 129, 0.24);
}
.presence-slide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.presence-slide-controls {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 10px;
}
.slide-preview-line {
  margin-top: 9px;
  padding: 7px 11px;
  border-radius: 5px;
  background: rgba(8, 18, 30, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.81rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.slide-preview-verb {
  font-weight: 800;
  color: #9bcdf9;
  text-transform: uppercase;
  font-size: 0.71rem;
  letter-spacing: 0.04em;
}
.slide-order-actions {
  display: flex;
  gap: 6px;
}

/* Discord Bot 3D Live Preview Card */
.discord-preview-card {
  padding: 0;
  overflow: hidden;
  border-color: rgba(126, 188, 247, 0.24);
}
.discord-preview-card:hover {
  --ty: -3px;
  border-color: rgba(126, 188, 247, 0.42);
  box-shadow: var(--shadow-3d-lg);
}
.discord-preview-banner {
  position: relative;
  height: 92px;
  background:
    radial-gradient(circle at 20% 25%, rgba(62, 134, 202, 0.65), transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.45), transparent 55%),
    linear-gradient(135deg, #1e456e 0%, #122841 48%, #0a1624 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.discord-preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 22, 37, 0.64);
  border: 1px solid rgba(110, 231, 183, 0.45);
  color: #6ee7b7;
  backdrop-filter: blur(8px);
}
.discord-preview-badge.draft {
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}
.discord-preview-badge.paused {
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}
.discord-preview-body {
  padding: 0 18px 18px;
}
.discord-avatar-row {
  margin-top: -38px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.discord-avatar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
}
.discord-bot-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  background: #0d1d31;
  border: 5px solid #102237;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
}
.discord-status-ring {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid #102237;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.discord-status-ring.status-online { background: #23a55a; }
.discord-status-ring.status-idle { background: #f0b232; }
.discord-status-ring.status-dnd { background: #f23f43; }
.discord-status-ring.status-invisible { background: #80848e; }

.discord-bot-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.discord-bot-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.discord-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.discord-app-badge svg { width: 10px; height: 10px; }
.discord-bot-tag {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 14px;
}

.discord-activity-box {
  background: linear-gradient(165deg, rgba(13, 28, 46, 0.78), rgba(9, 20, 34, 0.84));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  padding: 13px 14px;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.48), 0 8px 18px rgba(0, 0, 0, 0.45);
}
.discord-activity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.discord-activity-type {
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
}
.discord-slide-counter {
  font-size: 0.69rem;
  font-weight: 700;
  color: #7ebcf7;
}
.discord-activity-text {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
  word-break: break-word;
}
.discord-activity-progress {
  margin-top: 10px;
}
.discord-slide-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.slide-dot-btn {
  border: 0;
  height: 6px;
  width: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  cursor: pointer;
  padding: 0;
  transition: width 0.16s ease, background 0.16s ease;
}
.slide-dot-btn.active {
  width: 34px;
  background: linear-gradient(90deg, #4a93d6, #22d3ee);
  box-shadow: 0 0 10px rgba(62, 134, 202, 0.65);
}

.presence-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}
.telemetry-tile {
  background: rgba(9, 20, 34, 0.54);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.42);
}
.telemetry-label {
  display: block;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.telemetry-val {
  display: block;
  margin-top: 3px;
  font-size: 1.12rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f1f5ff;
}
.presence-meta-foot {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}

/* AutoMod Shield Layout */
.automod-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 20px;
  align-items: start;
}
.automod-top-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(200px, 1fr) minmax(220px, 1.3fr);
  gap: 12px;
  margin-bottom: 16px;
}
.automod-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text);
}
.automod-inline-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.automod-modules-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.automod-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.automod-exempt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.automod-module-card {
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.52) 0%, rgba(10, 22, 37, 0.60) 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 14px 15px;
  box-shadow: var(--shadow-3d-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.automod-module-card.active {
  border-color: rgba(16, 185, 129, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(110, 231, 183, 0.14),
    0 10px 22px -8px rgba(16, 185, 129, 0.22);
}
.automod-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.automod-module-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  flex: 1 1 260px;
}
.automod-module-toggle input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--ok);
  flex-shrink: 0;
}
.automod-timeout-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 132px;
}
.automod-sub-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 11px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.automod-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.automod-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  background: rgba(14, 30, 49, 0.68);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.automod-preset-chip input { accent-color: var(--accent); }
.automod-pill-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 185px;
  overflow-y: auto;
  padding-right: 4px;
}
.automod-pick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: rgba(13, 28, 46, 0.62);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.automod-pick-pill:hover:not(:disabled) {
  border-color: rgba(126, 188, 247, 0.55);
  color: var(--text);
}
.automod-pick-pill.selected {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
}
.automod-pick-pill:disabled { opacity: 0.55; cursor: not-allowed; }
.automod-scope-box {
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.11), rgba(9, 20, 34, 0.68));
  border: 1px solid rgba(16, 185, 129, 0.34);
  border-radius: 6px;
  padding: 11px 13px;
}
.automod-scope-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}
.automod-live-rule-card {
  background: rgba(10, 22, 37, 0.64);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 13px;
}
.automod-live-rule-card.opc-managed {
  border-color: rgba(62, 134, 202, 0.42);
}

/* Responsive Breakpoints */
@media (max-width: 1180px) {
  .panel-grid { grid-template-columns: 1fr; }
  .role-perms-layout { grid-template-columns: 1fr; }
  .presence-layout { grid-template-columns: 1fr; }
  .automod-layout { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .presence-controls-grid { grid-template-columns: 1fr; }
  .automod-top-grid { grid-template-columns: 1fr; }
  .automod-split-grid { grid-template-columns: 1fr; }
  .automod-exempt-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .presence-slide-controls { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .mobile-only { display: inline-flex; }
  .workspace { margin-left: 0; }
  .sidebar { transform: translateX(-105%); }
  .sidebar.open { transform: translateX(0); }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .container { padding: 16px; }
  .topbar-sub { max-width: 180px; }
  .check-bar { flex-direction: column; }
  .user-pill .user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card, .btn, .tab-btn, .item-card, .role-item-btn, .cmd-toggle-card {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ==================== BOT LOGS & AUDIT SUITE ==================== */
.logs-master-card {
  margin-bottom: 18px;
}

.logs-master-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 7px;
  background: linear-gradient(165deg, rgba(15, 32, 52, 0.60) 0%, rgba(9, 20, 34, 0.78) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3d-sm);
}

.logs-master-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  flex: 1 1 340px;
}

.logs-master-emblem {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #9bcdf9;
  background: linear-gradient(145deg, rgba(62, 134, 202, 0.24), rgba(34, 211, 238, 0.14));
  border: 1px solid rgba(126, 188, 247, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px -6px rgba(62, 134, 202, 0.45);
}

.logs-master-emblem svg {
  width: 21px;
  height: 21px;
}

.logs-master-title {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--text);
  margin-bottom: 2px;
}

.logs-master-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.logs-default-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-default-wrap .input-sm {
  min-width: 220px;
}

/* ZeroX-style Pill Toggle Switch adapted for Obsidian 3D */
.logs-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
  flex-shrink: 0;
}

.logs-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.logs-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(14, 30, 49, 0.84);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55);
}

.logs-slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logs-switch input:checked + .logs-slider {
  background: linear-gradient(135deg, #25507d 0%, #153152 100%);
  border-color: rgba(176, 216, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 14px rgba(62, 134, 202, 0.42);
}

.logs-switch input:checked + .logs-slider::before {
  transform: translateX(21px);
}

.logs-switch input:disabled + .logs-slider {
  opacity: 0.48;
  cursor: not-allowed;
}

.logs-switch input:focus-visible + .logs-slider {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* 2-Column Categories Grid */
.logs-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.logs-cat-card {
  background: linear-gradient(165deg, rgba(17, 36, 58, 0.56) 0%, rgba(10, 22, 37, 0.68) 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 16px 18px;
  box-shadow: var(--shadow-3d-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.logs-cat-card:hover {
  border-color: rgba(126, 188, 247, 0.34);
}

.logs-cat-card.is-muted {
  opacity: 0.66;
}

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

.logs-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logs-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.logs-cat-title {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logs-cat-head-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.logs-cat-badge {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.logs-mini-test-btn {
  padding: 4px 9px;
  font-size: 0.72rem;
  border-radius: 5px;
}

.logs-ch-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logs-ch-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.logs-resolved-hint {
  font-size: 0.71rem;
  color: var(--cyan);
  font-weight: 600;
}

.logs-events-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(148, 163, 184, 0.11);
}

.logs-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.logs-event-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.logs-event-copy {
  min-width: 0;
  flex: 1;
}

.logs-event-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logs-event-desc {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.38;
}

/* Live Audit Stream */
.logs-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  display: inline-block;
  flex-shrink: 0;
}

.logs-stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.logs-feed-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 6px;
  background: rgba(10, 22, 37, 0.66);
  border: 1px solid var(--border);
  transition: border-color 0.14s ease, background 0.14s ease;
}

.logs-feed-row:hover {
  border-color: rgba(126, 188, 247, 0.34);
  background: rgba(16, 35, 57, 0.68);
}

.logs-feed-left {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.logs-feed-dot {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.logs-feed-body {
  min-width: 0;
  flex: 1;
}

.logs-feed-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 3px;
}

.logs-feed-title {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
}

.logs-feed-summary {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.42;
  word-break: break-word;
}

.logs-feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.73rem;
  color: var(--muted);
}

.logs-feed-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.logs-feed-time {
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .logs-categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .logs-feed-row {
    flex-direction: column;
  }
  .logs-feed-right {
    align-items: flex-start;
  }
}


/* ==================== WEB ANNOUNCEMENTS STUDIO ==================== */
.ann-hero-card {
  margin-bottom: 18px;
}

.ann-presets-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ann-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.ann-preview-card {
  position: sticky;
  top: 20px;
}

.ann-section {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ann-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.ann-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ann-section-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
}

.ann-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ann-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.ann-label-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ann-quick-media {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ann-textarea,
.ann-textarea-sm {
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}

.ann-ping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.ann-segmented {
  display: inline-flex;
  background: rgba(10, 22, 37, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
}

.ann-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ann-seg-btn:hover:not(:disabled) {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.ann-seg-btn.active {
  background: rgba(25, 58, 95, 0.72);
  color: #e6f2ff;
  box-shadow: inset 0 0 0 1px rgba(110, 168, 224, 0.48);
}

.ann-seg-btn.active[data-everyone="everyone"] {
  background: rgba(239, 68, 68, 0.24);
  color: #fecaca;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.55);
}
.ann-seg-btn.active[data-everyone="here"] {
  background: rgba(245, 158, 11, 0.24);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.55);
}

.ann-role-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ann-role-add-row select.input {
  flex: 1;
  min-width: 0;
}

.ann-selected-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.ann-role-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(126, 188, 247, 0.4);
  color: #e6f2ff;
}

.ann-role-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ann-role-remove {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.9rem;
  line-height: 1;
}

.ann-role-remove:hover:not(:disabled) {
  opacity: 1;
}

.ann-check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #e2e8f0;
  cursor: pointer;
  margin-bottom: 8px;
}

.ann-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.ann-check-col,
.ann-check-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding-bottom: 10px;
}

.ann-color-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.ann-color-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ann-color-controls input[type="color"] {
  width: 38px;
  height: 36px;
  padding: 2px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 30, 49, 0.76);
  cursor: pointer;
}

.ann-swatches {
  display: flex;
  gap: 7px;
  padding-bottom: 14px;
}

.ann-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.ann-swatch:hover:not(:disabled) {
  transform: scale(1.14);
  border-color: #ffffff;
}

.ann-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ann-field-card {
  background: rgba(14, 30, 49, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 12px;
}

.ann-field-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ann-field-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Authentic Discord Dark Preview Card */
.ann-discord-stage {
  background: #313338;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 16px;
  color: #dbdee1;
  font-size: 0.9rem;
  line-height: 1.42;
}

.ann-dc-msg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ann-dc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e1f22;
}

.ann-dc-body {
  min-width: 0;
  flex: 1;
}

.ann-dc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.ann-dc-username {
  font-weight: 700;
  color: #f2f3f5;
  font-size: 0.94rem;
}

.ann-dc-bot-tag {
  background: #5865f2;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.ann-dc-time {
  color: #949ba4;
  font-size: 0.72rem;
}

.ann-dc-content {
  margin-bottom: 8px;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
}

.ann-dc-mention {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.3);
  color: #dee0fc;
  font-weight: 600;
}

.ann-dc-mention-everyone {
  background: rgba(245, 158, 11, 0.24);
  color: #fde68a;
}

.ann-dc-embed {
  background: #2b2d31;
  border-left: 4px solid #4a93d6;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.ann-dc-embed-top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.ann-dc-embed-main {
  flex: 1;
  min-width: 0;
}

.ann-dc-author {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f2f3f5;
}

.ann-dc-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.ann-dc-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 5px;
  word-break: break-word;
}

.ann-dc-desc {
  font-size: 0.85rem;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
}

.ann-dc-desc code {
  background: #1e1f22;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82em;
}

.ann-dc-thumb {
  width: 74px;
  height: 74px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e1f22;
}

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

.ann-dc-field {
  grid-column: span 3;
  min-width: 0;
}

.ann-dc-field.inline {
  grid-column: span 1;
}

.ann-dc-field-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 3px;
  word-break: break-word;
}

.ann-dc-field-val {
  font-size: 0.82rem;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
}

.ann-dc-banner {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 4px;
}

.ann-dc-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: #b5bac1;
  margin-top: 4px;
}

.ann-dc-footer img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.ann-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ann-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(14, 30, 49, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #4a93d6;
}

.ann-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--muted);
}

.ann-history-actions {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .ann-studio-grid {
    grid-template-columns: 1fr;
  }
  .ann-preview-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .ann-ping-grid,
  .ann-two-col {
    grid-template-columns: 1fr;
  }
  .ann-dc-fields {
    grid-template-columns: 1fr;
  }
  .ann-dc-field,
  .ann-dc-field.inline {
    grid-column: span 1;
  }
  .ann-history-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nav-icon-danger { color: #f87171; background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.28); }
.pill-danger-soft { background: rgba(220, 38, 38, 0.22); color: #fecaca; border: 1px solid rgba(220, 38, 38, 0.45); }
.proof-preview-wrap { margin-top: 10px; }
.proof-link { display: inline-block; border-radius: 6px; overflow: hidden; border: 1px solid rgba(148, 163, 184, 0.28); transition: transform 0.18s ease, border-color 0.18s ease; }
.proof-link:hover { transform: translateY(-2px); border-color: rgba(62, 134, 202, 0.7); }
.proof-thumb { display: block; max-width: 340px; max-height: 220px; width: 100%; height: auto; object-fit: cover; background: rgba(14, 30, 49, 0.76); }

.nav-icon-zerox { color: #67e8f9; background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.3); }
.wc-master-toggle {
  margin-bottom: 14px;
}
.wc-master-toggle.is-off {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.14), rgba(14, 30, 49, 0.66));
}
.wc-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.wc-mini-stat {
  background: rgba(14, 30, 49, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  padding: 10px 12px;
}
.wc-mini-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.wc-mini-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}
.wc-rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wc-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(14, 30, 49, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
}
.wc-rule-row span { color: var(--muted); }
.wc-rule-row strong { color: #e2e8f0; }
.wc-error-strip {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.36);
  color: #fecaca;
  font-size: 0.8rem;
}
@media (max-width: 780px) {
  .wc-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ==================== ANTI-PING USER-ONLY PICKER ==================== */
.antiping-owner-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.antiping-owner-mini img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(126, 188, 247, 0.55);
}
.antiping-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.antiping-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.16), rgba(14, 30, 49, 0.84));
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  min-width: 0;
}
.antiping-user-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.antiping-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e293b;
  border: 1.5px solid rgba(110, 231, 183, 0.65);
}
.antiping-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.antiping-user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.antiping-user-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.antiping-user-remove {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}
.antiping-user-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(248, 113, 113, 0.65);
  transform: scale(1.05);
}
.antiping-user-remove:disabled { opacity: 0.5; cursor: not-allowed; }
.antiping-add-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.antiping-member-picker-wrap {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.antiping-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.antiping-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}
.antiping-member-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(13, 28, 46, 0.64);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
.antiping-member-btn:hover:not(:disabled) {
  border-color: rgba(126, 188, 247, 0.65);
  background: rgba(24, 49, 77, 0.82);
}
.antiping-member-btn.selected {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.15);
}
.antiping-member-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.antiping-member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.antiping-member-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.antiping-member-name {
  font-size: 0.79rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.antiping-member-handle {
  font-size: 0.69rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.antiping-member-state {
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #94a3b8;
}
.antiping-member-btn.selected .antiping-member-state {
  color: #6ee7b7;
}
.antiping-scope-users {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.antiping-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: rgba(14, 30, 49, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
}
.antiping-scope-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}
.antiping-inc-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.antiping-inc-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.antiping-inc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.antiping-inc-target-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Suggestions & In-Game Bugs Tab */
.feedback-proof-wrap {
  margin-top: 8px;
}
.feedback-proof-thumb {
  max-width: 340px;
  max-height: 220px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  object-fit: cover;
  display: block;
}
.feedback-author-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.feedback-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* ==================== SERVER AUDIT LOGS (ZEROX BRIDGE) ==================== */
.slogs-event-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.slogs-event-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.slogs-event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.slogs-event-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-log-ch-select {
  flex: 1;
  min-width: 190px;
}

/* ==================== SUPPORT NEWS DIRECTORY ==================== */
.snews-hero-card {
  margin-bottom: 16px;
}

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

.snews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.snews-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 6px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.32);
}

.snews-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.snews-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.snews-card-emoji {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.snews-card-chname {
  font-size: 0.94rem;
  font-weight: 800;
  color: #f8fafc;
  word-break: break-word;
}

.snews-card-subtitle {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

.snews-purpose {
  font-size: 0.81rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.snews-perms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snews-preview-box {
  background: rgba(10, 22, 37, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 5px;
  padding: 9px 11px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.snews-preview-box.is-empty {
  color: var(--muted);
  border-style: dashed;
}

.snews-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.snews-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.snews-note-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.snews-note-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(10, 22, 37, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 980px) {
  .snews-grid,
  .snews-notes-grid {
    grid-template-columns: 1fr;
  }
  .snews-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== STAFF MANAGEMENT (/warn-staff, /remove-warn, /unrank, /best-staff) ==================== */
.sm-hero-card {
  margin-bottom: 16px;
}

.sm-kpi-strip {
  margin-top: 12px;
  margin-bottom: 0;
}

.sm-spotlight-card {
  margin-bottom: 16px;
  border-left: 4px solid #fbbf24;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 55%),
    var(--card);
}

.sm-spotlight-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sm-spotlight-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.sm-spotlight-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f172a;
  border: 2px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.28);
}

.sm-spotlight-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sm-spotlight-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sm-spotlight-name {
  font-size: 1.06rem;
  font-weight: 800;
  color: #f8fafc;
}

.sm-spotlight-highlight {
  font-size: 0.86rem;
  color: #e2e8f0;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(9, 18, 33, 0.62);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.sm-spotlight-holders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.pill-gold {
  background: rgba(251, 191, 36, 0.22);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.52);
}

.sm-forms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sm-form-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.sm-subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(9, 13, 24, 0.52);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}

.sm-subtab-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 5px;
  padding: 7px 12px;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sm-subtab-btn:hover {
  color: #e2e8f0;
}

.sm-subtab-btn.active {
  background: linear-gradient(180deg, #25507d, #153152);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px rgba(45, 108, 166, 0.4);
}

.sm-roster-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sm-roster-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sm-roster-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f172a;
  border: 1.5px solid var(--border-strong);
}

.sm-roster-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1040px) {
  .sm-forms-grid {
    grid-template-columns: 1fr;
  }
}
