/* 南郊到家 · 商户后台 H5 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: #f3f4f6; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
#app, #gate { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f5f6f8; }
.h-header { position: sticky; top: 0; z-index: 20; background: linear-gradient(135deg, var(--primary), #fb923c); color: #fff; padding: 14px 16px; }
.h-header .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.h-header .logo { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; }
.h-view { padding: 14px 14px 78px; }
.h-view h3 { font-size: 15px; margin: 6px 2px 12px; }

/* 卡片网格 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.stat .v { font-size: 22px; font-weight: 800; color: var(--primary-d); }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 4px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel .ph { font-size: 14px; font-weight: 700; margin-bottom: 10px; }

/* 趋势条 */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--primary), #fb923c); border-radius: 4px 4px 0 0; min-height: 4px; position: relative; }
.bars .bar span { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--muted); }

/* 类目分布 */
.split-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.split-row .nm { width: 64px; font-size: 13px; }
.split-bar { flex: 1; height: 10px; background: #eef0f3; border-radius: 6px; overflow: hidden; }
.split-bar i { display: block; height: 100%; border-radius: 6px; }
.split-row .pc { width: 40px; text-align: right; font-size: 12px; color: var(--muted); }

/* 列表行 */
.row { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.row .top { display: flex; justify-content: space-between; align-items: center; }
.row .tt { font-weight: 700; font-size: 14px; }
.row .sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.row .amt { font-weight: 800; color: var(--primary-d); }

/* 筛选 chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.chips button { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 7px 14px; border-radius: 20px; font-size: 13px; white-space: nowrap; }
.chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 底部 tabbar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 30; box-shadow: 0 -4px 20px rgba(0,0,0,.06); }
.tabbar button { flex: 1; border: none; background: transparent; padding: 8px 0 10px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabbar button span { font-size: 19px; }
.tabbar button.on { color: var(--primary-d); font-weight: 700; }

/* 闸 */
.gate { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 30px; background: linear-gradient(160deg, #fff7ed, #fef2f2); }
.gate-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; color: var(--primary-d); }
.gate-logo .logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), #fb923c); color: #fff; display: flex; align-items: center; justify-content: center; }
.gate-slogan { color: var(--muted); font-size: 12px; margin: 8px 0 28px; }
.gate-form { width: 100%; max-width: 320px; }
.gate-form .field { margin-bottom: 14px; }
.gate-form .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.gate-form .field input { width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.gate-form .btn-block { width: 100%; justify-content: center; padding: 14px; border-radius: 12px; font-size: 16px; font-weight: 700; margin-top: 6px; }

/* 详情弹层内字段 */
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv .k { color: var(--muted); }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.actions .btn { flex: 1; justify-content: center; border-radius: 22px; padding: 11px; min-width: 110px; }
.tag-blue { background: #e0f2fe; color: #0369a1; padding: 2px 8px; border-radius: 6px; font-size: 11px; }

/* 底部 Tab 未读红点 */
.tabbar button { position: relative; }
.tab-dot { position: absolute; top: 4px; right: 50%; margin-right: -18px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }

/* 聊天 */
.chat-box { max-height: 52vh; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.msg .b { background: #fff; border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.msg .t { font-size: 10px; color: var(--muted); margin: 3px 4px 0; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .b { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chat-input input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 22px; font-size: 14px; }
