/* My bots and the Dashboard (agent C, redesign 2026-10-10, IA v2; polish pass 11:26 UTC): radar/web/app-trade.js botsPage,
   botsPreview and V.dashboard. Type, space, lines and motion are B's polish layer in radar/web/rv-tokens.css (.rv-title,
   .rv-kpi-lg, .rv-kpi, .rv-fig, .rv-label, .rv-sec-title, .rv-body; --rv-sec-gap, --rv-block-gap, .rv-frame, .rv-sep;
   --rv-dur, .rv-changed) and its components (.rv-btn, .rv-pills, .rv-table): this file only lays the pages out, with
   hairlines and space instead of boxes. Tokens only (merge rule 1); no local type sizes. Included by radar/app.py app_html. */
.ws-app .page > .ws-view.bm-view, .ws .bm-view { display: flex; flex-direction: column; gap: var(--rv-block-gap); max-width: var(--rv-max); margin: 0 auto; width: 100%; min-width: 0;
  color: var(--rv-text); font: 400 var(--rv-type-body)/1.55 var(--rv-font-text); }
.ws .bm-view .warn-stack:empty { display: none; }
/* the heading: the page title left, the key figures right */
.ws .bm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--rv-block-gap); }
.ws .bm-head h1 { margin: 0 0 var(--rv-sp-2); }
.ws .bm-head p { margin: 0; color: var(--rv-text-2); }
.ws .bm-figs { display: flex; flex-wrap: wrap; }
.ws .bm-fig { display: flex; flex-direction: column; gap: var(--rv-sp-1); padding: 0 var(--rv-sp-8); border-left: 1px solid var(--rv-line); min-width: 0; }
.ws .bm-fig:first-child { padding-left: 0; border-left: 0; } .ws .bm-fig:last-child { padding-right: 0; }
.ws .bm-fig > small, .ws .ds-kpi > small { color: var(--rv-text-3); font-size: var(--rv-fs-sm); }
/* section labels: B's small grey caps (.rv-sec-title on the same element) */
.ws .bm-h2 { margin: 0; }
.ws .bm-needs .bm-h2 { margin-bottom: var(--rv-sp-3); }
.ws .bm-sh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--rv-sp-3); margin-bottom: var(--rv-sp-3); }
.ws .bm-tools { display: flex; gap: var(--rv-sp-5); }
.ws .bm-sample { margin: 0 0 calc(-1 * var(--rv-sp-4)); font-size: var(--rv-fs-label); letter-spacing: var(--rv-ls-label); text-transform: uppercase; color: var(--rv-text-3); }
.ws .bm-fee { margin: 0; font-size: var(--rv-fs-sm); color: var(--rv-text-3); } .ws .bm-fee a { color: var(--rv-text-2); }
.ws .bm-view .bm-sub { margin-bottom: calc(-1 * var(--rv-sp-2)); }
/* "Needs you": a hairline list, its next steps on the right (no box) */
.ws .bm-list { border-top: 1px solid var(--rv-line); }
.ws .bm-need { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rv-sp-3) var(--rv-sp-4); margin: 0; padding: var(--rv-sp-4) 0; border-bottom: 1px solid var(--rv-line); }
.ws .bm-need > div:first-child { min-width: 0; flex: 1 1 320px; }
.ws .bm-nd { color: var(--rv-text-3); font-size: var(--rv-fs-sm); }
.ws .bm-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rv-sp-3); }
/* the bots table (the shared .rv-table in one hairline frame): its cells */
.ws .bm-tw { contain: inline-size; }
.ws .bm-t td small { white-space: nowrap; }
.ws .bm-bot a, .ws .bm-bot > span:first-child { display: flex; align-items: center; gap: var(--rv-sp-3); color: var(--rv-text); text-decoration: none; min-width: 0; }
.ws .bm-bot b { display: block; font-size: var(--rv-type-body); font-weight: 500; white-space: nowrap; }
.ws .bm-bot .rv-ci { flex: none; }
.ws .bm-ci { width: var(--rv-h-sm); height: var(--rv-h-sm); border-radius: var(--rv-r-pill); background: var(--rv-pill); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--rv-text-2); }
.ws .bm-ci .icon { width: 16px; height: 16px; }
.ws .bm-st { white-space: nowrap; } .ws .bm-stt { color: var(--rv-text-2); }
.ws .bm-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--rv-r-pill); margin-right: var(--rv-sp-2); vertical-align: 1px; background: var(--rv-text-3); }
.ws .bm-dot.run { background: var(--rv-up); } .ws .bm-dot.bad { background: var(--rv-down); } .ws .bm-dot.wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rv-text-3); }
.ws .bm-bar { position: relative; width: 140px; height: 4px; border-radius: var(--rv-r-pill); background: var(--rv-line-2); margin: var(--rv-sp-1) 0 6px; }
.ws .bm-bar i { position: absolute; top: -4px; width: 2px; height: 12px; margin-left: -1px; background: var(--rv-text); border-radius: 1px; transition: left var(--rv-dur) var(--rv-ease-out); }
.ws .bm-bar.out i { background: var(--rv-down); }
.ws .bm-k { color: var(--rv-text-2); white-space: nowrap; }
.ws .bm-res b { font-weight: 600; }
.ws .bm-menu { width: 36px; text-align: right; }
.ws .bm-more { width: var(--rv-h-sm); height: var(--rv-h-sm); border-radius: var(--rv-r-pill); border: 0; background: transparent; color: var(--rv-text-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color var(--rv-dur-fast) var(--rv-ease-out), color var(--rv-dur-fast) var(--rv-ease-out); }
.ws .bm-more:hover { background: var(--rv-pill); color: var(--rv-text); } .ws .bm-more .icon { width: 18px; height: 18px; }
.ws .bm-more:focus-visible, .ws .bm-t tr:focus-visible, .ws .ds-card:focus-visible { outline: 2px solid var(--rv-focus); outline-offset: 2px; }
.ws .bm-empty { text-align: center; } .ws .bm-empty h3 { margin: 0 0 var(--rv-sp-2); }
.ws .bm-empty p { margin: 0 auto var(--rv-sp-4); color: var(--rv-text-3); max-width: 460px; }
/* signed out: the line that says this is an example, with Connect wallet (one hairline frame) */
.ws .bm-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rv-sp-4) var(--rv-sp-6); padding: var(--rv-sp-5) var(--rv-sp-6); border: 1px solid var(--rv-line); border-radius: var(--rv-r-panel); }
.ws .bm-cta b { display: block; font-weight: 500; } .ws .bm-cta span { display: block; color: var(--rv-text-3); font-size: var(--rv-fs-sm); }
.ws .bm-cta > div:first-child { flex: 1 1 340px; min-width: 0; }
.ws .bm-view .section-title { margin-bottom: calc(-1 * var(--rv-sp-4)); }
/* narrower screens: the columns a trader needs least go first */
@media (max-width: 1240px) { .ws .bm-t .bm-last { display: none; } .ws .bm-bar { width: 110px; } }
@media (max-width: 1100px) and (min-width: 761px) {
  .ws .bm-stt { display: none; } .ws .bm-st { width: 20px; } .ws .bm-dot { margin-right: 0; }
  .ws .bm-t th { white-space: normal; vertical-align: bottom; } .ws .bm-t :is(th, td) { padding-right: 10px; }
  .ws .bm-bar { width: 84px; } .ws .bm-where small { white-space: normal; }
  .ws .bm-fig { padding: 0 var(--rv-sp-5); }
}
/* phones: the same order of importance; big figures shrink with their clamp, never wrap; each bot as one line */
@media (max-width: 760px) {
  .ws .bm-head { align-items: flex-start; }
  .ws .bm-figs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws .bm-fig, .ws .bm-fig:first-child { padding: 0; border-left: 0; } .ws .bm-fig > .rv-kpi { font-size: var(--rv-fs-fig); }
  .ws .bm-tw { overflow: visible; }
  .ws .bm-need > div:first-child { flex: none; }      /* phones stack a need over its buttons: no flex-basis gap */
  .ws .bm-tw.rv-frame { border-width: 1px 0 0; border-radius: 0; padding: 0; }      /* the list on the page's edge: a hairline on top, no frame */
  .ws .bm-t thead { display: none; }
  .ws .bm-t, .ws .bm-t tbody { display: block; }
  .ws .bm-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; grid-template-areas: "bot res menu" "where where where"; align-items: center; gap: var(--rv-sp-1) var(--rv-sp-2); padding: 14px 0; border-bottom: 1px solid var(--rv-line); }
  .ws .bm-t tbody tr:last-child { border-bottom: 0; }
  .ws .bm-t td { padding: 0; border: 0; display: none; }
  .ws .bm-t td.bm-bot { display: block; grid-area: bot; min-width: 0; } .ws .bm-bot b { white-space: normal; }
  .ws .bm-t td.bm-res { display: block; grid-area: res; } .ws .bm-t td.bm-menu { display: block; grid-area: menu; width: auto; }
  .ws .bm-t td.bm-where { display: flex; align-items: center; gap: 10px; grid-area: where; padding-left: 44px; }
  .ws .bm-bar { width: 96px; margin: 0; flex: none; }
  .ws .bm-cta { padding: var(--rv-sp-4); } .ws .bm-cta .bm-acts { width: 100%; justify-content: space-between; }
  .ws .bm-view .bm-sub { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
/* ---- the Dashboard (signed-in home): the total balance as the one big figure top right; position cards on a hairline,
   the other figures one step down in the right column ---- */
/* the title at the top like every page (Money, Build): the figure beside it, not the title pushed down to its baseline */
.ws .ds-head { align-items: flex-start; }
.ws .ds-kpi { display: flex; flex-direction: column; align-items: flex-end; gap: var(--rv-sp-1); text-align: right; min-width: 0; }
.ws .ds-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--rv-sp-12); align-items: start; }
.ws .ds-main { display: flex; flex-direction: column; gap: var(--rv-block-gap); min-width: 0; }
.ws .ds-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--rv-sp-8) var(--rv-sp-6); }
.ws .ds-card { padding: var(--rv-sp-4) 0 0; border-top: 1px solid var(--rv-line); display: flex; flex-direction: column; gap: var(--rv-sp-3); cursor: pointer; min-width: 0;
  transition: border-color var(--rv-dur-fast) var(--rv-ease-out); }
.ws .ds-card:hover { border-top-color: var(--rv-line-3); }
.ws .ds-ch { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws .ds-ch > div { flex: 1; min-width: 0; } .ws .ds-ch b { display: block; font-weight: 600; }
.ws .ds-ch small { display: block; font-size: var(--rv-fs-sm); color: var(--rv-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws .ds-pnl { font-weight: 600; }
.ws .ds-tp { display: flex; justify-content: space-between; align-items: baseline; gap: var(--rv-sp-2); }
.ws .ds-tp > span { color: var(--rv-text-3); } .ws .ds-tp b { font-weight: 500; text-align: right; }
.ws .ds-tpd { margin: calc(-1 * var(--rv-sp-2)) 0 0; font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.ws .ds-spark { display: block; width: 100%; height: 56px; color: var(--rv-text-2); }
.ws .ds-spark line.tp { stroke: var(--rv-text); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ws .ds-spark line.en { stroke: var(--rv-line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ws .ds-spark polyline { vector-effect: non-scaling-stroke; }
.ws .ds-cf { display: flex; justify-content: space-between; gap: var(--rv-sp-2); color: var(--rv-text-3); font-size: var(--rv-fs-sm); }
.ws .ds-cf b { color: var(--rv-text); font-weight: 500; }
.ws .ds-side { display: flex; flex-direction: column; }
.ws .ds-side .bm-h2 { margin-bottom: var(--rv-sp-2); }
.ws .ds-stat { display: flex; flex-direction: column; gap: var(--rv-sp-1); padding: var(--rv-sp-4) 0; border-top: 1px solid var(--rv-line); }
.ws .ds-stat > small { font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.ws .ds-more { margin: calc(-1 * var(--rv-sp-3)) 0 0; }
.ws .ds-none { margin: 0; color: var(--rv-text-3); }
.ws .ds-rt td small { margin-top: 0; }
.ws .ds-def { margin: calc(-1 * var(--rv-sp-2)) 0 var(--rv-sp-3); font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
@media (max-width: 1100px) { .ws .ds-grid { grid-template-columns: minmax(0, 1fr) 220px; gap: var(--rv-sp-8); } }
@media (max-width: 760px) {
  .ws .ds-head { align-items: flex-start; }
  .ws .ds-kpi { align-items: flex-start; text-align: left; }
  .ws .ds-grid { grid-template-columns: minmax(0, 1fr); gap: var(--rv-sec-gap); }
  .ws .ds-side { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--rv-sp-4); }
  .ws .ds-side .bm-h2 { grid-column: 1 / -1; }
  .ws .ds-cards { grid-template-columns: minmax(0, 1fr); }
  .ws .bm-t.ds-rt tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bot res"; }
}

/* The app pages' own layout (Positions and the position drawer: agent D, app-positions.js; Money: app-assets.js), moved
   out of their scripts into the page's <head> (radar/app.py app_html), so the first paint, before any app script runs,
   already lays the page out as it will stay (owner's live check, 2026-10-10 16:20 UTC: Positions and Money painted a
   "Portfolio" skeleton, then swapped title and layout). Layout only: buttons, pills, fields, tabs, tables, the drawer
   and menus are the shared components (radar/web/rv-tokens.css). */

/* ---- Positions (/positions) and the position drawer ---- */
/* layout only: buttons, pills, fields, tabs, tables, the drawer and menus are the shared components (radar/web/rv-tokens.css) */
.ps { max-width: var(--rv-max); margin: 0 auto; color: var(--rv-text); contain: inline-size; min-width: 0; width: 100%; }   /* the table scrolls inside, never the page */
.ps-hd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--rv-sp-3) var(--rv-sp-6); margin: 0 0 var(--rv-sp-5); }
.ps-hd .rv-title { margin: 0 0 var(--rv-sp-2); }
.ps-hd p { margin: 0; }
.ps-figs { display: flex; gap: var(--rv-sp-12); flex-wrap: wrap; align-items: flex-start; } .ps-figs > div { max-width: 220px; display: flex; flex-direction: column; gap: var(--rv-sp-1); min-width: 0; }
.ps-figs .rv-label { margin: 0 0 var(--rv-sp-1); } .ps-figs .rv-help { font-size: var(--rv-fs-xs); color: var(--rv-text-3); margin: 0; }
.ps-bar { display: flex; flex-wrap: wrap; gap: var(--rv-sp-2); align-items: center; margin: 0 0 var(--rv-sp-4); }
.ps-bar .grow { flex: 1 1 auto; }
.ps-bar .rv-field { width: auto; height: var(--rv-h-sm); border-radius: var(--rv-r-pill); padding: 0 var(--rv-sp-4); font-size: var(--rv-fs-sm); }
.ps-bar select.rv-field { padding-right: var(--rv-sp-3); }
.ps-bar #ps-q { width: 200px; flex: 0 1 200px; }
.ps-bar .rv-btn.quiet { font-size: var(--rv-fs-sm); }
.ps-tbl.rv-frame { padding: 0; overflow-x: auto; }
.ps-tbl .rv-table :is(th, td) { padding-left: var(--rv-sp-4); } .ps-tbl .rv-table :is(th, td):first-child { padding-left: var(--rv-sp-5); } .ps-tbl .rv-table :is(th, td):last-child { padding-right: var(--rv-sp-5); }
.ps-tbl .rv-table td, .ps-tbl .rv-table th { white-space: nowrap; }
.ps-tbl .rv-table .ps-exit { padding-left: var(--rv-sp-10); }   /* a clear gap between the right-aligned Entry price and the Exit text */
.ps-mk { display: flex; align-items: center; gap: var(--rv-sp-3); } .ps-mk b { font-weight: 600; display: block; }
.ps-mk .rv-ci, .ps-mk img, .ps-mk .lg { width: 28px; height: 28px; flex: none; }
.ps-st { display: inline-flex; align-items: center; gap: 6px; color: var(--rv-text-2); } .ps-st i { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: var(--rv-r-pill); background: var(--rv-text-3); }
.ps-st.open i { background: var(--rv-text); }
.ps-dir { display: none; }
.ps .rv-up, .pd .rv-up { color: var(--rv-up); } .ps .rv-down, .pd .rv-down { color: var(--rv-down); } .ps .mute, .pd .mute { color: var(--rv-text-3); }
.ps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 var(--rv-sp-8); border-top: 1px solid var(--rv-line); }
.ps .ps-card { text-align: left; font: inherit; color: inherit; padding: var(--rv-sp-6) 0; cursor: pointer; display: grid; gap: var(--rv-sp-2); min-width: 0;
  background: none; border: 0; border-bottom: 1px solid var(--rv-line); border-radius: 0; width: 100%; }
.ps .ps-card:hover { background: none; } .ps .ps-card:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ps-card .row { display: flex; justify-content: space-between; gap: var(--rv-sp-3); align-items: baseline; font-size: var(--rv-fs-sm); } .ps-card .row span:first-child { color: var(--rv-text-3); }
.ps-card .rv-fig { margin: var(--rv-sp-1) 0; }
.ps-card small { display: block; font-size: var(--rv-fs-xs); color: var(--rv-text-3); }
.ps-empty { padding: var(--rv-sp-12) var(--rv-sp-4); text-align: center; color: var(--rv-text-3); display: grid; gap: var(--rv-sp-3); justify-items: center; }
.ps-empty b { color: var(--rv-text); font-size: 18px; font-weight: 600; }
.ps-empty .acts { display: flex; gap: var(--rv-sp-3); flex-wrap: wrap; justify-content: center; }
.ps-so .agree { font-size: var(--rv-fs-sm); } .ps-so .agree a { color: var(--rv-text-2); }
/* the drawer: wider than a form drawer, the chart next to its tabs */
.rv-drawer.pd { width: min(1120px, 100%); background: var(--rv-bg); font-size: 14px; line-height: 1.5; }
.pd .rv-drawer-head { align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--rv-line); padding-bottom: var(--rv-sp-4); }
.pd-id { display: flex; align-items: center; gap: var(--rv-sp-3); min-width: 0; } .pd-id .rv-ci, .pd-id img, .pd-id .lg { width: 36px; height: 36px; flex: none; }
.pd-id .sub { font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.pd-acts { display: flex; gap: var(--rv-sp-2); align-items: center; flex-wrap: wrap; }
.pd-x { width: var(--rv-h-md); padding: 0; font-size: 20px; border-color: transparent; }
.pd .rv-drawer-body { display: flex; flex-wrap: wrap; gap: var(--rv-sp-6); align-items: flex-start; position: relative; }
.pd-l { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: var(--rv-sp-4); position: sticky; top: 0; }
.pd-r { flex: 1 1 360px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; gap: var(--rv-sp-4); }
.pd-demo { margin: 0; font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.pd-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rv-sp-4); }
.pd-figs > div { display: flex; flex-direction: column; gap: var(--rv-sp-1); min-width: 0; } .pd-figs .rv-label { margin: 0; } .pd-figs .rv-fig { overflow: hidden; text-overflow: ellipsis; }
.pd-ch { border-top: 1px solid var(--rv-line); border-bottom: 1px solid var(--rv-line); padding: var(--rv-sp-3) 0; }
.pd-chhd { display: flex; justify-content: space-between; gap: var(--rv-sp-3); flex-wrap: wrap; font-size: var(--rv-fs-xs); color: var(--rv-text-3); margin-bottom: 6px; }
.pd-svg { display: block; width: 100%; height: 360px; touch-action: pan-y; }
.pd-svg .drag { cursor: ns-resize; } .pd-svg .drag:hover line.v { stroke-width: 2; }
.pd-r .rv-drawer-tabs { padding: 0; margin: 0; }   /* the tabs start on the column's left edge, like its rows */
.pd-r .rv-tabs .n { margin-left: 6px; font-size: 11px; color: var(--rv-text); background: var(--rv-pill); border-radius: var(--rv-r-pill); padding: 1px 7px; }
.pd-kv > div { display: flex; justify-content: space-between; gap: var(--rv-sp-3); padding: 9px 0; border-bottom: 1px solid var(--rv-line); }
.pd-kv > div:last-child { border-bottom: 0; } .pd-kv > div > span:first-child { color: var(--rv-text-3); } .pd-kv > div > span:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-pnl { display: block; width: 100%; height: 130px; }
.pd-sechd { display: flex; justify-content: space-between; align-items: center; gap: var(--rv-sp-3); flex-wrap: wrap; margin: var(--rv-sp-1) 0 2px; }
.pd-r #pd-tab > .pd-sechd, .pd-r .pd-grp > .pd-sechd, .pd-r #pd-tab > .pd-ro { margin-top: var(--rv-sp-4); }
.pd-rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rv-line); align-items: baseline; }
.pd-rows > div:last-child { border-bottom: 0; } .pd-rows .t { color: var(--rv-text-3); font-size: var(--rv-fs-xs); font-variant-numeric: tabular-nums; } .pd-rows .n { text-align: right; font-variant-numeric: tabular-nums; }
.pd-tw { overflow-x: auto; }
.pd .rv-table { font-size: var(--rv-fs-sm); } .pd .rv-table th { padding: var(--rv-sp-2) var(--rv-sp-2) var(--rv-sp-2) 0; } .pd .rv-table td { padding: 10px var(--rv-sp-2) 10px 0; white-space: nowrap; }
.pd .rv-table tr.now td { font-weight: 600; }
.pd-empty { padding: 14px 0; color: var(--rv-text-3); }
.pd-qs { display: flex; gap: var(--rv-sp-4); flex-wrap: wrap; margin-bottom: var(--rv-sp-3); } .pd-qs > .pd-edit { flex: 1 1 100%; }
.pd .rv-btn.quiet { font-size: var(--rv-fs-sm); justify-self: start; }
.pd-grp { display: grid; gap: 2px; } .pd-grp + .pd-grp { margin-top: var(--rv-sp-3); }
.pd-ord { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--rv-sp-2); align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rv-line); }
.pd-ord .o1 { font-variant-numeric: tabular-nums; } .pd-ord .o2 { font-size: var(--rv-fs-xs); color: var(--rv-text-3); }
.pd-ord.gone .o1 { text-decoration: line-through; color: var(--rv-text-3); }
.pd-tag { font-size: 11px; color: var(--rv-text-2); border: 1px solid var(--rv-line-2); border-radius: var(--rv-r-pill); padding: 1px 8px; margin-left: 6px; }
.pd-dots { width: var(--rv-h-sm); height: var(--rv-h-sm); padding: 0; border-color: transparent; font-size: 18px; }
.rv-menu.pd-menu { position: fixed; z-index: 130; min-width: 240px; width: max-content; max-width: calc(100vw - 32px); }
.pd-menu button small { display: block; font-size: var(--rv-fs-xs); color: var(--rv-text-3); }
.pd-menu > button { flex-direction: column; align-items: flex-start; gap: 2px; }
.pd-edit { grid-column: 1 / -1; display: grid; gap: 10px; padding: var(--rv-sp-1) 0 6px; } .pd-edit .row { display: flex; gap: var(--rv-sp-3); align-items: center; flex-wrap: wrap; }
.pd-f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rv-sp-3); }
.pd-fld { display: flex; flex-direction: column; gap: 6px; font-size: var(--rv-fs-xs); color: var(--rv-text-3); min-width: 0; } .pd-fld small { font-size: 11px; }
.pd-apply { border-top: 1px solid var(--rv-line); padding-top: 14px; display: grid; gap: 10px; }
.pd-chg { display: flex; justify-content: space-between; gap: 10px; padding: var(--rv-sp-1) 0; }
.pd-chg button { padding: 0 var(--rv-sp-1); font-size: 16px; }
.pd-why { margin: 0; padding: 10px var(--rv-sp-3); border-radius: var(--rv-r-md); border: 1px solid var(--rv-down); background: var(--rv-down-soft); font-size: var(--rv-fs-sm); }
.pd-note { margin: 0; font-size: var(--rv-fs-xs); color: var(--rv-text-3); }
.pd-foot .pd-note { margin-right: auto; } .pd-foot .rv-btn.quiet { font-size: var(--rv-fs-sm); }
.pd-ro { margin: 0; font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.pd-sum { margin: 0; padding-left: 18px; color: var(--rv-text-2); display: grid; gap: 6px; }
@media (min-width: 761px) { #rv-positions[data-view="cards"] .rv-pos-table, #rv-positions:not([data-view="cards"]) .rv-pos-cards { display: none; } }
@media (max-width: 1240px) { .ps-tbl .rv-table :is(th, td):nth-child(5), .ps-tbl .rv-table :is(th, td):nth-child(8), .ps-tbl .rv-table :is(th, td):nth-child(9) { display: none; } }
@media (max-width: 760px) {
  .ps-bar #ps-q { width: 100%; flex: 1 1 100%; } .ps-dir { display: inline; } .ps-tbl .rv-table td:first-child { white-space: normal; } .ps-bar .grow { display: none; }
  .ps-tbl .rv-table :is(th, td):nth-child(n+4):not(:last-child), .ps-tbl .rv-table :is(th, td):nth-child(2) { display: none; }
  /* the filters wrap into neat lines on the page's own edges (the owner rejects cut-off sides): status, then the three
     choices, then search with the view and Export CSV; never a sideways row with a clipped last pill */
  #rv-positions.ps .rv-pos-filters { flex-wrap: wrap !important; overflow: visible; margin: 0 0 var(--rv-sp-2); padding: 0; gap: var(--rv-sp-2); }
  #rv-positions.ps .rv-pos-filters > #ps-st { flex: 1 1 100%; flex-wrap: wrap; gap: var(--rv-sp-2); }
  #rv-positions.ps .rv-pos-filters > select { flex: 0 1 auto; min-width: 0; padding: 0 var(--rv-sp-7) 0 var(--rv-sp-3); }
  #rv-positions.ps .rv-pos-filters > #ps-q { flex: 1 1 100%; }
  .ps-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rv-sp-6) var(--rv-sp-4); } .ps-figs > div { max-width: none; }
  #rv-positions.ps .rv-pos-cards { gap: 0; }
  .pd-l { position: static; } .pd-r { max-width: none; }
  .pd-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pd-svg { height: 260px; }
}
/* a question, notice, toast or money sheet opened from the drawer sits above it (no swallowed clicks) */
html.pd-open .ntc { z-index: 140; } html.pd-open #drawer { z-index: 135; }

/* ---- Money (/assets) ---- */
.ws-view.mn { display: block; color: var(--rv-text); }
.mn > * + * { margin-top: var(--rv-block-gap); } .mn > .mn-2 { margin-top: var(--rv-sec-gap); }
/* the head: the title and the two actions on the left, the one big figure (the balance) on the right */
.mn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--rv-sp-6) var(--rv-sp-8); }
.mn-title { display: flex; flex-direction: column; gap: var(--rv-sp-2); min-width: 0; } .mn-title p { margin: 0; }
.mn-acts { display: flex; gap: var(--rv-sp-2); flex-wrap: wrap; align-items: center; margin-top: var(--rv-sp-4); }
.mn-kpi { display: flex; flex-direction: column; align-items: flex-end; gap: var(--rv-sp-2); text-align: right; min-width: 0; }
.mn-kpi .rv-label { display: flex; align-items: center; gap: var(--rv-sp-2); margin: 0; }
.mn-kpi .rv-help { max-width: 320px; }
/* where the money is: a hairline, the split bar, three figures one step down */
.mn-card { border-top: 1px solid var(--rv-line); padding-top: var(--rv-sp-6); min-width: 0; }
.mn-card > .rv-sec-title { margin: 0 0 var(--rv-sp-4); }
.mn-bar { display: flex; height: 8px; border-radius: var(--rv-r-pill); overflow: hidden; gap: 2px; margin-bottom: var(--rv-sp-3); background: var(--rv-pill); }
.mn-bar span { min-width: 3px; } .mn-bar .a { background: var(--rv-text); } .mn-bar .b { background: var(--rv-text-3); }
/* the bar's legend: each part's share, under it (owner's live check, 2026-10-10 16:40 UTC) */
.mn-leg { display: flex; flex-wrap: wrap; gap: var(--rv-sp-2) var(--rv-sp-6); margin-bottom: var(--rv-sp-6); font-size: var(--rv-fs-sm); color: var(--rv-text-2); font-variant-numeric: tabular-nums; }
.mn-leg span { display: inline-flex; align-items: center; gap: var(--rv-sp-2); }
.mn-leg i { width: 8px; height: 8px; border-radius: var(--rv-r-pill); display: inline-block; } .mn-leg i.a { background: var(--rv-text); } .mn-leg i.b { background: var(--rv-text-3); }
.mn-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--rv-sp-8); }
.mn-3 > div { display: flex; flex-direction: column; gap: var(--rv-sp-1); min-width: 0; }
.mn-3 .rv-label { display: flex; align-items: center; gap: var(--rv-sp-2); margin: 0 0 var(--rv-sp-1); }
.mn-3 .rv-label i { width: 6px; height: 6px; border-radius: var(--rv-r-pill); display: inline-block; flex: none; } .mn-3 .rv-label i.a { background: var(--rv-text); } .mn-3 .rv-label i.b { background: var(--rv-text-3); }
/* Money's own Deposit / Withdraw panel: the facts on the left, the amount and the one primary pill on the right */
.mn-pane .mn-ph { display: flex; align-items: baseline; justify-content: space-between; gap: var(--rv-sp-4); margin: 0 0 var(--rv-sp-4); }
.mn-pane .mn-ph .rv-sec-title { margin: 0; }
.mn-pg { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--rv-sp-6) var(--rv-sp-12); align-items: start; }
.mn-facts .mn-row:last-of-type { border-bottom: 1px solid var(--rv-line); } .mn-facts .rv-help { margin-top: var(--rv-sp-4); }
.mn-addr { font-variant-numeric: tabular-nums; color: var(--rv-text-2); margin-left: var(--rv-sp-1); }
.mn-do { display: flex; flex-direction: column; gap: var(--rv-sp-3); min-width: 0; }
.mn-do .rv-label { margin: 0; } .mn-do > .rv-btn.primary { align-self: flex-start; }
.mn-amt { display: flex; align-items: center; gap: var(--rv-sp-3); } .mn-amt .rv-field { flex: 1 1 auto; min-width: 0; font-variant-numeric: tabular-nums; }
.mn-amt > span { color: var(--rv-text-3); font-size: var(--rv-fs-sm); }
.mn-do .dsteps { margin: 0; padding-left: 18px; color: var(--rv-text-2); font-size: var(--rv-fs-sm); }
.mn-3 .rv-fig { overflow: hidden; text-overflow: ellipsis; }
.mn-3 .s { font-size: var(--rv-fs-sm); color: var(--rv-text-2); } .mn .rv-help { font-size: var(--rv-fs-xs); color: var(--rv-text-3); margin: 0; }
.mn-split { display: flex; flex-wrap: wrap; gap: var(--rv-sp-2) var(--rv-sp-6); margin-top: var(--rv-sp-6); font-size: var(--rv-fs-sm); color: var(--rv-text-3); }
.mn-split b { color: var(--rv-text); font-weight: 500; font-variant-numeric: tabular-nums; }
/* fees and money moves: two columns of hairline rows */
.mn-2 { display: flex; flex-wrap: wrap; gap: var(--rv-sp-8) var(--rv-sp-12); } .mn-2 > .mn-card { flex: 1 1 420px; }
.mn-row { display: flex; justify-content: space-between; gap: var(--rv-sp-4); padding: var(--rv-sp-4) 0; border-bottom: 1px solid var(--rv-line); }
.mn-row:last-of-type { border-bottom: 0; } .mn-row > span:first-child { color: var(--rv-text-3); } .mn-row > span:last-child { color: var(--rv-text); text-align: right; font-variant-numeric: tabular-nums; }
.mn-mv { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--rv-sp-4); padding: var(--rv-sp-4) 0; border-bottom: 1px solid var(--rv-line); }
.mn-mv:last-of-type { border-bottom: 0; } .mn-mv .t { color: var(--rv-text-3); } .mn-mv > span:nth-child(2) { color: var(--rv-text); } .mn-mv .n { color: var(--rv-text); font-variant-numeric: tabular-nums; text-align: right; }
.mn-empty { padding: var(--rv-sp-4) 0; color: var(--rv-text-3); margin: 0; }
.mn-err { display: flex; align-items: center; justify-content: space-between; gap: var(--rv-sp-4); flex-wrap: wrap; padding: var(--rv-sp-4) 0; border-top: 1px solid var(--rv-line); border-bottom: 1px solid var(--rv-line); color: var(--rv-text-2); }
.mn-more { padding-top: var(--rv-sp-4); border-top: 1px solid var(--rv-line); } .mn-more a { color: var(--rv-text-2); } .mn-more a:hover { color: var(--rv-text); }
.mn .rv-up { color: var(--rv-up); } .mn .rv-down { color: var(--rv-down); } .mn .mute { color: var(--rv-text-3); }
.mn-so { display: grid; gap: var(--rv-sp-4); justify-items: center; text-align: center; padding: var(--rv-sp-12) var(--rv-sp-4); color: var(--rv-text-3); }
.mn-so b { color: var(--rv-text); font-size: var(--rv-fs-fig); font-weight: 600; } .mn-so .agree { font-size: var(--rv-fs-sm); } .mn-so .agree a { color: var(--rv-text-2); }
@media (max-width: 1000px) { .mn-3 { gap: var(--rv-sp-6); } }
/* phones: the same order of importance, stacked; no box (the shared phone sheet's panel look is undone here) */
@media (max-width: 760px) {
  #rv-money.mn .rv-money-head { display: flex; flex-direction: column; align-items: stretch; gap: var(--rv-sp-4); }
  #rv-money.mn .mn-title { display: contents; } #rv-money.mn .mn-title .rv-title { order: 0; }
  #rv-money.mn .mn-title p { order: 1; } #rv-money.mn .mn-kpi { order: 2; align-items: flex-start; text-align: left; margin-top: var(--rv-sp-2); }
  #rv-money.mn .mn-acts { order: 3; margin-top: var(--rv-sp-2); }
  #rv-money.mn .rv-money-bal { border-radius: 0; padding: var(--rv-sp-6) 0 0; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
  #rv-money.mn .mn-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rv-sp-6) var(--rv-sp-4); }
  #rv-money.mn .mn-3 > :first-child { grid-column: 1 / -1; }
  .mn-pg { grid-template-columns: minmax(0, 1fr); } .mn-do > .rv-btn.primary { align-self: stretch; }
  #rv-money.mn .mn-2 { flex-direction: column; gap: var(--rv-sec-gap); } #rv-money.mn .mn-2 > .mn-card { flex: none; }   /* stacked: no 420px basis as a height */
  .mn-mv { grid-template-columns: 56px minmax(0, 1fr) auto; }
}
