/**
 * Shared Dashboard Styles for Project Dashboards
 * Used by: DUPE, FITCOIN, AVICI dashboards
 *
 * Each dashboard imports this file and adds project-specific styles as needed.
 */

/* Variables now provided by /shared/css/base.css
   Dashboard-specific accent colors kept for charts */
:root {
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-yellow: #d97706;
}
body.dark,
html.dark-pending body {
    --accent-purple: #a78bfa;
    --accent-blue: #60a5fa;
    --accent-yellow: #fbbf24;
}

/* ICM Analytics Branding Badge - Single source of truth */
.icm-branding,
.icm-branding-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--icm-branding-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.icm-branding:hover,
.icm-branding-badge:hover {
    opacity: 0.8;
}
.icm-branding img,
.icm-branding-badge img {
    width: 16px;
    height: 16px;
    opacity: 1;
}
/* Theme toggle provided by /shared/css/nav.css (button.theme-toggle) */

/* Base styles provided by /shared/css/base.css */
html, body { overflow-x: hidden; }

/* Container */
.container { max-width: 1400px; margin: 0 auto; padding: 20px 20px 40px; }

/* Navigation provided by /shared/css/nav.css
   DO NOT duplicate nav styles here - use .site-nav class */

.ownership-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.ownership-badge.drp {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.ownership-badge.futarchy {
    background: rgba(20, 184, 166, 0.15);
    color: #0d9488;
}

.ownership-badge.soon {
    background: rgba(128, 128, 128, 0.15);
    color: var(--color-text-muted);
}

.ownership-badge.meteora {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}

.ownership-badge.own-amm {
    background: rgba(var(--color-positive-rgb), 0.15);
    color: var(--color-positive);
}

.ownership-badge.verified {
    background: rgba(var(--color-positive-rgb), 0.15);
    color: var(--color-positive);
}

/* Dashboard Header (below nav) - Enhanced Gold Theme */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
    min-width: 0;
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--gold-primary, #d4af37) 0%,
        transparent 100%
    );
}

/* Header - Enhanced Gold Theme Layout */
header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
    min-width: 0;
    position: relative;
}

/* Dashboard pages embed an inline-centered header style; force wrap on small widths. */
header[style*="justify-content: center"] {
    flex-wrap: wrap !important;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--gold-primary, #d4af37) 0%,
        transparent 100%
    );
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.header-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.last-updated {
    color: var(--color-text-dim);
    font-size: 0.8rem;
    margin-left: auto;
    white-space: nowrap;
}
.back-link { color: var(--color-text-muted); text-decoration: none; font-size: 0.875rem; }
.back-link:hover { color: var(--color-terracotta); }

/* Contract Address - Inline compact */
.contract-address {
    display: flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}
.contract-address a { min-width: 0; }
.contract-address span { opacity: 0.7; }
.contract-address code {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
    color: var(--color-text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.copy-btn:hover { color: var(--color-terracotta); }
.copy-btn svg { width: 12px; height: 12px; }
.copy-btn.copied { color: var(--color-positive); }

/* Responsive - Stack on mobile */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    header[style*="justify-content: center"] {
        justify-content: flex-start !important;
    }
    .header-meta {
        width: 100%;
    }
    .last-updated {
        margin-left: 0;
    }
}

/* Mobile touch target baseline for dashboard controls. */
details > summary,
.period-btn,
.event-filter-chip,
.events-group-toggle,
.load-more-btn,
.show-more-btn,
.holders-sort-direction,
.pagination-container button,
.table-pagination button {
    min-height: 44px;
}

.period-btn,
.holders-sort-direction,
.pagination-container button,
.table-pagination button {
    min-width: 44px;
}

.filter-toggle {
    min-height: 44px;
}

.filter-toggle input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
}

#orderbookSort {
    min-height: 32px;
    height: 32px;
}

/* Stats Grid - Enhanced Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Base stat-card (will be enhanced by premium styles below) */
.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

/* Color Classes */
.positive { color: var(--color-positive); }
.negative { color: var(--color-negative); }
.change-positive { color: var(--color-positive); }
.change-negative { color: var(--color-negative); }

/* Section */
.section { margin-bottom: 2.5rem; }
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Feature slots - spacing for dynamically loaded content */
#feature-slot,
#custom-slot {
    margin-top: 1.5rem;
}
#feature-slot > .section:first-child,
#custom-slot > .section:first-child {
    margin-top: 0;
}
#feature-slot > .section:last-child,
#custom-slot > .section:last-child {
    margin-bottom: 2.5rem;
}

/* Badges */
.badge {
    background: var(--color-terracotta-pale);
    color: var(--color-terracotta);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}
.badge-lp { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.badge-accumulation { background: rgba(var(--color-positive-rgb), 0.2); color: var(--color-positive); }
.badge-distribution { background: rgba(var(--color-negative-rgb), 0.2); color: var(--color-negative); }
.badge-status.status-fresh { background: rgba(var(--color-positive-rgb), 0.15); color: var(--color-positive); }
.badge-status.status-stale { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.badge-status.status-missing { background: rgba(var(--color-negative-rgb), 0.15); color: var(--color-negative); }
.badge-status {
    background: var(--color-bg-card);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-status.status-fresh {
    background: rgba(var(--color-positive-rgb), 0.15);
    border-color: rgba(var(--color-positive-rgb), 0.3);
    color: var(--color-positive);
}
.badge-status.status-stale {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #d97706;
}
.badge-status.status-missing {
    background: rgba(var(--color-negative-rgb), 0.15);
    border-color: rgba(var(--color-negative-rgb), 0.3);
    color: var(--color-negative);
}
.section-summary {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    background: var(--color-bg-card);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
}

.holder-mark {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Holder Cohorts */
.cohort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.cohort-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}
/* Cohort card color variants */
.cohort-card--retail {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
    border-color: rgba(212, 175, 55, 0.25);
}
.cohort-card--lp {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(168, 85, 247, 0.02) 100%);
    border-color: rgba(168, 85, 247, 0.25);
}
.cohort-card--cex {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.02) 100%);
    border-color: rgba(234, 179, 8, 0.25);
}
.cohort-card--treasury {
    background: linear-gradient(135deg, rgba(var(--color-positive-rgb), 0.08) 0%, rgba(var(--color-positive-rgb), 0.02) 100%);
    border-color: rgba(var(--color-positive-rgb), 0.25);
}
.cohort-card--locked {
    background: linear-gradient(135deg, rgba(var(--color-negative-rgb), 0.08) 0%, rgba(var(--color-negative-rgb), 0.02) 100%);
    border-color: rgba(var(--color-negative-rgb), 0.25);
}
.cohort-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dim);
    font-weight: 600;
}
.cohort-value {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 0.35rem;
    font-family: var(--font-mono);
}
.cohort-sub {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}
.cohort-count {
    font-size: 0.7rem;
    color: var(--color-text-dim);
}
.cohort-deltas {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.cohort-delta {
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: var(--color-bg);
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* Whale Alerts */
.whale-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.whale-alert {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}
.whale-rank {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    font-weight: 600;
}
.whale-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.whale-wallet {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.whale-type {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: 999px;
    font-size: 0.55rem;
    padding: 0.12rem 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.whale-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-text-dim);
}
.whale-change.positive { color: var(--color-positive); }
.whale-change.negative { color: var(--color-negative); }

/* Net Flow Heatmap */
.heatmap-legend {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}
.heatmap-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.heatmap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.heatmap-dot.inflow { background: var(--color-positive); }
.heatmap-dot.outflow { background: var(--color-negative); }
.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-x: auto;
}
.heatmap-row {
    display: grid;
    grid-template-columns: 2fr 0.9fr 0.9fr;
    gap: 0.5rem;
    align-items: center;
}
.heatmap-header {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
}
.heatmap-cell {
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.heatmap-name a {
    color: var(--color-text);
    text-decoration: none;
}
.heatmap-name a:hover { color: var(--color-terracotta); }

/* Price Activity */
.price-activity-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    height: 260px;
}
.price-activity-card canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.price-activity-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}
.price-activity-legend .legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.price-activity-legend .legend::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 4px;
    background: var(--color-border);
}
.price-activity-legend .legend.price::before { background: var(--chart-primary); }
.price-activity-legend .legend.buys::before { background: rgba(var(--color-positive-rgb), 0.6); }
.price-activity-legend .legend.sells::before { background: rgba(var(--color-negative-rgb), 0.6); }

/* Liquidity Health Panel */
.liquidity-health {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}
.liquidity-health-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.liquidity-health-card.net {
    border-color: var(--color-border-hover);
}
.liquidity-health-card .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-dim);
    font-weight: 600;
}
.liquidity-health-card .value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-mono);
}
.liquidity-health-card .sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Holder Bar (Change Stats) - Refined Design */
.holder-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.holder-primary {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.75rem;
    min-width: 140px;
}

.holder-primary-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
    margin-bottom: 0.35rem;
}

.holder-primary-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    color: var(--color-text);
    line-height: 1;
}

.holder-divider {
    width: 1px;
    align-self: stretch;
    background: var(--color-border);
}

.holder-changes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    flex: 1;
    flex-wrap: wrap;
}

.holder-change-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.85rem;
    background: var(--color-bg);
    border-radius: 10px;
    min-width: 60px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.holder-change-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.holder-change-period {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dim);
    margin-bottom: 0.2rem;
}

.holder-change-value {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-muted);
}

/* Color coding for holder changes */
.holder-change-value.positive {
    color: var(--color-positive);
}

.holder-change-value.negative {
    color: var(--color-negative);
}

/* Dark mode adjustments */
body.dark .holder-change-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Data Freshness */
.freshness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}
.freshness-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}
.freshness-card.status-fresh { border-color: rgba(var(--color-positive-rgb), 0.35); }
.freshness-card.status-stale { border-color: rgba(251, 146, 60, 0.35); }
.freshness-card.status-missing { border-color: rgba(var(--color-negative-rgb), 0.35); }
.freshness-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dim);
}
.freshness-value {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

/* Holder Cohorts */
.cohort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.cohort-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
}
.cohort-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-dim);
}
.cohort-value {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0.35rem 0;
    font-family: var(--font-mono);
}
.cohort-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.cohort-count {
    font-size: 0.7rem;
    color: var(--color-text-dim);
}
.cohort-deltas {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

/* Net Flow Heatmap */
.heatmap-legend {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.7rem;
    color: var(--color-text-dim);
    margin-bottom: 0.6rem;
}
.heatmap-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.heatmap-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.heatmap-dot.inflow { background: var(--color-positive); }
.heatmap-dot.outflow { background: var(--color-negative); }
.heatmap-grid { display: grid; gap: 0.5rem; }
.heatmap-row {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 0.5rem;
    align-items: center;
}
.heatmap-header .heatmap-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-dim);
}
.heatmap-name { font-size: 0.8rem; }
.heatmap-cell {
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* Whale Alerts */
.whale-alerts-list { display: grid; gap: 0.75rem; }
.whale-alert {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem;
}
.whale-rank {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-dim);
}
.whale-main { display: flex; flex-direction: column; gap: 0.35rem; }
.whale-wallet { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.whale-type {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-text-muted);
}
.whale-changes { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--color-text-dim); }

/* Price Activity */
.price-activity-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    height: 260px;
}
.price-activity-card canvas { width: 100%; height: 100%; }
.price-activity-legend {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.6rem;
    font-size: 0.7rem;
    color: var(--color-text-dim);
}
.price-activity-legend .legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.price-activity-legend .legend::before {
    content: '';
    width: 10px;
    height: 3px;
    border-radius: 3px;
    background: var(--color-text-dim);
}
.price-activity-legend .legend.price::before { background: var(--chart-primary); }
.price-activity-legend .legend.buys::before { background: var(--color-positive); }
.price-activity-legend .legend.sells::before { background: var(--color-negative); }

/* Holder Marks */
.holder-mark {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.35rem;
}
.holder-mark--new { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.holder-mark--multi { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.holder-mark--sol { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.holder-mark--real { background: rgba(45, 212, 191, 0.2); color: #2dd4bf; }
.holder-mark--team { background: rgba(212, 175, 55, 0.2); color: #d4af37; }

/* Liquidity Health */
.liquidity-health {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.liquidity-health-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}
.liquidity-health-card .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dim);
}
.liquidity-health-card .value {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 0.3rem;
    font-family: var(--font-mono);
}
.liquidity-health-card .sub {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}
.liquidity-health-card.net { border-color: rgba(212, 175, 55, 0.25); }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
th {
    background: var(--color-bg-card);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-bg-card); }
.address { font-family: var(--font-mono); font-size: 0.875rem; }
.address a { color: var(--color-text); text-decoration: none; }
.address a:hover { color: var(--color-terracotta); }
.holder-identity {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}
.holder-portfolio {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    color: var(--color-text-dim);
    line-height: 1.2;
}
.rank { color: var(--color-text-muted); font-weight: 500; }
.amount { font-weight: 500; }
.percentage { color: var(--color-text-muted); }
.lp-label {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 0.125rem 0.5rem 0.125rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.75rem;
    margin-left: 0;
}
/* Label type colors — override .lp-label defaults per wallet category */
.lp-label.badge-cex, .lp-label.badge-exchange { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.lp-label.badge-treasury { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.lp-label.badge-team { background: rgba(212, 175, 55, 0.15); color: #d4af37; }
.lp-label.badge-dex { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.lp-label.badge-market_maker { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.lp-label.badge-multisig { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.lp-label.badge-locker { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Enhanced locker label with structured unlock info */
.lp-label.badge-locker.locker-enhanced {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.3rem 0.5rem;
    line-height: 1.3;
}
.locker-enhanced .locker-name {
    font-weight: 600;
    font-size: 0.75rem;
}
.locker-enhanced .locker-unlock {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.9;
}
.locker-enhanced .locker-icon {
    flex-shrink: 0;
}
.locker-enhanced .locker-countdown {
    font-size: 0.65rem;
    opacity: 0.7;
}
/* Proximity coloring for unlock dates */
.locker-enhanced .locker-unlock.locker-far { color: var(--warning, #f59e0b); }
.locker-enhanced .locker-unlock.locker-mid { color: #fb923c; }
.locker-enhanced .locker-unlock.locker-soon { color: var(--color-negative, #ef4444); }
.locker-enhanced .locker-unlock.locker-unlocked { color: var(--color-text-dim, #6B6560); }

.lp-label.badge-stream { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.lp-label.badge-defi { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }
.lp-label.badge-program { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.lp-label.badge-token { background: rgba(100, 116, 139, 0.15); color: #64748b; }
.lp-label.badge-unknown { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* Mobile sort control for holders table */
.holders-mobile-sort {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
    flex-wrap: wrap;
}
.holders-sort-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
    font-weight: 600;
}
.holders-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 220px;
}
.holders-sort-select {
    flex: 1 1 auto;
    min-width: 160px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-card);
    color: var(--color-text);
    font-size: 0.85rem;
}
.holders-sort-select:focus {
    outline: none;
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 2px var(--color-terracotta-pale);
}
.holders-sort-direction {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}
.holders-sort-direction:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}
.holders-sort-direction[aria-pressed="true"] {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
    background: var(--color-terracotta-pale);
}

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    margin: 0;
}

.table-scroll.table-wide table {
    min-width: 900px;
}

/* Supply Bar Section */
.supply-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.supply-bar-container { margin-top: 1rem; }
.supply-bar {
    height: 24px;
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}
.supply-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bg-primary);
    transition: width 0.5s ease;
}
.supply-segment.treasury { background: var(--accent-purple); }
.supply-segment.liquidity { background: var(--accent-blue); }
.supply-segment.burned { background: var(--color-negative); }
.supply-segment.circulating { background: var(--color-positive); opacity: 0.3; }

.supply-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.legend-dot.treasury { background: var(--accent-purple); }
.legend-dot.liquidity { background: var(--accent-blue); }
.legend-dot.burned { background: var(--color-negative); }
.legend-dot.circulating { background: var(--color-positive); opacity: 0.3; }

/* Chart Section */
.chart-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.chart-container {
    position: relative;
    height: 280px;
}

/* Wallets Section */
.wallets-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

/* Collapsible Sections */
.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.collapsible-header:hover { opacity: 0.8; }
.collapse-arrow {
    transition: transform 0.2s ease;
    color: var(--color-text-dim);
}
.collapsible-header.collapsed .collapse-arrow { transform: rotate(-90deg); }
.collapsible-header:not(.collapsed) .collapse-arrow { transform: rotate(0deg); }
.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}
.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Wallet Table */
.wallet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}
.wallet-table th,
.wallet-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.wallet-table th {
    color: var(--color-text-dim);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wallet-table td {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.wallet-table tr:last-child td { border-bottom: none; }
.wallet-table .wallet-label {
    color: var(--color-text);
    font-family: var(--font-sans);
    font-weight: 500;
}
.wallet-table .wallet-address a {
    color: var(--color-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.wallet-table .wallet-address a:hover { color: var(--color-terracotta); }
.wallet-table .balance {
    color: var(--color-positive);
    text-align: right;
}
.wallet-table .change-positive { color: var(--color-positive); }
.wallet-table .change-negative { color: var(--color-negative); }
.wallet-table .change-neutral { color: var(--color-text-dim); }

/* Orderbook Styles */
.orderbook-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.orderbook-side {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}
.orderbook-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.orderbook-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.orderbook-header .count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.sell-header h3 { color: var(--color-negative); }
.buy-header h3 { color: var(--color-positive); }
.orderbook-stats {
    padding: 0.75rem 1.25rem;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.orderbook-stat { display: flex; flex-direction: column; gap: 0.125rem; }
.orderbook-stat .label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.orderbook-stat .value { font-size: 0.875rem; font-weight: 600; font-family: var(--font-mono); }
.orderbook-list { max-height: 400px; overflow-y: auto; }
.orderbook-row {
    display: grid;
    grid-template-columns: 0.9fr 0.5fr 0.25fr 1fr 0.8fr 1fr 0.6fr;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    position: relative;
    transition: background 0.15s;
}
.orderbook-row .vs-market { text-align: center; font-size: 0.75rem; }
.orderbook-row .tx-link { text-align: center; }
.orderbook-row .tx-link a { color: var(--color-text-dim); text-decoration: none; font-size: 0.75rem; }
.orderbook-row .tx-link a:hover { color: var(--color-terracotta); }
.orderbook-row .usd-value { text-align: right; color: var(--color-text-muted); font-size: 0.8rem; }
.orderbook-row .status {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.status-badge { padding: 0.15rem 0.4rem; border-radius: 3px; text-decoration: none; }
.status-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-filled { background: rgba(var(--color-positive-rgb), 0.15); color: var(--color-positive); }
.status-cancelled { background: rgba(var(--color-negative-rgb), 0.15); color: var(--color-negative); }
.orderbook-row:hover { background: var(--color-bg-card); }
.orderbook-row:last-child { border-bottom: none; }
.orderbook-row .price { font-weight: 600; }
.orderbook-row .amount { text-align: center; color: var(--color-text-muted); }
.orderbook-row .maker { text-align: right; font-family: var(--font-mono); font-size: 0.75rem; }
.orderbook-row .maker a { color: var(--color-text-muted); text-decoration: none; }
.orderbook-row .maker a:hover { color: var(--color-terracotta); }
.sell-row .price { color: var(--color-negative); }
.buy-row .price { color: var(--color-positive); }
.orderbook-row-header {
    background: var(--color-bg-card);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.orderbook-row-header:hover { background: var(--color-bg-card); }
.orderbook-empty { padding: 2rem; text-align: center; color: var(--color-text-muted); font-size: 0.875rem; }
.depth-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}
.sell-row .depth-bar { background: var(--color-negative); }
.buy-row .depth-bar { background: var(--color-positive); }
.orderbook-row .time { text-align: right; color: var(--color-text-muted); font-size: 0.75rem; }
.orderbook-row .time a { color: var(--color-text-muted); text-decoration: none; }
.orderbook-row .time a:hover { color: var(--color-terracotta); }

/* DCA Styles */
.dca-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.dca-side {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}
.dca-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dca-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dca-in h3 { color: var(--color-positive); }
.dca-out h3 { color: var(--color-negative); }
.dca-stats {
    padding: 0.75rem 1.25rem;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.dca-stat { display: flex; flex-direction: column; gap: 0.125rem; }
.dca-stat .label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dca-stat .value { font-size: 0.875rem; font-weight: 600; font-family: var(--font-mono); }
.dca-list { max-height: 400px; overflow-y: auto; }
.dca-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 0.8fr;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    transition: background 0.15s;
}
.dca-row:hover { background: var(--color-bg-card); }
.dca-row:last-child { border-bottom: none; }
.dca-row-header {
    background: var(--color-bg-card);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.dca-row-header:hover { background: var(--color-bg-card); }
.dca-empty { padding: 2rem; text-align: center; color: var(--color-text-muted); font-size: 0.875rem; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ACTIVITY GRID (Net Flow Boxes) - Premium Terminal Styling
   Used by holder-activity-grid and legacy top50-activity-grid
   ═══════════════════════════════════════════════════════════════════════════════ */
.holder-activity-grid,
.top50-activity-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

/* Keep the first activity row away from card top highlights */
.section-title + .holder-activity-grid,
.section-title + .top50-activity-grid {
    margin-top: 0.7rem;
}

/* Base Activity Box */
.activity-box {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    border: 2px solid var(--color-border);
    border-radius: 14px;
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
}

/* Bullish Flow Box - Enhanced Green Glow */
.buy-box {
    border-color: var(--chart-positive, #00d084);
    background: linear-gradient(
        145deg,
        rgba(0, 208, 132, 0.12) 0%,
        rgba(0, 208, 132, 0.03) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    box-shadow:
        0 0 30px rgba(0, 208, 132, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 208, 132, 0.15);
}

.buy-box::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 208, 132, 0.4) 50%,
        transparent 100%
    );
}

.buy-box:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 40px rgba(0, 208, 132, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(0, 208, 132, 0.2);
}

/* Bearish Flow Box - Enhanced Red Glow */
.sell-box {
    border-color: var(--chart-negative, #ff4757);
    background: linear-gradient(
        145deg,
        rgba(255, 71, 87, 0.12) 0%,
        rgba(255, 71, 87, 0.03) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    box-shadow:
        0 0 30px rgba(255, 71, 87, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 71, 87, 0.15);
}

.sell-box::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 71, 87, 0.4) 50%,
        transparent 100%
    );
}

.sell-box:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 40px rgba(255, 71, 87, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 71, 87, 0.2);
}

/* Activity Header */
.activity-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
}

.activity-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.buy-box .activity-icon {
    background: rgba(0, 208, 132, 0.2);
    color: var(--chart-positive, #00d084);
    box-shadow: 0 0 12px rgba(0, 208, 132, 0.3);
}

.sell-box .activity-icon {
    background: rgba(255, 71, 87, 0.2);
    color: var(--chart-negative, #ff4757);
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.3);
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.01em;
}

/* Activity Values */
.activity-values {
    display: flex;
    gap: 2rem;
}

.activity-tokens, .activity-usd {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.activity-label {
    font-size: 0.65rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.activity-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.activity-value.positive {
    color: var(--chart-positive, #00d084);
    text-shadow: 0 0 20px rgba(0, 208, 132, 0.4);
}

.activity-value.negative {
    color: var(--chart-negative, #ff4757);
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   NET FLOW SIGNAL BOX (Center) - Premium Gold/Dynamic Styling
   ═══════════════════════════════════════════════════════════════════════════════ */
.net-box {
    background: linear-gradient(
        145deg,
        rgba(212, 175, 55, 0.15) 0%,
        rgba(212, 175, 55, 0.05) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    border: 2px solid var(--gold-primary, #d4af37);
    border-radius: 14px;
    padding: 1.35rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    text-align: center;
    box-shadow:
        0 0 35px rgba(212, 175, 55, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(212, 175, 55, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.net-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold-bright, #ffd700) 50%,
        transparent 100%
    );
}

.net-box:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 50px rgba(212, 175, 55, 0.25),
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 175, 55, 0.25);
}

/* Positive Net Flow */
.net-box.net-positive {
    border-color: var(--chart-positive, #00d084);
    background: linear-gradient(
        145deg,
        rgba(0, 208, 132, 0.15) 0%,
        rgba(0, 208, 132, 0.05) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    box-shadow:
        0 0 35px rgba(0, 208, 132, 0.25),
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(0, 208, 132, 0.2);
}

.net-box.net-positive::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 208, 132, 0.6) 50%,
        transparent 100%
    );
}

/* Negative Net Flow */
.net-box.net-negative {
    border-color: var(--chart-negative, #ff4757);
    background: linear-gradient(
        145deg,
        rgba(255, 71, 87, 0.15) 0%,
        rgba(255, 71, 87, 0.05) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    box-shadow:
        0 0 35px rgba(255, 71, 87, 0.25),
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 71, 87, 0.2);
}

.net-box.net-negative::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 71, 87, 0.6) 50%,
        transparent 100%
    );
}

/* Net Box Labels and Values */
.net-box .net-label {
    font-size: 0.7rem;
    color: var(--gold-bright, #ffd700);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.net-box .net-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.net-box .net-usd {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.net-box.net-positive .net-value,
.net-box.net-positive .net-usd {
    color: var(--chart-positive, #00d084);
    text-shadow: 0 0 25px rgba(0, 208, 132, 0.5);
}

.net-box.net-negative .net-value,
.net-box.net-negative .net-usd {
    color: var(--chart-negative, #ff4757);
    text-shadow: 0 0 25px rgba(255, 71, 87, 0.5);
}

.net-box .brand-ticker {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--gold-bright, #ffd700);
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.net-box .share-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}
/* Old .brand-logo removed - use .icm-branding-badge instead */

/* Active Wallets Row (compact stat chips below net flow grids) */
.active-wallets-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(145deg, var(--color-bg-card) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 8px;
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
}

.active-wallets-row .wallet-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.active-wallets-row .wallet-stat-label {
    font-size: 0.65rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.active-wallets-row .wallet-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Stat card label/subtext styles for iOS App section */
.stat-card .label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.stat-card .subtext {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-top: 0.25rem;
}

/* Sortable table headers */
#holdersTable th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.25rem;
    transition: color 0.15s ease;
}
#holdersTable th.sortable:hover {
    color: var(--color-terracotta);
}
#holdersTable th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 0.25rem;
    opacity: 0.3;
    font-size: 0.7rem;
}
#holdersTable th.sortable.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--color-terracotta);
}
#holdersTable th.sortable.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--color-terracotta);
}

/* Wallet address hover highlight */
.wallet-link {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    border-radius: 3px;
    padding: 1px 3px;
    margin: -1px -3px;
}
.wallet-link.wallet-highlighted {
    background-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}
footer a {
    color: var(--color-terracotta);
    text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 1rem;
    }
    .container { padding: 16px 12px 32px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    th, td { padding: 0.75rem 0.5rem; font-size: 0.875rem; }
    .address { font-size: 0.75rem; }
    .orderbook-container { grid-template-columns: 1fr; }
    .orderbook-row { grid-template-columns: 1fr 1fr 0.6fr; }
    .orderbook-row .vs-market { display: none; }
    .orderbook-row .tx-link { display: none; }
    .orderbook-row .usd-value { display: none; }
    .orderbook-row .maker { display: none; }
    .orderbook-row-header .vs-market { display: none; }
    .orderbook-row-header .tx-link { display: none; }
    .orderbook-row-header .usd-value { display: none; }
    .orderbook-row-header .maker-header { display: none; }
    .dca-container { grid-template-columns: 1fr; }
    .dca-row { grid-template-columns: 1fr 1fr 1fr; }
    .stat-card, .orderbook-side, .dca-side, .section table {
        contain: layout style;
    }
    .section-title {
        flex-wrap: wrap;
        gap: 0.35rem 0.6rem;
        line-height: 1.2;
    }
    .holder-bar {
        flex-wrap: wrap;
    }
    .holder-primary {
        padding: 1rem 1.25rem;
        min-width: 120px;
    }
    .holder-primary-value {
        font-size: 1.5rem;
    }
    .holder-changes {
        padding: 0.75rem 1rem;
        gap: 0.4rem;
    }
    .holder-change-item {
        padding: 0.4rem 0.65rem;
        min-width: 52px;
    }
    .cohort-grid { grid-template-columns: 1fr; }
    .whale-alert { grid-template-columns: 1fr; }
    .whale-rank { font-size: 0.75rem; }
    .heatmap-row { grid-template-columns: 1.6fr 0.8fr 0.8fr; }
    .price-activity-card { height: 220px; }
    /* Net Flow responsive */
    .holder-activity-grid,
    .top50-activity-grid { grid-template-columns: 1fr; }
    .activity-values { gap: 1.5rem; }
    .net-box { order: -1; min-width: unset; width: 100%; }
}

@media (max-width: 640px) {
    header h1 {
        white-space: normal;
    }
    .last-updated {
        margin-left: 0;
        white-space: normal;
    }
    .stats-grid { grid-template-columns: 1fr !important; }
    .holder-bar {
        flex-direction: column;
        border-radius: 14px;
    }
    .holder-primary {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--color-border);
    }
    .holder-primary-label {
        margin-bottom: 0;
    }
    .holder-divider {
        display: none;
    }
    .holder-changes {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    .holder-change-item {
        flex: 1;
        min-width: 0;
    }
    .activity-box { padding: 1rem; }
    .regional-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .holders-mobile-sort { display: flex; }
    #holdersTable,
    #droppedHoldersTable,
    .wallet-table {
        border: none;
        background: transparent;
        border-radius: 0;
        overflow: visible;
        width: 100%;
        min-width: 0;
    }
    #holdersTable thead,
    #droppedHoldersTable thead,
    .wallet-table thead {
        display: none;
    }
    #holdersTable tbody,
    #droppedHoldersTable tbody,
    .wallet-table tbody {
        display: block;
    }
    #holdersTable tr,
    #droppedHoldersTable tr,
    .wallet-table tr {
        display: block;
        margin-bottom: 0.75rem;
        background: var(--color-bg-card);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        overflow: hidden;
    }
    #holdersTable td,
    #droppedHoldersTable td,
    .wallet-table td {
        display: grid;
        grid-template-columns: minmax(110px, 0.45fr) 1fr;
        gap: 0.75rem;
        padding: 0.6rem 0.85rem !important;
        border-bottom: 1px solid var(--color-border);
        text-align: right !important;
        white-space: normal !important;
    }
    #holdersTable td::before,
    #droppedHoldersTable td::before,
    .wallet-table td::before {
        content: attr(data-label);
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--color-text-dim);
        font-weight: 600;
        text-align: left;
    }
    #holdersTable td:last-child,
    #droppedHoldersTable td:last-child,
    .wallet-table td:last-child {
        border-bottom: none;
    }
    #holdersTable tr:hover td,
    #droppedHoldersTable tr:hover td,
    .wallet-table tr:hover td {
        background: transparent;
    }
    #holdersTable td:not([data-label]),
    #droppedHoldersTable td:not([data-label]),
    .wallet-table td:not([data-label]) {
        grid-template-columns: 1fr;
        text-align: center !important;
    }
    #holdersTable td:not([data-label])::before,
    #droppedHoldersTable td:not([data-label])::before,
    .wallet-table td:not([data-label])::before {
        content: none;
    }
    #holdersTable td[data-label="Account"],
    #holdersTable td[data-label="Token Account"],
    #droppedHoldersTable td[data-label="Account"],
    #droppedHoldersTable td[data-label="Type"],
    #droppedHoldersTable td[data-label="Status"],
    .wallet-table td[data-label="Label"],
    .wallet-table td[data-label="Wallet"],
    .wallet-table td[data-label="Token Account"] {
        text-align: left !important;
    }
    .heatmap-row { grid-template-columns: 1fr; }
    .heatmap-cell { text-align: left; }
    .heatmap-header { display: none; }
}

@media (max-width: 480px) {
    .regional-stats-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.35rem; }
    .activity-values {
        flex-direction: column;
        gap: 0.75rem;
    }
    .net-box { padding: 1rem 1.25rem; }
}

/* Touch and scroll optimizations */
* { -webkit-tap-highlight-color: transparent; }
a, button, .stat-card { touch-action: manipulation; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .stat-card, .orderbook-row { transition: none; }
}

/* ============================================
   Liquidity Depth Styles
   ============================================ */

/* Summary Stats Grid */
.depth-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.depth-stat-box {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.depth-stat-box.warning {
    background: rgba(var(--color-negative-rgb), 0.1);
    border-color: rgba(var(--color-negative-rgb), 0.3);
}
.depth-stat-box.full-range {
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
}
.depth-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.depth-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}
.depth-stat-value.positive { color: var(--color-positive); }
.depth-stat-value.negative { color: var(--color-negative); }
.depth-stat-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-dim);
    margin-top: 0.25rem;
}

/* Depth Chart */
.depth-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.depth-chart-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    color: var(--color-text-dim);
}
.depth-chart-control-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.depth-source-toggle {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-bg);
}
.depth-toggle-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    padding: 0.2rem 0.7rem;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.depth-toggle-btn:hover {
    color: var(--color-text);
}
.depth-toggle-btn.active {
    background: var(--color-terracotta-pale);
    color: var(--color-terracotta);
}
.depth-chart-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.depth-chart-header .sell-header {
    text-align: right;
    color: var(--color-negative);
}
.depth-chart-header .buy-header {
    text-align: left;
    color: var(--color-positive);
}
.depth-chart-header .price-header {
    color: var(--color-text-muted);
    font-weight: 500;
}
.depth-chart-row {
    display: grid;
    grid-template-columns: 1fr 180px 1fr;
    gap: 0.5rem;
    align-items: center;
}
.sell-bar-container, .buy-bar-container {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
}
.sell-bar-container {
    justify-content: flex-end;
}
.buy-bar-container {
    justify-content: flex-start;
}
.depth-bar {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    min-width: 0;
    transition: width 0.3s ease;
}
.depth-bar.sell-bar {
    background: rgba(var(--color-negative-rgb), 0.3);
    justify-content: flex-start;
}
.depth-bar.buy-bar {
    background: rgba(var(--color-positive-rgb), 0.3);
    justify-content: flex-end;
}
.depth-bar.suspicious {
    background: rgba(var(--color-negative-rgb), 0.5);
    border: 1px dashed var(--color-negative);
}
.bar-label {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    line-height: 1.1;
}
.bar-label .bar-value {
    font-size: 0.7rem;
    font-weight: 600;
}
.bar-label .bar-meta {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--color-text-dim);
}
.depth-bar.sell-bar .bar-label {
    align-items: flex-start;
    text-align: left;
}
.depth-bar.buy-bar .bar-label {
    align-items: flex-end;
    text-align: right;
}
.distance-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--color-text-dim);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    line-height: 1.15;
}
.distance-label .distance-side {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}
.distance-label .distance-side.sell {
    align-items: flex-end;
    text-align: right;
}
.distance-label .distance-side.buy {
    align-items: flex-start;
    text-align: left;
}
.distance-label .distance-side.sell .distance-price {
    color: var(--color-negative);
}
.distance-label .distance-side.buy .distance-price {
    color: var(--color-positive);
}
.distance-label .distance-price {
    font-size: 0.65rem;
    color: var(--color-text);
    font-weight: 600;
}
.distance-label .distance-pct {
    font-size: 0.55rem;
    color: var(--color-text-dim);
    opacity: 0.7;
}
.suspicious-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: var(--color-negative);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.buy-bar-container .suspicious-badge {
    right: auto;
    left: -4px;
}

/* Suspicious Supply Panel */
#suspiciousSupplyPanel h4 {
    margin: 0 0 1rem 0;
    color: var(--color-negative);
    font-size: 0.9rem;
}
#suspiciousSupplyPanel h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    color: var(--color-text);
}
#suspiciousSupplyPanel ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}
#suspiciousSupplyPanel li {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}
#suspiciousSupplyPanel li.parked { color: var(--color-negative); }
#suspiciousSupplyPanel li.stale { color: #f59e0b; }
#suspiciousSupplyPanel li.unknown { color: var(--color-text-dim); }
.suspicious-side {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.suspicious-side.sell-side {
    background: rgba(var(--color-negative-rgb), 0.05);
}
.suspicious-side.buy-side {
    background: rgba(var(--color-positive-rgb), 0.05);
}
.suspicious-side.unknown-side {
    background: rgba(107, 114, 128, 0.1);
}

/* Order/Position Tables */
.depth-order-table, .depth-position-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.depth-order-table th, .depth-position-table th {
    padding: 0.5rem;
    text-align: left;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.depth-order-table td, .depth-position-table td {
    padding: 0.5rem;
    border-top: 1px solid var(--color-border);
}
.depth-order-table tr.suspicious-row,
.depth-position-table tr.suspicious-row {
    background: rgba(var(--color-negative-rgb), 0.05);
}
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    background: var(--color-bg);
    color: var(--color-text-muted);
}
.status-badge.stale {
    background: rgba(var(--color-negative-rgb), 0.1);
    color: var(--color-negative);
}
.status-badge.suspicious {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.unknown-badge {
    color: var(--color-text-dim);
    font-style: italic;
}
.amm-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(147, 51, 234, 0.15);
    color: #a855f7;
}
.full-range-table tr {
    background: transparent;
}
.show-more {
    text-align: center;
    padding: 0.5rem;
    color: var(--color-text-dim);
    font-size: 0.75rem;
}

/* Responsive adjustments for depth section */
@media (max-width: 768px) {
    .depth-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .depth-chart-row {
        grid-template-columns: 1fr 150px 1fr;
    }
    .distance-label {
        font-size: 0.65rem;
    }
    .depth-chart-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .depth-summary-grid {
        grid-template-columns: 1fr !important;
    }
    .depth-chart-row {
        grid-template-columns: 1fr 120px 1fr;
        font-size: 0.75rem;
    }
    .distance-label {
        font-size: 0.7rem;
        min-width: 45px;
    }
}

/* Show more button for order tables */
.show-more-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.show-more-btn {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-terracotta);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.show-more-btn:hover {
    background: var(--color-terracotta);
    color: var(--color-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ENHANCED DASHBOARD STYLING - Premium Terminal Aesthetic
   Matching the quality of the card stats component
   ═══════════════════════════════════════════════════════════════════════════════ */

/* === PREMIUM STAT CARDS === */
.stats-grid .stat-card {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.03) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stats-grid .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.4) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stats-grid .stat-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(212, 175, 55, 0.05);
}

.stats-grid .stat-card:hover::before {
    opacity: 1;
}

/* Stat Label - Refined Typography */
.stats-grid .stat-label {
    color: var(--color-text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stat Value - Bold Gold Accent */
.stats-grid .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Stat Change - Subtle Indicator */
.stats-grid .stat-change {
    font-size: 0.8rem;
    margin-top: 0.45rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Price Card Special Treatment */
.stats-grid .stat-card:first-child {
    border-color: rgba(212, 175, 55, 0.2);
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.06) 100%
    );
}

.stats-grid .stat-card:first-child .stat-value {
    color: var(--gold-bright, #ffd700);
}

/* SOL Price Inline Badge */
.sol-price-inline {
    font-size: 0.65rem !important;
    color: var(--gold-primary, #d4af37) !important;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* === ENHANCED SECTION TITLES === */
.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
    position: relative;
    padding-left: 0.75rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: linear-gradient(
        180deg,
        var(--gold-bright, #ffd700) 0%,
        var(--gold-primary, #d4af37) 100%
    );
    border-radius: 2px;
}

/* Badge in Section Title */
.section-title .badge {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-bright, #ffd700);
    border: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* === CHART CONTAINER STYLING === */
.chart-section,
.price-activity-card,
.cardstats-chart-section {
    background: linear-gradient(
        180deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.chart-section::after,
.price-activity-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.2) 50%,
        transparent 100%
    );
}

/* === CHART COLOR PALETTE (CSS Variables for JS) === */
:root {
    /* Primary chart colors - gold theme */
    --chart-gold: #d4af37;
    --chart-gold-light: #ffd700;
    --chart-gold-dim: rgba(212, 175, 55, 0.6);

    /* Semantic chart colors */
    --chart-positive: #00d084;
    --chart-positive-dim: rgba(0, 208, 132, 0.15);
    --chart-negative: #ff4757;
    --chart-negative-dim: rgba(255, 71, 87, 0.15);

    /* Secondary chart colors */
    --chart-blue: #60a5fa;
    --chart-purple: #a78bfa;
    --chart-cyan: #22d3ee;
    --chart-orange: #fb923c;

    /* Grid and axis */
    --chart-grid: rgba(212, 175, 55, 0.06);
    --chart-axis-text: var(--color-text-dim);

    /* Tooltip styling */
    --chart-tooltip-bg: rgba(22, 22, 26, 0.95);
    --chart-tooltip-border: rgba(212, 175, 55, 0.2);
}

body:not(.dark) {
    --chart-gold: #9a7b2c;
    --chart-gold-light: #b8960f;
    --chart-gold-dim: rgba(154, 123, 44, 0.5);
    --chart-positive: #15803d;
    --chart-positive-dim: rgba(21, 128, 61, 0.1);
    --chart-negative: #dc2626;
    --chart-negative-dim: rgba(220, 38, 38, 0.1);
    --chart-grid: rgba(154, 123, 44, 0.08);
    --chart-tooltip-bg: rgba(255, 255, 255, 0.98);
    --chart-tooltip-border: rgba(154, 123, 44, 0.15);
}

/* === HOLDER BAR ENHANCEMENT === */
.holder-bar {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.03) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 16px;
}

.holder-primary {
    border-right: 1px solid rgba(212, 175, 55, 0.1);
}

.holder-primary-value {
    color: var(--gold-bright, #ffd700);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.holder-change-item {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.holder-change-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

/* === COHORT CARDS ENHANCEMENT === */
.cohort-card {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cohort-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cohort-value {
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

/* === TABLE ENHANCEMENTS === */
table {
    background: var(--color-bg-card);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
}

th {
    background: rgba(212, 175, 55, 0.04);
    color: var(--color-text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

tr:hover td {
    background: rgba(212, 175, 55, 0.03);
}

/* === ORDERBOOK ENHANCEMENT === */
.orderbook-side {
    background: linear-gradient(
        180deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
}

.orderbook-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    background: rgba(212, 175, 55, 0.03);
}

.sell-header h3 {
    color: var(--chart-negative);
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
}

.buy-header h3 {
    color: var(--chart-positive);
    text-shadow: 0 0 20px rgba(0, 208, 132, 0.3);
}

/* === ACTIVITY BOXES ENHANCEMENT === */
.buy-box {
    border-color: var(--chart-positive);
    background: linear-gradient(
        145deg,
        rgba(0, 208, 132, 0.08) 0%,
        rgba(0, 208, 132, 0.02) 100%
    );
    box-shadow:
        0 0 20px rgba(0, 208, 132, 0.1),
        inset 0 1px 0 rgba(0, 208, 132, 0.1);
}

.sell-box {
    border-color: var(--chart-negative);
    background: linear-gradient(
        145deg,
        rgba(255, 71, 87, 0.08) 0%,
        rgba(255, 71, 87, 0.02) 100%
    );
    box-shadow:
        0 0 20px rgba(255, 71, 87, 0.1),
        inset 0 1px 0 rgba(255, 71, 87, 0.1);
}

.net-box {
    background: linear-gradient(
        145deg,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(212, 175, 55, 0.03) 100%
    );
    border: 2px solid var(--gold-primary, #d4af37);
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(212, 175, 55, 0.15);
}

.net-box .net-label {
    color: var(--gold-bright, #ffd700);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* === DEPTH CHART ENHANCEMENTS === */
.depth-stat-box {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.depth-stat-box:hover {
    border-color: rgba(212, 175, 55, 0.2);
}

.depth-bar.sell-bar {
    background: linear-gradient(
        90deg,
        rgba(255, 71, 87, 0.4) 0%,
        rgba(255, 71, 87, 0.15) 100%
    );
}

.depth-bar.buy-bar {
    background: linear-gradient(
        90deg,
        rgba(0, 208, 132, 0.15) 0%,
        rgba(0, 208, 132, 0.4) 100%
    );
}

/* === LIQUIDITY HEALTH ENHANCEMENT === */
.liquidity-health-card {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.liquidity-health-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.liquidity-health-card.net {
    border-color: rgba(212, 175, 55, 0.25);
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.05) 100%
    );
}

/* === PERIOD TABS (matching cardstats) === */
.period-tab {
    background: var(--color-bg);
    border: 1px solid rgba(212, 175, 55, 0.12);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.period-tab:hover {
    border-color: rgba(212, 175, 55, 0.25);
    color: var(--color-text);
}

.period-tab.active {
    background: linear-gradient(
        145deg,
        var(--gold-primary, #d4af37) 0%,
        var(--gold-dim, #9a7b2c) 100%
    );
    border-color: var(--gold-primary, #d4af37);
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* === WHALE ALERTS ENHANCEMENT === */
.whale-alert {
    background: linear-gradient(
        145deg,
        var(--color-bg-card) 0%,
        rgba(212, 175, 55, 0.02) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.whale-alert:hover {
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateX(2px);
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.35);
}

/* === GLOW ANIMATIONS === */
@keyframes subtle-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.1); }
    50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.2); }
}

.stats-grid .stat-card:first-child {
    animation: subtle-glow 4s ease-in-out infinite;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .stats-grid .stat-card:first-child {
        animation: none;
    }
    .stats-grid .stat-card,
    .holder-change-item,
    .cohort-card,
    .whale-alert {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   Replacing ~2000 inline styles across dashboard templates
   ═══════════════════════════════════════════════════════════════════════════════ */

/* --- Text Utilities --- */
.text-muted { color: var(--color-text-muted); }
.text-dim { color: var(--color-text-dim); }
.text-primary { color: var(--color-text); }
.text-accent { color: var(--color-terracotta-text); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.75rem; }
.text-base { font-size: 0.8rem; }
.text-md { font-size: 0.875rem; }
.text-lg { font-size: 1rem; }
.text-xl { font-size: 1.25rem; }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* --- Spacing Utilities --- */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* --- Flexbox Utilities --- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

/* --- Grid Utilities --- */
.grid { display: grid; }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* --- Button Utilities --- */
.btn-pagination {
    padding: 0.4rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    cursor: pointer;
    font-size: 0.8rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.btn-pagination:hover:not(:disabled) {
    border-color: var(--color-terracotta);
    background: var(--color-terracotta-pale);
}
.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Details/Summary Pattern --- */
.details-toggle {
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: var(--color-terracotta-pale);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.details-toggle:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}
.details-content {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}
.details-section {
    cursor: pointer;
    padding: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --- Pagination Container --- */
.pagination-bar {
    padding: 0.75rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    background: var(--color-bg-card);
}

/* --- Responsive Grid Override --- */
@media (max-width: 768px) {
    .grid-cols-4, .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .grid-cols-4, .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   NET FLOW INFO ICON & POPUP
   ═══════════════════════════════════════════════════════════════ */

.net-flow-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--text-secondary, #888);
    font-size: 0.7rem;
    font-style: italic;
    font-family: Georgia, serif;
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: border-color 0.2s, color 0.2s;
    position: relative;
    line-height: 1;
}

.net-flow-info-icon:hover {
    border-color: var(--protocol-accent, var(--color-accent));
    color: var(--protocol-accent, var(--color-accent));
}

.net-flow-info-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 280px;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    font-size: 0.78rem;
    font-weight: 400;
    font-style: normal;
    font-family: inherit;
    line-height: 1.5;
    color: var(--color-text);
    white-space: normal;
}

.net-flow-info-popup.show {
    display: block;
}

.net-flow-info-popup dt {
    font-weight: 600;
    color: var(--protocol-accent, var(--color-accent));
    margin-top: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.net-flow-info-popup dt:first-child {
    margin-top: 0;
}

.net-flow-info-popup dd {
    margin: 2px 0 0 0;
    color: var(--text-secondary, #aaa);
}

@media (max-width: 480px) {
    .net-flow-info-popup {
        min-width: 240px;
        max-width: min(320px, 85vw);
        left: -10px;
    }
}
