/* TungstenCloud 2.1.8 adaptive layout pass.
 * Loaded last so page/module styles cannot restore fixed desktop widths. */
:root[theme="tungstencloud"] {
  --tc-content-max: 1920px;
  --tc-addon-content-max: 1680px;
  --tc-page-gutter: clamp(16px, 1.35vw, 32px);
}

html[theme="tungstencloud"],
html[theme="tungstencloud"] body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

html[theme="tungstencloud"] *,
html[theme="tungstencloud"] *::before,
html[theme="tungstencloud"] *::after {
  box-sizing: border-box;
}

html[theme="tungstencloud"] .template > .el-container > .el-container,
html[theme="tungstencloud"] .product > .el-container > .el-container {
  width: 0 !important;
  min-width: 0 !important;
  flex: 1 1 0% !important;
  flex-direction: column !important;
}

html[theme="tungstencloud"] .el-main {
  width: 100% !important;
  min-width: 0 !important;
  padding: var(--tc-page-gutter) !important;
  overflow-x: hidden !important;
}

html[theme="tungstencloud"] .el-main > * {
  width: 100% !important;
  max-width: var(--tc-content-max) !important;
  min-width: 0 !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

html[theme="tungstencloud"] .main-card {
  width: 100%;
  max-width: var(--tc-content-max) !important;
  min-width: 0 !important;
}

/* Product list and dynamic module hosts use available space instead of a fixed 1500px card. */
html[theme="tungstencloud"][data-tc-page="product"] .tc-product-list-host,
html[theme="tungstencloud"][data-tc-page="product"] .tc-product-shell,
html[theme="tungstencloud"][data-tc-page="product"] .config-box.tc-product-shell,
html[theme="tungstencloud"] .template .el-main > .tc-product-list-host,
html[theme="tungstencloud"] .product .tc-product-shell,
html[theme="tungstencloud"] .product .config-box.tc-product-shell {
  width: 100% !important;
  max-width: var(--tc-content-max) !important;
  min-width: 0 !important;
}

html[theme="tungstencloud"] .tc-product-list-host iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

html[theme="tungstencloud"] .tc-product-shell .el-table__body-wrapper,
html[theme="tungstencloud"] .tc-product-shell .table,
html[theme="tungstencloud"] .tc-product-list-host .table {
  max-width: 100% !important;
  overflow-x: auto !important;
}

/* Add-on pages also scale with the viewport, while keeping readable line lengths. */
html[theme="tungstencloud"][data-tc-plugin="true"] .el-main > *,
html[theme="tungstencloud"][data-tc-plugin="true"] .el-main .main-card,
html[theme="tungstencloud"][data-tc-plugin="true"] .el-main .clid-box {
  width: 100% !important;
  max-width: var(--tc-addon-content-max) !important;
  min-width: 0 !important;
}

/* Home dashboard: the source page CSS is loaded after the base shell, so these rules are final. */
html[theme="tungstencloud"] .el-main.home-main,
html[theme="tungstencloud"][data-tc-page="home"] .el-main {
  padding: var(--tc-page-gutter) !important;
}

html[theme="tungstencloud"] .el-main.home-main > .main-card,
html[theme="tungstencloud"] .main-card:has(> .tc-home-head),
html[theme="tungstencloud"] .main-card:has(> .tc-overview-head) {
  width: 100% !important;
  max-width: var(--tc-content-max) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[theme="tungstencloud"] .tc-home-head,
html[theme="tungstencloud"] .tc-overview-head {
  width: 100%;
  min-width: 0;
  min-height: clamp(128px, 9vw, 158px) !important;
  margin-bottom: clamp(16px, 1.25vw, 24px) !important;
  padding: clamp(22px, 1.8vw, 34px) !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content,
html[theme="tungstencloud"] .tc-overview-head + .main-content,
html[theme="tungstencloud"][data-tc-page="home"] .main-content {
  width: 100%;
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px) !important;
  align-items: start !important;
  gap: clamp(16px, 1.35vw, 24px) !important;
  padding: 0 !important;
  background: transparent !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .left-box,
html[theme="tungstencloud"] .tc-home-head + .main-content .right-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .left-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .right-box,
html[theme="tungstencloud"][data-tc-page="home"] .left-box,
html[theme="tungstencloud"][data-tc-page="home"] .right-box {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .left-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .left-box,
html[theme="tungstencloud"][data-tc-page="home"] .left-box {
  display: grid !important;
  align-content: start !important;
  gap: clamp(16px, 1.25vw, 24px) !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .right-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .right-box,
html[theme="tungstencloud"][data-tc-page="home"] .right-box {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 18px !important;
  padding: 0 !important;
  background: transparent !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .right-box > div,
html[theme="tungstencloud"] .tc-overview-head + .main-content .right-box > div,
html[theme="tungstencloud"][data-tc-page="home"] .right-box > div {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .info-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-box,
html[theme="tungstencloud"][data-tc-page="home"] .info-box {
  width: 100%;
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(190px, .8fr) minmax(250px, 1fr) minmax(280px, 1.15fr) !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 22px 26px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .info-box .divider-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-box .divider-box,
html[theme="tungstencloud"][data-tc-page="home"] .info-box .divider-box {
  display: none !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .info-first,
html[theme="tungstencloud"] .tc-home-head + .main-content .info-second,
html[theme="tungstencloud"] .tc-home-head + .main-content .info-three,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-first,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-second,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-three {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .info-second,
html[theme="tungstencloud"] .tc-home-head + .main-content .info-three,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-second,
html[theme="tungstencloud"] .tc-overview-head + .main-content .info-three {
  gap: 10px !important;
  padding-left: 22px !important;
  border-left: 1px solid var(--tc-line) !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .email-box,
html[theme="tungstencloud"] .tc-home-head + .main-content .phone-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .email-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .phone-box {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(80px, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .phone-number,
html[theme="tungstencloud"] .tc-home-head + .main-content .company-name,
html[theme="tungstencloud"] .tc-overview-head + .main-content .phone-number,
html[theme="tungstencloud"] .tc-overview-head + .main-content .company-name {
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  overflow: hidden !important;
  text-align: right !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .statistics-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .statistics-box,
html[theme="tungstencloud"][data-tc-page="home"] .statistics-box {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .statistics-content,
html[theme="tungstencloud"] .tc-overview-head + .main-content .statistics-content,
html[theme="tungstencloud"][data-tc-page="home"] .statistics-content {
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(390px, .9fr) !important;
  align-items: stretch !important;
  gap: 16px !important;
  padding: 0 !important;
  background: transparent !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .money-box,
html[theme="tungstencloud"] .tc-home-head + .main-content .order-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .money-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .order-box {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .money-top,
html[theme="tungstencloud"] .tc-overview-head + .main-content .money-top {
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  gap: 16px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .money-credit,
html[theme="tungstencloud"] .tc-overview-head + .main-content .money-credit {
  min-width: 0 !important;
  width: auto !important;
  flex: initial !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .credit-num,
html[theme="tungstencloud"] .tc-overview-head + .main-content .credit-num {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .order-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .order-box,
html[theme="tungstencloud"][data-tc-page="home"] .order-box {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .order-box > div,
html[theme="tungstencloud"] .tc-overview-head + .main-content .order-box > div,
html[theme="tungstencloud"][data-tc-page="home"] .order-box > div {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .statistics-bottom,
html[theme="tungstencloud"] .tc-overview-head + .main-content .statistics-bottom,
html[theme="tungstencloud"][data-tc-page="home"] .statistics-bottom {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 22px 28px !important;
  background-image: none !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .product-list-box,
html[theme="tungstencloud"] .tc-overview-head + .main-content .product-list-box,
html[theme="tungstencloud"][data-tc-page="home"] .product-list-box {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow-x: auto !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .recommend-top,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .recommend-top,
html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .recommend-top {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 120px) !important;
  align-items: start !important;
  gap: 12px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .recommend-top .left,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .recommend-top .left {
  min-width: 0 !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .recommend-top .right,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .recommend-top .right {
  width: 100% !important;
  max-width: 120px !important;
  height: auto !important;
  max-height: 120px !important;
  object-fit: contain !important;
  justify-self: end !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .url,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .url,
html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .url {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .top-statistic,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .top-statistic,
html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .top-statistic {
  width: 100%;
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .top-statistic .top-item,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .top-statistic .top-item,
html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .top-statistic .top-item {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .top-money,
html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .top-money,
html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .top-money {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 1.25vw, 24px) !important;
  line-height: 1.25 !important;
}

@media (max-width: 1550px) {
  html[theme="tungstencloud"] .tc-home-head + .main-content .statistics-content,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .statistics-content,
  html[theme="tungstencloud"][data-tc-page="home"] .statistics-content {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 1380px) {
  html[theme="tungstencloud"] .tc-home-head + .main-content,
  html[theme="tungstencloud"] .tc-overview-head + .main-content,
  html[theme="tungstencloud"][data-tc-page="home"] .main-content {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[theme="tungstencloud"] .tc-home-head + .main-content .right-box,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .right-box,
  html[theme="tungstencloud"][data-tc-page="home"] .right-box {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1050px) {
  html[theme="tungstencloud"] .tc-home-head + .main-content .info-box,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .info-box,
  html[theme="tungstencloud"][data-tc-page="home"] .info-box {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  html[theme="tungstencloud"] .tc-home-head + .main-content .info-second,
  html[theme="tungstencloud"] .tc-home-head + .main-content .info-three,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .info-second,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .info-three {
    padding: 16px 0 0 !important;
    border-top: 1px solid var(--tc-line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 820px) {
  :root[theme="tungstencloud"] { --tc-page-gutter: 12px; }

  html[theme="tungstencloud"] .tc-home-head,
  html[theme="tungstencloud"] .tc-overview-head {
    display: block !important;
  }

  html[theme="tungstencloud"] .tc-home-status,
  html[theme="tungstencloud"] .tc-overview-status {
    margin-top: 16px !important;
    justify-content: flex-start !important;
  }

  html[theme="tungstencloud"] .tc-home-head + .main-content .right-box,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .right-box,
  html[theme="tungstencloud"][data-tc-page="home"] .right-box {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[theme="tungstencloud"] .tc-home-head + .main-content .order-box,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .order-box,
  html[theme="tungstencloud"][data-tc-page="home"] .order-box {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[theme="tungstencloud"] .tc-home-head + .main-content .recommend-box-open .top-statistic,
  html[theme="tungstencloud"] .tc-overview-head + .main-content .recommend-box-open .top-statistic,
  html[theme="tungstencloud"][data-tc-page="home"] .recommend-box-open .top-statistic {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
