/* 公共样式 —— 微信绿主题，移动端优先 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:"PingFang SC","Microsoft YaHei",sans-serif; background:#f5f7fa; color:#2c3e50; font-size:15px; line-height:1.7; padding-bottom:70px; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; }

.topbar { position:sticky; top:0; z-index:50; background:#07c160; color:#fff; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.topbar .logo { font-size:18px; font-weight:700; }
.topbar .right { display:flex; align-items:center; gap:10px; font-size:13px; }
.topbar .points-chip { background:rgba(255,255,255,.22); border-radius:20px; padding:2px 12px; }
.topbar a.login-btn { background:#fff; color:#07c160; border-radius:20px; padding:3px 14px; font-weight:600; }

.tabsbar { display:flex; background:#fff; border-bottom:1px solid #e8ece9; position:sticky; top:47px; z-index:49; }
.tabsbar a { flex:1; text-align:center; padding:10px 0; font-size:14px; color:#666; border-bottom:2px solid transparent; }
.tabsbar a.active { color:#07c160; border-bottom-color:#07c160; font-weight:600; }

.container { max-width:640px; margin:0 auto; padding:14px; }
.card { background:#fff; border-radius:12px; padding:16px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,.05); }
.btn { display:block; width:100%; border:none; border-radius:10px; padding:12px; font-size:16px; font-weight:600; cursor:pointer; text-align:center; }
.btn-primary { background:#07c160; color:#fff; }
.btn-primary:disabled { background:#9fdcb8; }
.btn-plain { background:#fff; color:#07c160; border:1px solid #07c160; }
.btn-danger { background:#fdf0ef; color:#d9534f; border:1px solid #e8a5a2; }
.btn-sm { padding:6px 14px; font-size:13px; width:auto; display:inline-block; border-radius:8px; }

.tag { display:inline-block; background:#eaf7f0; color:#1a7f4b; font-size:12px; border-radius:4px; padding:1px 8px; margin-right:6px; }
.tag.gray { background:#f0f2f0; color:#888; }
.tag.warn { background:#fff4e5; color:#c77c11; }
.tag.danger { background:#fdeeee; color:#c9302c; }
.tag.green { background:#eaf7f0; color:#07c160; }

.group-card { display:flex; justify-content:space-between; gap:10px; }
.group-card h3 { font-size:16px; margin-bottom:4px; }
.group-card .desc { font-size:13px; color:#888; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.group-card .meta { font-size:12px; color:#aaa; margin-top:6px; }

.field { margin-bottom:14px; }
.field label { display:block; font-size:13px; color:#666; margin-bottom:5px; }
.field input, .field textarea, .field select { width:100%; border:1px solid #dde3df; border-radius:9px; padding:10px 12px; font-size:15px; outline:none; background:#fff; }
.field input:focus, .field textarea:focus { border-color:#07c160; }
.field textarea { resize:vertical; min-height:80px; }

.modal-mask { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100; align-items:center; justify-content:center; padding:20px; }
.modal-mask.show { display:flex; }
.modal { background:#fff; border-radius:14px; width:100%; max-width:400px; padding:22px; max-height:85vh; overflow-y:auto; }
.modal h3 { text-align:center; margin-bottom:16px; font-size:17px; }
.modal .close-x { float:right; color:#999; font-size:20px; cursor:pointer; margin-top:-6px; }

.toast { position:fixed; left:50%; top:18%; transform:translateX(-50%); background:rgba(0,0,0,.78); color:#fff; padding:10px 22px; border-radius:8px; font-size:14px; z-index:200; display:none; max-width:80vw; text-align:center; }

.empty { text-align:center; color:#aaa; padding:40px 0; font-size:14px; }

/* 底部导航 */
.bottomnav { position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid #e8ece9; display:flex; z-index:60; max-width:640px; margin:0 auto; }
.bottomnav a { flex:1; text-align:center; padding:8px 0 6px; font-size:11px; color:#999; }
.bottomnav a .ico { font-size:20px; display:block; }
.bottomnav a.active { color:#07c160; }

.qr-show { text-align:center; }
.qr-show img { border:1px solid #eee; border-radius:10px; width:260px; height:260px; object-fit:contain; background:#fff; }

.tier-card { border:2px solid #e8ece9; border-radius:12px; padding:14px; text-align:center; cursor:pointer; position:relative; background:#fff; }
.tier-card.sel { border-color:#07c160; background:#f2fbf6; }
.tier-card .price { font-size:22px; font-weight:700; color:#07c160; }
.tier-card .pts { font-size:13px; color:#666; }
.tier-card .gift { font-size:11px; color:#c77c11; }
.tier-card.best::after { content:'推荐'; position:absolute; top:-9px; right:-6px; background:#ff976a; color:#fff; font-size:11px; padding:1px 8px; border-radius:10px; }

.stat-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.stat-grid .st { background:#f7faf8; border-radius:10px; padding:12px; text-align:center; }
.stat-grid .st b { font-size:20px; color:#07c160; display:block; }
.stat-grid .st span { font-size:12px; color:#888; }

.log-item { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid #f2f4f2; font-size:14px; }
.log-item:last-child { border-bottom:none; }
.log-item .minus { color:#d9534f; } .log-item .plus { color:#07c160; }

/* 后台 */
.admin-wrap { max-width:1024px; margin:0 auto; padding:16px; }
.admin-nav { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.admin-nav button { border:1px solid #dde3df; background:#fff; border-radius:20px; padding:7px 16px; font-size:14px; cursor:pointer; }
.admin-nav button.active { background:#07c160; border-color:#07c160; color:#fff; }
table.tb { width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; font-size:13px; }
table.tb th { background:#eaf7f0; color:#1a7f4b; padding:9px 8px; text-align:left; white-space:nowrap; }
table.tb td { border-bottom:1px solid #f0f3f1; padding:9px 8px; vertical-align:top; }
table.tb img.thumb { width:52px; height:52px; object-fit:cover; border-radius:6px; cursor:pointer; background:#f5f5f5; }
.paging { display:flex; gap:8px; justify-content:center; margin:16px 0; }
.paging button { border:1px solid #dde3df; background:#fff; border-radius:8px; padding:6px 14px; cursor:pointer; }
.paging button:disabled { color:#bbb; }

@media (min-width:700px){ .container{max-width:720px;} }
