:root {
  --bg: #090a0f;
  --surface: #0d0f14;
  --card: #11131a;
  --card-hover: #161922;
  --border: #1a1d27;
  --border-light: #252a36;
  --text: #8b94a5;
  --text-bright: #e1e5ec;
  --muted: #7082a3;
  --accent: #f97316;
  --accent-dim: rgba(249,115,22,0.08);
  --accent-hover: #ea580c;
  --green: #4ade80;
  --green-dim: rgba(74,222,128,0.08);
  --green-glow: rgba(74,222,128,0.15);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.08);
  --discord: #5865F2;
  --sidebar-width: 230px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

.app { display: flex; min-height: 100vh; }
.activity-action.event-click-affiliate {
    color: #68e56d;
    font-weight: 600;
}
/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }

/* Discord card */
.discord-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}
.discord-card-icon {
  color: var(--discord);
  margin-bottom: 0.3rem;
}
.discord-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}
.discord-card p {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.discord-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--discord);
  color: #fff;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s;
}
.discord-card-btn:hover { background: #4752C4; }

/* Mobile Discord banner */
.mobile-discord-banner {
  display: none;
}

/* Sidebar user */
.sidebar-user {
  margin-top: 0.5rem;
}
.discord-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--discord);
  color: #fff;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  width: 100%;
  transition: background 0.15s;
}
.discord-login-btn:hover { background: #4752C4; }
.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}
.sidebar-user-pill img {
  width: 22px; height: 22px;
  border-radius: 50%;
}
.logout-btn {
  display: block;
  text-align: center;
  background: var(--red);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  width: 100%;
}
.logout-btn:hover { background: #dc2626; }

/* ===== MAIN ===== */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 2rem 3rem 3rem;
  max-width: calc(100vw - var(--sidebar-width));
}

/* ===== HERO ===== */
.hero {
  margin-bottom: 2.5rem;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}
.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.4rem;
  font-weight: 400;
}

/* ===== PAGES ===== */
.page { display: none; }
.page:first-of-type { display: block; }

/* ===== SECTIONS ===== */
.section { margin-bottom: 2.5rem; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.section-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
  margin-top: -0.4rem;
}
.view-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.view-all:hover { color: var(--accent-hover); }

/* ===== DEALS TOOLBAR ===== */
.deals-toolbar {
  margin-bottom: 1rem;
}
.deals-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ===== TABLE STATUS ===== */
.table-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.table-status .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,220,132,0.4); }
  70% { box-shadow: 0 0 0 6px rgba(61,220,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); }
}
.table-status strong { color: var(--text-bright); font-weight: 700; }

/* ===== DATA CARD ===== */
.data-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* ===== TABLE ===== */
table { width: 100%; border-collapse: collapse; }

th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.item-name {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.item-masked {
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.05em;
}
.item-site {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

.price {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.price-good { color: var(--green); }
.price-bad { color: var(--red); }

.profit {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.profit.positive { color: var(--green); }
.profit.negative { color: var(--red); }

.updated {
  color: var(--muted);
  font-size: 0.82rem;
}
.updated.stale { color: var(--red); }
.updated.fresh { color: var(--green); }

.market-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.market-tag .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ===== MARKET CHIPS (About page) ===== */
.market-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-bright);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.market-chip:hover {
  border-color: var(--chip-color, var(--accent));
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 8%, var(--card));
  transform: translateY(-1px);
}
.market-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== PRICE CHECK MARKET LINKS ===== */
.market-tag-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.12s;
}
.market-tag-link:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricecheck-row {
  transition: background 0.12s;
}
.pricecheck-row:hover td {
  background: rgba(255,255,255,0.02);
}

/* Mobile: smaller chips */
@media (max-width: 600px) {
  body { font-size: 0.75rem; }
  .hero h1 { font-size: 1.25rem; }
  .hero-sub { font-size: 0.8rem; }
  .section h2 { font-size: 0.95rem; }

  .data-card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .deals-table { min-width: 480px; width: max-content; }
  .item-name { max-width: 120px; }

  td { font-size: 0.75rem; padding: 0.4rem 0.4rem; }
  th { font-size: 0.5rem; padding: 0.4rem 0.4rem; letter-spacing: 0.04em; }
  .item-name { font-size: 0.76rem; line-height: 1.3; }
  .item-site { font-size: 0.65rem; margin-top: 0.1rem; }
  .price { font-size: 0.78rem; }
  .profit { font-size: 0.76rem; }
  .updated { font-size: 0.7rem; }
  .copy-btn { width: 18px; height: 18px; }
  .copy-btn svg { width: 10px; height: 10px; }
  .page-btn { min-width: 24px; height: 24px; font-size: 0.7rem; }
  .pagination-wrap { font-size: 0.72rem; padding: 0.5rem 0.6rem; }
  .table-footer { font-size: 0.68rem; padding: 0.5rem 0.6rem; }

  .mobile-discord-btn { font-size: 0.78rem; padding: 0.5rem 0.7rem; }
  .compare-sites select { font-size: 0.75rem; padding: 0.35rem 0.45rem; }
  .compare-prices .filter-group input { font-size: 0.75rem; padding: 0.35rem 0.45rem; }
  .compare-prices .btn-primary { font-size: 0.75rem; padding: 0.4rem 0.5rem; }
  .logo-title { font-size: 0.9rem; }

  /* ----- NEW: reorder filters ----- */
  .deals-filters {
    flex-direction: column;
    gap: 0.5rem;
  }
  .search-box {
    flex: 0 0 100%;
    order: -1;
  }
  .filter-group {
    flex: 1 1 100%;
    width: 100%;
  }
  .filter-group select,
  .filter-group input {
    width: 100%;
    min-width: 0;
  }

  /* existing compact filters */
  .deals-filters { gap: 0.4rem; }
  .filter-group label { font-size: 0.55rem; }
  .filter-group select,
  .filter-group input { padding: 0.35rem 0.45rem; font-size: 0.75rem; }
}

/* ===== PAGINATION ===== */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--muted);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0 0.5rem;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.page-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.page-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* ===== TABLE FOOTER ===== */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--muted);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-note {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.footer-source { flex: 1; text-align: center; }

/* ===== FILTERS ===== */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.filter-group label {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filter-group select,
.filter-group input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  min-width: 120px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

.search-box {
  position: relative;
  flex: 1;
}
.search-box svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-box input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-box input::placeholder { color: var(--muted); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ===== PRICE CHECK ===== */
.pricecheck-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pricecheck-result-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0.75rem 0 0.5rem;
}

.pricecheck-table th { font-size: 0.6rem; }
.pricecheck-table td { padding: 0.55rem 1rem; font-size: 0.85rem; }

.best-price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.best-price-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.best-price-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
}
.profit-summary {
  font-size: 0.75rem;
  color: var(--muted);
}
.profit-summary .profit-val {
  color: var(--green);
  font-weight: 700;
}

.rustypot-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}
.rustypot-reference .ref-label {
  color: var(--muted);
}
.rustypot-reference .ref-label strong {
  color: var(--text-bright);
}
.rustypot-reference .ref-price {
  color: var(--red);
  font-weight: 700;
}

/* ===== COMPARE ===== */
.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.compare-sites {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.compare-sites select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  min-width: 130px;
  outline: none;
}
.compare-sites select:focus { border-color: var(--accent); }
.compare-sites .vs {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.compare-prices {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.compare-prices .filter-group input {
  width: 80px;
}

/* ===== SUGGEST ===== */
.suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}
.suggest-item {
  padding: 0.55rem 0.9rem;
  font-size: 0.83rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.empty-state { text-align: center; padding: 3rem; color: var(--muted); font-size: 0.9rem; }

/* ===== DONOR BANNER ===== */
.donor-banner {
  background: var(--accent-dim);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.donor-banner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}
.donor-banner a:hover {
  color: var(--accent-hover);
}

/* ===== RUSTYPOT AFFILIATE BANNER ===== */
.rp-aff-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.rp-aff-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.rp-aff-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.rp-aff-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}
.rp-aff-code {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.82rem;
  font-weight: 600;
}
.rp-aff-link {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
}
.rp-aff-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ===== PROMO BOX ===== */
.promo-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.promo-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
}
.promo-site {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-bright);
  min-width: 120px;
}
.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.promo-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.promo-cta {
  font-size: 0.88rem;
  color: var(--text);
}
.promo-cta strong {
  color: var(--text-bright);
}
.promo-perk {
  font-size: 0.8rem;
  color: var(--muted);
}
.promo-btn {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
}
.promo-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ===== COPY TOAST ===== */
.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ADMIN STATS ===== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== ROLE BADGES ===== */
.role-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.role-guest { background: rgba(107,114,128,0.15); color: #9ca3af; }
.role-member { background: rgba(59,130,246,0.15); color: #60a5fa; }
.role-admin { background: rgba(239,68,68,0.15); color: #f87171; }
.role-donated { background: rgba(245,158,11,0.15); color: #fbbf24; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.modal-simple {
  padding: 2rem;
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text-bright); }
.modal-simple-body { text-align: center; }
.modal-discord-big svg {
  color: var(--discord);
  margin-bottom: 0.5rem;
}
.modal-discord-big h2 {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}
.modal-discord-big p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.modal-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--discord);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.modal-discord-btn:hover { background: #4752C4; }
.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.modal-donor-icon {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.modal-donor-info h3 {
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}
.modal-donor-info p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.tag-donor {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.modal-note {
  margin-top: 0.5rem;
  font-size: 0.75rem !important;
  opacity: 0.8;
}

/* ===== COPY BUTTON ===== */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  margin-right: 0.35rem;
  transition: all 0.15s;
}
.copy-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 1.25rem 1rem; padding-top: calc(56px + 1.25rem); max-width: 100vw; }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.9rem; }
  .deals-filters { width: 100%; }
  .filter-group { flex: 1; }
  .filter-group select, .filter-group input { width: 100%; min-width: auto; }

  /* Compare: 2 rows on mobile */
  .compare-toolbar { gap: 0.5rem; }
  .compare-sites { width: 100%; }
  .compare-sites select { flex: 1; min-width: 0; }
  .compare-prices { width: 100%; }
  .compare-prices .filter-group { flex: 1; }
  .compare-prices .filter-group input { width: 100%; }
  .compare-prices .btn-primary { flex: 1; }

  th { font-size: 0.6rem; padding: 0.55rem 0.6rem; white-space: nowrap; }
  td { padding: 0.6rem 0.6rem; font-size: 0.82rem; white-space: nowrap; }
  .data-card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .deals-table { min-width: 520px; width: max-content; }
  .item-name { white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
  .price { white-space: nowrap; }
  .pagination-wrap, .table-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .promo-inner { flex-direction: column; align-items: flex-start; }
  .rp-aff-inner { flex-direction: column; align-items: flex-start; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }

  /* Mobile Discord banner */
  .mobile-discord-banner {
    display: block;
    margin-bottom: 1rem;
  }
  .mobile-discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--discord);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    transition: background 0.15s;
  }
  .mobile-discord-btn:hover { background: #4752C4; }
}

/* Small phone screens */
@media (max-width: 600px) {
  body { font-size: 0.8rem; }
  .hero h1 { font-size: 1.35rem; }
  .hero-sub { font-size: 0.85rem; }
  .section h2 { font-size: 1.05rem; }

  /* Table horizontal scroll */
  .data-card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .deals-table { min-width: 480px; width: max-content; }
  .item-name { max-width: 120px; }

  td { font-size: 0.78rem; padding: 0.5rem 0.5rem; }
  th { font-size: 0.58rem; padding: 0.5rem 0.5rem; letter-spacing: 0.05em; }
  .item-name { font-size: 0.8rem; line-height: 1.3; }
  .item-site { font-size: 0.68rem; margin-top: 0.1rem; }
  .price { font-size: 0.82rem; }
  .profit { font-size: 0.8rem; }
  .updated { font-size: 0.72rem; }
  .copy-btn { width: 20px; height: 20px; }
  .copy-btn svg { width: 11px; height: 11px; }
  .page-btn { min-width: 28px; height: 28px; font-size: 0.75rem; }
  .pagination-wrap { font-size: 0.75rem; padding: 0.6rem 0.75rem; }
  .table-footer { font-size: 0.72rem; padding: 0.6rem 0.75rem; }

  .mobile-discord-btn { font-size: 0.82rem; padding: 0.55rem 0.8rem; }
  .compare-sites select { font-size: 0.78rem; padding: 0.4rem 0.5rem; }
  .compare-prices .filter-group input { font-size: 0.78rem; padding: 0.4rem 0.5rem; }
  .compare-prices .btn-primary { font-size: 0.78rem; padding: 0.45rem 0.6rem; }
  .logo-title { font-size: 0.95rem; }

  /* Compact filters */
  .deals-filters { gap: 0.5rem; }
  .filter-group label { font-size: 0.58rem; }
  .filter-group select,
  .filter-group input { padding: 0.4rem 0.5rem; font-size: 0.78rem; }
}


/* ===== SITE-SPECIFIC COLORS ===== */
.site-rustypot   { color: #e74c3c; }
.site-csdeals    { color: #5b6cff; }
.site-skinport   { color: #3ba55d; }
.site-swapgg     { color: #00b4d8; }
.site-rapidskins { color: #f5c518; }
.site-dmarket    { color: #0ec2e7; }
.site-rustskins  { color: #747f8d; }
.site-tradeit    { color: #3A35FB; }
.site-rustclash  { color: #f39c12; }
.site-sih        { color: #2ecc71; }
.site-cstrade    { color: #4a90e2; }
.site-lootfarm   { color: #e67e22; }
.site-banditcamp { color: #c0392b; }
.site-lisskins   { color: #27ae60; }
.site-skinland   { color: #9b59b6; }
.site-shadowpay  { color: #8b5cf6; }
.site-rusttm     { color: #14b8a6; }

/* Promo dot colors */
.promo-dot.site-rustypot   { background: #e74c3c; }
.promo-dot.site-csdeals    { background: #5b6cff; }
.promo-dot.site-skinport   { background: #3ba55d; }
.promo-dot.site-swapgg     { background: #00b4d8; }
.promo-dot.site-rapidskins { background: #f5c518; }
.promo-dot.site-dmarket    { background: #0ec2e7; }
.promo-dot.site-rustskins  { background: #747f8d; }
.promo-dot.site-tradeit    { background: #3A35FB; }
.promo-dot.site-rustclash  { background: #f39c12; }
.promo-dot.site-sih        { background: #2ecc71; }
.promo-dot.site-cstrade    { background: #4a90e2; }
.promo-dot.site-lootfarm   { background: #e67e22; }
.promo-dot.site-banditcamp { background: #c0392b; }
.promo-dot.site-lisskins   { background: #27ae60; }
.promo-dot.site-skinland   { background: #9b59b6; }
.promo-dot.site-shadowpay  { background: #8b5cf6; }
.promo-dot.site-rusttm     { background: #14b8a6; }

/* Promo site name colors */
.promo-site-name.site-rustypot   { color: #e74c3c; }
.promo-site-name.site-csdeals    { color: #5b6cff; }
.promo-site-name.site-skinport   { color: #3ba55d; }
.promo-site-name.site-swapgg     { color: #00b4d8; }
.promo-site-name.site-rapidskins { color: #f5c518; }
.promo-site-name.site-dmarket    { color: #0ec2e7; }
.promo-site-name.site-rustskins  { color: #747f8d; }
.promo-site-name.site-tradeit    { color: #3A35FB; }
.promo-site-name.site-rustclash  { color: #f39c12; }
.promo-site-name.site-sih        { color: #2ecc71; }
.promo-site-name.site-cstrade    { color: #4a90e2; }
.promo-site-name.site-lootfarm   { color: #e67e22; }
.promo-site-name.site-banditcamp { color: #c0392b; }
.promo-site-name.site-lisskins   { color: #27ae60; }
.promo-site-name.site-skinland   { color: #9b59b6; }
.promo-site-name.site-shadowpay  { color: #8b5cf6; }
.promo-site-name.site-rusttm     { color: #14b8a6; }
.site-rusttm     { color: #14b8a6; }

/* Promo button backgrounds */
.promo-btn.site-rustypot   { background: #e74c3c; }
.promo-btn.site-csdeals    { background: #5b6cff; }
.promo-btn.site-skinport   { background: #3ba55d; }
.promo-btn.site-swapgg     { background: #00b4d8; }
.promo-btn.site-rapidskins { background: #f5c518; color: #000; }
.promo-btn.site-dmarket    { background: #0ec2e7; color: #000; }
.promo-btn.site-rustskins  { background: #747f8d; }
.promo-btn.site-tradeit    { background: #3A35FB; }
.promo-btn.site-rustclash  { background: #f39c12; color: #000; }
.promo-btn.site-sih        { background: #2ecc71; color: #000; }
.promo-btn.site-cstrade    { background: #4a90e2; }
.promo-btn.site-lootfarm   { background: #e67e22; }
.promo-btn.site-banditcamp { background: #c0392b; }
.promo-btn.site-lisskins   { background: #27ae60; }
.promo-btn.site-skinland   { background: #9b59b6; }
.promo-btn.site-shadowpay  { background: #8b5cf6; }
.promo-btn.site-rusttm     { background: #14b8a6; }

.promo-btn:hover {
  filter: brightness(1.15);
}


/* ===== USER ACTIVITY STATS (Admin) ===== */
.user-stats-row {
  background: rgba(0,0,0,0.15) !important;
}
.user-stats-row td {
  padding: 0.5rem 1rem 0.6rem !important;
  border-bottom: 1px solid var(--border) !important;
}
.user-stats-row:hover td {
  background: rgba(0,0,0,0.15) !important;
}
.user-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.user-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.user-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
}
.user-stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ===== SITE USAGE (Admin) ===== */
.site-usage-grid {
  padding: 0.5rem 1rem 1rem;
}
.site-usage-grid .deals-table th {
  font-size: 0.6rem;
}
.site-usage-grid .deals-table td {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}


/* ===== ACTIVITY FEED (Admin) ===== */
.activity-feed {
  padding: 0.5rem 1rem 1rem;
  max-height: 500px;
  overflow-y: auto;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.activity-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.activity-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}
.activity-user {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 0.85rem;
}
.activity-action {
  color: var(--muted);
  font-size: 0.82rem;
}
.activity-data {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.activity-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
  flex-shrink: 0;
}

/* ===== MOBILE TOP BAR & DRAWER ===== */
.mobile-topbar {
  display: none;
}
.mobile-drawer,
.mobile-drawer-overlay {
  display: none;
}

@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    padding: 0 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 300;
  }
  .mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .mobile-topbar-actions .sidebar-user-pill {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  .mobile-topbar-actions .sidebar-user-pill img {
    width: 20px; height: 20px;
  }
  .mobile-login-btn {
    background: var(--discord);
    color: #fff;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-login-btn:hover {
    background: #4752C4;
  }

  /* Drawer */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 350;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 400;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .mobile-drawer.open {
    transform: translateX(0);
  }
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .mobile-drawer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-bright);
  }
  .mobile-drawer-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
  }
  .mobile-drawer-close:hover {
    color: var(--text-bright);
  }
  .mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    flex: 1;
    overflow-y: auto;
  }
  .mobile-drawer-nav .nav-item {
    padding: 0.65rem 0.7rem;
    font-size: 0.9rem;
  }
  .mobile-drawer-user {
    padding: 1rem;
    border-top: 1px solid var(--border);
  }
  .mobile-drawer-user .discord-login-btn,
  .mobile-drawer-user .logout-btn {
    width: 100%;
    justify-content: center;
  }
  .mobile-drawer-user .sidebar-user-pill {
    margin-bottom: 0.5rem;
    justify-content: center;
  }

  /* Push main content down on mobile */
  .main {
    margin-left: 0;
    padding-top: calc(56px + 1.5rem);
  }
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Crypto section Ã¢â€â‚¬Ã¢â€â‚¬ */
.crypto-grid .crypto-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  margin-bottom: 10px;
}
.crypto-grid .crypto-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
}
.crypto-item .coin-icon {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 2.4rem;
  color: var(--accent);
}
.crypto-item .coin-addr {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.82rem;
  color: var(--text-bright);
  word-break: break-all;
  flex: 1;
  letter-spacing: 0.01em;
}
.crypto-item .copy-badge {
  background: var(--card-hover);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: 0.2s;
}
.crypto-item:hover .copy-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
/* Copy feedback toast (already in base) */
/* Ã¢â€â‚¬Ã¢â€â‚¬ Affiliate grid Ã¢â€â‚¬Ã¢â€â‚¬ */
.affiliate-grid .affiliate-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-bright);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.affiliate-grid .affiliate-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.affiliate-grid .affiliate-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.12);
}
.affiliate-grid .affiliate-btn:hover::after {
  opacity: 1;
}
.affiliate-grid .affiliate-btn:active {
  transform: scale(0.97);
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donate perk cards Ã¢â€â‚¬Ã¢â€â‚¬ */
.donate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.2s;
}
.donate-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.donate-card-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.donate-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}
.donate-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donate steps Ã¢â€â‚¬Ã¢â€â‚¬ */
.donate-steps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.donate-step {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}
.donate-step-num {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.donate-step h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.15rem;
}
.donate-step p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Steam trade button Ã¢â€â‚¬Ã¢â€â‚¬ */
.steam-trade-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 0.6rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  transition: all 0.2s;
}
.steam-trade-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donation page layout tweaks Ã¢â€â‚¬Ã¢â€â‚¬ */
#page-donate .hero h1 {
  margin-bottom: 0.5rem;
}
#page-donate .hero-sub {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.crypto-section {
  margin: 2rem 0 2.5rem;
}
.affiliate-section {
  margin-bottom: 2rem;
}
.crypto-item {
  background: var(--card) !important; /* matches other cards */
}
/* Affiliate grid using market chips */
#donateAffiliateGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
#donateAffiliateGrid .market-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
  transition: 0.15s;
}
#donateAffiliateGrid .market-chip:hover {
  border-color: var(--chip-color, var(--accent));
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 10%, var(--card));
}
#donateAffiliateGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ===== INVENTORY PAGE (Modern sleek grid) ===== */
.inventory-toolbar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  align-items: flex-end;
}
.inventory-toolbar .inventory-search {
  flex: 1;
}
.inventory-source-filter {
  min-width: 150px;
}
.inventory-source-filter select {
  min-width: 150px;
}
.inventory-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.inventory-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* Compact profile + inventory total */
.inventory-simple-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.25rem;
}
.inventory-simple-summary img,
.inv-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  object-fit: cover;
  flex-shrink: 0;
}
.inv-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-bright);
  font-weight: 800;
  font-size: 1rem;
}
.inventory-simple-text {
  min-width: 0;
}
.inventory-simple-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-simple-line {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.inventory-simple-line strong {
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
}

/* Filter toolbar */
.inventory-list-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
}
.inventory-list-toolbar .inventory-filter-box {
  flex: 0 1 400px;
  min-width: 200px;
}
.inventory-toolbar-side {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}
.inventory-toolbar-side .filter-group label,
.inventory-toolbar-side .inv-site-group label {
  display: none !important;
}
.inventory-toolbar-side .filter-group {
  margin: 0;
}
.inventory-count {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* The grid - modern dense shop grid */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
@media (min-width: 1400px) {
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Card - modern, minimal */
.inv-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}
.inv-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Image area - darker, more premium */
.inv-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #1a1c24, #14161d);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.inv-img img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  pointer-events: none;
  transition: transform 0.2s ease;
}
.inv-card:hover .inv-img img {
  transform: scale(1.05);
}
.inv-noimg {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1a1c24, #14161d);
}

/* Quantity badge */
.inv-qty {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* Meta area */
.inv-meta {
  padding: 6px 6px 8px;
}
.inv-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 1.8rem;
  margin-bottom: 2px;
}
.inv-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
}

/* Login-required state */
.inventory-login-required {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.inventory-login-required h3 {
  color: var(--text-bright);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.inventory-login-required p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}
.inventory-login-required .discord-login-btn {
  max-width: 240px;
  margin: 0 auto;
}
.inventory-login-icon {
  color: var(--discord);
  margin-bottom: 0.6rem;
}
.inventory-login-icon svg { display: inline-block; }

/* Pagination dots */
.page-dots {
  color: var(--muted);
  padding: 0 0.2rem;
  font-size: 0.8rem;
}

/* Mobile */
@media (max-width: 900px) {
  .inventory-toolbar { flex-wrap: wrap; }
  .inventory-toolbar .inventory-search { flex: 1 1 100%; }
  .inventory-source-filter { flex: 1 1 150px; }
  #inventoryLoadBtn { flex: 0 0 auto; }
  .inventory-list-toolbar { flex-wrap: wrap; padding: 0; gap: 0.75rem; }
  .inventory-list-toolbar .inventory-filter-box { flex: 1 1 100%; max-width: none; }
  .inventory-toolbar-side { justify-content: flex-start; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
  .inventory-toolbar-side .filter-group label { display: none !important; }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
  .inv-name { font-size: 0.65rem; min-height: 1.65rem; }
  .inv-price { font-size: 0.75rem; }
  .inv-qty { font-size: 0.58rem; }
}

/* ===== MOBILE TOP BAR & DRAWER ===== */
.mobile-topbar {
  display: none;
}
.mobile-drawer,
.mobile-drawer-overlay {
  display: none;
}

@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    padding: 0 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 300;
  }
  .mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .mobile-topbar-actions .sidebar-user-pill {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  .mobile-topbar-actions .sidebar-user-pill img {
    width: 20px; height: 20px;
  }
  .mobile-login-btn {
    background: var(--discord);
    color: #fff;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-login-btn:hover {
    background: #4752C4;
  }

  /* Drawer */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 350;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 400;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .mobile-drawer.open {
    transform: translateX(0);
  }
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .mobile-drawer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-bright);
  }
  .mobile-drawer-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
  }
  .mobile-drawer-close:hover {
    color: var(--text-bright);
  }
  .mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    flex: 1;
    overflow-y: auto;
  }
  .mobile-drawer-nav .nav-item {
    padding: 0.65rem 0.7rem;
    font-size: 0.9rem;
  }
  .mobile-drawer-user {
    padding: 1rem;
    border-top: 1px solid var(--border);
  }
  .mobile-drawer-user .discord-login-btn,
  .mobile-drawer-user .logout-btn {
    width: 100%;
    justify-content: center;
  }
  .mobile-drawer-user .sidebar-user-pill {
    margin-bottom: 0.5rem;
    justify-content: center;
  }

  /* Push main content down on mobile */
  .main {
    margin-left: 0;
    padding-top: calc(56px + 1.5rem);
  }
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Crypto section Ã¢â€â‚¬Ã¢â€â‚¬ */
.crypto-grid .crypto-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  margin-bottom: 10px;
}
.crypto-grid .crypto-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
}
.crypto-item .coin-icon {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 2.4rem;
  color: var(--accent);
}
.crypto-item .coin-addr {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.82rem;
  color: var(--text-bright);
  word-break: break-all;
  flex: 1;
  letter-spacing: 0.01em;
}
.crypto-item .copy-badge {
  background: var(--card-hover);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: 0.2s;
}
.crypto-item:hover .copy-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
/* Copy feedback toast (already in base) */
/* Ã¢â€â‚¬Ã¢â€â‚¬ Affiliate grid Ã¢â€â‚¬Ã¢â€â‚¬ */
.affiliate-grid .affiliate-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-bright);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.affiliate-grid .affiliate-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.affiliate-grid .affiliate-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.12);
}
.affiliate-grid .affiliate-btn:hover::after {
  opacity: 1;
}
.affiliate-grid .affiliate-btn:active {
  transform: scale(0.97);
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donate perk cards Ã¢â€â‚¬Ã¢â€â‚¬ */
.donate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.2s;
}
.donate-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.donate-card-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.donate-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}
.donate-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donate steps Ã¢â€â‚¬Ã¢â€â‚¬ */
.donate-steps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.donate-step {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}
.donate-step-num {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.donate-step h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.15rem;
}
.donate-step p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Steam trade button Ã¢â€â‚¬Ã¢â€â‚¬ */
.steam-trade-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 0.6rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  transition: all 0.2s;
}
.steam-trade-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Donation page layout tweaks Ã¢â€â‚¬Ã¢â€â‚¬ */
#page-donate .hero h1 {
  margin-bottom: 0.5rem;
}
#page-donate .hero-sub {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.crypto-section {
  margin: 2rem 0 2.5rem;
}
.affiliate-section {
  margin-bottom: 2rem;
}
.crypto-item {
  background: var(--card) !important; /* matches other cards */
}
/* Affiliate grid using market chips */
#donateAffiliateGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
#donateAffiliateGrid .market-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
  transition: 0.15s;
}
#donateAffiliateGrid .market-chip:hover {
  border-color: var(--chip-color, var(--accent));
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 10%, var(--card));
}
#donateAffiliateGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ===== INVENTORY PAGE (Shop-style dense grid) ===== */
.inventory-toolbar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.inventory-toolbar .inventory-search {
  flex: 1;
}
.inventory-source-filter {
  min-width: 150px;
  justify-content: flex-end;
}
.inventory-source-filter select {
  min-width: 150px;
}
.inventory-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.inventory-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* Compact profile + inventory total */
.inventory-simple-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.25rem;
}
.inventory-simple-summary img,
.inv-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  object-fit: cover;
  flex-shrink: 0;
}
.inv-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-bright);
  font-weight: 800;
  font-size: 1rem;
}
.inventory-simple-text {
  min-width: 0;
}
.inventory-simple-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-simple-line {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.inventory-simple-line strong {
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
}

/* Profile + summary stats */
.inv-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.inv-profile img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.inv-profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-bright);
}
.inv-profile-link {
  font-size: 0.75rem;
  color: var(--muted);
}
.inv-profile-link:hover { color: var(--accent); }
.inv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Filter toolbar Ã¢â‚¬â€ centered search like the reference shop */
.inventory-list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.inventory-list-toolbar .inventory-filter-box {
  flex: 1;
  min-width: 220px;
  max-width: 520px;
  margin: 0 auto;
}
.inventory-toolbar-side {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.inventory-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* The grid */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 14px 10px;
}
@media (min-width: 1400px) {
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* Card: image tile + green price below (like the reference screenshot) */
.inv-card {
  text-align: center;
  min-width: 0;
}
.inv-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #37393e;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.15s ease, transform 0.15s ease;
}
.inv-card:hover .inv-img {
  background: #42454b;
  transform: translateY(-2px);
}
.inv-img img {
  max-width: 76%;
  max-height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.45));
  pointer-events: none;
}
.inv-noimg {
  color: #555a62;
  font-size: 1.4rem;
  font-weight: 800;
}

/* Quantity badge, top-left (always shown, like the reference) */
.inv-qty {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  z-index: 2;
}

/* Item name revealed on hover */
.inv-name-hover {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 3px 5px;
  background: rgba(0,0,0,0.78);
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #e8eaee;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.inv-card:hover .inv-name-hover {
  opacity: 1;
  transform: translateY(0);
}

/* Green price below the tile */
.inv-price {
  margin-top: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6fca7f;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Login-required state */
.inventory-login-required {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.inventory-login-required h3 {
  color: var(--text-bright);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.inventory-login-required p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}
.inventory-login-required .discord-login-btn {
  max-width: 240px;
  margin: 0 auto;
}
.inventory-login-icon {
  color: var(--discord);
  margin-bottom: 0.6rem;
}
.inventory-login-icon svg { display: inline-block; }

/* Inventory pagination dots */
.page-dots {
  color: var(--muted);
  padding: 0 0.2rem;
  font-size: 0.8rem;
}

/* Mobile: tighter but still a grid, never a table */
@media (max-width: 900px) {
  .inventory-toolbar { flex-wrap: wrap; align-items: flex-end; }
  .inventory-toolbar .inventory-search { flex: 1 1 100%; }
  .inventory-source-filter { flex: 1 1 150px; }
  #inventoryLoadBtn { flex: 0 0 auto; }
  .inventory-list-toolbar { flex-direction: column; align-items: stretch; }
  .inventory-list-toolbar .inventory-filter-box { max-width: none; }
  .inventory-toolbar-side { justify-content: space-between; }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px 8px; }
  .inv-price { font-size: 0.72rem; }
  .inv-qty { font-size: 0.6rem; }
}


/* ===== INVENTORY LEADERBOARD SIDEBAR ===== */
.inv-main-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.inv-main-content {
  flex: 1;
  min-width: 0;
}
.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-bright);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.leaderboard-header svg {
  color: var(--accent);
}
.leaderboard-list {
  padding: 0.4rem 0;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  transition: background 0.1s;
}
.leaderboard-row:hover {
  background: rgba(255,255,255,0.02);
}
.leaderboard-rank {
  width: 18px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  font-family: monospace;
}
.leaderboard-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.leaderboard-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.leaderboard-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
}
.leaderboard-items {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.leaderboard-loading {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Mobile: hide leaderboard, stack vertically */
@media (max-width: 1100px) {
  .inv-main-row {
    flex-direction: column;
  }
  .inv-leaderboard {
    width: 100%;
    order: -1;
  }
  .leaderboard-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    padding: 0;
  }
  .leaderboard-row {
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 900px) {
  .inv-leaderboard {
    display: none;
  }
  .inv-main-row {
    flex-direction: column;
  }
}



/* ===== INVENTORY LEADERBOARD SIDEBAR ===== */
.inv-main-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.inv-leaderboard {
  width: 240px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
}
.inv-main-content {
  flex: 1;
  min-width: 0;
}
.leaderboard-header svg {
  color: var(--accent);
}
.leaderboard-list {
  padding: 0.3rem 0;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  transition: background 0.15s;
}
.leaderboard-row:hover {
  background: rgba(255,255,255,0.02);
}
.leaderboard-rank {
  width: 16px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-family: monospace;
}
.leaderboard-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.leaderboard-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.leaderboard-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-value {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
}
.leaderboard-items {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.leaderboard-loading {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Tablet: leaderboard above grid */
@media (max-width: 1100px) {
  .inv-main-row {
    flex-direction: column;
  }
  .inv-leaderboard {
    width: 100%;
    order: -1;
  }
  .leaderboard-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    padding: 0;
  }
  .leaderboard-row {
    border-bottom: 1px solid var(--border);
  }
}

/* Mobile: hide leaderboard */
@media (max-width: 900px) {
  .inv-leaderboard {
    display: none;
  }
  .inv-main-row {
    flex-direction: column;
  }
}


/* ===== PAGE LAYOUT (Full width, no sidebar) ===== */
.page-row {
  display: block;
}
.page-main {
  width: 100%;
  min-width: 0;
}
.page-sidebar {
  display: none;
}

/* Filter row */
.deals-filters {
  gap: 0.75rem;
}
.deals-filters .search-box {
  max-width: 380px;
  min-width: 200px;
}
.deals-filters .filter-group select,
.deals-filters .filter-group input {
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}
.deals-filters .filter-group label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}


/* ===== INVENTORY SELECTION & SELL COMPARISON ===== */

/* Selected items panel */
.inv-selected-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  animation: invFadeIn 0.25s ease;
}
@keyframes invFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header row */
.inv-selected-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.inv-selected-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
}
.inv-selected-header .accent {
  color: var(--accent);
}
.inv-selected-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.inv-clear-btn {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.inv-clear-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Comparison bar - compact 3 columns */
.sell-compare-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.sell-site-total {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.45rem;
  text-align: center;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.sell-site-total {
  text-decoration: none;
  cursor: pointer;
}
.sell-site-total:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}
.sell-site-total.best {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.sell-site-total.best:hover {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.12);
}
.sell-site-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  line-height: 1.2;
}
.sell-site-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sell-site-name {
  font-size: 0.65rem;
  color: var(--text-bright);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sell-site-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
}
.sell-site-total.best .sell-site-price {
  color: var(--green);
}
/* .sell-site-raw removed Ã¢â‚¬â€ raw price no longer shown */

/* Note */
.sell-note {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  padding: 0.2rem 0;
}

/* Selected items grid - scrollable */
.inv-selected-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  padding-right: 4px;
}
.inv-selected-grid::-webkit-scrollbar {
  height: 4px;
}
.inv-selected-grid::-webkit-scrollbar-track {
  background: transparent;
}
.inv-selected-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.inv-selected-grid .inv-card {
  flex: 0 0 auto;
  width: 84px;
}
.inv-selected-grid::-webkit-scrollbar {
  width: 4px;
}
.inv-selected-grid::-webkit-scrollbar-track {
  background: transparent;
}
.inv-selected-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.inv-selected-card {
  cursor: pointer;
  position: relative;
}
.inv-selected-card .inv-remove-overlay {
  position: absolute;
  inset: 0;
  background: rgba(239, 68, 68, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 7px;
  pointer-events: none;
  z-index: 3;
}
.inv-selected-card:hover .inv-remove-overlay {
  opacity: 1;
}

/* Card selection states */
.inv-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.inv-card {
  cursor: pointer;
}
.inv-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.inv-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Mobile */
/* Toggle switch for admin */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 22px;
  transition: 0.2s;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text-bright);
  border-radius: 50%;
  transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--green);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

@media (max-width: 900px) {
  .sell-compare-bar {
    grid-template-columns: 1fr;
  }
  .inv-selected-grid {
    gap: 8px;
  }
  .inv-selected-header h3 {
    font-size: 0.85rem;
  }
  .sell-site-price {
    font-size: 0.9rem;
  }
}