/* Latest trading-dashboard refinements */
.topbar{height:76px}
.asset-tabs{gap:6px;align-items:center;overflow-x:auto;scrollbar-width:none}
.asset-tabs::-webkit-scrollbar{display:none}
.asset-tab{height:26px;flex:0 0 auto;padding:0 9px;border:1px solid var(--line);border-radius:5px;background:#080d12;color:var(--muted);font:10px var(--mono)}
.asset-tab:hover{border-color:var(--line);background:#080d12;color:var(--muted)}
.asset-tab.active,.asset-tab.active:hover{border-color:var(--green);background:#080d12;color:var(--green)}
.asset-tab.active:after{display:none}
.chart-topline{height:44px;margin-top:10px;border-bottom:0}
.timeframes button{font-size:10px}
.timeframes{padding-right:20px;padding-left:10px}
.timeframes .chart-reset{display:grid;width:28px;height:28px;margin-left:auto;padding:0;place-items:center;border:1px solid var(--line);border-radius:5px;background:#101720;color:var(--muted)}
.timeframes .chart-reset:hover{border-color:var(--line-bright);background:#101720;color:var(--text)}
.timeframes .chart-reset:focus-visible{outline:1px solid var(--green);outline-offset:1px}
.chart-reset svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.symbol-row{height:52px;padding-top:0;padding-bottom:0}
.symbol-row>div{margin-right:0}
.symbol-row #lastPrice{display:inline-block;min-width:0;font-size:18px;text-align:right}
.avatar-legend{position:relative;z-index:50;margin-left:auto!important}
.avatar-legend-trigger{padding:8px 0;border:0;outline:0;background:transparent;color:#596571;font:10px var(--mono);white-space:nowrap;cursor:help}
.symbol-row .avatar-legend-trigger span{border-bottom:1px dashed currentColor;color:inherit;font:10px/14px var(--mono)}
.avatar-legend-trigger:hover,.avatar-legend-trigger:focus-visible{color:#718091}
.avatar-legend-popover{position:absolute;z-index:1000;top:calc(100% + 5px);right:0;display:grid;width:142px;grid-template-columns:14px minmax(0,1fr);align-items:center;gap:8px 9px;padding:11px 12px;border:1px solid #334252;border-radius:7px;background:#101720;box-shadow:0 12px 30px #000a;color:var(--muted);font:10px/1.2 var(--mono);visibility:hidden;opacity:0;pointer-events:none;transition:opacity .12s ease}
.avatar-legend:hover .avatar-legend-popover,.avatar-legend:focus-within .avatar-legend-popover{visibility:visible;opacity:1}
.avatar-legend-popover .legend-dot{display:block;width:6px;height:6px;justify-self:center;border-radius:50%}
.avatar-legend-popover .legend-dot.add-long{background:#38d49f}
.avatar-legend-popover .legend-dot.add-short{background:#ff6178}
.avatar-legend-popover .legend-dot.reduce{background:#f5a524}
.avatar-legend-popover .legend-dot.closed{background:#d8dee7}
.avatar-legend-popover b{justify-self:center;color:var(--text);font:500 10px var(--mono)}
.symbol-row .avatar-legend-popover span{color:var(--muted);font:10px/1.2 var(--mono)}
.chart-wrap{height:calc(100vh - 288px)}
.check{display:grid;place-items:center}
.check span{inset:0;display:grid;place-items:center}
.check input:checked+span:after{position:static;line-height:1;font-size:10px}
.chart-panel .chart-wrap{overflow:hidden;isolation:isolate;background:#0c1118}
.volume-resizer{position:absolute;z-index:4;left:0;right:0;height:12px;transform:translateY(-50%);cursor:row-resize;touch-action:none}
.volume-resizer::after{content:"";position:absolute;top:5px;left:0;right:0;border-top:1px solid #334252;transition:border-color .15s ease}
.volume-resizer:hover::after,.resizing-volume .volume-resizer::after{border-color:#64748b}
.trade-markers{z-index:999!important;top:0;right:80px;bottom:30px;left:0;overflow:hidden;contain:paint}
.trade-marker{z-index:auto;display:flex;flex-direction:column;align-items:center;transform:none;pointer-events:auto}
.trade-marker:hover .marker-visual{z-index:2147483647}
.trade-marker:hover .marker-visual img{z-index:2147483646}
.trade-marker:hover .marker-visual b{z-index:2147483647}
.marker-visual{position:relative;z-index:2;display:block;width:29px;height:29px;flex:0 0 29px}
.trade-marker .marker-visual img{position:relative;z-index:1;width:29px;height:29px;margin:0}
.trade-marker .marker-visual b{position:absolute;z-index:3;right:auto;bottom:0;left:50%;display:grid;width:14px;height:14px;min-width:0;margin:0;padding:0;transform:translateX(-50%);place-items:center;border-radius:50%;color:var(--surface);font-size:9px;line-height:1;text-align:center}
.marker-stem{position:relative;z-index:0;display:block;width:0;height:var(--stem-height,24px);margin-top:2px;border-left:1px dashed}
.trade-marker.long .marker-stem,.trade-marker.short .marker-stem{border-color:#848e9c}
.trade-marker.reduce .marker-visual img{border-color:#f5a524!important}
.trade-marker.reduce .marker-visual b{background:#f5a524!important}
.trade-marker.closed .marker-visual img{border-color:#d8dee7!important}
.trade-marker.closed .marker-visual b{background:#d8dee7!important}
.marker-tooltip{position:absolute;z-index:2147483647;top:0;left:37px;width:300px;max-height:280px;overflow:auto;border:1px solid #334252;border-radius:7px;background:#101720;box-shadow:0 14px 36px #000b;color:var(--text);font:10px/1.35 var(--mono);text-align:left;visibility:hidden;opacity:0;pointer-events:auto;scrollbar-width:thin;scrollbar-color:#334252 transparent;transition:opacity .12s ease}
.marker-tooltip::-webkit-scrollbar{width:6px}
.marker-tooltip::-webkit-scrollbar-track{background:transparent}
.marker-tooltip::-webkit-scrollbar-thumb{border-radius:6px;background:#334252}
.trade-marker:hover .marker-tooltip{visibility:visible;opacity:1}
.trade-marker:hover::before{position:absolute;z-index:2147483646;top:0;left:29px;width:8px;height:29px;content:""}
.trade-marker.tooltip-left:hover::before{right:29px;left:auto}
.trade-marker.tooltip-left .marker-tooltip{right:37px;left:auto}
.trade-marker.tooltip-up .marker-tooltip{top:29px;transform:translateY(-100%)}
.marker-tooltip-record{display:block;padding:9px 10px}
.marker-tooltip-record+.marker-tooltip-record{border-top:1px dashed #52606f}
.marker-tooltip-head{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:6px}
.marker-tooltip-head img{width:20px!important;height:20px!important;border:0!important;border-radius:50%;object-fit:cover}
.marker-tooltip-head strong{overflow:hidden;font:600 11px var(--sans);text-overflow:ellipsis;white-space:nowrap}
.marker-tooltip-head time{color:var(--muted-2);white-space:nowrap}
.marker-tooltip-line{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin-top:7px}
.marker-action.long{color:var(--green)}
.marker-action.short{color:var(--red)}
.marker-pnl{text-align:right;white-space:nowrap}
.marker-pnl.positive{color:var(--green)}
.marker-pnl.negative{color:var(--red)}
.marker-tooltip-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:5px;color:var(--muted)}
.marker-tooltip-values span{overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}
.marker-tooltip-values span:nth-child(-n+2){text-align:left}
.marker-stem::after{content:"";position:absolute;left:-4px;bottom:-1px;width:0;height:0;border-right:4px solid transparent;border-left:4px solid transparent}
.trade-marker.long .marker-stem::after,.trade-marker.short .marker-stem::after{border-top:6px solid #848e9c}
.resizing-volume{cursor:row-resize!important;user-select:none}
.traders-panel.panel{display:flex;flex-direction:column;overflow:hidden}
.traders-panel .panel-heading,.traders-panel .search{flex:0 0 auto}
.traders-panel .trader-list{display:block;flex:1 1 auto;height:0;min-height:0;overflow-y:scroll!important;overscroll-behavior:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#334252 transparent}
.traders-panel .trader-list::-webkit-scrollbar{width:6px}
.traders-panel .trader-list::-webkit-scrollbar-track{background:transparent}
.traders-panel .trader-list::-webkit-scrollbar-thumb{border-radius:6px;background:#334252}
.activity-panel.panel{display:flex;flex-direction:column;overflow:hidden}
.activity-panel .panel-heading{padding-bottom:10px}
.activity-count{margin-left:8px;text-align:right;white-space:nowrap}
.activity-filters{display:flex;flex:0 0 auto;gap:6px;padding:0 14px 10px;border-bottom:1px solid #18222c}
.activity-filters button{height:26px;padding:0 9px;border:1px solid var(--line);border-radius:5px;background:#080d12;color:var(--muted);font:10px var(--mono);cursor:pointer}
.activity-filters button.active{border-color:var(--green);color:var(--green)}
.panel-heading{padding-right:14px;padding-left:14px}
.brand-mark{padding:0;overflow:hidden;border:2px solid #1d2834}
.brand-mark img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.activity-panel .activity-list{display:block;flex:1 1 auto;height:0;min-height:0;overflow-y:scroll!important;overscroll-behavior:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#334252 transparent}
.activity-panel .activity-list::-webkit-scrollbar{width:6px}
.activity-panel .activity-list::-webkit-scrollbar-thumb{border-radius:6px;background:#334252}
.activity-item{display:block;margin:0;padding:10px 0;border:0;border-bottom:1px solid #18222c;border-radius:0;background:transparent}
.activity-head{display:flex;align-items:center;gap:8px;min-width:0}
.activity-item .activity-head img{width:20px!important;height:20px!important;flex:0 0 20px!important}
.activity-head b{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.activity-time{display:flex;align-items:center;justify-content:flex-end;gap:4px;width:106px;min-width:106px;margin-left:auto}
.activity-head time{min-width:0;margin:0;color:var(--muted-2);font:10px var(--mono);text-align:right;white-space:nowrap}
.new-badge{display:grid;width:16px;height:16px;min-width:16px;margin:0 4px 0 0;padding:0;place-items:center;border-radius:3px;color:var(--surface);font:600 9px/1 var(--sans)}
.new-badge.long{background:var(--green)}
.new-badge.short{background:var(--red)}
.new-badge.is-hidden{visibility:hidden}
.activity-item .activity-action{display:grid;grid-template-columns:38px 64px minmax(82px,1fr) minmax(92px,1.1fr);align-items:center;column-gap:5px;margin-left:0!important;padding:7px 0 0!important;font:10px var(--mono)}
.activity-action>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.activity-item .activity-action .action{font-size:10px}
.operation-symbol{color:var(--text)}
.operation-price,.operation-quantity{color:var(--muted)}
.operation-price,.operation-quantity{text-align:left}
.empty-activity{padding:28px 12px;color:var(--muted-2);font:11px var(--mono);text-align:center}

@media (min-width:761px){
  html{height:auto!important;min-height:100%;overflow-y:auto!important}
  body{height:auto!important;min-height:100vh;overflow-y:auto!important}
  .app-shell{min-height:100vh;height:auto}
  .dashboard{height:auto;min-height:calc(100vh - 76px);padding-bottom:16px}
  .panel{height:calc(100vh - 92px);min-height:620px}
  .chart-panel{display:flex;flex-direction:column}
  .chart-wrap{height:auto;min-height:0;flex:1}
  .chart-footer{flex:0 0 30px}
  .trader-list{overflow-y:auto}
}
