:root {
    --bg-main: #090a0f;
    --bg-card: #11131a;
    --bg-card-hover: #161922;
    --bg-subtle: #171a24;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-green: #00e676;
    --accent-green-bg: rgba(0, 230, 118, 0.12);
    --accent-red: #ff3366;
    --accent-red-bg: rgba(255, 51, 102, 0.12);
    --accent-cyan: #00f0ff;
    --accent-yellow: #facc15;
    --accent-purple: #a855f7;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.45);
}

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

/* Responsive Base Layout */
html {
    min-height: 100%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Custom Cyberpunk Scrollbar for Root Page */
html::-webkit-scrollbar {
    width: 8px;
}
html::-webkit-scrollbar-track {
    background: #070a13;
}
html::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
html::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px 18px 48px 18px; /* space for pairs dock */
    box-sizing: border-box;
    max-width: 1560px;
    margin: 0 auto;
    width: 100%;
}

/* Single-Page 100vh Layout strictly for dual table screener modes (Relative Strength / X-Ray) */
html.view-mode-fixed,
body.view-mode-fixed {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

body.view-mode-fixed .app-container {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

/* Compact Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
    gap: 12px;
}

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

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.brand-title {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-primary);
}

.brand-subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* Macro Gate Pill */
.macro-regime-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
}

.regime-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.regime-badge.bull {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.regime-badge.bear {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.regime-badge.chop {
    background: rgba(250, 204, 21, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.pulse-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: pulse 1.8s infinite;
}

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

.macro-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.separator {
    color: var(--text-muted);
}

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

.live-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-indicator.connected {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    background: #242834;
    border-color: var(--border-accent);
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.btn-sm {
    padding: 4px 9px;
    font-size: 11px;
}

/* Hyperliquid Referral Integration */
.btn-referral {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(6, 95, 70, 0.32));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.45);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 11.5px;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-referral:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 95, 70, 0.5));
    color: #34d399;
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.ref-badge-tag {
    background: rgba(16, 185, 129, 0.22);
    color: #34d399;
    font-size: 9.5px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.symbol-trade-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.5;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s ease;
    margin-left: 2px;
    text-decoration: none;
}

.symbol-trade-link:hover {
    color: #10b981;
    opacity: 1;
    background: rgba(16, 185, 129, 0.15);
}

.xray-trade-cta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.trade-cta-discount {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.trade-cta-discount strong {
    color: #10b981;
}

.btn-trade-hl-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #059669, #047857);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.25);
}

.btn-trade-hl-modal:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Sleek Cyber-Pill Segmented Control Mode Tabs & Timeframe Switcher */
.view-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-shrink: 0;
    gap: 12px;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-tabs {
    display: inline-flex;
    background: #0d0f16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #8492a6;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.tab-btn.active svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 4px #38bdf8);
}

/* Timeframe Segmented Switcher */
.tf-tabs {
    display: inline-flex;
    background: #0d0f16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.tf-btn {
    padding: 4px 11px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #8492a6;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tf-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tf-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #059669, #10b981);
    border: 1px solid rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.filter-indicators {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-badge {
    font-size: 9.5px;
    font-weight: 600;
    padding: 2.5px 7px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

/* Sparklines */
.sparkline-cell {
    width: 68px;
    min-width: 68px;
    padding: 2px 6px !important;
    vertical-align: middle;
    text-align: center;
}

.sparkline-svg {
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}

/* Main Dashboard Dual Cards Layout */
.dashboard-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.015);
    flex-shrink: 0;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.green-accent {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.red-accent {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

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

.widget-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

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

/* Tables */
.table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}

.table-wrapper::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.data-table th {
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.3px;
    user-select: none;
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 5.5px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

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

.data-table tbody tr.selected-long {
    background-color: rgba(0, 230, 118, 0.08);
    border-left: 2px solid var(--accent-green);
}

.data-table tbody tr.selected-short {
    background-color: rgba(255, 51, 102, 0.08);
    border-left: 2px solid var(--accent-red);
}

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

.text-center {
    text-align: center;
}

/* Symbol Cell with Coin Avatar */
.symbol-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
}

/* Symbol Container for Funding Matrix & General Tables */
.symbol-container {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
}

.symbol-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    line-height: 1.25 !important;
    text-align: left !important;
}

.symbol-ticker {
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-sans);
}

.symbol-name {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    text-align: left;
}

/* TradFi Dedicated Avatar Badge */
.tradfi-avatar {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: var(--font-mono) !important;
    font-size: 8.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-sizing: border-box;
}

.coin-avatar {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    object-fit: cover;
    background: #11141f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.coin-avatar-fallback {
    font-size: 8px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #38bdf8;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: inset 0 0 4px rgba(56, 189, 248, 0.2);
    text-transform: uppercase;
}

/* Values & Badges */
.val-green {
    color: var(--accent-green);
    font-weight: 600;
}

.val-red {
    color: var(--accent-red);
    font-weight: 600;
}

.badge-fade {
    background: rgba(250, 204, 21, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(250, 204, 21, 0.3);
    font-size: 8.5px;
    font-weight: 700;
    padding: 1.5px 5px;
    border-radius: var(--radius-sm);
}

.badge-normal {
    color: var(--text-muted);
    font-size: 9.5px;
}

/* Derivatives Flow State Badges */
.flow-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1.5px 6px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-green {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge-yellow {
    background: rgba(250, 204, 21, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-red {
    background: rgba(255, 51, 102, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-squeeze {
    background: rgba(244, 63, 94, 0.25);
    color: #ff007f;
    border: 1px solid #ff007f;
    animation: pulse 1.5s infinite;
}

.badge-neutral {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

/* Pairs Builder Bottom Dock */
.pair-builder-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 17, 24, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-accent);
    padding: 7px 20px;
    z-index: 100;
}

.dock-container {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pair-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dock-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.pair-chip {
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.long-chip {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.short-chip {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.vs-badge {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--text-muted);
}

.spread-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

.metric-label {
    font-size: 10px;
    color: var(--text-muted);
}

.metric-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* FIXED CENTERED OVERLAY MODAL - NEVER LEAKS INTO DOCUMENT FLOW */
.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.82) !important;
    backdrop-filter: blur(12px) !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex !important;
}

.modal-content {
    background: #12141c;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(14, 165, 233, 0.2);
    width: 95%;
    max-width: 980px;
    max-height: 92vh;
    overflow-y: auto;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

@keyframes modalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.modal-title {
    font-size: 14.5px;
    font-weight: 700;
}

.modal-coin-subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
}

.close-btn {
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 14px 18px 18px 18px;
}

.xray-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.xray-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
}

.meta-lbl {
    color: var(--text-muted);
}

.meta-val {
    font-family: var(--font-mono);
    color: #fff;
}

.meta-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 10px;
}

.xray-meta-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.xray-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .xray-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .xray-grid {
        grid-template-columns: 1fr;
    }
}

.xray-tile {
    background: #0f121a;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
    min-height: 130px;
}

.xray-tile:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.xray-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.xray-tile-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.xray-tile-val {
    font-size: 14.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.tile-plain-text {
    font-size: 10.5px;
    line-height: 1.4;
    color: #94a3b8;
    margin-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
    padding-top: 5px;
}

/* Funding Direction Payer Pill */
.funding-flow-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    letter-spacing: 0.2px;
}

.payer-longs-pay {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.payer-shorts-pay {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.payer-neutral {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Redesigned Plain-Language Capital Flow Diagnosis */
.xray-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-top: 0;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.xray-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.xray-banner-title {
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.xray-banner-body {
    font-size: 11.5px;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.xray-banner-takeaway {
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.35);
    border-left: 2px solid #38bdf8;
    padding: 5px 8px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 54px;
    right: 20px;
    background: #1e293b;
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-accent);
    font-size: 11px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Stacked Funding & Basis Cell in Table */
.funding-cell-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.funding-primary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 11.5px;
}

.pill-base-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    letter-spacing: 0.3px;
    line-height: 1.1;
    display: inline-block;
}

.funding-secondary {
    font-size: 9.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.basis-prem {
    color: #34d399; /* Positive premium: perp > spot */
}

.basis-disc {
    color: #fb7185; /* Negative discount: perp < spot */
}

.basis-flat {
    color: var(--text-muted);
}

/* Cross-Exchange Multi-Venue Radar in Modal */
.cross-venue-radar {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.venue-radar-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.venue-radar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 6px;
}

.venue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    background: rgba(15, 23, 42, 0.5);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.venue-item-highlight {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
}

.venue-item-highlight .v-label {
    color: #38bdf8 !important;
    font-weight: 600;
}

.venue-item .v-label {
    color: var(--text-muted);
    font-weight: 500;
}

.venue-item .v-val {
    font-weight: 600;
    font-family: var(--font-mono);
}

.venue-divergence-alert {
    margin-top: 6px;
    font-size: 10.5px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   FIERY CROSS-DEX FUNDING ARBITRAGE COCKPIT STYLING
   ============================================================ */
.funding-arb-cockpit {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

/* 4-Stat Fiery HUD Cards */
.fire-hud-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex-shrink: 0;
}

.fire-stat-card {
    background: linear-gradient(135deg, rgba(22, 14, 12, 0.95) 0%, rgba(12, 15, 24, 0.98) 100%);
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 15px rgba(255, 84, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fire-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff5400, #ffb703, #ffe600);
}

.fire-stat-card.glow-burn {
    border-color: rgba(255, 84, 0, 0.45);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 84, 0, 0.15);
}

.fire-stat-card.glow-gold {
    border-color: rgba(255, 183, 3, 0.45);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 183, 3, 0.12);
}

.fire-stat-card.glow-ember {
    border-color: rgba(247, 37, 133, 0.45);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(247, 37, 133, 0.12);
}

.fire-stat-card.glow-cyan {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(14, 165, 233, 0.12);
}

.fire-stat-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fire-icon-badge {
    font-size: 13px;
}

.fire-stat-title {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.fire-stat-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0;
}

.val-flame {
    color: #ff6b00;
    text-shadow: 0 0 14px rgba(255, 107, 0, 0.5);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 22px;
}

.val-gold {
    color: #ffb703;
    text-shadow: 0 0 14px rgba(255, 183, 3, 0.5);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 22px;
}

.val-ember {
    color: #ff3366;
    text-shadow: 0 0 14px rgba(255, 51, 102, 0.5);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 22px;
}

.fire-stat-coin {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.fire-stat-unit {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.fire-stat-sub {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fire-stat-sub strong {
    color: var(--text-primary);
}

/* Fiery Search & Filter Strip */
.fire-filter-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 84, 0, 0.04);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    flex-shrink: 0;
}

.fire-filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fire-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 107, 0, 0.35);
    border-radius: 4px;
    padding: 3px 8px;
}

.fire-search-box svg {
    color: #ff9e00;
}

.fire-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 11px;
    width: 170px;
    font-family: var(--font-sans);
}

.fire-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.fire-chip-group,
.fire-venue-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fire-chip,
.fire-venue-btn {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.fire-chip:hover,
.fire-venue-btn:hover,
.fire-asset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.fire-chip.active,
.fire-venue-btn.active {
    background: linear-gradient(135deg, rgba(255, 84, 0, 0.3), rgba(255, 183, 3, 0.2));
    border-color: #ff7b00;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.35);
}

.fire-asset-group {
    display: flex;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 183, 3, 0.25);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.fire-asset-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.fire-asset-btn.active {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.35), rgba(255, 84, 0, 0.25));
    border-color: #ffb703;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(255, 183, 3, 0.4);
}

.tradfi-type-badge {
    display: inline-block;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.tradfi-badge-stock {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.tradfi-badge-commodity {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.tradfi-badge-index {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

.tradfi-badge-fx {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.fire-filter-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
}

.calc-label {
    color: var(--text-muted);
}

.calc-badge {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Fiery Table Card */
.fire-table-card {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 0, 0.25);
    background: linear-gradient(180deg, rgba(18, 14, 16, 0.95) 0%, rgba(10, 12, 18, 0.98) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 84, 0, 0.08);
}

.fire-card-header {
    background: linear-gradient(90deg, rgba(255, 84, 0, 0.08) 0%, rgba(18, 14, 16, 0.95) 100%) !important;
    border-bottom: 1px solid rgba(255, 107, 0, 0.25) !important;
    padding: 7px 14px !important;
}

.fire-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.fire-table thead th {
    background: rgba(20, 15, 15, 0.95);
    border-bottom: 2px solid rgba(255, 107, 0, 0.4);
    color: #ffb703;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 10px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.fire-table tbody tr {
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.fire-table tbody tr:hover {
    background: rgba(255, 84, 0, 0.08) !important;
}

.fire-table tbody td {
    padding: 8px 10px;
    font-size: 11px;
    vertical-align: middle;
}

/* Spread Badges & Animated Heat Bars */
.arb-spread-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.arb-spread-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11.5px;
}

.spread-mild {
    background: rgba(255, 183, 3, 0.12);
    border: 1px solid rgba(255, 183, 3, 0.3);
    color: #ffb703;
}

.spread-hot {
    background: rgba(255, 107, 0, 0.18);
    border: 1px solid rgba(255, 107, 0, 0.45);
    color: #ff7b00;
}

.spread-wild {
    background: rgba(255, 84, 0, 0.25);
    border: 1px solid #ff5400;
    color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 84, 0, 0.3);
    animation: fieryFlamePulse 2s infinite ease-in-out;
}

.spread-extreme {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.3), rgba(255, 84, 0, 0.3));
    border: 1px solid #f72585;
    color: #f72585;
    box-shadow: 0 0 14px rgba(247, 37, 133, 0.45);
    animation: fieryFlamePulse 1.2s infinite ease-in-out;
}

@keyframes fieryFlamePulse {
    0%, 100% {
        box-shadow: 0 0 6px rgba(255, 84, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(255, 84, 0, 0.75);
    }
}

.arb-heat-bar {
    width: 65px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.arb-heat-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7b00, #ffb703, #ffe600);
    border-radius: 2px;
}

/* Strategy Execution Pills */
.strategy-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.strategy-pill .strat-long {
    color: #10b981;
    font-weight: 600;
}

.strategy-pill .strat-arrow {
    color: var(--text-muted);
}

.strategy-pill .strat-short {
    color: #ef4444;
    font-weight: 600;
}

/* Inspect Arb Button */
.inspect-arb-btn {
    background: linear-gradient(135deg, rgba(255, 84, 0, 0.2), rgba(255, 183, 3, 0.15));
    border: 1px solid rgba(255, 107, 0, 0.4);
    color: #ffb703;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inspect-arb-btn:hover {
    background: #ff6b00;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.6);
    transform: scale(1.03);
}

.cex-context-pill {
    font-size: 9.5px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================================
   DELTA-NEUTRAL ARBITRAGE EXECUTION BLUEPRINT & SIZER MODAL
   ========================================================== */
.blueprint-btn {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.25), rgba(255, 183, 3, 0.2)) !important;
    border: 1px solid rgba(255, 107, 0, 0.55) !important;
    color: #ffb703 !important;
    padding: 4px 10px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.blueprint-btn:hover {
    background: #ff6b00 !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(255, 107, 0, 0.7) !important;
    transform: translateY(-1px) scale(1.03) !important;
}

.blueprint-modal-content {
    max-width: 1060px !important;
    border: 1px solid rgba(255, 107, 0, 0.35) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(255, 107, 0, 0.15) !important;
    background: #0d0f17 !important;
}

.blueprint-header {
    border-bottom: 1px solid rgba(255, 107, 0, 0.2) !important;
    background: linear-gradient(180deg, rgba(255, 107, 0, 0.08) 0%, rgba(13, 15, 23, 0.95) 100%) !important;
    padding: 14px 20px !important;
}

.blueprint-body {
    padding: 18px 20px 22px 20px !important;
}

.blueprint-grid {
    display: grid;
    grid-template-columns: 1fr 1.18fr;
    gap: 16px;
}

@media (max-width: 960px) {
    .blueprint-grid {
        grid-template-columns: 1fr;
    }
}

.bp-card {
    background: #121520;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bp-card-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #e2e8f0;
}

/* Sizer Input & Chips */
.bp-sizer-container {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px;
}

.bp-sizer-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.bp-sizer-input-wrap {
    display: flex;
    align-items: center;
    background: #090b10;
    border: 1px solid rgba(255, 107, 0, 0.4);
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.bp-sizer-input-wrap:focus-within {
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.bp-currency-sym {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: #ffb703;
    margin-right: 6px;
}

.bp-capital-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    width: 100%;
}

.bp-chips-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.bp-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bp-chip:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: rgba(255, 107, 0, 0.4);
    color: #fff;
}

.bp-chip.active {
    background: linear-gradient(135deg, #ff5400, #ff8500);
    border-color: #ff9e00;
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
}

/* Allocation & Delta Split */
.bp-alloc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bp-alloc-pill {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 9px 12px;
}

.bp-alloc-pill.long {
    border-left: 3px solid #10b981;
}

.bp-alloc-pill.short {
    border-left: 3px solid #ef4444;
}

.bp-alloc-lbl {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bp-alloc-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 2px;
}

/* Cashflow Harvest Metrics */
.bp-cashflow-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
}

.bp-cashflow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bp-cashflow-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bp-cf-lbl {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bp-cf-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
}

/* Strategy Banner */
.bp-strat-banner {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(239, 68, 68, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bp-strat-route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12.5px;
}

/* Legs Cards */
.bp-legs-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bp-leg-box {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.bp-leg-box.leg-long {
    border-left: 3px solid #10b981;
}

.bp-leg-box.leg-short {
    border-left: 3px solid #ef4444;
}

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

.bp-leg-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
}

.bp-leg-tag.tag-long {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.bp-leg-tag.tag-short {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.bp-leg-rate {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
}

.bp-leg-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
}

.bp-leg-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bp-leg-k {
    color: var(--text-muted);
    font-size: 10px;
}

.bp-leg-v {
    color: #e2e8f0;
    font-weight: 600;
    font-family: var(--font-mono);
}

.bp-leg-carry-note {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 10.5px;
    font-weight: 600;
}

/* Risk & Execution Checklist */
.bp-risk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bp-risk-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
}

.bp-risk-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.bp-risk-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: #f1f5f9;
}

/* Footer Launch Buttons */
.blueprint-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bp-launch-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bp-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.bp-launch-hl {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(14, 165, 233, 0.3));
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}

.bp-launch-hl:hover {
    background: #0284c7;
    color: #fff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.bp-launch-lig {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.3));
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

.bp-launch-lig:hover {
    background: #d97706;
    color: #fff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.bp-launch-ext {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.3));
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
}

.bp-launch-ext:hover {
    background: #7e22ce;
    color: #fff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.bp-tradfi-pill {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5px 10px;
    border-radius: 4px;
}

/* ============================================================
   CYBERPUNK SPAGHETTI CHART COCKPIT (TOP 50 HYPERLIQUID OI)
   ============================================================ */
.spaghetti-cockpit {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    position: relative;
}

/* Ultra-Thin Single-Line Podium & Controls Strip */
.spaghetti-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    height: 34px;
    background: rgba(10, 14, 22, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-sm);
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
}

.spaghetti-podium-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Ultra-Compact Single-Line Podium Pills */
.spag-podium-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 8px;
    border-radius: 4px;
    background: rgba(18, 24, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.spag-podium-pill:hover {
    transform: translateY(-1px);
}

.spag-podium-pill.gold-leader {
    border-color: rgba(255, 215, 0, 0.45);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12) 0%, rgba(18, 24, 38, 0.9) 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.spag-podium-pill.silver-leader {
    border-color: rgba(226, 232, 240, 0.35);
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.1) 0%, rgba(18, 24, 38, 0.9) 100%);
    box-shadow: 0 0 8px rgba(226, 232, 240, 0.08);
}

.spag-podium-pill.bronze-leader {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(18, 24, 38, 0.9) 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.08);
}

.spag-podium-pill.dispersion-pill {
    border-color: rgba(0, 240, 255, 0.35);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.08);
    cursor: default;
}

.spag-podium-pill.dispersion-pill:hover {
    transform: none;
}

.spag-pill-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}

.spag-pill-avatar {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.spag-avatar-img {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.spag-avatar-fallback {
    font-size: 8px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spag-chip-avatar {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.spag-tooltip-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.spag-pill-sym {
    font-weight: 800;
    font-size: 11.5px;
    color: #fff;
    letter-spacing: 0.2px;
}

.spag-pill-ret {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 11.5px;
}

.spag-pill-alpha {
    font-size: 9.5px;
    font-family: var(--font-mono);
    color: #38bdf8;
    opacity: 0.9;
}

.dispersion-spread-val {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 12px;
    background: linear-gradient(90deg, #00f0ff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dispersion-sub {
    font-size: 9.5px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.dispersion-med-pill {
    font-size: 9.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Single-Line Controls Strip */
.spaghetti-controls-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.spaghetti-mode-toggle,
.spaghetti-tf-toggle,
.spaghetti-filter-group {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(15, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2px 3px;
    height: 26px;
    box-sizing: border-box;
}

.spaghetti-mode-btn,
.spaghetti-tf-btn,
.spag-filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 20px;
    line-height: 14px;
}

.spaghetti-mode-btn:hover,
.spaghetti-tf-btn:hover,
.spag-filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.spaghetti-mode-btn.active {
    background: rgba(0, 240, 255, 0.16);
    border-color: rgba(0, 240, 255, 0.6);
    color: #00f0ff;
    font-weight: 700;
}

.spaghetti-tf-btn.active {
    background: rgba(0, 230, 118, 0.16);
    border-color: rgba(0, 230, 118, 0.6);
    color: #00e676;
    font-weight: 700;
}

.spag-filter-btn.active {
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(168, 85, 247, 0.6);
    color: #c084fc;
    font-weight: 700;
}

.spag-filter-btn.reset-btn {
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 5px;
}

.spag-filter-btn.reset-btn:hover {
    color: #00f0ff;
}

/* Canvas Stage */
.spaghetti-stage {
    flex: 1;
    min-height: 380px;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(13, 20, 32, 0.95) 0%, rgba(5, 7, 10, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.8);
}

#spaghettiCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

/* Floating Cyberpunk HUD Tooltip */
.spaghetti-hud-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    background: rgba(10, 14, 22, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 240, 255, 0.5);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 240, 255, 0.25);
    font-size: 11px;
    min-width: 180px;
    transition: opacity 0.1s ease;
}

.hud-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-tooltip-coin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #fff;
}

.hud-tooltip-rank {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.hud-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 3px;
    font-size: 10.5px;
}

.hud-tooltip-row .label {
    color: var(--text-muted);
}

.hud-tooltip-row .val {
    font-family: var(--font-mono);
    font-weight: 700;
}

.hud-tooltip-action {
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: right;
}

.hud-tooltip-trade-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #00f0ff;
    text-decoration: none;
    pointer-events: auto;
}

.hud-tooltip-trade-link:hover {
    text-decoration: underline;
}

/* Bottom Multi-Coin Ticker Strip (50 Coins) */
.spaghetti-ticker-strip-wrap {
    height: 42px;
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.spaghetti-ticker-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}

.spaghetti-ticker-strip::-webkit-scrollbar {
    height: 4px;
}

.spaghetti-ticker-strip::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 2px;
}

.spag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(18, 24, 38, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10.5px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.spag-chip:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.5);
    transform: translateY(-1px);
}

.spag-chip.active-isolate {
    background: rgba(0, 230, 118, 0.18);
    border-color: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.35);
}

.spag-chip-rank {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.spag-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.spag-chip-sym {
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

.spag-chip-ret {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 10px;
}

.spag-chip-trade-btn {
    color: #38bdf8;
    text-decoration: none;
    font-size: 9px;
    margin-left: 2px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.spag-chip-trade-btn:hover {
    opacity: 1;
    color: #00f0ff;
}

/* ============================================================
   SECTOR LEAD-LAG & RELATIVE DISPERSION RADAR STYLES
   ============================================================ */

.sector-cockpit {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 6px 0 100px 0;
    animation: fadeIn 0.25s ease-out;
}

.app-container.mode-sector {
    padding-bottom: 12px !important;
}

/* Top Ultra-Thin Single-Line Macro Pulse & Filter Bar */
.sector-top-bar.single-line-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    background: #0d111d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
}

.sector-top-bar.single-line-bar::-webkit-scrollbar {
    display: none;
}

.sector-macro-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.macro-pill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11px;
    line-height: 1;
    cursor: default;
}

.macro-pill-item.hot-pill {
    border-color: rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.06);
}

.macro-pill-item.cold-pill {
    border-color: rgba(255, 51, 102, 0.3);
    background: rgba(255, 51, 102, 0.06);
}

.macro-pill-item.setups-pill {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.06);
}

.macro-pill-icon {
    font-size: 12px;
}

.macro-pill-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.macro-pill-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.macro-pill-val {
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.macro-pill-num {
    font-size: 12px;
    font-weight: 800;
    color: #00f0ff;
    font-family: var(--font-mono);
}

.macro-pill-sub {
    font-size: 9.5px;
    color: var(--text-muted);
}

.sector-bar-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Filter Strip */
.sector-filter-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.sec-filter-label {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.sector-filter-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sec-filter-btn {
    background: #151a2a;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 4px;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sec-filter-btn:hover {
    background: #1c2338;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sec-filter-btn.active {
    background: rgba(6, 182, 212, 0.18);
    color: #00f0ff;
    border-color: #06b6d4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
}

/* Section Header */
.sector-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px;
}

.sec-hdr-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sec-hdr-icon {
    font-size: 14px;
}

.sec-hdr-title {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin: 0;
}

.sec-hdr-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.sec-hdr-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sec-hdr-sub-inline {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 1050px) {
    .sec-hdr-sub-inline {
        display: none;
    }
}

.hero-scroll-arrows {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-arrow-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hero-arrow-btn:hover {
    background: #1e293b;
    color: #00f0ff;
    border-color: rgba(6, 182, 212, 0.4);
}

.sec-hdr-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Podium Hero Cards Grid (STRICT SINGLE HORIZONTAL ROW) */
.catchup-podium-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(6, 182, 212, 0.35) rgba(13, 17, 29, 0.6);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.catchup-podium-grid::-webkit-scrollbar {
    height: 6px;
}

.catchup-podium-grid::-webkit-scrollbar-track {
    background: rgba(13, 17, 29, 0.6);
    border-radius: 3px;
}

.catchup-podium-grid::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.35);
    border-radius: 3px;
}

.catchup-podium-grid::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

.catchup-card {
    flex: 0 0 350px;
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    scroll-snap-align: start;
    background: #0d111d;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.catchup-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(6, 182, 212, 0.15);
}

.catchup-card.gold-podium {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, #0d111d 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.08);
}

.catchup-card.silver-podium {
    border-color: rgba(148, 163, 184, 0.4);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.04) 0%, #0d111d 100%);
}

.catchup-card.bronze-podium {
    border-color: rgba(217, 119, 6, 0.4);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.04) 0%, #0d111d 100%);
}

.catchup-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catchup-rank-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    background: #171d2d;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.catchup-card.gold-podium .catchup-rank-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #facc15;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.catchup-sector-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid transparent;
}

/* Matchup Side-by-Side */
.catchup-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 9px 10px;
    transition: all 0.15s ease;
}

.catchup-card:hover .catchup-matchup {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.1);
}

.matchup-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-role-label {
    font-size: 8.5px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

.laggard-side .side-role-label {
    color: #00f0ff;
}

.leader-side .side-role-label {
    color: #facc15;
    text-align: right;
}

.side-asset-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.leader-side .side-asset-row {
    justify-content: flex-end;
}

.side-avatar {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-avatar img,
.side-avatar .coin-avatar,
.side-avatar .tradfi-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.side-meta {
    display: flex;
    flex-direction: column;
}

.leader-side .side-meta {
    align-items: flex-end;
}

.side-symbol {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

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

.side-ret-pill {
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.leader-side .side-ret-pill {
    text-align: right;
}

.matchup-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
}

.center-gap-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 5px;
    padding: 2.5px 8px;
    transition: all 0.15s ease;
}

.gap-val {
    font-size: 12px;
    font-weight: 800;
    color: #00e676;
    font-family: var(--font-mono);
    line-height: 1.1;
}

.gap-label {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: rgba(0, 230, 118, 0.7);
    line-height: 1.1;
    margin-top: 1px;
}

.center-metrics-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8.5px;
    font-family: var(--font-mono);
    white-space: nowrap;
    margin-top: 1px;
}

.center-corr,
.center-corr-pill {
    color: #38bdf8;
    font-weight: 700;
}

.center-dot {
    color: rgba(255, 255, 255, 0.25);
    font-size: 7px;
}

.center-conv,
.center-score-pill {
    color: #94a3b8;
    font-weight: 700;
}

/* Target Projection Strip */
.catchup-target-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 6px 10px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.catchup-card:hover .catchup-target-strip {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.1);
}

.target-left {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
}

.target-flag {
    font-size: 9.5px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.target-val {
    font-size: 11.5px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
}

.target-right {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.target-gain-badge {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
    white-space: nowrap;
    color: #00e676;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 4px;
    padding: 2.5px 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

/* Bottom Card Actions */
.catchup-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-catchup-blueprint {
    flex: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%);
    border: 1px solid #06b6d4;
    color: #00f0ff;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-catchup-blueprint:hover {
    background: #06b6d4;
    color: #000;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.6);
    transform: translateY(-1px);
}

.btn-catchup-trade {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #171d2e;
    border: 1px solid rgba(0, 230, 118, 0.4);
    color: #00e676;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-catchup-trade:hover {
    background: #00e676;
    color: #000;
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.6);
    transform: translateY(-1px);
}

/* Empty Setups Banner */
.empty-setups-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #0d111d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

/* Sector Baskets Grid (Clean 3x3 Uniform Institutional Grid) */
/* ============================================================
   HEATMAP VIEW TOGGLE
   ============================================================ */
.heatmap-view-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px;
}

.hm-toggle-btn {
    padding: 4px 11px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.2px;
}

.hm-toggle-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hm-toggle-btn.active {
    background: rgba(6, 182, 212, 0.18);
    color: #00f0ff;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

/* ============================================================
   TREEMAP HEATMAP CANVAS & TABLE-SPACED GRID
   ============================================================ */
.sector-treemap-canvas {
    width: 100%;
}

/* Outer treemap scrollable container */
.hm-treemap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-height: 600px;
    overflow-x: auto;
    overflow-y: auto;
    background: #080c14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: #06b6d4 rgba(255, 255, 255, 0.04);
}

.hm-treemap::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
.hm-treemap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
.hm-treemap::-webkit-scrollbar-thumb {
    background: #06b6d4;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}
.hm-treemap::-webkit-scrollbar-thumb:hover {
    background: #22d3ee;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

/* Sector block = vertical column with uniform table-column width */
.hm-sector-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 0 156px;
    min-width: 156px;
}

/* Sector label header pinned at the top of each column */
.hm-sector-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 9px;
    background: #0e1322;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.hm-sec-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.hm-sec-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.hm-sec-name {
    font-size: 11px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.hm-sec-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    padding-top: 1px;
}

.hm-sec-count {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.hm-sec-mean {
    font-size: 10.5px;
    font-weight: 800;
    font-family: var(--font-mono);
    white-space: nowrap;
    flex-shrink: 0;
}

.hm-pos { color: #00e676; }
.hm-neg { color: #f43f5e; }

/* Grid of coin tiles inside each sector column with distinct table spacing */
.hm-coins-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;           /* clear distinct table row gaps */
}

/* Individual coin tile — table row style card */
.hm-coin-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    min-height: 48px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    gap: 6px;
}

.hm-coin-tile:hover {
    filter: brightness(1.28);
    transform: translateY(-1px);
    z-index: 5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hm-coin-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.hm-coin-av {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hm-coin-av img,
.hm-coin-av .coin-avatar,
.hm-coin-av .tradfi-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    opacity: 0.95;
}

.hm-coin-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
    min-width: 0;
}

.hm-coin-sym {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-coin-ret {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.hm-coin-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Badges on right side of tile */
.hm-tile-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: var(--font-mono);
    white-space: nowrap;
    line-height: 1.2;
}

.hm-badge-leader {
    background: rgba(250, 204, 21, 0.22);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.45);
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.2);
}

.hm-badge-prime {
    background: rgba(0, 230, 118, 0.22);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.45);
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.2);
}

.hm-badge-lag {
    background: rgba(6, 182, 212, 0.22);
    color: #00f0ff;
    border: 1px solid rgba(6, 182, 212, 0.45);
}

.hm-badge-gap {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Legend bar below heatmap */
.hm-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 14px;
    background: #0d111d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    flex-wrap: wrap;
}

.hm-legend-scale {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.hm-legend-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.hm-legend-bar {
    width: 140px;
    height: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        hsl(350, 85%, 26%) 0%,
        hsl(350, 30%, 12%) 35%,
        #080c14 50%,
        hsl(142, 30%, 12%) 65%,
        hsl(142, 85%, 26%) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hm-legend-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hm-legend-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

/* ============================================================
   TABLE VIEW (classic grid)
   ============================================================ */

.sector-baskets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1360px) {
    .sector-baskets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .sector-baskets-grid {
        grid-template-columns: 1fr;
    }
}

.sector-basket-card {
    background: #0d111d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: border-color 0.15s ease, transform 0.15s ease;
    height: 395px; /* Exact uniform height across all 9 cards */
    max-height: 395px;
}

.sector-basket-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.sector-card-accent {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
}

.sector-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 7px 12px 6px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.sector-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.sector-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sector-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

.sector-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sector-count-tag {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.sec-flow-badge {
    font-size: 8.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.sector-header-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.sec-mean-pill {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.sec-breadth-pill {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

/* Dispersion Meter Strip */
.sector-dispersion-strip {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1.1fr;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #111524;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.disp-end {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.disp-leader {
    justify-content: flex-end;
    text-align: right;
}

.disp-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.disp-sym {
    font-size: 10.5px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.disp-ret {
    font-size: 9.5px;
    font-family: var(--font-mono);
    font-weight: 700;
    white-space: nowrap;
}

.disp-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.disp-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.disp-bar-fill {
    width: 100%;
    height: 100%;
}

.disp-spread-badge {
    font-size: 8.5px;
    font-weight: 800;
    color: #00f0ff;
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Table */
.sector-table-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sector-table-wrap::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sector-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.sector-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.sector-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

.sector-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.sector-table thead th {
    position: sticky;
    top: 0;
    background: #0f1322;
    z-index: 2;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sector-table th {
    padding: 4px 6px;
    font-size: 8.5px;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.sector-table td {
    padding: 4.5px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    white-space: nowrap;
}

.sector-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.row-leader-highlight td {
    background: rgba(245, 158, 11, 0.04);
}

.row-prime-highlight td {
    background: rgba(0, 230, 118, 0.04);
}

.row-lag-highlight td {
    background: rgba(56, 189, 248, 0.03);
}

.sec-coin-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sec-coin-avatar {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sec-coin-avatar img,
.sec-coin-avatar .coin-avatar,
.sec-coin-avatar .tradfi-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 8px;
}

.sec-coin-sym {
    font-weight: 800;
    color: #fff;
    font-size: 11.5px;
}

.sec-ret-cell {
    font-family: var(--font-mono);
    font-weight: 700;
}

.sec-corr-pill {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid transparent;
}

.sec-signal-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.sec-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.btn-sec-blueprint {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #00f0ff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-sec-blueprint:hover {
    background: #06b6d4;
    color: #000;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.sec-trade-btn {
    color: #38bdf8;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(56, 189, 248, 0.08);
    transition: all 0.15s ease;
}

.sec-trade-btn:hover {
    background: #38bdf8;
    color: #000;
}

/* Catch-Up Blueprint Modal Specifics */
.catchup-stat-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px;
}

.catchup-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.c-stat-lbl {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.c-stat-val {
    font-size: 13px;
    font-weight: 800;
}

.catchup-pnl-projection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pnl-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 10px;
}

.pnl-lbl {
    font-size: 8.5px;
    font-weight: 800;
    color: var(--text-muted);
}

.pnl-val {
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.catchup-route-card {
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
}

.catchup-route-card.route-directional {
    border-color: rgba(6, 182, 212, 0.3);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, #111524 100%);
}

.catchup-route-card.route-neutral {
    border-color: rgba(0, 230, 118, 0.3);
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, #111524 100%);
}

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

.route-badge {
    font-size: 9.5px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.4px;
}

.route-tag {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.route-desc {
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.4;
}

.bp-thesis-box {
    background: #141926;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.4;
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0d1322;
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #00f0ff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(6, 182, 212, 0.25);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: #06b6d4;
    color: #050811;
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.5);
}





