@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #1a1c1e;
  color: #e0e0e0;
}

/* ── Navbar ── */
nav {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 70px;
  background: #141618;
  border-bottom: 1px solid #2a2d30;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #7F8C8D;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.nav-btn:hover {
  background: #2a2d30;
  color: #e0e0e0;
}

.nav-btn.active {
  background: #1e2e2a;
  color: #1ABC9C;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid #2a2d30;
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e0;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.user-btn:hover {
  border-color: #1ABC9C;
  background: #1e2e2a;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1ABC9C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #141618;
}

/* ── Dropdown ── */
.nav-dropdown { position: relative; display: inline-block; }

.dropdown-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #7F8C8D;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.dropdown-btn:hover {
  background: #2a2d30;
  color: #e0e0e0;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1f2224;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border-radius: 8px;
  border: 1px solid #2a2d30;
  z-index: 200;
  overflow: hidden;
}

.dropdown-content a {
  color: #c0c0c0;
  padding: 11px 16px;
  text-decoration: none;
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
}

.dropdown-content a:hover {
  background: #2a2d30;
  color: #1ABC9C;
}

.nav-dropdown:hover .dropdown-content { display: block; }

/* ── Page layout ── */
.page {
  padding: 2.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Stat cards ── */
.stat-card {
  background: #1f2224;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #2a2d30;
}

.stat-label {
  font-size: 11px;
  color: #7F8C8D;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1ABC9C;
}

.stat-sub {
  font-size: 12px;
  color: #5a6068;
  margin-top: 4px;
}

/* ── Section cards ── */
.chart-section {
  background: #1f2224;
  padding: 1.75rem;
  border-radius: 10px;
  border: 1px solid #2a2d30;
  margin-bottom: 1.5rem;
}

.chart-section h2 {
  font-size: 17px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.3rem;
}

.section-sub {
  font-size: 12px;
  color: #7F8C8D;
  margin-bottom: 1.5rem;
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: #252830;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #7F8C8D;
  border-bottom: 1px solid #2a2d30;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #252830;
  font-size: 13px;
  color: #c0c0c0;
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #252830; }

/* ── Badges ── */
.refresh-badge {
  display: inline-block;
  font-size: 10px;
  background: #1e2e2a;
  color: #1ABC9C;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.outcome-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 4px;
  background: #2a2d30;
  color: #e0e0e0;
  letter-spacing: 0.3px;
}

/* ── Links ── */
.wallet-link, .view-link {
  color: #1ABC9C;
  text-decoration: none;
  font-size: 12px;
}

.wallet-link:hover, .view-link:hover {
  text-decoration: underline;
}

/* ── PnL colors ── */
.pnl-pos { color: #1ABC9C; font-weight: 600; }
.pnl-neg { color: #e05252; font-weight: 600; }
.roi-pos  { color: #1ABC9C; font-weight: 600; }
.roi-neg  { color: #e05252; font-weight: 600; }
.roi-na   { color: #5a6068; }

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  color: #5a6068;
  font-size: 14px;
  gap: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #2a2d30;
  border-top-color: #1ABC9C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── No data ── */
.no-data {
  text-align: center;
  color: #5a6068;
  padding: 2rem;
  font-size: 13px;
}

/* ── Datetime display ── */
.datetime-display {
  position: fixed;
  top: 80px;
  right: 2rem;
  font-size: 13px;
  color: #5a6068;
  font-weight: 500;
}

/* ── Score bar ── */
.score-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.score-bar-bg {
  flex: 1; height: 4px;
  background: #2a2d30;
  border-radius: 2px;
  overflow: hidden;
}
.score-bar-fill { height: 100%; border-radius: 2px; }
.score-num { font-weight: 700; color: #e0e0e0; font-size: 13px; min-width: 32px; }

/* ── Sub scores ── */
.sub-scores { display: flex; gap: 4px; flex-wrap: wrap; }
.sub-score {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #252830;
  color: #7F8C8D;
  white-space: nowrap;
}
.sub-score span { font-weight: 600; color: #e0e0e0; }

/* ── Content header ── */
.content-header { margin-bottom: 2rem; }
.content-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 0.4rem;
  letter-spacing: -0.3px;
}
.content-header p { font-size: 14px; color: #7F8C8D; }

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Table scroll ── */
.table-scroll { overflow-x: auto; }

/* ── Position list ── */
.position-list { display: flex; flex-direction: column; gap: 4px; }
.position-item { font-size: 12px; color: #9a9a9a; line-height: 1.5; }
