:root {
  --brand: #0d5e56;
  --brand-light: #17877b;
  --brand-grad: linear-gradient(135deg, #0d5e56 0%, #1fa08f 100%);
  --warn: #ed6a0c;
  --danger: #ee0a24;
  --van-primary-color: #0d5e56;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { background: #e6e8ec; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f6f7f9; box-shadow: 0 0 28px rgba(0,0,0,.12); position: relative; }
.page { min-height: 100vh; padding-bottom: 24px; }
.page.has-tabbar { padding-bottom: 76px; }

/* 顶部导航 */
.m-nav { position: sticky; top: 0; z-index: 100; }
.m-nav .van-nav-bar__title { font-weight: 600; }

/* tabbar 固定居中 */
.tabbar-wrap { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 120; box-shadow: 0 -1px 8px rgba(0,0,0,.05); }

/* 弹层对齐手机壳 */
.van-popup--bottom { left: 50%; transform: translateX(-50%); max-width: 480px; }
.van-toast { max-width: 70vw; }

/* 主色按钮 */
.van-button--primary { background: var(--brand-grad); border: none; }
.van-tabbar-item--active { color: var(--brand); }

/* 通用块 */
.card-box { background: #fff; border-radius: 12px; margin: 10px 12px; padding: 14px; box-shadow: 0 2px 10px rgba(20,40,60,.04); }
.sec-title { font-size: 15px; font-weight: 600; color: #1f2329; margin: 16px 14px 8px; display: flex; align-items: center; justify-content: space-between; }
.sec-title .more { font-size: 12px; color: #969799; font-weight: 400; }
.muted { color: #969799; font-size: 12px; }
.flex { display: flex; align-items: center; }
.flex1 { flex: 1; min-width: 0; }
.tr { text-align: right; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.brand-text { color: var(--brand); }
.price { color: #d4380d; font-weight: 700; }
.line-through { text-decoration: line-through; color: #c8c9cc; font-weight: 400; font-size: 12px; }

/* 头像 */
.m-avatar { border-radius: 50%; background: var(--brand-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }

/* 登录页 */
.login-hero { background: var(--brand-grad); padding: 44px 24px 60px; color: #fff; border-radius: 0 0 26px 26px; }
.login-hero h1 { margin: 0; font-size: 26px; letter-spacing: 1px; }
.login-hero p { margin: 8px 0 0; opacity: .85; font-size: 13px; }
.login-card { background: #fff; border-radius: 14px; margin: -34px 16px 12px; padding: 8px 8px 20px; box-shadow: 0 6px 24px rgba(13,94,86,.14); position: relative; }
.demo-tip { margin: 10px 16px 20px; background: #eef6f5; border: 1px dashed #9fc6c1; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #4a6763; line-height: 1.9; }
.demo-tip .chip { display: inline-block; background: #fff; border: 1px solid #cfe3e0; border-radius: 20px; padding: 1px 10px; margin: 0 6px 4px 0; color: var(--brand); }

/* 首页 */
.home-hero { background: var(--brand-grad); padding: 14px 14px 46px; color: #fff; }
.home-hero .hello { font-size: 17px; font-weight: 600; }
.club-card { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 10px 12px; margin-top: 12px; backdrop-filter: blur(4px); }
.club-card .name { font-size: 15px; font-weight: 600; }
.club-card .addr { font-size: 12px; opacity: .85; margin-top: 4px; }
.black-warn { background: #ee0a24; color: #fff; font-size: 13px; padding: 8px 14px; }
.banner-swipe { margin: -34px 12px 0; border-radius: 12px; overflow: hidden; height: 110px; }
.banner-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.banner-scroll::-webkit-scrollbar { display: none; }
.banner-scroll .banner-item { flex: 0 0 100%; scroll-snap-align: start; border-radius: 12px; }
.banner-item { height: 110px; display: flex; flex-direction: column; justify-content: center; padding: 0 20px; color: #fff; }
.banner-item .t { font-size: 18px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.2); }
.banner-item .s { font-size: 12px; opacity: .9; margin-top: 6px; }
.banner-g0 { background: linear-gradient(120deg, #f2994a, #f2c94c); }
.banner-g1 { background: linear-gradient(120deg, #4568dc, #b06ab3); }
.banner-g2 { background: linear-gradient(120deg, #11998e, #38ef7d); }
.quick-grid { margin: 10px 12px; border-radius: 12px; overflow: hidden; }
.pending-bar { margin: 10px 12px; background: linear-gradient(90deg, #fff7e8, #ffedd6); border: 1px solid #ffd591; color: #b35c00; border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; align-items: center; }

/* 会员卡卡面 */
.vip-scroll { display: flex; overflow-x: auto; padding: 4px 12px 8px; gap: 10px; scrollbar-width: none; }
.vip-scroll::-webkit-scrollbar { display: none; }
.vip-face { flex: 0 0 258px; border-radius: 14px; padding: 14px 16px; color: #fff; position: relative; overflow: hidden; min-height: 108px; }
.vip-face.block { flex: none; width: auto; margin: 10px 12px; }
.vip-face::after { content: ''; position: absolute; right: -32px; top: -32px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); }
.vip-face .kind { font-size: 11px; border: 1px solid rgba(255,255,255,.6); border-radius: 4px; padding: 0 5px; display: inline-block; }
.vip-face .name { font-size: 16px; font-weight: 700; margin-top: 6px; }
.vip-face .left { font-size: 13px; margin-top: 10px; opacity: .95; }
.vip-face .exp { font-size: 11px; opacity: .75; margin-top: 4px; }
.face-k1 { background: linear-gradient(135deg, #f2762d, #fb5b5b); }
.face-k2 { background: linear-gradient(135deg, #0d5e56, #23a696); }
.face-k3 { background: linear-gradient(135deg, #6a5af9, #c96efd); }
.face-k4 { background: linear-gradient(135deg, #24344d, #4f6d8e); }
.face-dead { background: linear-gradient(135deg, #9aa0a6, #c2c7cd); }

/* 日期条 */
.day-strip { display: flex; overflow-x: auto; gap: 8px; padding: 10px 12px; background: #fff; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-item { flex: 0 0 52px; text-align: center; border-radius: 10px; padding: 8px 0; background: #f5f6f8; color: #333; }
.day-item .w { font-size: 12px; color: #969799; }
.day-item .d { font-size: 13px; font-weight: 600; margin-top: 3px; }
.day-item.on { background: var(--brand-grad); color: #fff; }
.day-item.on .w { color: rgba(255,255,255,.85); }

/* 课程条目 */
.course-item { display: flex; background: #fff; border-radius: 12px; margin: 10px 12px; padding: 13px; }
.course-time { width: 56px; text-align: center; border-right: 1px solid #f0f1f3; margin-right: 12px; flex-shrink: 0; }
.course-time .b { font-size: 15px; font-weight: 700; color: #1f2329; }
.course-time .e { font-size: 11px; color: #b0b3b8; margin-top: 3px; }
.course-item .title { font-size: 15px; font-weight: 600; color: #1f2329; }
.stars { color: #f6a623; font-size: 11px; letter-spacing: 1px; }

/* 时段网格 */
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { border: 1px solid #e3e5e8; border-radius: 8px; text-align: center; padding: 7px 0 5px; font-size: 13px; color: #323233; background: #fff; }
.slot .r { display: block; font-size: 10px; color: #c0c2c6; }
.slot.dis { background: #f5f6f8; color: #c0c2c6; }
.slot.on { border-color: var(--brand); background: #e9f3f2; color: var(--brand); font-weight: 600; }
.slot.on .r { color: var(--brand); }

/* 工作台 */
.staff-hero { background: var(--brand-grad); color: #fff; padding: 18px 16px 52px; }
.staff-hero .role-tag { background: rgba(255,255,255,.2); border-radius: 20px; font-size: 11px; padding: 2px 10px; display: inline-block; margin-left: 8px; vertical-align: 2px; }
.stat-row { display: flex; background: #fff; border-radius: 12px; margin: -36px 12px 10px; padding: 14px 0; box-shadow: 0 4px 16px rgba(13,94,86,.10); position: relative; }
.stat-cell { flex: 1; text-align: center; border-right: 1px solid #f0f1f3; }
.stat-cell:last-child { border-right: none; }
.stat-cell .v { font-size: 18px; font-weight: 700; color: #1f2329; }
.stat-cell .l { font-size: 11px; color: #969799; margin-top: 3px; }

/* 数据看板 */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 12px; }
.kpi { background: #fff; border-radius: 12px; padding: 13px 14px; }
.kpi .l { font-size: 12px; color: #969799; }
.kpi .v { font-size: 21px; font-weight: 700; color: #1f2329; margin-top: 6px; }
.kpi .c { font-size: 11px; margin-top: 5px; }
.up { color: #d4380d; } .down { color: #2a9d4a; }

/* 签名板 */
.sign-pad-wrap { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.sign-canvas { width: 100%; height: 190px; background: #fff; border: 1.5px dashed #c8c9cc; border-radius: 10px; touch-action: none; display: block; }

/* 签到大按钮 */
.checkin-big { width: 160px; height: 160px; border-radius: 50%; background: var(--brand-grad); color: #fff; border: 8px solid #d9ebe9; margin: 30px auto 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; letter-spacing: 2px; box-shadow: 0 10px 26px rgba(13,94,86,.35); }
.checkin-big:active { transform: scale(.96); }

/* 列表条目通用 */
.rec-item { background: #fff; border-radius: 12px; margin: 10px 12px; padding: 13px 14px; }
.rec-item.black { background: #fff1f0; border: 1px solid #ffccc7; }
.rec-item .head { display: flex; align-items: center; justify-content: space-between; }
.rec-item .name { font-size: 15px; font-weight: 600; color: #1f2329; }
.rec-item .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* 选择卡片(开卡/买卡) */
.cat-pick { border: 1.5px solid #ebedf0; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.cat-pick.on { border-color: var(--brand); background: #eef6f5; }

/* 合同 */
.contract-body { white-space: pre-wrap; font-size: 13px; line-height: 1.9; color: #333; }
.sign-img-show { border: 1px solid #ebedf0; border-radius: 8px; background: #fafafa; max-height: 120px; }

/* 空态间距 */
.van-empty { padding-top: 60px; }

/* 里程碑 */
.ms-hero { background: var(--brand-grad); border-radius: 14px; margin: 12px; padding: 20px 18px; color: #fff; position: relative; overflow: hidden; }
.ms-hero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.12); }
.ms-hero .l1 { font-size: 13px; opacity: .9; }
.ms-hero .l2 { font-size: 16px; margin-top: 10px; }
.ms-hero .l2 b { font-size: 40px; font-weight: 800; margin: 0 4px; }
.ms-hero .l3 { font-size: 11px; opacity: .75; margin-top: 8px; }
.ms-line { margin: 0 12px; padding-left: 16px; border-left: 2px solid #d9ebe9; }
.ms-item { position: relative; margin-bottom: 12px; }
.ms-dot { position: absolute; left: -30px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid #e0a800; color: #e0a800; display: flex; align-items: center; justify-content: center; }
.ms-dot.done { border-color: var(--brand); color: var(--brand); background: #e9f3f2; }
.ms-card { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 10px rgba(20,40,60,.04); }
.ms-badge { display: inline-block; background: var(--brand-grad); color: #fff; border-radius: 20px; font-size: 12px; font-weight: 600; padding: 2px 12px; }
.ms-summary { margin-top: 10px; background: #f7f8fa; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #333; line-height: 1.8; }
.ms-cmp { border-top: 1px dashed #ebedf0; margin-top: 12px; padding-top: 10px; }
.ms-cmp-cell { flex: 1; min-width: 70px; background: #f7f8fa; border-radius: 10px; padding: 8px 10px; text-align: center; }
.ms-cmp-cell .l { font-size: 11px; color: #969799; }
.ms-cmp-cell .v { font-size: 17px; font-weight: 700; color: #1f2329; margin-top: 2px; }
.ms-cmp-cell .d { font-size: 11px; margin-top: 2px; color: #969799; }
.ms-cmp-cell .d.dn { color: #2a9d4a; }
.ms-cmp-cell .d.up { color: #d4380d; }

/* 训练计划 */
.plan-idx { width: 28px; height: 28px; border-radius: 50%; background: #e9f3f2; color: var(--brand); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plan-input { border: 1px solid #ebedf0; border-radius: 8px; padding: 7px 10px; font-size: 14px; width: 100%; outline: none; background: #fff; color: #323233; }
.plan-input:focus { border-color: var(--brand); }
.ai-box { margin: 12px; background: linear-gradient(135deg, #f3f1ff, #eef7ff); border: 1px solid #ddd6fe; border-radius: 12px; padding: 12px 14px; }
.ai-ta { width: 100%; border: 1px solid #ddd6fe; border-radius: 8px; margin-top: 8px; padding: 8px 10px; font-size: 14px; outline: none; resize: none; background: #fff; color: #323233; font-family: inherit; }
.unit-seg { display: inline-flex; border: 1px solid #ebedf0; border-radius: 8px; overflow: hidden; }
.unit-seg span { padding: 3px 12px; font-size: 12px; color: #646566; background: #fff; }
.unit-seg span.on { background: var(--brand-grad); color: #fff; font-weight: 600; }
.sug-pop { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #ebedf0; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.10); z-index: 60; }
.sug-item { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid #f5f6f8; }
.sug-item:last-child { border-bottom: none; }
