/* ==========================================================================
   云南爱国学志愿 · 公众号 H5 样式表

   ⚠ 本文件与小程序 gzhminiapp 逐块对齐，修改样式时请同步修改小程序端同名文件
   ⚠ 单位换算：1rem = 100rpx（750 设计稿基准），根字号由 js/app.js 动态计算
   ⚠ 各节标注了对应的小程序源文件，便于两端对照维护
   ========================================================================== */

/* 浏览器默认 8px 边距会让 H5 四周出现白边，必须归零 */
html, body { margin: 0; padding: 0; }

view, text { display: block; }
image { display: block; max-width: 100%; }

/* ==========================================================================
   [App.vue] 骨架：H5 用 .app 模拟小程序 page 容器
   ========================================================================== */
.app {
    position: relative;
    max-width: 750px;
    min-height: 100vh;
    margin: 0 auto;
    overflow-x: hidden;
    background: #f5f6fa;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: .28rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

.page { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }

/* ---------- 顶部导航（对应小程序 navigationBarBackgroundColor #1677ff） ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: .88rem;
    padding: 0 .24rem;
    background: #1677ff;
    color: #fff;
}

.navbar-back {
    width: .5rem;
    height: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.navbar-back.is-show { opacity: 1; pointer-events: auto; }

.navbar-title {
    flex: 1;
    font-size: .32rem;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.navbar-right { min-width: .5rem; text-align: right; }

/* ==========================================================================
   [App.vue] 全局组件样式
   ========================================================================== */
.container { padding: .2rem; }

.card {
    background: #fff;
    border-radius: .16rem;
    padding: .24rem;
    box-shadow: 0 .02rem .1rem rgba(0,0,0,.04);
    margin-bottom: .2rem;
}

.card-title { font-size: .3rem; font-weight: 600; margin-bottom: .16rem; }

/* 卡片副标题：把过长的标题拆成两行，避免在卡片里挤出奇怪的断行 */
.card-sub { font-size: .24rem; color: #999; margin: -.08rem 0 .16rem; line-height: 1.4; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: .16rem .32rem;
    border: none;
    border-radius: .12rem;
    font-family: inherit;
    font-size: .28rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: opacity .2s;
}

.btn:active { opacity: .85; }
.btn-primary { background: linear-gradient(90deg,#1677ff,#38b6ff); color: #fff; }
.btn-block { display: block; width: 100%; box-sizing: border-box; }
.btn-outline { border: 1px solid #1677ff; color: #1677ff; background: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-gray { background: #f2f3f5; color: #666; }
.btn-lg { padding: .22rem .36rem; font-size: .3rem; }

/* 首页覆盖：按钮更紧凑（index.vue 内单独定义） */
.btn-sm { padding: .08rem .18rem; font-size: .24rem; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: .04rem .16rem; border-radius: .08rem; font-size: .22rem; }
.tag-green { background: #f6ffed; color: #389e0d; }
.tag-blue { background: #e6f4ff; color: #0958d9; }
.tag-gray { background: #fafafa; color: #8c8c8c; }
.tag-red { background: #fff2f0; color: #cf1322; }
.tag-orange { background: #fff7e6; color: #d46b08; }

/* 视频/文档页的价格标签（videos.vue / docs.vue） */
.price-tag { font-size: .22rem; border-radius: .06rem; padding: .02rem .12rem; margin-left: .12rem; }
.tag-free { color: #389e0d; background: #f6ffed; border: 1px solid #b7eb8f; }
.tag-price { color: #cf1322; background: #fff1f0; border: 1px solid #ffa39e; font-weight: 600; }
.tag-paid { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }

/* ---------- 文字 / 布局 ---------- */
.muted { color: #999; font-size: .24rem; }
.row { display: flex; align-items: center; }
.flex-1 { flex: 1; min-width: 0; }
.center { text-align: center; }
.price { color: #ff4d4f; font-weight: 700; }
.empty { text-align: center; color: #bbb; padding: .8rem 0; font-size: .26rem; }

/* ---------- 表单 ---------- */
.input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: .2rem;
    border: 1px solid #e8e8e8;
    border-radius: .1rem;
    background: #fafafa;
    font-family: inherit;
    font-size: .28rem;
    color: #333;
    outline: none;
}

.input:focus { border-color: #1677ff; background: #fff; }
.form-item { margin-bottom: .24rem; }
.form-item .label { display: block; font-size: .26rem; color: #666; margin-bottom: .08rem; }

.notice {
    background: #e6f4ff;
    border: 1px solid #91caff;
    color: #0958d9;
    padding: .16rem .2rem;
    border-radius: .1rem;
    font-size: .24rem;
    margin-bottom: .2rem;
    line-height: 1.6;
}

/* ==========================================================================
   [pages/index/index.vue] 首页
   ========================================================================== */
.banner {
    background: linear-gradient(135deg,#1677ff,#38b6ff);
    color: #fff;
    padding: .4rem .3rem;
    border-radius: .2rem;
    margin-bottom: .2rem;
}

.banner-title { font-size: .38rem; font-weight: 700; }
.banner-sub { font-size: .26rem; margin-top: .08rem; opacity: .9; }

/* ---------- 商品行 ---------- */
.product { display: flex; align-items: center; padding: .2rem 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.product:last-child { border-bottom: none; }

.pname {
    font-size: .3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .1rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.pname-text { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pname .tag { flex-shrink: 0; white-space: nowrap; }
.desc { margin-top: .06rem; font-size: .24rem; }
.pricing { text-align: right; }
.price { font-size: .34rem; margin-right: .12rem; }
.price-line { display: flex; align-items: baseline; justify-content: flex-end; gap: .08rem; margin-bottom: .06rem; }
.price-free { color: #389e0d; }
.price-orig { font-size: .24rem; color: #999; text-decoration: line-through; }

/* ---------- 平台入口（醒目红框红字） ---------- */
.platform-entry {
    display: flex;
    align-items: center;
    margin-top: .2rem;
    padding: .2rem .24rem;
    background: #fff1f0;
    border: 2px solid #ff7875;
    border-radius: .12rem;
    cursor: pointer;
}

.pe-icon { flex-shrink: 0; font-size: .34rem; margin-right: .12rem; }
.pe-text { flex: 1; font-size: .28rem; font-weight: bold; color: #cf1322; line-height: 1.4; }
.pe-arrow { flex-shrink: 0; font-size: .36rem; color: #cf1322; margin-left: .08rem; }

/* ---------- 视频轮播（对应小程序 swiper） ---------- */
.video-swiper {
    display: flex;
    gap: .16rem;
    /* 不再固定 4rem：固定高度在封面较矮时会在卡片里留出一大片空白 */
    margin-bottom: .16rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .04rem;
}

.video-swiper::-webkit-scrollbar { display: none; }

.video-item {
    /* 露出下一张的一角，提示可以横向滑动 */
    flex: 0 0 72%;
    cursor: pointer;
}

.video-preview {
    display: block;
    width: 100%;
    height: 2.6rem;
    border-radius: .12rem;
    object-fit: cover;
    /* 封面加载失败时显示浅色渐变，而不是刺眼的纯黑块 */
    background: linear-gradient(135deg, #e8f0ff, #f5f9ff);
}

/* 无封面时的占位：渐变底 + 播放图标 */
.video-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .56rem;
    color: #1677ff;
    opacity: .55;
}

.video-title {
    font-size: .26rem;
    margin-top: .1rem;
    color: #333;
    line-height: 1.4;
    /* 最多两行，超出省略，避免长标题把轮播撑歪 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 讲解视频卡 ---------- */
.intro-card { background: linear-gradient(135deg,#f0f7ff,#f6ffed); }
.intro-item { padding: .2rem 0; border-bottom: 1px solid #f5f5f5; }
.intro-item:last-child { border-bottom: none; }
.intro-name { font-size: .3rem; font-weight: 600; margin-bottom: .04rem; }
.intro-player { width: 100%; height: 4rem; margin-top: .16rem; background: #000; border-radius: .12rem; }

/* ---------- 空状态引导 ---------- */
.empty-guide { padding: .36rem .2rem; text-align: center; border-radius: .12rem; background: #f8faff; }
.eg-icon { font-size: .52rem; }
.eg-title { font-size: .28rem; font-weight: 600; color: #333; margin-top: .1rem; }
.eg-desc { font-size: .24rem; color: #999; margin-top: .06rem; }

/* ---------- 入口导航四宫格 ---------- */
.grid-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .2rem;
    background: #fff;
    padding: .24rem;
    border-radius: .16rem;
}

.grid-item { text-align: center; cursor: pointer; }
.gicon { font-size: .48rem; }
.glabel { font-size: .24rem; color: #666; margin-top: .06rem; }

/* ---------- 滚动公告跑马灯（内容复制两份，translateX(-50%) 无缝循环） ---------- */
.notice-bar {
    display: flex;
    align-items: center;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: .12rem;
    padding: .16rem .2rem;
    margin-bottom: .2rem;
    overflow: hidden;
}

.notice-horn { flex-shrink: 0; font-size: .34rem; margin-right: .12rem; }
.notice-track { flex: 1; overflow: hidden; }

.notice-inner {
    display: inline-flex;
    white-space: nowrap;
    will-change: transform;
    animation: noticeMarquee linear infinite;
}

.notice-text { font-size: .34rem; font-weight: 700; color: #ad6800; line-height: .52rem; }
.notice-gap { padding-left: .8rem; }

@keyframes noticeMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- 右侧悬浮球：我的账号密码（可拖动，位置本地记忆） ---------- */
.float-entry {
    position: fixed;
    z-index: 99;
    width: 1.04rem;
    height: 1.04rem;
    border-radius: 50%;
    background: linear-gradient(145deg,#ffb14d,#ff7a1f);
    box-shadow: 0 .08rem .24rem rgba(255,122,31,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: none;
    transition: box-shadow .15s ease;
}

.float-entry.dragging { box-shadow: 0 .12rem .32rem rgba(255,122,31,.65); }

.fe-ring {
    position: absolute;
    width: 1.04rem;
    height: 1.04rem;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.55);
    box-sizing: border-box;
}

.fe-icon { font-size: .52rem; line-height: 1; text-shadow: 0 .02rem .06rem rgba(150,60,0,.35); }

/* ==========================================================================
   [pages/login/login.vue] 登录 / 注册 / 找回密码
   ========================================================================== */
.login-wrap {
    padding: .6rem .4rem;
    min-height: 100vh;
    background: linear-gradient(135deg,#1677ff,#38b6ff);
    box-sizing: border-box;
}

.login-wrap .card {
    background: #fff;
    border-radius: .2rem;
    padding: .4rem .3rem;
    box-shadow: 0 .04rem .24rem rgba(0,0,0,.08);
}

.logo { text-align: center; font-size: .48rem; font-weight: 700; color: #fff; margin-top: .4rem; }
.subtitle { text-align: center; color: rgba(255,255,255,.85); font-size: .26rem; margin: .08rem 0 .4rem; }

.tab-row {
    display: flex;
    background: rgba(255,255,255,.2);
    border-radius: .4rem;
    padding: .08rem;
    margin-bottom: .3rem;
}

.tab { flex: 1; text-align: center; padding: .16rem; color: #fff; font-size: .28rem; border-radius: .32rem; cursor: pointer; }
.tab-active { background: #fff; color: #1677ff; font-weight: 600; }

.tip { text-align: center; margin-top: .2rem; font-size: .22rem; }
.skip-btn { text-align: center; margin-top: .3rem; font-size: .26rem; color: #1677ff; padding: .2rem; cursor: pointer; }
.forgot-link { text-align: right; font-size: .24rem; color: #1677ff; padding: .1rem 0 .2rem; cursor: pointer; }

/* ---------- 找回密码 ---------- */
.fp-title { font-size: .34rem; font-weight: 700; color: #222; }
.fp-sub { font-size: .24rem; color: #999; margin: .12rem 0 .3rem; line-height: 1.6; }

.fp-option {
    display: flex;
    align-items: center;
    padding: .28rem .2rem;
    border: 1px solid #e8eef7;
    border-radius: .14rem;
    margin-bottom: .2rem;
    background: #f8faff;
    cursor: pointer;
}

.fp-opt-icon { font-size: .44rem; margin-right: .2rem; }
.fp-opt-body { flex: 1; min-width: 0; }
.fp-opt-name { font-size: .28rem; font-weight: 600; color: #333; }
.fp-opt-desc { font-size: .22rem; color: #999; margin-top: .08rem; line-height: 1.5; }
.fp-arrow { font-size: .4rem; color: #ccc; }

.code-row { display: flex; align-items: center; gap: .16rem; }
.code-input { flex: 1; }

.code-btn {
    flex-shrink: 0;
    min-width: 2rem;
    font-size: .26rem;
    margin: 0;
    background: #1677ff;
    color: #fff;
}

.code-btn[disabled] { background: #c6d8f5; color: #fff; }

/* 密码显隐小眼睛 */
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap .input { flex: 1; padding-right: .76rem; }
.eye { position: absolute; right: .16rem; font-size: .36rem; line-height: 1; padding: .1rem; cursor: pointer; }

/* ==========================================================================
   [pages/product/product.vue] 产品详情
   ========================================================================== */
.price-big { font-size: .5rem; font-weight: 700; color: #ff4d4f; margin: .1rem 0; }

.student-line {
    display: flex;
    align-items: center;
    padding: .14rem;
    background: #f6ffed;
    border-radius: .1rem;
}

/* ==========================================================================
   [pages/videos/videos.vue] 视频学习系统
   ========================================================================== */
.sys-banner {
    background: linear-gradient(135deg,#1677ff,#38b6ff);
    color: #fff;
    padding: .28rem .3rem;
    border-radius: .2rem;
    margin-bottom: .2rem;
}

.sb-title { font-size: .34rem; font-weight: 700; }
.sb-sub { font-size: .26rem; margin-top: .08rem; opacity: .92; }

.sec-title { display: flex; align-items: center; justify-content: space-between; padding: .06rem 0 .16rem; }
.sec-name { font-size: .3rem; font-weight: 700; color: #1a1a1a; }

.sub-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .14rem 0 .06rem;
    border-top: 1px dashed #eee;
}

.sub-name { font-size: .27rem; font-weight: 600; color: #1677ff; }
.sec-count { font-size: .22rem; color: #999; }
.sub-block { margin-bottom: .04rem; }

.video-cell { padding: .2rem 0; border-bottom: 1px solid #f5f5f5; }
.video-cell:last-child { border-bottom: none; }
.vt { font-size: .3rem; font-weight: 600; margin-bottom: .04rem; }

.player { width: 100%; height: 4rem; margin-top: .16rem; background: #000; border-radius: .12rem; }

.link-tip {
    margin-top: .16rem;
    padding: .2rem;
    background: #f0f7ff;
    border: 1px dashed #91caff;
    border-radius: .12rem;
    font-size: .24rem;
    color: #1677ff;
    word-break: break-all;
}

.lock-tip {
    background: #fff7e6;
    color: #d46b08;
    font-size: .24rem;
    padding: .12rem .2rem;
    border-radius: .1rem;
    margin-bottom: .2rem;
}

/* ==========================================================================
   [pages/docs/docs.vue] 资料文档
   ========================================================================== */
.doc-cell { display: flex; align-items: center; padding: .2rem 0; border-bottom: 1px solid #f5f5f5; }
.doc-cell:last-child { border-bottom: none; }
.doc-group { margin-bottom: .16rem; }

.doc-group-title {
    font-size: .26rem;
    font-weight: 600;
    color: #1677ff;
    padding: .08rem 0;
    border-bottom: 1px dashed #e8e8e8;
}

.dt { font-size: .3rem; }

/* 首页「研究报告」专区沿用 docs 页分组样式，行高略紧凑 */
.doc-item { display: flex; align-items: center; padding: .18rem 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.doc-item:last-child { border-bottom: none; }
.dtitle { font-size: .28rem; }

/* ==========================================================================
   [pages/docview/docview.vue] 文档查看
   ========================================================================== */
.docview { background: #eee; min-height: 100vh; padding: .1rem; }
.pages { display: flex; flex-direction: column; align-items: center; }
.page-img { width: 100%; margin-bottom: .2rem; border-radius: .08rem; box-shadow: 0 .02rem .1rem rgba(0,0,0,.1); }

.docview-bar { display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .2rem; }
.docview-num { font-size: .26rem; color: #666; }

.safe-tip {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d46b08;
    font-size: .22rem;
    line-height: 1.6;
    padding: .14rem .18rem;
    border-radius: .1rem;
    margin-bottom: .16rem;
}

/* ==========================================================================
   [pages/order/order.vue] 我的订单
   ========================================================================== */
.order-card {
    background: #fff;
    border-radius: .16rem;
    padding: .28rem;
    margin-bottom: .2rem;
    box-shadow: 0 .02rem .12rem rgba(0,0,0,.04);
}

.oc-head { display: flex; align-items: center; gap: .2rem; }

.oc-icon {
    width: .72rem;
    height: .72rem;
    border-radius: 50%;
    background: #f0f9eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .38rem;
    flex-shrink: 0;
}

.oc-main { flex: 1; min-width: 0; }

.oc-name {
    font-size: .3rem;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.oc-no { font-size: .22rem; color: #999; margin-top: .06rem; }
.oc-price { font-size: .34rem; font-weight: 700; color: #cf1322; flex-shrink: 0; }

.oc-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .2rem;
    padding-top: .18rem;
    border-top: 1px dashed #f0f0f0;
}

.oc-time { font-size: .24rem; color: #999; }

.oc-badge {
    font-size: .22rem;
    color: #389e0d;
    background: #f0f9eb;
    padding: .04rem .16rem;
    border-radius: .2rem;
}

/* ---------- 空状态 ---------- */
.empty-box { padding: 1.2rem .4rem; text-align: center; }
.empty-icon { font-size: .88rem; }
.empty-title { font-size: .32rem; font-weight: 600; color: #333; margin-top: .2rem; }
.empty-tip { font-size: .26rem; color: #999; margin-top: .1rem; }

.empty-btn {
    margin-top: .36rem;
    display: inline-block;
    background: linear-gradient(135deg,#2b5cff,#1e40af);
    color: #fff;
    font-size: .28rem;
    border-radius: .44rem;
    padding: .16rem .64rem;
    line-height: 1.6;
    cursor: pointer;
}

.load-more { text-align: center; padding: .2rem 0 .4rem; font-size: .24rem; color: #999; }

/* ==========================================================================
   [pages/mine/mine.vue] 我的
   ========================================================================== */
.profile-card { display: flex; align-items: center; }
.menu-card { padding-top: .04rem; padding-bottom: .04rem; }

.avatar {
    width: .9rem;
    height: .9rem;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    text-align: center;
    line-height: .9rem;
    font-size: .48rem;
}

.name { font-size: .32rem; font-weight: 700; }
.comm-row { display: flex; justify-content: space-around; padding: .16rem 0; }
.comm-cell { text-align: center; }
.comm-num { font-size: .32rem; font-weight: 700; color: #1677ff; }
.comm-actions { display: flex; gap: .16rem; margin-top: .12rem; }
.comm-actions .btn { flex: 1; }

/* ---------- 未登录占位视图 ---------- */
.login-placeholder { padding: 1.2rem .6rem .6rem; text-align: center; }
.lp-icon { font-size: 1.2rem; margin-bottom: .3rem; }
.lp-title { font-size: .38rem; font-weight: 700; color: #333; margin-bottom: .16rem; }
.lp-tip { font-size: .26rem; color: #999; margin-bottom: .5rem; line-height: 1.6; }
.lp-btn { margin-bottom: .24rem; }

/* ==========================================================================
   [pages/ucenter/ucenter.vue] 个人中心
   ========================================================================== */
.pc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .24rem 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.pc-item:last-of-type { border-bottom: none; }
.pc-left { display: flex; align-items: center; gap: .16rem; }
.pc-icon { font-size: .36rem; }
.pc-label { font-size: .3rem; color: #333; }
.pc-right { display: flex; align-items: center; gap: .12rem; }

.pc-val {
    font-size: .26rem;
    color: #389e0d;
    max-width: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-none { color: #bbb; }
.pc-arrow { font-size: .4rem; color: #ccc; }

.pc-tip {
    margin-top: .2rem;
    padding: .16rem .2rem;
    background: #f8faff;
    border-radius: .1rem;
    font-size: .22rem;
    color: #8c8c8c;
    line-height: 1.7;
}

/* ==========================================================================
   [pages/account/account.vue] 我的账号密码
   ========================================================================== */
.line { display: flex; align-items: center; padding: .1rem 0; }

.acc {
    font-family: monospace;
    font-size: .3rem;
    font-weight: 700;
    color: #1677ff;
    margin-left: auto;
}

.url-btn { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: .1rem; }
.url-text { color: #1677ff; font-size: .26rem; word-break: break-all; text-align: right; }

.url-action {
    font-size: .22rem;
    color: #fff;
    background: #1677ff;
    padding: .04rem .14rem;
    border-radius: .2rem;
    flex-shrink: 0;
}

.action-row { display: flex; gap: .16rem; margin-top: .14rem; }
.action-row .btn { flex: 1; }

.expired-tag { background: #fff1f0; color: #ff4d4f; font-size: .2rem; padding: .02rem .1rem; border-radius: .2rem; margin-left: .1rem; }
.valid-tag { background: #f6ffed; color: #52c41a; font-size: .2rem; padding: .02rem .1rem; border-radius: .2rem; margin-left: .1rem; }
.expired-text { color: #ff4d4f; font-weight: 600; }
.valid-text { color: #52c41a; font-weight: 600; }

.expired-tip {
    margin-top: .14rem;
    padding: .16rem;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: .1rem;
    font-size: .24rem;
    color: #d46b08;
}

.pending-box { background: #fffbe6; border: 1px solid #ffe58f; border-radius: .12rem; padding: .2rem; margin-bottom: .2rem; }
.pending-title { font-size: .28rem; font-weight: 600; color: #d48806; margin-bottom: .12rem; }
.pending-item { display: flex; justify-content: space-between; font-size: .26rem; color: #666; padding: .06rem 0; }
.pending-time { color: #999; font-size: .24rem; }
.pending-tip { margin-top: .12rem; font-size: .24rem; color: #8c6d1f; line-height: 1.6; }

/* ==========================================================================
   [pages/distribution/distribution.vue] 分销中心
   ========================================================================== */
.rate-row { display: flex; align-items: center; padding: .1rem 0; }
.rate-label { width: 1.4rem; font-size: .26rem; color: #555; flex-shrink: 0; }
.rate-input { flex: 1; border: 1px solid #e0e0e0; border-radius: .08rem; padding: .1rem .16rem; font-size: .26rem; }
.rate-unit { margin-left: .12rem; font-size: .26rem; color: #999; }
.rate-actions { display: flex; gap: .16rem; margin-top: .16rem; }
.qr-img { width: 4.4rem; height: 6.02rem; background: #f5f5f5; border-radius: .16rem; }

.invite-link {
    margin-top: .16rem;
    padding: .14rem .16rem;
    background: #f0f7ff;
    border: 1px dashed #91caff;
    border-radius: .1rem;
    font-size: .24rem;
    color: #1677ff;
    word-break: break-all;
    text-align: left;
}

.invite-actions { display: flex; gap: .16rem; margin-top: .16rem; }
.invite-actions .btn { flex: 1; }
.qr-tip { margin-top: .12rem; font-size: .22rem; color: #666; line-height: 1.6; padding: 0 .1rem; }
.share-tip { margin-top: .16rem; font-size: .22rem; color: #999; line-height: 1.6; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .2rem;
    background: #fff;
    padding: .24rem;
    border-radius: .16rem;
    margin-bottom: .2rem;
}

.stat-item { text-align: center; }
.sn { font-size: .36rem; font-weight: 700; color: #1677ff; }
.sl { color: #8c8c8c; font-size: .24rem; margin-top: .06rem; }

/* 分销页专用 tab（区别于登录页 .tab-row） */
.dtab-row { display: flex; margin-bottom: .16rem; border-bottom: 1px solid #f0f0f0; }
.dtab { flex: 1; text-align: center; padding: .14rem 0; color: #666; font-size: .28rem; cursor: pointer; }
.dtab-active { color: #1677ff; border-bottom: 3px solid #1677ff; font-weight: 600; }

.sub-line { display: flex; align-items: center; padding: .16rem 0; border-bottom: 1px solid #f5f5f5; font-size: .28rem; cursor: pointer; }
.sub-line:last-child { border-bottom: none; }
.sub-right { text-align: right; }
.sub-amount { font-size: .28rem; font-weight: 600; color: #cf1322; }

.log-line { display: flex; align-items: center; padding: .14rem 0; border-bottom: 1px solid #f5f5f5; font-size: .26rem; }
.log-line:last-child { border-bottom: none; }
.log-title { font-size: .27rem; color: #333; }

.log-level {
    margin-left: .08rem;
    padding: 0 .08rem;
    font-size: .2rem;
    color: #d46b08;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: .06rem;
}

/* ---------- 收益详情弹层 ---------- */
.mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    display: flex;
    align-items: flex-end;
}

.sheet {
    width: 100%;
    max-height: 78vh;
    background: #fff;
    border-radius: .24rem .24rem 0 0;
    padding: .28rem .24rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.sheet-title { font-size: .32rem; font-weight: 700; text-align: center; }
.sheet-sub { text-align: center; font-size: .24rem; color: #999; margin-top: .06rem; }

.sheet-sum {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: .2rem 0;
    margin: .16rem 0;
    background: #fafafa;
    border-radius: .12rem;
}

.sheet-body { flex: 1; min-height: 2rem; overflow-y: auto; }
.det-line { display: flex; align-items: center; padding: .16rem 0; border-bottom: 1px solid #f5f5f5; font-size: .26rem; }
.det-line:last-child { border-bottom: none; }
.det-title { font-size: .27rem; color: #333; }

/* ==========================================================================
   [pages/withdraw/withdraw.vue] 佣金提现
   ========================================================================== */
.wd-banner {
    background: linear-gradient(135deg,#1677ff,#0958d9);
    border-radius: .2rem;
    padding: .4rem .3rem;
    margin-bottom: .2rem;
    color: #fff;
}

.wd-label { font-size: .26rem; opacity: .9; }
.wd-amount-big { font-size: .56rem; font-weight: 700; margin: .12rem 0; }
.wd-tip { font-size: .22rem; opacity: .8; margin-bottom: .2rem; }

.btn-apply { background: #fff; color: #1677ff; font-size: .3rem; border-radius: .4rem; font-weight: 600; }
.btn-apply[disabled] { background: rgba(255,255,255,.5); color: #fff; }

.withdraw-avail { display: flex; align-items: center; justify-content: space-between; padding: .16rem 0; }
.wd-history { margin-top: .16rem; border-top: 1px solid #f0f0f0; padding-top: .12rem; }
.wd-h-title { font-size: .26rem; color: #555; margin-bottom: .08rem; }
.wd-line { display: flex; align-items: center; padding: .1rem 0; font-size: .26rem; }
.wd-list { margin-top: .08rem; }
.wd-item { padding: .16rem 0; border-bottom: 1px solid #f0f0f0; }
.wd-item:last-child { border-bottom: none; }
.wd-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .08rem; }
.wd-tag { font-size: .22rem; padding: .04rem .16rem; border-radius: .08rem; }
.wd-tag-0 { background: #fff7e6; color: #d46b08; }
.wd-tag-1 { background: #e6f4ff; color: #1677ff; }
.wd-tag-2 { background: #fff1f0; color: #cf1322; }
.wd-tag-3 { background: #f6ffed; color: #389e0d; }
.wd-tag-4 { background: #f5f5f5; color: #999; }
.wd-tag-5 { background: #fff7e6; color: #fa8c16; }

.wd-go-collect {
    margin-top: .12rem;
    padding: .16rem 0;
    color: #fa8c16;
    font-size: .28rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #fa8c16;
    border-radius: .08rem;
    background: #fff7e6;
    cursor: pointer;
}

.wd-info view { margin-top: .04rem; }

/* ---------- 提现规则卡 ---------- */
.rules-card { background: linear-gradient(135deg,#fffbe6,#fff7e6); border: 1px solid #ffe58f; }
.rule-item { display: flex; align-items: flex-start; padding: .12rem 0; border-bottom: 1px dashed #ffe58f; }
.rule-item:last-child { border-bottom: none; }

.rule-label {
    flex-shrink: 0;
    width: 1.4rem;
    font-size: .24rem;
    color: #d46b08;
    font-weight: 600;
    padding-top: .02rem;
}

.rule-value { flex: 1; font-size: .24rem; color: #595959; line-height: 1.6; }

.rule-notice {
    margin-top: .16rem;
    padding: .16rem .2rem;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: .08rem;
    font-size: .24rem;
    color: #cf1322;
    font-weight: 700;
    line-height: 1.6;
}

.wechat-tip {
    font-size: .24rem;
    color: #389e0d;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: .08rem;
    padding: .12rem .16rem;
    margin-bottom: .2rem;
}

/* ==========================================================================
   H5 特有：弹窗 / Toast / Loading / 底部操作栏 / tabBar
   ========================================================================== */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: .2rem;
    max-width: 750px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: .16rem .24rem calc(.16rem + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -.02rem .12rem rgba(0,0,0,.06);
}

.toast {
    position: fixed;
    left: 50%;
    top: 45%;
    z-index: 999;
    transform: translate(-50%,-50%) scale(.9);
    max-width: 5.4rem;
    padding: .24rem .36rem;
    background: rgba(0,0,0,.8);
    border-radius: .12rem;
    color: #fff;
    font-size: .26rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.toast.is-show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-mask.is-show { display: flex; }

.modal-box {
    width: 86%;
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border-radius: .16rem;
    padding: .3rem;
    box-sizing: border-box;
}

.modal-title { font-size: .32rem; font-weight: 700; text-align: center; margin-bottom: .2rem; }
/* 弹框正文：网盘地址与提取码可能很长，必须允许换行，否则会横向溢出 */
.modal-tip {
    font-size: .26rem;
    color: #555;
    text-align: center;
    margin-bottom: .2rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 56vh;
    overflow-y: auto;
}
.modal-btns { display: flex; gap: .16rem; margin-top: .24rem; }
.modal-btns .btn { flex: 1; }

.modal-input,
.form-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: .08rem;
    padding: .14rem .16rem;
    font-family: inherit;
    font-size: .28rem;
    color: #333;
    outline: none;
}

.modal-input:focus,
.form-input:focus { border-color: #1677ff; }
.form-row { margin-bottom: .2rem; }
.form-label { display: block; font-size: .26rem; color: #555; margin-bottom: .08rem; }
.modal-actions { display: flex; gap: .16rem; margin-top: .2rem; }
.modal-actions .btn { flex: 1; }

.pay-select { display: flex; gap: .16rem; }

.pay-opt {
    flex: 1;
    text-align: center;
    padding: .14rem 0;
    border: 1px solid #e0e0e0;
    border-radius: .08rem;
    font-size: .28rem;
    color: #666;
    cursor: pointer;
}

.pay-opt-on { border-color: #1677ff; color: #1677ff; background: #e6f4ff; }

.qr-upload {
    width: 2rem;
    height: 2rem;
    border: 2px dashed #ccc;
    border-radius: .12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    cursor: pointer;
}

.qr-placeholder { font-size: .24rem; color: #999; text-align: center; padding: 0 .1rem; }
.qr-preview { width: 100%; height: 100%; border-radius: .12rem; }

.loading-mask {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
}

.loading-mask.is-show { display: flex; }

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .36rem .48rem;
    background: rgba(0,0,0,.78);
    border-radius: .16rem;
    color: #fff;
    font-size: .26rem;
}

.loading-spinner {
    width: .56rem;
    height: .56rem;
    margin-bottom: .16rem;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 底部 tabBar（与 pages.json 四项一致） ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: none;
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #f0f1f5;
    padding-bottom: env(safe-area-inset-bottom);
}

.tabbar.is-show { display: flex; }

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 1rem;
    cursor: pointer;
    color: #7a7e83;
    font-size: .2rem;
    transition: color .2s;
}

.tabbar-item.is-active { color: #1677ff; font-weight: 600; }
.tabbar-icon { font-size: .4rem; line-height: 1.1; }
