@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/AlibabaPuHuiTi-3-55-Regular_subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/AlibabaPuHuiTi-3-85-Bold_subset.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/AlibabaPuHuiTi-3-115-Black_subset.woff2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Alibaba PuHuiTi", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .section.footer {
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

:root {
  --text: #262626;
  --muted: #595959;
  --soft: #8c8c8c;
  --line: #f0f0f0;
  --orange: #d97339;
  --orange-soft: #fff1e8;
  --dark: #262626;
}

[hidden] {
  display: none !important;
}

.shell,
.canvas {
  width: min(1534px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: 69px;
  overflow: visible;
}

.section {
  position: relative;
  width: 100%;
  z-index: 0;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
}

.header {
  height: 69px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header::before {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  display: block;
  left: auto;
  top: auto;
  height: 68px;
  min-height: 0;
  transform: none;
}

.header .logo {
  position: absolute;
  left: 0;
  top: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.header .logo-text {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
}

.header .logo-demo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 23px;
  min-width: 56px;
  padding: 0 6px;
  border-radius: 5px;
  background: #e64340;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.9px;
  line-height: 1;
}

.header .nav-actions,
.header .user-actions {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header .nav-actions {
  top: 16px;
  width: auto;
  height: 36px;
  gap: 16px;
}

.header .user-actions {
  top: 9px;
  width: auto;
  min-height: 50px;
  gap: 12px;
}

.header .nav-actions[hidden],
.header .user-actions[hidden] {
  display: none;
}

.header-mobile-actions {
  display: none;
}

.header-mobile-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(217, 115, 57, 0.18);
  border-radius: 999px;
  background: #fffaf7;
}

.header-mobile-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.header-mobile-menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.header-mobile-menu-toggle[aria-expanded="true"] .header-mobile-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-mobile-menu-toggle[aria-expanded="true"] .header-mobile-menu-bar:nth-child(2) {
  opacity: 0;
}

.header-mobile-menu-toggle[aria-expanded="true"] .header-mobile-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-mobile-menu {
  position: fixed;
  inset: 69px 0 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.header-mobile-menu[hidden] {
  display: none !important;
}

.header-mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(38, 38, 38, 0.35);
  cursor: pointer;
}

.header-mobile-menu-panel {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  width: 100%;
  max-height: calc(100vh - 69px);
  overflow: auto;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.header-mobile-menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.header-mobile-menu-link:hover {
  background: #fff7f0;
}

.header-mobile-menu-link.active {
  background: var(--orange-soft);
  color: var(--text);
}

.header-mobile-menu-link-primary {
  color: var(--orange);
  font-weight: 700;
}

.header-mobile-menu-cart {
  justify-content: space-between;
}

.header-mobile-menu-cart .cart-count {
  position: static;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
}

.header-mobile-menu-user {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(217, 115, 57, 0.14);
  border-radius: 10px;
  background: #fffaf7;
}

.header-mobile-menu-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  word-break: break-word;
}

.header-mobile-menu-logout {
  width: 100%;
  margin-top: 8px;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .header {
  z-index: 201;
}

.app-nav {
  position: absolute;
  left: 210px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-nav[hidden] {
  display: none;
}

.app-nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.button,
button,
a[href] {
  cursor: pointer;
}

.app-nav-item:hover {
  background: #fff7f0;
  color: var(--text);
}

.app-nav-item.active {
  background: var(--orange-soft);
  color: var(--text);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  max-width: 430px;
  min-height: 50px;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(217, 115, 57, 0.18);
  border-radius: 999px;
  background: #fffaf7;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.user-identity {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  overflow: hidden;
  color: var(--soft);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
}

.user-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer {
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 48px 0 44px;
  background: linear-gradient(180deg, #303030 0%, #262626 100%);
}

.footer::before {
  width: 100vw;
  background: linear-gradient(180deg, #303030 0%, #262626 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 230px 220px 1fr;
  column-gap: 48px;
  height: auto;
  padding: 0;
}

.footer-col {
  position: static;
  width: 256px;
}

.footer-logo {
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  white-space: nowrap;
}

.brand-mark {
  font-weight: 400;
  letter-spacing: 0;
}

.footer-description,
.footer-col p {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 20px;
}

.footer-legal-links {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 190px;
}

.footer-legal-links a {
  color: #bfbfbf;
  font-size: 12px;
  line-height: 18px;
  transition: color 160ms ease;
}

.footer-legal-links a:hover { color: #ffffff; }

.footer-legal-text {
  position: static;
  width: auto;
  color: #bfbfbf;
  font-size: 13px;
  line-height: 22px;
  text-align: left;
}

.footer-legal-text a {
  color: #bfbfbf;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 160ms ease;
}

.footer-legal-text a:hover {
  color: #ffffff;
}

.copyright {
  position: static;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 86px;
  padding-top: 24px;
  border-top: 1px solid #595959;
  color: var(--soft);
  text-align: left;
  font-size: 13px;
  line-height: 19.5px;
}

.language-toggle {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: color 160ms ease;
}

.language-toggle:hover {
  color: #ffffff;
}

.zone-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  /*border-radius: 999px;*/
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

.zone-switcher-icp .zone-badge {
  border: 1px solid #91caff;
  background: #e6f4ff;
  color: #0958d9;
}

.zone-switcher-edi .zone-badge {
  border: 1px solid #ffd591;
  background: #fff7e6;
  color: #ad6800;
}

.zone-switcher-link {
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zone-switcher-link:hover {
  color: #b85c24;
}

.footer-zone-switcher {
  margin-top: 20px;
}

.footer-zone-switcher .zone-switcher {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

@media (max-width: 900px) {
  .header-inner,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 8px;
  }

  .header .logo {
    position: static;
    flex-shrink: 0;
  }

  .header .logo-text {
    font-size: 24px;
    letter-spacing: -2px;
  }

  .header .logo-demo-badge {
    height: 18px;
    min-width: 44px;
    font-size: 12px;
    letter-spacing: -0.6px;
  }

  .header .app-nav,
  .header .nav-actions,
  .header .user-actions {
    display: none !important;
  }

  .header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .app-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner {
    width: calc(100% - 24px);
  }
}

@media (max-width: 900px) {
  .footer-inner {
    display: block;
  }

  .footer-legal-links,
  .footer-legal-text,
  .copyright {
    width: 100%;
    margin-top: 24px;
  }
}

.user-plan-tag { display:inline-flex; align-items:center; min-height:28px; padding:5px 10px; border:1px solid #ffd591; border-radius:999px; background:#fff7e6; color:#ad6800; font-size:11px; font-weight:700; white-space:nowrap; }
.user-plan-tag.is-paid { border-color:#b7eb8f; background:#f6ffed; color:#237804; }
.user-plan-tag.is-pending { border-color:#91caff; background:#e6f4ff; color:#0958d9; }
.cart-link { position:relative; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border:1px solid #f0f0f0; border-radius:999px; color:var(--text); background:#fff; }
.cart-link svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.cart-count { position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 5px; border-radius:999px; background:var(--orange); color:#fff; font-size:10px; font-weight:700; line-height:18px; text-align:center; }
.cart-count[hidden] { display:none; }
