:root {
  --primary: #1e56b8;
  --primary-2: #2f8fd8;
  --primary-dark: #143a7d;
  --grad: #1e56b8;
  --accent: #f0a92f;
  --bg: #f3f6fc;
  --card: #ffffff;
  --line: #e2e8f4;
  --text: #0f1b2d;
  --muted: #64748b;
  --surface: #f7f9fd;
  --surface-hover: #edf2fb;
  --surface-selected: #e5eeff;
  --tabbar-bg: rgba(255,255,255,0.96);
  --header-bg: #edf3fd;
  --header-text: #12233f;
  --header-muted: #64748b;
  --danger: #e5484d;
  --success: #0f9d8a;
  --warning: #cf8308;
  --info: #3b82f6;
  --radius: 20px;
  /* 全站统一左右留白：顶部栏、内容区、底部栏共用同一条基线 */
  --gutter: clamp(14px, 4vw, 22px);
  --radius-inner: 16px;
  --radius-control: 8px;
  --radius-tight: 6px;
  --shadow: 0 8px 26px rgba(28, 46, 84, 0.09);
  --shadow-sm: 0 2px 10px rgba(28, 46, 84, 0.06);
  --header-h: 58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color .2s ease, color .2s ease;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
ul { list-style: none; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ============ 头部 ============ */
.header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 14px rgba(35,46,90,0.08);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; letter-spacing: 0.4px; white-space: nowrap;
}
/* 纯文字品牌：没有 logo 图标、没有副标题 */
.brand.brand-text > span { line-height: 1.2; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 4px 12px rgba(122, 77, 255, 0.45);
}
.brand small { font-weight: 400; font-size: 11px; color: var(--header-muted); display: block; line-height: 1; margin-top: 2px; }

/* hidden 属性必须压住组件的 display 设定 */
[hidden] { display: none !important; }

/* ============ 游戏板块选择 ============ */
/* 只覆盖上下内边距，保留 .container 的左右留白，保证与顶部栏同一基线 */
.game-pick-page {
  padding-top: 14px; padding-bottom: 8px;
  /* 让板块列表在可视区域内水平 + 垂直居中（已无底部导航，减去顶部栏即可） */
  min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
}
/* 用 flex 居中，任何宽度下都严格水平居中 */
.game-pick-grid { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.game-pick-card {
  display: block; width: min(320px, 100%); padding: 0; border: 0; background: transparent;
  cursor: pointer; text-align: left; overflow: hidden;
  border-radius: 16px; box-shadow: 0 6px 18px rgba(14, 30, 62, .13);
  transition: transform .16s ease, box-shadow .16s ease;
}
.game-pick-card:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(14, 30, 62, .16); }
/* 4:3 比例 */
.game-pick-cover {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.game-pick-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-pick-cover span { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: 3px; }
.game-pick-info {
  position: relative; margin-top: -40px; padding: 9px 14px 11px;
  background: rgba(8, 16, 32, .62); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: space-between;
}
.game-pick-info b { color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .3px; }

.board-topbar { margin-bottom: 10px; }
.board-switch {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px;
  color: var(--text); cursor: pointer; font-weight: 600;
}
.board-switch span { font-size: 11px; color: var(--muted); font-weight: 400; }

/* 接单大厅板块下拉 + 端游手游筛选 */
.board-select-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.board-select-bar label { font-size: 13px; color: var(--muted); flex: none; }
.board-select-bar .select { flex: 1; min-width: 0; }
.hall-device-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.hall-device-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer;
}
.hall-device-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.oc-board, .oc-device {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 5px;
  background: var(--surface); color: var(--muted); margin-right: 6px;
}
.oc-blocked-reason {
  margin: 6px 0 0; font-size: 12px; color: var(--warning);
  background: #fff6e6; border-radius: 7px; padding: 6px 9px;
}
:root[data-theme="dark"] .oc-blocked-reason { background: rgba(245,187,75,.14); }
.order-card-blocked { opacity: .92; }

/* 消息：群聊与免打扰 */
.message-chat-avatar.group { background: var(--primary); color: #fff; display: grid; place-items: center; }
.message-group-tag {
  display: inline-block; font-size: 10px; padding: 0 4px; margin-left: 5px;
  border-radius: 4px; background: var(--surface-selected); color: var(--primary); vertical-align: middle;
}
.message-mute-icon { margin-left: 6px; font-size: 11px; opacity: .75; }

/* 后台：板块管理 */
.game-admin-list { display: flex; flex-direction: column; gap: 12px; }
.game-admin-card.off { opacity: .68; }
.game-admin-head { display: flex; gap: 14px; align-items: flex-start; }
.game-admin-cover {
  position: relative; width: 108px; height: 78px; flex: none; border-radius: 12px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  overflow: hidden; cursor: pointer;
}
.game-admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-admin-cover span { font-size: 20px; font-weight: 800; }
.game-admin-cover em {
  position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 10px;
  text-align: center; padding: 3px 0; background: rgba(0,0,0,.45); color: #fff;
}
.game-admin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.game-admin-info b { font-size: 16px; }
.game-admin-info small { font-size: 12px; color: var(--muted); }
.game-admin-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 2px; }
.game-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.board-chip {
  display: inline-block; font-size: 10px; font-weight: 500; padding: 1px 6px; margin-right: 6px;
  border-radius: 5px; background: var(--surface-selected); color: var(--primary); vertical-align: middle;
}

@media (max-width: 480px) {
  .game-pick-grid { gap: 11px; }
  .game-pick-card { width: min(280px, 100%); }
  .game-pick-cover span { font-size: 30px; }
  .game-pick-info b { font-size: 14px; }
  .game-pick-info { margin-top: -36px; padding: 8px 12px 10px; }
}

/* 宽屏：卡片放大但仍严格居中 */
@media (min-width: 721px) {
  .game-pick-page { padding-top: 32px; }
  .game-pick-grid { gap: 22px; }
  .game-pick-card { width: min(460px, 100%); border-radius: 20px; }
  .game-pick-cover span { font-size: 52px; }
  .game-pick-info { margin-top: -56px; padding: 14px 20px 16px; }
  .game-pick-info b { font-size: 20px; }
}

.sheet-mask {
  position: fixed; inset: 0; z-index: 400; background: rgba(8, 14, 28, 0);
  display: flex; align-items: flex-end; justify-content: center;
  transition: background .22s ease;
}
.sheet-mask.show { background: rgba(8, 14, 28, .48); }
.sheet-panel {
  width: 100%; max-width: 560px; max-height: 82vh; background: var(--card);
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -8px 32px rgba(8,14,28,.18);
}
.sheet-mask.show .sheet-panel { transform: translateY(0); }
.sheet-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-product { display: flex; gap: 12px; align-items: flex-start; }
.sheet-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface); }
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet-info { flex: 1; min-width: 0; }
.sheet-price { font-size: 22px; font-weight: 800; color: var(--danger); line-height: 1.2; }
.sheet-stock { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sheet-close {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.sheet-body { padding: 14px 18px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sku-group { margin-bottom: 18px; }
.sku-group-name { font-size: 13px; font-weight: 600; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.sku-fixed-tag { font-size: 10px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.sku-options { display: flex; flex-wrap: wrap; gap: 9px; }
.sku-opt {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 8px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; line-height: 1.2;
}
.sku-opt em { font-style: normal; font-size: 11px; color: var(--danger); }
.sku-opt.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.sku-opt.active em { color: #fff; opacity: .9; }
.sheet-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }

/* 确认页的规格明细 */
.oc-options { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.oc-option-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.oc-option-row span { color: var(--muted); }
.oc-option-row em { font-style: normal; color: var(--danger); font-size: 12px; }

/* ============ 支付独立页 ============ */
.pay-page { max-width: 560px; }
.pay-page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pay-page-head h1 { margin: 0; font-size: 20px; }
.pay-page-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.pay-page-order { font-size: 12px; color: var(--muted); }
.pay-page-amount { font-size: 38px; font-weight: 800; color: var(--danger); margin: 8px 0 4px; letter-spacing: -.5px; }
.pay-page-product { font-size: 14px; font-weight: 600; }
.pay-page-options { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pay-page-body { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pay-page-body .pay-qr-img { width: 220px; height: 220px; }
.pay-qr-caption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.pay-page-body .btn { width: 100%; }
.pay-page-tip { margin-top: 16px; font-size: 12px; color: var(--muted); }
.pay-demo-qr {
  width: 180px; height: 180px; margin: 0 auto; border-radius: 14px;
  border: 1px dashed var(--line); background: var(--surface); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-size: 13px; text-align: center;
}
.pay-demo-qr small { font-size: 11px; color: var(--warning); }

/* 后台：商品选项管理 */
.sku-admin-list { display: flex; flex-direction: column; gap: 12px; }
.sku-admin-group.off { opacity: .68; }
.sku-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sku-admin-title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sku-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sku-admin-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sku-admin-opt {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 13px;
}
.sku-admin-opt .sku-opt-label { font-weight: 600; min-width: 60px; }
.sku-admin-opt .sku-opt-price { color: var(--danger); font-size: 12px; margin-right: auto; }
.device-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.device-badge.on { background: #e8f7f2; color: #0f7d6c; border-color: transparent; }
:root[data-theme="dark"] .device-badge.on { background: rgba(95,211,234,.16); color: #5fd3ea; }
.device-check {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer;
}
.device-check input { width: 18px; height: 18px; accent-color: var(--primary); }

.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; position: relative; }
.header-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.header-nav a {
  color: var(--header-text); padding: 8px 13px; border-radius: 10px; font-size: 14px;
  transition: all .16s; white-space: nowrap;
}
.header-nav a:hover { background: rgba(29,78,216,0.08); color: var(--primary); }
.header-nav a.active { background: rgba(29,78,216,0.12); color: var(--primary); font-weight: 600; }

.user-chip {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(116,126,170,0.16);
  padding: 4px 11px 4px 5px; border-radius: 999px; margin-left: 4px; white-space: nowrap;
  cursor: pointer; position: relative; user-select: none;
}
.user-chip:hover { background: #fff; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; font-weight: 700;
}
.role-badge { font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.role-badge.customer { background: #2ecc8f; color: #063c28; }
.role-badge.booster { background: var(--accent); color: #5b3c00; }
.role-badge.developer { background: #8a7bff; color: #201a5a; }
.btn-logout { color: var(--header-muted); font-size: 15px; padding: 4px 7px; border-radius: 6px; line-height: 1; }
.btn-logout:hover { color: var(--primary); background: rgba(29,78,216,0.08); }

/* 用户下拉菜单 */
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.24);
  min-width: 160px; overflow: hidden; z-index: 150; animation: pop .16s cubic-bezier(.22,.61,.36,1);
}
.user-menu-item {
  padding: 11px 16px; font-size: 14px; color: var(--text); cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background .12s;
}
.user-menu-item:hover { background: var(--surface-hover); }
.user-menu-item.danger { color: var(--danger); }

/* ============ 底部 Tabbar（移动端） ============ */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--tabbar-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 95;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: flex; width: 100%; max-width: 100%; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }.tabbar a {
  flex: 1 1 0; min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 7px 2px 6px; color: var(--muted); font-size: 10.5px; font-weight: 500;
  position: relative; transition: color .18s; overflow: hidden;
}
.tabbar a .icon { width: 24px; height: 22px; display: flex; align-items: center; justify-content: center; }
.tabbar a .line-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.tabbar a .tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar a.active::after {
  content: ''; position: absolute; top: 0; width: 22px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--grad);
}

/* ============ 主体 ============ */
.main { flex: 1; width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 18px var(--gutter) 40px; animation: viewIn .32s cubic-bezier(.22,.61,.36,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 21px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 2px; font-size: 13px; }

/* ============ 搜索 ============ */
.search-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
/* 搜索栏左侧的小板块切换器 */
.board-mini {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  height: 36px; max-width: 104px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  color: var(--text); font-size: 12px; font-weight: 550;
  white-space: nowrap; overflow: hidden;
}
.board-mini i { font-style: normal; font-size: 9px; color: var(--muted); }
.board-mini-menu {
  position: absolute; z-index: 1200; min-width: 160px; padding: 5px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 20, 40, .16); display: grid; gap: 2px;
}
.board-mini-menu button { text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text); }
.board-mini-menu button.active { background: var(--surface-selected); color: var(--primary); font-weight: 600; }
.search-bar .input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.search-bar .input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.12); }
.search-bar input { border: none; outline: none; flex: 1; background: none; font-size: 14px; }
.search-bar .clear { color: var(--muted); font-size: 16px; padding: 2px 4px; }

/* ============ 分类：桌面侧边栏 / 移动端横向 chips ============ */
.sidebar {
  width: 176px; flex-shrink: 0;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 10px; position: sticky; top: calc(var(--header-h) + 18px);
  display: none;
}
.sidebar h3 { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.sidebar .cat { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; transition: all .15s; }
.sidebar .cat:hover { background: var(--surface-hover); }
.sidebar .cat.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(29,78,216,0.3); }

.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .chip {
  flex-shrink: 0; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--muted); border: 1px solid var(--line); transition: all .16s;
}
.cat-chips .chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(29,78,216,0.3); }

.home-layout { display: flex; gap: 18px; align-items: flex-start; }
.products-wrap { flex: 1; }

/* ============ 商品网格 ============ */
.products-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .16s, box-shadow .16s;
}
.product-card:active { transform: scale(0.97); }
.product-cover {
  aspect-ratio: 3 / 2; background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 38px; position: relative;
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover .emoji { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }
.product-body { padding: 10px 12px 12px; }
.product-name {
  font-size: 13px; font-weight: 600; line-height: 1.35; height: 36px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-price { color: var(--danger); font-size: 16px; font-weight: 800; margin-top: 6px; }
.product-price .unit { font-size: 11px; font-weight: 500; }
.product-price .per { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 3px; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; color: var(--muted); font-size: 11px; }
.product-meta .buy { color: var(--primary); font-weight: 700; font-size: 12px; }

/* 空状态 */
.empty { text-align: center; color: var(--muted); padding: 54px 18px; }
.empty .big { font-size: 44px; display: block; margin-bottom: 10px; }

/* ============ 骨架屏 ============ */
.skeleton { position: relative; overflow: hidden; background: #e9ebf4; border-radius: 8px; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.45);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-product { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.skel-product .skel-img { aspect-ratio: 4/3; border-radius: 0; }
.skel-product .skel-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: transform .12s, filter .15s, opacity .15s; border: 1px solid transparent;
  min-height: 40px;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(29,78,216,0.3); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: var(--card); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--surface-hover); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.05); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.05); }
.btn-warn { background: var(--warning); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; min-height: 32px; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; min-height: 48px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ico { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); transition: all .14s; }
.btn-ico:hover { background: var(--surface-hover); }
.btn-ico:active { transform: scale(0.92); }
.btn-ico.disabled { opacity: 0.3; cursor: not-allowed; }

/* ============ 表单 ============ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: border-color .15s, box-shadow .15s; outline: none; -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.12); }
.textarea { resize: vertical; min-height: 80px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.pay-methods { display: flex; gap: 10px; }
.pay-method {
  flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: 13px 8px;
  text-align: center; cursor: pointer; transition: all .15s; background: var(--card);
}
.pay-method:active { transform: scale(0.97); }
.pay-method.selected { border-color: var(--primary); background: var(--surface-selected); box-shadow: 0 0 0 3px rgba(29,78,216,0.12); }
.pay-method .pm-icon { font-size: 24px; }
.pay-method .pm-name { font-weight: 700; margin-top: 5px; font-size: 13px; }
.pay-method .pm-sub { font-size: 11px; color: var(--muted); }

/* ============ 卡片/面板 ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card + .card { margin-top: 14px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* 订单确认 */
.order-confirm { max-width: 720px; margin: 0 auto; }
.oc-product { display: flex; gap: 13px; padding: 14px; background: var(--surface); border-radius: 12px; }
.oc-product .thumb {
  width: 84px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px;
}
.oc-product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.oc-product .info { flex: 1; min-width: 0; }
.oc-product .name { font-weight: 700; font-size: 14px; }
.oc-product .desc { color: var(--muted); font-size: 12px; margin-top: 3px; }
.oc-product .price { color: var(--danger); font-weight: 800; font-size: 18px; margin-top: 5px; }
.oc-summary { margin-top: 14px; }
.oc-summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.oc-summary .row.total { border-top: 1px dashed var(--line); margin-top: 7px; padding-top: 13px; font-size: 15px; font-weight: 700; }
.oc-summary .total .amount { color: var(--danger); font-size: 21px; }
.oc-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--muted); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: all .15s;
}
.tab:active { transform: scale(0.96); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(29,78,216,0.3); }
.tab .count { background: rgba(0,0,0,0.1); border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.tab.active .count { background: rgba(255,255,255,0.25); }

/* ============ 订单卡片 ============ */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .15s; }
.order-card:active { transform: scale(0.995); }
.order-card .oc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.order-card .oc-no { font-weight: 600; color: var(--text); }
.order-card .oc-body { display: flex; gap: 12px; padding: 14px; }
.order-card .oc-thumb {
  width: 62px; height: 62px; border-radius: 10px; flex-shrink: 0; overflow: hidden;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px;
}
.order-card .oc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-card .oc-info { flex: 1; min-width: 0; }
.order-card .oc-title { font-weight: 700; font-size: 14px; }
.order-card .oc-detail { color: var(--muted); font-size: 12px; margin-top: 3px; word-break: break-all; }
.order-card .oc-price { color: var(--danger); font-weight: 800; font-size: 15px; margin-top: 5px; }
.order-card .oc-price small { color: var(--muted); font-weight: 400; font-size: 11px; }
.order-card .oc-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

.status-badge { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pending_payment { background: #fff3e0; color: #c77700; }
.status-pending_accept { background: #e8f0ff; color: #2563d8; }
.status-in_progress { background: #fff0f6; color: #d63384; }
.status-pending_confirm { background: #eefcf3; color: #0f9d58; }
.status-completed { background: #eef1f4; color: #6b7280; }
.status-pending { background: #fff3e0; color: #c77700; }
.status-done { background: #eefcf3; color: #0f9d58; }
.status-rejected { background: #ffe9ec; color: #d63384; }

/* 结单证明 */
.proof-box { display: flex; gap: 12px; background: var(--surface); border-radius: 12px; padding: 12px; margin-top: 10px; }
.proof-box img { width: 110px; height: 82px; object-fit: cover; border-radius: 8px; cursor: zoom-in; flex-shrink: 0; }
.proof-box .pb-text { flex: 1; min-width: 0; }
.proof-box .pb-text b { font-size: 12px; }
.proof-box .pb-text p { color: var(--text); font-size: 12px; margin-top: 4px; white-space: pre-wrap; }

/* ============ 统计卡 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.stat-card .label { color: var(--muted); font-size: 12px; }
.stat-card .value { font-size: 24px; font-weight: 800; margin-top: 4px; }
.stat-card .value.accent { color: var(--primary); }
.stat-card .value.gold { color: var(--warning); }
.stat-card .value.green { color: var(--success); }
.stat-card .sub { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ============ 余额 ============ */
.balance-hero {
  background: var(--grad); color: #fff; border-radius: var(--radius);
  padding: 24px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  box-shadow: 0 8px 24px rgba(29,78,216,0.3);
}
.balance-hero .amount { font-size: 36px; font-weight: 800; line-height: 1.1; }
.balance-hero .amount small { font-size: 16px; font-weight: 500; }
.balance-hero .sub { opacity: 0.9; font-size: 12px; margin-top: 4px; }
.withdraw-form { max-width: 420px; }

/* ============ 管理后台 ============ */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.list-grid { display: flex; flex-direction: column; gap: 12px; }
.item-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 14px; display: flex; gap: 12px; align-items: center;
}
.item-card .thumb-cell {
  width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px;
}
.item-card .thumb-cell img { width: 100%; height: 100%; object-fit: cover; }
.item-card .item-main { flex: 1; min-width: 0; }
.item-card .item-title { font-weight: 700; font-size: 14px; }
.item-card .item-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.item-card .item-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-card .item-actions .col { display: flex; flex-direction: column; gap: 4px; }
.amount-red { color: var(--danger); font-weight: 800; }

/* ============ 认证页 ============ */
.auth-wrap { max-width: 420px; margin: 26px auto; }
.auth-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 26px 22px; }
.auth-card h1 { font-size: 21px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 4px 0 20px; font-size: 13px; }
.role-picker { display: flex; gap: 10px; margin-bottom: 16px; }
.role-opt {
  flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center;
  cursor: pointer; transition: all .15s; background: var(--card);
}
.role-opt:active { transform: scale(0.97); }
.role-opt.selected { border-color: var(--primary); background: var(--surface-selected); }
.role-opt .icon { font-size: 24px; }
.role-opt .name { font-weight: 600; margin-top: 5px; font-size: 14px; }
.role-opt .desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.auth-foot { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--primary); font-weight: 600; }
.demo-accounts { margin-top: 14px; color: #b9bfd0; font-size: 11.5px; line-height: 1.8; text-align: center; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,16,40,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 18px;
  animation: fadeIn .18s; backdrop-filter: blur(2px);
}
.modal {
  background: var(--card); border-radius: 16px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.32); animation: pop .2s cubic-bezier(.22,.61,.36,1);
  max-height: 88vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 6px; position: sticky; top: 0; background: var(--card); border-radius: 16px 16px 0 0; }
.modal-head h3 { font-size: 16px; }
.modal-close { font-size: 24px; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; line-height: 1; }
.modal-close:active { background: var(--surface-hover); }
.modal-body { padding: 10px 20px 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.pay-dialog .amount-big { text-align: center; font-size: 32px; font-weight: 800; color: var(--danger); margin: 6px 0; }
.pay-dialog .qr {
  width: 168px; height: 168px; margin: 8px auto; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 68px;
}
.pay-dialog .pay-tip { text-align: center; color: var(--muted); font-size: 13px; }
.pay-dialog .pay-loading { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }
.pay-dialog .pay-qr { text-align: center; margin: 10px 0; }
.pay-dialog .pay-qr-img {
  width: 180px; height: 180px; display: block; margin: 0 auto 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px;
  image-rendering: pixelated;
}
.pay-dialog .pay-qr-note { text-align: center; color: var(--muted); font-size: 12px; }
.pay-dialog .pay-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }
.pay-dialog .pay-fail { text-align: center; color: var(--danger); font-size: 13px; padding: 16px 0; }

/* 打手不可接单原因（移动端 title 不显示，改为可见文字） */
.booster-blocked-reason {
  margin-top: 8px; font-size: 12px; line-height: 1.5;
  color: var(--warning); background: var(--warning-bg, rgba(245,158,11,.1));
  border-radius: 8px; padding: 8px 10px;
}

/* 后台：支付设置 */
.admin-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.switch-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.pay-url-box { margin-top: 12px; padding: 12px; background: var(--bg-soft, rgba(0,0,0,.03)); border-radius: 10px; font-size: 12px; }
.pay-url-box > div { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; flex-wrap: wrap; }
.pay-url-box span { color: var(--muted); min-width: 64px; }
.pay-url-box code { font-size: 12px; word-break: break-all; }
.pay-test-result { margin-top: 12px; font-size: 13px; padding: 10px 12px; border-radius: 8px; background: var(--bg-soft, rgba(0,0,0,.03)); }
.pay-test-result.ok { color: var(--success); background: var(--success-bg, rgba(16,185,129,.1)); }
.pay-test-result.fail { color: var(--danger); background: var(--danger-bg, rgba(239,68,68,.1)); }

/* 提现弹窗 */
.wd-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.wd-rules > div { background: var(--bg-soft, rgba(0,0,0,.04)); border-radius: 10px; padding: 9px 8px; text-align: center; }
.wd-rules span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.wd-rules b { font-size: 14px; }
.wd-blocked { background: var(--danger-bg, rgba(239,68,68,.1)); color: var(--danger); font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.wd-payee { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.wd-payee span { color: var(--muted); }
.wd-payee b { font-weight: 600; }

/* 提现独立页 */
.withdraw-page { max-width: 640px; }
.withdraw-summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px;
}
.withdraw-summary .ws-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-inner);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.withdraw-summary .ws-item span { font-size: 12px; color: var(--muted); }
.withdraw-summary .ws-item strong { font-size: 18px; font-weight: 800; }
.withdraw-blocked {
  background: #fdecec; color: var(--danger); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 14px;
}
:root[data-theme="dark"] .withdraw-blocked { background: rgba(239,68,68,.16); }
.withdraw-preview {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-top: 4px;
}
.withdraw-preview span { font-size: 13px; color: var(--muted); }
.withdraw-preview b { font-size: 22px; font-weight: 800; color: var(--primary); }

/* 运行日志 */
.logs-status-card .logs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.logs-status-card .logs-grid > div { background: var(--surface); border-radius: 10px; padding: 10px; }
.logs-status-card .logs-grid span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.logs-status-card .logs-grid b { font-size: 15px; font-weight: 700; }
.logs-status-card .logs-grid b.ok { color: var(--success); }
.logs-status-card .logs-grid b.warn { color: var(--warning); }
.logs-orders { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.logs-orders span { font-size: 12px; background: var(--surface); border-radius: 8px; padding: 5px 9px; color: var(--muted); }
.logs-orders b { color: var(--text); }
.logs-alerts { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.logs-alert { font-size: 13px; border-radius: 10px; padding: 10px 12px; }
.logs-alert.info { background: var(--surface); color: var(--muted); }
.logs-alert.warn { background: #fff6e6; color: #9a5b00; }
.logs-alert.danger { background: #fdecec; color: var(--danger); }
:root[data-theme="dark"] .logs-alert.warn { background: rgba(245,187,75,.16); color: #f5bb4b; }
:root[data-theme="dark"] .logs-alert.danger { background: rgba(239,68,68,.16); }
.agent-url { background: var(--surface); border-radius: 10px; padding: 12px; }
.agent-url code { font-size: 12px; word-break: break-all; }
.logs-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.logs-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.logs-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.logs-list { display: flex; flex-direction: column; }
.logs-row {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.logs-row:last-child { border-bottom: 0; }
.logs-kind {
  flex: none; font-size: 11px; border-radius: 6px; padding: 2px 7px;
  background: var(--surface); color: var(--muted);
}
.logs-kind.k-order { background: #e8f0fe; color: #1e56b8; }
.logs-kind.k-booster { background: #e8f7f2; color: #0f7d6c; }
.logs-kind.k-money { background: #fff3e0; color: #a86400; }
.logs-kind.k-user { background: #f3ecff; color: #6b46c1; }
.logs-kind.k-site { background: #eef1f6; color: #52627a; }
:root[data-theme="dark"] .logs-kind { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .logs-kind.k-order { background: rgba(111,168,255,.16); color: #9cc6ff; }
:root[data-theme="dark"] .logs-kind.k-booster { background: rgba(95,211,234,.16); color: #5fd3ea; }
:root[data-theme="dark"] .logs-kind.k-money { background: rgba(245,187,75,.16); color: #f5bb4b; }
:root[data-theme="dark"] .logs-kind.k-user { background: rgba(167,139,250,.16); color: #c4b5fd; }
.logs-msg { flex: 1; min-width: 0; line-height: 1.5; }
.logs-time { flex: none; font-size: 11px; color: var(--muted); }

/* ============ Toast ============ */
#toast-root { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: 92vw; }
.toast {
  background: #191a2e; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); animation: toastIn .25s cubic-bezier(.22,.61,.36,1);
  display: flex; align-items: center; gap: 8px;
}
.toast.error { background: var(--danger); }
.toast.success { background: #0f9d58; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ============ 页脚 ============ */
.footer { background: #16182e; color: rgba(255,255,255,0.5); padding: 20px; text-align: center; font-size: 12px; }

.success-box { text-align: center; padding: 16px 4px; }
.success-box .icon { font-size: 58px; }
.success-box h2 { margin: 10px 0 6px; }
.success-box p { color: var(--muted); }

/* ============ 桌面端 ============ */
@media (min-width: 821px) {
  body { font-size: 14px; }
  .container { padding: 24px 20px 48px; }
  .brand { font-size: 18px; }
  .sidebar { display: block; }
  .cat-chips { display: none; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
  .product-cover { font-size: 40px; }
  .product-name { font-size: 14px; height: 40px; }
  .product-price { font-size: 18px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* ============ 移动端 ============ */
@media (max-width: 820px) {
  /* 移动端不显示顶部导航整排，导航交给底部 tabbar */
  .header-links { display: none !important; }
  .header-nav { display: none !important; }
  .tabbar { display: block; }
  .main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html.is-home .main { padding-bottom: 0; }
  html.is-home .tabbar { display: none !important; }
  html.chat-route .main { padding-bottom: 0; }
  /* iOS 聚焦输入框时 16px 以下会自动放大页面，这里统一到 16px */
  .input, .textarea, select, input[type="search"], input[type="text"], input[type="password"] { font-size: 16px; }
  .brand { font-size: 14px; }
  #app-footer { display: none; }
  .user-chip { padding: 2px 6px 2px 2px; }
  .user-chip .nickname { display: none; }
  .user-chip .role-badge { display: none; }
  .user-chip .btn-logout { display: none; }
  .user-chip .avatar { width: 30px; height: 30px; font-size: 14px; }
  .user-menu { position: fixed; top: calc(var(--header-h) + 6px); right: 10px; }
  .order-card .oc-body { flex-wrap: nowrap; }
}

/* ============ 新增：头像 / 我的菜单 / 详情 / 聊天 ============ */
.avatar-img { object-fit: cover; border-radius: 50%; display: block; }
a.user-chip { text-decoration: none; color: inherit; }

.menu-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  font-size: 15px; color: var(--text); transition: background .12s;
}
.menu-row:last-child { border-bottom: none; }
.menu-row:hover { background: var(--surface-hover); }
.menu-arrow { color: var(--muted); font-size: 18px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv > span:first-child { color: var(--muted); flex-shrink: 0; }
.kv > span:last-child { text-align: right; word-break: break-all; }

.chat-box {
  flex: 1; min-height: 300px; max-height: calc(100vh - 260px);
  overflow-y: auto; background: var(--surface); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { display: flex; }
.chat-msg.me { justify-content: flex-end; }
.chat-msg .bubble {
  max-width: 76%; padding: 9px 13px; border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-sm); font-size: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.chat-msg.me .bubble { background: var(--grad); color: #fff; }

.unread-dot {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; text-align: center;
}

/* 底部导航统一使用圆润线性图标 */
.tabbar a { text-decoration: none; }


/* ============ 深色模式 ============ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #6fa8ff;
  --primary-2: #5fd3ea;
  --primary-dark: #9cc6ff;
  --grad: #2563eb;
  --accent: #f5bb4b;
  --bg: #0a1120;
  --card: #111c2e;
  --line: #223049;
  --text: #e7eef9;
  --muted: #93a5c0;
  --surface: #0e1828;
  --surface-hover: #182742;
  --surface-selected: #17304f;
  --tabbar-bg: rgba(10,17,32,0.96);
  --header-bg: #0c1524;
  --header-text: #e7eef9;
  --header-muted: #93a5c0;
  --shadow: 0 6px 24px rgba(0,0,0,0.32);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.24);
}

:root[data-theme="dark"] .header { background: var(--header-bg); color: var(--header-text); border-bottom-color: var(--line); }
:root[data-theme="dark"] .user-chip { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }
:root[data-theme="dark"] .user-chip:hover { background: rgba(255,255,255,0.13); }
:root[data-theme="dark"] .header-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
:root[data-theme="dark"] .header-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
:root[data-theme="dark"] .skeleton { background: #252d41; }
:root[data-theme="dark"] .skeleton::after {
  background: rgba(255,255,255,0.05);
}
:root[data-theme="dark"] .status-pending_payment,
:root[data-theme="dark"] .status-pending { background: rgba(255,159,26,0.16); color: #ffc46b; }
:root[data-theme="dark"] .status-pending_accept { background: rgba(59,158,255,0.16); color: #80bdff; }
:root[data-theme="dark"] .status-in_progress,
:root[data-theme="dark"] .status-rejected { background: rgba(255,71,87,0.16); color: #ff8d99; }
:root[data-theme="dark"] .status-pending_confirm,
:root[data-theme="dark"] .status-done { background: rgba(22,199,132,0.16); color: #68e0ad; }
:root[data-theme="dark"] .status-completed { background: rgba(161,171,195,0.16); color: #c0c8d8; }
:root[data-theme="dark"] .role-opt .desc { color: var(--muted); }
:root[data-theme="dark"] .btn-outline:hover { background: var(--surface-hover); }
:root[data-theme="dark"] .tabbar { border-top-color: var(--line); }
:root[data-theme="dark"] .chat-box { border: 1px solid var(--line); }
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .menu-card,
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .order-card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .item-card { border: 1px solid rgba(255,255,255,0.035); }
:root[data-theme="dark"] .input::placeholder,
:root[data-theme="dark"] .textarea::placeholder { color: #7e8aa5; }
:root[data-theme="dark"] select option { background: var(--card); color: var(--text); }

@media (max-width: 820px) {
  .header-inner { gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand { gap: 7px; font-size: 13px; min-width: 0; }
  .brand .logo { width: 31px; height: 31px; flex: 0 0 31px; }
  .brand small { font-size: 10px; }
  .header-nav { min-width: 0; }
  .tabbar { left: 0; right: 0; width: 100%; }
  .tabbar a { flex-direction: column; gap: 3px; padding: 7px 1px 7px; font-size: 10.5px; }
  .tabbar a .icon { display: flex; }
  .main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}


/* ============ 我的订单快捷入口 ============ */
.my-orders-overview { padding: 20px 18px 18px; margin: 0 0 14px; border-radius: 18px; }
.orders-overview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 18px; }
.orders-overview-head h1 { font-size: 21px; font-weight: 800; color: var(--text); }
.orders-all-link { display:flex; align-items:center; gap:1px; color:var(--muted); font-size:15px; white-space:nowrap; }
.orders-all-link .line-icon { width:18px; height:18px; }
.orders-shortcuts { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; }
.orders-shortcut { min-width:0; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:7px 2px 3px; color:var(--text); border-radius:12px; }
.orders-shortcut:active { background:var(--surface-hover); transform:scale(.97); }
.shortcut-icon { display:flex; align-items:center; justify-content:center; width:42px; height:42px; color:var(--text); }
.shortcut-icon .line-icon { width:35px; height:35px; stroke-width:1.85; }
.shortcut-label { font-size:clamp(10px,2.7vw,13px); line-height:1.25; white-space:nowrap; letter-spacing:-.3px; }
.shortcut-count { position:absolute; top:0; right:clamp(1px,1.6vw,12px); min-width:18px; height:18px; padding:0 5px; display:flex; align-items:center; justify-content:center; border-radius:999px; background:#ff6a22; color:white; font-size:10px; font-weight:700; }
.order-filter-tabs { display:flex; gap:8px; margin:0 0 14px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.order-filter-tabs::-webkit-scrollbar { display:none; }
.order-filter-tabs .tab { flex:0 0 auto; border:1px solid var(--line); background:var(--card); color:var(--muted); border-radius:999px; padding:7px 12px; font-size:12px; white-space:nowrap; }
.order-filter-tabs .tab.active { background:var(--grad); color:#fff; border-color:transparent; }
.back-link { font-size:22px; color:var(--muted); line-height:1; }
.refund-inline-status,.refund-state-line { color:var(--warning); font-size:12px; font-weight:600; }
.refund-state-line { padding:7px 9px; border-radius:8px; margin-top:8px; background:var(--surface); }
.refund-detail-panel,.review-detail-panel { margin-top:14px; padding:12px 14px; border-radius:12px; background:var(--surface); color:var(--text); font-size:13px; }
.refund-detail-panel p,.review-detail-panel p { margin-top:5px; color:var(--muted); white-space:pre-wrap; word-break:break-word; }
.modal-actions { display:flex; gap:10px; margin-top:16px; }
.modal-actions .btn { flex:1; }
.review-rating { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px 0 20px; }
.rating-star { font-size:34px; line-height:1; color:var(--line); transition:transform .12s,color .12s; }
.rating-star.selected { color:#ffb323; }
.rating-star:active { transform:scale(1.15); }
.status-reviewed { background:#edf0ff; color:#4d5cdb; }
.status-refunded { background:#e8f8f0; color:#0b9864; }
:root[data-theme="dark"] .status-reviewed { background:rgba(112,127,255,.18); color:#aeb8ff; }
:root[data-theme="dark"] .status-refunded { background:rgba(22,199,132,.16); color:#68e0ad; }

/* ============ 系统通知卡片 ============ */
.system-notifications { margin-bottom:22px; }
.notification-list { display:flex; flex-direction:column; gap:12px; }
.notification-card { cursor:pointer; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:15px; box-shadow:var(--shadow-sm); transition:transform .15s,box-shadow .15s; }
.notification-card:active { transform:scale(.995); }
.notification-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; }
.notification-title-row h3 { font-size:16px; line-height:1.4; font-weight:800; color:var(--primary); }
.notification-title-row time { flex-shrink:0; color:var(--muted); font-size:10px; }
.notification-product { display:flex; align-items:center; gap:12px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.notification-cover { flex:0 0 58px; width:58px; height:58px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:11px; background:var(--surface); color:var(--muted); }
.notification-cover img { width:100%; height:100%; object-fit:cover; }
.notification-product-name { min-width:0; font-size:14px; font-weight:650; color:var(--text); line-height:1.45; }
.notification-proof { margin-top:12px; padding:12px; border-radius:12px; background:var(--surface); }
.notification-proof-label { font-size:13px; font-weight:700; margin-bottom:9px; }
.notification-proof img { width:100%; max-height:240px; object-fit:contain; border-radius:9px; background:var(--card); }
.notification-proof p { font-size:12px; color:var(--muted); margin-top:8px; white-space:pre-wrap; }
.notification-order-no { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:10px; color:var(--muted); font-size:11px; }
.notification-order-no span { color:var(--primary); font-weight:650; }

@media (max-width:380px) {
  .my-orders-overview { padding:17px 12px 15px; }
  .orders-shortcut { gap:6px; }
  .shortcut-icon { width:36px; height:36px; }
  .shortcut-icon .line-icon { width:31px; height:31px; }
  .shortcut-label { font-size:10px; }
  .shortcut-count { right:0; }
  .notification-card { padding:12px; }
  .notification-title-row h3 { font-size:15px; }
}

.status-pending_review { background:#fff4df; color:#ad760d; }
:root[data-theme="dark"] .status-pending_review { background:rgba(255,177,55,.16); color:#ffcf78; }


/* ============ 我的首页 / 打手保障金 ============ */
.my-home { max-width: 920px; }
.my-profile-card { padding: 18px; }
.my-orders-overview { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.orders-shortcuts { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 14px; }
.orders-shortcut { min-height: 76px; }
.booster-requirement-note { padding: 10px 15px 13px; color: var(--muted); font-size: 12px; line-height: 1.6; border-top: 1px solid var(--line); }
.booster-gate-notice { margin: 0 0 14px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.booster-gate-notice b { display: block; margin-bottom: 5px; color: var(--warning); font-size: 15px; }
.booster-gate-notice p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.booster-deposit-card { padding: 16px 18px; }
.deposit-info { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.deposit-title { font-size:14px; font-weight:700; color:var(--text); }
.deposit-amount { margin-top:4px; font-size:24px; font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; }
.deposit-amount span { color:var(--muted); font-size:13px; font-weight:500; }
.deposit-warning { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--surface); color:var(--warning); font-size:12px; line-height:1.5; }
.notification-message { margin: -3px 0 12px; color:var(--muted); font-size:13px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.notification-product-price { margin-top:5px; color:var(--primary); font-size:13px; font-weight:750; }
.notification-amount { padding-top:10px; border-top:1px solid var(--line); color:var(--danger); font-size:13px; font-weight:700; }
.notification-system-card { cursor:default; }
.notification-system-card[role="button"] { cursor:pointer; }
:root[data-theme="dark"] .booster-gate-notice,
:root[data-theme="dark"] .booster-deposit-card { border-color:rgba(255,255,255,.06); }

@media (max-width: 600px) {
  .orders-shortcuts { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 1px; row-gap: 8px; }
  .orders-shortcuts-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .orders-shortcut { min-height: 72px; padding-left:0; padding-right:0; }
  .shortcut-label { font-size:clamp(9px, 2.6vw, 10.5px); }
  .my-profile-card { padding:14px; }
  .deposit-info { align-items:flex-start; }
}

/* ============ 商品详情页（移动端商品展示风格） ============ */
.product-detail-page { min-height: 100vh; padding-bottom: 92px; background: var(--bg); }
.product-detail-top { height:calc(48px + env(safe-area-inset-top)); box-sizing:border-box; padding-top:env(safe-area-inset-top); display:flex; align-items:center; gap:14px; padding-left:16px; padding-right:16px; background:var(--card); border-bottom:1px solid var(--line); }
.product-detail-top a { width:30px; font-size:31px; line-height:1; color:var(--text); }
.product-detail-top strong { flex:1; text-align:center; font-size:17px; font-weight:650; margin-left:-30px; }
.detail-top-spacer { width:30px; }
.product-detail-hero { width:100%; aspect-ratio:1/1; max-height:560px; overflow:hidden; background:var(--surface); display:flex; align-items:center; justify-content:center; }
.product-detail-hero img { width:100%; height:100%; object-fit:cover; }
.product-detail-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:var(--muted); background:var(--surface); }
.product-detail-content { padding-top:14px; padding-bottom:26px; }
.product-detail-summary { padding:18px 18px 16px; }
.product-detail-price-line { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.product-detail-price { color:#ee514f; font-size:38px; line-height:1.1; font-weight:800; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.product-detail-price small { font-size:18px; margin-right:3px; }
.product-share-btn { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--muted); background:var(--surface); }
.product-detail-summary h1 { font-size:21px; line-height:1.35; font-weight:800; color:var(--text); overflow-wrap:anywhere; }
.product-detail-meta { display:flex; justify-content:space-between; gap:10px; margin-top:16px; padding-top:13px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.product-detail-section { margin-top:14px; padding:18px; }
.product-section-title { display:flex; align-items:center; justify-content:center; gap:12px; font-size:17px; font-weight:800; margin-bottom:13px; }
.product-section-title:before,.product-section-title:after { content:''; width:42px; height:2px; border-radius:9px; background:var(--primary); }
.product-section-title:after { transform:rotate(180deg); }
.product-detail-section p { margin-top:8px; font-size:14px; line-height:1.85; color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }
.product-safety-note { margin-top:12px; border:1px solid rgba(31,169,111,.25); background:rgba(31,169,111,.07); color:#26784f; border-radius:14px; padding:12px 14px; display:flex; align-items:flex-start; gap:10px; font-size:13px; line-height:1.65; }
.safety-mark { flex:0 0 22px; width:22px; height:22px; display:flex; align-items:center; justify-content:center; border:1.5px solid currentColor; border-radius:50%; font-weight:700; }
.product-detail-dock { position:fixed; z-index:96; left:0; right:0; bottom:0; display:flex; align-items:center; gap:10px; padding:10px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); background:var(--card); border-top:1px solid var(--line); box-shadow:0 -4px 18px rgba(30,35,70,.08); }
.product-dock-link { flex:0 0 56px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--text); font-size:11px; }
.product-dock-link .line-icon { width:24px; height:24px; stroke-width:1.9; }
.product-buy-btn { flex:1; min-height:48px; border-radius:999px; font-size:17px; font-weight:750; }
.checkout-actions { display:flex; gap:10px; margin-top:16px; }
.checkout-actions .btn { flex:1; }
.admin-order-actions { display:flex; gap:7px; flex-wrap:wrap; padding:0 14px 12px; }
.admin-refund-card { padding:14px; }
.admin-refund-card .oc-body { align-items:flex-start; }
.admin-user-search { display:flex; gap:8px; margin:10px 0 14px; }
.admin-user-search .input { flex:1; min-width:0; }
.admin-user-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.admin-user-detail-grid > div { min-width:0; padding:10px 12px; border-radius:10px; background:var(--surface); }
.admin-user-detail-grid label { display:block; color:var(--muted); font-size:11px; margin-bottom:4px; }
.admin-user-detail-grid b { display:block; overflow-wrap:anywhere; font-size:13px; }
.admin-user-detail-grid .wide { grid-column:1/-1; }
.status-cancelled { background:rgba(130,140,160,.14); color:var(--muted); }
.admin-remark-line { padding:7px 9px; margin-top:8px; border-radius:8px; background:var(--surface); color:var(--muted); font-size:12px; white-space:pre-wrap; }
.wallet-ledger-card,.unpaid-fines-card { margin-top:14px; }
.wallet-credit { color:var(--success); white-space:nowrap; }
.wallet-debit { color:var(--danger); white-space:nowrap; }

@media (max-width:560px) {
  .product-detail-page { padding-bottom:calc(78px + env(safe-area-inset-bottom)); }
  .product-detail-hero { aspect-ratio:1/1; max-height:none; }
  .product-detail-price { font-size:34px; }
  .product-detail-summary h1 { font-size:19px; }
  .product-detail-dock { gap:6px; padding-left:10px; padding-right:10px; }
  .product-dock-link { flex-basis:48px; }
  .product-buy-btn { min-height:46px; font-size:16px; }
  .checkout-actions { flex-direction:column-reverse; }
  .admin-order-actions { padding-left:0; padding-right:0; }
  .admin-user-detail-grid { grid-template-columns:1fr; }
  .admin-user-detail-grid .wide { grid-column:auto; }
}

/* 微信内置浏览器与商品详情顶部安全区 */
@supports (padding: max(0px)) {
  .product-detail-dock { padding-left:max(10px, env(safe-area-inset-left)); padding-right:max(10px, env(safe-area-inset-right)); }
}

/* ============ 系统通知：列表摘要与独立详情 ============ */
.notification-inbox-card {
  display:block; padding:14px 15px; border:1px solid var(--line); border-radius:15px;
  background:var(--card); box-shadow:var(--shadow-sm); cursor:pointer; transition:background .15s, transform .15s;
}
.notification-inbox-card:active { transform:scale(.995); background:var(--surface-hover); }
.notification-inbox-card.is-unread { border-left:3px solid var(--primary); padding-left:13px; }
.notification-inbox-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.notification-inbox-title { display:flex; align-items:center; gap:8px; min-width:0; font-size:15px; line-height:1.4; font-weight:750; color:var(--text); }
.notification-inbox-head time { flex:0 0 auto; color:var(--muted); font-size:10px; white-space:nowrap; }
.notification-unread-dot { display:inline-block; flex:0 0 7px; width:7px; height:7px; border-radius:50%; background:#f05a55; }
.notification-inbox-preview { margin-top:7px; color:var(--muted); font-size:13px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.notification-inbox-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px; padding-top:9px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.notification-inbox-foot span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.notification-inbox-foot b { flex:0 0 auto; color:var(--primary); font-size:11px; font-weight:650; }
.notification-detail-page { max-width:760px; }
.notification-detail-page-head { display:flex; align-items:center; gap:10px; }
.notification-detail-page-head h1 { margin:0; font-size:19px; }
.notification-detail-card { padding:18px; border:1px solid var(--line); border-radius:17px; background:var(--card); box-shadow:var(--shadow-sm); }
.notification-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.notification-detail-head h2 { font-size:19px; line-height:1.45; font-weight:800; color:var(--primary); }
.notification-detail-head time { flex:0 0 auto; color:var(--muted); font-size:10px; }
.notification-detail-message { padding:14px 0; color:var(--text); font-size:14px; line-height:1.85; white-space:pre-wrap; overflow-wrap:anywhere; }
.notification-detail-amount { padding:11px 0; color:var(--danger); font-size:14px; font-weight:750; border-top:1px solid var(--line); }
.notification-detail-product { display:flex; align-items:center; gap:12px; padding:13px 0; border-top:1px solid var(--line); }
.notification-detail-product > div:last-child { min-width:0; display:flex; flex-direction:column; gap:5px; }
.notification-detail-product b { font-size:14px; overflow-wrap:anywhere; }
.notification-detail-product span { color:var(--muted); font-size:12px; }
.notification-detail-proof { margin-top:8px; padding:13px; border-radius:13px; background:var(--surface); }
.notification-detail-proof h3 { margin-bottom:10px; font-size:14px; font-weight:750; }
.notification-detail-proof img { display:block; width:100%; max-height:560px; object-fit:contain; border-radius:9px; background:var(--card); }
.notification-detail-proof p { margin-top:8px; color:var(--muted); font-size:13px; line-height:1.7; white-space:pre-wrap; }
.notification-detail-order-no { padding:13px 0; color:var(--muted); border-top:1px solid var(--line); font-size:12px; overflow-wrap:anywhere; }
.notification-detail-action { width:100%; margin-top:8px; }
.site-settings-card { padding:18px; }
.site-settings-card .hint { margin:0 0 12px; color:var(--muted); font-size:12px; line-height:1.65; }
.site-notice-editor { min-height:180px; line-height:1.75; }
.site-settings-actions { display:flex; justify-content:flex-end; margin-top:14px; }
:root[data-theme="dark"] .notification-inbox-card,
:root[data-theme="dark"] .notification-detail-card,
:root[data-theme="dark"] .site-settings-card { border-color:rgba(255,255,255,.08); }
@media (max-width:560px) {
  .notification-inbox-card { padding:12px; }
  .notification-inbox-card.is-unread { padding-left:10px; }
  .notification-inbox-title { font-size:14px; }
  .notification-detail-card { padding:14px; }
  .notification-detail-head { flex-direction:column; gap:5px; }
  .notification-detail-head h2 { font-size:17px; }
  .site-settings-card { padding:14px; }
}


/* 用户余额充值/提现操作区 */
.wallet-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.input-affix { display:flex; align-items:center; gap:8px; padding-left:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); }
.input-affix .input { border:0; background:transparent; box-shadow:none; min-width:0; }
.input-affix:focus-within { border-color:var(--primary); box-shadow:0 0 0 3px rgba(91,103,255,.12); }
@media (max-width:560px) {
  .wallet-actions { width:100%; }
  .wallet-actions .btn { flex:1; min-width:0; }
  .balance-hero { align-items:flex-start; }
}


/* ============ 消息会话列表：参考移动端会话中心布局 ============ */
.message-page { max-width: 820px; padding-top: 20px; }
.message-page-header { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.message-page-title { display:flex; align-items:baseline; gap:7px; color:var(--text); font-size:23px; line-height:1.3; font-weight:800; }
.message-page-title span { color:var(--muted); font-size:14px; font-weight:500; }
.message-clear-unread { padding:5px 10px; border-radius:8px; background:var(--surface); color:var(--muted); font-size:12px; line-height:1.4; }
.message-clear-unread:disabled { opacity:.55; }
.message-categories { padding:0 0 11px; border-bottom:7px solid var(--surface-hover); }
.message-category-row,.message-chat-row { display:flex; align-items:center; gap:14px; min-width:0; padding:13px 2px; color:var(--text); }
.message-category-row:active,.message-chat-row:active { background:var(--surface-hover); }
.message-category-icon { flex:0 0 58px; width:58px; height:58px; display:flex; align-items:center; justify-content:center; border-radius:12px; }
.message-category-icon.transaction { background:#fff0e7; color:#ef650d; }
.message-category-icon.aftersales { background:#e9f5ff; color:#168bd5; }
.message-category-icon.account { background:#fff7dc; color:#d99a08; }
.message-category-icon .line-icon { width:30px; height:30px; stroke-width:2; }
.message-row-main { flex:1; min-width:0; }
.message-row-title { color:var(--text); font-size:16px; line-height:1.4; font-weight:750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-row-preview { margin-top:5px; color:var(--muted); font-size:13px; line-height:1.45; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-row-meta { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:9px; min-width:34px; }
.message-row-meta time { color:var(--muted); font-size:11px; white-space:nowrap; }
.message-unread-badge { display:inline-flex; align-items:center; justify-content:center; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:#f36b18; color:#fff; font-size:10px; font-weight:750; line-height:1; }
.message-section-heading { padding:17px 0 4px; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.02em; }
.message-chat-list { display:flex; flex-direction:column; }
.message-chat-row { min-height:79px; border-bottom:1px solid var(--line); }
.message-chat-avatar { flex:0 0 55px; width:55px; height:55px; display:flex; align-items:center; justify-content:center; border-radius:12px; overflow:hidden; background:var(--surface); color:var(--primary); font-size:19px; font-weight:750; }
.message-chat-avatar img { width:100%; height:100%; object-fit:cover; }
.message-chat-avatar.support { background:#e8f1ff; color:#3978d5; }
.message-chat-avatar .line-icon { width:28px; height:28px; }
.message-chat-avatar.default { background:#e9efff; color:#626fe4; }
.message-empty { padding:28px 8px; text-align:center; color:var(--muted); font-size:13px; }
.notification-group-page { max-width:820px; }
.notification-group-page .page-head { display:flex; align-items:center; gap:10px; }
.notification-group-page .page-head h1 { margin:0; font-size:20px; }
:root[data-theme="dark"] .message-category-icon.transaction { background:rgba(239,101,13,.15); color:#ff9a58; }
:root[data-theme="dark"] .message-category-icon.aftersales { background:rgba(22,139,213,.16); color:#72c3ff; }
:root[data-theme="dark"] .message-category-icon.account { background:rgba(217,154,8,.16); color:#ffd36b; }
:root[data-theme="dark"] .message-chat-avatar.support { background:rgba(57,120,213,.18); color:#87b5ff; }
@media (max-width:560px) {
  .message-page { padding:16px 16px calc(28px + env(safe-area-inset-bottom)); }
  .message-page-header { margin-bottom:12px; }
  .message-page-title { font-size:22px; }
  .message-category-row { gap:13px; padding:12px 0; }
  .message-category-icon { flex-basis:56px; width:56px; height:56px; }
  .message-row-title { font-size:15px; }
  .message-row-preview { font-size:12px; max-width:100%; }
  .message-row-meta time { font-size:10px; }
  .message-chat-row { gap:12px; min-height:76px; }
  .message-chat-avatar { flex-basis:52px; width:52px; height:52px; }
  .message-section-heading { padding-top:15px; }
}

/* ================= 邀请打手 ================= */
.cover-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; font-size: 22px; font-weight: 700; }

.invite-card { padding: 18px 18px 14px; }
.invite-title { font-size: 17px; font-weight: 800; color: #12235c; letter-spacing: .5px; line-height: 1.3; }
html[data-theme="dark"] .invite-title { color: #cbd6f7; }
.invite-divider { height: 1px; background: var(--line); margin: 12px 0 18px; }
.invite-row {
  display: flex; align-items: flex-start; gap: 20px;
  overflow-x: auto; overflow-y: hidden; padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.invite-row::-webkit-scrollbar { display: none; }
.invite-person { flex: 0 0 auto; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.invite-circle {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  box-sizing: border-box;
}
.invite-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.invite-circle-me {
  background: var(--grad);
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, .32), 0 2px 4px rgba(20, 26, 60, .12), inset 0 -3px 8px rgba(0, 0, 0, .12);
}
.invite-circle-me span { font-size: 20px; font-weight: 700; color: #fff; }
.invite-circle-booster {
  background: #eef1ff; border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(31, 42, 94, .18), inset 0 -3px 8px rgba(0, 0, 0, .05);
}
.invite-circle-booster span { font-size: 20px; font-weight: 700; color: var(--primary); }
.invite-add {
  background: #f2f4f9; border: 1px dashed #ccd3e4; padding: 0; cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 42, 94, .08); transition: transform .15s ease, background .15s ease;
}
.invite-add span { color: #7c88a6; font-size: 30px; font-weight: 300; line-height: 1; }
.invite-add:active { transform: scale(.94); background: #e9edf6; }
html[data-theme="dark"] .invite-add { background: #232a3d; border-color: #3a4460; }
.invite-name {
  font-size: 11px; line-height: 1.3; color: var(--muted); max-width: 62px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.invite-hint { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---- 打手选择页 ---- */
.picker-section { margin-bottom: 20px; }
.picker-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; letter-spacing: .4px; }
.picker-group { margin-bottom: 14px; }
.picker-letter { font-size: 12px; font-weight: 800; color: var(--primary); padding: 2px 0 6px; letter-spacing: .6px; }
.picker-list { display: flex; flex-direction: column; gap: 8px; }
.picker-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.picker-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 17px;
}
.picker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.picker-info { flex: 1; min-width: 0; }
.picker-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.picker-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface); font-size: 11px; color: var(--muted); }
.picker-badge-warm { background: #fff5e6; color: #b06b00; }
html[data-theme="dark"] .picker-badge-warm { background: #3a2c14; color: #ffc46b; }

/* ---- 接单大厅：邀请卡片 ---- */
.invite-inbox { margin-bottom: 18px; }
.invite-inbox-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 10px;
}
.invite-inbox-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.invite-inbox-list { display: flex; flex-direction: column; gap: 10px; }
.invite-ticket {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.invite-ticket-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #eef1ff;
  font-size: 12px; font-weight: 700; color: #3b4a86;
}
html[data-theme="dark"] .invite-ticket-head { background: #232a45; color: #b9c4ee; }
.invite-ticket-from { font-weight: 400; color: var(--muted); }
.invite-ticket-body { display: flex; gap: 12px; padding: 12px 14px; }
.invite-ticket-thumb {
  width: 68px; height: 68px; border-radius: 12px; overflow: hidden; flex: 0 0 auto;
  background: var(--surface);
}
.invite-ticket-thumb img { width: 100%; height: 100%; object-fit: cover; }
.invite-ticket-info { flex: 1; min-width: 0; }
.invite-ticket-name { font-size: 14px; font-weight: 700; line-height: 1.4; }
.invite-ticket-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.invite-ticket-money { font-size: 16px; font-weight: 800; color: var(--danger); margin-top: 6px; }
.invite-ticket-money small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.invite-ticket-actions { display: flex; gap: 10px; padding: 0 14px 14px; }
.invite-ticket-actions .btn { flex: 1; }

/* ================= 反馈 ================= */
.feedback-item, .feedback-admin-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 10px;
}
.feedback-admin-card { box-shadow: var(--shadow-sm); }
.feedback-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feedback-role { font-size: 12px; font-weight: 700; color: var(--primary); }
.feedback-role.is-booster { color: #16a34a; }
.feedback-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: #fff4e5; color: #b06b00;
}
.feedback-tag.is-done { background: #e8f8ef; color: #128a4f; }
.feedback-time { margin-left: auto; font-size: 11px; color: var(--muted); }
.feedback-body { font-size: 13px; line-height: 1.7; margin-top: 8px; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.feedback-reply {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); font-size: 12px; line-height: 1.7; color: var(--text);
}
.feedback-reply b { display: block; margin-bottom: 4px; color: var(--primary); font-size: 12px; }
.feedback-reply p { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* ================= 打手在线状态 ================= */
.booster-status-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.status-seg { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; }
.status-seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  font-family: inherit;
}
.status-seg-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: #c3cadb; display: inline-block; }
.status-seg-btn.active-off { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.status-seg-btn.active-off .dot { background: #9aa3b8; }
.status-seg-btn.active-on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(29, 78, 216, .32); }
.status-seg-btn.active-on .dot { background: #7dfab4; box-shadow: 0 0 0 3px rgba(125, 250, 180, .25); }
.status-bar-text { font-size: 12px; color: var(--muted); }
.status-bar-text b.on { color: var(--success); }
.status-bar-text b.off { color: var(--muted); }

.picker-badge-on { background: #e8f8ef; color: #128a4f; }
.picker-badge-off { background: #f0f2f7; color: #8d95a8; }
.picker-badge-busy { background: #fff1e6; color: #b45a00; }
html[data-theme="dark"] .picker-badge-on { background: #14301f; color: #66e0a0; }
html[data-theme="dark"] .picker-badge-off { background: #262c3d; color: #98a0b5; }
html[data-theme="dark"] .picker-badge-busy { background: #3a2a14; color: #ffb266; }

.invite-empty { font-size: 13px; color: var(--muted); padding: 6px 2px 2px; }

/* ================= 敏感词审核 ================= */
.sens-summary {
  margin: 10px 0 14px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); font-size: 13px; color: var(--muted);
}
.sens-summary b { color: var(--primary); font-size: 15px; }
.sens-list { display: flex; flex-direction: column; gap: 8px; }
.sens-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.sens-row-main { min-width: 0; }
.sens-name { font-size: 14px; font-weight: 700; color: var(--text); }
.sens-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 46px; height: 26px; border-radius: 999px; background: #d7dce8;
  display: inline-block; position: relative; transition: background .2s ease;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(20, 26, 60, .22);
  transition: transform .2s cubic-bezier(.22,.61,.36,1);
}
.switch input:checked + .switch-track { background: var(--grad); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
html[data-theme="dark"] .switch-track { background: #39425c; }

.sens-add { display: flex; gap: 10px; margin: 10px 0 12px; }
.sens-add .input { flex: 1; margin: 0; }
.sens-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sens-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--text);
}
.sens-chip-x {
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  font-size: 16px; line-height: 1; padding: 0 4px; font-family: inherit;
}
.sens-chip-x:hover { color: var(--danger); }
.sens-result { margin-top: 12px; font-size: 13px; }
.sens-result-bad { padding: 10px 14px; border-radius: 10px; background: #fff1f2; color: #c81e2b; }
.sens-result-ok { padding: 10px 14px; border-radius: 10px; background: #e9f9f0; color: #128a4f; }
html[data-theme="dark"] .sens-result-bad { background: #3a1a1e; color: #ff9aa3; }
html[data-theme="dark"] .sens-result-ok { background: #14301f; color: #66e0a0; }

/* ================= AI 客服悬浮窗 ================= */
.support-fab {
  position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 900; width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(29, 78, 216, .32);
}
.support-fab:active { transform: scale(.94); }
.support-panel {
  position: fixed; z-index: 950; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px)); height: min(520px, calc(100dvh - 160px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 20, 40, .22);
}
.support-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.support-head b { font-size: 15px; }
.support-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.support-head button { font-size: 22px; color: var(--muted); line-height: 1; padding: 0 4px; }
.support-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.support-msg { max-width: 84%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.support-msg.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.support-msg.me { align-self: flex-end; background: var(--primary); color: #fff; }
.support-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
.support-chips::-webkit-scrollbar { display: none; }
.support-chips button { flex: 0 0 auto; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 12px; }
.support-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.support-input input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 16px; }
.support-input button { flex: 0 0 auto; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; }
.support-input button:disabled { opacity: .6; }
@media (min-width: 821px) {
  .support-fab { bottom: 24px; }
  .support-panel { bottom: 88px; }
}

/* ================= 本地图形验证码 ================= */
.local-captcha { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; }
.local-captcha img { width: 120px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #eef2f9; flex: 0 0 auto; }
.local-captcha .input { flex: 1; min-width: 0; height: 44px; text-transform: uppercase; letter-spacing: 2px; }
.local-captcha-refresh { flex: 0 0 auto; height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 12px; }

/* ================= 用户须知 / 协议勾选 ================= */
.agree-row { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 4px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.agree-row input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; accent-color: var(--primary); }
.agree-row a { color: var(--primary); }
.legal-body { max-height: 58vh; overflow-y: auto; font-size: 13.5px; line-height: 1.75; color: var(--text); }
.legal-body p { margin: 0 0 10px; }
.legal-body b { font-weight: 650; }

/* ================= 指定打手 ================= */
.booster-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 14px; text-align: left;
}
.booster-select-btn i { font-style: normal; color: var(--muted); font-size: 18px; }
.bp-list { display: grid; gap: 8px; padding-bottom: 8px; }
.bp-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left;
}
.bp-row:active { background: var(--surface-hover); }
.bp-row.is-disabled { opacity: .5; }
.bp-row.is-disabled .bp-go { color: var(--muted); }
.bp-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
}
.bp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bp-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bp-main b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-main small { color: var(--muted); font-size: 11.5px; }
.bp-go { flex: 0 0 auto; color: var(--primary); font-size: 12.5px; font-weight: 600; }
.bp-none .bp-avatar { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); }


/* ================= 聊天页面（固定底部输入框） ================= */
.chat-page {
  display: flex; flex-direction: column;
  max-width: 720px;
  height: calc(var(--chat-h, 100dvh) - var(--header-h) - 12px);
  overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; flex: 0 0 auto; }
.chat-head h1 { margin: 0; font-size: 17px; }
.chat-back { font-size: 24px; line-height: 1; color: var(--muted); padding: 0 4px; }
.chat-page .chat-box { flex: 1 1 auto; min-height: 0; max-height: none; }
.chat-page .chat-compose { flex: 0 0 auto; padding-top: 8px; }
@media (max-width: 820px) {
  .chat-page {
    height: calc(var(--chat-h) - var(--header-h) - 68px - env(safe-area-inset-bottom));
  }
  .chat-page .chat-compose { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
  .chat-page #chat-input { font-size: 16px; }
}

.chat-compose { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.chat-img-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.chat-img-btn:hover { background: var(--surface); color: var(--primary); }
.chat-img-btn:disabled { opacity: .5; cursor: default; }
.bubble-img { padding: 4px !important; background: transparent !important; box-shadow: none !important; }
.bubble-img img {
  display: block; max-width: 210px; max-height: 260px; border-radius: 12px;
  cursor: zoom-in; object-fit: cover; background: var(--surface);
}
.chat-img-cap {
  margin-top: 6px; padding: 6px 10px; border-radius: 10px;
  background: var(--card); font-size: 13px; line-height: 1.5; color: var(--text);
  border: 1px solid var(--line); word-break: break-word;
}
.chat-msg.me .chat-img-cap { background: #eef1ff; border-color: #dfe4ff; }
html[data-theme="dark"] .chat-msg.me .chat-img-cap { background: #232a45; border-color: #2c354d; }

/* ================= 聊天消息发送状态（微信式） ================= */
.chat-msg { flex-direction: column; align-items: flex-start; }
.chat-msg.me { justify-content: flex-start; align-items: flex-end; }
.msg-line { display: flex; align-items: center; gap: 8px; max-width: 84%; }
.chat-msg .bubble { max-width: 100%; }
.chat-msg .bubble-img { max-width: 100%; }

.msg-fail {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: #ff3b30; color: #fff; font-size: 15px; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  animation: msgPop .18s ease-out;
}
@keyframes msgPop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.msg-tip {
  margin-top: 5px; font-size: 11px; color: var(--danger);
  display: flex; align-items: center; gap: 8px; text-align: right;
}
.msg-tip-sending { color: var(--muted); }
.msg-retry {
  border: 0; background: transparent; color: var(--primary);
  font-size: 11px; cursor: pointer; padding: 0; font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.is-sending .bubble { opacity: .62; }
.is-failed .bubble { box-shadow: 0 0 0 1.5px rgba(255, 59, 48, .45) !important; }

.user-menu,
.oc-product,
.proof-box,
.refund-detail-panel,
.review-detail-panel,
.notification-proof,
.notification-detail-proof,
.picker-row,
.product-safety-note,
.sens-summary,
.sens-row { border-radius: var(--radius-inner); }

.sidebar,
.product-card,
.skel-product,
.card,
.order-card,
.stat-card,
.balance-hero,
.item-card,
.auth-card,
.modal,
.menu-card,
.chat-box,
.my-orders-overview,
.notification-card,
.booster-gate-notice,
.notification-inbox-card,
.notification-detail-card,
.invite-ticket,
.feedback-item,
.feedback-admin-card,
.booster-status-bar { border-radius: var(--radius); }

.brand .logo,
.header-nav a,
.user-chip,
.search-bar .input-wrap,
.sidebar .cat,
.cat-chips .chip,
.btn,
.btn-lg,
.role-opt,
.input,
.select,
.textarea,
.pay-method,
.pay-dialog .qr,
.toast,
.chat-msg .bubble,
.oc-product .thumb,
.tabs .tab,
.order-filter-tabs .tab,
.orders-shortcut,
.product-buy-btn,
.input-affix,
.message-category-icon,
.message-chat-avatar,
.invite-ticket-thumb,
.status-seg,
.status-seg-btn,
.sens-chip,
.chat-img-btn,
.bubble-img img,
.chat-img-cap { border-radius: var(--radius-control); }

.btn-sm,
.btn-ico,
.skeleton,
.tab .count,
.status-badge,
.proof-box img,
.order-card .oc-thumb,
.item-card .thumb-cell,
.modal-close,
.chat-msg .msg-time,
.refund-state-line,
.notification-cover,
.notification-proof img,
.deposit-warning,
.admin-user-detail-grid > div,
.admin-remark-line,
.notification-detail-proof img,
.message-clear-unread,
.picker-badge,
.feedback-tag,
.feedback-reply,
.unread-dot,
.sens-result-bad,
.sens-result-ok { border-radius: var(--radius-tight); }

.shortcut-count,
.message-unread-badge,
.invite-inbox-count,
.status-seg-btn .dot,
.notification-unread-dot,
.avatar-img,
.product-share-btn,
.safety-mark,
.invite-circle,
.picker-avatar,
.switch-thumb,
.msg-fail { border-radius: 50%; }

.modal-head { border-radius: var(--radius) var(--radius) 0 0; }
.btn-logout,
.role-badge { border-radius: 4px; }
.product-section-title:before,
.product-section-title:after { border-radius: 1px; }
.tabbar a.active::after { border-radius: 0 0 2px 2px; }
.switch-track { border-radius: 999px; }

/* Editorial home and booster selection */
.product-cover,
.oc-product .thumb,
.order-card .oc-thumb,
.item-card .thumb-cell,
.cover-fallback,
.invite-circle-me,
.picker-avatar { background: var(--grad); }
.brand .logo { box-shadow: 0 4px 12px rgba(164, 79, 66, .24); }
.header { box-shadow: 0 2px 14px rgba(74, 54, 37, .07); }
.header-nav a:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.header-nav a.active { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.chat-msg.me .bubble { background: var(--grad); }
.chat-msg.me .chat-img-cap { background: var(--surface-selected); border-color: var(--line); }
.toast.success { background: var(--success); }
.footer { background: #302a25; }
.status-seg-btn.active-on { background: var(--grad); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent); }
.switch input:checked + .switch-track { background: var(--grad); }
.invite-circle-me { box-shadow: 0 8px 18px rgba(164,79,66,.24), 0 2px 4px rgba(40,28,20,.12), inset 0 -3px 8px rgba(0,0,0,.12); }

#home-visuals { display: grid; gap: 14px; margin: 10px 0 24px; }
.home-carousel {
  position: relative; width: 100%; overflow: hidden; isolation: isolate;
  aspect-ratio: 2.55 / 1; min-height: 210px; max-height: 390px;
  border-radius: var(--radius); background: #171512; box-shadow: var(--shadow);
}
.home-carousel-track { display: flex; width: 100%; height: 100%; transition: transform .46s cubic-bezier(.22,.68,0,1); touch-action: pan-y; }
.home-slide { position: relative; flex: 0 0 100%; min-width: 0; height: 100%; overflow: hidden; color: #fff; }
.home-slide::after { content: ""; position: absolute; inset: 35% 0 0; background: rgba(16,13,11,.42); pointer-events: none; }
.home-slide > img { width: 100%; height: 100%; object-fit: cover; }
.home-slide-caption { position: absolute; z-index: 1; left: clamp(18px, 4vw, 44px); bottom: 30px; max-width: 72%; color: #fff; font-size: clamp(17px, 2.5vw, 27px); font-weight: 650; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0,0,0,.28); }
.home-slide-art { width: 100%; height: 100%; padding: clamp(24px, 6vw, 68px); display: flex; flex-direction: column; justify-content: center; gap: 16px; color: #f8e8cb; background: #241f19; }
.home-slide-art::after { content: ""; position: absolute; width: 30vw; height: 30vw; max-width: 320px; max-height: 320px; right: 10%; top: 50%; transform: translateY(-50%); border: 1px solid rgba(229,191,126,.38); border-radius: 50%; box-shadow: 0 0 0 24px rgba(229,191,126,.045), 0 0 0 56px rgba(229,191,126,.035); }
.home-slide-art > span { position: relative; z-index: 1; color: #d4ad72; font-size: 11px; letter-spacing: .24em; }
.home-slide-art > b { position: relative; z-index: 1; font-size: clamp(24px, 4vw, 42px); line-height: 1.35; letter-spacing: .04em; }
.home-carousel-dots { position: absolute; z-index: 2; right: 24px; bottom: 20px; display: flex; gap: 8px; }
.home-carousel-dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.48); transition: width .2s, background .2s; }
.home-carousel-dot.active { width: 22px; border-radius: 99px; background: #fff; }
.home-announcement { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.home-announcement-label { flex: 0 0 auto; padding: 3px 9px; border-radius: var(--radius-tight); background: var(--surface-selected); color: var(--primary); font-size: 12px; font-weight: 700; }
.home-announcement-window { min-width: 0; overflow: hidden; white-space: nowrap; color: var(--muted); }
.home-announcement-track { display: flex; width: max-content; gap: 48px; animation: announcement-drift 28s linear 2s infinite; }
.home-announcement-track span { flex: 0 0 auto; }
@keyframes announcement-drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .home-announcement-track { animation: none; } }

.booster-selection-page { max-width: 1050px; }
.booster-selection-page .page-head { margin-bottom: 18px; }
.booster-selection-page .page-head h1 { font-size: clamp(25px, 4vw, 32px); letter-spacing: -.03em; }
.booster-selection-page .page-head p { color: var(--muted); margin-top: 4px; }
.booster-own-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--card); }
.booster-own-avatar { flex: 0 0 auto; }
.booster-own-info { display: grid; min-width: 0; gap: 2px; flex: 1; }
.booster-own-info span { color: var(--muted); font-size: 12px; }
.booster-selection-tabs { display: flex; gap: clamp(22px, 7vw, 72px); padding: 0 8px; margin: 16px 0 8px; border-bottom: 1px solid var(--line); }
.booster-selection-tabs button { position: relative; padding: 12px 4px; color: var(--muted); font-size: 16px; font-weight: 550; }
.booster-selection-tabs button.active { color: var(--primary); font-weight: 700; }
.booster-selection-tabs button.active::after { content: ""; position: absolute; height: 3px; left: 0; right: 0; bottom: -1px; background: var(--primary); border-radius: 2px 2px 0 0; }
.booster-search-bar { margin: 14px 0 18px; }
.booster-selection-list { display: grid; gap: 10px; }
.booster-profile-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.booster-profile-media { position: relative; width: 52px; height: 52px; overflow: hidden; border-radius: 12px; background: var(--surface-hover); }
.booster-profile-avatar { width: 100%; height: 100%; object-fit: cover; }
.booster-avatar-fallback { display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 700; background: var(--primary); }
.booster-profile-main { min-width: 0; display: grid; gap: 3px; }
.booster-profile-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.booster-profile-title h2 { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.booster-review-link { flex: 0 0 auto; color: var(--accent); font-size: 11px; font-weight: 600; }
.booster-review-link small { color: var(--muted); font-weight: 500; }
.booster-profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 11px; line-height: 1; }
.booster-online-text { display: inline-flex; align-items: center; gap: 4px; }
.booster-online-text i { width: 5px; height: 5px; border-radius: 50%; background: #a8aaa8; }
.booster-online-text.online i { background: #3fae74; }
.booster-online-text.busy i { background: #d79b3e; }
.booster-online-text.offline i { background: #a8aaa8; }
.booster-gender { display: inline-flex; align-items: center; }
.booster-voice-pill { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px 0 1px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--primary); font-size: 10px; }
.booster-voice-pill button { width: 16px; height: 16px; padding: 0; border-radius: 50%; background: var(--surface-selected); color: var(--primary); font-size: 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.booster-profile-bio { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 11px; line-height: 1.4; }
.booster-profile-actions { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.booster-profile-actions .btn { min-width: 0; }
.booster-tip-link { color: var(--muted); font-size: 10.5px; padding: 2px 4px; }
.booster-tip-link:hover { color: var(--primary); }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; min-height: 26px; }
@media (min-width: 721px) {
  .booster-profile-card { grid-template-columns: 58px minmax(0,1fr) auto; gap: 14px; padding: 12px 16px; }
  .booster-profile-media { width: 58px; height: 58px; }
  .booster-profile-title h2 { font-size: 15px; }
  .booster-profile-bio { font-size: 12px; }
}
.booster-profile-editor { display: grid; gap: 4px; }
.booster-profile-editor .field { margin-bottom: 10px; }
.excluded-product-list { display: flex; flex-wrap: wrap; gap: 8px; }
.excluded-product-list label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; }
.excluded-product-list input { accent-color: var(--primary); }
.booster-voice-settings audio { width: 100%; max-width: 420px; margin: 8px 0; }
.profile-voice-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.voice-not-uploaded { color: var(--muted); padding: 8px 0; }

.booster-my-reviews { margin-top: 16px; }
.booster-my-reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.booster-my-score { margin-top: 5px; color: var(--text); font-size: 27px; font-weight: 750; line-height: 1.2; }
.booster-my-score span, .booster-review-stars { color: var(--accent); }
.booster-my-score small { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 450; }
.booster-my-review-list, .booster-review-list { display: grid; gap: 10px; margin-top: 14px; }
.booster-my-review, .booster-review-item { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--surface); }
.booster-my-review p, .booster-review-item p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.booster-my-review footer, .booster-review-item footer { color: var(--muted); font-size: 11px; }
.review-appeal-state { margin: 8px 0; color: var(--primary); font-size: 12px; }
.booster-review-summary { display: flex; align-items: baseline; gap: 8px; color: var(--accent); }
.booster-review-summary strong { color: var(--text); font-size: 32px; }
.booster-review-summary small { color: var(--muted); }
.admin-review-list { display: grid; gap: 12px; }
.admin-review-card { padding: 16px; }
.admin-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-review-head > div { display: grid; }
.admin-review-head span, .admin-review-byline { color: var(--muted); font-size: 12px; }
.admin-review-head > strong { flex: 0 0 auto; color: var(--accent); }
.admin-review-content { margin: 9px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-review-appeal { margin: 10px 0; padding: 11px 13px; border-left: 3px solid var(--accent); border-radius: var(--radius-tight); background: var(--surface); }
.admin-review-appeal p { margin: 4px 0; }
.admin-review-appeal small { color: var(--muted); }
.admin-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.private-offer-inbox { margin: 14px 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)); border-radius: var(--radius-inner); background: color-mix(in srgb, var(--primary) 5%, var(--card)); }
.private-offer-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.private-offer-card > div:first-child { display: grid; min-width: 0; }
.private-offer-card span { color: var(--muted); font-size: 12px; }
.private-offer-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.private-offer-modal-product { display: flex; align-items: center; gap: 13px; }
.private-offer-modal-product > img, .private-product-fallback { width: 76px; height: 66px; flex: 0 0 auto; object-fit: cover; display: grid; place-items: center; border-radius: var(--radius-control); background: var(--surface-selected); color: var(--primary); font-size: 24px; font-weight: 700; }
.private-offer-modal-product h4 { font-size: 16px; }
.private-offer-modal-product p, .private-offer-modal-product small { display: block; color: var(--muted); font-size: 12px; }
.private-offer-modal-product strong { color: var(--primary); }
.private-offer-game { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; margin: 15px 0; padding: 12px; border-radius: var(--radius-control); background: var(--surface); }
.private-offer-game span { min-width: 0; overflow-wrap: anywhere; }
.private-product-list { display: grid; gap: 8px; max-height: min(58vh, 520px); overflow: auto; }
.private-product-option { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--card); text-align: left; }
.private-product-option:hover { background: var(--surface); border-color: color-mix(in srgb, var(--primary) 32%, var(--line)); }
.private-product-option > span:first-child, .private-product-option img { width: 64px; height: 54px; overflow: hidden; border-radius: var(--radius-control); object-fit: cover; }
.private-product-option > span:nth-child(2) { min-width: 0; display: grid; }
.private-product-option small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.private-product-option strong { color: var(--primary); white-space: nowrap; }
.tip-intro { margin-bottom: 14px; color: var(--muted); }
.tip-gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tip-gift-option { display: grid; justify-items: center; gap: 5px; padding: 14px 8px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--surface); }
.tip-gift-option:hover { border-color: var(--primary); background: var(--surface-selected); }
.tip-gift-option > span { font-size: 25px; }
.tip-gift-option small { color: var(--primary); font-weight: 700; }
.home-settings-card { margin-top: 16px; }
.home-banner-admin-head, .home-banner-admin-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-banner-admin-list { display: grid; gap: 12px; }
.home-banner-admin-row { padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--surface); }
.home-banner-admin-row .field { margin: 10px 0 0; }
.home-banner-upload-row { display: flex; gap: 8px; }
.home-banner-upload-row .input { min-width: 0; flex: 1; }
.home-settings-actions, .site-settings-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

@media (max-width: 600px) {
  #home-visuals { gap: 10px; margin: 6px 0 18px; }
  .home-carousel { aspect-ratio: 2.35 / 1; min-height: 0; max-height: 210px; }
  .home-slide-caption { bottom: 24px; max-width: 80%; }
  .home-carousel-dots { right: 16px; bottom: 15px; }
  .home-announcement { padding: 10px 12px; }
  .booster-selection-tabs { justify-content: space-between; gap: 10px; }
  .booster-profile-card { grid-template-columns: 48px minmax(0,1fr) auto; gap: 10px; padding: 9px 10px; }
  .booster-profile-media { width: 48px; height: 48px; border-radius: 10px; }
  .booster-profile-title h2 { font-size: 13.5px; }
  .booster-profile-meta { font-size: 10.5px; }
  .booster-profile-bio { font-size: 10.5px; }
  .booster-own-card { padding: 11px; gap: 9px; }
  .booster-own-info span { font-size: 11px; }
  .private-offer-card { align-items: flex-start; flex-direction: column; }
  .private-offer-actions { width: 100%; }
  .private-offer-actions .btn { flex: 1; }
  .private-product-option { grid-template-columns: 52px minmax(0,1fr) auto; gap: 8px; padding: 8px; }
  .private-product-option > span:first-child, .private-product-option img { width: 52px; height: 48px; }
  .private-product-option strong { font-size: 12px; }
  .tip-gift-grid { gap: 6px; }
  .tip-gift-option { padding: 11px 5px; }
}

/* Keep admin account rows readable at every viewport width. */
.admin-user-list { display: flex; width: 100%; min-width: 0; }
.admin-user-list > .item-card {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(270px, max-content);
  align-items: start; width: 100%; min-width: 0; gap: 14px;
}
.admin-user-list .item-main { min-width: 0; overflow-wrap: anywhere; }
.admin-user-list .item-title { overflow-wrap: anywhere; }
.admin-user-list .item-sub { line-height: 1.55; }
.admin-user-list .item-actions { justify-content: flex-end; align-self: center; }
.admin-user-list .item-actions .btn { white-space: normal; }

@media (max-width: 820px) {
  .admin-user-list > .item-card { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .admin-user-list .thumb-cell { width: 42px; height: 42px; }
  .admin-user-list .item-actions { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); width: 100%; justify-content: stretch; gap: 7px; }
  .admin-user-list .item-actions .btn { width: 100%; min-width: 0; min-height: 38px; padding: 7px; line-height: 1.3; }
  .admin-user-list .item-main > .item-sub { overflow-wrap: anywhere; }
}

/* Cool mineral palette accents */
.brand .logo { box-shadow: 0 4px 12px rgba(36,107,114,.24); }
.header { box-shadow: 0 2px 14px rgba(34,59,57,.07); }
.footer { background: #213033; }
.invite-circle-me { box-shadow: 0 8px 18px rgba(36,107,114,.24), 0 2px 4px rgba(24,42,43,.12), inset 0 -3px 8px rgba(0,0,0,.12); }

/* ================= 营业额面板 ================= */
.revenue-panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 20px 14px; margin-bottom: 16px; overflow: hidden;
}
.revenue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.revenue-title { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.revenue-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.revenue-diff {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--muted); white-space: nowrap;
}
.revenue-diff.up { background: rgba(15,157,138,.12); color: var(--success); }
.revenue-diff.down { background: rgba(229,72,77,.12); color: var(--danger); }

.revenue-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.rev-item {
  background: var(--surface); border-radius: var(--radius-inner);
  padding: 12px 14px; border: 1px solid var(--line);
}
.rev-item span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rev-item b { font-size: clamp(17px, 2.4vw, 23px); font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.rev-item:first-child b { color: var(--primary); }

.rev-chart { margin-top: 8px; }
.rev-chart svg { width: 100%; height: 190px; display: block; }
.rev-grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.rev-stop-top { stop-color: var(--primary-2); stop-opacity: .3; }
.rev-stop-bottom { stop-color: var(--primary-2); stop-opacity: 0; }
.rev-stop-line-a { stop-color: var(--primary); }
.rev-stop-line-b { stop-color: var(--primary-2); }

/* 曲线：从底部一条线缓缓升起；默认即最终态，动画只是增强 */
.rev-rise { transform-box: fill-box; transform-origin: 50% 100%; }
.revenue-panel.rev-anim .rev-rise {
  animation: revRise 1.35s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes revRise {
  from { transform: scaleY(.05); opacity: .25; }
  to { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .revenue-panel.rev-anim .rev-rise { animation: none; }
}

.rev-axis-row {
  display: flex; justify-content: space-between; gap: 4px;
  font-size: 10px; color: var(--muted); padding: 6px 2px 0;
}
.rev-axis-row span { white-space: nowrap; }
.rev-chart-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 6px 2px 6px; }

/* 日期范围选择 */
.rev-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.rev-range-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.rev-range-btn.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; }
.rev-range-custom { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rev-date { width: 140px; height: 34px; padding: 0 8px; font-size: 12px; }
.rev-range-sep { font-size: 12px; color: var(--muted); }

/* 概览两列 */
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.overview-block { margin-bottom: 12px; }
.metric-list { display: flex; flex-direction: column; gap: 2px; }
.metric-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.metric-row:last-child { border-bottom: 0; }
.metric-row span { flex: 1; font-size: 13px; color: var(--muted); }
.metric-row b { font-size: 17px; font-weight: 800; color: var(--text); }
.metric-row small { font-size: 11px; color: var(--muted); min-width: 62px; text-align: right; }

/* 商品销量 */
.sales-list { display: flex; flex-direction: column; }
.sales-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.sales-row:last-child { border-bottom: 0; }
.sales-rank { width: 20px; font-size: 12px; color: var(--muted); text-align: center; }
.sales-thumb {
  width: 38px; height: 38px; border-radius: 10px; overflow: hidden; flex: 0 0 auto;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.sales-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sales-main { flex: 1; min-width: 0; }
.sales-main b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sales-main small { font-size: 11px; color: var(--muted); }
.sales-num { text-align: right; min-width: 62px; }
.sales-num b { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.sales-num small { font-size: 11px; color: var(--muted); }
@media (max-width: 720px) {
  .overview-grid { grid-template-columns: 1fr; }
  .rev-date { width: calc(50% - 26px); min-width: 118px; }
}
@media (max-width: 900px) {
  .revenue-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .revenue-stats { grid-template-columns: 1fr; }
  .rev-item { display: flex; align-items: center; justify-content: space-between; }
  .rev-item span { margin-bottom: 0; }
}

/* ================= 管理后台分类横向可换行 ================= */
.admin-tabs .tab { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 721px) {
  .admin-tabs { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; }
}
@media (max-width: 720px) {
  .admin-tabs { -webkit-overflow-scrolling: touch; }
}

/* ================= 首页大图：不可点击，可拖拽 ================= */
.home-slide { cursor: default; user-select: none; }
.home-carousel.is-dragging { cursor: grabbing; }
.home-carousel.is-dragging .home-carousel-track { transition: none; }
.home-slide img { -webkit-user-drag: none; user-select: none; }

/* ================= 结单证明：窄屏自动换行，避免文字竖排 ================= */
.proof-box { flex-wrap: wrap; align-items: flex-start; }
.proof-box .pb-text { flex: 1 1 160px; min-width: 150px; word-break: break-word; }
@media (max-width: 480px) {
  .proof-box img { width: 100%; height: auto; max-height: 220px; }
  .proof-box .pb-text { flex-basis: 100%; min-width: 0; }
}

/* ================= 不接的订单选择器 ================= */
.excluded-picker-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.excluded-picker-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer;
}
.excluded-picker-item input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
.excluded-picker-item span { flex: 1; min-width: 0; font-size: 13px; }
.excluded-picker-item em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ================= 订单群聊 ================= */
.group-head { display: flex; align-items: center; gap: 10px; }
.group-head-main { min-width: 0; }
.group-head-main h1 { margin: 0; font-size: 17px; }
.group-head-main p { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-members { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.group-member {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 12px;
}
.group-member i {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  background: var(--grad); color: #fff; font-style: normal; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.group-member img { width: 100%; height: 100%; object-fit: cover; }
.group-member em { font-style: normal; color: var(--muted); font-size: 11px; }
.group-box { min-height: 340px; }
.group-msg { gap: 3px; }
.group-msg-name { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.group-msg-name em { font-style: normal; opacity: .8; }
.group-system { text-align: center; margin: 6px 0; }
.group-system span {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 11px;
}
.group-read { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; justify-content: flex-end; }
.group-read-chip { font-size: 10px; padding: 1px 7px; border-radius: 999px; }
.group-read-chip.read { background: rgba(15,157,138,.12); color: var(--success); }
.group-read-chip.unread { background: var(--surface); color: var(--muted); }
