/* ============ 抢购商城 前台 H5 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #f5f6f8; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #222; font-size: 14px;
    display: flex; justify-content: center;
}
.app { width: 100%; max-width: 480px; min-height: 100vh; background: #f5f6f8; position: relative; padding-bottom: 70px; }
a { text-decoration: none; color: inherit; }
img { display: block; }

/* 搜索栏 */
.search-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; background: #fff; }
.search-bar .menu-ico { font-size: 22px; color: #333; }
.search-input {
    flex: 1; background: #f1f3f5; border-radius: 22px; padding: 10px 18px;
    color: #9aa5b1; font-size: 14px;
}

/* 轮播图 */
.banner { position: relative; margin: 8px 16px 0; border-radius: 14px; overflow: hidden; height: 190px; }
.banner-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.25,.8,.25,1); }
.banner-slide { flex: 0 0 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .3s; }
.banner-dots span.on { width: 16px; border-radius: 3px; background: #fff; }

/* 公告条 */
.notice-bar {
    display: flex; align-items: center; gap: 10px;
    background: #fff; margin: 12px 16px 0; padding: 14px 16px;
    border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.notice-tag { background: linear-gradient(135deg, #f7d774, #e8b73e); color: #7a5a10; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.notice-title { flex: 1; font-size: 15px; color: #5a6b5d; font-weight: 600; }
.notice-arrow { color: #b5bdc4; font-size: 20px; }
/* 公告轮播 */
.notice-roll { flex: 1; overflow: hidden; height: 22px; }
.notice-rolling { display: block; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .28s, transform .28s; }
.notice-rolling.notice-out { opacity: 0; transform: translateY(-10px); }
.notice-rolling.notice-in { opacity: 0; transform: translateY(10px); transition: none; }

/* 抢购商品状态：已售 / 明日开抢 */
.rush-img { position: relative; }
.sold-tag, .tomorrow-tag {
    position: absolute; left: 0; top: 8px;
    padding: 3px 10px; font-size: 12px; font-weight: 700;
    color: #fff; border-radius: 0 8px 8px 0;
}
.sold-tag { background: rgba(45, 52, 54, .85); }
.tomorrow-tag { background: linear-gradient(135deg, #e67e22, #f39c12); }
.item-sold { opacity: .62; }
.item-sold .rush-price { text-decoration: line-through; }

/* 区块标题 */
.section-title { display: flex; align-items: center; gap: 8px; padding: 20px 18px 12px; font-size: 17px; font-weight: 700; }
.section-title .bar { width: 5px; height: 18px; background: linear-gradient(180deg, #40916c, #2d6a4f); border-radius: 3px; }

/* 商品网格 */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.goods-card {
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: transform .15s;
    animation: fadeUp .4s both;
}
.goods-card:active { transform: scale(.97); }
.goods-img { height: 170px; overflow: hidden; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.goods-card:active .goods-img img { transform: scale(1.05); }
.goods-name { padding: 10px 12px 2px; font-size: 16px; font-weight: 700; }
.goods-price { padding: 4px 12px 12px; color: #e8833a; font-size: 17px; font-weight: 700; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============ 抢购页 ============ */
.rush-head { margin: 10px 16px 0; border-radius: 14px; overflow: hidden; height: 170px; }
.rush-head img { width: 100%; height: 100%; object-fit: cover; }

.login-tip-card {
    background: #fff; margin: 16px; border-radius: 16px; padding: 40px 24px;
    text-align: center; box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.lt-ico { font-size: 46px; margin-bottom: 14px; }
.lt-text { color: #666; margin-bottom: 22px; font-size: 15px; }
.lt-sub { margin-top: 14px; color: #999; font-size: 13px; }
.lt-sub a { color: #2d6a4f; font-weight: 600; }

.session-card {
    margin: 16px; border-radius: 16px; padding: 34px 20px; text-align: center;
    color: #fff; box-shadow: 0 8px 24px rgba(45,106,79,.25);
    background: linear-gradient(135deg, #40916c, #2d6a4f);
    position: relative; overflow: hidden;
}
.session-card::before {
    content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px;
    background: rgba(255,255,255,.08); border-radius: 50%;
}
.session-card.session-waiting { background: linear-gradient(135deg, #74a98a, #52796f); }
.session-card.session-ended { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.session-name { font-size: 28px; font-weight: 800; letter-spacing: 4px; margin-bottom: 12px; }
.session-time { font-size: 16px; opacity: .95; }
.session-status { margin-top: 14px; font-size: 14px; opacity: .9; }
.session-status b { font-size: 18px; color: #ffe08a; font-variant-numeric: tabular-nums; }

.rush-limit { text-align: center; color: #8a94a0; font-size: 13px; margin-bottom: 4px; }
.rush-limit b { color: #e8833a; font-size: 16px; }

.rush-list { padding: 0 16px; }
.rush-item {
    display: flex; gap: 12px; background: #fff; border-radius: 14px;
    padding: 12px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
    animation: fadeUp .4s both;
}
.rush-img { width: 108px; height: 108px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.rush-img img { width: 100%; height: 100%; object-fit: cover; }
.rush-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rush-name { font-size: 16px; font-weight: 700; }
.rush-seller { color: #9aa5b1; font-size: 12px; margin-top: 3px; }
.rush-meta { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.rush-price { color: #e8833a; font-size: 18px; font-weight: 800; }
.rush-fee { color: #b5bdc4; font-size: 11px; }
.rush-buy-row { margin-top: auto; text-align: right; }
.rush-btn {
    border: none; background: linear-gradient(135deg, #ff9a44, #f76b35);
    color: #fff; font-weight: 700; font-size: 14px; padding: 9px 22px;
    border-radius: 20px; box-shadow: 0 4px 12px rgba(247,107,53,.35);
    cursor: pointer; font-family: inherit; transition: transform .12s;
}
.rush-btn:active { transform: scale(.94); }
.rush-btn.disabled { background: #cfd6dd; box-shadow: none; color: #fff; }
.rush-btn.btn-waiting { background: linear-gradient(135deg, #b8c2cc, #98a4b0); box-shadow: 0 4px 12px rgba(152,164,176,.35); cursor: pointer; }

.empty-tip { text-align: center; color: #b5bdc4; padding: 50px 0; }

/* ============ 底部导航 ============ */
.tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    display: flex; border-top: 1px solid #eef0f2; padding: 6px 0 10px;
    z-index: 50;
}
.tab-item { flex: 1; text-align: center; color: #9aa5b1; font-size: 12px; transition: color .2s; }
.tab-item .ti-ico { display: block; font-size: 22px; margin-bottom: 2px; filter: grayscale(1); opacity: .65; transition: all .2s; }
.tab-item.on { color: #2d6a4f; font-weight: 700; }
.tab-item.on .ti-ico { filter: none; opacity: 1; transform: translateY(-2px); }

/* ============ 我的 ============ */
.me-header {
    background: linear-gradient(160deg, #40916c 0%, #2d6a4f 60%, #1b4332 100%);
    padding: 18px 18px 56px; position: relative; color: #fff;
}
.gear { position: absolute; top: 14px; right: 18px; font-size: 22px; }
.me-user { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.me-avatar { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); object-fit: cover; background: #fff; }
.me-name { font-size: 20px; font-weight: 700; }
.me-phone { font-size: 14px; opacity: .85; margin-top: 4px; }
.me-stat-card {
    position: absolute; left: 16px; right: 16px; bottom: -34px;
    background: #fff; border-radius: 14px; display: flex;
    box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 16px 0;
}
.me-stat { flex: 1; text-align: center; }
.me-stat + .me-stat { border-left: 1px solid #f0f2f4; }
.ms-num { font-size: 20px; font-weight: 800; color: #2d6a4f; }
.ms-num.red { color: #e8833a; }
.ms-label { color: #9aa5b1; font-size: 12px; margin-top: 3px; }

.me-panel {
    background: #fff; margin: 46px 16px 0; border-radius: 14px;
    padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.me-panel.green-panel { background: linear-gradient(135deg, #40916c, #2d6a4f); color: #fff; margin-top: 56px; }
.panel-head { font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.icon-grid { display: flex; }
.icon-item { flex: 1; text-align: center; position: relative; font-size: 12px; }
.green-panel .icon-item { color: rgba(255,255,255,.92); }
.icon-item .ii-ico {
    display: block; font-size: 26px; width: 48px; height: 48px; line-height: 48px;
    margin: 0 auto 6px; background: rgba(255,255,255,.15); border-radius: 12px;
}
.icon-item:not(.green-panel .icon-item) .ii-ico { background: #f0f7f4; }
.badge {
    position: absolute; top: -6px; left: calc(50% + 10px); background: #ff5a5f; color: #fff;
    font-size: 10px; font-style: normal; border-radius: 10px; padding: 1px 7px; min-width: 18px;
}
.badge.green { background: #2d6a4f; }

.invite-entry { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.invite-entry:active { background: #fafcfb; }
.iv-ico { font-size: 30px; }
.iv-text { flex: 1; }
.iv-title { font-weight: 700; font-size: 15px; }
.iv-sub { color: #9aa5b1; font-size: 12px; margin-top: 2px; }
.iv-code { background: #f0f7f4; color: #2d6a4f; font-weight: 700; padding: 4px 10px; border-radius: 6px; font-size: 13px; }

.list-panel { padding: 4px 16px; }
.list-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 0; border-bottom: 1px solid #f4f6f7; font-size: 14px;
}
.list-row:last-child { border-bottom: none; }
.inline-input { border: none; text-align: right; outline: none; font-size: 14px; background: transparent; max-width: 200px; }

/* 通用按钮 */
.btn-primary-block {
    display: block; width: 100%; text-align: center;
    background: linear-gradient(135deg, #40916c, #2d6a4f); color: #fff;
    border: none; border-radius: 24px; padding: 13px; font-size: 16px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(45,106,79,.3); cursor: pointer; font-family: inherit;
    transition: transform .12s;
}
.btn-primary-block:active { transform: scale(.97); }

/* ============ 登录/注册 ============ */
.auth-wrap { padding: 60px 32px; max-width: 480px; margin: 0 auto; width: 100%; }
.auth-logo { text-align: center; font-size: 34px; font-weight: 800; color: #2d6a4f; line-height: 1.4; margin-bottom: 34px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-input {
    display: flex; align-items: center; gap: 10px; background: #fff;
    border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
    border: 1px solid transparent; transition: border-color .2s;
}
.auth-input:focus-within { border-color: #40916c; }
.auth-input span { font-size: 18px; }
.auth-input input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; font-family: inherit; }
.auth-foot { text-align: center; margin-top: 18px; color: #8a94a0; }
.auth-foot a { color: #2d6a4f; font-weight: 600; }
.auth-tip { text-align: center; margin-top: 26px; color: #b5bdc4; font-size: 12px; }

.alert { padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #fdecea; color: #e74c3c; }
.alert-success { background: #eafaf1; color: #1e9e55; }

/* ============ 内页头部 ============ */
.page-head {
    display: flex; align-items: center; gap: 10px; padding: 16px;
    background: #fff; position: sticky; top: 0; z-index: 20;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.page-head .back { font-size: 26px; color: #333; width: 28px; line-height: 1; }
.page-head span { font-size: 17px; font-weight: 700; }

.mini-tabs { display: flex; gap: 10px; padding: 14px 16px 6px; }
.mini-tabs a {
    padding: 7px 16px; border-radius: 18px; background: #fff; color: #666;
    font-size: 13px; box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.mini-tabs a.on { background: #2d6a4f; color: #fff; font-weight: 600; }

/* ============ 订单 ============ */
.order-list { padding: 10px 16px; }
.order-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.order-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px dashed #eef0f2; }
.order-no { font-size: 12px; color: #9aa5b1; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.tag-orange { background: #fef3e8; color: #fa8231; font-weight: 600; }
.tag-green { background: #eafaf1; color: #1e9e55; font-weight: 600; }
.tag-gray { background: #f0f2f4; color: #8a94a0; }
.order-body { display: flex; gap: 12px; padding: 12px 0; }
.order-img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.order-goods { flex: 1; }
.og-name { font-size: 16px; font-weight: 700; }
.og-date { color: #9aa5b1; font-size: 12px; margin-top: 4px; }
.og-price { color: #e8833a; font-weight: 700; margin-top: 6px; }
.order-calc { background: #fafbfc; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.order-calc > div { display: flex; justify-content: space-between; padding: 3px 0; color: #666; }
.order-calc .red { color: #e74c3c; font-size: 16px; }
.relist-line { color: #1e9e55 !important; font-size: 12px; padding-top: 6px !important; }
.order-actions { text-align: right; margin-top: 12px; }
.pay-btn {
    border: none; background: linear-gradient(135deg, #ff9a44, #f76b35);
    color: #fff; font-weight: 700; font-size: 14px; padding: 10px 24px;
    border-radius: 22px; box-shadow: 0 4px 12px rgba(247,107,53,.35);
    cursor: pointer; font-family: inherit;
}
.pay-btn:active { transform: scale(.95); }

/* ============ 弹层 ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
    background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0;
    padding: 22px 20px 30px; animation: slideUp .28s cubic-bezier(.25,.8,.25,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-title { text-align: center; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.sheet-goods { text-align: center; color: #2d6a4f; font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.calc-list { background: #fafbfc; border-radius: 12px; padding: 14px 16px; }
.calc-row { display: flex; justify-content: space-between; padding: 6px 0; color: #555; font-size: 14px; }
.calc-row.total { border-top: 1px dashed #e2e6e9; margin-top: 6px; padding-top: 12px; font-size: 16px; }
.calc-row .red { color: #e74c3c; font-size: 19px; }
.calc-row .green { color: #1e9e55; }
.calc-tip { font-size: 12px; color: #8a94a0; line-height: 1.7; margin-top: 8px; }
.calc-tip b { color: #1e9e55; }
.sheet-btns { display: flex; gap: 12px; margin-top: 18px; }
.sheet-btn { flex: 1; border: none; border-radius: 22px; padding: 12px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.sheet-btn.cancel { background: #f0f2f4; color: #666; }
.sheet-btn.ok { background: linear-gradient(135deg, #ff9a44, #f76b35); color: #fff; box-shadow: 0 4px 12px rgba(247,107,53,.35); }
.sheet-btn:active { transform: scale(.97); }

/* ============ 邀请页 ============ */
.invite-card {
    background: #fff; margin: 16px; border-radius: 18px; padding: 28px 22px;
    text-align: center; box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.invite-avatar { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto; object-fit: cover; border: 3px solid #eafaf1; }
.invite-name { font-size: 19px; font-weight: 700; margin-top: 10px; }
.invite-tip { color: #8a94a0; font-size: 13px; margin-top: 6px; }
.qr-box { width: 220px; height: 220px; margin: 18px auto; padding: 10px; border: 1px solid #eef0f2; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.qr-box img, .qr-box canvas { width: 200px !important; height: 200px !important; }
.invite-code-line { font-size: 15px; color: #555; }
.invite-code-line b { color: #2d6a4f; font-size: 18px; letter-spacing: 2px; }
.invite-link { color: #9aa5b1; font-size: 11px; margin-top: 8px; word-break: break-all; }
.invite-count { margin-top: 14px; color: #8a94a0; font-size: 13px; }
.invite-count b { color: #e8833a; }

/* ============ 资料设置 ============ */
.profile-form { margin-top: 16px; }
.profile-avatar-row { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #f4f6f7; margin-bottom: 6px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pa-label { color: #9aa5b1; font-size: 12px; margin-bottom: 6px; }
.upload-btn { background: #f0f7f4; color: #2d6a4f; padding: 7px 16px; border-radius: 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.invite-badge { background: #f0f7f4; color: #2d6a4f; padding: 4px 12px; border-radius: 6px; letter-spacing: 1px; }

/* 公告详情 */
.announce-detail { line-height: 1.9; }
.ann-title { font-size: 18px; font-weight: 700; text-align: center; }
.ann-date { text-align: center; color: #b5bdc4; font-size: 12px; margin: 8px 0 16px; }
.ann-content { color: #444; font-size: 14px; white-space: pre-wrap; }
.ann-attach { display: block; margin-top: 16px; text-align: center; background: #f0f7f4; color: #2d6a4f; padding: 12px; border-radius: 10px; font-weight: 600; }

.page-pad { height: 20px; }
