/* ==========================================================================
   抖音钻石担保交易平台 - 前台/卖家中心 H5 样式
   移动端优先，PC 自适应
   ========================================================================== */

:root {
    --primary: #1677ff;
    --primary-dark: #0f5fd6;
    --primary-light: #e8f2ff;
    --price: #f5641e;
    --success: #1aa46b;
    --success-light: #e6f7f0;
    --warning: #e5a100;
    --warning-light: #fff8e6;
    --danger: #e34d4d;
    --danger-light: #fdeeee;
    --gray: #8a93a0;
    --gray-light: #f5f7fa;
    --border: #e8ecf2;
    --text: #1f2733;
    --text-sub: #5c6775;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(24, 40, 72, .06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--gray-light);
    padding-bottom: 60px;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; vertical-align: middle; }
input, textarea, select, button { font-family: inherit; font-size: 14px; outline: none; }

/* ---------- 顶部栏 ---------- */
.topbar {
    height: 48px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar .brand { font-size: 16px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.topbar .brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.topbar .brand .logo { height: 22px; width: auto; display: block; }
.topbar .nav-links { display: flex; gap: 14px; font-size: 13px; }
.topbar .nav-links a { color: var(--text-sub); }
.topbar .badge {
    display: inline-block; min-width: 12px; height: 16px; line-height: 16px;
    padding: 0 2px; border-radius: 8px; background: transparent; color: #e02020;
    font-size: 13px; font-weight: 700; font-style: normal; text-align: center; margin-left: 2px;
}

.page { max-width: 720px; margin: 0 auto; padding: 12px; }
.page-wide { max-width: 1100px; margin: 0 auto; padding: 12px; }

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    margin-bottom: 12px;
}
.card-title {
    font-size: 15px; font-weight: 600; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: space-between;
}
.card-title .more { font-size: 12px; color: var(--gray); font-weight: 400; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: var(--text); cursor: pointer; text-align: center;
    font-size: 14px; transition: .15s; line-height: 1.4;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #cf3f3f; color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 13px 20px; font-size: 16px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-group { display: flex; gap: 10px; }
.btn-group .btn { flex: 1; }

/* ---------- 状态标签 ---------- */
.st { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.st-wait { background: var(--primary-light); color: var(--primary-dark); }
.st-warn { background: var(--warning-light); color: #a86f00; }
.st-info { background: #eef4ff; color: #2b5fd9; }
.st-ok { background: var(--success-light); color: var(--success); }
.st-gray { background: var(--gray-light); color: var(--gray); }
.st-danger { background: var(--danger-light); color: var(--danger); }

.lv { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.lv-gold { background: #fff4d6; color: #a87a00; }
.lv-good { background: var(--success-light); color: var(--success); }
.lv-normal { background: var(--gray-light); color: var(--gray); }
.lv-low { background: var(--warning-light); color: #a86f00; }
.lv-risk { background: var(--danger-light); color: var(--danger); }

/* ---------- 价格 ---------- */
.price { color: var(--price); font-weight: 600; }
.price .unit { font-size: 12px; font-weight: 400; }
.money-lg { font-size: 22px; font-weight: 600; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.form-item label .req { color: var(--danger); }
.input, .textarea, .select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--text);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); }
.textarea { min-height: 90px; resize: vertical; }
.form-tip { font-size: 12px; color: var(--gray); margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* ---------- 列表 ---------- */
.list-item {
    display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .thumb {
    width: 64px; height: 64px; border-radius: 8px; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; color: var(--primary);
    font-size: 12px; flex-shrink: 0; font-weight: 600;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .name { font-weight: 500; margin-bottom: 4px; }
.list-item .info .meta { font-size: 12px; color: var(--gray); }
.list-item .right { text-align: right; flex-shrink: 0; }

/* ---------- 商品卡片 ---------- */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .goods-grid { grid-template-columns: repeat(3, 1fr); } }
.goods-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.goods-card .g-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-card .g-amount { font-size: 18px; font-weight: 600; color: var(--text); }
.goods-card .g-amount small { font-size: 12px; color: var(--gray); font-weight: 400; }
.goods-card .g-seller { font-size: 12px; color: var(--gray); display: flex; justify-content: space-between; }
.goods-card .g-price { display: flex; justify-content: space-between; align-items: baseline; }
.goods-card .g-price .t { font-size: 15px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; margin: 4px 0 16px; }
.steps .step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--gray); }
.steps .step .n {
    width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: #e6eaf0;
    color: #fff; margin: 0 auto 4px; font-size: 12px;
}
.steps .step.active .n { background: var(--primary); }
.steps .step.done .n { background: var(--success); }
.steps .step.active, .steps .step.done { color: var(--text); }
.steps .step::after {
    content: ''; position: absolute; top: 11px; left: 50%; width: 100%; height: 2px;
    background: #e6eaf0; z-index: -1;
}
.steps .step:last-child::after { display: none; }
.steps .step.done::after { background: var(--success); }

/* ---------- 提示条 ---------- */
.alert { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); }
.alert-warn { background: var(--warning-light); color: #a86f00; }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-success { background: var(--success-light); color: var(--success); }

/* ---------- 数据行 ---------- */
.kv { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-sub); }
.kv .v { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }

/* ---------- 底部导航 ---------- */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: #fff;
    border-top: 1px solid var(--border); display: flex; z-index: 200;
}
.tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--gray); font-size: 11px; gap: 2px;
}
.tabbar a.on { color: var(--primary); }
.tabbar a .ico { font-size: 18px; line-height: 1; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--gray); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 900;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
    background: #fff; border-radius: 12px; width: 100%; max-width: 420px;
    max-height: 86vh; overflow-y: auto; padding: 18px;
}
.modal-box h3 { font-size: 16px; margin-bottom: 12px; }
.hide { display: none !important; }

/* ---------- 上传框 ---------- */
.upload-box {
    width: 100px; height: 100px; border: 1px dashed var(--border); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: var(--gray);
    font-size: 12px; cursor: pointer; background: var(--gray-light); overflow: hidden; position: relative;
}
.upload-box img { width: 100%; height: 100%; object-fit: cover; }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: var(--gray-light); color: var(--text-sub); font-weight: 500; }
.table td { color: var(--text); }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; background: #fff; border-radius: var(--radius); padding: 6px; margin-bottom: 12px; box-shadow: var(--shadow); }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--text-sub); font-size: 13px; white-space: nowrap; }
.tabs a.on { background: var(--primary); color: #fff; }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 6px; padding: 16px 0; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 32px; height: 32px; line-height: 32px; text-align: center; padding: 0 8px;
    border-radius: 6px; background: #fff; border: 1px solid var(--border); font-size: 13px; color: var(--text-sub);
}
.pager .active { background: var(--primary); border-color: var(--primary); color: #fff; }

ul.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px 0; flex-wrap: wrap; list-style: none; }
ul.pagination > li > a, ul.pagination > li > span {
    display: block; min-width: 32px; height: 32px; line-height: 30px; text-align: center; padding: 0 8px;
    border-radius: 6px; background: #fff; border: 1px solid var(--border); font-size: 13px; color: var(--text-sub);
}
ul.pagination > li.active > a, ul.pagination > li.active > span {
    background: var(--primary); border-color: var(--primary); color: #fff;
}
ul.pagination > li.disabled > span { opacity: .45; }

/* ---------- 收银台 ---------- */
.pay-box { text-align: center; }
.pay-box .qr { width: 220px; height: 220px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; margin: 10px auto; display: block; }
.pay-amount { font-size: 26px; font-weight: 600; color: var(--price); margin: 6px 0; }
.countdown { color: var(--danger); font-weight: 600; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.timeline .tl-item { position: relative; padding-bottom: 14px; font-size: 13px; }
.timeline .tl-item::before {
    content: ''; position: absolute; left: -17px; top: 6px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--primary); border: 2px solid #fff;
}
.timeline .tl-item .tl-time { font-size: 12px; color: var(--gray); }

.toast {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .8); color: #fff; padding: 10px 18px; border-radius: 8px;
    font-size: 13px; z-index: 1000; max-width: 80%; text-align: center;
}

/* ==========================================================================
   管理后台样式
   ========================================================================== */
body.admin-body { padding-bottom: 0; background: var(--gray-light); }
.admin-wrap { display: flex; min-height: 100vh; }

.admin-side {
    width: 190px; flex-shrink: 0; background: #1f2733; color: #c5cedb;
    display: flex; flex-direction: column;
}
.admin-side .side-logo {
    height: 54px; display: flex; align-items: center; padding: 0 16px;
    font-size: 15px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-side .side-menu { padding: 10px 0; flex: 1; overflow-y: auto; }
.admin-side .side-menu .group {
    padding: 10px 16px 4px; font-size: 11px; color: #6b7688; letter-spacing: .5px;
}
.admin-side .side-menu a {
    display: block; padding: 9px 16px; font-size: 13px; color: #c5cedb; border-left: 3px solid transparent;
}
.admin-side .side-menu a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-side .side-menu a.on { background: rgba(22,119,255,.16); color: #fff; border-left-color: var(--primary); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
    height: 54px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.admin-top .title { font-size: 15px; font-weight: 600; }
.admin-top .info { font-size: 13px; color: var(--text-sub); display: flex; gap: 14px; align-items: center; }
.admin-content { padding: 16px; flex: 1; }

.panel { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 14px; }
.stat-card .n { font-size: 22px; font-weight: 600; color: var(--text); }
.stat-card .t { font-size: 12px; color: var(--gray); margin-top: 2px; }
.stat-card.primary .n { color: var(--primary); }
.stat-card.danger .n { color: var(--danger); }
.stat-card.success .n { color: var(--success); }
.stat-card.warn .n { color: var(--warning); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 130px; padding: 7px 10px; }
.filter-bar .btn { padding: 7px 14px; }

.table-wrap { overflow-x: auto; }
.table td .op { display: flex; gap: 6px; flex-wrap: wrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #fafbfc; }

.modal-box textarea.textarea { min-height: 80px; }
.modal-box .form-item label { color: var(--text-sub); }

.badge-warn { background: var(--warning-light); color: #a86f00; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-danger { background: var(--danger-light); color: var(--danger); padding: 2px 8px; border-radius: 4px; font-size: 12px; }

/* ---------- 首页轮播广告 ---------- */
.swiper {
    position: relative; overflow: hidden; border-radius: var(--radius);
    box-shadow: var(--shadow); background: #eef2f8; margin-bottom: 12px;
    touch-action: pan-y; /* 允许页面上下滚动，左右滑动由脚本接管 */
}
.swiper-track { display: flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.swiper-track.dragging { transition: none; }
.swiper-item { flex: 0 0 100%; display: block; width: 100%; }
.swiper-item img {
    width: 100%; height: auto; display: block;
    aspect-ratio: 2.75 / 1; object-fit: cover; pointer-events: none;
}
.swiper-dots {
    position: absolute; left: 0; right: 0; bottom: 8px;
    display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.swiper-dots i {
    display: block; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, .55); transition: width .25s, background .25s;
}
.swiper-dots i.on { width: 16px; border-radius: 3px; background: #fff; }
.swiper.single .swiper-dots { display: none; }

/* ---------- 友情链接 ---------- */
.friend-links {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px; margin-bottom: 12px;
}
.friend-links .fl-head { font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 10px; }
.friend-links .fl-list { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-links .fl-list a {
    padding: 5px 11px; border-radius: 6px; background: var(--gray-light);
    color: var(--text-sub); font-size: 13px; line-height: 1.5;
}
.friend-links .fl-list a:hover { background: var(--primary-light); color: var(--primary); }

/* ==========================================================================
   页面视觉（v4.2 素材包）
   所有配图都是包内自带的 SVG 矢量图，纯静态、不依赖外部 CDN，
   即使图片全部加载失败也只退化成纯色/渐变的纯文字版面，不会错位。
   ========================================================================== */

/* ---------- 首页主视觉 ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px;
    padding: 18px 16px 16px;
    background: #1677ff url('/static/img/hero-bg.svg') no-repeat center / cover;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
    padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18);
    margin-bottom: 10px;
}
.hero-badge img { width: 16px; height: 16px; border-radius: 4px; display: block; }
.hero-title { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.hero-desc { font-size: 12px; line-height: 1.85; opacity: .92; margin-top: 6px; }
.hero-btns { display: flex; gap: 8px; margin-top: 14px; }
.hero-btn-main { background: #fff; color: #1677ff; border: none; font-weight: 600; }
.hero-btn-main:hover { background: #f4f8ff; color: #0f5fd6; border: none; }
.hero-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.hero-btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; border-color: #fff; }

/* ---------- 平台优势四宫格 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 8px; }
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { text-align: center; }
.feature img { width: 52px; height: 52px; display: block; margin: 0 auto 6px; }
.feature .t { font-size: 13px; font-weight: 600; color: var(--text); }
.feature .d { font-size: 11px; color: var(--gray); line-height: 1.5; margin-top: 2px; }

/* ---------- 空状态（插画版）---------- */
.empty img { width: 148px; max-width: 62%; height: auto; display: block; margin: 0 auto 10px; }
.empty p { margin: 0; }

/* ---------- 登录 / 注册页插画 ---------- */
.auth-hero { margin-bottom: 12px; }
.auth-hero img {
    width: 100%; height: auto; display: block;
    border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 内容页头图 ---------- */
.page-hero { margin-bottom: 12px; }
.page-hero img {
    width: 100%; height: 118px; object-fit: cover; display: block;
    border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (max-width: 520px) { .page-hero img { height: 94px; } }

/* ---------- 底部导航图标 ---------- */
.tabbar a .ico { display: block; font-size: 0; width: 22px; height: 22px; line-height: 1; }
.tabbar a .ico img {
    width: 22px; height: 22px; display: block;
    filter: grayscale(1); opacity: .42; transition: .15s;
}
.tabbar a.on .ico img { filter: none; opacity: 1; }

/* ---------- 个人中心头像 ---------- */
.u-avatar {
    width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; background: var(--primary-light);
}
.u-avatar img { width: 100%; height: 100%; display: block; }

/* ---------- 入驻引导 ---------- */
.join-box { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.join-box .join-txt { flex: 1; min-width: 0; }
.join-box .join-txt b { font-size: 14px; color: var(--text); }
.join-box .join-txt p { font-size: 12px; color: var(--text-sub); line-height: 1.7; margin: 2px 0 0; }
.join-box img { width: 116px; flex-shrink: 0; border-radius: 10px; }
@media (max-width: 360px) { .join-box img { width: 92px; } }

/* ---------- 商品卡钻石水印 ---------- */
.goods-card { position: relative; overflow: hidden; }
.goods-card::after {
    content: ''; position: absolute; right: -16px; bottom: -16px;
    width: 78px; height: 78px; opacity: .12; pointer-events: none;
    background: url('/static/img/diamond-mark.svg') no-repeat center / contain;
}

/* ---------- 会员推广下线 ---------- */
.invite-hero { background: linear-gradient(150deg, #eef5ff 0%, #f7fbff 58%, #fff 100%); }
.invite-tip { font-size: 12.5px; line-height: 1.85; color: var(--text-sub); margin-bottom: 12px; }
.invite-tip b { color: var(--price); }

.invite-code-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.invite-label { font-size: 12px; color: var(--gray); }
.invite-code {
    font-size: 17px; font-weight: 700; letter-spacing: 2px; color: var(--primary);
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

.invite-link {
    background: #fff; border: 1px dashed var(--border); border-radius: 8px;
    padding: 9px 10px; font-size: 12px; line-height: 1.6; color: var(--text-sub);
    word-break: break-all; margin-bottom: 10px; user-select: all;
}

.invite-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.invite-stat-item { text-align: center; padding: 8px 2px; background: var(--gray-light); border-radius: 8px; }
.invite-stat-item .num { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; }
.invite-stat-item .num.primary { color: var(--price); }
.invite-stat-item .lbl { font-size: 11px; color: var(--gray); margin-top: 2px; }

.invite-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.invite-row:last-child { border-bottom: none; padding-bottom: 0; }
.invite-row-main { flex: 1; min-width: 0; }
.invite-row-main .name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.invite-row-main .sub { font-size: 11.5px; color: var(--gray); line-height: 1.75; word-break: break-all; }
.invite-row-side { text-align: right; flex-shrink: 0; }
.invite-row-side .amt { font-size: 15px; font-weight: 700; color: var(--price); }
.invite-row-side .sub { font-size: 11px; color: var(--gray); }

/* 通用小标签 */
.tag {
    display: inline-block; font-size: 10.5px; line-height: 1.6; font-weight: 400;
    padding: 0 6px; border-radius: 20px; background: var(--gray-light);
    color: var(--text-sub); vertical-align: 1px; margin-left: 2px;
}
.tag-blue   { background: var(--primary-light); color: var(--primary); }
.tag-green  { background: var(--success-light); color: var(--success); }
.tag-orange { background: var(--warning-light); color: var(--warning); }
.tag-red    { background: var(--danger-light);  color: var(--danger); }

@media (max-width: 380px) {
    .invite-stat { grid-template-columns: repeat(2, 1fr); }
}


@media (max-width: 820px) {
    .admin-wrap { flex-direction: column; }
    .admin-side { width: 100%; }
    .admin-side .side-menu { display: flex; overflow-x: auto; padding: 6px; }
    .admin-side .side-menu .group { display: none; }
    .admin-side .side-menu a { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
    .admin-side .side-menu a.on { border-left: none; border-bottom-color: var(--primary); }
}

/* ---------- 订单留言（买卖双方互发） ---------- */
.msg-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 2px 8px;
    margin-bottom: 10px;
}
.msg-item { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 12px; }
.msg-item.mine { align-items: flex-end; }
.msg-meta { font-size: 11px; color: var(--gray); margin-bottom: 3px; }
.msg-bubble {
    max-width: 84%;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg-item.mine .msg-bubble { background: var(--primary); border-color: var(--primary); color: #fff; }
.msg-empty { text-align: center; color: var(--gray); font-size: 13px; padding: 18px 0; }
.msg-box { display: flex; gap: 8px; align-items: stretch; }
.msg-box .textarea { flex: 1; min-height: 62px; margin: 0; }
.msg-box .btn { flex: 0 0 auto; align-self: flex-end; height: 42px; }
.msg-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--danger-light);
    color: var(--danger);
    font-size: 11px;
}

/* ---------- 管理员「以此用户登录」体验提示条 ---------- */
.imp-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #23262d;
    color: #f6d98a;
    font-size: 12px;
    line-height: 1.5;
}
.imp-bar a { color: #fff; font-weight: 600; text-decoration: underline; white-space: nowrap; }
