/* ============================================================================
   飒清堂优选 SparkLink · H5 商城 —— 设计系统
   主题：墨黑 + 香槟金（深色底 + 金色点缀，呈现「高端的私域平台」质感）

   组织方式：
     1. 设计令牌        6. 表单与按钮
     2. 基础重置        7. 消费者端
     3. 页面骨架        8. 业务员端
     4. 通用组件        9. 渠道后台
     5. 列表与卡片     10. 动效与响应式
   ========================================================================== */

/* ============================ 1. 设计令牌 ============================ */
:root {
  /* 底色层 */
  --bg: #07080b;
  --bg-2: #0a0d12;
  --chrome: #0a0d12;
  --panel: #12161d;
  --panel-2: #171d26;
  --panel-3: #1e2531;

  /* 文字 */
  --ink: #ede7db;
  --ink-2: #c4bdaf;
  --muted: #8a8479;
  --faint: #5e5a54;

  /* 金调发丝线 */
  --line: rgba(212, 175, 106, 0.16);
  --line-2: rgba(212, 175, 106, 0.09);
  --gold-line: rgba(212, 175, 106, 0.28);

  /* 香槟金 */
  --gold: #d4af6a;
  --gold-2: #ebd3a0;
  --gold-3: #f6e7c4;
  --gold-deep: #8a6a2e;
  --gold-soft: rgba(212, 175, 106, 0.13);

  /* 语义色（暗底可读性已校准） */
  --ok: #6fc08d;
  --ok-soft: rgba(111, 192, 141, 0.14);
  --ok-line: rgba(111, 192, 141, 0.3);
  --warn: #d9a441;
  --warn-soft: rgba(217, 164, 65, 0.14);
  --warn-line: rgba(217, 164, 65, 0.3);
  --bad: #e4706a;
  --bad-soft: rgba(228, 112, 106, 0.14);
  --bad-line: rgba(228, 112, 106, 0.3);
  --info: #6aa8e4;
  --info-soft: rgba(106, 168, 228, 0.14);
  --info-line: rgba(106, 168, 228, 0.3);

  /* 渠道侧（冷）/ 厂家侧（暖）—— 一眼分清链条走到哪一段 */
  --side-q: #22d3ee;
  --side-c: #e0b95f;

  --sh: 0 1px 2px rgba(0, 0, 0, 0.55), 0 18px 40px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* 底部安全区（iPhone 刘海屏） */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ============================ 2. 基础重置 ============================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 500;
}
p {
  margin: 0;
}
a {
  color: var(--gold);
  text-decoration: none;
}
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 106, 0.2);
  border-radius: 3px;
}

/* ============================ 3. 页面骨架 ============================ */
/* 手机壳：小屏铺满，桌面居中显示一列，便于在电脑上验收 */
.shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 600px) {
  body {
    background: var(--bg-2);
  }
  .shell {
    box-shadow: var(--sh);
    border-left: 1px solid var(--line-2);
    border-right: 1px solid var(--line-2);
  }
}

/* 顶栏 */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  padding-top: var(--safe-t);
  height: calc(50px + var(--safe-t));
  background: var(--chrome);
  border-bottom: 1px solid var(--line-2);
  font-size: 16px;
  letter-spacing: 0.5px;
  backdrop-filter: saturate(140%) blur(10px);
}
.appbar .bk {
  width: 34px;
  height: 34px;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
}
.appbar .bk:active {
  background: var(--gold-soft);
}
.appbar .bk svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.appbar .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appbar .rt {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}

/* 内容区 */
.pbody {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 22px;
}
.pbody.has-tab {
  padding-bottom: calc(64px + var(--safe-b));
}

/* 网站底部备案号（法规要求，链接到工信部） */
.site-beian {
  margin: 22px 0 4px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint);
}
.site-beian a {
  color: inherit;
  text-decoration: none;
}

/* 底部 tabbar */
.apptab {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(10, 13, 18, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-2);
  padding-bottom: var(--safe-b);
}
.apptab button {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.15s;
}
.apptab button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.apptab button.on {
  color: var(--gold);
}
.apptab button.on svg {
  stroke: var(--gold);
}

/* 通用页面内边距 */
.pad {
  padding: 14px;
}
.pad-t {
  padding-top: 14px;
}

/* ============================ 4. 通用组件 ============================ */

/* --- 卡片 --- */
.card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 14px;
  margin: 0 14px 12px;
}
.card.flush {
  padding: 0;
  overflow: hidden;
}
.card.gold {
  border-color: var(--gold-line);
}

/* --- 区块标题 --- */
.sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 14px 10px;
}
.sec h3 {
  font-size: 14px;
  letter-spacing: 0.5px;
}
.sec .more {
  font-size: 12px;
  color: var(--muted);
}
.sec .sub {
  font-size: 11.5px;
  color: var(--faint);
}
.sec-line {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), transparent);
  margin: 14px;
}

/* --- 徽章 --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--gold-soft);
  color: var(--gold-2);
  white-space: nowrap;
}
.badge.ok {
  background: var(--ok-soft);
  border-color: var(--ok-line);
  color: var(--ok);
}
.badge.warn {
  background: var(--warn-soft);
  border-color: var(--warn-line);
  color: var(--warn);
}
.badge.bad {
  background: var(--bad-soft);
  border-color: var(--bad-line);
  color: var(--bad);
}
.badge.info {
  background: var(--info-soft);
  border-color: var(--info-line);
  color: var(--info);
}
.badge.plain {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

/* --- 按钮 --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1206;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
}
.btn.plain {
  background: var(--panel-2);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  letter-spacing: 0;
  font-weight: 400;
}
.btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid var(--bad-line);
  letter-spacing: 0;
}
.btn.sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--r-sm);
  letter-spacing: 0;
  width: auto;
}
.btn.xs {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11.5px;
  border-radius: 6px;
  width: auto;
  letter-spacing: 0;
}
.btn-row {
  display: flex;
  gap: 8px;
}
.btn-row .btn {
  width: auto;
  flex: 1;
}

/* --- 底部固定操作条 --- */
.footbar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: calc(10px + var(--safe-b));
  background: rgba(10, 13, 18, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.footbar .price {
  flex: 1;
  min-width: 0;
}
.footbar .price b {
  font-size: 21px;
  color: var(--gold-2);
  font-weight: 500;
}
.footbar .price b i {
  font-size: 13px;
  font-style: normal;
  margin-right: 1px;
}
.footbar .price span {
  display: block;
  font-size: 11px;
  color: var(--faint);
}
.footbar .btn {
  width: auto;
  flex: none;
  min-width: 130px;
}

/* --- 空态 --- */
.empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--faint);
}
.empty .ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty .ico svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
}
.empty p {
  font-size: 13px;
  line-height: 1.8;
}

/* --- 骨架屏 --- */
.sk {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-3) 37%, var(--panel) 63%);
  background-size: 400% 100%;
  animation: shine 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shine {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* --- 提示条 --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  z-index: 300;
  max-width: 86vw;
  padding: 11px 18px;
  border-radius: 99px;
  background: var(--panel-3);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: var(--sh);
}
.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.warn {
  border-color: var(--warn-line);
  color: var(--warn);
}
.toast.bad {
  border-color: var(--bad-line);
  color: var(--bad);
}

/* --- 弹层 --- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.66);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.mask.on {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--gold-line);
  padding: 18px 16px calc(18px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
.mask.on .sheet {
  transform: translateY(0);
}
.sheet h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.sheet .desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.7;
}
@media (min-width: 600px) {
  .mask {
    align-items: center;
  }
  .sheet {
    border-radius: var(--r-lg);
    max-width: 420px;
    border: 1px solid var(--gold-line);
  }
}

/* ============================ 5. 列表与卡片 ============================ */

/* --- 通用行 --- */
.list {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 0 14px 12px;
  overflow: hidden;
}
.list .row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  min-height: 50px;
}
.list .row:last-child {
  border-bottom: 0;
}
.list .row:active {
  background: var(--panel-2);
}
.list .row .k {
  flex: none;
  width: 84px;
  color: var(--muted);
  font-size: 13px;
}
.list .row .v {
  flex: 1;
  min-width: 0;
  text-align: right;
  word-break: break-all;
}
.list .row .v.l {
  text-align: left;
}
.list .row .v.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}
.arrow {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* --- 键值行（卡片内） --- */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}
.kv .k {
  color: var(--muted);
  flex: none;
}
.kv .v {
  text-align: right;
  word-break: break-all;
}
.kv .v.strong {
  color: var(--gold-2);
}
.kv.total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 11px;
  font-size: 15px;
}
.kv.total .v {
  font-size: 19px;
  color: var(--gold-2);
}

/* --- 手机号 / 编号等强调 --- */
.mono {
  font-family: var(--mono);
}

/* ============================ 6. 表单与按钮 ============================ */
.field {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.field:last-child {
  border-bottom: 0;
}
.field label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 11px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-line);
}
.field textarea {
  min-height: 72px;
  resize: vertical;
}
.field .hint {
  font-size: 11px;
  color: var(--faint);
  margin-top: 6px;
  line-height: 1.7;
}
.field.req label::after {
  content: " *";
  color: var(--bad);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 分段器 */
.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.seg button.on {
  background: var(--gold-soft);
  color: var(--gold-2);
  border: 1px solid var(--gold-line);
  padding: 5px 13px;
}

/* 横向滚动筛选 */
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chips button {
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}
.chips button.on {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-2);
}

/* 开关 */
.sw {
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 99px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  cursor: pointer;
  flex: none;
  transition: background 0.18s;
}
.sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.18s;
}
.sw.on {
  background: var(--gold-soft);
  border-color: var(--gold-line);
}
.sw.on::after {
  left: 21px;
  background: var(--gold);
}

/* ============================ 7. 消费者端 ============================ */

/* --- 落地 / 扫码页 --- */
.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 26px calc(40px + var(--safe-b));
  text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(212, 175, 106, 0.12), transparent 62%);
}
.landing .mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(212, 175, 106, 0.22), rgba(212, 175, 106, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--gold-2);
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.landing h1 {
  font-size: 23px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.landing .slogan {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-bottom: 30px;
}
.landing .who {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  background: var(--panel);
  padding: 16px;
  margin-bottom: 22px;
  text-align: left;
}
.landing .who .lb {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.landing .who .nm {
  font-size: 16px;
  margin-bottom: 2px;
}
.landing .who .ar {
  font-size: 11.5px;
  color: var(--muted);
}
.landing .note {
  font-size: 11px;
  color: var(--faint);
  line-height: 1.9;
  max-width: 320px;
  margin-top: 22px;
}

/* --- 首页 --- */
.hero {
  position: relative;
  padding: 22px 18px 26px;
  background: radial-gradient(120% 100% at 12% 0%, rgba(212, 175, 106, 0.16), transparent 58%);
  border-bottom: 1px solid var(--line-2);
}
.hero .eyebrow {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2.5px;
  margin-bottom: 9px;
}
.hero h2 {
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: 0.5px;
}
.hero p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}
.hero .facts {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}
.hero .facts div span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 1px;
  margin-bottom: 3px;
}
.hero .facts div b {
  font-size: 15px;
  color: var(--gold-2);
  font-weight: 500;
}

/* --- 商品卡 --- */
.gcard {
  display: flex;
  gap: 12px;
  padding: 13px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 0 14px 11px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.gcard:active {
  transform: scale(0.985);
  border-color: var(--gold-line);
}
.gcard .thumb {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.gcard .thumb .off {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 11, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--bad);
}
.gcard .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.gcard .info h4 {
  font-size: 14.5px;
  line-height: 1.4;
  margin-bottom: 3px;
}
.gcard .info .spec {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.gcard .info .desc {
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 7px;
}
.gcard .info .bt {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.gcard .info .bt b {
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 500;
}
.gcard .info .bt b i {
  font-size: 12px;
  font-style: normal;
}
.gcard .info .bt s {
  color: var(--faint);
  font-size: 11.5px;
}
.gcard .info .bt .tg {
  margin-left: auto;
}

/* --- 商品详情 --- */
.detail-hero {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 3px;
  position: relative;
}
.detail-hero .tags {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  gap: 6px;
}
.detail-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 14px 12px;
}
.detail-price b {
  color: var(--gold-2);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.detail-price b i {
  font-size: 16px;
  font-style: normal;
}
.detail-price s {
  color: var(--faint);
  font-size: 13px;
}
.detail-price .save {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--bad);
  border: 1px solid var(--bad-line);
  background: var(--bad-soft);
  padding: 3px 8px;
  border-radius: 99px;
}
.descbox {
  margin: 12px 14px 0;
  padding: 13px 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
}
.descbox .t {
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* 数量选择 */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--panel-2);
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:disabled {
  color: var(--faint);
  opacity: 0.5;
}
.stepper span {
  min-width: 42px;
  text-align: center;
  font-size: 14px;
}

/* --- 结算 --- */
.addr-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 12px 14px;
}
.addr-box.gold {
  border-color: var(--gold-line);
}
.addr-box .ic {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
}
.addr-box .bd {
  flex: 1;
  min-width: 0;
}
.addr-box .bd .who {
  font-size: 14px;
  margin-bottom: 3px;
}
.addr-box .bd .who span {
  color: var(--muted);
  font-size: 12.5px;
  margin-left: 8px;
}
.addr-box .bd .where {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.addr-box .bd .none {
  color: var(--warn);
  font-size: 13px;
}

/* 订单商品行 */
.oitem {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}
.oitem:last-of-type {
  border-bottom: 0;
}
.oitem .th {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}
.oitem .bd {
  flex: 1;
  min-width: 0;
}
.oitem .bd h5 {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 3px;
}
.oitem .bd .sp {
  font-size: 11.5px;
  color: var(--muted);
}
.oitem .rt {
  flex: none;
  text-align: right;
  font-size: 13px;
}
.oitem .rt .q {
  color: var(--muted);
  font-size: 11.5px;
}

/* 券选择 */
.cpn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.cpn:last-child {
  border-bottom: 0;
}
.cpn .amt {
  flex: none;
  width: 74px;
  text-align: center;
  color: var(--gold-2);
}
.cpn .amt b {
  font-size: 22px;
  font-weight: 500;
}
.cpn .amt b i {
  font-size: 12px;
  font-style: normal;
}
.cpn .amt span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.cpn .bd {
  flex: 1;
  min-width: 0;
}
.cpn .bd h5 {
  font-size: 13.5px;
  font-weight: 400;
  margin: 0 0 3px;
}
.cpn .bd p {
  font-size: 11.5px;
  color: var(--muted);
}
.cpn.dim {
  opacity: 0.42;
}

/* 券卡（券包） */
.ccard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 14px 11px;
  padding: 15px;
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, rgba(212, 175, 106, 0.16), rgba(212, 175, 106, 0.04));
  border: 1px solid var(--gold-line);
  overflow: hidden;
}
.ccard.used {
  background: var(--panel);
  border-color: var(--line-2);
  opacity: 0.6;
}
.ccard .a {
  flex: none;
  text-align: center;
  color: var(--gold-2);
  min-width: 78px;
}
.ccard.used .a {
  color: var(--faint);
}
.ccard .a b {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -1px;
}
.ccard .a b i {
  font-size: 14px;
  font-style: normal;
}
.ccard .a span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}
.ccard .b {
  flex: 1;
  min-width: 0;
  border-left: 1px dashed var(--line);
  padding-left: 14px;
}
.ccard .b h4 {
  font-size: 14px;
  margin-bottom: 4px;
}
.ccard .b p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* 订单卡 */
.ocard {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 0 14px 11px;
  overflow: hidden;
  cursor: pointer;
}
.ocard .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.ocard .hd .no {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11.5px;
}
.ocard .bd {
  padding: 12px 14px;
  display: flex;
  gap: 10px;
}
.ocard .bd .th {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
}
.ocard .bd .tx {
  flex: 1;
  min-width: 0;
}
.ocard .bd .tx h5 {
  font-size: 13.5px;
  font-weight: 400;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ocard .bd .tx p {
  font-size: 11.5px;
  color: var(--muted);
}
.ocard .ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-top: 1px solid var(--line-2);
}
.ocard .ft .amt {
  font-size: 13px;
}
.ocard .ft .amt b {
  font-size: 17px;
  color: var(--gold-2);
  font-weight: 500;
}

/* 物流轨迹 */
.tracks {
  padding: 4px 0 0;
}
.tracks .tr {
  position: relative;
  padding: 0 0 16px 20px;
  border-left: 1px solid var(--line);
  margin-left: 5px;
}
.tracks .tr:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.tracks .tr::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--line);
}
.tracks .tr.first::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.16);
}
.tracks .tr .tx {
  font-size: 13px;
  line-height: 1.6;
}
.tracks .tr .at {
  font-size: 11px;
  color: var(--faint);
  margin-top: 2px;
}

/* 我的 */
.mehead {
  padding: 24px 18px 20px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(212, 175, 106, 0.14), transparent 60%);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
.mehead .av {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(212, 175, 106, 0.24), rgba(212, 175, 106, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gold-2);
}
.mehead .bd h3 {
  font-size: 17px;
  margin-bottom: 3px;
}
.mehead .bd p {
  font-size: 11.5px;
  color: var(--muted);
}

/* ============================ 8. 业务员端 ============================ */

/* 工作台头部 */
.wbhead {
  padding: 20px 18px 18px;
  background: radial-gradient(120% 100% at 15% 0%, rgba(212, 175, 106, 0.17), transparent 62%);
  border-bottom: 1px solid var(--line-2);
}
.wbhead .hi {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.wbhead h2 {
  font-size: 19px;
  margin-bottom: 12px;
}
.wbhead .chain {
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.7;
  border-left: 2px solid var(--gold-deep);
  padding-left: 10px;
}

/* 关键数字栅格 */
.k4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 14px 12px;
}
.kt {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 13px;
}
.kt .lb {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}
.kt .vl {
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.kt .vl.gold {
  color: var(--gold-2);
}
.kt .vl i {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  margin-left: 2px;
}
.kt .ht {
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 3px;
}

/* 待办 */
.todo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
}
.todo:last-child {
  border-bottom: 0;
}
.todo .ic {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  color: var(--gold-2);
}
.todo.warn .ic {
  background: var(--warn-soft);
  border-color: var(--warn-line);
  color: var(--warn);
}
.todo .bd {
  flex: 1;
  min-width: 0;
}
.todo .bd h5 {
  font-size: 13.5px;
  font-weight: 400;
  margin: 0 0 2px;
}
.todo .bd p {
  font-size: 11.5px;
  color: var(--muted);
}
.todo .n {
  flex: none;
  font-size: 17px;
  color: var(--gold-2);
  font-weight: 500;
}

/* 两张码 */
.qgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 14px 12px;
}
@media (min-width: 420px) {
  .qgrid {
    grid-template-columns: 1fr 1fr;
  }
}
.qcard {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 16px 14px;
  text-align: center;
}
.qcard.gold {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.08), rgba(212, 175, 106, 0.02));
}
.qcard h4 {
  font-size: 14px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.qcard .cd {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1.5px;
  margin-bottom: 11px;
}
.qbox {
  background: #f5f1e8;
  border-radius: var(--r);
  padding: 9px;
  display: inline-block;
  margin-bottom: 11px;
}
.qbox canvas,
.qbox img {
  display: block;
  width: 132px;
  height: 132px;
}
.qcard .hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  text-align: left;
}
.qcard .hint b {
  color: var(--gold-2);
  font-weight: 400;
}
.qcard .btn {
  margin-top: 11px;
}

/* ★ 两码分流：购买码金色（成交），层级业务码蓝色（组织）—— 肉眼可辨，线下不会拿错 */
.qcard.biz {
  border-color: rgba(88, 166, 216, 0.5);
  background: linear-gradient(180deg, rgba(88, 166, 216, 0.13), rgba(88, 166, 216, 0.02));
}
.qcard .aud {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--gold-2);
  margin-bottom: 8px;
}
.qcard.biz .aud {
  background: rgba(88, 166, 216, 0.16);
  color: #8ec9ef;
}
.qcard.biz .cd,
.qcard.biz .hint b {
  color: #8ec9ef;
}

/* 收益页 */
.inchead {
  padding: 22px 18px;
  text-align: center;
  background: radial-gradient(120% 100% at 50% 0%, rgba(212, 175, 106, 0.16), transparent 60%);
  border-bottom: 1px solid var(--line-2);
}
.inchead .lb {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.inchead .vl {
  font-size: 38px;
  font-weight: 500;
  color: var(--gold-2);
  letter-spacing: -1.5px;
}
.inchead .vl i {
  font-size: 19px;
  font-style: normal;
  margin-right: 2px;
}
.inchead .sub {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 8px;
  line-height: 1.7;
}

/* 收益明细行 */
.inc {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.inc:last-child {
  border-bottom: 0;
}
.inc .bd {
  flex: 1;
  min-width: 0;
}
.inc .bd h5 {
  font-size: 13.5px;
  font-weight: 400;
  margin: 0 0 3px;
  line-height: 1.45;
}
.inc .bd p {
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
}
.inc .rt {
  flex: none;
  text-align: right;
}
.inc .rt b {
  display: block;
  font-size: 15px;
  color: var(--ok);
  font-weight: 500;
}
.inc .rt span {
  font-size: 10.5px;
  color: var(--faint);
}

/* 收益口径说明（合规） */
.note {
  margin: 0 14px 12px;
  padding: 13px 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--gold-deep);
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
}
.note .t {
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 7px;
}
.note ul {
  margin: 0;
  padding-left: 16px;
}
.note li {
  margin-bottom: 4px;
}
.note li:last-child {
  margin-bottom: 0;
}

/* 组织链 */
.chainline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 14px;
  scrollbar-width: none;
}
.chainline::-webkit-scrollbar {
  display: none;
}
.chainline .nd {
  flex: none;
  text-align: center;
  min-width: 62px;
}
.chainline .nd .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-2);
}
.chainline .nd.me .dot {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-2);
}
.chainline .nd .nm {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chainline .sep {
  flex: none;
  color: var(--faint);
  font-size: 11px;
  padding-bottom: 20px;
}

/* 成员行 */
.stl {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.stl:last-child {
  border-bottom: 0;
}
.stl .av {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-2);
}
.stl .bd {
  flex: 1;
  min-width: 0;
}
.stl .bd .nm {
  font-size: 13.5px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stl .bd .mt {
  font-size: 11px;
  color: var(--faint);
}
.stl .rt {
  flex: none;
  text-align: right;
}
.stl .rt b {
  font-size: 14px;
  color: var(--gold-2);
  font-weight: 500;
}
.stl .rt span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}

/* 素材中心 */
.mat {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 0 14px 12px;
  overflow: hidden;
}
.mat .hd {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mat .it {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  cursor: pointer;
}
.mat .it:last-child {
  border-bottom: 0;
}
.mat .it:active {
  background: var(--panel-2);
}
.mat .it .tx {
  flex: 1;
}
.mat .it .cp {
  flex: none;
  font-size: 11px;
  color: var(--gold);
  padding-top: 2px;
}

/* ============================ 9. 渠道后台 ============================ */
/* 后台是宽屏布局，脱离 .shell 的 480px 限制 */
.admin {
  display: flex;
  min-height: 100vh;
  background: var(--bg-2);
}
.admin .side {
  flex: none;
  width: 196px;
  background: var(--chrome);
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin .side .brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line-2);
}
.admin .side .brand h1 {
  font-size: 15px;
  letter-spacing: 1.5px;
}
.admin .side .brand p {
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 3px;
  letter-spacing: 1px;
}
.admin .side nav {
  padding: 8px 0;
  flex: 1;
}
.admin .side nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.admin .side nav a:hover {
  color: var(--ink-2);
  background: rgba(212, 175, 106, 0.05);
}
.admin .side nav a.on {
  color: var(--gold-2);
  background: var(--gold-soft);
  border-left-color: var(--gold);
}
.admin .side nav a .n {
  margin-left: auto;
  font-size: 11px;
  background: var(--bad);
  color: #fff;
  border-radius: 99px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.admin .side .foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  font-size: 11px;
  color: var(--faint);
}
.admin .main {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 60px;
}
.admin .main > h2 {
  font-size: 19px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.admin .main > .sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* 后台 KPI */
.kgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kcard {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 15px;
}
.kcard .lb {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.6px;
  margin-bottom: 7px;
}
.kcard .vl {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.8px;
}
.kcard .vl.gold {
  color: var(--gold-2);
}
.kcard .vl.ok {
  color: var(--ok);
}
.kcard .vl.warn {
  color: var(--warn);
}
.kcard .vl i {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  margin-left: 3px;
}
.kcard .ht {
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 5px;
}

/* 后台面板 */
.pnl {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.pnl .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-2);
}
.pnl .hd h3 {
  font-size: 14px;
}
.pnl .hd .sub {
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 400;
  margin-top: 3px;
}
.pnl .bd {
  padding: 14px 15px;
}
.pnl .bd.flush {
  padding: 0;
}

/* 后台表格 */
.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tb th {
  text-align: left;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
  background: rgba(212, 175, 106, 0.03);
}
.tb td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tb tr:last-child td {
  border-bottom: 0;
}
.tb tbody tr:hover {
  background: rgba(212, 175, 106, 0.035);
}
.tb .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}
.tb .nm {
  font-size: 13.5px;
}
.tb .sp {
  font-size: 11px;
  color: var(--faint);
  margin-top: 2px;
}
.tb-wrap {
  overflow-x: auto;
}

/* 进度条 */
.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--panel-3);
  overflow: hidden;
  margin-top: 6px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}
.bar.ok i {
  background: linear-gradient(90deg, #3f7a55, var(--ok));
}
.bar.bad i {
  background: linear-gradient(90deg, #8a3b37, var(--bad));
}

/* 身份徽章（渠道侧冷 / 厂家侧暖） */
.tb-role {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid currentColor;
  white-space: nowrap;
  opacity: 0.92;
}

/* 链可视化 */
.chain-viz {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 12px;
}
.chain-viz .n {
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.chain-viz .n.hl {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-2);
}
.chain-viz .a {
  color: var(--faint);
  font-size: 10px;
}

/* 后台登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(110% 70% at 50% 0%, rgba(212, 175, 106, 0.1), transparent 60%);
}
.login-box {
  width: 100%;
  max-width: 372px;
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-xl);
  padding: 30px 26px;
  box-shadow: var(--sh);
}
.login-box .mark {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(212, 175, 106, 0.22), rgba(212, 175, 106, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--gold-2);
  margin-bottom: 16px;
}
.login-box h1 {
  font-size: 19px;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
}
.login-box .sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.login-box .field {
  padding: 0 0 14px;
  border: 0;
}
.login-box .err {
  font-size: 12px;
  color: var(--bad);
  min-height: 18px;
  margin-bottom: 8px;
}

/* ============================ 10. 动效与响应式 ============================ */
.fade {
  animation: fade 0.26s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 小屏后台：侧栏折叠成顶部横向标签 */
@media (max-width: 760px) {
  .admin {
    flex-direction: column;
  }
  .admin .side {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: column;
  }
  .admin .side nav {
    display: flex;
    overflow-x: auto;
    padding: 6px 8px;
    gap: 4px;
  }
  .admin .side nav a {
    flex: none;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
    border-radius: var(--r-sm);
  }
  .admin .side nav a.on {
    border-left: 0;
    border-bottom-color: var(--gold);
  }
  .admin .side .brand,
  .admin .side .foot {
    display: none;
  }
  .admin .main {
    padding: 16px 14px 50px;
  }
}

/* 打印（渠道码立牌） */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .appbar,
  .apptab,
  .footbar,
  .btn,
  .toast {
    display: none !important;
  }
  .qcard {
    border-color: #999;
    background: #fff;
    color: #000;
    page-break-inside: avoid;
  }
  .qcard .cd {
    color: #333;
  }
  .qcard .hint {
    color: #555;
  }
  .qcard .hint b {
    color: #000;
  }
}

/* ==================== 商品编辑器（2026-09-27 商品体系升级） ==================== */

/* 弹层里的分区标题 */
.sect-t {
  margin: 18px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--gold-2, #D4AF6A);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 商品列表里的缩略图 */
.gthumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  background: #111;
}
.gthumb-fallback {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 20px;
}

/* ==================== 商品详情：轮播 / 参数 / 图文（2026-09-27 商品体系升级） ==================== */

/* 轮播：纯 CSS scroll-snap，不引任何轮播库。
   JS 只做一件事 —— 监听 scroll 让小圆点跟随。 */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 480px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--panel-3, #0d0f14);
}
.carousel::-webkit-scrollbar { display: none; }
.cslide {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cslide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cslide .cbig {
  font-size: 34px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.1em;
}
.cdots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.cdots i {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
}
.cdots i.on {
  width: 16px;
  background: var(--gold-2, #D4AF6A);
}

/* 服务承诺行 */
.svc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 14px 0;
  font-size: 11.5px;
  color: var(--muted);
}
.svc span { white-space: nowrap; }

/* 区块标题（参数 / 图文详情） */
.sect-h {
  margin: 16px 14px 0;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 700;
}

/* 图文详情块 */
.detail-blocks { padding: 4px 14px 0; }
.detail-blocks .dh {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.detail-blocks .dtext {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2, inherit);
  margin: 0 0 10px;
}
.detail-blocks .dnote {
  font-size: 12px;
  line-height: 1.7;
  color: var(--gold-2, #D4AF6A);
  background: var(--gold-soft, rgba(212,175,106,0.08));
  border: 1px solid var(--gold-line, rgba(212,175,106,0.35));
  border-radius: 10px;
  padding: 9px 12px;
  margin: 10px 0;
}
.detail-blocks .dimg { margin: 12px 0; }
.detail-blocks .dimg img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.detail-blocks .dimg figcaption {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}
.detail-blocks .dtable {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.detail-blocks .dtable table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.detail-blocks .dtable th,
.detail-blocks .dtable td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.detail-blocks .dtable tr:last-child td { border-bottom: 0; }
.detail-blocks .dtable th {
  color: var(--muted);
  font-weight: 600;
  background: var(--panel-2, rgba(255,255,255,0.03));
}

/* ---------- 协议与政策（用户协议 / 隐私政策 / 售后政策） ---------- */
.doc-h {
  margin: 18px 0 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 0.2px;
}
.doc-h:first-child { margin-top: 0; }
.doc-p {
  margin: 0 0 9px;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--muted, #8b8579);
  word-break: break-word;
}
.doc-p b { color: var(--ink); font-weight: 600; }

/* ---------- 联系客服（二维码 / 电话 / 留言工单） ---------- */
.svc-qr {
  width: 168px;
  height: 168px;
  max-width: 70vw;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  object-fit: contain;
}
.svc-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.svc-line:first-child { border-top: 0; }
.svc-line .k { font-size: 12.5px; color: var(--muted); flex: none; }
.svc-line .v { flex: 1; text-align: right; font-size: 13px; color: var(--ink); word-break: break-all; }
.svc-line .btn { flex: none; }
.tk-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--faint);
}
.tk-st {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.tk-st.wait { border-color: var(--warn-line, var(--gold)); color: var(--gold-2); }
.tk-st.done { border-color: var(--ok-line); color: var(--ok); }
.tk-meta { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.tk-body {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink);
  word-break: break-word;
}
.tk-reply {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--panel-2);
  border-left: 2px solid var(--gold);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink);
  word-break: break-word;
}
.tk-reply .lb { font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.tk-wait { margin-top: 9px; font-size: 11.5px; color: var(--faint); }

/* ---------- 后台 · 商品图文详情块编辑器 ---------- */
.db-empty {
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  padding: 18px 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
.db-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--panel-2);
}
.db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.db-tag {
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--gold, #d4af6a);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.db-card input,
.db-card textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--panel, #11151c);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.6;
  font-family: inherit;
}
.db-card input:focus,
.db-card textarea:focus { outline: none; border-color: var(--gold, #d4af6a); }
.db-imgrow { display: flex; gap: 10px; align-items: flex-start; }
.db-thumb {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: none;
  background: var(--panel-2);
}
.db-nopic {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--faint);
}

/* 详情页：图片加载失败时留占位，不再整块静默消失 */
.detail-blocks .dimg-fallback {
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  padding: 22px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
}
