/* ══════════════════════════════════════════════════════════════════════════
   account.css — Account page: summary bar, tabs, positions, equity curve.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Account summary bar ─────────────────────────────────────────────── */
.acct-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
}
.acct-stat { display: flex; flex-direction: column; min-width: 90px; }
.acct-stat-label {
  font-size: 10px;
  color: #546e7a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.acct-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #cfd8dc;
}
.acct-stat-primary { color: #64B5F6; }

/* ── Tab bar ─────────────────────────────────────────────────────────── */
.acct-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid #2a2d3e;
}
.acct-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: #78909c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.acct-tab:hover { color: #b0bec5; }
.acct-tab.active {
  color: #64B5F6;
  border-bottom-color: #64B5F6;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.acct-table-wrap { overflow-x: auto; overflow-y: auto; max-height: calc(100vh - 180px); }
.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.acct-table th {
  text-align: left;
  padding: 6px 8px;
  color: #546e7a;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2a2d3e;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: #0f1117;
  z-index: 2;
}
.acct-table td {
  padding: 5px 8px;
  color: #b0bec5;
  border-bottom: 1px solid #1e2130;
  white-space: nowrap;
}
.acct-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.tx-date-sep td {
  padding: 6px 8px !important;
  font-weight: 700;
  font-size: 12px;
  color: #90a4ae;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.3px;
}
.acct-empty {
  text-align: center;
  padding: 32px 8px !important;
  color: #546e7a;
  font-size: 13px;
}

/* ── P&L colors ──────────────────────────────────────────────────────── */
.acct-pnl-pos { color: #4ade80; font-weight: 600; }
.acct-pnl-neg { color: #EF5350; font-weight: 600; }
.acct-pnl-zero { color: #78909c; }

/* ── Direction badges ────────────────────────────────────────────────── */
.acct-dir { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.acct-dir-long, .acct-dir-bullish { color: #4ade80; background: rgba(74,222,128,0.1); }
.acct-dir-short, .acct-dir-bearish { color: #EF5350; background: rgba(239,83,80,0.1); }
.acct-dir-neutral { color: #90a4ae; background: rgba(144,164,174,0.1); }

/* ── Plan status badges ──────────────────────────────────────────────── */
.acct-plan-status { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.acct-plan-planned { color: #FFD54F; background: rgba(255,213,79,0.08); }
.acct-plan-executed { color: #4ade80; background: rgba(74,222,128,0.08); }
.acct-plan-expired { color: #78909c; background: rgba(120,144,156,0.08); }
.acct-plan-superseded { color: #546e7a; background: rgba(84,110,122,0.08); }
.acct-plan-insufficient_funds { color: #EF5350; background: rgba(239,83,80,0.08); }
.acct-plan-zero_cost { color: #FF8A65; background: rgba(255,138,101,0.08); }

/* ── Legs cell ───────────────────────────────────────────────────────── */
.acct-legs-cell { font-size: 10px; line-height: 1.5; white-space: nowrap; }

/* ── Close button ────────────────────────────────────────────────────── */
.acct-close-btn {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(239,83,80,0.1);
  border: 1px solid rgba(239,83,80,0.3);
  color: #EF5350;
  border-radius: 3px;
  cursor: pointer;
}
.acct-close-btn:hover { background: rgba(239,83,80,0.2); }

/* ── Score bar ───────────────────────────────────────────────────────── */
.acct-score-bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: #2a2d3e;
  width: 60px;
  position: relative;
}
.acct-score-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
  background: #64B5F6;
}

/* ── Account picker tab bar ─────────────────────────────────────────── */
.acct-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2d3e;
  flex-wrap: wrap;
}
.acct-picker-tab {
  padding: 8px 18px;
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  color: #78909c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.acct-picker-tab:hover {
  color: #cfd8dc;
  border-color: #3a3d4e;
  background: #1e2130;
}
.acct-picker-tab.active {
  color: #e3f2fd;
  border-color: #64B5F6;
  background: rgba(100,181,246,0.12);
  box-shadow: 0 0 0 1px rgba(100,181,246,0.15);
}
.acct-picker-add {
  width: 32px;
  height: 34px;
  border-radius: 6px;
  border: 1px dashed #3a3d4e;
  background: transparent;
  color: #546e7a;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 2px;
}
.acct-picker-add:hover {
  border-color: #64B5F6;
  color: #64B5F6;
  background: rgba(100,181,246,0.05);
}

/* ── Account type badges ────────────────────────────────────────────── */
.acct-type-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.acct-type-paper { color: #FFD54F; background: rgba(255,213,79,0.1); }
.acct-type-real { color: #4ade80; background: rgba(74,222,128,0.1); }

/* ── Create account form ────────────────────────────────────────────── */
.acct-create-form {
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.acct-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.acct-label {
  display: block;
  font-size: 10px;
  color: #546e7a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.acct-input {
  background: #0f1117;
  border: 1px solid #2a2d3e;
  color: #cfd8dc;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.acct-input:focus { outline: none; border-color: #64B5F6; }

/* ── Leaderboard rank badges ────────────────────────────────────────── */
.acct-rank {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #78909c;
  background: #1e2130;
}
.acct-rank-gold { color: #FFD54F; background: rgba(255,213,79,0.15); }
.acct-rank-silver { color: #b0bec5; background: rgba(176,190,197,0.12); }
.acct-rank-bronze { color: #FFAB91; background: rgba(255,171,145,0.12); }

/* ── Account status badges ──────────────────────────────────────────── */
.acct-status-active { color: #4ade80; font-size: 11px; font-weight: 600; }
.acct-status-paused { color: #FFD54F; font-size: 11px; font-weight: 600; }
.acct-status-closed { color: #78909c; font-size: 11px; font-weight: 600; }
