/* 小富富网络 · 前台样式  主色 #1e81f8 / #1677d2  点缀 #423E8C */
:root {
    --blue: #1e81f8;
    --blue-dark: #1677d2;
    --purple: #423E8C;
    --red: #fa3534;
    --warn: #f9ae3d;
    --warn-bg: #fdf6ec;
    --text: #303133;
    --muted: #909399;
    --line: #ebeef5;
    --bg: #f5f7fb;
    --card: #fff;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(30, 129, 248, .08);
    --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 11px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 129, 248, .12);
}
input:disabled { background: #f7f8fa; color: var(--muted); }

.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.page { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }
.muted { color: var(--muted); }
.price { color: var(--red); font-weight: 700; }

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 22px;
    font-weight: 600;
    background: #eef4ff;
    color: var(--blue);
    transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 6px 14px rgba(30, 129, 248, .28); }
.btn-danger { background: linear-gradient(180deg, #ff5a59, var(--red)); color: #fff; box-shadow: 0 6px 14px rgba(250, 53, 52, .25); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 16px; }
.btn-lg { min-height: 46px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-title { font-size: 18px; margin-bottom: 16px; }
.form-card, .pay-card { padding: 20px 22px; }

/* header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 2px 12px rgba(66, 62, 140, .06);
}
.header-inner {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.brand-logo { height: 40px; width: auto; max-width: 148px; border-radius: 8px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; color: var(--purple); }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px 18px;
    flex-wrap: wrap;
}
.site-nav > a {
    color: var(--text);
    font-size: 14px;
    padding: 6px 0;
    position: relative;
}
.site-nav > a:hover,
.site-nav > a.active { color: var(--blue); }
.site-nav > a.active:after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
}
.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-user { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--purple) !important; font-weight: 600; }
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px; height: 40px;
    border: 0; background: transparent;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    display: block; height: 2px; background: var(--text); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.nav-mask { display: none; }

/* flash */
.flash-wrap { width: min(1080px, calc(100% - 32px)); margin: 12px auto 0; }
.flash { padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.flash-error { background: #fef0f0; color: var(--red); }
.flash-ok { background: #e8f8ee; color: #19be6b; }

/* footer */
.site-footer {
    margin-top: auto;
    padding: 28px 0 22px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 10px; }
.footer-links a { color: #606266; }
.footer-policy { line-height: 1.8; }
.footer-copy { margin-top: 8px; color: #c0c4cc; }

/* index */
.alert-warn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--warn-bg);
    color: var(--warn);
    font-size: 14px;
    padding: 10px 16px;
}
.alert-icon {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--warn); color: #fff;
    font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hero {
    background:
        linear-gradient(180deg, rgba(30, 129, 248, .92), rgba(22, 119, 210, .78)),
        url("../img/bg_index.png") center top / cover no-repeat;
    padding: 28px 0 56px;
}
.hero-inner { text-align: center; }
.hero-title { width: min(520px, 86%); margin: 0 auto 10px; }
.hero-slogan { color: #fff; font-size: 16px; letter-spacing: 4px; }
.index-main { margin-top: -28px; padding-bottom: 28px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.svc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 16px 18px 22px;
    color: inherit;
}
.svc-copy h3 { font-size: 16px; margin-bottom: 10px; }
.svc-copy p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.svc-card img { width: 150px; height: 105px; object-fit: contain; border-radius: 6px; }
.flow-card { margin: 16px 0; padding: 12px; }
.flow-card img { margin: 0 auto; max-height: 420px; width: auto; object-fit: contain; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 15px; }
.info-title .dot {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--blue);
    position: relative;
}
.info-title .dot:after {
    content: "";
    position: absolute; inset: 4px;
    border-radius: 50%; background: var(--blue);
}
.info-card { padding: 16px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.contact-banner {
    display: block;
    margin-top: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.contact-banner img { width: 100%; height: 66px; object-fit: cover; }

/* apply */
.apply-hero {
    background:
        linear-gradient(180deg, rgba(30, 129, 248, .88), rgba(22, 119, 210, .55)),
        url("../img/bg_index.png") center top / cover no-repeat;
    padding: 18px 0 36px;
}
.apply-banner { width: min(640px, 100%); margin: 0 auto; }
.apply-main { margin-top: -18px; padding-bottom: 40px; }
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}
.step { display: flex; align-items: center; gap: 6px; }
.step em {
    width: 22px; height: 22px; border-radius: 50%;
    background: #dcdfe6; color: #fff;
    font-style: normal; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.step.is-on { color: var(--blue); font-weight: 600; }
.step.is-on em { background: var(--blue); }
.step-line { width: 48px; height: 2px; background: var(--line); }
.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 8px; font-size: 14px; color: #606266; }
.radios { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.radios-col { flex-direction: column; }
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.radio input { width: auto; }
.region-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pay-fee { font-size: 16px; margin-bottom: 14px; }
.pay-fee strong { color: var(--red); font-size: 26px; margin-left: 4px; }
.pay-ways { display: flex; flex-direction: column; gap: 10px; }
.pay-way {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.pay-way input { width: auto; }
.pay-way-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: #07c160 center / 22px 22px no-repeat;
}
.pay-way-icon.pay-wxpay, .pay-way-icon.pay-2 {
    background-color: #07c160;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9.5 8.2c.4-2.4 2.7-4.2 5.5-4.2 3.1 0 5.6 2.1 5.6 4.8 0 2.6-2.3 4.7-5.3 4.8l.4 1.8-2.3-1.3c-3.4.1-6.1-2.1-6.1-4.8 0-.4 0-.7.1-1.1C6.2 8.7 5 9.8 5 11.2c0 1.8 1.8 3.3 4.2 3.7L8.8 16l2.1-1.2c.4 0 .8.1 1.2.1.3 0 .6 0 .8-.1-1.7-.8-2.8-2.2-2.8-3.8 0-.9.4-1.8 1-2.5z'/></svg>");
}
.pay-way-icon.pay-alipay, .pay-way-icon.pay-3 {
    background-color: #1677ff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M19.6 14.3c-1.6-.6-3.7-1.1-5.4-1.3 1.1-1.8 1.9-3.8 2.3-5.2H12V6.6h5.1V5.5H12V3.8H9.9l-.1 1.7H4.8v1.1h4.9v1.2H6.2v1.1h7.3c-.3 1.1-.9 2.6-1.7 4-1.3-.3-2.8-.5-4.3-.5-3.5 0-5.7 1.4-5.7 3.4 0 2.1 2.5 3.5 6.2 3.5 2.7 0 5.1-.8 6.9-2.3 1.4.8 3.5 1.7 4.8 2.2l1.1-2.8c-.5-.2-1.4-.6-2.1-.9zm-9.6 3.2c-2.8 0-4.5-.9-4.5-2.1s1.6-2.2 4.2-2.2c1.2 0 2.4.2 3.4.5-1.1 1.5-2.3 2.6-3.1 3.8z'/></svg>");
}
.pay-way-txt { display: flex; flex-direction: column; }
.pay-way-txt em { font-style: normal; font-size: 12px; color: var(--muted); }
.empty-pay { background: var(--warn-bg); color: #b88230; padding: 12px; border-radius: 10px; font-size: 13px; }
.agree { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0; font-size: 13px; color: #606266; }
.agree input { width: auto; margin-top: 3px; }
.apply-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* auth */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
    background:
        radial-gradient(ellipse at top, rgba(30, 129, 248, .12), transparent 50%),
        var(--bg);
}
.auth-card { width: min(440px, 100%); padding: 32px 28px; text-align: center; }
.auth-logo { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 16px; object-fit: cover; }
.auth-card h1 { font-size: 20px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.auth-form { text-align: left; }
.auth-extra { display: flex; justify-content: space-between; margin: -4px 0 16px; font-size: 13px; }
.link-btn { border: 0; background: none; color: var(--blue); padding: 0; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.btn-code { flex: 0 0 112px; white-space: nowrap; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 13px; }

/* user */
.user-page { display: grid; grid-template-columns: 240px 1fr; gap: 18px; padding: 22px 0 36px; }
.user-side { padding: 18px 16px; align-self: start; }
.user-avatar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.user-avatar img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.user-avatar strong { display: block; }
.user-avatar em { font-style: normal; color: var(--muted); font-size: 12px; word-break: break-all; }
.user-menu { display: flex; flex-direction: column; }
.user-menu a { padding: 10px 12px; border-radius: 8px; color: var(--text); }
.user-menu a.active, .user-menu a:hover { background: #eef5ff; color: var(--blue); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 16px 18px; }
.stat-card em { display: block; color: var(--muted); font-style: normal; font-size: 13px; }
.stat-card strong { font-size: 26px; color: var(--purple); }
.page-h { margin-bottom: 12px; }
.empty-box { padding: 40px 20px; text-align: center; }
.empty-box p { margin-bottom: 14px; color: var(--muted); }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { padding: 16px; }
.order-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.order-card h3 { font-size: 16px; margin: 8px 0; }
.order-meta { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; color: #606266; font-size: 13px; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge-ok { background: #e8f8ee; color: #19be6b; }
.badge-wait { background: #fdf6ec; color: #e6a23c; }
.badge-muted { background: #f4f4f5; color: #909399; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px 0 4px; }
.pager a {
    min-width: 34px; height: 34px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: #fff; color: var(--text); box-shadow: var(--shadow);
}
.pager a.active { background: var(--blue); color: #fff; }

/* article / about / service / pay */
.article-page, .about-page, .service-page, .pay-page { padding: 22px 0 36px; }
.article-card { padding: 24px; }
.article-card h1 { font-size: 22px; margin-bottom: 16px; }
.article-body { color: #606266; line-height: 1.85; word-break: break-word; }
.article-body p { margin-bottom: 10px; }
.about-card { padding: 40px 24px; text-align: center; }
.about-logo { width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 18px; object-fit: cover; }
.about-card h1 { font-size: 24px; color: var(--purple); }
.about-shop { color: var(--blue); margin: 6px 0 12px; }
.about-desc { max-width: 520px; margin: 0 auto 20px; color: var(--muted); }
.about-links { display: flex; justify-content: center; gap: 10px; }
.service-hero { overflow: hidden; margin-bottom: 16px; }
.service-hero img { width: 100%; height: 88px; object-fit: cover; }
.svc-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.svc-item { padding: 18px; text-align: center; }
.svc-item em { display: block; color: var(--muted); font-style: normal; font-size: 13px; margin-bottom: 6px; }
.svc-item strong { font-size: 18px; color: var(--purple); word-break: break-all; }

.pay-result { padding: 36px 22px; text-align: center; }
.pay-icon { width: 64px; height: 64px; margin: 0 auto 12px; }
.pay-result h1 { font-size: 22px; margin-bottom: 8px; }
.pay-meta { list-style: none; max-width: 360px; margin: 18px auto; text-align: left; }
.pay-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pay-meta span { color: var(--muted); }
.qr-box { margin: 16px 0; }
.qr-img { width: 220px; height: 220px; margin: 12px auto; background: #fff; padding: 8px; border-radius: 12px; box-shadow: var(--shadow); }
.qr-link { font-size: 12px; color: var(--muted); word-break: break-all; }
.pay-result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

/* toast */
.xf-toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    z-index: 99;
    max-width: min(86vw, 360px);
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(48, 49, 51, .92);
    color: #fff;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.xf-toast.is-ok { background: rgba(25, 190, 107, .95); }
.xf-toast.is-err { background: rgba(250, 53, 52, .95); }

body.nav-lock { overflow: hidden; }

@media (max-width: 860px) {
    :root { --header-h: 56px; }
    .nav-toggle { display: flex; }
    .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .site-nav {
        display: none;
        position: absolute;
        left: 0; right: 0; top: var(--header-h);
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px 18px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
        gap: 0;
    }
    .site-header.is-open .site-nav { display: flex; }
    .site-nav > a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
    .site-nav > a.active:after { display: none; }
    .nav-auth { margin: 12px 0 0; }
    .nav-mask {
        display: none;
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: rgba(0, 0, 0, .35);
        z-index: -1;
    }
    .site-header.is-open .nav-mask { display: block; }
    .svc-grid, .info-grid, .user-page, .svc-info-grid { grid-template-columns: 1fr; }
    .svc-card img { width: 120px; height: 86px; }
    .order-meta { grid-template-columns: 1fr; }
    .apply-actions { grid-template-columns: 1fr; }
    .region-row { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 18px; }
    .brand-text em { display: none; }
}

@media (max-width: 480px) {
    .wrap { width: calc(100% - 24px); }
    .hero { padding: 20px 0 48px; }
    .hero-slogan { letter-spacing: 2px; font-size: 14px; }
    .svc-card { padding: 14px; }
    .form-card, .pay-card { padding: 16px; }
    .pay-fee strong { font-size: 22px; }
}
