/* ============================================================
   UNOCU Design Patch — Align App with Marketing Site
   
   Apply this to style.css (append at end or merge into sections)
   Reference: marketing site base.css design tokens
   
   Changes:
   1. Design tokens alignment (radius, shadows, type scale)
   2. Font weight upgrade (600→800 on KPI values)
   3. Green accent standardization (#22c55e everywhere)
   4. Widget card styling (shadows, radius, spacing)
   5. Badge/tag refinement
   ============================================================ */


/* ============================================================
   1. DESIGN TOKEN UPDATES — :root overrides
   ============================================================ */

:root {
  /* ── Radius — match marketing site ── */
  --radius-sm:   6px;    /* was 6px — no change */
  --radius:      10px;   /* was 8px  — bump */
  --radius-md:   12px;   /* was 10px — bump */
  --radius-lg:   16px;   /* was 12px — bump to match marketing */
  --radius-xl:   24px;   /* was 16px — bump to match marketing */

  /* ── Shadows — port from marketing site ── */
  --shadow-card:       0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.10), 0 16px 40px rgba(0,0,0,0.07);
  --shadow-elevated:   0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);

  /* ── Type scale — align with marketing (slightly larger top end) ── */
  --text-xl:  clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem);   /* was max 1.5rem → now 1.75rem */
  --text-2xl: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);        /* was max 2.25rem → now 2.5rem */
  --text-3xl: clamp(2.25rem, 1.8rem + 1.5vw, 3rem);        /* new — for hero values */

  /* ── Green accent — standardize ── */
  --green: #22c55e;
  --green-muted: #16a34a;   /* for text on light backgrounds where #22c55e is too bright */
  --green-bg: rgba(34, 197, 94, 0.10);
  --green-glow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Dark mode shadow overrides */
[data-theme="dark"] {
  --shadow-card:       0 1px 4px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.4), 0 16px 40px rgba(0,0,0,0.3);
  --shadow-elevated:   0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  --green-bg: rgba(34, 197, 94, 0.14);
}


/* ============================================================
   2. KPI CARDS — Bold numbers, tighter tracking
   ============================================================ */

.kpi-value {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.kpi-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-delta {
  font-weight: 600;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.kpi-delta.positive {
  color: var(--green);
  background: var(--green-bg);
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.kpi-card:hover {
  box-shadow: var(--shadow-card-hover);
}


/* ============================================================
   3. WIDGET CARDS — Consistent styling with marketing site
   ============================================================ */

.widget-card {
  background: var(--card-bg, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms var(--ease);
}

.widget-card:hover {
  box-shadow: var(--shadow-card-hover);
}

[data-theme="dark"] .widget-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.widget-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.widget-body {
  padding: 14px 16px;
}


/* ============================================================
   4. PORTFOLIO / HERO VALUES — Match marketing weight & size
   ============================================================ */

/* Main portfolio value (e.g. $482,430) */
.portfolio-total-value,
.total-portfolio-value,
.hero-value,
.stat-big-value,
.umbrella-total {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Section hero numbers (Yield Coverage 112%, Total Rewards $1,247, P&L +$12,847) */
.coverage-value,
.yield-value,
.rewards-value,
.pnl-value,
.staking-total-value,
.trading-pnl-value {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Win rate, APY, and percentage hero values */
.win-rate-value,
.apy-value,
.coverage-pct {
  font-weight: 800;
  letter-spacing: -0.04em;
}


/* ============================================================
   5. GREEN ACCENT STANDARDIZATION
   Replace all #10b981 and #16a34a with var(--green)
   ============================================================ */

/* Positive values */
.text-green,
.positive-value,
.change-positive,
.pnl-positive {
  color: var(--green) !important;
}

/* Buy/positive tags */
.tag-buy,
.rating-buy {
  background: var(--green-bg);
  color: var(--green);
}

/* Status badges */
.status-active,
.status-healthy,
.status-live {
  color: var(--green);
}

/* Status dot (green indicator) */
.status-dot.active,
.status-dot.live,
.status-dot.healthy {
  background: var(--green);
  box-shadow: var(--green-glow);
}


/* ============================================================
   6. BADGE & TAG STYLING — Match marketing site
   ============================================================ */

/* Compact badges (Live, Healthy, Staking, Trading) */
.module-badge,
.status-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
}

/* APY badges */
.apy-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* Position tags (Long/Short) */
.position-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

.position-tag.long {
  color: var(--green);
  background: var(--green-bg);
}

.position-tag.short {
  color: var(--red);
  background: var(--red-bg);
}


/* ============================================================
   7. CARD ELEMENTS — Sub-cards within widgets
   ============================================================ */

/* Asset rows inside widgets (BTC $97K, ETH $2.4K, etc.) */
.asset-row,
.staking-asset-row,
.position-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.asset-row .asset-value,
.staking-asset-row .asset-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Progress bar (Yield Coverage / Runway) */
.progress-bar {
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  border-radius: var(--radius-full);
  background: var(--green);
}

/* Sub-stat cards (Revenue, Runway, Burn) */
.sub-stat-card,
.mini-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.sub-stat-card .sub-stat-value,
.mini-stat .mini-stat-value {
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.sub-stat-card .sub-stat-label,
.mini-stat .mini-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}


/* ============================================================
   8. HEADING WEIGHT UPGRADE
   ============================================================ */

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Card headers / section titles within widgets */
.card-title,
.section-title,
.panel-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}


/* ============================================================
   9. TABLE REFINEMENTS
   ============================================================ */

/* Table header */
th,
.table-header {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Table values */
td .table-value,
.table-number {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}


/* ============================================================
   10. CHART AREA REFINEMENTS
   ============================================================ */

/* Chart container within widgets */
.chart-container,
.chart-wrap {
  border-radius: var(--radius-md);
}

/* Chart period selector (30D, 1W, 1M, etc.) */
.period-selector .period-btn,
.chart-period-btn {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
}

.period-selector .period-btn.active,
.chart-period-btn.active {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--border);
}


/* ============================================================
   11. COMPOUND OVERVIEW — Match marketing site widget
   ============================================================ */

.compound-overview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.compound-overview-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compound-overview-value {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  position: relative;
  z-index: 1;
}

.compound-overview-meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Fix badge overlap on staking overview — ensure delta badges don't cover labels */
.compound-overview-card .kpi-delta,
.compound-overview-card .badge,
.compound-overview-card [class*="delta"],
.compound-overview-card [class*="change"] {
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
}


/* ============================================================
   12. ASSET ROWS & TABLE STYLING — Match marketing site
   ============================================================ */

/* Asset cell in tables */
.asset-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.asset-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  color: #fff;
  flex-shrink: 0;
}

/* Asset icon brand colors — match marketing site */
.asset-icon[style*="f7931a"], .asset-icon-btc { background: rgba(247, 147, 26, 0.2); color: #f7931a; }
.asset-icon[style*="627eea"], .asset-icon-eth { background: rgba(98, 126, 234, 0.25); color: #8a9eff; }
.asset-icon[style*="9945ff"], .asset-icon-sol { background: rgba(153, 69, 255, 0.25); color: #c084ff; }
.asset-icon[style*="23292f"], .asset-icon-xrp { background: rgba(0, 103, 184, 0.25); color: #4da6ff; }

.asset-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.2;
}

.asset-qty {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

/* Data table refinements */
.data-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 14px;
}

.data-table td {
  padding: 12px 14px;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: var(--bg-surface);
}

/* Green text — standardize to #22c55e */
.text-green {
  color: var(--green) !important;
  font-weight: 600;
}


/* ============================================================
   13. APY BADGES — Match marketing site green pill style
   ============================================================ */

.apy-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--green-bg);
  color: var(--green);
}

.apy-badge.apy-high {
  background: var(--green-bg);
  color: var(--green);
}

.apy-badge.apy-med {
  background: rgba(245, 158, 11, 0.10);
  color: #f59e0b;
}

.apy-badge.apy-low {
  background: var(--bg-surface-2);
  color: var(--text-secondary);
}


/* ============================================================
   14. CRYPTO DOT & PLATFORM BADGE
   ============================================================ */

.crypto-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.platform-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}


/* ============================================================
   15. STAKING BREAKDOWN TABLE — progress bars match accent colors
   ============================================================ */

/* Ensure breakdown table values are bold and properly colored */
.widget-body .data-table .text-green {
  color: var(--green) !important;
  font-weight: 700;
}

/* Interest earned column */
.widget-body .data-table td:nth-child(4) {
  font-weight: 600;
}


/* ============================================================
   16. STAKING HERO DASHBOARD — Unified Compound Widget
   ============================================================ */

.staking-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

/* Hero top: rewards + donut side by side */
.staking-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.staking-hero-rewards {
  flex: 1;
}

.staking-hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.staking-hero-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

/* Live earnings ticker */
.staking-hero-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.staking-ticker-icon {
  font-size: 8px;
  animation: tickerPulse 2s ease-in-out infinite;
}

.staking-ticker-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: opacity 150ms ease;
}

@keyframes tickerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* APY Donut */
.staking-hero-donut {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.staking-apy-ring {
  width: 100%;
  height: 100%;
}

.staking-apy-ring-fill {
  transition: stroke-dashoffset 1s ease;
}

.staking-apy-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.staking-apy-value {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.staking-apy-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Quick Stats Row */
.staking-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.staking-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}

.staking-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.staking-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Position Cards */
.staking-positions-header {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.staking-positions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.staking-position-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 150ms ease, border-color 150ms ease;
}

.staking-position-card:hover {
  background: var(--bg-surface-2);
  border-color: var(--border);
}

.staking-position-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.staking-position-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.staking-position-info {
  display: flex;
  flex-direction: column;
}

.staking-position-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.staking-position-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.staking-position-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.staking-position-apy {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.staking-position-earned {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: right;
}

/* Unstaked Nudge */
.staking-nudge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--green-bg);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.staking-nudge strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .staking-hero-top {
    flex-direction: column;
    gap: var(--space-5);
    text-align: center;
  }

  .staking-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .staking-position-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .staking-position-right {
    width: 100%;
    justify-content: space-between;
  }
}


/* ============================================================
   17. NURTURE HERO — Yield Coverage Dashboard
   Matches marketing site Nurture widget
   ============================================================ */

.nurture-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

.nurture-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.nurture-hero-main {
  flex: 1;
}

.nurture-hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.nurture-hero-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-4);
}

/* Health badge */
.nurture-hero-health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.nurture-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nurture-health-label {
  font-weight: 600;
}

/* Progress bar */
.nurture-hero-bar-wrap {
  position: relative;
  padding-right: 50px;
}

.nurture-hero-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.nurture-hero-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nurture-hero-bar-marker {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
}

.nurture-hero-bar-marker-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Stat cards row */
.nurture-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.nurture-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  transition: background 150ms ease;
}

.nurture-stat[style*="cursor"] {
  cursor: pointer;
}

.nurture-stat:hover {
  background: var(--bg-surface-2);
}

.nurture-stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.nurture-stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.nurture-stat-unit {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.nurture-stat-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
  opacity: 0.7;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .nurture-hero-top {
    flex-direction: column;
    gap: var(--space-3);
  }

  .nurture-hero-stats {
    grid-template-columns: 1fr;
  }

  .nurture-hero-value {
    font-size: 2.5rem;
  }
}

/* Stat sub-text (crypto yield + business breakdown) */
.nurture-stat-sub {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: var(--space-1);
  opacity: 0.8;
}

/* Revenue & Expense Breakdowns Grid */
.nurture-breakdowns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.nurture-breakdown {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.nurture-breakdown-empty {
  transition: background 150ms ease;
}

.nurture-breakdown-empty:hover {
  background: var(--bg-surface-2);
}

.nurture-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nurture-breakdown-total {
  font-weight: 700;
  color: var(--text-primary);
}

.nurture-breakdown-row {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}

.nurture-breakdown-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nurture-breakdown-bar-wrap {
  flex: 1;
}

.nurture-breakdown-bar {
  height: 6px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.nurture-breakdown-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 400ms ease;
}

.nurture-breakdown-value {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 60px;
}

.nurture-breakdown-pct {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  min-width: 30px;
  text-align: right;
}

.nurture-breakdown-add {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  transition: color 150ms ease;
}

.nurture-breakdown-add:hover {
  color: var(--text-primary);
}

/* Path to Self-Sufficiency */
.nurture-path {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.nurture-path-achieved {
  border-color: rgba(34, 197, 94, 0.2);
  background: var(--green-bg);
}

.nurture-path-header {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.nurture-path-bar {
  position: relative;
  height: 10px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
  overflow: visible;
  margin-bottom: var(--space-2);
}

.nurture-path-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nurture-path-bar-target {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.nurture-path-meta {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .nurture-breakdowns-grid {
    grid-template-columns: 1fr;
  }

  .nurture-breakdown-row {
    grid-template-columns: 90px 1fr auto auto;
  }
}


/* ============================================================
   18. TRADING HERO DASHBOARD — Unified Utilize Widget
   ============================================================ */

.trading-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

/* Hero KPI row: P&L + Win Rate side by side */
.trading-hero-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.trading-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
}

.trading-hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.trading-hero-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

/* Daily P&L ticker */
.trading-hero-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.trading-ticker-icon {
  font-size: 8px;
  animation: tickerPulse 2s ease-in-out infinite;
}

/* Win rate with donut ring */
.trading-hero-winrate {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.trading-winrate-ring {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.trading-winrate-fill {
  transition: stroke-dasharray 800ms ease;
}

.trading-hero-meta {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Chart section */
.trading-hero-chart-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.trading-hero-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.trading-hero-chart-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.trading-hero-chart-period {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* Position cards */
.trading-positions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trading-position-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 150ms ease;
}

.trading-position-card:hover {
  background: var(--bg-surface-2);
}

.trading-position-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.trading-position-pair {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.trading-position-side {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

.trading-position-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.trading-position-pnl {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Best / Worst highlight cards */
.trading-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.trading-highlight-card {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
}

.trading-highlight-best {
  background: var(--green-bg);
  border-color: rgba(34, 197, 94, 0.15);
}

.trading-highlight-worst {
  background: var(--red-bg);
  border-color: rgba(239, 68, 68, 0.15);
}

.trading-highlight-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.trading-highlight-pair {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.trading-highlight-pnl {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .trading-hero-kpis {
    grid-template-columns: 1fr;
  }

  .trading-highlights {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   19. UMBRELLA TREASURY COMMAND CENTER
   ============================================================ */

.umbrella-command {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

/* Hero: Total Portfolio + Live badge */
.umbrella-hero-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.umbrella-hero-left {
  flex: 1;
}

.umbrella-hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.umbrella-hero-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-3);
  font-variant-numeric: tabular-nums;
}

.umbrella-hero-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.umbrella-ticker-icon {
  font-size: 8px;
}

.umbrella-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.umbrella-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: tickerPulse 2s ease-in-out infinite;
}

/* 30D Chart */
.umbrella-chart-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.umbrella-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.umbrella-chart-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.umbrella-chart-date {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* Asset allocation cards */
.umbrella-assets-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.umbrella-asset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 150ms ease;
}

.umbrella-asset-card:hover {
  background: var(--bg-surface-2);
}

.umbrella-asset-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.umbrella-asset-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.umbrella-asset-sym {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.umbrella-asset-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.umbrella-asset-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.umbrella-asset-pct {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Module Pulse */
.umbrella-pulse {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.umbrella-pulse-header {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.umbrella-pulse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 150ms ease;
}

.umbrella-pulse-row:last-child {
  border-bottom: none;
}

.umbrella-pulse-row:hover {
  background: var(--bg-surface-2);
  margin: 0 calc(var(--space-2) * -1);
  padding-left: var(--space-2);
  padding-right: var(--space-2);
  border-radius: var(--radius-sm);
}

.umbrella-pulse-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.umbrella-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.umbrella-pulse-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.umbrella-pulse-mid {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.umbrella-pulse-right {
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Price Ticker Strip */
.umbrella-price-ticker {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.umbrella-price-ticker::-webkit-scrollbar {
  display: none;
}

.umbrella-ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.umbrella-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.umbrella-ticker-sym {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
}

.umbrella-ticker-price {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.umbrella-ticker-change {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .umbrella-hero-section {
    flex-direction: column;
    gap: var(--space-3);
  }

  .umbrella-assets-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .umbrella-hero-value {
    font-size: 2.5rem;
  }

  .umbrella-price-ticker {
    gap: var(--space-3);
  }
}

/* Period selector tabs */
.umbrella-period-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface-2);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.umbrella-period-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 150ms ease;
}

.umbrella-period-btn:hover {
  color: var(--text-primary);
}

.umbrella-period-btn.active {
  color: var(--text-primary);
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* V2 Asset cards — full value + cost basis + P&L */
.umbrella-asset-card-v2 {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: background 150ms ease;
}

.umbrella-asset-card-v2:hover {
  background: var(--bg-surface-2);
}

.umbrella-asset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.umbrella-asset-value-full {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.umbrella-asset-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.umbrella-asset-cost {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.umbrella-asset-pnl {
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .umbrella-assets-section {
    grid-template-columns: 1fr 1fr;
  }
}


/* ============================================================
   20. UMBRELLA ENHANCEMENTS — Sync time, Cash/Crypto bar, Alerts
   ============================================================ */

/* Hero right column (Live badge + sync time) */
.umbrella-hero-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.umbrella-last-sync {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
}

/* Cash vs Crypto allocation bar */
.umbrella-allocation-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.umbrella-alloc-track {
  width: 100%;
  height: 8px;
  background: var(--blue-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.umbrella-alloc-fill-crypto {
  height: 100%;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.umbrella-alloc-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
}

/* Alerts / Action Items */
.umbrella-alerts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.umbrella-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
}

.umbrella-alert-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.umbrella-alert-warn {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  color: #b45309;
}

[data-theme="dark"] .umbrella-alert-warn {
  color: #f59e0b;
}

.umbrella-alert-opportunity {
  background: var(--green-bg);
  border: 1px solid rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.umbrella-alert-info {
  background: var(--blue-bg);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.umbrella-alert:hover {
  filter: brightness(0.97);
  transform: translateX(2px);
}

.umbrella-alert-text {
  flex: 1;
}

.umbrella-alert-arrow {
  font-size: 18px;
  font-weight: 700;
  opacity: 0.4;
  transition: opacity 150ms ease, transform 150ms ease;
  margin-left: var(--space-2);
}

.umbrella-alert:hover .umbrella-alert-arrow {
  opacity: 0.8;
  transform: translateX(2px);
}


/* ============================================================
   21. PORTFOLIO HEATMAP — Treemap colored by 24h change
   ============================================================ */

.umbrella-heatmap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.umbrella-heatmap-header {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.umbrella-heatmap-sub {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: var(--space-2);
  opacity: 0.7;
}

.umbrella-heatmap-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 60px;
}

.umbrella-heat-block {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 56px;
  transition: transform 150ms ease, filter 150ms ease;
  cursor: default;
}

.umbrella-heat-block:hover {
  transform: scale(1.03);
  filter: brightness(0.95);
}

.umbrella-heat-sym {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.umbrella-heat-change {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: 3px;
}

.umbrella-heat-pct {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ============================================================
   22. WATCHLIST — Track assets you don't own
   ============================================================ */

.umbrella-watchlist {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.umbrella-watchlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.umbrella-watchlist-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.umbrella-watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.umbrella-watch-item:last-child {
  border-bottom: none;
}

.umbrella-watch-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.umbrella-watch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.umbrella-watch-sym {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.umbrella-watch-price {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.umbrella-watch-change {
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.umbrella-watch-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.umbrella-watch-remove {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 150ms ease, background 150ms ease, color 150ms ease;
}

.umbrella-watch-item:hover .umbrella-watch-remove {
  opacity: 1;
}

.umbrella-watch-remove:hover {
  background: var(--red-bg);
  color: var(--red);
}

/* Add button */
.umbrella-watch-add-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 150ms ease;
}

.umbrella-watch-add-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-surface-2);
}

/* Input row */
.umbrella-watch-input-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  align-items: center;
}

.umbrella-watch-input {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.umbrella-watch-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.umbrella-watch-input-btn {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 6px 14px;
  border: none;
  background: var(--text-primary);
  color: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 150ms ease;
}

.umbrella-watch-input-btn:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .umbrella-heatmap-grid {
    gap: 3px;
  }
  
  .umbrella-heat-block {
    min-width: 48px;
    min-height: 48px;
  }
}


/* ============================================================
   18. COMPOUND COMMAND CENTER — Unified Yield Dashboard
   ============================================================ */

.compound-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.compound-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
}

.compound-hero-main {
  flex: 1;
}

.compound-hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.compound-hero-value {
  font-size: var(--text-3xl, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.compound-hero-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--green);
  font-weight: 600;
  background: var(--green-bg);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.compound-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: compound-pulse 2s ease-in-out infinite;
}

@keyframes compound-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.compound-ticker-arrow {
  font-size: 8px;
  line-height: 1;
}

.compound-ticker-amount {
  transition: opacity 0.15s ease;
}

/* APY Donut */
.compound-hero-donut {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.compound-apy-ring {
  width: 100%;
  height: 100%;
}

.compound-apy-ring-fill {
  transition: stroke-dashoffset 0.8s ease;
}

.compound-apy-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.compound-apy-value {
  font-size: var(--text-md, 1rem);
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.compound-apy-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stats Row */
.compound-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compound-stat {
  background: var(--bg-surface);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}

.compound-stat-value {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.compound-stat-unit {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
}

.compound-stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Smart Alerts */
.compound-alerts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.compound-alert {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  border: 1px solid transparent;
}

.compound-alert-warn {
  background: rgba(202, 138, 4, 0.08);
  border-color: rgba(202, 138, 4, 0.15);
  color: #ca8a04;
}

.compound-alert-opportunity {
  background: var(--green-bg);
  border-color: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.compound-alert-icon {
  flex-shrink: 0;
  font-size: var(--text-sm);
}

.compound-alert-text {
  flex: 1;
  font-size: var(--text-sm);
  line-height: 1.4;
}

/* Section headers */
.compound-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.compound-section-header {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border);
}

/* Position Cards */
.compound-positions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.compound-position-card {
  display: grid;
  grid-template-columns: 2fr 1fr auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color var(--duration, 0.15s) ease, background var(--duration, 0.15s) ease;
}

.compound-position-card:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
}

.compound-position-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.compound-position-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.compound-position-info {
  min-width: 0;
}

.compound-position-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.compound-position-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.compound-position-mid {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.compound-position-apy {
  text-align: center;
}

.compound-apy-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--green-bg);
  color: var(--green);
  font-size: var(--text-xs);
  font-weight: 700;
}

.compound-position-earned {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.compound-earned-label {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-muted);
}

.compound-position-spark {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Projections */
.compound-proj-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.compound-proj-card {
  text-align: center;
  padding: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compound-proj-period {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.compound-proj-value {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.compound-proj-gain {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--green);
  margin-top: 2px;
}

.compound-proj-chart {
  margin-top: var(--space-1);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Interest Positions */
.compound-interest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color var(--duration, 0.15s) ease;
}

.compound-interest-row:hover {
  border-color: var(--border);
}

.compound-interest-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.compound-interest-info {
  min-width: 0;
}

.compound-interest-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.compound-interest-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.compound-interest-right {
  text-align: right;
}

.compound-interest-apy {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--green);
}

.compound-interest-monthly {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Unstaked Nudge */
.compound-nudge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--green-bg);
  border: 1px solid rgba(34, 197, 94, 0.12);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.compound-nudge-icon {
  flex-shrink: 0;
  font-size: var(--text-md);
}

.compound-nudge-cta {
  margin-left: auto;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  cursor: pointer;
}

.compound-nudge-cta:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .compound-hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  .compound-hero-donut {
    align-self: center;
  }
  .compound-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .compound-hero-value {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .compound-position-card {
    grid-template-columns: 1fr auto auto;
  }
  .compound-position-mid,
  .compound-position-spark {
    display: none;
  }
  .compound-proj-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   19. INVESTOR REPORT BUILDER
   ============================================================ */

#reportBuilderOverlay {
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
}

#reportBuilderOverlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-builder-modal {
  width: 95vw;
  max-width: 1280px;
  height: 90vh;
  background: var(--bg-card, #13131a);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  position: relative;
}

.report-builder-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: 100%;
}

.report-builder-form {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  height: 100%;
}

.report-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.report-builder-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.report-builder-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.report-builder-preview {
  background: #1a1a22;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  justify-content: center;
}

.report-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  opacity: 0.5;
}

.report-preview-frame {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 680px;
  min-height: 600px;
}

.report-preview-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 800px;
  border: none;
  border-radius: 8px;
}

/* Form elements */
.rb-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: var(--space-2);
}

.rb-field { display: flex; flex-direction: column; }

.rb-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s;
}
.rb-input:focus { border-color: rgba(255,255,255,0.15); outline: none; }

.rb-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  width: 100%;
  margin-top: var(--space-2);
  cursor: pointer;
}

.rb-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius, 8px);
  padding: 3px;
}

.rb-toggle {
  flex: 1;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.rb-toggle.active { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.rb-toggle:hover:not(.active) { color: var(--text-primary); }

.rb-sections { display: flex; flex-direction: column; gap: 2px; }
.rb-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 10px;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: background 0.15s;
}
.rb-check:hover { background: rgba(255,255,255,0.03); }
.rb-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.rb-check-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rb-check-desc { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

.rb-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.rb-email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.rb-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}
.rb-email-chip button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.15); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius, 8px);
  background: var(--text-primary);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.1); border-radius: 11px;
  cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Responsive */
@media (max-width: 900px) {
  .report-builder-content { grid-template-columns: 1fr; }
  .report-builder-preview { display: none; }
  .report-builder-modal { width: 100vw; height: 100vh; border-radius: 0; }
}
