/* Mt5Arm Terminal — a MetaTrader 5–style workspace (light "Windows" skin by default, .dark for night) */
:root {
  --c-bg: #f0f0f0; --c-panel: #ffffff; --c-head: #e3e6ee; --c-head2: #f5f6f8; --c-line: #c9ced8; --c-line2: #e4e7ec;
  --c-text: #1b1b1b; --c-muted: #6b7280; --c-sel: #cde4ff; --c-sel-line: #3d8bfd; --c-hover: #e8f1fd;
  --c-up: #0b5fd4; --c-down: #d4161b; --c-buy: #1565c0; --c-sell: #d32f2f; --c-ok: #1e8e3e;
  --c-input: #ffffff; --c-menu: #ffffff; --c-shadow: rgba(0, 0, 0, .18);
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
.mt5 {
  height: calc(100vh - 52px); display: flex; flex-direction: column; background: var(--c-bg); color: var(--c-text);
  font: 12px/1.35 "Segoe UI", Tahoma, Inter, system-ui, sans-serif; user-select: none; position: relative;
}
body.mt5dark, .mt5.dark {
  --c-bg: #1c1f26; --c-panel: #12151b; --c-head: #262b35; --c-head2: #1d2129; --c-line: #343b48; --c-line2: #242a35;
  --c-text: #dfe3ea; --c-muted: #8c95a6; --c-sel: #1f3a5f; --c-sel-line: #4c8dff; --c-hover: #1c2a3d;
  --c-up: #4c9bff; --c-down: #ff5a5f; --c-input: #0d1015; --c-menu: #1d2129; --c-shadow: rgba(0, 0, 0, .55);
}
.mt5 input, .mt5 select, .mt5 textarea { background: var(--c-input); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 2px; padding: 3px 5px; font: inherit; width: auto; }
.mt5 input:focus, .mt5 select:focus { outline: 1px solid var(--c-sel-line); border-color: var(--c-sel-line); }
.mt5 .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mt5 .up { color: var(--c-up); } .mt5 .down { color: var(--c-down); }
.mt5 .muted { color: var(--c-muted); }

/* ---------- menu bar ---------- */
.mt5-menubar { display: flex; align-items: stretch; height: 24px; background: var(--c-panel); border-bottom: 1px solid var(--c-line2); padding: 0 4px; flex: none; }
.mt5-menubar > button { background: none; border: none; color: var(--c-text); padding: 0 9px; font: inherit; cursor: default; border-radius: 0; }
.mt5-menubar > button:hover, .mt5-menubar > button.open { background: var(--c-sel); }
.mt5-menu { position: fixed; z-index: 90; font: 12px/1.35 "Segoe UI", Tahoma, Inter, system-ui, sans-serif; color: var(--c-text); user-select: none; min-width: 230px; background: var(--c-menu); border: 1px solid var(--c-line); box-shadow: 2px 3px 10px var(--c-shadow); padding: 3px 0; }
.mt5-menu .mi { display: flex; align-items: center; gap: 8px; padding: 4px 22px 4px 26px; position: relative; cursor: default; white-space: nowrap; }
.mt5-menu .mi:hover, .mt5-menu .mi.hot { background: var(--c-sel); }
.mt5-menu .mi.disabled { color: var(--c-muted); pointer-events: none; }
.mt5-menu .mi .key { margin-left: auto; padding-left: 24px; color: var(--c-muted); }
.mt5-menu .mi.check::before { content: "✓"; position: absolute; left: 9px; }
.mt5-menu .mi.sub::after { content: "▸"; position: absolute; right: 8px; color: var(--c-muted); }
.mt5-menu .sep { height: 1px; background: var(--c-line2); margin: 3px 4px; }

/* ---------- toolbar ---------- */
.mt5-toolbar { display: flex; align-items: center; gap: 1px; height: 30px; padding: 0 4px; background: var(--c-bg); border-bottom: 1px solid var(--c-line); flex: none; overflow-x: auto; scrollbar-width: none; }
.mt5-toolbar::-webkit-scrollbar { display: none; }
.tbb { display: inline-flex; align-items: center; gap: 4px; height: 24px; min-width: 24px; justify-content: center; padding: 0 4px; background: none; border: 1px solid transparent; border-radius: 2px; color: var(--c-text); cursor: default; font: inherit; flex: none; }
.tbb:hover { background: var(--c-hover); border-color: var(--c-sel-line); }
.tbb.on { background: var(--c-sel); border-color: var(--c-sel-line); }
.tbb svg { width: 16px; height: 16px; display: block; }
.tbb.text { padding: 0 7px; }
.tbb.tf { font-size: 11px; padding: 0 5px; min-width: 0; }
.tb-sep { width: 1px; height: 20px; background: var(--c-line); margin: 0 4px; flex: none; }
.tb-grow { flex: 1; }

/* ---------- body layout ---------- */
.mt5-body { flex: 1; display: flex; min-height: 0; }
.mt5-left { width: 300px; display: flex; flex-direction: column; min-width: 180px; max-width: 60vw; flex: none; }
.mt5-center { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--c-bg); }
.splitter-v { width: 4px; cursor: col-resize; flex: none; background: var(--c-bg); }
.splitter-h { height: 4px; cursor: row-resize; flex: none; background: var(--c-bg); }
.splitter-v:hover, .splitter-h:hover { background: var(--c-sel); }
.mt5-panel { background: var(--c-panel); border: 1px solid var(--c-line); display: flex; flex-direction: column; min-height: 60px; }
#mwPanel { flex: 3; } #navPanel { flex: 2; }
.ph { display: flex; align-items: center; height: 20px; padding: 0 3px 0 6px; background: var(--c-head); color: var(--c-text); font-size: 11.5px; flex: none; }
.ph .x { margin-left: auto; background: none; border: none; color: var(--c-muted); cursor: default; font-size: 13px; line-height: 1; padding: 0 4px; }
.ph .x:hover { color: var(--c-down); }
.pbody { flex: 1; overflow: auto; min-height: 0; position: relative; }
.btabs { display: flex; gap: 0; border-top: 1px solid var(--c-line); background: var(--c-head2); flex: none; overflow-x: auto; scrollbar-width: none; }
.btabs button { background: none; border: none; border-right: 1px solid var(--c-line2); padding: 3px 10px; color: var(--c-text); font: inherit; cursor: default; white-space: nowrap; }
.btabs button.on { background: var(--c-panel); box-shadow: inset 0 2px 0 var(--c-sel-line); }
.btabs button:hover:not(.on) { background: var(--c-hover); }

/* ---------- grids (Market Watch, Toolbox) ---------- */
.g { width: 100%; border-collapse: collapse; font-size: 12px; }
.g th { position: sticky; top: 0; z-index: 1; background: var(--c-head2); font-weight: 400; color: var(--c-text); text-align: left; padding: 2px 6px; border-bottom: 1px solid var(--c-line); border-right: 1px solid var(--c-line2); white-space: nowrap; }
.g th.r, .g td.r { text-align: right; }
.g td { padding: 1px 6px; white-space: nowrap; border-bottom: 1px solid var(--c-line2); }
.g tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--c-panel) 94%, var(--c-head)); }
.g tbody tr:hover td { background: var(--c-hover); }
.g tbody tr.sel td { background: var(--c-sel); }
.g td.sym { font-weight: 400; }
.g .ico { display: inline-block; width: 12px; text-align: center; margin-right: 4px; font-size: 10px; }
.g tr.sum td { background: var(--c-head2) !important; font-weight: 600; border-top: 1px solid var(--c-line); }
.g tr.grp td { background: var(--c-head2) !important; color: var(--c-muted); font-size: 11px; }
.g .xbtn { background: none; border: none; color: var(--c-muted); cursor: default; padding: 0 3px; font-size: 13px; line-height: 1; }
.g .xbtn:hover { color: var(--c-down); }
.g .addrow td { color: var(--c-muted); }
.g .addrow input { width: 100%; border: none; background: transparent; padding: 1px 0; }

/* market watch trading tab */
.mwt { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; padding: 6px; }
.mwt-card { border: 1px solid var(--c-line); border-radius: 3px; padding: 5px; background: var(--c-panel); }
.mwt-card .t { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
.oc { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 3px; align-items: stretch; }
.oc button { border: none; border-radius: 2px; color: #fff; padding: 2px 4px; cursor: default; font: inherit; line-height: 1.1; }
.oc .s { background: var(--c-sell); } .oc .b { background: var(--c-buy); }
.oc button:hover { filter: brightness(1.12); }
.oc .px { font-family: var(--mono); font-size: 15px; font-weight: 600; display: block; }
.oc .px small { font-size: 11px; } .oc .px big { font-size: 18px; }
.oc .lbl { font-size: 10px; opacity: .9; display: block; }
.oc input { width: 100%; text-align: center; font-family: var(--mono); padding: 1px; }
.oc .vol { display: flex; flex-direction: column; gap: 1px; }
.oc .vol .spr { text-align: center; font-size: 10px; color: var(--c-muted); }

/* details tab */
.mwd { padding: 4px; display: grid; gap: 4px; }
.mwd-card { border: 1px solid var(--c-line2); border-radius: 3px; padding: 4px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; font-size: 11.5px; }
.mwd-card .t { grid-column: 1/-1; display: flex; justify-content: space-between; font-weight: 600; }
.mwd-card .rng { grid-column: 1/-1; height: 4px; background: var(--c-line2); border-radius: 2px; position: relative; margin: 3px 0 1px; }
.mwd-card .rng i { position: absolute; top: -2px; width: 3px; height: 8px; background: var(--c-sel-line); border-radius: 1px; }

/* navigator tree */
.tree { list-style: none; margin: 0; padding: 3px 0 3px 4px; font-size: 12px; }
.tree ul { list-style: none; margin: 0; padding-left: 16px; }
.tree li > .node { display: flex; align-items: center; gap: 5px; padding: 1px 4px; white-space: nowrap; border-radius: 2px; cursor: default; }
.tree li > .node:hover { background: var(--c-hover); }
.tree li > .node.sel { background: var(--c-sel); }
.tree .tw { width: 10px; color: var(--c-muted); font-size: 9px; text-align: center; }
.tree li.closed > ul { display: none; }
.tree .ic { width: 14px; text-align: center; }
.tree .bold { font-weight: 700; }

/* ---------- MDI chart area ---------- */
.mdi { flex: 1; display: grid; gap: 3px; padding: 3px; min-height: 0; background: var(--c-bg); }
.mdi.max > .cw:not(.active) { display: none; }
.mdi.max { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
.mdi .empty { display: grid; place-items: center; color: var(--c-muted); grid-column: 1/-1; }
.cw { display: flex; flex-direction: column; border: 1px solid var(--c-line); background: #000; min-width: 0; min-height: 0; position: relative; }
.cw.active { border-color: var(--c-sel-line); }
.cw-title { display: flex; align-items: center; height: 20px; padding: 0 2px 0 6px; background: var(--c-head); color: var(--c-muted); font-size: 11.5px; gap: 6px; flex: none; }
.cw.active .cw-title { background: color-mix(in srgb, var(--c-sel) 70%, var(--c-head)); color: var(--c-text); }
.cw-title .wb { margin-left: auto; display: flex; }
.cw-title .wb button { background: none; border: none; color: inherit; width: 20px; height: 18px; cursor: default; font-size: 11px; }
.cw-title .wb button:hover { background: var(--c-hover); }
.cw-title .wb button.close:hover { background: #e81123; color: #fff; }
.cw-panes { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cw-pane { position: relative; min-height: 0; }
.cw-pane.main { flex: 1; }
.cw-pane.sub { height: 22%; min-height: 60px; border-top: 1px solid #333; flex: none; }
.cw-pane .plabel { position: absolute; top: 2px; left: 6px; z-index: 4; font: 11px var(--mono); color: #bbb; pointer-events: none; white-space: nowrap; }
.cw-pane .plabel b { color: #fff; font-weight: 600; }
.cw-pane .pclose { position: absolute; top: 1px; right: 66px; z-index: 5; background: none; border: none; color: #888; cursor: default; font-size: 12px; }
.cw-pane .pclose:hover { color: #ff5a5f; }
.cw .legend { position: absolute; top: 4px; left: 6px; z-index: 4; font: 11px var(--mono); color: #ddd; pointer-events: none; text-shadow: 0 0 3px #000; }
.cw .legend .s { font-weight: 700; color: #fff; }
.cw.light .legend { color: #333; text-shadow: none; } .cw.light .legend .s { color: #000; }
.cw.light .cw-pane .plabel { color: #444; } .cw.light .cw-pane .plabel b { color: #000; } .cw.light .cw-pane.sub { border-top-color: #ccc; }

/* one-click trading panel (top-left of each chart, like MT5) */
.ocp { position: absolute; top: 22px; left: 6px; z-index: 6; display: grid; grid-template-columns: 92px 62px 92px; gap: 2px; font-family: "Segoe UI", sans-serif; }
.ocp button { border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 2px; padding: 1px 4px 2px; cursor: default; text-align: left; line-height: 1.05; }
.ocp .s { background: rgba(211,47,47,.92); } .ocp .b { background: rgba(21,101,192,.92); text-align: right; }
.ocp button:hover { filter: brightness(1.15); }
.ocp .l { font-size: 10px; display: block; opacity: .9; }
.ocp .p { font: 600 12px var(--mono); } .ocp .p big { font-size: 17px; } .ocp .p sup { font-size: 10px; }
.ocp .v { display: flex; flex-direction: column; gap: 1px; }
.ocp .v input { width: 100%; text-align: center; font: 12px var(--mono); padding: 1px; border-radius: 2px; border: 1px solid #555; background: #111; color: #fff; }
.ocp .v .row { display: flex; gap: 1px; }
.ocp .v .row button { flex: 1; padding: 0; text-align: center; background: #333; font-size: 9px; line-height: 12px; }
.ocp .v .spr { text-align: center; font: 10px var(--mono); color: #bbb; text-shadow: 0 0 2px #000; }
.cw.light .ocp .v input { background: #fff; color: #000; border-color: #999; }
.cw.light .ocp .v .spr { color: #444; text-shadow: none; }
.ocp.hidden { display: none; }

/* quick navigation (type on a chart: symbol or timeframe, Enter) */
.qnav { position: absolute; left: 6px; bottom: 30px; z-index: 7; width: 170px; }
.qnav input { width: 100%; font: 12px var(--mono); }

.mdi-tabs { display: flex; height: 22px; background: var(--c-head2); border-top: 1px solid var(--c-line); flex: none; overflow-x: auto; scrollbar-width: none; }
.mdi-tabs button { background: none; border: none; border-right: 1px solid var(--c-line2); padding: 0 12px; color: var(--c-text); font: inherit; cursor: default; white-space: nowrap; }
.mdi-tabs button.on { background: var(--c-panel); box-shadow: inset 0 -2px 0 var(--c-sel-line); }

/* data window */
.mt5-datawin { width: 210px; flex: none; }
.dw { width: 100%; font-size: 12px; border-collapse: collapse; }
.dw td { padding: 1px 6px; border-bottom: 1px solid var(--c-line2); }
.dw td:last-child { text-align: right; font-family: var(--mono); }
.dw tr.h td { background: var(--c-head2); font-weight: 600; }

/* ---------- toolbox ---------- */
.mt5-toolbox { height: 230px; min-height: 80px; display: flex; background: var(--c-panel); border: 1px solid var(--c-line); flex: none; }
.tbx-side { width: 18px; flex: none; background: var(--c-head); display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--c-line); }
.tbx-side .x { background: none; border: none; color: var(--c-muted); padding: 2px 0; font-size: 12px; cursor: default; }
.tbx-side .x:hover { color: var(--c-down); }
.tbx-side span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; color: var(--c-muted); margin-top: 6px; }
.tbx-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tbx-body { flex: 1; overflow: auto; min-height: 0; position: relative; }
.tbx-body .tab-body { height: 100%; }
.tbx-tools { display: flex; gap: 6px; align-items: center; padding: 3px 6px; border-bottom: 1px solid var(--c-line2); background: var(--c-head2); position: sticky; top: 0; z-index: 2; }
.tbx-tools .grow { flex: 1; }
.tbx-tools button { background: var(--c-panel); border: 1px solid var(--c-line); border-radius: 2px; padding: 1px 8px; font: inherit; color: var(--c-text); cursor: default; }
.tbx-tools button:hover { border-color: var(--c-sel-line); }
.mt5 .log { margin: 0; padding: 4px 8px; font: 11.5px var(--mono); white-space: pre-wrap; color: var(--c-text); user-select: text; }
.mt5 .tab-body .cols { color: var(--c-text); }

/* ---------- status bar ---------- */
.mt5-status { display: flex; height: 22px; align-items: stretch; background: var(--c-bg); border-top: 1px solid var(--c-line); font-size: 11.5px; flex: none; overflow: hidden; }
.mt5-status > span { padding: 3px 10px; border-right: 1px solid var(--c-line); white-space: nowrap; }
.mt5-status .grow { flex: 1; }
.mt5-status .net { display: flex; gap: 6px; align-items: center; }
.mt5-status .bars { display: inline-flex; gap: 1px; align-items: flex-end; height: 11px; }
.mt5-status .bars i { width: 3px; background: var(--c-ok); display: block; }
.mt5-status .bars.bad i { background: var(--c-down); }

/* ---------- dialogs (MT5 windows) ---------- */
.mt5-dlg-back { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.25); display: grid; place-items: center; }
.mt5-dlg { background: var(--c-bg); color: var(--c-text); border: 1px solid #6b8ab8; box-shadow: 0 10px 40px rgba(0,0,0,.45); min-width: 340px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); display: flex; flex-direction: column; font: 12px "Segoe UI", Tahoma, sans-serif; }
.mt5-dlg .dt { display: flex; align-items: center; height: 28px; padding: 0 0 0 10px; background: #fff; color: #000; border-bottom: 1px solid var(--c-line2); cursor: move; }
body.mt5dark .mt5-dlg .dt { background: #262b35; color: #eee; }
.mt5-dlg .dt .x { margin-left: auto; width: 44px; height: 100%; background: none; border: none; font-size: 14px; color: inherit; cursor: default; }
.mt5-dlg .dt .x:hover { background: #e81123; color: #fff; }
.mt5-dlg .db { padding: 12px; overflow: auto; }
.mt5-dlg .df { display: flex; gap: 8px; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--c-line2); }
.mt5-dlg .df button, .mt5-dlg .db button.std { min-width: 84px; padding: 4px 10px; background: #fdfdfd; border: 1px solid #adadad; border-radius: 2px; font: inherit; color: #000; cursor: default; }
.mt5-dlg input, .mt5-dlg select { background: var(--c-input); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 2px; padding: 3px 5px; font: inherit; }
.mt5-dlg .df button:hover, .mt5-dlg .db button.std:hover { background: #e5f1fb; border-color: #0078d7; }
.mt5-dlg .df button.primary { border-color: #0078d7; box-shadow: inset 0 0 0 1px #0078d7; }
.frm { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; align-items: center; }
.frm label { text-align: right; color: var(--c-text); }
.frm .wide { grid-column: 1/-1; }
.frm input, .frm select { width: 100%; }
.frm .hint { grid-column: 2; color: var(--c-muted); font-size: 11px; margin-top: -3px; }
.chk { display: flex; align-items: center; gap: 6px; }
.chk input { width: auto; }

/* order window */
.ord { display: grid; grid-template-columns: 330px 330px; gap: 14px; }
.ord .left { display: flex; flex-direction: column; gap: 8px; }
.ord .spin { display: grid; grid-template-columns: 1fr 18px; }
.ord .spin .sb { display: grid; grid-template-rows: 1fr 1fr; }
.ord .spin .sb button { min-width: 0; padding: 0; font-size: 7px; line-height: 1; border: 1px solid var(--c-line); background: var(--c-panel); color: var(--c-text); }
.ord .quote { text-align: center; font: 600 26px var(--mono); margin: 10px 0 4px; letter-spacing: .5px; }
.ord .quote .b { color: var(--c-down); } .ord .quote .a { color: var(--c-up); }
.ord .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ord .btns button { padding: 8px; border: 1px solid; border-radius: 2px; font: 600 13px "Segoe UI", sans-serif; cursor: default; }
.ord .btns .s { background: #fdecec; border-color: var(--c-sell); color: var(--c-sell); }
.ord .btns .b { background: #e8f0fd; border-color: var(--c-buy); color: var(--c-buy); }
.ord .btns .s:hover { background: var(--c-sell); color: #fff; } .ord .btns .b:hover { background: var(--c-buy); color: #fff; }
.ord .btns .p { grid-column: 1/-1; background: #fdfdfd; border-color: #888; color: #000; }
.ord .btns button:disabled { opacity: .45; pointer-events: none; }
.ord .tick { height: 300px; border: 1px solid var(--c-line); background: #fff; position: relative; }
.ord .res { margin-top: 6px; padding: 8px; border: 1px solid var(--c-line2); background: var(--c-panel); min-height: 18px; font-size: 12px; }
.ord .res.ok { border-color: #8bc58f; } .ord .res.er { border-color: var(--c-sell); color: var(--c-sell); }
.ord .risk { display: grid; grid-template-columns: 1fr auto; gap: 6px; }

/* context menus reuse .mt5-menu */
.mt5-tip { position: fixed; z-index: 95; background: #ffffe1; color: #000; border: 1px solid #767676; padding: 2px 6px; font-size: 11.5px; pointer-events: none; white-space: pre; }

@media (max-width: 900px) {
  .mt5-left { width: 100% !important; max-width: none; height: 38vh; }
  .mt5-body { flex-direction: column; }
  .splitter-v { display: none; }
  .mt5-center { min-height: 50vh; }
  .ord { grid-template-columns: 1fr; }
  .ord .tick { height: 160px; }
  .mt5 { height: auto; min-height: calc(100vh - 52px); }
  .mt5-toolbox { height: 260px; }
}

/* narrow charts: keep the one-click panel inside the window */
.cw { overflow: hidden; container-type: inline-size; }
@container (max-width: 330px) { .ocp { transform: scale(.78); transform-origin: top left; } }
@media (max-width: 900px) {
  .mdi > .cw:not(.active) { display: none; }            /* phones: one chart at a time, switch with the tabs */
  .mdi { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
}

/* modeless windows (Depth of Market, Symbols, event history) */
.mt5-dlg-back.modeless { background: transparent; pointer-events: none; }
.mt5-dlg-back.modeless .mt5-dlg { pointer-events: auto; }
/* calendar */
.imp { display: inline-flex; gap: 1px; vertical-align: middle; }
.imp i { width: 4px; height: 10px; border-radius: 1px; display: block; }
.imp-high i { background: #e53935; } .imp-medium i { background: #fb8c00; } .imp-low i { background: #9e9e9e; }
#calTbl tr.past td { color: var(--c-muted); } #calTbl tr.past td b { color: var(--c-text); }
#calBar { flex-wrap: wrap; } #calBar .chk { gap: 4px; }
.emptybox { padding: 14px 18px; max-width: 760px; line-height: 1.5; color: var(--c-text); }
.emptybox p { color: var(--c-muted); }
/* depth of market */
.dom td { position: relative; } .dom td.c { text-align: center; }
.dom tr.ask td { color: var(--c-down); } .dom tr.bid td { color: var(--c-up); }
.dom .vb { position: absolute; top: 2px; bottom: 2px; opacity: .18; background: currentColor; }
.dom tr.ask .vb { right: 0; } .dom tr.bid .vb { left: 0; }
.dom tr.sprd td { background: var(--c-head2) !important; font-size: 11px; }
.dom-oc .oc .px { font-size: 13px; }

/* strategy tester */
.ts-wrap { display: grid; grid-template-columns: 330px 1fr; height: 100%; min-height: 0; }
.ts-form { padding: 8px; border-right: 1px solid var(--c-line); overflow: auto; grid-template-columns: 82px 1fr; align-content: start; }
.ts-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ts-tabs { border-top: none; border-bottom: 1px solid var(--c-line); }
.ts-body { flex: 1; overflow: auto; padding: 6px 8px; min-height: 0; }
.ts-head { margin-bottom: 6px; }
.ts-grid { display: grid; grid-template-columns: repeat(3, max-content minmax(90px, 1fr)); gap: 3px 10px; font-size: 12px; }
.ts-grid .k { color: var(--c-muted); } .ts-grid .v { font-family: var(--mono); font-weight: 600; }
.ts-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.ts-imgs figure { margin: 0; border: 1px solid var(--c-line); background: #fff; } .ts-imgs img { width: 100%; display: block; }
.ts-imgs figcaption { font-size: 11px; color: #555; padding: 2px 6px; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--c-sel-line); border-top-color: transparent; border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -1px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .ts-wrap { grid-template-columns: 1fr; } .ts-grid { grid-template-columns: max-content 1fr; } }
