/* ============================================================
   oBlock — Discord Bot Control Panel
   Theme matched with https://oblock.wtf/
   Deep True-Black #000000, Cosmic Auroras, Glowing Glass Panels,
   Shimmering Text Gradients, and Pill CTA Buttons.
   ============================================================ */

:root {
  --bg: #000000;
  --bg-2: rgba(14, 14, 18, 0.75);
  --surface: rgba(12, 12, 16, 0.85);
  --card: rgba(10, 10, 14, 0.65);
  --card-2: rgba(22, 22, 28, 0.8);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --ok: #4ade80;
  --warn: #f5b93e;
  --danger: #f87171;
  --gold: #e9b949;
  --radius: 18px;
  --radius-sm: 10px;
  --font: 'SF Pro Display', 'Inter', var(--font-sans), system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'IBM Plex Mono', var(--font-mono), ui-monospace, monospace;
  --sidebar-w: 242px;
  --topbar-h: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* ── 1:1 Monochromatic Black & White Cosmic Space from oblock.wtf ── */
.stars-wrapper {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background-color: #000000;
}
.starfield {
  position: absolute; inset: 0;
  background: radial-gradient(55% 45% at 50% 32%, #ffffff0a, transparent 65%),
              radial-gradient(40% 30% at 78% 78%, #ffffff09, transparent 70%);
  pointer-events: none;
}
.hero-beam {
  pointer-events: none;
  filter: blur(18px);
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.06) 50%, transparent);
  width: 16vw;
  animation: 9s ease-in-out 2.2s infinite beam-sweep;
  position: absolute;
  top: -15%; bottom: -15%; left: -20vw;
  transform: rotate(12deg);
}
@keyframes beam-sweep {
  0%, 6% { opacity: 0; transform: translate(0) rotate(12deg); }
  12% { opacity: 1; }
  55% { opacity: 1; transform: translate(130vw) rotate(12deg); }
  62%, 100% { opacity: 0; transform: translate(130vw) rotate(12deg); }
}

.star {
  opacity: 0.12;
  background: #ffffff;
  border-radius: 9999px;
  animation: 5s ease-in-out infinite twinkle;
  position: absolute;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.65);
  will-change: opacity;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.95; }
}

.aurora {
  filter: blur(110px);
  opacity: 0.06;
  pointer-events: none;
  border-radius: 9999px;
  position: absolute;
  will-change: transform;
}
.aurora-a {
  background: radial-gradient(circle, #ffffffe6, transparent 65%);
  width: 62vw; max-width: 920px; height: 62vw; max-height: 920px;
  animation: 46s ease-in-out infinite aurora-drift;
  top: 4%; left: -18%;
}
.aurora-b {
  background: radial-gradient(circle, #ffffffb3, transparent 65%);
  width: 46vw; max-width: 700px; height: 46vw; max-height: 700px;
  animation: 60s ease-in-out 7s infinite reverse aurora-drift;
  bottom: -2%; right: -14%;
}
@keyframes aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6vw, -9vh) scale(1.18); }
  66% { transform: translate(-5vw, 7vh) scale(0.94); }
}

.meteor {
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85));
  border-radius: 9999px;
  height: 1.5px;
  animation: linear infinite meteor-fall;
  position: absolute;
  transform: rotate(-16deg);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  will-change: transform, opacity;
}
@keyframes meteor-fall {
  0%, 5% { opacity: 0; transform: translate(0, 0) rotate(-16deg); }
  9% { opacity: 1; }
  20%, 100% { opacity: 0; transform: translate(72vw, 44vh) rotate(-16deg); }
}

.mote {
  opacity: 0;
  background: #ffffff;
  border-radius: 9999px;
  animation: linear infinite mote-rise;
  position: absolute;
  bottom: -10px;
  will-change: transform, opacity;
}
@keyframes mote-rise {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  10% { opacity: var(--mo, 0.35); }
  65% { opacity: var(--mo, 0.35); }
  100% { transform: translateY(-92vh) translateX(var(--mx, 24px)); opacity: 0; }
}

@keyframes shine-text {
  0% { background-position: 0 0; }
  100% { background-position: 200% 0; }
}

.text-gradient, .page-head h1, .login-title, .tb-page {
  background: linear-gradient(120deg, #ffffff 0%, #f7f7f7 25%, #8a8a94 55%, #ffffff 80%) 0 0 / 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: 6.5s linear infinite shine-text;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background-color: #000000;
  background-attachment: fixed;
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.app, .sidebar, .main, .login-view { position: relative; z-index: 1; }

::selection { background: rgba(255, 255, 255, 0.9); color: #000000; }
a { color: var(--text); text-decoration: none; }
img { display: block; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262c; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #34343c; }
* { scrollbar-color: #26262c transparent; scrollbar-width: thin; }

:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 2px; border-radius: 4px; }

button { font-family: var(--font); }
input, select, textarea { font-family: var(--font); font-size: 16px; }
code, kbd, .mono { font-family: var(--mono); }
b, strong { font-weight: 600; }

.label-mono {
  font-size: 11.5px; font-weight: 500; color: var(--text-faint);
}

.page-enter { animation: none; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Login View (1:1 Monochromatic Black & White Hero from oblock.wtf) ============ */
.login-view {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: transparent !important;
  z-index: 10;
  overflow: hidden;
}

.login-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; text-align: center; width: 100%; max-width: 440px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0;
  animation: hero-fade 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative; z-index: 2;
}

@keyframes hero-fade {
  0% { opacity: 0; transform: translateY(18px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: badge-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
@keyframes badge-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-badge-dot-wrap {
  position: relative; display: flex; width: 8px; height: 8px; align-items: center; justify-content: center;
}
.login-badge-dot-ping {
  position: absolute; inset: 0; border-radius: 50%;
  background: #ffffff; opacity: 0.6;
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.login-badge-dot-core {
  position: relative; width: 7px; height: 7px; border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}
.label-mono {
  text-transform: uppercase; letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.75); font-family: var(--mono);
  font-size: 11px; font-weight: 600;
}

.login-brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: brand-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes brand-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  width: auto; height: 74px; object-fit: contain;
  animation: logo-breathe 5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.35));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-logo:hover {
  transform: scale(1.08) rotate(-1deg);
}
@keyframes logo-breathe {
  0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.25)); }
  50% { transform: translateY(-7px) scale(1.03); filter: drop-shadow(0 0 45px rgba(255, 255, 255, 0.45)); }
  100% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.25)); }
}

.login-title {
  font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  margin: 0;
}
.login-sub {
  color: #a1a1aa; font-size: 14.5px; line-height: 1.55; margin-top: 6px; max-width: 380px;
}

.login-consent {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  width: 100%; max-width: 360px; padding: 14px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: consent-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
@keyframes consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-check {
  display: flex; align-items: center; gap: 11px; font-size: 13px; color: #a1a1aa;
  cursor: pointer; user-select: none; transition: color 0.15s ease;
}
.login-check:hover { color: #ffffff; }
.login-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.login-check-box {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 6px; color: #000;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-check-box svg { opacity: 0; transform: scale(0.6); transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
.login-check.checked .login-check-box {
  background: #ffffff; border-color: #ffffff; color: #000000;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}
.login-check.checked .login-check-box svg { opacity: 1; transform: scale(1); }
.login-check input:focus-visible + .login-check-box { outline: 2px solid #fff; outline-offset: 2px; }
.login-check a {
  color: #ffffff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px; transition: text-decoration-color 0.15s ease;
}
.login-check a:hover { text-decoration-color: #ffffff; }

/* 1:1 Monochromatic Primary Pill Button from oblock.wtf */
.btn-mono-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; padding: 0 26px;
  background-color: #ffffff; color: #000000;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em;
  border-radius: 9999px; border: none; cursor: pointer;
  position: relative; overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-mono-primary:hover:not(.disabled) {
  transform: scale(1.025);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.45);
  color: #000000;
}
.btn-mono-primary:active:not(.disabled) {
  transform: scale(0.98);
}
.btn-mono-primary.disabled {
  opacity: 0.35; cursor: not-allowed; box-shadow: none;
}
.btn-mono-glint {
  position: absolute; top: 0; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-20deg);
  animation: 4.5s ease-in-out infinite glint-sweep;
  pointer-events: none;
}
@keyframes glint-sweep {
  0%, 55% { left: -80%; }
  80%, 100% { left: 175%; }
}

.login-error-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff; font-size: 13px; font-weight: 500;
  backdrop-filter: blur(12px);
  animation: error-shake 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.login-footer {
  margin-top: 4px;
}
.login-back-link {
  font-size: 12.5px; color: #71717a; transition: color 0.2s ease; text-decoration: none;
}
.login-back-link:hover {
  color: #ffffff;
}

/* ============ App Layout & Inside Monochromatic Sidebar ============ */
.app {
  display: flex; min-height: 100vh;
  background-color: transparent !important;
  position: relative; z-index: 1;
}

.sidebar {
  width: 252px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: rgba(8, 8, 10, 0.78);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
  box-shadow: 4px 0 35px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background-color: transparent !important;
  position: relative; z-index: 1;
}

/* Sidebar Brand Header */
.sb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.sb-brand:hover { opacity: 0.9; }
.sb-logo {
  width: 32px; height: 32px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
  transition: transform 0.25s ease;
}
.sb-brand:hover .sb-logo { transform: scale(1.08) rotate(-2deg); }
.sb-brand-name {
  font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #f7f7f7 25%, #8a8a94 55%, #ffffff 80%) 0 0 / 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: 6.5s linear infinite shine-text;
}

/* Sidebar Navigation */
.sb-nav {
  flex: 1; overflow-y: auto; padding: 14px 10px 20px; position: relative;
}
.sb-nav > :not(.nav-ind) { position: relative; }
.sb-nav .nav-sec {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  padding: 18px 12px 6px;
}
.sb-nav .nav-sec:first-child { padding-top: 4px; }

/* Navigation Items (Monochromatic Black & White) */
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px; border-radius: 12px; position: relative;
  color: #a1a1aa; font-weight: 500; font-size: 13.5px;
  cursor: pointer; border: 1px solid transparent; background: transparent;
  width: 100%; text-align: left; text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 2px;
}
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item svg { flex-shrink: 0; opacity: 0.75; transition: all 0.2s ease; }
.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  transform: translateX(3px);
}
.nav-item:hover svg { opacity: 1; transform: scale(1.08); }

.nav-item.active {
  color: #ffffff !important;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
.nav-item.active svg { opacity: 1; color: #ffffff; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3.5px; border-radius: 0 3px 3px 0; background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

.nav-item[data-key="admin"]:not(.active) svg { color: var(--warn); opacity: 0.9; }

.nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: #9ca3af;
  padding: 6px 14px; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07);
  margin: 2px 4px 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nav-back:hover {
  color: #ffffff; background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(-2px);
}

.nav-guild {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: 0 4px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-weight: 600; font-size: 13.5px; color: #ffffff; min-width: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.nav-guild span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-guild img, .nav-guild-fallback { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; }
.nav-guild-fallback { display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border-2); font-size: 11px; }

/* Sidebar Bottom */
.sb-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 10px 14px; display: grid; gap: 9px;
  background: rgba(6, 6, 8, 0.6);
}
.sb-server .cs-trigger {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; font-size: 12.5px; font-weight: 500;
  transition: border-color 0.2s ease;
}
.sb-server .cs-trigger:hover { border-color: rgba(255, 255, 255, 0.2); }
.gd-opt { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.gd-opt .gd-ico { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; object-fit: cover; }
.gd-opt .gd-fallback { display: flex; align-items: center; justify-content: center; background: var(--card-2); border: 1px solid var(--border-2); color: #fff; font-weight: 600; font-size: 10px; }
.gd-opt .gd-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* User Capsule */
.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.sb-user:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}
.sb-user img {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-tag { font-size: 11px; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-dim); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: #ffffff;
  transform: scale(1.08);
}
.icon-btn.is-spinning svg { animation: spin 0.65s var(--ease); }

/* ============ Topbar ============ */
.topbar {
  height: 60px; flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 6, 9, 0.78);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  position: sticky; top: 0; z-index: 30;
}
.tb-page {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: baseline; gap: 8px;
}
.tb-page-sub { font-size: 12px; color: var(--text-faint); font-weight: 400; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sb-toggle { display: none; }
.bot-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #ffffff; font-weight: 500;
  height: 32px; padding: 0 14px; border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.bot-status .bs-ms { color: var(--text-faint); margin-left: 2px; }
.bot-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok), 0 0 20px var(--ok);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
.bot-status.offline { color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.bot-status.offline .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* ============ Content ============ */
.content { padding: 32px 36px 64px; max-width: 1320px; width: 100%; position: relative; }

.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); color: #ffffff;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.page-head > img { border-radius: 12px !important; width: 44px !important; height: 44px !important; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: #fff; }
.page-head p { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.page-head .spacer { flex: 1; }

/* ============ Cards & grids ============ */
.card {
  background: rgba(12, 12, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.card-title {
  font-size: 15px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.card-title svg { color: var(--text-faint); flex-shrink: 0; }
.card-title .muted { font-weight: 400; color: var(--text-faint); }
.card-desc { color: var(--text-dim); font-size: 13px; margin: -4px 0 16px; line-height: 1.55; }
.card-head-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.card-head-row > div:first-child { flex: 1; min-width: 0; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.grid + .grid, .grid + .card, .card + .card, .card + .grid { margin-top: 16px; }
.grid > .card, .grid > .grid, .grid > div { margin-top: 0; }

/* Stat Grid */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0; margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px;
  background: rgba(12, 12, 16, 0.65);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.stat {
  padding: 20px 22px; position: relative; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(255, 255, 255, 0.035); }
.stat-icon { position: absolute; top: 18px; right: 20px; color: var(--text-faint); display: flex; transition: transform 0.2s ease; }
.stat:hover .stat-icon { transform: translateY(-2px) scale(1.1); color: #ffffff; }
.stat-value {
  order: 2; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  font-variant-numeric: tabular-nums; color: #fff; margin-top: 8px;
}
.stat-label { order: 1; color: var(--text-dim); font-size: 13px; font-weight: 500; padding-right: 24px; }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr 1fr !important; } }

/* Server Picker Cards */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.server-card {
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(12, 12, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 22px; cursor: pointer; position: relative;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.server-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(18, 18, 24, 0.78);
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.server-card-dim { opacity: 0.65; }
.server-card-dim:hover { opacity: 1; }
.server-card-head { display: flex; align-items: center; gap: 14px; }
.server-card-head img, .server-avatar-fallback { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.server-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--card-2); border: 1px solid var(--border-2); color: #fff; font-weight: 600; font-size: 15px; }
.server-card-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.server-card-meta { color: var(--text-faint); font-size: 12.5px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.server-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.server-card-foot .badge { margin-right: auto; }

/* ============ Forms ============ */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-dim); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 11px; border-radius: 7px;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text);
  font-size: 13px; outline: none; transition: border-color 0.1s ease, box-shadow 0.1s ease;
}
.textarea { height: auto; padding: 9px 11px; }
.input:hover, .select:hover, .textarea:hover { border-color: #3a3a42; }
.input:focus, .select:focus, .textarea:focus { border-color: #6b6b75; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
/* Every textarea is a fixed box: `resize: both` let one drag push it out of
   its card. Long text scrolls instead. */
textarea { resize: none; max-width: 100%; line-height: 1.55; }
.textarea { min-height: 86px; }
#tpDesc { height: 96px; min-height: 96px; }
.select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3ad' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.input::placeholder, .textarea::placeholder { color: #55555e; }
input[type="color"].input { padding: 3px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.check-row + .check-row { border-top: 1px solid var(--border); }
.check-row .check-line { flex: 1; display: flex; align-items: center; gap: 10px; }
.check-row .check-line > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.check-row .check-line svg { color: var(--text-faint); flex-shrink: 0; }
.check-row .check-line label { font-size: 13px; color: var(--text); cursor: pointer; }
.check-row .check-sub { font-size: 12px; color: var(--text-faint); }
.check-row .switch { margin-left: auto; }

/* Switch */
.switch { position: relative; width: 34px; height: 20px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #2a2a30; transition: background 0.14s ease; }
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #a3a3ad; transition: transform 0.16s var(--ease), background 0.14s ease;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid #fff; outline-offset: 2px; }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 12px; font-weight: 500;
  color: var(--text-faint); padding: 9px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.td-user { display: flex; align-items: center; gap: 9px; }
.td-user img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.td-user .nm { font-weight: 500; white-space: nowrap; }
.td-user .sn { color: var(--text-faint); font-size: 11.5px; }

/* ============ Tabs ============ */
.ktabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.ktab {
  padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--text-dim);
  border: none; background: none; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.1s ease, border-color 0.1s ease;
}
.ktab:hover { color: var(--text); }
.ktab.active { color: #fff; border-bottom-color: #fff; }

/* ============ Badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500;
  height: 22px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border-2); color: var(--text-dim); white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.25); background: rgba(74, 222, 128, 0.07); }
.badge.warn { color: var(--warn); border-color: rgba(245, 185, 62, 0.25); background: rgba(245, 185, 62, 0.07); }
.badge.danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.07); }
.badge.accent { color: var(--text); border-color: var(--border-2); background: var(--accent-soft); }

/* ============ Server picker ============ */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.server-card {
  display: flex; flex-direction: column; gap: 14px;
  background: rgba(12, 12, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 18px; cursor: pointer; position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.server-card:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(18, 18, 24, 0.75); transform: translateY(-3px) scale(1.01); box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.server-card-dim { opacity: 0.6; }
.server-card-dim:hover { opacity: 1; }
.server-card-head { display: flex; align-items: center; gap: 12px; }
.server-card-head img, .server-avatar-fallback { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.server-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--card-2); border: 1px solid var(--border-2); color: #fff; font-weight: 600; font-size: 14px; }
.server-card-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.server-card-meta { color: var(--text-faint); font-size: 12px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.server-card-foot { display: flex; align-items: center; gap: 8px; }
.server-card-foot .badge { margin-right: auto; }

/* ============ Empty / loading / error ============ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 20px; text-align: center; color: var(--text-faint); }
.empty-state svg { opacity: 0.4; }
.empty-state .t { color: var(--text); font-weight: 600; font-size: 14px; }
.empty-state .s { font-size: 13px; max-width: 380px; line-height: 1.55; color: var(--text-dim); }

.skeleton { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent);
  transform: translateX(-100%); animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.loading-line { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--text-faint); font-size: 13px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--text-dim); animation: spin 0.7s linear infinite; }

.error-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 76px 20px; text-align: center; }
.error-state .t { color: var(--text); font-weight: 600; font-size: 15px; }
.error-state .s { color: var(--text-dim); font-size: 13px; max-width: 420px; }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.12s ease;
}
.modal {
  width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 12px; padding: 20px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
  animation: pop-in 0.16s var(--ease);
}
.modal-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.modal-head h3 { font-size: 15px; font-weight: 600; color: #fff; }
.modal-head svg { color: var(--text-dim); }
.modal-close { margin-left: auto; }
.modal-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; line-height: 1.55; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }

/* ============ Toasts ============ */
.toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 9px;
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.7);
  animation: pop-in 0.16s var(--ease);
}
.toast svg { flex-shrink: 0; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.toast.info svg { color: #fff; }
.toast.out { opacity: 0; transform: translateY(4px); transition: all 0.16s ease; }

/* ============ Charts ============ */
.chart-box { position: relative; width: 100%; height: 220px; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); margin-top: 8px; flex-wrap: wrap; }
.chart-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 8px; height: 8px; border-radius: 2px; }

/* ============ Misc ============ */
.muted { color: var(--text-faint); }
.dim { color: var(--text-dim); }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-x { display: flex; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.search-box { position: relative; max-width: 320px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-box .input { padding-left: 32px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; height: 24px; padding: 0 9px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card-2); color: var(--text-dim); font-weight: 500;
}
.chip svg { color: var(--text-faint); }
.chip.chip-on { border-color: rgba(233, 185, 73, 0.45); color: var(--gold); }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ============ Settings ============ */
.set-card { display: flex; flex-direction: column; }
.set-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.usr-block { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #000; font-weight: 700; font-size: 22px; }
.set-color { padding: 3px; height: 34px; width: 56px; cursor: pointer; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; width: fit-content; max-width: 100%; background: var(--bg-2); }
.seg-btn {
  height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.1s ease, color 0.1s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--card-2); color: #fff; box-shadow: inset 0 0 0 1px var(--border-2); }

.set-swatches { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.set-swatch { width: 24px; height: 24px; border-radius: 6px; cursor: pointer; padding: 0; border: 1px solid rgba(255, 255, 255, 0.15); }
.set-swatch.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px #fff; }
.set-swatches .set-color { width: 44px; height: 24px; padding: 2px; border-radius: 6px; }
.set-preview { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); }
.set-preview img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.set-preview-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-preview-tag { font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-opt { align-items: flex-start; }
.set-opt .check-line > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; }
.set-opt .check-sub { display: block; }

/* ============ Ticket / embed editor ============ */
.embed-prev { border: 1px solid var(--border); border-left: 3px solid #5865f2; background: #2b2d31; border-radius: 6px; padding: 12px 14px; overflow: hidden; }
.embed-prev .e-img { height: 90px; background-size: cover; background-position: center; margin: -12px -14px 12px; }
.embed-prev .e-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; color: #fff; }
.embed-prev .e-desc { font-size: 13.5px; line-height: 1.5; color: #dbdee1; margin-bottom: 10px; word-break: break-word; }
.embed-prev .e-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.embed-prev .e-footer { font-size: 11.5px; color: #949ba4; }
.btn-prev { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; height: 30px; padding: 0 14px; border-radius: 4px; color: #fff; }
.btn-prev.secondary { background: #4e5058; }
.btn-prev.primary { background: #5865f2; }
.btn-prev.success { background: #248046; }
.btn-prev.danger { background: #da373c; }
.tk-btn { padding: 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); }
.tk-btn .field { margin-bottom: 9px; }
.tk-q { margin: 8px 0; padding: 10px 11px; border-radius: 7px; background: var(--bg-2); border: 1px dashed var(--border-2); }

/* ============ Custom select ============ */
.cs { position: relative; width: 100%; }
.cs-native { display: none !important; }
.cs-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text);
  border-radius: 7px; height: 34px; padding: 0 11px;
  font: inherit; font-size: 13px; cursor: pointer; text-align: left;
  transition: border-color 0.1s ease;
}
.cs-trigger:hover { border-color: #3a3a42; }
.cs-trigger:focus-visible { outline: none; border-color: #6b6b75; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.cs-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-caret { width: 7px; height: 7px; flex-shrink: 0; border-right: 1.6px solid var(--text-faint); border-bottom: 1.6px solid var(--text-faint); transform: translateY(-2px) rotate(45deg); }
.cs-pop {
  display: none; position: absolute; z-index: 60;
  top: calc(100% + 4px); left: 0; right: 0; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 9px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.75); padding: 4px;
  animation: pop-in 0.12s var(--ease);
}
.cs-pop.open { display: block; }
.cs-pop.up { top: auto; bottom: calc(100% + 4px); }
.cs-search input { width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; height: 30px; padding: 0 9px; font: inherit; font-size: 13px; }
.cs-search input:focus { outline: none; border-color: var(--border-2); }
.cs-list { max-height: 240px; overflow-y: auto; margin-top: 4px; }
.cs-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 30px; padding: 0 9px; border-radius: 5px; cursor: pointer;
  font-size: 13px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.cs-item.sel { color: var(--text); font-weight: 500; }
.cs-item.sel::after { content: ''; width: 8px; height: 4px; flex-shrink: 0; border-left: 1.6px solid var(--text); border-bottom: 1.6px solid var(--text); transform: rotate(-45deg) translate(1px, -1px); }
.cs-empty { color: var(--text-faint); font-size: 12.5px; padding: 8px 9px; }

/* ============ Maintenance gate ============ */
.mnt-view {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--bg);
  animation: fadeIn 0.2s ease both;
}
.mnt-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; width: 100%; max-width: 420px; }
.mnt-orb { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.mnt-logo { width: auto; height: 40px; object-fit: contain; animation: float 5.5s ease-in-out infinite; }
.mnt-ring { position: absolute; inset: 4px; border-radius: 50%; border: 1.5px solid var(--border); border-top-color: var(--warn); animation: spin 2.4s linear infinite; }
.mnt-ring-2 { inset: 18px; border-top-color: transparent; border-left-color: rgba(255, 255, 255, 0.35); animation: spin 1.8s linear infinite reverse; }
.mnt-over .mnt-ring { border-top-color: var(--ok); }
.mnt-pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 6px; background: rgba(245, 185, 62, 0.08); border: 1px solid rgba(245, 185, 62, 0.25); color: var(--warn); font-size: 12px; font-weight: 500; }
.mnt-over .mnt-pill { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.25); color: var(--ok); }
.mnt-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mnt-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: #fff; line-height: 1.25; }
.mnt-msg { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; max-width: 400px; }
.mnt-meter { width: 100%; margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.mnt-bar { position: relative; height: 4px; border-radius: 999px; overflow: hidden; background: var(--border); }
.mnt-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--warn); transition: width 0.9s var(--ease); }
.mnt-bar-idle > span { width: 34%; background: var(--text-dim); animation: mnt-sweep 1.6s ease-in-out infinite; }
@keyframes mnt-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
.mnt-meter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-faint); }
.mnt-meter-row svg { vertical-align: -2px; }
.mnt-eta { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mnt-eta b { color: #fff; font-family: var(--mono); font-weight: 500; }
.mnt-foot { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.mnt-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-faint); }
.mnt-banner {
  position: fixed; z-index: 150; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100vw - 32px));
  padding: 7px 8px 7px 14px; border-radius: 9px;
  background: var(--surface); border: 1px solid rgba(245, 185, 62, 0.35);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.7);
  font-size: 13px; color: var(--text); white-space: nowrap;
}
.mnt-banner .mnt-dot { color: var(--warn); }
.mnt-banner-txt { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .mnt-title { font-size: 20px; }
  .mnt-banner { white-space: normal; }
  .mnt-banner-txt { display: none; }
}
.mnt-admin-hero { border-color: rgba(74, 222, 128, 0.2); }
.mnt-admin-hero.on { border-color: rgba(245, 185, 62, 0.3); }
.mnt-admin-head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.mnt-admin-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.25); color: var(--ok); }
.mnt-admin-icon.on { background: rgba(245, 185, 62, 0.08); border-color: rgba(245, 185, 62, 0.28); color: var(--warn); }
.mnt-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.mnt-preview { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 20px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--border-2); background: var(--bg-2); }
.mnt-preview .mnt-bar { width: 100%; margin-top: 4px; }
.mnt-preview .mnt-meter-row { width: 100%; }
.mnt-preview-title { font-size: 16px; font-weight: 600; color: #fff; line-height: 1.3; }
.mnt-preview-msg { font-size: 13px; color: var(--text-dim); line-height: 1.6; white-space: pre-wrap; }

/* ============ Premium ============ */
/* Sidebar entry: a quiet outlined row, not a flashing gold button. */
.sb-premium {
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 11px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--gold); text-decoration: none;
  background: rgba(233, 185, 73, 0.06); border: 1px solid rgba(233, 185, 73, 0.25);
  transition: background 0.1s ease, border-color 0.1s ease;
}
.sb-premium:hover { background: rgba(233, 185, 73, 0.11); border-color: rgba(233, 185, 73, 0.4); }
.sb-premium.here { border-color: rgba(233, 185, 73, 0.55); }
.sb-premium svg { flex-shrink: 0; }
.sb-premium-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-premium { position: relative; overflow: hidden; }
.sb-premium-shine {
  position: absolute; inset: 0; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 220, 140, 0.35), transparent);
  transform: translateX(-140%) skewX(-18deg);
}
.sb-premium:hover .sb-premium-shine { transform: translateX(330%) skewX(-18deg); transition: transform 0.85s var(--ease); }
.sb-premium.is-on { background: transparent; border-color: var(--border); color: var(--text-dim); }
.sb-premium.is-on svg:first-child { color: var(--gold); }
.sb-premium.is-on:hover { background: rgba(255, 255, 255, 0.04); }
.sb-premium.is-idle { background: transparent; border-color: var(--border); color: var(--text-faint); cursor: default; }

.nav-item-premium svg { color: var(--gold); }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-left: auto; }

.pm-head-icon { background: rgba(233, 185, 73, 0.08) !important; border-color: rgba(233, 185, 73, 0.3) !important; color: var(--gold); }
.pm-hero { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(233, 185, 73, 0.25); background: var(--card); padding: 24px; }
.pm-hero.on { border-color: rgba(74, 222, 128, 0.25); }
.pm-hero-glow {
  position: absolute; top: -140px; right: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 185, 73, 0.18), transparent 66%);
  pointer-events: none; animation: breathe 7s ease-in-out infinite;
}
.pm-hero.on .pm-hero-glow { background: radial-gradient(circle, rgba(74, 222, 128, 0.16), transparent 66%); }
.pm-hero-body { position: relative; max-width: 620px; }
.pm-hero-body h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.pm-hero-body p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.pm-crown { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(233, 185, 73, 0.08); border: 1px solid rgba(233, 185, 73, 0.3); color: var(--gold); }
.pm-hero.on .pm-crown { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); color: var(--ok); }
.pm-hero-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pm-price { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 12px 14px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); }
.pm-price-tag { display: flex; align-items: baseline; gap: 3px; color: #fff; }
.pm-price-tag b { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pm-price-tag span { font-size: 12px; color: var(--text-faint); }
.pm-price-txt { min-width: 0; }
.pm-price-txt b { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.pm-price-txt p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.pm-paypal {
  display: flex; align-items: center; gap: 11px; width: 100%;
  height: 44px; padding: 0 16px; border-radius: 8px; text-decoration: none;
  background: #0070ba; border: 1px solid #0070ba; color: #fff; font-size: 14px; font-weight: 500;
  transition: background 0.1s ease;
}
.pm-paypal:hover { background: #0063a5; }
.pm-paypal-txt { flex: 1; min-width: 0; }
.pm-paypal-txt b { font-weight: 600; }
.pm-paypal { position: relative; overflow: hidden; }
.pm-paypal-shine {
  position: absolute; inset: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-140%) skewX(-18deg); animation: sweep 4s ease-in-out 1.2s infinite;
}
.pm-paypal-off { background: var(--card-2); border-color: var(--border); color: var(--text-faint); cursor: not-allowed; }
.pm-paypal-off:hover { background: var(--card-2); }
.pm-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.pm-note svg { flex-shrink: 0; margin-top: 2px; color: var(--text-faint); }
.pm-note b { color: var(--text); }
.pm-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 4px 0 0; }
.pm-steps li { display: flex; gap: 11px; }
.pm-steps b { font-size: 13px; color: var(--text); }
.pm-steps p { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin-top: 2px; }
.pm-step-n { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--border-2); color: var(--text); font-variant-numeric: tabular-nums; }
.pm-id { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.pm-id code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text); padding: 5px 9px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); }
.pm-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 4px; }
.pm-perk { display: flex; gap: 11px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); }
.pm-perk b { font-size: 13px; color: var(--text); }
.pm-perk p { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin-top: 2px; }
.pm-perk-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; background: rgba(233, 185, 73, 0.08); border: 1px solid rgba(233, 185, 73, 0.22); color: var(--gold); }
.pm-table td, .pm-table th { vertical-align: middle; }
.pm-table th svg { vertical-align: -2px; color: var(--gold); }
.pm-td-on { color: var(--text); }
.pm-td-on svg { color: var(--ok); }

/* ============ Preferences ============ */
html[data-opts~="no-anim"] *, html[data-opts~="no-anim"] *::before, html[data-opts~="no-anim"] *::after {
  animation-duration: 0.001s !important; animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
html[data-opts~="no-star"] .stars { display: none; }
html[data-opts~="compact"] .content { padding: 20px 24px 48px; }
html[data-opts~="compact"] .card { padding: 14px 16px; }
html[data-opts~="compact"] .stat { padding: 12px 14px; }
html[data-opts~="compact"] .page-head { margin-bottom: 18px; }
html[data-opts~="compact"] .nav-item {
  border-radius: 9999px; height: 30px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 16px 0 48px rgba(0, 0, 0, 0.6); }
  .sb-toggle { display: inline-flex; }
  .content, html[data-opts~="compact"] .content { padding: 18px 16px 48px; }
  .topbar { padding: 0 12px; }
  .bot-status .bs-ms { display: none; }
  .sb-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 35; animation: fadeIn 0.12s ease; }
}


/* ============================================================
   Motion
   Everything below animates transform or opacity only, so it runs
   on the compositor: no layout, no repaint, no JavaScript loop.
   ============================================================ */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sweep { 0% { transform: translateX(-140%) skewX(-18deg); } 60%, 100% { transform: translateX(330%) skewX(-18deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-1.5vw, -2.5vh, 0); } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes meteor {
  0% { transform: translate3d(0, 0, 0) rotate(-35deg); opacity: 0; }
  2% { opacity: 1; }
  9% { transform: translate3d(-42vw, 30vw, 0) rotate(-35deg); opacity: 0; }
  100% { transform: translate3d(-42vw, 30vw, 0) rotate(-35deg); opacity: 0; }
}

/* ── starfield ── */
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; }
.stars-l { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; will-change: opacity, transform; }
.stars-l.s1 { animation: twinkle 7s ease-in-out infinite, drift 90s ease-in-out infinite alternate; }
.stars-l.s2 { animation: twinkle 4.6s ease-in-out 1.3s infinite, drift 70s ease-in-out -20s infinite alternate; }
.stars-l.s3 { animation: twinkle 3.2s ease-in-out 0.6s infinite, drift 55s ease-in-out -10s infinite alternate; }
.meteor {
  position: absolute; width: 140px; height: 1.5px; border-radius: 9999px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), transparent);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  will-change: transform, opacity;
}
.meteor.m1 { top: 8vh; left: 85vw; animation: meteor 9s linear 1s infinite; }
.meteor.m2 { top: 22vh; left: 95vw; animation: meteor 13s linear 4s infinite; }
.meteor.m3 { top: 4vh; left: 70vw; animation: meteor 11s linear 8s infinite; }
.meteor.m4 { top: 15vh; left: 90vw; animation: meteor 15s linear 12s infinite; }

/* ── page enter: replayed on every route/section change ── */
.content.enter > *,
.content.enter .stat-grid > .stat,
.content.enter .grid > *,
.content.enter .server-grid > *,
.content.enter .pm-perks > * { animation: rise 0.34s var(--ease) both; }
.content.enter > *:nth-child(2) { animation-delay: 40ms; }
.content.enter > *:nth-child(3) { animation-delay: 80ms; }
.content.enter > *:nth-child(4) { animation-delay: 120ms; }
.content.enter > *:nth-child(n+5) { animation-delay: 150ms; }
.content.enter .stat-grid > .stat:nth-child(2), .content.enter .grid > *:nth-child(2), .content.enter .server-grid > *:nth-child(2), .content.enter .pm-perks > *:nth-child(2) { animation-delay: 70ms; }
.content.enter .stat-grid > .stat:nth-child(3), .content.enter .grid > *:nth-child(3), .content.enter .server-grid > *:nth-child(3), .content.enter .pm-perks > *:nth-child(3) { animation-delay: 110ms; }
.content.enter .stat-grid > .stat:nth-child(4), .content.enter .grid > *:nth-child(4), .content.enter .server-grid > *:nth-child(4), .content.enter .pm-perks > *:nth-child(4) { animation-delay: 150ms; }
.content.enter .stat-grid > .stat:nth-child(n+5), .content.enter .grid > *:nth-child(n+5), .content.enter .server-grid > *:nth-child(n+5), .content.enter .pm-perks > *:nth-child(n+5) { animation-delay: 190ms; }
.content.enter .server-grid > *:nth-child(n+9) { animation-delay: 230ms; }

/* ── sliding menu highlight ── */
.nav-ind {
  display: none !important;
  position: absolute; left: 8px; right: 8px; top: 0; border-radius: 6px; pointer-events: none;
  background: rgba(255, 255, 255, 0.075); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0; transition: transform 0.28s var(--ease), height 0.28s var(--ease), opacity 0.15s ease;
}
.nav-ind::before { content: ''; position: absolute; left: 0; top: 28%; bottom: 28%; width: 2px; border-radius: 2px; background: #fff; }
.nav-ind.on { opacity: 1; }
.nav-ind.jump { transition: opacity 0.15s ease; }
.nav-item svg { transition: transform 0.18s var(--ease), opacity 0.1s ease; }
.nav-item:hover svg { transform: translateX(1px) scale(1.08); opacity: 1; }

/* ── hover life ── */
.card { transition: border-color 0.15s ease; }
.card:hover { border-color: #2c2c33; }
.stat { transition: background 0.15s ease; }
.stat:hover { background: rgba(255, 255, 255, 0.02); }
.stat-icon { transition: transform 0.25s var(--ease), color 0.15s ease; }
.stat:hover .stat-icon { transform: translateY(-2px) rotate(-6deg); color: var(--text-dim); }
.server-card { transition: border-color 0.15s ease, background 0.15s ease, transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.server-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03); }
.server-card-head img { transition: transform 0.25s var(--ease); }
.server-card:hover .server-card-head img { transform: scale(1.06) rotate(-2deg); }
.pm-perk { transition: border-color 0.15s ease, transform 0.2s var(--ease); }
.pm-perk:hover { border-color: rgba(233, 185, 73, 0.3); transform: translateY(-2px); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn { transition: background 0.1s ease, color 0.1s ease, transform 0.12s var(--ease); }
.switch .track::after { transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.14s ease; }
.ktab { position: relative; }

/* ── live status ── */
.bot-status .dot { position: relative; }
.bot-status.online .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* ── login ── */
.login-inner > * { animation: rise 0.5s var(--ease) both; }
.login-inner > *:nth-child(2) { animation-delay: 80ms; }
.login-inner > *:nth-child(3) { animation-delay: 160ms; }
.login-inner > *:nth-child(4) { animation-delay: 240ms; }
.login-inner > *:nth-child(5) { animation-delay: 320ms; }
.login-logo { animation: rise 0.5s var(--ease) both, float 5.5s ease-in-out 0.8s infinite !important; }

/* ── dialogs & toasts get a little spring ── */
.modal { animation: pop-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1); }
.toast { animation: pop-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1); }

/* ── Shield (anti-raid / anti-bot / anti-swear) ── */
.sh-raid { --tone: #f87171; --tone-rgb: 248, 113, 113; }
.sh-bot { --tone: #7aa2ff; --tone-rgb: 122, 162, 255; }
.sh-swear { --tone: #f5b93e; --tone-rgb: 245, 185, 62; }

.sh-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .sh-mods { grid-template-columns: 1fr; } }
.sh-mod {
  position: relative; overflow: hidden; cursor: pointer;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.sh-mod::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--tone-rgb), 0.22), transparent 70%); opacity: 0; transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.sh-mod:hover { transform: translateY(-2px); border-color: var(--border-2); }
.sh-mod.on { border-color: rgba(var(--tone-rgb), 0.35); box-shadow: 0 0 0 1px rgba(var(--tone-rgb), 0.08), 0 10px 30px -18px rgba(var(--tone-rgb), 0.6); }
.sh-mod.on::before { opacity: 1; }
.sh-mod-top { display: flex; align-items: center; gap: 10px; position: relative; }
.sh-mod-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-dim); background: var(--accent-soft); border: 1px solid var(--border); transition: color 0.2s, background 0.2s; }
.sh-mod.on .sh-mod-icon { color: var(--tone); background: rgba(var(--tone-rgb), 0.1); border-color: rgba(var(--tone-rgb), 0.3); }
.sh-mod-name { font-weight: 650; font-size: 14.5px; flex: 1; }
.sh-mod-blurb { color: var(--text-dim); font-size: 12.5px; margin: 10px 0 14px; min-height: 38px; position: relative; }
.sh-mod-foot { display: flex; align-items: baseline; gap: 6px; position: relative; font-size: 12px; }
.sh-mod-count { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sh-mod.on .sh-mod-count { color: var(--tone); }
.sh-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); align-self: center; }
.sh-dot.on { background: var(--tone); box-shadow: 0 0 0 0 rgba(var(--tone-rgb), 0.6); animation: sh-ping 2.2s ease-out infinite; }
@keyframes sh-ping { 0% { box-shadow: 0 0 0 0 rgba(var(--tone-rgb), 0.55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(var(--tone-rgb), 0); } }

.card.sh-raid { position: relative; overflow: hidden; border-color: rgba(248, 113, 113, 0.45); background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), var(--card) 60%); }
.sh-raid-pulse { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.5); animation: sh-alarm 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes sh-alarm { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
.sh-raid-stats { display: flex; gap: 28px; margin-top: 8px; flex-wrap: wrap; }
.sh-raid-stats div { display: flex; flex-direction: column; }
.sh-raid-stats b { font-size: 24px; color: var(--danger); font-variant-numeric: tabular-nums; }
.sh-raid-stats span { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.sh-perms { border-color: rgba(245, 185, 62, 0.3); }

.sh-feed { display: flex; flex-direction: column; max-height: 460px; overflow: auto; margin: 0 -4px; }
.sh-feed-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.sh-feed-row:last-child { border-bottom: 0; }
.sh-feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--tone); box-shadow: 0 0 10px rgba(var(--tone-rgb), 0.7); }
.sh-feed-main { flex: 1; min-width: 0; }
.sh-feed-main .badge { margin-left: 4px; font-size: 10.5px; }
.sh-feed-detail { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-feed-time { font-size: 11.5px; white-space: nowrap; }

.sh-strikes { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 4px; }
.sh-strikes i { width: 5px; height: 12px; border-radius: 2px; background: var(--warn); opacity: 0.85; }

.sh-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 12px; color: var(--text-dim); font-size: 13px; }
.input.sh-num { width: 74px; text-align: center; font-variant-numeric: tabular-nums; }
.sh-range { padding: 0 !important; accent-color: #7aa2ff; }
.sh-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.sh-captcha-demo {
  display: flex; justify-content: center; gap: 14px; padding: 14px; margin: 4px 0 12px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0d0f14, #1a1f2b); border: 1px solid var(--border);
  font-weight: 800; font-size: 28px; letter-spacing: 0.02em; user-select: none;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 9px), linear-gradient(135deg, #0d0f14, #1a1f2b);
}
.sh-captcha-demo span { display: inline-block; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }

.sh-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sh-preset {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: transparent; color: var(--text-dim); font: inherit; font-size: 12.5px;
  transition: all 0.15s var(--ease);
}
.sh-preset:hover { color: var(--text); border-color: var(--text-faint); }
.sh-preset.on { color: #f5b93e; border-color: rgba(245, 185, 62, 0.45); background: rgba(245, 185, 62, 0.08); }
.sh-preset.slur.on { color: #f87171; border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.08); }

.sh-tester textarea { min-height: 90px; }
.sh-test-out { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; animation: rise 0.25s var(--ease) both; }
.sh-verdict { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: var(--radius-sm); align-self: flex-start; }
.sh-verdict.good { color: var(--ok); background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.25); }
.sh-verdict.bad { color: var(--danger); background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.25); }
.sh-censored { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }

.sh-ladder { display: flex; flex-direction: column; gap: 8px; }
.sh-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); color: var(--text-dim); font-size: 13px; }
.sh-step-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text); background: var(--accent-soft); border: 1px solid var(--border-2); }
.sh-step .icon-btn { margin-left: auto; }

.card.sh-savebar { position: sticky; bottom: 12px; z-index: 5; padding: 12px 16px; backdrop-filter: blur(10px); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.card.sh-savebar.dirty { border-color: rgba(245, 185, 62, 0.45); box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.8); }

@media (prefers-reduced-motion: reduce) {
  .sh-dot.on, .sh-raid-pulse { animation: none; }
}

/* ---- Verification ---------------------------------------------------- */
.vf-hint { font-size: 11.5px; margin-top: 6px; line-height: 1.5; }
.vf-steps { display: flex; flex-direction: column; }
.vf-step { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.vf-step:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--border); border-radius: 2px; }
.vf-step.done:not(:last-child)::before { background: linear-gradient(var(--ok), var(--border)); }
.vf-step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--border-2); color: var(--text-dim); transition: all .25s var(--ease); }
.vf-step.done .vf-step-dot { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.4); color: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.06); }
.vf-step-body { min-width: 0; }
.vf-step-title { font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.vf-step .check-row { padding-top: 0; }
.vf-ready { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ok); padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(74, 222, 128, 0.06); border: 1px solid rgba(74, 222, 128, 0.2); }

.vf-modes { display: flex; flex-direction: column; gap: 8px; }
.vf-mode { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.vf-mode:hover { border-color: var(--border-2); }
.vf-mode:active { transform: scale(0.99); }
.vf-mode.active { border-color: rgba(255, 255, 255, 0.35); background: var(--card-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.vf-mode-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border-2); }
.vf-mode.active .vf-mode-icon { background: #fff; color: #000; border-color: #fff; }
.vf-mode-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.vf-mode-body .muted { font-size: 11.5px; line-height: 1.45; }
.vf-bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.vf-bars i { width: 4px; border-radius: 2px; background: var(--border-2); }
.vf-bars i:nth-child(1) { height: 6px; } .vf-bars i:nth-child(2) { height: 11px; } .vf-bars i:nth-child(3) { height: 16px; }
.vf-bars i.on { background: var(--ok); }

.vf-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.vf-role { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 13px; font-size: 12.5px; background: var(--card-2); border: 1px solid var(--border-2); }
.vf-role i { width: 9px; height: 9px; border-radius: 50%; }
.vf-role button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: transparent; border: 0; color: var(--text-faint); cursor: pointer; }
.vf-role button:hover { background: var(--border-2); color: var(--text); }
.vf-role.warn { border-color: rgba(245, 185, 62, 0.4); }
.vf-role.bad { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.07); }
.vf-problems { display: flex; flex-direction: column; gap: 6px; }
.vf-problem { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 8px 10px; border-radius: var(--radius-sm); line-height: 1.45; }
.vf-problem svg { flex-shrink: 0; margin-top: 2px; }
.vf-problem.error { color: var(--warn); background: rgba(245, 185, 62, 0.06); border: 1px solid rgba(245, 185, 62, 0.2); }
.vf-problem.block { color: var(--danger); background: rgba(248, 113, 113, 0.06); border: 1px solid rgba(248, 113, 113, 0.22); }

.vf-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.vf-preset { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; cursor: pointer; transition: border-color .2s var(--ease), transform .15s var(--ease); }
.vf-preset:hover { border-color: var(--border-2); }
.vf-preset:active { transform: scale(0.97); }
.vf-swatch { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.vf-chip { cursor: pointer; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); }
.vf-chip:hover { border-color: var(--border-2); }
.vf-styles { display: flex; gap: 6px; height: 36px; align-items: center; }
.vf-style { width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; transition: transform .15s var(--ease); }
.vf-style:hover { transform: scale(1.08); }
.vf-style.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15); }
.vf-style.primary { background: #5865f2; } .vf-style.success { background: #248046; } .vf-style.secondary { background: #4e5058; } .vf-style.danger { background: #da373c; }
.vf-designer { align-items: start; }
.vf-sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }
.vf-mini-seg { padding: 2px; }
.vf-mini-seg .seg-btn { height: 26px; font-size: 12px; padding: 0 10px; }
.vf-savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px 10px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); font-size: 13px; animation: vf-up .3s var(--ease); }
.vf-savebar > span { display: inline-flex; align-items: center; gap: 8px; color: var(--warn); }
@keyframes vf-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vf-savebar { animation: none; } }

.vf-score { display: flex; align-items: center; gap: 16px; }
.vf-score-ring { --p: 50; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--border) 0); position: relative; }
.vf-score-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--card-2); }
.vf-score-ring span { position: relative; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.vf-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

/* Discord look-alike */
.vf-discord { background: #313338; border-radius: 8px; padding: 14px 16px 16px; color: #dbdee1; font-size: 14px; line-height: 1.375; overflow: hidden; }
.vf-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vf-msg-head b { color: #fff; font-weight: 500; font-size: 15px; }
.vf-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #000; color: #fff; margin-right: 4px; }
.vf-tag { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; }
.vf-time { font-size: 12px; color: #949ba4; }
.vf-embed { margin-left: 48px; max-width: 520px; background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px; padding: 12px 16px 14px 12px; margin-top: 4px; transition: border-color .2s var(--ease); }
.vf-banner { padding: 8px; }
.vf-banner img { display: block; width: 100%; border-radius: 4px; max-height: 220px; object-fit: cover; }
.vf-embed-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.vf-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }
.vf-image { display: block; width: 100%; border-radius: 4px; margin-top: 14px; max-height: 300px; object-fit: cover; }
.vf-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.vf-author img, .vf-e-footer img { width: 24px; height: 24px; border-radius: 50%; }
.vf-e-footer img { width: 20px; height: 20px; }
.vf-e-title { font-weight: 600; font-size: 16px; color: #fff; margin-bottom: 8px; word-break: break-word; }
.vf-e-desc { font-size: 14px; color: #dbdee1; word-break: break-word; }
.vf-e-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #b5bac1; }
.vf-h1 { font-size: 22px; font-weight: 700; color: #fff; margin: 4px 0; }
.vf-h2 { font-size: 19px; font-weight: 700; color: #fff; margin: 4px 0; }
.vf-h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 4px 0; }
.vf-sub { font-size: 12px; color: #949ba4; }
.vf-quote { border-left: 4px solid #4e5058; padding-left: 10px; }
.vf-code { font-family: var(--mono); font-size: 12.5px; background: #1e1f22; border-radius: 3px; padding: 1px 4px; }
.vf-mention { color: #c9cdfb; background: rgba(88, 101, 242, 0.3); border-radius: 3px; padding: 0 2px; }
.vf-field { margin-top: 8px; font-size: 14px; } .vf-field b { color: #fff; display: block; font-size: 14px; margin-bottom: 2px; }
.vf-role-mention { border-radius: 3px; padding: 0 3px; margin-right: 4px; font-weight: 500; }
.vf-btns { margin-left: 48px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.vf-grid4 { display: grid; grid-template-columns: repeat(4, 52px); }
.vf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #fff; user-select: none; transition: filter .15s; }
.vf-btn:hover { filter: brightness(1.1); }
.vf-btn.primary { background: #5865f2; } .vf-btn.success { background: #248046; } .vf-btn.secondary { background: #4e5058; } .vf-btn.danger { background: #da373c; }
.vf-ephemeral { margin-left: 48px; margin-top: 6px; display: flex; align-items: center; gap: 5px; font-size: 12px; color: #949ba4; }
.vf-captcha { margin-top: 12px; height: 92px; border-radius: 4px; background: linear-gradient(120deg, #0d0f14, #1a1f2b); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 34px; letter-spacing: 2px; overflow: hidden; }
.vf-captcha span:nth-child(3n+1) { color: #ff8fb1; } .vf-captcha span:nth-child(3n+2) { color: #8fd3ff; } .vf-captcha span:nth-child(3n) { color: #c3ff8f; }
@media (max-width: 760px) {
  .vf-sticky { position: static; }
  .vf-embed, .vf-btns, .vf-ephemeral { margin-left: 0; }
  .vf-thumb { width: 56px; height: 56px; }
}

/* ==========================================================================
   v2.4 UPDATE: MONOCHROMATIC MODERN SIDEBAR, TOPBAR & COMMAND PALETTE
   ========================================================================== */

/* Sidebar Brand Header & Version Pill */
.sb-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 64px;
  flex: 1;
  text-decoration: none;
}
.sb-brand-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-brand-ver {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sb-brand-ver:hover {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Sidebar Quick Search Button */
.sb-quicksearch-wrap {
  padding: 10px 14px 2px;
}
.sb-quicksearch-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #71717a;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sb-quicksearch-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.sb-quicksearch-btn kbd {
  margin-left: auto;
  font-size: 10.5px;
  font-family: var(--mono);
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* What's New nav item */
.nav-item-update {
  border: none;
  font-family: inherit;
  font-size: 13.5px;
}
.nav-item-new-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Copy ID button in User Capsule */
.sb-copy-id {
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sb-copy-id:hover {
  opacity: 1;
  transform: scale(1.1);
  color: #ffffff;
}

/* Topbar Center Quick Search Trigger */
.tb-center {
  margin-left: 20px;
  flex: 1;
  max-width: 380px;
}
.tb-search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #71717a;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tb-search-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.tb-search-label {
  flex: 1;
  text-align: left;
}
.tb-search-kbd {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
}

/* Topbar Update Pill Button */
.update-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.update-badge-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.update-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: pulse-update-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-update-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* ==========================================================================
   COMMAND PALETTE STYLING
   ========================================================================== */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  animation: cmdFadeIn 0.18s ease-out;
}
@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmd-palette-modal {
  width: 100%;
  max-width: 600px;
  margin: 0 16px;
  background: rgba(10, 10, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: cmdScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cmdScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cmd-palette-input-wrap svg {
  color: #71717a;
  flex-shrink: 0;
}
.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #ffffff;
  font-family: inherit;
}
.cmd-palette-input::placeholder {
  color: #52525b;
}
.cmd-palette-esc {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #71717a;
  cursor: pointer;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}
.cmd-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.cmd-palette-item.is-selected {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.cmd-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  flex-shrink: 0;
}
.cmd-item-info {
  flex: 1;
  min-width: 0;
}
.cmd-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-item-subtitle {
  font-size: 11.5px;
  color: #71717a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.cmd-item-arrow {
  font-size: 14px;
  color: #52525b;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.cmd-palette-item.is-selected .cmd-item-arrow {
  opacity: 1;
  color: #ffffff;
}

.cmd-palette-empty {
  padding: 40px 20px;
  text-align: center;
  color: #71717a;
}
.cmd-palette-empty svg {
  margin: 0 auto 10px;
  opacity: 0.6;
}

.cmd-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: #71717a;
}
.cmd-footer-keys {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cmd-footer-keys kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 10.5px;
  color: #a1a1aa;
}

/* ==========================================================================
   UPDATE MODAL (WHAT'S NEW / RELEASE NOTES) STYLING
   ========================================================================== */
.update-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cmdFadeIn 0.2s ease-out;
}
.update-modal-box {
  width: 100%;
  max-width: 660px;
  background: rgba(10, 10, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 60px rgba(255, 255, 255, 0.07);
  overflow: hidden;
  animation: cmdScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}
.update-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.update-modal-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.update-modal-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}
.update-modal-date {
  font-size: 12px;
  color: #71717a;
}
.update-modal-close {
  color: #71717a;
}
.update-modal-close:hover {
  color: #ffffff;
}

.update-modal-hero {
  padding: 26px 28px 16px;
  text-align: center;
}
.update-hero-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.1);
}
.update-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.update-modal-sub {
  font-size: 13.5px;
  color: #a1a1aa;
  max-width: 480px;
  margin: 0 auto;
}

.update-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.update-feature-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}
.update-feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}
.update-feature-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}
.update-feature-body {
  flex: 1;
}
.update-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}
.update-feature-desc {
  font-size: 12.5px;
  color: #a1a1aa;
  line-height: 1.5;
}
.update-feature-desc code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #ffffff;
}

.update-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.update-footer-hint {
  font-size: 12px;
  color: #71717a;
}
.update-footer-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10.5px;
  color: #a1a1aa;
}
.update-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 38px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .tb-center { display: none; }
  .update-badge-btn span:last-child { display: none; }
  .update-modal-box { border-radius: 18px; }
  .update-modal-hero { padding: 18px 20px 10px; }
  .update-modal-content { padding: 10px 18px 18px; }
}
