/* ═══════════════════════════════════════════════════════
   CHART AREA
═══════════════════════════════════════════════════════ */

.chart-area {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.chart-area.fs-full {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--bg);
}

/* ─── TOOLBAR ────────────────────────────────────────── */
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 4px;
  flex-shrink: 0;
  overflow: hidden;
}

.ct-left  { display: flex; align-items: center; gap: 4px; overflow: hidden; min-width: 0; }
.ct-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.ct-sep {
  width: 1px; height: 14px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

.ct-sym-block {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-right: 2px;
}
.ct-symbol {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}
.ct-mkt-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(108,142,191,0.12);
  color: var(--accent);
  border: 1px solid rgba(108,142,191,0.3);
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}
.ct-live-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}
.ct-live-price.up { color: var(--green); }
.ct-live-price.down { color: var(--red); }
.ct-exch-wrap {
  position: relative;
}
.ct-exch-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.ct-exch-btn:hover { color: var(--text); background: var(--input); border-color: var(--border); }
.ct-exch-arrow { font-size: 8px; opacity: 0.6; }

.ct-exch-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 0;
  z-index: 200;
  min-width: 90px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  display: none;
}
.ct-exch-menu.open { display: block; }
.ct-exch-item {
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.08s, color 0.08s;
  letter-spacing: 0.04em;
}
.ct-exch-item:hover  { background: var(--input); color: var(--text); }
.ct-exch-item.active { color: var(--accent); }

/* старый ct-exch оставляем как запасной */
.ct-exch {
  font-size: 8px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.ct-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* ─── TOOLBAR BUTTONS ────────────────────────────────── */
.ct-tf, .ct-ind, .ct-type, .ct-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  line-height: 1.5;
  user-select: none;
}

.ct-tf:hover, .ct-ind:hover, .ct-type:hover, .ct-icon-btn:hover {
  color: var(--text);
  background: var(--input);
  border-color: var(--border);
}

.ct-tf.active {
  color: var(--text);
  background: var(--input);
  border-color: var(--border);
  font-weight: 600;
}

.ct-type.active {
  color: var(--text);
  background: var(--input);
  border-color: var(--border);
}

/* Indicator active states — color-coded */
.ct-ind[data-ind="ema20"].active  { color: #2196f3; border-color: rgba(33,150,243,0.4); background: rgba(33,150,243,0.1); }
.ct-ind[data-ind="ema50"].active  { color: #ff9800; border-color: rgba(255,152,0,0.4);  background: rgba(255,152,0,0.1); }
.ct-ind[data-ind="ema200"].active { color: #e91e63; border-color: rgba(233,30,99,0.4);  background: rgba(233,30,99,0.1); }
.ct-ind[data-ind="bb"].active     { color: #6c8ebf; border-color: rgba(108,142,191,0.4); background: rgba(108,142,191,0.1); }
.ct-ind[data-ind="vwap"].active   { color: #9c27b0; border-color: rgba(156,39,176,0.4); background: rgba(156,39,176,0.1); }
.ct-ind[data-ind="rsi"].active    { color: #f0b90b; border-color: rgba(240,185,11,0.4); background: rgba(240,185,11,0.1); }

.ct-alert-btn.active {
  color: #f0b90b;
  border-color: rgba(240,185,11,0.5);
  background: rgba(240,185,11,0.12);
}

/* ─── CHART BODY ──────────────────────────────────────── */
.chart-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ─── DRAW SIDEBAR ───────────────────────────────────── */
.draw-sidebar {
  width: 48px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0 8px;
  gap: 1px;
  flex-shrink: 0;
  z-index: 5;
  overflow-y: auto;
  scrollbar-width: none;
}
.draw-sidebar::-webkit-scrollbar { display: none; }

.draw-sidebar .draw-btn {
  width: 36px;
  height: 34px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, background 0.12s, border-color 0.12s, transform 0.08s;
  user-select: none;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}
.draw-sidebar .draw-btn:hover {
  color: var(--text);
  background: var(--input);
  border-color: var(--border);
  transform: scale(1.06);
}
.draw-sidebar .draw-btn:active { transform: scale(0.96); }
.draw-sidebar .draw-btn.active {
  color: var(--accent);
  background: rgba(108,142,191,0.14);
  border-color: rgba(108,142,191,0.45);
  box-shadow: 0 0 8px rgba(108,142,191,0.15);
}
.draw-sidebar .draw-btn.draw-btn-danger:hover {
  color: #f6465d;
  border-color: rgba(246,70,93,0.4);
  background: rgba(246,70,93,0.08);
}
.draw-sidebar .draw-btn svg { pointer-events: none; }

/* ── Separator line (no label) ── */
.draw-sidebar .dsb-line {
  width: 26px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
  flex-shrink: 0;
  border-radius: 1px;
}
.draw-sidebar .dsb-line-bottom {
  margin-top: 6px;
}

/* Tooltip via title — enhanced by browser, position via CSS transform */
.draw-sidebar .draw-btn::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s 0.5s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.draw-sidebar .draw-btn:hover::after { opacity: 1; }

/* ─── OHLCV TOOLTIP ──────────────────────────────────── */
.chart-tooltip {
  display: flex;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 20;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  gap: 6px;
  align-items: center;
  color: var(--dim);
  transition: opacity 0.12s;
}
.chart-tooltip.visible { opacity: 1; }
.chart-tooltip b { color: var(--text); margin-right: 2px; font-size: 9px; }
.chart-tooltip .green { color: #2ebd85; }
.chart-tooltip .red   { color: #f6465d; }

/* Market badge in toolbar */
.ct-mkt {
  font-size: 7px;
  font-weight: 700;
  background: rgba(46,189,133,0.12);
  color: #2ebd85;
  border: 1px solid rgba(46,189,133,0.3);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

/* OI / Funding / Sessions active button states */
.ct-ind[data-ind="oi"].active       { color:#f0b90b; border-color:rgba(240,185,11,0.4); background:rgba(240,185,11,0.1); }
.ct-ind[data-ind="funding"].active  { color:#00bcd4; border-color:rgba(0,188,212,0.4);  background:rgba(0,188,212,0.1); }
.ct-ind[data-ind="sessions"].active { color:#a78bfa; border-color:rgba(167,139,250,0.4); background:rgba(167,139,250,0.1); }

/* OI / Funding — обычные пейны в flex-потоке chart-panes */
#lw-oi {
  height: 90px;
  min-height: 40px;
  width: 100%;
  flex-shrink: 0;
  display: none;
}
#lw-funding {
  height: 60px;
  min-height: 40px;
  width: 100%;
  flex-shrink: 0;
  display: none;
}

/* ─── PANES CONTAINER ────────────────────────────────── */
.chart-panes {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.chart-panes.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  pointer-events: none;
  z-index: 5;
}

.chart-panes.alert-cursor { cursor: crosshair; }

/* KLineCharts — занимает весь chart-panes через absolute */
#lw-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Скрываем старые LW-пейны */
#lw-vol, #lw-rsi, #lw-macd, #lw-oi, #lw-funding,
.pane-sep { display: none !important; }

/* ─── OI MINI-PANEL ──────────────────────────────────── */
#oi-panel {
  height: 88px;
  flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: none;
}
#oi-panel.visible { display: block; }
#oi-panel canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#oi-panel .oi-label {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--dim);
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.03em;
}
#oi-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.7;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ─── FUNDING MINI-PANEL ─────────────────────────────── */
#funding-panel {
  height: 64px;
  flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: none;
}
#funding-panel.visible { display: block; }
#funding-panel canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#funding-panel .funding-label {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--dim);
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.03em;
}
#funding-panel .funding-label.extreme {
  color: #f0b90b;
  text-shadow: 0 0 10px rgba(240,185,11,0.55);
}
#funding-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.7;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#lw-vol {
  height: 100px;
  min-height: 40px;
  width: 100%;
  flex-shrink: 0;
}

#lw-rsi {
  height: 90px;
  min-height: 50px;
  width: 100%;
  flex-shrink: 0;
  display: none;
}

#lw-macd {
  height: 100px;
  min-height: 50px;
  width: 100%;
  flex-shrink: 0;
  display: none;
}

/* ─── PANE RESIZE HANDLE ─────────────────────────────────── */
.pane-sep {
  height: 3px;
  width: 100%;
  background: var(--border);
  cursor: ns-resize;
  flex-shrink: 0;
  transition: background 0.15s;
  position: relative;
  z-index: 2;
}
.pane-sep:hover { background: var(--accent); }
.pane-sep::after {
  content: '· · ·';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  font-size: 8px;
  color: var(--faint);
  letter-spacing: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.pane-sep:hover::after { opacity: 1; }

/* ─── RT DOT ─────────────────────────────────────────────── */
.rt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
  transition: background 0.3s;
}
.rt-dot.connected {
  background: #2ebd85;
  box-shadow: 0 0 6px rgba(46,189,133,0.5);
  animation: rt-pulse 2s infinite;
}
@keyframes rt-pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* ─── INDICATORS PANEL ───────────────────────────────────── */
.ind-panel {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 5px 10px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  min-height: 32px;
}
.ind-panel.visible { display: flex; }

.ind-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ind-group + .ind-group::before {
  content: '';
  display: block;
  width: 1px;
  height: 12px;
  background: var(--border);
  margin-right: 4px;
}
.ind-group-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 3px;
  white-space: nowrap;
}
.ind-panel-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  transition: color 0.12s;
  line-height: 1;
}
.ind-panel-close:hover { color: var(--text); }

/* Active states for new indicators */
.ct-ind[data-ind="ema9"].active     { color:#00e676; border-color:rgba(0,230,118,0.4); background:rgba(0,230,118,0.1); }
.ct-ind[data-ind="atr"].active      { color:#ff9800; border-color:rgba(255,152,0,0.4); background:rgba(255,152,0,0.1); }
.ct-ind[data-ind="obv"].active      { color:#9c27b0; border-color:rgba(156,39,176,0.4); background:rgba(156,39,176,0.1); }
.ct-ind[data-ind="stochrsi"].active { color:#00bcd4; border-color:rgba(0,188,212,0.4); background:rgba(0,188,212,0.1); }
.ct-ind[data-ind="macd"].active     { color:#f0b90b; border-color:rgba(240,185,11,0.4); background:rgba(240,185,11,0.1); }

/* ─── ALERT PANEL ────────────────────────────────────── */
.chart-alert-panel {
  position: absolute;
  top: 36px;
  right: 0;
  width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  z-index: 30;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 4px 16px rgba(0,0,0,0.3);
}
.chart-alert-panel.visible { display: flex; }

.cap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}
.cap-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cap-close {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
  transition: color 0.12s;
}
.cap-close:hover { color: var(--text); }

.cap-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  max-height: 180px;
}
.cap-empty {
  font-size: 10px;
  color: var(--faint);
  text-align: center;
  padding: 12px 8px;
}
.cap-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  transition: background 0.1s;
}
.cap-item:hover { background: var(--input); }
.cap-item.cap-triggered { opacity: 0.5; }
.cap-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.cap-status {
  font-size: 10px;
  color: var(--faint);
}
.cap-del {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 10px;
  padding: 0 2px;
  transition: color 0.1s;
  flex-shrink: 0;
}
.cap-del:hover { color: #f6465d; }

.cap-footer {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
}
.cap-input {
  flex: 1;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  min-width: 0;
}
.cap-input:focus { border-color: #f0b90b; }
.cap-add-btn {
  background: rgba(240,185,11,0.15);
  border: 1px solid rgba(240,185,11,0.4);
  border-radius: 4px;
  color: #f0b90b;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
  flex-shrink: 0;
}
.cap-add-btn:hover { background: rgba(240,185,11,0.25); }

/* draw-toolbar удалён — используется .draw-sidebar */

/* ─── КНОПКА "ВСЕ ИНДИКАТОРЫ" ───────────────────────── */
.ct-ind-all-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  margin-left: 2px;
  flex-shrink: 0;
}
.ct-ind-all-btn:hover { color: var(--text); background: var(--input); border-color: var(--accent); }

/* ─── LAYER TOGGLES ──────────────────────────────────── */
.layer-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  user-select: none;
}
.layer-btn:hover { color: var(--text); border-color: var(--accent); }
.layer-btn.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: var(--accent); }

/* ─── INDICATOR MODAL ────────────────────────────────── */
.ind-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.ind-modal-overlay.open { display: flex; }

.ind-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 440px;
  max-height: 72vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: indModalIn 0.18s ease;
}
@keyframes indModalIn {
  from { opacity:0; transform:scale(0.96) translateY(-8px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

.ind-modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ind-modal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.ind-search {
  flex: 1;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 5px 10px;
  outline: none;
  transition: border-color 0.12s;
}
.ind-search:focus { border-color: var(--accent); }
.ind-modal-close {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.ind-modal-close:hover { color: var(--text); background: var(--input); }

.ind-cats {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ind-cat {
  background: transparent;
  border: 1px solid transparent;
  color: var(--dim);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.ind-cat:hover  { color: var(--text); background: var(--input); border-color: var(--border); }
.ind-cat.active { color: var(--accent); background: rgba(108,142,191,0.12); border-color: var(--accent); }

.ind-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}
.ind-list::-webkit-scrollbar { width: 4px; }
.ind-list::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 4px; }

.ind-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.08s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.ind-item:hover  { background: var(--input); }
.ind-item.active { background: rgba(108,142,191,0.06); }

.ind-item-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  width: 60px;
  flex-shrink: 0;
}
.ind-item.active .ind-item-name { color: var(--accent); }

.ind-item-label {
  font-size: 11px;
  color: var(--dim);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ind-item-cat {
  font-size: 9px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ind-item-check {
  width: 16px;
  text-align: center;
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}
.ind-empty {
  padding: 24px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

/* ─── CONTEXT MENU ───────────────────────────────────── */
.ctx-menu {
  position: fixed;
  z-index: 9999;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: none;
  min-width: 170px;
  animation: ctxIn 0.1s ease;
}
@keyframes ctxIn { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.ctx-menu.visible { display: block; }
.ctx-item {
  padding: 7px 14px;
  font-size: 12px;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.08s, color 0.08s;
}
.ctx-item:hover { background: var(--input); color: var(--text); }
.ctx-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── DRAW SIDEBAR GROUPS ────────────────────────────── */
.dsb-group-label {
  height: 1px;
  width: 20px;
  background: var(--border);
  margin: 3px 0;
  flex-shrink: 0;
}
.dsb-group-label:first-child { display: none; }

/* ─── ACTIVE INDICATOR COLORS (data-ind) ─────────────── */
.ct-ind[data-ind="MA"].active    { color: #f0b90b; border-color: rgba(240,185,11,0.4); background: rgba(240,185,11,0.1); }
.ct-ind[data-ind="BOLL"].active  { color: #6c8ebf; border-color: rgba(108,142,191,0.4); background: rgba(108,142,191,0.1); }
.ct-ind[data-ind="RSI"].active   { color: #2ebd85; border-color: rgba(46,189,133,0.4); background: rgba(46,189,133,0.1); }
.ct-ind[data-ind="MACD"].active  { color: #f6465d; border-color: rgba(246,70,93,0.4); background: rgba(246,70,93,0.1); }
