/* ============================================================
   LEADERBOARD — top wallets ranked
   ============================================================ */
.app {
  grid-template-rows: 44px 28px 1fr 24px;
  height: 100vh;
  overflow: hidden;
}

.work {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Hero header strip — like dexscreener but for wallets */
.lb-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  flex-shrink: 0;
}
.lb-hero__l {
  padding: 14px 16px;
  border-right: 1px solid var(--line-1);
}
.lb-hero__title {
  font-size: var(--t-22);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lb-hero__title em {
  font-style: normal;
  color: var(--accent);
}
.lb-hero__sub {
  font-size: var(--t-12);
  color: var(--text-3);
  max-width: 540px;
}
.lb-hero__r {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.lb-stat {
  padding: 10px 14px;
  border-right: 1px solid var(--line-1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}
.lb-stat:last-child { border-right: none; }
.lb-stat__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 600;
}
.lb-stat__val {
  font-family: var(--font-mono);
  font-size: var(--t-18);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lb-stat__val.up { color: var(--up); }
.lb-stat__sub { font-family: var(--font-mono); font-size: var(--t-10); color: var(--text-3); }

/* Filter strip */
.lb-bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 6px 12px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Table */
.lb-wrap {
  flex: 1;
  overflow: auto;
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-12);
}
.lb-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-1);
  text-align: right;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.lb-table thead th.left { text-align: left; }
.lb-table tbody td {
  padding: 0 10px;
  height: 42px;
  border-bottom: 1px solid var(--line-1);
  white-space: nowrap;
  color: var(--text-1);
  vertical-align: middle;
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-12);
}
.lb-table tbody td.left { text-align: left; }
.lb-table tbody tr:hover td { background: var(--bg-2); cursor: pointer; }
.lb-table tbody td.up { color: var(--up); font-weight: 600; }
.lb-table tbody td.down { color: var(--down); font-weight: 600; }

/* Rank cell */
.lb-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r-2);
  background: var(--bg-3);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--t-12);
  font-weight: 700;
}
.lb-rank.medal-1 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #1a0e00; }
.lb-rank.medal-2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #0f1419; }
.lb-rank.medal-3 { background: linear-gradient(135deg, #d97706, #a16207); color: #1a0e00; }

/* Wallet cell */
.wcell { display: flex; align-items: center; gap: 10px; text-align: left; }
.wcell__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: var(--t-13);
  color: white;
  font-family: var(--font-mono);
  flex-shrink: 0;
  background: linear-gradient(135deg, #9945ff, #14f195);
  border: 1.5px solid var(--line-2);
}
.wcell__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wcell__name {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--text-1);
}
.wcell__name b { color: var(--text-1); }
.wcell__addr {
  font-family: var(--font-mono);
  font-size: var(--t-10);
  color: var(--text-3);
}
.wcell__tags { display: inline-flex; gap: 3px; align-items: center; }
.wcell__tag {
  display: inline-block;
  height: 14px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: 2px;
  line-height: 14px;
}

/* Win rate bar */
.winbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.winbar__track {
  width: 50px;
  height: 5px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.winbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--up), var(--accent));
  border-radius: 3px;
}

/* PnL sparkline */
.pnl-spark { width: 90px; height: 24px; vertical-align: middle; }

/* Top holdings chips */
.holdings { display: flex; gap: 3px; align-items: center; justify-content: flex-end; }
.holding-chip {
  display: inline-flex; align-items: center; gap: 3px;
  height: 18px;
  padding: 0 5px;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: 9px;
  font-size: var(--t-10);
  font-family: var(--font-mono);
  font-weight: 600;
}
.holding-chip .img {
  width: 12px; height: 12px;
  border-radius: 50%;
  font-size: 8px;
  display: grid; place-items: center;
}

/* Follow button */
.follow-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--text-1);
  border-radius: var(--r-2);
  font-size: var(--t-11);
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.follow-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.follow-btn.is-following {
  background: var(--accent-glow);
  border-color: rgba(200,255,58,0.4);
  color: var(--accent);
}

.ico-svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
