/* Local UI overrides. Keep changes here so the downloaded build stays easy to compare. */

/* 登录页：去掉账号和密码输入框前置图标。 */
html body #root .login-panel__form .login-field__icon {
  display: none !important;
}

html body #root .login-panel__form .login-field__control input {
  padding-left: 0.75rem !important;
}

/* 仓位汇总表格：表头与数据按同一列轨道左对齐。 */
.ratio-position-table {
  --ratio-position-table-min-width: 1744px;
  --ratio-position-table-grid: 92px repeat(5, 68px) repeat(7, 112px) repeat(3, 132px) minmax(132px, 1fr);
  table-layout: fixed !important;
  width: 100% !important;
  min-width: var(--ratio-position-table-min-width) !important;
  background: #ffffff !important;
}

/* 交易明细表格：下级 / 本级 / 上级分组底色。 */
html body #root .deal-history-sticky-table thead tr:first-child th:nth-child(2),
html body #root .deal-history-sticky-table thead tr:nth-child(2) th:nth-child(n+16):nth-child(-n+19) {
  background: #F8FCFA !important;
}

html body #root .deal-history-sticky-table thead tr:first-child th:nth-child(3),
html body #root .deal-history-sticky-table thead tr:nth-child(2) th:nth-child(n+20):nth-child(-n+23) {
  background: #F5FAFD !important;
}

html body #root .deal-history-sticky-table thead tr:first-child th:nth-child(4),
html body #root .deal-history-sticky-table thead tr:nth-child(2) th:nth-child(n+24):nth-child(-n+27) {
  background: #FFFCF4 !important;
}

html body #root .deal-history-sticky-table tbody tr:not(:last-child) td:nth-child(n+16):nth-child(-n+19),
html body #root .deal-history-sticky-table tbody tr:last-child td:nth-child(n+6):nth-child(-n+9) {
  background: #F8FCFA !important;
}

html body #root .deal-history-sticky-table tbody tr:not(:last-child) td:nth-child(n+20):nth-child(-n+23),
html body #root .deal-history-sticky-table tbody tr:last-child td:nth-child(n+10):nth-child(-n+13) {
  background: #F5FAFD !important;
}

html body #root .deal-history-sticky-table tbody tr:not(:last-child) td:nth-child(n+24):nth-child(-n+27),
html body #root .deal-history-sticky-table tbody tr:last-child td:nth-child(n+14):nth-child(-n+17) {
  background: #FFFCF4 !important;
}

/* 持仓订单表格：仅本级分组底色。 */
html body #root table.daily-position-sticky-table > thead > tr:first-child > *:nth-child(3),
html body #root table.daily-position-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+16):nth-child(-n+20) {
  background: #F5FAFD !important;
  background-color: #F5FAFD !important;
  background-image: linear-gradient(#F5FAFD, #F5FAFD) !important;
  box-shadow: inset 0 0 0 9999px #F5FAFD, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.daily-position-sticky-table > tbody > tr > *:nth-child(n+17):nth-child(-n+21) {
  background: #F5FAFD !important;
  background-color: #F5FAFD !important;
  background-image: linear-gradient(#F5FAFD, #F5FAFD) !important;
}

/* 持仓历史表格：下级 / 本级 / 上级分组底色。 */
html body #root table.position-history-sticky-table > thead > tr:first-child > *:nth-child(2),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+16):nth-child(-n+18) {
  background: #F8FCFA !important;
  background-color: #F8FCFA !important;
  background-image: linear-gradient(#F8FCFA, #F8FCFA) !important;
  box-shadow: inset 0 0 0 9999px #F8FCFA, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.position-history-sticky-table > thead > tr:first-child > *:nth-child(3),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+19):nth-child(-n+21) {
  background: #F5FAFD !important;
  background-color: #F5FAFD !important;
  background-image: linear-gradient(#F5FAFD, #F5FAFD) !important;
  box-shadow: inset 0 0 0 9999px #F5FAFD, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.position-history-sticky-table > thead > tr:first-child > *:nth-child(4),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+22):nth-child(-n+24) {
  background: #FFFCF4 !important;
  background-color: #FFFCF4 !important;
  background-image: linear-gradient(#FFFCF4, #FFFCF4) !important;
  box-shadow: inset 0 0 0 9999px #FFFCF4, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.position-history-sticky-table > tbody > tr > *:nth-child(n+16):nth-child(-n+18) {
  background: #F8FCFA !important;
  background-color: #F8FCFA !important;
  background-image: linear-gradient(#F8FCFA, #F8FCFA) !important;
}

html body #root table.position-history-sticky-table > tbody > tr > *:nth-child(n+19):nth-child(-n+21) {
  background: #F5FAFD !important;
  background-color: #F5FAFD !important;
  background-image: linear-gradient(#F5FAFD, #F5FAFD) !important;
}

html body #root table.position-history-sticky-table > tbody > tr > *:nth-child(n+22):nth-child(-n+24) {
  background: #FFFCF4 !important;
  background-color: #FFFCF4 !important;
  background-image: linear-gradient(#FFFCF4, #FFFCF4) !important;
}

html body #root .ratio-position-table thead,
html body #root .ratio-position-table tbody {
  display: block !important;
  width: 100% !important;
  min-width: var(--ratio-position-table-min-width) !important;
  background: #ffffff !important;
}

html body #root .ratio-position-table thead tr,
html body #root .ratio-position-table tbody tr {
  display: grid !important;
  grid-template-columns: var(--ratio-position-table-grid);
  width: 100% !important;
  min-width: var(--ratio-position-table-min-width) !important;
}

html body #root .ratio-position-table thead th,
html body #root .ratio-position-table tbody td {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 12px 12px !important;
  text-align: left !important;
}

html body #root .ratio-position-table thead th:first-child,
html body #root .ratio-position-table tbody td:first-child {
  padding-left: 14px !important;
}

html body #root .ratio-position-table thead th:not(:first-child),
html body #root .ratio-position-table tbody td:not(:first-child) {
  padding-left: 4px !important;
}

html body #root .ratio-position-table thead th > button,
html body #root .ratio-position-table thead th > div,
html body #root .ratio-position-table tbody td > div,
html body #root .ratio-position-table tbody td > button {
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  min-width: 0 !important;
  text-align: left !important;
  width: auto !important;
}

html body #root .ratio-position-table thead th > button > span {
  order: 1;
}

html body #root .ratio-position-table thead th > button > svg {
  flex: 0 0 auto;
  margin-left: 2px;
  order: 2;
}

/* 仓位汇总数量列：买数量为蓝色，卖数量为红色，包含合计行。 */
html body #root .ratio-position-table tbody td:nth-child(3),
html body #root .ratio-position-table tbody td:nth-child(3) * {
  color: #2563eb !important;
}

html body #root .ratio-position-table tbody td:nth-child(4),
html body #root .ratio-position-table tbody td:nth-child(4) * {
  color: #ef4444 !important;
}

/* 仓位汇总表格外框铺满页面卡片宽度。 */
html body #root .space-y-5 > .page-table-card:has(.ratio-position-table) {
  box-sizing: border-box !important;
  margin-left: -20px !important;
  margin-right: -20px !important;
  width: auto !important;
  max-width: none !important;
  background: #ffffff !important;
}

html body #root .space-y-5 > .page-table-card:has(.ratio-position-table) > .overflow-x-auto {
  width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
}

/* 超宽屏：表格内容宽度不足以铺满视口时，连同外框一起居中显示。 */
@media (min-width: 1900px) {
  html body #root .space-y-5 > .page-table-card:has(.ratio-position-table) {
    margin-left: auto !important;
    margin-right: auto !important;
    width: var(--ratio-position-table-min-width, 1744px) !important;
    max-width: var(--ratio-position-table-min-width, 1744px) !important;
  }

  html body #root .space-y-5 > .page-surface-card:has(.tradingview-widget-container) {
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: var(--ratio-position-table-min-width, 1744px) !important;
    max-width: var(--ratio-position-table-min-width, 1744px) !important;
  }

  html body #root .space-y-5 > .page-table-card:has(.ratio-position-table) > .overflow-x-auto,
  html body #root .ratio-position-table,
  html body #root .ratio-position-table thead,
  html body #root .ratio-position-table tbody,
  html body #root .ratio-position-table thead tr,
  html body #root .ratio-position-table tbody tr {
    width: var(--ratio-position-table-min-width, 1744px) !important;
    max-width: var(--ratio-position-table-min-width, 1744px) !important;
  }
}

/* 交易明细表头最终覆盖：压过组件自带背景与 sticky 行背景。 */
html body #root table.deal-history-sticky-table > thead > tr:first-child > *:nth-child(2),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+16):nth-child(-n+19) {
  background: #F8FCFA !important;
  background-color: #F8FCFA !important;
  background-image: linear-gradient(#F8FCFA, #F8FCFA) !important;
  box-shadow: inset 0 0 0 9999px #F8FCFA, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.deal-history-sticky-table > thead > tr:first-child > *:nth-child(3),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+20):nth-child(-n+23) {
  background: #F5FAFD !important;
  background-color: #F5FAFD !important;
  background-image: linear-gradient(#F5FAFD, #F5FAFD) !important;
  box-shadow: inset 0 0 0 9999px #F5FAFD, inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.deal-history-sticky-table > thead > tr:first-child > *:nth-child(4),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > *:nth-child(n+24):nth-child(-n+27) {
  background: #FFFCF4 !important;
  background-color: #FFFCF4 !important;
  background-image: linear-gradient(#FFFCF4, #FFFCF4) !important;
  box-shadow: inset 0 0 0 9999px #FFFCF4, inset 0 -1px 0 #d6dde8 !important;
}

/* 交易明细 sticky 表头边框：滚动时用内阴影保留分隔线。 */
html body #root table.deal-history-sticky-table > thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  background: #f9fafb !important;
}

html body #root table.deal-history-sticky-table > thead > tr {
  box-shadow: inset 0 -1px 0 #d6dde8 !important;
}

html body #root table.deal-history-sticky-table > thead > tr > th {
  border-bottom: 1px solid #d6dde8 !important;
  background-clip: padding-box !important;
  isolation: isolate !important;
  position: relative !important;
  z-index: 41 !important;
}

html body #root table.deal-history-sticky-table > thead > tr:first-child > th:nth-child(1),
html body #root table.deal-history-sticky-table > thead > tr:first-child > th:nth-child(2),
html body #root table.deal-history-sticky-table > thead > tr:first-child > th:nth-child(3) {
  border-right: 1px solid #d6dde8 !important;
}

html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(15),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(19),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(23) {
  border-right: 1px solid #d6dde8 !important;
}

/* 通用 sticky 表头边框：滚动时用内阴影保留表头底线，避免被数据行覆盖。 */
html body #root table.fixed-data-table > thead,
html body #root table.deal-history-sticky-table > thead,
html body #root table.daily-position-sticky-table > thead,
html body #root table.position-history-sticky-table > thead,
html body #root table.account-summary-table > thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  background: #f9fafb !important;
}

html body #root table.fixed-data-table > thead > tr,
html body #root table.deal-history-sticky-table > thead > tr,
html body #root table.daily-position-sticky-table > thead > tr,
html body #root table.position-history-sticky-table > thead > tr,
html body #root table.account-summary-table > thead > tr {
  background-clip: padding-box !important;
  box-shadow: inset 0 -1px 0 #d6dde8, 0 1px 0 #d6dde8 !important;
  position: sticky !important;
  z-index: 61 !important;
}

html body #root table.fixed-data-table > thead > tr:first-child,
html body #root table.deal-history-sticky-table > thead > tr:first-child,
html body #root table.daily-position-sticky-table > thead > tr:first-child,
html body #root table.position-history-sticky-table > thead > tr:first-child,
html body #root table.account-summary-table > thead > tr:first-child {
  top: 0 !important;
}

html body #root table.fixed-data-table > thead > tr:nth-child(2),
html body #root table.deal-history-sticky-table > thead > tr:nth-child(2),
html body #root table.daily-position-sticky-table > thead > tr:nth-child(2),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2),
html body #root table.account-summary-table > thead > tr:nth-child(2) {
  top: 36px !important;
}

html body #root table.fixed-data-table > thead > tr > th,
html body #root table.deal-history-sticky-table > thead > tr > th,
html body #root table.daily-position-sticky-table > thead > tr > th,
html body #root table.position-history-sticky-table > thead > tr > th,
html body #root table.account-summary-table > thead > tr > th {
  background-clip: padding-box !important;
  border-bottom: 1px solid #d6dde8 !important;
  box-shadow: inset 0 -1px 0 #d6dde8 !important;
  isolation: isolate !important;
  position: relative !important;
  z-index: 62 !important;
}

html body #root table.daily-position-sticky-table > thead > tr:first-child > th:nth-child(1),
html body #root table.daily-position-sticky-table > thead > tr:first-child > th:nth-child(2),
html body #root table.daily-position-sticky-table > thead > tr:nth-child(2) > th:nth-child(15),
html body #root table.position-history-sticky-table > thead > tr:first-child > th:nth-child(1),
html body #root table.position-history-sticky-table > thead > tr:first-child > th:nth-child(2),
html body #root table.position-history-sticky-table > thead > tr:first-child > th:nth-child(3),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(15),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(18),
html body #root table.position-history-sticky-table > thead > tr:nth-child(2) > th:nth-child(21) {
  border-right: 1px solid #d6dde8 !important;
}

/* 账户汇总的表头由 thead 整体固定，避免双行表头单独 sticky 后互相覆盖。 */
html body #root table.account-summary-table > thead > tr {
  position: static !important;
  top: auto !important;
}

html body #root table.account-summary-table > tfoot > tr > * {
  border-right: 0 !important;
  border-left: 0 !important;
  border-bottom: 1px solid #d6dde8 !important;
}

/* Radix 弹层要高于 sticky 表头，避免列设置菜单被表头遮挡。 */
html body [data-radix-popper-content-wrapper],
html body [data-radix-menu-content],
html body [data-radix-popover-content],
html body .account-summary-column-menu,
html body .contribution-column-menu {
  z-index: 100010 !important;
}

/* 消息管理：所有消息列表和设置表统一左对齐。 */
html body #root table.message-management-table th,
html body #root table.message-management-table td {
  text-align: left !important;
}

html body #root table.message-management-table th > *,
html body #root table.message-management-table td > *,
html body #root table.message-management-table th div,
html body #root table.message-management-table td div {
  justify-content: flex-start !important;
  text-align: left !important;
}

html body #root table.message-management-table .text-center,
html body #root table.message-management-table [class*="text-center"],
html body #root table.message-management-table th button,
html body #root table.message-management-table td button,
html body #root table.message-management-table th [role="button"],
html body #root table.message-management-table td [role="button"] {
  text-align: left !important;
  justify-content: flex-start !important;
}

html body #root table.message-management-table .justify-center,
html body #root table.message-management-table [class*="justify-center"] {
  justify-content: flex-start !important;
}

html body #root table.message-management-table .mx-auto,
html body #root table.message-management-table input,
html body #root table.message-management-table [role="switch"] {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* 兼容消息管理实际渲染出的 trading-table selector，确保表头和数据都不被主表格样式居中覆盖。 */
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full th,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full td,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full th *,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full td * {
  text-align: left !important;
}

html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full th > *,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full td > *,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full th div,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full td div,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full th button,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full td button {
  justify-content: flex-start !important;
  align-items: center !important;
}

html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full .mx-auto,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full input,
html body #root .message-management-card > div.px-5.pb-5 > div.relative.w-full > table.trading-table.w-full [role="switch"] {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* 消息管理：宽屏下固定列边界，避免表头在被拉宽的单元格里居中。 */
html body #root .message-management-card table.trading-table.message-management-table {
  table-layout: fixed !important;
  width: 100% !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th,
html body #root .message-management-card table.trading-table.message-management-table tbody td {
  text-align: left !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  vertical-align: middle !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th > .flex,
html body #root .message-management-card table.trading-table.message-management-table thead th > button,
html body #root .message-management-card table.trading-table.message-management-table thead th > div,
html body #root .message-management-card table.trading-table.message-management-table tbody td > .flex,
html body #root .message-management-card table.trading-table.message-management-table tbody td > button,
html body #root .message-management-card table.trading-table.message-management-table tbody td > div {
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th:nth-child(1),
html body #root .message-management-card table.trading-table.message-management-table tbody td:nth-child(1) {
  width: 220px !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th:nth-child(2),
html body #root .message-management-card table.trading-table.message-management-table tbody td:nth-child(2) {
  width: 160px !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th:nth-child(3),
html body #root .message-management-card table.trading-table.message-management-table tbody td:nth-child(3) {
  width: 160px !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th:last-child,
html body #root .message-management-card table.trading-table.message-management-table tbody td:last-child {
  width: auto !important;
}

/* 消息管理页签：按列数使用固定网格列，确保表头与数据左边界完全一致。 */
html body #root .message-management-card div.relative.w-full:has(> table.trading-table.message-management-table) {
  overflow-x: auto !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child),
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child),
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) {
  display: block !important;
  table-layout: auto !important;
  min-width: 100% !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) thead,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) tbody,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) thead,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) tbody,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) thead,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) tbody {
  display: block !important;
  width: 100% !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) tr,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) tr,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) tr {
  display: grid !important;
  width: 100% !important;
  align-items: center !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) tr {
  grid-template-columns: 220px 160px 160px minmax(0, 1fr) !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) tr {
  grid-template-columns: 220px 160px 160px 160px minmax(0, 1fr) !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) tr {
  grid-template-columns: 240px 170px 220px minmax(260px, 0.8fr) 160px minmax(320px, 1fr) !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child),
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) {
  display: block !important;
  table-layout: auto !important;
  min-width: 100% !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) thead,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) tbody,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) thead,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) tbody {
  display: block !important;
  width: 100% !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) tr,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) tr {
  display: grid !important;
  width: 100% !important;
  align-items: center !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) tr {
  grid-template-columns: 220px 160px 160px 160px 160px 180px minmax(0, 1fr) !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) tr {
  grid-template-columns: 220px 160px 160px 160px 160px 160px 180px minmax(0, 1fr) !important;
}

/* 日志查询 6 列表格：设备终端列保持单行，避免这一列换行后看起来错位。 */
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) th:nth-child(4),
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) td:nth-child(4),
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) th:nth-child(4) *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) td:nth-child(4) * {
  white-space: nowrap !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) th,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) td,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) th,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) td,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) th,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) td,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) th,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) td,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) th,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) td {
  display: flex !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) th > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(4):last-child) td > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) th > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(5):last-child) td > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) th > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(6):last-child) td > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) th > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(7):last-child) td > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) th > *,
html body #root .message-management-card table.trading-table.message-management-table:has(thead th:nth-child(8):last-child) td > * {
  justify-content: flex-start !important;
  text-align: left !important;
}

/* 表格统一：交易 / 订单 / 历史 / 报表 / 账户汇总 / 贡献表按 A 类业务表格观感处理。 */
html body #root table.fixed-data-table,
html body #root table.account-summary-table,
html body #root table.contribution-table,
html body #root table.reports-table,
html body #root table.account-admin-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  background: #ffffff !important;
}

html body #root table.contribution-table > thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  background: #f9fafb !important;
}

html body #root table.fixed-data-table > thead > tr > th,
html body #root table.account-summary-table > thead > tr > th,
html body #root table.contribution-table > thead > tr > th,
html body #root table.reports-table > thead > tr > th,
html body #root table.account-admin-table > thead > tr > th {
  height: 36px !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid #d6dde8 !important;
  background-clip: padding-box !important;
  color: #1a1a2e !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

html body #root table.fixed-data-table > tbody > tr > td,
html body #root table.fixed-data-table > tfoot > tr > td,
html body #root table.account-summary-table > tbody > tr > td,
html body #root table.account-summary-table > tfoot > tr > td,
html body #root table.contribution-table > tbody > tr > td,
html body #root table.reports-table > tbody > tr > td,
html body #root table.account-admin-table > tbody > tr > td {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
}

html body #root table.contribution-table > thead > tr,
html body #root table.contribution-table > tbody > tr {
  border-bottom: 1px solid #e2e8f0 !important;
}

html body #root .account-summary-column-menu,
html body #root .contribution-column-menu {
  min-width: 176px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  padding: 6px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important;
}

html body #root .account-summary-column-menu [role="menuitem"],
html body #root .contribution-column-menu [role="menuitem"] {
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* 轻量表格：消息设置、规则、参数、个人日志、跟单表格保留轻量结构，但对齐、字体、边框、行高跟 A 类一致。 */
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  background: #ffffff !important;
}

html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) thead th,
html body #root .page-mini-th {
  height: 36px !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid #d6dde8 !important;
  background: #f9fafb !important;
  color: #1a1a2e !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) tbody td,
html body #root .page-mini-td {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  vertical-align: middle !important;
}

html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) thead th > *,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) tbody td > *,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) thead th button,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) tbody td button {
  justify-content: flex-start !important;
  text-align: left !important;
}

html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) .text-center,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) [class*="text-center"],
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) .justify-center,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) [class*="justify-center"] {
  text-align: left !important;
  justify-content: flex-start !important;
}

html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) .mx-auto,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) input,
html body #root table.trading-table:not(.fixed-data-table):not(.ratio-position-table):not(.account-summary-table):not(.contribution-table):not(.reports-table) [role="switch"] {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* 消息/日志表最终覆盖：放在通用轻量表格规则之后，确保只保留单条行边框。 */
html body #root .message-management-card table.trading-table.message-management-table thead tr {
  border-bottom: 1px solid #d6dde8 !important;
  box-shadow: none !important;
}

html body #root .message-management-card table.trading-table.message-management-table tbody tr {
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

html body #root .message-management-card table.trading-table.message-management-table thead th,
html body #root .message-management-card table.trading-table.message-management-table tbody td {
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* 账号管理新增/修改页：参数表会按已选功能动态隐藏列，必须覆盖组件内部的居中类。 */
html body table.account-parameter-table th,
html body table.account-parameter-table td,
html body table.account-admin-table th,
html body table.account-admin-table td {
  text-align: left !important;
}

html body table.account-parameter-table th > *,
html body table.account-parameter-table td > *,
html body table.account-parameter-table th button,
html body table.account-parameter-table td button,
html body table.account-parameter-table th [role="button"],
html body table.account-parameter-table td [role="button"],
html body table.account-admin-table th > *,
html body table.account-admin-table td > *,
html body table.account-admin-table th button,
html body table.account-admin-table td button,
html body table.account-admin-table th [role="button"],
html body table.account-admin-table td [role="button"] {
  justify-content: flex-start !important;
  text-align: left !important;
}

html body table.account-parameter-table .text-center,
html body table.account-parameter-table [class*="text-center"],
html body table.account-admin-table .text-center,
html body table.account-admin-table [class*="text-center"] {
  text-align: left !important;
}

html body table.account-parameter-table .justify-center,
html body table.account-parameter-table [class*="justify-center"],
html body table.account-admin-table .justify-center,
html body table.account-admin-table [class*="justify-center"] {
  justify-content: flex-start !important;
}

html body table.account-parameter-table .mx-auto,
html body table.account-parameter-table [class*="mx-auto"],
html body table.account-admin-table .mx-auto,
html body table.account-admin-table [class*="mx-auto"] {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html body table.account-parameter-table input,
html body table.account-admin-table input {
  text-align: left !important;
}

/* 账号管理参数表最终覆盖：新增/修改页功能列动态变化时，表头和控件都从列左边界开始。 */
html body #root table.trading-table.account-parameter-table {
  table-layout: auto !important;
}

html body #root table.trading-table.account-parameter-table > thead > tr > th,
html body #root table.trading-table.account-parameter-table > tbody > tr > td {
  text-align: left !important;
  justify-content: flex-start !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

html body #root table.trading-table.account-parameter-table > thead > tr > th.text-center,
html body #root table.trading-table.account-parameter-table > thead > tr > th[class*="text-center"],
html body #root table.trading-table.account-parameter-table > tbody > tr > td.text-center,
html body #root table.trading-table.account-parameter-table > tbody > tr > td[class*="text-center"] {
  text-align: left !important;
}

html body #root table.trading-table.account-parameter-table > thead > tr > th > *,
html body #root table.trading-table.account-parameter-table > tbody > tr > td > *,
html body #root table.trading-table.account-parameter-table > thead > tr > th button,
html body #root table.trading-table.account-parameter-table > tbody > tr > td button,
html body #root table.trading-table.account-parameter-table > thead > tr > th div,
html body #root table.trading-table.account-parameter-table > tbody > tr > td div {
  justify-content: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

html body #root table.trading-table.account-parameter-table > tbody > tr > td .mx-auto,
html body #root table.trading-table.account-parameter-table > tbody > tr > td [class*="mx-auto"] {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html body #root table.trading-table.account-parameter-table > tbody > tr > td .justify-center,
html body #root table.trading-table.account-parameter-table > tbody > tr > td [class*="justify-center"] {
  justify-content: flex-start !important;
}

html body #root table.trading-table.account-parameter-table > tbody > tr > td input {
  text-align: left !important;
}

/* 左侧菜单：支持展开/只显示图标的折叠状态，默认展开。 */
html body #root .layout-sidebar {
  transition: width 0.18s ease, padding 0.18s ease;
}

html body #root .layout-sidebar__brand {
  position: relative;
}

html body #root .sidebar-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: var(--art-text-secondary);
  background: #ffffffcc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

html body #root .sidebar-collapse-toggle:hover {
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.28);
  background: #ffffff;
}

html body #root .sidebar-collapse-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar {
  width: 82px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  gap: 16px !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__brand {
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__brand-copy,
html.mt5-sidebar-collapsed body #root .layout-sidebar__item-label,
html.mt5-sidebar-collapsed body #root .layout-sidebar__item-count,
html.mt5-sidebar-collapsed body #root .layout-sidebar__chevron,
html.mt5-sidebar-collapsed body #root .layout-sidebar__children,
html.mt5-sidebar-collapsed body #root .layout-sidebar__footer {
  display: none !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__brand-mark {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px !important;
}

html.mt5-sidebar-collapsed body #root .sidebar-collapse-toggle {
  position: absolute;
  right: -28px;
  top: 13px;
  z-index: 20;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

html.mt5-sidebar-collapsed body #root .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__nav {
  align-items: center !important;
  gap: 10px !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__section {
  width: 100% !important;
  align-items: center !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__item {
  width: 46px !important;
  min-height: 46px !important;
  justify-content: center !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 14px !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__item-icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__item-icon svg {
  width: 18px !important;
  height: 18px !important;
}

html.mt5-sidebar-collapsed body #root .layout-sidebar__item.is-active,
html.mt5-sidebar-collapsed body #root .layout-sidebar__section.is-active .layout-sidebar__item--section {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(99, 102, 241, 0.1)) !important;
  border-color: rgba(124, 58, 237, 0.18) !important;
}

html body #root .layout-sidebar__section.mt5-sidebar-section-collapsed > .layout-sidebar__children {
  display: none !important;
}

html body #root .layout-sidebar__section.mt5-sidebar-section-collapsed .layout-sidebar__chevron {
  transform: rotate(-90deg) !important;
}

/* 弹窗层级：避免持仓订单 sticky 表头压到批量补货等 Dialog 内容上方。 */
html body [data-state="open"].fixed.inset-0 {
  z-index: 100000 !important;
}

html body [role="dialog"][data-state="open"],
html body [role="dialog"].fixed {
  z-index: 100001 !important;
}

/* 账号新增/修改页：去除卡片标题下方说明文字。 */
html body #root .account-edit-section-head .account-edit-section-copy {
  display: none !important;
}

/* 账号新增/修改页：去除表单区域重复的“基本资料”小标题。 */
html body #root .account-edit-section-body > h2.font-bold.mb-4 {
  display: none !important;
}

/* 账号新增/修改页：操作按钮放入对应卡片标题行。 */
html body #root .account-edit-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

html body #root .account-edit-section-head > div:first-child {
  flex: 0 0 auto !important;
  min-width: max-content !important;
}

html body #root .account-edit-title-actions {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

html body #root .account-edit-title-actions::-webkit-scrollbar {
  display: none !important;
}

html body #root .account-edit-title-actions button {
  white-space: nowrap !important;
}

html body #root .account-edit-form-grid > .mt5-parent-account-fields {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  align-items: center !important;
  gap: 12px 24px !important;
  width: 100% !important;
  padding: 2px 0 4px !important;
}

html body #root .mt5-parent-account-field {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

html body #root .mt5-parent-account-label {
  flex: 0 0 auto !important;
  color: hsl(var(--muted-foreground)) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

html body #root .mt5-parent-account-select {
  flex: 0 1 150px !important;
  min-width: 118px !important;
  height: 34px !important;
  border: 1px solid #d8dde6 !important;
  border-radius: 10px !important;
  background: #f7f8fb !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  outline: none !important;
  padding: 0 30px 0 10px !important;
}

html body #root .mt5-parent-account-select:focus {
  border-color: #7c3aed !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

html body #root .mt5-parent-account-display {
  flex: 0 1 150px !important;
  min-width: 118px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  padding: 0 10px !important;
}

html body #root .mt5-parent-account-balance {
  min-width: 0 !important;
  color: #7c3aed !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body #root .account-edit-form-grid > .mt5-member-first-row {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center !important;
  gap: 24px !important;
  width: 100% !important;
}

html body #root .mt5-member-first-row > * {
  width: 100% !important;
  min-width: 0 !important;
  grid-column: auto !important;
}

html body #root .mt5-member-first-row > * input,
html body #root .mt5-member-first-row > * select {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}

html body #root .account-edit-form-grid > .mt5-member-remark-field {
  grid-column: span 1 / span 1 !important;
  width: 100% !important;
  max-width: none !important;
}

html body #root .account-edit-form-grid > .mt5-member-credit-field,
html body #root .account-edit-form-grid > .mt5-member-balance-field {
  grid-column: span 1 / span 1 !important;
  width: 100% !important;
  max-width: none !important;
}

html body #root .mt5-position-mode-field {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 32px !important;
}

html body #root .mt5-position-mode-title {
  color: hsl(var(--muted-foreground)) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

html body #root .mt5-position-mode-select {
  flex: 1 1 auto !important;
  min-width: 96px !important;
  height: 34px !important;
  border: 1px solid #d8dde6 !important;
  border-radius: 10px !important;
  background: #f7f8fb !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  outline: none !important;
  padding: 0 30px 0 10px !important;
}

html body #root .mt5-position-mode-select:focus {
  border-color: #7c3aed !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

html body #root .mt5-position-mode-help-wrap {
  display: inline-flex !important;
  position: relative !important;
  align-items: center !important;
  min-width: 0 !important;
}

html body #root .mt5-position-mode-help {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-bottom: 1px dashed #7c3aed !important;
  background: transparent !important;
  color: #7c3aed !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  cursor: help !important;
}

html body #root .mt5-position-mode-tooltip {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  z-index: 100100 !important;
  display: none !important;
  width: min(520px, 78vw) !important;
  max-width: 78vw !important;
  border: 1px solid rgba(124, 58, 237, 0.18) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16) !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  padding: 12px 14px !important;
  text-align: left !important;
  white-space: pre-line !important;
}

html body > .mt5-position-mode-tooltip-portal {
  position: fixed !important;
  z-index: 100300 !important;
  display: none;
  width: min(520px, 78vw) !important;
  max-width: 78vw !important;
  border: 1px solid rgba(124, 58, 237, 0.18) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16) !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  padding: 12px 14px !important;
  text-align: left !important;
  white-space: pre-line !important;
  pointer-events: none !important;
}

html body #root .mt5-position-mode-help-wrap:hover .mt5-position-mode-tooltip,
html body #root .mt5-position-mode-help-wrap:focus-within .mt5-position-mode-tooltip {
  display: block !important;
}

html body #root .mt5-member-margin-input {
  width: 96px !important;
  height: 34px !important;
  border: 1px solid #d8dde6 !important;
  border-radius: 10px !important;
  background: #f7f8fb !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  outline: none !important;
  padding: 0 10px !important;
}

html body #root .mt5-member-margin-input::-webkit-outer-spin-button,
html body #root .mt5-member-margin-input::-webkit-inner-spin-button {
  margin: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html body #root .mt5-member-margin-unit {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 6px !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body #root .mt5-member-margin-input:focus {
  border-color: #7c3aed !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

@media (max-width: 640px) {
  html body #root .account-edit-section-head {
    gap: 8px !important;
  }

  html body #root .account-edit-title-actions {
    gap: 6px !important;
  }

  html body #root .account-edit-title-actions button {
    height: 34px !important;
    padding-inline: 9px !important;
    font-size: 12px !important;
  }

  html body #root .account-edit-form-grid > .mt5-parent-account-fields {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  html body #root .mt5-parent-account-field {
    flex-wrap: wrap !important;
  }

  html body #root .mt5-parent-account-select {
    flex: 1 1 140px !important;
  }

  html body #root .mt5-parent-account-display {
    flex: 1 1 140px !important;
  }

  html body #root .mt5-parent-account-balance {
    flex-basis: 100% !important;
    padding-left: 0 !important;
  }
}

/* 交易明细：表设置和分页控件按 Art Design Pro 风格。 */
html body #root .art-table-footer {
  border-top: 1px solid #e5e7eb !important;
  background: #fff !important;
}

html body #root .art-table-footer-inner {
  min-height: 58px !important;
  gap: 14px !important;
}

html body #root .art-table-footer-left,
html body #root .art-table-footer-right {
  display: flex !important;
  align-items: center !important;
}

html body #root .art-pagination-total {
  color: #606266 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
}

html body #root .art-pagination-total span {
  color: #303133 !important;
  font-weight: 500 !important;
}

html body #root .art-table-tool-button {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(226, 232, 240, 0.55) !important;
  color: #4b5563 !important;
  box-shadow: none !important;
}

html body #root .art-table-tool-button:hover {
  background: #e2e8f0 !important;
  color: #7c3aed !important;
}

html body #root .art-table-tool-button > svg {
  display: none !important;
}

html body #root .art-table-tool-button::before {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  background: currentColor !important;
  content: "" !important;
  -webkit-mask: var(--art-tool-icon) center / contain no-repeat !important;
  mask: var(--art-tool-icon) center / contain no-repeat !important;
}

html body #root .art-table-tool-button[aria-label="导出"] {
  --art-tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 5v8.17l3.59-3.58L18 11l-6 6-6-6 1.41-1.41L11 13.17V5h2Zm-8 14h14v2H5v-2Z'/%3E%3C/svg%3E");
}

html body #root .art-table-tool-button[aria-label="列设置"] {
  --art-tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3V4h18v2Zm0 7H9v-2h12v2Zm0 7H3v-2h18v2Z'/%3E%3C/svg%3E");
}

html body #root .art-table-tool-button[aria-label="表格设置"] {
  --art-tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.43 12.98c.04-.32.07-.65.07-.98s-.02-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1a7.28 7.28 0 0 0-1.69-.98L14.5 2.42A.5.5 0 0 0 14 2h-4a.5.5 0 0 0-.5.42L9.12 5.07c-.61.24-1.18.56-1.69.98l-2.49-1a.5.5 0 0 0-.61.22l-2 3.46a.5.5 0 0 0 .12.64l2.11 1.65a7.93 7.93 0 0 0 0 1.96l-2.11 1.65a.5.5 0 0 0-.12.64l2 3.46c.13.22.39.31.61.22l2.49-1c.51.4 1.08.73 1.69.98l.38 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.38-2.65c.61-.25 1.18-.58 1.69-.98l2.49 1c.22.09.48 0 .61-.22l2-3.46a.5.5 0 0 0-.12-.64l-2.12-1.65ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
}

html body .art-table-menu {
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 8px 10px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14) !important;
}

html body .art-column-option-row {
  min-height: 40px !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  line-height: 22px !important;
}

html body .art-column-option-row:hover {
  background: rgba(124, 58, 237, 0.08) !important;
}

html body .art-column-option {
  display: inline-flex !important;
  min-width: 0 !important;
  align-items: center !important;
  width: 100% !important;
  gap: 10px !important;
}

html body .art-column-label {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #606266 !important;
  font-weight: 500 !important;
}

html body .art-column-checkbox.is-checked + .art-column-label {
  color: #7c3aed !important;
}

html body .art-column-checkbox-input {
  position: relative !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html body .art-column-checkbox-input:checked {
  border-color: #7c3aed !important;
  background: #7c3aed !important;
}

html body .art-column-checkbox-input:checked::after {
  position: absolute !important;
  top: 2px !important;
  left: 6px !important;
  width: 5px !important;
  height: 10px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  content: "" !important;
  transform: rotate(45deg) !important;
}

html body .art-column-checkbox-input:checked + .art-column-label {
  color: #7c3aed !important;
}

html body .art-column-checkbox {
  position: relative !important;
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

html body .art-column-checkbox.is-checked {
  border-color: #7c3aed !important;
  background: #7c3aed !important;
}

html body .art-column-checkbox.is-checked::after {
  position: absolute !important;
  top: 2px !important;
  left: 6px !important;
  width: 5px !important;
  height: 10px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  content: "" !important;
  transform: rotate(45deg) !important;
}

html body #root table.deal-history-sticky-table.is-zebra > tbody > tr:not(:last-child):nth-child(even) > td {
  background-color: #f8fafc !important;
}

html body #root table.deal-history-sticky-table.is-zebra > tbody > tr:not(:last-child):nth-child(even):hover > td {
  background-color: #f1f5f9 !important;
}

html body #root table.deal-history-sticky-table.is-bordered > thead > tr > th,
html body #root table.deal-history-sticky-table.is-bordered > tbody > tr > td {
  border-right: 1px solid #e5e7eb !important;
}

html body #root table.deal-history-sticky-table.is-bordered > thead > tr > th:last-child,
html body #root table.deal-history-sticky-table.is-bordered > tbody > tr > td:last-child {
  border-right: 0 !important;
}

html body #root table.fixed-data-table.is-zebra > tbody > tr:not(:last-child):nth-child(even) > td,
html body #root table.account-summary-table.is-zebra > tbody > tr:not(:last-child):nth-child(even) > td,
html body #root table.contribution-table.is-zebra > tbody > tr:not(:last-child):nth-child(even) > td {
  background-color: #f8fafc !important;
}

html body #root table.fixed-data-table.is-zebra > tbody > tr:not(:last-child):nth-child(even):hover > td,
html body #root table.account-summary-table.is-zebra > tbody > tr:not(:last-child):nth-child(even):hover > td,
html body #root table.contribution-table.is-zebra > tbody > tr:not(:last-child):nth-child(even):hover > td {
  background-color: #f1f5f9 !important;
}

html body #root table.fixed-data-table.is-bordered > thead > tr > th,
html body #root table.fixed-data-table.is-bordered > tbody > tr > td,
html body #root table.account-summary-table.is-bordered > thead > tr > th,
html body #root table.account-summary-table.is-bordered > tbody > tr > td,
html body #root table.contribution-table.is-bordered > thead > tr > th,
html body #root table.contribution-table.is-bordered > tbody > tr > td {
  border-right: 1px solid #e5e7eb !important;
}

html body #root table.fixed-data-table.is-bordered > thead > tr > th:last-child,
html body #root table.fixed-data-table.is-bordered > tbody > tr > td:last-child,
html body #root table.account-summary-table.is-bordered > thead > tr > th:last-child,
html body #root table.account-summary-table.is-bordered > tbody > tr > td:last-child,
html body #root table.contribution-table.is-bordered > thead > tr > th:last-child,
html body #root table.contribution-table.is-bordered > tbody > tr > td:last-child {
  border-right: 0 !important;
}

html body #root table.ratio-position-table.is-zebra > tbody > tr:not(:last-child):nth-child(even) > td {
  background-color: #f8fafc !important;
}

html body #root table.ratio-position-table.is-zebra > tbody > tr:not(:last-child):nth-child(even):hover > td {
  background-color: #f1f5f9 !important;
}

html body #root table.ratio-position-table.is-bordered > thead > tr > th,
html body #root table.ratio-position-table.is-bordered > tbody > tr > td {
  border-right: 1px solid #e5e7eb !important;
}

html body #root table.ratio-position-table.is-bordered > thead > tr > th:last-child,
html body #root table.ratio-position-table.is-bordered > tbody > tr > td:last-child {
  border-right: 0 !important;
}

html body #root .art-pagination {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: 4px !important;
}

html body #root .art-pagination-btn {
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #606266 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}

html body #root .art-pagination-btn:hover:not(:disabled) {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

html body #root .art-pagination-btn.is-active {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #fff !important;
}

html body #root .art-pagination-btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
}

html body #root .art-pagination-ellipsis {
  min-width: 24px !important;
  color: #909399 !important;
  font-size: 13px !important;
  text-align: center !important;
}

html body #root .art-page-size-trigger {
  width: 102px !important;
  height: 32px !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 6px !important;
  background: transparent !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

html body #root .art-pagination-jumper {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #606266 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

html body #root .art-pagination-jumper-input {
  width: 48px !important;
  height: 32px !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 6px !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-align: center !important;
  box-shadow: none !important;
}

/* 账号管理：分公司、股东、总代、代理、会员数据统一用紫色。 */
html body #root table.account-admin-table > tbody > tr > td:nth-child(4),
html body #root table.account-admin-table > tbody > tr > td:nth-child(5),
html body #root table.account-admin-table > tbody > tr > td:nth-child(6),
html body #root table.account-admin-table > tbody > tr > td:nth-child(7),
html body #root table.account-admin-table > tbody > tr > td:nth-child(8) {
  color: #7c3aed !important;
}

/* 账号管理层级列表：基于账号表的静态下级账号页面。 */
html body #root .account-hierarchy-card {
  overflow: hidden !important;
}

html body #root .account-hierarchy-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 18px 20px 10px !important;
}

html body #root .account-hierarchy-title-row h1 {
  margin: 0 !important;
  color: #1a1a2e !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

html body #root .account-hierarchy-toolbar-title {
  flex: 0 0 auto !important;
  min-width: 96px !important;
  margin-right: 8px !important;
  white-space: nowrap !important;
}

html body #root .account-hierarchy-toolbar-title h1 {
  margin: 0 !important;
  color: #1a1a2e !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

html body #root .account-hierarchy-crumb {
  display: block !important;
  margin-top: 6px !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

html body #root .account-hierarchy-toolbar {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 10px !important;
  overflow-x: auto !important;
  padding: 12px 20px !important;
  border-top: 1px solid #eef2f7 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}

html body #root .account-hierarchy-toolbar--single {
  border-top: 0 !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

html body #root .account-hierarchy-toolbar button,
html body #root .account-hierarchy-toolbar a,
html body #root .account-hierarchy-toolbar select,
html body #root .account-hierarchy-toolbar input {
  height: 36px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

html body #root .account-hierarchy-primary,
html body #root .account-hierarchy-outline,
html body #root .account-hierarchy-query {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #7c3aed !important;
  background: #7c3aed !important;
  color: #ffffff !important;
  padding: 0 16px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

html body #root .account-hierarchy-filter,
html body #root .account-hierarchy-search-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #4b5563 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body #root .account-hierarchy-toolbar select,
html body #root .account-hierarchy-toolbar input {
  border: 1px solid #d9e1ec !important;
  background: #ffffff !important;
  color: #111827 !important;
  padding: 0 10px !important;
}

html body #root .account-hierarchy-toolbar input {
  min-width: 220px !important;
}

html body #root .account-hierarchy-total {
  margin-left: auto !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body #root .account-hierarchy-total strong {
  color: #111827 !important;
}

html body #root .account-hierarchy-parent-filter {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(124, 58, 237, 0.18) !important;
  border-radius: 8px !important;
  background: rgba(124, 58, 237, 0.08) !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body #root .account-hierarchy-parent-filter span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

html body #root .account-hierarchy-parent-filter strong {
  color: #7c3aed !important;
}

html body #root .account-hierarchy-table-wrap {
  overflow: auto !important;
  max-width: 100% !important;
}

html body #root table.account-hierarchy-table {
  min-width: 1320px !important;
}

html body #root table.account-hierarchy-table > thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: #f9fafb !important;
}

html body #root table.account-hierarchy-table th,
html body #root table.account-hierarchy-table td {
  text-align: left !important;
  white-space: nowrap !important;
}

html body #root table.account-hierarchy-table td[data-account-nav] {
  cursor: pointer !important;
}

html body #root table.account-hierarchy-table > thead > tr > th {
  background: #f9fafb !important;
}

html body #root table.account-hierarchy-table > thead > tr > th.account-hierarchy-sort-th {
  cursor: pointer !important;
}

html body #root table.account-hierarchy-table > thead > tr > th.account-hierarchy-status-filter-th {
  position: relative !important;
  overflow: visible !important;
  z-index: 40 !important;
}

html body #root table.account-hierarchy-table > tbody > tr:hover > td {
  background: #f8fafc !important;
}

html body #root table.account-sub-account-table .account-sub-account-input,
html body #root table.account-sub-account-table .account-sub-account-select {
  height: 28px !important;
  border: 1px solid #b8c4d4 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 28px !important;
  box-shadow: none !important;
}

html body #root table.account-sub-account-table .account-sub-account-input {
  width: 128px !important;
  padding: 0 8px !important;
}

html body #root table.account-sub-account-table .account-sub-account-select {
  width: 76px !important;
  padding: 0 6px !important;
}

html body #root table.account-sub-account-table .account-sub-account-input:focus,
html body #root table.account-sub-account-table .account-sub-account-select:focus {
  outline: 2px solid rgba(124, 58, 237, 0.18) !important;
  border-color: #7c3aed !important;
}

html body #root .account-sub-account-add-card .account-sub-account-form {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  padding: 22px 24px !important;
}

html body #root .account-sub-account-form-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-width: 0 !important;
  color: #4b5563 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body #root .account-sub-account-form-field input {
  width: 100% !important;
  height: 40px !important;
  border: 1px solid #d9e1ec !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  color: #111827 !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

html body #root .account-sub-account-form-field input:focus {
  outline: 2px solid rgba(124, 58, 237, 0.18) !important;
  border-color: #7c3aed !important;
  background: #ffffff !important;
}

html body #root .account-sub-account-form-field input[readonly] {
  color: #6b7280 !important;
  background: #f1f5f9 !important;
}

html body #root .account-sub-account-form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding: 0 24px 24px !important;
}

html body #root .account-sub-account-form-actions button,
html body #root .account-sub-account-form-actions a {
  height: 38px !important;
  border-radius: 8px !important;
  padding: 0 18px !important;
}

html body #root .account-hierarchy-sort,
html body #root .account-hierarchy-account,
html body #root .account-hierarchy-count,
html body #root .account-hierarchy-action {
  display: inline-flex !important;
  align-items: center !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  color: #7c3aed !important;
  font: inherit !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

html body #root .account-hierarchy-sort {
  color: #1a1a2e !important;
  gap: 4px !important;
  transition: color 0.15s ease !important;
}

html body #root .account-hierarchy-sort-label {
  display: inline-flex !important;
  align-items: center !important;
}

html body #root .account-hierarchy-sort.is-active {
  color: #7c3aed !important;
}

html body #root .account-hierarchy-sort-arrow {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: 12px !important;
  height: 12px !important;
  color: currentColor !important;
}

html body #root .account-hierarchy-status-filter-head {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

html body #root .account-hierarchy-status-filter-menu {
  position: relative !important;
  display: inline-flex !important;
}

html body #root .account-hierarchy-status-filter-menu > summary {
  list-style: none !important;
}

html body #root .account-hierarchy-status-filter-menu > summary::-webkit-details-marker {
  display: none !important;
}

html body #root .account-hierarchy-status-filter-trigger {
  display: inline-flex !important;
  width: 22px !important;
  height: 22px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  color: #64748b !important;
  cursor: pointer !important;
}

html body #root .account-hierarchy-status-filter-trigger:hover,
html body #root .account-hierarchy-status-filter-menu[open] .account-hierarchy-status-filter-trigger {
  background: #ede9fe !important;
  color: #7c3aed !important;
}

html body #root .account-hierarchy-status-filter-trigger svg {
  width: 14px !important;
  height: 14px !important;
}

html body #root .account-hierarchy-status-filter-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 1000 !important;
  min-width: 128px !important;
  padding: 8px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14) !important;
}

html body #root .account-hierarchy-status-option {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

html body #root .account-hierarchy-status-option:hover {
  background: #f8fafc !important;
}

html body #root .account-hierarchy-status-option input {
  width: 14px !important;
  height: 14px !important;
  accent-color: #7c3aed !important;
  cursor: pointer !important;
}

html body #root .account-hierarchy-count[disabled],
html body #root .account-hierarchy-zero {
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

html body #root .account-hierarchy-dot {
  display: inline-block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: #d1d5db !important;
}

html body #root .account-hierarchy-normal {
  color: #2563eb !important;
  font-weight: 800 !important;
}

html body #root .account-hierarchy-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  border-radius: 6px !important;
  background: #dcfce7 !important;
  color: #16a34a !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body #root .account-hierarchy-separator {
  color: #d1d5db !important;
  margin: 0 5px !important;
}

html body #root .account-hierarchy-empty {
  padding: 36px 16px !important;
  color: #6b7280 !important;
  text-align: center !important;
}

html body #root .account-hierarchy-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 14px 20px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

html body #root .account-hierarchy-pagination button,
html body #root .account-hierarchy-pagination select {
  height: 34px !important;
  border: 1px solid #d9e1ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #111827 !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

html body #root .account-hierarchy-pagination button:disabled {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
}

html body #root .account-hierarchy-page-indicator {
  color: #111827 !important;
  font-weight: 800 !important;
}

html body #root .mt5-profile-profit-display-row {
  margin-top: 8px !important;
}

html body #root .mt5-profile-profit-display-select {
  height: 32px !important;
  min-width: 96px !important;
  border: 1px solid #d9e1ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #111827 !important;
  padding: 0 30px 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  outline: none !important;
}

html body #root .mt5-profile-profit-display-select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14) !important;
}

html body #root .mt5-profile-profit-display-save {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #7c3aed !important;
  border-radius: 8px !important;
  background: #7c3aed !important;
  color: #ffffff !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

html body #root .mt5-profile-profit-display-save:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

html body #root .mt5-profile-profit-display-note {
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

html body #root .mt5-profile-profit-display-note .mt5-profit-text {
  color: #2563eb !important;
}

html body #root .mt5-profile-profit-display-note .mt5-loss-text {
  color: #ef4444 !important;
}

/* 总公司新增/修改页：参数设定表头和数据统一贴左，覆盖组件内的 text-center / mx-auto。 */
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > thead > tr > th,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td {
  text-align: left !important;
  justify-content: flex-start !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > thead > tr > th.text-center,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > thead > tr > th[class*="text-center"],
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td.text-center,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td[class*="text-center"] {
  text-align: left !important;
}

html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > thead > tr > th > *,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td > *,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td button,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td input,
html body #root table.trading-table.account-parameter-table.mt5-head-office-parameter-table > tbody > tr > td [role="combobox"] {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

@media (max-width: 768px) {
  html body #root .account-hierarchy-title-row {
    padding: 14px 16px 8px !important;
  }

  html body #root .account-hierarchy-toolbar,
  html body #root .account-hierarchy-pagination {
    justify-content: flex-start !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  html body #root .account-hierarchy-total {
    margin-left: 0 !important;
  }

  html body #root .account-hierarchy-toolbar input {
    min-width: 180px !important;
  }
}

/* 账号新增/修改页：占成三列使用轻量百分比下拉，默认像数字，悬停/打开时显示选择图标。 */
html body #root table.trading-table.account-parameter-table.mt5-share-percent-table > tbody > tr > td.mt5-share-percent-cell {
  min-width: 92px !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 78px !important;
  min-width: 78px !important;
  height: 30px !important;
  min-height: 30px !important;
  gap: 3px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding: 0 23px 0 8px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: #111827 !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: left !important;
  outline: none !important;
  cursor: pointer !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:hover,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:focus,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:focus-visible,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger[data-state="open"],
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger[aria-expanded="true"] {
  border-color: #111827 !important;
  box-shadow: none !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger > span:not(.mt5-share-percent-unit):not(.mt5-share-percent-spinner) {
  min-width: 18px !important;
  color: #111827 !important;
  text-align: left !important;
  pointer-events: none !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-unit {
  display: none !important;
  align-items: center !important;
  color: #111827 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger > svg {
  display: none !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-spinner {
  position: absolute !important;
  top: 50% !important;
  right: 7px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  width: 12px !important;
  height: 18px !important;
  transform: translateY(-50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-spinner::before,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-spinner::after {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  margin: 1px auto !important;
  border-left: 5px solid transparent !important;
  border-right: 5px solid transparent !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-spinner::before {
  border-bottom: 6px solid #8a8f98 !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-spinner::after {
  border-top: 6px solid #8a8f98 !important;
}

html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:hover .mt5-share-percent-spinner,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:focus .mt5-share-percent-spinner,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger:focus-visible .mt5-share-percent-spinner,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger[data-state="open"] .mt5-share-percent-spinner,
html body #root table.trading-table.account-parameter-table .mt5-share-percent-trigger[aria-expanded="true"] .mt5-share-percent-spinner {
  opacity: 1 !important;
}

html body [data-radix-popper-content-wrapper] {
  z-index: 9999 !important;
}

/* 账号新增/修改页：交易量/净仓位输入时显示最大值提示。 */
html body #root table.trading-table.account-parameter-table.mt5-trade-limit-table > tbody > tr > td.mt5-trade-limit-cell {
  position: relative !important;
  overflow: visible !important;
  min-width: 112px !important;
}

html body #root table.trading-table.account-parameter-table .mt5-trade-limit-input {
  position: relative !important;
  z-index: 2 !important;
}

html body #root table.trading-table.account-parameter-table .mt5-trade-limit-cell:focus-within::after {
  content: "最大值：10" !important;
  position: absolute !important;
  top: calc(100% - 2px) !important;
  left: 12px !important;
  z-index: 10000 !important;
  min-width: 88px !important;
  padding: 4px 12px !important;
  border: 1px solid #c4b5fd !important;
  border-radius: 8px !important;
  background: #f3e8ff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12) !important;
  color: #6d28d9 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
