/* ============================================================
   号卡分销系统 - 移动端主样式
   全站基础设计系统（CSS 变量 + 组件）
   ============================================================ */

:root {
    --primary: #2b5cff;
    --primary-d: #1f47d6;
    --primary-l: #5b83ff;
    --violet: #7c5cff;
    --grad: linear-gradient(135deg, #2b5cff 0%, #6a5cff 100%);
    --grad-warm: linear-gradient(135deg, #ff6a3d 0%, #ff3b6b 100%);
    --price: #ff3b30;
    --price-2: #ff7a45;

    --text: #1a1d26;
    --text-2: #5c6373;
    --text-3: #9aa1b1;
    --line: #eef0f5;
    --line-2: #e4e7ef;

    --bg: #f4f5f9;
    --card: #ffffff;

    --ok: #00b578;
    --warn: #ff8f1f;
    --err: #ff3b30;

    --r-s: 8px;
    --r-m: 12px;
    --r-l: 16px;
    --r-xl: 22px;

    --sd-1: 0 2px 10px rgba(24, 33, 66, .05);
    --sd-2: 0 6px 22px rgba(24, 33, 66, .08);
    --sd-3: 0 12px 34px rgba(24, 33, 66, .12);

    --safe-b: env(safe-area-inset-bottom, 0px);
    --nav-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------------- 通用工具 ---------------- */
.container { padding: 0 12px; }
.flex { display: flex; }
.flex-c { display: flex; align-items: center; }
.flex-b { display: flex; align-items: center; justify-content: space-between; }
.flex-1 { flex: 1; min-width: 0; }
.text-c { text-align: center; }
.text-r { text-align: right; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ellipsis2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hidden { display: none !important; }
.c-primary { color: var(--primary); }
.c-price { color: var(--price); }
.c-muted { color: var(--text-3); }
.fw6 { font-weight: 600; } .fw7 { font-weight: 700; }
.fs11 { font-size: 11px; } .fs12 { font-size: 12px; } .fs13 { font-size: 13px; }
.fs16 { font-size: 16px; } .fs18 { font-size: 18px; } .fs20 { font-size: 20px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------------- 顶部导航 ---------------- */
.hk-header {
    position: sticky; top: 0; z-index: 60;
    background: var(--grad);
    color: #fff;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 12px;
    box-shadow: 0 4px 18px rgba(43, 92, 255, .22);
}
.hk-header.solid { background: #fff; color: var(--text); box-shadow: var(--sd-1); }
.hk-header .bar { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.hk-header .bar h1 { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.hk-header .back,
.hk-header .act {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex: 0 0 auto;
}
.hk-header .back svg, .hk-header .act svg { width: 20px; height: 20px; }

/* ---------------- 底部 Tab ---------------- */
.hk-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(var(--nav-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    display: flex;
}
.hk-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: var(--text-3); font-size: 10.5px; position: relative;
}
.hk-tabbar a svg { width: 22px; height: 22px; }
.hk-tabbar a.on { color: var(--primary); font-weight: 600; }
.hk-tabbar a.on::after {
    content: ''; position: absolute; top: 3px; width: 16px; height: 3px;
    border-radius: 3px; background: var(--grad);
}
.has-tab { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card); border-radius: var(--r-l); box-shadow: var(--sd-1);
    overflow: hidden;
}
.card + .card { margin-top: 12px; }
.card-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 14px 9px;
}
.card-hd h3 { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-hd h3::before {
    content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--grad);
}
.card-hd .more { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }
.card-bd { padding: 0 14px 14px; }

.sec-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 18px 12px 10px;
}
.sec-title h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.sec-title h2::before {
    content: ''; width: 4px; height: 15px; border-radius: 3px; background: var(--grad);
}
.sec-title .more { font-size: 12.5px; color: var(--text-3); }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    height: 42px; padding: 0 18px; border-radius: 999px;
    background: var(--grad); color: #fff; font-size: 14.5px; font-weight: 600;
    box-shadow: 0 6px 16px rgba(43, 92, 255, .28);
    transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); opacity: .92; }
.btn.block { display: flex; width: 100%; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; box-shadow: none; }
.btn.lg { height: 48px; font-size: 16px; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary-l); box-shadow: none; }
.btn.gray { background: #f1f2f7; color: var(--text-2); box-shadow: none; }
.btn.danger { background: var(--grad-warm); box-shadow: 0 6px 16px rgba(255, 59, 107, .26); }
.btn.warn { background: linear-gradient(135deg, #ffa726, #ff8f1f); box-shadow: none; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 13px; }
.field > label {
    display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500;
}
.field > label .req { color: var(--err); margin-left: 2px; }
.input, .select, .textarea {
    width: 100%; height: 44px; padding: 0 13px; border-radius: var(--r-m);
    background: #f7f8fc; border: 1px solid transparent; font-size: 14.5px;
    transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { background: #fff; border-color: var(--primary-l); }
.input::placeholder, .textarea::placeholder { color: #b9bfcc; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239aa1b1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 34px; }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }
.field-err { font-size: 12px; color: var(--err); margin-top: 5px; display: none; }
.field.error .input, .field.error .select { border-color: var(--err); background: #fff5f5; }
.field.error .field-err { display: block; }

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--primary); flex: 0 0 auto; }

/* ---------------- 徽标 / 标签 ---------------- */
.tag {
    display: inline-flex; align-items: center; height: 19px; padding: 0 6px;
    border-radius: 5px; font-size: 10.5px; font-weight: 600; line-height: 1;
}
.tag-red { background: #fff1f0; color: #ff3b30; }
.tag-blue { background: #eef3ff; color: var(--primary); }
.tag-green { background: #eafbf3; color: var(--ok); }
.tag-orange { background: #fff5eb; color: var(--warn); }
.tag-gray { background: #f2f3f7; color: var(--text-2); }
.tag-violet { background: #f3efff; color: var(--violet); }

.badge {
    position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 8px; background: var(--price); color: #fff;
    font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
}

/* ---------------- 商品卡片 ---------------- */
.p-grid { display: grid; gap: 11px; }
.p-grid.col2 { grid-template-columns: repeat(2, 1fr); }
.p-grid.col1 { grid-template-columns: 1fr; }

/* 横向卡片（列表） */
.p-item {
    display: flex; gap: 11px; padding: 12px; background: #fff;
    border-radius: var(--r-l); box-shadow: var(--sd-1); position: relative;
    transition: transform .12s;
}
.p-item:active { transform: scale(.985); }
.p-item .thumb {
    width: 96px; height: 96px; border-radius: var(--r-m); overflow: hidden;
    flex: 0 0 auto; background: #f2f4fa; position: relative;
}
.p-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-item .info h3 {
    font-size: 15px; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-item .desc { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.p-item .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.p-item .bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 8px; }
.price-box { display: flex; align-items: baseline; color: var(--price); }
.price-box .cur { font-size: 12px; font-weight: 600; }
.price-box .num { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.price-box .unit { font-size: 11.5px; color: var(--text-3); margin-left: 3px; }
.origin { font-size: 11.5px; color: var(--text-3); text-decoration: line-through; margin-left: 5px; }
.p-item .buy {
    height: 29px; padding: 0 15px; border-radius: 999px; background: var(--grad);
    color: #fff; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center;
}
.comm-tip {
    position: absolute; top: 0; right: 0; background: var(--grad-warm); color: #fff;
    font-size: 10px; padding: 2px 8px 2px 10px; border-radius: 0 var(--r-l) 0 10px; font-weight: 600;
}

/* 纵向卡片（推荐位） */
.p-cell {
    background: #fff; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sd-1);
    display: flex; flex-direction: column;
}
.p-cell .thumb { width: 100%; aspect-ratio: 1 / 1; background: #f2f4fa; overflow: hidden; }
.p-cell .thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-cell .bd { padding: 9px 10px 11px; display: flex; flex-direction: column; flex: 1; }
.p-cell .bd h3 { font-size: 13.5px; font-weight: 600; line-height: 1.35; height: 37px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-cell .bd .meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.p-cell .bd .bottom { margin-top: auto; padding-top: 7px; display: flex; align-items: center; justify-content: space-between; }
.p-cell .price-box .num { font-size: 17px; }
.p-cell .buy { height: 25px; padding: 0 11px; font-size: 11.5px; border-radius: 999px; background: var(--grad); color: #fff; }

/* 骨架屏 */
.skeleton { background: linear-gradient(90deg, #f0f1f6 25%, #e6e8f0 37%, #f0f1f6 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 空状态 ---------------- */
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 76px; height: 76px; margin: 0 auto 12px; opacity: .5; }
.empty p { font-size: 13.5px; }

/* ---------------- 骨架 / 加载 ---------------- */
.loading-more { text-align: center; padding: 16px; color: var(--text-3); font-size: 12.5px; }
.spinner {
    width: 18px; height: 18px; border: 2px solid rgba(43, 92, 255, .2);
    border-top-color: var(--primary); border-radius: 50%; display: inline-block;
    animation: spin .7s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Toast ---------------- */
#hk-toast {
    position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9);
    background: rgba(20, 24, 36, .88); color: #fff; padding: 11px 20px; border-radius: 12px;
    font-size: 13.5px; max-width: 74vw; text-align: center; z-index: 9999;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    backdrop-filter: blur(6px); line-height: 1.5;
}
#hk-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------------- 弹层 ---------------- */
.hk-mask {
    position: fixed; inset: 0; background: rgba(16, 20, 32, .5); z-index: 900;
    opacity: 0; pointer-events: none; transition: opacity .22s;
}
.hk-mask.show { opacity: 1; pointer-events: auto; }
.hk-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
    background: #fff; border-radius: 20px 20px 0 0; max-height: 84vh; overflow-y: auto;
    transform: translateY(102%); transition: transform .28s cubic-bezier(.32, .72, 0, 1);
    padding-bottom: var(--safe-b);
}
.hk-sheet.show { transform: translateY(0); }
.hk-sheet .sheet-hd {
    position: sticky; top: 0; background: #fff; z-index: 2; padding: 15px 16px 11px;
    display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.hk-sheet .sheet-hd h3 { font-size: 16px; font-weight: 600; }
.hk-sheet .sheet-hd .close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.hk-sheet .sheet-bd { padding: 14px 16px 20px; }

/* ---------------- 步骤 / 时间轴 ---------------- */
.steps { padding: 4px 0; }
.step { display: flex; gap: 11px; position: relative; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step::before {
    content: ''; position: absolute; left: 8px; top: 19px; bottom: 0; width: 1.5px; background: var(--line-2);
}
.step:last-child::before { display: none; }
.step .dot {
    width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2);
    flex: 0 0 auto; margin-top: 2px; z-index: 1;
}
.step.on .dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(43, 92, 255, .14); }
.step .t { font-size: 13.5px; font-weight: 500; }
.step .s { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------------- 表格（移动端列表） ---------------- */
.kv { display: flex; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 88px; color: var(--text-3); flex: 0 0 auto; }
.kv .v { flex: 1; text-align: right; word-break: break-all; }

/* 订单行 */
.o-item { background: #fff; border-radius: var(--r-l); padding: 13px 14px; box-shadow: var(--sd-1); }
.o-item + .o-item { margin-top: 10px; }
.o-item .top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.o-item .top .no { font-size: 11.5px; color: var(--text-3); }
.o-item .body { padding: 10px 0; }
.o-item .body h4 { font-size: 14.5px; font-weight: 600; }
.o-item .body .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.o-item .foot { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px dashed var(--line); }
.o-item .foot .time { font-size: 11.5px; color: var(--text-3); }

.st { font-size: 12.5px; font-weight: 600; }
.st.wait { color: var(--warn); }
.st.ing { color: var(--primary); }
.st.done { color: var(--ok); }
.st.cancel { color: var(--text-3); }
.st.fail { color: var(--err); }

/* ---------------- 顶部轮播 ---------------- */
.swiper { position: relative; border-radius: var(--r-l); overflow: hidden; }
.swiper .track { display: flex; transition: transform .38s cubic-bezier(.25, .8, .3, 1); }
.swiper .slide { flex: 0 0 100%; }
.swiper .slide img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.swiper .dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.swiper .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .5); transition: width .25s, background .25s; }
.swiper .dots i.on { width: 16px; background: #fff; }

/* ---------------- 搜索框 ---------------- */
.search-bar {
    display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    background: rgba(255, 255, 255, .95); border-radius: 999px; margin-top: 11px;
}
.search-bar svg { width: 17px; height: 17px; color: var(--text-3); flex: 0 0 auto; }
.search-bar input { flex: 1; border: 0; background: none; font-size: 14px; height: 100%; }
.search-bar input::placeholder { color: #b3b9c7; }

/* ---------------- 横向滚动分类 ---------------- */
.hscroll { display: flex; gap: 9px; overflow-x: auto; padding: 2px 12px 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.cat-chip {
    flex: 0 0 auto; height: 33px; padding: 0 16px; border-radius: 999px; background: #fff;
    color: var(--text-2); font-size: 13.5px; display: inline-flex; align-items: center;
    box-shadow: var(--sd-1); transition: all .2s;
}
.cat-chip.on { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(43, 92, 255, .3); }

/* 快捷入口 */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 14px 6px 6px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.quick .ic {
    width: 44px; height: 44px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; background: #eef3ff;
}
.quick span { font-size: 11.5px; color: var(--text-2); }

/* ---------------- 公告条 ---------------- */
.notice-bar {
    display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
    background: #fff; border-radius: var(--r-m); box-shadow: var(--sd-1); overflow: hidden;
}
.notice-bar .lb { display: flex; align-items: center; gap: 4px; color: var(--warn); font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.notice-bar .txt { flex: 1; overflow: hidden; position: relative; height: 20px; }
.notice-bar .txt p { font-size: 12.5px; color: var(--text-2); position: absolute; inset: 0; }
.notice-bar .txt .roll { animation: roll 12s linear infinite; }
@keyframes roll { 0% { transform: translateY(100%); } 8% { transform: translateY(0); } 92% { transform: translateY(0); } 100% { transform: translateY(-100%); } }

/* ---------------- 数字键盘 / 验证 ---------------- */
.countdown { font-size: 12.5px; color: var(--primary); font-weight: 600; }

/* ---------------- 底部操作栏 ---------------- */
.foot-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 9px 14px calc(9px + var(--safe-b));
    display: flex; align-items: center; gap: 10px;
}
.foot-bar .price-preview { flex: 0 0 auto; }
.foot-bar .btn { flex: 1; }

/* ---------------- 详情页 ---------------- */
.detail-hero { position: relative; background: #fff; }
.detail-hero img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.detail-price {
    background: linear-gradient(135deg, #fff5f4 0%, #fff 60%); padding: 16px 14px 14px;
}
.detail-price .row { display: flex; align-items: flex-end; justify-content: space-between; }
.detail-price .big { display: flex; align-items: baseline; color: var(--price); }
.detail-price .big .num { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.detail-title { font-size: 18px; font-weight: 700; padding: 0 14px 12px; line-height: 1.4; }
.detail-sub { font-size: 12.5px; color: var(--text-3); padding: 0 14px 14px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; }
.info-grid .it { background: #fff; padding: 11px 6px; text-align: center; }
.info-grid .it .v { font-size: 14.5px; font-weight: 700; color: var(--text); }
.info-grid .it .k { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.hl-list { display: flex; flex-wrap: wrap; gap: 7px; }
.hl-list span {
    font-size: 12px; color: var(--primary); background: #eef3ff; padding: 5px 10px; border-radius: 7px;
    display: inline-flex; align-items: center; gap: 4px;
}
.hl-list span::before { content: '✓'; font-weight: 700; }

.plan-table { width: 100%; font-size: 12.5px; }
.plan-table th { background: #f7f8fc; color: var(--text-2); font-weight: 600; padding: 9px 8px; text-align: center; }
.plan-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.plan-table tr:last-child td { border-bottom: 0; }
.plan-table .income { color: var(--price); font-weight: 700; }

.notice-box { font-size: 13px; color: var(--text-2); line-height: 1.85; white-space: pre-wrap; word-break: break-word; }

/* 图文详情 */
.rich img { width: 100%; margin: 8px 0; border-radius: var(--r-m); }
.rich p { font-size: 13.5px; color: var(--text-2); line-height: 1.85; margin: 8px 0; }

/* ---------------- 登录页 ---------------- */
.auth-wrap { min-height: 100vh; background: var(--grad); display: flex; flex-direction: column; }
.auth-head { padding: 58px 26px 34px; color: #fff; }
.auth-head .logo { width: 62px; height: 62px; border-radius: 19px; background: rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center; font-size: 29px; backdrop-filter: blur(8px); }
.auth-head h1 { font-size: 25px; font-weight: 700; margin-top: 16px; letter-spacing: .5px; }
.auth-head p { font-size: 13px; opacity: .82; margin-top: 5px; }
.auth-body { flex: 1; background: #fff; border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + var(--safe-b)); }
.auth-body .field > label { font-size: 13px; }
.auth-body .input { background: #f7f8fc; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 20px; }
.auth-foot a { color: var(--primary); font-weight: 600; }
.auth-tip {
    margin-top: 14px; padding: 10px 13px; background: #f7f8fc; border-radius: var(--r-m);
    font-size: 12px; color: var(--text-3); line-height: 1.7;
}

/* ---------------- 代理端 Dashboard ---------------- */
.wallet {
    background: var(--grad); padding: 0 14px 46px; color: #fff;
    border-radius: 0 0 22px 22px; position: relative; overflow: hidden;
}
.wallet::before {
    content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255, 255, 255, .1); top: -90px; right: -56px;
}
.wallet::after {
    content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%;
    background: rgba(255, 255, 255, .07); bottom: -60px; left: -30px;
}
.wallet .hd { display: flex; align-items: center; gap: 10px; padding: 12px 0 18px; position: relative; z-index: 1; }
.wallet .hd .avatar {
    width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .22);
    display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
}
.wallet .hd .who { flex: 1; }
.wallet .hd .who b { font-size: 15px; display: block; }
.wallet .hd .who small { font-size: 11.5px; opacity: .8; }
.wallet .amt { position: relative; z-index: 1; }
.wallet .amt .lbl { font-size: 12px; opacity: .85; }
.wallet .amt .n { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; }
.wallet .sub { display: flex; gap: 24px; margin-top: 12px; position: relative; z-index: 1; }
.wallet .sub div small { font-size: 11px; opacity: .8; display: block; }
.wallet .sub div b { font-size: 15px; }

.stat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
    border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sd-2); margin-top: -34px;
    position: relative; z-index: 2;
}
.stat-grid .it { background: #fff; padding: 13px 4px; text-align: center; }
.stat-grid .it .v { font-size: 16px; font-weight: 800; color: var(--text); }
.stat-grid .it .k { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.agent-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; }
.agent-menu a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 2px; border-radius: var(--r-m); }
.agent-menu a:active { background: #f7f8fc; }
.agent-menu .ic { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.agent-menu span { font-size: 11.5px; color: var(--text-2); }

/* 趋势迷你图 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 92px; padding: 8px 0 0; }
.trend .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.trend .bar i { width: 100%; max-width: 26px; border-radius: 5px 5px 3px 3px; background: linear-gradient(180deg, #6a5cff, #2b5cff); min-height: 4px; display: block; transition: height .4s; }
.trend .bar span { font-size: 9.5px; color: var(--text-3); }

/* 提现表单 */
.form-card { background: #fff; border-radius: var(--r-l); padding: 16px 14px; box-shadow: var(--sd-1); }
.amount-input { display: flex; align-items: center; border-bottom: 1.5px solid var(--line-2); padding-bottom: 10px; margin-bottom: 6px; }
.amount-input .cur { font-size: 25px; font-weight: 700; color: var(--text); margin-right: 6px; }
.amount-input input { flex: 1; border: 0; background: none; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.amount-input input::placeholder { color: #d3d7e0; font-weight: 600; }
.pay-method { display: flex; gap: 9px; }
.pay-method label {
    flex: 1; border: 1.5px solid var(--line-2); border-radius: var(--r-m); padding: 11px 6px;
    text-align: center; font-size: 13px; color: var(--text-2); transition: all .18s; cursor: pointer;
}
.pay-method input { display: none; }
.pay-method input:checked + span { color: var(--primary); font-weight: 600; }
.pay-method label:has(input:checked) { border-color: var(--primary); background: #f5f8ff; }

/* 推广海报 */
.poster-stage { min-height: 100vh; background: #16181f; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 18px; gap: 18px; }
.poster {
    width: 100%; max-width: 350px; background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4); position: relative;
}
.poster .ph { background: var(--grad); color: #fff; padding: 20px 18px; position: relative; }
.poster .ph h2 { font-size: 19px; font-weight: 700; }
.poster .ph p { font-size: 12px; opacity: .85; margin-top: 4px; }
.poster .pb { padding: 16px 18px 20px; }
.poster .prod { display: flex; gap: 12px; }
.poster .prod img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: #f2f4fa; }
.poster .prod h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.poster .pfoot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.poster .pfoot .qr { width: 84px; height: 84px; border-radius: 10px; background: #f7f8fc; overflow: hidden; }
.poster .pfoot .qr img { width: 100%; height: 100%; }
.poster .pfoot .txt { font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.poster .pfoot .txt b { color: var(--text); font-size: 13px; }

/* ---------------- 滚动吸顶分类 ---------------- */
.sticky-tabs {
    position: sticky; top: 0; z-index: 50; background: rgba(244, 245, 249, .95);
    backdrop-filter: blur(10px); padding: 9px 0 8px; margin: 0 -12px;
}

/* ---------------- 筛选行 ---------------- */
.filter-row { display: flex; align-items: center; gap: 8px; margin: 10px 12px; }
.filter-row .input { height: 38px; font-size: 13.5px; background: #fff; }
.filter-row .select { height: 38px; font-size: 13.5px; background-color: #fff; width: auto; min-width: 96px; }

/* ---------------- 分页（移动端） ---------------- */
.pager-m { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; font-size: 13px; color: var(--text-2); }
.pager-m a { padding: 7px 15px; background: #fff; border-radius: 999px; box-shadow: var(--sd-1); }
.pager-m a.disabled { opacity: .4; pointer-events: none; }

/* ---------------- 浮动客服 ---------------- */
.float-kf {
    position: fixed; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 70;
    width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(43, 92, 255, .36);
    font-size: 20px;
}

/* ---------------- 桌面端适配（保留移动优先观感） ---------------- */
@media (min-width: 720px) {
    body { background: #eceef4; }
    .hk-header { max-width: 560px; margin: 0 auto; border-radius: 0 0 18px 18px; }
    .hk-tabbar, .foot-bar { max-width: 560px; margin: 0 auto; }
    .container { max-width: 560px; margin: 0 auto; }
    .hscroll { max-width: 560px; margin: 0 auto; }
    .sec-title { max-width: 560px; margin-left: auto; margin-right: auto; }
    .has-tab { padding-bottom: 120px; }
}
