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

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/AlibabaPuHuiTi-3-65-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

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

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/AlibabaPuHuiTi-3-105-Heavy.woff2") format("woff2");
  font-weight: 900;
  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;
}

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;
  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);
}

.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;
  width: auto;
  height: auto;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  white-space: nowrap;
}

.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;
}

.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;
}

.header .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.header .button:hover {
  transform: translateY(-1px);
}

.header .button.orange {
  border: 1px solid var(--orange);
  background: linear-gradient(180deg, #df7e42 0%, var(--orange) 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(217, 115, 57, 0.22);
}

.header .button.orange:hover {
  box-shadow: 0 12px 24px rgba(217, 115, 57, 0.3);
}

.header .button.outline {
  height: 36px;
  padding: 8px 16px;
  border: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.9);
}

.header .button.outline:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.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;
}

.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;
}

.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;
}

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

  .app-nav {
    display: none;
  }

  .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; }
.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; }
