/* ============================================================
   TokenProp — Dashboard Styles
   ============================================================ */

.dashboard-page { padding-top: calc(var(--nav-height) + 32px); }

/* ---------- Header ---------- */
.dashboard-header {
  padding: 48px 0 32px;
  background: radial-gradient(ellipse at top center, rgba(0,212,161,0.05) 0%, transparent 60%);
}
.dash-greeting { font-size: 2rem; margin-bottom: 4px; }
.dash-sub { color: var(--text-secondary); font-size: 1rem; }

/* ---------- Portfolio Overview ---------- */
.portfolio-overview {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-bottom: 36px;
}
.overview-card {
  padding: 24px;
}
.overview-card .ov-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.overview-card .ov-value {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 4px;
}
.overview-card .ov-change {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
}
.ov-change.positive { color: var(--accent-green); background: rgba(0,212,161,0.1); }
.ov-change.negative { color: var(--accent-red); background: rgba(239,68,68,0.1); }

/* ---------- Main Grid ---------- */
.dashboard-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 28px;
  padding-bottom: 80px;
}

/* ---------- Holdings ---------- */
.holdings-section { margin-bottom: 28px; }
.holdings-section h2 { font-size: 1.4rem; margin-bottom: 20px; }

.holding-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 20px; margin-bottom: 12px;
}
.holding-img {
  width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(135deg, #1a1a3e, #2a2a5e);
}
.holding-img img { width: 100%; height: 100%; object-fit: cover; }

.holding-info { min-width: 0; }
.holding-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding-info .holding-loc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.holding-tokens-row { display: flex; gap: 14px; }
.holding-tokens-row .ht-item { font-size: 0.78rem; color: var(--text-muted); }
.holding-tokens-row .ht-item span { color: var(--text-primary); font-weight: 600; }

.holding-right { text-align: right; }
.holding-right .hr-value { font-family: 'Space Grotesk'; font-size: 1.1rem; font-weight: 700; }
.holding-right .hr-change { font-size: 0.82rem; }
.holding-right .hr-yield { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.holding-right .hr-yield span { color: var(--accent-green); font-weight: 600; }

/* ---------- Chart Card ---------- */
.chart-card { padding: 24px; margin-bottom: 28px; }
.chart-card h2 { font-size: 1.3rem; margin-bottom: 4px; }
.chart-card .chart-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.chart-period-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.chart-period-tabs button {
  padding: 6px 14px; border-radius: 6px; border: none;
  background: rgba(255,255,255,0.04); color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.chart-period-tabs button.active { background: var(--accent-blue); color: #fff; }
.chart-canvas { width: 100%; height: 240px; }

/* ---------- Sidebar ---------- */
.dashboard-sidebar {}

/* Governance Score */
.gov-score-card { padding: 24px; margin-bottom: 20px; }
.gov-score-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.gov-mini-ring {
  width: 100px; height: 100px; margin: 0 auto 16px; position: relative;
}
.gov-mini-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gov-mini-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.gov-mini-ring .ring-bg { stroke: rgba(255,255,255,0.06); }
.gov-mini-ring .ring-fill { stroke: var(--accent-gold); stroke-dasharray: 283; stroke-dashoffset: 283; transition: stroke-dashoffset 1.5s var(--ease); }
.gov-mini-score {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: 'Space Grotesk'; font-size: 1.4rem; font-weight: 700;
}
.gov-score-detail { text-align: center; }
.gov-score-detail .gs-rank { font-size: 0.85rem; color: var(--text-muted); }
.gov-score-detail .gs-rank span { color: var(--accent-gold); font-weight: 600; }

/* Activity Timeline */
.activity-card { padding: 24px; margin-bottom: 20px; }
.activity-card h3 { font-size: 1.15rem; margin-bottom: 20px; }
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: rgba(255,255,255,0.08);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -24px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--bg-secondary);
}
.timeline-dot.buy    { background: var(--accent-blue); }
.timeline-dot.vote   { background: var(--accent-gold); }
.timeline-dot.reward { background: var(--accent-green); }
.timeline-dot.sell   { background: var(--accent-red); }
.timeline-text { font-size: 0.88rem; font-weight: 500; }
.timeline-detail { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.timeline-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* Income Card */
.income-card { padding: 24px; }
.income-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.income-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.88rem;
}
.income-row:last-child { border: none; }
.income-row .ir-label { color: var(--text-muted); }
.income-row .ir-value { font-weight: 600; }
.income-total {
  display: flex; justify-content: space-between; padding: 14px 0 0;
  border-top: 2px solid rgba(0,212,161,0.2); font-weight: 700;
  margin-top: 8px;
}
.income-total .it-value { color: var(--accent-green); font-family: 'Space Grotesk'; font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .portfolio-overview { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .portfolio-overview { grid-template-columns: 1fr; }
  .holding-card { grid-template-columns: 1fr; }
  .holding-img { width: 100%; height: 140px; }
  .holding-right { text-align: left; }
}
