:root { --bg:#0e1113; --surface:#181c1f; --surface-2:#2a3236; --surface-3:#333d42; --line:#303a3f; --line-strong:#3d494f; --text:#eef1f3; --muted:#b7cad4; --muted-2:#8ba2ad; --accent:#089981; --accent-2:#4dd0b5; --danger:#ff8a8a; --warning:#e6b96e; }
.workspace:has(#backtestDialog[open]) .status-card:not([open])>summary {min-height:0;padding:10px 14px;}
.workspace:has(#backtestDialog[open]) .status-card:not([open])>summary strong {font-size:15px;margin:3px 0;}
.workspace:has(#backtestDialog[open]) .status-card:not([open]):not([data-tone="danger"]):not([data-tone="warning"])>summary :is(.status-card-description,.status-card-meta,.status-card-timing,.status-card-toggle) {display:none;}
#backtestDialog .backtest-setup {margin:12px 0 18px;scroll-margin-top:80px;}
#backtestDialog .backtest-setup[open] {border-color:var(--accent);}
#backtestDialog .backtest-report, #runComparison {scroll-margin-top:80px;}
#runComparison:not(:empty) {margin:16px 0 24px;padding:clamp(12px,2vw,24px);border:1px solid var(--line);background:var(--surface);border-radius:12px;}
.research-heading,.research-actions,.research-baseline {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.research-actions,.research-baseline {justify-content:flex-start;}
.research-editor-summary {padding:10px 24px;background:var(--surface-2);color:var(--text);font-variant-numeric:tabular-nums;}
.research-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;}
.research-card {display:flex;flex-direction:column;gap:4px;min-width:0;padding:16px;background:var(--bg);border-radius:8px;overflow-wrap:anywhere;}
.research-card h4,.research-heading h3,.research-changes h4 {margin:0;}
.research-heading {margin-bottom:16px;}
.research-card .research-pnl {font-size:clamp(21px,2.3vw,32px);font-variant-numeric:tabular-nums;}
.research-card .stat-line {padding:6px 0;}
.research-delta {color:var(--muted);font-size:13px;}
.research-changes {margin:20px 0 10px;}
.research-previous,.research-days,.research-diff {border-top:1px solid var(--line);margin:10px 0;padding:6px 0;}
:is(.research-diff,.research-days,.research-previous)>summary {cursor:pointer;padding:8px 0;font-weight:600;}
.research-diff td,.research-diff th {white-space:normal;overflow-wrap:anywhere;}
.research-baseline label {flex:1 1 220px;min-width:0;}
.research-baseline select {width:100%;}
.backtest-workspace.report-expanded {grid-template-columns:minmax(0,1fr);}
.backtest-workspace.report-expanded .backtest-runs {display:none;}
.research-day-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:7px;}
.research-day-grid button {display:flex;align-items:flex-start;flex-direction:column;gap:4px;white-space:normal;font-variant-numeric:tabular-nums;}
@media(max-width:760px){
  #backtestDialog :is(#runComparison,.backtest-report,.backtest-setup,.backtest-workspace) {scroll-margin-top:126px;}
  .workspace:has(#backtestDialog[open]) .system-status {display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px;}
  .workspace:has(#backtestDialog[open]) .status-card {flex:1 1 95px;}
  .workspace:has(#backtestDialog[open]) .status-card[open] {flex-basis:100%;}
}
.topbar,.app-nav { background:var(--bg); }
.brand-mark { border:0; padding-right:0; color:var(--accent); }
.nav-item.active { background:var(--surface-2); border-color:transparent; color:var(--text); }
.nav-item { border-radius:20px; }
.button.primary { color:#fff; }.button.primary:hover { background:#067a67; border-color:#067a67; }
input,select,textarea { background:var(--surface); }input:focus,select:focus,textarea:focus { outline-color:var(--accent-2); }
.filter-item.active,.preset-chip:hover { background:var(--surface-2); border-color:var(--line-strong); }
.condition-card { background:var(--surface); }.toast { background:var(--surface-2); }
.brand-description { color:var(--muted-2); font-size:12px; }
.topbar-actions { margin-left:auto; display:flex; align-items:center; gap:10px; }
.system-status { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:start; margin-bottom:28px; }
.status-card { min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--surface); overflow:hidden; }
.status-card>summary { display:flex; flex-direction:column; min-height:184px; padding:18px 20px 12px; cursor:pointer; list-style:none; }
.status-card>summary::-webkit-details-marker { display:none; }
.status-card>summary:hover { background:color-mix(in srgb,var(--surface-2) 35%,var(--surface)); }
.status-card>summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:-3px; border-radius:11px; }
.status-card-label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.status-card strong { display:block; margin:9px 0 5px; font-size:21px; font-weight:550; letter-spacing:-.4px; line-height:1.3; overflow-wrap:anywhere; }
.status-card-description { display:block; min-height:38px; font-size:12px; color:var(--muted); line-height:1.5; }
.status-card-timing { display:block; margin-top:5px; color:var(--text); font-size:12px; font-variant-numeric:tabular-nums; }
.status-card-meta { display:flex; gap:6px 14px; flex-wrap:wrap; margin-top:10px; font-size:11px; color:var(--muted-2); font-variant-numeric:tabular-nums; }
.status-card-toggle { display:flex; justify-content:space-between; gap:8px; margin-top:auto; padding-top:12px; font-size:11px; color:var(--muted-2); }
.status-card[open] .status-card-toggle>span { transform:rotate(180deg); }
.status-card[data-tone=good] .status-dot { background:var(--accent-2); }
.status-card[data-tone=warning] .status-dot { background:var(--warning); }
.status-card[data-tone=danger] .status-dot { background:var(--danger); }
.status-card[data-tone=warning] strong { color:var(--warning); }
.status-card[data-tone=danger] strong { color:var(--danger); }
.status-card-details { padding:0 20px 18px; font-size:12px; line-height:1.6; }
.status-card-details dl { margin:0; padding-top:14px; border-top:1px solid var(--line); }
.status-card-details dl>div { padding:7px 0; }
.status-card-details dt { color:var(--muted-2); font-size:11px; }
.status-card-details dd { margin:2px 0 0; overflow-wrap:anywhere; }
.system-status #runtimeStatus { max-width:none; white-space:normal; overflow:visible; }
.system-status #marketCount { display:inline; }
@media(max-width:1050px){.status-card>summary { padding:16px 14px 12px; min-height:200px; }.status-card strong { font-size:18px; }.status-card-details { padding:0 14px 14px; }}
@media(max-width:760px){.system-status { grid-template-columns:1fr; gap:10px; margin-bottom:22px; }.status-card>summary { min-height:0; padding:14px 16px 10px; }.status-card strong { font-size:20px; }.status-card-description { min-height:0; }.status-card-meta { margin-top:6px; }.status-card-toggle { padding-top:8px; }.status-card-details { padding:0 16px 14px; }}
@media(max-width:620px){.topbar { gap:10px; }.brand-description { display:none; }.topbar-actions { gap:5px; }#lockButton { white-space:nowrap; }.system-status #runtimeStatus { display:block; }}
.workspace { max-width:1840px; padding-top:28px; }
.work-page { padding:0; }.work-page:focus { outline:none; }
.market-context { margin-bottom:30px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:8px; }
.page-heading h1,.page-heading h2 { margin:0; font-size:28px; letter-spacing:-.6px; }
.page-heading .panel-kicker { margin-bottom:6px; }
.page-description { color:var(--muted); margin:0 0 28px; max-width:800px; }
.strategy-dialog[open] { display:block; }
.strategy-dialog > .page-heading { margin-bottom:26px; }
.strategy-dialog .page-heading > .icon-button { display:none; }
.strategy-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; margin-top:0; }
.bot-toolbar { display:grid; grid-template-columns:minmax(180px,1fr) repeat(3,minmax(140px,180px)); gap:12px; margin:0 0 24px; padding:16px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.bot-toolbar input,.bot-toolbar select { min-height:42px; background:var(--bg); }
.bot-card,.strategy-card { padding:22px; border:1px solid var(--line); border-radius:12px; background:var(--surface); min-width:0; }
.bot-card { display:flex; flex-direction:column; transition:border-color .15s; }
.bot-card:hover { border-color:var(--line-strong); }
.bot-card-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.bot-card-heading h2 { font-size:16px; overflow-wrap:anywhere; }
.bot-identity { display:flex; align-items:center; gap:12px; font-weight:600; min-width:0; }
.bot-identity>div { overflow-wrap:anywhere; }
.exchange-icon { display:grid; place-items:center; width:36px; height:36px; flex-shrink:0; border-radius:10px; color:#f0c44b; background:#363021; font-size:19px; }
.bot-tag { font-size:11px; font-weight:600; border-radius:5px; padding:4px 8px; white-space:nowrap; background:var(--surface-2); color:var(--muted); }
.bot-tag.long { color:#6ed4ac; background:#1c3932; }.bot-tag.short { color:#f298ab; background:#3b2830; }
.bot-card-meta { display:flex; justify-content:space-between; margin:16px 0; color:var(--muted-2); font-size:12px; }
.bot-status { display:flex; align-items:center; gap:8px; padding:12px 0; font-size:12px; border-top:1px solid var(--line); }
.bot-status::before { content:''; width:7px; height:7px; border-radius:50%; background:#858c9e; flex-shrink:0; }
.bot-status.on::before { background:#d8b66b; }.bot-status.in-position::before { background:#6ed4ac; }
.bot-card-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0 5px; }
.bot-card-values span { display:block; color:var(--muted-2); font-size:11px; margin-bottom:7px; }.bot-card-values strong { font-size:16px; font-weight:500; }
.bot-conditions-summary { color:var(--muted-2); font-size:12px; margin:12px 0 20px; }
.bot-card-details { border-top:1px solid var(--line); padding:12px 0; font-size:12px; }.bot-card-details summary { color:var(--muted); cursor:pointer; }
.bot-card-details .button { margin-top:10px; }
.bot-card-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:14px; margin-top:auto; }
.bot-card-actions .danger-text { margin-left:auto; }
.catalog-empty { padding:48px 24px; border:1px dashed var(--line-strong); border-radius:12px; text-align:center; color:var(--muted); grid-column:1/-1; }
.bot-editor-dialog { width:min(920px,calc(100vw - 40px)); max-height:calc(100dvh - 48px); background:var(--surface); border:1px solid var(--line-strong); border-radius:14px; padding:0; color:var(--text); }
.bot-editor-dialog::backdrop { background:#080a10c9; backdrop-filter:blur(3px); }
.bot-editor-dialog>.dialog-head { position:sticky; top:0; z-index:2; background:var(--surface); }
.bot-editor-dialog .paper-order-form { border:0; border-radius:0; padding:24px; }
.bot-editor-dialog .strategy-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.bot-editor-dialog .condition-card { padding:14px; margin:12px 0; }
.bot-editor-dialog .condition-main { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; gap:12px; }
.bot-editor-dialog .condition-main .condition-cell:nth-child(n) { grid-column:auto; grid-row:auto; }
.bot-editor-dialog .condition-main .condition-cell:nth-child(2),.bot-editor-dialog .condition-number { grid-column:1/-1; text-align:left; }
.bot-editor-dialog #strategyFilter { margin-bottom:8px; }
.template-options { margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:8px; }
.template-options>summary { cursor:pointer; color:var(--muted); font-size:13px; }
.template-options[open]>label { margin-top:16px; }.template-options .strategy-template-picker { border:0; margin:16px 0; padding:0; }
.form-section-title { font-size:15px; font-weight:600; margin:24px 0 16px; }
.bot-trade-section .take-profit-plan { margin-top:20px; }
.bot-editor-dialog .take-profit-plan { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.dashboard-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin-bottom:24px; }
.dashboard-stat { padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.dashboard-stat>span { color:var(--muted); font-size:13px; }.dashboard-stat>strong { display:block; font-size:28px; font-weight:550; margin:14px 0 8px; letter-spacing:-.5px; }
.dashboard-stat>small { color:var(--muted-2); font-size:11px; }
.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.dashboard-panel { padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:24px; min-width:0; }
.dashboard-panel h2 { margin:0 0 20px; }.stat-line { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); font-size:13px; }
.stat-line:last-child { border-bottom:0; }.stat-line>span { color:var(--muted); }.stat-line>strong { font-weight:500; white-space:nowrap; }
.empty-copy { color:var(--muted-2); margin:30px 0; font-size:13px; }
.runtime-panel { padding:18px 22px; border:1px solid var(--line); border-radius:10px; background:var(--surface); display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:24px 0; }
.runtime-panel .helper { flex:1; margin:0; min-width:200px; }
.strategy-catalog { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; margin:24px 0; }
.strategy-member-summary { font-size:12px; color:var(--muted); border-top:1px solid var(--line); padding:12px 0; overflow-wrap:anywhere; }
.strategy-builder { padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-top:24px; }
.strategy-builder h2 { margin:20px 0 0; }.strategy-builder .search-form { padding:0; border:0; }
.strategy-builder .comparison-controls { flex-wrap:nowrap; margin:20px 0; gap:10px; }
.strategy-builder .comparison-controls select { flex:1; min-width:0; }.strategy-builder .comparison-controls .button { flex-shrink:0; }
.member-phase-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }.member-phase-fields select { background:var(--bg); }
.group-member { padding:20px; border-radius:8px; }.group-member-actions { margin-top:14px; }
.saved-strategy-backtest { margin-top:24px; }.saved-strategy-backtest .field-block { max-width:600px; margin:20px 0; }
.analytics-run-picker { display:grid; gap:8px; max-height:280px; overflow:auto; margin:20px 0; padding:16px; background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.backtest-phase-report { margin:20px 0; padding:20px; min-width:0; border:1px solid var(--line-strong); border-radius:8px; background:var(--bg); }
.backtest-live-evidence { margin:16px 0; padding:14px 16px; border:1px solid var(--line-strong); border-radius:8px; background:var(--bg); line-height:1.5; }
.backtest-live-evidence strong { display:block; margin-bottom:6px; }
.backtest-live-evidence p { margin:6px 0 0; }
.backtest-live-caution { color:var(--warning); }
#backtestPeriodWarning:empty { display:none; }
.phase-report-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.phase-report-heading h4 { margin:0; font-size:15px; font-weight:500; }
.phase-report-status { padding:5px 9px; border:1px solid var(--line-strong); border-radius:16px; font-size:11px; color:var(--warning); }
.phase-report-status.review { color:var(--accent-2); }
.phase-report-status.no_trades { color:var(--muted); }
.backtest-item .phase-report-leader { margin:18px 0 7px; color:var(--muted); }
.phase-report-name { display:block; font-size:19px; font-weight:500; line-height:1.4; }
.backtest-item .phase-report-numbers { margin:8px 0 16px; font-variant-numeric:tabular-nums; color:var(--text); }
.backtest-item .phase-report-caution { color:var(--warning); }
.phase-report-reasons { padding-left:18px; color:var(--muted); font-size:12px; line-height:1.8; }
.backtest-phase-report h5 { margin:22px 0 0; font-size:12px; font-weight:500; color:var(--muted); }
.phase-report-table { margin:0; min-width:740px; }
.phase-report-table thead th { color:var(--muted); font-size:11px; }
.phase-report-table tbody th { font-weight:400; }
.phase-report-table .phase-report-candidate { background:var(--surface-2); }
.trade-entry-phase { margin-bottom:9px; color:var(--text); font-size:12px; line-height:1.5; }
.trade-bot-link { padding:0; border:0; background:none; color:var(--accent-2); text-align:left; font:inherit; font-weight:500; line-height:1.6; white-space:normal; cursor:pointer; text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.trade-bot-link:hover { color:var(--text); }.trade-bot-link:focus-visible { outline:2px solid var(--accent-2); outline-offset:4px; }
.trade-owner-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; margin-top:16px; }
.portfolio-owner { margin:8px 0; overflow-wrap:anywhere; }
.portfolio-owner span.trade-bot-link { text-decoration:none; color:var(--muted); }
.portfolio-owner button { text-align:left; }
.trade-owner-card { padding:14px; min-width:0; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.trade-owner-card strong { display:block; font-size:14px; font-weight:500; }.trade-owner-card p { margin:8px 0; }
.trade-table { min-width:1320px; }.trade-table .trade-owner-cell { min-width:210px; max-width:280px; white-space:normal; }
.trade-bot-dialog { width:min(880px,calc(100% - 24px)); max-height:calc(100dvh - 32px); }
.trade-bot-dialog .dialog-head { align-items:flex-start; gap:16px; }.trade-bot-dialog h2 { margin:0; font-size:18px; line-height:1.5; overflow-wrap:anywhere; }
.trade-bot-dialog .dialog-head button { flex-shrink:0; }.trade-bot-snapshot { padding:20px; font-size:13px; line-height:1.7; }
.trade-bot-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; margin:20px 0; }
.trade-bot-fields dt { color:var(--muted); font-size:11px; }.trade-bot-fields dd { margin:4px 0 0; overflow-wrap:anywhere; }
.trade-bot-snapshot h3 { margin:24px 0 10px; font-size:14px; font-weight:500; }.trade-bot-conditions { padding-left:18px; }
.trade-bot-snapshot pre { max-width:100%; overflow:auto; font-size:11px; }.trade-bot-hash { overflow-wrap:anywhere; }
@media(max-width:620px){.trade-bot-fields { grid-template-columns:1fr; }.trade-bot-snapshot { padding:14px; }.trade-bot-dialog .dialog-head { padding:14px; }.trade-bot-dialog h2 { font-size:15px; }}
.phase-report-scroll-hint { display:none; }
@media(max-width:620px){.phase-report-scroll-hint { display:block; }}
@media(max-width:620px){.backtest-phase-report { padding:14px; }.phase-report-name { font-size:17px; }.phase-report-heading { align-items:flex-start; flex-direction:column; }}
.analysis-run { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }.analysis-run input { flex-shrink:0; }
.workspace-page .regime-matrix-panel { margin-top:24px; }
@media(max-width:1200px){.bot-toolbar { grid-template-columns:1fr 1fr; }.dashboard-stats { grid-template-columns:1fr 1fr; }}
@media(max-width:800px){.dashboard-grid { grid-template-columns:1fr; }.strategy-catalog { grid-template-columns:minmax(0,1fr); }.dashboard-stat { padding:18px; }.dashboard-stat>strong { font-size:23px; }}
@media(max-width:620px){
  .app-nav { justify-content:flex-start; overflow-x:auto; scrollbar-width:none; }.app-nav .nav-item { flex-shrink:0; padding:9px 12px; }.workspace { padding-top:0; }
  .page-heading { align-items:flex-start; gap:12px; }.page-heading h1,.page-heading h2 { font-size:24px; }.page-heading>.button { font-size:12px; padding:8px 10px; white-space:nowrap; }
  .strategy-list { grid-template-columns:minmax(0,1fr); }.bot-toolbar { padding:12px; gap:10px; }.bot-toolbar input { grid-column:1/-1; }.bot-toolbar select { font-size:12px; }.bot-toolbar select:last-child { grid-column:1/-1; }
  .bot-card { padding:20px; }.dashboard-stats { gap:12px; }.dashboard-stat { padding:16px; }.dashboard-stat>strong { font-size:21px; overflow-wrap:anywhere; }
  .dashboard-panel { padding:18px; }.stat-line { flex-wrap:wrap; gap:8px; }.runtime-panel { padding:16px; }.runtime-panel .button { font-size:12px; }
  .member-phase-fields { grid-template-columns:1fr; }.strategy-builder { padding:16px; }.bot-editor-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); }.bot-editor-dialog .strategy-grid { grid-template-columns:1fr; }.bot-editor-dialog .condition-main { grid-template-columns:1fr; }.bot-editor-dialog .paper-order-form { padding:18px; }
}
.dashboard-notice { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:0 0 18px; padding:14px 18px; border:1px solid var(--accent); border-radius:10px; background:color-mix(in srgb,var(--accent) 10%,var(--surface)); font-size:13px; }
.dashboard-notice.attention { border-color:var(--warning); background:color-mix(in srgb,var(--warning) 10%,var(--surface)); }
.dashboard-notice span { color:var(--muted); }
button.dashboard-stat { color:var(--text); font:inherit; text-align:left; cursor:pointer; width:100%; }
button.dashboard-stat:hover,button.dashboard-stat:focus-visible { border-color:var(--accent-2); outline:none; }
.bot-toolbar { grid-template-columns:minmax(180px,1fr) repeat(3,minmax(130px,180px)); }
.bot-toolbar .button { min-height:42px; }
.bot-toolbar #botSearch { grid-column:1; }
.bot-toolbar #botSearch~select:nth-of-type(4) { grid-column:1; }
.bot-toolbar input[aria-label="Название представления"] { min-width:0; }
.strategy-list.compact-bots { display:grid; grid-template-columns:1fr; gap:8px; }
.compact-bots .bot-card { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(130px,1fr) minmax(200px,1.5fr) auto; gap:8px 16px; align-items:center; padding:12px 16px; }
.compact-bots .bot-card-meta,.compact-bots .bot-conditions-summary,.compact-bots .bot-card-details { display:none; }
.compact-bots .bot-card-values { margin:0; }.compact-bots .bot-card-values strong { font-size:13px; }
.compact-bots .bot-status { padding:0; border:0; }.compact-bots .bot-card-actions { padding:0; }
.phase-map { margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:9px; background:var(--bg); }
.phase-map h3 { margin:0 0 10px; font-size:15px; }.phase-map-table { min-width:640px; }
.phase-map-assigned { color:var(--accent-2); background:color-mix(in srgb,var(--accent) 12%,transparent); }
.phase-map-warning { color:var(--warning); font-size:12px; }
.venue-tabs,.backtest-steps { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 18px; }
.venue-tabs .selected { color:var(--accent-2); border-color:var(--accent); background:color-mix(in srgb,var(--accent) 13%,var(--surface)); }
.paper-dialog[data-venue="testnet"] .venue-tabs .selected { color:var(--warning); border-color:var(--warning); background:color-mix(in srgb,var(--warning) 12%,var(--surface)); }
.paper-dialog #paperSummary { position:sticky; top:64px; z-index:5; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(150px,1fr); grid-template-columns:none; max-height:none; overflow-x:auto; overflow-y:hidden; box-shadow:0 8px 20px #0005; }
.order-preview { padding:12px 14px; border-left:3px solid var(--accent); background:var(--surface-2); color:var(--muted); font-size:12px; }
.backtest-steps { position:sticky; top:64px; z-index:5; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.backtest-queue-status { margin:0 0 0 auto; color:var(--muted); font-size:12px; }
.comparison-best { color:var(--accent-2); font-weight:700!important; background:color-mix(in srgb,var(--accent) 12%,transparent); }
.matrix-cell.heat-positive { background:color-mix(in srgb,var(--accent) var(--heat-opacity),transparent); }
.matrix-cell.heat-negative { background:color-mix(in srgb,var(--danger) var(--heat-opacity),transparent); }
.matrix-cell .button { margin-top:8px; }
.heat-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin:12px 0; color:var(--muted); font-size:11px; }
.heat-legend .heat-positive,.heat-legend .heat-negative { padding:3px 7px; border-radius:4px; }
.heat-legend .heat-positive { color:var(--accent-2); background:color-mix(in srgb,var(--accent) 20%,transparent); }
.heat-legend .heat-negative { color:var(--danger); background:color-mix(in srgb,var(--danger) 20%,transparent); }
.research-progress,.stability-track { height:7px; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.research-progress>span,.stability-track>span { display:block; height:100%; background:var(--accent); }
.research-progress { margin:12px 0; }.stability-track { margin-top:10px; }.search-sort { max-width:260px; margin:16px 0; }
.wf-timeline { display:flex; gap:8px; overflow:auto; padding:0; margin:22px 0; list-style:none; }
.wf-step { min-width:125px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:11px; }
.wf-step strong,.wf-step span { display:block; }.wf-step span { margin-top:5px; color:var(--muted); }
.wf-step.completed { border-color:var(--accent); }.wf-step.skipped { border-color:var(--warning); }
.shadow-health { display:inline-flex; margin:12px 0 0; padding:5px 9px; border-radius:99px; background:var(--surface-2); font-size:12px; }
.shadow-health.good { color:var(--accent-2); }.shadow-health.warning { color:var(--warning); }.shadow-health.danger { color:var(--danger); }
.shadow-trend { display:flex; gap:5px; margin:12px 0; }.shadow-trend-point { width:18px; height:7px; border-radius:99px; background:var(--accent); }
.shadow-trend-point.warning { background:var(--warning); }.shadow-trend-point.danger { background:var(--danger); }
.shadow-alert { color:var(--warning); font-size:12px; }.shadow-comparison { color:var(--muted); font-size:12px; line-height:1.5; }
@media(max-width:1100px){.compact-bots .bot-card { grid-template-columns:1fr 1fr; }.compact-bots .bot-card-actions { grid-column:1/-1; }}
@media(max-width:760px){.dashboard-notice { align-items:flex-start; flex-direction:column; }.paper-dialog #paperSummary { position:static; grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }.backtest-steps { position:static; }.compact-bots .bot-card { grid-template-columns:1fr; }.compact-bots .bot-card-actions { grid-column:auto; }.bot-toolbar { grid-template-columns:1fr 1fr; }.bot-toolbar #botSearch,.bot-toolbar #botSearch~select:nth-of-type(4) { grid-column:1/-1; }}
