/* ==========================================================================
   伟根会员系统 — 基础样式（H5 优先 / 自适应 PC）
   ========================================================================== */

:root {
    /* ---- 主色：深靛蓝，配金色点缀，体现稳重与档次 ---- */
    --brand: #2b5cff;
    --brand-dark: #1b3fd0;
    --brand-light: #edf2ff;
    --brand-2: #6d8bff;
    --gold: #c99a3f;
    --gold-2: #e3bf7a;
    --gold-light: #fdf7ea;
    --success: #10a15c;
    --success-light: #e6f8ef;
    --danger: #e0453f;
    --danger-light: #fdecea;
    --warning: #d99416;
    --warning-light: #fdf6e6;
    --text: #16203a;
    --text-2: #56617a;
    --text-3: #8a94a8;
    --line: #e8ecf4;
    --line-2: #f1f4fa;
    --line-strong: #d7deee;
    --bg: #f5f7fc;
    --card: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow: 0 1px 2px rgba(22, 32, 58, .04), 0 4px 16px rgba(22, 32, 58, .05);
    --shadow-md: 0 2px 6px rgba(22, 32, 58, .06), 0 10px 28px rgba(22, 32, 58, .08);
    --shadow-lg: 0 12px 48px rgba(22, 32, 58, .14);
    --header-h: 58px;
    --tabbar-h: 62px;
    --max-w: 1180px;
    --font-num: "SF Pro Display", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; vertical-align: middle; border: 0; }
h1, h2, h3, h4, h5 { margin: 0 0 .6em; font-weight: 600; line-height: 1.35; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0 0 .8em; padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.bold { font-weight: 600; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt0 { margin-top: 0 !important; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0 !important; }
.mb8 { margin-bottom: 8px; }
.mb16 { margin-bottom: 16px; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 12px; }
.row { display: flex; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; }
.center { display: flex; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------------- 顶部栏 */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center;
    padding: 0 14px;
}
.site-header .brand {
    display: flex; align-items: center; gap: 9px;
    font-size: 16px; font-weight: 700; color: var(--text);
    letter-spacing: -.3px; min-width: 0;
}
.site-header .brand > span:last-child {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-header .brand .logo {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(43, 92, 255, .32);
}
.site-header .nav-links { display: none; margin-left: 28px; gap: 3px; }
.site-header .nav-links a {
    padding: 7px 13px; border-radius: 9px; color: var(--text-2); font-size: 14px;
    transition: background .14s, color .14s;
}
.site-header .nav-links a:hover { background: var(--brand-light); color: var(--brand); }
.site-header .nav-links a.active { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.site-header .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- 底部 Tab */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: var(--tabbar-h);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line);
    display: flex; padding-bottom: env(safe-area-inset-bottom, 0);
}
.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;
    transition: color .14s;
}
.tabbar a .ico { font-size: 20px; line-height: 1; transition: transform .16s; }
.tabbar a.active { color: var(--brand); font-weight: 600; }
.tabbar a.active .ico { transform: translateY(-1px); }
.tabbar a.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 2.5px; border-radius: 0 0 3px 3px; background: var(--brand);
}
.page-has-tab { padding-bottom: calc(var(--tabbar-h) + 14px); }

/* ---------------------------------------------------------------- 卡片 */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(22, 32, 58, .045);
    margin-bottom: 14px;
    overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 15px 17px; border-bottom: 1px solid var(--line-2);
    font-weight: 650; font-size: 15px; letter-spacing: -.1px;
}
.card-head .more { font-size: 13px; font-weight: 400; color: var(--text-3); white-space: nowrap; }
.card-head .more:hover { color: var(--brand); }
.card-body { padding: 16px 17px; }
.card-body.tight { padding: 10px 17px; }
.card-body.flush { padding: 0; }

/* 小节标题：用于页面内分区，分类更清晰 */
.section-title {
    display: flex; align-items: center; gap: 8px;
    margin: 20px 2px 10px; font-size: 13px; font-weight: 650;
    color: var(--text-2); letter-spacing: .2px;
}
.section-title::before {
    content: ''; width: 3px; height: 13px; border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.section-title .count { font-weight: 400; color: var(--text-3); font-size: 12px; }
/* 标题行右侧带操作按钮（如「全部展开」） */
.section-title.between { justify-content: space-between; }
.section-title.between > span { display: flex; align-items: center; gap: 8px; }
.section-title.between > span::before {
    content: ''; width: 3px; height: 13px; border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.section-title.between::before { display: none; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 18px;
    border: 1px solid transparent; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
    font-size: 14px; font-weight: 550; line-height: 1; letter-spacing: .1px;
    cursor: pointer; transition: box-shadow .16s, transform .1s, filter .16s; white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(43, 92, 255, .22);
}
.btn:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 4px 14px rgba(43, 92, 255, .3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-lg { height: 47px; font-size: 15.5px; border-radius: 13px; }
.btn-sm { height: 33px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-xs { height: 27px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-light); color: var(--brand); box-shadow: none; }
.btn-gray { background: #fff; color: var(--text-2); border-color: var(--line); box-shadow: none; }
.btn-gray:hover { background: #f6f8fc; color: var(--text); border-color: #d8dfec; box-shadow: none; }
.btn-success { background: linear-gradient(135deg, #17b06b, #0d8e50); box-shadow: 0 2px 8px rgba(16, 161, 92, .24); }
.btn-success:hover { box-shadow: 0 4px 14px rgba(16, 161, 92, .32); }
.btn-danger { background: linear-gradient(135deg, #ef544e, #cc332d); box-shadow: 0 2px 8px rgba(224, 69, 63, .24); }
.btn-danger:hover { box-shadow: 0 4px 14px rgba(224, 69, 63, .32); }
.btn-warning { background: linear-gradient(135deg, #d9a63f, #b8842b); box-shadow: 0 2px 8px rgba(201, 154, 63, .24); }
.btn-link { background: none; border: none; color: var(--brand); padding: 0 4px; height: auto; cursor: pointer; box-shadow: none; }
.btn-link:hover { background: none; text-decoration: underline; box-shadow: none; }

/* ---------------------------------------------------------------- 表单 */
.form-item { margin-bottom: 14px; }
.form-item > label {
    display: block; margin-bottom: 6px;
    font-size: 13px; color: var(--text-2); font-weight: 500;
}
.form-item .tip { margin-top: 5px; font-size: 12px; color: var(--text-3); }
/* 快捷金额按钮组（奖金转积分等） */
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-row .btn { min-width: 64px; }
/* 小工具类：卡片脚部 / 小号输入框 / 卡片头内联表单 / 左间距 */
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.input-sm { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form .input { width: auto; min-width: 140px; }
.ml8 { margin-left: 8px; }
.input, .select, .textarea {
    display: block; width: 100%; height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--text);
    transition: .16s; outline: none;
    -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.input:disabled, .input[readonly] { background: #f7f8fb; color: var(--text-2); }
.select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238b95a4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.input-group .btn { flex: 0 0 auto; }
.form-row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.form-row > .form-item { flex: 1 1 220px; min-width: 0; }

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

.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label, .check-group label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; font-size: 14px; background: #fff; margin: 0;
}
.radio-group input, .check-group input { margin: 0; }
.radio-group label.on, .check-group label.on {
    border-color: var(--brand); background: var(--brand-light); color: var(--brand); font-weight: 600;
}

/* ---------------------------------------------------------------- 提示 */
.alert {
    padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
    font-size: 13px; line-height: 1.5;
}
.alert-info { background: var(--brand-light); color: #1c4fd8; }
.alert-success { background: var(--success-light); color: #0f7a37; }
.alert-error { background: var(--danger-light); color: #b32b28; }
.alert-warning { background: var(--warning-light); color: #925f0c; }

.badge {
    display: inline-block; padding: 1px 8px; border-radius: 20px;
    font-size: 12px; line-height: 18px; font-weight: 500;
    background: #eef1f6; color: var(--text-2);
}
.badge-brand { background: var(--brand-light); color: var(--brand); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #96630d; }
.badge-gold { background: var(--gold-light); color: var(--gold); }

/* ---------------------------------------------------------------- 数据 */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
    background: #fff; border-radius: 14px; padding: 14px 15px;
    box-shadow: var(--shadow); border: 1px solid rgba(22, 32, 58, .045);
    position: relative; overflow: hidden;
    transition: transform .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat .label { font-size: 12px; color: var(--text-3); margin-bottom: 5px; letter-spacing: .1px; }
.stat .value {
    font-size: 21px; font-weight: 700; color: var(--text); line-height: 1.2;
    font-family: var(--font-num); letter-spacing: -.6px;
    font-variant-numeric: tabular-nums;
}
.stat .value.sm { font-size: 16px; letter-spacing: -.3px; }
.stat .sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.stat.accent { background: linear-gradient(140deg, #f7f9ff, #eef3ff); border-color: #dde6ff; }
.stat.accent .value { color: var(--brand-dark); }
.stat.gold { background: linear-gradient(140deg, #fffdf7, #fdf5e4); border-color: #f2e3c4; }
.stat.gold .value { color: #a9772a; }

.wallet {
    background: linear-gradient(135deg, #2b5cff 0%, #1a3bb5 55%, #152e8f 100%);
    border-radius: 18px; padding: 20px; color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(26, 59, 181, .3);
}
.wallet::after {
    content: ''; position: absolute; right: -50px; top: -60px;
    width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.wallet::before {
    content: ''; position: absolute; right: 30px; bottom: -70px;
    width: 140px; height: 140px; border-radius: 50%; background: rgba(201, 154, 63, .18);
}
.wallet .w-label { font-size: 12px; opacity: .78; letter-spacing: .3px; }
.wallet .w-value {
    font-size: 32px; font-weight: 700; letter-spacing: -1px; margin: 4px 0 12px;
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    position: relative; z-index: 1;
}
.wallet .w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.wallet .w-grid .item { background: rgba(255, 255, 255, .13); border-radius: 11px; padding: 9px 11px; }
.wallet .w-grid .item .k { font-size: 11px; opacity: .8; }
.wallet .w-grid .item .v { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: 13px; }
.table th, .table td {
    padding: 11px 13px; text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--line-2);
}
.table th {
    background: #f8fafd; color: var(--text-3); font-weight: 600; font-size: 11.5px;
    letter-spacing: .3px; text-transform: uppercase;
}
.table td { font-variant-numeric: tabular-nums; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .empty { text-align: center; color: var(--text-3); padding: 34px 0; }
.table-actions { display: flex; gap: 6px; }
.table.compact th, .table.compact td { padding: 8px 10px; font-size: 12.5px; }

.empty-state { text-align: center; padding: 44px 16px; color: var(--text-3); }
.empty-state .ico { font-size: 36px; margin-bottom: 10px; opacity: .45; }

/* ------------------------------------------------- 记录列表（可展开明细） */
/*
 * 手机端不再需要左右拖动看全一行的 8 列。
 * 每条记录一行摘要，点右侧箭头展开完整明细。
 */
.rec-list { list-style: none; margin: 0; padding: 0; }

.rec {
    border-bottom: 1px solid var(--line-2);
}
.rec:last-child { border-bottom: 0; }

.rec-main {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 13px 15px;
    background: none; border: 0; text-align: left;
    font: inherit; color: inherit; cursor: pointer;
    transition: background .14s;
}
.rec-main:hover { background: #fafbfe; }
.rec.open > .rec-main { background: var(--brand-light); }

/* 左侧图标：按奖种/类型着色 */
.rec-ico {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1;
    background: var(--brand-light); color: var(--brand);
}
.rec-ico.tj { background: #eaf1ff; color: #2b5cff; }
.rec-ico.dp { background: #fff1e8; color: #e07a2b; }
.rec-ico.bt { background: #eef7e9; color: #4b9e33; }
.rec-ico.hz { background: #fdeaf4; color: #d4479a; }
.rec-ico.jd { background: #e8f6fb; color: #1f8db5; }
.rec-ico.bd { background: #f0ecfd; color: #6d4bd8; }
.rec-ico.fh { background: var(--gold-light); color: var(--gold); }
.rec-ico.buy { background: var(--success-light); color: var(--success); }
.rec-ico.sell { background: var(--danger-light); color: var(--danger); }
.rec-ico.split { background: var(--gold-light); color: var(--gold); }

.rec-body { flex: 1 1 auto; min-width: 0; }
.rec-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 600; color: var(--text);
    line-height: 1.4;
}
.rec-title .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    margin-top: 3px; font-size: 12px; color: var(--text-3);
}
.rec-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #ccd4e2; flex: 0 0 auto; }

.rec-amount {
    flex: 0 0 auto; text-align: right; font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
}
.rec-amount .n { font-size: 16px; font-weight: 700; letter-spacing: -.4px; }
.rec-amount .n.pos { color: var(--success); }
.rec-amount .n.neg { color: var(--danger); }
.rec-amount .n.mute { color: var(--text-2); }
.rec-amount .t { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* 箭头按钮 */
.rec-arrow {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f1f4fa; color: var(--text-3);
    transition: transform .22s, background .16s, color .16s;
}
.rec-arrow svg { width: 13px; height: 13px; display: block; }
.rec-main:hover .rec-arrow { background: #e3e9f6; color: var(--text-2); }
.rec.open .rec-arrow {
    transform: rotate(180deg);
    background: var(--brand); color: #fff;
}

/* 展开区 */
.rec-detail {
    display: none;
    padding: 0 15px 14px 65px;
    animation: recIn .2s ease;
}
.rec.open .rec-detail { display: block; }
@keyframes recIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.rec-dl {
    display: grid; grid-template-columns: auto 1fr;
    gap: 0; margin: 0;
    background: #fafbfe; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--line-2);
}
.rec-dl > dt {
    padding: 9px 14px; font-size: 12.5px; color: var(--text-3);
    border-bottom: 1px solid var(--line-2); background: #f7f9fd;
    white-space: nowrap;
}
.rec-dl > dd {
    margin: 0; padding: 9px 14px; font-size: 13px; text-align: right;
    border-bottom: 1px solid var(--line-2);
    font-variant-numeric: tabular-nums;
}
.rec-dl > dt:nth-last-of-type(1) { border-bottom: 0; }
.rec-dl > dd:last-of-type { border-bottom: 0; }
.rec-dl dd .deduct { color: var(--warning); }
.rec-dl dd .final { color: var(--success); font-weight: 700; font-size: 14px; }

/* 手续费合计条 */
.rec-sum {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; padding: 9px 14px; border-radius: 10px;
    background: #fff; border: 1px dashed var(--line);
    font-size: 12.5px; color: var(--text-2);
}
.rec-sum b { font-family: var(--font-num); font-size: 15px; color: var(--success); }

/* 桌面端：仍保留表格，但列更少更整齐 */
.rec-table-desktop { display: none; }

/* ============ 后台：奖金明细「来龙去脉」展开区 ============ */
tr.bonus-detail-row > td.bonus-detail-cell {
    padding: 0 !important;
    background: #f7f9fd;
    border-top: 0;
}
.bonus-flow { padding: 12px 16px 14px; }
.bonus-flow-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding-bottom: 8px; margin-bottom: 8px;
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px; color: var(--text-2);
}
.bonus-flow-head .mono { font-family: var(--font-num); color: var(--text-3); }
.bonus-dl {
    display: grid; grid-template-columns: 160px 1fr;
    gap: 0; margin: 0; font-size: 12.5px;
}
.bonus-dl > dt, .bonus-dl > dd {
    margin: 0; padding: 6px 10px;
    border-bottom: 1px solid #eef2f9;
}
.bonus-dl > dt { color: var(--text-2); background: #fff; font-weight: 500; }
.bonus-dl > dd { color: var(--text); word-break: break-word; }
.bonus-dl > dt.basis, .bonus-dl > dd.basis {
    background: #fbfcff; color: var(--text-3); font-size: 11.5px;
    padding-top: 3px; padding-bottom: 3px;
}
.bonus-dl > dt.basis { padding-left: 22px; font-weight: 400; }
.bonus-dl > dt.award { color: var(--success); }
.bonus-dl > dd.award { color: var(--success); font-weight: 600; font-family: var(--font-num); }
.bonus-dl > dt.deduct { color: var(--warning); }
.bonus-dl > dd.deduct { color: var(--warning); font-weight: 600; font-family: var(--font-num); }
.bonus-dl > dt.subtotal, .bonus-dl > dd.subtotal {
    background: #fff; font-weight: 600; border-top: 1px solid var(--line);
}
.bonus-dl > dt.final, .bonus-dl > dd.final {
    background: #f2fbf5; font-weight: 700; color: var(--success);
    font-size: 14px; font-family: var(--font-num);
}
.bonus-dl > dt.member, .bonus-dl > dd.member { background: #fff; }
.bonus-flow-sum {
    margin-top: 10px; padding: 8px 12px; border-radius: 10px;
    background: #fff; border: 1px dashed var(--line);
    font-size: 12.5px; color: var(--text-2); font-family: var(--font-num);
}
.bonus-flow-loading { padding: 14px 16px; font-size: 12.5px; color: var(--text-3); }
[data-bonus-detail].is-open { border-color: var(--brand); color: var(--brand); }
tr.row-expandable { cursor: pointer; }
tr.row-expandable:hover > td { background: #fbfcff; }
tr.row-expandable.is-open-bonus > td { background: #f2f7ff; }
tr.row-expandable .col-ops, tr.row-expandable .col-chk { cursor: default; }
@media (max-width: 759px) {
    .bonus-dl { grid-template-columns: 1fr; }
    .bonus-dl > dt { border-bottom: 0; padding-bottom: 0; background: transparent; }
    .bonus-dl > dd { padding-top: 2px; }
}

@media (min-width: 760px) {
    .rec-detail { padding-left: 68px; }
    .rec-dl { grid-template-columns: auto 1fr auto 1fr; }
    .rec-dl > dt { background: #f7f9fd; }
}

.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 0; }
.pager a, .pager .current, .pager .dots {
    min-width: 32px; height: 32px; padding: 0 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
    font-size: 13px; color: var(--text-2);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .dots { border-color: transparent; }
.pager-info { margin-left: auto; font-size: 12px; color: var(--text-3); }

/* ---------------------------------------------------------------- 列表 */
.list { margin: 0; padding: 0; list-style: none; }
.list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item .ico {
    width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    background: var(--brand-light); color: var(--brand);
}
.list-item .main { flex: 1 1 auto; min-width: 0; }
.list-item .title { font-size: 14px; font-weight: 500; }
.list-item .desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.list-item .val { text-align: right; font-variant-numeric: tabular-nums; }
.list-item .val .n { font-size: 15px; font-weight: 600; }
.list-item .val .t { font-size: 12px; color: var(--text-3); }
.list-item .arrow { color: #c4ccd8; font-size: 16px; }
.list-item a { color: inherit; }

.grid-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 6px; }
.grid-menu a {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 11px 4px; border-radius: 12px; color: var(--text); font-size: 12px;
    transition: background .14s;
}
.grid-menu a:active { background: #f3f6fb; }
.grid-menu .ico {
    width: 42px; height: 42px; border-radius: 13px; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light);
}

/* ---------------------------------------------------------------- 筛选标签 */
.filter-tabs {
    display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs a, .filter-tabs button {
    flex: 0 0 auto; padding: 7px 15px; border-radius: 20px;
    background: #fff; border: 1px solid var(--line);
    font-size: 13px; color: var(--text-2); white-space: nowrap;
    cursor: pointer; font-family: inherit; transition: .14s;
}
.filter-tabs a:hover, .filter-tabs button:hover { border-color: var(--brand); color: var(--brand); }
.filter-tabs a.on, .filter-tabs button.on {
    background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 550;
    box-shadow: 0 3px 10px rgba(43, 92, 255, .25);
}
.filter-tabs .n { opacity: .65; font-size: 11.5px; margin-left: 2px; }

/* ---------------------------------------------------------------- 汇总条 */
.sum-bar {
    display: flex; flex-wrap: wrap; gap: 1px;
    background: var(--line-2); border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(22, 32, 58, .045);
    box-shadow: var(--shadow);
}
.sum-bar .item {
    flex: 1 1 30%; min-width: 104px; background: #fff; padding: 13px 15px;
}
.sum-bar .item .k { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.sum-bar .item .v {
    font-size: 17px; font-weight: 700; letter-spacing: -.4px;
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
}
.sum-bar .item .v.pos { color: var(--success); }
.sum-bar .item .v.deduct { color: var(--warning); font-size: 15px; }

/* 变动前 / 变动后：同组两列用底色区分，一眼看出「从多少变到多少」 */
.th-bal { background: #f7f9fd; }
.bal {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bal.before {
    color: var(--text-2); background: #f1f4fa;
    padding: 2px 7px; border-radius: 6px;
}
.bal.after {
    color: var(--brand); font-weight: 700; background: #eef4ff;
    padding: 2px 7px; border-radius: 6px;
}

/* 导出提示条：点导出后出现，告诉用户「已经开始了」+ 兜底直链 */
.export-hint {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 14px; padding: 11px 14px;
    background: linear-gradient(180deg, #f2f8f4, #eaf5ee);
    border: 1px solid #cbe7d6; border-radius: 12px;
    color: #1d6b3f; font-size: 13px; line-height: 1.65;
    animation: eh-in .28s ease-out;
}
.export-hint[hidden] { display: none; }
@keyframes eh-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
.export-hint .eh-ico {
    flex: none; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center;
    background: #d7ecdf; color: #1d6b3f; font-size: 13px; font-weight: 700;
}
.export-hint .eh-body { flex: 1 1 auto; min-width: 0; }
.export-hint b { font-weight: 700; }
.export-hint .eh-tip { color: #3c7a58; }
.export-hint kbd {
    display: inline-block; padding: 1px 5px; margin: 0 1px;
    font-family: var(--font-num); font-size: 11px; line-height: 1.5;
    background: #fff; border: 1px solid #c3ddcd; border-bottom-width: 2px;
    border-radius: 4px; color: #2c6c47;
}
.export-hint a { color: #1a6be0; text-decoration: underline; }
.export-hint .eh-close {
    flex: none; width: 22px; height: 22px; padding: 0;
    border: 0; border-radius: 50%; cursor: pointer;
    background: transparent; color: #5d8f72; font-size: 17px; line-height: 1;
}
.export-hint .eh-close:hover { background: #dcefe3; color: #1d6b3f; }
@media (max-width: 639px) {
    .export-hint { font-size: 12px; padding: 10px 12px; }
    .export-hint .eh-tip { display: block; margin-top: 2px; }
}

/* ---------------------------------------------------------------- 账务管理台账 */
.ledger-nav {
    display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 12px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.ledger-nav::-webkit-scrollbar { height: 5px; }
.ledger-nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.ledger-nav a {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 9px 14px; border-radius: 11px; background: #fff; color: var(--text-2);
    font-size: 13px; font-weight: 600; border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(22, 32, 58, .04); transition: .16s;
}
.ledger-nav a .ico { font-size: 13px; opacity: .75; }
.ledger-nav a:hover { color: var(--brand); border-color: #c7d5ff; background: #f8faff; }
.ledger-nav a.on {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(43, 92, 255, .28);
}
.ledger-nav a.on .ico { opacity: .95; }

.bulk-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
    padding: 11px 15px; margin: 0 0 12px;
    background: #f7f9fe; border: 1px solid var(--line); border-radius: 12px;
}
.bulk-bar .chk-all {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none;
}
.bulk-bar .chk-all input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.table-ledger { min-width: 900px; }
.table-ledger th { white-space: nowrap; }
.table-ledger th a {
    display: inline-flex; align-items: center; gap: 4px;
    color: inherit; text-decoration: none;
}
.table-ledger th a:hover { color: var(--brand); }
.table-ledger .s-ico {
    font-size: 10px; color: var(--text-3); opacity: .55; line-height: 1;
}
.table-ledger .s-ico.on { color: var(--brand); opacity: 1; font-weight: 700; }
.table-ledger .col-chk { width: 38px; padding-left: 14px; }
.table-ledger .col-chk input {
    width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle;
}
.table-ledger .col-ops { width: 1%; white-space: nowrap; }
.table-ledger tbody tr:hover { background: #fafbff; }

.table-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px; padding: 11px 15px; border-top: 1px solid var(--line-2);
}

/* 空态里的跳转链接 */
.empty-links {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px;
}
.empty-links a {
    padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
    font-size: 12.5px; color: var(--brand); text-decoration: none; font-weight: 600;
}
.empty-links a:hover { background: var(--brand-light); border-color: #c7d5ff; }
.mt8 { margin-top: 8px; }
.mt10 { margin-top: 10px; }

/* ---------------------------------------------------------------- 排位树增强 */
.tree-filter { grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; }
.tree-body { padding: 10px 6px 20px; overflow-x: auto; }

/* 搜索定位高亮 */
.tnode.focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(43, 92, 255, .22), var(--shadow);
    animation: focusPulse 1.4s ease-out 2;
}
@keyframes focusPulse {
    0%   { box-shadow: 0 0 0 2px rgba(43, 92, 255, .55), var(--shadow); }
    70%  { box-shadow: 0 0 0 10px rgba(43, 92, 255, 0), var(--shadow); }
    100% { box-shadow: 0 0 0 3px rgba(43, 92, 255, .22), var(--shadow); }
}

/* 根节点角标 */
.tnode .tn-flag {
    position: absolute; top: -8px; right: -8px;
    padding: 1px 7px; border-radius: 20px;
    background: var(--gold); color: #fff; font-size: 10.5px; font-weight: 700;
    box-shadow: 0 2px 6px rgba(201, 154, 63, .35);
}
.tnode { position: relative; }

/* 空位：注册占位 */
.tnode.slot {
    background: transparent; border: 1px dashed var(--line-strong);
    box-shadow: none; padding: 0;
}
.tnode.slot:hover { border-color: var(--brand); background: var(--brand-light); box-shadow: none; }
.tnode.slot .tn-add {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    width: 100%; min-height: 62px; padding: 8px 12px;
    background: none; border: 0; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--text-3); font-family: inherit;
}
.tnode.slot .tn-add:hover { color: var(--brand); }
.tnode.slot .tn-add .plus {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 700;
    transition: .16s;
}
.tnode.slot .tn-add:hover .plus { background: var(--brand); color: #fff; }

/* 弹窗表单小字 */
.hint { color: var(--text-3); font-size: 11.5px; line-height: 1.55; }
.form-grid .fld.full { grid-column: 1 / -1; }

@media (max-width: 959px) {
    .tree-filter { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 640px) {
    .tree-filter { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 登录/注册 */
.auth-page { min-height: 100vh; background: linear-gradient(160deg, #2f6bff 0%, #1b3fb0 100%); padding: 0 0 30px; }
.auth-hero { padding: 46px 24px 26px; color: #fff; text-align: center; }
.auth-hero .logo-lg {
    width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 18px;
    background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700;
}
.auth-hero h1 { font-size: 21px; color: #fff; margin-bottom: 4px; }
.auth-hero p { font-size: 13px; opacity: .85; margin: 0; }
.auth-card {
    margin: 0 16px; background: #fff; border-radius: 18px; padding: 20px 18px;
    box-shadow: var(--shadow-lg);
}
.auth-card .seg {
    display: flex; background: #f2f4f8; border-radius: 10px; padding: 3px; margin-bottom: 18px;
}
.auth-card .seg a {
    flex: 1; text-align: center; padding: 7px 0; border-radius: 8px;
    font-size: 14px; color: var(--text-2);
}
.auth-card .seg a.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: rgba(255, 255, 255, .7); }

.level-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.level-card {
    position: relative; border: 1px solid var(--line); border-radius: 12px;
    padding: 12px; cursor: pointer; transition: .16s; background: #fff;
}
.level-card.on { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 2px rgba(47, 107, 255, .12); }
.level-card .n { font-size: 15px; font-weight: 600; }
.level-card .p { font-size: 16px; font-weight: 700; color: var(--danger); margin: 4px 0; }
.level-card .d { font-size: 11px; color: var(--text-3); line-height: 1.5; }
.level-card .tag { position: absolute; right: 8px; top: 8px; }

/* ---------------------------------------------------------------- 首页 */
.hero {
    background: linear-gradient(160deg, #2f6bff, #1b3fb0);
    color: #fff; padding: 38px 20px 66px; text-align: center;
}
.hero h1 { font-size: 25px; color: #fff; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: .9; margin-bottom: 18px; }
.hero .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero .btn { background: #fff; color: var(--brand); }
.hero .btn:hover { background: #f0f4ff; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.hero-cards { margin-top: -46px; position: relative; z-index: 2; }
.feature { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feature:last-child { border-bottom: 0; }
.feature .ico {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    background: var(--brand-light); color: var(--brand);
}
.feature h4 { margin: 0 0 2px; font-size: 14px; }
.feature p { margin: 0; font-size: 12px; color: var(--text-3); }
.plan-table td, .plan-table th { text-align: center; }
.plan-table td:first-child, .plan-table th:first-child { text-align: left; }

/* ---------------------------------------------------------------- 后台 */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
    width: 224px; flex: 0 0 auto;
    background: linear-gradient(180deg, #131b2e 0%, #182338 100%);
    color: #a8b4c8;
    display: flex; flex-direction: column;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04);
}
.admin-side .logo {
    height: var(--header-h); display: flex; align-items: center; gap: 10px;
    padding: 0 18px; font-weight: 700; color: #fff; font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    letter-spacing: -.2px;
}
.admin-side .logo .badge-l {
    width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    box-shadow: 0 2px 8px rgba(43, 92, 255, .4);
}
.admin-nav { padding: 10px 10px 20px; overflow-y: auto; flex: 1 1 auto; }
.admin-nav .group {
    padding: 16px 12px 7px; font-size: 10.5px; color: #5c6b84;
    letter-spacing: 1.2px; font-weight: 600; text-transform: uppercase;
}
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 9px; color: #a8b4c8; font-size: 13.5px;
    margin-bottom: 2px; transition: background .14s, color .14s;
    position: relative;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav a.active {
    background: linear-gradient(90deg, rgba(43, 92, 255, .95), rgba(43, 92, 255, .7));
    color: #fff; font-weight: 550;
    box-shadow: 0 3px 12px rgba(43, 92, 255, .3);
}
.admin-nav a .ico { width: 18px; text-align: center; flex: 0 0 auto; font-size: 14px; }
.admin-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
    height: var(--header-h); background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; padding: 0 20px; gap: 12px;
    position: sticky; top: 0; z-index: 40;
}
.admin-top .title { font-size: 15.5px; font-weight: 650; letter-spacing: -.2px; }
.admin-top .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; }
.admin-content { padding: 20px; flex: 1 1 auto; max-width: 1560px; width: 100%; }
.admin-menu-btn { display: none; }

/* 页面顶栏：标题 + 说明 + 右侧操作 */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h1 {
    font-size: 20px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.4px;
}
.page-head .desc { font-size: 13px; color: var(--text-3); margin: 0; }
.page-head .ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.panel {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    border: 1px solid rgba(22, 32, 58, .045); margin-bottom: 16px; overflow: hidden;
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--line-2);
    font-weight: 650; font-size: 14.5px;
}
.panel-head .ops { display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { height: 36px; width: auto; min-width: 150px; }

.param-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.param-row:last-child { border-bottom: 0; }
.param-row .label { flex: 1 1 auto; min-width: 0; }
.param-row .label .n { font-size: 13.5px; font-weight: 500; }
.param-row .label .h { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.param-row .ctrl { flex: 0 0 190px; display: flex; justify-content: flex-end; }
.param-row .ctrl .input, .param-row .ctrl .select { height: 36px; text-align: right; }
.param-row .ctrl .input.percent { text-align: right; }
.param-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.param-tabs a {
    padding: 6px 13px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
    font-size: 13px; color: var(--text-2);
}
.param-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.admin-login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #1e2733, #2b3a4d); padding: 20px;
}
.admin-login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 28px 24px; box-shadow: var(--shadow-lg); }
.admin-login-card h1 { font-size: 19px; text-align: center; margin-bottom: 4px; }
.admin-login-card .sub { text-align: center; color: var(--text-3); font-size: 12.5px; margin-bottom: 22px; }

/* ---------------------------------------------------------------- Toast */
#qsd-toast {
    position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.94);
    z-index: 9999; max-width: 80vw; padding: 12px 18px; border-radius: 10px;
    background: rgba(28, 34, 44, .92); color: #fff; font-size: 14px; line-height: 1.5;
    text-align: center; opacity: 0; pointer-events: none; transition: .22s;
    word-break: break-word;
}
#qsd-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#qsd-toast.ok { background: rgba(22, 163, 74, .95); }
#qsd-toast.err { background: rgba(224, 65, 62, .95); }

/* ---------------------------------------------------------------- 响应式 */
@media (min-width: 640px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
    .grid-menu { grid-template-columns: repeat(4, 1fr); }
    .level-cards { grid-template-columns: repeat(4, 1fr); }
    .site-header .nav-links { display: flex; }
    .rec-meta { gap: 4px 12px; }
}

@media (min-width: 960px) {
    body { font-size: 14px; }
    .wrap { padding: 0 20px; }
    .page-has-tab { padding-bottom: 24px; }
    .tabbar { display: none; }
    .grid-menu { grid-template-columns: repeat(8, 1fr); }
    .site-header { padding: 0 20px; }
    .auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
    .auth-wrap { display: flex; gap: 60px; align-items: center; max-width: 900px; }
    .auth-hero { text-align: left; padding: 0; width: 360px; }
    .auth-hero .logo-lg { margin: 0 0 16px; }
    .auth-card { margin: 0; width: 380px; }
    .hero { padding: 60px 20px 90px; }
    .hero h1 { font-size: 32px; }
    .hero-cards { margin-top: -60px; }
    .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
    .cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
    .cols-2 > .card, .cols-3 > .card { margin-bottom: 0; }
    .admin-menu-btn { display: none; }
    .rec-main { padding: 14px 18px; }
    .rec-detail { padding: 0 18px 16px 68px; }
}

@media (max-width: 959px) {
    .admin-side {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
        transform: translateX(-100%); transition: transform .24s ease;
        box-shadow: 0 0 50px rgba(0, 0, 0, .35);
    }
    .admin-side.open { transform: none; }
    .admin-menu-btn { display: inline-flex; }
    .admin-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 99; display: none; backdrop-filter: blur(2px); }
    .admin-mask.show { display: block; }
    .admin-content { padding: 14px; }
    .param-row { flex-wrap: wrap; }
    .param-row .ctrl { flex: 1 0 100%; justify-content: flex-start; }
    .param-row .ctrl .input, .param-row .ctrl .select { text-align: left; }
    .page-head h1 { font-size: 18px; }
}

@media (max-width: 420px) {
    .rec-ico { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }
    .rec-detail { padding-left: 61px; padding-right: 12px; }
    .rec-amount .n { font-size: 15px; }
    .sum-bar .item { flex: 1 1 46%; min-width: 0; padding: 11px 13px; }
    .sum-bar .item .v { font-size: 15px; }
}

@media print {
    .site-header, .tabbar, .admin-side, .admin-top, .btn, .pager, .filter-tabs { display: none !important; }
    body { background: #fff; }
    .card, .panel { box-shadow: none; border: 1px solid #ddd; }
    .rec-detail { display: block !important; }
}

/* ==========================================================================
   后台会员列表 / 弹窗 / 筛选表单 / 树形图
   ========================================================================== */

/* ---- 通用小工具 ---- */
.mb12 { margin-bottom: 12px; }
.tiny { font-size: 11px; line-height: 1.5; }
.req { color: var(--danger); font-style: normal; }

/* ---- 筛选表单网格 ---- */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 16px;
    align-items: end;
}
.filter-grid .fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-grid .fld > span {
    font-size: 12px; font-weight: 600; color: var(--text-2);
    letter-spacing: .01em;
}
.filter-grid .fld .input,
.filter-grid .fld .select { width: 100%; }
.filter-grid .range { display: flex; align-items: center; gap: 6px; }
.filter-grid .range .input { min-width: 0; }
.filter-grid .range i { font-style: normal; color: var(--text-3); flex: 0 0 auto; }
.filter-grid .fld-ops { display: flex; gap: 8px; align-items: end; }

/* ---- 表单网格（弹窗内） ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}
.form-grid .fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-grid .fld > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-grid .fld-wide { grid-column: 1 / -1; }

/* ---- 页签上的计数 ---- */
.filter-tabs a .n {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    min-width: 20px;
    border-radius: 20px;
    background: var(--line-2);
    color: var(--text-3);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 18px;
    text-align: center;
}
.filter-tabs a.on .n { background: var(--brand-light); color: var(--brand); }

/* ---- 会员表格 ---- */
.table-users { min-width: 1580px; }
.table-users th { white-space: nowrap; }
.table-users th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.table-users th a:hover { color: var(--brand); }
.table-users .s-ico { font-size: 10px; color: var(--text-3); opacity: .55; }
.table-users .s-ico.on { color: var(--brand); opacity: 1; }
.table-users td { vertical-align: middle; }
.table-users tbody tr:hover { background: var(--brand-light); }
.table-users .col-ops { position: sticky; right: 0; background: var(--card); z-index: 1; }
.table-users tbody tr:hover .col-ops { background: var(--brand-light); }
.table-users .row-ops { display: flex; gap: 4px; flex-wrap: nowrap; }

/* ---- 状态胶囊按钮（点击切换） ---- */
.st {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid transparent;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
    background: var(--line-2);
    color: var(--text-3);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    white-space: nowrap;
}
.st:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(22, 32, 58, .12); }
.st:active { transform: none; }
.st.on { background: rgba(16, 161, 92, .12); color: var(--success); border-color: rgba(16, 161, 92, .25); }
.st.bad { background: rgba(224, 69, 63, .12); color: var(--danger); border-color: rgba(224, 69, 63, .25); }
.st.warn { background: rgba(217, 148, 22, .14); color: var(--warning); border-color: rgba(217, 148, 22, .28); }
.st.gold { background: rgba(201, 154, 63, .15); color: #a97c22; border-color: rgba(201, 154, 63, .3); }
.st.off { background: var(--line-2); color: var(--text-3); }

/* ---- 弹窗 ---- */
body.modal-open { overflow: hidden; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(16, 24, 42, .48);
    backdrop-filter: blur(3px);
    animation: modalFade .16s ease;
}
.modal[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalUp .2s cubic-bezier(.22, .8, .3, 1);
}
.modal-box.sm { max-width: 440px; }
@keyframes modalUp { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 700;
    flex: 0 0 auto;
}
.modal-x {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--text-3);
    cursor: pointer;
    padding: 0 2px;
}
.modal-x:hover { color: var(--text); }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; }
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 13px 20px;
    border-top: 1px solid var(--line);
    background: var(--bg);
    flex: 0 0 auto;
}

/* ---- 资产调整弹窗 ---- */
.asset-cur {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-light), #f7f9ff);
    border: 1px solid rgba(43, 92, 255, .14);
}
.asset-cur .k { font-size: 12px; color: var(--text-2); }
.asset-cur .v {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.quick-amounts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.quick-amounts button {
    flex: 1 1 auto;
    min-width: 58px;
    padding: 6px 4px;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: all .12s ease;
}
.quick-amounts button:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-light);
}

/* ---- 显示列面板 ---- */
.col-panel {
    position: fixed;
    top: 70px;
    right: 18px;
    z-index: 210;
    width: 210px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.col-panel[hidden] { display: none; }
.col-panel .cp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
}
.col-panel .cp-x { border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--text-3); }
.col-panel .cp-body { padding: 8px 12px 12px; overflow-y: auto; }
.col-panel .cp-body label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    font-size: 12.5px;
    color: var(--text-2);
    cursor: pointer;
}
.col-panel .cp-body label:hover { color: var(--brand); }
.btn.btn-on { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ==========================================================================
   制度开关总览（大开关卡片）
   ========================================================================== */
.sw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 12px;
}
.sw-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(22, 32, 58, .04);
    transition: all .16s ease;
}
.sw-card:hover { border-color: #c9d6f5; box-shadow: var(--shadow-md); }
.sw-card.on {
    border-color: rgba(43, 92, 255, .28);
    background: linear-gradient(180deg, #fff, #f8faff);
}
.sw-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.sw-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sw-state {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: .02em;
}
.sw-card.on .sw-state { color: var(--brand); }
.sw-impact {
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-2);
}
.sw-key {
    font-size: 10px;
    color: var(--text-3);
    opacity: .7;
    letter-spacing: .01em;
}

/* 大号开关 */
.switch-lg {
    flex: 0 0 auto;
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 26px;
    border: 0;
    background: #d6dceb;
    cursor: pointer;
    padding: 0;
    transition: background .18s ease;
}
.switch-lg .knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16, 24, 42, .28);
    transition: transform .18s cubic-bezier(.3, .9, .3, 1);
}
.switch-lg.on { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.switch-lg.on .knob { transform: translateX(20px); }
.switch-lg:disabled { opacity: .6; cursor: wait; }
.switch-lg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 640px) {
    .sw-grid { grid-template-columns: 1fr; }
}

/* ---- 以会员身份预览的提示条 ---- */
.imp-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #7a4b12, #a97c22);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 300;
}
.imp-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================================================
   会员排位树（自上而下组织图）
   ========================================================================== */
.tree-wrap {
    overflow-x: auto;
    padding: 26px 18px 34px;
    background:
        radial-gradient(circle at 1px 1px, rgba(43, 92, 255, .10) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(180deg, #fbfcff, #f6f8fd);
    border-radius: var(--radius-sm);
}
.tree { display: inline-block; min-width: 100%; text-align: center; }
.tree ul { display: flex; justify-content: center; gap: 0; padding: 0; margin: 0; list-style: none; position: relative; }
.tree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 6px; }
/* 连接线：竖 + 横 */
.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 26px;
    border-top: 2px solid var(--line-strong, #d7deee);
}
.tree li::before { right: 50%; border-right: 2px solid var(--line-strong, #d7deee); }
.tree li::after { left: 50%; border-left: 2px solid var(--line-strong, #d7deee); }
.tree li:only-child::before,
.tree li:only-child::after { display: none; }
.tree li:first-child::before,
.tree li:last-child::after { border: 0; }
.tree li:last-child::before { border-right: 2px solid var(--line-strong, #d7deee); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 26px;
    border-left: 2px solid var(--line-strong, #d7deee);
}
.tree > ul > li::before,
.tree > ul > li::after { display: none; }

.tnode {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 132px;
    padding: 9px 13px;
    margin-bottom: 26px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(22, 32, 58, .05);
    text-align: left;
    transition: all .14s ease;
}
.tnode:hover {
    border-color: var(--brand);
    box-shadow: 0 6px 18px rgba(43, 92, 255, .16);
    transform: translateY(-2px);
}
.tnode .tn-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.tnode .tn-name:hover { color: var(--brand); }
.tnode .tn-sub {
    font-size: 10.5px;
    color: var(--text-3);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tnode .tn-badges { display: flex; gap: 3px; margin-top: 2px; flex-wrap: wrap; }
.tnode .tn-badges .b {
    font-size: 9.5px;
    padding: 1px 5px;
    border-radius: 20px;
    background: var(--line-2);
    color: var(--text-3);
    line-height: 1.6;
}
.tnode .tn-badges .b.ok { background: rgba(16, 161, 92, .13); color: var(--success); }
.tnode .tn-badges .b.no { background: rgba(217, 148, 22, .15); color: var(--warning); }
.tnode .tn-badges .b.lock { background: rgba(224, 69, 63, .13); color: var(--danger); }
.tnode .tn-badges .b.bd { background: var(--brand-light); color: var(--brand); }
.tnode .tn-badges .b.fh { background: rgba(201, 154, 63, .16); color: #a97c22; }

/* 根节点高亮 */
.tnode.root {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(43, 92, 255, .3);
}
.tnode.root .tn-name,
.tnode.root .tn-sub { color: #fff; }
.tnode.root .tn-sub { opacity: .85; }
.tnode.root .tn-badges .b { background: rgba(255, 255, 255, .22); color: #fff; }

/* 空位 */
.tnode.empty {
    border-style: dashed;
    background: transparent;
    box-shadow: none;
    color: var(--text-3);
    font-size: 11px;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    opacity: .7;
}

/* 展开按钮 */
.tn-more {
    position: absolute;
    left: 50%;
    bottom: -32px;
    transform: translateX(-50%);
    z-index: 3;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--brand);
    background: var(--card);
    color: var(--brand);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .13s ease;
}
.tn-more:hover { background: var(--brand); color: #fff; }
.tn-more.loading { opacity: .5; pointer-events: none; }

/* 树形图例 */
.tree-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 14px;
    font-size: 11.5px;
    color: var(--text-2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.tree-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: -1px;
}

@media (max-width: 959px) {
    .filter-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .modal { padding: 12px; align-items: flex-end; }
    .modal-box { max-height: calc(100vh - 24px); }
    .col-panel { top: 60px; right: 10px; }
    .table-users .col-ops { position: static; }
}

@media (max-width: 640px) {
    .filter-grid { grid-template-columns: 1fr; }
    .tree-wrap { padding: 16px 10px 24px; }
    .tnode { min-width: 116px; padding: 7px 10px; }
}


/* ================================================================
   第 10 轮 · 前台整理
   1) 顶部导航改成「按功能分组的下拉」
   2) 团队 / 会员排位合并成一个页面的页内切换（.seg-tabs）
   3) 首页功能入口按分组排（.menu-groups）
   4) 资产明细按类型归类（.asset-grid / .asset-group）
   ================================================================ */

/* ---------------- 顶部：分组下拉 ---------------- */
.member-header { gap: 8px; }
.nav-groups { align-items: center; }
.nav-group { position: relative; }
.nav-group-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 12px; border: 0; background: none; cursor: pointer;
    border-radius: 9px; color: var(--text-2); font-size: 14px;
    font-family: inherit; transition: background .14s, color .14s;
}
.nav-group-btn:hover { background: var(--brand-light); color: var(--brand); }
.nav-group.on > .nav-group-btn { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.nav-group .gi { font-size: 14px; line-height: 1; opacity: .85; }
.nav-group .caret { font-size: 9px; opacity: .55; transition: transform .16s; }
.nav-group.open .caret { transform: rotate(180deg); }

.nav-drop {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
    min-width: 268px; padding: 6px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 14px; box-shadow: 0 16px 44px rgba(15, 23, 42, .16);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-group.open .nav-drop { opacity: 1; visibility: visible; transform: none; }
.nav-drop a {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 9px 11px; border-radius: 10px; color: var(--text);
    transition: background .12s;
}
.nav-drop a:hover { background: #f4f7fd; }
.nav-drop a.active { background: var(--brand-light); }
.nav-drop a.active .dt { color: var(--brand); font-weight: 600; }
.nav-drop .di { font-size: 15px; line-height: 1.3; width: 18px; text-align: center; flex: 0 0 auto; }
.nav-drop .dt { font-size: 13.5px; line-height: 1.35; }
.nav-drop .dt em {
    display: block; font-style: normal; font-size: 11.5px;
    color: var(--text-3); margin-top: 2px; font-weight: 400;
}

/* ---------------- 页内切换（团队业绩 / 会员排位） ---------------- */
.seg-tabs {
    display: inline-flex; padding: 3px; gap: 2px;
    background: #eef2f9; border-radius: 12px; border: 1px solid var(--line);
}
.seg-tabs a {
    padding: 7px 16px; border-radius: 9px; font-size: 13.5px;
    color: var(--text-2); transition: background .14s, color .14s, box-shadow .14s;
    white-space: nowrap;
}
.seg-tabs a:hover { color: var(--brand); }
.seg-tabs a.on {
    background: #fff; color: var(--brand); font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

/* ---------------- 首页：分组功能入口 ---------------- */
.menu-groups { display: grid; gap: 12px; }
.menu-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.menu-group-head {
    display: flex; align-items: center; gap: 7px;
    padding: 11px 14px 0; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.menu-group-head .gi { font-size: 15px; color: var(--brand); line-height: 1; }
.menu-group-head .tt { letter-spacing: -.2px; }
.menu-group-head .dd { font-size: 11.5px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.menu-group .grid-menu { padding: 8px 6px 10px; }

/* ---------------- 资产明细：按类型归类 ---------------- */
.asset-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    background: var(--line);
}
.asset-cell {
    display: block; padding: 12px 14px; background: var(--card);
    transition: background .14s;
}
.asset-cell:hover { background: #f6f9ff; }
.asset-cell.on { background: var(--brand-light); }
.asset-cell .ac-top { display: flex; align-items: center; gap: 6px; }
.asset-cell .ac-ico { font-size: 14px; line-height: 1; }
.asset-cell .ac-name { font-size: 12.5px; color: var(--text-2); }
.asset-cell .ac-val {
    margin-top: 5px; font-size: 18px; font-weight: 700;
    letter-spacing: -.4px; color: var(--text);
}
.asset-cell.on .ac-val { color: var(--brand-dark); }
.asset-cell .ac-unit { font-size: 11px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.asset-cell .ac-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
/* 信息格（如「股权单价」）：不是可筛选的流水类型，不响应点击 */
.asset-cell.ac-info { cursor: default; background: #fafbfe; }
.asset-cell.ac-info:hover { background: #fafbfe; }
.asset-cell.ac-info .ac-val { color: var(--brand-dark); }

.asset-group { margin-bottom: 12px; }
.asset-group .card-head { background: #fafbfe; }
.asset-group .grp-ico { color: var(--brand); margin-right: 4px; }
.asset-group .card-head .count {
    font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-left: 6px;
}

@media (min-width: 640px) {
    /* 8 格（7 类资产 + 股权单价）在 640px 以上直接排 4 列，正好两行不留空位 */
    .asset-grid { grid-template-columns: repeat(4, 1fr); }
    .menu-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .asset-grid { grid-template-columns: repeat(4, 1fr); }
    .menu-groups { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 639px) {
    .seg-tabs { display: flex; }
    .seg-tabs a { flex: 1; text-align: center; padding: 8px 10px; }
}

/* ================================================================
   第 10 轮 · 后台数据总览
   数字卡即链接（.stat-link）、待办高亮（.stat-todo）、小标题（.ov-title）、
   资金概况可点行（.ov-row）
   ================================================================ */
.ov-title {
    display: flex; align-items: center; gap: 7px;
    margin: 4px 2px 8px; font-size: 12.5px; font-weight: 650;
    color: var(--text-3); letter-spacing: .3px;
}
.ov-title::before {
    content: ''; width: 3px; height: 12px; border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.stats .stat-link {
    display: block; color: inherit; position: relative;
    transition: transform .14s, box-shadow .14s, border-color .14s;
}
.stats .stat-link::after {
    content: '›'; position: absolute; right: 10px; top: 8px;
    font-size: 15px; line-height: 1; color: var(--text-3); opacity: .45;
    transition: transform .14s, opacity .14s;
}
.stats .stat-link:hover { border-color: #cfdcff; }
.stats .stat-link:hover::after { transform: translateX(2px); opacity: .9; }
.stats .stat-link .sub { transition: color .14s; }
.stats .stat-link:hover .sub { color: var(--brand); }
.stats .stat-todo {
    border-color: #f3d9a8;
    background: linear-gradient(140deg, #fffdf6, #fff7e6);
}
.stats .stat-todo::after { color: var(--warning); opacity: .75; }

/* 资金概况：整行可点 */
.ov-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 14px; color: inherit;
    border-bottom: 1px solid var(--line); font-size: 13.5px;
    transition: background .12s;
}
.ov-row:last-child { border-bottom: 0; }
.ov-row:hover { background: #f6f9ff; }
.ov-row:hover .text-muted { color: var(--brand); }


/* ================================================================
   数据总览 · 运营驾驶舱（第 15 轮重做）

   设计取向：深色顶栏 + 玻璃拟态卡片 + 数字滚动 + 图表生长动画。
   所有动画都尊重 prefers-reduced-motion（系统开了「减少动态效果」就静止）。
   ================================================================ */

/* ---------------------------------------------------------------- 顶部驾驶舱 */
.dash-hero {
    position: relative; overflow: hidden;
    border-radius: 20px; margin-bottom: 18px;
    background:
        radial-gradient(900px 320px at 12% -30%, rgba(64, 120, 255, .55), transparent 62%),
        radial-gradient(700px 280px at 88% 120%, rgba(0, 214, 195, .28), transparent 60%),
        linear-gradient(135deg, #0a1024 0%, #101a38 46%, #0d1730 100%);
    box-shadow: 0 18px 44px -22px rgba(10, 22, 60, .6), 0 2px 6px rgba(10, 22, 60, .12);
    color: #fff;
}
/* 细网格：科技感的底纹，不抢内容 */
.dash-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(120, 170, 255, .075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, .075) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 32%, transparent 88%);
    -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 32%, transparent 88%);
}
/* 顶部一条流光，缓慢扫过 */
.dash-hero::after {
    content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(120, 200, 255, .95), transparent);
    animation: dash-sweep 5.5s ease-in-out infinite;
}
@keyframes dash-sweep {
    0%   { left: -40%; opacity: 0; }
    18%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
.dash-hero-in { position: relative; padding: 20px 20px 18px; }

.dash-hero-top {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.dash-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; letter-spacing: 1.6px; font-weight: 600;
    color: #8fb4ff; text-transform: uppercase;
}
.dash-eyebrow i {
    width: 5px; height: 5px; border-radius: 50%; background: #35e0c0;
    box-shadow: 0 0 0 0 rgba(53, 224, 192, .7); animation: dash-pulse 2s infinite;
}
@keyframes dash-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(53, 224, 192, .65); }
    70%  { box-shadow: 0 0 0 7px rgba(53, 224, 192, 0); }
    100% { box-shadow: 0 0 0 0 rgba(53, 224, 192, 0); }
}
.dash-hero h1 {
    margin: 7px 0 5px; font-size: 23px; font-weight: 680; letter-spacing: -.6px;
    color: #fff;
}
.dash-hero p { margin: 0; font-size: 12.5px; color: rgba(226, 236, 255, .68); }
.dash-clock {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 12px; color: rgba(226, 236, 255, .82);
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(140, 180, 255, .22);
    padding: 7px 12px; border-radius: 999px; white-space: nowrap;
    backdrop-filter: blur(6px);
}
.dash-clock b { color: #7ef0d6; font-weight: 600; }

/* 驾驶舱里的 4 个核心指标 */
.dash-kpis {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
    background: rgba(140, 180, 255, .16); border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(140, 180, 255, .16);
}
.dash-kpi {
    background: rgba(12, 22, 46, .58); padding: 13px 15px; color: inherit;
    display: block; position: relative; transition: background .16s;
    backdrop-filter: blur(4px);
}
.dash-kpi:hover { background: rgba(30, 52, 102, .72); }
.dash-kpi .k {
    font-size: 11.5px; color: rgba(190, 210, 245, .74); margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.dash-kpi .k em {
    font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 999px;
    background: rgba(53, 224, 192, .16); color: #6fe6cd;
}
.dash-kpi .v {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 24px; font-weight: 680; letter-spacing: -.8px; line-height: 1.1;
    color: #fff;
}
.dash-kpi .v small { font-size: 12px; font-weight: 500; color: rgba(200, 218, 250, .6); margin-left: 3px; }
.dash-kpi .d { font-size: 11px; color: rgba(190, 210, 245, .6); margin-top: 5px; }
.dash-kpi .d b { color: #7ef0d6; font-weight: 600; }
/* 底部一条进度光带：占比可视化 */
.dash-kpi .bar {
    position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, #4a86ff, #35e0c0);
    transition: width 1.1s cubic-bezier(.22, .8, .28, 1);
}

/* ---------------------------------------------------------------- 待处理 */
.dash-todo-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin: 2px 2px 10px;
}
.dash-todo-head .t {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 650; color: var(--text-1);
}
.dash-todo-head .t .n {
    font-family: var(--font-num); font-size: 11.5px; font-weight: 700;
    background: #fff2dc; color: #a9701a; padding: 1px 8px; border-radius: 999px;
}
.dash-todo-head .t .n.zero { background: #e8f7ef; color: var(--success); }
.dash-todo-head .hint { font-size: 11.5px; color: var(--text-3); }

.dash-todos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.dash-todo {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px;
    border-radius: 14px; background: #fff; color: inherit;
    border: 1px solid #f0e2c6;
    background-image: linear-gradient(140deg, #fffdf7, #fff8ea);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: transform .14s, box-shadow .14s, border-color .14s;
    position: relative; overflow: hidden;
}
.dash-todo:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(180, 120, 20, .5); border-color: #eccf96; }
.dash-todo .ico {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center; font-size: 17px;
    background: #fff3dd; color: #b3751a;
}
.dash-todo .body { min-width: 0; flex: 1; }
.dash-todo .body .l { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.dash-todo .body .v {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 19px; font-weight: 700; color: #a9701a; letter-spacing: -.4px;
    line-height: 1.15;
}
.dash-todo .body .v span { font-family: inherit; font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.dash-todo .go {
    font-size: 11.5px; color: #b3751a; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 2px;
}
.dash-todo .go::after { content: '›'; font-size: 14px; }
.dash-todo.stock .ico { background: #e8f0ff; color: #2b5cff; }
.dash-todo.stock { border-color: #dbe6ff; background-image: linear-gradient(140deg, #fbfdff, #f1f6ff); }
.dash-todo.stock .body .v { color: var(--brand); }
.dash-todo.stock .go { color: var(--brand); }

/* 没有待办时的「全部处理完毕」 */
.dash-clear {
    display: flex; align-items: center; gap: 12px;
    padding: 15px 16px; margin-bottom: 18px; border-radius: 14px;
    background: linear-gradient(140deg, #f4fdf8, #eafaf1);
    border: 1px solid #cdeeda; color: #0d7a48;
}
.dash-clear .ico {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: #d8f5e4; color: #0d7a48; font-size: 16px; flex: 0 0 34px;
}
.dash-clear .t { font-size: 13.5px; font-weight: 650; }
.dash-clear .s { font-size: 11.5px; color: #3f8a66; margin-top: 2px; }

/* ---------------------------------------------------------------- 分组标题 */
.dash-sec {
    display: flex; align-items: center; gap: 8px;
    margin: 4px 2px 9px; font-size: 12.5px; font-weight: 650;
    color: var(--text-3); letter-spacing: .3px;
}
.dash-sec::before {
    content: ''; width: 3px; height: 12px; border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), #35e0c0);
}
.dash-sec .cnt { font-weight: 500; color: var(--text-3); opacity: .8; }

/* ---------------------------------------------------------------- 卡片：加一点动效 */
.dash-card {
    position: relative; overflow: hidden;
}
/* 鼠标移入时一道高光扫过 */
.dash-card::before {
    content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(120, 160, 255, .10), transparent);
    transform: skewX(-14deg); opacity: 0; transition: opacity .2s;
    pointer-events: none;
}
.dash-card:hover::before { opacity: 1; animation: dash-shine 1.1s ease; }
@keyframes dash-shine {
    from { left: -60%; }
    to   { left: 120%; }
}

/* 趋势柱：高度从 0 长上来 */
.dash-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.dash-bars .col { flex: 1; text-align: center; min-width: 0; }
.dash-bars .bar {
    border-radius: 5px 5px 2px 2px; min-height: 3px; height: 0;
    background: linear-gradient(180deg, #5b8cff, #2f6bff);
    transition: height .85s cubic-bezier(.22, .8, .28, 1);
    position: relative;
}
.dash-bars .col:hover .bar { background: linear-gradient(180deg, #35e0c0, #12a98f); }
.dash-bars .bar.today {
    background: linear-gradient(180deg, #35e0c0, #0f9d86);
    box-shadow: 0 0 0 1px rgba(53, 224, 192, .35), 0 6px 14px -6px rgba(15, 157, 134, .6);
}
.dash-bars .cap { font-size: 10px; color: #8b95a4; margin-top: 5px; }
.dash-bars .num {
    font-family: var(--font-num); font-size: 10px; color: var(--text-3);
    margin-bottom: 3px; height: 12px;
}

/* 奖种分布：横向生长条 */
.dash-dist .row {
    display: grid; grid-template-columns: 62px 1fr 82px;
    align-items: center; gap: 9px; padding: 6px 0;
}
.dash-dist .row .nm { font-size: 12px; color: var(--text-2); }
.dash-dist .row .track { height: 7px; border-radius: 999px; background: #eef2f9; overflow: hidden; }
.dash-dist .row .fill {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, #4a86ff, #35e0c0);
    transition: width .9s cubic-bezier(.22, .8, .28, 1);
}
.dash-dist .row .amt {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 11.5px; text-align: right; color: var(--text-2);
}

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 639px) {
    .dash-hero-in { padding: 16px 15px 14px; }
    .dash-hero h1 { font-size: 20px; }
    .dash-kpi .v { font-size: 20px; }
    .dash-todos { grid-template-columns: 1fr; }
    .dash-dist .row { grid-template-columns: 54px 1fr 74px; }
}
@media (min-width: 640px) {
    .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-todos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
    .dash-todos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 系统要求减少动态效果时，全部静止 */
@media (prefers-reduced-motion: reduce) {
    .dash-hero::after,
    .dash-eyebrow i,
    .dash-card:hover::before { animation: none !important; }
    .dash-kpi .bar,
    .dash-bars .bar,
    .dash-dist .row .fill { transition: none !important; }
}