﻿/* ASIP Terminal — Bybit analytics: chart + order book. Built from scratch. */
.terminal-view{max-width:1600px;padding:16px clamp(10px,2vw,28px) 24px}
.terminal-shell{
  border:1px solid #223248;border-radius:14px;overflow:hidden;
  background:#080e18;box-shadow:0 35px 100px rgba(0,0,0,.45);
  font-family:var(--asip-font, system-ui);
}

/* header */
.terminal-header{
  display:flex;align-items:center;gap:18px;padding:0 14px;height:54px;
  background:linear-gradient(180deg,#141e2d,#0d1623);border-bottom:1px solid #223248;
}
.terminal-brand{display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.terminal-logo{font:700 16px var(--asip-font, system-ui);letter-spacing:.12em;color:#5eead4}
.terminal-title{font:700 12px var(--asip-font, system-ui);letter-spacing:.18em;color:#dbe6f3}
.terminal-brand em{
  font:700 10px var(--asip-font, system-ui);font-style:normal;letter-spacing:.08em;
  color:#081018;background:#f5b942;padding:3px 5px;border-radius:3px;
}
.terminal-controls{display:flex;align-items:center;gap:8px;margin-left:auto}
.terminal-controls select{
  background:#0a1421;border:1px solid #2a3b53;border-radius:5px;color:#dbe6f3;
  font:700 11px var(--asip-font, system-ui);padding:6px 8px;outline:none;cursor:pointer;
}
.terminal-controls select:focus{border-color:#5eead4}
.tf-group{display:flex;border:1px solid #2a3b53;border-radius:5px;overflow:hidden}
.tf-group button{
  background:#0a1421;border:0;border-right:1px solid #2a3b53;color:#7c8ca1;
  font:12px var(--asip-font, system-ui);padding:7px 8px;cursor:pointer;
}
.tf-group button:last-child{border-right:0}
.tf-group button:hover{color:#dbe6f3}
.tf-group button.active{background:rgba(94,234,212,.12);color:#5eead4}
.terminal-reconnect{
  width:30px;height:30px;border:1px solid #2a3b53;border-radius:5px;background:#0a1421;
  color:#8fa3b8;font-size:15px;line-height:1;cursor:pointer;
}
.terminal-reconnect:hover{color:#5eead4;border-color:#5eead4}
.terminal-status{
  display:flex;align-items:center;gap:7px;font:10px var(--asip-font, system-ui);letter-spacing:.1em;
  color:#8fa3b8;white-space:nowrap;
}
.terminal-status i{width:6px;height:6px;border-radius:50%;background:#f5b942;box-shadow:0 0 10px #f5b942}
.terminal-status.live i{background:#3dd29a;box-shadow:0 0 10px #3dd29a}
.terminal-status.warn i{background:#f5b942;box-shadow:0 0 10px #f5b942}
.terminal-status.off i{background:#f46c7f;box-shadow:0 0 10px #f46c7f}

/* quote */
.quote-bar{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:9px 14px;border-bottom:1px solid #1a283a;background:#0b1421;
}
.quote-main{display:flex;align-items:baseline;gap:12px}
.quote-main b{font:700 12px var(--asip-font, system-ui);letter-spacing:.08em;color:#fff}
.quote-main span:nth-child(2){font:700 22px var(--asip-font, system-ui);letter-spacing:-.04em;color:#fff}
.quote-main span:nth-child(3){font:12px var(--asip-font, system-ui);color:#3dd29a}
.quote-stats{display:flex;gap:16px;color:#6f8298;font:10px var(--asip-font, system-ui);letter-spacing:.04em}
.quote-stats b{color:#b8c7d8;font-weight:600;margin-left:3px}

/* workspace */
.terminal-workspace{
  display:grid;grid-template-columns:minmax(0,1fr) 330px;
  height:clamp(560px,calc(100vh - 230px),820px);min-height:560px;
}
.chart-panel{display:flex;flex-direction:column;min-width:0;border-right:1px solid #223248}
.chart-toolbar{
  height:38px;display:flex;align-items:center;gap:16px;padding:0 12px;
  border-bottom:1px solid #1a283a;background:#0d1725;
}
.chart-pair{display:flex;align-items:baseline;gap:7px;white-space:nowrap}
.chart-pair b{font:700 11px var(--asip-font, system-ui);color:#dbe6f3}
.chart-pair span{font:10px var(--asip-font, system-ui);color:#5eead4;border:1px solid rgba(94,234,212,.3);padding:2px 4px;border-radius:3px}
.chart-ohlc{display:flex;gap:10px;font:10px var(--asip-font, system-ui);color:#6f8298}
.chart-ohlc b{color:#b8c7d8;font-weight:500}
.chart-legend{margin-left:auto;display:flex;gap:10px;font:9px var(--asip-font, system-ui);letter-spacing:.08em}
.legend-vwap{color:#f5b942}
.legend-vol{color:#5eead4}
.chart-wrap{position:relative;flex:1;min-height:0;background:#080e18;overflow:hidden}
#bybitChart{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:crosshair}
.chart-tooltip{
  position:absolute;z-index:3;display:none;pointer-events:none;
  background:rgba(9,16,27,.94);border:1px solid #2a3b53;border-radius:5px;
  padding:6px 8px;font:10px var(--asip-font, system-ui);color:#dbe6f3;line-height:1.6;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.chart-tooltip b{color:#5eead4}
.chart-loading{
  position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;
  background:rgba(8,14,24,.88);color:#5eead4;font:11px var(--asip-font, system-ui);letter-spacing:.14em;
  transition:opacity .25s;
}
.chart-loading.hidden{opacity:0;pointer-events:none}
.chart-footer{
  height:27px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:0 12px;border-top:1px solid #1a283a;background:#0b1421;
  font:7.5px var(--asip-font, system-ui);letter-spacing:.06em;color:#52657a;
}
#chartStatus{color:#5eead4}

/* order book */
.book-panel{display:flex;flex-direction:column;min-width:0;background:#0a111c}
.book-head{
  height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:0 11px;border-bottom:1px solid #1a283a;background:#0d1725;
  font:700 10px var(--asip-font, system-ui);letter-spacing:.1em;color:#6f8298;
}
.book-head div{display:flex;align-items:baseline;gap:6px}
.book-head b{color:#dbe6f3;font-weight:600;letter-spacing:.04em}
.book-head > span{color:#52657a}
.book-columns{
  display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:4px;padding:5px 11px;
  font:9px var(--asip-font, system-ui);color:#52657a;border-bottom:1px solid #142030;
}
.book-columns span:nth-child(n+2){text-align:right}
.book-asks,.book-bids{display:flex;flex-direction:column;flex:1;min-height:0;justify-content:flex-end;overflow:hidden}
.book-bids{justify-content:flex-start}
.book-row{
  position:relative;display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:4px;
  padding:2px 11px;font:11px var(--asip-font, system-ui);overflow:hidden;min-height:18px;align-items:center;
}
.book-row .depth{position:absolute;top:1px;bottom:1px;right:0;z-index:0;opacity:.2}
.book-row span{position:relative;z-index:1;text-align:right}
.book-row span:first-child{text-align:left}
.book-asks .book-row span:first-child{color:#f46c7f}
.book-bids .book-row span:first-child{color:#3dd29a}
.book-row .size{color:#b8c7d8}
.book-row .total{color:#6f8298}
.book-row.best{background:rgba(244,108,127,.05)}
.book-bids .book-row.best{background:rgba(61,210,154,.05)}
.book-spread{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:5px 11px;border-top:1px solid #223248;border-bottom:1px solid #223248;
  background:#101c2b;
}
.book-spread span{font:700 13px var(--asip-font, system-ui);color:#fff}
.book-spread small{font:9px var(--asip-font, system-ui);letter-spacing:.12em;color:#f5b942}
.book-metrics{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#223248;
  border-top:1px solid #223248;
}
.book-metrics div{background:#0d1725;padding:6px 9px;display:flex;justify-content:space-between;align-items:baseline}
.book-metrics span{font:9px var(--asip-font, system-ui);color:#52657a}
.book-metrics b{font:11px var(--asip-font, system-ui);color:#b8c7d8}
#bookBid{color:#3dd29a}
#bookAsk{color:#f46c7f}
.tape-head{
  display:flex;justify-content:space-between;padding:7px 11px 4px;
  font:700 9px var(--asip-font, system-ui);letter-spacing:.1em;color:#52657a;
}
.tape-head span:last-child{color:#3dd29a}
.tape{flex:0 0 96px;overflow:hidden;padding:0 11px 6px}
.tape-row{display:grid;grid-template-columns:52px 1fr 45px;gap:4px;padding:2px 0;font:10px var(--asip-font, system-ui);border-bottom:1px solid #111c2a}
.tape-row .t{color:#52657a}
.tape-row .p{color:#b8c7d8}
.tape-row .s{text-align:right}
.tape-row.buy .s{color:#3dd29a}
.tape-row.sell .s{color:#f46c7f}

/* footer */
.terminal-footer{
  height:28px;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:0 12px;border-top:1px solid #223248;background:#0b1421;
  font:9px var(--asip-font, system-ui);letter-spacing:.06em;color:#52657a;
}
.terminal-footer > span:first-child{display:flex;align-items:center;gap:6px;color:#8fa3b8}
.terminal-footer b{color:#5eead4;font-weight:600}
.feed-dot{width:5px;height:5px;border-radius:50%;background:#3dd29a;box-shadow:0 0 8px #3dd29a;display:inline-block}
#terminalClock{color:#6f8298}

/* states */
.terminal-status.off + *{}
.book-row.flash-up{animation:flashUp .5s ease-out}
.book-row.flash-down{animation:flashDown .5s ease-out}
@keyframes flashUp{0%{background:rgba(61,210,154,.2)}100%{background:transparent}}
@keyframes flashDown{0%{background:rgba(244,108,127,.2)}100%{background:transparent}}

@media (max-width:1050px){
  .terminal-workspace{grid-template-columns:minmax(0,1fr) 300px;height:600px}
  .quote-stats{display:none}
}
@media (max-width:820px){
  .terminal-view{padding:8px}
  .terminal-header{height:auto;flex-wrap:wrap;padding:9px 10px;gap:8px}
  .terminal-controls{margin-left:0;flex:1;justify-content:flex-end}
  .terminal-status{width:100%;justify-content:flex-end}
  .terminal-workspace{grid-template-columns:1fr;height:auto}
  .chart-panel{height:440px;border-right:0;border-bottom:1px solid #223248}
  .book-panel{height:560px}
  .terminal-footer{height:auto;padding:8px 10px;flex-wrap:wrap;line-height:1.5}
  .quote-main span:nth-child(2){font-size:18px}
}
@media (max-width:520px){
  .terminal-brand{gap:5px}
  .terminal-title{font-size:10px}
  .terminal-controls{width:100%;justify-content:space-between}
  .terminal-controls select{max-width:140px}
  .chart-panel{height:380px}
  .book-panel{height:520px}
  .book-row{font-size:10px}
  .quote-stats{display:none}
}

/* ===== full-screen + responsive expansion ===== */
.terminal-view{max-width:none;width:100%;padding:16px clamp(12px,2vw,32px) 24px}
.terminal-shell{width:100%;display:flex;flex-direction:column}
.terminal-workspace{
  grid-template-columns:minmax(0,1fr) clamp(340px,24vw,390px);
  height:clamp(620px,calc(100dvh - 238px),1200px);
  min-height:620px;
}
.terminal-shell:fullscreen,
.terminal-shell.is-fullscreen{
  width:100vw;height:100vh;border-radius:0;border:0;
}
.terminal-shell.is-fullscreen{position:fixed;inset:0;z-index:100;background:#080e18}
.terminal-shell.is-fullscreen .terminal-workspace{flex:1;height:auto;min-height:0}
.terminal-shell.is-fullscreen .terminal-footer{flex:0 0 28px}
.terminal-shell:fullscreen .terminal-workspace,
.terminal-shell.is-fullscreen .terminal-workspace{
  flex:1;height:auto;min-height:0;
}
.terminal-shell:fullscreen .terminal-footer,
.terminal-shell.is-fullscreen .terminal-footer{flex:0 0 28px}

/* header buttons */
.terminal-icon-btn{
  width:30px;height:30px;border:1px solid #2a3b53;border-radius:5px;background:#0a1421;
  color:#8fa3b8;font-size:14px;line-height:1;cursor:pointer;
}
.terminal-icon-btn:hover{color:#5eead4;border-color:#5eead4}
.terminal-icon-btn.active{color:#081018;background:#5eead4;border-color:#5eead4}

/* chart controls */
.chart-actions{display:flex;align-items:center;gap:7px;margin-left:auto}
.indicator-wrap{position:relative}
.chart-action{
  background:#0a1421;border:1px solid #2a3b53;border-radius:4px;color:#8fa3b8;
  font:10px var(--asip-font, system-ui);letter-spacing:.04em;padding:5px 7px;cursor:pointer;white-space:nowrap;
}
.chart-action:hover{color:#dbe6f3;border-color:#3c526d}
.indicator-menu{
  position:absolute;right:0;top:28px;z-index:20;min-width:170px;
  background:#0e1a2a;border:1px solid #2a3b53;border-radius:6px;padding:8px;
  box-shadow:0 18px 50px rgba(0,0,0,.45);
}
.indicator-menu label{
  display:flex;align-items:center;gap:7px;padding:5px 4px;color:#b8c7d8;
  font:11px var(--asip-font, system-ui);cursor:pointer;
}
.indicator-menu input{accent-color:#5eead4}
.indicator-settings-btn{
  width:100%;margin-top:5px;padding:6px;background:#111f30;border:1px solid #2a3b53;border-radius:4px;
  color:#8fa3b8;font:10px var(--asip-font, system-ui);cursor:pointer;text-align:left;
}
.indicator-settings-btn:hover{color:#5eead4;border-color:#5eead4}
.indicator-modal{
  position:fixed;inset:0;z-index:300;background:rgba(4,8,14,.76);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;padding:20px;
}
.indicator-dialog{
  width:min(520px,100%);background:#0e1928;border:1px solid #2a3b53;border-radius:10px;
  box-shadow:0 30px 100px rgba(0,0,0,.6);padding:16px;
}
.indicator-dialog-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #223248;padding-bottom:10px;margin-bottom:12px}
.indicator-dialog-head b{font:700 11px var(--asip-font, system-ui);letter-spacing:.12em;color:#dbe6f3}
.indicator-dialog-head button{background:transparent;border:0;color:#8fa3b8;font-size:18px;cursor:pointer}
.indicator-form{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.indicator-form label{font:10px var(--asip-font, system-ui);color:#8fa3b8;display:flex;flex-direction:column;gap:4px}
.indicator-form input{background:#0a1421;border:1px solid #2a3b53;border-radius:4px;color:#dbe6f3;font:12px var(--asip-font, system-ui);padding:6px 7px;outline:none}
.indicator-form input:focus{border-color:#5eead4}
.indicator-dialog-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:14px}
.indicator-dialog-actions .btn{padding:7px 10px;font-size:11px}
.indicator-hint{font:7.5px var(--asip-font, system-ui);color:#52657a;line-height:1.5;margin:9px 0 0}
.zoom-group{display:flex;border:1px solid #2a3b53;border-radius:4px;overflow:hidden}
.zoom-group .chart-action{border:0;border-right:1px solid #2a3b53;border-radius:0;padding:5px 7px}
.zoom-group .chart-action:last-child{border-right:0}

/* drawing toolbar */
.drawing-toolbar{
  position:absolute;left:7px;top:48px;z-index:5;display:flex;flex-direction:column;gap:3px;
  padding:4px;background:rgba(10,17,28,.92);border:1px solid #223248;border-radius:6px;
  backdrop-filter:blur(6px);
}
.draw-tool{
  width:26px;height:25px;background:transparent;border:1px solid transparent;border-radius:4px;
  color:#7c8ca1;font:12px var(--asip-font, system-ui);cursor:pointer;line-height:1;
}
.draw-tool:hover{color:#dbe6f3;background:#152337}
.draw-tool.active{color:#5eead4;background:rgba(94,234,212,.1);border-color:rgba(94,234,212,.35)}
.draw-sep{height:1px;background:#223248;margin:2px 3px}
.draw-color{width:22px;height:12px;margin:1px 2px;border:1px solid transparent;border-radius:2px;cursor:pointer}
.draw-color[data-color="#5eead4"]{background:#5eead4}
.draw-color[data-color="#f5b942"]{background:#f5b942}
.draw-color[data-color="#f46c7f"]{background:#f46c7f}
.draw-color.active{border-color:#fff;box-shadow:0 0 8px rgba(255,255,255,.3)}

/* right panel tabs */
.panel-tabs{display:flex;height:38px;border-bottom:1px solid #1a283a;background:#0d1725;flex:0 0 38px}
.panel-tabs button{
  flex:1;background:transparent;border:0;border-bottom:2px solid transparent;
  color:#6f8298;font:700 10px var(--asip-font, system-ui);letter-spacing:.1em;cursor:pointer;
}
.panel-tabs button.active{color:#5eead4;border-bottom-color:#5eead4}
.book-view{display:flex;flex-direction:column;min-height:0;flex:1}
.analysis-view{display:flex;flex-direction:column;min-height:0;flex:1;overflow:auto}
.analysis-head{
  display:flex;justify-content:space-between;padding:9px 11px;border-bottom:1px solid #1a283a;
  font:700 10px var(--asip-font, system-ui);letter-spacing:.1em;color:#6f8298;
}
.analysis-head span:last-child{color:#52657a}
.analysis-content{padding:10px 11px;display:flex;flex-direction:column;gap:9px}
.analysis-badge{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:10px;border:1px solid #26384e;border-radius:6px;background:#0e1a2a;
}
.analysis-badge span{font:9px var(--asip-font, system-ui);letter-spacing:.1em;color:#6f8298}
.analysis-badge b{font:700 17px var(--asip-font, system-ui);color:#5eead4}
.analysis-badge small{font:10px var(--asip-font, system-ui);color:#8fa3b8}
.analysis-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.analysis-cell{background:#0e1a2a;border:1px solid #1d2b3d;border-radius:5px;padding:7px 8px}
.analysis-cell span{display:block;font:9px var(--asip-font, system-ui);letter-spacing:.06em;color:#52657a}
.analysis-cell b{display:block;font:12px var(--asip-font, system-ui);color:#dbe6f3;margin-top:3px}
.analysis-cell b.up{color:#3dd29a}
.analysis-cell b.down{color:#f46c7f}
.analysis-badge b.up{color:#3dd29a !important}
.analysis-badge b.down{color:#f46c7f !important}
.analysis-check.up span:first-child{color:#3dd29a}
.analysis-check.down span:first-child{color:#f46c7f}
.cluster-research{background:#0e1a2a;border:1px solid #1d2b3d;border-radius:6px;padding:7px 8px}
.cluster-research-head{display:flex;justify-content:space-between;font:9px var(--asip-font, system-ui);letter-spacing:.08em;color:#6f8298;margin-bottom:5px}
.cluster-research-row{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:4px;font:10px var(--asip-font, system-ui);color:#b8c7d8;padding:3px 0;border-bottom:1px solid #142030}
.cluster-research-row.head{color:#52657a;font-size:9px}
.cluster-research-row .buy{color:#3dd29a}
.cluster-research-row .sell{color:#f46c7f}
.cluster-research-row .up{color:#3dd29a;text-align:right}
.cluster-research-row .down{color:#f46c7f;text-align:right}
.cluster-research-row span:nth-child(n+2){text-align:right}
.analysis-iv b{font-size:11px}
.analysis-iv small{display:block;color:#6f8298;font:7.5px var(--asip-font, system-ui);margin-top:3px}
.iv-strikes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin-top:6px;border-top:1px solid #142030;padding-top:5px}
.iv-strikes span{color:#dbe6f3}
.iv-strikes i{font-style:normal;color:#5eead4;text-align:right}
.iv-strikes i:nth-child(3n){color:#f46c7f}
.analysis-checks{display:flex;flex-direction:column;gap:4px}
.analysis-check{display:flex;justify-content:space-between;gap:6px;padding:5px 0;border-bottom:1px solid #142030;font:10px var(--asip-font, system-ui)}
.analysis-check span:first-child{color:#8fa3b8}
.analysis-check span:last-child{color:#b8c7d8;text-align:right}
.analysis-check.ok span:first-child{color:#3dd29a}
.analysis-check.wait span:first-child{color:#f5b942}
.analysis-check.warn span:first-child{color:#f46c7f}
.analysis-note{font:7.5px var(--asip-font, system-ui);color:#52657a;line-height:1.55;margin:0}
.analysis-empty{color:#6f8298;font:11px var(--asip-font, system-ui);line-height:1.6;padding:16px 4px}

@media (max-width:820px){
  .terminal-workspace{grid-template-columns:1fr;height:auto}
  .chart-panel{height:480px}
  .book-panel{height:590px}
  .chart-actions{gap:4px}
  .chart-action{padding:4px 5px;font-size:9px}
  .drawing-toolbar{top:40px}
}


/* ============================================================
   TERMINAL READABILITY PASS
   Подписи — Segoe UI, цифры — Consolas. Кегль поднят,
   чтобы интерфейс читался без приближения.
   ============================================================ */
.terminal-shell{font-family:var(--asip-font, system-ui)}
.terminal-shell .terminal-title,.terminal-shell .terminal-brand em,.terminal-shell .terminal-status,
.terminal-shell .quote-stats,.terminal-shell .chart-pair span,.terminal-shell .chart-ohlc,
.terminal-shell .chart-legend,.terminal-shell .book-head,.terminal-shell .book-columns,
.terminal-shell .book-spread small,.terminal-shell .book-metrics span,.terminal-shell .tape-head,
.terminal-shell .terminal-footer,.terminal-shell .panel-tabs button,.terminal-shell .analysis-head,
.terminal-shell .analysis-badge span,.terminal-shell .analysis-badge small,
.terminal-shell .analysis-cell span,.terminal-shell .cluster-research-head,
.terminal-shell .analysis-iv small,.terminal-shell .analysis-note,.terminal-shell .analysis-empty,
.terminal-shell .indicator-menu label,.terminal-shell .indicator-settings-btn,
.terminal-shell .indicator-dialog-head b,.terminal-shell .indicator-form label,
.terminal-shell .indicator-hint,.terminal-shell .chart-tooltip{
  font-family:var(--asip-font, system-ui);
}
.terminal-shell .terminal-title{font-size:11px;letter-spacing:.12em}
.terminal-shell .terminal-brand em{font-size:11px;letter-spacing:.05em}
.terminal-shell .terminal-controls select{font-size:12px;font-family:var(--asip-font, system-ui);padding:7px 9px}
.terminal-shell .tf-group button{font-size:11px;font-family:var(--asip-font, system-ui);padding:8px 10px}
.terminal-shell .terminal-status{font-size:9.5px;letter-spacing:.06em}
.terminal-shell .quote-main b{font-size:13px}
.terminal-shell .quote-main span:nth-child(2){font-size:24px}
.terminal-shell .quote-main span:nth-child(3){font-size:11px}
.terminal-shell .quote-stats{font-size:9.5px;gap:18px;color:#8297ab}
.terminal-shell .quote-stats b{font-size:10.5px;color:#dbe6f3}
.terminal-shell .chart-pair b{font-size:12px}
.terminal-shell .chart-pair span{font-size:9.5px;padding:2px 5px}
.terminal-shell .chart-ohlc{font-size:9.5px;gap:12px}
.terminal-shell .chart-legend{font-size:8.5px;letter-spacing:.04em}
.terminal-shell .chart-tooltip{font-size:12px;line-height:1.65;padding:8px 10px}
.terminal-shell .chart-loading{font-size:12px;letter-spacing:.1em}
.terminal-shell .chart-footer{font-size:11px;letter-spacing:.03em;color:#6f8298}
.terminal-shell .book-head{font-size:9.5px;letter-spacing:.06em}
.terminal-shell .book-columns{font-size:8.5px;letter-spacing:.03em;color:#6f8298}
.terminal-shell .book-row{font-size:12px;min-height:19px;padding-top:2px;padding-bottom:2px}
.terminal-shell .book-row .total{color:#8297ab}
.terminal-shell .book-spread span{font-size:14px}
.terminal-shell .book-spread small{font-size:8.5px;letter-spacing:.06em}
.terminal-shell .book-metrics span{font-size:8.5px;color:#6f8298}
.terminal-shell .book-metrics b{font-size:10.5px}
.terminal-shell .tape-head{font-size:8.5px;letter-spacing:.06em;color:#6f8298}
.terminal-shell .tape-row{font-size:9.5px;grid-template-columns:56px 1fr 48px}
.terminal-shell .terminal-footer{font-size:8.5px;letter-spacing:.03em;color:#6f8298}
.terminal-shell .panel-tabs button{font-size:12px;letter-spacing:.06em}
.terminal-shell .analysis-head{font-size:9.5px;letter-spacing:.05em}
.terminal-shell .analysis-badge span{font-size:8.5px;letter-spacing:.05em}
.terminal-shell .analysis-badge b{font-size:19px}
.terminal-shell .analysis-badge small{font-size:9.5px}
.terminal-shell .analysis-cell span{font-size:8.5px;letter-spacing:.03em;color:#6f8298}
.terminal-shell .analysis-cell b{font-size:11px}
.terminal-shell .cluster-research-head{font-size:8.5px;letter-spacing:.04em}
.terminal-shell .cluster-research-row{font-size:9.5px}
.terminal-shell .cluster-research-row.head{font-size:8.5px}
.terminal-shell .analysis-check{font-size:9.5px;padding:6px 0}
.terminal-shell .analysis-note{font-size:11px;line-height:1.55;color:#6f8298}
.terminal-shell .analysis-empty{font-size:12px}
.terminal-shell .chart-action{font-size:11px;font-family:var(--asip-font, system-ui);padding:6px 8px}
.terminal-shell .indicator-menu label{font-size:12px;padding:6px 4px}
.terminal-shell .indicator-settings-btn{font-size:9.5px;padding:7px}
.terminal-shell .indicator-dialog-head b{font-size:10.5px}
.terminal-shell .indicator-form label{font-size:9.5px}
.terminal-shell .indicator-form input{font-size:11px;font-family:var(--asip-font, system-ui);padding:7px 8px}
.terminal-shell .indicator-hint{font-size:11px}
.terminal-shell .indicator-dialog-actions .btn{font-size:10.5px}
.terminal-shell .draw-tool{width:29px;height:28px;font-size:14px}
.terminal-shell .terminal-icon-btn{width:32px;height:32px;font-size:15px}
@media(max-width:820px){
  .terminal-shell .quote-main span:nth-child(2){font-size:20px}
  .terminal-shell .book-row{font-size:9.5px}
  .terminal-shell .chart-action{font-size:8.5px;padding:5px 6px}
  .terminal-shell .quote-stats{display:none}
}

/* ============================================================
   TERMINAL — крупный читаемый масштаб
   ============================================================ */
.terminal-shell .terminal-title{font-size:12px}
.terminal-shell .terminal-brand em{font-size:12px}
.terminal-shell .terminal-status{font-size:10.5px}
.terminal-shell .terminal-controls select{font-size:13px;padding:8px 10px}
.terminal-shell .tf-group button{font-size:12px;padding:8px 11px}
.terminal-shell .quote-main b{font-size:14px}
.terminal-shell .quote-main span:nth-child(2){font-size:27px}
.terminal-shell .quote-main span:nth-child(3){font-size:12px}
.terminal-shell .quote-stats{font-size:10.5px;gap:18px}
.terminal-shell .quote-stats b{font-size:11.5px}
.terminal-shell .chart-pair b{font-size:13px}
.terminal-shell .chart-pair span{font-size:10.5px}
.terminal-shell .chart-ohlc{font-size:10.5px;gap:12px}
.terminal-shell .chart-legend{font-size:9.5px}
.terminal-shell .chart-tooltip{font-size:11px}
.terminal-shell .chart-loading{font-size:11px}
.terminal-shell .chart-footer{font-size:9.5px;height:30px}
.terminal-shell .chart-toolbar{height:42px}
.terminal-shell .book-head{font-size:10.5px;height:42px}
.terminal-shell .book-columns{font-size:9.5px;padding:7px 11px}
.terminal-shell .book-row{font-size:12px;min-height:21px}
.terminal-shell .book-spread span{font-size:15px}
.terminal-shell .book-spread small{font-size:9.5px}
.terminal-shell .book-metrics span{font-size:9.5px}
.terminal-shell .book-metrics b{font-size:11.5px}
.terminal-shell .tape-head{font-size:9.5px}
.terminal-shell .tape-row{font-size:11px;grid-template-columns:60px 1fr 50px;padding:3px 0}
.terminal-shell .terminal-footer{font-size:9.5px;height:31px}
.terminal-shell .panel-tabs{height:42px;flex-basis:42px}
.terminal-shell .panel-tabs button{font-size:11px}
.terminal-shell .analysis-head{font-size:10.5px}
.terminal-shell .analysis-badge span{font-size:9.5px}
.terminal-shell .analysis-badge b{font-size:21px}
.terminal-shell .analysis-badge small{font-size:10.5px}
.terminal-shell .analysis-cell span{font-size:9.5px}
.terminal-shell .analysis-cell b{font-size:12px}
.terminal-shell .cluster-research-head{font-size:9.5px}
.terminal-shell .cluster-research-row{font-size:10.5px}
.terminal-shell .cluster-research-row.head{font-size:9.5px}
.terminal-shell .analysis-check{font-size:10.5px}
.terminal-shell .analysis-note{font-size:12px}
.terminal-shell .chart-action{font-size:12px;padding:7px 9px}
.terminal-shell .indicator-menu label{font-size:11px}
.terminal-shell .indicator-settings-btn{font-size:10.5px}
.terminal-shell .indicator-dialog-head b{font-size:11px}
.terminal-shell .indicator-form label{font-size:10.5px}
.terminal-shell .indicator-form input{font-size:12px}
.terminal-shell .indicator-hint{font-size:12px}
.terminal-shell .draw-tool{width:31px;height:30px;font-size:15px}
.terminal-shell .terminal-icon-btn{width:34px;height:34px;font-size:16px}
@media(max-width:820px){
  .terminal-shell .book-row{font-size:10.5px;min-height:19px}
  .terminal-shell .quote-main span:nth-child(2){font-size:21px}
  .terminal-shell .tape-row{font-size:12px}
}

/* Terminal full-width layout + header controls */
body:has(#view-terminal:not([hidden])) .app-main{padding:0!important}
#view-terminal{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
#view-terminal .terminal-shell{border-radius:0;border-left:0;border-right:0;width:100%;min-height:100dvh}
.terminal-header{flex-wrap:wrap!important;height:auto!important;min-height:54px;padding:7px 14px!important;row-gap:6px;overflow:visible!important}
.terminal-controls{flex-wrap:wrap!important;justify-content:flex-end;gap:7px!important;overflow:visible!important}
.terminal-controls select{flex:0 0 auto;max-width:160px}
.tf-group{flex:0 0 auto}
.tf-group button{padding:7px 9px!important;min-width:34px}
.terminal-shell:fullscreen,.terminal-shell.is-fullscreen{overflow:visible!important}
.terminal-shell:fullscreen .terminal-header,.terminal-shell.is-fullscreen .terminal-header{position:relative;z-index:50;overflow:visible!important}
.terminal-shell:fullscreen .terminal-controls,.terminal-shell.is-fullscreen .terminal-controls{position:relative;z-index:60;overflow:visible!important}
@media(max-width:820px){#view-terminal .terminal-shell{min-height:auto}.terminal-controls select{max-width:130px}}

#terminalExchange{width:112px!important;min-width:112px}
#bybitSymbol{width:142px!important;min-width:142px}
@media(max-width:820px){#terminalExchange{width:100px!important;min-width:100px}#bybitSymbol{width:120px!important;min-width:120px}}

/* force compact terminal header selects */
.terminal-header .terminal-controls{flex-direction:row!important;flex-wrap:wrap!important}
.terminal-header .terminal-controls select{width:112px!important;min-width:112px!important;max-width:112px!important;flex:0 0 112px!important;display:inline-block!important}
.terminal-header #bybitSymbol{width:142px!important;min-width:142px!important;max-width:142px!important;flex:0 0 142px!important}
@media(max-width:820px){.terminal-header .terminal-controls select{width:100px!important;min-width:100px!important;max-width:100px!important;flex:0 0 100px!important}.terminal-header #bybitSymbol{width:120px!important;min-width:120px!important;max-width:120px!important;flex:0 0 120px!important}}

/* compact custom select wrappers created by controls.js */
.terminal-header .terminal-controls .asip-select-control{width:112px!important;min-width:112px!important;max-width:112px!important;flex:0 0 112px!important}
.terminal-header .terminal-controls .asip-select-control:has(> #bybitSymbol){width:142px!important;min-width:142px!important;max-width:142px!important;flex:0 0 142px!important}
.terminal-header .asip-select-button{height:30px!important;min-height:30px!important;padding:4px 26px 4px 8px!important;font:700 11px var(--asip-font, system-ui)!important;border-radius:5px!important;border:1px solid #2a3b53!important;background:#0a1421!important;color:#dbe6f3!important;box-shadow:none!important}
.terminal-header .asip-select-button i{position:absolute;right:9px;top:11px}
@media(max-width:820px){.terminal-header .terminal-controls .asip-select-control{width:100px!important;min-width:100px!important;max-width:100px!important;flex:0 0 100px!important}.terminal-header .terminal-controls .asip-select-control:has(> #bybitSymbol){width:120px!important;min-width:120px!important;max-width:120px!important;flex:0 0 120px!important}}

/* Symbol search across venues */
.terminal-search{position:fixed;inset:0;z-index:500;background:rgba(4,8,14,.82);display:flex;align-items:center;justify-content:center;padding:24px;font-family:var(--asip-font, system-ui)}
.terminal-search[hidden]{display:none!important}
.terminal-search-card{width:min(920px,96vw);max-height:80vh;display:flex;flex-direction:column;background:#0b1522;border:1px solid #2a3b53;border-radius:12px;box-shadow:0 30px 90px rgba(0,0,0,.55);overflow:hidden}
.terminal-search-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #223248}
.terminal-search-head h3{margin:2px 0 0;font:20px var(--asip-font, system-ui);color:#e8f0f8}
.terminal-search-body{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:320px;overflow:hidden}
.terminal-search-venues{border-right:1px solid #223248;padding:10px;background:#0a111c;display:flex;flex-direction:column;gap:6px}
.terminal-search-venues button{display:flex;flex-direction:column;gap:2px;text-align:left;padding:10px;border:1px solid transparent;border-radius:8px;background:transparent;color:#b9c9d8;cursor:pointer}
.terminal-search-venues button.active{border-color:rgba(94,234,212,.35);background:rgba(94,234,212,.08)}
.terminal-search-venues button b{font-size:12px;color:#dbe6f3}
.venue-conn{font:11px var(--asip-font, system-ui);color:#6f8298}
.terminal-search-results-wrap{display:flex;flex-direction:column;min-height:0;padding:12px}
.terminal-search-results{overflow:auto;margin-top:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:52vh}
.terminal-search-result{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border:1px solid #1c2b3d;border-radius:7px;background:#0a1421;color:#dbe6f3;cursor:pointer;text-align:left}
.terminal-search-result:hover{border-color:#5eead4;background:#0e1c2b}
.terminal-search-result b{font:700 11px var(--asip-font, system-ui)}
.terminal-search-result span{font:11px var(--asip-font, system-ui);color:#6f8298}
@media(max-width:700px){.terminal-search-body{grid-template-columns:1fr}.terminal-search-venues{flex-direction:row;border-right:0;border-bottom:1px solid #223248}.terminal-search-results{grid-template-columns:1fr}.terminal-search-venues button{flex:1}}

/* Current ticker chip instead of selects */
.terminal-symbol-chip{display:flex;align-items:center;gap:8px;height:30px;padding:0 11px;border:1px solid #2a3b53;border-radius:5px;background:#0a1421;color:#dbe6f3;cursor:pointer;font-family:var(--asip-font, system-ui)}
.terminal-symbol-chip b{font:700 12px var(--asip-font, system-ui);letter-spacing:.04em}
.terminal-symbol-chip span{font:10px var(--asip-font, system-ui);color:#6f8298;text-transform:uppercase;letter-spacing:.06em}
.terminal-symbol-chip:hover{border-color:#5eead4;color:#a8f5e6}
@media(max-width:820px){.terminal-symbol-chip{max-width:150px}.terminal-symbol-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* indicator panes */
.indicator-panes{flex:0 1 auto;max-height:48%;overflow:auto;background:#0a111c;border-top:1px solid #1a283a}
.indicator-panes:empty{display:none}
.indicator-pane{position:relative;display:flex;flex-direction:column;min-height:60px;height:110px;border-bottom:1px solid #172437;background:#080f19}
.indicator-pane.nested{margin-left:18px;border-left:2px solid #2a3b53}
.indicator-pane.drag-over{outline:1px dashed #5eead4;outline-offset:-2px}
.pane-head{height:22px;display:flex;align-items:center;gap:6px;padding:0 7px;background:#0d1725;border-bottom:1px solid #172437;cursor:grab;user-select:none;flex:0 0 22px}
.pane-head:active{cursor:grabbing}
.pane-head b{font:700 11px var(--asip-font, system-ui);letter-spacing:.06em;color:#b8c7d8}
.pane-head .pane-drag{color:#52657a;font:11px var(--asip-font, system-ui)}
.pane-head .pane-val{margin-left:auto;font:11px var(--asip-font, system-ui);color:#5eead4}
.pane-head button{background:transparent;border:0;color:#7c8ca1;font:12px var(--asip-font, system-ui);cursor:pointer;padding:2px 4px;border-radius:3px}
.pane-head button:hover{color:#5eead4;background:#152337}
.pane-canvas{flex:1;width:100%;min-height:0;display:block}
.pane-resize{position:absolute;left:0;right:0;bottom:-3px;height:6px;cursor:ns-resize;z-index:2}
.pane-resize:hover{background:rgba(94,234,212,.2)}
.pane-library-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pane-library-grid button{display:flex;flex-direction:column;gap:3px;text-align:left;padding:10px;border:1px solid #2a3b53;border-radius:6px;background:#0a1421;color:#dbe6f3;cursor:pointer}
.pane-library-grid button:hover{border-color:#5eead4;background:#0e1c2b}
.pane-library-grid b{font:700 12px var(--asip-font, system-ui);color:#5eead4}
.pane-library-grid span{font:10px var(--asip-font, system-ui);color:#6f8298}
.measure-box{position:absolute;z-index:6;display:none;pointer-events:none;background:rgba(8,16,27,.96);border:1px solid #5eead4;border-radius:5px;padding:7px 9px;font:11px var(--asip-font, system-ui);color:#dbe6f3;line-height:1.55;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.measure-box b{color:#5eead4}
