/* bbt-zb H5 样式（移动端优先）
   视觉体系：温暖放心风（tuptup 品牌暖调 · 珊瑚橙 + 奶油底，取代原优财宝冷蓝）
   主色 #E8A33D / 按下 #CF8C28 / 品牌琥珀 #F6C453 / 警示红 #E5483B / 价格暖红 #ED5A3C / 成功绿 #2FA971
   页面底 #FFF8F3 / 卡片 #fff / 主字 #3B342F / 次字 #9B8F85 / 边线 #F1E6DC / 圆角 8px
   风格图标：uni 图标字体（weuiRegular）+ tabbar 线性图标（40px 双态 PNG）+ 导航栏暖色条
   静态资源化：以上图标/字体/图片全部本地化于 public/static/，零外链、零 CDN 流量费用 */

/* ===== uni 图标字体（提取自优财宝线上 CSS，weuiRegular 1.0） ===== */
@font-face {
  font-family: uni;
  src: url("static/fonts/uni.ttf") format("truetype");
  font-display: swap;
}
[class^="uni-icon-"], [class*=" uni-icon-"] { font-style: normal; -webkit-font-smoothing: antialiased; }
[class^="uni-icon-"]::before, [class*=" uni-icon-"]::before {
  font-family: uni; font-weight: normal; font-style: normal; line-height: 1;
  display: inline-block; color: inherit; vertical-align: middle;
}
.uni-icon-circle::before { content: "\EA01"; }
.uni-icon-download::before { content: "\EA02"; }
.uni-icon-info::before { content: "\EA03"; }
.uni-icon-success::before { content: "\EA06"; }
.uni-icon-waiting::before { content: "\EA09"; }
.uni-icon-warn::before { content: "\EA0B"; }
.uni-icon-cancel::before { content: "\EA0D"; }
.uni-icon-search::before { content: "\EA0E"; }
.uni-icon-clear::before { content: "\EA0F"; }

/* ===== 设计令牌（金币金 + 温暖放心 · tuptup 暖调） ===== */
:root {
  --primary: #E8A33D;
  --primary-dark: #CF8C28;
  --brand: #F6C453;
  --bg: #FFF8F3;
  --bg2: #FCEDE4;
  --card: #ffffff;
  --text: #3B342F;
  --muted: #9B8F85;
  --muted2: #B7ABA0;
  --line: #F1E6DC;
  --ok: #2FA971;
  --warn: #E5483B;
  --hot: #ED5A3C;
  --radius: 12px;
  /* 底部主导航(tabbar)高度：全站内容区预留统一引用此变量，避免底部留白/遮挡跳变 */
  --tabbar-h: 54px;
  /* 页面水印：颜色已内嵌进 SVG data-URI（public/watermark.js 的 FG 常量），调深/调淡去那里改 */
  /* 流式字号令牌（2026-10-31）：小屏取下限不挤爆，大屏取上限不显小。
     下限刻意不低于 12.5px——小屏本来就窄，字再缩小只会更难读（WCAG 小字 ≥12px）。
     3.5vw ≈ 320px→11.2px（落回下限 12.5px）、390px→13.6px、430px→15px（封顶 13.5px）。 */
  --fs-sm: clamp(12.5px, 3.5vw, 13.5px);        /* 次要说明 .sub / .label */
  --fs-md: clamp(13.5px, 3.8vw, 14.5px);        /* 正文、键值表 .kv */
  --fs-lg: clamp(14.5px, 4.1vw, 16px);          /* 卡片标题 .name */
  /* 次要文字色（比 --muted 深一档）：奶油底 #FFF8F3 上对比度 ~3.9:1，优于原 --muted 的 ~3.3:1 */
  --muted-txt: #8B8077;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 键盘可达性：统一焦点环（WCAG 2.4.7 焦点可见），仅键盘聚焦时出现，不打扰鼠标/触屏 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
/* 品牌主色导航头上的按钮：琥珀底用白环才够对比度 */
.page-head .ph-back:focus-visible { outline-color: #fff; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.5; }
/* 100vh 在移动端＝大视口（含浏览器工具栏），比实际可见区高 → 页面默认高度偏大、
   固定底栏被挤出可视区（要上滑收起工具栏才看得到）。用 dvh 动态视口，vh 作降级兜底 */
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; min-height: var(--vh, 100vh); min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; }

/* ===== 内页导航头（替代原全局顶栏，仅子页面显示：返回 + 标题） ===== */
.page-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 48px; margin: -12px -12px 12px; padding: 0 10px; background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(180, 120, 70, .12); }
.page-head .ph-back { border: none; background: none; color: #fff; font-size: 26px; font-weight: 300; width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer; line-height: 1; padding: 0; flex: 0 0 auto; transition: background .15s; }
.page-head .ph-back:active { background: rgba(255, 255, 255, .18); }
.page-head .ph-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; text-align: center; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 右侧与返回键等宽的对称占位：让标题在整条导航头上真正居中（否则会被返回键挤偏） */
.page-head::after { content: ""; display: block; width: 44px; height: 1px; flex: 0 0 auto; }
@media (prefers-color-scheme: dark) { .page-head { box-shadow: 0 2px 10px rgba(0, 0, 0, .35); } }
.icon-btn { border: none; background: none; font-size: 24px; font-weight: 300; color: #fff; width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer; line-height: 1; padding: 0; }
.icon-btn:active { background: rgba(255, 255, 255, .18); }
.top-gear { display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.top-gear:hover { background: rgba(255, 255, 255, .14); }
.top-gear svg { display: block; }
/* 头像区块右侧齿轮：在白底卡片上用深色，hover 浅灰 */
.mine-gear { color: #889099; width: 30px; height: 30px; font-size: 20px; border-radius: 50%; transition: background .15s, color .15s; flex: 0 0 auto; margin-left: 8px; }
.mine-gear:hover { background: rgba(0, 0, 0, .06); color: var(--primary); }
.mine-gear:active { background: rgba(0, 0, 0, .1); }
/* 底部预留 = tabbar 实际高(含安全区) + 8px 呼吸，与 #tabbar 严格对齐：内容底停在 tabbar 顶上方 8px，
   既保证长页面最后一行不被底栏遮住，又消除原来 84px 预留 vs ~57px 实高造成的近 40px 空白带 */
#view { flex: 1; padding: 12px 12px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
/* 仅动画 transform（GPU 加速），不动 layout */
.loading::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 10px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: bbt-spin .7s linear infinite; }
@keyframes bbt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }
.muted { color: var(--muted); font-size: 12px; }

/* ===== 卡片 ===== */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(180, 120, 70, .05), 0 4px 14px rgba(180, 120, 70, .07); }
.card .title { font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stat .n { font-size: 18px; font-weight: 700; color: var(--primary); }
.stat .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list { display: block; }
/* 大列表渲染优化（2026-10-31）：团员数是团长数的 30 倍，团长订单/审核等长列表动辄上百区块。
   离屏卡片跳过布局与绘制（content-visibility:auto），长页首屏渲染与点击响应显著变快；
   contain-intrinsic-size 给屏外块估高，避免滚动条跳动（滚到实际位置即精确渲染）。 */
.list > .pkg, .list > .card { content-visibility: auto; contain-intrinsic-size: auto 132px; }
.mt4 { margin-top: 4px; }

/* ===== 标签 / 筹码 ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; background: var(--bg2); color: var(--text); white-space: nowrap; }
.tag.ok { background: rgba(47, 169, 113, .12); color: var(--ok); }
.tag.warn { background: rgba(229, 72, 59, .1); color: var(--warn); }
.tag.hot { background: rgba(237, 90, 60, .1); color: var(--hot); }
.tag.blue { background: rgba(232, 163, 61, .1); color: var(--primary); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; background: rgba(0, 0, 0, .05); color: var(--text); white-space: nowrap; }
.chip.ok { background: rgba(47, 169, 113, .12); color: var(--ok); }
.chip.inv { background: rgba(0, 188, 130, .12); color: #00bc82; }
.chip.open { background: rgba(232, 163, 61, .1); color: var(--primary); }
.chip.closed { background: rgba(229, 72, 59, .1); color: var(--warn); }
.chip.completed { background: var(--bg2); color: var(--muted); }
.chip.joined { background: var(--bg2); color: var(--muted); }
.chip.ordered { background: rgba(232, 163, 61, .1); color: var(--primary); }
.chip.warn { background: rgba(229, 72, 59, .1); color: var(--warn); }
.chip.new { background: rgba(255, 193, 7, .16); color: #b58a00; }

/* ===== 页内分段切换（本团 / 本轮） ===== */
.segs { display: flex; background: var(--bg2); border-radius: var(--radius); padding: 3px; margin-bottom: 12px; }
.segs .seg { flex: 1; border: none; background: transparent; padding: 8px 0; font-size: 14px; color: var(--muted); border-radius: calc(var(--radius) - 2px); cursor: pointer; }
.segs .seg.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.mr8 { margin-right: 8px; }

/* ===== 按钮（uni-app 风格：默认灰底 / 主色蓝 / 危险红 / 圆角 5px） ===== */
.btn { display: block; width: 100%; border: none; background: var(--bg2); color: var(--text); font-size: 15px; font-weight: 400; padding: 12px; border-radius: var(--radius); cursor: pointer; line-height: 1.4; transition: transform .12s ease, opacity .12s ease; text-decoration: none; text-align: center; }
a.btn:hover { opacity: .92; }
.btn:active { background: #F1E6DC; transform: scale(.985); }
.btn.primary { background: linear-gradient(135deg, #F2B455, #E2912B); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(226, 145, 43, .2); }
.btn.primary:active { background: var(--primary-dark); transform: scale(.985); }
.btn.ghost { background: rgba(0, 0, 0, 0); color: var(--primary); border: 1px solid var(--primary); }
.btn.sm { width: auto; display: inline-block; padding: 6px 12px; font-size: 12px; border-radius: var(--radius); }
.btn.danger { background: var(--hot); color: #fff; }
.btn.danger:active { background: #C8412F; transform: scale(.985); }
.btn:disabled { background: #D9CFC5; color: #fff; cursor: not-allowed; }
/* 按钮自动 loading 态：点击触发接口期间，文字隐去、原地转圈、禁用，避免「点了没反应」的空等感 */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(120,120,120,.35); border-top-color: #5b5b5b; border-radius: 50%; animation: bbt-spin .7s linear infinite; }
.btn.primary.is-loading::after, .btn.danger.is-loading::after, .btn.logout.is-loading::after { border-color: rgba(255,255,255,.55); border-top-color: #fff; }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::after { animation: none; } }

/* ===== 表单 ===== */
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 10px; outline: none; font-family: inherit; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 163, 61, .16); }
textarea { min-height: 70px; resize: vertical; }
label.fld { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px 2px; }
.link { color: var(--primary); text-decoration: none; }

/* ===== 分段选择 ===== */
.tabs2 { display: flex; background: var(--bg2); border-radius: var(--radius); padding: 3px; margin-bottom: 14px; }
.tabs2 span { flex: 1; text-align: center; padding: 8px; border-radius: var(--radius); font-size: 13px; color: var(--muted); cursor: pointer; }
.tabs2 span.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ===== 入口 / 用户 ===== */
.entry { background: var(--card); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(17, 31, 50, .04), 0 2px 8px rgba(17, 31, 50, .04); }
.entry:active { background: var(--bg2); }
.entry b { color: var(--primary); }
.usercard { display: flex; gap: 12px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #F6C453, #E8A33D); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; flex: none; overflow: hidden; }
/* 文字头像横竖矩阵（开团点选 / 团员排序浮层共用） */
.o-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; max-height: 260px; overflow: auto; }
.o-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; border-radius: 10px; padding: 8px 4px; border: 2px solid transparent; user-select: none; -webkit-user-select: none; }
.o-cell { position: relative; }
.o-cell .o-idx { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--bg2); border-radius: 99px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0 3px; }
.o-cell .avatar { width: 44px; height: 44px; font-size: 17px; }
.o-cell .o-nm { font-size: 11px; color: var(--text); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.o-cell .o-mail { display: block; font-size: 10px; color: #e64340; }
.o-cell.on { border-color: var(--primary); background: rgba(0,122,255,.08); }
/* 排序浮层：纯点击上移/置顶/下移（不依赖拖放，微信 X5 触屏可靠） */
/* 点选后才显示该成员的移动按钮：visibility 隐藏而非 display:none —— 按钮位恒占位，
   选中/切换时头像网格不跳动（2026-11-01 用户拍板：只显示点中的那个人） */
.o-cell .o-ctrl { display: flex; gap: 4px; margin-top: 2px; visibility: hidden; }
.o-cell.on .o-ctrl { visibility: visible; }
.o-cell .o-btn { flex: 1; min-width: 0; height: 22px; line-height: 20px; padding: 0 4px; font-size: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.o-cell .o-btn:active { background: var(--primary); color: #fff; border-color: var(--primary); }
.o-cell .o-btn.o-top { flex: 1.4; color: var(--primary); font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; font-size: 15px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; font-size: 10px; background: rgba(232, 163, 61, .1); color: var(--primary); vertical-align: middle; }
.banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.banner .ph { height: 110px; background: linear-gradient(120deg, #E8A33D, #F6C453); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.prod { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.prod:last-child { border-bottom: none; }
.prod .img { width: 64px; height: 64px; border-radius: var(--radius); background: var(--bg2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; flex: none; }
.prod .meta { flex: 1; min-width: 0; }
.price { font-weight: 700; }

/* ===== 底部 tabbar（优财宝图标：灰 #B7ABA0 / 选中品牌绿 #F6C453） ===== */
/* z-index 提至 80：高于页面内容(0)与浮动聊天按钮(60)，始终浮在顶层；
   仍低于弹窗/聊天浮层(100)、Toast/二次确认(200)、顶部进度条(9999)，保证弹窗能正确盖住底栏 */
/* 高度严格 = --tabbar-h + 安全区；box-sizing:border-box 下底部安全区作为 padding 内减，
   文字居中在 --tabbar-h 区，.home indicator 区为纯留白，不挤内容 */
/* z-index 95：高于水印层(90)与页面内容(0)、浮动聊天按钮(60)，但要压在弹窗遮罩(100)/Toast(200)之下。
   水印层若盖住底栏，真机上会表现为「底栏看不见」（半透明瓦片叠在上层）。
   translateZ(0)/will-change 强制独立合成层：iOS/微信 WebView 在页面高度骤变（下单后整屏替换 #view）
   时偶发不重绘 fixed 底栏，独立层可让它由合成器直接绘制，不随文档重排被吞掉。
   height 双写：先给不支持 env() 的老内核一个确定高度兜底，再被 calc(含安全区) 覆盖。 */
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateZ(0); will-change: transform; width: 100%; max-width: 720px; display: flex; align-items: stretch; background: var(--card); border-top: 1px solid var(--line); padding: 0 0 0; padding-bottom: env(safe-area-inset-bottom); height: var(--tabbar-h); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); box-sizing: border-box; z-index: 95; }
/* 下单条（paybar）存在时聊天浮标上移，避免遮挡「确认下单」按钮右下角 */
#chat-fab.above-paybar { bottom: calc(var(--tabbar-h) + 68px); }
#tabbar .tab { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 13px; line-height: 1.2; color: var(--muted2); cursor: pointer; padding: 0; text-decoration: none; }
#tabbar .tab .ic { display: none; }
#tabbar .tab.on { color: var(--primary); font-weight: 600; }

/* ===== toast ===== */
#toast-root { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(59, 52, 47, .92); color: #FFF6EC; padding: 10px 18px; border-radius: 99px; font-size: 13px; max-width: 78vw; animation: tin .18s ease; box-shadow: 0 6px 18px rgba(59, 52, 47, .2); }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }

/* ===== modal ===== */
#modal-root .mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fin .15s ease; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
#modal-root .modal { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: mup .2s ease; }
@keyframes mup { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
/* ===== 浮层二次确认（独立层级，叠加在 modal/drawer 之上）===== */
.confirm-layer { position: fixed; inset: 0; background: rgba(59, 52, 47, .38); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fin .15s ease; backdrop-filter: blur(2px); }
.confirm-box { background: var(--card); border-radius: 20px; width: 100%; max-width: 360px; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 18px 52px rgba(120, 80, 45, .26); animation: mup .2s ease; }
.confirm-box .label { font-size: 16px; font-weight: 700; color: var(--hot); line-height: 1.5; }
.confirm-box .label.no-danger { color: var(--text); }
.confirm-box textarea.input { border-radius: var(--radius); width: 100%; resize: vertical; min-height: 64px; line-height: 1.5; }
#modal-root .modal .title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
/* 图片查看器 = 独立顶层（z-index 210，高于 modal 100 / 二次确认 200）：
   在页面、抽屉、浮层里点图都是「盖一层」，关闭即回到原处（此前走 openModal 会顶掉当前浮层，关图后上下文丢失） */
.img-layer { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 210; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fin .15s ease; }
/* ===== pay-first 售出确认遮罩（2026-10-31 拍板）：先付款再收款模式未结清买入时，点「售出确认」tab 盖遮罩 ===== */
.pf-mask { position: absolute; inset: 0; z-index: 20; background: rgba(59, 52, 47, .42); backdrop-filter: blur(2px); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fin .15s ease; min-height: 180px; }
.pf-mask .pf-box { background: var(--card); border-radius: 20px; width: 100%; max-width: 320px; padding: 20px 18px; text-align: center; box-shadow: 0 18px 52px rgba(120, 80, 45, .26); animation: mup .2s ease; }
.pf-mask .pf-box .pf-title { font-size: 16px; font-weight: 700; color: var(--hot); }
.img-layer .img-view { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 16px; animation: mup .2s ease; }
.img-layer .img-view .title { font-size: 16px; font-weight: 700; }
/* 图片浮层：缩略图进列表，点开看大图（不把图直接排进版面） */
.img-view img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #f2f2f2; margin-top: 10px; }
/* 大图浮层内的操作按钮（审核通过/不通过、金额正确/不正确等）：
   2026-10-30 起决策按钮已上移到列表卡片，浮层只负责看图；此处去掉 sticky bottom:0——
   sticky + modal(86vh 滚动) 会把就地展开的二次确认面板挤出可点区，是「点击无反应」的直接原因 */
.img-view .iv-acts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); background: var(--card); }
.img-view .iv-acts .btn { width: auto; min-width: 110px; padding: 9px 18px; }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: #eef2f7; cursor: zoom-in; flex: none; }
.thumb.wide { width: 100%; height: 96px; }
/* 聊天浮层（浮动 logo 点开）：底部弹出，占屏 82% */
#modal-root .chat-sheet { position: fixed; left: 0; right: 0; bottom: 0; height: 82vh; background: var(--card); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, .2); display: flex; flex-direction: column; animation: cup .24s ease; z-index: 100; }
@keyframes cup { from { transform: translateY(100%); } to { transform: translateY(0); } }
#modal-root .chat-sheet .sheet-x { position: absolute; right: 10px; top: 8px; border: none; background: rgba(0,0,0,.05); border-radius: 50%; width: 30px; height: 30px; font-size: 16px; color: var(--muted); cursor: pointer; z-index: 2; }
/* 浮层里聊天页撑满浮层本身，不再按整页 100vh 算 */
#modal-root .chat-sheet .chat-page { height: 100%; }
#modal-root .chat-sheet .chat-tip { padding: 12px; color: var(--muted); font-size: 12px; }
#modal-root .chat-sheet #sess-list { flex: 1; overflow-y: auto; }

/* ===== 浮层（右侧抽屉）===== */
#modal-root .drawer-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 100; animation: fin .15s ease; }
#modal-root .drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); background: var(--card); box-shadow: -4px 0 24px rgba(0, 0, 0, .18); display: flex; flex-direction: column; animation: drin .22s ease; }
@keyframes drin { from { transform: translateX(100%); } to { transform: translateX(0); } }
#modal-root .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
#modal-root .drawer-title { font-size: 16px; font-weight: 700; }
#modal-root .drawer-x { border: none; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px 8px; }
#modal-root .drawer-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
/* 「我的商品」浮层：商品行（内容 + 编辑/下架） */
#modal-root .sku-row { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--card); }
#modal-root .sku-row .name { font-weight: 600; }

/* 分享入团卡片：展示邀请码/链接，点击复制，长按可选 */
.share-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #FFF1E8; cursor: pointer; transition: background .15s, border-color .15s; }
.share-card:active { background: #FCE3D6; border-color: var(--primary); }
.share-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.share-val { font-size: 15px; font-weight: 700; color: var(--text); word-break: break-all; -webkit-user-select: text; user-select: text; }
.share-tip { margin-top: 8px; font-size: 11px; color: var(--muted); }
/* 邀请码暂停提示条（admin 暂停团长码后，团长打开分享页看到的引导） */
.notice-bar { background: rgba(229, 72, 59, .1); color: var(--warn); border: 1px solid rgba(229, 72, 59, .25); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; font-weight: 600; line-height: 1.5; }

/* ===== 滑块 ===== */
.slider-box { padding: 6px 4px 2px; }
.slider-box input[type=range] { width: 100%; margin: 6px 0 2px; -webkit-appearance: none; background: transparent; padding: 0; border: none; }
.slider-box input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--primary) var(--pct, 33%), #F1E0D4 var(--pct, 33%)); }
.slider-box input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); margin-top: -8px; box-shadow: 0 1px 4px rgba(232, 163, 61, .4); }
.slider-val { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.slider-val b { color: var(--hot); font-size: 16px; }

/* ===== 团购包卡片 ===== */
.pkg { border: none; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; position: relative; background: #FBF1EA; }
.pkg.sel { border: 1px solid var(--primary); background: rgba(232, 163, 61, .06); }
.pkg .shop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pkg .sku-line { font-size: 12px; color: #6B5D52; line-height: 1.7; }
.pkg .p-total { font-weight: 700; color: var(--text); }
.pkg .chk { position: absolute; right: 10px; top: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #D9CFC5; }
.pkg.sel .chk { background: var(--primary); border-color: var(--primary); }
.pkg.sel .chk::after { content: "\EA06"; font-family: uni; color: #fff; font-size: 12px; display: block; text-align: center; line-height: 18px; }

/* ===== 支付步骤 ===== */
.step { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.step .no { width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); color: var(--muted); text-align: center; line-height: 22px; font-size: 12px; font-weight: 700; flex: none; }
.step.on .no { background: var(--primary); color: #fff; }
.step.done .no { background: var(--ok); color: #fff; }
.step .t { font-weight: 600; }
.step .s { font-size: 11px; color: var(--muted); }
.qr-box { text-align: center; padding: 8px 0; }
.qr-box img { width: 190px; height: 190px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.qr-ph { width: 190px; height: 190px; margin: 0 auto; border: 1px dashed #D9CFC5; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.qr-mini { width: 36px; height: 36px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; margin-right: 6px; cursor: zoom-in; }
.pay-amount { text-align: center; font-size: 24px; font-weight: 800; color: var(--text); margin: 6px 0 2px; }
.notice { background: rgba(229, 72, 59, .06); border: 1px solid rgba(229, 72, 59, .25); color: #C8412F; font-size: 12px; border-radius: var(--radius); padding: 9px 12px; margin-bottom: 12px; line-height: 1.6; }
.notice.blue { background: rgba(232, 163, 61, .06); border-color: rgba(232, 163, 61, .25); color: var(--primary-dark); }
.empty { text-align: center; color: var(--muted-txt); padding: 24px 16px; font-size: var(--fs-md); line-height: 1.8; text-wrap: balance; background: linear-gradient(180deg, rgba(246, 196, 83, .06), rgba(246, 196, 83, 0)); border-radius: var(--radius); }
.empty::before { content: ""; display: block; width: 72px; height: 72px; margin: 0 auto 10px; background: url(static/img/pic-empty.png) center/contain no-repeat; }
/* 键值表基础定义：两列网格（标签 | 值），一对一行；下方 v2 段有同类的完整定义（含响应式字号）。
   旧版 display:flex + space-between 会把多对键值全塞进一行，窄屏中文标签逐字折断。 */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: baseline; padding: 6px 0; font-size: var(--fs-md); }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ocr-preview img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tb th, table.tb td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.tb th { color: var(--muted); font-weight: 500; }
.countdown { color: var(--warn); font-weight: 600; }
.closed { color: var(--hot); font-weight: 600; }

/* ===== 登录页（优财宝风格：顶部装饰图 + 品牌字） ===== */
.logo { text-align: center; font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: 2px; margin: 16px 0 14px; }
.login-hero { margin: -12px -12px 0; padding: 34px 16px 30px; min-height: 196px; overflow: hidden; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; background: radial-gradient(140% 120% at 50% 0%, #FFF6E7 0%, #FCE6C8 48%, #F6C453 100%); }
.login-hero .lh-ring { position: absolute; border-radius: 50%; }
.login-hero .lh-ring.r1 { width: 160px; height: 160px; left: -52px; top: 10px; background: rgba(255, 255, 255, .55); filter: blur(16px); }
.login-hero .lh-ring.r2 { width: 120px; height: 120px; right: -38px; bottom: -26px; background: rgba(232, 163, 61, .22); filter: blur(14px); }
.login-hero .lh-badge { position: relative; z-index: 2; width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: linear-gradient(145deg, #FFFFFF, #FFF1DA); box-shadow: 0 10px 22px rgba(207, 140, 40, .32), inset 0 0 0 5px rgba(255, 255, 255, .75); margin-bottom: 14px; }
.login-hero .lh-title { position: relative; z-index: 2; font-size: 30px; font-weight: 800; letter-spacing: 10px; text-indent: 10px; color: #9A5B12; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.login-hero .lh-sub { position: relative; z-index: 2; margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #B5742A; }
.login-card-h { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; text-align: center; }
.login-agree { text-align: center; font-size: 11px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.login-foot { text-align: center; font-size: 11px; color: var(--muted2); padding: 16px 0 4px; letter-spacing: .5px; }

/* ===== 品牌区（登录页 + 首页统一展示：团购 / 热火进行中...） ===== */
.brand { text-align: center; margin: 18px 0 10px; }
.brand-title { font-size: 30px; font-weight: 800; letter-spacing: 6px; background: linear-gradient(120deg, #E8A33D, #F6C453); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--primary); }
.brand-sub { margin-top: 4px; font-size: 13px; color: var(--hot); font-weight: 600; letter-spacing: 2px; }
.brand-sub::before { content: "🔥 "; }

/* ===== 首页 hero 轮播（182px 高 / 15px 圆角，样式取自 ycb3 u-swiper） ===== */
.hero { margin-bottom: 12px; }
.hero-swiper { position: relative; height: 182px; border-radius: 15px; overflow: hidden; background: #F6ECE4; }
.hero-slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; opacity: 0; transition: opacity .5s ease; pointer-events: none; filter: sepia(.72) saturate(2.1) hue-rotate(-22deg) brightness(1.08) contrast(1.04); }
.hero-slide.on { opacity: 1; pointer-events: auto; }
.hero-slide .t { font-size: 20px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.hero-slide .s { font-size: 12px; opacity: .92; letter-spacing: 1px; }
.hero-slide .e { font-size: 30px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.hero-dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .55); transition: all .25s; cursor: pointer; }
.hero-dots i.on { width: 16px; background: #F6C453; }
.hero-brand { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 2px 0; }
.hero-brand .hb-title { font-size: 20px; font-weight: 800; letter-spacing: 4px; color: var(--text); }
.hero-brand .hb-sub { font-size: 12px; color: var(--hot); font-weight: 600; }
.hero-brand .hb-sub::before { content: "🔥 "; }

/* ===== 登录页：请记住本站网址（居中，网址变量动态获取） ===== */
.site-tip { text-align: center; margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.site-tip b { display: block; margin-top: 3px; font-size: 14px; color: var(--primary); word-break: break-all; }

/* ===== 我的页（配色照抄 ycb3.mixiaoxiao.com 我的页） ===== */
.mine-head { display: flex; align-items: center; gap: 14px; }
.mine-head .avatar { width: 56px; height: 56px; font-size: 22px; background: linear-gradient(135deg, #EDB24A, #B8791C); }
.mstat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mstat3 .s { border-radius: 10px; padding: 12px 6px 10px; text-align: center; color: #fff; }
.mstat3 .s .e { font-size: 20px; }
.mstat3 .s .n { font-size: 17px; font-weight: 800; margin-top: 2px; }
.mstat3 .s .l { font-size: 11px; opacity: .92; margin-top: 1px; }
.mstat3 .s.teal { background: linear-gradient(135deg, #5CC98A, #34B37E); }
.mstat3 .s.blue { background: linear-gradient(135deg, #FBD27E, #E8A33D); }
.mstat3 .s.orange { background: linear-gradient(135deg, #F8D06A, #E8991B); }
.mstat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mstat2 .s { border-radius: 10px; padding: 14px 12px; color: #fff; }
.mstat2 .s .l { font-size: 11px; opacity: .92; display: flex; align-items: center; gap: 5px; }
.mstat2 .s .n { font-size: 20px; font-weight: 800; margin-top: 4px; }
.mstat2 .s.b1 { background: linear-gradient(180deg, #E8A33D, #FBE3C2); }
.mstat2 .s.b2 { background: linear-gradient(180deg, #EDB24A, #F7E3CD); }
/* 白卡菜单行（ycb3 u-cell 风格：左图标 + 标题 + 右值 + 箭头） */
.mcell { display: flex; align-items: center; gap: 10px; padding: 13px 12px; border-bottom: 1px solid #F0E6DC; cursor: pointer; font-size: 14px; }
.mcell:last-child { border-bottom: none; }
.mcell:active { background: var(--bg2); }
.mcell .e { font-size: 18px; flex: none; display: flex; align-items: center; }
.mcell .e img { width: 22px; height: 22px; object-fit: contain; display: block; }
.mcell .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcell .v { font-size: 12px; color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcell .arrow { color: #CFC3B8; font-size: 16px; flex: none; }
/* ycb3 退出按钮：错误红 #F2765E / 圆角 3px / 白字 */
.btn.logout { background: #F2765E; color: #fff; border-radius: 3px; font-size: 14px; height: 40px; line-height: 40px; padding: 0; }
.btn.logout:active { background: #DD4F44; }
/* 危险操作区（我的页底部退出）：上方分隔线 + 留白，与常规设置项拉开层级 */
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.dz-hint { color: var(--muted); font-size: 12px; text-align: center; margin-bottom: 10px; }

/* ===== v2 原子类（无序团 · 预期匹配） ===== */
/* 内边距统一由 #view（12px）提供：去掉 .page 自身 padding，避免叠加成 24px，
   并与不用 .page 的页面（聊天设置等）保持一致 */
.page { padding: 0; flex: 1; }
/* 行内左右分布（名称 | 金额）：子元素默认可收缩 + 文本可断行，金额/标签不压缩，
   避免窄屏（320px）上「名称挤爆一整行、金额被顶出卡片」。 */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-between > b, .row-between > .chip, .row-between > button, .row-between > .btn { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 只让「文本侧」可收缩断行；按钮/标签/金额不压缩，按钮组容器也不被挤扁 */
.row-between > .name, .row-between > .sub, .row-between > span, .row-between > div:first-child { min-width: 0; }
.row-between > .name, .row-between > div:first-child { flex: 1 1 auto; overflow-wrap: anywhere; }
.name { font-weight: 600; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.sub { color: var(--muted-txt); font-size: var(--fs-sm); line-height: 1.65; overflow-wrap: anywhere; text-wrap: pretty; }
.label { font-size: var(--fs-sm); color: var(--muted-txt); margin-bottom: 6px; text-wrap: pretty; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.mb8 { margin-bottom: 8px; }
.mt12 { margin-top: 12px; }
/* 键值表（基础布局见上方 .kv）：标签不断字、值右对齐等宽数字 */
.kv > span { color: var(--muted); white-space: nowrap; }
.kv > b { font-weight: 600; text-align: right; word-break: break-all; font-variant-numeric: tabular-nums; }
.card.ok { border: 1px solid var(--ok); color: var(--ok); text-align: center; font-weight: 600; }
input.slider { width: 100%; margin: 8px 0 4px; padding: 0; border: none; background: transparent; }
.qr { width: 176px; height: 176px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.shot { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.steps { display: flex; gap: 8px; margin-bottom: 12px; }
.steps span { flex: 1; text-align: center; font-size: 12px; padding: 7px 4px; border-radius: var(--radius); background: var(--bg2); color: var(--muted); }
.steps span.on { background: var(--primary); color: #fff; font-weight: 600; }
.price { font-size: 24px; font-weight: 800; margin: 8px 0 2px; }
.pkg-list { margin-top: 8px; }
.pkg-list .pkg { border: none; border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px; }
.pkg-list .pkg:last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid label { display: block; font-size: 12px; color: var(--muted); }
.form-grid input { margin-bottom: 0; }
/* 费率输入框：数值后面统一带 % 单位（与只读区 pct() 显示的「2%」同口径） */
.rate-field { display: flex; align-items: center; gap: 4px; }
.rate-field .input { flex: 1 1 auto; min-width: 0; }
.rate-unit { flex: none; font-size: 12px; color: var(--muted); }
input.input.sm { display: inline-block; width: auto; min-width: 96px; margin-bottom: 0; }
.shop-head { display: flex; align-items: center; gap: 10px; }
.sku-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== OCR 预检薄提示行（PRD §6.9.4：只标色，不放行不拦截） ===== */
.ocr-hint { margin-top: 8px; padding: 7px 10px; border-radius: var(--radius); font-size: 12px; line-height: 1.5; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.ocr-hint.ok { background: rgba(47, 169, 113, .1); color: var(--ok); border-color: rgba(47, 169, 113, .28); }
.ocr-hint.bad { background: rgba(229, 72, 59, .1); color: var(--warn); border-color: rgba(229, 72, 59, .28); }
.ocr-hint.off { display: none; }
/* 凭证五态标色（§6.9 / 设计稿 43:4）——仅标色，不改变任何订单状态 */
.ocr-flag { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; background: #c8c8c8; }
.ocr-flag.f0 { background: var(--ok); }
.ocr-flag.f1, .ocr-flag.f2, .ocr-flag.f3 { background: var(--warn); }
.ocr-flag.f4 { background: #c8c8c8; }

/* ===== 凭证人工终审条：按钮 + 原因输入同一容器内联展开（不叠浮层，页面卡片与浮层共用） ===== */
/* ===== 内联二次确认（inline-confirm，2026-10-30 重构）：一次只有一组可点的按钮 =====
   点触发 → 触发行**整行隐藏**（不是置灰），确认条就地替换展开；取消即恢复；成功后整块变完成态。
   置灰（disabled）只用于「提交中」；用置灰表达「已展开」会被用户误判为「按钮坏了 / 卡死」，一律禁止。 */
.ic { margin-top: 8px; }
.ic-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ic-acts[hidden] { display: none; }
.ic-panel { margin-top: 8px; padding: 12px; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--bg2); }
.ic-panel label { display: block; }
.ic-panel textarea { margin-top: 4px; margin-bottom: 8px; background: #fff; min-height: 64px; width: 100%; }
.ic-panel .chip { cursor: pointer; border: none; font-family: inherit; font-size: 12px; padding: 4px 10px; }
.ic-panel .chip[aria-pressed="true"] { background: rgba(232, 163, 61, .16); color: var(--primary); font-weight: 600; }
.ic-note { font-size: 13px; line-height: 1.55; color: var(--text); }
.ic-note.ok { color: var(--ok); }
.ic-note.warn { color: var(--warn); }
.ic-err { font-size: 12px; line-height: 1.5; color: var(--warn); margin-top: 8px; }
.ic-done { font-size: 13px; line-height: 1.5; color: var(--ok); font-weight: 600; padding: 4px 0; }
.ic-done::before { content: "✓ "; }
@media (max-width: 640px) {
  .ic-acts .btn.sm { flex: 1 1 40%; }
  .ic-panel .row .btn.sm { flex: 1 1 40%; }
}
/* 旧版终审条样式（review-bar/review-panel）：仅作兼容残留，新交互统一走 .ic */

/* ===== 底部固定下单条（设计稿：已选合计 + 统一下单） ===== */
.paybar { position: fixed; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 100%; max-width: 720px; z-index: 39; background: var(--card); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.paybar .pb-info b { font-size: 17px; color: var(--text); }
.paybar .btn { width: auto; min-width: 136px; padding: 10px 24px; }

/* ===== 订单页排版（2026-10-31 响应式重排）=====
   目标：320px 小屏不挤爆、430px+ 大屏不显小，横竖屏与平板都可读。
   做法：金额/标签不压缩且不断行，名称与说明可换行并允许任意处断行（overflow-wrap:anywhere），
   缩略图 44px 保证可点面积，待办条用悬挂缩进避免「· 」折行后顶格。 */
.od-name { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.od-amt { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.od-meta { margin-top: 4px; word-break: break-word; }
.od-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #eef2f7; cursor: zoom-in; flex: none; }
.od-hint { margin-left: 8px; min-width: 0; flex: 1 1 auto; }
.od-tag { color: #b45309; white-space: nowrap; font-size: var(--fs-sm); }   /* 兜底采购标记（原内联色） */
.od-todo { padding-left: 12px; text-indent: -12px; }   /* 悬挂缩进：「· 」起头的长句折行后不齐头乱 */
.od-todo + .od-todo { margin-top: 2px; }
/* ===== 团长订单页·按人区块（2026-10-31 拍板）：1 人 1 区块，依次 付款/服务费/收款 三状态位 ===== */
/* 凭证不展示缩略图（二次拍板）：状态文字蒙版占位（比「无」大 2 号），点击进浮层看图/核对 */
.pv-row { display: flex; gap: 8px; margin-top: 8px; }
/* solo：单个凭证位不横铺整卡（组件化铁律全站复用时固定 96px 宽） */
.pv-row.solo .pv-slot { flex: 0 0 96px; }
.pv-slot { flex: 1; min-width: 0; }
.pv-state { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.3; padding: 4px; background: var(--bg2); word-break: break-word; }
.pv-empty { width: 100%; aspect-ratio: 3 / 4; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; background: var(--bg2); }
.pv-cap { font-size: 11px; margin-top: 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
/* OCR 状态文字直接变色（圆点已去掉）：绿=已核对 / 红=异常 / 黄=正常待处理 */
.tx-okd { color: #48c122; }
.tx-bad { color: #e64340; }
.tx-warn { color: #b45309; }
/* 小屏（≤360px，如 iPhone SE/老安卓）：收紧卡片内边距与块间距，把省下的宽度给文字 */
@media (max-width: 360px) {
  #view { padding-left: 10px; padding-right: 10px; }
  .card { padding: 12px; margin-bottom: 10px; }
  .pkg { padding: 9px 10px; margin-bottom: 6px; }
  .od-thumb { width: 40px; height: 40px; }
  .kv { column-gap: 8px; row-gap: 5px; }
  .btn.sm { padding: 6px 10px; }
}
/* 大屏手机 / 平板（≥600px）：正文限宽居中，避免一行拉到 800px 造成「一行读不完、回扫串行」 */
@media (min-width: 600px) {
  #view > .page { max-width: 560px; width: 100%; margin-left: auto; margin-right: auto; }
}

/* ===== 团长本团页多团 tab ===== */
.group-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.group-tabs::-webkit-scrollbar { display: none; }
.group-tabs .gtab { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; }
.group-tabs .gtab.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ===== 后台响应式外壳（设计稿 41:1 / 43:152 通用约定） =====
   ≥1200px: 左侧导航 180px + 内容区；900-1200px: 侧导航收窄；
   <900px: 侧导航折叠为顶部横条、卡片通栏；<640px: 单列布局 */
/* 后台内容区高度 = 视口 - 底部主导航(tabbar)实高；统一引用 --tabbar-h 变量，避免旧硬编码 96px 与实高不符造成底部空白 */
.bo-shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--tabbar-h) - env(safe-area-inset-bottom)); min-height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom)); max-width: 1200px; margin: 0 auto; width: 100%; }
.bo-side { flex: none; width: 180px; background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; }
.bo-side .bo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.bo-side .bo-head .bo-role { margin-bottom: 0; }
.bo-side .bo-logout { flex: none; padding: 4px 10px; font-size: 12px; }
.bo-side .bo-role { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-side .bo-nav { display: block; padding: 9px 10px; border-radius: var(--radius); font-size: 14px; color: var(--text); text-decoration: none; margin-bottom: 2px; }
.bo-side .bo-nav.on { background: rgba(232, 163, 61, .08); color: var(--primary); font-weight: 600; }
/* admin 多团切换入口：导航上方的当前团按钮（窄屏下也保持可点） */
.bo-side .bo-group { display: block; width: 100%; margin: 0 0 10px; padding: 8px 10px; font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-main { flex: 1; min-width: 0; padding: 16px; }
/* 右上角全局筛选范围条（admin，除「团长管理」外各页）：双列团长/团下拉，右对齐 */
.bo-scope { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin: -2px 0 12px; }
.bo-scope .bo-scope-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bo-scope .gp-wrap { gap: 6px; }
.bo-scope select.input.sm { min-width: 0; }
@media (max-width: 640px) { .bo-scope { justify-content: flex-start; } .bo-scope select.input.sm { max-width: 42vw; } }
@media (max-width: 1200px) { .bo-shell { max-width: 100%; } .bo-side { width: 96px; padding: 14px 8px; } .bo-side .bo-role { font-size: 12px; } .bo-side .bo-nav { font-size: 13px; padding: 8px 6px; text-align: center; } .bo-main { padding: 12px; } }
@media (max-width: 900px) {
  .bo-shell { flex-direction: column; }
  .bo-side { width: 100%; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 8px 10px; gap: 6px; align-items: center; }
  .bo-side .bo-head { margin-bottom: 0; flex: none; }
  .bo-side .bo-role { display: block; font-size: 13px; }
  .bo-side .bo-logout { padding: 5px 12px; font-size: 13px; }
  .bo-side .bo-nav { white-space: nowrap; width: auto; margin-bottom: 0; padding: 8px 13px; font-size: 14px; }
  .bo-main { padding: 12px 10px; }
}
@media (max-width: 640px) {
  .bo-main { padding: 10px 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .paybar { padding: 8px 10px; }
  /* 移动版后台：顶栏两行（角色+退出 / 导航横滑），卡片贴边（bo-shell 高度继承默认 --tabbar-h 变量，不再硬编码 76px 造成底部空白） */
  .bo-side { flex-wrap: wrap; padding: 8px 10px 6px; gap: 4px; row-gap: 8px; }
  .bo-side .bo-head { width: 100%; justify-content: space-between; }
  .bo-side .bo-nav { padding: 8px 12px; }
  .bo-side .bo-nav.on { font-weight: 700; }
  .bo-main { padding: 10px 8px 16px; }
}

/* ===== 团长自动回复聊天（tuanzhangchat） ===== */
/* ===== 页面水印 ===== */
/* z-index 90：盖住正文与底栏（40/60），但压在弹窗(100)/Toast(200) 之下，不挡交互。
   平铺背景版：fixed 全屏 + SVG data-URI 平铺，零 DOM 子节点、零监听、零 reflow。
   颜色内嵌 SVG（data-URI 吃不到 CSS 变量），与旧 --wm-fg 同值。 */
.watermark-layer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 90; pointer-events: none; user-select: none; -webkit-user-select: none; background-repeat: repeat; }

/* z-index 97：高于软禁用遮罩(96)，确保禁用态聊天浮标浮在遮罩之上、可点击回复；低于弹窗/聊天抽屉(100) */
#chat-fab { position: fixed; right: 14px; bottom: calc(var(--tabbar-h) + 14px); z-index: 97; display: none; flex-direction: column; align-items: center; gap: 3px; }

/* 软禁用全屏遮罩（2026-10-30）：盖住正文/底栏/水印(z 0~95)，但聊天浮标(97)与聊天抽屉(100)在其之上仍可点击 */
.disabled-shroud { position: fixed; inset: 0; z-index: 96; background: rgba(20, 16, 12, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.disabled-shroud .ds-card { max-width: 320px; background: var(--card); border-radius: 16px; padding: 26px 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.disabled-shroud .ds-ic { font-size: 34px; margin-bottom: 10px; }
.disabled-shroud .ds-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.disabled-shroud .ds-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.disabled-shroud .ds-chat-btn { margin-top: 18px; width: 100%; border: none; background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; padding: 12px; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(232, 163, 61, .4); }
.disabled-shroud .ds-chat-btn:active { background: var(--primary-dark); }
#chat-fab .fab-ic { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 12px rgba(0,122,255,.35); cursor: pointer; position: relative; }
#chat-fab .fab-ic:active { background: var(--bg2); }
#chat-fab .fab-logo { width: 26px; height: 26px; object-fit: contain; }
#chat-fab .fab-label { font-size: 10px; color: var(--primary); background: #fff; border-radius: 8px; padding: 1px 5px; box-shadow: 0 1px 3px rgba(0,0,0,.1); white-space: nowrap; }
#chat-fab .fab-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--hot); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }

/* 聊天页高度 = 视口 - 底部主导航(tabbar)实高；统一引用 --tabbar-h 变量，与底栏严格对齐，
   输入框不会被底栏盖住，也不会因旧 132px 预留过大而多出滚动空白 */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - var(--tabbar-h) - env(safe-area-inset-bottom)); height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom)); }
.chat-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-head .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--bg2); }
.chat-head .nm { font-weight: 600; }
.chat-head .st { font-size: 12px; color: var(--muted); }
.chat-head .st.on { color: var(--ok); }
.chat-head .st.busy { color: var(--warn); }
.chat-head .st.hidden { color: var(--muted2); }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; gap: 8px; max-width: 100%; }
.chat-msg.me { flex-direction: row-reverse; }
.chat-msg .av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--bg2); flex: none; }
.chat-msg .bubble { max-width: 72%; padding: 9px 12px; border-radius: 10px; background: var(--card); font-size: 14px; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative; }
.chat-msg .bubble.typing { opacity: .55; color: var(--muted2); font-style: italic; animation: chat-typing 1.2s ease-in-out infinite; }
@keyframes chat-typing { 0%, 100% { opacity: .45; } 50% { opacity: .8; } }
.chat-msg.me .bubble { background: var(--primary); color: #fff; }
.chat-msg .meta { font-size: 10px; color: var(--muted2); margin-top: 3px; }
.chat-msg .recalled { color: var(--muted2); font-style: italic; }
.chat-msg .ops { display: flex; gap: 6px; margin-top: 3px; }
.chat-msg .ops button { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--primary); cursor: pointer; }
.chat-quota { flex: none; text-align: center; font-size: 11px; color: var(--warn); padding: 4px; background: rgba(244,53,48,.06); }
.chat-input { flex: none; display: flex; gap: 8px; padding: 8px 10px; background: var(--card); border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; font-size: 14px; resize: none; height: 40px; line-height: 1.4; }
.chat-input .btn { width: auto; padding: 0 16px; }

/* 会话行（对齐 aichath5「最近对话」）：卡片行 = 头像+未读角标 / 名字+最后一条预览 / 时间+状态标签 */
.chat-session { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 12px 9px; cursor: pointer; }
.chat-session:active { background: var(--bg2); }
.chat-session .cs-av { position: relative; flex: none; }
.chat-session .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg2); display: block; }
.chat-session .cs-badge { position: absolute; top: -5px; right: -7px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--hot); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 600; }
.chat-session .cs-mid { flex: 1; min-width: 0; }
.chat-session .cs-t1 { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-session .cs-t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-session .cs-rt { flex: none; text-align: right; }
.chat-session .cs-tm { font-size: 11px; color: var(--muted); }
.chat-session .cs-tag { display: inline-block; margin-top: 3px; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.chat-session .cs-tag.auto { background: #e8f7ee; color: #1f9d6b; }
.chat-session .cs-tag.human { background: #fff4e0; color: #b45309; }
.chat-tip { font-size: 12px; color: var(--muted); padding: 10px 12px; }

.chat-set-tabs { display: flex; gap: 8px; padding: 10px 12px; }
.chat-set-tabs .t { padding: 6px 14px; border-radius: 999px; background: var(--bg2); color: var(--muted); font-size: 13px; cursor: pointer; }
.chat-set-tabs .t.on { background: var(--primary); color: #fff; }
.chat-script-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-script-row .c { flex: 1; font-size: 13px; }
.chat-script-row .c.disabled { color: var(--muted2); text-decoration: line-through; }

/* 订单页「上轮付款 ↔ 本轮收款」1对1 配对卡（2026-10-29） */
.pair-card { padding: 12px; }
.pair-row { padding: 6px 0; }
.pair-sep { border-top: 1px dashed var(--line); margin: 6px 0; }
.pair-row img.thumb { flex: none; }

/* 订单页支付宝区块顶部大字（N 笔，请分别支付后上传凭证） */
.pay-head { font-size: 20px; font-weight: 700; margin: 4px 0 8px; line-height: 1.4; }


/* 只读数值展示（2026-11-01）：替代伪装成输入框的 readonly/disabled input，消除“可填”误导 */
.ro-line { display:block; font-size:13px; color:#888; margin-top:4px; }
.ro-amt, .ro-val { display:inline-block; min-width:40px; padding:6px 10px; border-radius:8px; font-variant-numeric:tabular-nums; font-weight:700; line-height:1.2; }
.ro-amt { background:#eef3ff; color:#1a56db; }   /* 金额：蓝底突出 */
.ro-val { background:#f1f3f5; color:#222; }       /* 普通只读数值：灰底 */


/* 团员卡片「审单」入口（2026-11-01）：在线状态右侧，形似 chip 的可点按钮 */
.chip-btn { display:inline-flex; align-items:center; height:22px; padding:0 10px; border-radius:11px; border:1px solid #c9d4e6; background:#fff; color:#1a56db; font-size:12px; line-height:1; cursor:pointer; }
.chip-btn:active { background:#eef3ff; }
/* 进出团审核 tab（2026-11-01）
   ⚠️ 2026-11-01 收窄：裸 `.tab` 会泄漏到底部菜单（#tabbar .tab 同名类——白底/圆角边框/蓝底选中
   全糊到底栏上，用户实测「底部菜单样式丢了」）。统一收进 .tab-bar 作用域，底栏不受影响。 */
.tab-bar { display:flex; gap:6px; flex-wrap:wrap; }
.tab-bar .tab { padding:7px 14px; border-radius:10px; border:1px solid #e3e8f0; background:#fff; color:#555; font-size:13px; cursor:pointer; }
.tab-bar .tab.on { background:#1a56db; border-color:#1a56db; color:#fff; }
.tab-panel { margin-top:4px; }
