body {
    background: #f8f9fa00;
    color: #1a1a1a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.trading-dashboard {
    max-width: 1800px;
    padding: 32px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-top: 0px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

/* Model Cards */
.model-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.model-card:hover {
    border-color: #c0c0c0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
}

.model-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #2a2a2a;
}

.model-icon {
    color: #555;
    font-size: 14px;
}

.model-pnl {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.pnl-positive {
    color: #059669;
}

.pnl-negative {
    color: #dc2626;
}

/* Tabs */
.model-tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    background: #f5f5f5;
}

.tab-button {
    flex: 1;
    padding: 11px 8px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

.tab-button:hover {
    color: #333;
    background: #ececec;
}

.tab-button.active {
    background: #ffffff;
    color: #1a1a1a;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #2a2a2a;
}

/* Content Area */
.model-content {
    padding: 16px 20px;
    height: 160px;
    overflow-y: auto;
    background: #ffffff;
}

.content-time {
    color: #666;
    font-size: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.content-text {
    color: #333;
    font-size: 12px;
    line-height: 1.7;
}

.content-details {
    color: #555;
    font-size: 11px;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Consolas', monospace;
    line-height: 1.6;
}

/* Chart Container - Hidden */
.chart-container {
    display: none;
}

/* Crypto Selector - Hidden */
.crypto-selector {
    display: none;
}

/* TradingView Widget Container - Hidden */
.tradingview-section {
    display: none;
}

/* TradingView Widget */
.tradingview-widget-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.chart-attribution {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}

/* P&L Chart Section */
.pnl-chart-section {
    margin-top: 3px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 32px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pnl-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.pnl-chart-header h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
}

.pnl-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 700;
}

.pnl-chart-container {
    height: 550px;
    position: relative;
    margin-bottom: 24px;
    padding-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#pnlChart {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
    border: 1px solid #1a1a1a;
}

#pnlChart:hover {
    border-color: #333333;
}

.model-legends {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
    width: 100%;
    box-sizing: border-box;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.legend-item:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.legend-icon {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

.legend-item:hover .legend-icon {
    border-color: #c0c0c0;
}

.legend-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.3px;
}

.legend-pnl {
    font-size: 11px;
    font-weight: 700;
    color: #059669;
}

.legend-item.negative .legend-pnl {
    color: #dc2626;
}

/* Live prices section */
.live-prices {
    margin-top: 32px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.live-prices h2 {
    font-size: 12px;
    margin-bottom: 20px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.price-card {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.price-card:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}

.price-symbol {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.price-value {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 6px;
    font-weight: 500;
}

.price-change {
    font-size: 11px;
    font-weight: 500;
}

/* Scrollbar */
.model-content::-webkit-scrollbar {
    width: 4px;
}

.model-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.model-content::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
}

.model-content::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Global scrollbar for body */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Loading animation */
.loading {
    text-align: center;
    color: #999;
    padding: 24px;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e8e8e8;
    border-top-color: #555;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .prices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .model-legends {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pnl-stats {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .prices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trading-dashboard {
        padding: 16px;
    }
    
    .model-legends {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pnl-chart-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .pnl-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .pnl-chart-container {
        height: 350px;
    }
    
    #pnlChart {
        height: 100%;
    }
}

/* Focus states */
.tab-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #a0a0a0;
}

/* Smooth animations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}