/* 消费者端共享样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --green: #07C160;
  --green-dark: #06AD56;
  --bg: #F5F6F8;
  --text: #1A1A1A;
  --text-2: #666;
  --text-3: #999;
  --card: #fff;
  --line: #EEE;
  --red: #FA5151;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
.page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }

/* 顶部 */
.header { background: linear-gradient(135deg, #07C160, #04A74F); padding: 20px 20px 60px; color: #fff; }
.header .shop { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.header .cat { display: inline-block; font-size: 11px; background: rgba(255,255,255,.22); border-radius: 4px; padding: 2px 8px; margin-top: 8px; }
.header .brand { font-size: 12px; opacity: .85; margin-top: 10px; }

.card { background: var(--card); border-radius: 14px; margin: -46px 14px 14px; padding: 20px 18px; box-shadow: 0 4px 18px rgba(0,0,0,.05); position: relative; z-index: 2; }

/* 金额输入 */
.amount-box { text-align: center; padding: 8px 0 14px; border-bottom: 1px solid var(--line); }
.amount-box .label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 4px; min-height: 56px; }
.amount-input .cny { font-size: 26px; font-weight: 600; }
.amount-input .val { font-size: 46px; font-weight: 700; letter-spacing: .5px; max-width: 300px; overflow: hidden; }
.amount-input .val.empty { color: #DDD; }
.quick { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.quick button { border: 1px solid var(--line); background: #FAFAFA; color: var(--text-2); font-size: 12px; border-radius: 20px; padding: 5px 14px; }
.quick button:active { background: #EFEFEF; }

/* 会员区 */
.member-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 4px; }
.member-row .t { font-size: 14px; font-weight: 600; }
.member-row .desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.member-row .switch { font-size: 13px; color: var(--green); font-weight: 600; }
.member-form { display: none; margin-top: 10px; background: #FAFAFA; border-radius: 10px; padding: 12px; }
.member-form.show { display: block; }
.member-form input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; background: #fff; outline: none; }
.member-form input:focus { border-color: var(--green); }
.member-form .btns { display: flex; gap: 10px; margin-top: 10px; }
.member-form .btns button { flex: 1; border: none; border-radius: 8px; padding: 10px 0; font-size: 14px; font-weight: 600; }
.btn-plain { background: #EFEFEF; color: var(--text-2); }
.btn-green { background: var(--green); color: #fff; }
.member-badge { display: none; align-items: center; gap: 8px; background: linear-gradient(90deg, #FFF7E6, #FFF); border: 1px solid #FFE1A6; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.member-badge.show { display: flex; }
.member-badge .lv { background: linear-gradient(135deg, #FFB23F, #FF8A00); color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 2px 7px; }
.member-badge .disc { color: var(--red); font-weight: 700; margin-left: auto; }

/* 键盘 */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin-top: 16px; }
.keypad button { border: none; background: #fff; font-size: 24px; font-weight: 500; padding: 14px 0; color: var(--text); }
.keypad button:active { background: #F0F0F0; }
.keypad .fn { font-size: 15px; color: var(--text-2); background: #F7F8FA; }
.keypad .dot { font-weight: 700; }

/* 主按钮 */
.pay-bar { padding: 14px 14px 24px; background: var(--bg); }
.btn-pay { width: 100%; border: none; background: var(--green); color: #fff; font-size: 17px; font-weight: 700; border-radius: 12px; padding: 14px 0; box-shadow: 0 6px 16px rgba(7,193,96,.28); }
.btn-pay:disabled { background: #C8E6D4; box-shadow: none; }
.btn-pay:active { background: var(--green-dark); }
.tip { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* 支付弹窗（仿微信） */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: none; }
.mask.show { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 18px 18px 0 0; z-index: 51; transform: translateY(100%); transition: transform .28s ease; padding: 26px 22px 30px; }
.sheet.show { transform: translateY(0); }
.sheet .s-title { text-align: center; font-size: 13px; color: var(--text-3); }
.sheet .s-amount { text-align: center; font-size: 38px; font-weight: 700; margin: 14px 0 4px; }
.sheet .s-amount .cny { font-size: 20px; margin-right: 4px; }
.sheet .s-sub { text-align: center; font-size: 12px; color: var(--text-3); margin-bottom: 22px; }
.sheet .s-shop { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.sheet .s-shop .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.s-btn { width: 100%; border: none; background: var(--green); color: #fff; font-size: 16px; font-weight: 700; border-radius: 10px; padding: 13px 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.s-btn:active { background: var(--green-dark); }
.s-btn[disabled] { background: #9AD9B8; }
.s-cancel { width: 100%; border: none; background: none; color: var(--text-3); font-size: 14px; padding: 14px 0 0; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 成功页 */
.result { display: none; text-align: center; padding: 46px 24px 30px; }
.result.show { display: block; }
.result .ok-ring { width: 74px; height: 74px; border-radius: 50%; background: var(--green); margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.result .ok-ring svg { width: 38px; height: 38px; }
.result h2 { font-size: 20px; margin-bottom: 6px; }
.result .r-amount { font-size: 34px; font-weight: 700; margin: 12px 0; }
.result .r-lines { background: #fff; border-radius: 12px; padding: 14px 16px; text-align: left; font-size: 13px; color: var(--text-2); }
.result .r-lines .row { display: flex; justify-content: space-between; padding: 6px 0; }
.result .r-lines .row b { color: var(--text); font-weight: 600; }
.result .r-lines .row .pts { color: #FF8A00; font-weight: 700; }
.result .r-btns { display: flex; gap: 12px; margin-top: 20px; }
.result .r-btns button { flex: 1; border: none; border-radius: 12px; padding: 13px 0; font-size: 15px; font-weight: 600; }
.btn-ghost { background: #fff; color: var(--green); border: 1px solid var(--green) !important; }

/* 会员中心 */
.member-card { background: linear-gradient(135deg, #2B3038, #171A1F); border-radius: 16px; padding: 22px 20px; color: #fff; margin: 16px 14px; position: relative; overflow: hidden; }
.member-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,178,63,.16); }
.member-card .lv { display: inline-block; background: linear-gradient(135deg, #FFB23F, #FF8A00); font-size: 11px; font-weight: 700; border-radius: 4px; padding: 3px 9px; }
.member-card .name { font-size: 20px; font-weight: 700; margin-top: 12px; }
.member-card .no { font-size: 12px; opacity: .6; margin-top: 3px; }
.member-card .stats { display: flex; gap: 26px; margin-top: 18px; position: relative; z-index: 1; }
.member-card .stats .num { font-size: 20px; font-weight: 700; }
.member-card .stats .lab { font-size: 11px; opacity: .65; margin-top: 2px; }
.progress { margin-top: 16px; position: relative; z-index: 1; }
.progress .bar { height: 6px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFB23F, #FF8A00); border-radius: 3px; }
.progress .txt { font-size: 11px; opacity: .7; margin-top: 6px; }

.section { background: #fff; border-radius: 14px; margin: 0 14px 14px; padding: 16px; }
.section .s-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.section .s-head .more { font-size: 12px; color: var(--text-3); font-weight: 400; }
.lv-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lv-row:last-child { border-bottom: none; }
.lv-row .dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; }
.lv-row .min { margin-left: auto; color: var(--text-3); font-size: 12px; }
.order-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.order-row:last-child { border-bottom: none; }
.order-row .o-t { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.order-row .o-a { text-align: right; }
.order-row .o-a .a { font-weight: 700; }
.order-row .o-a .st { font-size: 11px; color: var(--text-3); }
.st-refund { color: var(--text-3); }
.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 30px 0; }

.nav-bottom { position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 10; }
.nav-bottom a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: var(--text-3); text-decoration: none; }
.nav-bottom a.on { color: var(--green); font-weight: 600; }
.nav-bottom .ico { font-size: 19px; line-height: 1.2; }
.with-nav { padding-bottom: 64px; }

/* toast */
.toast { position: fixed; left: 50%; top: 42%; transform: translate(-50%,-50%); background: rgba(0,0,0,.75); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 8px; z-index: 99; display: none; }
.toast.show { display: block; }
