/* 惠省赚多多 H5 端样式（对齐演示小程序/H5 视觉） */
:root {
  --primary: #2d5af0;
  --orange: #ff5a1f;
  --red: #ff2d2d;
  --text: #333;
  --sub: #909399;
  --line: #f2f2f2;
  --bg: #f5f5f5;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; border: none; background: none; padding: 0; cursor: pointer; }
input { font-family: inherit; outline: none; }
.page { min-height: 100vh; padding-bottom: 64px; background: var(--bg); }
.page.no-tabbar { padding-bottom: 0; }

/* 顶部搜索 + 分类 */
.top { background: linear-gradient(180deg, #ffb25b 0%, #ff8a2f 52%, #ff7a2f 100%); padding: 10px 12px 0; }
.search-row { display: flex; align-items: center; gap: 10px; }
.search-row .logo { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px; box-shadow: 0 2px 8px rgba(255,255,255,.35); }
.search-box { flex: 1; height: 40px; background: #fff; border-radius: 20px; display: flex; align-items: center; padding: 0 6px 0 16px; }
.search-box input { flex: 1; border: none; font-size: 14px; color: #333; background: transparent; }
.search-box input::placeholder { color: #b8bcc4; }
.search-btn { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ff6a52, #ff2d2d); display: flex; align-items: center; justify-content: center; }
.search-btn svg { width: 18px; height: 18px; color: #fff; }
.top-nav { display: flex; align-items: center; gap: 22px; padding: 14px 4px 10px; overflow-x: auto; white-space: nowrap; color: #3a3a3a; font-size: 15px; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav .it { flex: 0 0 auto; }
.top-nav .it.on { font-weight: 700; }
.top-nav .filter { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.top-nav .filter svg { width: 16px; height: 16px; }

/* 通用卡片 */
.card { background: #fff; border-radius: 12px; margin: 10px; overflow: hidden; }
.section { margin-top: 10px; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; }
.section-head .t { font-size: 18px; font-weight: 700; color: var(--red); }
.section-head .s { background: var(--orange); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }

/* banner */
.banner { position: relative; }
.banner img { width: 100%; height: auto; display: block; }
.banner .dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.banner .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner .dots i.on { background: #fff; width: 14px; border-radius: 3px; }

/* 公告 */
.notice { display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px 14px; font-size: 14px; }
.notice .lbl { flex: 1; }
.notice .arrow { color: #c5c9d1; font-size: 18px; }

/* 导航 */
.nav-grid { background: #fff; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 6px; }
.nav-grid .it { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; color: #333; }
.nav-grid .it img { width: 46px; height: 46px; border-radius: 14px; }

/* CPS 专区组件 */
.cps-zone { margin: 10px; border-radius: 12px; background: #fff; overflow: hidden; }
.cps-zone .cell { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.cps-zone .cell:last-child { border-bottom: none; }
.cps-zone .cell img { width: 54px; height: 54px; border-radius: 12px; flex: 0 0 54px; }
.cps-zone .info { flex: 1; min-width: 0; }
.cps-zone .info .t { font-size: 15px; font-weight: 600; }
.cps-zone .info .s { font-size: 12px; color: var(--sub); margin-top: 3px; }
.cps-zone .btn { color: #fff; border-radius: 14px; padding: 5px 12px; font-size: 12px; flex: 0 0 auto; }

/* 活动魔方 */
.activity { margin: 10px; background: #fff; border-radius: 12px; padding: 12px; }
.activity .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.activity .card2 { border: 1px solid #f4f4f4; border-radius: 10px; padding: 10px; display: flex; gap: 8px; }
.activity .card2 .info { flex: 1; min-width: 0; }
.activity .card2 .n { font-size: 14px; font-weight: 600; }
.activity .card2 .d { font-size: 11px; color: var(--sub); margin: 3px 0 10px; }
.activity .card2 .b { display: inline-block; font-size: 11px; color: #fff; padding: 3px 8px; border-radius: 10px; }
.activity .card2 img { width: 70px; height: 70px; border-radius: 8px; flex: 0 0 70px; object-fit: cover; }

/* 悬浮标签 */
.floating-tag { position: fixed; right: 10px; top: 34%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 6px 6px; border-radius: 8px; writing-mode: vertical-rl; letter-spacing: 2px; z-index: 50; }

/* tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: #fff;
  border-top: 1px solid #eee; display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .it { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: #8a8f99; }
.tabbar .it img { width: 22px; height: 22px; }
.tabbar .it.on { color: var(--primary); }

/* 我的 */
.member-hero { background: #2d5af0; border-radius: 14px; margin: 12px; padding: 18px 16px 0; color: #fff; }
.member-hero .row1 { display: flex; align-items: center; gap: 12px; }
.member-hero .row1 img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.member-hero .row1 .n { font-size: 17px; font-weight: 600; }
.member-hero .row1 .d { font-size: 12px; opacity: .8; margin-top: 3px; }
.member-hero .gear { margin-left: auto; opacity: .9; }
.member-hero .assets { display: flex; text-align: center; padding: 18px 0 16px; align-items: center; }
.member-hero .assets > div { flex: 1; }
.member-hero .assets .v { font-size: 20px; font-weight: 600; }
.member-hero .assets .k { font-size: 12px; opacity: .85; margin-top: 4px; }
.member-hero .assets .div { flex: 0 0 1px; width: 1px; height: 34px; background: rgba(255,255,255,.28); }
.vip-bar { background: linear-gradient(90deg,#1c1c24,#2b2b36); color: #ffd77a; border-radius: 10px; margin: 0 12px; padding: 12px 14px; display: flex; align-items: center; font-size: 13px; }
.vip-bar .unlock { margin-left: auto; background: #ffd77a; color: #2b2b2b; border-radius: 12px; padding: 4px 10px; font-size: 12px; }
.grid4 { background: #fff; border-radius: 12px; margin: 10px 12px; display: grid; grid-template-columns: repeat(4,1fr); padding: 14px 0; }
.grid4 .it { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; }
.grid4 .it img { width: 38px; height: 38px; border-radius: 12px; }
.list { background: #fff; border-radius: 12px; margin: 10px 12px; overflow: hidden; }
.list .it { display: flex; align-items: center; gap: 10px; padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.list .it:last-child { border-bottom: none; }
.list .it img { width: 22px; height: 22px; border-radius: 6px; }
.list .it .t { flex: 1; }
.list .it .arrow { color: #c5c9d1; font-size: 18px; }
.list .it .v { color: var(--sub); font-size: 13px; margin-right: 4px; }

/* 通用列表页 */
.page-head { height: 48px; display: flex; align-items: center; padding: 0 12px; background: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #f2f2f2; }
.page-head .back { width: 28px; font-size: 22px; color: #333; }
.page-head .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.page-head .right { width: 28px; }

/* 佣金页 */
.amount-card { background: linear-gradient(135deg,#4b7bff,#2d5af0); color: #fff; padding: 24px 20px; }
.amount-card .k { font-size: 13px; opacity: .85; }
.amount-card .v { font-size: 34px; font-weight: 700; margin: 8px 0 16px; }
.amount-card .btn { background: #fff; color: var(--primary); border-radius: 18px; padding: 7px 18px; font-size: 14px; font-weight: 600; display: inline-block; }
.row-item { background: #fff; padding: 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.row-item:last-child { border-bottom: none; }
.row-item .l { flex: 1; min-width: 0; }
.row-item .l .t { font-size: 14px; }
.row-item .l .d { font-size: 12px; color: var(--sub); margin-top: 4px; }
.row-item .r { text-align: right; }
.row-item .r .amt { font-size: 15px; font-weight: 600; color: #67c23a; }
.row-item .r .amt.neg { color: #f56c6c; }
.row-item .r .st { font-size: 12px; color: var(--sub); margin-top: 4px; }
.empty { text-align: center; color: #b5b9c2; font-size: 13px; padding: 60px 20px; }

/* 表单 */
.form { background: #fff; margin: 10px; border-radius: 12px; padding: 4px 14px; }
.form .f { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.form .f:last-child { border-bottom: none; }
.form .f .lb { width: 96px; flex: 0 0 96px; color: #333; }
.form .f input, .form .f select { flex: 1; border: none; font-size: 14px; text-align: right; color: #333; background: transparent; }
.btn-primary { display: block; width: calc(100% - 24px); margin: 20px 12px; height: 46px; border-radius: 23px; background: var(--primary); color: #fff; font-size: 16px; }
.btn-primary[disabled] { opacity: .6; }
.tip { font-size: 12px; color: var(--sub); margin: 10px 16px; line-height: 1.7; }

/* 登录 */
.login-wrap { min-height: 100vh; background: #fff; padding: 60px 28px 0; }
.login-wrap h1 { font-size: 26px; margin: 0 0 8px; }
.login-wrap .sub { color: var(--sub); font-size: 13px; margin-bottom: 34px; }
.login-wrap .sub a { color: var(--primary); }
.login-wrap input { width: 100%; height: 50px; background: #f5f6f8; border-radius: 25px; border: none; padding: 0 22px; font-size: 15px; margin-bottom: 14px; }
.login-wrap .forgot { text-align: right; color: var(--sub); font-size: 13px; margin-bottom: 26px; }
.login-wrap .btn { width: 100%; height: 48px; border-radius: 24px; background: var(--primary); color: #fff; font-size: 16px; }
.login-err { color: #f56c6c; font-size: 13px; min-height: 20px; margin-bottom: 8px; }

/* CPS 专区页 */
.zone-banner { width: 100%; }
.zone-filter { background: #fff; padding: 10px 12px; display: flex; gap: 8px; overflow-x: auto; }
.zone-filter::-webkit-scrollbar { display: none; }
.zone-filter .chip { flex: 0 0 auto; padding: 6px 14px; border-radius: 16px; background: #f5f6f8; color: #606266; font-size: 13px; }
.zone-filter .chip.on { background: #fff3ea; color: var(--orange); font-weight: 600; }
.goods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px; }
.goods .g { background: #fff; border-radius: 10px; overflow: hidden; }
.goods .g img { width: 100%; height: 130px; object-fit: cover; }
.goods .g .bd { padding: 8px 10px 10px; }
.goods .g .n { font-size: 14px; font-weight: 600; }
.goods .g .d { font-size: 12px; color: var(--sub); margin: 4px 0 8px; }
.goods .g .price { color: #ff2d2d; font-size: 16px; font-weight: 700; }
.goods .g .price small { font-size: 11px; font-weight: 400; }
.goods .g .btn { float: right; background: var(--orange); color: #fff; border-radius: 12px; padding: 4px 10px; font-size: 12px; }

/* 邀请海报 */
.poster-wrap { padding: 16px; }
.poster-wrap img { width: 100%; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.invite-code { background: #fff; border-radius: 12px; margin: 0 16px; padding: 16px; text-align: center; }
.invite-code .c { font-size: 24px; font-weight: 700; letter-spacing: 3px; color: var(--primary); margin: 8px 0; }
.invite-code .btn { display: inline-block; margin-top: 12px; background: var(--primary); color: #fff; border-radius: 18px; padding: 8px 22px; font-size: 14px; }

/* 团队 */
.team-sum { background: linear-gradient(135deg,#4b7bff,#2d5af0); color: #fff; margin: 10px; border-radius: 12px; padding: 20px; text-align: center; }
.team-sum .v { font-size: 30px; font-weight: 700; }
.team-sum .k { font-size: 13px; opacity: .85; margin-top: 4px; }

/* toast */
.toast-wrap { position: fixed; top: 40%; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: rgba(0,0,0,.75); color: #fff; padding: 9px 16px; border-radius: 6px; font-size: 13px; text-align: center; }
