:root {
  --bg: #edf5ff;
  --bg-2: #f4eeff;
  --text: #233044;
  --muted: #69758a;
  --line: #e8edf6;
  --blue: #5d76f8;
  --purple: #7b45ff;
  --pink: #ff3f68;
  --green: #16b56f;
  --teal: #008779;
  --card: rgba(255, 255, 255, .88);
  --shadow: 0 18px 45px rgba(95, 111, 175, .16);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  position: relative;
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 8%, rgba(0, 135, 121, .08), transparent 23%),
    radial-gradient(circle at 13% 20%, rgba(119, 106, 255, .12), transparent 26%),
    radial-gradient(circle at 70% 28%, rgba(167, 113, 255, .16), transparent 24%),
    linear-gradient(115deg, var(--bg), var(--bg-2));
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(93, 118, 248, .16) 1px, transparent 1px),
    radial-gradient(circle, rgba(0, 135, 121, .12) 1px, transparent 1px);
  background-size: 72px 72px, 118px 118px;
  background-position: 0 0, 34px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.78), transparent 82%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid #dce7f7;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(74, 91, 140, .08);
}

.site-nav {
  width: min(1160px, calc(100% - 36px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand, .dashboard-brand {
  font-size: 28px;
  font-weight: 900;
  color: #2e3a55;
  letter-spacing: .02em;
}
.brand,
.dashboard-brand.has-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.68), transparent 40%),
    linear-gradient(135deg, #5d76f8, #00a58f);
  box-shadow: 0 10px 22px rgba(93, 118, 248, .24);
}
.brand.has-logo::before {
  display: none;
}
.brand img,
.dashboard-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255,255,255,.7);
  box-shadow: 0 10px 22px rgba(93, 118, 248, .16);
}

.site-nav nav a {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  color: #526079;
}

.site-nav nav a.active {
  color: #3157d4;
  background: #eef4ff;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.query-btn, .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #d7e4fb;
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
  color: #3157b7;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(55, 76, 130, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.query-btn:hover, .user-chip:hover {
  transform: translateY(-1px);
  border-color: #b7caf7;
  box-shadow: 0 12px 28px rgba(55, 76, 130, .12);
}

.query-btn::before { content: "⌕"; font-size: 18px; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-block;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, #c9c5be 19% 60%, #e8e7e2 61%);
}
.user-chip small { display: block; color: #687589; font-weight: 700; }

.page-shell {
  position: relative;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 72px;
}
.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .65;
}
.page-shell::before {
  width: 54px;
  height: 54px;
  right: 7%;
  top: 315px;
  background: radial-gradient(circle at 35% 35%, #fff, rgba(79, 172, 254, .18) 62%, transparent 68%);
}
.page-shell::after {
  width: 22px;
  height: 22px;
  left: 4%;
  top: 560px;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255, 63, 104, .18) 68%, transparent 70%);
}

.notice-card, .category-bar, .goods-card, .detail-hero, .detail-card, .buy-card, .buy-panel, .auth-card, .query-card, .panel, .tips-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.notice-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 24px 28px;
  margin-bottom: 22px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(255,255,255,.94), rgba(255,255,255,.78)),
    radial-gradient(circle at 8% 0%, rgba(123, 69, 255, .12), transparent 28%);
}
.notice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 55%, rgba(255,255,255,.46) 68%, transparent 82%);
  transform: translateX(-55%);
  opacity: .7;
}
.notice-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #7b45ff, #5d76f8);
  box-shadow: 0 16px 32px rgba(93, 118, 248, .24);
  font-weight: 1000;
}
.notice-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.section-title {
  margin-bottom: 14px;
  font-weight: 900;
  color: var(--purple);
}
.section-title::before { content: "●"; margin-right: 10px; color: #ffb84d; }
.notice-card p {
  margin: 0;
  line-height: 1.65;
  font-weight: 800;
  color: #25334a;
}

.category-bar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 24px;
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(12px);
}
.category-meta {
  display: grid;
  gap: 4px;
}
.category-meta span {
  color: #7a8699;
  font-size: 12px;
  font-weight: 900;
}
.category-meta strong {
  font-size: 16px;
  color: #25334a;
}
.category-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, max-content));
  justify-content: end;
  gap: 12px;
  min-width: 0;
}
.category-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #d9d0ff;
  border-radius: 999px;
  color: #8066ff;
  background: linear-gradient(135deg, #fff, #f8f4ff);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(123, 69, 255, .09);
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.category-pill::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #7b45ff, transparent);
  opacity: 0;
  transition: opacity .18s ease, bottom .18s ease;
}
.category-pill:hover {
  transform: translateY(-1px);
  border-color: #bda9ff;
  box-shadow: 0 14px 30px rgba(123, 69, 255, .14);
}
.category-pill.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  box-shadow: 0 16px 34px rgba(93, 118, 248, .24);
}
.category-pill.active::after {
  bottom: -8px;
  opacity: .78;
}
.category-pill span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8b54ff, #5d76f8);
}
.category-pill.active span {
  color: var(--blue);
  background: #fff;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 16px;
}

.goods-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: 1fr auto;
  gap: 14px;
  min-height: 158px;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.82)),
    radial-gradient(circle at 82% 0%, rgba(123, 69, 255, .1), transparent 35%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.goods-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0 65%, rgba(255,255,255,.7) 78%, transparent 92%);
  transform: translateX(-48%);
  opacity: 0;
  transition: opacity .18s ease, transform .45s ease;
}
.goods-card:hover {
  transform: translateY(-4px);
  border-color: #d5dcff;
  box-shadow: 0 24px 56px rgba(84, 97, 174, .22);
}
.goods-card:hover::before {
  opacity: .65;
  transform: translateX(26%);
}

.goods-cover {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  border-radius: 9px;
  overflow: hidden;
  align-self: start;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(222, 230, 246, .9);
  box-shadow: inset 0 0 0 6px rgba(248, 250, 255, .82);
}
.goods-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  transition: transform .22s ease;
}
.goods-card:hover .goods-cover img,
.goods-card:hover .product-badge {
  transform: scale(1.045);
}

.product-badge {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(255,255,255,.2), transparent 36%),
    var(--badge-color, #6974f7);
  box-shadow: inset 0 -18px 40px rgba(0, 0, 0, .08);
  transition: transform .22s ease;
}
.product-badge span { font-size: 28px; font-weight: 1000; }
.product-badge.large { border-radius: 44px; }
.product-badge.large span { font-size: 64px; }

.goods-info {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.goods-title {
  color: #5263de;
  font-weight: 900;
  line-height: 1.4;
  min-height: 40px;
  transition: color .18s ease;
}
.goods-card:hover .goods-title {
  color: #354edf;
}
.goods-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.goods-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #516079;
  background: #f3f6fb;
  border: 1px solid #e6ecf6;
  font-size: 10px;
  font-weight: 900;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 12px;
}
.price-row strong { color: #ff2f69; font-size: 19px; }
.price-row del { color: #a9aeb8; }
.card-actions {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin-top: 2px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(62px, .8fr) minmax(88px, .9fr) minmax(80px, .85fr);
  gap: 6px;
  align-items: center;
}
.card-actions span, .card-actions em, .card-actions a {
  min-height: 28px;
  padding: 6px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-style: normal;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-actions span { color: #7564d7; background: #f0eaff; }
.card-actions em {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(135deg, #12b969, #0aa361);
  font-weight: 900;
  box-shadow: 0 7px 14px rgba(10, 163, 97, .18);
  transform: translateZ(0);
  animation: autoShipPulse 2.6s ease-in-out infinite;
}
.card-actions em::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 0 20%, rgba(255,255,255,.42) 42%, transparent 62% 100%);
  transform: translateX(-135%);
  animation: autoShipSweep 3.2s ease-in-out infinite;
}
.card-actions em::after {
  content: "⚡";
  display: inline-block;
  margin-left: 3px;
  font-size: 10px;
  transform-origin: center;
  animation: autoShipBolt 1.4s ease-in-out infinite;
}
.goods-card:hover .card-actions em {
  box-shadow: 0 10px 22px rgba(10, 163, 97, .28);
  transform: translateY(-1px);
}
.card-actions a {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #8b54ff, #6d35f5);
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(109, 53, 245, .16);
}
.card-actions a::after {
  content: "›";
  margin-left: 4px;
  font-size: 13px;
}

@keyframes autoShipSweep {
  0%, 38% { transform: translateX(-135%); opacity: 0; }
  48% { opacity: 1; }
  68% { transform: translateX(135%); opacity: 0; }
  100% { transform: translateX(135%); opacity: 0; }
}

@keyframes autoShipPulse {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.12) brightness(1.04); }
}

@keyframes autoShipBolt {
  0%, 100% { opacity: .82; transform: scale(1) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.18) rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .card-actions em,
  .card-actions em::before,
  .card-actions em::after {
    animation: none;
  }
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  padding-top: 24px;
}
.detail-main { display: grid; gap: 22px; }
.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 410px) 1fr;
  gap: 30px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 16%, rgba(93, 118, 248, .12), transparent 32%),
    linear-gradient(140deg, rgba(255,255,255,.96), rgba(255,255,255,.84));
}
.detail-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(0, 135, 121, .08);
}
.detail-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}
.detail-image-wrap::before {
  content: "";
  position: absolute;
  width: 76%;
  height: 76%;
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(93, 118, 248, .18), rgba(0, 135, 121, .12));
  filter: blur(28px);
}
.detail-image {
  position: relative;
  z-index: 1;
  width: min(410px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(220, 230, 248, .95);
  border-radius: 30px;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 0 0 10px rgba(247, 250, 255, .72), 0 26px 52px rgba(91, 103, 160, .16);
}
.detail-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 22px;
}
.detail-summary {
  position: relative;
  z-index: 1;
  min-width: 0;
  align-self: center;
}
.detail-eyebrow {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #087f5b;
  background: #e9faf3;
  border: 1px solid #b9ead2;
  font-size: 12px;
  font-weight: 900;
}
.detail-summary h1 {
  margin: 14px 0 18px;
  color: #5b67df;
  font-size: 34px;
  line-height: 1.24;
}
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.meta-pills span {
  display: grid;
  gap: 5px;
  min-width: 108px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe5ee;
  background: rgba(245, 247, 251, .82);
  color: #5060c8;
  font-weight: 800;
}
.meta-pills b {
  color: #7a8699;
  font-size: 12px;
}
.price-banner, .buy-submit {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff696e, #ff315c);
  box-shadow: 0 14px 28px rgba(255, 63, 104, .25);
}
.price-banner::after, .buy-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 0 38%, rgba(255,255,255,.12) 38% 62%, transparent 62%);
}
.price-banner {
  width: min(420px, 100%);
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 30px;
  font-weight: 1000;
}
.price-banner small {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  opacity: .82;
}
.detail-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.detail-trust-row span {
  padding: 8px 10px;
  border-radius: 999px;
  color: #56657a;
  background: #f4f7fb;
  border: 1px solid #e5edf5;
  font-size: 12px;
  font-weight: 900;
}
.detail-trust-row span::before {
  content: "✓";
  margin-right: 5px;
  color: #0aa361;
}
.detail-card {
  padding: 28px 34px;
  min-height: 170px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.82)),
    radial-gradient(circle at 100% 0%, rgba(123,69,255,.08), transparent 34%);
}
.detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #dfe5ee;
}
.detail-card-head span {
  color: #7b45ff;
  font-size: 12px;
  font-weight: 900;
}
.detail-card h2 { margin: 6px 0 0; }
.detail-card-head em {
  padding: 8px 12px;
  border-radius: 999px;
  color: #087f5b;
  background: #e9faf3;
  font-style: normal;
  font-weight: 900;
}
.detail-card p {
  color: #526079;
  line-height: 1.8;
  font-weight: 800;
}
.detail-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.detail-feature-grid div {
  padding: 16px;
  border: 1px solid #e5edf5;
  border-radius: 14px;
  background: #f8fbff;
}
.detail-feature-grid strong,
.detail-feature-grid span {
  display: block;
}
.detail-feature-grid strong {
  margin-bottom: 8px;
}
.detail-feature-grid span {
  color: #718096;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.buy-panel {
  position: sticky;
  top: 102px;
  align-self: start;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.82)),
    radial-gradient(circle at 0 0, rgba(123,69,255,.1), transparent 34%);
  backdrop-filter: blur(12px);
}
.buy-panel form {
  display: grid;
}
.buy-panel-head {
  padding: 24px 24px 18px;
  border-bottom: 1px solid #e8edf6;
}
.buy-panel-head span {
  color: #7b45ff;
  font-size: 12px;
  font-weight: 900;
}
.buy-panel-head h2 {
  margin: 6px 0 8px;
}
.buy-panel-head p {
  margin: 0;
  color: #69758a;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}
.buy-card {
  box-shadow: none;
  padding: 20px 24px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e8edf6;
  border-radius: 0;
  background: transparent;
}
.buy-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.buy-card h3 { margin: 0; }
.buy-card-title span {
  color: #7a8699;
  font-size: 12px;
  font-weight: 900;
}
.qty-control {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  background: #fff;
}
.qty-control button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #8b54ff, #5d76f8);
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
}
.qty-control input {
  border: 0;
  text-align: center;
  font-size: 20px;
  color: #344057;
}
.pay-option {
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 12px 16px;
  border: 2px solid #e3e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 900;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.pay-option.active {
  border-color: #6680ff;
  background: linear-gradient(120deg, #f5f6ff, #fff);
  box-shadow: 0 12px 26px rgba(93, 118, 248, .12);
}
.pay-option input { display: none; }
.pay-option strong {
  display: grid;
  gap: 4px;
}
.pay-option small {
  color: #718096;
  font-size: 12px;
  font-weight: 800;
}
.pay-option em {
  display: none;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #5d76f8;
  font-style: normal;
}
.pay-option.active em { display: grid; }
.pay-icon {
  width: 48px;
  height: 48px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  overflow: hidden;
}
.pay-icon.alipay,
.pay-icon.blue {
  background: transparent;
}
.pay-icon.wechat,
.pay-icon.green {
  background: transparent;
}
.pay-icon.balance,
.pay-icon.orange {
  background: linear-gradient(135deg, #ff9b52, #ff6b35);
}
.pay-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.pay-icon.alipay::before,
.pay-icon.alipay::after,
.pay-icon.wechat::before,
.pay-icon.wechat::after { content: none; }
.pay-icon.balance::before {
  content: "";
  width: 22px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: inset 0 5px 0 rgba(255,255,255,.35);
}
.buy-submit {
  width: calc(100% - 48px);
  min-height: 66px;
  margin: 22px 24px 24px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 1000;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.buy-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255, 63, 104, .3);
}
.buy-submit:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.buy-result {
  margin: 0 24px 24px;
  padding: 16px;
  border-radius: 10px;
  background: #eefbf4;
  border: 1px solid #bcecd2;
  color: #11643f;
}
.buy-result.error {
  background: #fff1f2;
  border-color: #ffc8d1;
  color: #be123c;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
}

.site-footer {
  min-height: 88px;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto 22px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  border: 1px solid #dce7f7;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 44px rgba(74, 91, 140, .1);
  backdrop-filter: blur(12px);
  color: #6b7689;
}
.site-footer b {
  color: #2e3a55;
  font-size: 16px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #526079;
  background: #f5f8ff;
  font-weight: 800;
  transition: color .18s ease, background .18s ease;
}
.site-footer nav a:hover {
  color: #3157d4;
  background: #eef4ff;
}
.float-tools {
  position: fixed;
  right: 20px;
  bottom: 22px;
  display: grid;
  gap: 10px;
}
.float-tools span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: #ff8aae;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.float-tools span:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(95, 111, 175, .2);
}

.auth-shell, .query-shell {
  min-height: 62vh;
  display: grid;
  place-items: center;
}
.auth-card, .query-card {
  width: min(470px, 100%);
  padding: 34px;
}
.auth-card h1, .query-card h1 { margin-top: 0; }
.auth-card p, .query-card p, .muted { color: var(--muted); }
label { display: grid; gap: 8px; font-weight: 800; color: #4a566b; }
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.auth-card form, .query-card form, .stack-form { display: grid; gap: 15px; }
.primary-btn {
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, #8360ff, #5b6ff2);
  font-weight: 1000;
  cursor: pointer;
}
.auth-switch { margin-top: 18px; color: var(--muted); }
.auth-switch a { color: #5263de; font-weight: 900; }
.alert, .toast {
  padding: 12px 14px;
  border-radius: 10px;
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #ffd5d2;
}
.order-result {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.order-result div, .balance-card {
  padding: 16px;
  border-radius: 10px;
  background: #f7f9fc;
}
.order-result span, .balance-card span { display: block; color: var(--muted); }

.visitor-main {
  background:
    radial-gradient(circle at 75% 20%, rgba(0, 135, 121, .06), transparent 22%),
    #f7fafa;
}
.visitor-wrap {
  width: min(940px, 100%);
  margin: 24px auto 0;
}
.visitor-title-card, .visitor-tabs, .visitor-search, .visitor-order-card, .empty-state {
  background: #fff;
  border: 1px solid #e4ecec;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(31, 49, 58, .08);
}
.visitor-title-card {
  padding: 30px;
  margin-bottom: 22px;
}
.visitor-title-card span {
  color: var(--teal);
  font-weight: 900;
}
.visitor-title-card h1 {
  margin: 18px 0 10px;
  font-size: 30px;
}
.visitor-title-card p {
  margin: 0;
  color: #6c7888;
  font-weight: 700;
}
.visitor-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.visitor-tabs button,
.visitor-tabs a {
  border: 0;
  border-radius: 10px;
  padding: 15px 12px;
  background: #f4f7f7;
  color: #6c7888;
  font-weight: 900;
  text-align: center;
}
.visitor-tabs button.active,
.visitor-tabs a.active {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 22px rgba(0, 135, 121, .18);
}
.visitor-search {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.visitor-orders {
  display: grid;
  gap: 20px;
}
.account-order-list {
  margin-top: 24px;
}
.visitor-order-card {
  overflow: hidden;
}
.visitor-order-head, .visitor-order-body, .visitor-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
}
.visitor-order-head {
  border-bottom: 1px solid #e9efef;
}
.visitor-order-head span, .visitor-order-foot span, .visitor-order-meta span {
  display: block;
  color: #6c7888;
  font-weight: 800;
  font-size: 13px;
}
.visitor-order-head strong {
  display: block;
  margin-top: 8px;
}
.visitor-order-head em {
  padding: 9px 18px;
  border-radius: 999px;
  color: #087f5b;
  background: #dff8ed;
  border: 1px solid #9ee8ca;
  font-style: normal;
  font-weight: 900;
}
.visitor-order-body {
  min-height: 120px;
}
.mini-logo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #6b83ff, #8b54ff);
  font-weight: 1000;
}
.order-list-cover {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.order-list-cover img,
.order-list-cover .product-badge {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}
.order-list-cover .product-badge {
  display: grid;
  place-items: center;
}
.visitor-order-body > strong {
  flex: 1;
}
.visitor-order-meta {
  min-width: 150px;
  text-align: right;
}
.visitor-order-meta b {
  display: block;
  margin: 6px 0 12px;
}
.visitor-order-foot {
  background: #fbfdfd;
  border-top: 1px solid #e9efef;
}
.visitor-order-foot strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 20px;
}
.visitor-order-foot details {
  width: min(360px, 55%);
}
.visitor-order-foot summary {
  width: fit-content;
  margin-left: auto;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #cfe4e4;
  color: #1d3542;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}
.visitor-order-foot pre {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #f3f7f7;
}
.empty-state {
  padding: 34px;
  color: #6c7888;
  text-align: center;
  font-weight: 800;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
  background: #f5f7f7;
}
.side-nav {
  min-height: 100vh;
  padding: 34px 24px;
  background: rgba(255,255,255,.96);
  border-right: 1px solid #e2e9e9;
}
.admin-body {
  grid-template-columns: 280px 1fr;
  background: #f4f7fb;
}
.admin-body .dashboard-main {
  padding-bottom: 80px;
}
.admin-side {
  background:
    radial-gradient(circle at 40% 8%, rgba(64, 109, 255, .28), transparent 28%),
    linear-gradient(180deg, #101827, #162033);
  border-right: 0;
  color: #cbd5e1;
  box-shadow: 18px 0 45px rgba(15, 23, 42, .12);
}
.admin-side .dashboard-brand {
  color: #fff;
}
.admin-side a:not(.dashboard-brand) {
  color: #cbd5e1;
}
.admin-side a.active,
.admin-side a:not(.dashboard-brand):hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.dashboard-brand {
  display: block;
  margin: 18px 0 36px;
  color: var(--teal);
  text-align: center;
}
.side-nav a:not(.dashboard-brand) {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 13px;
  margin: 8px 0;
  font-weight: 900;
}
.side-nav a.active {
  color: var(--teal);
  background: #dceeee;
}
.dashboard-main { min-width: 0; padding: 0 44px 60px; }
.dashboard-top {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -44px 28px;
  padding: 0 44px;
  background: #fff;
  border-bottom: 1px solid #e2e9e9;
}
.dashboard-top > div { display: flex; gap: 12px; align-items: center; }
.admin-top {
  height: 88px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
}
.admin-heading span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-heading h1 {
  margin: 4px 0 0;
  font-size: 24px;
}
.admin-heading p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.menu-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--teal);
  background: #e6f3f2;
  font-size: 22px;
}
.profile-hero {
  min-height: 210px;
  padding: 46px 34px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.18) 0 13%, transparent 14%),
    linear-gradient(110deg, #078073, #21c1b8 58%, #8daa43);
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
.profile-hero p, .profile-hero h1 { margin: 0 0 10px; }
.profile-hero > span {
  padding: 14px 20px;
  border-radius: 24px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  font-weight: 900;
}
.hero-actions { display: flex; gap: 14px; margin-top: 24px; }
.hero-actions a {
  padding: 14px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.14);
  font-weight: 900;
}
.hero-actions a:first-child { background: #fff; color: var(--teal); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.admin-overview-grid,
.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 22px;
  margin-bottom: 24px;
}
.wide-card {
  max-width: 1180px;
}
.stat-grid article, .panel, .tips-box {
  padding: 24px;
}
.stat-grid article {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5ecec;
}
.admin-stats article {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.admin-stats article::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(93, 118, 248, .1);
}
.stat-grid span, .account-grid span { color: var(--muted); font-weight: 800; }
.stat-grid strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 29px;
}
.stat-grid small { color: var(--muted); }
.panel { margin-bottom: 24px; background: #fff; }
.admin-form-card, .admin-table-card {
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.admin-card-accent {
  min-height: 260px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(135deg, #2563eb, #0f766e);
  border: 0;
  border-radius: 22px;
}
.admin-card-accent span {
  color: rgba(255,255,255,.75);
  font-weight: 900;
}
.admin-card-accent h2 {
  margin: 20px 0 12px;
  font-size: 30px;
}
.admin-card-accent p {
  max-width: 720px;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}
.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.primary-link, .ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 900;
}
.primary-link {
  color: #0f766e;
  background: #fff;
}
.ghost-link {
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.overview-kpis article.risk::after {
  background: rgba(244, 63, 94, .14);
}
.overview-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.25fr) minmax(260px, .85fr);
  gap: 18px;
  margin-bottom: 24px;
}
.overview-command-card {
  min-height: 320px;
}
.overview-command-card .admin-actions-row {
  align-items: center;
}
.overview-chart-card,
.overview-worklist,
.overview-rank-card {
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.overview-chart-card .panel-head,
.overview-worklist .panel-head,
.overview-rank-card .panel-head {
  padding: 0 0 18px;
  border-bottom: 0;
}
.mini-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-height: 220px;
  align-items: end;
  padding-top: 12px;
}
.mini-bar-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}
.bar-track {
  position: relative;
  height: 118px;
  border-radius: 999px;
  background: #eef3f8;
  overflow: hidden;
}
.bar-track span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5d76f8, #0f766e);
}
.mini-bar-item strong {
  color: #1e293b;
  font-size: 12px;
  white-space: nowrap;
}
.mini-bar-item small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.overview-worklist {
  display: grid;
  align-content: start;
  gap: 10px;
}
.overview-worklist a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdff;
}
.overview-worklist a span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 13px;
  color: #0f766e;
  background: #e8f6f3;
  font-weight: 1000;
}
.overview-worklist a strong {
  color: #1e293b;
}
.overview-worklist a small {
  color: #64748b;
  font-weight: 800;
}
.overview-lower-grid {
  display: grid;
  grid-template-columns: 1.1fr .95fr .95fr;
  gap: 18px;
  margin-bottom: 24px;
}
.overview-list,
.payment-breakdown,
.stock-watch-list {
  display: grid;
  gap: 10px;
}
.overview-list > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fbfdff;
}
.overview-list em {
  grid-row: span 2;
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 12px;
  color: #5d76f8;
  background: #eef2ff;
  font-style: normal;
  font-weight: 1000;
}
.overview-list strong {
  min-width: 0;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-list span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.overview-list b {
  grid-row: span 2;
  color: #f43f5e;
  white-space: nowrap;
}
.payment-breakdown > div {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fbfdff;
}
.payment-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.payment-breakdown strong {
  color: #1e293b;
}
.payment-breakdown small {
  color: #64748b;
  font-weight: 800;
}
.payment-breakdown div div {
  height: 9px;
  border-radius: 999px;
  background: #eef3f8;
  overflow: hidden;
}
.payment-breakdown i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16b56f, #5d76f8);
}
.stock-watch-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #fecdd3;
  border-radius: 13px;
  background: #fff7f8;
}
.stock-watch-list strong {
  min-width: 0;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stock-watch-list span {
  flex: 0 0 auto;
  color: #be123c;
  font-weight: 900;
}
.overview-orders-card {
  margin-bottom: 24px;
}
.admin-checklist {
  border-radius: 22px;
  border: 1px solid #e6ebf2;
}
.admin-checklist h2 {
  margin-top: 0;
}
.admin-checklist ul {
  margin: 16px 0 0;
  padding-left: 18px;
}
.admin-checklist li {
  margin: 13px 0;
  color: #475569;
  font-weight: 800;
}
.admin-table-card {
  padding: 0;
  overflow: hidden;
}
.admin-table-card .panel-head {
  padding: 24px;
  border-bottom: 1px solid #edf1f6;
}
.admin-table-card table th {
  background: #f8fafc;
  color: #475569;
}
.admin-table-card table td,
.admin-table-card table th {
  padding: 16px 18px;
}
.payment-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.payment-health-grid div {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fbfdff;
}
.payment-health-grid small {
  color: #64748b;
  line-height: 1.55;
  font-weight: 800;
}
.site-builder {
  display: block;
}
.site-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.site-builder-main {
  display: grid;
  gap: 18px;
}
.site-config-card {
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.site-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.site-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.site-form-grid .full-span {
  grid-column: 1 / -1;
}
.site-preview-column {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}
.site-preview-card {
  overflow: hidden;
  color: #fff;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.24), transparent 24%),
    linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}
.site-preview-card > span {
  color: rgba(255,255,255,.78);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-preview-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  font-size: 30px;
}
.site-preview-card h2 img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
}
.site-preview-card p {
  margin: 0 0 18px;
  color: rgba(255,255,255,.78);
  font-weight: 800;
  line-height: 1.6;
}
.site-preview-notice {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
}
.site-preview-notice b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--blue);
  background: #fff;
}
.site-preview-notice strong,
.site-preview-notice small {
  display: block;
}
.site-preview-notice small {
  margin-top: 5px;
  color: rgba(255,255,255,.74);
  line-height: 1.45;
}
.site-preview-product {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  color: #1e293b;
  background: rgba(255,255,255,.94);
}
.site-preview-product div {
  grid-row: span 2;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.55), transparent 42%),
    linear-gradient(135deg, var(--pink), var(--blue));
}
.site-preview-product strong {
  align-self: end;
}
.site-preview-product em {
  width: fit-content;
  align-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #047857;
  background: #dcfce7;
  font-style: normal;
  font-weight: 1000;
}
.site-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.site-preview-actions .primary-btn {
  min-height: 42px;
  padding: 0 18px;
  background: #fff;
  color: var(--teal);
}
.site-tips-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.panel-head.compact h2 {
  margin: 0 0 7px;
}
.panel-head.compact p {
  margin: 0;
  color: #64748b;
}
.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.admin-inline-form .full-span,
.full-span {
  grid-column: 1 / -1;
}
.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
}
.admin-check input {
  width: auto;
}
.upload-field input[type="file"] {
  min-height: 52px;
  padding: 12px;
  border-style: dashed;
  background: #fbfdff;
  cursor: pointer;
}
.current-upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fbfdff;
}
.current-upload-preview span {
  color: #64748b;
  font-weight: 900;
}
.current-upload-preview img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.admin-edit-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}
.admin-edit-row {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #fbfdff;
}
.admin-row-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-row-title .product-badge.mini {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}
.admin-row-title .product-badge.mini span {
  font-size: 14px;
}
.admin-row-fields {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(100px, .7fr)) minmax(90px, .55fr) minmax(74px, .45fr) minmax(84px, .45fr) minmax(84px, .45fr);
  gap: 12px;
  align-items: end;
}
.admin-row-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-weight: 800;
}
.compact-btn {
  min-width: 110px;
  padding: 11px 16px;
}
.danger-button {
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: #be123c;
  background: #fff1f2;
  font-weight: 1000;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.danger-button:hover {
  transform: translateY(-1px);
  border-color: #fda4af;
  box-shadow: 0 12px 24px rgba(244, 63, 94, .14);
}
.goods-admin-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.goods-admin-hero article {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 20px;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.goods-admin-hero article::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(15, 118, 110, .1);
}
.goods-admin-hero article.warn::after {
  background: rgba(244, 63, 94, .13);
}
.goods-admin-hero span {
  color: #64748b;
  font-weight: 900;
}
.goods-admin-hero strong {
  display: block;
  margin: 12px 0 6px;
  color: #0f172a;
  font-size: 30px;
}
.goods-admin-hero small {
  color: #64748b;
  font-weight: 800;
}
.admin-create-drawer {
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.admin-create-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
}
.admin-create-drawer > summary::-webkit-details-marker {
  display: none;
}
.admin-create-drawer > summary h2 {
  margin: 0 0 7px;
}
.admin-create-drawer > summary p {
  margin: 0;
  color: #64748b;
}
.admin-create-drawer > summary > span {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f766e;
  background: #e8f6f3;
  font-weight: 900;
}
.admin-create-drawer .admin-inline-form {
  padding: 0 24px 24px;
}
.goods-workbench .panel-head {
  align-items: flex-start;
}
.goods-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .7fr) minmax(160px, .7fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 18px 24px;
  border-bottom: 1px solid #edf1f6;
  background: #fbfdff;
}
.goods-filter-bar .ghost-button {
  min-height: 43px;
}
.goods-list-head {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(190px, .8fr) minmax(120px, .55fr) minmax(140px, .55fr) minmax(190px, .65fr);
  gap: 16px;
  padding: 14px 24px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #edf1f6;
  font-size: 13px;
  font-weight: 1000;
}
.goods-manage-list {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #f8fafc;
}
.goods-manage-row {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}
.goods-manage-row.is-offline {
  opacity: .78;
}
.goods-manage-row.is-low-stock {
  border-color: #fecdd3;
}
.goods-row-main {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(190px, .8fr) minmax(120px, .55fr) minmax(140px, .55fr) minmax(190px, .65fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}
.goods-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.goods-identity img,
.goods-identity .product-badge.mini {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 13px;
  object-fit: contain;
  background: #f8fafc;
}
.goods-identity .product-badge.mini span {
  font-size: 16px;
}
.goods-identity strong {
  display: block;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.45;
}
.goods-identity p {
  margin: 5px 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.goods-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.goods-mini-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 900;
}
.goods-price-stack,
.goods-stock-stack,
.goods-state-stack {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.goods-price-stack strong,
.goods-stock-stack strong {
  color: #f43f5e;
  font-size: 19px;
}
.goods-stock-stack strong {
  color: #0f766e;
}
.goods-price-stack em,
.goods-stock-stack em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 1000;
}
.profit-ok,
.goods-stock-stack em {
  color: #047857;
  background: #dcfce7;
}
.profit-warn,
.goods-manage-row.is-low-stock .goods-stock-stack em {
  color: #be123c;
  background: #ffe4e6;
}
.goods-state-stack small {
  color: #94a3b8;
  line-height: 1.35;
}
.goods-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.goods-row-actions .ghost-button,
.goods-row-actions .inline-action button {
  min-height: 38px;
  white-space: nowrap;
}
.goods-edit-drawer {
  border-top: 1px solid #edf1f6;
  background: #fcfdff;
}
.goods-edit-drawer > summary {
  padding: 13px 18px;
  color: #0f766e;
  cursor: pointer;
  font-size: 13px;
  font-weight: 1000;
  list-style-position: inside;
}
.goods-edit-drawer form {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(110px, .55fr)) minmax(150px, .7fr) minmax(98px, .45fr) minmax(86px, .4fr) minmax(100px, .45fr) minmax(112px, .5fr);
  gap: 12px;
  align-items: end;
  padding: 0 18px 18px;
}
.goods-edit-drawer .primary-btn {
  min-height: 48px;
}
.category-admin-hero {
  margin-bottom: 18px;
}
.category-admin-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.category-list-card {
  min-width: 0;
}
.category-manage-list {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #f8fafc;
}
.category-manage-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}
.category-row-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.category-row-title > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  border-radius: 14px;
  color: #0f766e;
  background: #e8f6f3;
  font-weight: 1000;
}
.category-row-title strong {
  display: block;
  color: #1e293b;
}
.category-row-title small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-weight: 800;
}
.category-row-title em {
  margin-left: auto;
  font-style: normal;
}
.category-row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 90px 110px;
  gap: 10px;
  align-items: end;
}
.category-row-actions {
  display: flex;
  justify-content: flex-end;
}
.inline-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.inline-action input,
.inline-action select {
  width: auto;
  min-width: 88px;
  padding: 8px 10px;
}
.inline-action button,
.ghost-button {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 12px;
  color: #334155;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}
.inline-pre {
  max-width: 360px;
  max-height: 86px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.panel-head h2 { margin-bottom: 8px; }
.panel-head p { margin: 0; color: var(--muted); }
.panel-head > span {
  padding: 10px 18px;
  border-radius: 20px;
  color: #c66b00;
  background: #fff7ed;
  border: 1px solid #fdba74;
  font-weight: 900;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.account-grid div {
  padding: 18px;
  border-radius: 10px;
  background: #f7faf9;
  border: 1px solid #dce8e7;
}
.account-grid strong {
  display: block;
  margin-top: 11px;
  word-break: break-all;
}
.balance-page {
  width: min(1100px, 100%);
  margin: 34px auto 0;
}
.balance-hero-card {
  position: relative;
  min-height: 206px;
  padding: 34px 42px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 98% 0%, rgba(255,255,255,.2) 0 80px, transparent 81px),
    radial-gradient(circle at -8% 110%, rgba(255,255,255,.18) 0 120px, transparent 121px),
    linear-gradient(115deg, #0b8278, #17bda8 48%, #83ad4d);
  box-shadow: 0 26px 70px rgba(35, 70, 62, .16);
}
.balance-hero-card span {
  display: block;
  margin-bottom: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}
.balance-hero-card strong {
  display: block;
  margin-bottom: 28px;
  font-size: 42px;
  line-height: 1;
}
.balance-hero-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.balance-hero-card a,
.balance-hero-action {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 900;
}
.balance-hero-action {
  font: inherit;
  cursor: pointer;
}
.balance-ledger-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e2eeee;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 24px 70px rgba(31, 49, 58, .07);
}
.balance-ledger-head {
  padding: 28px 32px 22px;
}
.balance-ledger-head h2 {
  margin: 0 0 10px;
}
.balance-ledger-head p {
  margin: 0;
  color: #657284;
  font-weight: 800;
}
.balance-ledger-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 10px;
  border-top: 1px solid #edf3f3;
  border-left: 1px solid #edf3f3;
  border-right: 1px solid #edf3f3;
  margin: 0 22px;
}
.balance-ledger-toolbar button {
  width: 28px;
  height: 28px;
  border: 1px solid #d7e0e0;
  background: #fff;
  color: #536170;
  font-weight: 900;
  cursor: pointer;
}
.balance-table-wrap {
  margin: 0 22px 26px;
  overflow-x: auto;
  border-left: 1px solid #edf3f3;
  border-right: 1px solid #edf3f3;
}
.balance-ledger-table th {
  background: #f0f7f5;
  color: #243447;
  font-weight: 900;
}
.balance-ledger-table th,
.balance-ledger-table td {
  padding: 18px 16px;
  border-bottom: 0;
  color: #233044;
  font-weight: 800;
}
.ledger-change {
  display: inline-flex;
  justify-content: center;
  min-width: 54px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  line-height: 1.1;
}
.ledger-change.negative {
  background: #3d3346;
}
.ledger-change.positive {
  background: #087f5b;
}
.balance-empty {
  padding: 34px 16px;
  text-align: center;
  color: #748094;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(1px);
}
.modal-backdrop[hidden] {
  display: none;
}
.recharge-dialog {
  width: min(680px, 100%);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(15, 23, 42, .28);
}
.recharge-dialog-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  border-bottom: 1px solid #e8eeee;
}
.recharge-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}
.recharge-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #cfe5e5;
  border-radius: 10px;
  color: var(--teal);
  background: #f4fbfb;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.recharge-form {
  display: grid;
  gap: 24px;
}
.recharge-section {
  display: grid;
  gap: 12px;
  padding: 24px 24px 0;
}
.recharge-section > label {
  color: #263445;
  font-weight: 900;
}
.recharge-amount-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.recharge-amount {
  min-height: 76px;
  border: 2px solid #bddddd;
  border-radius: 9px;
  background: linear-gradient(135deg, #f8fcfc, #fff);
  color: #1f2937;
  cursor: pointer;
}
.recharge-amount.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(0, 135, 121, .12);
}
.recharge-amount.custom {
  border-style: dashed;
  border-color: #c4d3ea;
}
.recharge-amount span,
.recharge-amount strong {
  display: block;
  font-weight: 900;
}
.recharge-amount span {
  margin-bottom: 7px;
}
.custom-recharge-row input {
  width: 100%;
}
.recharge-hint {
  margin: 0;
  color: #6f7d90;
  font-weight: 800;
  font-size: 13px;
}
.recharge-hint::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border-radius: 50%;
  color: #667085;
  background: #edf1f7;
  font-size: 11px;
  font-weight: 900;
}
.recharge-pay-list {
  display: grid;
  gap: 10px;
}
.recharge-pay {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px 16px;
  border: 2px solid #c6e0df;
  border-radius: 9px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.recharge-pay.active {
  border-color: var(--teal);
  background: linear-gradient(120deg, rgba(0, 135, 121, .08), rgba(255, 255, 255, .92), rgba(255, 230, 128, .16));
}
.recharge-pay .pay-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-weight: 1000;
}
.recharge-pay .pay-icon.alipay,
.recharge-pay .pay-icon.wechat { background: transparent; }
.recharge-pay strong {
  display: grid;
  gap: 5px;
}
.recharge-pay small {
  color: #718096;
  font-weight: 800;
}
.recharge-pay em {
  display: none;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-style: normal;
  font-weight: 900;
}
.recharge-pay.active em {
  display: grid;
}
.recharge-result {
  margin: 0 24px;
  padding: 14px;
  border-radius: 10px;
  color: #075f56;
  background: #eefbf8;
  border: 1px solid #bfe5df;
  font-weight: 800;
}
.recharge-result.error {
  color: #b42318;
  background: #fff4f2;
  border-color: #fecdca;
}
.recharge-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 24px;
  background: #f8fafc;
}
.recharge-dialog-foot .primary-btn,
.recharge-dialog-foot .ghost-button {
  min-width: 120px;
  min-height: 50px;
}
.tips-box {
  border: 1px dashed #8bd0d0;
  background: rgba(255,255,255,.65);
  box-shadow: none;
}
.tips-box li { margin: 12px 0; color: #687589; font-weight: 700; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f5;
  text-align: left;
}
th { color: #69758a; }
.status-ok {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #087f5b;
  background: #e8faf2;
  font-weight: 900;
}
.status-warn {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #b45309;
  background: #fff7ed;
  font-weight: 900;
}
.card-info-row td { background: #fbfcff; }
.toast {
  margin-bottom: 18px;
  color: #11643f;
  background: #eefbf4;
  border-color: #bcecd2;
}

/* ---- Payment QR Code & Polling ---- */
.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  padding: 16px;
  max-width: 320px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8edf6;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.qr-code-container svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.qr-code-container img {
  max-width: 100%;
  height: auto;
}
.qr-hint {
  text-align: center;
  color: #69758a;
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 18px;
}
.check-pay-btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.order-detail-main {
  background:
    radial-gradient(circle at 70% 12%, rgba(0, 135, 121, .04), transparent 24%),
    #f7fafa;
}
.order-detail-hero,
.order-detail-card,
.order-cards-panel {
  background: #fff;
  border: 1px solid #d9ecec;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(31, 49, 58, .06);
}
.order-detail-hero {
  min-height: 142px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.order-detail-hero span {
  color: var(--teal);
  font-weight: 900;
}
.order-detail-hero h1 {
  margin: 14px 0 8px;
  font-size: 30px;
}
.order-detail-hero p {
  margin: 0;
  color: #6c7888;
  font-weight: 800;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.order-detail-card {
  min-height: 248px;
  padding: 22px;
}
.order-detail-card h2,
.order-cards-panel h2 {
  margin: 0 0 18px;
}
.order-product {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 10px 6px;
}
.order-product-cover {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
}
.order-product-cover img,
.order-product-cover .product-badge {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
}
.order-product strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 17px;
}
.order-product p {
  margin: 0;
  color: #6c7888;
  font-weight: 800;
}
.order-info-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 24px;
  margin: 0;
}
.order-info-list dt {
  color: #6c7888;
  font-weight: 800;
}
.order-info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
}
.order-cards-panel {
  padding: 22px;
}
.order-cards-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.order-cards-head p {
  margin: 0;
  color: #6c7888;
  font-weight: 800;
}
.order-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.order-card-actions .primary-btn,
.order-detail-actions .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}
.order-card-list {
  display: grid;
  gap: 14px;
}
.order-card-list article {
  padding: 16px;
  border: 1px solid #dfe9e9;
  border-radius: 14px;
  background: #f8fbfb;
}
.order-card-list article > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.order-card-list pre {
  margin: 0;
  padding: 14px;
  border: 1px dashed #b8dddd;
  border-radius: 10px;
  background: #fff;
  color: #1f2d3d;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.order-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .goods-grid, .stat-grid, .admin-grid, .admin-stats, .goods-admin-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-overview-grid, .admin-two-col, .overview-dashboard-grid, .overview-lower-grid, .site-builder-grid, .category-admin-grid { grid-template-columns: 1fr; }
  .admin-inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-preview-column { position: static; }
  .site-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-row-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goods-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goods-list-head { display: none; }
  .goods-row-main { grid-template-columns: 1fr 1fr; align-items: start; }
  .goods-row-actions { justify-content: flex-start; }
  .goods-edit-drawer form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-manage-row { grid-template-columns: 1fr; }
  .category-row-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .detail-hero { grid-template-columns: 300px 1fr; }
  .detail-feature-grid { grid-template-columns: 1fr; }
  .detail-image { width: 300px; }
  .dashboard-body { grid-template-columns: 240px 1fr; }
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-grid { grid-template-columns: 1fr; }
  .category-bar { align-items: flex-start; }
  .category-pills { justify-content: start; }
  .card-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav { height: auto; padding: 14px 0; flex-wrap: wrap; }
  .nav-actions { width: 100%; margin-left: 0; }
  .goods-grid, .stat-grid, .admin-grid, .goods-admin-hero { grid-template-columns: 1fr; }
  .admin-inline-form { grid-template-columns: 1fr; }
  .site-form-grid,
  .site-form-grid.two { grid-template-columns: 1fr; }
  .mini-bar-chart { gap: 7px; }
  .mini-bar-item strong { display: none; }
  .payment-breakdown span,
  .stock-watch-list a { display: grid; }
  .overview-list > div { grid-template-columns: 38px minmax(0, 1fr); }
  .overview-list b { grid-column: 2; grid-row: auto; }
  .goods-filter-bar,
  .goods-row-main,
  .goods-edit-drawer form,
  .category-row-fields { grid-template-columns: 1fr; }
  .admin-create-drawer > summary { display: grid; }
  .admin-create-drawer > summary > span { width: fit-content; }
  .goods-row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .goods-row-actions .ghost-button,
  .goods-row-actions .inline-action,
  .goods-row-actions .inline-action button { width: 100%; justify-content: center; }
  .notice-card { grid-template-columns: 1fr; padding: 20px; }
  .notice-icon { width: 44px; height: 44px; border-radius: 14px; }
  .category-bar { grid-template-columns: 1fr; }
  .category-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-pill { width: 100%; min-width: 0; }
  .goods-card { grid-template-columns: 88px 1fr; }
  .goods-cover { width: 88px; height: 88px; }
  .goods-tags { margin-top: 5px; }
  .card-actions { grid-template-columns: 1fr 1fr; }
  .visitor-wrap { margin-top: 10px; }
  .visitor-tabs, .visitor-search { grid-template-columns: 1fr; }
  .visitor-order-head, .visitor-order-body, .visitor-order-foot { display: grid; justify-items: start; }
  .visitor-order-meta { text-align: left; }
  .visitor-order-foot details { width: 100%; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-image { width: 100%; }
  .detail-summary h1 { font-size: 27px; }
  .meta-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meta-pills span { min-width: 0; padding: 11px 10px; }
  .detail-card { padding: 22px; }
  .detail-card-head { display: grid; }
  .buy-panel-head,
  .buy-card { padding-left: 20px; padding-right: 20px; }
  .buy-submit { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .dashboard-body { display: block; }
  .side-nav { min-height: auto; display: flex; overflow-x: auto; gap: 8px; padding: 14px; }
  .dashboard-brand { display: none; }
  .side-nav a:not(.dashboard-brand) { white-space: nowrap; margin: 0; }
  .dashboard-main { padding: 0 16px 40px; }
  .dashboard-top { margin: 0 -16px 18px; padding: 0 16px; }
  .profile-hero { display: block; padding: 28px 20px; }
  .hero-actions { flex-wrap: wrap; }
  .account-grid { grid-template-columns: 1fr; }
  .balance-page { margin-top: 14px; }
  .balance-hero-card { padding: 28px 22px; }
  .balance-hero-card strong { font-size: 36px; }
  .balance-ledger-head { padding: 22px; }
  .balance-ledger-toolbar,
  .balance-table-wrap { margin-left: 12px; margin-right: 12px; }
  .site-footer {
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px;
  }
  .order-detail-hero,
  .order-cards-head,
  .order-detail-actions {
    display: grid;
    justify-items: start;
  }
  .order-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .site-nav,
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 1160px);
  }

  .payment-health-grid,
  .site-builder-grid,
  .overview-dashboard-grid,
  .overview-lower-grid,
  .admin-overview-grid,
  .admin-two-col,
  .category-admin-grid,
  .order-detail-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .site-preview-column,
  .buy-panel {
    position: static;
  }

  .admin-top {
    height: auto;
    min-height: 76px;
    align-items: flex-start;
    gap: 14px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .admin-heading h1 {
    font-size: 22px;
  }

  .admin-heading p {
    max-width: 100%;
  }

  .table-wrap,
  .balance-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table,
  .balance-ledger-table {
    min-width: 720px;
  }

  .table-wrap::-webkit-scrollbar,
  .balance-table-wrap::-webkit-scrollbar,
  .side-nav::-webkit-scrollbar,
  .category-pills::-webkit-scrollbar {
    height: 6px;
  }

  .table-wrap::-webkit-scrollbar-thumb,
  .balance-table-wrap::-webkit-scrollbar-thumb,
  .side-nav::-webkit-scrollbar-thumb,
  .category-pills::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(93, 118, 248, .28);
  }
}

@media (max-width: 640px) {
  :root {
    --shadow: 0 12px 28px rgba(95, 111, 175, .14);
  }

  body {
    background:
      radial-gradient(circle at 90% 8%, rgba(0, 135, 121, .07), transparent 22%),
      linear-gradient(135deg, var(--bg), var(--bg-2));
  }

  body::before,
  .page-shell::before,
  .page-shell::after {
    display: none;
  }

  .site-header {
    position: sticky;
  }

  .site-nav {
    gap: 10px 12px;
  }

  .brand,
  .dashboard-brand {
    font-size: 22px;
  }

  .brand::before {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 8px;
  }

  .brand img {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .site-nav nav {
    margin-left: auto;
  }

  .site-nav nav a {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .query-btn,
  .user-chip {
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
  }

  .user-chip .avatar {
    display: none;
  }

  .page-shell {
    padding: 14px 0 42px;
  }

  .notice-card,
  .category-bar,
  .goods-card,
  .detail-hero,
  .detail-card,
  .buy-panel,
  .auth-card,
  .query-card,
  .panel,
  .tips-box,
  .visitor-title-card,
  .visitor-tabs,
  .visitor-search,
  .visitor-order-card {
    border-radius: 14px;
  }

  .notice-card {
    margin-bottom: 14px;
  }

  .section-title {
    margin-bottom: 10px;
  }

  .notice-card p {
    font-size: 13px;
    line-height: 1.7;
  }

  .category-bar {
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
  }

  .category-pills {
    display: flex;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
  }

  .category-pill {
    flex: 0 0 auto;
    min-width: 126px;
    min-height: 42px;
    padding: 8px 12px;
    scroll-snap-align: start;
  }

  .goods-grid {
    gap: 14px;
  }

  .goods-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    min-height: 140px;
    padding: 10px;
  }

  .goods-cover {
    width: 76px;
    height: 76px;
    border-radius: 12px;
  }

  .goods-cover img,
  .goods-cover .product-badge {
    border-radius: 12px;
  }

  .product-badge span {
    font-size: 20px;
  }

  .goods-title {
    min-height: auto;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
  }

  .goods-tags {
    display: none;
  }

  .price-row {
    margin-top: 9px;
  }

  .price-row strong {
    font-size: 17px;
  }

  .price-row del {
    font-size: 12px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .card-actions span,
  .card-actions em,
  .card-actions a {
    min-height: 32px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .detail-layout {
    padding-top: 8px;
    gap: 16px;
  }

  .detail-hero {
    gap: 18px;
    padding: 18px;
  }

  .detail-image {
    width: min(100%, 320px);
    padding: 12px;
    border-radius: 22px;
    box-shadow: inset 0 0 0 6px rgba(247, 250, 255, .72), 0 18px 34px rgba(91, 103, 160, .14);
  }

  .detail-image img {
    border-radius: 16px;
  }

  .detail-eyebrow {
    font-size: 11px;
  }

  .detail-summary h1 {
    margin: 12px 0 14px;
    font-size: 24px;
  }

  .meta-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .meta-pills span {
    padding: 9px 8px;
    font-size: 12px;
  }

  .price-banner {
    padding: 14px 18px;
    font-size: 24px;
  }

  .detail-trust-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 18px;
  }

  .detail-feature-grid {
    gap: 10px;
  }

  .buy-panel-head,
  .buy-card {
    padding: 18px;
  }

  .buy-card-title {
    align-items: flex-start;
  }

  .qty-control {
    grid-template-columns: 48px 1fr 48px;
  }

  .pay-option {
    grid-template-columns: 38px 1fr 22px;
    gap: 10px;
    min-height: 60px;
    padding: 10px 12px;
  }

  .buy-submit {
    width: calc(100% - 36px);
    min-height: 56px;
    margin: 18px;
    font-size: 18px;
  }

  .auth-shell,
  .query-shell {
    min-height: auto;
    place-items: start;
  }

  .auth-card,
  .query-card {
    padding: 22px;
  }

  .visitor-wrap {
    width: 100%;
  }

  .visitor-title-card {
    padding: 22px;
  }

  .visitor-title-card h1 {
    margin-top: 10px;
    font-size: 24px;
  }

  .visitor-tabs {
    gap: 8px;
    padding: 10px;
  }

  .visitor-tabs button,
  .visitor-tabs a {
    padding: 12px 10px;
  }

  .visitor-search {
    padding: 12px;
  }

  .visitor-order-head,
  .visitor-order-body,
  .visitor-order-foot {
    gap: 12px;
    padding: 16px;
  }

  .visitor-order-body {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
  }

  .visitor-order-body > strong {
    min-width: 0;
  }

  .visitor-order-meta {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .order-list-cover,
  .mini-logo {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 14px;
  }

  .visitor-order-foot {
    grid-template-columns: 1fr;
  }

  .dashboard-body {
    background: #f5f7f7;
  }

  .side-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    border-right: 0;
    border-bottom: 1px solid #e2e9e9;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }

  .admin-side {
    background:
      linear-gradient(90deg, #101827, #162033);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  }

  .side-nav a:not(.dashboard-brand) {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    flex: 0 0 auto;
  }

  .dashboard-body:not(.admin-body) .side-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 10px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.9)),
      radial-gradient(circle at 12% 0, rgba(0, 135, 121, .08), transparent 30%);
  }

  .dashboard-body:not(.admin-body) .dashboard-brand {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin: 0 0 2px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--teal);
    background: linear-gradient(135deg, #e7f6f4, #f3f8ff);
    border: 1px solid rgba(0, 135, 121, .14);
    font-size: 18px;
    box-shadow: 0 10px 24px rgba(0, 135, 121, .08);
  }

  .dashboard-body:not(.admin-body) .dashboard-brand img {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
  }

  .dashboard-body:not(.admin-body) .dashboard-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-body:not(.admin-body) .side-nav a:not(.dashboard-brand) {
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #263244;
    background: rgba(255,255,255,.64);
    box-shadow: none;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }

  .dashboard-body:not(.admin-body) .side-nav a.active {
    color: var(--teal);
    border-color: rgba(0, 135, 121, .14);
    background: linear-gradient(135deg, #dff3f1, #eef7ff);
    box-shadow: 0 8px 18px rgba(0, 135, 121, .08);
  }

  .dashboard-main {
    padding: 0 12px 34px;
  }

  .dashboard-top {
    height: auto;
    min-height: 64px;
    margin: 0 -12px 14px;
    padding: 10px 12px;
  }

  .dashboard-body:not(.admin-body) .dashboard-top {
    justify-content: flex-end;
    min-height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dashboard-top > div {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .menu-btn {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .dashboard-body:not(.admin-body) .menu-btn {
    display: none;
  }

  .dashboard-body:not(.admin-body) .dashboard-top .query-btn,
  .dashboard-body:not(.admin-body) .dashboard-top .user-chip {
    min-height: 42px;
    border-radius: 14px;
  }

  .admin-heading {
    min-width: 0;
  }

  .admin-heading span {
    font-size: 11px;
  }

  .admin-heading h1 {
    font-size: 19px;
  }

  .admin-heading p {
    display: none;
  }

  .profile-hero {
    min-height: auto;
    border-radius: 18px;
  }

  .profile-hero h1 {
    font-size: 24px;
  }

  .dashboard-body:not(.admin-body) .profile-hero {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 24px 18px 18px;
    overflow: hidden;
    background:
      radial-gradient(circle at 95% 0, rgba(255,255,255,.24) 0 16%, transparent 17%),
      radial-gradient(circle at 4% 100%, rgba(255,255,255,.16) 0 18%, transparent 19%),
      linear-gradient(135deg, #078073, #1eb8ad 55%, #87a641);
  }

  .dashboard-body:not(.admin-body) .profile-hero p {
    margin-bottom: 8px;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    font-weight: 900;
  }

  .dashboard-body:not(.admin-body) .profile-hero h1 {
    max-width: calc(100% - 96px);
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.25;
  }

  .dashboard-body:not(.admin-body) .profile-hero > span {
    position: absolute;
    top: 18px;
    right: 16px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    font-size: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
  }

  .hero-actions a,
  .primary-btn,
  .ghost-button,
  .danger-button,
  .compact-btn {
    justify-content: center;
    text-align: center;
  }

  .dashboard-body:not(.admin-body) .hero-actions a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 14px;
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  }

  .dashboard-body:not(.admin-body) .hero-actions a:first-child {
    color: var(--teal);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .1);
  }

  .dashboard-body:not(.admin-body) .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 18px;
  }

  .dashboard-body:not(.admin-body) .stat-grid article {
    position: relative;
    min-height: 112px;
    padding: 16px;
    overflow: hidden;
    border-radius: 16px;
    border-color: #e3ebee;
    background:
      radial-gradient(circle at 100% 0, rgba(0, 135, 121, .08), transparent 34%),
      #fff;
    box-shadow: 0 12px 28px rgba(31, 49, 58, .06);
  }

  .dashboard-body:not(.admin-body) .stat-grid article:nth-child(3) {
    grid-column: 1 / -1;
    min-height: 96px;
  }

  .dashboard-body:not(.admin-body) .stat-grid span {
    font-size: 12px;
  }

  .dashboard-body:not(.admin-body) .stat-grid strong {
    margin: 9px 0 6px;
    font-size: 22px;
    line-height: 1.15;
  }

  .dashboard-body:not(.admin-body) .stat-grid small {
    display: block;
    color: #728093;
    font-size: 12px;
    line-height: 1.45;
  }

  .dashboard-body:not(.admin-body) .account-panel {
    margin-top: 12px;
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .account-panel .panel-head {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .dashboard-body:not(.admin-body) .account-panel .panel-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
  }

  .dashboard-body:not(.admin-body) .account-panel .panel-head p {
    font-size: 13px;
    line-height: 1.45;
  }

  .dashboard-body:not(.admin-body) .account-panel .panel-head > span {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
  }

  .dashboard-body:not(.admin-body) .account-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .dashboard-body:not(.admin-body) .account-grid div {
    padding: 14px;
    border-radius: 14px;
  }

  .dashboard-body:not(.admin-body) .account-grid strong {
    margin-top: 7px;
    font-size: 15px;
  }

  .dashboard-body:not(.admin-body) .tips-box {
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .tips-box h2 {
    margin-top: 0;
    font-size: 20px;
  }

  .dashboard-body:not(.admin-body) .balance-page {
    margin-top: 12px;
  }

  .dashboard-body:not(.admin-body) .balance-hero-card {
    min-height: auto;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .balance-hero-card span {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .dashboard-body:not(.admin-body) .balance-hero-card strong {
    margin-bottom: 18px;
    font-size: 34px;
  }

  .dashboard-body:not(.admin-body) .balance-hero-card div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-body:not(.admin-body) .balance-hero-card a,
  .dashboard-body:not(.admin-body) .balance-hero-action {
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-panel {
    margin-top: 14px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-head {
    padding: 18px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-head h2 {
    margin-bottom: 6px;
    font-size: 22px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-head p {
    font-size: 13px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-toolbar {
    display: none;
  }

  .dashboard-body:not(.admin-body) .balance-table-wrap {
    margin: 0;
    overflow: visible;
    border: 0;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table,
  .dashboard-body:not(.admin-body) .balance-ledger-table tbody,
  .dashboard-body:not(.admin-body) .balance-ledger-table tr,
  .dashboard-body:not(.admin-body) .balance-ledger-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table thead {
    display: none;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table tbody {
    display: grid;
    gap: 10px;
    padding: 0 12px 14px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table tr {
    padding: 12px;
    border: 1px solid #e2eeee;
    border-radius: 14px;
    background: #fbfdfd;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    font-size: 13px;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table td::before {
    color: #718096;
    font-weight: 900;
  }

  .dashboard-body:not(.admin-body) .balance-ledger-table td:nth-child(1)::before { content: "说明"; }
  .dashboard-body:not(.admin-body) .balance-ledger-table td:nth-child(2)::before { content: "变动"; }
  .dashboard-body:not(.admin-body) .balance-ledger-table td:nth-child(3)::before { content: "变动前"; }
  .dashboard-body:not(.admin-body) .balance-ledger-table td:nth-child(4)::before { content: "时间"; }

  .dashboard-body:not(.admin-body) .balance-empty {
    display: block !important;
    padding: 24px 14px;
  }

  .dashboard-body:not(.admin-body) .visitor-wrap {
    margin-top: 12px;
  }

  .dashboard-body:not(.admin-body) .visitor-title-card {
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .visitor-title-card span {
    font-size: 12px;
  }

  .dashboard-body:not(.admin-body) .visitor-title-card h1 {
    margin: 10px 0 8px;
    font-size: 22px;
  }

  .dashboard-body:not(.admin-body) .visitor-title-card p {
    font-size: 13px;
    line-height: 1.55;
  }

  .dashboard-body:not(.admin-body) .visitor-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .dashboard-body:not(.admin-body) .visitor-tabs a,
  .dashboard-body:not(.admin-body) .visitor-tabs button {
    min-height: 42px;
    padding: 10px 12px;
    text-align: left;
  }

  .dashboard-body:not(.admin-body) .visitor-tabs a.active,
  .dashboard-body:not(.admin-body) .visitor-tabs button.active {
    text-align: center;
  }

  .dashboard-body:not(.admin-body) .visitor-search {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }

  .dashboard-body:not(.admin-body) .visitor-search .primary-btn {
    width: 100%;
    min-height: 44px;
  }

  .dashboard-body:not(.admin-body) .visitor-orders,
  .dashboard-body:not(.admin-body) .account-order-list {
    gap: 12px;
    margin-top: 12px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-card {
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(31, 49, 58, .06);
  }

  .dashboard-body:not(.admin-body) .visitor-order-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 14px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-head strong {
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-size: 14px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-head em {
    padding: 7px 12px;
    font-size: 12px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-body {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-body > strong {
    align-self: center;
    line-height: 1.45;
  }

  .dashboard-body:not(.admin-body) .visitor-order-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    width: 100%;
    text-align: left;
  }

  .dashboard-body:not(.admin-body) .visitor-order-meta b {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
  }

  .dashboard-body:not(.admin-body) .visitor-order-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .dashboard-body:not(.admin-body) .visitor-order-foot .ghost-button,
  .dashboard-body:not(.admin-body) .visitor-order-foot summary {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    text-align: center;
  }

  .stat-grid,
  .admin-grid,
  .admin-stats,
  .goods-admin-hero,
  .account-grid {
    gap: 12px;
  }

  .stat-grid article,
  .panel,
  .tips-box {
    padding: 18px;
  }

  .stat-grid strong,
  .goods-admin-hero strong {
    font-size: 24px;
  }

  .admin-card-accent {
    min-height: auto;
    border-radius: 18px;
  }

  .admin-card-accent h2 {
    font-size: 24px;
  }

  .admin-actions-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mini-bar-chart {
    min-height: 160px;
  }

  .bar-track {
    height: 86px;
  }

  .overview-worklist a,
  .overview-list > div {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .overview-list b {
    grid-column: 2;
    grid-row: auto;
  }

  .admin-table-card .panel-head,
  .panel-head {
    padding: 18px;
  }

  .panel-head,
  .panel-head.compact {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .admin-inline-form,
  .admin-row-fields,
  .goods-filter-bar,
  .goods-row-main,
  .goods-edit-drawer form,
  .category-row-fields,
  .site-form-grid,
  .site-form-grid.two {
    grid-template-columns: 1fr;
  }

  .admin-inline-form {
    gap: 12px;
  }

  .admin-check {
    min-height: 44px;
  }

  .current-upload-preview {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .goods-filter-bar {
    padding: 14px;
  }

  .goods-manage-list {
    padding: 12px;
  }

  .goods-row-main {
    padding: 14px;
  }

  .goods-identity {
    align-items: flex-start;
  }

  .goods-identity img,
  .goods-identity .product-badge.mini {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .goods-price-stack,
  .goods-stock-stack,
  .goods-state-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .goods-row-actions {
    grid-template-columns: 1fr 1fr;
  }

  .goods-edit-drawer form {
    padding: 0 14px 14px;
  }

  .category-list-card {
    padding: 0;
  }

  .category-manage-row {
    padding: 14px;
  }

  .payment-health-grid {
    gap: 10px;
  }

  .site-preview-card {
    border-radius: 18px;
  }

  .balance-hero-card {
    border-radius: 18px;
  }

  .balance-ledger-toolbar,
  .balance-table-wrap {
    margin-left: 0;
    margin-right: 0;
  }

  .order-detail-main {
    padding-bottom: 42px;
  }

  .dashboard-body:not(.admin-body) .order-detail-main {
    background: #f7fafa;
  }

  .order-detail-hero {
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .order-detail-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    min-height: auto;
    margin-bottom: 14px;
  }

  .dashboard-body:not(.admin-body) .order-detail-hero span {
    font-size: 12px;
  }

  .order-detail-hero h1 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .dashboard-body:not(.admin-body) .order-detail-hero h1 {
    margin: 10px 0 8px;
    font-size: 22px;
    line-height: 1.35;
  }

  .dashboard-body:not(.admin-body) .order-detail-hero p {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.5;
  }

  .dashboard-body:not(.admin-body) .order-detail-hero em {
    padding: 8px 12px;
    white-space: nowrap;
  }

  .dashboard-body:not(.admin-body) .order-detail-grid {
    gap: 12px;
    margin-bottom: 14px;
  }

  .order-detail-card,
  .order-cards-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-body:not(.admin-body) .order-detail-card {
    min-height: auto;
    padding: 16px;
  }

  .dashboard-body:not(.admin-body) .order-detail-card h2,
  .dashboard-body:not(.admin-body) .order-cards-panel h2 {
    margin-bottom: 12px;
    font-size: 18px;
  }

  .order-product {
    align-items: flex-start;
  }

  .dashboard-body:not(.admin-body) .order-product {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 0;
  }

  .dashboard-body:not(.admin-body) .order-product-cover,
  .dashboard-body:not(.admin-body) .order-product-cover img,
  .dashboard-body:not(.admin-body) .order-product-cover .product-badge {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .dashboard-body:not(.admin-body) .order-product strong {
    margin: 2px 0 7px;
    font-size: 15px;
    line-height: 1.45;
  }

  .order-info-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-body:not(.admin-body) .order-info-list {
    grid-template-columns: minmax(92px, .6fr) minmax(0, 1fr);
    gap: 10px 12px;
  }

  .dashboard-body:not(.admin-body) .order-info-list dt,
  .dashboard-body:not(.admin-body) .order-info-list dd {
    font-size: 13px;
  }

  .order-info-list dd {
    text-align: left;
  }

  .dashboard-body:not(.admin-body) .order-info-list dd {
    text-align: right;
    overflow-wrap: anywhere;
  }

  .order-cards-head {
    gap: 12px;
  }

  .dashboard-body:not(.admin-body) .order-cards-panel {
    padding: 16px;
  }

  .dashboard-body:not(.admin-body) .order-cards-head {
    display: grid;
    margin-bottom: 12px;
  }

  .dashboard-body:not(.admin-body) .order-cards-head p {
    font-size: 13px;
  }

  .order-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .order-card-actions .ghost-button,
  .order-card-actions .primary-btn {
    width: 100%;
  }

  .order-card-list article {
    padding: 12px;
  }

  .dashboard-body:not(.admin-body) .order-card-list {
    gap: 10px;
  }

  .order-card-list article > div {
    align-items: flex-start;
  }

  .dashboard-body:not(.admin-body) .order-card-list article > div {
    align-items: center;
  }

  .order-card-list pre,
  .inline-pre {
    max-width: 100%;
    overflow-x: auto;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .dashboard-body:not(.admin-body) .order-card-list pre {
    max-height: 180px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.65;
  }

  .order-detail-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .order-detail-actions .ghost-button,
  .order-detail-actions .primary-btn {
    width: 100%;
  }

  .float-tools {
    right: 12px;
    bottom: 14px;
  }

  .float-tools span {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 420px) {
  .site-nav,
  .page-shell,
  .site-footer {
    width: min(100% - 16px, 1160px);
  }

  .brand,
  .dashboard-brand {
    font-size: 20px;
  }

  .nav-actions {
    grid-template-columns: 1fr;
  }

  .category-meta strong {
    font-size: 15px;
  }

  .goods-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .goods-cover {
    width: 70px;
    height: 70px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .card-actions span,
  .card-actions em,
  .card-actions a {
    width: 100%;
  }

  .meta-pills {
    grid-template-columns: 1fr;
  }

  .detail-summary h1,
  .visitor-title-card h1,
  .order-detail-hero h1 {
    font-size: 22px;
  }

  .visitor-order-body {
    grid-template-columns: 1fr;
  }

  .goods-price-stack,
  .goods-stock-stack,
  .goods-state-stack,
  .goods-row-actions {
    grid-template-columns: 1fr;
  }

  .payment-health-grid div,
  .admin-checklist li,
  .panel-head.compact p {
    font-size: 13px;
  }

  input,
  select,
  textarea {
    padding: 12px;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 4px;
  padding: 10px;
}
.pagination a,
.pagination span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #dce7f7;
  background: rgba(255,255,255,.86);
  color: #526079;
  font-weight: 900;
}
.pagination a {
  color: #5263de;
}
.pagination a.disabled {
  pointer-events: none;
  opacity: .45;
}

.pay-page-shell {
  min-height: 62vh;
  display: grid;
  place-items: center;
}
.pay-status-card {
  width: min(480px, 100%);
  padding: 24px;
  border: 1px solid #dce7f7;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 135, 121, .08), transparent 30%),
    rgba(255,255,255,.94);
  box-shadow: 0 28px 70px rgba(74, 91, 140, .16);
}
.pay-status-card.error {
  border-color: #ffc8d1;
  background: #fff7f8;
}
.pay-status-head,
.pay-product-line,
.pay-amount-line,
.pay-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.pay-status-head span {
  color: var(--teal);
  font-weight: 1000;
}
.pay-status-head em {
  padding: 8px 13px;
  border-radius: 999px;
  color: #0a7b5a;
  background: #dff8ed;
  border: 1px solid #9ee8ca;
  font-style: normal;
  font-weight: 900;
}
.pay-product-line {
  justify-content: flex-start;
  margin: 20px 0;
}
.pay-product-line h1 {
  margin: 0 0 6px;
  font-size: 22px;
}
.pay-product-line p,
.pay-amount-line span {
  margin: 0;
  color: #718096;
  font-weight: 800;
}
.pay-amount-line {
  padding: 16px;
  border-radius: 16px;
  background: #f6f8fb;
}
.pay-amount-line strong {
  color: var(--pink);
  font-size: 26px;
}
.pay-page-qr {
  margin: 20px auto 14px;
}
.pay-page-actions {
  margin-top: 18px;
}
.pay-page-actions .primary-btn,
.pay-page-actions .ghost-button {
  flex: 1;
}

@media (max-width: 640px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .site-nav nav {
    grid-column: 2;
    grid-row: 1;
  }

  .nav-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goods-card {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 132px;
    padding: 12px;
    border-radius: 16px;
  }

  .goods-cover {
    width: 82px;
    height: 82px;
  }

  .goods-title {
    font-size: 15px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .card-actions span,
  .card-actions em,
  .card-actions a {
    width: auto;
    min-height: 32px;
    border-radius: 8px;
  }

  .detail-hero {
    padding: 16px;
    border-radius: 18px;
  }

  .detail-image {
    width: min(100%, 286px);
    margin: 0 auto;
  }

  .detail-summary h1 {
    font-size: 23px;
    line-height: 1.25;
  }

  .meta-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .buy-panel {
    border-radius: 18px;
    overflow: hidden;
  }

  .buy-panel-head {
    padding: 16px 18px 12px;
  }

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

  .buy-card {
    padding: 16px 18px;
  }

  .pay-option {
    min-height: 58px;
  }

  .float-tools {
    display: none;
  }

  .pagination {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pagination a,
  .pagination span {
    width: 100%;
  }

  .pay-page-shell {
    min-height: auto;
    place-items: start;
  }

  .pay-status-card {
    padding: 18px;
    border-radius: 18px;
  }

  .pay-product-line {
    align-items: flex-start;
  }

  .pay-page-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .nav-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goods-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .goods-cover {
    width: 78px;
    height: 78px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .detail-image {
    width: min(100%, 238px);
    height: min(62vw, 238px);
    padding: 9px;
  }

  .detail-image-wrap::before {
    display: none;
  }

  .detail-summary h1 {
    margin: 10px 0 10px;
    font-size: 22px;
  }

  .meta-pills {
    margin-bottom: 12px;
  }

  .meta-pills span {
    gap: 3px;
    padding: 8px 7px;
    border-radius: 10px;
  }

  .price-banner {
    padding: 12px 16px;
    font-size: 22px;
  }

  .detail-trust-row {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 10px;
  }

  .detail-trust-row span {
    padding: 7px 9px;
    font-size: 11px;
  }
}
