/* 商家端样式（移动端） */
* { 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; --orange: #FF8A00;
}
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); }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* 登录 */
.login-wrap { min-height: 100vh; background: linear-gradient(160deg, #07C160 0%, #04A048 55%, #F5F6F8 55.1%); padding: 70px 22px 0; }
.login-logo { text-align: center; color: #fff; margin-bottom: 26px; }
.login-logo .lg { width: 62px; height: 62px; border-radius: 18px; background: #fff; color: var(--green); font-size: 30px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.login-logo h1 { font-size: 21px; margin-top: 14px; }
.login-logo p { font-size: 12px; opacity: .85; margin-top: 4px; }
.login-card { background: #fff; border-radius: 16px; padding: 24px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.login-card .field { margin-bottom: 16px; }
.login-card label { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 6px; }
.login-card input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; outline: none; background: #FAFAFA; }
.login-card input:focus { border-color: var(--green); background: #fff; }
.login-card .btn { width: 100%; border: none; background: var(--green); color: #fff; font-size: 16px; font-weight: 700; border-radius: 10px; padding: 13px 0; margin-top: 6px; }
.login-card .btn:active { background: var(--green-dark); }
.login-demo { margin-top: 14px; font-size: 12px; color: var(--text-3); background: #F7F8FA; border-radius: 8px; padding: 9px 12px; line-height: 1.7; }

/* 头部 */
.mheader { background: linear-gradient(135deg, #07C160, #04A74F); padding: 18px 18px 56px; color: #fff; }
.mheader .row { display: flex; align-items: center; justify-content: space-between; }
.mheader .shop { font-size: 19px; font-weight: 700; }
.mheader .st { font-size: 11px; background: rgba(255,255,255,.22); border-radius: 4px; padding: 2px 8px; margin-left: 8px; vertical-align: 2px; }
.mheader .rate { font-size: 12px; opacity: .9; margin-top: 8px; }
.mheader .act { font-size: 13px; opacity: .95; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: -42px 14px 14px; position: relative; z-index: 2; }
.stat-card { background: #fff; border-radius: 14px; padding: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.stat-card .v { font-size: 23px; font-weight: 800; }
.stat-card .v .y { font-size: 13px; font-weight: 600; color: var(--text-3); }
.stat-card .l { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stat-card.green .v { color: var(--green); }

.card { background: #fff; border-radius: 14px; margin: 0 14px 14px; padding: 16px; }
.card .c-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.card .c-head .more { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* 趋势条 */
.trend { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 6px; }
.trend .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.trend .bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #4FD884, var(--green)); border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height .4s; }
.trend .bar.today { background: linear-gradient(180deg, #FFC55C, var(--orange)); }
.trend .d { font-size: 10px; color: var(--text-3); }
.trend .a { font-size: 9px; color: var(--text-3); }

/* 宫格 */
.grid-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid-menu a { text-align: center; padding: 12px 0; border-radius: 10px; font-size: 12px; color: var(--text-2); }
.grid-menu a:active { background: #F5F6F8; }
.grid-menu .ico { width: 42px; height: 42px; border-radius: 12px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* 订单行 */
.order-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.order-row:last-child { border-bottom: none; }
.order-row .o-t { font-size: 11px; 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; margin-top: 2px; }
.st-paid { color: var(--green); }
.st-unpaid { color: var(--orange); }
.st-refund { color: var(--text-3); }
.mini-btn { border: 1px solid var(--red); color: var(--red); background: #fff; font-size: 11px; border-radius: 20px; padding: 3px 10px; margin-top: 4px; }
.mini-btn:disabled { border-color: #DDD; color: #BBB; }

/* tabs */
.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tabs button { flex: 1; border: none; background: none; font-size: 14px; color: var(--text-2); padding: 13px 0; position: relative; }
.tabs button.on { color: var(--green); font-weight: 700; }
.tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 26px; height: 3px; border-radius: 2px; background: var(--green); }

/* 子页头部 */
.sub-head { background: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.sub-head .back { font-size: 20px; color: var(--text-2); width: 24px; }
.sub-head .t { font-size: 16px; font-weight: 700; }

/* 会员列表 */
.mem-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.mem-row:last-child { border-bottom: none; }
.mem-row .ava { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #E8F8EF, #D2F4E2); color: var(--green); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.mem-row .info { flex: 1; }
.mem-row .info .n { font-size: 14px; font-weight: 600; }
.mem-row .info .p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.mem-row .r { text-align: right; }
.mem-row .r .pts { font-size: 14px; font-weight: 700; color: var(--orange); }
.mem-row .r .sp { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.lv-chip { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.lv-0 { background: #F0F1F3; color: #909399; }
.lv-1 { background: #FFF3E0; color: #E65100; }
.lv-2 { background: #FFF8E1; color: #FF8A00; }
.lv-3 { background: #F3EFFF; color: #7B61FF; }

/* 二维码页 */
.qr-wrap { padding: 26px 16px; }
.qr-card { background: #fff; border-radius: 18px; padding: 30px 20px 24px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.qr-card .shop { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.qr-card .q-sub { font-size: 12px; color: var(--text-3); margin-bottom: 22px; }
.qr-card img { width: 230px; height: 230px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.qr-card .save { margin-top: 20px; border: none; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; border-radius: 10px; padding: 12px 42px; }
.qr-tip { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 18px; line-height: 1.8; }

/* 个人/设置 */
.prof-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.prof-row:last-child { border-bottom: none; }
.prof-row .v { color: var(--text-3); font-size: 13px; max-width: 60%; text-align: right; }
.prof-row input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; width: 150px; text-align: right; outline: none; }
.btn-block { width: 100%; border: none; border-radius: 12px; padding: 13px 0; font-size: 15px; font-weight: 700; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: var(--green-dark); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid var(--red) !important; }
.banner { background: #FFF8E6; border: 1px solid #FFE1A6; color: #B26A00; font-size: 12px; border-radius: 10px; padding: 10px 12px; line-height: 1.7; }

.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 36px 0; }
.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; }
