/* bbt-xi H5 样式（移动端优先）
   视觉体系取自 https://ycb3.mixiaoxiao.com/h5（优财宝 · uni-app 风格）：
   主蓝 #007aff / 按下 #0062cc / 品牌绿 #00bc82 / 警示红 #e64340·#f43530 / 成功绿 #48c23d
   页面底 #f8f8f8 / 卡片 #fff / 主字 #353535 / 次字 #888 / 边线 #e5e5e5 / 圆角 5px
   风格图标：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"; }

/* ===== 设计令牌（优财宝配色） ===== */
:root {
  --primary: #007aff;
  --primary-dark: #0062cc;
  --brand: #00bc82;
  --bg: #f8f8f8;
  --bg2: #f7f7f7;
  --card: #ffffff;
  --text: #353535;
  --muted: #888;
  --muted2: #9f9f9f;
  --line: #e5e5e5;
  --ok: #48c23d;
  --warn: #f43530;
  --hot: #e64340;
  --radius: 5px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
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; }
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

/* ===== 顶部导航（优财宝式蓝色投影条） ===== */
#topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 10px; background: var(--card); border-bottom: 1px solid var(--line); overflow: visible; }
#topbar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 5px; pointer-events: none; background: url("static/img/shadow-blue.png") no-repeat; background-size: 100% 100%; }
#top-title { flex: 1; font-size: 16px; font-weight: 600; text-align: center; color: var(--text); }
.icon-btn { border: none; background: none; font-size: 24px; font-weight: 300; color: var(--text); width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer; line-height: 1; padding: 0; }
.icon-btn:active { background: var(--bg2); }
#top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 36px; justify-content: flex-end; }
#view { flex: 1; padding: 12px 12px 84px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.muted { color: var(--muted); font-size: 12px; }

/* ===== 卡片 ===== */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0, 0, 0, .117647), 0 1px 4px rgba(0, 0, 0, .117647); }
.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; }
.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(72, 194, 61, .12); color: var(--ok); }
.tag.warn { background: rgba(244, 53, 48, .1); color: var(--warn); }
.tag.hot { background: rgba(230, 67, 64, .1); color: var(--hot); }
.tag.blue { background: rgba(0, 122, 255, .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(72, 194, 61, .12); color: var(--ok); }
.chip.open { background: rgba(0, 122, 255, .1); color: var(--primary); }
.chip.closed { background: rgba(244, 53, 48, .1); color: var(--warn); }
.chip.completed { background: var(--bg2); color: var(--muted); }
.chip.joined { background: var(--bg2); color: var(--muted); }
.chip.ordered { background: rgba(0, 122, 255, .1); color: var(--primary); }

/* ===== 页内分段切换（本团 / 本轮） ===== */
.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: 11px; border-radius: var(--radius); cursor: pointer; line-height: 1.4; }
.btn:active { background: #e5e5e5; }
.btn.primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:active { background: var(--primary-dark); }
.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: #ce3c39; }
.btn:disabled { background: #ccc; color: #fff; cursor: not-allowed; }

/* ===== 表单 ===== */
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); }
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 6px rgba(0, 0, 0, .117647), 0 1px 4px rgba(0, 0, 0, .117647); }
.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, #4da3ff, #007aff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; flex: none; overflow: hidden; }
.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(0, 122, 255, .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, #007aff, #4da3ff); 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 { color: var(--hot); font-weight: 700; }

/* ===== 底部 tabbar（优财宝图标：灰 #9f9f9f / 选中品牌绿 #00bc82） ===== */
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 720px; display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 5px 0 calc(5px + env(safe-area-inset-bottom)); z-index: 40; }
#tabbar .tab { flex: 1; text-align: center; font-size: 11px; color: var(--muted2); cursor: pointer; padding: 3px 0; text-decoration: none; }
#tabbar .tab .ic { display: block; width: 22px; height: 22px; margin: 0 auto 2px; font-size: 20px; line-height: 22px; }
#tabbar .tab .ic-ye { opacity: .45; }
#tabbar .tab.on { color: var(--brand); font-weight: 600; }
#tabbar .tab.on .ic-ye { opacity: 1; }

/* ===== 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(0, 0, 0, .8); color: #fff; padding: 9px 16px; border-radius: var(--radius); font-size: 13px; max-width: 78vw; animation: tin .18s ease; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }

/* ===== modal ===== */
#modal-root .mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fin .15s ease; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
#modal-root .modal { background: var(--card); border-radius: 16px 16px 0 0; width: 100%; max-width: 720px; 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(30px); } to { transform: translateY(0); } }
#modal-root .modal .title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

/* ===== 滑块 ===== */
.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%), #e3e8f0 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(0, 122, 255, .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: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; cursor: pointer; position: relative; background: var(--card); }
.pkg.sel { border-color: var(--primary); background: rgba(0, 122, 255, .06); }
.pkg .shop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pkg .sku-line { font-size: 12px; color: #475069; line-height: 1.7; }
.pkg .p-total { font-weight: 700; color: var(--hot); }
.pkg .chk { position: absolute; right: 10px; top: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #ccc; }
.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 #ccc; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.pay-amount { text-align: center; font-size: 24px; font-weight: 800; color: var(--hot); margin: 6px 0 2px; }
.notice { background: rgba(244, 53, 48, .06); border: 1px solid rgba(244, 53, 48, .25); color: #ce3c39; font-size: 12px; border-radius: var(--radius); padding: 9px 12px; margin-bottom: 12px; line-height: 1.6; }
.notice.blue { background: rgba(0, 122, 255, .06); border-color: rgba(0, 122, 255, .25); color: var(--primary-dark); }
.empty { text-align: center; color: var(--muted); padding: 36px 0; font-size: 13px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.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; height: 140px; overflow: hidden; background: var(--card); }
.login-hero img { width: 100%; height: 100%; object-fit: cover; object-position: right top; display: block; }

/* ===== v2 原子类（无序团 · 预期匹配） ===== */
.page { padding: 12px; flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.name { font-weight: 600; }
.sub { color: var(--muted); font-size: 12px; }
.label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.mb8 { margin-bottom: 8px; }
.mt12 { margin-top: 12px; }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 600; text-align: right; word-break: break-all; }
.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; color: var(--hot); margin: 8px 0 2px; }
.pkg-list { margin-top: 8px; }
.pkg-list .pkg { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; 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; }
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; }
