/**
 * 于 </body> 前引入：压过 public1/public2
 * 颜色统一走 CSS 变量（定义于 wap-design-system.css :root）
 */
html {
  background: var(--wap-bg-canvas, linear-gradient(180deg, #1c1e30 0%, #1a1c2c 45%, #181926 100%)) !important;
  background-color: var(--wap-bg, #1a1c2c) !important;
  background-attachment: fixed;
  --wap-status-bar-inset: env(safe-area-inset-top, 0px);
  --wap-safe-area-inset-top: env(safe-area-inset-top, 0px);
  --wap-safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --wap-page-safe-top: env(safe-area-inset-top, 0px);
}

html.wap-apk-shell {
  --wap-page-safe-top: 0px;
}

/* APK：系统已预留状态栏，前端不再额外 padding-top */
html.wap-apk-shell #app.red-theme {
  padding-top: 0 !important;
  box-sizing: border-box !important;
  background: var(--wap-bg-canvas, #f5f5f5) !important;
  background-color: var(--wap-bg, #f5f5f5) !important;
}

html.wap-apk-shell #app.red-theme .homecontainer.wap-home-exchange,
html.wap-apk-shell #app.red-theme .hold-header,
html.wap-apk-shell #app.red-theme .mkt-header,
html.wap-apk-shell #app.red-theme .toubu,
html.wap-apk-shell #app.red-theme .user_page.wap-page-user .head,
html.wap-apk-shell #app.red-theme .headf,
html.wap-apk-shell #app.red-theme .hesadf,
html.wap-apk-shell #app.red-theme .dabg .gebgh,
html.wap-apk-shell #app.red-theme .lobby-hd,
html.wap-apk-shell #app.red-theme .aiq-hd {
  padding-top: 0 !important;
}

html.wap-apk-shell #app.red-theme .hold-header {
  height: 1.08rem !important;
}

html.wap-apk-shell #app.red-theme .mkt-header,
html.wap-apk-shell #app.red-theme .toubu {
  height: 1.04rem !important;
  min-height: 1.04rem !important;
}

html.wap-apk-shell #app.red-theme .footCss,
html.wap-apk-shell #app.red-theme .wap-bottom-tabbar {
  padding-bottom: var(--wap-tabbar-bottom-inset, max(0.52rem, var(--wap-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))) !important;
}
body {
  color: var(--wap-text, #ffffff) !important;
  background: transparent !important;
}
body.wap-skin-dark {
  color: var(--wap-text, #ffffff) !important;
  background: transparent !important;
}

#app.red-theme {
  background: var(--wap-bg-canvas, linear-gradient(180deg, #1c1e30 0%, #1a1c2c 45%, #181926 100%)) !important;
  background-color: var(--wap-bg, #1a1c2c) !important;
  color: var(--wap-text, #ffffff) !important;
}
#app.red-theme .body-box {
  background: transparent !important;
  color: var(--wap-text, #ffffff) !important;
}

#app.red-theme .box,
#app.red-theme .box-contain,
#app.red-theme .box-title,
#app.red-theme .nav-bg,
#app.red-theme .tipstexts,
#app.red-theme .footer-btn {
  background: var(--wap-bg-surface, #252a41) !important;
  color: var(--wap-text, #ffffff) !important;
  border: 1px solid var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
  box-shadow: var(--wap-shadow-card, 0 4px 18px rgba(0, 0, 0, 0.25)) !important;
}
#app.red-theme .account-box .box-contain {
  background: var(--wap-bg-surface, #252a41) !important;
  color: var(--wap-text, #ffffff) !important;
}

#app.red-theme .wrapper,
#app.red-theme .list-content-wrapper,
#app.red-theme .hqWrap {
  background: transparent !important;
  color: var(--wap-text, #ffffff) !important;
  min-height: 100%;
  box-sizing: border-box;
}
#app.red-theme .user_page,
#app.red-theme .aiq-wrap,
#app.red-theme .ord-wrap,
#app.red-theme .d-wrap {
  background: transparent !important;
  color: var(--wap-text, #ffffff) !important;
  min-height: 100%;
  box-sizing: border-box;
}
#app.red-theme .order-list,
#app.red-theme .mint-tab-container,
#app.red-theme .mint-tab-container-item {
  background-color: transparent !important;
}

#app.red-theme .aiq-hd,
#app.red-theme .ord-hd,
#app.red-theme .d-hd {
  background: var(--wap-bg-surface, #252a41) !important;
  color: var(--wap-text, #ffffff) !important;
  border-bottom: 1px solid var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
  box-shadow: var(--wap-shadow-header) !important;
}
#app.red-theme .ord-card,
#app.red-theme .aiq-wrap .field,
#app.red-theme .aiq-wrap .plan,
#app.red-theme .d-wrap .card,
#app.red-theme .d-wrap .empty-box,
#app.red-theme .d-wrap .tr {
  background: var(--wap-bg-surface, #252a41) !important;
  color: var(--wap-text, #ffffff) !important;
  border: 1px solid var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
  box-shadow: var(--wap-shadow-card, 0 4px 18px rgba(0, 0, 0, 0.25)) !important;
}
#app.red-theme .d-wrap .k,
#app.red-theme .d-wrap .remark,
#app.red-theme .d-wrap .hint {
  color: var(--wap-text-3, #8e92a8) !important;
}
#app.red-theme .d-wrap .v,
#app.red-theme .d-wrap .no,
#app.red-theme .d-wrap .sec-title {
  color: var(--wap-text, #ffffff) !important;
}

#app.red-theme .mint-header,
#app.red-theme .header-box .mint-header {
  background: var(--wap-bg-surface, #252a41) !important;
  border-bottom: 1px solid var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
  box-shadow: var(--wap-shadow-header) !important;
}
#app.red-theme .van-nav-bar,
#app.red-theme .van-hairline--bottom .van-nav-bar {
  background: var(--wap-bg-surface, #252a41) !important;
  border-bottom: 1px solid var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
}
#app.red-theme .van-nav-bar__title,
#app.red-theme .van-nav-bar__text,
#app.red-theme .van-nav-bar .van-icon,
#app.red-theme .van-nav-bar__left,
#app.red-theme .van-nav-bar__right,
#app.red-theme .van-nav-bar__arrow {
  color: var(--wap-text, #ffffff) !important;
}
#app.red-theme .van-tabs__nav,
#app.red-theme .van-tabs__nav--line,
#app.red-theme .van-tabs__wrap {
  background: var(--wap-bg-surface, #252a41) !important;
}
#app.red-theme .mint-navbar,
#app.red-theme .mint-navbar .mint-tab-item {
  background: var(--wap-bg-surface, #252a41) !important;
  border-color: var(--wap-border, rgba(255, 255, 255, 0.06)) !important;
}

#app.red-theme .van-tabs__line {
  background: var(--wap-link-line, linear-gradient(90deg, #4a72f5 0%, #6b9dff 100%)) !important;
  box-shadow: var(--wap-glow-cyan, 0 0 16px rgba(74, 114, 245, 0.18)) !important;
}
#app.red-theme .van-tab--active {
  color: #e60012 !important;
  font-weight: 600;
}
#app.red-theme .van-tab {
  color: var(--wap-text-2, #555555) !important;
  font-size: 0.32rem;
}

#app.red-theme .homecontainer .ghbn .van-tab,
#app.red-theme .homecontainer .ghbn .van-tab .van-tab__text {
  color: var(--wap-text-2, #555555) !important;
  font-size: 0.32rem;
}
#app.red-theme .homecontainer .ghbn .van-tab--active,
#app.red-theme .homecontainer .ghbn .van-tab--active .van-tab__text {
  color: #e60012 !important;
  font-weight: 600 !important;
}

#app.red-theme .footCss,
#app.red-theme .wap-bottom-tabbar {
  background: var(--wap-tabbar-bg, rgba(26, 28, 44, 0.96)) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--wap-tabbar-border, rgba(255, 255, 255, 0.06)) !important;
  box-shadow: var(--wap-shadow-tabbar, 0 -4px 24px rgba(0, 0, 0, 0.3)) !important;
  height: var(--wap-tabbar-total) !important;
  min-height: var(--wap-tabbar-total) !important;
  box-sizing: border-box !important;
  padding-bottom: var(--wap-tabbar-bottom-inset, max(0.52rem, var(--wap-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))) !important;
  align-items: stretch !important;
}
#app.red-theme .footDemo,
#app.red-theme .footDemos {
  font-size: var(--wap-tabbar-font, 0.36rem) !important;
  font-weight: 700 !important;
  color: #b8b8b8 !important;
}

#app.red-theme .footCss .footDemo > div:not(.footImgDeft),
#app.red-theme .footCss .footDemos > div:not(.footImgDeft),
#app.red-theme .wap-bottom-tabbar .footDemo > div:not(.footImgDeft),
#app.red-theme .wap-bottom-tabbar .footDemos > div:not(.footImgDeft) {
  color: #b8b8b8 !important;
  -webkit-text-fill-color: #b8b8b8 !important;
}

#app.red-theme .footCss .activeFont,
#app.red-theme .wap-bottom-tabbar .activeFont,
#app.red-theme .footDemo .activeFont,
#app.red-theme .footDemos .activeFont,
#app.red-theme .footDemo .blueFont,
#app.red-theme .footDemos .blueFont {
  color: #e60012 !important;
  -webkit-text-fill-color: #e60012 !important;
  font-weight: 700 !important;
}
#app.red-theme .footImgDeft {
  width: var(--wap-tabbar-icon, 0.75rem) !important;
  height: var(--wap-tabbar-icon, 0.75rem) !important;
}

#app.red-theme .buy-stock-trade-page .goumais .xiaoge > span,
#app.red-theme .buy-stock-trade-page .goumais .eduleft {
  color: var(--wap-text, #ffffff) !important;
}
#app.red-theme .buy-stock-trade-page .goumais .ertyu {
  color: var(--wap-text, #ffffff) !important;
}
#app.red-theme .buy-stock-trade-page .goumais .shougu {
  color: var(--wap-text-3, #8e92a8) !important;
}
#app.red-theme .buy-stock-trade-page .goumais .rtyh {
  background: var(--wap-bg-white, #252a41) !important;
  border-color: var(--wap-border-strong, rgba(255, 255, 255, 0.1)) !important;
}
#app.red-theme .buy-stock-trade-page .goumais .rtyh .kunk input {
  background: var(--wap-bg-white, #252a41) !important;
  color: var(--wap-text, #ffffff) !important;
  -webkit-text-fill-color: var(--wap-text, #ffffff) !important;
}
#app.red-theme .buy-stock-lever-popup .van-picker-column__item,
#app.red-theme .buy-stock-lever-popup .van-picker-column__item .van-ellipsis {
  color: var(--wap-text-3, #8e92a8) !important;
}
#app.red-theme .buy-stock-lever-popup .van-picker-column__item--selected,
#app.red-theme .buy-stock-lever-popup .van-picker-column__item--selected .van-ellipsis {
  color: var(--wap-text, #ffffff) !important;
  font-weight: 600 !important;
}
#app.red-theme .buy-stock-lever-popup .van-picker__mask {
  background-image: linear-gradient(180deg, var(--wap-bg-surface, #252a41), rgba(37, 42, 65, 0.25)), linear-gradient(0deg, var(--wap-bg-surface, #252a41), rgba(37, 42, 65, 0.25)) !important;
}
