:root {
    --bg-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --accent: #38bdf8;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --border: #334155;
    --success: #34d399;
    --danger: #fb7185;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg-dark); color: var(--text-main); margin: 0; display: flex; height: 100vh; overflow: hidden; }

#sidebar { width: 320px; background: var(--sidebar-bg); padding: 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow-y: auto; }

.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

h2 { font-size: 0.8rem; text-transform: uppercase; color: var(--accent); margin: 0; }

.selection-controls { font-size: 0.7rem; color: var(--text-dim); cursor: pointer; user-select: none; }
.selection-controls span:hover { color: var(--accent); text-decoration: underline; }

.channel-item { display: flex; flex-direction: column; padding: 10px; margin-top: 8px; background: rgba(255, 255, 255, 0.03); border-radius: 6px; opacity: 0.6; transition: opacity 0.2s, background 0.2s; cursor: pointer; }
.channel-item:has(input:checked) { opacity: 1; background: rgba(255, 255, 255, 0.08); }

.main-label { display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%; }
.main-label input { width: 16px; height: 16px; margin: 0; }

.delta-container { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 4px; }
.delta-row { display: flex; justify-content: space-between; font-size: 0.75rem; }
.delta-dev-name { color: var(--text-dim); }
.delta-value { font-family: monospace; font-weight: bold; }

.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
button { background: #334155; color: white; border: 1px solid var(--border); padding: 8px; border-radius: 4px; cursor: pointer; }
button.active-range { background: var(--accent); color: #0f172a; font-weight: bold; }

#main-content { flex-grow: 1; position: relative; }
#chart { width: 100%; height: 100%; }
.export-btn { margin-top: auto; background: #0ea5e9; font-weight: bold; border: none; padding: 12px; }
