/* ============================================================
   Value EX · 价值交换平台 · 设计系统
   风格: 专业金融级 + 磨砂玻璃(frosted glass) · 简约
   规则: 禁止 emoji 图标 / 禁止紫粉渐变 / 禁止硬编码色(用令牌)
   磨砂玻璃仅作"通透层次", 不搭配紫粉渐变与发光边框(P0 红线)
   配色: HKEX 海军蓝(#1B3160) + 品牌红(#D2232A)
   ============================================================ */

:root {
  /* 强调色 —— HKEX 海军蓝主色 + 品牌红 (#1B3160 / #D2232A) */
  --c-primary: #1B3160;
  --c-primary-press: #0F2255;
  --c-primary-soft: #E8EDF5;
  --c-primary-ring: rgba(27, 49, 96, 0.15);
  --c-accent: #D2232A;
  --c-accent-soft: #FDE8E8;
  --c-accent-press: #A01B22;

  /* 中性 */
  --c-ink: #222222;
  --c-ink-2: #484848;
  --c-ink-3: #717171;
  --c-ink-4: #B0B0B0;
  --c-line: #EBEBEB;
  --c-line-2: #DDDDDD;
  --c-bg: #F4F5F7;
  --c-surface: #FFFFFF;
  --c-surface-2: #FAFAFB;

  /* 功能色 */
  --c-success: #1B873F;
  --c-success-soft: #E7F6EC;
  --c-warn: #B7791F;
  --c-warn-soft: #FCF3E3;
  --c-danger: #D93025;
  --c-danger-soft: #FDECEA;
  --c-info: #1B6CA8;
  --c-info-soft: #E8F2FA;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* 阴影 —— 轻拟物层次 */
  --sh-xs: 0 1px 2px rgba(17, 17, 26, 0.06);
  --sh-sm: 0 2px 8px rgba(17, 17, 26, 0.08);
  --sh-md: 0 8px 24px rgba(17, 17, 26, 0.10);
  --sh-lg: 0 18px 48px rgba(17, 17, 26, 0.16);
  --sh-press: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  --sh-card: 0 2px 12px rgba(17, 17, 26, 0.06), 0 1px 3px rgba(17, 17, 26, 0.04);

  /* 磨砂玻璃令牌(克制版) */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: blur(20px) saturate(165%);
  --glass-shadow: 0 8px 32px rgba(17, 17, 26, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* 间距 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --z-modal: 1000;
  --z-toast: 1100;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--c-ink); background: var(--c-bg);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 480px at 8% -8%, rgba(27, 49, 96, 0.08), transparent 60%),
    radial-gradient(820px 460px at 100% 0%, rgba(210, 35, 42, 0.06), transparent 55%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
::selection { background: var(--c-primary-soft); }

/* ============ 磨砂玻璃工具类 ============ */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-strong { background: var(--glass-bg-strong); }

/* ============ 布局壳 ============ */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-5); position: sticky; top: 0; z-index: 50;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 6px 24px rgba(17, 17, 26, 0.06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: #fff;
  display: grid; place-items: center; box-shadow: var(--sh-sm); object-fit: contain; padding: 3px;
}
.brand .sub { color: var(--c-ink-3); font-weight: 500; font-size: 12px; }
.topbar .spacer { flex: 1; }

.top-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-surface); border: 1px solid var(--c-line-2);
  border-radius: var(--r-pill); padding: 6px 8px 6px 14px;
  width: min(420px, 38vw); transition: all .18s ease;
}
.top-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-ring); }
.top-search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--c-ink); }
.top-search input::placeholder { color: var(--c-ink-3); }
.top-search .s-btn {
  background: var(--c-primary); color: #fff; border: none; width: 34px; height: 34px;
  border-radius: var(--r-pill); display: grid; place-items: center; cursor: pointer; transition: background .15s ease;
  flex-shrink: 0;
}
.top-search .s-btn:hover { background: var(--c-primary-press); }

/* 顶部横向导航(替代原左侧栏) */
.subnav {
  position: sticky; top: 64px; z-index: 40;
  display: flex; align-items: center; gap: 2px;
  padding: 7px var(--sp-5);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto; scrollbar-width: thin;
}
.subnav .nav-group { display: flex; align-items: center; gap: 2px; margin: 0; }
.subnav .ng-title { display: none; }
.subnav .nav-item { margin: 0; padding: 7px 12px; font-size: 13.5px; white-space: nowrap; }
.subnav .nav-item .ni-ico { width: 16px; height: 16px; }

.body { display: flex; gap: 0; flex: 1; min-height: 0; }
.sidebar {
  width: 236px; flex-shrink: 0; padding: var(--sp-4) var(--sp-3);
  position: sticky; top: 64px; align-self: flex-start;
  height: calc(100dvh - 64px); overflow-y: auto;
}
/* 侧栏内卡片用磨砂玻璃浮层, 与实白内容区分 */
.sidebar .nav-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: var(--sp-3);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--sh-card);
}
.nav-group { margin-bottom: var(--sp-4); }
.nav-group .ng-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--c-ink-4);
  text-transform: uppercase; padding: 0 12px; margin-bottom: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: var(--r-md); color: var(--c-ink-2); font-size: 14px; font-weight: 500;
  transition: all .15s ease; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.7); color: var(--c-ink); }
.nav-item.active { background: var(--c-primary); color: #fff; font-weight: 600; }
.nav-item .ni-ico { color: inherit; display: grid; place-items: center; }
.nav-item .badge-dot {
  margin-left: auto; background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: var(--r-pill); display: grid; place-items: center; padding: 0 5px;
}

.main { flex: 1; min-width: 0; padding: var(--sp-6); max-width: 1200px; margin: 0 auto; width: 100%; }
.page-head { margin-bottom: var(--sp-5); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: 24px; }
.page-head .desc { color: var(--c-ink-3); margin-top: 6px; font-size: 14px; }
.page-head .ph-action { flex-shrink: 0; padding-top: 4px; }

/* ============ 库存变动页 ============ */
.ch-filter { padding: 12px; }
.ch-seg { display: inline-flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; margin-bottom: 12px; }
.ch-seg-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--c-ink-3); white-space: nowrap;
  transition: all .15s ease;
}
.ch-seg-btn.active { background: var(--c-surface); color: var(--c-primary); box-shadow: var(--sh-xs); }
.ch-seg-btn:active { transform: scale(.96); }
.ch-frow { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.ch-fld { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.ch-fld > span { font-size: 12px; color: var(--c-ink-3); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.ch-fld .input { width: 100%; min-width: 0; padding: 7px 10px; font-size: 13px; line-height: 1; }
.ch-row td, .ch-row th { white-space: nowrap; }
.ch-curve { padding: 16px; }
.ch-curve-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.ch-curve-title { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.ch-curve-val { font-size: 15px; font-weight: 800; color: var(--c-primary); }
.ch-curve-svg { width: 100%; height: auto; display: block; }
.ch-curve-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--c-ink-3); }
.ch-curve-empty { padding: 28px 0; text-align: center; }
.ch-filter .select, .ch-fld select.input { appearance: none; }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-pill); padding: 10px 18px;
  font-size: 14px; font-weight: 600; transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--sh-xs); white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--c-primary-press); box-shadow: var(--sh-md); }
.btn-ghost { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-2); box-shadow: var(--sh-xs); }
.btn-ghost:hover { border-color: var(--c-ink-4); box-shadow: var(--sh-sm); }
.btn-soft { background: var(--c-primary-soft); color: var(--c-primary); box-shadow: none; }
.btn-soft:hover { background: #DDE3F0; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.profile-btn { border-radius: var(--r-pill); padding: 4px 14px 4px 4px; gap: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 通用卡片：全部默认磨砂玻璃 + 悬浮 + 倾斜交互基座 */
.card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); box-shadow: var(--glass-shadow); padding: var(--sp-5);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  overflow: hidden; transform-style: preserve-3d; transition: transform .12s ease-out, box-shadow .18s ease;
}
.card.flat { box-shadow: none; }
.card.tight { padding: var(--sp-4); }
.card.glass-card { /* 旧类保留兼容, 样式已由 .card 默认提供 */ }
a.card.role-card { display: block; width: 100%; text-align: left; cursor: pointer; text-decoration: none; color: inherit; border: 1px solid var(--glass-border); transition: border-color .15s ease, box-shadow .18s ease, transform .12s ease-out; }
.card.role-card:hover { border-color: var(--c-primary); box-shadow: var(--sh-card); transform: translateY(-2px); }
.card.role-card.active { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: 0 0 0 1px var(--c-primary); }
.card.role-card.active .text-muted { color: var(--c-primary-dark, var(--c-primary)); }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap-2 { gap: var(--sp-2); } .row.gap-3 { gap: var(--sp-3); } .row.gap-4 { gap: var(--sp-4); }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
/* 商品卡片统一使用瀑布流布局(手机端已验证, 桌面端复用): columns 按断点调整列数 */
.grid.masonry { display: block; columns: 4; column-gap: 16px; }
.grid.masonry > * { break-inside: avoid; margin-bottom: 16px; }
/* 首页商品/同店推荐: 响应式网格 —— 桌面 4 列、平板 3 列、手机 2 列, 卡片内部与移动端一致堆叠 */
.home-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--c-line-2); border-radius: var(--r-pill);
  padding: 8px 12px; font-size: 13px; font-family: inherit; color: var(--c-ink);
  background: rgba(255,255,255,.85); transition: border-color .15s ease, box-shadow .15s ease;
}
/* 统一隐藏数字输入框的上下微调按钮 */
input[type=number].input,
input[type=number] {
  -moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}
/* 数字/比例输入框默认居中紧凑 */
input[type=number].input { text-align: center; }
/* 下拉框统一为药丸形并保留自定义箭头(浏览器默认外观会截断圆角) */
.select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23E67330' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
  padding-right: 32px;
}
.select::-ms-expand { display: none; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-ring); background: #fff;
}
.textarea { resize: vertical; min-height: 90px; border-radius: var(--r-lg); }
.field .hint { font-size: 12px; color: var(--c-ink-3); }
.field .err { font-size: 12px; color: var(--c-danger); }

/* 徽标 / 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-pill);
}
.tag.gray { background: var(--c-surface-2); color: var(--c-ink-3); }
.tag.primary { background: var(--c-primary-soft); color: var(--c-primary); }
.tag.success { background: var(--c-success-soft); color: var(--c-success); }
.tag.warn { background: var(--c-warn-soft); color: var(--c-warn); }
.tag.danger { background: var(--c-danger-soft); color: var(--c-danger); }
.tag.info { background: var(--c-info-soft); color: var(--c-info); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--c-success); } .dot.amber { background: var(--c-warn); }
.dot.red { background: var(--c-danger); } .dot.gray { background: var(--c-ink-4); }

/* 表格 —— 放在 .card 内, 自身透明以透出磨砂玻璃 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 600; color: var(--c-ink-3); padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border); background: rgba(255,255,255,.42); position: sticky; top: 0;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--glass-border); color: var(--c-ink-2); background: transparent; }
.table tbody tr:hover { background: rgba(255,255,255,.35); }
.table tbody tr:last-child td { border-bottom: none; }

/* 头像 */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); box-shadow: var(--sh-xs);
  position: relative; overflow: hidden;
}
.avatar.with-img::before {
  content: ''; position: absolute; inset: 0; background-image: var(--avatar-img); background-size: cover; background-position: center;
}
.avatar.with-img > * { position: relative; z-index: 1; }

/* 金额 / 价值券 */
.voucher-amt { font-weight: 700; color: var(--c-primary); }
.cash-amt { font-weight: 700; color: var(--c-ink); }
.voucher-amt::after { content: " 券"; font-size: .72em; font-weight: 600; color: var(--c-ink-3); }

/* 统计卡 */
.stat {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transform-style: preserve-3d; transition: transform .12s ease-out, box-shadow .18s ease;
}
.stat.glass { /* 兼容旧类 */ }
.stat .label { font-size: 13px; color: var(--c-ink-3); }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat .delta { font-size: 12px; margin-top: 4px; font-weight: 600; }
.stat .delta.up { color: var(--c-success); } .stat .delta.down { color: var(--c-danger); }

/* 个人中心-我的订单快捷入口 */
.oq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.oq-grid-6 { grid-template-columns: repeat(6, 1fr); }
.oq-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--c-ink); text-decoration: none; padding: 8px 2px; border-radius: var(--r-md); transition: background .15s ease; position: relative; min-width: 0; }
.oq-item:active { background: var(--c-surface-2); }
.oq-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: transparent; }
.oq-ico svg { width: 22px; height: 22px; color: var(--c-ink-2); }
.oq-lbl { font-size: 12px; color: var(--c-ink-2); width: 100%; text-align: center; }
.oq-badge { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--c-primary); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* 商品卡 —— 磨砂玻璃属性与导航栏(m-head-glass)统一 */
.product-card {
  position: relative; min-width: 0;
  background: rgba(255, 255, 255, 0.1); border-radius: var(--r-lg); overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.32); box-shadow: 0 8px 32px rgba(17, 17, 26, 0.08);
  -webkit-backdrop-filter: blur(1px) saturate(120%); backdrop-filter: blur(1px) saturate(120%);
  transform-style: preserve-3d; transition: transform .12s ease-out, box-shadow .18s ease;
}
.product-card:hover { box-shadow: var(--sh-md); }
.product-card .card-link { display: block; color: inherit; text-decoration: none; }
.product-card .cover { aspect-ratio: 4 / 3; position: relative; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.product-card .cover .type-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: var(--r-pill); padding: 5px 10px; font-size: 12px; font-weight: 700;
  color: var(--c-ink); box-shadow: var(--sh-xs);
  display: inline-flex; align-items: center; gap: 5px; line-height: 1;
  height: 28px; box-sizing: border-box;
}
.product-card .cover .type-badge svg { display: block; }
/* 需求卡片: 右上角「需求」小标签(用户明确要求) + 卡片强调描边 */
.demand-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .5px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--c-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.demand-card { border: 1px solid rgba(91,163,208,.35); }
.demand-card:hover { box-shadow: 0 6px 18px rgba(91,163,208,.22); }
.product-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.product-card .title {
  display: block; font-weight: 600; font-size: 14px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--c-ink);
}
.product-card .card-foot {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.product-card .prices { display: flex; flex-direction: column; gap: 2px; }
.product-card .cash-price { font-size: 13px; font-weight: 700; color: var(--c-danger); }
.product-card .voucher-price { font-size: 12px; color: var(--c-ink-3); }
.product-card .voucher-price .voucher-amt { color: var(--c-primary); font-weight: 700; margin-right: 2px; }
.product-card .cover .product-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .fav-btn {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.92); border: 1px solid var(--c-line);
  border-radius: var(--r-pill); padding: 5px 10px; font-size: 12px; font-weight: 700;
  color: var(--c-ink-3);
  cursor: pointer; box-shadow: var(--sh-xs); transition: all .15s ease; flex-shrink: 0;
  height: 28px; box-sizing: border-box;
}
.product-card .fav-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.product-card .fav-btn.active { color: var(--c-danger); border-color: var(--c-danger); background: rgba(255,56,92,.06); }
.product-card .fav-btn svg { display: block; }
/* 商品卡片价格行: 现金价(无"现金价"字样)居左, 价值券价居右, 不重叠 */
.card-price-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 10px;
}
.card-cash { display: inline-flex; align-items: baseline; gap: 2px; color: var(--c-ink); font-size: 13px; line-height: 1; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.card-cash b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card-cash span { font-size: 12px; color: var(--c-ink-2); flex-shrink: 0; }
.card-voucher { color: var(--c-primary); font-size: 12px; font-weight: 700; line-height: 1; flex: 0 0 auto; margin-left: 6px; white-space: nowrap; }
.card-price-row .btn-xs { flex-shrink: 0; }
.loc-pin { display: inline-flex; gap: 3px; align-items: center; }

/* 详情页大图与信息卡 */
.detail-cover { aspect-ratio: 4 / 3; border-radius: var(--r-lg); position: relative; overflow: hidden; background: var(--c-surface-2); }
.detail-cover .product-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.mini { width: 72px; height: 72px; border-radius: 12px; flex-shrink: 0; position: relative; overflow: hidden; }
.cover.mini .product-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-size: 21px; line-height: 1.35; }
.desc-text { line-height: 1.65; color: var(--c-ink-2); font-size: 13.5px; }
.hl-list { background: var(--c-surface-2); border: 1px solid var(--c-line-2); border-radius: var(--r-md); padding: 12px 14px; }
.hl-title { font-size: 12px; font-weight: 700; color: var(--c-ink-3); letter-spacing: .04em; margin-bottom: 8px; }
.hl-item { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 13.5px; color: var(--c-ink); }
.hl-item svg { color: var(--c-primary); flex-shrink: 0; margin-top: 2px; }
.hl-item span { line-height: 1.5; }
.vch-need { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-pill); font-size: 13px; color: var(--c-ink-2); }

/* 详情页搜索同款 */
.search-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--c-surface-2); border: 1px solid var(--c-line-2); font-size: 12px; font-weight: 600;
  color: var(--c-ink-2); transition: all .15s ease;
}
.sl-link:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }

/* 详情页操作区 */
.detail-actions { display: flex; flex-direction: column; gap: 12px; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row .qty-num { min-width: 28px; text-align: center; font-weight: 700; font-size: 15px; }
.action-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.action-btns .btn { flex: 1; min-width: 120px; }
/* 库存页: 价值券置顶卡 */
.inv-pin { background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transform-style: preserve-3d; transition: transform .12s ease-out, box-shadow .18s ease; }
.inv-pin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; height: 34px; }
.inv-badge.vch { background: var(--c-primary); color: #fff; }
.inv-badge.vch .inv-logo { background: transparent; }
.inv-badge.vch .inv-logo img { filter: brightness(0) invert(1); }
.inv-pin-row { display: flex; align-items: flex-end; gap: var(--sp-5); margin-top: var(--sp-4); }
/* T4 价值券四指标矩阵(消费者/商家库存页共用) */
.inv-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: var(--sp-4); }
.inv-metric { background: var(--c-surface); border: 1px solid var(--c-line-2); border-radius: var(--r-md); padding: 10px 12px; }
.inv-metric-val { font-size: 22px; margin-top: 4px; line-height: 1.1; }
.inv-ledger { border-top: 1px dashed var(--c-line-2); padding-top: var(--sp-3); margin-top: var(--sp-3); }
.inv-good { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.inv-good:last-child { border-bottom: none; }
/* 库存页: 头部 / 区块标题 / 磨砂玻璃卡片 / 特殊价值券 logo */
.inv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.inv-head-title { font-size: 18px; font-weight: 800; color: var(--c-ink); flex: 1; }
.inv-head-changes {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600;
  color: var(--c-ink-2); text-decoration: none; padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--c-surface); border: 1px solid var(--c-line-2);
}
.inv-head-changes:active { background: var(--c-surface-2); }
.inv-head-desc { font-size: 12px; color: var(--c-muted); line-height: 1.6; margin: 8px 0 14px; }
.inv-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.inv-pin-head .btn-sm,
.inv-section-head .btn-sm { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; }
.inv-section-head h3 { margin: 0; }
.inv-glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  padding: var(--sp-5);
}
.inv-logo {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: rgba(27, 49, 96, .14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.inv-logo img { width: 16px; height: 16px; object-fit: contain; }

/* 库存视图切换 */
.view-toggle { display: inline-flex; align-items: center; gap: 2px; background: var(--c-surface); border: 1px solid var(--c-line-2); border-radius: var(--r-pill); padding: 3px; }
.vt-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--c-ink-2); background: transparent; border: none; cursor: pointer; transition: all .15s ease; }
.vt-btn:hover { color: var(--c-ink); }
.vt-btn.active { background: var(--c-primary); color: #fff; }
/* 货品库存工具栏 */
.inv-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.inv-filter-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.inv-filter-row .select { flex: 1 1 0; min-width: 0; width: auto; height: 36px; padding: 0 28px 0 12px; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-line-2); font-size: 13px; }
.inv-search { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-line-2); }
.inv-search-ico { color: var(--c-ink-3); display: grid; place-items: center; }
.inv-search input { flex: 1; min-width: 0; border: none; background: transparent; font-size: 13px; outline: none; color: var(--c-ink); }
.inv-search input::placeholder { color: var(--c-ink-3); }

/* 库存矩阵卡片 */
.inv-grid { margin-top: var(--sp-4); }
.inv-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .18s ease, transform .12s ease; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.inv-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.inv-card-cover { aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.inv-card-cover .cover { width: 100%; height: 100%; border-radius: 0; }
.inv-card-cover .type-badge { top: 8px; left: 8px; font-size: 11px; padding: 3px 8px; }
.inv-card-body { padding: 12px; }
.inv-card-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inv-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; color: var(--c-ink-3); }
.inv-card-foot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.inv-card-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line-2); }
.inv-acts { gap: 4px; }

/* 迷你分段开关: 上架/下架/隐藏 - 与内联输入框/按钮同高同圆角 */
.seg-mini { display: inline-flex; align-items: center; gap: 2px; height: 24px; background: var(--c-surface-2); border: 1px solid var(--c-line-2); border-radius: var(--r-pill); padding: 1px; }
.seg-mini-btn { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; color: var(--c-ink-3); background: transparent; border: none; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.seg-mini-btn:hover { color: var(--c-ink); }
.seg-mini-btn.active { background: var(--c-primary); color: #fff; }

/* 超小按钮(库存操作列) - 与内联输入框同高同圆角 */
.btn-xs { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12px; line-height: 1; }
.btn-xs svg { width: 14px; height: 14px; }

/* 价格/库存 内联输入框: 统一紧凑风格、无上下箭头、与操作按钮同高同圆角 */
.inline-fields { display: inline-flex; flex-flow: row nowrap; gap: 8px; align-items: center; white-space: nowrap; }
.inline-field { display: inline-flex; flex-flow: row nowrap; align-items: center; gap: 4px; font-size: 11px; color: var(--c-ink-3); white-space: nowrap; }
.inline-input { width: 54px !important; min-width: 54px; height: 24px; padding: 0 4px !important; font-size: 11px; line-height: 22px; border-radius: var(--r-pill); text-align: right; color: var(--c-ink); background: var(--c-surface); -moz-appearance: textfield; }
.inline-input::-webkit-inner-spin-button,
.inline-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 商品已下架/隐藏提示 */
.listing-notice { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c-warn) 12%, var(--c-surface)); border: 1px solid color-mix(in srgb, var(--c-warn) 35%, var(--c-line-2)); color: var(--c-ink-2); font-size: 13px; line-height: 1.6; }
.listing-notice svg { flex-shrink: 0; margin-top: 2px; color: var(--c-warn); }

/* 封面占位(纯CSS渐变, 非外部图) —— 淡蓝/淡绿/水青色系, 非紫粉 */
.cover { background: var(--c-surface-2); }
.cover-grad-1 { --cover-grad: linear-gradient(135deg, #A8D8EA, #5BA3D0); background: var(--cover-grad); }
.cover-grad-2 { --cover-grad: linear-gradient(135deg, #C8E6D4, #7BC8A4); background: var(--cover-grad); }
.cover-grad-3 { --cover-grad: linear-gradient(135deg, #BFE3F2, #6FB8DC); background: var(--cover-grad); }
.cover-grad-4 { --cover-grad: linear-gradient(135deg, #D6F0E0, #8FD9B6); background: var(--cover-grad); }
.cover-grad-5 { --cover-grad: linear-gradient(135deg, #CDE9F5, #7FB5D9); background: var(--cover-grad); }
.cover-grad-6 { --cover-grad: linear-gradient(135deg, #E0F2F1, #80CBC4); background: var(--cover-grad); }
.cover-grad-7 { --cover-grad: linear-gradient(135deg, #D4EAF7, #9CC9E8); background: var(--cover-grad); }
.cover-grad-8 { --cover-grad: linear-gradient(135deg, #D9F0E4, #A3D9BC); background: var(--cover-grad); }
/* 封面真实图以 background-image 叠在渐变之上, 加载失败时优雅回退到渐变, 不出现碎图占位 */
.cover.with-img { background-image: var(--cover-img, none), var(--cover-grad, var(--c-surface-2)); background-size: cover, auto; background-position: center, center; background-repeat: no-repeat, no-repeat; }
.cover.with-img .product-img { display: none; }

/* 步骤条 */
.steps { display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; color: var(--c-ink-4); font-size: 13px; font-weight: 600; }
.step .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-surface-2); border: 1px solid var(--c-line-2); font-size: 12px; }
.step.done .num { background: var(--c-success); color: #fff; border-color: var(--c-success); }
.step.done { color: var(--c-success); }
.step.active .num { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.step.active { color: var(--c-primary); }
.step-line { flex: 1; height: 1px; background: var(--c-line-2); margin: 0 10px; min-width: 16px; }

/* 空态 */
.empty { text-align: center; padding: 56px 20px; color: var(--c-ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .ico { width: 56px; height: 56px; color: var(--c-ink-4); opacity: .7; }
.empty .t { font-weight: 600; color: var(--c-ink-2); font-size: 15px; }
.empty .s { font-size: 13px; max-width: 320px; }

/* 骨架 */
.skeleton { background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Toast */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--c-ink); color: #fff; padding: 11px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; box-shadow: var(--sh-md); display: flex; align-items: center; gap: 8px;
  animation: toastIn .25s cubic-bezier(0.16,1,0.3,1); }
.toast.success { background: #1c7a3e; } .toast.error { background: #c4322a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Modal —— 磨砂遮罩 + 实白卡(磨砂仅用于遮罩, 不搭配紫粉发光) */
#modal-root { position: fixed; inset: 0; z-index: var(--z-modal); display: none; }
#modal-root.open { display: block; }
.modal-mask { position: absolute; inset: 0;
  background: rgba(244, 245, 247, 0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fadeIn .2s ease; }
.modal {
  position: relative; margin: 4vh auto; max-width: 560px; width: calc(100% - 32px);
  max-height: 92vh; overflow: hidden; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border); border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  display: flex; flex-direction: column; animation: modalIn .28s cubic-bezier(0.16,1,0.3,1);
}
.modal.lg { max-width: 780px; }
.modal .m-head { padding: 20px 24px; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between; }
.modal .m-head h3 { font-size: 18px; }
.modal .m-body { padding: 22px 24px; overflow-y: auto; }
.modal .m-foot { padding: 16px 24px; border-top: 1px solid var(--c-line);
  display: flex; gap: 10px; justify-content: flex-end; background: rgba(250,250,251,.6); }
.modal-close { border: none; background: var(--c-surface-2); width: 32px; height: 32px;
  border-radius: var(--r-pill); display: grid; place-items: center; color: var(--c-ink-3); }
.modal-close:hover { background: var(--c-line); color: var(--c-ink); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* 合同文档 */
.contract-doc { background: #FAFBFD; border: 1px solid #ECE3CF; border-radius: var(--r-md);
  padding: 22px 24px; font-size: 13.5px; line-height: 1.85; color: var(--c-ink-2);
  max-height: 48vh; overflow-y: auto; }
.contract-doc h4 { font-size: 15px; text-align: center; margin-bottom: 14px; color: var(--c-ink); }
.contract-doc .clause { margin-bottom: 10px; }
.contract-doc .kv { display: flex; gap: 8px; }
.contract-doc .kv b { color: var(--c-ink); min-width: 84px; }
.sign-pad-wrap { border: 1px dashed var(--c-line-2); border-radius: var(--r-md); background: #fff; position: relative; }
.sign-pad { width: 100%; height: 150px; display: block; border-radius: var(--r-md); touch-action: none; cursor: crosshair; }
.sign-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-ink-4); font-size: 13px; pointer-events: none; }

/* 登录页: 深色背景叠加 authShimmer 缓慢流动光晕 + authSheen 高光扫过, 右侧卡片用磨砂玻璃(var(--glass-*))浮于其上 */
/* 登录 —— 微光灵动背景 + 磨砂玻璃卡片 */
@keyframes authShimmer {
  0% { background-position: 0% 50%, 100% 50%, 50% 0%; }
  50% { background-position: 100% 50%, 0% 50%, 50% 100%; }
  100% { background-position: 0% 50%, 100% 50%, 50% 0%; }
}
@keyframes authSheen {
  0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(220%) skewX(-18deg); opacity: 0; }
}
/* ==================== 星空主题登录页 v3 ====================
   参考: SpaceX（几何Logo+宽字距科技感大写） / Interstellar（深空3D沉浸）
   设计语言: 纯黑 #000 + 几何太空Logo + 3D粒子星空 + 镜头光晕 + 极简融入式卡片
*/
.auth-wrap {
  min-height: 100dvh; display: grid; grid-template-columns: 1.3fr 0.7fr;
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff;
  /* 环境光交给 CSS（原先每帧在 canvas 里做全屏渐变填充，是卡顿主因之一） */
  background:
    radial-gradient(ellipse 55% 50% at 26% 52%, rgba(26,32,52,.28) 0%, rgba(8,10,18,.10) 45%, rgba(0,0,0,0) 72%),
    #000;
}
.auth-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* 暗角渐晕层（静态，纯 CSS，替代 canvas 逐帧绘制） */
.auth-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 78% 78% at 50% 50%, rgba(0,0,0,0) 42%, rgba(0,0,0,.20) 78%, rgba(0,0,0,.42) 100%);
}
/* 噪点纹理叠层 — 模拟胶片颗粒感 */
.auth-noise {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
/* 四角装饰点 */
.auth-corner { position: absolute; z-index: 3; pointer-events: none; }
.ac-tl { top: 32px; left: 28px; } .ac-tr { top: 32px; right: 28px; }
.ac-bl { bottom: 32px; left: 28px; } .ac-br { bottom: 32px; right: 28px; }
.auth-corner::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 8px rgba(255,255,255,.2); }

/* ===== 左侧品牌区 — SpaceX 风格：几何 Logo + 科技感文字 ===== */
.auth-hero {
  grid-column: 1; grid-row: 1;
  padding: 56px 48px 56px 64px; display: flex; flex-direction: column; justify-content: center; /* ★ v251：左内距 48→64，文字不贴边 */
  position: relative; z-index: 4;
}

/* 几何太空 Logo 容器 */
.ah-logo {
  width: 48px; height: 48px; margin-bottom: 16px;
  position: relative;
  animation: ahLogoFloat 6s ease-in-out infinite;
}
@keyframes ahLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ah-logo-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 20px rgba(27,49,96,0.4)) drop-shadow(0 0 60px rgba(27,49,96,0.15));
}

/* 六边形轨道 */
.ah-hex.outer {
  fill: none; stroke: rgba(255,255,255,0.20); stroke-width: 1.2;
  animation: hexPulse 4s ease-in-out infinite;
}
.ah-hex.inner {
  fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 0.8;
  animation: hexPulse 4s ease-in-out infinite 0.5s reverse;
}
@keyframes hexPulse {
  0%, 100% { opacity: 1; stroke-opacity: 1; }
  50% { opacity: 0.5; stroke-opacity: 0.4; }
}

/* 倾斜椭圆轨道 */
.ah-orbit {
  fill: none; stroke: rgba(210,35,42,0.25); stroke-width: 0.8; stroke-dasharray: 6 4;
  animation: orbitSpin 12s linear infinite;
  transform-origin: center;
}
@keyframes orbitSpin {
  from { transform: rotate(-25deg); }
  to { transform: rotate(335deg); }
}

/* 中心星标 */
.ah-star path {
  fill: rgba(255,255,255,0.90);
  animation: starGlow 3s ease-in-out infinite;
}
.ah-star circle {
  fill: #D2232A;
  animation: corePulse 2s ease-in-out infinite;
}
@keyframes starGlow {
  0%, 100% { fill: rgba(255,255,255,0.90); }
  50% { fill: rgba(255,255,255,1); }
}
@keyframes corePulse {
  0%, 100% { r: 6; fill: #D2232A; }
  50% { r: 7.5; fill: #ff3040; }
}

/* 轨道卫星点 */
.ah-sat { fill: #fff; }
.ah-sat.s1 { animation: satBlink 3s ease-in-out infinite; }
.ah-sat.s2 { animation: satBlink 3s ease-in-out infinite 1s; }
.ah-sat.s3 { animation: satBlink 3s ease-in-out infinite 2s; }
@keyframes satBlink {
  0%, 100% { opacity: 1; r: var(--r, inherit); }
  50% { opacity: 0.2; }
}

/* 品牌名 — SpaceX 风格：全大写、宽字距、超细字重 */
.ah-title {
  font-size: clamp(14px, 1.6vw, 20px); font-weight: 200; line-height: 1;
  letter-spacing: .30em; color: rgba(255,255,255,.92);
  margin-bottom: 10px; text-transform: uppercase; user-select: none;
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}
.ah-accent {
  font-weight: 700; color: #fff;
  text-shadow: 0 0 30px rgba(210,35,42,0.5), 0 0 60px rgba(210,35,42,0.2);
}

/* 英文标语 — 窄字距、半透明 */
.ah-tagline {
  font-size: 11px; font-weight: 400; line-height: 1;
  letter-spacing: .24em; color: rgba(255,255,255,.30);
  margin-bottom: 20px; text-transform: uppercase;
}

/* 分隔线 */
.ah-divider {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.40), transparent);
  margin-bottom: 20px;
}

/* 副标题 */
.ah-sub { font-size: 13px; line-height: 1.9; color: rgba(255,255,255,.38); letter-spacing: .06em; margin-bottom: 24px; }
/* 底部元信息 */
.ah-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(255,255,255,.22); letter-spacing: .04em; text-transform: uppercase; }
.ah-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.30); flex-shrink: 0; }

/* ===== NASA-Punk HUD 框架（muted 色调，保留品牌色，覆盖整帧仪表） ===== */
.auth-hud {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  font-family: 'SF Mono', 'JetBrains Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  color: rgba(190,210,240,.55); text-transform: uppercase; letter-spacing: .14em;
}
/* 角括号 L 形框 */
.hud-bracket { position: absolute; width: 26px; height: 26px; opacity: .55; }
.hb-tl { top: 22px; left: 22px; border-top: 1px solid rgba(170,195,235,.5); border-left: 1px solid rgba(170,195,235,.5); }
.hb-tr { top: 22px; right: 22px; border-top: 1px solid rgba(170,195,235,.5); border-right: 1px solid rgba(170,195,235,.5); }
.hb-bl { bottom: 22px; left: 22px; border-bottom: 1px solid rgba(170,195,235,.5); border-left: 1px solid rgba(170,195,235,.5); }
.hb-br { bottom: 22px; right: 22px; border-bottom: 1px solid rgba(170,195,235,.5); border-right: 1px solid rgba(170,195,235,.5); }
/* 顶部任务栏 */
.hud-top { position: absolute; top: 30px; left: 60px; right: 60px; display: flex; justify-content: space-between; align-items: center; font-size: 10px; }
.hud-mission { display: flex; align-items: center; gap: 14px; }
.hud-badge { color: #fff; background: rgba(27,49,96,.55); border: 1px solid rgba(120,150,200,.45); padding: 4px 10px; letter-spacing: .22em; border-radius: 2px; }
.hud-mid { color: rgba(190,210,240,.45); letter-spacing: .18em; }
.hud-status { display: flex; align-items: center; gap: 18px; }
.hud-stat { display: inline-flex; align-items: center; gap: 7px; color: rgba(190,210,240,.6); }
.hud-led { width: 6px; height: 6px; border-radius: 50%; background: #4be39a; box-shadow: 0 0 8px rgba(75,227,154,.7); animation: hudBlink 1.6s steps(1) infinite; }
.hud-link { color: #6fd0ff; font-weight: 400; }
@keyframes hudBlink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
/* 边缘刻度尺 — repeating-linear-gradient 密集刻度 */
.hud-ruler { position: absolute; opacity: .4; }
.hud-ruler-l, .hud-ruler-r { top: 70px; bottom: 70px; width: 8px; border-left: 1px solid rgba(170,195,235,.25);
  background-image: repeating-linear-gradient(to bottom, rgba(170,195,235,.55) 0 1px, transparent 1px 17px);
  background-size: 100% 17px; } /* ★ v260：强制 background-size=周期高，消除末尾截断导致的间距不均 */
.hud-ruler-l { left: 40px; }
.hud-ruler-r { right: 40px; border-left: none; border-right: 1px solid rgba(170,195,235,.25); }
.hud-ruler-b { left: 60px; right: 60px; height: 8px; border-top: 1px solid rgba(170,195,235,.25);
  background-image: repeating-linear-gradient(to right, rgba(170,195,235,.55) 0 1px, transparent 1px 20px);
  background-size: 20px 100%; } /* ★ v259：强制 background-size=周期宽，消除末尾截断导致的间距不均 */
/* ★ v259：红色激光线（粗细2px / 长度延伸30%=竖尺22px·横尺26px；opacity .95；四层发光→激光束感）
   方向：一边贴紧刻度盘边缘、向内延伸（左尺右延 / 右尺左延 / 底尺上延） */
.hud-tick { position: absolute; pointer-events: none; z-index: 2; opacity: .95; }
/* 左侧竖尺：红线贴左边缘，向右延伸 */
.hud-ruler-l .hud-tick-y { left: 0; right: auto; width: 22px; height: 2px; background: #FF6B7A;
  box-shadow: 0 0 4px rgba(255,107,122,.95), 0 0 10px rgba(255,107,122,.55), 0 0 22px rgba(255,107,122,.25), 0 0 40px rgba(255,107,122,.10); }
/* 右侧竖尺：红线贴右边缘，向左延伸 */
.hud-ruler-r .hud-tick-y { right: 0; left: auto; width: 22px; height: 2px; background: #FF6B7A;
  box-shadow: 0 0 4px rgba(255,107,122,.95), 0 0 10px rgba(255,107,122,.55), 0 0 22px rgba(255,107,122,.25), 0 0 40px rgba(255,107,122,.10); }
/* 底部横尺：红线贴下边缘，向上延伸 */
.hud-tick-x { bottom: 0; top: auto; width: 2px; height: 26px; background: #FF6B7A;
  box-shadow: 0 0 4px rgba(255,107,122,.95), 0 0 10px rgba(255,107,122,.55), 0 0 22px rgba(255,107,122,.25), 0 0 40px rgba(255,107,122,.10); }
/* 底部坐标读数 */
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hud-coords { display: flex; gap: 26px; font-size: 10px; color: rgba(190,210,240,.5); }
.hud-coords b { color: rgba(220,232,250,.8); font-weight: 400; margin-left: 6px; }
/* 左侧遥测小面板 */
.hud-telemetry { position: absolute; left: 60px; bottom: 92px; display: flex; flex-direction: column; gap: 8px; font-size: 10px; }
.hud-tel-row { display: flex; align-items: center; gap: 10px; color: rgba(190,210,240,.5); }
.hud-tel-row b { color: rgba(220,232,250,.8); font-weight: 400; }
.hud-bars { display: inline-flex; gap: 3px; align-items: flex-end; height: 10px; }
.hud-bars i { width: 3px; display: block; background: rgba(120,150,200,.35); }
.hud-bars i:nth-child(1) { height: 4px; } .hud-bars i:nth-child(2) { height: 6px; } .hud-bars i:nth-child(3) { height: 8px; }
.hud-bars i:nth-child(4) { height: 10px; background: rgba(210,35,42,.7); }

/* 手机版登录页顶部品牌区 */
.auth-mobile-brand {
  display: none; width: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.ah-logo-svg-sm { width: 56px; height: 56px; filter: drop-shadow(0 0 16px rgba(27,49,96,0.5)); }
.auth-mobile-brand span { font-weight: 200; font-size: 22px; color: #fff; text-align: center; letter-spacing: .20em; text-transform: uppercase; }

/* ===== 右侧登录区 — 融入背景的极简卡片 ===== */
.auth-form { grid-column: 2; grid-row: 1; padding: 56px 64px 56px 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; position: relative; z-index: 4; /* ★ v251：右内距 48→64，卡片不贴右边缘 */ }
.auth-card {
  width: 100%; max-width: 380px; margin-left: auto;
  /* 融入背景：几乎透明，仅靠细线分隔 */
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.04);
  border-radius: 0;
  box-shadow: none;
  padding: 36px 0;
}
.auth-card .af-head { margin-bottom: 28px; }
.auth-card .af-head h2 { font-size: 20px; font-weight: 400; letter-spacing: .08em; color: rgba(255,255,255,.70); }

/* 输入框 — 下划线风格，无填充背景 */
.auth-card .input {
  height: 44px; padding: 0 4px; line-height: 44px;
  background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,.12);
  color: #e8eaef; border-radius: 0;
}
.auth-card .input:focus { border-bottom-color: rgba(255,255,255,.40); outline: none; box-shadow: none; }
.auth-card .input::placeholder { color: rgba(255,255,255,.18); }
.auth-card label { color: rgba(255,255,255,.35); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; display: block; }

/* 按钮 — 极简风格 */
.auth-card .btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.55); border-radius: 6px; }
.auth-card .btn-ghost:hover { border-color: rgba(255,255,255,.28); color: rgba(255,255,255,.80); background: transparent; }
.auth-card .btn-primary { background: #fff; color: #000; border: none; border-radius: 6px; font-weight: 600; letter-spacing: .04em; box-shadow: none; transform: none; transition: all .15s ease; }
.auth-card .btn-primary:hover { background: rgba(255,255,255,.90); box-shadow: 0 4px 16px rgba(255,255,255,.12); }
.auth-card .btn-primary:active { transform: scale(.98); }
.auth-card .btn-soft { background: transparent; border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.30); border-radius: 6px; }
.auth-card .btn-soft:hover { border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.45); }

/* 登录操作栏 */
.auth-actions { display: flex; align-items: stretch; gap: 10px; margin-top: 14px; }
.auth-actions .auth-switch { flex: 0 0 auto; padding: 0 18px; }
.auth-actions .auth-submit { flex: 1 1 auto; min-width: 0; }

/* 验证码输入与按钮对齐 */
.auth-card .row.gap-2 { align-items: center; }
.auth-card .row.gap-2 .input,
.auth-card .row.gap-2 .btn-ghost { height: 44px; box-sizing: border-box; border-radius: 6px; }
.auth-card .row.gap-2 .btn-ghost { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; }
.send-full { display: inline; }
.send-short { display: none; }
.hint { font-size: 11px; color: rgba(255,255,255,.18); margin-top: 6px; }

/* 分段控件 */
.segment { display: inline-flex; background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-pill); padding: 4px; gap: 4px;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.segment button, .segment a { border: none; background: transparent; padding: 8px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--c-ink-3); text-decoration: none; display: inline-block;
  transition: color .25s cubic-bezier(.4, 0, .2, 1), background .25s cubic-bezier(.4, 0, .2, 1); }
.segment button.active, .segment a.active { background: rgba(255,255,255,.72); color: var(--c-ink); box-shadow: var(--sh-xs); }
/* 分类筛选 chips */
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 13px; font-weight: 600;
  color: var(--c-ink-3); text-decoration: none;
  transition: background .25s cubic-bezier(.4, 0, .2, 1), color .25s cubic-bezier(.4, 0, .2, 1), border-color .25s cubic-bezier(.4, 0, .2, 1), box-shadow .15s ease;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow);
  white-space: nowrap; flex-shrink: 0;
}
.cat-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.cat-chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.cat-chip .cat-n { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill);
  background: rgba(0,0,0,.06); color: inherit; }
.cat-chip.active .cat-n { background: rgba(255,255,255,.25); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 搜索条 —— 磨砂 */
.searchbar { display: flex; align-items: center; gap: 10px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: var(--r-pill); padding: 8px 8px 8px 18px; box-shadow: var(--sh-xs);
  transition: box-shadow .18s ease, border-color .18s ease; }
.searchbar:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-ring); }
.searchbar input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }
.searchbar .s-btn { background: var(--c-primary); color: #fff; border: none; width: 40px; height: 40px;
  border-radius: var(--r-pill); display: grid; place-items: center; box-shadow: var(--sh-sm); }
.searchbar .s-btn:hover { background: var(--c-primary-press); }

/* 产能资源筛选条 */
.hotel-hero-title { flex: 1 1 220px; min-width: 220px; }
.hotel-filter-bar { display: flex; align-items: center; gap: 12px; flex: 1 1 320px; justify-content: flex-start; min-width: 280px; }
.hotel-search { flex: 1; max-width: 360px; min-width: 180px; }
.city-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: var(--r-pill); padding: 9px 16px;
  color: var(--c-ink); font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: var(--sh-xs); transition: all .15s ease;
}
.city-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.city-label { display: inline-flex; align-items: center; gap: 6px; }
.city-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.city-option {
  background: var(--c-surface); border: 1px solid var(--c-line-2);
  border-radius: var(--r-md); padding: 12px; font-size: 14px; font-weight: 600;
  color: var(--c-ink); cursor: pointer; transition: all .15s ease;
}
.city-option:hover { border-color: var(--c-primary); color: var(--c-primary); }
.city-option.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* 明细行 */
.kv-list { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--c-line); }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--c-ink-3); font-size: 13px; }
.kv-row .v { font-weight: 600; font-size: 13px; color: var(--c-ink); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 600px) { .kv-grid { grid-template-columns: 1fr; } }

/* 订单详情页 */
.od-page { display: grid; grid-template-columns: 1.4fr 1fr; align-items: start; gap: 16px; }
.od-main { min-width: 0; }
.od-side { position: sticky; top: 84px; }
.od-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.od-actions .btn { flex: 1 1 auto; min-width: 120px; }

/* 资产概览卡 */
.stat-card { background: var(--glass-bg); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 14px 16px; }
.stat-label { color: var(--c-ink-3); font-size: 12px; margin-bottom: 6px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--c-ink); }

.bar { height: 8px; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: var(--r-pill); }

/* 工具类 */
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--c-ink-3); } .text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.w-full { width: 100%; } .hidden { display: none !important; }
.divider { height: 1px; background: var(--c-line); margin: var(--sp-4) 0; }
.flex-1 { flex: 1; } .right { margin-left: auto; }
.scroll-x { overflow-x: auto; }
/* T1 杜绝竖排: 滚动容器内的数据表格设最小宽度, 窄屏横向滚动而非挤压逐字换行 */
.scroll-x > .table { width: auto; min-width: 640px; }
[style*="overflow-x:auto"] > .table { width: auto; min-width: 640px; }
@media (min-width: 761px) {
  .scroll-x > .table, [style*="overflow-x:auto"] > .table { width: 100%; min-width: 0; }
}

/* 浮动操作条(磨砂) */
.fab-bar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 8px; border-radius: var(--r-pill); z-index: 40;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--sh-md); }

/* 移动端主功能栏 + 子选项抽屉: 桌面端隐藏, 仅移动端 @media 内显示 */
.m-tabbar, .m-drawer-mask, .m-drawer { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .subnav { padding: 6px var(--sp-4); }
  .main { padding: var(--sp-4); }
  .sidebar { width: 200px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.masonry { columns: 3; column-gap: 14px; }
  .grid.masonry > * { margin-bottom: 14px; }
}

/* 仅手机端显示的元素 */
.mobile-only { display: none; }

@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-hero { display: none; }
  /* HUD 移动端：仅保留角括号框，其余仪表读数/刻度尺隐藏，避免窄屏拥挤 */
  .hud-ruler, .hud-telemetry, .hud-bottom, .hud-top { display: none; }
  /* ★ v263：移动端品牌区紧凑靠上（星盘已居中靠上，品牌文字紧跟其下） */
  .auth-mobile-brand.mobile-only {
    grid-column: 1; grid-row: 1;
    display: flex; align-self: start; justify-self: center;
    padding: 8px 22px 4px; position: relative; z-index: 3;
  }
  .auth-mobile-brand .ah-logo-svg-sm { width: 48px; height: 48px; }
  .auth-mobile-brand span { font-size: 18px; letter-spacing: .15em; }
  /* ★ v264：登录卡片紧凑 + 下移不挡星盘 */
  .auth-form {
    grid-column: 1; grid-row: 2;
    padding: 160px 22px 24px 22px; align-items: center;   /* ★ v268：继续下移 */
    justify-content: center;
  }
  .auth-card { margin: 0 auto; padding: 16px 14px; overflow: visible; max-width: 380px; border-top: none !important; border: none !important; } /* ★ v266：强制去掉登录上方白线（含focus/active等状态） */
  /* ★ v264：移动端卡片内部更紧凑 */
  .auth-card .af-head { margin-bottom: 18px; }
  .auth-card .af-head h2 { font-size: 18px; }
  .auth-card .field { margin-bottom: 12px; }
  .auth-card .field label { font-size: 12px; }
  .auth-actions { margin-top: 10px; gap: 8px; }
  .auth-card .mt-3 { margin-top: 10px !important; }
  /* ★ v267：更多登录方式去掉按钮样式，变成可点击小字 */
  #auth-wechat { background: none !important; border: none !important; box-shadow: none !important;
    padding: 6px 0 !important; font-size: 12px !important; color: rgba(255,255,255,.30) !important;
    text-align: center; display: block; width: 100%; }
  .auth-card .row.gap-2 { flex-wrap: nowrap; }
  .auth-card .row.gap-2 .input { flex: 1 1 0; min-width: 0; }
  .auth-card .row.gap-2 .btn-ghost { flex: 0 0 auto; padding: 0 12px; font-size: 13px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .send-full { display: none; }
  .send-short { display: inline; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .brand .sub { display: none; }
  .top-search { width: min(56vw, 320px); padding-left: 12px; }
  .top-search input { font-size: 13px; }
  /* 侧边栏 → 底部标签栏(移动端标准导航): 复用同一份 .sidebar 导航, 转为固定底部横向滚动 */
  .body { display: block; }
  /* 移动端不再平铺侧边栏, 改由底部主功能栏 .m-tabbar 取代 */
  .sidebar { display: none; }
  /* 移动端去掉顶部品牌栏 + 右上角个人图标(由首页头部搜索行的强调色搜索按钮替代) */
  .topbar { display: none; }
  /* 移动端首页: sticky大分类切换栏 + 搜索行 共同装入一个磨砂玻璃容器; 小类不sticky, 在其下方 */
  .m-home-head-sticky {
    display: block; position: sticky; top: 0; z-index: 45;
    background: transparent; padding: 10px 0 8px;
  }
  .home-page-head { display: none; }
  .segment, .cat-row { display: none; }
  .mobile-only { display: block; }
  /* 小分类不固定、无数量徽章、文字不换行; 用实色背景避免手机毛玻璃填色异常 */
  .m-subcats { margin-bottom: 12px; }
  .m-subcats .cat-n { display: none; }
  .m-subcats .cat-chip {
    background: var(--c-surface); border-color: var(--c-line); color: var(--c-ink-3);
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  }
  .m-subcats .cat-chip.active {
    background: var(--c-surface); border-color: rgba(0,0,0,.08); color: var(--c-ink);
    box-shadow: var(--sh-xs);
  }
  /* 商品瀑布流手机端两列 */
  .grid.masonry { columns: 2; column-gap: 12px; }
  .grid.masonry > * { margin-bottom: 12px; }
  /* 首页商品手机端固定两列 */
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* 库存页: 手机端四指标矩阵两列排布, 防窄屏挤压 */
  .inv-matrix { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .inv-metric { padding: 9px 10px; }
  .inv-metric-val { font-size: 20px; }
  .inv-ledger .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .inv-ledger .table th, .inv-ledger .table td { white-space: nowrap; }
  .inv-ledger .tag { white-space: nowrap; flex-shrink: 0; }
  /* 商家库存页(货品库存) — 手机端: 矩阵视图两列, 列表视图横向滚动防竖排 */
  .inv-grid-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .inv-card-body { padding: 10px; }
  .inv-card-foot { gap: 4px 6px; font-size: 12px; }
  .inv-card-actions { margin-top: 6px; padding-top: 6px; }
  .inv-card-actions .btn { padding: 4px 8px; font-size: 11px; }
  .inv-list-table { min-width: 720px; }
  .inv-list-table th, .inv-list-table td { white-space: nowrap; }
  /* 库存变动按钮分组更紧凑 */
  .inv-head-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
  /* 移动端首页顶部不再展示「我的资产」卡片(底部导航已含 库存/收藏/地址/个人中心 入口) */
  .assetQuick { display: none; }
  /* 避免与首页头部搜索行重复: 隐藏"全部"页 hero 内的搜索条(产能资源页保留) */
  .glass-card .searchbar:not(.hotel-search) { display: none; }
  /* 二级页在全部移动端宽度下隐藏主功能栏 */
  body.hide-tabbar .m-tabbar { display: none !important; }
  body.hide-tabbar .main { padding-bottom: 0; }

  /* 移动端主功能栏: iOS 26 液态玻璃药丸形悬浮导航 (居中、等分、避免 left/right 被覆盖导致偏移) */
  .m-tabbar {
    display: flex; position: fixed;
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px); max-width: 560px;
    bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 56;
    box-sizing: border-box;
    height: 60px;
    padding: 7px;
    background: rgba(255, 255, 255, .55);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .4);
    -webkit-backdrop-filter: blur(1px) saturate(120%); backdrop-filter: blur(1px) saturate(120%);
    box-shadow: 0 14px 38px rgba(17, 17, 26, .18), inset 0 1px 0 rgba(255, 255, 255, .72);
    justify-content: space-between; align-items: center; gap: 4px;
  }
  .m-tab {
    -webkit-flex: 1 1 0; flex: 1 1 0;
    width: 100%; min-width: 0; max-width: 96px; height: 46px; border: none; border-radius: 999px;
    background: transparent; cursor: pointer;
    display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
    -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
    gap: 3px; padding: 0 6px; color: var(--c-ink-3);
    font-size: 10px; font-weight: 600; transition: all .2s ease;
  }
  .m-tab .mt-ico { display: grid; place-items: center; position: relative; transform: translateY(2px); }
  .m-tab .mt-ico svg { width: 26px; height: 26px; }
  .m-tab .m-home-logo { width: 26px; height: 26px; object-fit: contain; }
  .m-tab:not(.active) .m-home-logo { filter: none; opacity: 1; }
  .m-tab.active {
    background: rgba(27, 49, 96, .70); color: #fff;
    -webkit-backdrop-filter: blur(1px) saturate(140%); backdrop-filter: blur(1px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(27, 49, 96, .25);
  }
  .m-tab.active .mt-ico svg { color: #fff; }
  .m-tab.active .m-home-logo { filter: brightness(0) invert(1); }
  .m-tab.active .mt-ico { transform: translateY(1px); }
  /* 子选项抽屉: 从底部滑出 */
  .m-drawer-mask {
    display: block; position: fixed; inset: 0; z-index: 57;
    background: rgba(17, 17, 26, 0.32); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .m-drawer {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: 0 -10px 40px rgba(17, 17, 26, 0.18);
    padding: 6px 0 calc(80px + env(safe-area-inset-bottom));
    transform: translateY(100%); transition: transform .26s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 72vh; overflow-y: auto;
  }
  .m-drawer.open { transform: translateY(0); }
  .m-drawer-mask.open { opacity: 1; visibility: visible; }
  .m-drawer-h {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px 8px; font-weight: 700; font-size: 15px; color: var(--c-ink);
    border-bottom: 1px solid var(--c-line);
  }
  .m-drawer-h .m-drawer-x {
    border: none; background: var(--c-surface-2); width: 30px; height: 30px;
    border-radius: var(--r-pill); display: grid; place-items: center; color: var(--c-ink-3);
  }
  .m-sub {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    color: var(--c-ink-2); font-size: 15px; font-weight: 500;
    border-bottom: 1px solid var(--c-line);
  }
  .m-sub:last-child { border-bottom: none; }
  .m-sub:active { background: rgba(255, 255, 255, .5); }
  .m-sub .ms-ico { color: var(--c-primary); display: grid; place-items: center; }
  .m-sub .ms-lbl { flex: 1; }
  .m-sub .badge-dot {
    background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: var(--r-pill); display: grid; place-items: center; padding: 0 5px;
  }
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* 移动端订单/购物车：卡片撑满、底部结算栏固定 */
  .tb-order-tabs { gap: 6px; }
  .tb-tab { padding: 7px 10px; font-size: 12px; }
  .tb-order-card, .tb-cart-store { border-radius: var(--r-md); margin-left: -2px; margin-right: -2px; }
  .tb-cart-footer {
    position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom));
    border-radius: 0; border-width: 1px 0 0; margin: 0;
    background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  }
  .tb-cart-store[data-manage="1"] .tb-ci-del { display: block; opacity: 1; }
  /* 弹窗在窄屏接近满宽 */
  .modal { width: calc(100vw - 20px); max-width: none; margin: 10px auto; max-height: calc(100dvh - 20px); }
  .modal.lg { max-width: none; }
  /* 订单详情手机端：单列堆叠，避免字段换行 */
  .od-page { grid-template-columns: 1fr; gap: 12px; }
  .od-side { position: static; }
  .od-actions { flex-direction: column; }
  .od-actions .btn { width: 100%; }
  .od-page .kv-row { flex-wrap: nowrap; gap: 12px; }
  .od-page .kv-row .k { flex-shrink: 0; }
  .od-page .kv-row .v { text-align: right; word-break: break-word; }
}

/* ============ 演示角色快速切换条(一键模拟不同角色动线) ============ */
.demo-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 6px;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  border-radius: var(--r-pill); padding: 6px 8px; max-width: calc(100vw - 24px);
}
.db-tag { font-size: 11px; font-weight: 700; color: var(--c-ink-3); padding: 0 8px 0 4px; letter-spacing: .04em; white-space: nowrap; }
.db-item { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--c-ink-2); text-decoration: none; white-space: nowrap; transition: all .15s ease; }
.db-item:hover { background: rgba(255,255,255,.55); color: var(--c-ink); }
.db-item.active { background: var(--c-primary); color: #fff; box-shadow: var(--sh-xs); }
@media (max-width: 760px) {
  .demo-bar { display: none; }
}
/* 个人页内「演示角色切换」卡片: 仅移动端显示, 桌面端由悬浮演示条承担 */
.profile-role-switch { display: none; }
.rs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-item {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--c-ink-2); background: var(--c-surface-2); text-decoration: none;
  transition: all .15s ease;
}
.rs-item:hover { background: rgba(255,255,255,.6); color: var(--c-ink); }
.rs-item.active { background: var(--c-primary); color: #fff; }
@media (max-width: 760px) {
  .profile-role-switch { display: block; }
}

/* ============ 移动端首页头部(大分类金刚区 + 搜索行 + 小类) ============ */
/* 桌面端默认隐藏, 仅移动端(@media max-width:760px)显示; 注意此处不得用全局 display:none 覆盖媒体查询 */
@media (min-width: 761px) {
  .m-home-head-sticky, .m-subcats { display: none; }
}
.m-home-logo { height: 22px; width: 22px; object-fit: contain; }
.btn-accent { background: var(--c-primary); color: #fff; border: none; border-radius: var(--r-pill);
  display: grid; place-items: center; cursor: pointer; transition: background .15s ease; flex-shrink: 0; }
.btn-accent:hover { background: var(--c-primary-press); }
/* 移动端首页头部磨砂玻璃容器: 把大分类 + 搜索行装入同一圆角矩形, 透明, 无额外底色 */
.m-head-glass {
  margin: 0 12px; padding: 12px 12px 8px; border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  backdrop-filter: blur(1px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 32px rgba(17, 17, 26, 0.08);
}
/* 大分类/搜索行在玻璃容器内: 分类长条药丸白底, 让选中的磨砂 pill 突显 */
.m-head-glass .m-cat-grid { display: flex; gap: 4px; margin-bottom: 8px; padding: 4px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: none;
  -webkit-backdrop-filter: blur(1px) saturate(120%); backdrop-filter: blur(1px) saturate(120%); }
.m-cat {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; height: 32px;
  text-decoration: none; color: var(--c-ink-3); font-size: 13px; font-weight: 600;
  border-radius: var(--r-pill); padding: 0 8px;
  background: transparent; border: none;
  position: relative; transition: color .25s cubic-bezier(.4, 0, .2, 1);
}
/* 选中态磨砂玻璃填充: 伪元素放在文字下方, 无边框 */
.m-cat::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-pill); z-index: 0;
  background: transparent; transition: background .25s cubic-bezier(.4, 0, .2, 1), backdrop-filter .25s cubic-bezier(.4, 0, .2, 1);
}
.m-cat:active { color: var(--c-ink); }
.m-cat.active { color: #fff; }
.m-cat.active::before {
  background: rgba(27, 49, 96, 0.70);
  -webkit-backdrop-filter: blur(1px) saturate(140%);
  backdrop-filter: blur(1px) saturate(140%);
}
.m-cat-lbl { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s cubic-bezier(.4, 0, .2, 1); }
.m-cat.active .m-cat-lbl { font-weight: 700; color: #fff; }
.m-search-row { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
/* 搜索输入框容器: 扫码按钮置于输入框内最左侧, 输入框改为药丸形 */
.m-search-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.m-scan { position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: none; color: var(--c-ink-3); cursor: pointer; z-index: 2; }
.m-scan:active { color: var(--c-primary); }
.m-search-input { width: 100%; height: 38px; border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.55); border-radius: var(--r-pill); padding: 0 16px 0 42px; font-size: 14px; color: var(--c-ink); outline: none; }
.m-search-input::placeholder { color: var(--c-ink-3); }
.m-search-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-ring); background: rgba(255, 255, 255, 0.85); }
.m-search-go { width: 38px; height: 38px; border-radius: var(--r-pill); }
/* .m-subcats 必须仅在手机端显示; 桌面端由 @media(min-width:761px) 隐藏, 此处规则放在手机媒体查询内避免覆盖 */
@media (max-width: 760px) {
  .m-subcats { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .m-subcats::-webkit-scrollbar { display: none; }
}

/* ============ 价格块(现金为主 + 右侧价值券结算) ============ */
.price-block {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px 0;
  padding: 14px 18px; border-radius: var(--r-xl);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.pb-cash { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pb-cash-label { font-size: 12px; color: var(--c-ink-3); }
.pb-cash-amt {
  font-size: 26px; font-weight: 800; color: var(--c-ink); line-height: 1;
  letter-spacing: -.01em;
}
.pb-cash-unit { font-size: 13px; color: var(--c-ink-2); }
.pb-q {
  font-size: 12px; font-weight: 600; color: var(--c-warn);
  background: var(--c-warn-soft); padding: 2px 8px; border-radius: var(--r-pill);
}
.pb-voucher {
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0; text-align: right; line-height: 1;
}
.pb-voucher-line { font-size: 15px; font-weight: 700; color: var(--c-primary); }
.pb-voucher-unit, .pb-voucher-amt { display: none; }

/* ============ 淘宝风格订单/购物车组件（移动端优先，桌面端复用） ============ */

/* 通用圆形复选框 */
.tb-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.tb-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.tb-check-box {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--c-line-2); background: var(--c-surface);
  display: grid; place-items: center; transition: all .15s ease;
}
.tb-check input:checked + .tb-check-box { border-color: var(--c-primary); background: var(--c-primary); }
.tb-check input:checked + .tb-check-box::after {
  content: ''; width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: contain;
}

/* 订单页 */
.tb-order-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
.tb-order-tabs::-webkit-scrollbar { display: none; }
.tb-tab {
  flex: 1 1 0; min-width: 0; white-space: nowrap; text-align: center;
  padding: 8px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--c-ink-3); background: var(--glass-bg); border: 1px solid var(--glass-border);
  text-decoration: none; transition: all .15s ease;
}
.tb-tab.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.tb-order-banner {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--c-primary-soft); color: var(--c-primary); font-size: 13px; font-weight: 600;
}
.tb-ob-tag {
  background: var(--c-primary); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: var(--r-sm);
}
.tb-order-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.tb-order-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-xs);
}
.tb-order-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--c-line);
}
.tb-shop { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--c-ink); }
.tb-shop svg { color: var(--c-ink-3); }
.tb-status { font-size: 13px; font-weight: 700; color: var(--c-primary); }
.tb-order-body { display: block; padding: 12px 14px; }
.tb-order-item {
  display: flex; gap: 12px; padding: 8px 0;
}
.tb-order-item:first-child { padding-top: 0; }
.tb-order-item:last-child { padding-bottom: 0; }
.tb-order-item .cover.mini { width: 72px; height: 72px; border-radius: 10px; }
.tb-oi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tb-oi-title { font-size: 14px; font-weight: 600; color: var(--c-ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-oi-spec { font-size: 12px; color: var(--c-ink-4); background: var(--c-surface-2); display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); width: fit-content; }
.tb-oi-price { text-align: right; flex-shrink: 0; }
.tb-price { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.tb-price .voucher-amt::after { font-size: .8em; }
.tb-qty { font-size: 12px; color: var(--c-ink-4); margin-top: 2px; }
.tb-order-total {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 6px;
  padding: 10px 14px; font-size: 13px; color: var(--c-ink-2);
  border-top: 1px dashed var(--c-line-2);
}
.tb-order-total b { font-size: 16px; }
.tb-order-foot {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
  padding: 10px 14px 14px;
}
.tb-order-foot .btn-sm { padding: 6px 14px; font-size: 13px; }

/* 购物车页 */
.tb-cart-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
}
.tb-ch-title { font-size: 17px; font-weight: 800; flex: 1; }
.tb-ch-loc {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--c-ink-2);
  max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-ch-search, .tb-ch-manage {
  background: transparent; border: none; color: var(--c-ink-2); cursor: pointer;
  display: grid; place-items: center; padding: 4px;
}
.tb-ch-manage { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.tb-cart-filters {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px;
}
.tb-cart-filters::-webkit-scrollbar { display: none; }
.tb-filter-tag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 5px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
  background: var(--c-surface); border: 1px solid var(--c-line-2); color: var(--c-ink-2);
}
.tb-filter-tag.primary { background: var(--c-primary-soft); border-color: var(--c-primary-soft); color: var(--c-primary); }
.tb-filter-btn { margin-left: auto; }
.tb-filter-drawer { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.tb-filter-row {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--c-line-2);
  background: var(--c-surface); color: var(--c-ink); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .12s ease;
}
.tb-filter-row.active { background: var(--c-primary-soft); border-color: var(--c-primary-soft); color: var(--c-primary); }
.tb-filter-row:active { transform: scale(.98); }
.tb-cart-search { padding: 8px 0 4px; }
.tb-cart-search .input { width: 100%; }
.tb-ch-loc { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--c-ink-2); max-width: 210px; background: transparent; border: none; cursor: pointer; padding: 0; font: inherit; }
.tb-ch-loc-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-cart-store {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); margin-top: 12px; overflow: hidden; box-shadow: var(--sh-xs);
}
.tb-cs-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-line);
}
.tb-store-name { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.tb-cs-coupon {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--c-primary);
  padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-primary-soft);
  border: none; cursor: pointer; font-family: inherit; transition: transform .12s ease;
}
.tb-cs-coupon:active { transform: scale(.95); }
/* 物流时间轴 */
.tb-trace { padding: 4px 2px; }
.tb-trace-item { position: relative; padding: 0 0 18px 22px; }
.tb-trace-dot { position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--c-line-2); border: 2px solid var(--c-surface); box-shadow: 0 0 0 1px var(--c-line-2); }
.tb-trace-item.done .tb-trace-dot { background: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.tb-trace-line { position: absolute; left: 5px; top: 14px; bottom: -4px; width: 1px; background: var(--c-line-2); }
.tb-trace-item.done .tb-trace-line { background: var(--c-primary); }
.tb-trace-t { font-size: 13px; font-weight: 600; color: var(--c-ink); }
.tb-trace-d { margin-top: 2px; }
/* 领券弹窗 */
.tb-coupon-list { display: flex; flex-direction: column; gap: 10px; }
.tb-coupon { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.tb-coupon-amt { flex-shrink: 0; width: 56px; text-align: center; color: var(--c-primary); font-weight: 800; line-height: 1; }
.tb-coupon-amt b { font-size: 22px; }
.tb-coupon-amt span { font-size: 12px; margin-left: 1px; }
.tb-coupon-info { flex: 1; min-width: 0; }
.tb-cs-items { padding: 4px 14px; }
.tb-cart-item {
  display: flex; align-items: stretch; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--c-line);
}
.tb-cart-item:last-child { border-bottom: none; }
.tb-cart-item.is-hidden { display: none; }
.tb-cart-store.is-hidden { display: none; }
.tb-ci-img { flex-shrink: 0; }
.tb-ci-img .cover.mini { width: 68px; height: 68px; border-radius: 10px; }
.tb-ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.tb-ci-title { font-size: 13px; font-weight: 600; color: var(--c-ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-ci-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.tb-ci-tag {
  font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: var(--r-sm);
  background: var(--c-primary-soft); color: var(--c-primary);
}
.tb-ci-spec { font-size: 11px; color: var(--c-ink-4); margin-top: 2px; }
.tb-ci-right { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 8px; min-width: 96px; margin-left: 10px; }
.tb-ci-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; }
.tb-ci-price { font-size: 20px; font-weight: 800; color: var(--c-ink); text-align: right; line-height: 1.2; width: auto; margin-top: auto; }
/* 「券」字统一由 .voucher-amt::after 单点输出, 各处禁止再手写「券」 */
.tb-ci-price .voucher-amt::after { font-size: .62em; margin-left: 1px; }
.tb-ci-alt { display: none; }
.tb-ci-qty {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--c-line-2); border-radius: var(--r-pill); padding: 1px;
  background: var(--c-surface);
}
.tb-qty-btn {
  width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--c-surface-2);
  color: var(--c-ink-2); display: grid; place-items: center; cursor: pointer;
}
.tb-qty-btn:active { background: var(--c-line); }
.tb-ci-qty span { min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; }
.tb-ci-del {
  display: none;
  background: transparent; border: none; color: var(--c-ink-4); cursor: pointer; padding: 3px;
}
.tb-cart-store[data-manage="1"] .tb-ci-del { display: block; opacity: 1; }
.tb-cs-promo {
  padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--c-primary);
  border-top: 1px dashed var(--c-line-2);
}
.tb-cart-footer {
  position: sticky; bottom: 0; z-index: 45;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-top: 14px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.tb-check-all { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.tb-cf-total { margin-left: auto; font-size: 14px; color: var(--c-ink-2); text-align: right; }
.tb-cf-total .voucher-amt::after { font-size: .7em; }
.tb-cf-total b { font-size: 18px; }
.tb-cf-btn { padding: 10px 22px; font-size: 15px; }

/* ============ 手机端首页营销区块（促销横条 + 动态标签） ============ */
.m-promo-bar { display: none; }
@media (max-width: 760px) {

  /* 促销横条：流动红色渐变背景 + 光带扫过 + 图标呼吸，左侧文案，右侧商品小图 */
  .m-promo-bar {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 0 0; padding: 14px 12px;
    border-radius: var(--r-xl);
    background: linear-gradient(110deg, #D2232A 0%, #E83B42 25%, #F25652 50%, #E83B42 75%, #D2232A 100%);
    background-size: 300% 100%;
    animation: m-promo-flow 5s linear infinite;
    color: #fff; box-shadow: var(--sh-sm);
    overflow: hidden; position: relative;
  }
  .m-promo-bar::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.28) 0%, transparent 40%);
    pointer-events: none;
  }
  /* 流动光带扫过 */
  .m-promo-bar::after {
    content: ''; position: absolute; top: 0; left: -60%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg); pointer-events: none; z-index: 0;
    animation: m-promo-sheen 4.5s ease-in-out infinite;
  }
  .m-promo-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
  .m-promo-title {
    font-size: 17px; font-weight: 800; letter-spacing: -.02em;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .m-promo-pulse { display: inline-flex; animation: m-promo-icon 2.4s ease-in-out infinite; }
  .m-promo-sub { font-size: 12px; opacity: .92; margin-top: 4px; padding-left: 22px; }
  .m-promo-countdown {
    display: inline-block; margin-top: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    padding: 4px 10px; border-radius: var(--r-pill);
    background: rgba(0,0,0,.18);
  }
  .m-promo-list {
    display: flex; gap: 8px; position: relative; z-index: 1; flex-shrink: 0;
    margin-left: -10px;
  }
  .m-promo-item {
    width: 64px; text-decoration: none; color: #fff; text-align: center;
  }
  .m-promo-img {
    width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
    background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.35);
    transition: transform .2s ease;
  }
  .m-promo-item:active .m-promo-img { transform: scale(.94); }
  .m-promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-promo-img.with-img { background-image: var(--cover-img); background-size: cover; background-position: center; background-repeat: no-repeat; }
  .m-promo-img.with-img:empty { background-image: var(--cover-img); }
  .m-promo-price { margin-top: 5px; font-size: 12px; }
  .m-promo-price b { font-size: 15px; font-weight: 800; }

  /* 库存变动页：手机端筛选字段保持单行紧凑排列 */
  .ch-frow { flex-direction: row; flex-wrap: nowrap; }
  .ch-fld { width: auto; min-width: 0; }
  .ch-fld > span { font-size: 11px; }
  .ch-fld .input { padding: 6px 8px; font-size: 12px; }
  .ch-row td, .ch-row th { white-space: nowrap; }

}

@keyframes m-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: .75; }
}
@keyframes m-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}
@keyframes m-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
/* 促销横条流动背景 / 光带扫过 / 图标呼吸 */
@keyframes m-promo-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: -300% 50%; }
}
@keyframes m-promo-sheen {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}
@keyframes m-promo-icon {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(14deg); }
}

/* ============ 离线提示条 ============ */
.offline-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--c-warn-soft); border: 1px solid #DDE3F0; color: var(--c-warn);
  border-radius: var(--r-md); font-size: 13px; font-weight: 600;
}

/* ============ 开关(价值券调控权限) ============ */
.switch {
  position: relative; display: inline-block; width: 42px; height: 24px;
  border-radius: var(--r-pill); background: var(--c-line-2); cursor: pointer;
  transition: background .18s ease; vertical-align: middle;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-xs); transition: left .18s ease;
}
.switch.on { background: var(--c-accent); }
.switch.on .knob { left: 21px; }
.switch[data-dis="1"] { opacity: .55; cursor: not-allowed; }

/* ============ 管理员权限配置卡 ============ */
.perm-card { padding: 20px; }
.perm-fields { align-items: end; }
.perm-card .field { margin: 0; }
.acl-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.acl-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-ink); cursor: pointer; padding: 8px 10px; background: var(--c-surface-2); border-radius: var(--r-md); }
.acl-check input { width: 16px; height: 16px; accent-color: var(--c-primary); }
.acl-check:has(input:disabled) { opacity: .7; cursor: default; }
.acl-fee-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.acl-fee-title { font-size: 13px; font-weight: 600; color: var(--c-ink); margin-bottom: 10px; }
.acl-fee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acl-fee-row .field { margin: 0; }
.acl-fee-row .field label { font-size: 12px; color: var(--c-ink-2); }
.acl-fee-section .hint { margin-top: 8px; }

/* ============ 审批卡片 ============ */
.approval-card { padding: 18px; }

/* ============ 超小屏(手机竖屏)微调 ============ */
@media (max-width: 480px) {
  .topbar { padding: 0 12px; gap: var(--sp-2); }
  .top-search { width: min(44vw, 180px); }
  .profile-btn { padding: 4px; }
  .profile-btn span:last-child { display: none; }
  .page-head h1 { font-size: 20px; }
  .pb-cash-amt { font-size: 22px; }
  .card { padding: var(--sp-4); }
  .card.tight { padding: var(--sp-3); }
  .modal .m-head, .modal .m-body, .modal .m-foot { padding-left: 16px; padding-right: 16px; }
  /* 避免底部主功能栏与演示角色条遮挡内容 */
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* 瀑布流两列卡片较窄, 价格行再压一点字号避免换行/重叠 */
  .card-cash b { font-size: 16px; }
  .card-voucher { font-size: 11px; }
}

/* ============ 移动端底部主功能栏: 购物车角标 ============ */
.mt-badge { position: absolute; top: -2px; right: -4px; background: var(--c-danger, #D2232A); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--glass-bg-strong); }

/* ============ 商品详情页(移动端专属顶/底栏, 桌面端隐藏) ============ */
.m-detail-head, .m-detail-foot { display: none; }

@media (max-width: 760px) {
  /* 详情页: 隐藏原底部主功能栏, 改由详情页自带底部操作栏 (通用规则已上移到 980px 媒体查询) */

  /* 二级页统一返回键: 固定左上角, 全站同一坐标与尺寸 */
  .pg-back {
    position: fixed; z-index: 64;
    top: calc(env(safe-area-inset-top) + 8px); left: 12px;
    margin: 0;
  }
  /* 让位给固定返回键, 避免压住页面标题 */
  body.has-back .main { padding-top: calc(env(safe-area-inset-top) + 54px); }
  /* 页面自带的返回键在移动端一律隐藏, 只保留全局那一个, 位置/尺寸绝对统一 */
  body.has-back .co-back, body.has-back .chat-back { display: none; }
  /* 页内 sticky 头下移, 避免吸顶后钻到固定返回键底下(商家店铺 tab 已固定到底部, 不在此列) */
  body.has-back .chat-head { top: calc(env(safe-area-inset-top) + 54px); }
  .detail-page { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .detail-page .page-head { display: none; }
  .detail-page .detail-actions { display: none; }
  .detail-page .search-links { display: none; }

  /* 商家详情页: 移动端隐藏桌面 pageHead(标题由浮动 .m-detail-head 承担); 顶部留白避让浮层; 吸顶 tab 下移到浮层之下 */
  .mshop-page .page-head { display: none; }
  .mshop-cover { padding-top: calc(env(safe-area-inset-top) + 88px); }
  .mshop-shop-row { margin-top: 18px; }
  /* 店铺 tab 已固定到屏幕底部, 移动端同样取消吸顶 */
  .mshop-tabs { top: auto; }

  .m-detail-head {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; left: 0; right: 0; top: 0; z-index: 62;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
    pointer-events: none;
  }
  .m-detail-head .m-dh-btn, .m-detail-head .m-dh-pill, .m-detail-head .m-dh-search { pointer-events: auto; }
  .m-dh-right { display: flex; gap: 8px; }
  .m-dh-btn {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .82); color: var(--c-ink); border: 1px solid var(--c-line);
    box-shadow: var(--sh-sm); position: relative; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .m-dh-btn:active { background: #fff; }
  /* 右上角搜索/分享/购物车: 同一药丸形磨砂玻璃容器, 高度与返回按钮(38px)一致 */
  .m-dh-pill {
    display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 8px;
    border-radius: 999px; background: rgba(255, 255, 255, .82); border: 1px solid var(--c-line);
    box-shadow: var(--sh-sm); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    position: relative;
  }
  .m-dh-pill .m-dh-ico {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: transparent; border: none; color: var(--c-ink); cursor: pointer; position: relative;
  }
  .m-dh-pill .m-dh-ico:active { background: rgba(17, 17, 26, .08); }
  /* 店铺页顶部搜索栏: 位于返回与更多之间 */
  .m-dh-search {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 12px; margin: 0 10px;
    background: rgba(255, 255, 255, .82); border: 1px solid var(--c-line); border-radius: 999px;
    box-shadow: var(--sh-sm); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .m-dh-search-ico { color: var(--c-ink-3); display: grid; place-items: center; flex-shrink: 0; }
  .m-dh-search-ico svg { width: 16px; height: 16px; }
  .m-dh-search-input {
    flex: 1; min-width: 0; border: none; background: transparent;
    font-size: 13px; color: var(--c-ink); outline: none;
  }
  .m-dh-search-input::placeholder { color: var(--c-ink-3); }

  .m-detail-foot {
    display: flex; align-items: center; gap: 6px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 62;
    padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px);
    background: var(--glass-bg-strong); border-top: 1px solid var(--glass-border);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: 0 -6px 20px rgba(17, 17, 26, .06);
  }
  .m-df-ico {
    flex: 0 0 auto; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none; color: var(--c-ink-2); font-size: 11px; cursor: pointer; padding: 4px 0;
  }
  .m-df-ico svg { width: var(--ico, 22px); height: var(--ico, 22px); }
  .m-df-ico.active { color: var(--c-primary); }
  .m-df-add, .m-df-buy {
    flex: 1 1 auto; height: 44px; border-radius: var(--r-pill); font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  }
  .m-df-add { background: var(--c-primary-soft); color: var(--c-primary); }
  .m-df-buy { background: var(--c-primary); color: #fff; margin-left: 8px; }
  .m-df-buy:active, .m-df-add:active { opacity: .9; }

  /* 首页右下角发布需求浮动按钮(手机端): 半透明橘色磨砂玻璃, 无白边, 纯文字 */
  .m-home-fab {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 50;
    height: 40px; padding: 0 16px; border-radius: 999px;
    background: rgba(27, 49, 96, .90); color: #fff; text-decoration: none;
    box-shadow: 0 4px 16px rgba(27, 49, 96, .30);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    backdrop-filter: blur(10px) saturate(150%);
    font-size: 14px; font-weight: 600; transition: background .15s ease, transform .15s ease;
  }
  .m-home-fab:active { background: rgba(27, 49, 96, .98); transform: scale(.96); }
}

/* ============ 获取价值券入口卡片 ============ */
.get-v-ch { text-align: left; cursor: pointer; text-decoration: none; color: inherit; display: block; padding: 18px; transition: all .15s ease; }
.get-v-ch:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.get-v-ch .gv-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary); }

/* ============ 淘宝风格个人中心 ============ */
.tb-profile-header {
  position: relative;
  border-radius: var(--r-xl);
  padding: 18px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, #1B3160 0%, #2C4A95 100%);
  box-shadow: 0 10px 28px rgba(27, 49, 96, .32);
  overflow: hidden;
}
.tb-profile-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 35%),
              radial-gradient(circle at 10% 90%, rgba(0,0,0,.08), transparent 30%);
  pointer-events: none;
}
.tb-ph-top {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.tb-ph-user { display: flex; align-items: center; gap: 12px; }
.tb-ph-avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.35);
  font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tb-ph-info { display: flex; flex-direction: column; gap: 6px; }
.tb-ph-name { font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.tb-ph-name svg { opacity: .85; }
.tb-ph-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tb-ph-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.22); color: #fff;
}
.tb-ph-tag.primary { background: rgba(255,255,255,.9); color: var(--tag-color, var(--c-primary)); }
.tb-ph-tag.gray { background: rgba(255,255,255,.18); color: rgba(255,255,255,.92); }
.tb-ph-actions { display: flex; gap: 14px; flex-shrink: 0; }
.tb-ph-act {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: none; color: #fff; font-size: 11px; font-weight: 600;
  cursor: pointer; text-decoration: none; padding: 0;
}
.tb-ph-act svg { opacity: .95; }
.tb-ph-vip {
  position: relative; margin-top: 16px;
  background: rgba(0,0,0,.18); border-radius: var(--r-lg);
  padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tb-vip-title { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tb-vip-sub { font-size: 12px; opacity: .9; margin-top: 3px; }
.tb-invite-code { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.16); }
.tb-ic-label { font-size: 11px; opacity: .85; }
.tb-ic-value { font-size: 13px; font-weight: 700; letter-spacing: .05em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.tb-ic-refresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.25); color: #fff; cursor: pointer;
}
.tb-ic-refresh:active { transform: scale(.92); background: rgba(255,255,255,.35); }
.tb-vip-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tb-vip-stat { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.tb-vip-stat b { font-size: 18px; font-weight: 800; line-height: 1; }
.tb-vip-stat span { font-size: 11px; opacity: .85; margin-top: 0; white-space: nowrap; }
/* 快捷入口：收藏/关注/足迹 */
.tb-pe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 2px; }
.tb-pe-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--c-ink); text-decoration: none; padding: 8px 4px; border-radius: var(--r-md);
  transition: background .15s ease; position: relative;
}
.tb-pe-item:active { background: var(--c-surface-2); }
.tb-pe-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--c-ink-2); }
.tb-pe-ico svg { width: 24px; height: 24px; }
.tb-pe-lbl { font-size: 12px; color: var(--c-ink-2); }
.tb-pe-badge {
  position: absolute; top: -3px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--c-primary); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
/* 优惠券广告 */
.tb-coupon-ad { overflow: hidden; }
.tb-ca-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tb-ca-title { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 5px; color: var(--c-primary); }
.tb-ca-list { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tb-ca-list::-webkit-scrollbar { display: none; }
.tb-ca-ticket {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  min-width: 130px; padding: 10px 12px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(27,49,96,.10), rgba(27,49,96,.03));
  border: 1px dashed rgba(27,49,96,.30);
}
.tb-ca-val { font-size: 22px; font-weight: 800; color: var(--c-primary); }
.tb-ca-val::before { content: '¥'; font-size: 13px; margin-right: 1px; }
.tb-ca-meta { font-size: 12px; font-weight: 600; color: var(--c-ink); }
/* 处理记录(管理员/超管「我的」页) */
.tb-rec-card { padding: 14px 14px 4px; }
.tb-rec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tb-rec-title { font-weight: 700; font-size: 15px; }
.tb-rec-count { font-size: 12px; color: var(--c-ink-3); }
.tb-rec-list { display: flex; flex-direction: column; }
.tb-rec-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--c-line); }
.tb-rec-item:first-child { border-top: none; }
.tb-rec-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--c-primary); }
.tb-rec-dot.sa { background: #8B5CF6; }
.tb-rec-body { flex: 1 1 auto; min-width: 0; }
.tb-rec-action { font-size: 13px; font-weight: 600; color: var(--c-ink); }
.tb-rec-target { font-size: 12px; color: var(--c-ink-2); margin-top: 2px; word-break: break-all; }
.tb-rec-time { flex: 0 0 auto; font-size: 11px; color: var(--c-ink-3); white-space: nowrap; padding-top: 2px; }
.tb-rec-actor { font-size: 11px; color: var(--c-ink-3); margin-top: 4px; }
/* 顶部文字标签：足迹 82 / 收藏 39 / 关注 24 / 种草 发现 */
.tb-stats-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 4px; }
.tb-stats-icons,
.tb-stat-ico,
.tb-si-ico { color: var(--c-primary); }
.tb-stat-ico { color: var(--c-primary); }
.tb-stat-ico.active .tb-si-ico { background: transparent; color: var(--c-primary); }
.tb-stat-ico.active::after { display: none; }
/* 库存icon动态橙色强调态 — 已在 .tb-profile-combined 内统一处理, 此处不再单独定义 */
.tb-si-row { color: var(--c-ink-2); }
.tb-stat-link {
  flex: 1; text-align: center; text-decoration: none; color: var(--c-ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.tb-stat-link span {
  display: inline-block; min-width: 22px; padding: 2px 7px; margin-left: 4px;
  background: var(--c-surface-2); border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--c-ink-2);
}
.tb-stat-pill {
  display: inline-block; padding: 2px 8px; margin-right: 4px;
  background: var(--c-primary-soft); border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--c-primary);
}
/* 我的页合并卡片：上排(功能 icon)与下排(订单入口)统一 34px/22px, 橙色强调色, 1:1 对齐 */
.tb-profile-combined { padding: 10px 6px 8px; }
.tb-profile-combined .tb-stats-icons {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  padding: 4px 0 14px; margin: 0 0 8px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-primary);
}
.tb-profile-combined .oq-grid { padding: 0; margin: 0; }
.tb-stat-ico {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  text-decoration: none; color: var(--c-primary); position: relative;
  min-width: 0;
}
.tb-stats-icons,
.tb-stat-ico,
.tb-si-ico { color: inherit; }
.tb-si-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent; color: inherit;
  display: grid; place-items: center;
}
.tb-si-ico svg { width: 22px; height: 22px; color: var(--c-primary); }
/* 库存icon：仅 icon 容器为橙色圆角正方形 + 白色反白icon；标签「库存」置于 icon 下方, 与同排足迹/收藏/关注/发现等高对齐 */
.tb-stat-ico.inv-dynamic {
  background: transparent;
  color: var(--c-primary);
  justify-content: flex-start;
  gap: 4px;
  margin: 0 auto;
  animation: none;
}
.tb-stat-ico.inv-dynamic .tb-si-ico {
  width: 34px; height: 34px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 10px;
  box-shadow: none;
  animation: none;
}
.tb-stat-ico.inv-dynamic .tb-si-ico svg { width: 22px; height: 22px; color: #fff; }
.tb-stat-ico.inv-dynamic .tb-si-row { color: var(--c-ink-2); font-size: 12px; font-weight: 500; }
.tb-stat-ico.inv-dynamic::before,
.tb-stat-ico.inv-dynamic .tb-si-ico::after,
.tb-stat-ico.inv-dynamic::after { display: none; }
/* 上排文字标签：与下排 1:1 单元格对齐 */
.tb-si-row {
  font-size: 12px; font-weight: 500; color: var(--c-ink-2);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  width: 100%; text-align: center;
}
.tb-si-row b { font-size: 13px; font-weight: 700; color: var(--c-primary); }
/* 订单物流播报（更矮更紧凑） */
.tb-order-broadcast {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 4px 0; padding: 8px 10px;
  min-height: 48px;
  background: var(--c-surface-2); border-radius: var(--r-md);
  text-decoration: none; color: inherit;
}
.tb-order-broadcast .cover { width: 36px; height: 36px; border-radius: 8px; position: relative; overflow: hidden; }
.tb-order-broadcast .cover img { width: 100%; height: 100%; object-fit: cover; }
.tb-ob-body { flex: 1; min-width: 0; }
.tb-ob-title { font-size: 13px; font-weight: 600; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-ob-status { color: var(--c-primary); margin-right: 4px; font-size: 13px; }
.tb-ob-sub { font-size: 11px; color: var(--c-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-ob-arrow { flex-shrink: 0; color: var(--c-ink-3); }
/* 物流滚动播报（横向 marquee, 超出容器时启动） */
.tb-ob-marquee {
  position: relative; overflow: hidden;
  font-size: 12px; color: var(--c-ink-2); margin-top: 2px;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 32px), transparent 100%);
}
.tb-ob-marquee:not(.scrolling) .tb-ob-track {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-ob-track { display: inline-flex; gap: 24px; white-space: nowrap; }
.tb-ob-marquee.scrolling .tb-ob-track {
  animation: tbObMarquee 14s linear infinite;
  padding-left: 100%;
}
.tb-ob-text { white-space: nowrap; }
@keyframes tbObMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* 设置弹窗 */
.tb-settings-group { margin-bottom: 16px; }
.tb-settings-title {
  font-size: 12px; font-weight: 700; color: var(--c-ink-3);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 6px; padding: 0 4px;
}
.tb-settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--c-surface-2);
  cursor: pointer; text-decoration: none; color: var(--c-ink);
}
.tb-settings-row:last-child { border-bottom: none; }
.tb-settings-row svg { color: var(--c-ink-3); flex-shrink: 0; }
.tb-sr-left { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.tb-sr-tail { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; min-width: 0; }
.tb-sr-right { font-size: 14px; color: var(--c-ink-3); white-space: nowrap; }
.tb-role-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-role-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: var(--r-pill);
  background: var(--c-surface-2); color: var(--c-ink);
  border: 1px solid transparent; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.tb-role-chip.active { background: var(--c-primary); color: #fff; }
.tb-role-chip:disabled { opacity: .6; cursor: default; }
/* 桌面端个人中心 header 不要太艳 */
@media (min-width: 761px) {
  .tb-profile-header { max-width: 640px; }
}

/* ============ 项目协作(产能协作) ============ */
.proj-page, .proj-detail, .proj-new, .proj-center, .admin-projects { max-width: 1080px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proj-card { display: block; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 16px; text-decoration: none; color: var(--c-ink); transition: box-shadow .18s ease, transform .12s ease; }
.proj-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.proj-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.proj-card-head h3 { font-size: 16px; margin: 4px 0 0; }
.proj-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--c-primary); background: var(--c-primary-soft); padding: 2px 8px; border-radius: var(--r-pill); }
.proj-card-sub { font-size: 12.5px; color: var(--c-ink-3); margin: 8px 0 12px; }
.proj-card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-ink-3); margin-top: 12px; }
.proj-metrics { display: grid; gap: 8px; }
.metric-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-ink-2); margin-bottom: 4px; }
.metric-top b { color: var(--c-ink); }
.metric-bar { height: 6px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.metric-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary), #3B5BA8); transition: width .3s ease; }
.proj-overview { margin: 14px 0; }
.proj-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ms-row, .dem-row, .pay-row { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.ms-row:last-child, .dem-row:last-child, .pay-row:last-child { border-bottom: none; }
.ms-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 6px; }
.ms-badge { font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); }
.ms-done { background: #e6f6ec; color: #1f9254; }
.ms-doing { background: #fff3e0; color: #d9821a; }
.ms-todo { background: var(--c-surface-2); color: var(--c-ink-3); }
.dem-row, .pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dem-info { display: flex; flex-direction: column; gap: 2px; }
.dem-info b { font-size: 13.5px; }
.proj-review-note { background: var(--c-surface-2); border-radius: var(--r-md); padding: 10px 14px; margin: 12px 0; font-size: 13px; }
.pn-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
/* 发起项目表单: 药丸形统一风格 */
.pn-form .input { border-radius: var(--r-pill); }
.pn-form textarea.input { border-radius: var(--r-lg); }
.pn-add { border-radius: var(--r-pill); }
/* 付款时间轴 */
.pn-timeline { position: relative; padding-left: 18px; margin: 4px 0 4px; }
.pn-timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--c-line-2); }
.pn-tl-item { position: relative; margin-bottom: 12px; }
.pn-tl-item:last-child { margin-bottom: 0; }
.pn-tl-dot { position: absolute; left: -18px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.pn-tl-body { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 10px; }
.pn-tl-grid { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pn-tl-grid .input { flex: 1 1 auto; min-width: 0; }
.pn-tl-del { margin-top: 8px; }
/* 附件上传 */
.pn-upload { border: 1px dashed var(--c-line-2); border-radius: var(--r-lg); padding: 14px; background: var(--c-surface-2); }
.pn-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--c-primary); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.pn-upload-btn:hover { background: var(--c-primary-press); }
.pn-filelist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pn-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-pill); font-size: 12.5px; color: var(--c-ink-2); width: fit-content; max-width: 100%; }
.pn-file svg { color: var(--c-primary); flex-shrink: 0; }
/* 供应申请(填报单)审批卡片 */
.dem-apps { margin: 8px 0 2px; display: flex; flex-direction: column; gap: 8px; }
.dem-app { background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 10px 12px; }
.dem-app-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.dem-app-info b { font-size: 13.5px; }
.dem-app-info .text-muted { font-size: 12.5px; }
/* 管理员首页: 功能列表(聚合各后台入口) */
.admin-home-cards { display: flex; flex-direction: column; gap: 16px; }
.func-card { padding: 14px 14px 6px; }
.func-card-title { font-size: 13px; font-weight: 700; color: var(--c-ink-3); margin-bottom: 10px; }
.func-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.func-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--c-line); box-shadow: var(--sh-xs); text-decoration: none; color: var(--c-ink); transition: background .15s ease, transform .1s ease, box-shadow .15s ease; }
.func-item:hover { background: var(--c-primary-soft); box-shadow: var(--sh-sm); }
.func-item:active { transform: scale(.97); }
.func-ico { width: 38px; height: 38px; border-radius: var(--r-pill); display: grid; place-items: center; background: #fff; color: var(--c-primary); box-shadow: var(--sh-xs); }
.func-label { font-size: 12.5px; font-weight: 600; text-align: center; }
.func-item .mt-badge { position: absolute; top: 6px; right: 8px; }
@media (max-width: 380px) { .func-grid { grid-template-columns: repeat(2, 1fr); } }
/* 客诉与服务：商家/消费者/合伙人服务台 */
.service-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.service-stat { text-align: center; padding: 14px 8px; }
.service-stat .ss-val { font-size: 22px; font-weight: 800; line-height: 1.2; }
.service-stat .ss-lbl { font-size: 12px; color: var(--c-ink-3); margin-top: 4px; }
.proj-center-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.pc-h { font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.pc-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; color: var(--c-ink); }
.pc-item:last-child { border-bottom: none; }
.pc-item span { font-size: 13.5px; }

/* 移动端中心 + 悬浮按钮(略高于磨砂玻璃导航栏) */
.m-fab-wrap { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 57; display: flex; flex-direction: column; align-items: center; }
.m-fab { width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: var(--c-primary); color: #fff;
  box-shadow: 0 8px 22px rgba(27, 49, 96, .40);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1); }
.m-fab svg { transition: transform .3s ease; }
.m-fab-wrap.open .m-fab { transform: rotate(135deg); }
.m-fab-wrap.open .m-fab svg { transform: rotate(0deg); }
.m-fab-menu { display: flex; flex-direction: row; gap: 12px; margin-bottom: 14px; opacity: 0; transform: translateY(10px) scale(.96); pointer-events: none;
  transition: opacity .26s ease, transform .26s cubic-bezier(.22, .61, .36, 1); }
.m-fab-wrap.open .m-fab-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.m-fab-item { display: flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--c-ink); background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(17,17,26,.16);
  opacity: 0; transform: translateY(8px);
  transition: opacity .26s ease, transform .26s cubic-bezier(.22, .61, .36, 1); }
.m-fab-item svg { color: var(--c-primary); flex-shrink: 0; }
.m-fab-wrap.open .m-fab-item { opacity: 1; transform: translateY(0); }
.m-fab-wrap.open .m-fab-item.right { transition-delay: .05s; }

/* 消费者导航栏正中嵌入的 + 按钮(略小于大药丸 46px → 42px) + 上弹二级菜单 */
.m-plus-slot { position: relative; display: flex; flex-direction: column; align-items: center; flex: 0 0 56px; min-width: 0; margin: 0 16px; }
.m-fab-inbar {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, #3B5BA8, var(--c-primary)); color: #fff;
  box-shadow: 0 8px 20px rgba(27, 49, 96, .40), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
.m-fab-inbar svg { transition: transform .3s ease; }
.m-plus-slot.open .m-fab-inbar { transform: rotate(135deg); }
.m-plus-slot.open .m-fab-inbar svg { transform: rotate(0deg); }
.m-plus-slot .m-fab-menu {
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  margin-bottom: 0; transform: translateX(-50%) translateY(8px) scale(.96);
  display: flex; flex-direction: row; gap: 12px; opacity: 0; pointer-events: none;
  transition: opacity .26s ease, transform .26s cubic-bezier(.22, .61, .36, 1);
}
.m-plus-slot.open .m-fab-menu { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
.m-plus-slot.open .m-fab-item { opacity: 1; transform: translateY(0); }
.m-plus-slot.open .m-fab-item.right { transition-delay: .05s; }

/* 桌面端: 项目网格稍宽, 隐藏移动端 FAB */
@media (min-width: 761px) {
  .m-fab-wrap { display: none; }
  .proj-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* ===================================================================
   动效增强 v85: 滑动药丸(橙色) + 进度条入场 + 卡片入场 + 导航色条
   覆盖双端所有按钮切换(移动端底栏/首页分类/桌面分段)与图表展示
   =================================================================== */

/* 容器需成为药丸的定位上下文(底栏为 fixed 已自带, 此处仅补 grid/segment) */
.m-cat-grid { position: relative; }
.segment { position: relative; }

/* 三种滑动药丸: 绝对定位, 由 JS 设置 left/width, transition 产生滑动 */
.m-tab-pill, .m-cat-pill, .seg-pill {
  position: absolute; top: 0; height: 100%; border-radius: 999px;
  pointer-events: none; z-index: 0;
  transition: left .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1);
}
/* 移动端底栏药丸(不透明深蓝，与搜索按钮/FAB 统一) */
.m-tab-pill {
  top: 50%; transform: translateY(-50%); height: 46px;
  background: var(--c-primary);
  box-shadow: 0 4px 14px rgba(27, 49, 96, .30);
}
/* 首页大分类药丸(不透明深蓝) */
.m-cat-pill {
  top: 4px; height: 32px;
  background: var(--c-primary);
}
/* 桌面分段控件药丸(白底玻璃, 与 .seg.active 视觉一致) */
.seg-pill { top: 4px; bottom: 4px; background: rgba(255, 255, 255, .72); box-shadow: var(--sh-xs); }

/* has-pill: 隐藏静态高亮, 改由滑动药丸承担; 标签内容置于药丸之上 */
.m-tabbar.has-pill .m-tab.active {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
}
.m-cat-grid.has-pill .m-cat.active::before { background: transparent; }
.segment.has-pill .seg.active { background: transparent; box-shadow: none; }
.m-tab, .m-cat, .seg { position: relative; z-index: 1; }

/* 通用按钮按下反馈(触觉感), 覆盖尚未定义的元素 */
.seg-mini-btn:active, .vt-btn:active, .cat-chip:active, .ch-seg-btn:active { transform: scale(.96); }

/* ---------- 图表/进度条入场动画 ---------- */
@keyframes barFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.metric-bar > i, .bar > span {
  transform-origin: left center;
  animation: barFill .7s cubic-bezier(.16, 1, .3, 1) both;
}
/* 进度条数字轻微跳动强调 */
@keyframes numPop { 0% { transform: scale(.8); opacity: .4; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.metric-top b { display: inline-block; animation: numPop .7s cubic-bezier(.16, 1, .3, 1) both; }

/* ---------- 卡片/行入场(轻微上浮) ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.proj-card, .pc-item, .proj-cols > .card, .ms-row, .dem-row, .pay-row, .pn-row {
  animation: riseIn .42s ease both;
}
/* 卡片悬浮时轻微上浮 + 阴影(已有 hover, 此处统一增强) */
.proj-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }

/* ---------- 桌面左侧导航: 激活项左侧色条生长 ---------- */
.nav-item.active { position: relative; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px;
  background: var(--c-primary); transform-origin: center;
  animation: navAccent .35s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes navAccent { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* FAB 菜单项入场已由 .m-fab-item 的 transition 承担, 不再单独使用 riseIn 动画 */

/* =========================================================
   蒙版星空机制（v273，可复用）
   —— 任意元素加 class="star-mask"，即在其区域显示「屏幕上固定」的星星。
   星星铺满整块视口(position:fixed 固定不动)，JS 用 clip-path 把 .star-layer
   裁切到该元素区域；元素像蒙版一样透出屏幕固定星空（滚动时星星绝对位置不变）。
   ========================================================= */
.star-mask {
  position: relative;
  z-index: 1;                                   /* 高于其内 .star-layer(z:0)，文字压在星空上 */
  -webkit-backdrop-filter: none; backdrop-filter: none;  /* 关键：避免成为 fixed 子层的包含块 */
  background: transparent;                      /* 暗色宇宙底由 .star-layer 提供 */
}
.star-layer {
  position: fixed;                              /* ★ 视口固定：滚动时星星绝对位置不变 */
  inset: 0; z-index: 0;
  pointer-events: none;
  /* 星点 A（与 B 层不同频率错相 → 闪烁）—— 列在前面=绘制在上层；深空蓝渐变放最后=底色 */
  background-image:
    radial-gradient(1.2px 1.2px at 10% 20%, rgba(255,255,255,.60) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 25% 65%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 45% 15%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 60% 75%, rgba(255,255,255,.38) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 75% 35%, rgba(255,255,255,.48) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 60%, rgba(255,255,255,.42) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 15% 85%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 12%, rgba(255,255,255,.46) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 38% 48%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 22%, rgba(255,255,255,.38) 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 40%, rgba(255,255,255,.32) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 72% 25%, rgba(255,255,255,.40) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 82% 70%, rgba(255,255,255,.30) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 62% 80%, rgba(255,255,255,.26) 50%, transparent 51%),
    /* 最底层：深空蓝渐变（作为底色，星星绘制在其上） */
    radial-gradient(120% 100% at 30% 40%, rgba(20,28,58,.96) 0%, rgba(8,12,28,.98) 60%, #060810 100%);
  animation: dhTwinkleA 4.2s ease-in-out infinite;
  will-change: clip-path, opacity;
}
.star-layer.tw2 {
  background-image:
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,.40) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 18% 85%, rgba(255,255,255,.32) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 30%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 50% 65%, rgba(255,255,255,.36) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 66% 18%, rgba(255,255,255,.30) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 80% 48%, rgba(255,255,255,.34) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,.26) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 92%, rgba(255,255,255,.30) 50%, transparent 51%);
  animation: dhTwinkleB 2.7s ease-in-out infinite .6s;
}
@keyframes dhTwinkleA { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes dhTwinkleB { 0%, 100% { opacity: .85; } 50% { opacity: .15; } }

/* =========================================================
   发现页 Hero 卡片 —— 深蓝底 + 星空蒙版（::before 星点 + ::after 地球辉光）
   ========================================================= */
.discover-hero {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  /* 深空蓝底色 */
  background: radial-gradient(120% 100% at 30% 40%, rgba(20, 28, 58, .96) 0%, rgba(8, 12, 28, .98) 60%, #060810 100%);
  animation: dhEnter .7s cubic-bezier(.16, 1, .3, 1) both;
}
/* ★ 星空层：body 级 #global-star-screen（<canvas>，position:fixed + 最高 z-index:99999）。
   ★v273r：星星由 JS 在 canvas 内绘制，并 ctx.clip() 裁切到各蒙版元素的视口矩形 →
   仅蒙版位置露出星星，非蒙版区绝对无星星（不再依赖 CSS clip-path，兼容性最稳）。 */
#global-star-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}
/* ★ 圆形像素地球 —— 右侧稍左移 */
.discover-hero .dh-earth {
  position: absolute;
  width: 120px; height: 120px;
  right: 46px; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  box-shadow: none;
  clip-path: circle(60px at center);
}
/* ★ 圆形地球辉光已移除（v273k）：用户要求地球圆形蒙版不加内外发光/阴影。
   保留 .dh-earth{box-shadow:none}（见上），::after 辉光层一并删除。 */
@keyframes dhEnter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.discover-hero .dh-content {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  flex-wrap: wrap; padding: 18px 20px;
}
.discover-hero .dh-text { display: flex; flex-direction: column; gap: 6px; }
.discover-hero .dh-title {
  margin: 0; font-size: 23px; font-weight: 800; line-height: 1.24; letter-spacing: -.01em;
  color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 1px 14px rgba(140, 160, 220, .40), 0 0 30px rgba(100, 130, 200, .18);
}
.discover-hero .dh-sub {
  margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.88);
  display: inline-flex; align-items: center; gap: 6px;
}
/* 左上角圆角弧心: 脉冲指示点 */
.discover-hero .dh-pulse {
  position: absolute; top: 16px; left: 16px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22);
  animation: dhPulse 1.8s ease-in-out infinite; z-index: 3;
}
@keyframes dhPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,.22); transform: scale(1); } 50% { box-shadow: 0 0 0 8px rgba(255,255,255,.08); transform: scale(1.15); } }

/* 浮动装饰球 —— v270 已被圆形像素地球取代，隐藏 */
.dh-orbs { display: none; }

/* 产能资源 hero 窄屏适配: 搜索与城市选择上下堆叠, 左对齐 */
@media (max-width: 560px) {
  .hotel-filter-bar { flex-wrap: wrap; min-width: auto; }
  .hotel-search { max-width: none; min-width: auto; width: 100%; }
  .city-btn { width: 100%; justify-content: center; }
}

/* 移动端适配 */
@media (max-width: 760px) {
  .discover-hero { min-height: 110px; }
  .discover-hero .dh-content { padding: 14px 16px; }
  .discover-hero .dh-title { font-size: 19px; }
  .discover-hero .dh-earth {
    width: 90px; height: 90px;
    right: 30px;
    clip-path: circle(45px at center);
    box-shadow: none;
  }
}

/* ---------- 无障碍: 尊重系统减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .m-tab-pill, .m-cat-pill, .seg-pill,
  .metric-bar > i, .bar > span, .metric-top b,
  .proj-card, .pc-item, .proj-cols > .card, .ms-row, .dem-row, .pay-row, .pn-row,
  .nav-item.active::before, .m-fab-wrap.open .m-fab-item,
  .discover-hero, .discover-hero::before, .discover-hero::after, .dh-orb, .discover-hero .dh-sub::before {
    animation: none !important; transition: none !important;
  }
}

/* ============ 商家主页(完整页) ============ */
.merchant-page { padding-bottom: 24px; }
.merchant-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; margin: 8px 0 4px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-xl); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.merchant-hero .avatar.lg { width: 56px; height: 56px; font-size: 22px; font-weight: 700; }
.merchant-hero-info { flex: 1; min-width: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }

/* ============ 商家详情页(淘宝风: 头图 + 首页/宝贝/分类/项目/客服 5 子导航) ============ */
.mshop-page { padding-bottom: 84px; background: var(--c-surface); }
/* 商家信息区: 去掉表头底色, 使用页面底色; 内容下移避让顶部浮动操作栏 */
.mshop-cover {
  position: relative; padding: 14px 14px 12px; color: var(--c-ink); overflow: hidden;
  background: var(--c-surface);
}
.mshop-shop-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.mshop-shop-row .avatar.xl {
  width: 52px; height: 52px; font-size: 21px; font-weight: 800; color: var(--c-primary);
  border: 2px solid rgba(27,49,96,.25); box-shadow: 0 4px 12px rgba(0,0,0,.10); background: #fff;
}
.mshop-shop-row .avatar.xl.with-img { color: transparent; background: #fff; }
.mshop-shop-meta { flex: 1; min-width: 0; }
.mshop-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; color: var(--c-ink); }
.mshop-name svg { color: var(--c-primary); opacity: .95; }
.mshop-tags { font-size: 12px; color: var(--c-ink-3); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.mshop-follow {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--r-pill); border: 1px solid var(--c-primary);
  font-weight: 700; font-size: 13px; cursor: pointer; background: #fff; color: var(--c-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .12s ease;
}
.mshop-follow:active { transform: scale(.96); }
.mshop-follow.following { background: var(--c-primary-soft); color: var(--c-primary); border-color: transparent; }
/* 商家店铺菜单移到底端: 固定在屏幕底部, 替代原吸顶 tab */
.mshop-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 0; padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--c-surface); border-top: 1px solid var(--c-line);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.mshop-tab {
  flex: 1 0 auto; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; border-radius: var(--r-lg); text-decoration: none; color: var(--c-ink-2);
  font-size: 12px; font-weight: 600; transition: all .15s ease;
}
.mshop-tab svg { opacity: .8; }
.mshop-tab.active { color: var(--c-primary); background: var(--c-primary-soft); }
.mshop-tab.active svg { opacity: 1; }
.mshop-body { padding: 14px 12px 0; }
.mshop-sec-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--c-ink); margin: 4px 2px 12px; }
.mshop-sec-count { font-size: 12px; font-weight: 600; color: var(--c-muted); }
/* 店铺简介去卡片底色, 改为纯文本区块(参考淘宝网页风格) */
.mshop-intro { padding: 12px 2px; background: transparent; border: none; box-shadow: none; }
.mshop-intro-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-ink); margin-bottom: 8px; }
.mshop-intro-text { font-size: 13px; color: var(--c-ink-2); line-height: 1.6; }
.mshop-intro-contact { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--c-muted); }
.mshop-svc { padding: 16px; }
.mshop-svc-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--c-ink); margin-bottom: 12px; }
.mshop-svc-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; font-size: 14px; color: var(--c-ink-2); border-bottom: 1px solid var(--c-line); }
.mshop-svc-row:last-of-type { border-bottom: none; }
.mshop-svc .btn-block { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ============ 消息中心(参考淘宝) ============ */
.msg-page-top {
  position: relative;
  margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
  padding: env(safe-area-inset-top) var(--sp-4) var(--sp-4);
  background: var(--c-bg);
  color: var(--c-ink);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  overflow: hidden;
}
.msg-page-top::before { content: none; }
.msg-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px; background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  position: relative; z-index: 2;
  border-bottom: none;
}
.msg-page-title { font-size: 17px; font-weight: 800; color: var(--c-ink); display: flex; align-items: center; gap: 6px; }
.msg-page-title .msg-count { font-size: 13px; font-weight: 600; color: var(--c-ink-3); }
.msg-head-actions { display: flex; align-items: center; gap: 4px; }
.msg-head-btn {
  font-size: 13px; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 6px 10px; cursor: pointer;
}
.msg-head-btn:active { background: var(--c-surface-2); }
.msg-head-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-pill); color: var(--c-ink); border: 1px solid var(--c-line); background: var(--c-surface); cursor: pointer;
  transition: background .15s ease;
}
.msg-head-plus:active { background: var(--c-surface-2); }
.msg-plus-wrap { position: relative; }
.msg-plus-menu {
  position: absolute; top: 100%; right: 0; margin-top: 8px; z-index: 30;
  display: flex; flex-direction: column; gap: 2px; min-width: 132px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.msg-plus-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.msg-plus-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-md);
  text-decoration: none; color: var(--c-ink); font-size: 14px; font-weight: 600;
}
.msg-plus-item svg { color: var(--c-primary); flex-shrink: 0; }
.msg-plus-item:active { background: var(--c-surface-2); }
.msg-page { padding: 12px 0 24px; }
.msg-service-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px;
}
.msg-service-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: rgba(255,255,255,.95); border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,.45);
  text-decoration: none; color: var(--c-ink); box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.msg-service-card .msg-service-title { color: var(--c-ink); }
.msg-service-card .msg-service-sub { color: var(--c-ink-3); }
.msg-service-card:active { transform: scale(.98); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.msg-service-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
}
.msg-service-body { flex: 1; min-width: 0; }
.msg-service-title { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.msg-service-sub { font-size: 12px; color: var(--c-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-section-title {
  padding: 14px 4px 6px; font-size: 14px; font-weight: 700; color: var(--c-ink);
}
.msg-list { background: var(--glass-bg); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--glass-shadow); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.msg-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--c-line); transition: background .12s ease; }
.msg-row:last-child { border-bottom: none; }
.msg-row:active { background: var(--c-surface-2); }
.msg-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 18px; font-weight: 700; color: #fff;
  position: relative; overflow: hidden;
}
.msg-avatar.with-img { background: var(--c-surface-2); }
.msg-avatar.with-img::before {
  content: ''; position: absolute; inset: 0; background-image: var(--cover-img); background-size: cover; background-position: center;
}
.msg-avatar.with-img span { position: relative; z-index: 1; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.msg-name { font-size: 15px; font-weight: 600; color: var(--c-ink); }
.msg-time { font-size: 12px; color: var(--c-muted); flex-shrink: 0; }
.msg-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msg-text { font-size: 13px; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.msg-unread-badge {
  flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--c-primary); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.msg-muted-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--c-muted);
}

/* ============ 商品管理页表格: 窄屏横排(避免中文被挤压竖排) ============ */
.mp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp-table { min-width: 720px; }
.mp-table td:first-child, .mp-table th:first-child { white-space: nowrap; }

/* ============ 购物车支付方式选择 ============ */
.tb-ci-pay { display: flex; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; }
.tb-ci-pay-label { font-size: 12px; color: var(--c-ink-3); }
.tb-pay-pill {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink-2);
  cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.tb-pay-pill.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.tb-pay-pill:active { transform: scale(.96); }
.cash-amt { color: var(--c-ink); font-weight: 800; font-size: 15px; }

/* ============ 结算页(参考淘宝) ============ */
/* ============ 全站统一返回键 ============
   规则: 全站只有一种返回键外观(38px 圆形磨砂), 只出现在左上角。
   桌面端随内容流排在主区左上; 移动端固定在安全区下 8px / 左 12px。 */
.pg-back {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .82); color: var(--c-ink);
  border: 1px solid var(--c-line); box-shadow: var(--sh-sm);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin: 0 0 14px; transition: background .15s ease;
}
.pg-back:hover { background: #fff; }
.pg-back:active { background: var(--c-surface-2); }

.co-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.co-back {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .82); color: var(--c-ink); cursor: pointer;
  border: 1px solid var(--c-line); box-shadow: var(--sh-sm);
  display: grid; place-items: center;
}
.co-back:active { background: var(--c-surface-2); }
.co-title { flex: 1; }
.co-title > div:first-child { font-size: 18px; font-weight: 800; color: var(--c-ink); }
.co-sub {
  font-size: 12px; color: var(--c-primary); margin-top: 2px;
  display: inline-flex; align-items: center; gap: 4px;
}
.checkout-page { padding-bottom: 100px; max-width: 1000px; margin: 0 auto; }
.co-addr-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-surface); border-radius: var(--r-lg);
  padding: 14px 16px; margin-bottom: 14px;
  text-decoration: none; color: inherit; box-shadow: var(--sh-xs);
}
.co-addr-card svg { color: var(--c-primary); flex-shrink: 0; }
.co-addr-body { flex: 1; min-width: 0; }
.co-addr-top { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.co-addr-top b { font-weight: 700; color: var(--c-ink); }
.co-addr-text { font-size: 13px; color: var(--c-ink-3); margin-top: 3px; }
.co-store-card {
  background: var(--c-surface); border-radius: var(--r-lg);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--sh-xs);
}
.co-store-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--c-ink); margin-bottom: 12px;
}
.co-item {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line);
}
.co-item:last-child { border-bottom: none; }
.co-item .cover { width: 72px; height: 72px; border-radius: 10px; flex-shrink: 0; }
.co-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.co-item-title { font-size: 14px; font-weight: 600; color: var(--c-ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-item-spec { font-size: 12px; color: var(--c-ink-4); }
.co-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.co-store-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px solid var(--c-line);
  font-size: 13px; color: var(--c-ink-2);
}
.co-remark {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-surface); border-radius: var(--r-lg);
  padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--sh-xs);
}
.co-remark span { font-size: 14px; font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.co-remark input {
  flex: 1; min-width: 0; border: none; background: transparent;
  font-size: 13px; color: var(--c-ink-2); outline: none;
}
.co-price-detail {
  background: var(--c-surface); border-radius: var(--r-lg);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--sh-xs);
}
.co-pd-title { font-size: 15px; font-weight: 800; color: var(--c-ink); margin-bottom: 12px; }
.co-pd-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--c-ink-2); padding: 6px 0;
}
.co-pd-row.total { border-top: 1px solid var(--c-line); margin-top: 8px; padding-top: 12px; }
.co-pd-row.total span:first-child { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.co-pd-row .cash-amt { color: var(--c-primary); }
.co-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--c-surface); border-top: 1px solid var(--c-line);
}
.co-total { font-size: 14px; color: var(--c-ink-2); }
.co-total .cash-amt { font-size: 20px; color: var(--c-primary); }
.co-submit { padding: 11px 28px; font-size: 15px; }
.voucher-checkout .co-grid { align-items: start; }
.voucher-checkout .co-left { min-width: 0; }
.voucher-checkout .co-right { position: sticky; top: 84px; }

/* ============ 响应式: 结算页窄屏单列 ============ */
@media (max-width: 760px) {
  .voucher-checkout .co-grid { grid-template-columns: 1fr !important; }
  .voucher-checkout .co-right { position: static; }
  .co-bottom-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .co-submit { padding: 10px 22px; }
}

/* ============ 聊天室 ============ */
.chat-page { padding-bottom: 72px; }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 10;
  padding: 10px 14px; background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.chat-back {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-surface); color: var(--c-ink); cursor: pointer;
  border: 1px solid var(--c-line); box-shadow: var(--sh-sm);
  display: grid; place-items: center;
}
.chat-back:active { background: var(--c-line); }
.chat-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 18px; font-weight: 700; color: #fff;
  position: relative; overflow: hidden; text-decoration: none;
  cursor: pointer; transition: transform .15s ease;
}
.chat-avatar:hover { transform: scale(1.04); }
.chat-avatar:active { transform: scale(.96); }
.chat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chat-title { flex: 1; min-width: 0; }
.chat-title > div { font-size: 16px; font-weight: 700; color: var(--c-ink); line-height: 1.3; }
.chat-title > span { font-size: 12px; color: var(--c-muted); }
.chat-body {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
}
.chat-bubble-wrap { display: flex; flex-direction: column; gap: 2px; max-width: 78%; }
.chat-bubble-wrap.them { align-self: flex-start; }
.chat-bubble-wrap.me { align-self: flex-end; }
.chat-bubble {
  padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45;
  word-break: break-word; box-shadow: var(--sh-xs);
}
.chat-bubble-wrap.them .chat-bubble {
  background: var(--c-surface-2); color: var(--c-ink); border-bottom-left-radius: 4px;
}
.chat-bubble-wrap.me .chat-bubble {
  background: var(--c-primary); color: #fff; border-bottom-right-radius: 4px;
}
.chat-time { font-size: 11px; color: var(--c-muted); }
.chat-bubble-wrap.me .chat-time { text-align: right; }
.chat-input-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--c-surface); border-top: 1px solid var(--c-line);
}
.chat-input {
  flex: 1; min-width: 0; height: 40px; border-radius: 999px;
  border: 1px solid var(--c-line); background: var(--c-surface-2);
  padding: 0 16px; font-size: 14px; color: var(--c-ink); outline: none;
}
.chat-input:focus { border-color: var(--c-primary); background: #fff; }
.chat-send {
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; flex-shrink: 0;
}
/* 设置页开关（隐私设置等） */
.tb-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.tb-switch input { opacity: 0; width: 0; height: 0; }
.tb-switch-slider { position: absolute; inset: 0; background: var(--c-line); border-radius: 999px; transition: .2s; cursor: pointer; }
.tb-switch-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.tb-switch input:checked + .tb-switch-slider { background: var(--c-primary); }
.tb-switch input:checked + .tb-switch-slider::before { transform: translateX(18px); }
/* 字体大小全局缩放 */
:root.fs-sm { font-size: 14px; }
:root.fs-lg { font-size: 17px; }
:root.fs-xl { font-size: 19px; }

/* ============ 商家收益资金页 (#244) ============ */
/* 6 指标矩阵：收入/支出/待结算/已结算/待退款/已退款 */
.cash-matrix-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: -8px;
}
.cm-cell { padding: 14px 16px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.cm-cell:nth-child(3n) { border-right: none; }
.cm-cell:nth-last-child(-n+3) { border-bottom: none; }
.cm-label { font-size: 12px; color: var(--c-ink-3); margin-bottom: 6px; font-weight: 600; }
.cm-val { font-size: 22px; font-weight: 800; color: var(--c-ink); letter-spacing: -.5px; }
.cm-cell.in .cm-val { color: var(--c-primary); }
.cm-cell.out .cm-val { color: #D2232A; }
.cm-cell.pending .cm-val { color: #B45309; }
.cm-cell.settled .cm-val { color: var(--c-success, #15803D); }
.cm-cell.refunding .cm-val { color: #B45309; }
.cm-cell.refunded .cm-val { color: var(--c-ink-3); }
.cm-sub { margin-top: 4px; }
/* 现金流柱状/曲线图 */
.cash-flow-svg { width: 100%; height: 220px; display: block; }
/* 项目卡（商家经营页） */
.mp-card { background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 100%); }
.mp-block { padding: 0; }
.mp-label { font-size: 13px; font-weight: 700; color: var(--c-ink); margin-bottom: 8px; }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.mp-item { display: block; padding: 10px 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; text-decoration: none; color: inherit; transition: background .15s ease; }
.mp-item:hover { background: var(--c-surface-2); }
.mp-ttl { font-size: 13px; font-weight: 600; color: var(--c-ink); margin-bottom: 2px; }
/* 卖家订单管理 9 状态筛选 */
.seller-order-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.so-tab {
  padding: 6px 12px; border-radius: 999px; background: var(--c-surface-2);
  border: 1px solid var(--c-line); color: var(--c-ink-2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.so-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.so-tab-c { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.25); font-size: 10px; }
.so-tab:not(.active) .so-tab-c { background: var(--c-primary); color: #fff; }
/* 响应式：现金矩阵 + 项目卡 移动端 */
@media (max-width: 720px) {
  .cash-matrix-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-cell:nth-child(3n) { border-right: 1px solid var(--c-line); }
  .cm-cell:nth-child(2n) { border-right: none; }
  .cm-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--c-line); }
  .cm-cell:nth-last-child(-n+2) { border-bottom: none; }
  .cm-val { font-size: 18px; }
}


/* ── 动态等高线背景 (cosmic contour field) ── */
#bg-contour {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -4;
  pointer-events: none;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse 120% 100% at 50% 40%, #000 20%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.25) 100%);
          mask-image: radial-gradient(ellipse 120% 100% at 50% 40%, #000 20%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.25) 100%);
}
@media (max-width: 820px) {
  #bg-contour { opacity: 0.6; }
}
