/* ==========================================================================
   Sona AI Theme - Macro, Commodities & Energy Terminal
   Obsidian background, glassmorphism cards, purple gradient accents,
   amber/gold metals highlights, and cyan energy glows.
   ========================================================================== */

:root {
    --bg-base: #080c14;
    --bg-surface: rgba(15, 23, 42, 0.75);
    --bg-card: rgba(22, 30, 49, 0.65);
    --bg-card-hover: rgba(30, 41, 69, 0.85);
    
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-purple: rgba(139, 92, 246, 0.25);
    --border-amber: rgba(245, 158, 11, 0.25);
    --border-cyan: rgba(6, 182, 212, 0.25);
    
    --accent-purple: #8b5cf6;
    --accent-indigo: #6366f1;
    --accent-amber: #f59e0b;
    --accent-gold: #fbbf24;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --val-up: #10b981;
    --val-down: #ef4444;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', Consolas, monospace;
}

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

body.sona-theme {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Purple Glow at Top */
.ambient-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel:hover {
    border-color: var(--border-purple);
}

/* ================= Navbar ================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(8, 12, 20, 0.85);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-w: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.brand-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gradient-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.8px;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    margin-top: 1px;
}

/* Search Box */
.search-box-wrapper {
    position: relative;
    flex: 1;
    max-width: 440px;
}

.search-box-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    color: white;
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s;
}

.search-box-wrapper input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid var(--border-purple);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 100;
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.search-item:hover {
    background: rgba(139, 92, 246, 0.15);
}

.search-sym {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-purple);
}

.search-name {
    font-size: 13px;
    color: var(--text-secondary);
}

.search-cat {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.live-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent-emerald);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.utc-clock {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-purple);
    color: white;
}

/* ================= Ticker Strip ================= */
.ticker-strip-section {
    background: rgba(10, 15, 26, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 24px;
}

.ticker-strip {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1440px;
    margin: 0 auto;
}

.strip-card {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.strip-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.strip-sym {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: white;
}

.strip-price {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #e2e8f0;
}

.strip-pct {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

/* ================= Category Tabs Navigation ================= */
.category-nav {
    padding: 20px 24px 0;
    max-width: 1440px;
    margin: 0 auto;
}

.nav-tabs-wrapper {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab i {
    width: 18px;
    height: 18px;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

/* ================= Main Container ================= */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= KPI Grid ================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    padding: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), transparent);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.15);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.kpi-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.gold-tag { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.energy-tag { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }
.finance-tag { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3); }
.ratio-tag { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.kpi-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.kpi-sub {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 12px;
}

.kpi-footer {
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

/* ================= Overview 3-Column Grid ================= */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

.panel {
    padding: 22px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    width: 20px;
    height: 20px;
}

.purple-icon { color: var(--accent-purple); }
.gold-icon { color: var(--accent-amber); }
.cyan-icon { color: var(--accent-cyan); }
.amber-icon { color: #f59e0b; }

.panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.panel-more-btn {
    background: transparent;
    border: none;
    color: var(--accent-purple);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}

.panel-more-btn:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.market-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.market-table th.num { text-align: right; }

.market-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.market-table tr {
    cursor: pointer;
    transition: background 0.15s;
}

.market-table tr:hover {
    background: rgba(139, 92, 246, 0.08);
}

.market-table td.num {
    text-align: right;
    font-family: var(--font-mono);
}

.td-sym {
    font-family: var(--font-mono);
    font-weight: 700;
    color: white;
}

.td-name {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Value Up/Down Badges */
.val-up {
    color: var(--val-up);
}

.val-down {
    color: var(--val-down);
}

.badge-up {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-down {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

/* ================= Filter Bar ================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.filter-btn.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

/* ================= Asset Cards Grid ================= */
.assets-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.asset-card {
    padding: 18px;
    cursor: pointer;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.asset-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-purple);
    box-shadow: 0 10px 26px rgba(139, 92, 246, 0.15);
}

.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ac-sym {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: white;
}

.ac-name {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-cat {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.ac-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.ac-price {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    color: white;
}

.ac-unit {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
}

.ac-range-bar-wrap {
    margin-top: 10px;
}

.ac-range-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ac-range-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ac-range-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 2px;
}

/* ================= Metals Ratios Banner ================= */
.metal-ratios-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 22px;
    margin-bottom: 24px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.ratio-item {
    border-left: 2px solid var(--accent-amber);
    padding-left: 14px;
}

.ratio-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--accent-amber);
    margin-bottom: 4px;
}

.ratio-val {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.ratio-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ================= Energy Storage & Chokepoints ================= */
.energy-storage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.storage-card {
    padding: 18px;
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.storage-value {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.storage-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title-wrap h2 {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.spread-indicator {
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
}

/* Chokepoint Cards */
.chokepoint-grid, .chokepoint-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.chokepoint-card {
    padding: 18px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s;
}

.chokepoint-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.cp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cp-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.cp-status {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.status-red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.status-yellow { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.cp-flow-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.cp-flow {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: #38bdf8;
}

.cp-pct {
    font-size: 12px;
    color: var(--text-muted);
}

.cp-exporters {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cp-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ================= Modal & Canvas Chart ================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 1040px;
    background: #0d1322;
    border: 1px solid var(--border-purple);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-symbol {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-purple);
}

.modal-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.modal-meta-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-price {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.modal-change {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: white;
}

.modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeframe-buttons {
    display: flex;
    gap: 6px;
}

.tf-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.tf-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.tf-btn.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
}

.chart-stats-group {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    background: rgba(5, 8, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

canvas#interactive-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-purple);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

.btn-primary-close {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary-close:hover {
    opacity: 0.9;
}

/* Utilities */
.text-cyan { color: var(--accent-cyan) !important; }
.text-gold { color: var(--accent-gold) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-emerald { color: var(--accent-emerald) !important; }
.text-amber { color: var(--accent-amber) !important; }
.mt-6 { margin-top: 24px; }
.mt-10 { margin-top: 40px; }
.source-pill {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ================= Tab Split Layout (Assets + Live News Wire) ================= */
.tab-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1200px) {
    .tab-split-grid {
        grid-template-columns: 1fr;
    }
}

.news-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

.news-feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.news-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-feed-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-feed-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.news-list::-webkit-scrollbar {
    width: 4px;
}

.news-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

.news-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
    display: block;
    text-decoration: none;
}

.news-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(3px);
}

.news-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.news-item-publisher {
    color: var(--accent-cyan);
    font-weight: 600;
}

.news-empty, .loading-state-box {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Sub-stats on asset cards */
.ac-sub-stat {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ac-footer-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.asset-card:hover .ac-footer-action {
    color: var(--accent-purple);
}

/* Skeleton Loading */
.skeleton-cards-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    width: 100%;
}

.skeleton-card {
    height: 180px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid var(--border-subtle);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Embed Mode overrides */
body.is-embed {
    padding-top: 0;
    background: #000000;
}

body.is-embed .navbar {
    display: none;
}

body.is-embed .ticker-strip-section {
    padding-top: 10px;
}

body.is-embed .main-container {
    padding: 16px;
}

