/* Positions and account. Agent 5. */
[data-tile="positions"] .v2-body,
[data-tile="account"] .v2-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--v2-tile);
}
[data-tile="positions"] .v2-body.v2-empty,
[data-tile="account"] .v2-body.v2-empty {
  background: var(--hatch);
}
/* [05] ACCOUNT title never truncates; .x-fill + trailing controls absorb width. */
[data-tile="account"] .v2-hd > .v2-idx,
[data-tile="account"] .v2-hd > .x-pix,
[data-tile="account"] .v2-hd > span:not(.v2-acct-sp):not(.x-fill) {
  flex: 0 0 auto;
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}
.v2-acct-sp {
  /* Yields to the switcher; JS hides the chip when flex leaves a 0–5px stub ("C"). */
  flex: 0 1 auto;
  margin-left: 0;
  color: inherit;
  min-width: 0;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-pix-label, 12px);
  font-family: var(--pix, var(--mono));
  letter-spacing: 0;
}
.v2-acct-sw {
  /* Title + idx stay fixed. Fill/sp yield first; label ellipsizes inside max-width. */
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  max-width: 48%;
  height: 22px;
  min-height: 22px;
  min-width: 0;
  padding: 0 6px;
  margin-left: 0;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  overflow: hidden;
  box-shadow: none;
  background: var(--v2-tile);
  border: var(--v2-rule) solid var(--v2-line);
  color: var(--v2-text);
  font-family: var(--pix, var(--mono));
  font-size: var(--fs-pix-label, 12px);
  letter-spacing: 0;
  text-transform: uppercase;
}
/* Truncate network/label first; keep short address (+ ▾) visible. */
.v2-acct-sw-lab {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-acct-sw-who {
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
}
/* ▾ is missing from Departure; keep caret on JetBrains 12. */
.v2-acct-sw-caret {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 0.25em;
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
.v2-acct-sp + .v2-acct-sw {
  margin-left: 0;
}
/* .x-fill in the header strip pushes controls; keep auto only when fill is absent. */
.v2-hd > .v2-acct-sw:first-of-type {
  margin-left: 0;
}
.v2-hd:not(:has(.x-fill)) > .v2-acct-sp,
.v2-hd:not(:has(.x-fill)) > .v2-acct-sw:first-of-type {
  margin-left: auto;
}
.v2-acct-sw:hover,
.v2-acct-sw.on {
  background: var(--v2-rose);
  color: var(--ink);
  border-color: var(--v2-rose);
}
.v2-tile:hover > .v2-hd .v2-acct-sw {
  border-color: var(--v2-bg);
}
.v2-tile:hover > .v2-hd .v2-acct-sw:hover,
.v2-tile:hover > .v2-hd .v2-acct-sw.on {
  background: var(--v2-bg);
  color: var(--v2-rose);
  border-color: var(--v2-bg);
}
.v2-acct-pop {
  z-index: 96;
  max-height: 280px;
}
.v2-acct-pop .v2-pop-list button {
  grid-template-columns: minmax(0, 1fr) auto;
}
.v2-acct-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: var(--v2-rule);
  background: var(--v2-line);
  border-bottom: var(--v2-rule) solid var(--v2-line);
}
.v2-acct-tabs .v2-btn {
  flex: 1 1 0;
  height: 26px;
  min-width: 0;
  padding: 0 6px;
}
.v2-acct-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.v2-acct-empty {
  padding: 14px 10px;
  color: var(--v2-muted);
  letter-spacing: var(--v2-track-label);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v2-acct-empty b {
  color: var(--v2-text);
  font-weight: 700;
}
.v2-acct-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.v2-acct-table th {
  text-align: left;
  color: var(--v2-muted);
  font-weight: 400;
  letter-spacing: var(--v2-track-label);
  padding: 5px 8px;
  border-bottom: var(--v2-rule) solid var(--v2-line);
  text-transform: uppercase;
  white-space: nowrap;
}
.v2-acct-table td {
  padding: 7px 8px;
  border-bottom: var(--v2-rule) solid var(--v2-line);
  vertical-align: middle;
  white-space: nowrap;
}
.v2-acct-table .v2-act {
  width: 88px;
  padding: 0;
  text-align: right;
}
.v2-acct-table tr.v2-pos-row {
  cursor: pointer;
}
.v2-acct-table tr.v2-pos-row:hover td,
.v2-acct-table tr.v2-pos-row.on td {
  background: var(--v2-header);
}
.v2-acct-table tr.v2-pos-detail td {
  padding: 0;
  background: var(--v2-tile);
  cursor: default;
  white-space: normal;
}
.v2-acct-table tr.v2-pos-detail .v2-receipt {
  border-bottom: 0;
}
.v2-acct-table tr.v2-pos-detail .v2-receipt b.v2-up {
  color: var(--ok);
}
.v2-acct-table tr.v2-pos-detail .v2-receipt b.v2-dn {
  color: var(--crit-tx);
}
.v2-acct-act {
  height: 30px;
  min-height: 30px;
  width: 88px;
}
.v2-acct-act.sm {
  height: 26px;
  min-height: 26px;
}
.v2-acct-table .v2-side {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.v2-acct-table .v2-side.v2-buy {
  background: var(--v2-buy);
}
.v2-acct-table .v2-side.v2-sell {
  background: var(--v2-sell);
}
.v2-muted {
  color: var(--v2-muted);
}
.v2-liq {
  color: var(--v2-rose);
}
.v2-usage {
  color: var(--v2-muted);
  font-variant-numeric: tabular-nums;
}
.v2-acct-use-wrap[data-v2-usage-cells="1"] .v2-usage {
  color: var(--v2-risk-1);
}
.v2-acct-use-wrap[data-v2-usage-cells="2"] .v2-usage {
  color: var(--v2-risk-2);
}
.v2-acct-use-wrap[data-v2-usage-cells="3"] .v2-usage {
  color: var(--v2-risk-3);
}
.v2-acct-use-wrap[data-v2-usage-cells="4"] .v2-usage {
  color: var(--v2-risk-4);
}
.v2-acct-use-wrap[data-v2-usage-cells="5"] .v2-usage {
  color: var(--v2-risk-5);
}
.v2-acct-use-wrap[data-v2-usage-cells="6"] .v2-usage {
  color: var(--v2-risk-6);
}
.v2-acct-use-wrap[data-v2-usage-cells="7"] .v2-usage {
  color: var(--v2-risk-7);
}
.v2-acct-use-wrap[data-v2-usage-cells="8"] .v2-usage {
  color: var(--v2-risk-8);
}
.v2-acct-use-wrap[data-v2-usage-cells="9"] .v2-usage {
  color: var(--v2-risk-9);
}
.v2-acct-use-wrap[data-v2-usage-cells="10"] .v2-usage {
  color: var(--v2-risk-10);
}
.v2-segbar i.on:nth-child(1) {
  background: var(--v2-risk-1);
}
.v2-segbar i.on:nth-child(2) {
  background: var(--v2-risk-2);
}
.v2-segbar i.on:nth-child(3) {
  background: var(--v2-risk-3);
}
.v2-segbar i.on:nth-child(4) {
  background: var(--v2-risk-4);
}
.v2-segbar i.on:nth-child(5) {
  background: var(--v2-risk-5);
}
.v2-segbar i.on:nth-child(6) {
  background: var(--v2-risk-6);
}
.v2-segbar i.on:nth-child(7) {
  background: var(--v2-risk-7);
}
.v2-segbar i.on:nth-child(8) {
  background: var(--v2-risk-8);
}
.v2-segbar i.on:nth-child(9) {
  background: var(--v2-risk-9);
}
.v2-segbar i.on:nth-child(10) {
  background: var(--v2-risk-10);
}
.v2-pnl {
  margin-right: 6px;
}
.pshare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  cursor: pointer;
  vertical-align: middle;
}
.pshare .i {
  width: 14px;
  height: 14px;
}
.pshare:hover {
  color: var(--v2-rose);
}
.v2-acct-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.v2-eq {
  font-size: var(--v2-fs-equity);
}
.v2-sub {
  font-size: var(--v2-fs-sub);
}
.v2-acct-sub {
  display: flex;
  gap: 20px;
}
.v2-acct-use {
  display: flex;
  justify-content: space-between;
}
.v2-acct-body .v2-segbar {
  margin-top: 5px;
}
.v2-sharepop {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 105;
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: var(--v2-tile);
  color: var(--v2-text);
  border: var(--v2-rule) solid var(--v2-rose);
  outline: 0;
}
.v2-sharepop[hidden] {
  display: none;
}
.v2-sharepop > .v2-hd {
  flex: 0 0 var(--v2-hd-h);
}
.v2-sharepop > img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  background: var(--v2-bg);
  display: block;
  border-bottom: var(--v2-rule) solid var(--v2-line);
  image-rendering: auto;
}
.v2-share-mascot,
.v2-share-opts,
.v2-share-b {
  flex: 0 0 auto;
  border-top: 0;
}
.v2-share-mascot .v2-btn,
.v2-share-opts .v2-btn,
.v2-share-b .v2-btn {
  height: 30px;
  min-height: 30px;
  padding: 0 4px;
  font-size: var(--v2-fs-tag);
}
.v2-share-opts .v2-btn:disabled {
  color: var(--v2-muted);
  opacity: 0.45;
}
.v2-share-opts .v2-btn:disabled:hover {
  background: var(--v2-tile);
  color: var(--v2-muted);
}
