* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC","Helvetica Neue",Arial,sans-serif; background: #f5f5f5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
input, textarea, button { font-family: inherit; outline: none; border: none; }
button { cursor: pointer; }
.page { min-height: 100vh; max-width: 750px; margin: 0 auto; position: relative; }

/* Toast */
.toast { position: fixed; top: 40%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.7); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 14px; z-index: 9999; pointer-events: none; }

/* ===== 登录页 ===== */
.login-page { background: #fff; padding: 80px 30px 0; }
.login-logo { text-align: center; margin-bottom: 50px; }
.login-logo h2 { font-size: 22px; color: #333; margin-top: 10px; }
.login-input { border-bottom: 1px solid #eee; margin-bottom: 16px; }
.login-input input { width: 100%; height: 48px; font-size: 15px; }
.btn-primary { width: 100%; height: 46px; background: #07c160; color: #fff; border-radius: 8px; font-size: 16px; margin-top: 24px; }
.btn-primary:disabled { background: #ccc; }
.link-text { text-align: center; color: #576b95; font-size: 14px; margin-top: 16px; cursor: pointer; }

/* ===== 首页 ===== */
.home-header { background: linear-gradient(135deg,#07c160,#06ad56); padding: 20px 16px; display: flex; align-items: center; color: #fff; }
.home-header img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); object-fit: cover; }
.home-header .info { margin-left: 12px; }
.home-header .name { font-size: 17px; font-weight: 600; }
.home-header .bal { font-size: 13px; opacity: .85; }
.home-actions { display: flex; background: #fff; padding: 16px 0; }
.home-actions .act { flex: 1; text-align: center; font-size: 12px; color: #666; cursor: pointer; }
.home-actions .act .icon { font-size: 28px; display: block; }
.section-title { padding: 12px 16px; font-size: 13px; color: #999; }
.card-item { background: #fff; border-radius: 10px; padding: 14px; margin: 0 10px 12px; }
.card-top { display: flex; align-items: flex-start; }
.card-top img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.card-top .detail { margin-left: 12px; flex: 1; }
.card-top .cname { font-size: 15px; font-weight: 600; color: #333; }
.card-top .cdesc { font-size: 12px; color: #999; margin-top: 2px; }
.card-top .cmeta { font-size: 11px; color: #aaa; margin-top: 4px; }
.card-btns { display: flex; gap: 8px; margin-top: 12px; }
.card-btns button { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.card-btns .btn-g { background: #07c160; color: #fff; }
.card-btns .btn-w { background: #fff; color: #333; border: 1px solid #ddd; }
.card-btns .btn-r { background: #fff; color: #f56c6c; border: 1px solid #fde2e2; }
.empty { text-align: center; padding: 50px 0; color: #ccc; font-size: 14px; }

/* ===== TabBar ===== */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 750px; background: #fff; display: flex; border-top: 1px solid #eee; z-index: 100; }
.tabbar .tab { flex: 1; text-align: center; padding: 8px 0 6px; font-size: 11px; color: #999; cursor: pointer; }
.tabbar .tab.active { color: #07c160; }
.tabbar .tab .ti { font-size: 22px; display: block; }

/* ===== 创建卡片 ===== */
.form-card { background: #fff; border-radius: 10px; margin: 10px; padding: 0 16px; }
.form-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.form-row:last-child { border: none; }
.form-row .lab { width: 60px; font-size: 14px; color: #333; flex-shrink: 0; }
.form-row input { flex: 1; font-size: 14px; }
.form-row .avatar-pick { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-row .avatar-pick img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.form-row .avatar-pick span { font-size: 13px; color: #576b95; background: #f0f0f0; padding: 4px 12px; border-radius: 6px; }
.preview-title { font-size: 13px; color: #999; padding: 14px 16px 8px; }
.preview-box { background: #fff; border-radius: 10px; margin: 0 10px; padding: 14px 16px; display: flex; align-items: center; }
.preview-box img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.preview-box .pinfo { margin-left: 12px; }
.preview-box .pname { font-size: 15px; font-weight: 600; color: #333; }
.preview-box .pdesc { font-size: 12px; color: #999; }
.btn-full { width: calc(100% - 20px); margin: 20px 10px; height: 46px; background: #07c160; color: #fff; border-radius: 8px; font-size: 16px; }

/* ===== 仿微信资料页 ===== */
.profile-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: #fff; padding-top: env(safe-area-inset-top, 40px); }
.profile-nav span { font-size: 20px; color: #333; padding: 6px; cursor: pointer; }
.profile-hd { background: #fff; padding: 16px; border-bottom: 1px solid #f0f0f0; }
.profile-hd img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.profile-hd .pn { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 18px; font-weight: 600; color: #333; }
.profile-hd .pr { font-size: 13px; color: #999; margin-top: 4px; }
.profile-sec { background: #fff; margin-top: 10px; }
.profile-sec .row { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #f5f5f5; font-size: 15px; color: #333; cursor: pointer; }
.profile-sec .row .val { color: #999; font-size: 14px; }
.profile-sec .row .arr { color: #ccc; }
.send-msg { background: #fff; margin-top: 20px; padding: 16px; text-align: center; color: #576b95; font-size: 16px; cursor: pointer; }

/* ===== 聊天页 ===== */
.chat-page { display: flex; flex-direction: column; height: 100vh; background: #ececec; }
.chat-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: #ececec; padding-top: env(safe-area-inset-top, 40px); flex-shrink: 0; }
.chat-nav .cn-title { font-size: 17px; font-weight: 600; color: #333; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; }
.time-div { text-align: center; margin: 12px 0; }
.time-div span { font-size: 11px; color: #b2b2b2; background: #ddd; padding: 2px 8px; border-radius: 4px; }
.msg-row { display: flex; align-items: flex-start; margin-bottom: 14px; }
.msg-row.right { flex-direction: row-reverse; }
.msg-row img.ava { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex-shrink: 0; margin: 0 8px; }
.msg-bbl { max-width: 65%; padding: 10px 14px; border-radius: 6px; font-size: 15px; line-height: 1.5; word-break: break-all; position: relative; }
.msg-row.left .msg-bbl { background: #fff; color: #333; }
.msg-row.right .msg-bbl { background: #95ec69; color: #333; }
.msg-img { max-width: 50%; }
.msg-img img { width: 100%; border-radius: 6px; cursor: pointer; }

/* 橙色转账卡片 */
.tf-card { width: 240px; border-radius: 6px; overflow: hidden; cursor: pointer; }
.tf-top { background: linear-gradient(135deg,#f9a825,#f57c00); padding: 14px; display: flex; align-items: center; }
.tf-icon { width: 38px; height: 38px; background: rgba(255,255,255,.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.tf-info { margin-left: 10px; }
.tf-amt { font-size: 17px; font-weight: 600; color: #fff; }
.tf-desc { font-size: 12px; color: rgba(255,255,255,.85); margin-top: 2px; }
.tf-bot { background: #fef3e0; padding: 6px 14px; font-size: 11px; color: #c68a00; }

/* 已收款/已退还状态 */
.tf-card.received .tf-top { background: linear-gradient(135deg,#a5d6a7,#66bb6a); }
.tf-card.received .tf-bot { background: #e8f5e9; color: #2e7d32; }
.tf-card.refunded .tf-top { background: linear-gradient(135deg,#bdbdbd,#9e9e9e); }
.tf-card.refunded .tf-bot { background: #f5f5f5; color: #757575; }

.chat-footer { flex-shrink: 0; background: #f5f5f5; padding: 10px; border-top: 1px solid #ddd; }
.chat-input-area { display: flex; align-items: center; gap: 8px; }
.chat-input-area .ci-btn { font-size: 24px; flex-shrink: 0; cursor: pointer; }
.chat-input-area input { flex: 1; background: #fff; border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.chat-actions { display: flex; gap: 20px; padding: 16px; background: #f5f5f5; border-top: 1px solid #ddd; }
.chat-actions .ca-item { text-align: center; cursor: pointer; }
.chat-actions .ca-item .ca-icon { display: block; width: 52px; height: 52px; line-height: 52px; background: #fff; border-radius: 10px; font-size: 24px; margin: 0 auto 4px; }
.chat-actions .ca-item span:last-child { font-size: 11px; color: #666; }

/* 长按菜单 */
.ctx-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 900; background: rgba(0,0,0,.3); }
.ctx-box { position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%); background: #fff; border-radius: 10px; width: 200px; z-index: 901; overflow: hidden; }
.ctx-box div { text-align: center; padding: 14px; font-size: 15px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.ctx-box div.danger { color: #f56c6c; }

/* ===== 转账创建页 ===== */
.tf-create { padding: 0 16px; }
.tf-bal { text-align: center; padding: 14px; font-size: 14px; color: #07c160; }
.tf-row { display: flex; align-items: center; background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.tf-row .yen { font-size: 20px; color: #07c160; font-weight: 600; margin-right: 10px; }
.tf-row .ri { font-size: 20px; margin-right: 10px; }
.tf-row input { flex: 1; font-size: 15px; }
.tf-types { display: flex; gap: 10px; margin: 14px 0; }
.tf-types button { flex: 1; padding: 12px 0; border-radius: 24px; font-size: 14px; border: 2px solid #07c160; color: #07c160; background: #fff; }
.tf-types button.active { background: #07c160; color: #fff; }
.tf-types button.vt { border-color: #f9a825; color: #f9a825; }
.tf-types button.vt.active { background: #f9a825; color: #fff; }
.agree-row { display: flex; align-items: center; margin: 12px 0; font-size: 12px; color: #999; }
.agree-row .ck { width: 16px; height: 16px; border: 1px solid #ccc; border-radius: 3px; margin-right: 6px; cursor: pointer; display: inline-block; }
.agree-row .ck.on { background: #07c160; border-color: #07c160; }
.agree-row .lk { color: #576b95; }

/* ===== 收款页 ===== */
.recv-page { background: #fff; min-height: 100vh; text-align: center; padding: 20px; }
.recv-icon { margin: 40px auto 14px; }
.recv-icon .clock { width: 52px; height: 52px; border: 3px solid #3498db; border-radius: 50%; margin: 0 auto; position: relative; }
.recv-icon .check { width: 52px; height: 52px; background: #4CAF50; border-radius: 50%; margin: 0 auto; position: relative; }
.recv-icon .check::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #fff; font-size: 28px; }
.recv-icon .ret { width: 52px; height: 52px; background: #FFC107; border-radius: 50%; margin: 0 auto; }
.recv-status { font-size: 16px; color: #333; }
.recv-amount { font-size: 40px; font-weight: bold; color: #333; margin: 10px 0 30px; }
.recv-info { display: flex; justify-content: space-between; width: 85%; margin: 0 auto; padding: 12px 0; border-top: 1px solid #eee; font-size: 14px; }
.recv-info .rl { color: #888; }
.recv-info .rv { color: #333; }
.recv-actions { position: fixed; bottom: 60px; left: 0; right: 0; text-align: center; }
.btn-recv { background: #07c160; color: #fff; border: none; border-radius: 10px; width: 60%; height: 46px; font-size: 17px; }
.refund-tip { font-size: 13px; color: #888; margin-top: 14px; }
.refund-tip .rl { color: #576b95; cursor: pointer; margin-left: 4px; }

/* 弹窗 */
.popup-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.popup-box { background: #fff; width: 100%; max-width: 750px; border-radius: 16px 16px 0 0; padding: 20px 20px 40px; text-align: center; }
.popup-box .pc { position: absolute; left: 16px; top: 16px; font-size: 20px; color: #999; cursor: pointer; }
.popup-box .pa { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.popup-box .pt { font-size: 15px; color: #333; }
.popup-box .pamt { font-size: 32px; font-weight: bold; color: #333; margin: 10px 0 16px; }
.popup-detail { text-align: left; padding: 12px 0; border-top: 1px solid #f0f0f0; }
.popup-detail .dr { display: flex; padding: 6px 0; font-size: 13px; }
.popup-detail .dr .dl { width: 80px; color: #888; }
.popup-detail .dr .dv { color: #333; }
.dialog-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.dialog-box { background: #fff; border-radius: 14px; width: 80%; max-width: 320px; }
.dialog-box .dt { font-size: 17px; font-weight: 500; padding: 30px 20px; text-align: center; border-bottom: 1px solid #eee; }
.dialog-box .db { display: flex; }
.dialog-box .db span { flex: 1; text-align: center; padding: 16px; font-size: 16px; color: #333; cursor: pointer; }
.dialog-box .db span.pr { color: #576b95; }
.dialog-box .db .dv { width: 1px; background: #eee; }

/* ===== 钱包 ===== */
.wallet-hd { background: linear-gradient(135deg,#f9a825,#f57c00); padding: 36px 20px; text-align: center; color: #fff; }
.wallet-hd .wl { font-size: 14px; opacity: .8; }
.wallet-hd .wv { font-size: 36px; font-weight: bold; margin-top: 8px; }
.rec-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff; border-bottom: 1px solid #f5f5f5; }
.rec-item .rt { font-size: 15px; color: #333; }
.rec-item .rd { font-size: 12px; color: #999; margin-top: 4px; }
.rec-item .ra { font-size: 16px; font-weight: 600; text-align: right; }
.rec-item .ra.inc { color: #07c160; }
.rec-item .ra.exp { color: #f56c6c; }
.rec-item .rb { font-size: 11px; color: #999; margin-top: 4px; text-align: right; }

/* ===== 个人中心 ===== */
.me-card { background: #fff; padding: 20px 16px; display: flex; align-items: center; }
.me-card img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.me-card .mi { margin-left: 14px; }
.me-card .mn { font-size: 17px; font-weight: 600; color: #333; }
.me-card .mp { font-size: 13px; color: #999; margin-top: 4px; }
.me-menu { background: #fff; margin-top: 10px; }
.me-menu .mm { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #f5f5f5; font-size: 15px; color: #333; cursor: pointer; }
.btn-logout { display: block; width: calc(100% - 20px); margin: 30px auto 0; height: 46px; background: #fff; color: #f56c6c; border: 1px solid #fde2e2; border-radius: 8px; font-size: 15px; }

/* ===== 分享相关 ===== */
.profile-btns { padding: 20px 16px; }
.share-btn { display: block; margin: 10px auto 0; width: 60%; text-align: center; padding: 10px 0; background: #fff; color: #576b95; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 15px; cursor: pointer; }
.share-btn:active { background: #f5f5f5; }
