/* Sell order book: equal price, PIT quantity, total columns. */
#sellManager .sell-book-head,
#sellManager .sell-book .sell-row:not(.buy-row) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#sellManager .sell-book-head > :nth-child(2),
#sellManager .sell-book .sell-row:not(.buy-row) > :nth-child(2) {
  text-align: center;
}
#sellManager .sell-book-head > :nth-child(3),
#sellManager .sell-book .sell-row:not(.buy-row) > :nth-child(3) {
  text-align: right;
}
@media (max-width:390px) {
  #sellManager .sell-book-head,
  #sellManager .sell-book .sell-row:not(.buy-row) { gap:2px; }
  #sellManager .sell-book-head { font-size:10px; }
  #sellManager .sell-book .sell-row:not(.buy-row) { font-size:11px; letter-spacing:-.02em; }
}

/* Keep the V3 links beside the title and the refresh action at the far edge. */
#sellManager .sell-heading {
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:8px;
}
#sellManager .sell-heading > div:first-child { flex:0 0 auto; }
#sellManager .sell-heading h2 { margin:0; }
#sellManager .sell-heading-actions {
  display:flex;
  align-items:center;
  flex:1 1 auto;
  min-width:0;
  max-width:none;
  flex-wrap:nowrap;
  gap:5px;
}
#sellManager .sell-heading-actions a { white-space:nowrap; }
#sellManager .sell-heading-actions #sellRefresh {
  margin-left:auto;
  white-space:nowrap;
}
/* The last-check line has half the old vertical padding. */
#sellManager #sellStatus { padding:6px 0; min-height:32px; }
@media (max-width:390px) {
  #sellManager .sell-heading h2 { font-size:20px; }
  #sellManager .sell-heading-actions a { font-size:11px; padding:6px 1px; }
  #sellManager .sell-heading-actions #sellRefresh { font-size:11px; padding:7px 6px; min-height:34px; }
}

/* Three buy-order columns: execution price, PIT at full conversion, budget. */
#sellManager .buy-book-head,
#sellManager .sell-book .buy-row {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  align-items:center;
}
#sellManager .buy-book-head { font-size:11px; line-height:1.25; }
#sellManager .buy-book-head > :nth-child(1),
#sellManager .sell-book .buy-row > :nth-child(1) { text-align:left; }
#sellManager .buy-book-head > :nth-child(2),
#sellManager .sell-book .buy-row > :nth-child(2) { text-align:center; }
#sellManager .buy-book-head > :nth-child(3),
#sellManager .sell-book .buy-row > :nth-child(3) { text-align:right; }
#sellManager .buy-book-head > span,
#sellManager .sell-book .buy-row > span { min-width:0; overflow-wrap:anywhere; }
#sellManager .sell-book .buy-row > span small {
  display:block;
  font-size:10px;
  font-weight:400;
  line-height:1.3;
  color:var(--sell-muted);
}
@media (max-width:390px) {
  #sellManager .buy-book-head,
  #sellManager .sell-book .buy-row { gap:2px; padding-left:3px; padding-right:3px; }
  #sellManager .buy-book-head { font-size:10px; }
  #sellManager .sell-book .buy-row { font-size:11px; }
  #sellManager .sell-book .buy-row > span small { font-size:9px; }
}
/* Loaded after legacy grid !important rules: hidden tabs must stay hidden. */
#sellManager [hidden] { display:none!important; }
