/* History «График» (owner, 02.10): candles, robots as colored bands, icebergs as circles. */
.history-chart-form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.history-chart-form > label { display: grid; gap: .22rem; color: var(--text-secondary); font-size: .6875rem; }
.history-chart-form select, .history-chart-form input { min-height: 2rem; }
.history-chart-form .history-chart-check { display: flex; align-items: center; gap: .35rem; min-height: 2rem; }
.history-chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: .625rem; min-width: 0; }
.history-chart-stage { position: relative; min-width: 0; height: 34rem; background: var(--bg-primary); border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); overflow: hidden; }
#history-chart-canvas { position: absolute; inset: 0; }
.history-chart-empty { position: absolute; inset: 0; display: grid; margin: 0; color: var(--text-tertiary); font-size: .75rem; place-items: center; pointer-events: none; }
.history-chart-tooltip { position: absolute; z-index: 3; max-width: 19rem; margin: 0; padding: .45rem .6rem; color: var(--text-primary); background: var(--bg-elevated); border: 1px solid var(--border-primary, var(--border-secondary)); border-radius: var(--radius-sm); box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .18); font-size: .6875rem; line-height: 1.45; white-space: pre-line; pointer-events: none; }
.history-chart-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: .45rem; min-width: 0; height: 34rem; }
.history-chart-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.history-chart-side-head h4 { margin: 0; font-size: .8125rem; }
.history-chart-filters { display: grid; grid-template-columns: 1fr 5.5rem; gap: .35rem; }
.history-chart-filters select, .history-chart-filters input { min-height: 1.85rem; font-size: .75rem; }
.history-chart-robots { display: grid; align-content: start; gap: .2rem; min-height: 0; overflow: auto; padding-right: .15rem; }
.history-chart-robot { display: grid; grid-template-columns: auto .7rem minmax(0, 1fr) auto; align-items: center; gap: .4rem; padding: .3rem .4rem; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; font-size: .6875rem; }
.history-chart-robot:hover { background: var(--bg-hover); }
.history-chart-robot.is-selected { background: color-mix(in srgb, var(--robot-color) 12%, transparent); border-color: color-mix(in srgb, var(--robot-color) 45%, transparent); }
.history-chart-robot input { margin: 0; }
.history-chart-swatch { width: .7rem; height: .7rem; background: var(--robot-color, transparent); border: 1px solid var(--border-secondary); border-radius: 50%; }
.history-chart-robot-text { display: grid; min-width: 0; }
.history-chart-robot-text strong { font-size: .75rem; font-variant-numeric: tabular-nums; }
.history-chart-robot-text strong.is-buy { color: var(--success); }
.history-chart-robot-text strong.is-sell { color: var(--error); }
.history-chart-robot-text span { overflow: hidden; color: var(--text-tertiary); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.history-chart-zoom { padding: .1rem .3rem; color: var(--text-tertiary); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; }
.history-chart-zoom:hover { color: var(--text-primary); background: var(--bg-hover); }
.history-chart-actions { display: flex; gap: .35rem; }
.history-chart-actions .toolbar-button { flex: 1 1 0; justify-content: center; min-height: 1.85rem; font-size: .6875rem; }
.history-chart-legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: 0; color: var(--text-tertiary); font-size: .6875rem; }
.history-chart-legend i { display: inline-block; width: .65rem; height: .65rem; margin-right: .3rem; vertical-align: -.05rem; border-radius: 50%; }
.history-chart-legend .is-bid { background: color-mix(in srgb, #2f9e44 42%, transparent); border: 1.5px solid #2f9e44; }
.history-chart-legend .is-ask { background: color-mix(in srgb, #e03131 42%, transparent); border: 1.5px solid #e03131; }
.history-chart-legend b.is-yur { color: #1c7ed6; }
.history-chart-legend b.is-fiz { color: #e8590c; }
.history-chart-legend .is-band { width: 1.1rem; height: .55rem; background: color-mix(in srgb, #f76707 18%, transparent); border: 1px solid #f76707; border-radius: 2px; }
@media (max-width: 60rem) {
  .history-chart-layout { grid-template-columns: 1fr; }
  .history-chart-stage { height: 24rem; }
  .history-chart-side { height: auto; max-height: 26rem; }
}
.history-chart-legend .is-tops { width: 1.1rem; height: .55rem; background: color-mix(in srgb, #2f9e44 14%, transparent); border-top: 2px solid #2f9e44; border-right: 1px dashed #2f9e44; border-radius: 0; }
/* Слой роботов выключен: список остаётся — отметить робота значит включить слой. */
.history-chart-side.is-off .history-chart-robots { opacity: .55; }
