/* =====================================================================
   百业联盟系统 · 移动端设计系统 v6
   设计语言：清透蓝 + 大圆角卡片 + 轻描边层次，适配微信内置浏览器
   结构：1 基础变量 2 布局骨架 3 顶部导航 4 通用组件 5 表单
        6 数据展示 7 业务组件 8 页面组件 9 响应式与动效
   ===================================================================== */

/* ========== 1. 设计变量 ========== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-2: #60a5fa;
  --primary-soft: #eef4ff;
  --primary-soft-2: #e0ebff;

  --gold: #f59e0b;
  --gold-soft: #fff7e8;
  --green: #10b981;
  --green-soft: #e9f9f2;
  --red: #ef4444;
  --red-soft: #fef0ef;

  --bg: #f4f7fc;
  --card: #ffffff;
  --text: #0f1b2d;
  --text2: #4b5b73;
  --text3: #8b98ad;
  --line: #e8eef8;
  --line-soft: #f1f5fb;

  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(16, 40, 80, .04), 0 8px 24px -12px rgba(16, 40, 80, .12);
  --shadow-float: 0 10px 30px -10px rgba(15, 45, 100, .28);

  --app-w: 760px;
  --app-pad: 16px;

  /* 兼容旧页面里用到的变量名 */
  --blue: #2563eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 380px at 50% -140px, #dbeafe 0%, rgba(219, 234, 254, 0) 70%),
    linear-gradient(180deg, #eef4ff 0, #f4f7fc 380px, #f6f8fc 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
::selection { background: var(--primary-soft-2); }

/* ========== 2. 布局骨架 ========== */
.app { position: relative; max-width: var(--app-w); margin: 0 auto; min-height: 100vh; padding-bottom: 108px; }
.app-main { padding: 14px var(--app-pad) 20px; }

/* ========== 3. 顶部导航 ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 120;
  color: #10305e;
  background:
    radial-gradient(120% 140% at 92% -20%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(120deg, #f2f8ff 0%, #e2eeff 48%, #d3e6ff 100%);
  border-bottom: 1px solid rgba(191, 216, 248, .75);
  box-shadow: 0 6px 20px -14px rgba(16, 60, 130, .45);
  backdrop-filter: saturate(140%) blur(10px);
}
.hd-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: var(--app-w); margin: 0 auto; padding: 11px var(--app-pad) 9px;
}
.hd-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.hd-logo {
  display: block; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 10px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(29, 78, 216, .24));
}
.hd-brand-txt { display: flex; flex-direction: column; min-width: 0; }
.hd-brand-name { font-size: 14.5px; font-weight: 800; letter-spacing: .8px; line-height: 1.2; color: #0c2f5e; }
.hd-title {
  max-width: 190px; margin-top: 1px; font-size: 11.5px; color: #5b7ba6;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hd-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hd-user { display: flex; align-items: center; gap: 7px; min-width: 0; color: inherit; }
.hd-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 1px solid #cfe1fb; color: var(--primary);
  font-size: 12px; font-weight: 700; box-shadow: 0 2px 6px -2px rgba(23, 79, 160, .25);
}
.hd-user-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hd-uname { font-size: 12.5px; font-weight: 600; color: #153c6c; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-role { font-size: 10.5px; color: #6d8cb4; }
.hd-exit {
  padding: 5px 11px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 500;
  background: #fff; border: 1px solid #cfe1fb; color: #1a5cae;
  box-shadow: 0 2px 6px -3px rgba(23, 79, 160, .3); text-decoration: none;
}
.hd-exit:active { background: #eef6ff; }

/* 主导航 */
.topnav { border-top: 1px solid rgba(196, 220, 250, .7); }
.topnav-inner {
  display: flex; align-items: center; gap: 8px;
  max-width: var(--app-w); margin: 0 auto; padding: 8px var(--app-pad) 10px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.topnav-inner::-webkit-scrollbar { display: none; }
.tn-item {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  height: 32px; padding: 0 13px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .78); border: 1px solid #d9e8fb;
  color: #2a5f9e; font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.tn-item .tn-ico { font-size: 14px; line-height: 1; }
.tn-item.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(29, 78, 216, .7);
}
.tn-item:active { transform: scale(.97); }

/* 高频操作高亮（录单）：橙色渐变，与蓝色主题形成强对比 */
.tn-item.tn-hl {
  background: linear-gradient(135deg, #ff9a3d, #f97316);
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(249, 115, 22, .75);
}
.tn-item.tn-hl.active,
.tn-item.tn-hl:active {
  background: linear-gradient(135deg, #ff8a2b, #ea580c);
  box-shadow: 0 7px 16px -6px rgba(234, 88, 12, .85);
}

/* 二级工具条 */
.subnav {
  position: relative; z-index: 90;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.subnav-inner { display: flex; align-items: center; gap: 8px; max-width: var(--app-w); margin: 0 auto; padding: 7px var(--app-pad); }
.sn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 31px; padding: 0 13px; border-radius: var(--radius-pill);
  background: #f2f7ff; border: 1px solid #dfeafb; color: #2a5f9f;
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}
.sn-btn:active { background: #e3eeff; transform: scale(.98); }
.sn-btn.home { background: linear-gradient(135deg, #3b82f6, #1d4ed8); border-color: transparent; color: #fff; }
.sn-work { margin-left: auto; background: #fff; color: var(--primary); border-color: #cfe2ff; }

/* ========== 4. 通用组件 ========== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.card-title {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 20px; margin-bottom: 12px; padding-left: 11px;
  font-size: 14.5px; font-weight: 700; color: #16243a;
}
.card-title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 3px; background: linear-gradient(180deg, #3b82f6, #93c5fd);
}
.card-title .more { font-size: 12px; font-weight: 500; color: var(--text3); text-decoration: none; white-space: nowrap; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.page-title { font-size: 18px; font-weight: 800; letter-spacing: .2px; }

.flash {
  max-width: calc(var(--app-w) - 2 * var(--app-pad));
  margin: 10px auto 0; padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px; line-height: 1.5;
  border: 1px solid transparent;
  box-shadow: 0 6px 18px -12px rgba(16, 40, 80, .4);
  animation: flashIn .22s ease-out;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash::before { display: inline-block; margin-right: 6px; font-weight: 700; }
.flash-success { background: var(--green-soft); border-color: #c8f0de; color: #0b7355; }
.flash-success::before { content: '✓'; }
.flash-warning { background: var(--gold-soft); border-color: #fee6bd; color: #9a5b06; }
.flash-warning::before { content: '!'; }
.flash-error { background: var(--red-soft); border-color: #ffd9d6; color: #b32a20; }
.flash-error::before { content: '×'; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: .2px;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .14s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .85);
}
.btn-primary:active { background: linear-gradient(135deg, #2563eb, #1b46c2); }
.btn-outline { background: #fff; border-color: #c9dffd; color: #1b57bd; }
.btn-outline:active { background: #f1f7ff; }
.btn-ghost { background: #f3f6fb; border-color: #e9eff8; color: #51617a; }
.btn-ghost:active { background: #eaeff7; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 18px -12px rgba(16, 185, 129, .9); }
.btn-danger { background: #fff1f0; border-color: #ffd6d2; color: #c43127; }
.btn-danger:active { background: #ffe6e3; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }

/* 标签 */
.row-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; line-height: 1.6; white-space: nowrap;
  border: 1px solid transparent;
}
.tag-red { background: var(--red-soft); border-color: #ffdad7; color: #b32a20; }
.tag-green { background: var(--green-soft); border-color: #cdf1e2; color: #0b7355; }
.tag-blue { background: var(--primary-soft); border-color: #d8e7ff; color: #1b57bd; }
.tag-gray { background: #f3f5f9; border-color: #e9eef6; color: #64748b; }
.tag-gold { background: var(--gold-soft); border-color: #fde8c2; color: #9a5b06; }

/* 空状态 */
.empty {
  padding: 44px 16px; text-align: center;
  font-size: 13px; color: var(--text3);
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  border: 1px dashed #e1eaf7; border-radius: var(--radius);
}
.empty::before { content: '🗂️'; display: block; margin-bottom: 8px; font-size: 26px; opacity: .75; }

/* 分段器 */
.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: #f1f6ff; border: 1px solid #e2ecfb; border-radius: var(--radius-pill);
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg a {
  flex: 0 1 auto; padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 500; color: var(--text2); text-decoration: none;
  white-space: nowrap; transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.seg a.active {
  background: #fff; color: var(--primary-dark); font-weight: 700;
  box-shadow: 0 3px 10px -5px rgba(21, 78, 170, .5);
}

/* 底部浮动导航 */
.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 110;
  display: flex; max-width: calc(var(--app-w) - 20px); margin: 0 auto; padding: 6px 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #e4ecf9; border-radius: 22px;
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(12px) saturate(150%);
}
.tb-item {
  display: flex; flex: 1; flex-direction: column; align-items: center; gap: 2px;
  margin: 0 2px; padding: 6px 0; border-radius: 16px;
  font-size: 11px; color: #8b98ad; text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.tb-item .tb-ico { font-size: 18px; line-height: 1; }
.tb-item.active {
  background: linear-gradient(180deg, #eef5ff, #e2ecff);
  color: var(--primary-dark); font-weight: 700;
}
.tb-item:active { background: #eef4ff; }

/* ========== 5. 表单 ========== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #52637c; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 13px;
  background: #fbfdff; border: 1px solid #dce7f6; border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: 15px;
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: #a9b4c6; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}
.form-textarea { min-height: 74px; resize: vertical; }
.form-select { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23829ab8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 11px; }
.form-hint { margin-top: 5px; font-size: 12px; line-height: 1.6; color: var(--text3); }
.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text2); }
.form-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin: 2px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.switch-copy { min-width: 0; }
.switch-copy .form-label { margin-bottom: 4px; }
.switch-copy .form-hint { margin-bottom: 7px; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 50px; height: 28px; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-slider { position: absolute; inset: 0; cursor: pointer; background: #cfd6e4; border-radius: 999px; transition: background .2s ease; }
.switch-slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(16,24,40,.22); transition: transform .2s ease; }
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--primary); outline-offset: 2px; }
.form-divider {
  margin: 18px 0 12px; padding-left: 9px;
  border-left: 3px solid var(--primary);
  font-size: 14px; font-weight: 700; color: #16243a;
}
.sms-wrap { display: flex; gap: 8px; }
.sms-wrap .form-input { flex: 1; min-width: 0; }
.btn-sms { width: 118px; flex-shrink: 0; }

/* ========== 6. 数据展示 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-cell {
  position: relative; overflow: hidden;
  padding: 14px 8px; text-align: center;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.stat-cell::after {
  content: ''; position: absolute; inset: auto -20% -60% -20%; height: 70%;
  background: radial-gradient(closest-side, rgba(37, 99, 235, .10), transparent);
  pointer-events: none;
}
.stat-num {
  font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--primary-dark);
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.stat-num.gold { color: #d97706; }
.stat-num.green { color: #059669; }
.stat-num.blue { color: #2563eb; }
.stat-label { margin-top: 4px; font-size: 11.5px; color: #6b7c94; }

.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14.5px; font-weight: 700; color: #1a2942; }
.row-sub { margin-top: 3px; font-size: 12px; color: #7b8aa0; }
.row-right { flex-shrink: 0; text-align: right; }

/* 商品管理：编辑与排序按钮 */
.goods-admin-row { flex-wrap: wrap; }
.goods-row-actions {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 100px; text-align: left;
}
.goods-row-actions form { margin: 0; }
.goods-row-actions .btn { width: 100%; white-space: nowrap; }
.goods-sort-btns { display: flex; gap: 6px; }
.goods-sort-btns form { flex: 1; }
@media (max-width: 640px) {
  .goods-row-actions {
    flex-direction: row; flex-wrap: wrap;
    width: 100%; min-width: 0; margin-top: 4px;
  }
  .goods-row-actions > * { flex: 1 1 88px; }
  .goods-row-actions .goods-sort-btns { flex: 2 1 190px; }
}

/* 大区列表：标题、商家数、编辑与删除对齐，避免窄屏被挤成上下错位 */
.region-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.region-item:last-child { border-bottom: none; }
.region-item .row-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
}
.region-shop-link {
  text-decoration: none; cursor: pointer;
}
.region-shop-link:hover {
  text-decoration: underline; text-underline-offset: 2px;
}
.region-edit {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.region-edit .region-name { flex: 1 1 auto; min-width: 0; }
.region-edit .region-sort { flex: 0 0 88px; width: 88px; }
.region-edit .btn { flex-shrink: 0; white-space: nowrap; }

/* 商家列表：从大区下钻后的当前筛选提示 */
.shop-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px 0 4px; padding: 9px 11px;
  background: #f7faff; border: 1px solid #e5eefb; border-radius: 10px;
  color: #475467; font-size: 12.5px;
}
.shop-filter-bar .row-tag { margin-left: 4px; }

/* 桌面端由顶部导航承担入口，底部浮动导航只留给手机，避免遮住列表 */
@media (min-width: 761px) {
  .tabbar { display: none; }
  .app { padding-bottom: 20px; }
}

@media (max-width: 640px) {
  .region-edit {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .region-edit .region-name { grid-column: 1 / -1; width: 100%; }
  .region-edit .region-sort { width: 100%; }
  .region-edit .btn { width: 100%; }
  .shop-filter-bar { align-items: flex-start; flex-wrap: wrap; }
  .shop-filter-bar .btn { width: 100%; }
}

.kv { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; line-height: 1.6; }
.kv + .kv { border-top: 1px dashed var(--line-soft); }
.kv .k { flex-shrink: 0; width: 86px; color: var(--text3); }
.kv .v { flex: 1; min-width: 0; color: #22314a; word-break: break-word; }
.kv .v a { color: var(--primary); }

.rank-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.rank-item:last-child { border-bottom: none; }
.rank-no {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: #f1f5fb; color: #7b8aa0; font-size: 12px; font-weight: 700;
}
.rank-no.top { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 4px 10px -5px rgba(217, 119, 6, .8); }

.table-wrap {
  overflow-x: auto; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 100%; }
.tbl th, .tbl td { padding: 11px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.tbl th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, #f4f8ff, #eaf2ff);
  color: #35618f; font-size: 12px; font-weight: 700; letter-spacing: .2px;
  border-bottom: 1px solid #dbe8fb;
}
.tbl tbody tr:nth-child(even) td, .tbl tr:nth-child(even) td { background: #fbfdff; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #f5f9ff; }

/* ========== 7. 业务组件 ========== */
/* 活动头图 */
.cover-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  height: 168px; margin-bottom: 12px; padding: 0 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 255, 255, .38), transparent 46%),
    linear-gradient(135deg, #1e4fd8 0%, #3b82f6 55%, #7cb2ff 100%);
  color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 1px; text-align: center;
  box-shadow: 0 16px 32px -20px rgba(29, 78, 216, .9);
}
.cover-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-hero.has-poster { height: auto; display: block; padding: 0; background: #0b1729; }
.cover-hero.has-poster img { width: 100%; height: auto; max-height: none; object-fit: contain; }
.cover-hero.has-poster .cover-title {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  font-size: 17px; line-height: 1.3; text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}

/* 首页主视觉 */
.home-hero { height: 186px; }
.hero-inner { text-align: center; }
.hero-kicker {
  display: inline-block; margin-bottom: 10px; padding: 3px 12px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .32);
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; letter-spacing: .6px;
  backdrop-filter: blur(4px);
}
.hero-title { font-size: 27px; font-weight: 800; letter-spacing: 2px; line-height: 1.3; text-shadow: 0 6px 18px rgba(9, 30, 70, .35); }
.hero-sub { margin-top: 8px; font-size: 12.5px; font-weight: 500; letter-spacing: .5px; opacity: .92; }

/* 活动列表项 */
.act-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
  transition: transform .16s ease;
}
.act-item:last-child { border-bottom: none; }
.act-item:active { transform: scale(.995); background: #f9fbff; }
.act-cover {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 70px; height: 70px; border-radius: 14px;
  background: linear-gradient(140deg, #4f93ff, #1d4ed8);
  color: #fff; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3;
  box-shadow: 0 8px 16px -12px rgba(29, 78, 216, .9);
}
.act-cover-img { padding: 0; overflow: hidden; background: #eef3fa; }
.act-cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-info { flex: 1; min-width: 0; }
.act-title { font-size: 15px; font-weight: 700; color: #15233a; line-height: 1.35; }
.act-sub { margin-top: 4px; font-size: 12px; color: #7b8aa0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-info .row-tag { margin-top: 6px; }

/* 玩法入口 */
.mod-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 12px; margin-bottom: 8px;
  background: linear-gradient(180deg, #fbfdff, #f6faff);
  border: 1px solid #e8f0fb; border-radius: 14px;
  color: inherit; text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.mod-item:last-child { margin-bottom: 0; }
.mod-item:active { transform: scale(.99); border-color: #cfe2ff; box-shadow: 0 8px 18px -14px rgba(29, 78, 216, .7); }
.mod-ico {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 12px;
  background: #fff; border: 1px solid #e5eefb; font-size: 21px;
  box-shadow: 0 4px 10px -8px rgba(16, 40, 80, .6);
}
.mod-body { flex: 1; min-width: 0; }
.mod-name { font-size: 14.5px; font-weight: 700; color: #182740; }
.mod-sub { margin-top: 3px; font-size: 12px; color: #7b8aa0; line-height: 1.5; }
.mod-go { flex-shrink: 0; color: #b6c3d6; font-size: 15px; }

/* 首页横排商品 */
.home-goods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hg-item { display: block; color: inherit; text-decoration: none; }
.hg-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 13px; display: block; background: #f1f5fb;
  border: 1px solid #eef3fa;
}
.hg-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #6aa9ff, #2563eb);
  color: #fff; font-size: 12px; font-weight: 600; border: 0;
}
.hg-name {
  margin-top: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #24344c;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hg-price { margin-top: 2px; font-size: 14px; font-weight: 800; color: #e11d48; }

/* 商品卡 */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.goods-card {
  overflow: hidden; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease;
}
.goods-card:active { transform: translateY(1px); }
.goods-cover {
  display: flex; align-items: center; justify-content: center;
  height: auto; aspect-ratio: 1 / 1; padding: 0;
  background: linear-gradient(140deg, #6aa9ff, #2563eb);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .5px;
}
.goods-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goods-body { padding: 11px 12px 12px; }
.goods-name {
  height: 39px; font-size: 13.5px; font-weight: 700; line-height: 1.45; color: #1a2942;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.goods-price { margin-top: 7px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.price-now { font-size: 17px; font-weight: 800; color: #e11d48; font-variant-numeric: tabular-nums; }
.price-old { font-size: 11.5px; color: #a3aec0; text-decoration: line-through; }
.price-dep { font-size: 11.5px; font-weight: 600; color: #b45309; background: var(--gold-soft); border-radius: var(--radius-pill); padding: 1px 7px; }
.goods-stock { margin-top: 5px; font-size: 11.5px; color: var(--text3); }

/* 抽奖 / 奖品 */
.prize-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.prize-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 12px; margin-bottom: 8px;
  background: linear-gradient(180deg, #fffdf7, #fff8ea);
  border: 1px solid #fdeccd; border-radius: 14px;
}
.prize-box:last-child { margin-bottom: 0; }
.prize-left { flex: 1; min-width: 0; }
.prize-name { font-size: 14.5px; font-weight: 700; color: #4a3410; }
.prize-sub { margin-top: 4px; font-size: 12px; color: #8a7245; line-height: 1.5; }
.prize-box .row-tag { margin-top: 7px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(9, 22, 44, .55);
  backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; animation: maskIn .18s ease-out; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto;
  padding: 20px; background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px -20px rgba(9, 22, 44, .55);
  animation: modalIn .2s cubic-bezier(.22, .8, .3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-title { margin-bottom: 14px; font-size: 16px; font-weight: 800; text-align: center; color: #14233a; }
.modal-body { margin-bottom: 16px; text-align: center; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }
.qr-box {
  display: flex; align-items: center; justify-content: center;
  width: 200px; height: 200px; margin: 0 auto 10px;
  background: #f7faff; border: 1px solid var(--line); border-radius: 14px;
  color: var(--text3); font-size: 12px; text-align: center;
}

/* 缩略图 */
.cover-preview { margin-bottom: 10px; }
.cover-preview img {
  display: block; width: 132px; height: 176px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 12px;
}
.form-sep { height: 1px; margin: 20px 0; background: var(--line); }

/* 活动图片管理：轮播图 / 详情图 */
.img-manager { padding: 10px; background: #f8fbff; border: 1px solid #e8f0fb; border-radius: 14px; }
.img-sort-list { display: flex; flex-direction: column; gap: 8px; }
.img-sort-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; background: #fff; border: 1px solid #e7eef8; border-radius: 11px;
}
.img-sort-item.dragging { opacity: .45; }
.img-drag {
  flex: 0 0 22px; width: 22px; height: 34px; padding: 0;
  border: 0; background: transparent; color: #98a9c1; font-size: 16px;
  cursor: grab; touch-action: none;
}
.img-drag:active { cursor: grabbing; }
.img-sort-thumb {
  flex: 0 0 58px; width: 58px; height: 58px; object-fit: cover;
  background: #eef3fa; border: 1px solid #e3ebf6; border-radius: 8px;
}
.img-sort-main { flex: 1; min-width: 0; }
.img-sort-title { font-size: 13px; font-weight: 600; color: #1f2d43; line-height: 1.4; }
.img-sort-sub { margin-top: 1px; font-size: 11px; color: #8b9ab0; line-height: 1.4; }
.img-cover-tag {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  background: #eaf3ff; border-radius: 999px; color: #0958d9;
  font-size: 10px; font-weight: 600; line-height: 18px;
}
.img-del { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; color: #c4382e; font-size: 11px; cursor: pointer; }
.img-del input { width: 13px; height: 13px; accent-color: #d92d20; }
.img-sort-btns { display: flex; gap: 4px; flex: 0 0 auto; }
.img-btn {
  width: 28px; height: 28px; padding: 0;
  background: #fff; border: 1px solid #dfe8f4; border-radius: 7px;
  color: #51627a; font-size: 13px; cursor: pointer;
}
.img-btn:disabled { opacity: .3; cursor: default; }
.img-empty { padding: 13px 12px; color: #93a1b5; font-size: 12px; text-align: center; background: #fff; border: 1px dashed #dce7f5; border-radius: 10px; }
.img-upload {
  position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 9px; padding: 10px 12px;
  background: #fff; border: 1px dashed #b9d4f8; border-radius: 10px;
  cursor: pointer;
}
.img-upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.img-upload-btn { color: #0958d9; font-size: 12.5px; font-weight: 600; }
.img-file-tip { color: #8b9ab0; font-size: 11.5px; }
@media (max-width: 480px) {
  .img-manager { padding: 8px; }
  .img-sort-item { gap: 6px; padding: 7px; }
  .img-sort-thumb { flex-basis: 48px; width: 48px; height: 48px; }
  .img-drag { flex-basis: 18px; width: 18px; }
  .img-sort-sub { display: none; }
  .img-btn { width: 27px; height: 27px; }
}

/* 复制提示 */
.copy-tip { display: none; margin-top: 8px; font-size: 12px; color: #0b7355; }
.copy-tip::before { content: '✓ '; font-weight: 700; }

/* ========== 8. 页面组件 ========== */
/* 登录 / 注册 */
.auth-hero {
  position: relative; overflow: hidden;
  margin-bottom: 14px; padding: 26px 20px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .55), transparent 52%),
    linear-gradient(135deg, #dbeaff 0%, #eef5ff 55%, #f7fbff 100%);
  border: 1px solid #dbe9fd;
  box-shadow: 0 14px 30px -26px rgba(20, 60, 130, .9);
  text-align: center;
}
.auth-logo-img {
  display: block; width: min(270px, 82%); height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(29, 78, 216, .10));
}
.auth-slogan { margin-top: 10px; font-size: 12.5px; color: #5b7ba6; letter-spacing: .5px; }
.auth-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  margin-top: 14px; font-size: 12.5px; color: var(--text3);
}
.auth-links a { color: var(--primary); font-weight: 600; }
.auth-links .gray { color: var(--text3); }
.plain-card { background: linear-gradient(180deg, #fbfdff, #f6faff); }
.invite-box {
  padding: 4px 14px; margin-bottom: 12px;
  background: linear-gradient(180deg, #fbfdff, #f4f9ff);
  border: 1px solid #e6f0fc; border-radius: 14px;
}
.invite-box .kv:last-child { border-bottom: none; }
.invite-link-box {
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--gold-soft); border: 1px dashed #f3cf94; border-radius: 12px;
  word-break: break-all;
}
.invite-link-text { font-size: 12.5px; color: #8a5a08; line-height: 1.6; }
.inv-result {
  padding: 12px 14px; margin-top: 12px;
  background: #f5f9ff; border: 1px dashed #bcd7ff; border-radius: 12px;
}
.inv-result-t { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #1b57bd; }
.inv-link {
  padding: 7px 9px; margin-top: 6px;
  background: #fff; border: 1px solid #e4eefb; border-radius: 9px;
  font-size: 12px; line-height: 1.55; color: var(--primary); word-break: break-all;
}

/* 活动结束 */
.ended-card { padding: 46px 22px; text-align: center; }
.ended-icon { margin-bottom: 14px; font-size: 46px; line-height: 1; }
.ended-title { margin-bottom: 8px; font-size: 20px; font-weight: 800; color: #16243a; }
.ended-name { margin-bottom: 6px; font-size: 15px; font-weight: 600; color: #33425c; }
.ended-sub { margin-bottom: 14px; font-size: 12px; color: var(--text3); }
.ended-tip {
  margin-bottom: 20px; padding: 12px 14px;
  background: #f7faff; border-radius: 12px;
  font-size: 13px; line-height: 1.75; color: var(--text2);
}
.ended-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* 推广名片（活动页） */
.staff-card { background: linear-gradient(180deg, #fbfdff, #f5f9ff); }
.staff-card .kv .v img { border-radius: 10px; box-shadow: 0 6px 16px -10px rgba(16, 40, 80, .6); }

/* 转发页 */
.sh-hero {
  position: relative; overflow: hidden;
  padding: 24px 18px; margin-bottom: 12px;
  border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, .35), transparent 45%),
    linear-gradient(140deg, #1e4fd8 0%, #3b82f6 52%, #7cb2ff 100%);
  box-shadow: 0 18px 36px -24px rgba(29, 78, 216, .95);
}
.sh-hero-poster {
  display: block; min-height: 0; padding: 0;
  background: #0b1220;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.sh-cover { display: block; width: 100%; height: auto; }
.sh-hero-poster::after { display: none; }
.sh-hero-body { position: relative; z-index: 2; }
.sh-hero-poster .sh-hero-body {
  position: static; padding: 16px 18px 18px;
  background: linear-gradient(150deg, #0e2a5c, #123b80);
}
@media (min-width: 860px) {
  .sh-hero-poster {
    display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: stretch;
    background: linear-gradient(150deg, #0e2a5c, #123b80);
  }
  .sh-hero-poster::after { display: none; }
  .sh-hero-poster .sh-hero-body {
    position: static; display: flex; flex-direction: column; justify-content: center;
    padding: 30px 28px; background: linear-gradient(150deg, #0e2a5c, #123b80);
  }
  .sh-title { font-size: 25px; }
}
.sh-badge {
  display: inline-block; margin-bottom: 10px; padding: 3px 10px;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-pill); font-size: 11px; letter-spacing: .5px;
  backdrop-filter: blur(4px);
}
.sh-title { font-size: 23px; font-weight: 800; line-height: 1.32; }
.sh-sub { margin-top: 8px; font-size: 13px; opacity: .94; }
.sh-date { margin-top: 6px; font-size: 12px; opacity: .86; }
.sh-sharer { display: flex; align-items: center; gap: 12px; }
.sh-ava {
  display: flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(140deg, #60a5fa, #1d4ed8); color: #fff;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 8px 16px -10px rgba(29, 78, 216, .9);
}
.sh-sharer-main { flex: 1; min-width: 0; }
.sh-sharer-name { font-size: 15px; font-weight: 700; color: #16243a; }
.sh-sharer-sub { margin-top: 3px; font-size: 12px; color: var(--text3); }
.sh-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.sh-link {
  padding: 11px 13px; margin-bottom: 12px;
  background: #f5f9ff; border: 1px dashed #bcd8ff; border-radius: 12px;
}
.sh-link-label { margin-bottom: 4px; font-size: 11px; color: var(--text3); }
.sh-link-url { font-size: 12px; line-height: 1.6; color: var(--primary); word-break: break-all; }
.sh-hl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.sh-hl-item {
  padding: 13px 6px; text-align: center; color: inherit; text-decoration: none;
  background: linear-gradient(180deg, #fbfdff, #f3f8ff);
  border: 1px solid #e6f0fc; border-radius: 14px;
  transition: transform .16s ease, border-color .16s ease;
}
.sh-hl-item:active { transform: scale(.98); border-color: #c9e0ff; }
.sh-hl-ico { font-size: 24px; }
.sh-hl-t { margin-top: 5px; font-size: 13px; font-weight: 700; color: #182740; }
.sh-hl-s { margin-top: 2px; font-size: 11px; color: var(--text3); }
.sh-goods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sh-g { display: block; color: inherit; text-decoration: none; }
.sh-g-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border: 1px solid #eef3fa; border-radius: 13px; display: block; background: #f1f5fb;
}
.sh-g-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #6aa9ff, #2563eb); color: #fff;
  font-size: 13px; font-weight: 600; border: 0;
}
.sh-g-name {
  margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.4; color: #24344c;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sh-g-price { margin-top: 3px; font-size: 14.5px; font-weight: 800; color: #e11d48; }
.sh-g-old { margin-left: 4px; font-size: 11px; font-weight: 400; color: #a3aec0; text-decoration: line-through; }
.sh-g-dep { margin-top: 2px; font-size: 11px; color: #8a7245; }
.sh-tip { margin: 8px 0 12px; }
.sh-foot { margin: 4px 0 12px; }

/* 录单智能匹配结果 */
.match-item {
  display: block; width: 100%; margin-bottom: 6px; padding: 10px 12px;
  background: #f8fbff; border: 1px solid #e3eefb; border-radius: 10px;
  font-family: inherit; font-size: 13px; text-align: left; color: #22314a; cursor: pointer;
}
.match-item:active { background: var(--primary-soft); border-color: #c7ddfb; }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quick {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 12px 10px;
  background: linear-gradient(180deg, #fbfdff, #f4f9ff);
  border: 1px solid #e6f0fc; border-radius: 13px;
  color: #2d4666; font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.quick:active { transform: scale(.98); background: var(--primary-soft); border-color: #c9dffb; color: var(--primary-dark); }
.quick.wide { grid-column: span 2; }

/* 筛选条 */
.filter-bar { margin-bottom: 10px; }
.filter-bar .form-select { max-width: 260px; }

/* 管理端活动操作条 */
.act-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.act-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.act-actions form { margin: 0; }

/* ========== 9. 响应式与动效 ========== */
@media (max-width: 480px) {
  :root { --app-pad: 12px; }
  .hd-title { max-width: 132px; }
  .hd-role { display: none; }
  .hd-avatar { display: none; }
  .topnav-inner { padding-left: var(--app-pad); padding-right: var(--app-pad); }
  .card { padding: 14px; border-radius: 16px; }
  .stat-num { font-size: 18px; }
  .cover-hero { height: 148px; font-size: 18px; }
  .goods-grid { grid-template-columns: 1fr; }
  .goods-grid .goods-cover { height: auto; aspect-ratio: 1 / 1; }
  .home-goods { grid-template-columns: repeat(2, 1fr); }
  .seg a { padding: 7px 12px; }
  .btn { font-size: 14.5px; }
  .sh-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* =====================================================================
   百业联盟 · 视觉刷新 v7
   目标：更克制的蓝色、更清晰的层级、更适合浏览的活动页
   ===================================================================== */

:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-2: #69b1ff;
  --primary-soft: #eef6ff;
  --primary-soft-2: #dbeafe;

  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #101828;
  --text2: #475467;
  --text3: #8a94a6;
  --line: #e9edf3;
  --line-soft: #f2f5f9;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  --shadow-card: 0 1px 2px rgba(16, 24, 40, .03), 0 12px 32px -22px rgba(16, 24, 40, .18);
  --shadow-float: 0 18px 40px -18px rgba(16, 24, 40, .24);

  --blue: #1677ff;
}

body {
  background:
    radial-gradient(900px 280px at 50% -120px, #e8f2ff 0%, rgba(232, 242, 255, 0) 72%),
    #f5f7fb;
  color: var(--text);
}

.app-main { padding: 16px var(--app-pad) 28px; }

/* ---------- 顶部：白色轻量导航 ---------- */
.app-header {
  color: #101828;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: saturate(160%) blur(16px);
}
.hd-inner { padding: 12px var(--app-pad) 10px; }
.hd-logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: none;
  box-shadow: none;
}
.hd-brand-name { color: #101828; font-size: 15px; letter-spacing: .6px; }
.hd-title { color: #98a2b3; font-size: 11px; }
.hd-avatar { background: #f5f8ff; border-color: #dbe7f8; color: #0958d9; }
.hd-uname { color: #344054; }
.hd-role { color: #98a2b3; }
.hd-exit { background: #fff; border-color: #e4e7ec; color: #475467; box-shadow: none; }
.hd-exit:active { background: #f9fafb; }

.topnav { border-top: 1px solid #f2f4f7; background: #fff; }
.topnav-inner { padding: 8px var(--app-pad) 10px; gap: 6px; }
.tn-item {
  height: 34px; padding: 0 13px;
  background: #f8fafc; border-color: #eef1f5; color: #475467;
  font-weight: 500;
}
.tn-item.active {
  background: #1677ff; border-color: #1677ff; color: #fff;
  box-shadow: 0 8px 16px -9px rgba(22, 119, 255, .75);
}
.tn-item.tn-hl {
  background: #fff7ed; border-color: #fed7aa; color: #c2410c;
  box-shadow: none;
}
.tn-item.tn-hl.active { background: #f97316; border-color: #f97316; color: #fff; }

.subnav { background: rgba(255, 255, 255, .96); border-bottom: 1px solid #f0f2f5; }
.subnav-inner { padding: 7px var(--app-pad); gap: 6px; }
.sn-btn {
  height: 30px; background: #f8fafc; border-color: #eef1f5; color: #475467;
  font-weight: 500;
}
.sn-btn.home { background: #1677ff; color: #fff; }
.sn-work { background: #fff; color: #0958d9; border-color: #dbe7f8; }

/* ---------- 卡片与文字层级 ---------- */
.card {
  border-color: var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card-title {
  margin-bottom: 14px; padding-left: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: #101828;
}
.card-title::before {
  top: 2px; bottom: 2px; width: 3px; border-radius: 2px;
  background: #1677ff;
}
.card-title .more { font-size: 11.5px; font-weight: 500; color: #98a2b3; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin: 22px 2px 10px;
}
.section-head h2 {
  font-size: 19px; font-weight: 800; line-height: 1.3;
  letter-spacing: -.4px; color: #101828;
}
.section-head p { margin-top: 3px; font-size: 12px; color: #98a2b3; }
.section-link { font-size: 12.5px; font-weight: 600; color: #1677ff; white-space: nowrap; }

/* ---------- 按钮 / 标签 ---------- */
.btn { border-radius: 12px; min-height: 46px; font-weight: 600; }
.btn-primary {
  background: #1677ff;
  box-shadow: 0 10px 20px -14px rgba(22, 119, 255, .8);
}
.btn-primary:active { background: #0958d9; }
.btn-outline { background: #fff; border-color: #d6e6fb; color: #0958d9; }
.btn-outline:active { background: #f5f9ff; }
.btn-ghost { background: #f8fafc; border-color: #eef1f5; color: #475467; }
.btn-sm { min-height: 32px; border-radius: 9px; }
.row-tag { font-weight: 600; }
.tag-blue { background: #eef6ff; border-color: #d6e6fb; color: #0958d9; }

/* ---------- 活动展示卡（活动主题页） ---------- */
.act-show {
  overflow: hidden; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-card);
}
.act-poster { position: relative; background: #0d1526; }
.act-poster img {
  display: block; width: 100%; height: auto;
  max-height: none; object-fit: contain; margin: 0 auto;
}
.act-poster-ph {
  display: flex; align-items: center; justify-content: center;
  min-height: 210px; padding: 30px 24px; text-align: center;
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, .3), transparent 44%),
    linear-gradient(135deg, #0958d9 0%, #1677ff 52%, #69b1ff 100%);
  color: #fff; font-size: 23px; font-weight: 800; line-height: 1.4;
}
.act-show-head { padding: 18px 18px 20px; }
.act-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: #eef6ff; color: #0958d9;
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
}
.act-name {
  margin-top: 10px;
  font-size: 23px; font-weight: 800; line-height: 1.36;
  letter-spacing: -.5px; color: #101828;
}
.act-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.act-fact {
  display: flex; align-items: center; gap: 9px;
  min-width: 0; padding: 10px 11px;
  background: #f8fafc; border: 1px solid #eef1f5; border-radius: 12px;
  color: inherit; text-decoration: none;
}
.act-fact.wide { grid-column: 1 / -1; }
.act-fact-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 30px;
  width: 30px; height: 30px; border-radius: 9px;
  background: #fff; border: 1px solid #eef1f5; font-size: 15px;
}
.act-fact-txt { min-width: 0; }
.act-fact-k { font-size: 10.5px; color: #98a2b3; line-height: 1.2; }
.act-fact-v {
  margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #344054; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.act-fact.link .act-fact-v { color: #0958d9; }

/* 活动玩法：三宫格 */
.play-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.play-card {
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 126px; padding: 14px 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 24px -22px rgba(16, 24, 40, .25);
  color: inherit; text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.play-card:active { transform: translateY(1px); border-color: #d6e6fb; box-shadow: 0 12px 24px -20px rgba(22, 119, 255, .45); }
.play-ico {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: #f2f8ff; font-size: 19px;
}
.play-name { margin-top: 10px; font-size: 14px; font-weight: 700; color: #182230; line-height: 1.3; }
.play-sub { margin-top: 5px; font-size: 11.5px; line-height: 1.5; color: #98a2b3; }
.play-go { margin-top: auto; padding-top: 8px; font-size: 11.5px; font-weight: 600; color: #1677ff; }

/* 特价商品 */
.act-goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.act-goods-card {
  overflow: hidden; background: #fff;
  border: 1px solid var(--line); border-radius: 15px;
  box-shadow: 0 8px 24px -22px rgba(16, 24, 40, .25);
  color: inherit; text-decoration: none;
  transition: transform .16s ease;
}
.act-goods-card:active { transform: translateY(1px); }
.act-goods-cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(140deg, #69b1ff, #1677ff);
  color: #fff; font-size: 13px; font-weight: 600;
}
.act-goods-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-goods-badge {
  position: absolute; left: 9px; top: 9px;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .94); color: #d4380d;
  font-size: 10.5px; font-weight: 700;
  box-shadow: 0 4px 10px -6px rgba(16, 24, 40, .3);
}
.act-goods-body { padding: 10px 11px 12px; }
.act-goods-name {
  min-height: 38px; font-size: 13px; font-weight: 600; line-height: 1.45; color: #182230;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.act-goods-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.act-goods-price b { font-size: 17px; font-weight: 800; color: #e11d48; letter-spacing: -.3px; }
.act-goods-price s { font-size: 11px; color: #98a2b3; }
.act-goods-dep { margin-top: 4px; font-size: 10.5px; color: #b45309; }

/* 推广顾问 */
.advisor-card {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.advisor-ava {
  display: flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #eef6ff; color: #0958d9;
  font-size: 17px; font-weight: 800;
}
.advisor-main { flex: 1; min-width: 0; }
.advisor-kicker { font-size: 10.5px; color: #98a2b3; letter-spacing: .4px; }
.advisor-name { margin-top: 2px; font-size: 15px; font-weight: 700; color: #182230; }
.advisor-sub { margin-top: 3px; font-size: 11.5px; color: #98a2b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advisor-qr {
  flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover;
  border-radius: 9px; border: 1px solid #eef1f5;
}

/* 转发助力：轻量横幅 */
.share-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px; margin-top: 6px;
  background: linear-gradient(135deg, #f3f9ff 0%, #eef6ff 55%, #ffffff 100%);
  border: 1px solid #dbeafe; border-radius: 18px;
}
.share-ico {
  display: flex; align-items: center; justify-content: center; flex: 0 0 38px;
  width: 38px; height: 38px; border-radius: 11px;
  background: #fff; font-size: 19px;
  box-shadow: 0 6px 14px -10px rgba(22, 119, 255, .5);
}
.share-main { flex: 1; min-width: 150px; }
.share-name { font-size: 15px; font-weight: 700; color: #182230; }
.share-sub { margin-top: 4px; font-size: 11.5px; line-height: 1.55; color: #667085; }
.share-acts { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.share-acts .btn { flex: 1; min-width: 132px; }
.copy-tip { margin-top: 10px; }

/* ---------- 首页 ---------- */
.home-hero {
  position: relative; overflow: hidden;
  height: auto;
  padding: 26px 30px 22px;
  border-radius: 10px; color: #101828;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f9ff 100%);
  border: 1px solid #e5eef8;
  box-shadow: 0 10px 30px -28px rgba(16, 24, 40, .35);
  margin-bottom: 18px;
}
.home-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.home-hero-badge {
  display: inline-block; padding: 4px 12px;
  border: 1px solid #bcd7ff; border-radius: 4px;
  background: #fff;
  color: #2563eb; font-size: 13px; font-weight: 600; line-height: 1.45;
}
.home-hero h1 {
  margin-top: 20px;
  font-size: 38px; font-weight: 800; line-height: 1.2; letter-spacing: -1px;
  color: #0f172a;
}
.home-hero p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: #667085; }
.home-hero-features { margin-top: 18px; font-size: 16px; line-height: 1.6; color: #344054; }
.home-hero-meta {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed #cbd8e8;
  font-size: 13.5px; color: #667085;
}

.act-list { display: grid; gap: 10px; }
.act-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 26px -24px rgba(16, 24, 40, .3);
  color: inherit; text-decoration: none;
  transition: transform .16s ease, border-color .16s ease;
}
.act-list-item:active { transform: translateY(1px); border-color: #d6e6fb; }
.act-list-cover {
  display: flex; align-items: center; justify-content: center; flex: 0 0 84px;
  width: 84px; height: 84px; overflow: hidden; border-radius: 13px;
  background: linear-gradient(140deg, #69b1ff, #1677ff);
  color: #fff; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.35;
}
.act-list-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-list-body { flex: 1; min-width: 0; }
.act-list-title { font-size: 15.5px; font-weight: 700; line-height: 1.4; color: #182230; }
.act-list-meta { margin-top: 5px; font-size: 11.5px; line-height: 1.6; color: #667085; }
.act-list-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.act-list-go { flex: 0 0 auto; color: #b8c0cc; font-size: 15px; }

.steps-card {
  padding: 22px 20px;
  margin-bottom: 16px;
  background: #fff; border-color: #e8eef6; border-radius: 16px;
  box-shadow: none;
}
.steps { position: relative; display: grid; gap: 0; }
.step {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 0 0 22px; border-bottom: none;
}
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 32px; bottom: 2px;
  width: 1px; background: #dbe7f8;
}
.step-no {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; flex: 0 0 30px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #eef5ff; color: #1d4ed8;
  font-size: 12.5px; font-weight: 800;
}
.step-txt { min-width: 0; padding-top: 1px; }
.step-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: #101828; }
.step-desc { margin-top: 4px; font-size: 13px; line-height: 1.55; color: #667085; }

.entry-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px; margin-bottom: 16px;
  background: #f8fafc; border: 1px solid #e7edf5; border-radius: 16px;
  box-shadow: none;
}
.entry-text { min-width: 0; }
.entry-title { font-size: 15.5px; font-weight: 700; color: #101828; }
.entry-sub { margin-top: 5px; font-size: 12.5px; color: #667085; }
.entry-btn {
  flex: 0 0 auto; min-height: 40px; padding: 0 18px;
  background: #fff; border-color: #c9dffd; color: #1b57bd; border-radius: 9px;
}

/* ---------- 商品页 / 内页标题 ---------- */
.page-lead {
  padding: 20px 18px;
  margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.page-lead-kicker { font-size: 11px; font-weight: 600; color: #1677ff; letter-spacing: .5px; }
.page-lead h1 { margin-top: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: #101828; }
.page-lead p { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: #667085; }

/* 商品卡细节 */
.goods-card { border-radius: 15px; box-shadow: 0 8px 26px -24px rgba(16, 24, 40, .3); }
.goods-body { padding: 12px 13px 13px; }
.goods-name { font-size: 13.5px; font-weight: 600; color: #182230; }
.price-now { color: #e11d48; }
.price-dep { background: #fff7ed; color: #b45309; border: 1px solid #ffedd5; }

/* 表格与统计 */
.stat-cell { border-radius: 13px; box-shadow: 0 8px 24px -24px rgba(16, 24, 40, .3); }
.tbl th { background: #f7f9fc; color: #475467; border-bottom-color: #e9edf3; }
.tbl tr:hover td { background: #f8fbff; }

/* 底部 */
.site-footer {
  padding: 24px 16px 30px; margin-top: 28px;
  text-align: center; border-top: 1px solid #eef1f5;
  color: #98a2b3; font-size: 11.5px; line-height: 1.9;
}
.site-footer .f-title { margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: #475467; }
.site-footer a { color: #667085; text-decoration: none; }
.site-footer .f-icp { margin-top: 7px; }

@media (max-width: 480px) {
  .card { padding: 16px; border-radius: 16px; }
  .steps-card { padding: 18px 16px; }
  .step { gap: 13px; padding-bottom: 20px; }
  .step:not(:last-child)::after { left: 15px; top: 32px; }
  .act-show-head { padding: 16px 15px 18px; }
  .act-name { font-size: 21px; }
  .act-facts { grid-template-columns: 1fr; }
  .act-fact.wide { grid-column: auto; }
  .play-grid { gap: 8px; }
  .play-card { min-height: 118px; padding: 12px 11px; }
  .play-ico { width: 34px; height: 34px; font-size: 17px; }
  .play-name { font-size: 13px; }
  .play-sub { font-size: 11px; }
  .home-hero { padding: 22px 18px 18px; border-radius: 10px; }
  .home-hero-badge { padding: 3px 10px; font-size: 12px; }
  .home-hero h1 { margin-top: 16px; font-size: 30px; letter-spacing: -.6px; }
  .home-hero p { margin-top: 8px; font-size: 13.5px; }
  .home-hero-features { margin-top: 14px; font-size: 14px; }
  .home-hero-meta { margin-top: 14px; padding-top: 13px; font-size: 12.5px; }
  .act-list-cover { flex-basis: 76px; width: 76px; height: 76px; }
  .act-goods-grid { gap: 10px; }
  .act-goods-name { font-size: 12.5px; }
  .act-goods-price b { font-size: 16px; }
  .share-acts .btn { flex: 1 1 100%; }
  .entry-card { padding: 14px 15px; }
}

/* v7.1 细节修正：活动页标题区、商品双列、分享提示 */
.share-box .copy-tip { flex: 1 0 100%; margin-top: 2px; }
@media (max-width: 480px) {
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .goods-grid .goods-cover { height: auto; aspect-ratio: 1 / 1; }
  .goods-body { padding: 10px 11px 11px; }
  .goods-name { height: 36px; font-size: 12.5px; }
  .price-now { font-size: 16px; }
  .price-old, .price-dep { font-size: 10.5px; }
  .goods-stock { font-size: 10.5px; }
  .goods-body .btn { min-height: 36px; font-size: 12.5px; }
}

/* v7.2 活动页桌面双栏：左海报、右信息 */
@media (min-width: 860px) {
  .act-show { background: transparent; border: 0; box-shadow: none; overflow: visible; margin-bottom: 26px; }
  .act-top { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: stretch; }
  .act-poster { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16,24,40,.10); }
  .act-poster img { max-height: none; width: 100%; height: auto; object-fit: cover; }
  .act-show-head { display: flex; flex-direction: column; justify-content: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 30px rgba(16,24,40,.06); padding: 30px 24px 26px; }
  .act-facts { grid-template-columns: 1fr; }
}

/* 特价角标移到右上，避免遮挡商品图左上角品牌 */
.act-goods-badge { left: auto; right: 10px; }

/* 活动主题页：多图轮播 */
.act-carousel { position: relative; min-width: 0; max-width: 100%; }
.act-carousel-track {
  display: flex; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.act-carousel-track::-webkit-scrollbar { display: none; }
.act-carousel-slide {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 100%; min-width: 0; max-width: 100%; scroll-snap-align: start;
  background: #0d1526;
}
.act-carousel.is-multi .act-carousel-slide { aspect-ratio: 3 / 4; }
.act-carousel-slide img {
  display: block; width: 100%; height: auto;
  max-height: none; object-fit: contain; margin: 0 auto;
  user-select: none; -webkit-user-drag: none;
}
.act-carousel.is-multi .act-carousel-slide img { height: 100%; max-height: none; }
.act-carousel-btn {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: rgba(13, 21, 38, .52); border: 1px solid rgba(255,255,255,.28); border-radius: 50%;
  color: #fff; font-size: 25px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(4px);
}
.act-carousel-btn.prev { left: 10px; }
.act-carousel-btn.next { right: 10px; }
.act-carousel-btn:hover { background: rgba(13, 21, 38, .72); }
.act-carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 11px; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  pointer-events: none;
}
.act-carousel-dot {
  width: 6px; height: 6px; padding: 0;
  background: rgba(255,255,255,.55); border: 0; border-radius: 999px;
  cursor: pointer; pointer-events: auto;
  transition: width .18s ease, background .18s ease;
}
.act-carousel-dot.active { width: 18px; background: #fff; }
.act-carousel-count {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  padding: 3px 9px; background: rgba(13, 21, 38, .55); border-radius: 999px;
  color: #fff; font-size: 11px; line-height: 1.5; letter-spacing: .3px;
}
@media (min-width: 860px) {
  .act-carousel:not(.is-multi) .act-carousel-slide img { max-height: none; }
}
@media (max-width: 480px) {
  .act-carousel-btn { width: 30px; height: 30px; font-size: 22px; }
  .act-carousel-btn.prev { left: 7px; }
  .act-carousel-btn.next { right: 7px; }
  .act-carousel-dots { bottom: 8px; }
  .act-carousel-count { top: 8px; right: 8px; font-size: 10px; }
}

/* 活动主题页：详情长图 */
.act-details { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.act-detail-item {
  display: block; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 24px -22px rgba(16, 24, 40, .35);
}
.act-detail-item img { display: block; width: 100%; height: auto; }
.act-detail-item:hover { border-color: #b9d4f8; }
@media (max-width: 480px) {
  .act-details { gap: 8px; margin-bottom: 16px; }
  .act-detail-item { border-radius: 13px; }
}

/* 商家后台统计：自定义日期筛选 */
.boss-date-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: -2px 0 12px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.boss-date-bar input[type="date"] {
  flex: 1 1 130px; min-width: 0; height: 36px; padding: 0 9px;
  border: 1px solid #dbe5f1; border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px;
}
.boss-date-bar button {
  flex: 0 0 auto; height: 36px; padding: 0 15px;
  border: 0; border-radius: 8px; background: var(--primary);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.boss-date-sep { color: var(--text3); font-size: 12px; }
.boss-date-clear { color: var(--text3); font-size: 12px; text-decoration: none; padding: 0 2px; }
.boss-date-hint { margin: -6px 0 12px; color: var(--text3); font-size: 12px; }
.seg a[aria-current="true"] { cursor: default; }
@media (max-width: 480px) {
  .boss-date-bar { padding: 8px; gap: 5px; }
  .boss-date-bar input[type="date"] { flex-basis: 118px; height: 34px; font-size: 12px; }
  .boss-date-bar button { height: 34px; padding: 0 12px; font-size: 12px; }
}

/* 超管客户管理：操作列固定右侧，窄屏也能直接看到拨号/删除 */
.tbl-customers th, .tbl-customers td { padding: 9px 6px; font-size: 12px; }
.tbl-customers td:nth-child(9) { font-size: 11px; color: var(--text3); }
.tbl-customers .btn-sm { padding: 4px 7px; font-size: 11.5px; }
.tbl-customers th:last-child,
.tbl-customers td:last-child {
  position: sticky; right: 0; z-index: 2;
  min-width: 96px;
  background: #fff;
  box-shadow: -10px 0 12px -12px rgba(15, 23, 42, .35);
}
.tbl-customers th:last-child { z-index: 3; background: #f7f9fc; }
.tbl-customers tr:nth-child(even) td:last-child { background: #fbfdff; }
.tbl-customers tr:hover td:last-child { background: #f5f9ff; }

/* 客户线索批量选择 */
.cust-bulk {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 8px 10px;
  background: #f7faff; border: 1px solid #e5eefb; border-radius: 10px;
}
.cust-bulk label {
  display: inline-flex; align-items: center; gap: 6px;
  color: #475467; font-size: 13px; cursor: pointer;
}
.cust-bulk input[type="checkbox"],
.tbl-customers td .cust-check {
  width: 16px; height: 16px; margin: 0;
  accent-color: var(--primary); cursor: pointer;
}
.cust-bulk .sel-count { color: var(--text3); font-size: 12px; }
.cust-bulk .btn { margin-left: auto; }
.cust-name-pick {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; white-space: nowrap;
}
@media (min-width: 641px) and (max-width: 1100px) {
  .tbl-customers th:nth-child(8), .tbl-customers td:nth-child(8),
  .tbl-customers th:nth-child(9), .tbl-customers td:nth-child(9) { display: none; }
}
@media (max-width: 640px) {
  .cust-bulk { flex-wrap: wrap; }
  .cust-bulk .btn { width: 100%; margin-left: 0; }
  .tbl-mobile td:first-child .cust-name-pick { justify-content: flex-start; }
}

/* =====================================================================
   v8 手机端可用性专项
   目标：不再横向滑菜单、不再让宽表格撑破页面、表单和卡片在 390px 下可点可读
   ===================================================================== */

/* 手机菜单按钮与抽屉：桌面端隐藏 */
.sn-menu { display: none; }
.mnav-mask { display: none; }
.tbl-sortbar { display: none; }

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  body { font-size: 14.5px; }
  .app { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .app-main { padding: 12px var(--app-pad) 18px; }
  /* 三列统计卡在窄屏下收紧字号，避免大金额被裁切 */
  .stat-grid .stat-num { font-size: clamp(13px, 4.1vw, 18px); letter-spacing: -.4px; }

  /* 多入口顶部导航在手机端不再横向滚动，统一收进「菜单」抽屉 */
  .topnav-multi { display: none; }
  .sn-work { margin-left: 0; }
  .sn-menu {
    display: inline-flex; margin-left: auto;
    background: #fff; color: var(--primary-dark); border-color: #d6e6fb;
  }
  .sn-btn { height: 34px; padding: 0 11px; font-size: 12px; }

  .mnav-mask {
    position: fixed; inset: 0; z-index: 210;
    align-items: flex-end; justify-content: center;
    background: rgba(9, 22, 44, .52); backdrop-filter: blur(3px);
  }
  .mnav-mask.show { display: flex; animation: mnavMaskIn .18s ease-out; }
  @keyframes mnavMaskIn { from { opacity: 0; } to { opacity: 1; } }
  .mnav-sheet {
    width: 100%; max-width: var(--app-w); max-height: 82vh;
    overflow-y: auto; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
    background: #fff; border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 50px -20px rgba(9, 22, 44, .5);
    animation: mnavSheetIn .2s cubic-bezier(.22, .8, .3, 1);
  }
  @keyframes mnavSheetIn { from { transform: translateY(18px); opacity: .7; } to { transform: none; opacity: 1; } }
  .mnav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mnav-head strong { font-size: 16px; color: var(--text); }
  .mnav-close {
    width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%;
    background: #f8fafc; color: #667085; font-size: 20px; line-height: 1; cursor: pointer;
  }
  .mnav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 14px 0 16px; }
  .mnav-item {
    display: flex; align-items: center; gap: 8px;
    min-height: 48px; padding: 10px 12px;
    background: #f8fafc; border: 1px solid #eef1f5; border-radius: 13px;
    color: #344054; font-size: 13.5px; font-weight: 600; text-decoration: none;
  }
  .mnav-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
  .mnav-item:active { transform: scale(.985); }
  .mnav-ico { font-size: 18px; line-height: 1; }

  /* 卡片标题里的下拉框、按钮改为整行，避免把页面撑宽 */
  .card-title { flex-wrap: wrap; align-items: flex-start; }
  .card-title .form-select,
  .card-title .more { width: 100% !important; max-width: 100%; margin-top: 8px; text-align: left; white-space: normal; }
  .card-title form { margin-top: 8px; }
  .card > div[style*="display:flex"] { flex-wrap: wrap; }

  /* 搜索/编辑行在窄屏允许换行 */
  .card form[style*="display:flex"],
  .row form[style*="display:flex"] { flex-wrap: wrap; }
  .card form[style*="display:flex"] .form-input,
  .card form[style*="display:flex"] .form-select { min-width: 0; }
  .sms-wrap { gap: 6px; }
  .btn-sms { width: 104px; }

  /* 统计页签改为两行三列，不再横向滚动 */
  .stats-tabs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px; overflow: visible; padding-bottom: 8px;
  }
  .stats-tab {
    width: 100%; padding: 8px 4px; font-size: 11.5px;
    line-height: 1.25; white-space: normal;
  }

  /* 表格：手机端自动变成“字段名 + 值”的卡片，不再横向拖动 */
  .table-wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  table.tbl.tbl-mobile { display: block; width: 100%; min-width: 0; border-collapse: collapse; }
  .tbl-mobile tbody { display: block; width: 100%; }
  .tbl-mobile tr:first-child { display: none; }
  .tbl-mobile tr {
    display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 12px 13px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 8px 24px -24px rgba(16, 24, 40, .3);
  }
  .tbl-mobile td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 5px 0; border: 0; background: transparent !important;
    white-space: normal; overflow-wrap: anywhere; text-align: right;
    font-size: 12.5px; line-height: 1.5;
  }
  .tbl-mobile td::before {
    content: attr(data-label); flex: 0 0 76px;
    color: var(--text3); font-weight: 500; text-align: left;
  }
  .tbl-mobile td:first-child {
    margin-bottom: 4px; padding-bottom: 8px;
    border-bottom: 1px dashed var(--line); color: var(--text); font-weight: 700;
  }
  .tbl-mobile td:first-child::before { color: var(--primary); }
  .tbl-mobile td:last-child { padding-bottom: 0; }
  .tbl-mobile td[data-label="操作"] { flex-wrap: wrap; justify-content: flex-end; }
  .tbl-mobile td[data-label="操作"] > div { justify-content: flex-end; }
  .seg { flex-wrap: wrap; overflow: visible; }
  .seg a {
    flex: 0 1 auto; min-width: 0; max-width: 100%;
    white-space: normal; text-align: center; overflow-wrap: anywhere;
  }
  .tbl-sortbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin: 0 0 8px; padding: 8px 10px;
    background: #f7faff; border: 1px solid #e5eefb; border-radius: 12px;
  }
  .tbl-sortbar .tsb-label { color: var(--text3); font-size: 12px; font-weight: 600; margin-right: 2px; }
  .tbl-sortbar a {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 7px 10px; border: 1px solid #dbe5f1; border-radius: 999px;
    background: #fff; color: #5b6b82; font-size: 12px; font-weight: 600;
    line-height: 1.2; text-decoration: none;
  }
  .tbl-sortbar a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
  .tbl-sortbar a .sort-ar { font-size: 11px; opacity: .85; }
  .tbl-customers th:last-child,
  .tbl-customers td:last-child {
    position: static; min-width: 0; box-shadow: none;
  }

  .row { gap: 8px; }
  .row-title { font-size: 14px; }
  .row-sub { font-size: 11.5px; overflow-wrap: anywhere; }
  .row-right .btn { min-height: 36px; }
  .row-right[style*="flex-direction:column"] {
    flex-direction: row !important; flex-wrap: wrap;
    width: 100%; min-width: 0 !important; margin-top: 8px;
  }
  .row-right[style*="flex-direction:column"] > * { flex: 1 1 64px; }
  .row-right[style*="flex-direction:column"] .btn { width: 100%; }
  .kv .k { width: 72px; }
  .kv .v { overflow-wrap: anywhere; }

  .site-footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  :root { --app-pad: 10px; }
  .hd-inner { padding-left: 10px; padding-right: 10px; }
  .hd-title { max-width: 100px; }
  .hd-uname { max-width: 66px; }
  .hd-exit { padding: 5px 9px; }
  .card { padding: 14px 13px; }
  .mnav-grid { gap: 8px; }
  .mnav-item { padding: 10px; font-size: 13px; }
}

@media (max-width: 360px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid .stat-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
}


/* 订单管理：筛选、编辑、行操作 */
.order-filter { margin: 2px 0 12px; }
.order-filter-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.order-filter-grid .form-input { min-height: 40px; }
.order-filter-actions { display: flex; gap: 6px; white-space: nowrap; }
.order-filter-actions .btn { min-height: 40px; padding: 0 16px; }
.order-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.order-edit-actions { display: flex; align-items: center; gap: 8px; }
.order-actions { display: flex; align-items: center; gap: 6px; }
.order-actions form { margin: 0; }
@media (max-width: 640px) {
  .order-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filter-grid .of-kw, .order-filter-actions { grid-column: 1 / -1; }
  .order-filter-actions .btn { flex: 1; }
  .order-edit-grid { grid-template-columns: 1fr; }
  .order-actions { justify-content: flex-end; }
}
