/* ============================================================
   DASHBOARD ELITE — Ultra-Premium Trading Dashboard  
   Luxury Financial Terminal CSS Framework
   Gold & Navy + Glassmorphism + Animated Mesh BG
   ============================================================ */

/* ── Premium Design Tokens ── */
:root {
    /* Accent: follows admin primaryColor */
    --de-accent: var(--primary-orange, #C9A84C);
    --de-accent-rgb: var(--primary-rgb, 201, 168, 76);
    --de-accent-bright: var(--primary-orange-light, #E8C547);
    --de-accent-dim: var(--primary-orange-dim, rgba(201, 168, 76, 0.10));
    --de-accent-glow: var(--primary-orange-glow, rgba(201, 168, 76, 0.30));
    --de-accent-border: var(--primary-orange-border, rgba(201, 168, 76, 0.20));
    --de-accent-shimmer: linear-gradient(120deg, rgba(var(--de-accent-rgb),0) 0%, rgba(var(--de-accent-rgb),0.15) 40%, rgba(var(--de-accent-rgb),0.25) 50%, rgba(var(--de-accent-rgb),0.15) 60%, rgba(var(--de-accent-rgb),0) 100%);

    /* Button: follows admin buttonColor, falls back to accent */
    --de-btn: var(--button-color, var(--de-accent));
    --de-btn-bright: var(--button-color-dark, var(--de-accent-bright));
    --de-btn-rgb: var(--button-rgb, var(--de-accent-rgb));
    --de-btn-glow: var(--button-color-glow, var(--de-accent-glow));

    --de-green: var(--color-success, #00D68F);
    --de-green-rgb: var(--success-rgb, 0, 214, 143);
    --de-green-dim: var(--success-dim, rgba(0, 214, 143, 0.10));
    --de-green-glow: var(--success-glow, rgba(0, 214, 143, 0.35));
    --de-red: var(--color-danger, #FF4D6A);
    --de-red-rgb: var(--danger-rgb, 255, 77, 106);
    --de-red-dim: var(--danger-dim, rgba(255, 77, 106, 0.10));
    --de-red-glow: var(--danger-glow, rgba(255, 77, 106, 0.35));
    --de-blue: var(--color-secondary, #4C7BF4);
    --de-blue-dim: rgba(76, 123, 244, 0.10);
    --de-cyan: var(--color-info, #22D3EE);
    --de-purple: #A78BFA;
    --de-yellow: var(--color-warning, #FBBF24);

    /* Backgrounds: follows admin backgroundColor & cardColor */
    --de-bg-void: var(--bg-dark, #050A15);
    --de-bg-void-rgb: var(--bg-rgb, 5, 10, 21);
    --de-bg-base: var(--bg-dark, #0B1120);
    --de-bg-surface: var(--bg-card, rgba(15, 23, 42, 0.65));
    --de-bg-elevated: var(--bg-elevated, rgba(20, 30, 55, 0.55));
    --de-bg-card-rgb: var(--card-rgb, 12, 19, 36);
    --de-bg-glass: rgba(var(--de-bg-card-rgb), 0.55);
    --de-bg-glass-heavy: rgba(var(--de-bg-card-rgb), 0.88);
    --de-bg-hover: rgba(255, 255, 255, 0.035);
    --de-bg-active: rgba(255, 255, 255, 0.065);
    --de-bg-input: rgba(var(--de-bg-card-rgb), 0.7);

    --de-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");

    /* Text: follows admin textColor & mutedColor */
    --de-text: var(--text-primary, #E2E8F0);
    --de-text-secondary: var(--text-secondary, #8B9DC3);
    --de-text-muted: var(--text-muted, #475569);
    --de-text-gold: var(--primary-orange, #C9A84C);

    /* Borders: follows admin */
    --de-border: var(--border-color, rgba(45, 60, 90, 0.4));
    --de-border-subtle: var(--border-subtle, rgba(255, 255, 255, 0.04));
    --de-border-accent: var(--primary-orange-border, rgba(201, 168, 76, 0.25));
    --de-border-gradient: linear-gradient(135deg, rgba(var(--de-accent-rgb),0.3) 0%, rgba(var(--de-accent-rgb),0.05) 40%, rgba(var(--de-accent-rgb),0.05) 60%, rgba(var(--de-accent-rgb),0.2) 100%);

    --de-shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --de-shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
    --de-shadow-lg: 0 12px 40px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
    --de-shadow-glow: 0 0 30px rgba(var(--de-accent-rgb),0.12), 0 0 60px rgba(var(--de-accent-rgb),0.06);
    --de-shadow-inset: inset 0 1px 0 rgba(255,255,255,0.03);

    --de-radius-sm: 8px;
    --de-radius: 12px;
    --de-radius-lg: 16px;
    --de-radius-xl: 24px;
    --de-radius-full: 9999px;
    --de-gap: 12px;
    --de-gap-lg: 20px;
    --de-topbar-h: 56px;
    --de-bottomnav-h: 64px;
    --de-ticker-h: 32px;
    --de-sidebar-w: 280px;
    --de-max-w: 1440px;
    --de-content-pad: 16px;

    --de-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --de-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --de-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --de-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --de-dur: 0.3s;
    --de-dur-slow: 0.5s;
    --de-dur-fast: 0.15s;

    --de-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --de-font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --de-font-display: 'Inter', system-ui, sans-serif;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.dashboard-pro {
    font-family: var(--de-font);
    background: var(--de-bg-void);
    color: var(--de-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

/* Mesh gradient animated background */
body.dashboard-pro::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 20% 20%, rgba(76,123,244,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(var(--de-accent-rgb),0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 60% 10%, rgba(0,214,143,0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: meshShift 30s ease-in-out infinite alternate;
}

/* Noise overlay */
body.dashboard-pro::after {
    content: '';
    position: fixed; inset: 0;
    background-image: var(--de-noise);
    background-repeat: repeat;
    background-size: 256px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

@keyframes meshShift {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(1deg); }
    100% { transform: scale(1) rotate(-1deg); }
}

body.dashboard-pro::-webkit-scrollbar { width: 5px; }
body.dashboard-pro::-webkit-scrollbar-track { background: transparent; }
body.dashboard-pro::-webkit-scrollbar-thumb { background: rgba(var(--de-accent-rgb),0.2); border-radius: 3px; }
body.dashboard-pro::-webkit-scrollbar-thumb:hover { background: rgba(var(--de-accent-rgb),0.35); }

/* ── Glass Card System ── */
.glass-card {
    background: var(--de-bg-surface);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--de-border-subtle);
    border-radius: var(--de-radius-lg);
    box-shadow: var(--de-shadow-inset), var(--de-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all var(--de-dur) var(--de-ease);
}
.glass-card::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--de-border-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--de-dur) var(--de-ease);
}
.glass-card:hover::before { opacity: 1; }
.glass-card:hover {
    box-shadow: var(--de-shadow-inset), var(--de-shadow-md), var(--de-shadow-glow);
    transform: translateY(-1px);
}
.glass-card::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--de-accent-shimmer);
    background-size: 200% 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.glass-card:hover::after {
    opacity: 1;
    animation: shimmerSlide 1.5s ease-in-out;
}
@keyframes shimmerSlide {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Topbar — inherits from pro-topbar.css, flush with ticker ── */
body.dashboard-pro .pro-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--de-topbar-h);
    border-bottom: none;
    margin-bottom: 0;
    box-shadow: none;
    z-index: 200;
}

/* ── Ticker Tape ── */
.ticker-tape {
    width: 100%;
    height: var(--de-ticker-h);
    background: var(--de-bg-void);
    border-bottom: 1px solid var(--de-border-subtle);
    overflow: hidden;
    position: fixed;
    top: var(--de-topbar-h);
    left: 0; right: 0;
    display: flex; align-items: center;
    z-index: 199;
    margin-top: 0;
}
.ticker-tape::before, .ticker-tape::after {
    content: '';
    position: absolute; top: 0; bottom: 0; width: 40px;
    z-index: 2; pointer-events: none;
}
.ticker-tape::before { left: 0; background: linear-gradient(90deg, var(--de-bg-void), transparent); }
.ticker-tape::after { right: 0; background: linear-gradient(-90deg, var(--de-bg-void), transparent); }

.ticker-tape-inner {
    display: flex; align-items: center; gap: 32px;
    white-space: nowrap;
    animation: tickerScroll 80s linear infinite;
    will-change: transform;
}
.ticker-tape:hover .ticker-tape-inner { animation-play-state: paused; }

.ticker-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 600;
    font-family: var(--de-font-mono);
    color: var(--de-text-secondary);
    cursor: default; letter-spacing: 0.3px;
}
.ticker-item .ticker-symbol { color: var(--de-text); font-weight: 700; }
.ticker-item .ticker-price { color: var(--de-text); }
.ticker-item .ticker-change { font-weight: 700; }
.ticker-item .ticker-change.up { color: var(--de-green); }
.ticker-item .ticker-change.down { color: var(--de-red); }
.ticker-sep {
    width: 2px; height: 2px; border-radius: 50%;
    background: var(--de-text-gold);
    opacity: 0.4;
    display: inline-block;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Sidebar ── */
body.dashboard-pro .sidebar-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden;
    transition: all var(--de-dur) var(--de-ease);
}
body.dashboard-pro .sidebar-overlay.active { opacity: 1; visibility: visible; }

body.dashboard-pro .user-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--de-sidebar-w); z-index: 201;
    background: var(--de-bg-glass-heavy);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid var(--de-border-subtle);
    transform: translateX(-100%);
    transition: transform var(--de-dur-slow) var(--de-ease);
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
}
body.dashboard-pro .user-sidebar.active { transform: translateX(0); }
body.dashboard-pro .user-sidebar::-webkit-scrollbar { width: 0; }

body.dashboard-pro .sidebar-header {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--de-border-subtle);
    position: relative;
}
body.dashboard-pro .sidebar-close {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--de-text-muted);
    cursor: pointer; padding: 6px; border-radius: 8px;
    transition: all var(--de-dur) var(--de-ease);
}
body.dashboard-pro .sidebar-close:hover { color: var(--de-text); background: var(--de-bg-hover); }

body.dashboard-pro .sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--de-text);
}
body.dashboard-pro .sidebar-logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(var(--de-accent-rgb),0.1);
    border: 1px solid rgba(var(--de-accent-rgb),0.15);
    overflow: hidden;
}
body.dashboard-pro .sidebar-title {
    font-weight: 800; font-size: 16px; color: var(--de-text);
    letter-spacing: -0.3px;
}
body.dashboard-pro .sidebar-subtitle {
    font-size: 10px; color: var(--de-text-gold); font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase;
}

body.dashboard-pro .sidebar-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
body.dashboard-pro .menu-section-title {
    display: block;
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--de-text-muted);
    padding: 20px 12px 6px;
}
body.dashboard-pro .menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--de-radius-sm);
    color: var(--de-text-secondary);
    text-decoration: none; font-size: 13px; font-weight: 500;
    transition: all var(--de-dur-fast) var(--de-ease);
    position: relative;
}
body.dashboard-pro .menu-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.5; }
body.dashboard-pro .menu-item:hover {
    background: var(--de-bg-hover); color: var(--de-text);
}
body.dashboard-pro .menu-item:hover svg { opacity: 0.8; }
body.dashboard-pro .menu-item.active {
    background: var(--de-accent-dim);
    color: var(--de-text-gold);
}
body.dashboard-pro .menu-item.active svg { opacity: 1; color: var(--de-text-gold); }
body.dashboard-pro .menu-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--de-accent-bright), var(--de-accent));
    box-shadow: 0 0 8px rgba(var(--de-accent-rgb),0.4);
}

body.dashboard-pro .sidebar-footer {
    padding: 14px 16px; border-top: 1px solid var(--de-border-subtle);
}
body.dashboard-pro .logout-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 10px 12px;
    background: rgba(255, 77, 106, 0.06);
    border: 1px solid rgba(255, 77, 106, 0.12);
    border-radius: var(--de-radius-sm);
    color: #ff7b8f; font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all var(--de-dur) var(--de-ease);
}
body.dashboard-pro .logout-btn:hover {
    background: rgba(255, 77, 106, 0.12);
    border-color: rgba(255, 77, 106, 0.25);
}

/* ── Main Content ── */
body.dashboard-pro .dashboard-main {
    position: relative; z-index: 1;
    padding: calc(var(--de-topbar-h) + var(--de-ticker-h)) 0 calc(var(--de-bottomnav-h) + 20px) 0;
    max-width: var(--de-max-w);
    margin: 0 auto;
    min-height: calc(100vh - var(--de-topbar-h));
}

.dash-pad { padding: 0 var(--de-content-pad); }

/* ── Section Headers ── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--de-content-pad);
    margin-bottom: 12px;
}
.section-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--de-text);
    letter-spacing: -0.2px;
}
.section-label .s-icon {
    width: 16px; height: 16px;
    color: var(--de-text-gold);
    opacity: 0.7;
}
.section-label .s-live {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--de-green);
    box-shadow: 0 0 8px var(--de-green-glow);
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.section-more {
    font-size: 11px; font-weight: 600; color: var(--de-text-gold);
    text-decoration: none;
    display: flex; align-items: center; gap: 3px;
    opacity: 0.7;
    transition: opacity var(--de-dur) var(--de-ease);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.section-more:hover { opacity: 1; }
.section-more svg { width: 12px; height: 12px; }

/* ── Hero Banner ── */
.hero-banner {
    position: relative;
    margin: 0 var(--de-content-pad) 16px;
    border-radius: var(--de-radius-lg);
    overflow: hidden;
    box-shadow: var(--de-shadow-md);
}
.hero-banner-track {
    display: flex;
    transition: transform var(--de-dur-slow) var(--de-ease);
    will-change: transform;
}
.hero-banner-track.dragging { transition: none; }
.hero-banner-slide { min-width: 100%; flex-shrink: 0; }
.hero-banner-slide img {
    width: 100%; display: block;
    height: 160px; object-fit: cover;
}
.hero-banner-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--de-accent-rgb),0.2);
    color: var(--de-text-gold); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 3; opacity: 0;
    transition: all var(--de-dur) var(--de-ease);
}
.hero-banner:hover .hero-banner-nav { opacity: 1; }
.hero-banner-nav:hover {
    background: rgba(0,0,0,0.7);
    border-color: rgba(var(--de-accent-rgb),0.4);
    box-shadow: 0 0 12px rgba(var(--de-accent-rgb),0.15);
}
.hero-banner-nav.prev { left: 8px; }
.hero-banner-nav.next { right: 8px; }
.hero-banner-nav svg { width: 14px; height: 14px; }

.hero-banner-indicators {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 4px; z-index: 3;
    padding: 3px 8px; border-radius: var(--de-radius-full);
    background: rgba(0,0,0,0.5); backdrop-filter: blur(10px);
}
.hero-banner-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,0.25); border: none; padding: 0;
    cursor: pointer; transition: all 0.3s var(--de-ease);
}
.hero-banner-dot.active {
    background: var(--de-text-gold); width: 16px; border-radius: 3px;
    box-shadow: 0 0 6px rgba(var(--de-accent-rgb),0.4);
}

/* ── Quick Access ── */
.quick-access {
    padding: 0 var(--de-content-pad) 12px;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.quick-access::-webkit-scrollbar { display: none; }

.quick-access-grid {
    display: flex; gap: 8px;
    padding: 2px 0;
}
.quick-access-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 5px;
    padding: 10px 6px 8px;
    min-width: 64px;
    border-radius: var(--de-radius);
    text-decoration: none;
    color: var(--de-text-secondary);
    transition: all var(--de-dur) var(--de-ease);
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.quick-access-item:hover {
    background: var(--de-bg-hover);
    border-color: var(--de-border-subtle);
    color: var(--de-text);
    transform: translateY(-2px);
}
.quick-access-item:active { transform: translateY(0) scale(0.97); }

.qa-icon {
    width: 40px; height: 40px;
    border-radius: var(--de-radius);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--de-dur) var(--de-ease);
}
.qa-icon svg { width: 20px; height: 20px; }
.quick-access-item span {
    font-size: 9px; font-weight: 600;
    text-align: center; line-height: 1.15;
    white-space: nowrap; letter-spacing: 0.2px;
}

/* ── Portfolio Hero ── */
.portfolio-hero {
    margin: 0 var(--de-content-pad) 16px;
    padding: 24px 20px 20px;
    background: var(--de-bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--de-border-subtle);
    border-radius: var(--de-radius-xl);
    box-shadow: var(--de-shadow-inset), var(--de-shadow-md);
    position: relative;
    overflow: hidden;
}
.portfolio-hero::before {
    content: ''; position: absolute;
    top: -60px; right: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(var(--de-accent-rgb),0.12) 0%, rgba(var(--de-accent-rgb),0.04) 40%, transparent 70%);
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite alternate;
}
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10px, 15px) scale(1.1); }
}
.portfolio-hero::after {
    content: ''; position: absolute;
    bottom: -30px; left: -20px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(76,123,244,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.portfolio-hero-greeting {
    font-size: 12px; color: var(--de-text-muted);
    font-weight: 500; margin-bottom: 2px; letter-spacing: 0.3px;
}
.portfolio-hero-name {
    font-size: 15px; color: var(--de-text);
    font-weight: 700; margin-bottom: 16px; letter-spacing: -0.3px;
}
.portfolio-hero-label {
    font-size: 10px; color: var(--de-text-gold);
    font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 4px;
}
.portfolio-hero-balance {
    font-size: 32px; font-weight: 900; color: var(--de-text);
    font-family: var(--de-font-display);
    letter-spacing: -1.5px; margin-bottom: 6px;
    line-height: 1.1;
    position: relative; z-index: 1;
}
.portfolio-hero-change {
    font-size: 12px; font-weight: 700;
    font-family: var(--de-font-mono);
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--de-radius-full);
    letter-spacing: 0.3px;
}
.portfolio-hero-change.positive {
    color: var(--de-green);
    background: var(--de-green-dim);
    box-shadow: 0 0 12px var(--de-green-dim);
}
.portfolio-hero-change.negative {
    color: var(--de-red);
    background: var(--de-red-dim);
    box-shadow: 0 0 12px var(--de-red-dim);
}
.portfolio-hero-change svg { width: 12px; height: 12px; }

.portfolio-stats-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--de-border-subtle);
    position: relative; z-index: 1;
}
.portfolio-stat-item { display: flex; flex-direction: column; gap: 1px; }
.portfolio-stat-label {
    font-size: 10px; color: var(--de-text-muted);
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}
.portfolio-stat-value {
    font-size: 15px; font-weight: 700; color: var(--de-text);
    font-family: var(--de-font-mono); letter-spacing: -0.5px;
}

.portfolio-actions {
    display: flex; gap: 8px; margin-top: 16px;
    position: relative; z-index: 1;
}
.portfolio-action-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 16px;
    border-radius: var(--de-radius);
    font-size: 13px; font-weight: 700;
    text-decoration: none;
    transition: all var(--de-dur) var(--de-ease);
    border: none; cursor: pointer; letter-spacing: -0.2px;
}
.portfolio-action-btn svg { width: 16px; height: 16px; }
.portfolio-action-btn.primary {
    background: linear-gradient(135deg, var(--de-btn), var(--de-btn-bright));
    color: #0B1120;
    box-shadow: 0 2px 12px rgba(var(--de-btn-rgb),0.25);
}
.portfolio-action-btn.primary:hover {
    box-shadow: 0 4px 20px rgba(var(--de-btn-rgb),0.4);
    transform: translateY(-1px);
}
.portfolio-action-btn.secondary {
    background: var(--de-bg-hover);
    border: 1px solid var(--de-border);
    color: var(--de-text);
}
.portfolio-action-btn.secondary:hover {
    background: var(--de-bg-active);
    border-color: var(--de-border-accent);
}

/* ── Market Summary ── */
.market-summary-scroll {
    display: flex; gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 var(--de-content-pad) 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.market-summary-scroll::-webkit-scrollbar { display: none; }

.market-summary-card {
    flex: 0 0 auto; width: 155px;
    padding: 14px;
    background: var(--de-bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--de-border-subtle);
    border-radius: var(--de-radius);
    scroll-snap-align: start;
    cursor: pointer;
    transition: all var(--de-dur) var(--de-ease);
    position: relative; overflow: hidden;
}
.market-summary-card::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--de-accent-shimmer);
    background-size: 200% 100%;
    pointer-events: none;
    opacity: 0; transition: opacity 0.3s ease;
}
.market-summary-card:hover::after {
    opacity: 1;
    animation: shimmerSlide 1.5s ease;
}
.market-summary-card:hover {
    border-color: var(--de-border-accent);
    transform: translateY(-2px);
    box-shadow: var(--de-shadow-md), var(--de-shadow-glow);
}
.market-summary-card .msc-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.market-summary-card .msc-symbol {
    font-size: 11px; font-weight: 700; color: var(--de-text-secondary);
    letter-spacing: 0.5px;
}
.market-summary-card .msc-flag { font-size: 13px; }
.market-summary-card .msc-price {
    font-size: 17px; font-weight: 800; color: var(--de-text);
    font-family: var(--de-font-mono); letter-spacing: -0.5px;
    margin-bottom: 2px;
}
.market-summary-card .msc-change {
    font-size: 11px; font-weight: 700;
    font-family: var(--de-font-mono);
    display: flex; align-items: center; gap: 3px;
}
.market-summary-card .msc-change.up { color: var(--de-green); }
.market-summary-card .msc-change.down { color: var(--de-red); }
.market-summary-card .msc-sparkline {
    height: 28px; margin-top: 8px; position: relative; z-index: 1;
}
.market-summary-card .msc-sparkline canvas { width: 100% !important; height: 100% !important; }

/* ── Performance Chart ── */
.perf-chart-card {
    margin: 0 var(--de-content-pad) 16px;
    padding: 18px;
    background: var(--de-bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--de-border-subtle);
    border-radius: var(--de-radius-lg);
    box-shadow: var(--de-shadow-inset), var(--de-shadow-sm);
}
.perf-chart-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.perf-chart-title {
    font-size: 13px; font-weight: 700; color: var(--de-text);
    letter-spacing: -0.2px;
}
.perf-timeframes {
    display: flex; gap: 2px;
    background: var(--de-bg-input);
    border-radius: var(--de-radius-sm);
    padding: 2px;
    border: 1px solid var(--de-border-subtle);
}
.perf-tf-btn {
    padding: 5px 10px;
    font-size: 10px; font-weight: 700;
    color: var(--de-text-muted);
    background: none; border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--de-dur-fast) var(--de-ease);
    letter-spacing: 0.5px;
}
.perf-tf-btn:hover { color: var(--de-text-secondary); }
.perf-tf-btn.active {
    color: var(--de-text-gold);
    background: rgba(var(--de-accent-rgb),0.12);
    box-shadow: 0 0 8px rgba(var(--de-accent-rgb),0.08);
}
.perf-chart-area { height: 180px; position: relative; }
.perf-chart-area canvas { width: 100% !important; height: 100% !important; }

/* ── Holdings ── */
.holdings-scroll {
    display: flex; gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 var(--de-content-pad) 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.holdings-scroll::-webkit-scrollbar { display: none; }

.holding-card {
    flex: 0 0 auto; width: 195px;
    padding: 14px;
    background: var(--de-bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--de-border-subtle);
    border-radius: var(--de-radius);
    scroll-snap-align: start;
    cursor: pointer;
    transition: all var(--de-dur) var(--de-ease);
}
.holding-card:hover {
    border-color: var(--de-border-accent);
    transform: translateY(-2px);
    box-shadow: var(--de-shadow-md);
}
.holding-card .hc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.holding-card .hc-logo {
    width: 34px; height: 34px; border-radius: var(--de-radius);
    background: var(--de-bg-elevated);
    border: 1px solid var(--de-border-subtle);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 11px; color: var(--de-text-muted);
    overflow: hidden;
}
.holding-card .hc-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--de-radius); }
.holding-card .hc-symbol { font-size: 13px; font-weight: 700; color: var(--de-text); letter-spacing: -0.2px; }
.holding-card .hc-qty { font-size: 10px; color: var(--de-text-muted); font-family: var(--de-font-mono); }
.holding-card .hc-value {
    font-size: 15px; font-weight: 700; color: var(--de-text);
    font-family: var(--de-font-mono); letter-spacing: -0.5px; margin-bottom: 2px;
}
.holding-card .hc-pnl {
    font-size: 11px; font-weight: 700;
    font-family: var(--de-font-mono);
    display: flex; align-items: center; gap: 3px;
}
.holding-card .hc-pnl.up { color: var(--de-green); }
.holding-card .hc-pnl.down { color: var(--de-red); }
.holding-card .hc-chart { height: 28px; margin-top: 8px; }
.holding-card .hc-chart canvas { width: 100% !important; height: 100% !important; }

/* ── Watchlist ── */
.watchlist-grid {
    display: flex; flex-direction: column;
    gap: 2px; padding: 0 var(--de-content-pad);
}
.watchlist-item {
    display: grid;
    grid-template-columns: 38px 1fr 56px auto;
    align-items: center; gap: 10px;
    padding: 11px 12px;
    border-radius: var(--de-radius);
    background: var(--de-bg-surface);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--de-dur-fast) var(--de-ease);
    text-decoration: none; color: inherit;
}
.watchlist-item:hover {
    border-color: var(--de-border-subtle);
    background: var(--de-bg-elevated);
}
.watchlist-item .wl-logo {
    width: 38px; height: 38px;
    border-radius: var(--de-radius);
    background: var(--de-bg-elevated);
    border: 1px solid var(--de-border-subtle);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; color: var(--de-text-muted);
    overflow: hidden;
}
.watchlist-item .wl-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--de-radius); }
.watchlist-item .wl-info { min-width: 0; }
.watchlist-item .wl-symbol { font-size: 13px; font-weight: 700; color: var(--de-text); letter-spacing: -0.2px; }
.watchlist-item .wl-name {
    font-size: 10px; color: var(--de-text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.watchlist-item .wl-chart { width: 56px; height: 24px; }
.watchlist-item .wl-chart canvas { width: 100% !important; height: 100% !important; }
.watchlist-item .wl-price-col { text-align: right; min-width: 78px; }
.watchlist-item .wl-price {
    font-size: 13px; font-weight: 700; color: var(--de-text);
    font-family: var(--de-font-mono); letter-spacing: -0.3px;
}
.watchlist-item .wl-change { font-size: 10px; font-weight: 700; font-family: var(--de-font-mono); }
.watchlist-item .wl-change.up { color: var(--de-green); }
.watchlist-item .wl-change.down { color: var(--de-red); }

/* ── Market Movers ── */
.movers-tabs {
    display: flex; gap: 0;
    background: var(--de-bg-input);
    border-radius: var(--de-radius);
    overflow: hidden;
    border: 1px solid var(--de-border-subtle);
    margin: 0 var(--de-content-pad) 10px;
}
.movers-tab {
    flex: 1; padding: 10px 8px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--de-text-muted);
    border: none; background: none; cursor: pointer;
    transition: all var(--de-dur-fast) var(--de-ease);
    text-align: center;
}
.movers-tab:hover { color: var(--de-text-secondary); }
.movers-tab.active {
    color: var(--de-text-gold);
    background: rgba(var(--de-accent-rgb),0.1);
}

.movers-list {
    display: flex; flex-direction: column;
    gap: 1px; padding: 0 var(--de-content-pad);
}
.mover-item {
    display: grid;
    grid-template-columns: 28px 1fr 54px auto;
    align-items: center; gap: 10px;
    padding: 10px 10px;
    border-radius: var(--de-radius-sm);
    cursor: pointer;
    transition: background var(--de-dur-fast) var(--de-ease);
    text-decoration: none; color: inherit;
}
.mover-item:hover { background: var(--de-bg-hover); }
.mover-item .mv-rank { font-size: 10px; font-weight: 700; color: var(--de-text-muted); text-align: center; font-family: var(--de-font-mono); }
.mover-item .mv-info { min-width: 0; }
.mover-item .mv-symbol { font-size: 12px; font-weight: 700; color: var(--de-text); letter-spacing: -0.2px; }
.mover-item .mv-name { font-size: 9px; color: var(--de-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-item .mv-sparkline { height: 22px; }
.mover-item .mv-sparkline canvas { width: 100% !important; height: 100% !important; }
.mover-item .mv-price-col { text-align: right; min-width: 68px; }
.mover-item .mv-price { font-size: 12px; font-weight: 700; color: var(--de-text); font-family: var(--de-font-mono); letter-spacing: -0.3px; }
.mover-item .mv-change { font-size: 10px; font-weight: 700; font-family: var(--de-font-mono); }
.mover-item .mv-change.up { color: var(--de-green); }
.mover-item .mv-change.down { color: var(--de-red); }

/* ── Heatmap ── */
.heatmap-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 3px; padding: 0 var(--de-content-pad);
}
.heatmap-cell {
    padding: 10px 4px;
    border-radius: var(--de-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all var(--de-dur) var(--de-ease);
    position: relative; overflow: hidden;
}
.heatmap-cell:hover {
    transform: scale(1.06); z-index: 2;
    box-shadow: var(--de-shadow-md);
}
.heatmap-cell .hm-symbol {
    font-size: 10px; font-weight: 800;
    color: #fff; line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
}
.heatmap-cell .hm-change {
    font-size: 9px; font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin-top: 2px; font-family: var(--de-font-mono);
}

/* ── News ── */
.news-feed {
    display: flex; flex-direction: column;
    gap: 2px; padding: 0 var(--de-content-pad);
}
.news-card {
    display: flex; gap: 12px;
    padding: 12px;
    border-radius: var(--de-radius);
    background: var(--de-bg-surface);
    border: 1px solid transparent;
    cursor: pointer; text-decoration: none; color: inherit;
    transition: all var(--de-dur-fast) var(--de-ease);
}
.news-card:hover {
    border-color: var(--de-border-subtle);
    background: var(--de-bg-elevated);
}
.news-card .news-thumb {
    width: 76px; height: 56px; flex-shrink: 0;
    border-radius: var(--de-radius-sm);
    background: var(--de-bg-elevated);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.news-card .news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .news-body { flex: 1; min-width: 0; }
.news-card .news-headline {
    font-size: 12px; font-weight: 600; color: var(--de-text);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    letter-spacing: -0.1px;
}
.news-card .news-meta-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.news-card .news-source {
    font-size: 9px; font-weight: 700; color: var(--de-text-gold);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.news-card .news-time { font-size: 9px; color: var(--de-text-muted); }

/* ── Quick Trade ── */
.quick-trade-fab {
    position: fixed;
    bottom: calc(var(--de-bottomnav-h) + 16px);
    right: 16px; z-index: 90;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--de-accent), var(--de-accent-bright));
    color: #0B1120; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(var(--de-accent-rgb),0.35), 0 0 30px rgba(var(--de-accent-rgb),0.15);
    transition: all var(--de-dur) var(--de-ease-bounce);
}
.quick-trade-fab:hover { transform: scale(1.1); }
.quick-trade-fab:active { transform: scale(0.95); }
.quick-trade-fab svg { width: 22px; height: 22px; stroke-width: 2.5; }

.quick-trade-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 300;
    background: var(--de-bg-glass-heavy);
    backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid var(--de-border-accent);
    border-radius: var(--de-radius-xl) var(--de-radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform var(--de-dur-slow) var(--de-ease);
    max-height: 70vh; overflow-y: auto;
    padding: 20px 16px calc(var(--de-bottomnav-h) + 20px);
}
.quick-trade-panel.active { transform: translateY(0); }
.quick-trade-handle {
    width: 36px; height: 4px;
    background: rgba(var(--de-accent-rgb),0.3);
    border-radius: 2px; margin: 0 auto 16px;
}

.trade-input {
    width: 100%; padding: 11px 14px;
    background: var(--de-bg-input);
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    color: var(--de-text);
    font-size: 14px; font-weight: 600;
    font-family: var(--de-font-mono);
    outline: none;
    transition: border-color var(--de-dur) var(--de-ease);
}
.trade-input:focus {
    border-color: var(--de-border-accent);
    box-shadow: 0 0 0 3px rgba(var(--de-accent-rgb),0.08);
}
.trade-input::placeholder { color: var(--de-text-muted); font-weight: 400; }
.trade-label {
    font-size: 10px; font-weight: 700; color: var(--de-text-muted);
    display: block; margin-bottom: 4px;
    letter-spacing: 0.8px; text-transform: uppercase;
}

/* ── Bottom Navigation ── */
body.dashboard-pro .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--de-bottomnav-h);
    z-index: 100;
    background: var(--de-bg-glass-heavy);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--de-border-subtle);
    display: flex; align-items: stretch;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
body.dashboard-pro .bottom-nav .nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    text-decoration: none;
    color: var(--de-text-muted);
    font-size: 9px; font-weight: 600;
    transition: all var(--de-dur-fast) var(--de-ease);
    position: relative; letter-spacing: 0.3px;
}
body.dashboard-pro .bottom-nav .nav-item svg {
    width: 22px; height: 22px; transition: all var(--de-dur) var(--de-ease);
}
body.dashboard-pro .bottom-nav .nav-item:hover { color: var(--de-text-secondary); }
body.dashboard-pro .bottom-nav .nav-item.active { color: var(--nav-active-color, var(--de-text-gold)); }
body.dashboard-pro .bottom-nav .nav-item.active::before {
    content: ''; position: absolute; top: 0;
    width: 20px; height: 2px; border-radius: 0 0 2px 2px;
    background: linear-gradient(90deg, transparent, var(--nav-active-color, var(--de-accent)), transparent);
    box-shadow: 0 0 8px rgba(var(--nav-active-rgb, var(--de-accent-rgb)),0.3);
}

/* ── Skeleton ── */
.dp-skeleton {
    background: linear-gradient(90deg, var(--de-bg-elevated) 25%, rgba(var(--de-accent-rgb),0.03) 50%, var(--de-bg-elevated) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.8s infinite;
    border-radius: var(--de-radius-sm);
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Empty State ── */
.dp-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px; text-align: center;
    color: var(--de-text-muted);
}
.dp-empty svg { width: 44px; height: 44px; opacity: 0.2; margin-bottom: 12px; }
.dp-empty .dp-empty-text { font-size: 12px; font-weight: 500; }
.dp-empty .dp-empty-action {
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--de-accent-dim);
    color: var(--de-text-gold);
    border: 1px solid var(--de-border-accent);
    border-radius: var(--de-radius-full);
    font-size: 11px; font-weight: 700;
    cursor: pointer; text-decoration: none;
    transition: all var(--de-dur) var(--de-ease);
    letter-spacing: 0.3px;
}
.dp-empty .dp-empty-action:hover {
    background: var(--de-accent);
    color: #0B1120;
}

/* ── Sections ── */
.dash-section { margin-bottom: 20px; }

/* ── Scroll Animations ── */
.dash-fade-in {
    opacity: 0; transform: translateY(16px);
    transition: all 0.5s var(--de-ease);
}
.dash-fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 767px) {
    :root { --de-topbar-h: 52px; }
}
@media (max-width: 480px) {
    :root { --de-content-pad: 12px; }
    .hero-banner-slide img { height: 130px; }
    .quick-access-item { min-width: 58px; padding: 8px 4px 6px; }
    .qa-icon { width: 36px; height: 36px; }
    .qa-icon svg { width: 18px; height: 18px; }
    .quick-access-item span { font-size: 8px; }
    .portfolio-hero { padding: 18px 16px 16px; margin: 0 12px 12px; }
    .portfolio-hero-balance { font-size: 26px; }
    .market-summary-card { width: 140px; padding: 12px; }
    .market-summary-card .msc-price { font-size: 15px; }
    .holding-card { width: 170px; padding: 12px; }
    .watchlist-item { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 10px; }
    .watchlist-item .wl-chart { display: none; }
    .perf-chart-area { height: 140px; }
}

@media (min-width: 768px) {
    :root { --de-content-pad: 20px; }
    .hero-banner { margin: 0 20px 16px; }
    .hero-banner-slide img { height: 200px; }
    .portfolio-hero { margin: 0 20px 16px; }
    .portfolio-stats-row { grid-template-columns: repeat(4, 1fr); }
    .market-summary-card { width: 175px; }
    .perf-chart-area { height: 220px; }
    .holding-card { width: 210px; }
    .movers-tabs { margin: 0 20px 10px; }
    .movers-list { padding: 0 20px; }
    .heatmap-container { padding: 0 20px; }
    .news-feed { padding: 0 20px; }
    .watchlist-grid { padding: 0 20px; }
}

@media (min-width: 1024px) {
    .hero-banner-slide img { height: 260px; }
    .portfolio-hero-balance { font-size: 36px; }
    .market-summary-scroll { padding: 0 20px 4px; }
    .holdings-scroll { padding: 0 20px 4px; }
}

@media (min-width: 1280px) {
    .heatmap-container { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* ── Print ── */
@media print {
    body.dashboard-pro .pro-topbar,
    body.dashboard-pro .bottom-nav,
    .ticker-tape, .quick-trade-fab { display: none !important; }
    body.dashboard-pro .dashboard-main { padding: 0; }
    body.dashboard-pro::before, body.dashboard-pro::after { display: none; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ticker-tape-inner { animation: none; }
    body.dashboard-pro::before { animation: none; }
}

/* ── Focus ── */
body.dashboard-pro *:focus-visible {
    outline: 2px solid var(--de-text-gold);
    outline-offset: 2px;
}

.text-green { color: var(--de-green) !important; }
.text-red { color: var(--de-red) !important; }
.text-gold { color: var(--de-text-gold) !important; }
.text-muted { color: var(--de-text-muted) !important; }
