/* ============================================================
   Conquest of Azeroth — "Midnight Sovereign" design system v2
   Dark epic fantasy. Custom CSS, zero frameworks.
   All interactive hooks are plain IDs — safe for app.js.
   ============================================================ */
:root {
  --bg0: #04060c;
  --bg1: #080c16;
  --panel: rgba(13, 18, 33, 0.82);
  --panel-solid: #0c1220;
  --inset: #05080f;
  --line: rgba(240, 199, 94, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold: #f0c75e;
  --gold-hi: #ffe9ad;
  --gold-deep: #a97a1f;
  --arcane: #9d8cff;
  --text: #eef1f7;
  --muted: #9aa3bb;
  --faint: #5f6880;
  --green: #3ddc97;
  --red: #fb7185;
  --blue: #6aa8ff;
  --radius: 18px;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scrollbar-color: #3a2f14 var(--bg0); }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 11px; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
  background: linear-gradient(#6b5418, #3a2f14);
  border-radius: 8px;
  border: 2px solid var(--bg0);
}
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: var(--bg0); }
::selection { background: rgba(240, 199, 94, 0.85); color: #1a1206; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  background: linear-gradient(var(--bg0), var(--bg1));
  overflow-x: hidden;
}

/* Aurora backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 460px at 10% -4%, rgba(240, 199, 94, 0.1), transparent 62%),
    radial-gradient(860px 480px at 90% -6%, rgba(157, 140, 255, 0.13), transparent 62%),
    radial-gradient(1200px 800px at 50% 118%, rgba(38, 80, 160, 0.16), transparent 65%),
    radial-gradient(700px 500px at 78% 62%, rgba(240, 199, 94, 0.04), transparent 60%);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1.5%, 0) scale(1.04); }
}
/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }
a { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ Top bar ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: rgba(4, 6, 12, 0.72);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.55) 30%, rgba(240, 199, 94, 0.55) 70%, transparent);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 22px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 13px; }
.sigil {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #1c1305;
  background: linear-gradient(140deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  box-shadow: 0 0 0 1px rgba(255, 233, 173, 0.5) inset, 0 8px 28px rgba(240, 199, 94, 0.35);
  position: relative;
}
.sigil::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 17px;
  border: 1px solid rgba(240, 199, 94, 0.3);
  animation: sigil-breathe 4s ease-in-out infinite;
}
@keyframes sigil-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  letter-spacing: 0.16em;
  background: linear-gradient(180deg, #fff6dd, var(--gold) 70%, #c99a35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }

.realm-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(61, 220, 151, 0.06);
  border: 1px solid rgba(61, 220, 151, 0.25);
  box-shadow: 0 0 24px rgba(61, 220, 151, 0.08) inset;
}
.pulse { position: relative; width: 10px; height: 10px; flex: none; }
.pulse::before, .pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
}
.pulse::before { animation: ping 1.8s ease-out infinite; }
@keyframes ping {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}
.realm-pill .sep { color: #334155; }
#realm-name { font-weight: 700; letter-spacing: 0.02em; }
#realm-online-count { color: var(--green); font-weight: 800; }

.top-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lang-switch {
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 800 11.5px var(--font-body);
  letter-spacing: 0.06em;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn.is-active {
  color: #1c1305;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  box-shadow: 0 3px 12px rgba(240, 199, 94, 0.4);
}

.hd-user { display: flex; align-items: center; gap: 10px; }
.hd-name {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}
.hd-gm {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold-hi);
  background: rgba(240, 199, 94, 0.1);
  border: 1px solid rgba(240, 199, 94, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(240, 199, 94, 0.15);
}
.hd-logout, .hd-login {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.hd-logout:hover { color: var(--red); }
.hd-login { color: var(--gold); }
.hd-login:hover { color: var(--gold-hi); text-shadow: 0 0 18px rgba(240, 199, 94, 0.6); }

/* ============ Layout ============ */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 22px 48px;
  flex: 1;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(240, 199, 94, 0.25);
  background:
    radial-gradient(700px 300px at 82% -10%, rgba(240, 199, 94, 0.16), transparent 65%),
    radial-gradient(640px 340px at 6% 108%, rgba(157, 140, 255, 0.16), transparent 60%),
    linear-gradient(180deg, #101828 0%, #0a0f1e 55%, #070b15 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 120px rgba(240, 199, 94, 0.05);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(240, 199, 94, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 199, 94, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 90% at 50% 10%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 90% at 50% 10%, black, transparent 75%);
}
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; padding: 46px 40px 38px; }
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: "";
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.7));
}
.hero-eyebrow::after { background: linear-gradient(90deg, rgba(240, 199, 94, 0.7), transparent); }
.hero h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.7);
}
.hero h2 em {
  font-style: normal;
  background: linear-gradient(178deg, #fff3cf 10%, var(--gold) 55%, #d29a2e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(240, 199, 94, 0.35));
}
.hero-sub { margin: 0 0 20px; color: #b9c1d4; max-width: 660px; font-size: 14.5px; }
.hero-stats { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 13px;
  border-radius: 999px;
  color: #d7dce8;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
}
.stat-chip b { color: var(--gold-hi); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
@media (max-width: 780px) { .hero-grid { grid-template-columns: 1fr; } .hero-inner { padding: 32px 20px 26px; } }

.hero-card {
  border-radius: var(--radius);
  padding: 18px 20px;
  background: rgba(4, 7, 13, 0.62);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
  position: relative;
}
.hero-card.gold-edge { border: 1px dashed rgba(240, 199, 94, 0.45); }
.hero-card h3 { margin: 0 0 5px; font-size: 13px; font-weight: 800; color: var(--gold-hi); letter-spacing: 0.02em; }
.hero-card p { margin: 0 0 13px; font-size: 12.5px; color: var(--muted); }
.rl-row { display: flex; gap: 9px; flex-wrap: wrap; }
.rl-code, #realmlist-code {
  flex: 1;
  min-width: 210px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gold-hi);
  background: #03050a;
  border: 1px solid rgba(240, 199, 94, 0.3);
  border-radius: 11px;
  padding: 10px 14px;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(240, 199, 94, 0.07) inset;
}
code.rl-code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--gold-hi);
  background: rgba(240, 199, 94, 0.12);
  border: 1px solid rgba(240, 199, 94, 0.3);
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ============ Buttons ============ */
.btn {
  appearance: none;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 18px;
  font: 800 12.5px var(--font-body);
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { border-color: rgba(240, 199, 94, 0.5); box-shadow: 0 6px 24px rgba(240, 199, 94, 0.12); }
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, #ffe9ad 0%, var(--gold) 45%, #cf9527 100%);
  border: 1px solid rgba(255, 233, 173, 0.6);
  color: #241704;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(240, 199, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-gold:hover { filter: brightness(1.07); box-shadow: 0 12px 36px rgba(240, 199, 94, 0.45); }
.btn-gold::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}
.btn-gold:hover::after { left: 130%; }
.btn-ghost { background: rgba(255, 255, 255, 0.045); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 11.5px; border-radius: 10px; }
.btn.is-copied {
  background: rgba(61, 220, 151, 0.14);
  border-color: rgba(61, 220, 151, 0.55);
  color: var(--green);
  box-shadow: 0 0 20px rgba(61, 220, 151, 0.2);
}
.btn-danger {
  background: linear-gradient(135deg, #fb7185, #be123c);
  color: #fff;
  border: 1px solid rgba(251, 113, 133, 0.6);
  box-shadow: 0 8px 24px rgba(251, 113, 133, 0.3);
}

.mini {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 700 11px var(--font-body);
  padding: 6px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mini:hover { filter: brightness(1.3); border-color: rgba(240, 199, 94, 0.5); }
.mini-gold { color: var(--gold-hi); border-color: rgba(240, 199, 94, 0.45); background: rgba(240, 199, 94, 0.09); }
.mini-green { color: var(--green); border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.08); }
.mini-red { color: var(--red); border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.08); }
.mini-amber { color: #fcd34d; border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.08); }

/* ============ GM switch bar ============ */
.gm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 20px;
  background:
    linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box,
    linear-gradient(120deg, rgba(240, 199, 94, 0.55), rgba(255, 255, 255, 0.08) 40%, rgba(157, 140, 255, 0.4)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.gm-id { display: flex; align-items: center; gap: 11px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 800 12px var(--font-body);
  letter-spacing: 0.03em;
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.seg-btn:hover { color: var(--text); border-color: rgba(240, 199, 94, 0.4); }
.seg-btn.is-active {
  background: linear-gradient(135deg, #ffe9ad, var(--gold) 60%, #cf9527);
  color: #241704;
  border-color: rgba(255, 233, 173, 0.6);
  box-shadow: 0 8px 26px rgba(240, 199, 94, 0.35);
}

/* ============ Alerts ============ */
.alert {
  border-radius: 15px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid;
  animation: alert-in 0.3s ease;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
@keyframes alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.alert-info { background: rgba(240, 199, 94, 0.09); border-color: rgba(240, 199, 94, 0.4); color: var(--gold-hi); }
.alert-success { background: rgba(61, 220, 151, 0.09); border-color: rgba(61, 220, 151, 0.4); color: #b8f4d8; }
.alert-error { background: rgba(251, 113, 133, 0.09); border-color: rgba(251, 113, 133, 0.45); color: #fecdd3; }

/* ============ Auth ============ */
.auth-wrap { max-width: 470px; margin: 8px auto 0; }
.auth-card {
  border-radius: 22px;
  padding: 30px 30px 28px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.94), rgba(9, 13, 24, 0.94)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.5), rgba(255, 255, 255, 0.07) 35%, rgba(157, 140, 255, 0.35)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(240, 199, 94, 0.05);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "◆";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(240, 199, 94, 0.55);
  font-size: 13px;
  text-shadow: 0 0 14px rgba(240, 199, 94, 0.8);
}
.auth-card::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 199, 94, 0.16), transparent 70%);
  pointer-events: none;
}
.auth-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin: 14px 0 22px; }
.auth-tab {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 0 13px;
  font: 800 13.5px var(--font-body);
  letter-spacing: 0.03em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-active {
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
  text-shadow: 0 0 20px rgba(240, 199, 94, 0.5);
}

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #c3cadb; margin-bottom: 7px; }
.field input, .field select {
  width: 100%;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 15px;
  font: 500 14px var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
.field input:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(240, 199, 94, 0.16), 0 0 24px rgba(240, 199, 94, 0.1);
}
.field input::placeholder { color: #49536b; }
.field input[readonly] { color: var(--muted); }
.field .hint { font-size: 11px; color: var(--faint); margin-top: 5px; }
.field select option { background: #0b0f1a; }

/* ============ Sections & panels ============ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
}
.section-head h2 .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(140deg, rgba(240, 199, 94, 0.22), rgba(157, 140, 255, 0.18));
  border: 1px solid rgba(240, 199, 94, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.section-head p { margin: 4px 0 0 51px; font-size: 12.5px; color: var(--muted); }
.orn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: rgba(240, 199, 94, 0.6);
  font-size: 10px;
}
.orn::before, .orn::after {
  content: "";
  height: 1px;
  width: 64px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.55));
}
.orn::after { background: linear-gradient(90deg, rgba(240, 199, 94, 0.55), transparent); }

.panel {
  border-radius: var(--radius);
  padding: 24px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.88), rgba(9, 13, 24, 0.88)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.28), rgba(255, 255, 255, 0.06) 35%, rgba(157, 140, 255, 0.2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.acct-line { display: flex; align-items: center; gap: 15px; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background:
    linear-gradient(rgba(10, 14, 25, 0.9), rgba(10, 14, 25, 0.9)) padding-box,
    linear-gradient(140deg, rgba(240, 199, 94, 0.7), rgba(157, 140, 255, 0.5)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  flex: none;
}
.acct-line h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff6dd, var(--gold) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.acct-line p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.tag-row { display: flex; gap: 8px; align-items: center; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .kv-grid { grid-template-columns: 1fr; } }
.kv {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 12.5px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}
.kv span { display: block; color: var(--muted); margin-bottom: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.kv strong { font-weight: 700; font-size: 13.5px; }
.kv .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-btn {
  background: none;
  border: 0;
  color: var(--gold);
  font: 800 12px var(--font-body);
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--gold-hi); text-shadow: 0 0 16px rgba(240, 199, 94, 0.6); }

.split { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 32px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 32px; }
.mt { margin-top: 24px; }

/* ============ Character cards ============ */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.char-card {
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.9), rgba(9, 13, 24, 0.9)) padding-box,
    linear-gradient(170deg, rgba(240, 199, 94, 0.32), rgba(255, 255, 255, 0.06) 38%, rgba(157, 140, 255, 0.22)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.char-card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.65), transparent);
}
.char-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 44px rgba(240, 199, 94, 0.1);
}
.char-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.char-id { display: flex; align-items: center; gap: 13px; }
.portrait {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  color: var(--gold-hi);
  flex: none;
  background:
    radial-gradient(circle at 35% 30%, #1c2742, #070b15 75%) padding-box,
    conic-gradient(from 200deg, var(--gold-deep), var(--gold-hi), var(--gold-deep), #7c5a16, var(--gold-deep)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55), 0 0 26px rgba(240, 199, 94, 0.25);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.char-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}
.char-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.char-gold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
}
.char-gold .g { font-family: var(--mono); display: flex; gap: 11px; font-size: 12.5px; }
.g-gold { color: var(--gold-hi); text-shadow: 0 0 12px rgba(240, 199, 94, 0.4); }
.g-silver { color: #cbd5e1; }
.g-copper { color: #e09a52; }

.dot { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 999px; border: 1px solid; text-transform: uppercase; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.dot.on { color: var(--green); border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.09); }
.dot.off { color: var(--muted); border-color: var(--line-soft); background: rgba(255, 255, 255, 0.03); }

.list-note {
  grid-column: 1 / -1;
  text-align: center;
  padding: 38px 22px;
  color: var(--muted);
  font-size: 13px;
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(13, 18, 33, 0.7), rgba(9, 13, 24, 0.7)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.2), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px dashed transparent;
}
.list-note.is-error { color: var(--red); }
.empty-ico { font-size: 36px; margin-bottom: 10px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6)); }

/* ============ Admin metrics ============ */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 15px; margin-bottom: 18px; }
.metric {
  border-radius: 16px;
  padding: 18px 20px 16px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(13, 18, 33, 0.9), rgba(9, 13, 24, 0.9)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.25), rgba(255, 255, 255, 0.06) 40%) border-box;
  border: 1px solid transparent;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}
.metric::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.metric.m-green::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.metric.m-gold::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.metric.m-blue::before { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.metric.m-violet::before { background: linear-gradient(90deg, transparent, var(--arcane), transparent); }
.metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.metric-top span { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.metric-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
}
.metric .big { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.metric.m-violet .big { font-size: 20px; white-space: nowrap; }
.metric .big small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 7px; letter-spacing: 0.03em; }
.metric .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.c-green { color: var(--green); text-shadow: 0 0 22px rgba(61, 220, 151, 0.4); }
.c-gold { color: var(--gold-hi); text-shadow: 0 0 22px rgba(240, 199, 94, 0.4); }
.c-blue { color: var(--blue); text-shadow: 0 0 22px rgba(106, 168, 255, 0.4); }
.c-violet { color: var(--arcane); text-shadow: 0 0 22px rgba(157, 140, 255, 0.45); }
.c-red { color: var(--red); }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 920px) { .res-grid { grid-template-columns: 1fr; } }
.bar-row { margin-bottom: 18px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; font-weight: 700; letter-spacing: 0.03em; }
.bar-label b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.bar { height: 11px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-soft); overflow: hidden; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6); }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width 0.6s ease; position: relative; }
.bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.35) 50%, transparent 80%);
  animation: bar-shine 3.2s ease-in-out infinite;
}
@keyframes bar-shine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
#adm-mem-bar { background: linear-gradient(90deg, #8a5f14, var(--gold) 60%, var(--gold-hi)); box-shadow: 0 0 14px rgba(240, 199, 94, 0.45); }
#adm-disk-bar { background: linear-gradient(90deg, #2f5fb3, var(--arcane)); box-shadow: 0 0 14px rgba(157, 140, 255, 0.45); }

.svc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.32);
  margin-bottom: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}
.svc:last-child { margin-bottom: 0; }
.svc-id { display: flex; align-items: center; gap: 11px; }
.svc-id > span:first-child {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  flex: none;
}
.svc-id .t { font-size: 12.5px; font-weight: 800; font-family: var(--mono); letter-spacing: 0; }
.svc-id .s { font-size: 11px; color: var(--muted); }

.pill { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 999px; border: 1px solid; white-space: nowrap; text-transform: uppercase; }
.pill.is-on { color: var(--green); border-color: rgba(61, 220, 151, 0.5); background: rgba(61, 220, 151, 0.1); box-shadow: 0 0 16px rgba(61, 220, 151, 0.15); }
.pill.is-off { color: var(--red); border-color: rgba(251, 113, 133, 0.5); background: rgba(251, 113, 133, 0.1); }
.pill-gm3 { color: #fda4af; border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.09); }
.pill-gm2 { color: var(--gold-hi); border-color: rgba(240, 199, 94, 0.45); background: rgba(240, 199, 94, 0.1); box-shadow: 0 0 16px rgba(240, 199, 94, 0.15); }
.pill-gm1 { color: #a9c8ff; border-color: rgba(106, 168, 255, 0.45); background: rgba(106, 168, 255, 0.09); }
.pill-player { color: var(--muted); border-color: var(--line-soft); }
.pill-banned { color: #fda4af; border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.09); }
.pill-muted2 { color: #c9bcff; border-color: rgba(157, 140, 255, 0.5); background: rgba(157, 140, 255, 0.1); }
.pill-locked { color: #fcd34d; border-color: rgba(252, 211, 77, 0.45); background: rgba(252, 211, 77, 0.09); }
.pill-active { color: var(--green); border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.09); }
.pill-bot { font-size: 9.5px; color: var(--muted); border-color: var(--line-soft); padding: 2px 8px; }
.pill-human { font-size: 9.5px; color: var(--green); border-color: rgba(61, 220, 151, 0.45); padding: 2px 8px; }

/* subtabs */
.subtabs { display: flex; gap: 9px; flex-wrap: wrap; }
.adm-subtab-btn {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 800 12px var(--font-body);
  letter-spacing: 0.02em;
  border-radius: 13px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.adm-subtab-btn:hover { color: var(--text); border-color: rgba(240, 199, 94, 0.4); transform: translateY(-1px); }
.adm-subtab-btn.is-active {
  background: linear-gradient(135deg, #ffe9ad, var(--gold) 60%, #cf9527);
  color: #241704;
  border-color: rgba(255, 233, 173, 0.6);
  box-shadow: 0 8px 26px rgba(240, 199, 94, 0.35);
}

/* toolbar + tables */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 15px;
  padding: 13px 15px;
  margin-bottom: 13px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.85), rgba(9, 13, 24, 0.85)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.22), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px solid transparent;
}
.search { position: relative; flex: 1; min-width: 220px; max-width: 400px; }
.search input {
  width: 100%;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 13px 10px 37px;
  font: 500 12.5px var(--font-body);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search input:focus { border-color: var(--gold); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 0 3px rgba(240, 199, 94, 0.14); }
.search input::placeholder { color: #49536b; }
.search .ico { position: absolute; left: 12px; top: 10px; font-size: 13px; opacity: 0.55; }
.select {
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 13px;
  font: 700 12px var(--font-body);
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.select option { background: #0b0f1a; }

.tbl-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(rgba(11, 16, 29, 0.92), rgba(8, 11, 21, 0.92)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.22), rgba(255, 255, 255, 0.05) 40%) border-box;
  border: 1px solid transparent;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: left; }
.tbl thead th {
  background: rgba(0, 0, 0, 0.45);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(240, 199, 94, 0.18);
  white-space: nowrap;
}
.tbl tbody td { padding: 13px 17px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.14s ease, box-shadow 0.14s ease; }
.tbl tbody tr:hover { background: rgba(240, 199, 94, 0.045); box-shadow: inset 2px 0 0 var(--gold); }
.tbl .mono { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tbl .strong { font-weight: 800; font-size: 13px; }
.tbl .gold-t { color: var(--gold-hi); font-weight: 700; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .actions .mini { margin-left: 6px; }
.lvl-chip {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  background: var(--inset);
  border: 1px solid rgba(240, 199, 94, 0.4);
  color: var(--gold-hi);
  font-weight: 800;
  border-radius: 9px;
  padding: 3px 9px;
  box-shadow: 0 0 14px rgba(240, 199, 94, 0.12);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 17px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}
.pager-btn {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 800 11.5px var(--font-body);
  border-radius: 9px;
  padding: 7px 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pager-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pager-btn:not(:disabled):hover { border-color: rgba(240, 199, 94, 0.5); box-shadow: 0 4px 16px rgba(240, 199, 94, 0.12); }

/* online monitor */
.online-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 15px;
  padding: 13px 17px;
  margin-bottom: 13px;
  font-size: 12.5px;
  color: var(--muted);
  background:
    linear-gradient(rgba(13, 18, 33, 0.85), rgba(9, 13, 24, 0.85)) padding-box,
    linear-gradient(165deg, rgba(61, 220, 151, 0.3), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px solid transparent;
}
.chip-row { display: flex; gap: 7px; }
.chip-filter {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 800 11.5px var(--font-body);
  border-radius: 10px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip-filter:hover { color: var(--text); }
.chip-filter.is-active {
  color: var(--gold-hi);
  border-color: rgba(240, 199, 94, 0.55);
  background: rgba(240, 199, 94, 0.1);
  box-shadow: 0 0 18px rgba(240, 199, 94, 0.15);
}
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.online-card {
  border-radius: 15px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.9), rgba(9, 13, 24, 0.9)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.22), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.online-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.online-card .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.online-card .who { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.online-card .right { text-align: right; font-family: var(--mono); font-size: 10.5px; flex: none; }
.lat { color: var(--green); text-shadow: 0 0 12px rgba(61, 220, 151, 0.5); }

/* ============ Modals ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 9, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  width: 100%;
  max-width: 470px;
  border-radius: 22px;
  padding: 26px 26px 24px;
  background:
    linear-gradient(#0d1322, #090d18) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.5), rgba(255, 255, 255, 0.08) 35%, rgba(157, 140, 255, 0.35)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75), 0 0 80px rgba(240, 199, 94, 0.06);
  max-height: 92vh;
  overflow-y: auto;
  animation: card-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal-card.wide { max-width: 880px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 15px;
  margin-bottom: 19px;
  position: relative;
}
.modal-head::after {
  content: "◆";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--gold);
  background: #0d1322;
  padding: 0 10px;
  text-shadow: 0 0 12px rgba(240, 199, 94, 0.9);
}
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.04em; color: var(--gold-hi); }
.modal-head h3.danger { color: var(--red); }
.modal-x {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  width: 30px;
  height: 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-x:hover { color: #fff; border-color: rgba(251, 113, 133, 0.6); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; }

.cl-tabs { display: flex; gap: 8px; padding: 14px 24px; margin: 0 -26px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); overflow-x: auto; background: rgba(0, 0, 0, 0.28); }
.cl-tab {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 800 11.5px var(--font-body);
  border-radius: 10px;
  padding: 8px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.cl-tab:hover { color: var(--text); }
.cl-tab.is-active {
  background: linear-gradient(135deg, #ffe9ad, var(--gold));
  color: #241704;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(240, 199, 94, 0.35);
}
.cl-body { padding: 24px 2px 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 28px; }
.cl-sec-title {
  font-family: var(--font-display);
  color: var(--gold-hi);
  font-size: 15px;
  letter-spacing: 0.04em;
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(240, 199, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-ver { font-family: var(--mono); font-size: 10.5px; color: var(--gold); background: rgba(240, 199, 94, 0.1); border: 1px solid rgba(240,199,94,0.35); padding: 3px 9px; border-radius: 7px; }
.cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 660px) { .cl-grid { grid-template-columns: 1fr; } }
.cl-card {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 15px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}
.cl-card:hover { border-color: rgba(240, 199, 94, 0.4); box-shadow: inset 0 2px 10px rgba(0,0,0,0.35), 0 0 30px rgba(240, 199, 94, 0.08); }
.cl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.cl-card-title { font-weight: 800; font-size: 13px; color: var(--gold-hi); }
.cl-badge { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--gold-hi); background: rgba(240, 199, 94, 0.1); border: 1px solid rgba(240,199,94,0.4); white-space: nowrap; }
.cl-list { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.cl-list li::marker { color: var(--gold); }
.cl-row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 11px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}
.cl-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 4px 11px; border-radius: 9px; white-space: nowrap; color: #c9bcff; background: rgba(157,140,255,0.12); border: 1px solid rgba(157,140,255,0.45); }
.cl-row-title { font-weight: 800; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.cl-row-desc { font-size: 12.5px; color: var(--muted); }
.cl-muted { font-size: 12.5px; color: var(--muted); }
#changelog-modal code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--gold-hi);
  background: rgba(240, 199, 94, 0.12);
  border: 1px solid rgba(240, 199, 94, 0.25);
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.cl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 15px 2px 0;
  margin-top: 6px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}

/* ============ Entrance motion ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero { animation: rise 0.6s ease both; }
.gm-bar, .auth-card { animation: rise 0.5s ease both; }
.panel, .metric, .char-card, .online-card, .toolbar, .tbl-wrap, .online-bar {
  animation: rise 0.5s ease both;
}
.char-grid .char-card:nth-child(2), .metric-grid .metric:nth-child(2) { animation-delay: 0.06s; }
.char-grid .char-card:nth-child(3), .metric-grid .metric:nth-child(3) { animation-delay: 0.12s; }
.metric-grid .metric:nth-child(4) { animation-delay: 0.18s; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid rgba(240, 199, 94, 0.14);
  padding: 30px 20px 34px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  background: rgba(0, 0, 0, 0.4);
  position: relative;
}
.footer::before {
  content: "◆ ◆ ◆";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.5em;
  color: var(--gold);
  background: var(--bg0);
  padding: 0 16px;
  text-shadow: 0 0 12px rgba(240, 199, 94, 0.8);
}
.footer p { margin: 3px 0; }
.footer .f-brand { font-family: var(--font-display); letter-spacing: 0.2em; color: var(--gold); font-size: 12px; margin-bottom: 6px; }

/* ============ Additions: cabinet + admin extensions ============ */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  margin: 0 !important;
}

.sec-divider {
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.3), transparent);
  position: relative;
}
.sec-divider::after {
  content: "◆";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--gold);
  background: var(--panel-solid);
  padding: 0 10px;
}

.row-form { display: flex; gap: 9px; flex-wrap: wrap; }
.row-form input[type="text"] {
  flex: 1;
  min-width: 200px;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 14px;
  font: 500 13px var(--font-body);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
.row-form input[type="text"]:focus { border-color: var(--gold); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 0 3px rgba(240, 199, 94, 0.14); }

.form-grid { display: grid; grid-template-columns: 140px 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field textarea {
  width: 100%;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 15px;
  font: 500 13.5px var(--font-body);
  color: var(--text);
  outline: none;
  resize: vertical;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
.field textarea:focus { border-color: var(--gold); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 0 3px rgba(240, 199, 94, 0.14); }
.check-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.check-row label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.check-row input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }
.tbl input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: 13px;
  padding: 11px 15px;
  margin-bottom: 13px;
  background:
    linear-gradient(rgba(240, 199, 94, 0.07), rgba(240, 199, 94, 0.03)) padding-box,
    linear-gradient(120deg, rgba(240, 199, 94, 0.5), rgba(255, 255, 255, 0.08)) border-box;
  border: 1px solid transparent;
}
.bulk-bar input[type="text"] {
  flex: 1;
  min-width: 180px;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 13px;
  font: 500 12.5px var(--font-body);
  color: var(--text);
  outline: none;
}
.bulk-bar input[type="text"]:focus { border-color: var(--gold); }

.audit-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 12.5px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}
.audit-row .mono { font-family: var(--mono); font-size: 11px; }

.exec-presets { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0; }
.exec-output {
  margin: 0;
  padding: 15px 17px;
  border-radius: 12px;
  background: #02040a;
  border: 1px solid var(--line-soft);
  color: #b8f4d8;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.7);
}

.chart-box { min-height: 120px; }
.stat-svg { width: 100%; height: auto; display: block; }
.stat-svg .grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.stat-svg .line-gold { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(240, 199, 94, 0.5)); }
.stat-svg .axis { fill: var(--faint); font-size: 11px; font-family: var(--mono); }
.bar-chart { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.bar-rowline { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bar-rowline .mono { font-size: 11px; min-width: 40px; }
.bar-rowline strong { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.bar-inline { flex: 1; height: 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-soft); overflow: hidden; }
.bar-inline i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8a5f14, var(--gold)); box-shadow: 0 0 10px rgba(240, 199, 94, 0.35); }

.news-card {
  border-radius: 15px;
  padding: 17px 20px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.88), rgba(9, 13, 24, 0.88)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.28), rgba(255, 255, 255, 0.06)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
  animation: rise 0.5s ease both;
}
.news-card.is-pinned { border: 1px solid rgba(240, 199, 94, 0.45); }
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 14.5px; }
.news-date { font-size: 11px; color: var(--faint); margin-top: 8px; font-family: var(--mono); }

.mail-card {
  border-radius: 15px;
  padding: 17px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(rgba(13, 18, 33, 0.88), rgba(9, 13, 24, 0.88)) padding-box,
    linear-gradient(165deg, rgba(240, 199, 94, 0.22), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px solid transparent;
  animation: rise 0.5s ease both;
}
.mail-card.is-unread { border: 1px solid rgba(240, 199, 94, 0.4); }
.mail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.mail-body {
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 13px;
  white-space: pre-wrap;
}
.mail-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.char-sub-actions { display: flex; gap: 8px; }
.char-sub-actions .mini { flex: 1; padding: 7px 6px; }

/* ============ WoW class colors (used by JS renderers) ============ */
.class-1 { color: #C79C6E; }
.class-2 { color: #F58CBA; }
.class-3 { color: #ABD473; }
.class-4 { color: #FFF569; }
.class-5 { color: #FFFFFF; }
.class-6 { color: #C41F3B; }
.class-7 { color: #0070DE; }
.class-8 { color: #69CCF0; }
.class-9 { color: #9482C9; }
.class-11 { color: #FF7D0A; }
.class-12 { color: #E65100; }
.class-13 { color: #00BFA5; }
.class-14 { color: #76FF03; }
.class-15 { color: #FFD600; }
.class-16 { color: #00E5FF; }
.class-17 { color: #D50000; }
.class-18 { color: #8D6E63; }
.class-19 { color: #FFAB00; }
.class-20 { color: #FF1744; }
.class-21 { color: #AEEA00; }
.class-22 { color: #80D8FF; }
.class-23 { color: #B388FF; }
.class-24 { color: #FF6D00; }
.class-25 { color: #AA00FF; }
.class-26 { color: #82B1FF; }
.class-27 { color: #FFD740; }
.class-28 { color: #8fa3b8; }
.class-29 { color: #64DD17; }
.class-30 { color: #9aa7b5; }
.class-31 { color: #00C853; }
.class-32 { color: #8094ff; }

@media (max-width: 720px) {
  .realm-pill { display: none; }
  .topbar-inner { padding-top: 12px; padding-bottom: 12px; }
  .hero-inner { padding: 32px 20px 26px; }
  .panel { padding: 18px; }
  .section-head p { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
