* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #131722; color: #d1d4dc; font: 13px/1.3 system-ui, Segoe UI, sans-serif; }
body { display: flex; flex-direction: column; }
button { font: inherit; color: #d1d4dc; background: #2a2e39; border: 1px solid #363a45; border-radius: 4px; padding: 6px 4px; cursor: pointer; }
button:hover:not(:disabled) { background: #363a45; }
button:disabled { opacity: .35; cursor: default; }

#top { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid #2a2e39; white-space: nowrap; overflow: hidden; }
#sym { width: 130px; background: #1e222d; color: #fff; border: 1px solid #363a45; border-radius: 4px; padding: 5px 7px; font-weight: 600; }
#favs { display: flex; gap: 4px; }
#favs button { padding: 4px 9px; font-weight: 600; }
#favs button.on { background: #2962ff; border-color: #2962ff; color: #fff; }
#tfs { display: flex; gap: 2px; }
#tfs button { padding: 4px 8px; background: transparent; border-color: transparent; }
#tfs button.on { background: #2962ff; border-color: #2962ff; color: #fff; }
#quote { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
#quote .b { color: #ef5350; } #quote .a { color: #26a69a; }
.grow { flex: 1; }
#acc { font-variant-numeric: tabular-nums; color: #9598a1; white-space: nowrap; }
#acc b { color: #d1d4dc; font-weight: 600; }
#badge { padding: 3px 8px; border-radius: 4px; font-weight: 700; }
#badge.paper { background: #2962ff33; color: #5b8cff; }
#badge.live { background: #ef535033; color: #ef5350; }
#badge.warn { background: #f0b90b33; color: #f0b90b; }

#main { flex: 1; display: flex; min-height: 0; }
#left { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#chartwrap { flex: 1; position: relative; min-width: 0; min-height: 0; }
#bottom { border-top: 1px solid #2a2e39; display: flex; flex-direction: column; }
#btabs { display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: #181c27; }
#btabs button { background: transparent; border-color: transparent; padding: 4px 10px; }
#btabs button.on { background: #2a2e39; color: #fff; }
#btabs button span { color: #787b86; margin-left: 3px; font-variant-numeric: tabular-nums; }
#btotal { font-variant-numeric: tabular-nums; margin-right: 8px; }
#bbody { height: 190px; overflow-y: auto; display: none; }
#bottom.open #bbody { display: block; }
#bbody table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; display: none; }
#bbody table.show { display: table; }
#bbody th { position: sticky; top: 0; background: #131722; color: #787b86; font-weight: 500; text-align: right; padding: 4px 8px; border-bottom: 1px solid #2a2e39; }
#bbody td { text-align: right; padding: 3px 8px; border-bottom: 1px solid #1e222d; white-space: nowrap; }
#bbody th:first-child, #bbody td:first-child { text-align: left; }
#bbody tr.row { cursor: pointer; }
#bbody tr.row:hover td { background: #1e222d; }
#bbody tr.cur td:first-child { color: #5b8cff; font-weight: 600; }
#bbody td.b { color: #26a69a; } #bbody td.s { color: #ef5350; }
#bbody td .x { padding: 1px 8px; background: #2a2e39; border-color: #363a45; }
#bbody td .x:hover:not(:disabled) { background: #ef5350; border-color: #ef5350; color: #fff; }
#bempty { color: #787b86; padding: 14px; text-align: center; }
#chart { position: absolute; inset: 0; }
#chartwrap.arming #chart { cursor: crosshair; }
#overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
#hint { position: absolute; z-index: 6; top: 8px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 4px; background: #f0b90b; color: #000; font-weight: 600; display: none; pointer-events: none; }

.lbl { position: absolute; display: flex; align-items: center; gap: 6px; height: 19px; padding: 0 2px 0 7px; border-radius: 3px;
       font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; pointer-events: auto; cursor: ns-resize; user-select: none;
       font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px #0008; }
.lbl.pos { cursor: default; }
.lbl .x { border: 0; background: #0003; color: #fff; padding: 0 5px; height: 15px; line-height: 15px; border-radius: 2px; font-size: 13px; }
.lbl .x:hover { background: #0007; }
.lbl.drag { outline: 2px solid #fff; }
.entry { position: absolute; width: 0; height: 0; pointer-events: auto; cursor: help; border-left: 6px solid transparent; border-right: 6px solid transparent; }
.entry.eb { border-bottom: 9px solid #26a69a; filter: drop-shadow(0 0 1px #000); }
.entry.es { border-top: 9px solid #ef5350; filter: drop-shadow(0 0 1px #000); }
.entry[data-n]::after { content: attr(data-n); position: absolute; left: 8px; top: -8px; font-size: 10px; font-weight: 700; color: #d1d4dc; text-shadow: 0 0 2px #000; }

#panel { width: 236px; border-left: 1px solid #2a2e39; padding: 8px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.ttl { color: #787b86; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
#lots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
#lots button { padding: 5px 0; font-variant-numeric: tabular-nums; }
#lotin { width: 100%; background: #1e222d; color: #fff; border: 1px solid #363a45; border-radius: 4px; padding: 5px 7px; font: inherit; }
#lotin.on { border-color: #2962ff; box-shadow: 0 0 0 1px #2962ff; }
#lots button.on { background: #2962ff; border-color: #2962ff; color: #fff; }
.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }
#splitinfo { color: #787b86; margin-left: auto; }
.row2, .row3 { display: grid; gap: 4px; }
.row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; }
.buy, .sell { padding: 11px 0; font-size: 15px; font-weight: 700; color: #fff; border: 0; }
.buy { background: #26a69a; } .buy:hover:not(:disabled) { background: #2bbbad; }
.sell { background: #ef5350; } .sell:hover:not(:disabled) { background: #f26b68; }
.arm { font-weight: 700; }
.arm.on { background: #f0b90b; border-color: #f0b90b; color: #000; }
#summary { font-variant-numeric: tabular-nums; background: #1e222d; border-radius: 4px; padding: 6px 8px; display: grid; gap: 3px; }
#summary .r { display: flex; justify-content: space-between; }
.pl { color: #26a69a; } .mi { color: #ef5350; }
#log { font-size: 11px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
#log div { padding: 3px 5px; border-radius: 3px; background: #1e222d; border-left: 3px solid #26a69a; word-break: break-word; }
#log div.err { border-left-color: #ef5350; }
#ruler { position: absolute; display: none; pointer-events: none; }
#ruler.up { background: #2962ff22; border: 1px solid #2962ff; }
#ruler.dn { background: #ef535022; border: 1px solid #ef5350; }
#rulerinfo { position: absolute; display: none; pointer-events: none; padding: 4px 8px; border-radius: 4px; color: #fff;
             font-size: 12px; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
#rulerinfo.up { background: #2962ff; } #rulerinfo.dn { background: #ef5350; }
.keys { color: #787b86; font-size: 11px; line-height: 1.6; }
.keys b { display: inline-block; min-width: 16px; padding: 0 3px; text-align: center; border: 1px solid #363a45; border-radius: 3px; color: #d1d4dc; font-weight: 600; }
#draw { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; overflow: hidden; }
#draw .hit { stroke: transparent; stroke-width: 10; fill: none; pointer-events: stroke; cursor: move; }
#draw rect.body { pointer-events: all; cursor: move; }
#draw .h { fill: #131722; stroke: #fff; stroke-width: 1.5; pointer-events: all; cursor: grab; }
#draw .del circle { fill: #ef5350; pointer-events: all; cursor: pointer; }
#draw .del text { fill: #fff; font-size: 13px; font-weight: 700; pointer-events: all; cursor: pointer; }
#draw text { user-select: none; pointer-events: none; }
#draw.passive * { pointer-events: none !important; }
#drawbar { position: absolute; left: 4px; top: 30px; z-index: 7; display: flex; flex-direction: column; gap: 4px; }
#drawbar button { width: 38px; height: 36px; padding: 0; font-size: 21px; line-height: 1; background: #1e222dd9; }
#drawbar button.on { background: #2962ff; border-color: #2962ff; color: #fff; }
#drawbar #drawclear { margin-top: 8px; font-size: 17px; }
#draw rect.band { pointer-events: none; }
.exitm { position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 2px solid; background: #131722; pointer-events: auto; cursor: help; }
.exitm.pl { border-color: #26a69a; } .exitm.mi { border-color: #ef5350; }
.exitm[data-n]::after { content: attr(data-n); position: absolute; left: 9px; top: -10px; font-size: 10px; font-weight: 700; color: #d1d4dc; text-shadow: 0 0 2px #000; }
#tradelines { position: absolute; left: 0; top: 0; pointer-events: none; }
#tradelines line { stroke-width: 1; stroke-dasharray: 3 3; }
#tradelines line.pl { stroke: #26a69a; } #tradelines line.mi { stroke: #ef5350; }
#sessions { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; overflow: hidden; }
#sessions rect { stroke-width: 1; }
.sesshead { display: flex; align-items: center; justify-content: space-between; }
#sessgear { padding: 1px 6px; background: transparent; border-color: transparent; font-size: 14px; }
#sesscfg { display: grid; gap: 4px; padding: 6px; background: #1e222d; border-radius: 4px; }
#sesscfg[hidden] { display: none; }
.sessrow { display: flex; align-items: center; gap: 3px; color: #787b86; }
.sessrow input[type=text] { flex: 1; min-width: 0; width: 68px; background: #131722; color: #fff; border: 1px solid #363a45; border-radius: 3px; padding: 2px 3px; font: 600 11px system-ui; }
.sessrow input[type=color] { width: 22px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; }
.sessrow input[type=time] { width: 41px; background: #131722; color: #d1d4dc; border: 1px solid #363a45; border-radius: 3px; padding: 1px 2px; font: 11px system-ui; color-scheme: dark; }
#sessreset { padding: 3px; font-size: 11px; }
.sessrow input[type=time]::-webkit-calendar-picker-indicator { display: none; }
#quote .lot { color: #9598a1; }
#noagent { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: center; align-items: center;
           background: #131722f2; color: #d1d4dc; font-size: 15px; line-height: 1.7; text-align: left; padding: 20px; }
#noagent b { color: #fff; } #noagent span { color: #787b86; font-size: 13px; }
#noagent a { color: #5b8cff; }
.help { max-width: 640px; line-height: 1.55; font-size: 14px; }
.help h3 { margin: 0 0 6px; color: #fff; font-size: 17px; }
.help .hsec { margin-top: 12px; color: #fff; font-weight: 700; }
.help ol { margin: 4px 0; padding-left: 22px; }
.help li { margin: 3px 0; }
.help small { color: #9598a1; font-size: 12px; }
.help a { color: #5b8cff; }
.help .wait { color: #787b86; font-size: 13px; margin-top: 14px; }
#badge.noea { cursor: help; }
#eapop { position: fixed; top: 40px; right: 10px; z-index: 50; display: none; padding: 12px 16px; background: #1e222d;
         border: 1px solid #363a45; border-radius: 6px; box-shadow: 0 6px 24px #000a; color: #d1d4dc; font-size: 13px; }
#eapop.on { display: block; }
#eapop p { margin: 0 0 4px; }

#favstar { padding: 2px 6px; font-size: 17px; line-height: 1; background: transparent; border-color: transparent; color: #787b86; }
#favstar.on { color: #f0b90b; }
#favstar:disabled { opacity: 1; cursor: default; }

/* ---- несколько графиков ---- */
html.embed #panel, html.embed #bottom, html.embed #acc, html.embed #badge, html.embed #layouts, html.embed #toasts { display: none !important; }
html.embed #top { padding: 3px 6px; gap: 6px; }
#grid { flex: 1; display: grid; gap: 3px; background: #2a2e39; min-height: 0; }
#grid > * { position: relative; min-width: 0; min-height: 0; background: #131722; }
#grid.l1 { grid-template: 1fr / 1fr; }
#grid.l2h { grid-template: 1fr / 1fr 1fr; }
#grid.l2v { grid-template: 1fr 1fr / 1fr; }
#grid.l3 { grid-template: 1fr 1fr / 3fr 2fr; }
#grid.l3 > #chartwrap { grid-row: 1 / span 2; }
#grid.l4 { grid-template: 1fr 1fr / 1fr 1fr; }
#grid iframe.pane { width: 100%; height: 100%; border: 0; display: block; }
#grid.multi > .active { outline: 2px solid #2962ff; outline-offset: -2px; z-index: 1; }
#layouts { display: flex; gap: 2px; }
#layouts button { padding: 3px 5px; background: transparent; border-color: transparent; line-height: 0; }
#layouts button.on { background: #2962ff; border-color: #2962ff; }
#layouts svg { width: 18px; height: 14px; }
#layouts rect { fill: none; stroke: #d1d4dc; stroke-width: 1.4; }
#activeinfo { background: #1e222d; border-radius: 4px; padding: 6px 8px; font-weight: 700; font-size: 15px; color: #fff;
              display: flex; align-items: baseline; gap: 6px; }
#activeinfo small { color: #787b86; font-weight: 400; font-size: 12px; }
html.embed #drawbar { top: 4px; gap: 2px; }
html.embed #drawbar button { width: 28px; height: 26px; font-size: 15px; }
html.embed #drawbar #drawclear { margin-top: 4px; font-size: 13px; }

/* ---- риск, звуки, алерты, индикаторы, журнал ---- */
#riskbox { display: grid; gap: 4px; }
.riskrow { display: grid; grid-template-columns: auto 1fr auto; gap: 4px; }
.riskrow button { padding: 4px 8px; }
#riskval { min-width: 0; background: #1e222d; color: #fff; border: 1px solid #363a45; border-radius: 4px; padding: 4px 6px; font: inherit; }
#riskunit { width: 30px; font-weight: 700; }
#toasts { position: fixed; right: 250px; bottom: 40px; z-index: 60; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; background: #1e222d; border: 1px solid #363a45; border-left: 4px solid #26a69a;
  border-radius: 5px; padding: 8px 12px; box-shadow: 0 4px 16px #000a; max-width: 380px; font-variant-numeric: tabular-nums; }
.toast.ts { border-left-color: #ef5350; } .toast.ta { border-left-color: #f0b90b; }
#draw .bell circle { fill: #2a2e39; stroke: #f0b90b; pointer-events: all; cursor: pointer; }
#draw .bell.on circle { fill: #f0b90b; }
#draw .bell text { font-size: 10px; pointer-events: all; cursor: pointer; }
#cdown { position: absolute; z-index: 6; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: #d1d4dc;
  background: #2a2e39; border-radius: 2px; pointer-events: none; padding: 1px 0; }
#indbox { display: grid; gap: 5px; }
#indcfg { display: grid; gap: 4px; padding: 6px; background: #1e222d; border-radius: 4px; }
#indcfg[hidden] { display: none; }
.indrow { display: flex; align-items: center; gap: 6px; }
.indrow .chk { flex: 1; }
.indrow input[type=number] { width: 52px; background: #131722; color: #d1d4dc; border: 1px solid #363a45; border-radius: 3px; padding: 2px 4px; font: inherit; }
.indrow input[type=color] { width: 22px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; }
#jbar { display: none; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #2a2e39; position: sticky; top: 0; background: #131722; z-index: 2; }
#jbar.show { display: flex; }
#jbar select, #jbar input { background: #1e222d; color: #d1d4dc; border: 1px solid #363a45; border-radius: 4px; padding: 3px 6px; font: inherit; }
#jbar input { width: 230px; }
#jinfo { color: #787b86; }
#tmine td.tags { text-align: left; cursor: pointer; white-space: normal; }
.tag { display: inline-block; background: #2962ff33; color: #8fb0ff; border-radius: 3px; padding: 0 5px; margin: 1px 3px 1px 0; }
.addtag { color: #787b86; }
input.tagedit { width: 100%; background: #131722; color: #fff; border: 1px solid #2962ff; border-radius: 3px; padding: 2px 5px; font: inherit; }
.openpos { color: #f0b90b; }
#tstat { display: none; padding: 8px; }
#tstat.show { display: block; }
#tstat .cards { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#tstat .card { background: #1e222d; border-radius: 4px; padding: 6px 10px; min-width: 110px; display: grid; gap: 2px; }
#tstat .card small { color: #787b86; }
#tstat .card b { font-size: 15px; font-variant-numeric: tabular-nums; }
#tstat .stbl { margin-bottom: 10px; }
#tstat .stt { color: #9598a1; font-weight: 600; margin-bottom: 3px; }
#tstat table { display: table !important; width: auto; min-width: 60%; }
/* BUY/SELL — подальше от соседних кнопок, чтобы не нажать случайно */
#tradebtns { margin: 10px 0; padding: 10px 0; border-top: 1px solid #2a2e39; border-bottom: 1px solid #2a2e39; gap: 10px; }
#btabs { cursor: pointer; }
#bgrip { height: 8px; margin-top: -4px; cursor: ns-resize; background: transparent; }
#bgrip:hover { background: #2962ff66; }
.parts { color: #787b86; font-size: 11px; }
#jbar .chk { white-space: nowrap; }
#helpbtn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #434651; background: none; color: #b2b5be; font-weight: 700; cursor: pointer; margin-left: 6px; }
#helpbtn:hover { color: #fff; border-color: #5b8cff; }
#helpdlg { position: fixed; inset: 0; z-index: 200; background: #000a; display: flex; justify-content: center; align-items: flex-start; overflow: auto; padding: 30px 10px; }
#helpdlg .hbox { position: relative; max-width: 760px; background: #1e222d; border: 1px solid #2a2e39; border-radius: 8px; padding: 18px 26px; color: #d1d4dc; font-size: 14px; line-height: 1.5; }
#helpdlg h2 { margin: 0 0 6px; font-size: 20px; color: #fff; } #helpdlg h3 { margin: 18px 0 6px; color: #fff; font-size: 16px; }
#helpdlg b { color: #fff; } #helpdlg a { color: #5b8cff; } #helpdlg code { background: #2a2e39; padding: 1px 4px; border-radius: 3px; }
#helpdlg ul, #helpdlg ol { margin: 4px 0; padding-left: 22px; } #helpdlg li { margin: 3px 0; } #helpdlg p { margin: 6px 0; }
#helpdlg table { border-collapse: collapse; } #helpdlg td { border: 1px solid #2a2e39; padding: 4px 10px; vertical-align: top; }
#helpdlg td:first-child { white-space: nowrap; color: #fff; }
#helpdlg .hclose { position: sticky; top: 0; float: right; margin-right: -14px; background: none; border: none; color: #b2b5be; font-size: 24px; cursor: pointer; }
.guidebtn { background: #2962ff; color: #fff; border: none; border-radius: 4px; padding: 7px 14px; font-size: 14px; cursor: pointer; }
html.embed #helpbtn { display: none !important; }
.help details { margin-top: 4px; } .help summary { cursor: pointer; color: #5b8cff; }
#bbody .gt { color: #5b8cff; cursor: pointer; user-select: none; } #bbody .gt:hover { color: #fff; }
#bbody tr.grp td { font-weight: 600; }
#bbody tr.sub td { background: #161a25; color: #9598a1; font-size: 12px; }
#bbody tr.sub td:first-child { padding-left: 22px; }
#gotoend { position: absolute; z-index: 6; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #434651; background: #1e222dee;
           color: #d1d4dc; font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .15s; }
#gotoend.on { opacity: 1; pointer-events: auto; } #gotoend:hover { background: #2962ff; border-color: #2962ff; color: #fff; }

#tstat .eq { margin-bottom: 10px; }
#tstat .eqhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
#tstat .eqhead .stt { margin: 0; }
#tstat .eqper, #tstat .eqsyms { display: flex; gap: 3px; flex-wrap: wrap; }
#tstat .eqper button, #tstat .eqchip { padding: 2px 8px; background: #1e222d; border: 1px solid #363a45; color: #b2b5be; border-radius: 4px; cursor: pointer; font: inherit; }
#tstat .eqper button.on, #tstat .eqchip.on { background: #2962ff; border-color: #2962ff; color: #fff; }
#tstat .eqsum { color: #9598a1; margin-bottom: 2px; }
#tstat .eqleg { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
#tstat .eqleg i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; }
#tstat .eqwrap { position: relative; }
#tstat .eqempty { color: #787b86; padding: 10px 0; }
#eqsvg { display: block; background: #161a25; border-radius: 4px; }
#eqsvg path { fill: none; stroke-width: 1.8; }
#eqsvg line.z { stroke: #434651; stroke-dasharray: 3 3; }
#eqsvg #eqcur { stroke: #787b86; }
#eqsvg text { fill: #787b86; font-size: 11px; }
#eqtip { position: absolute; top: 6px; display: none; pointer-events: none; background: #1e222df2; border: 1px solid #363a45; border-radius: 4px; padding: 4px 8px; white-space: nowrap; font-size: 12px; }

.lbl .pnl { background: #131722; color: #26a69a; padding: 0 5px; height: 15px; line-height: 15px; border-radius: 2px; font-weight: 700; }
.lbl .pnl.neg { color: #ef5350; }

.row3:has(#m-sltp) { grid-template-columns: 1fr 1fr; }
.row3 button[hidden] { display: none; }

/* BUY / SELL: заявка идёт / исполнено / ошибка */
.buy.busy, .sell.busy { opacity: .6; }
.buy.done, .sell.done { box-shadow: inset 0 0 0 3px #fff; }
.buy.fail, .sell.fail { background: #5d606b !important; }

/* вход на агент на сервере: почта + пароль + Google Authenticator */
#tokdlg { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: center; background: #131722f2; padding: 20px; }
#tokdlg form { max-width: 380px; width: 100%; }
#tokdlg input { width: 100%; padding: 10px; font-size: 15px; background: #1e222d; color: #fff; border: 1px solid #363a45; border-radius: 4px; margin-bottom: 8px; }
#tokdlg .aerr { color: #ef5350; min-height: 1em; }
#tokdlg a.guidebtn { display: inline-block; text-decoration: none; }
#tokdlg .totpkey { font-size: 16px; letter-spacing: 1px; word-break: break-all; }
#tokdlg .qr svg { background: #fff; border-radius: 6px; max-width: 200px; height: auto; }
#agentsel { display: flex; gap: 4px; }
#agentsel select { flex: 1; min-width: 0; background: #1e222d; color: #d1d4dc; border: 1px solid #363a45; border-radius: 4px; padding: 4px; font: inherit; }
#agentsel button { margin-left: 4px; padding: 3px 7px; }
.guidebtn.alt { background: #2a2e39; margin-left: 6px; }
#tokdlg .guidebtn.alt { margin-left: 0; }

#noagent .conn h3 { font-weight: 500; color: #b2b5be; }
#noagent .conn h3::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
  border: 2px solid #5b8cff; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#panel > * { flex-shrink: 0; }   /* панель прокручивается, а не сжимает блоки */
#panel #log { min-height: 70px; max-height: 180px; overflow-y: auto; flex: none; }

/* свой объём: узкое поле в лотах + сумма выбранного объёма */
#lotrow { display: flex; align-items: center; gap: 8px; }
#lotrow #lotin { width: 78px; flex: none; }
#lotusd { color: #9598a1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
