/* 南熹餐饮 · 商家转账 手机端样式（纯 CSS，无框架依赖） */
:root {
    --primary: #6c4cf1;
    --primary-dark: #4b2fd4;
    --primary-light: #8a70ff;
    --green: #07c160;
    --blue: #2b7fff;
    --ink: #1f2233;
    --muted: #8a8fa3;
    --line: #edeff5;
    --bg: #f5f6fa;
    --card: #ffffff;
    --shadow: 0 6px 22px rgba(38, 34, 78, .055);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #e9ebf2;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
img { display: block; }

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 74px;
    overflow: hidden;
}
.app.no-tab { padding-bottom: 24px; }
.page-title { font-size: 18px; font-weight: 700; }

/* ---------- 顶部紫色头部（我的页） ---------- */
.hero {
    background: linear-gradient(135deg, #805ff8 0%, #6c4cf1 45%, #4b2fd4 100%);
    color: #fff;
    padding: 24px 18px 58px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; right: -70px; top: -90px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.hero-row { display: flex; align-items: center; position: relative; z-index: 1; }
.avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
    background: rgba(255,255,255,.24); border: 2px solid rgba(255,255,255,.55);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; overflow: hidden; color: #fff;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-info { margin-left: 12px; flex: 1; min-width: 0; }
.hero-name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-money { font-size: 13px; color: rgba(255,255,255,.82); margin-top: 3px; }
.hero-money b { font-size: 19px; color: #fff; font-weight: 700; margin-left: 4px; }
.hero-notice {
    margin: 12px 16px -6px; padding: 10px 12px; border-radius: 10px;
    background: #fff8e6; color: #9a6b12; font-size: 12px; line-height: 1.6;
}

/* ---------- 统计卡 ---------- */
.stat-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin: -38px 16px 0; position: relative; z-index: 2;
}
.stat-card {
    background: var(--card); border-radius: 15px; box-shadow: var(--shadow);
    padding: 17px 10px; text-align: center;
}
.stat-num { font-size: 23px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.stat-num.money { font-size: 22px; }
.stat-label { font-size: 12px; color: #9aa0b3; margin-top: 6px; }

/* ---------- 通用面板 ---------- */
.panel {
    background: var(--card); border-radius: 15px; box-shadow: var(--shadow);
    margin: 14px 16px; padding: 16px;
}
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.today-row { display: flex; justify-content: space-between; font-size: 13px; color: #84899d; }
.today-row b { color: var(--ink); font-size: 15px; }
.today-row b.blue { color: var(--blue); }

/* ---------- 功能入口 ---------- */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 16px; }
.entry {
    background: #fff; border-radius: 15px; box-shadow: var(--shadow);
    min-height: 74px; padding: 14px 16px; display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 500; border: 1px solid transparent; cursor: pointer;
}
.entry .ico { font-size: 24px; line-height: 1; }
.entry.primary {
    background: linear-gradient(135deg, #7a5af6, #5336dd);
    color: #fff; box-shadow: 0 8px 20px rgba(92, 62, 220, .28);
}
.entry:active { transform: scale(.985); }
.entry-outline { border-color: #2a2140; }

/* ---------- 底部导航 ---------- */
.tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; height: 64px; z-index: 30;
    background: #fff; border-top: 1px solid #eef0f5;
    display: flex; align-items: stretch;
    box-shadow: 0 -3px 14px rgba(30,30,60,.04);
}
.tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 11px; color: #9aa0b3;
}
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active svg { stroke: var(--primary); }

/* ---------- 弹窗 / 遮罩 ---------- */
.mask {
    position: fixed; inset: 0; background: rgba(24, 20, 46, .48);
    z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px;
}
.mask.show { display: flex; }
.modal {
    width: 100%; max-width: 410px; max-height: 88vh; overflow-y: auto;
    background: #fff; border-radius: 18px; padding: 20px 18px 18px;
    box-shadow: 0 18px 50px rgba(20, 16, 50, .22);
}
.modal-title { text-align: center; font-size: 17px; font-weight: 700; }
.modal-sub { text-align: center; font-size: 13px; color: #9297a9; margin-top: 8px; }
.modal-sub b { color: var(--green); font-size: 15px; }
.modal-divider { height: 1px; background: var(--line); margin: 16px -18px 4px; }

.form-row { display: flex; align-items: center; margin-top: 14px; }
.form-label { width: 84px; flex: 0 0 84px; font-size: 13px; color: #555b70; }
.form-ctrl {
    flex: 1; min-width: 0; background: #f8f9fd; border: 1px solid #e9ebf3;
    border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--ink);
    outline: none; transition: border-color .2s;
}
.form-ctrl:focus { border-color: var(--primary-light); background: #fff; }
.form-ctrl::placeholder { color: #b6bac8; }
.input-prefix { display: flex; align-items: center; padding: 4px 8px 4px 4px; }
.input-prefix .prefix {
    border: 0; background: #eceefa; color: #5b5f80; font-size: 13px;
    border-radius: 7px; padding: 7px 8px; white-space: nowrap; cursor: pointer; margin-right: 8px;
}
.input-prefix input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    font-size: 14px; color: var(--ink); padding: 6px 0;
}
.input-prefix input::placeholder { color: #b6bac8; font-size: 12px; }
.form-hint { font-size: 11px; color: #a2a7b8; line-height: 1.6; margin: 6px 0 0 84px; }
.form-row.top { align-items: flex-start; }
.form-row.top .form-label { padding-top: 10px; }

.switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute; inset: 0; background: #d8dbe6; border-radius: 26px; cursor: pointer; transition: .2s;
}
.switch span::after {
    content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; left: 3px; top: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s;
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }

.icon-picker {
    flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer;
    background: #f8f9fd; border: 1px solid #e9ebf3; border-radius: 10px; padding: 7px 10px;
}
.icon-picker img { width: 30px; height: 30px; border-radius: 6px; }
.icon-picker .txt { flex: 1; font-size: 13px; color: #9aa0b3; }
.icon-picker .arrow { color: #b9bdcb; font-size: 16px; }

.agree-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 16px; font-size: 12px; color: #8a8fa3; }
.agree-row input { width: 15px; height: 15px; accent-color: var(--primary); }
.agree-row a { color: var(--blue); }

.btn-row { display: flex; gap: 10px; }
.btn {
    flex: 1; height: 46px; border: 0; border-radius: 11px; font-size: 15px;
    font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn:active { opacity: .88; }
.btn-ghost { background: #f2f3f7; color: #6c7185; }
.btn-primary { background: linear-gradient(135deg, #7a5af6, #5336dd); color: #fff; box-shadow: 0 6px 16px rgba(92, 62, 220, .24); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(7, 193, 96, .22); }
.btn-block { width: 100%; }

/* 图标选择弹层 */
.icon-modal { max-width: 380px; }
.icon-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.icon-head .close { width: 26px; height: 26px; line-height: 24px; text-align: center; color: #a2a7b8; font-size: 20px; cursor: pointer; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-grid img {
    width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 9px;
    border: 2px solid transparent; cursor: pointer; background: #fafbfe;
}
.icon-grid img.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(108,76,241,.14); }
.icon-foot { text-align: center; color: #9aa0b3; font-size: 12px; margin-top: 14px; }

/* 成功弹层 */
.success-ico { font-size: 46px; text-align: center; line-height: 1.2; }
.success-card {
    background: linear-gradient(135deg, #f7f5ff, #f0ecff); border: 1px solid #e6e0ff;
    border-radius: 12px; padding: 14px; margin: 16px 0 4px; font-size: 13px; color: #5b5678;
}
.success-card .big { font-size: 26px; font-weight: 800; color: var(--primary-dark); margin: 4px 0; }

/* ---------- 转账记录 ---------- */
.rec-head { padding: 20px 18px 4px; display: flex; align-items: baseline; justify-content: space-between; }
.rec-head .sub { font-size: 12px; color: #9aa0b3; }
.rec-card {
    background: #fff; border-radius: 16px; box-shadow: var(--shadow);
    margin: 14px 16px; padding: 18px 16px 14px; position: relative;
}
.rec-row { display: flex; align-items: center; margin: 9px 0; font-size: 13px; color: #8a8fa3; }
.rec-row .dot { width: 5px; height: 5px; border-radius: 50%; background: #d4d7e2; margin-right: 8px; flex: 0 0 5px; }
.rec-row .k { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #e2e4ed; }
.rec-row strong { color: var(--ink); font-size: 17px; font-weight: 700; margin-left: 6px; }
.rec-row .num { font-size: 20px; }
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    background: #e8f2ff; color: #2b7fff; font-size: 12px; font-weight: 600; margin-left: 4px;
}
.badge.gray { background: #f0f1f5; color: #8a8fa3; }
.badge.green { background: #e7f8ee; color: #0aa85c; }
.badge.orange { background: #fff3e0; color: #d98b16; }
.badge.red { background: #ffeaed; color: #e2536a; }
.rec-row.has-act { padding-right: 84px; }
.rec-actions { position: absolute; right: 14px; top: 52px; display: flex; flex-direction: column; gap: 8px; }
.act {
    border: 0; border-radius: 9px; padding: 6px 11px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.act-freeze { background: #fff0f2; color: #e8556b; }
.act-revoke { background: #fff7e6; color: #d99a20; }
.act-del { background: #eaf4ff; color: #4a8fe7; }
.act-share { background: #f1edff; color: #6c4cf1; }
.rec-foot {
    border-top: 1px dashed #eef0f5; margin-top: 12px; padding-top: 12px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: #a7abbb;
}
.rec-foot .no { font-size: 12px; color: #9aa0b3; }
.empty { text-align: center; color: #a7abbb; padding: 70px 20px; font-size: 13px; }
.empty .ico { font-size: 44px; display: block; margin-bottom: 12px; opacity: .55; }

/* ---------- 余额明细 ---------- */
.log-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid #f1f2f7;
}
.log-item:last-child { border-bottom: 0; }
.log-item .memo { font-size: 14px; color: var(--ink); }
.log-item .time { font-size: 11px; color: #a7abbb; margin-top: 4px; }
.log-item .val { font-size: 16px; font-weight: 700; }
.log-item .val.plus { color: #0aa85c; }
.log-item .val.minus { color: #e2536a; }

/* ---------- 首页（南熹餐饮介绍） ---------- */
.home-cover {
    height: 218px; background-size: cover; background-position: center;
    position: relative; display: flex; align-items: flex-end; padding: 18px;
}
.home-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.32)); }
.home-cover .cover-tag {
    position: relative; z-index: 1; color: #fff; font-size: 12px; letter-spacing: 2px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32);
    padding: 6px 12px; border-radius: 20px; backdrop-filter: blur(4px);
}
.home-block { margin: 14px 16px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
.home-block h2 { margin: 0 0 10px; font-size: 17px; letter-spacing: 1px; }
.home-block h2::before { content: ''; display: inline-block; width: 4px; height: 16px; background: #b8864b; border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.home-block p { margin: 0 0 10px; color: #6c7185; font-size: 13px; line-height: 1.9; }
.home-block p.home-amount-tip {
    margin: 4px 0 12px; padding: 10px 12px; background: #fff8ec; border-left: 3px solid #f5a623;
    border-radius: 6px; color: #a5701f; font-size: 12px; line-height: 1.75;
}
.dish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.dish {
    background: #faf8f4; border: 1px solid #f1ebe1; border-radius: 12px;
    padding: 14px 8px; text-align: center;
}
.dish .e { font-size: 26px; display: block; margin-bottom: 6px; }
.dish .n { font-size: 12px; color: #6b5844; font-weight: 600; }
.info-line { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; font-size: 13px; color: #6c7185; }
.info-line .k { color: #b8864b; font-weight: 600; width: 52px; flex: 0 0 52px; }
.home-cta { margin: 18px 16px 8px; }

/* ---------- 分享页 ---------- */
.share-hero { padding: 26px 18px 30px; background: linear-gradient(135deg, #805ff8, #4b2fd4); color: #fff; text-align: center; }
.share-hero .t { font-size: 20px; font-weight: 700; }
.share-hero .s { font-size: 12px; opacity: .82; margin-top: 8px; }
.preview {
    margin: -16px 16px 0; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
    padding: 16px; position: relative; z-index: 2; display: flex; gap: 12px; align-items: center;
}
.preview img { width: 68px; height: 68px; border-radius: 12px; flex: 0 0 68px; }
.preview .p-t { font-size: 15px; font-weight: 700; }
.preview .p-d { font-size: 12px; color: #8a8fa3; margin-top: 6px; line-height: 1.6; }
.preview .p-f { font-size: 11px; color: #b0b4c2; margin-top: 8px; }
.link-box {
    margin: 14px 16px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px;
}
.link-box .lb-t { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.link-box .lb-u {
    background: #f7f8fc; border: 1px solid #eef0f5; border-radius: 9px; padding: 10px;
    font-size: 11px; color: #8a8fa3; word-break: break-all; line-height: 1.6;
}
.share-tips { margin: 14px 16px; font-size: 12px; color: #9aa0b3; line-height: 1.9; }
.share-tips b { color: #6c7185; }
.qr-box { text-align: center; margin: 10px 0 4px; }
.qr-box img { width: 148px; height: 148px; margin: 0 auto; border-radius: 8px; }
.wechat-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 200; color: #fff;
    display: none; padding: 24px; text-align: right; font-size: 15px; line-height: 1.8;
}
.wechat-mask.show { display: block; }
.wechat-mask .arrow-up { font-size: 42px; line-height: 1; }
.wechat-mask .wm-text { margin-top: 14px; text-align: center; }

/* ---------- 收款确认页（参考图5） ---------- */
.rv-page { background: #fff; min-height: 100vh; padding-bottom: 30px; }
.rv-top {
    height: 52px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; border-bottom: 1px solid #f2f3f7; font-size: 14px; color: #6c7185;
}
.rv-top .x { font-size: 24px; line-height: 1; cursor: pointer; color: #333; }
.rv-top .more { font-size: 20px; letter-spacing: 2px; color: #333; }
.rv-body { padding: 44px 26px 0; text-align: center; }
.rv-clock {
    width: 56px; height: 56px; border: 3px solid #12b7f5; border-radius: 50%;
    margin: 0 auto 22px; position: relative;
}
.rv-clock::before { content: ''; position: absolute; left: 25px; top: 12px; width: 2.5px; height: 17px; background: #12b7f5; border-radius: 2px; }
.rv-clock::after { content: ''; position: absolute; left: 25px; top: 26px; width: 14px; height: 2.5px; background: #12b7f5; border-radius: 2px; }
.rv-title { font-size: 16px; color: #555b70; }
.rv-amount { font-size: 42px; font-weight: 800; letter-spacing: 1px; margin: 16px 0 26px; color: #1c1c1c; word-break: break-all; }
.rv-amount .cny { font-size: 30px; margin-right: 4px; }
.rv-amount-tip { font-size: 11px;  border-radius: 6px; padding: 8px 10px; margin: -12px 0 22px; line-height: 1.6; }
.rv-meta {
    border-top: 1px solid #f0f1f5; padding-top: 18px; display: flex;
    justify-content: space-between; font-size: 13px; color: #9aa0b3; text-align: left;
}
.rv-meta b { color: #4a4f62; font-weight: 500; }
.rv-bottom { margin-top: 74px; }
.rv-btn { width: 72%; margin: 0 auto; height: 50px; border-radius: 8px; }
.rv-note { text-align: center; font-size: 12px; color: #a7abbb; margin-top: 18px; }
.rv-note a { color: #6c83b7; margin-left: 4px; }
.rv-state { text-align: center; margin-top: 30px; }
.rv-state .badge { font-size: 13px; padding: 6px 16px; }
.rv-state-reason {
    font-size: 12px; color: #8a8fa3; line-height: 1.7; margin-top: 8px;
    max-width: 280px; margin-left: auto; margin-right: auto;
}
.rv-err { text-align: center; padding: 90px 26px; color: #8a8fa3; }
.rv-err .ico { font-size: 48px; display: block; margin-bottom: 16px; }

/* ---------- 收款结果页（已到账 / 已退还）---------- */
.rv-result { min-height: 100vh; box-sizing: border-box; padding: 84px 26px 40px; text-align: center; }
.rv-result--light { background: #fff; color: #1c1c1c; }
.rv-res-icon {
    width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 30px;
    display: flex; align-items: center; justify-content: center;
}
.rv-res-icon span { font-size: 38px; line-height: 1; font-weight: 700; color: #fff; }
.rv-res-icon--ok { background: #22b573; }
.rv-res-icon--ok span { font-size: 34px; }
.rv-res-icon--refund { background: #f5a623; }
.rv-res-icon--refund span { transform: rotate(0deg); display: inline-block; }
.rv-res-title { font-size: 15px; line-height: 1.6; color: #4a4f62; }
.rv-res-amount {
    font-size: 40px; font-weight: 800; letter-spacing: 1px;
    margin: 24px 0 30px; word-break: break-all; line-height: 1.25;
}
.rv-res-sub { font-size: 13px; color: #9aa0b3; margin: -18px 0 30px; }
.rv-res-meta {
    border-top: 1px solid rgba(140,140,150,.25);
    padding-top: 20px; text-align: left; max-width: 420px; margin: 0 auto;
}
.rv-res-meta-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; padding: 9px 0;
}
.rv-result--light .rv-res-meta-row span { color: #9aa0b3; }
.rv-result--light .rv-res-meta-row b { color: #4a4f62; font-weight: 500; }
.rv-res-close {
    display: block; width: 200px; max-width: 70%; height: 46px; margin: 60px auto 0;
     border-radius: 8px; background: #F3F3F3; color: #000; font-size: 15px;border: none;
}

/* ---------- 提示 ---------- */
.toast {
    position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
    background: rgba(28, 26, 44, .9); color: #fff; padding: 12px 20px; border-radius: 10px;
    font-size: 13px; z-index: 999; max-width: 78%; text-align: center; display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast.show { display: block; }
.loading { opacity: .6; pointer-events: none; }
.protocol { font-size: 13px; color: #6c7185; line-height: 2; padding: 18px 18px 40px; }
.protocol h3 { color: var(--ink); font-size: 15px; margin: 20px 0 8px; }
.back-bar { height: 50px; display: flex; align-items: center; padding: 0 16px; background: #fff; border-bottom: 1px solid #f0f1f5; font-weight: 600; }
.back-bar .b { font-size: 22px; margin-right: 12px; cursor: pointer; }


/* ---- 转账类型选择（创建订单） ---- */
.type-picker { display: flex; flex: 1; min-width: 0; gap: 8px; }
.type-btn {
    flex: 1; min-width: 0; padding: 9px 6px; font-size: 13px; line-height: 1.2;
    color: #6b6f85; background: #f4f4fa; border: 1px solid #e6e6f0;
    border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.type-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }
.type-btn:active { opacity: .85; }
