:root {
  /* Premium skin-market palette — deep cool charcoal, emerald action accent, gold currency */
  --bg: #0b0e14;
  --bg-2: #0f131b;
  --panel: #151a23;
  --panel-2: #1b212d;
  --panel-3: #222a39;
  --line: #232b39;
  --line-2: #323c4f;
  --text: #eef2f8;
  --muted: #8a95a8;

  --accent: #27c07a;
  --accent-hi: #38d58b;
  --accent-dim: rgba(39, 192, 122, .13);
  --go: #27c07a;
  --go-hi: #38d58b;
  --gold: #f0b94a;
  --focus: #6fd8a6;

  --r-common: #b0c3d9;
  --r-uncommon: #5e98d9;
  --r-mil-spec: #4b69ff;
  --r-restricted: #8847ff;
  --r-classified: #d32ce6;
  --r-covert: #eb4b4b;
  --r-special: #f0b94a;

  --wear-fn: #4caf50;
  --wear-mw: #8bc34a;
  --wear-ft: #fbc02d;
  --wear-ww: #f57c00;
  --wear-bs: #e04141;
  --stattrak-orange: #e0863f;
  --souvenir-gold: #ffd700;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);

  --tile: 184px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 56px;
  background: #151c24;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: .01em; }
.brand-mark { width: 14px; height: 14px; background: var(--r-special); transform: rotate(45deg); border-radius: 2px; }
.tabs { display: flex; height: 100%; }
.tabs a {
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 16px;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.count { font-size: 13px; color: var(--muted); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.coins { color: var(--r-special); font-weight: 600; }
.player { color: var(--muted); }
.classic-link { color: var(--muted); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; }
.classic-link:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Layout ---------- */
.view:not([hidden]) { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.side {
  padding: 20px 16px; border-right: 1px solid var(--line);
  position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto;
}
.content { padding: 20px 24px 60px; min-width: 0; }

.search input {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
}
.search input::placeholder { color: var(--muted); }
.kinds { list-style: none; margin: 16px 0; padding: 0; }
.kinds button {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 10px; font: inherit; font-weight: 500; color: var(--muted);
  background: none; border: 0; border-radius: 3px; cursor: pointer; text-align: left;
}
.kinds button:hover { color: var(--text); background: var(--panel); }
.kinds button[aria-pressed="true"] { color: var(--text); background: var(--panel-2); }
.kinds .n { font-size: 13px; }
.side-note { color: var(--muted); font-size: 13px; margin: 20px 10px 0; max-width: 26ch; }
.sort { display: grid; gap: 6px; margin: 0 10px; color: var(--muted); font-size: 13px; }
.sort select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 6px 8px; }

.group-title { font-size: 18px; font-weight: 600; margin: 8px 0 12px; }
.group-title span { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 10px; margin-bottom: 28px; }
.empty { color: var(--muted); padding: 40px 0; }

/* ---------- Case tiles ---------- */
.case {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
  overflow: hidden;
}
.case:hover, .case:focus-within, .case.open { border-color: var(--muted); }
.case-art {
  display: grid; place-items: center; height: 120px; padding: 10px;
  background: radial-gradient(ellipse at 50% 60%, #3a4a5b 0%, var(--panel) 70%);
  cursor: default;
}
.case-art img { max-width: 100%; max-height: 100px; object-fit: contain; }
.case-body { padding: 8px 10px 10px; display: grid; gap: 6px; }
.case-name { font-weight: 600; font-size: 15px; line-height: 1.2; min-height: 2.4em; }
.case-meta { color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; }
.case-meta .price { color: var(--r-special); }
/* rarity distribution strip — the signature element */
.odds { display: flex; height: 5px; width: 100%; }
.odds i { display: block; height: 100%; }
.add { display: flex; gap: 6px; }
.add select { font: inherit; font-size: 14px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.add button {
  flex: 1; font: inherit; font-weight: 600; font-size: 14px; color: #fff;
  background: var(--go); border: 0; border-radius: 3px; padding: 7px 8px; cursor: pointer;
}
.add button:hover { background: var(--go-hi); }
.add button:disabled { opacity: .6; cursor: progress; }

/* ---------- Contents peek (Case hover inspection) ---------- */
.peek {
  position: fixed; z-index: 30; width: min(580px, calc(100vw - 32px)); max-height: min(72vh, 660px);
  overflow-y: auto; padding: 14px 16px 16px;
  pointer-events: auto;
  background: rgba(18, 24, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--r-special);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.15);
  font-family: var(--font);
}

.peek::-webkit-scrollbar { width: 6px; }
.peek::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 3px; }
.peek::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.peek::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.peek-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  margin-bottom: 12px;
}
.peek-rarity {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--r-special);
  margin-bottom: 2px;
}
.peek-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 6px;
}
.peek-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.badge-count {
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 3px;
}
.badge-price {
  font-size: 11.5px;
  color: var(--r-special);
  font-weight: 600;
  background: rgba(228, 174, 57, 0.1);
  border: 1px solid rgba(228, 174, 57, 0.25);
  padding: 2px 7px;
  border-radius: 3px;
}
.badge-st {
  font-size: 11.5px;
  color: var(--stattrak-orange);
  font-weight: 700;
  background: rgba(207, 106, 50, 0.12);
  border: 1px solid rgba(207, 106, 50, 0.3);
  padding: 2px 7px;
  border-radius: 3px;
}

.peek .tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c);
  margin: 14px 0 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.peek .tier-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.peek .tier-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}
.peek .tier span {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  text-transform: none;
  letter-spacing: normal;
}

.peek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
}
.mini {
  background: radial-gradient(ellipse at 50% 60%, #293645 0%, #1a222c 80%);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--c);
  border-radius: 4px;
  padding: 6px 5px 6px;
  text-align: center;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  cursor: pointer;
}
.mini:hover {
  transform: translateY(-2px);
  border-color: var(--c);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 8px var(--c);
}
.mini img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.mini b {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.mini small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.peek-more {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  margin: 6px 0 10px;
  font-style: italic;
}

/* ---------- Inventory tiles ---------- */
.item {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-bottom: 3px solid var(--c, var(--line)); border-radius: 3px; overflow: hidden;
  display: flex; flex-direction: column;
}
.item-art { display: grid; place-items: center; height: 118px; padding: 8px; background: radial-gradient(ellipse at 50% 55%, #364555 0%, var(--panel) 72%); }
.item-art img { max-width: 100%; max-height: 104px; object-fit: contain; }
.item-body { padding: 6px 10px 8px; display: grid; gap: 2px; }
.item-weapon { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-skin { font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 6px; font-size: 12.5px; color: var(--muted); }
.item-sub > span:empty { display: none; }
.st { color: #cf6a32; font-weight: 600; }
.sv { color: #ffd700; font-weight: 600; }
.badge-eq {
  position: absolute; top: 6px; right: 6px; font-size: 12px; font-weight: 600;
  background: var(--go); color: #fff; padding: 1px 7px; border-radius: 2px;
}
.item-actions {
  display: flex;
  gap: 6px;
  padding: 0 8px 8px;
  margin-top: auto;
}
.item-actions button {
  flex: 1;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 5px 6px;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.item-actions button:hover {
  border-color: var(--muted);
  background: #364555;
}
.item-actions .btn-sell {
  color: #ffc955;
  border-color: rgba(255, 201, 85, 0.3);
}
.item-actions .btn-sell:hover {
  background: rgba(255, 201, 85, 0.15);
  border-color: #ffc955;
}
.item-actions button:disabled {
  opacity: 0.5;
  cursor: progress;
}
.stickers { display: flex; gap: 2px; position: absolute; left: 6px; top: 6px; }
.stickers img { width: 22px; height: 22px; object-fit: contain; }

/* ---------- Hover Inspection Tooltip ---------- */
.csgo-tooltip {
  position: fixed;
  z-index: 9999;
  width: 360px;
  background: rgba(18, 24, 32, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.15);
  pointer-events: none;
  display: none;
  font-family: var(--font);
}
.csgo-tooltip.r-covert { border-top: 3px solid var(--r-covert); }
.csgo-tooltip.r-classified { border-top: 3px solid var(--r-classified); }
.csgo-tooltip.r-restricted { border-top: 3px solid var(--r-restricted); }
.csgo-tooltip.r-mil-spec { border-top: 3px solid var(--r-mil-spec); }
.csgo-tooltip.r-special { border-top: 3px solid var(--r-special); }
.csgo-tooltip.r-industrial, .csgo-tooltip.r-uncommon { border-top: 3px solid var(--r-uncommon); }
.csgo-tooltip.r-common, .csgo-tooltip.r-base { border-top: 3px solid var(--r-common); }

.tip-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.tip-rarity {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}
.tip-rarity.c-special { color: var(--r-special); }
.tip-rarity.c-covert { color: var(--r-covert); }
.tip-rarity.c-classified { color: var(--r-classified); }
.tip-rarity.c-restricted { color: var(--r-restricted); }
.tip-rarity.c-mil-spec { color: var(--r-mil-spec); }
.tip-rarity.c-uncommon, .tip-rarity.c-industrial { color: var(--r-uncommon); }
.tip-rarity.c-common, .tip-rarity.c-base { color: var(--r-common); }

.tip-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

/* StatTrak LED Tally */
.tip-stattrak-box {
  background: #110d0a;
  border: 1px solid #7c3f15;
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tip-stattrak-label {
  color: var(--stattrak-orange);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.tip-stattrak-count {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #ff7722;
  text-shadow: 0 0 8px rgba(255, 119, 34, 0.6);
  letter-spacing: 1px;
}

/* Souvenir Info */
.tip-souvenir-box {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
}
.tip-souvenir-event {
  color: var(--souvenir-gold);
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tip-souvenir-desc {
  color: #c9cdd8;
  line-height: 1.35;
}

/* Detailed Float Gauge */
.tip-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.tip-float-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 11px;
  margin-bottom: 10px;
}
.tip-float-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.tip-wear-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
}
.tip-float-val {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  color: #64b5f6;
  font-weight: 600;
}

/* Float Gauge Bar */
.tip-gauge-wrap {
  position: relative;
  margin: 8px 0 14px;
}
.tip-gauge-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--wear-fn) 0%, var(--wear-fn) 7%,
    var(--wear-mw) 7%, var(--wear-mw) 15%,
    var(--wear-ft) 15%, var(--wear-ft) 38%,
    var(--wear-ww) 38%, var(--wear-ww) 45%,
    var(--wear-bs) 45%, var(--wear-bs) 100%
  );
  position: relative;
}
.tip-gauge-needle {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 14px;
  background: #ffffff;
  box-shadow: 0 0 6px #fff, 0 0 8px var(--focus);
  border-radius: 2px;
  transform: translateX(-50%);
}
.tip-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.tip-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tip-meta-item {
  font-size: 11.5px;
  color: var(--muted);
}
.tip-meta-item span {
  color: #fff;
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  margin-left: 3px;
}

/* Stickers in Tooltip */
.tip-stickers-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 11px;
  margin-bottom: 10px;
}
.tip-stickers-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 5px;
}
.tip-sticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 4px 8px;
}
.tip-sticker-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.tip-sticker-details {
  flex: 1;
  min-width: 0;
}
.tip-sticker-name {
  font-size: 12px;
  font-weight: 600;
  color: #e3e9ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tip-sticker-slot {
  font-size: 10.5px;
  color: var(--muted);
}

.tip-value-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 201, 85, 0.08);
  border: 1px solid rgba(255, 201, 85, 0.25);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #ffc955;
  font-weight: 600;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: #10161d; border: 1px solid var(--line); border-left: 3px solid var(--go-hi);
  padding: 10px 16px; border-radius: 3px; opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  :root { --tile: 150px; }
  .topbar { gap: 12px; padding: 0 16px; overflow-x: auto; }
  .player, .brand { display: none; }
  .classic-link { white-space: nowrap; }
  .view:not([hidden]) { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .kinds { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
  .kinds button { width: auto; gap: 6px; }
  .side-note { display: none; }
  .sort { margin: 10px 0 0; }
  .content { padding: 16px; }
}

/* ====================== New tabs: Servers / Admin / Marketplace / Trade ====================== */
.view.full:not([hidden]) { display: block; min-height: calc(100vh - 56px); }
.view.full .content { padding: 24px 28px 60px; max-width: 1200px; margin: 0 auto; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.page-head h1 { font-size: 26px; font-weight: 700; margin: 0; }

/* buttons */
.btn, .btn-ghost {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  padding: 8px 14px; border-radius: 3px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn.go { background: var(--go); border-color: var(--go); }
.btn.go:hover { background: var(--go-hi); border-color: var(--go-hi); }
.btn.danger { background: #7a2e2e; border-color: #7a2e2e; }
.btn.danger:hover { background: #944040; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.mono { font-family: "Consolas", "Courier New", monospace; }

/* coming-soon placeholder */
.coming-soon { text-align: center; padding: 70px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; background: var(--panel); }
.coming-soon .cs-icon { font-size: 42px; margin-bottom: 10px; }
.coming-soon h2 { color: var(--text); margin: 0 0 8px; font-size: 20px; }
.coming-soon p { max-width: 46ch; margin: 0 auto; }

/* servers */
.servers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.server-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.server-card.online { border-color: #3c7a3c; }
.server-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.server-head .dot { width: 10px; height: 10px; border-radius: 50%; background: #d32f2f; flex: 0 0 auto; }
.server-card.online .server-head .dot { background: #58c15a; box-shadow: 0 0 8px #58c15a; }
.server-title { font-weight: 600; flex: 1; }
.server-state { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.server-card.online .server-state { color: #7cd97e; }
.server-rows { padding: 10px 16px; display: grid; gap: 8px; }
.server-rows > div { display: flex; justify-content: space-between; font-size: 14px; }
.server-rows label { color: var(--muted); }
.server-actions { padding: 0 16px 16px; }
.server-actions .btn { width: 100%; }

/* admin */
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.panel-wide { grid-column: 1 / -1; }
.server-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.pill.online { color: #7cd97e; border-color: #3c7a3c; }
.pill.offline { color: #e58; border-color: #7a2e2e; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.field-row { display: flex; gap: 8px; }
.field-col { display: grid; gap: 8px; }
.field-row input, .field-col input, .field-row select {
  flex: 1; min-width: 0; font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px;
}
.console {
  background: #10151b; border: 1px solid var(--line); border-radius: 4px;
  font-family: "Consolas", "Courier New", monospace; font-size: 12.5px; color: #9fe39f;
  padding: 10px 12px; height: 220px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; margin: 0 0 10px;
}
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } }

/* ====================== Marketplace & Trade ====================== */
.item .mk-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; margin-top: 2px; }
.item .mk-seller { color: var(--muted); }
.item .price, .item-sub .price { color: var(--r-special); font-weight: 600; }

/* trade builder */
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trade-side h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.trade-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow-y: auto; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; min-height: 60px; }
.pick-chip {
  display: flex; align-items: center; gap: 6px; max-width: 170px;
  padding: 4px 8px 4px 4px; font: inherit; font-size: 12px; cursor: pointer;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--c, var(--line)); border-radius: 3px;
}
.pick-chip img { width: 28px; height: 20px; object-fit: contain; }
.pick-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-chip:hover { border-color: var(--muted); }
.pick-chip.sel { background: var(--go); border-color: var(--go-hi); color: #fff; }

/* trade offers */
.offer { border: 1px solid var(--line); border-radius: 5px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.offer-head { font-weight: 600; margin-bottom: 8px; }
.offer-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.offer-line > label { flex: 0 0 72px; color: var(--muted); font-size: 12.5px; padding-top: 3px; }
.offer-items { display: flex; flex-wrap: wrap; gap: 5px; }
.offer-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 7px 2px 4px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--line)); border-radius: 3px; }
.offer-chip img { width: 22px; height: 16px; object-fit: contain; }
.offer-coins { font-size: 11.5px; padding: 3px 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; color: var(--r-special); font-weight: 600; }
.offer-actions { display: flex; gap: 8px; margin-top: 8px; }
@media (max-width: 700px) { .trade-cols { grid-template-columns: 1fr; } }

/* ---- Admin inline login ---- */
.admin-login { display: flex; justify-content: center; padding: 56px 16px; }
.admin-login-card { width: 100%; max-width: 360px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 34px 28px; }
.admin-login-card .cs-icon { font-size: 34px; margin-bottom: 10px; }
.admin-login-card h2 { margin: 0 0 4px; font-size: 20px; }
.admin-login-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.admin-login-card input { width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 11px 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 14px; font-family: inherit; }
.admin-login-card input:focus { outline: none; border-color: var(--r-special); }
.admin-login-card .btn.go { width: 100%; margin-top: 4px; }

/* ======================================================================
   PREMIUM SKIN-MARKET THEME  (override layer — restyles the whole site)
   ====================================================================== */

body {
  font: 400 14.5px/1.5 var(--font);
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(39,192,122,.06), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(75,105,255,.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, .brand { font-family: var(--display); letter-spacing: -0.01em; }

/* ---- Top bar ---- */
.topbar {
  height: 60px; gap: 26px; padding: 0 26px;
  background: rgba(13, 16, 23, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark {
  width: 16px; height: 16px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 14px rgba(39,192,122,.55); transform: rotate(45deg);
}
.tabs a {
  font-size: 14.5px; font-weight: 600; letter-spacing: 0; color: var(--muted);
  border-bottom: 2px solid transparent; position: relative;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.topbar-right { gap: 14px; }
.coins {
  color: var(--gold); font-weight: 700; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(240,185,74,.10); border: 1px solid rgba(240,185,74,.28);
}
.classic-link, .player.classic-link {
  color: var(--muted); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; font-weight: 600; background: var(--panel); transition: .14s;
}
.classic-link:hover, .player.classic-link:hover { color: #fff; border-color: var(--line-2); background: var(--panel-2); }

/* ---- Side / filters ---- */
.side { border-right: 1px solid var(--line); padding: 22px 16px; }
.search input, .sort select {
  border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line);
  padding: 10px 13px; transition: border-color .14s;
}
.search input:focus, .sort select:focus { outline: none; border-color: var(--accent); }
.kinds button { border-radius: var(--radius-sm); font-weight: 500; transition: .12s; }
.kinds button:hover { background: var(--panel); }
.kinds button[aria-pressed="true"] { color: #fff; background: var(--accent-dim); box-shadow: inset 0 0 0 1px rgba(39,192,122,.3); }

/* ---- Section headings ---- */
.group-title { font-size: 19px; font-weight: 700; }
.page-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }

/* ---- Case + Inventory cards ---- */
.case, .item {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.case:hover, .case.open, .item:hover {
  transform: translateY(-3px); border-color: var(--line-2);
  box-shadow: var(--shadow-lg);
}
.item:hover { border-color: color-mix(in srgb, var(--c, var(--line-2)) 55%, var(--line)); }
.case-art, .item-art {
  height: 128px; border-radius: 0;
  background: radial-gradient(ellipse at 50% 42%, #243041 0%, var(--bg-2) 74%);
  border-bottom: 2px solid var(--c, var(--line));
}
.item-art img, .case-art img { filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.case-name, .item-skin { font-weight: 700; }
.case-meta .price, .item-sub .price { color: var(--gold); font-weight: 700; }

/* buy/open buttons on cards */
.add button, .item-actions .btn-equip {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  border: 0; border-radius: var(--radius-sm); color: #04120b; font-weight: 700;
  box-shadow: 0 3px 10px rgba(39,192,122,.26); transition: .14s;
}
.add button:hover, .item-actions .btn-equip:hover { filter: brightness(1.07); box-shadow: 0 5px 16px rgba(39,192,122,.4); }
.add .btn-case-info {
  background: var(--panel-2) !important;
  border: 1px solid var(--line-2) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
.add .btn-case-info:hover {
  background: var(--panel-3) !important;
  border-color: var(--muted) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
.case-drop-only .case-art {
  background: radial-gradient(ellipse at 50% 42%, #2c251e 0%, var(--bg-2) 74%);
}
.add select { border-radius: var(--radius-sm); background: var(--panel-2); }
.item-actions button { border-radius: var(--radius-sm); background: var(--panel-2); }
.badge-eq { background: var(--accent); color: #04120b; border-radius: 6px; font-weight: 700; }

/* ---- Buttons (shared) ---- */
.btn, .btn-ghost { border-radius: var(--radius-sm); padding: 9px 16px; transition: .14s; }
.btn { background: var(--panel-2); border: 1px solid var(--line); }
.btn:hover { border-color: var(--line-2); background: var(--panel-3); }
.btn.go { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border: 0; color: #04120b; font-weight: 700; box-shadow: 0 3px 10px rgba(39,192,122,.26); }
.btn.go:hover { filter: brightness(1.07); box-shadow: 0 5px 16px rgba(39,192,122,.4); }
.btn.danger { background: #3a1f24; border: 1px solid #7a3340; color: #ff9aa2; }
.btn.danger:hover { background: #4a262c; border-color: #a04452; }

/* ---- Panels ---- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 16px; }
.field-row input, .field-col input, .field-row select { border-radius: var(--radius-sm); background: var(--panel-2); padding: 9px 12px; }
.field-row input:focus, .field-col input:focus, .field-row select:focus { outline: none; border-color: var(--accent); }

/* ---- Servers ---- */
.server-card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border-radius: var(--radius); box-shadow: var(--shadow); }
.server-card.online { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.server-head { background: var(--panel-2); }
.server-card.online .server-head .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.server-card.online .server-state { color: var(--accent-hi); }
.pill { border-radius: 999px; }
.pill.online { color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* ---- Toast ---- */
.toast { border-radius: var(--radius-sm); border-left: 3px solid var(--accent); background: #10151d; box-shadow: var(--shadow-lg); }

/* ======================================================================
   MARKETPLACE  (dedicated premium listing cards)
   ====================================================================== */
.mk-composer {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.mk-composer .mk-field { display: grid; gap: 6px; }
.mk-composer .mk-field.grow { flex: 1; min-width: 220px; }
.mk-composer label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.mk-composer select, .mk-composer input {
  font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
.mk-composer select:focus, .mk-composer input:focus { outline: none; border-color: var(--accent); }
.mk-composer input[type=number] { width: 150px; }
.mk-composer .btn.go { padding: 10px 22px; }
.mk-hint { width: 100%; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.mk-hint b { color: var(--gold); }

.mk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.mk-toolbar .count-chip { font-size: 13px; color: var(--muted); }
.mk-toolbar .count-chip b { color: var(--text); }

.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; }

.mk-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.mk-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c, var(--line-2)) 60%, var(--line)); box-shadow: var(--shadow-lg); }
.mk-card-art {
  position: relative; height: 146px; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--c, #2a3647) 26%, transparent) 0%, var(--bg-2) 72%);
  border-bottom: 2px solid var(--c, var(--line));
}
.mk-card-art img { max-width: 100%; max-height: 110px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.mk-wear-tag {
  position: absolute; left: 10px; bottom: 10px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: var(--wear-c, #cfd8e3); border: 1px solid rgba(255,255,255,.08);
}
.mk-st-tag {
  position: absolute; right: 10px; top: 10px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 6px; color: var(--stattrak-orange);
  background: rgba(224,134,63,.14); border: 1px solid rgba(224,134,63,.4);
}
.mk-card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mk-weapon { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-skin { font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-seller-line { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.mk-seller-line b { color: #c3ccd9; font-weight: 600; }
.mk-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.mk-price { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--gold); display: flex; align-items: center; gap: 5px; }
.mk-price::before { content: "◈"; font-size: 13px; opacity: .8; }
.mk-card-foot { padding: 0 13px 13px; }
.mk-buy, .mk-cancel {
  width: 100%; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer;
  padding: 9px; border-radius: var(--radius-sm); transition: .14s;
}
.mk-buy { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border: 0; color: #04120b; box-shadow: 0 3px 10px rgba(39,192,122,.26); }
.mk-buy:hover { filter: brightness(1.07); box-shadow: 0 5px 16px rgba(39,192,122,.42); }
.mk-cancel { background: var(--panel-2); border: 1px solid rgba(240,185,74,.3); color: var(--gold); }
.mk-cancel:hover { background: rgba(240,185,74,.12); border-color: var(--gold); }
.mk-buy:disabled, .mk-cancel:disabled { opacity: .5; cursor: progress; }
.mk-mine-tag { position: absolute; left: 10px; top: 10px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent-dim); color: var(--accent-hi); border: 1px solid rgba(39,192,122,.35); }

@media (max-width: 760px) {
  .mk-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .mk-composer { gap: 10px; }
}

/* ======================================================================
   LOGIN GATE + PLAYER MENU
   ====================================================================== */
body.app-locked .topbar,
body.app-locked .view,
body.app-locked .peek,
body.app-locked #toast { display: none !important; }

.login-gate { display: none; }
body.app-locked .login-gate {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 100; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(39,192,122,.10), transparent 60%),
    radial-gradient(700px 500px at 85% 110%, rgba(75,105,255,.08), transparent 55%),
    var(--bg);
}
.login-box {
  width: 100%; max-width: 440px; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 34px; box-shadow: var(--shadow-lg);
}
.login-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 20px;
}
.login-box h1 { font-size: 26px; margin: 0 0 10px; letter-spacing: -0.02em; }
.login-box p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 auto 22px; max-width: 34ch; }
.steam-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; box-sizing: border-box; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: #04120b;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  border: 0; border-radius: 12px; padding: 15px 20px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(39,192,122,.32); transition: .15s;
}
.steam-btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(39,192,122,.45); }
.login-fine { font-size: 12px !important; color: var(--muted); margin: 18px auto 0 !important; max-width: 36ch; }
.login-fine b { color: #c3ccd9; }

/* player button with avatar + dropdown */
.player-wrap { position: relative; }
.player.classic-link { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; }
.pf-ava { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.pf-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-caret { font-size: 10px; opacity: .7; }
.player-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; z-index: 40;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 6px; overflow: hidden;
}
.pm-item {
  width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text);
  background: none; border: 0; border-radius: 7px; padding: 9px 11px; cursor: pointer;
}
.pm-item:hover { background: var(--panel-2); color: #fff; }

/* ======================================================================
   MARKETPLACE SELL PICKER + TRADE PLAYER SEARCH
   ====================================================================== */
.mk-sell {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.mk-sell-head h2 { margin: 0 0 3px; font-size: 17px; }
.mk-sell-head p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.mk-pick {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px;
  max-height: 268px; overflow-y: auto; padding: 2px;
}
.mk-pick-empty { grid-column: 1/-1; color: var(--muted); font-size: 13px; padding: 20px 4px; margin: 0; }
.mk-pick-card {
  display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.mk-pick-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.mk-pick-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(39,192,122,.25); }
.mk-pick-art {
  height: 74px; display: grid; place-items: center; padding: 8px;
  background: radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--c,#2a3647) 22%, transparent), var(--bg-2) 75%);
  border-bottom: 2px solid var(--c, var(--line));
}
.mk-pick-art img { max-width: 100%; max-height: 58px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
.mk-pick-info { padding: 7px 9px 9px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mk-pick-weapon { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-pick-skin { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-pick-wear { font-size: 10px; font-weight: 700; margin-top: 2px; }

.mk-sell-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mk-sell-chosen { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; }
.mk-sell-chosen img { width: 56px; height: 42px; object-fit: contain; background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--c,#2a3647) 26%, transparent), transparent 72%); border-radius: 6px; padding: 2px 6px; }
.mk-sell-chosen > div { display: flex; flex-direction: column; min-width: 0; }
.mk-sell-weapon { font-size: 11.5px; color: var(--muted); }
.mk-sell-skin { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-price-field { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; }
.mk-price-field:focus-within { border-color: var(--accent); }
.mk-price-field .mk-coin { color: var(--gold); font-weight: 700; }
.mk-price-field input { width: 170px; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-weight: 600; padding: 11px 0; }

/* trade player search */
.tr-search { position: relative; max-width: 420px; margin-bottom: 12px; }
.tr-search input {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px;
}
.tr-search input:focus { outline: none; border-color: var(--accent); }
.tr-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: 300px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 5px;
}
.tr-result { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text); background: none; border: 0; border-radius: 7px; padding: 8px 10px; cursor: pointer; }
.tr-result:hover { background: var(--panel-2); }
.tr-result img, .tr-ava-ph { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.tr-ava-ph { background: var(--panel-3); }
.tr-result-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-result-empty { color: var(--muted); font-size: 13px; padding: 12px 10px; }
.tr-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent-dim); border: 1px solid rgba(39,192,122,.3); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.tr-chosen b { color: var(--accent-hi); }

/* ====================== LEADERBOARD ====================== */
.lb-hero {
  background: linear-gradient(135deg, rgba(21, 26, 35, 0.95), rgba(27, 33, 45, 0.95));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lb-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(39, 192, 122, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.lb-hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.lb-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lb-hero-rank-icon {
  width: 88px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}
.lb-hero-titles h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-hero-titles .lb-rank-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border: 1px solid rgba(39, 192, 122, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}
.lb-hero-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.lb-hero-meta b {
  color: var(--text);
}
.lb-hero-progress {
  min-width: 280px;
  flex: 1;
  max-width: 380px;
}
.lb-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.lb-progress-bar {
  height: 8px;
  background: var(--panel-3);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.lb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* Podium */
.lb-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
  align-items: end;
}
@media (max-width: 768px) {
  .lb-podium {
    grid-template-columns: 1fr;
  }
}
.podium-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.podium-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.podium-card.gold {
  border-color: rgba(240, 185, 74, 0.5);
  background: linear-gradient(180deg, rgba(240, 185, 74, 0.08) 0%, var(--panel) 100%);
  padding-top: 28px;
}
.podium-card.gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f0b94a, #ffe58f, #f0b94a);
}
.podium-card.silver {
  border-color: rgba(176, 195, 217, 0.4);
  background: linear-gradient(180deg, rgba(176, 195, 217, 0.06) 0%, var(--panel) 100%);
}
.podium-card.silver::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #8a9bb3, #dbe4ef, #8a9bb3);
}
.podium-card.bronze {
  border-color: rgba(205, 127, 50, 0.4);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.06) 0%, var(--panel) 100%);
}
.podium-card.bronze::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #b87333, #e8a87c, #b87333);
}

.podium-place-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.podium-card.gold .podium-place-badge {
  background: #f0b94a;
  color: #111;
  box-shadow: 0 0 16px rgba(240, 185, 74, 0.4);
}
.podium-card.silver .podium-place-badge {
  background: #c5d1de;
  color: #111;
  box-shadow: 0 0 14px rgba(197, 209, 222, 0.3);
}
.podium-card.bronze .podium-place-badge {
  background: #cd7f32;
  color: #fff;
  box-shadow: 0 0 14px rgba(205, 127, 50, 0.3);
}

.podium-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
}
.podium-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-2);
}
.podium-card.gold .podium-avatar {
  border-color: #f0b94a;
}
.podium-rank-icon {
  width: 64px;
  height: 34px;
  object-fit: contain;
  margin: 6px auto;
  display: block;
}
.podium-name {
  font-weight: 700;
  font-size: 16px;
  margin: 6px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-elo {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-hi);
  margin-bottom: 8px;
}
.podium-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 8px;
}
.podium-stats b {
  color: var(--text);
}

/* Toolbar & Filters */
.lb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.lb-search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}
.lb-search-box input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 34px;
}
.lb-search-box input:focus {
  outline: none;
  border-color: var(--accent);
}
.lb-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.lb-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lb-filter-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lb-filter-btn:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.lb-filter-btn.active {
  background: var(--panel-3);
  color: var(--text);
  border-color: var(--accent);
}

/* Table */
.lb-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.lb-table th {
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.lb-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.lb-table tbody tr {
  transition: background 0.15s ease;
}
.lb-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.lb-table tbody tr.is-current-user {
  background: rgba(39, 192, 122, 0.07);
}
.lb-table tbody tr.is-current-user td {
  border-bottom-color: rgba(39, 192, 122, 0.25);
}

.lb-pos {
  font-weight: 800;
  font-size: 15px;
  width: 44px;
  color: var(--muted);
}
.lb-pos.pos-1 { color: #f0b94a; }
.lb-pos.pos-2 { color: #c5d1de; }
.lb-pos.pos-3 { color: #cd7f32; }

.lb-player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.lb-player-info {
  display: flex;
  flex-direction: column;
}
.lb-player-name {
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lb-you-badge {
  font-size: 11px;
  background: var(--accent);
  color: #0b0e14;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.lb-player-sid {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.lb-rank-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.lb-rank-cell img {
  width: 52px;
  height: 28px;
  object-fit: contain;
}
.lb-rank-title {
  font-weight: 600;
}

.badge-win {
  display: inline-block;
  background: rgba(39, 192, 122, 0.15);
  color: var(--accent-hi);
  border: 1px solid rgba(39, 192, 122, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
}
.badge-loss {
  display: inline-block;
  background: rgba(235, 75, 75, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(235, 75, 75, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
}

.winrate-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12.5px;
}
.winrate-high {
  background: rgba(39, 192, 122, 0.18);
  color: #38d58b;
  border: 1px solid rgba(39, 192, 122, 0.4);
}
.winrate-mid {
  background: rgba(240, 185, 74, 0.18);
  color: #f0b94a;
  border: 1px solid rgba(240, 185, 74, 0.4);
}
.winrate-low {
  background: rgba(235, 75, 75, 0.18);
  color: #ff6b6b;
  border: 1px solid rgba(235, 75, 75, 0.4);
}

/* Ladder Guide Section */
.ladder-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 10px;
}
.ladder-header {
  margin-bottom: 20px;
}
.ladder-header h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.ladder-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.ladder-rule-box {
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ladder-rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ladder-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.ladder-tier-group {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.ladder-tier-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.ladder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: 4px;
}
.ladder-item:hover {
  background: var(--panel-3);
}
.ladder-item img {
  width: 44px;
  height: 24px;
  object-fit: contain;
}
.ladder-item-info {
  display: flex;
  flex-direction: column;
}
.ladder-item-name {
  font-weight: 600;
  font-size: 13px;
}
.ladder-item-elo {
  font-size: 11.5px;
  color: var(--accent-hi);
  font-weight: 600;
}


/* ====================== MATCH HISTORY ====================== */
.match-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.m-stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-stat-card label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.m-stat-val {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--display);
  color: var(--text);
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}
.match-card.win {
  border-left-color: var(--accent);
}
.match-card.loss {
  border-left-color: #eb4b4b;
}
.match-card.tie {
  border-left-color: #f0b94a;
}

.match-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.match-main-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.match-result-badge {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.match-result-badge.win {
  background: rgba(39, 192, 122, 0.18);
  color: #38d58b;
  border: 1px solid rgba(39, 192, 122, 0.4);
}
.match-result-badge.loss {
  background: rgba(235, 75, 75, 0.18);
  color: #ff6b6b;
  border: 1px solid rgba(235, 75, 75, 0.4);
}
.match-result-badge.tie {
  background: rgba(240, 185, 74, 0.18);
  color: #f0b94a;
  border: 1px solid rgba(240, 185, 74, 0.4);
}

.map-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.match-score-block {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--display);
}
.score-team.won, .score-enemy.won {
  color: var(--accent-hi);
}
.score-divider {
  color: var(--muted);
}

.match-elo-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
}
.match-elo-pill.elo-pos {
  background: rgba(39, 192, 122, 0.15);
  color: #38d58b;
  border: 1px solid rgba(39, 192, 122, 0.35);
}
.match-elo-pill.elo-neg {
  background: rgba(235, 75, 75, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(235, 75, 75, 0.35);
}
.match-elo-pill.elo-neutral {
  background: var(--panel-3);
  color: var(--muted);
  border: 1px solid var(--line);
}

.match-meta-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}
.match-matchup-pill {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
}
.match-time-tag {
  font-size: 13px;
  color: var(--muted);
}

.match-rating-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  padding: 8px 20px;
}
.match-rating-bar b {
  color: var(--text);
}
.vs-divider {
  font-weight: 800;
  color: var(--accent-hi);
  font-size: 11px;
}

/* Scoreboard Accordion */
.match-details {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 16px 20px 20px;
}
.scoreboard-tables-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}
.sb-team-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sb-team-header {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.sb-team-header.friendly {
  background: rgba(39, 192, 122, 0.1);
  color: var(--accent-hi);
}
.sb-team-header.enemy {
  background: rgba(235, 75, 75, 0.1);
  color: #ff6b6b;
}
.sb-avg-rank {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.sb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.sb-table th {
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.sb-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.sb-table tbody tr.is-you {
  background: rgba(39, 192, 122, 0.16) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sb-table tbody tr.is-you .sb-p-name {
  color: #fff !important;
  font-weight: 700 !important;
}
.sb-p-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sb-rank-mini {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sb-rank-mini img {
  width: 32px;
  height: 18px;
  object-fit: contain;
}
.sb-rank-mini span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.empty-matches-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 24px;
}

.lb-podium.solo { display: flex; justify-content: center; max-width: 380px; margin: 0 auto 28px; }
.lb-podium.solo .podium-card { width: 100%; }

/* Whitelist & Approval Styles */
.pending-approval-banner {
  background: linear-gradient(90deg, rgba(230, 126, 34, 0.15), rgba(243, 156, 18, 0.25));
  border: 1px solid rgba(243, 156, 18, 0.5);
  border-radius: 8px;
  margin: 12px 16px 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.pab-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pab-icon {
  font-size: 28px;
  line-height: 1;
}
.pab-text strong {
  display: block;
  font-size: 15px;
  color: #f39c12;
  margin-bottom: 4px;
}
.pab-text p {
  margin: 0;
  font-size: 13px;
  color: #ddd;
  line-height: 1.4;
}

.badge-pending {
  background: rgba(243, 156, 18, 0.2);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.5);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-approved {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.5);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.whitelist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.whitelist-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.whitelist-table td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.whitelist-table tr:hover {
  background: rgba(255,255,255,0.02);
}
.whitelist-table code {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #aaa;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}

/* ======================================================================
   AWAITING WHITELIST APPROVAL GATE
   ====================================================================== */
.approval-gate { display: none; }
body.app-pending-approval .topbar,
body.app-pending-approval .view,
body.app-pending-approval .peek,
body.app-pending-approval #toast { display: none !important; }

body.app-pending-approval .approval-gate {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 100; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(245,158,11,.15), transparent 60%),
    radial-gradient(700px 500px at 85% 110%, rgba(75,105,255,.08), transparent 55%),
    var(--bg);
}
.approval-box {
  border-color: rgba(245,158,11,.35) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 40px rgba(245,158,11,.1) !important;
}
.approval-avatar-wrap {
  margin: 0 auto 16px;
  width: 72px; height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 20px rgba(245,158,11,.3);
}
.approval-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.approval-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.3);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.pab-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.75); }
}
.approval-btn-row {
  display: flex; gap: 10px; margin-top: 20px;
}
.btn-check-approval {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #04120b;
  background: linear-gradient(180deg, #fef08a, #f59e0b);
  border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,158,11,.3); transition: .15s;
}
.btn-check-approval:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-approval-logout {
  font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; cursor: pointer;
}
.btn-approval-logout:hover { color: #fff; background: var(--panel); }

.sb-mvp-badge {
  color: #f59e0b;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
}
.sb-hs-val {
  color: #60a5fa;
  font-weight: 600;
  font-size: 12px;
}
.sb-adr-val {
  color: #f97316;
  font-weight: 600;
  font-size: 12.5px;
}

/* ======================================================================
   LIVE MATCH MONITOR WIDGET
   ====================================================================== */
.live-match-card {
  background: linear-gradient(180deg, rgba(39, 192, 122, 0.08), var(--panel));
  border: 1px solid rgba(39, 192, 122, 0.35);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(39, 192, 122, 0.12);
}
.live-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-hi);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.live-pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--accent-hi);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-hi);
  animation: pulse-dot 1.2s infinite;
}
.live-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.live-score {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.live-round-info {
  font-size: 12px;
  color: var(--muted);
}
