* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; background: #16213e;
    border-bottom: 1px solid #2a2a4a;
}
.header h1 { font-size: 1.2em; font-weight: 600; }
.status-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    margin-right: 6px; background: #00b061;
    animation: pulse 2s infinite;
}
.status-dot.stopped { background: #ef5350; animation: none; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.main {
    display: flex; flex: 1; overflow: hidden;
}
.sidebar {
    width: 340px; min-width: 340px; display: flex; flex-direction: column;
    border-right: 1px solid #2a2a4a; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #3a3a5a; border-radius: 3px; }
.card {
    background: #16213e; margin: 8px; padding: 14px;
    border-radius: 8px; border: 1px solid #2a2a4a;
}
.card h3 { font-size: 0.85em; color: #888; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.pnl-big { font-size: 2em; font-weight: 700; margin: 8px 0; }
.pnl-big.positive { color: #00b061; }
.pnl-big.negative { color: #ef5350; }
.stat-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.9em; }
.stat-label { color: #888; }
.stat-value { font-weight: 500; }
.trade-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #2a2a4a; font-size: 0.85em;
}
.trade-item:last-child { border-bottom: none; }
.trade-item .win { color: #00b061; }
.trade-item .loss { color: #ef5350; }
.trade-item .time { color: #888; font-size: 0.8em; }
.chart-container { flex: 1; position: relative; }
.chart-toolbar {
    position: absolute; top: 10px; right: 10px; z-index: 10;
    display: flex; gap: 6px;
}
.chart-toolbar button {
    background: #16213e; color: #e0e0e0; border: 1px solid #2a2a4a;
    padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8em;
}
.chart-toolbar button:hover { background: #2a2a4a; }
.chart-toolbar button.active { background: #3a3a6a; border-color: #00b061; }
.chart-legend {
    position: absolute; top: 10px; left: 10px; z-index: 10;
    display: flex; flex-direction: column; gap: 3px;
    background: rgba(22, 33, 62, 0.85); padding: 6px 10px;
    border-radius: 4px; border: 1px solid #2a2a4a;
    font-size: 0.78em; line-height: 1.5;
}
.chart-legend .legend-item { display: flex; align-items: center; gap: 6px; }
.chart-legend .legend-dot {
    display: inline-block; width: 10px; height: 2px; border-radius: 1px;
}
#kline-chart { width: 100%; height: 100%; }
