/* ═══════════════════════════════════════════════════════════════════════════
   NEXUS TERMINAL — Nexus-class Dark Theme
   Professional financial terminal CSS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Nexus color palette — Cyan Glow */
    --bg-primary: #080c1a;
    --bg-secondary: #0d1229;
    --bg-tertiary: #121833;
    --bg-panel: #0a0f20;
    --bg-hover: #1a2040;
    --bg-active: #1e2650;
    --bg-input: #0a0e1c;

    --border-primary: #1a2040;
    --border-secondary: #252d50;
    --border-accent: #00d4ff;

    --text-primary: #e4e8f1;
    --text-secondary: #8b93a8;
    --text-muted: #5a6280;
    --text-accent: #00d4ff;

    --green: #00e676;
    --green-dim: #00e67620;
    --red: #ff1744;
    --red-dim: #ff174420;
    --blue: #448aff;
    --blue-dim: #448aff20;
    --orange: #00d4ff;
    --orange-dim: #00d4ff20;
    --yellow: #ffd740;
    --purple: #7c4dff;
    --cyan: #00e5ff;
    --white: #ffffff;

    /* Terminal-specific */
    --terminal-orange: #00d4ff;
    --terminal-bg: #050810;
    --terminal-text: #00d4ff;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Sizing */
    --header-h: 48px;
    --sidebar-w: 56px;
    --panel-gap: 2px;
    --border-radius: 4px;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══ LAYOUT ═══════════════════════════════════════════════════════════════ */

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ═══ TOP HEADER BAR ══════════════════════════════════════════════════════ */

.header {
    display: flex;
    align-items: center;
    height: var(--header-h);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 0 12px;
    gap: 12px;
    z-index: 100;
    flex-shrink: 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--orange);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    min-width: 180px;
}

.header-logo svg { width: 28px; height: 28px; }

.header-logo .version {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Terminal Command Input (Nexus-style orange input) */
.command-input-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.command-input {
    width: 100%;
    height: 32px;
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-orange);
    border-radius: 3px;
    color: var(--terminal-orange);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    padding: 0 12px 0 32px;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-input::placeholder {
    color: #663300;
    text-transform: none;
    font-weight: 400;
}

.command-input:focus {
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

.command-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--terminal-orange);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
}

/* Header nav */
.header-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.header-nav button {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    white-space: nowrap;
}

.header-nav button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.header-nav button.active {
    background: var(--orange-dim);
    color: var(--orange);
    border-color: var(--orange);
}

/* Header right section */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-clock {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.header-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.header-status.disconnected { background: var(--red); }

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--border-radius);
}

.user-menu:hover { background: var(--bg-hover); }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

/* ═══ MAIN CONTENT AREA ═══════════════════════════════════════════════════ */

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 4px;
    flex-shrink: 0;
}

.sidebar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.15s;
    position: relative;
}

.sidebar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-btn.active {
    background: var(--orange-dim);
    color: var(--orange);
}

.sidebar-btn svg { width: 20px; height: 20px; }

.sidebar-btn .tooltip {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    border: 1px solid var(--border-secondary);
    z-index: 50;
}

.sidebar-btn:hover .tooltip { opacity: 1; }

.sidebar-divider {
    width: 30px;
    height: 1px;
    background: var(--border-primary);
    margin: 4px 0;
}

/* ═══ WORKSPACE (Multi-Panel Grid) ═══════════════════════════════════════ */

.workspace {
    flex: 1;
    display: flex;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

/* Default layouts (kept for compat) */
.workspace.layout-single { display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; }
.workspace.layout-2col { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.workspace.layout-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr; }
.workspace.layout-quad { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.workspace.layout-main-side { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.workspace.layout-nexus {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* ═══ NEW TERMINAL LAYOUT (Chart-dominant) ════════════════════════════════ */

.workspace.layout-terminal {
    display: flex;
    flex-direction: row;
}

.ws-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 400px;
    overflow: hidden;
}

.ws-main .panel-chart-main {
    flex: 3;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ws-main .panel-chart-main .panel-body {
    flex: 1;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.ws-main .panel-data {
    flex: 2;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    transition: flex 0.2s;
}

.ws-main .panel-data.collapsed {
    flex: 0 0 30px;
    min-height: 30px;
}

.ws-main .panel-data.collapsed .panel-body {
    display: none;
}

/* Horizontal resize handle (between chart + data) */
.resize-handle-h {
    height: 4px;
    background: var(--border-primary);
    cursor: ns-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: background 0.15s;
}

.resize-handle-h:hover,
.resize-handle-h.active {
    background: var(--orange);
}

.resize-handle-h::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.15s;
}

.resize-handle-h:hover::after { opacity: 1; }

/* Vertical resize handle (between main + sidebar) */
.resize-handle-v {
    width: 4px;
    background: var(--border-primary);
    cursor: ew-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: background 0.15s;
}

.resize-handle-v:hover,
.resize-handle-v.active {
    background: var(--orange);
}

/* Right sidebar panels */
.ws-sidebar-panels {
    width: 300px;
    min-width: 200px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.2s;
}

.ws-sidebar-panels.collapsed {
    width: 24px;
    min-width: 24px;
}

.ws-sidebar-panels.collapsed .sidebar-panels-inner {
    display: none;
}

.sidebar-collapse-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.sidebar-collapse-btn:hover {
    color: var(--orange);
}

.ws-sidebar-panels.collapsed .sidebar-collapse-btn {
    left: 3px;
}

.sidebar-panels-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding-left: 18px;
}

.panel-side {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 30px;
    border-bottom: 1px solid var(--border-primary);
    transition: flex 0.15s;
}

.panel-side.collapsed {
    flex: 0 0 30px;
}

.panel-side.collapsed .side-panel-body {
    display: none;
}

.panel-side .panel-header {
    cursor: pointer;
    user-select: none;
}

.panel-side .panel-header:hover {
    background: var(--bg-hover);
}

.panel-collapse-arrow {
    color: var(--text-muted);
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.15s;
}

.panel-side.collapsed .panel-collapse-arrow {
    transform: rotate(-90deg);
}

.side-panel-body {
    flex: 1;
    overflow: auto;
    overflow-x: hidden;
    padding: 4px 6px;
    scroll-behavior: smooth;
}

/* Chart fullscreen mode */
.workspace.chart-fullscreen .ws-main .panel-data,
.workspace.chart-fullscreen .resize-handle-h,
.workspace.chart-fullscreen .resize-handle-v,
.workspace.chart-fullscreen .ws-sidebar-panels {
    display: none !important;
}

.workspace.chart-fullscreen .ws-main .panel-chart-main {
    flex: 1;
}

/* On-chart HUD */
.chart-hud {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 80px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    pointer-events: none;
    z-index: 2;
}

.chart-hud .hud-badge {
    background: rgba(10, 14, 23, 0.85);
    border: 1px solid var(--border-primary);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
    pointer-events: auto;
    white-space: nowrap;
}

.chart-hud .hud-badge b {
    color: var(--text-primary);
    font-weight: 600;
}

.chart-hud .hud-badge.positive b { color: var(--green); }
.chart-hud .hud-badge.negative b { color: var(--red); }
.chart-hud .hud-badge.warn b { color: var(--orange); }

/* Data panel tabs */
.panel-header-tabs {
    gap: 4px;
}

.panel-tabs {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.ptab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.1s;
}

.ptab:hover {
    color: var(--text-secondary);
    border-color: var(--border-secondary);
}

.ptab.active {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

/* Chart controls row */
.chart-controls {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

/* ═══ PANEL (Each draggable/resizable window) ═════════════════════════════ */

.panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    min-width: 200px;
    min-height: 150px;
}

.panel.focused { border-color: var(--orange); }

.panel-header {
    display: flex;
    align-items: center;
    height: 30px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: 0 8px;
    gap: 8px;
    cursor: move;
    flex-shrink: 0;
}

.panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-icon {
    color: var(--orange);
    font-size: 12px;
}

.panel-controls {
    display: flex;
    gap: 4px;
}

.panel-ctrl-btn {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 2px;
    font-size: 10px;
}

.panel-ctrl-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.panel-body {
    flex: 1;
    overflow: auto;
    overflow-x: hidden;
    padding: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ═══ MARKET OVERVIEW PANEL ══════════════════════════════════════════════ */

.market-ticker-bar {
    display: flex;
    gap: 16px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    overflow-x: auto;
    flex-shrink: 0;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 12px;
}

.ticker-symbol {
    font-weight: 600;
    color: var(--text-primary);
}

.ticker-price {
    font-family: var(--font-mono);
    font-weight: 500;
}

.ticker-change {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 2px;
}

.ticker-change.positive { color: var(--green); background: var(--green-dim); }
.ticker-change.negative { color: var(--red); background: var(--red-dim); }

/* ═══ DATA TABLE ═════════════════════════════════════════════════════════ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 12px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    text-align: right;
    border-bottom: 1px solid var(--border-primary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.data-table th:first-child { text-align: left; }
.data-table th:hover { color: var(--orange); }
.data-table th.sorted { color: var(--orange); }
.data-table th .sort-arrow { margin-left: 2px; font-size: 8px; }

.data-table td {
    padding: 5px 8px;
    text-align: right;
    border-bottom: 1px solid var(--border-primary);
    white-space: nowrap;
}

.data-table td:first-child { text-align: left; }

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

.data-table .positive { color: var(--green); }
.data-table .negative { color: var(--red); }
.data-table .neutral { color: var(--text-secondary); }

/* Global color classes */
.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral { color: var(--text-secondary); }

.data-table .symbol-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.data-table .symbol-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.data-table .symbol-name {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table .symbol-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ═══ CHARTS ═════════════════════════════════════════════════════════════ */

.chart-container {
    width: 100%;
    height: 100%;
    min-height: 200px;
    position: relative;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.chart-toolbar button {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-family: var(--font-mono);
}

.chart-toolbar button:hover { background: var(--bg-hover); color: var(--text-primary); }
.chart-toolbar button.active { color: var(--orange); border-color: var(--orange); background: var(--orange-dim); }

/* ═══ INDICATOR TOOLBAR ═══════════════════════════════════════════════ */

.ind-toolbar {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: var(--bg-tertiary, #111827);
    border-bottom: 1px solid var(--border-primary, #1e2d3d);
    flex-shrink: 0;
    overflow-x: auto;
}
.ind-toolbar::-webkit-scrollbar { height: 0; }

.ind-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted, #6b7280);
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    white-space: nowrap;
    transition: all 0.15s;
    letter-spacing: 0.3px;
}
.ind-btn:hover { background: var(--bg-hover, #1e2d3d); color: var(--text-primary, #e5e7eb); }
.ind-btn.ind-active {
    color: #00e5ff;
    border-color: #00e5ff40;
    background: rgba(0, 229, 255, 0.08);
    text-shadow: 0 0 4px #00e5ff40;
}
.ind-toolbar-spacer { flex: 1; }
.ind-btn-settings {
    color: var(--text-muted, #6b7280);
    border-color: var(--border-primary, #1e2d3d);
}
.ind-btn-settings:hover { color: var(--orange, #ff9800); border-color: var(--orange, #ff9800); }

/* ═══ INDICATOR SETTINGS MODAL ═════════════════════════════════════════ */

/* Tabs inside modal */
.ind-tabs {
    display: flex;
    gap: 0;
    padding: 0 8px;
    background: var(--bg-tertiary, #111827);
    border-bottom: 1px solid var(--border-primary, #1e2d3d);
    overflow-x: auto;
}
.ind-tabs::-webkit-scrollbar { height: 0; }
.ind-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted, #6b7280);
    padding: 6px 10px;
    font-size: 10px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.ind-tab:hover { color: var(--text-primary, #e5e7eb); }
.ind-tab.active {
    color: var(--orange, #ff9800);
    border-bottom-color: var(--orange, #ff9800);
}

/* Number inputs in settings */
.ind-num {
    width: 60px;
    background: var(--bg-tertiary, #111827);
    border: 1px solid var(--border-primary, #1e2d3d);
    color: var(--text-primary, #e5e7eb);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    text-align: right;
}
.ind-num:focus { border-color: var(--orange, #ff9800); outline: none; }

/* Modal overlay reuse */
.vp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.vp-modal {
    background: var(--bg-panel, #0d1421);
    border: 1px solid var(--border-primary, #1e2d3d);
    border-radius: 8px;
    width: 380px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: vpFadeIn 0.15s ease-out;
}
@keyframes vpFadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.vp-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-primary, #1e2d3d);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #9ca3af);
    letter-spacing: 0.5px;
}
.vp-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
}
.vp-modal-close:hover { background: var(--bg-hover, #1e2d3d); color: var(--text-primary, #e5e7eb); }

.vp-modal-body {
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
}

.vp-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vp-settings-grid .vp-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--orange, #ff9800);
    letter-spacing: 1px;
    margin-top: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border-primary, #1e2d3d);
}
.vp-settings-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
}
.vp-settings-grid input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: var(--orange, #ff9800);
    cursor: pointer;
}
.vp-settings-grid input[type="range"] + span,
.vp-settings-grid input[type="range"] + span.rv {
    min-width: 36px;
    text-align: right;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 11px;
    color: var(--text-primary, #e5e7eb);
}
.vp-settings-grid select {
    background: var(--bg-tertiary, #111827);
    border: 1px solid var(--border-primary, #1e2d3d);
    color: var(--text-primary, #e5e7eb);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    cursor: pointer;
}
.vp-settings-grid input[type="checkbox"] {
    accent-color: var(--orange, #ff9800);
    cursor: pointer;
}
.vp-settings-grid input[type="color"] {
    width: 28px;
    height: 22px;
    border: 1px solid var(--border-primary, #1e2d3d);
    border-radius: 3px;
    background: none;
    cursor: pointer;
    padding: 0;
}

.vp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-primary, #1e2d3d);
}

/* ═══ NEWS FEED ═════════════════════════════════════════════════════════ */

.news-list { display: flex; flex-direction: column; gap: 1px; }

.news-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-primary);
    cursor: pointer;
    transition: background 0.1s;
}

.news-item:hover { background: var(--bg-hover); }

.news-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    min-width: 50px;
}

.news-content { flex: 1; }

.news-title {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 2px;
}

.news-source {
    font-size: 10px;
    color: var(--blue);
}

.news-category {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.news-category.crypto { background: var(--orange-dim); color: var(--orange); }
.news-category.markets { background: var(--blue-dim); color: var(--blue); }
.news-category.macro { background: var(--green-dim); color: var(--green); }
.news-category.tech { background: #9c27b020; color: var(--purple); }

/* ═══ ECONOMIC CALENDAR ════════════════════════════════════════════════ */

.eco-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-primary);
}

.eco-impact {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eco-impact.high { background: var(--red); }
.eco-impact.medium { background: var(--yellow); }
.eco-impact.low { background: var(--green); }

.eco-country {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 24px;
}

.eco-title {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary);
}

.eco-date {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.eco-values {
    display: flex;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.eco-values span { color: var(--text-secondary); }
.eco-values .actual { color: var(--green); font-weight: 600; }

/* ═══ HEATMAP ════════════════════════════════════════════════════════════ */

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 3px;
    padding: 4px;
}

.heatmap-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    min-height: 56px;
}

.heatmap-cell:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.heatmap-cell .symbol {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

.heatmap-cell .change {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.heatmap-cell .name {
    font-size: 9px;
    color: rgba(255,255,255,0.7);
    text-align: center;
}

/* ═══ WATCHLIST ══════════════════════════════════════════════════════════ */

.watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-primary);
}

.watchlist-tabs {
    display: flex;
    gap: 2px;
}

.watchlist-tab {
    padding: 4px 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    border-radius: 3px;
}

.watchlist-tab:hover { background: var(--bg-hover); }
.watchlist-tab.active { color: var(--orange); background: var(--orange-dim); }

/* ═══ WEB3 PANEL ════════════════════════════════════════════════════════ */

.web3-stat {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-primary);
}

.web3-stat .label { color: var(--text-muted); font-size: 11px; }
.web3-stat .value { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

.gas-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin-bottom: 4px;
}

.gas-indicator .chain { font-size: 11px; color: var(--text-secondary); min-width: 80px; }
.gas-indicator .gas-value { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }

/* ═══ DEFI TABLE ════════════════════════════════════════════════════════ */

.defi-protocol {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-primary);
    cursor: pointer;
}

.defi-protocol:hover { background: var(--bg-hover); }

.defi-protocol .rank {
    font-size: 10px;
    color: var(--text-muted);
    min-width: 24px;
    text-align: right;
}

.defi-protocol .logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-tertiary);
}

.defi-protocol .name { font-size: 12px; font-weight: 600; flex: 1; }
.defi-protocol .tvl { font-family: var(--font-mono); font-size: 12px; }
.defi-protocol .change { font-family: var(--font-mono); font-size: 11px; min-width: 60px; text-align: right; }

/* ═══ SEARCH OVERLAY ════════════════════════════════════════════════════ */

.search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-overlay.active { display: flex; }

.search-box {
    width: 600px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--border-primary);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-result-item:hover { background: var(--bg-hover); }

.search-result-item .type-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
    background: var(--orange-dim);
    color: var(--orange);
}

/* ═══ MODAL ═════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.modal-body { padding: 16px; overflow-y: auto; }

/* ═══ FORM ELEMENTS ═══════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.form-input:focus { border-color: var(--orange); }

.form-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #e65c00; }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border-secondary); }
.btn-secondary:hover { background: var(--bg-active); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ═══ LOADING ═══════════════════════════════════════════════════════════ */

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-secondary);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ COMMAND AUTOCOMPLETE ═══════════════════════════════════════════════ */

.command-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.command-suggestions.active { display: block; }

.suggestion-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
}

.suggestion-item:hover { background: var(--bg-hover); }
.suggestion-item .cmd { color: var(--orange); font-weight: 600; }
.suggestion-item .desc { color: var(--text-muted); font-size: 11px; }

/* ═══ BOTTOM STATUS BAR ════════════════════════════════════════════════ */

.status-bar {
    display: flex;
    align-items: center;
    height: 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 0 12px;
    gap: 16px;
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.status-bar .status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-bar .status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.status-bar .status-dot.online { background: var(--green); }
.status-bar .status-dot.offline { background: var(--red); }

/* ═══ RESPONSIVE ════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .workspace.layout-nexus {
        grid-template-columns: 1fr 1fr;
    }
    .ws-sidebar-panels { width: 240px; min-width: 180px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .header-nav { display: none; }
    .workspace { flex-direction: column !important; }
    .workspace.layout-terminal { flex-direction: column; }
    .ws-sidebar-panels { width: 100% !important; max-width: 100%; flex-direction: row; }
    .sidebar-panels-inner { flex-direction: row; padding-left: 0; }
    .resize-handle-v { display: none; }
    .sidebar-collapse-btn { display: none; }
    .ws-main { min-width: 100%; }
}

/* ═══ SPLASH / LOGIN ═══════════════════════════════════════════════════ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-primary);
}

.login-card {
    width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 40px;
}

.login-card h1 {
    color: var(--orange);
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.login-card .subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    font-size: 12px;
}

.login-card .form-group { margin-bottom: 16px; }

.login-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.login-error {
    color: var(--red);
    font-size: 12px;
    text-align: center;
    margin-bottom: 12px;
}

/* ═══ SPARKLINE (mini chart) ═══════════════════════════════════════════ */

.sparkline-container {
    width: 100px;
    height: 30px;
    display: inline-block;
    vertical-align: middle;
}

/* ═══ TOAST NOTIFICATIONS ══════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 60px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    min-width: 250px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--yellow); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ═══ MARKET GRID SECTIONS ═════════════════════════════════════════════ */

.market-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 1200px) {
    .market-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

.market-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px;
    overflow: hidden;
}

.market-section.full-width {
    width: 100%;
    grid-column: 1 / -1;
}

.market-section h3 {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 10px 0;
    letter-spacing: 0.8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-primary);
}

.market-section .data-table {
    margin: 0 -12px -12px;
    width: calc(100% + 24px);
}

.stat-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 110px;
    flex: 1;
    transition: border-color 0.15s;
}

.stat-card:hover {
    border-color: var(--border-secondary);
}

.stat-card .stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1.2;
}

.stat-card .stat-value.positive { color: var(--green); }
.stat-card .stat-value.negative { color: var(--red); }

.stat-card .stat-sublabel {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.stat-card .stat-sublabel.positive { color: var(--green); }
.stat-card .stat-sublabel.negative { color: var(--red); }

/* Signals grid for Global Flow */
.signals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.signal-card {
    background: var(--bg-tertiary);
    padding: 8px 10px;
    border-radius: 4px;
}

.signal-card .signal-type {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signal-card .signal-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2px 0;
}

.signal-card .signal-msg {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.signal-card .signal-action {
    font-size: 10px;
    color: var(--orange);
    margin-top: 4px;
    font-weight: 600;
}

/* ═══ ON-CHAIN SPECIFIC ════════════════════════════════════════════════ */

.onchain-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.onchain-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 10px 14px;
    flex: 1;
    min-width: 130px;
    text-align: center;
    transition: border-color 0.15s;
}

.onchain-card:hover { border-color: var(--border-secondary); }

.onchain-card .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onchain-card .value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-top: 3px;
    line-height: 1.2;
}

/* Bias indicators */
.bias-long { color: var(--green); }
.bias-short { color: var(--red); }
.bias-neutral { color: var(--text-secondary); }

/* Score bar visualization */
.score-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.score-bar-fill.positive { background: var(--green); }
.score-bar-fill.negative { background: var(--red); }

/* ═══ ERROR & EMPTY STATES ═════════════════════════════════════════════ */

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--red);
    font-size: 13px;
    text-align: center;
    gap: 8px;
}

.error-state::before {
    content: '⚠';
    font-size: 24px;
    opacity: 0.7;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    gap: 8px;
}

.empty-state::before {
    content: '📭';
    font-size: 24px;
    opacity: 0.5;
}

/* ═══ TABLE ENHANCEMENTS ═══════════════════════════════════════════════ */

.data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table tbody tr {
    transition: background 0.1s;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

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

/* Compact table variant */
.data-table.compact th,
.data-table.compact td {
    padding: 3px 6px;
    font-size: 11px;
}

/* Striped rows for better readability */
.data-table.striped tbody tr:nth-child(odd) {
    background: var(--bg-panel);
}

/* ═══ RESPONSIVE TABLE ═════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .stat-row {
        gap: 4px;
    }
    .stat-card {
        min-width: 80px;
        padding: 6px 10px;
    }
    .stat-card .stat-value {
        font-size: 13px;
    }
    .market-section {
        padding: 8px;
    }
    .market-section .data-table {
        margin: 0 -8px -8px;
        width: calc(100% + 16px);
    }
    .data-table th,
    .data-table td {
        padding: 4px 6px;
        font-size: 11px;
    }
    .onchain-card {
        min-width: 100px;
        padding: 6px 10px;
    }
    .onchain-card .value {
        font-size: 14px;
    }
}

/* ═══ DYNAMIC COIN ANALYSIS ════════════════════════════════════════════ */

.coin-selector {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.coin-chip {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s;
}

.coin-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--orange);
}

.coin-chip.active {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

/* Price Header */
.coin-price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    gap: 16px;
    flex-wrap: wrap;
}

.coin-price-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.coin-price-big {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.1;
}

.coin-price-changes {
    display: flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-top: 4px;
}

.coin-price-stats {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 4px 12px;
    font-size: 11px;
}

.coin-price-stats .mini-stat {
    display: flex;
    gap: 6px;
    align-items: center;
}

.coin-price-stats .mini-stat .label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.coin-price-stats .mini-stat .value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.analysis-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px;
    overflow: auto;
}

.analysis-section .section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.analysis-loading {
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px 0;
    text-align: center;
}

.no-data {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
    padding: 8px 0;
}

/* Indicator Cards Row */
.indicator-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.indicator-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.indicator-card.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    text-align: left;
    min-width: 100px;
}

.indicator-card .indicator-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.indicator-card .indicator-value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin: 2px 0;
}

.indicator-card.compact .indicator-label {
    font-size: 10px;
    margin-right: 8px;
}

.indicator-card.compact .indicator-value {
    font-size: 12px;
    margin: 0;
}

.indicator-card .indicator-sub {
    font-size: 9px;
    color: var(--text-muted);
}

/* Support/Resistance */
.sr-section {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.sr-column {
    flex: 1;
}

.sr-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: 2px;
}

.sr-title.resistance { color: var(--red); background: rgba(255, 23, 68, 0.1); }
.sr-title.support { color: var(--green); background: rgba(0, 200, 83, 0.1); }

.sr-level {
    display: flex;
    justify-content: space-between;
    padding: 3px 6px;
    font-size: 11px;
    font-family: var(--font-mono);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.sr-level.resistance span:first-child { color: var(--red); font-weight: 600; }
.sr-level.support span:first-child { color: var(--green); font-weight: 600; }

/* Signal Badges */
.signals-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.signal-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: var(--font-mono);
}

.signal-badge.signal-buy { background: rgba(0, 200, 83, 0.15); color: var(--green); border: 1px solid rgba(0, 200, 83, 0.3); }
.signal-badge.signal-sell { background: rgba(255, 23, 68, 0.15); color: var(--red); border: 1px solid rgba(255, 23, 68, 0.3); }
.signal-badge.signal-neutral { background: rgba(255, 152, 0, 0.15); color: var(--orange); border: 1px solid rgba(255, 152, 0, 0.3); }

/* Compact table */
.compact-table th, .compact-table td {
    padding: 3px 6px !important;
    font-size: 11px !important;
}

/* Valuation Reasons */
.val-reasons {
    margin-top: 8px;
    padding: 6px 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.val-reason {
    padding: 2px 0;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .analysis-grid { grid-template-columns: 1fr; }
    .coin-price-header { flex-direction: column; }
    .coin-price-stats { grid-template-columns: repeat(2, auto); }
    .indicator-row { gap: 4px; }
    .indicator-card { min-width: 60px; padding: 6px; }
    .coin-price-big { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEXUS INTELLIGENCE DASHBOARD — Premium Visual Components
   ═══════════════════════════════════════════════════════════════════════════ */

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

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

@keyframes nxNeedle {
    from { transform-origin: center bottom; transform: rotate(-90deg); }
    to { transform-origin: center bottom; transform: rotate(0deg); }
}

.nx-dashboard {
    padding: 2px;
    animation: nxFadeIn 0.3s ease;
}

/* ─── Metrics Row ────────────────────────────────────────────────────── */

.nx-metrics-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.nx-metric-card {
    flex: 1;
    min-width: 120px;
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-panel));
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    animation: nxFadeIn 0.4s ease backwards;
}

.nx-metric-card:nth-child(2) { animation-delay: 0.05s; }
.nx-metric-card:nth-child(3) { animation-delay: 0.1s; }
.nx-metric-card:nth-child(4) { animation-delay: 0.15s; }
.nx-metric-card:nth-child(5) { animation-delay: 0.2s; }

.nx-metric-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.nx-metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--orange);
    opacity: 0;
    transition: opacity 0.2s;
}

.nx-metric-card:hover::before { opacity: 1; }
.nx-metric-card.btc::before { background: #f7931a; opacity: 0.7; }
.nx-metric-card.eth::before { background: #627eea; opacity: 0.7; }
.nx-metric-card.danger { border-color: rgba(255, 23, 68, 0.3); }
.nx-metric-card.danger::before { background: var(--red); opacity: 0.8; }
.nx-metric-card.warn { border-color: rgba(255, 171, 0, 0.3); }
.nx-metric-card.warn::before { background: var(--yellow); opacity: 0.6; }
.nx-metric-card.safe::before { background: var(--green); opacity: 0.6; }

.nx-metric-icon {
    font-size: 14px;
    color: var(--orange);
    margin-bottom: 2px;
    opacity: 0.7;
}

.nx-metric-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.nx-metric-value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.3;
}

.nx-metric-sub {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ─── Intelligence Row ──────────────────────────────────────────────── */

.nx-intel-row {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 6px;
    margin-bottom: 10px;
}

.nx-intel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 10px;
    overflow: hidden;
}

.nx-fg-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nx-gauge {
    width: 100%;
    max-width: 200px;
}

.nx-needle {
    animation: nxNeedle 1s ease-out;
}

.nx-section-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Smart Signals ─────────────────────────────────────────────────── */

.nx-signals-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 160px;
    overflow-y: auto;
}

.nx-signal-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    border-left: 3px solid transparent;
    font-size: 11px;
    animation: nxFadeIn 0.3s ease backwards;
    transition: background 0.15s;
}

.nx-signal-item:hover { background: var(--bg-hover); }
.nx-signal-item:nth-child(2) { animation-delay: 0.05s; }
.nx-signal-item:nth-child(3) { animation-delay: 0.1s; }
.nx-signal-item:nth-child(4) { animation-delay: 0.15s; }
.nx-signal-item:nth-child(5) { animation-delay: 0.2s; }

.nx-signal-item.bull { border-left-color: var(--green); }
.nx-signal-item.bear { border-left-color: var(--red); }
.nx-signal-item.neutral { border-left-color: var(--yellow); }

.nx-signal-severity {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nx-signal-severity.high { background: var(--red); animation: nxPulse 1.5s ease infinite; }
.nx-signal-severity.med { background: var(--yellow); }
.nx-signal-severity.low { background: var(--green); }

.nx-signal-body {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.nx-signal-asset {
    font-weight: 700;
    color: var(--orange);
    font-family: var(--font-mono);
}

.nx-signal-type {
    color: var(--text-secondary);
    font-size: 10px;
    text-transform: uppercase;
}

.nx-signal-msg {
    color: var(--text-muted);
    font-size: 10px;
    margin-left: auto;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-no-data {
    color: var(--text-muted);
    font-size: 11px;
    padding: 20px;
    text-align: center;
    font-style: italic;
}

/* ─── Gas Prices ────────────────────────────────────────────────────── */

.nx-gas-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nx-gas-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    border-left: 3px solid var(--green);
    transition: background 0.15s;
}

.nx-gas-item:hover { background: var(--bg-hover); }
.nx-gas-item.high { border-left-color: var(--red); }
.nx-gas-item.med { border-left-color: var(--yellow); }

.nx-gas-chain {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nx-gas-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
}

.nx-gas-value small {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── Top Crypto Grid ───────────────────────────────────────────────── */

.nx-crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 6px;
}

.nx-crypto-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: nxFadeIn 0.5s ease backwards;
}

.nx-crypto-card:nth-child(2) { animation-delay: 0.03s; }
.nx-crypto-card:nth-child(3) { animation-delay: 0.06s; }
.nx-crypto-card:nth-child(4) { animation-delay: 0.09s; }
.nx-crypto-card:nth-child(5) { animation-delay: 0.12s; }
.nx-crypto-card:nth-child(6) { animation-delay: 0.15s; }

.nx-crypto-card:hover {
    border-color: var(--orange);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.nx-crypto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.nx-crypto-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nx-crypto-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.nx-crypto-symbol {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.nx-crypto-name {
    font-size: 10px;
    color: var(--text-muted);
}

.nx-crypto-price { text-align: right; }

.nx-crypto-price-val {
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.nx-crypto-change {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.nx-crypto-sparkline { padding: 2px 0; }

.nx-sparkline {
    width: 100%;
    height: 32px;
    display: block;
}

.nx-crypto-stats {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding-top: 4px;
    border-top: 1px solid var(--border-primary);
}

/* ─── Indices Heatmap ───────────────────────────────────────────────── */

.nx-indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 4px;
}

.nx-index-cell {
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nx-index-cell:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nx-index-name {
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-index-price {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #fff;
}

.nx-index-change {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ─── Split Row ─────────────────────────────────────────────────────── */

.nx-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.nx-split-col {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 10px;
}

/* ─── Sectors Grid ──────────────────────────────────────────────────── */

.nx-sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 3px;
}

.nx-sector-cell {
    padding: 8px 4px;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.15s;
    cursor: pointer;
}

.nx-sector-cell:hover { transform: scale(1.06); }

.nx-sector-symbol { font-size: 11px; font-weight: 700; color: #fff; }
.nx-sector-change { font-size: 13px; font-weight: 700; color: #fff; font-family: var(--font-mono); }
.nx-sector-name { font-size: 8px; color: rgba(255,255,255,0.6); }

/* ─── Correlation List ──────────────────────────────────────────────── */

.nx-corr-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nx-corr-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.nx-corr-asset {
    min-width: 90px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 11px;
}

.nx-corr-bar-bg {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.nx-corr-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.nx-corr-bar.positive { background: linear-gradient(90deg, rgba(0,200,83,0.3), var(--green)); }
.nx-corr-bar.negative { background: linear-gradient(90deg, rgba(255,23,68,0.3), var(--red)); }

.nx-corr-val {
    font-family: var(--font-mono);
    font-weight: 600;
    min-width: 50px;
    text-align: right;
    font-size: 11px;
}

/* ─── Commodities Grid ──────────────────────────────────────────────── */

.nx-commodities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 4px;
}

.nx-commodity-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 8px 10px;
    transition: border-color 0.2s;
}

.nx-commodity-card:hover { border-color: var(--border-secondary); }

.nx-commodity-name {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.nx-commodity-price {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.nx-commodity-change {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ─── Trending ──────────────────────────────────────────────────────── */

.nx-trending-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nx-trending-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.nx-trending-chip:hover {
    border-color: var(--orange);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.nx-trending-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.nx-trending-sym {
    font-weight: 700;
    color: var(--orange);
    font-family: var(--font-mono);
}

.nx-trending-rank {
    color: var(--text-muted);
    font-size: 10px;
}

/* ─── Dashboard Responsive ──────────────────────────────────────────── */

@media (max-width: 1100px) {
    .nx-intel-row { grid-template-columns: 200px 1fr; }
    .nx-gas-card { display: none; }
    .nx-split-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nx-metrics-row { gap: 4px; }
    .nx-metric-card { min-width: 100px; padding: 8px; }
    .nx-metric-value { font-size: 16px; }
    .nx-intel-row { grid-template-columns: 1fr; }
    .nx-crypto-grid { grid-template-columns: 1fr; }
    .nx-indices-grid { grid-template-columns: repeat(2, 1fr); }
    .nx-commodities-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* NEXUS DEEP DIVE — Elite Professional Terminal Styling                 */
/* ═══════════════════════════════════════════════════════════════════════════ */

.bb-price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0a00 100%);
    border-bottom: 2px solid var(--orange);
    gap: 24px;
    flex-wrap: wrap;
}

.bb-price-left {
    flex-shrink: 0;
}

.bb-symbol {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 800;
    color: var(--orange);
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255,152,0,0.3);
}

.bb-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bb-price-big {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 6px;
    text-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.bb-price-change {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.bb-price-abs {
    font-size: 13px;
    opacity: 0.7;
}

.bb-exchange {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.bb-price-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 16px;
    font-family: var(--font-mono);
    flex: 1;
    max-width: 520px;
}

.bb-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 11px;
}

.bb-stat-l {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-right: 6px;
}

.bb-stat-v {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.bb-orange { color: var(--orange) !important; }

/* ── Grid Layout ── */

.bb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 2px;
    background: #0a0a0a;
}

.bb-panel {
    background: #111111;
    border: 1px solid #1a1a1a;
    padding: 12px 14px;
    min-height: 180px;
    overflow: hidden;
    animation: nxFadeIn 0.4s ease;
    position: relative;
}

.bb-panel:hover {
    border-color: rgba(255,152,0,0.2);
}

.bb-panel.bb-wide {
    grid-column: 1 / -1;
}

.bb-panel-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,152,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bb-panel-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--orange);
    border-radius: 1px;
}

/* ── Loading & Error ── */

.bb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    animation: nxPulse 1.5s ease infinite;
}

.bb-error {
    text-align: center;
    padding: 40px;
    color: #ff1744;
    font-family: var(--font-mono);
}

.bb-no-data {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 11px;
}

/* ── Profile ── */

.bb-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
}

.bb-desc {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 8px 10px;
    background: rgba(255,152,0,0.03);
    border-left: 2px solid rgba(255,152,0,0.2);
    border-radius: 0 4px 4px 0;
}

/* ── Financials ── */

.bb-fin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.bb-fin-section {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 8px 10px;
}

.bb-fin-section-title {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    color: #ff9800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.8;
}

/* ── Ownership Bar ── */

.bb-ownership-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    background: #1a1a1a;
}

.bb-own-seg {
    height: 100%;
    transition: width 0.6s ease;
}

.bb-own-inst { background: var(--orange); }
.bb-own-insider { background: #ff1744; }
.bb-own-other { background: #333; }

.bb-ownership-legend {
    display: flex;
    gap: 12px;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bb-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

/* ── Tables ── */

.bb-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 11px;
}

.bb-table thead th {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255,152,0,0.15);
    position: sticky;
    top: 0;
    background: #111;
}

.bb-table tbody td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
    white-space: nowrap;
}

.bb-table tbody tr:hover {
    background: rgba(255,152,0,0.04);
}

.bb-table.compact {
    font-size: 10px;
}

.bb-table.compact td,
.bb-table.compact th {
    padding: 4px 6px;
}

.bb-inst-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bb-clickable {
    cursor: pointer;
}

.bb-clickable:hover td {
    color: var(--orange) !important;
}

.bb-muted {
    color: var(--text-muted) !important;
    font-size: 10px;
}

/* ── Analyst Consensus ── */

.bb-consensus {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.bb-consensus-badge {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 4px;
    background: rgba(255,152,0,0.1);
    border: 1px solid rgba(255,152,0,0.3);
    letter-spacing: 2px;
}

.bb-consensus-badge.positive {
    background: rgba(0,200,83,0.1);
    border-color: rgba(0,200,83,0.3);
    color: #00c853;
}

.bb-consensus-badge.negative {
    background: rgba(255,23,68,0.1);
    border-color: rgba(255,23,68,0.3);
    color: #ff1744;
}

.bb-consensus-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ── Rating Bar ── */

.bb-rating-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 4px;
    background: #1a1a1a;
}

.bb-rate-seg {
    height: 100%;
    transition: width 0.6s ease;
    min-width: 1px;
}

.bb-rating-counts {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    margin-bottom: 12px;
}

/* ── Price Targets ── */

.bb-targets {
    margin-top: 8px;
}

.bb-target-visual {
    margin: 8px 0;
}

.bb-target-bar {
    position: relative;
    height: 6px;
    background: linear-gradient(90deg, #ff1744 0%, #ff9800 40%, #ff9800 60%, #00c853 100%);
    border-radius: 3px;
    margin: 12px 0;
}

.bb-target-marker {
    position: absolute;
    top: -6px;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    transform: translateX(-50%);
}

.bb-target-current {
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.bb-target-mean {
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255,152,0,0.5);
}

.bb-target-nums {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* ── Officers ── */

.bb-officers-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.bb-officer {
    padding: 8px 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border-left: 2px solid rgba(255,152,0,0.2);
}

.bb-officer-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.bb-officer-title {
    font-size: 10px;
    color: var(--orange);
    margin-top: 2px;
}

.bb-officer-pay {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Upgrades ── */

.bb-upgrades-flow {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    flex-wrap: wrap;
}

.bb-upgrade-card {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #222;
    min-width: 140px;
    font-family: var(--font-mono);
}

.bb-upgrade-card.bb-upgrade {
    border-color: rgba(0,200,83,0.3);
    background: rgba(0,200,83,0.05);
}

.bb-upgrade-card.bb-downgrade {
    border-color: rgba(255,23,68,0.3);
    background: rgba(255,23,68,0.05);
}

.bb-upgrade-card.bb-maintain {
    border-color: rgba(255,152,0,0.2);
    background: rgba(255,152,0,0.03);
}

.bb-upgrade-firm {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.bb-upgrade-action {
    font-size: 11px;
    color: var(--text-secondary);
}

.bb-upgrade-date {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Statements ── */

.bb-statements-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.bb-stmt-section {
    overflow-x: auto;
}

/* ── Responsive ── */

@media (max-width: 1100px) {
    .bb-grid { grid-template-columns: 1fr; }
    .bb-price-header { flex-direction: column; }
    .bb-price-stats { max-width: 100%; grid-template-columns: repeat(4, 1fr); }
    .bb-fin-grid { grid-template-columns: 1fr 1fr; }
    .bb-officers-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .bb-price-stats { grid-template-columns: repeat(2, 1fr); }
    .bb-fin-grid { grid-template-columns: 1fr; }
    .bb-target-nums { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING — shimmer placeholders while data loads
   ═══════════════════════════════════════════════════════════════════════════ */

.nx-skeleton-wrap {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nx-skeleton-row {
    display: flex;
    gap: 12px;
}

.nx-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: nx-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    min-height: 20px;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE HAMBURGER MENU — responsive nav for header tabs
   ═══════════════════════════════════════════════════════════════════════════ */

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
}

@media (max-width: 900px) {
    .mobile-menu-btn { display: block; }
    .header-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-primary);
        flex-direction: column;
        padding: 8px;
        z-index: 999;
        gap: 2px;
    }
    .header-nav.mobile-open {
        display: flex;
    }
    .header-nav button {
        text-align: left;
        padding: 10px 12px;
        border-radius: 4px;
    }
    .header-nav button:hover {
        background: var(--bg-hover);
    }
    .sidebar { display: none; }
    .ws-sidebar-panels { display: none; }
    .resize-handle-v { display: none; }
    .header-right { gap: 4px; }
    .header-right .header-clock { display: none; }
}
