/* profile.css — slice of the former style.css (see also: sibling css/ files) */
/* ============================================================
   Club sub-nav tabs
   ============================================================ */
.club-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: -8px 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.club-tabs::-webkit-scrollbar { display: none; }
.club-tab {
  display: inline-block;
  padding: 10px 14px;
  color: var(--muted, #9aa);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-size: 0.92rem;
  transition: color 120ms, border-color 120ms;
}
.club-tab:hover { color: var(--text); }
.club-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   Leaderboard: tabbed windows + P&L bar charts
   ============================================================ */
.hidden { display: none; }

.lb-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: -4px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms, border-color 120ms;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.lb-summary { margin: 0 0 14px; font-size: 0.9rem; }
.lb-winrate { font-size: 0.8rem; }

/* --- Profile activity tabs (Closed P&L calendar / All trades) --- */
.profile-activity .ptabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 16px;
}
.profile-activity .ptab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.profile-activity .ptab:hover { color: var(--text); }
.profile-activity .ptab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* P&L calendar (heatmap) */
.pcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pcal-head h2 { margin: 0; }
.pcal-nav { display: flex; gap: 8px; }
.pcal-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 1.2rem; line-height: 1;
}
.pcal-arrow:hover { background: #262e3a; text-decoration: none; }
.pcal-arrow.disabled { opacity: 0.3; pointer-events: none; }
.pcal-dow-row, .pcal-week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pcal-dow-row { margin-bottom: 6px; }
.pcal-dow-row span {
  text-align: center; font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--muted); text-transform: uppercase;
}
.pcal-week { margin-bottom: 6px; }
.pcal-cell {
  position: relative; min-height: 62px; border-radius: 8px;
  border: 1px solid var(--border); padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.pcal-cell.empty { border-color: transparent; }
.pcal-cell.has-pnl { border-color: transparent; }
.pcal-day { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.pcal-cell:not(.has-pnl):not(.today) .pcal-day { color: var(--muted); }
.pcal-cell.has-pnl .pcal-day,
.pcal-cell.has-pnl .pcal-amt { color: #fff; }
.pcal-amt { font-size: 0.8rem; font-weight: 600; }
.pcal-n {
  position: absolute; top: 5px; right: 7px;
  font-size: 0.66rem; font-weight: 600; line-height: 1;
  color: var(--muted); opacity: 0.85;
}
.pcal-cell.has-pnl .pcal-n { color: #fff; opacity: 0.8; }
.pcal-cell.today .pcal-day {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px;
  background: var(--text); color: var(--bg);
}
.pcal-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-top: 12px; font-size: 0.9rem;
}
.pcal-foot-total { display: inline-flex; align-items: baseline; gap: 8px; }

/* Pager (profile trade list) */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager .btn.disabled { opacity: 0.4; pointer-events: none; }
/* --- Analysis tab (win/loss donut + instrument bars) --- */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.seg-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px 14px; border-radius: 6px; color: var(--muted); font-size: 0.85rem;
  transition: background 120ms, color 120ms;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel); color: var(--text); font-weight: 600; }
.analysis-chart {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.donut-wrap { position: relative; flex: 0 0 auto; width: 168px; height: 168px; }
.donut { display: block; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; pointer-events: none;
}
.donut-net { font-size: 1.4rem; font-weight: 700; }
.donut-sub { font-size: 0.8rem; }
.analysis-legend { display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.analysis-legend .leg-row { display: flex; align-items: center; gap: 8px; }
.analysis-legend .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.analysis-legend .dot.pos { background: var(--pos); }
.analysis-legend .dot.neg { background: var(--neg); }
.analysis-bars-title { font-size: 0.85rem; color: var(--muted); margin: 4px 0 10px; font-weight: 600; }

.trades-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.per-select { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.per-select select {
  width: auto; padding: 4px 8px; font-size: 0.85rem;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; color: var(--text);
}

@media (max-width: 560px) {
  .pcal-cell { min-height: 52px; padding: 4px 5px; }
  .pcal-day { font-size: 0.78rem; }
  .pcal-amt { font-size: 0.72rem; }
  .pcal-dow-row span { font-size: 0.62rem; }
}

.pnl-bars { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; }
.pnl-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 130px) 1fr minmax(72px, auto);
  align-items: center;
  gap: 10px;
}
.pnl-bar-name {
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pnl-bar-name:hover { text-decoration: underline; }
.pnl-bar-track {
  background: var(--panel-2);
  border-radius: 6px;
  height: 14px;
  overflow: hidden;
}
.pnl-bar-fill { display: block; height: 100%; border-radius: 6px; min-width: 2px; }
.pnl-bar-fill.pos { background: var(--pos); }
.pnl-bar-fill.neg { background: var(--neg); }
.pnl-bar-val { text-align: right; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
