/* 玩家商城 · 原生实现，运行时零依赖 */
:root {
  --bg: #060b14;
  --panel: rgb(10 17 29 / 82%);
  --panel-solid: #0d1624;
  --surface: rgb(18 29 46 / 88%);
  --surface-strong: #152136;
  --line: rgb(148 163 184 / 18%);
  --line-strong: rgb(96 165 250 / 34%);
  --text: #edf4ff;
  --text-strong: #ffffff;
  --muted: #91a2b8;
  --muted-soft: #6f8097;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgb(59 130 246 / 14%);
  --amber: #f0b35b;
  --amber-soft: rgb(240 179 91 / 12%);
  --ok: #4ade80;
  --danger: #f87171;
  --radius: 8px;
  --shadow: 0 22px 60px rgb(0 0 0 / 32%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(90deg, rgb(3 8 17 / 88%) 0%, rgb(3 8 17 / 62%) 34%, rgb(3 8 17 / 70%) 100%),
    linear-gradient(180deg, rgb(3 8 17 / 32%) 0%, rgb(3 8 17 / 50%) 56%, rgb(3 8 17 / 86%) 100%),
    url("./assets/shop-home-beauty-bg-wide-v2.webp") center / cover fixed no-repeat,
    var(--bg);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------- 骨架 ---------------- */
.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  width: 100%;
  max-width: 1560px;
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100dvh;
  min-height: 620px;
  flex-direction: column;
  padding: 18px 14px 16px;
  background: rgb(5 10 19 / 86%);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 2px 7px 19px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, rgb(96 165 250 / 36%), transparent 62%),
    #1d4ed8;
  border: 1px solid rgb(147 197 253 / 32%);
  border-radius: 9px;
  box-shadow: 0 10px 26px rgb(37 99 235 / 24%);
  font-size: 17px;
  font-weight: 750;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 0 10px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 52px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  color: #a9b7ca;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgb(255 255 255 / 4%);
  border-color: rgb(255 255 255 / 7%);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--text-strong);
  background:
    linear-gradient(90deg, rgb(59 130 246 / 20%), rgb(59 130 246 / 7%)),
    rgb(255 255 255 / 3%);
  border-color: rgb(96 165 250 / 26%);
}

.nav-item.active::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -1px;
  width: 3px;
  content: "";
  background: #60a5fa;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 18px rgb(59 130 246 / 62%);
}

.nav-item > .icon {
  width: 20px;
  height: 20px;
  justify-self: center;
  margin-left: 2px;
}

.nav-copy {
  min-width: 0;
}

.nav-copy strong,
.nav-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.nav-copy small {
  margin-top: 2px;
  color: var(--muted-soft);
  font-size: 10px;
}

.nav-item.active .nav-copy small {
  color: #88a8d1;
}

.sidebar-wallet {
  margin-top: auto;
  padding: 14px;
  background:
    linear-gradient(145deg, rgb(59 130 246 / 13%), transparent 58%),
    rgb(255 255 255 / 3%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.wallet-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.sidebar-wallet > strong {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: #bfdbfe;
  font-variant-numeric: tabular-nums;
}

.sidebar-wallet > strong .icon {
  width: 17px;
  height: 17px;
}

.sidebar-wallet > strong b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sidebar-topup {
  width: 100%;
  height: 34px;
  margin-top: 12px;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
  border: 1px solid rgb(147 197 253 / 26%);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.sidebar-topup:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.sidebar-foot {
  display: grid;
  gap: 5px;
  padding: 15px 4px 0;
  color: var(--muted-soft);
  font-size: 10px;
}

.sidebar-foot small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7f91a8;
  font-size: 9px;
}

.sidebar-foot .icon {
  width: 12px;
  height: 12px;
  color: var(--ok);
}

.workspace {
  min-width: 0;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px clamp(18px, 3vw, 42px);
  background: rgb(4 9 18 / 76%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.topbar-context {
  min-width: 0;
}

.topbar-context span,
.eyebrow {
  display: block;
  color: #7f9bc0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.topbar-context h1 {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.account-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 6px;
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.account-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #e9f4ff;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 15%), transparent),
    #203a62;
  border: 1px solid rgb(147 197 253 / 28%);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
}

.account-copy {
  min-width: 0;
}

.account-copy b,
.account-copy small {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy b {
  color: #dce9fb;
  font-size: 11.5px;
  font-weight: 600;
}

.account-copy small {
  margin-top: 1px;
  color: var(--muted-soft);
  font-size: 9px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: #9fb1c8;
  cursor: pointer;
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.icon-button:hover {
  color: #fff;
  background: rgb(239 68 68 / 10%);
  border-color: rgb(248 113 113 / 24%);
}

.content {
  width: min(1180px, 100%);
  padding: 26px clamp(18px, 3vw, 42px) calc(34px + env(safe-area-inset-bottom));
  margin: 0 auto;
}

/* ---------------- 通用面板 ---------------- */
.panel {
  min-height: 360px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: panel-in 240ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
}

.panel-sub {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-balance {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  background: var(--amber-soft);
  border: 1px solid rgb(240 179 91 / 20%);
  border-radius: 7px;
}

.panel-balance > span {
  color: #c9a56e;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.panel-balance > strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ffe3b4;
  font-variant-numeric: tabular-nums;
}

.panel-balance > strong .icon {
  width: 15px;
  height: 15px;
}

.panel-balance > strong b {
  font-size: 18px;
}

.panel-balance .btn {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.wallet-line {
  margin: 0;
  color: #bfdbfe;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 控件 ---------------- */
.btn {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  color: var(--text);
  cursor: pointer;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgb(255 255 255 / 3%);
}

.btn.sm {
  height: 30px;
  padding: 0 11px;
  font-size: 11.5px;
}

.btn.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.warn {
  color: #ffe2ac;
  background: var(--amber-soft);
  border-color: rgb(240 179 91 / 34%);
}

.btn.off {
  color: var(--muted-soft);
  background: rgb(148 163 184 / 6%);
  border-color: var(--line);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.text-link {
  padding: 0;
  color: #8fc4ff;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 11px;
  text-align: left;
}

.text-link:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
}

.search-box {
  display: flex;
  width: min(330px, 100%);
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted-soft);
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.search-box:focus-within {
  background: rgb(59 130 246 / 5%);
  border-color: rgb(96 165 250 / 52%);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

.search-box .icon {
  width: 15px;
  height: 15px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12.5px;
}

.search-box input::placeholder {
  color: #66788f;
}

.search-box input::-webkit-search-cancel-button {
  filter: invert(0.7);
}

.category-tabs {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.category-tab {
  height: 30px;
  padding: 0 11px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

.category-tab span {
  margin-left: 3px;
  color: var(--muted-soft);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.category-tab:hover {
  color: var(--text);
  border-color: rgb(96 165 250 / 28%);
}

.category-tab.active {
  color: #dbeafe;
  background: var(--accent-soft);
  border-color: rgb(96 165 250 / 38%);
}

.category-tab.active span {
  color: #93c5fd;
}

/* ---------------- 商品与礼包 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 11px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 2%), transparent 48%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.card:hover {
  border-color: rgb(96 165 250 / 36%);
  box-shadow: 0 16px 32px rgb(0 0 0 / 18%);
  transform: translateY(-2px);
}

.card > .btn {
  width: 100%;
  margin-top: auto;
}

.phead {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.pico {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: #cfe6ff;
  background:
    linear-gradient(145deg, rgb(96 165 250 / 25%), transparent),
    #13243a;
  border: 1px solid rgb(96 165 250 / 22%);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 650;
}

.ptitle {
  min-width: 0;
}

.ptitle h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  margin-top: 4px;
  padding: 1px 7px;
  color: var(--muted);
  background: rgb(148 163 184 / 9%);
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 16px;
}

.tag.ok {
  color: #86efac;
  background: rgb(34 197 94 / 12%);
}

.tag.wait {
  color: #fcd34d;
  background: rgb(245 158 11 / 12%);
}

.tag.hot {
  color: #fde7bc;
  background: var(--amber-soft);
  border: 1px solid rgb(240 179 91 / 22%);
}

.price {
  display: flex;
  min-height: 30px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin: 2px 0 0;
}

.coin-price {
  color: #bfdbfe;
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.orig {
  color: #64748b;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.limit,
.note,
.coin-line {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.note {
  color: var(--muted-soft);
}

.package-grid .card {
  min-height: 194px;
  background:
    linear-gradient(145deg, rgb(240 179 91 / 7%), transparent 54%),
    var(--surface);
}

.card.package h3 {
  margin: 1px 56px 0 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
}

.card.package .tag.hot {
  position: absolute;
  top: 13px;
  right: 13px;
  margin: 0;
}

.coin-line b {
  margin: 0 3px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rmb {
  color: #ffe1ad;
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.perks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.perks li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.perks svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--ok);
}

/* ---------------- 订单 ---------------- */
.table-wrap {
  overflow: hidden;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11.5px;
}

.order-table th {
  padding: 11px 13px;
  color: var(--muted);
  background: rgb(255 255 255 / 3%);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}

.order-table th:nth-child(1) {
  width: 31%;
}

.order-table th:nth-child(2) {
  width: 25%;
}

.order-table th:nth-child(3) {
  width: 15%;
}

.order-table th:nth-child(4) {
  width: 11%;
}

.order-table th:nth-child(5) {
  width: 18%;
}

.order-table td {
  padding: 12px 13px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.order-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-table tbody tr:hover td {
  background: rgb(59 130 246 / 4%);
}

.mono {
  color: #b7c7db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.td-amount {
  color: #e7effa;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.td-time {
  color: var(--muted-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.empty-cell {
  padding: 42px 12px !important;
  color: var(--muted);
  text-align: center;
}

.order-cards {
  display: none;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
}

.order-card {
  gap: 8px;
  padding: 13px;
}

.oc-top,
.oc-bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.oc-top .tag {
  flex: 0 0 auto;
  margin: 0;
}

.oc-top .mono {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oc-bottom b {
  color: #dbeafe;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.pager-info {
  color: var(--muted);
  font-size: 11px;
}

.pager-info b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

#pageTotal {
  color: var(--muted-soft);
}

/* ---------------- 玩家中心 ---------------- */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.55fr);
  gap: 14px;
  padding-top: 20px;
}

.profile-identity,
.profile-stats,
.profile-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-identity {
  position: relative;
  display: flex;
  min-height: 188px;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(140deg, rgb(59 130 246 / 16%), transparent 60%),
    var(--surface);
}

.profile-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  place-items: center;
  color: #eff6ff;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 16%), transparent),
    #1e3a5f;
  border: 1px solid rgb(147 197 253 / 28%);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgb(0 0 0 / 22%);
  font-size: 24px;
  font-weight: 700;
}

.profile-label {
  color: #7f9bc0;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.profile-identity h3 {
  margin: 5px 0 1px;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 650;
}

.profile-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.status-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  color: #bbf7d0;
  background: rgb(34 197 94 / 10%);
  border: 1px solid rgb(74 222 128 / 18%);
  border-radius: 999px;
  font-size: 9px;
}

.status-pill i {
  width: 5px;
  height: 5px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px rgb(74 222 128 / 62%);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.profile-stats article {
  display: flex;
  min-height: 93px;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  background: var(--surface-strong);
}

.profile-stats article > span {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.profile-stats article > strong {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0 4px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.profile-stats article > strong .icon {
  width: 15px;
  height: 15px;
  color: #93c5fd;
}

.profile-stats article > small {
  color: var(--muted-soft);
  font-size: 9px;
}

.profile-stats .text-link {
  margin-top: auto;
}

.profile-note {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 19px;
  background: rgb(59 130 246 / 5%);
  border-color: rgb(96 165 250 / 16%);
}

.profile-note > .icon {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  color: #7dd3fc;
}

.profile-note strong {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 600;
}

.profile-note p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

/* ---------------- 空态与页脚 ---------------- */
.empty {
  grid-column: 1 / -1;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: block;
  margin: 0 auto 8px;
  color: #40546d;
}

.empty p {
  margin: 0 0 3px;
  color: #a9b8ca;
  font-size: 12.5px;
}

.empty span {
  color: var(--muted-soft);
  font-size: 10.5px;
}

.foot {
  margin-top: 18px;
  color: rgb(145 162 184 / 62%);
  font-size: 10px;
  text-align: center;
}

/* ---------------- 到账弹层 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  padding: 20px;
  background: rgb(2 6 13 / 72%);
  backdrop-filter: blur(5px);
  place-items: center;
}

.modal-card {
  width: 100%;
  max-width: 350px;
  padding: 24px 21px 19px;
  background:
    linear-gradient(145deg, rgb(59 130 246 / 9%), transparent 52%),
    var(--panel-solid);
  border: 1px solid rgb(96 165 250 / 20%);
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgb(0 0 0 / 48%);
  text-align: center;
}

.pay-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  color: #93c5fd;
  background: var(--accent-soft);
  border: 1px solid rgb(96 165 250 / 30%);
  border-radius: 50%;
  place-items: center;
}

.modal-card h2 {
  margin: 0 0 11px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 650;
}

.pay-order {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  word-break: break-all;
}

.pay-order b {
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 11px;
}

.pay-amount {
  margin: 9px 0 0;
  color: #ffe2ac;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pay-note {
  margin: 11px 0 0;
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.75;
}

.modal-card .btn {
  width: 100%;
  margin-top: 16px;
}

/* ---------------- 轻提示 ---------------- */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  color: #fff;
  background: rgb(20 31 48 / 96%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgb(0 0 0 / 32%);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .app {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-note {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgb(3 8 17 / 35%) 0%, rgb(3 8 17 / 56%) 36%, rgb(3 8 17 / 92%) 100%),
      url("./assets/shop-home-beauty-bg-mobile-v2.webp") center top / cover no-repeat,
      var(--bg);
  }

  .app {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    min-height: 0;
    padding: 0 6px env(safe-area-inset-bottom);
    background: rgb(5 10 19 / 96%);
    border-top: 1px solid var(--line);
    border-right: 0;
    backdrop-filter: blur(20px);
  }

  .brand,
  .sidebar-wallet,
  .sidebar-foot {
    display: none;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 66px;
    gap: 2px;
    padding: 4px 0 0;
  }

  .nav-item {
    display: flex;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    border: 0;
    border-radius: 6px;
    text-align: center;
  }

  .nav-item:hover {
    transform: none;
  }

  .nav-item.active::before {
    top: -4px;
    right: 11px;
    bottom: auto;
    left: 11px;
    width: auto;
    height: 2px;
    border-radius: 0 0 2px 2px;
  }

  .nav-item > .icon {
    width: 19px;
    height: 19px;
    margin: 0;
  }

  .nav-copy {
    width: 100%;
  }

  .nav-copy strong {
    font-size: 9.5px;
    font-weight: 550;
    text-align: center;
  }

  .nav-copy small {
    display: none;
  }

  .workspace {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .topbar-context span {
    display: none;
  }

  .topbar-context h1 {
    margin: 0;
    font-size: 17px;
  }

  .account-copy small {
    display: none;
  }

  .account-copy b {
    max-width: 92px;
  }

  .account-chip {
    padding-right: 7px;
  }

  .content {
    padding: 14px 12px 26px;
  }

  .panel {
    min-height: 0;
    padding: 16px 13px;
    box-shadow: 0 18px 44px rgb(0 0 0 / 24%);
    backdrop-filter: blur(13px);
  }

  .panel-head {
    gap: 13px;
    padding-bottom: 14px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .panel-sub {
    font-size: 10.5px;
  }

  .panel-balance {
    width: 100%;
    grid-template-columns: 1fr auto;
    padding: 9px 10px;
  }

  .panel-balance > strong {
    justify-self: end;
  }

  .panel-balance .btn {
    grid-column: auto;
    margin-top: 0;
  }

  .catalog-tools {
    gap: 9px;
    padding: 13px 0;
  }

  .search-box {
    width: 100%;
    height: 36px;
  }

  .category-tabs {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .card {
    padding: 14px;
  }

  .card:hover {
    transform: none;
  }

  .table-wrap {
    display: none;
  }

  .order-cards {
    display: flex;
  }

  .profile-layout {
    gap: 10px;
    padding-top: 14px;
  }

  .profile-identity {
    min-height: 144px;
    padding: 18px 15px;
  }

  .profile-avatar {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }

  .profile-identity h3 {
    font-size: 18px;
  }

  .status-pill {
    top: 12px;
    right: 12px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-stats article {
    min-height: 82px;
    padding: 14px;
  }

  .profile-note {
    padding: 14px;
  }

  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 8px;
  }

  .account-copy {
    display: none;
  }

  .account-chip {
    padding: 3px;
    border-color: transparent;
    background: transparent;
  }

  .account-avatar {
    width: 32px;
    height: 32px;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .wallet-line {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
