:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #edf3ff;
  background: #03040d;
  --bg: #03040d;
  --bg-2: #070a1b;
  --panel: #081124;
  --panel-2: #0d1730;
  --panel-3: #111c3e;
  --line: #253a78;
  --line-bright: #5b47bd;
  --blue: #55d9ff;
  --blue-deep: #1585e8;
  --violet: #a76dff;
  --violet-hot: #6e35ff;
  --pink: #ff4ca8;
  --gold: #ffd66d;
  --green: #4cf0af;
  --red: #ff5577;
  --muted: #8290b6;
  --muted-2: #56668f;
  --shadow: #000b;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 72% -12%, #263881 0%, #10183d 35%, transparent 70%),
    radial-gradient(760px 620px at 15% 108%, #19134d 0%, transparent 68%),
    linear-gradient(135deg, #03040d 0%, #06091a 47%, #02040c 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .68;
  background:
    radial-gradient(520px 420px at 91% 17%, #6c36ff14, transparent 70%),
    radial-gradient(460px 360px at 40% 76%, #1ecbff0c, transparent 72%),
    linear-gradient(118deg, transparent 0 30%, #7756ff08 31%, transparent 42% 100%),
    linear-gradient(62deg, transparent 0 58%, #39d9ff07 59%, transparent 70% 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(125deg, transparent 0 48%, #6c59df 49%, transparent 50%),
    linear-gradient(35deg, transparent 0 48%, #50cfff 49%, transparent 50%);
  background-size: 620px 620px, 760px 760px;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}

button, input, select, textarea { font: inherit; }
button { appearance: none; }
.app-shell { display: flex; min-height: 100vh; }

/* Shared NEXARENA chrome */
.sidebar {
  position: relative;
  z-index: 3;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 282px;
  min-height: 100vh;
  padding: 31px 18px 22px;
  overflow: hidden;
  border-right: 1px solid #342b79;
  background:
    radial-gradient(260px 260px at 50% 9%, #4a2a9b20, transparent 72%),
    linear-gradient(180deg, #090d21f4 0%, #060916fa 50%, #02040cf8 100%);
  box-shadow: 20px 0 60px #000b, inset -1px 0 #75d9ff0a;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 150px;
  left: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid #8e5bff13;
  border-radius: 50%;
  box-shadow: 0 0 0 26px #8e5bff06, 0 0 0 86px #2dd7ff04;
  pointer-events: none;
}

.brand-block {
  position: relative;
  z-index: 1;
  margin: 0 14px 42px;
  padding-bottom: 22px;
  border-bottom: 1px solid #27336a;
}

.brand-block::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 96px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet), transparent);
  box-shadow: 0 0 16px #55d9ff99;
}

.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 0 14px;
  border: 1px solid #67dfff;
  border-radius: 15px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  background:
    linear-gradient(145deg, #2a156d 0%, #111b52 48%, #063d61 100%);
  box-shadow: 0 0 18px #8d55ff80, 0 0 38px #26c9ff28, inset 0 1px #ffffff55;
  transform: rotate(-3deg);
}

.brand-symbol::before,
.brand-symbol::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #ffffff88;
  transform: rotate(45deg);
}

.brand-symbol::before { top: -5px; right: 2px; border-color: var(--gold); box-shadow: 0 0 11px #ffd66d99; }
.brand-symbol::after { bottom: -4px; left: 4px; border-color: var(--blue); box-shadow: 0 0 11px #55d9ff99; }
.brand-name {
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1px;
  color: #f7f7ff;
  text-shadow: 0 0 14px #7c65ff99, 0 2px 0 #000;
}
.brand-name::first-letter { color: var(--violet); }
.brand-subtitle {
  margin-top: 9px;
  color: #8ccdf1;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-shadow: 0 0 10px #3abfff55;
}
.brand-line { display: none; }

.side-label {
  position: relative;
  z-index: 1;
  margin: 0 12px 12px;
  color: #647bc1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}
.side-label-bottom { margin-top: 38px; }
.sidebar nav { position: relative; z-index: 1; display: grid; gap: 7px; }
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 33px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #a9b7db;
  text-decoration: none;
  cursor: pointer;
  transition: .22s ease;
}
.nav-item::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 2px;
  background: transparent;
  box-shadow: 0 0 0 transparent;
  transition: .22s ease;
}
.nav-item::after {
  content: "";
  position: absolute;
  top: 0;
  right: -40px;
  width: 130px;
  height: 100%;
  background: linear-gradient(90deg, transparent, #9b69ff11);
  transform: skewX(-22deg);
  pointer-events: none;
}
.nav-item i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #315296;
  border-radius: 8px;
  color: #61d9ff;
  font-style: normal;
  font-size: 17px;
  background: linear-gradient(145deg, #182957, #09142c);
  box-shadow: inset 0 1px #ffffff16;
}
.nav-item span, .nav-item em { position: relative; z-index: 1; }
.nav-item span { font-size: 14px; font-weight: 700; }
.nav-item em { color: #5e6d9e; font-size: 10px; font-style: normal; letter-spacing: 1px; }
.nav-item:hover,
.nav-item.active {
  color: #fff;
  border-color: #3d8fd0;
  background:
    linear-gradient(100deg, #132d64e8 0%, #181354e8 52%, #2a1862c8 100%);
  box-shadow: 0 0 28px #4f43ff38, inset 0 1px #ffffff20, inset 0 -1px #1f1b50;
}
.nav-item:hover::before, .nav-item.active::before {
  background: linear-gradient(180deg, var(--blue), var(--violet));
  box-shadow: 0 0 13px var(--blue), 0 0 20px var(--violet);
}
.nav-item.active i { color: var(--gold); border-color: #aa7d38; box-shadow: 0 0 12px #ffd66d28, inset 0 1px #fff3; }
.nav-item.active em { color: #b5c6ff; }
.staff-link { margin-top: 0; }

.sidebar-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 17px 12px 0;
  border-top: 1px solid #27336a;
}
.connection { display: flex; align-items: center; gap: 9px; color: #9db1d5; font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green), 0 0 18px #4cf0af80; }
.version { margin-top: 11px; color: #51618e; font-size: 10px; letter-spacing: 1px; }

.workspace {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 1840px;
  margin: 0 auto;
  padding: 28px 38px 58px;
}
.workspace::before {
  content: "";
  position: absolute;
  top: 0;
  right: 5%;
  width: 310px;
  height: 170px;
  background: radial-gradient(ellipse, #7346ff14, transparent 70%);
  pointer-events: none;
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin-bottom: 19px; }
.crumb { color: #78c9ef; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; text-shadow: 0 0 10px #45cfff44; }
.crumb b { padding: 0 7px; color: var(--gold); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .small-action, .row-action {
  border: 1px solid #3a7fd1;
  border-radius: 9px;
  color: #e4f4ff;
  background: linear-gradient(135deg, #173b76, #24165d 72%);
  box-shadow: inset 0 1px #ffffff20, 0 0 13px #5746e820;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}
.icon-button { width: 38px; height: 38px; padding: 0; font-size: 21px; }
.small-action, .row-action { padding: 9px 13px; }
.icon-button:hover, .small-action:hover, .row-action:hover { border-color: var(--blue); box-shadow: 0 0 18px #49cfff66, inset 0 1px #fff4; transform: translateY(-1px); }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 198px;
  padding: 7px 10px;
  border: 1px solid #3a4b91;
  border-radius: 11px;
  background: linear-gradient(115deg, #0d1835dd, #151642bb);
  box-shadow: inset 0 1px #fff1, 0 0 24px #2f32a522;
}
.user-card strong { display: block; color: #f5f8ff; font-size: 12px; }
.user-card small { display: block; margin-top: 3px; color: #86a1ce; font-size: 10px; }
.avatar, .mini-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #6de1ff;
  border-radius: 50%;
  color: #0b1024;
  font-weight: 900;
  background: linear-gradient(145deg, #64e5ff, #8d67ff 55%, #ffd66d);
  box-shadow: 0 0 16px #5bd9ff66, inset 0 1px #fff9;
}
.avatar { width: 34px; height: 34px; font-size: 14px; }
.logout { margin-left: auto; color: #a0d8ff; text-decoration: none; font-size: 18px; }

/* Hero / header */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 182px;
  margin-bottom: 20px;
  padding: 31px 34px;
  overflow: hidden;
  border: 1px solid #4876d1;
  border-radius: 16px;
  background:
    radial-gradient(340px 220px at 90% 45%, #7e42ff2c, transparent 72%),
    radial-gradient(300px 190px at 70% 100%, #1dcfff14, transparent 74%),
    linear-gradient(112deg, #0e1b3bf7 0%, #0a1430f2 49%, #11103cf0 100%);
  box-shadow: 0 0 44px #1b57a832, 0 20px 50px #0007, inset 0 1px #ffffff25, inset 0 -1px #050815;
}
.hero::before {
  content: "";
  position: absolute;
  right: 130px;
  top: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid #53d9ff25;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #a568ff0b, 0 0 0 70px #5f4dff08, 0 0 60px #44cfff22;
  transform: rotate(24deg);
}
.hero::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -74px;
  width: 280px;
  height: 250px;
  opacity: .7;
  background:
    linear-gradient(145deg, transparent 0 42%, #895eff22 43% 44%, transparent 45%),
    linear-gradient(35deg, transparent 0 47%, #36cfff18 48% 49%, transparent 50%),
    linear-gradient(115deg, transparent 0 52%, #ffd66d14 53% 54%, transparent 55%);
  clip-path: polygon(50% 0, 100% 78%, 74% 100%, 42% 68%, 12% 100%, 0 61%);
}
.hero > * { position: relative; z-index: 1; }
.hero-kicker, .eyebrow { color: #57d9ff; font-size: 10px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 0 11px #48cbff66; }
.hero h1 {
  margin: 14px 0 6px;
  color: #fff;
  font-size: 43px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-shadow: 0 0 18px #a15dff55, 0 3px 0 #090818;
  background: linear-gradient(100deg, #fff 0%, #e6dcff 42%, #ffd66d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { margin: 0; color: #b6c8eb; font-size: 14px; }
.hero-mark { display: flex; align-items: center; gap: 13px; color: #9beaff; }
.hero-mark span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid #61dfff;
  border-radius: 21px;
  color: var(--gold);
  font-size: 40px;
  background: linear-gradient(145deg, #2f176f, #10204d 55%, #063d5d);
  box-shadow: 0 0 26px #7e4dff70, 0 0 48px #35ceff2b, inset 0 1px #fff6;
  transform: rotate(-3deg);
}
.hero-mark small { color: #a6bce0; font-size: 10px; line-height: 1.5; letter-spacing: 2px; }

/* Cards / overview */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.metric, .panel {
  border: 1px solid #293d7d;
  border-radius: 14px;
  background:
    linear-gradient(145deg, #0b1732f5 0%, #070e22f7 63%, #111133f0 100%);
  box-shadow: 0 15px 34px #0006, inset 0 1px #ffffff16, inset 0 -1px #0008;
}
.metric {
  position: relative;
  min-height: 145px;
  padding: 19px 20px;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -70px;
  width: 160px;
  height: 160px;
  border: 1px solid #5f77d638;
  border-radius: 50%;
  box-shadow: 0 0 0 17px #5e55d30b, 0 0 0 47px #5e55d306;
}
.metric::after {
  content: "";
  position: absolute;
  top: -34px;
  right: 24px;
  width: 95px;
  height: 85px;
  opacity: .45;
  background: linear-gradient(135deg, transparent 40%, #8761ff32 41% 43%, transparent 44% 59%, #53d9ff26 60% 62%, transparent 63%);
  transform: rotate(13deg);
}
.metric-gold { border-top-color: #b9903d; box-shadow: 0 15px 34px #0006, 0 -3px 23px #d29b3020, inset 0 1px #fff2; }
.metric-violet { border-top-color: #8555da; box-shadow: 0 15px 34px #0006, 0 -3px 23px #8450ff20, inset 0 1px #fff2; }
.metric-green { border-top-color: #2abf90; box-shadow: 0 15px 34px #0006, 0 -3px 23px #24dba329, inset 0 1px #fff2; }
.metric-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; }
.metric-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #3a85bd;
  border-radius: 9px;
  color: var(--blue);
  font-size: 17px;
  background: linear-gradient(145deg, #1a2c60, #08152e);
  box-shadow: inset 0 1px #fff3, 0 0 13px #43cfff22;
}
.metric-gold .metric-icon { color: var(--gold); border-color: #a98037; box-shadow: 0 0 13px #ffd66d2b, inset 0 1px #fff4; }
.metric-violet .metric-icon { color: #d0adff; border-color: #815ad1; box-shadow: 0 0 13px #9a5bff3d, inset 0 1px #fff4; }
.metric-green .metric-icon { color: var(--green); border-color: #2d9d79; box-shadow: 0 0 13px #4cf0af2b, inset 0 1px #fff4; }
.metric-label { color: #83a9d5; font-size: 10px; font-weight: 900; letter-spacing: 1.15px; }
.metric-spark { margin-left: auto; color: var(--green); font-size: 15px; text-shadow: 0 0 10px var(--green); }
.metric strong { position: relative; z-index: 1; display: block; margin-top: 15px; color: #fff; font-size: 36px; line-height: 1; text-shadow: 0 0 18px #9b83ff25; }
.metric small { position: relative; z-index: 1; display: block; margin-top: 9px; color: #748bb6; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.panel { padding: 21px; }
.panel-head, .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel h2, .page-panel h2 { margin: 7px 0 0; color: #f0f4ff; font-size: 22px; letter-spacing: -.2px; text-shadow: 0 0 12px #ffffff16; }
.period, .season-badge { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.live-badge { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 9px #4cf0af99; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green), 0 0 16px #4cf0afaa; animation: livePulse 2.1s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: .75; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.2); } }
.wide-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  margin: 10px 0;
  padding: 11px 14px;
  border: 1px solid #5b74ef;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(100deg, #1355aa, #632cce 58%, #8b37c9);
  box-shadow: 0 0 20px #673bff33, inset 0 1px #fff4, inset 0 -2px #1a1554;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}
.wide-action:hover { border-color: #9edfff; box-shadow: 0 0 28px #693dff77, inset 0 1px #fff7; filter: brightness(1.12); transform: translateY(-1px); }
.wide-action.danger { border-color: #ff6d8b; background: linear-gradient(100deg, #9f2454, #6b1f78 58%, #402057); box-shadow: 0 0 20px #ff3d7040, inset 0 1px #fff3; }
.service-list { margin-top: 17px; border-top: 1px solid #263866; }
.service-list > div { display: grid; grid-template-columns: 25px 1fr auto; gap: 9px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #1b2b52; color: #b9c7e2; font-size: 13px; }
.service-list b { color: var(--green); font-size: 12px; text-shadow: 0 0 9px #4cf0af44; }
.green-icon { color: var(--green); text-shadow: 0 0 9px var(--green); }

/* ELO chart */
.elo-chart { display: block; width: 100%; height: 188px; margin: 0 0 4px; overflow: visible; filter: drop-shadow(0 0 6px #4ccfff55); }
.elo-chart text { fill: #7187b2; font-size: 9px; letter-spacing: 1px; }
.chart-area { fill: url(#chartFill); opacity: .92; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid #263866; color: #8aa0c6; font-size: 11px; }
.chart-footer b { color: var(--gold); text-shadow: 0 0 10px #ffd66d66; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.chart-empty, .empty { display: grid; place-items: center; min-height: 130px; color: #7384ac; text-align: center; }
.empty span { color: #7958d8; font-size: 28px; text-shadow: 0 0 15px #8055ff; }
.empty p { margin: 8px 0 0; font-size: 12px; }

.match-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #1b2e57; }
.match-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #4b68bd; border-radius: 9px; color: #68dcff; background: linear-gradient(145deg, #1b3470, #0a1530); box-shadow: 0 0 12px #4f60d833, inset 0 1px #fff3; }
.match-row b { display: block; color: #e8f3ff; font-size: 13px; }
.match-row small { display: block; margin-top: 4px; color: #7187ae; font-size: 10px; }
.leader-row { display: grid; grid-template-columns: 30px 32px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #1b2e57; }
.place { color: #788cb2; font-size: 13px; font-weight: 900; text-align: center; }
.place-1 { color: var(--gold); font-size: 17px; text-shadow: 0 0 10px #ffd66d66; }
.place-2 { color: #d8e0f0; }
.place-3 { color: #d69d7d; }
.leader-row .mini-avatar { width: 31px; height: 31px; font-size: 12px; }
.leader-name b { display: block; color: #e9f5ff; font-size: 12px; }
.leader-name small { display: block; margin-top: 3px; color: #748ab0; font-size: 10px; }
.leader-row > strong { color: var(--gold); font-size: 13px; text-shadow: 0 0 9px #ffd66d55; }
.leader-row > strong small { color: #748ab0; font-size: 9px; }

/* Data pages */
.page-panel { padding: 25px; }
.page-head { align-items: center; padding-bottom: 18px; border-bottom: 1px solid #263866; }
.page-head p { margin: 7px 0 0; }
.muted { color: var(--muted); }
.bright { color: var(--gold); }
.search { min-width: 210px; padding: 11px 14px; border: 1px solid #3a5ea4; border-radius: 9px; outline: 0; color: #edf5ff; background: #080f25; box-shadow: inset 0 1px #fff1; font-size: 12px; }
.search::placeholder { color: #6477a4; }
.search:focus { border-color: var(--blue); box-shadow: 0 0 17px #43c9ff4a, inset 0 1px #fff2; }
.table-head, .table-row { display: grid; align-items: center; gap: 14px; }
.table-head { padding: 10px 12px; color: #6e88bd; font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.table-row { min-height: 61px; padding: 10px 12px; border-top: 1px solid #1c2f59; color: #b9c9e5; font-size: 13px; transition: .18s ease; }
.table-row:hover { background: linear-gradient(90deg, #16275a44, #7b4cff0d, transparent); }
.match-table { grid-template-columns: 1.2fr 1fr .8fr 1fr .8fr; }
.player-table { grid-template-columns: 1.6fr .8fr .8fr .6fr 1.3fr; }
.rank-table { grid-template-columns: 45px 1.7fr .8fr 1fr .7fr; }
.player-cell { display: flex; align-items: center; gap: 10px; color: #edf6ff; }
.mini-avatar { width: 29px; height: 29px; font-size: 11px; }
.elo-text { color: var(--gold); text-shadow: 0 0 9px #ffd66d4c; }
.table-row small { overflow: hidden; color: #7086aa; font-size: 10px; text-overflow: ellipsis; }
.pill { display: inline-flex; justify-self: start; padding: 5px 9px; border: 1px solid #4a5988; border-radius: 999px; color: #b4c3df; background: #101a37; font-size: 10px; white-space: nowrap; box-shadow: inset 0 1px #fff1; }
.pill.green { border-color: #2fa681; color: var(--green); background: #103e3a; box-shadow: 0 0 11px #4cf0af22, inset 0 1px #fff2; }
.pill.blue { border-color: #3b87dc; color: #7ddfff; background: #122f61; box-shadow: 0 0 11px #4fbfff22, inset 0 1px #fff2; }
.pill.red { border-color: #bd4f73; color: #ff9aaa; background: #491d39; box-shadow: 0 0 11px #ff4b7622, inset 0 1px #fff2; }
.row-action { justify-self: start; padding: 7px 10px; font-size: 10px; }
.rank-number { color: #8ca0c7; font-weight: 900; }
.rank-1 { color: var(--gold); font-size: 17px; }
.rank-2 { color: #dbe3f2; }
.rank-3 { color: #dcaa8b; }
.season-badge { padding: 8px 11px; border: 1px solid #b18a3c; border-radius: 7px; color: var(--gold); background: linear-gradient(135deg, #4b3511, #28204d); box-shadow: 0 0 16px #ffd66d22, inset 0 1px #fff3; }
.log-list { border-top: 1px solid #1f315b; }
.log-row { display: grid; grid-template-columns: 35px 1.1fr 1fr; align-items: center; gap: 13px; min-height: 67px; padding: 10px 5px; border-bottom: 1px solid #1b2e57; }
.log-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #4968b0; border-radius: 8px; color: #8adfff; background: linear-gradient(145deg, #1b3470, #0b142e); box-shadow: inset 0 1px #fff2; }
.log-row b { display: block; color: #eff5ff; font-size: 13px; }
.log-row small { display: block; margin-top: 5px; color: #7086aa; font-size: 10px; }
.log-row > span:last-child { color: #aec0de; font-size: 11px; text-align: right; }
.settings-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 17px; }
.setting-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 2px; border-top: 1px solid #1b2e57; color: #91a8cb; font-size: 12px; }
.setting-row b { color: #e8f4ff; font-weight: 700; text-align: right; }
.connection-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #1b2e57; }
.connection-row b { display: block; color: #eaf4ff; font-size: 12px; }
.connection-row small { display: block; margin-top: 4px; color: #7489ad; font-size: 10px; }
.connection-row em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 900; }
.error-box { border-color: #a94d78; color: #ff9aaa; }
.toast { position: fixed; right: 32px; bottom: 28px; z-index: 10; transform: translateY(14px); opacity: 0; pointer-events: none; padding: 13px 17px; border: 1px solid #5e78d1; border-radius: 10px; color: #eff7ff; background: linear-gradient(135deg, #121a3bf5, #2a1650f2); box-shadow: 0 0 24px #000b, 0 0 20px #6c44ff44, inset 0 1px #fff2; transition: .2s; }
.toast.show { transform: none; opacity: 1; }

/* Moderator pages and ticket history */
.grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.grid > article { margin-top: 0; }
.moderation-controls[hidden] { display: none; }
.ticket { cursor: pointer; }
.ticket-list { overflow: hidden; border-top: 1px solid #1f315b; }
.ticket-row { grid-template-columns: minmax(0, 1fr) auto 105px auto; cursor: pointer; }
.ticket-row:hover { background: linear-gradient(90deg, #17306955, #7a4eff0e, transparent); }
.ticket-row > div { min-width: 0; }
.ticket-actions { display: flex; gap: 10px; margin: 17px 0; }
.ticket-actions .action { flex: 1; }
.ticket-detail { max-height: 505px; overflow: auto; padding-right: 5px; }
.ticket-detail p { margin: 0; padding: 12px 0; border-bottom: 1px solid #1b2e57; color: #bdcce6; line-height: 1.45; }
.ticket-detail a { color: var(--blue); }
.moderation-controls select, .moderation-controls textarea { width: 100%; margin: 6px 0; padding: 10px; border: 1px solid #3a5ea4; border-radius: 9px; outline: 0; color: #e8f4ff; background: #080f25; }
.moderation-controls select:focus, .moderation-controls textarea:focus { border-color: var(--blue); box-shadow: 0 0 15px #55d9ff33; }
.moderation-controls textarea { resize: vertical; }
.action { display: block; width: 100%; margin: 10px 0; padding: 12px; border: 1px solid #5884df; border-radius: 9px; color: #fff; background: linear-gradient(100deg, #1759ad, #692fd0); box-shadow: 0 0 16px #633cff30, inset 0 1px #fff3; font-weight: 800; cursor: pointer; transition: .2s; }
.action:hover { filter: brightness(1.14); border-color: #a5eaff; box-shadow: 0 0 23px #663fff66, inset 0 1px #fff6; transform: translateY(-1px); }
.action.danger, .action.warn { border-color: #ff6684; background: linear-gradient(100deg, #a52653, #662065); box-shadow: 0 0 17px #ff447044, inset 0 1px #fff3; }
.health { display: flex; justify-content: space-between; padding: 11px 4px; border-bottom: 1px solid #1f315b; color: #b8c9e3; }
.health span, .health b { color: var(--green); }
.row.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 120px 70px; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #1b2e57; }
.row.ticket > div { min-width: 0; }
.row.ticket b { color: #ecf5ff; }
.row.ticket small { color: #7186aa; }
.row.ticket span { color: #77caff; }
.row.ticket em { color: var(--green); font-style: normal; }

/* Legacy moderator markup compatibility */
main:not(.app-shell) { display: flex; min-height: 100vh; }
main:not(.app-shell) > aside { width: 282px; flex: none; padding: 30px 18px; border-right: 1px solid #342b79; background: linear-gradient(180deg, #090d21f4, #02040cf8); box-shadow: 20px 0 60px #000b; }
.sidebar + section, aside + section { flex: 1; width: 100%; min-width: 0; max-width: 1840px; margin: auto; padding: 28px 38px 58px; }
main:not(.app-shell) > section > header { display: flex; align-items: center; justify-content: space-between; min-height: 182px; margin-bottom: 20px; padding: 31px 34px; border: 1px solid #4876d1; border-radius: 16px; background: linear-gradient(112deg, #0e1b3bf7, #0a1430f2 49%, #11103cf0); box-shadow: 0 0 44px #1b57a832, inset 0 1px #fff2; }
main:not(.app-shell) > section > header h1 { margin: 0; color: #fff; font-size: 42px; letter-spacing: 2px; }
main:not(.app-shell) > section > header .user { color: #c5e7ff; text-align: right; }

@media (max-width: 1250px) {
  .sidebar { width: 245px; }
  .workspace, .sidebar + section, aside + section { padding: 22px 24px 45px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { width: 82px; padding: 20px 10px; }
  .brand-name, .brand-subtitle, .brand-line, .side-label, .nav-item span, .nav-item em, .sidebar-bottom { display: none; }
  .brand-block { margin: 0 5px 30px; padding: 0; border: 0; }
  .brand-block::after { display: none; }
  .nav-item { grid-template-columns: 1fr; padding: 12px; }
  .nav-item i { margin: auto; }
  .workspace, .sidebar + section, aside + section { padding: 15px; }
  .dashboard-grid, .settings-grid, .grid { grid-template-columns: 1fr; }
  .hero { min-height: 155px; padding: 25px; }
  .hero h1, main:not(.app-shell) > section > header h1 { font-size: 33px; }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .crumb { display: none; }
  .user-card { min-width: auto; }
  .user-card > div:not(.avatar), .logout { display: none; }
  .hero { min-height: 132px; padding: 21px; }
  .hero-mark { display: none; }
  .hero h1, main:not(.app-shell) > section > header h1 { font-size: 26px; letter-spacing: 1px; }
  .metrics { grid-template-columns: 1fr; }
  .panel { padding: 17px; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr !important; gap: 6px; padding: 15px; }
  .table-row .pill, .row-action { justify-self: start; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .search { width: 100%; }
  .log-row { grid-template-columns: 30px 1fr; }
  .log-row > span:last-child { grid-column: 2; text-align: left; }
  .ticket-actions { flex-direction: column; }
  .ticket-row { grid-template-columns: 1fr !important; }
}
