:root {
  --bg: #0b0f1a;
  --bg2: #0e1424;
  --card: #151b2e;
  --card2: #1a2138;
  --line: #232b45;
  --text: #e7eaf5;
  --muted: #8b93ad;
  --accent: #6366f1;
  --accent2: #22d3ee;
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(99, 102, 241, .18), transparent 60%),
              radial-gradient(900px 400px at 10% 0%, rgba(34, 211, 238, .10), transparent 55%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
::selection { background: rgba(99, 102, 241, .4); }

/* ---------- 布局 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 28px;
  background: rgba(11, 15, 26, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; text-align: center; font-size: 15px; font-weight: 900;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .5);
}
.nav-links { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); padding: 7px 13px; border-radius: 9px; font-size: 14px;
  transition: all .15s;
}
.nav-links a:hover { color: var(--text); background: var(--card2); text-decoration: none; }
.nav-links a.active { color: #fff; background: linear-gradient(135deg, rgba(99,102,241,.35), rgba(34,211,238,.2)); }
.nav-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.balance-chip {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(251,191,36,.18), rgba(251,191,36,.08));
  border: 1px solid rgba(251, 191, 36, .35);
  color: var(--warn); font-weight: 700; cursor: pointer;
}
.balance-chip:hover { filter: brightness(1.15); }
.container { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* ---------- 通用组件 ---------- */
.card {
  background: linear-gradient(180deg, var(--card), rgba(21, 27, 46, .75));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card2); color: var(--text);
  padding: 8px 16px; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent); filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border: none; color: #fff; font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .4);
}
.btn.primary:hover { filter: brightness(1.15); }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, .4); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #0f1424; color: var(--text);
  font-size: 14px; font-family: inherit;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.mono { font-family: "Cascadia Code", Consolas, "Courier New", monospace; }
.muted { color: var(--muted); }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card2); color: var(--muted);
}
.pill.ok { color: var(--ok); border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
.pill.bad { color: var(--bad); border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.pill.warn { color: var(--warn); border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.pill.info { color: var(--accent2); border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(35, 43, 69, .6); vertical-align: middle; }
tr:hover td { background: rgba(99, 102, 241, .05); }
.table-wrap { overflow-x: auto; }

.empty {
  text-align: center; color: var(--muted); padding: 46px 20px; font-size: 14px;
}
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- 市场 ---------- */
.toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.toolbar select { width: auto; min-width: 140px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.token-card { display: flex; flex-direction: column; gap: 12px; transition: transform .15s, border-color .15s; }
.token-card:hover { transform: translateY(-3px); border-color: rgba(99, 102, 241, .55); }
.tc-head { display: flex; align-items: flex-start; gap: 10px; }
.tc-name { font-size: 16.5px; font-weight: 700; flex: 1; word-break: break-all; }
.provider-badge {
  display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.pv-mock { background: rgba(52, 211, 153, .15); color: var(--ok); border: 1px solid rgba(52, 211, 153, .35); }
.pv-openai { background: rgba(99, 102, 241, .18); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, .4); }
.pv-deepseek { background: rgba(34, 211, 238, .14); color: var(--accent2); border: 1px solid rgba(34, 211, 238, .35); }
.pv-qwen { background: rgba(251, 146, 60, .15); color: #fdba74; border: 1px solid rgba(251, 146, 60, .35); }
.pv-moonshot { background: rgba(232, 121, 249, .14); color: #f0abfc; border: 1px solid rgba(232, 121, 249, .35); }
.pv-custom { background: rgba(148, 163, 184, .15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .35); }
.tc-model { font-size: 12.5px; color: var(--muted); }
.tc-price { display: flex; gap: 14px; font-size: 13.5px; }
.tc-price b { color: var(--warn); font-size: 16px; }
.tc-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.tc-stats .v { color: var(--text); font-weight: 600; }
.quota-bar { height: 6px; border-radius: 3px; background: #0f1424; overflow: hidden; }
.quota-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .3s; }
.quota-text { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-top: 4px; }
.tc-note { font-size: 13px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tc-actions { display: flex; gap: 8px; margin-top: auto; }
.stars { color: var(--warn); letter-spacing: 1px; font-size: 13px; }
.stars .dim { color: #3a4266; }

/* ---------- 看板 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { padding: 16px 18px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; }
.stat-value.earn { color: var(--ok); }
.stat-value.spend { color: var(--bad); }
.stat-value.points { color: var(--warn); }
.chart-card { margin-bottom: 22px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.bar { width: 11px; border-radius: 3px 3px 0 0; min-height: 2px; display: inline-block; }
.bar.earn { background: linear-gradient(180deg, var(--ok), rgba(52, 211, 153, .4)); }
.bar.spend { background: linear-gradient(180deg, var(--bad), rgba(248, 113, 113, .4)); }
.chart-day { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 积分页 ---------- */
.points-hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 22px; }
.points-num { font-size: 44px; font-weight: 900; background: linear-gradient(135deg, var(--warn), #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-pos { color: var(--ok); font-weight: 700; }
.tx-neg { color: var(--bad); font-weight: 700; }

/* ---------- 模态与 toast ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(5, 8, 16, .7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  max-width: 640px; width: 100%; max-height: 86vh; overflow-y: auto;
  padding: 24px; box-shadow: var(--shadow);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.modal-x { cursor: pointer; color: var(--muted); font-size: 20px; border: none; background: none; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.toast-root { position: fixed; top: 70px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--card2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: 340px;
  box-shadow: var(--shadow); animation: slidein .2s ease-out;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--bad); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 代码块 ---------- */
.code-block {
  position: relative; background: #0a0e1c; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 14px 12px; margin: 10px 0;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 12.8px; line-height: 1.6;
  white-space: pre; overflow-x: auto; color: #c8d3f5;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: 12px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--card2); color: var(--muted); cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------- 认证页 ---------- */
.auth-wrap { max-width: 420px; margin: 7vh auto; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; background: #0f1424; padding: 5px; border-radius: 11px; }
.auth-tabs button { flex: 1; padding: 9px; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; font-weight: 600; }
.auth-tabs button.active { background: linear-gradient(135deg, var(--accent), #4f46e5); color: #fff; }
.hero-banner {
  border: 1px solid rgba(99, 102, 241, .35); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(34, 211, 238, .07));
  padding: 18px 22px; margin-bottom: 22px; font-size: 14px; line-height: 1.7;
}
.hero-banner b { color: #c7d2fe; }

/* ---------- 文档 ---------- */
.doc h3 { margin: 26px 0 10px; font-size: 17px; }
.doc p, .doc li { color: #c3c9de; font-size: 14px; line-height: 1.8; }
.doc ul { padding-left: 22px; }
.doc .kbd { background: #0f1424; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-family: Consolas, monospace; font-size: 12.5px; }

/* ---------- 密钥展示 ---------- */
.key-reveal {
  background: #0a0e1c; border: 1px dashed rgba(251, 191, 36, .5); border-radius: 10px;
  padding: 14px; font-family: Consolas, monospace; font-size: 14px; word-break: break-all;
  color: var(--warn); margin: 12px 0; position: relative;
}
.rate-stars { display: flex; gap: 6px; font-size: 26px; margin: 8px 0 4px; }
.rate-stars button { background: none; border: none; cursor: pointer; color: #3a4266; transition: transform .1s; padding: 0 2px; font-size: 26px; line-height: 1; }
.rate-stars button.on { color: var(--warn); }
.rate-stars button:hover { transform: scale(1.2); }

/* ---------- 订单与对话 ---------- */
.order-summary {
  display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.order-summary b { font-size: 15px; }
.amount-chips { display: flex; gap: 8px; margin-top: 8px; }
.chat-head { font-size: 13px; color: var(--muted); margin: 16px 0 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.chat-thread {
  height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  background: #0a0e1c; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
}
.msg { max-width: 78%; display: flex; flex-direction: column; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.other { align-self: flex-start; align-items: flex-start; }
.msg-body {
  padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.6; word-break: break-word;
  background: var(--card2); border: 1px solid var(--line);
}
.msg.me .msg-body {
  background: linear-gradient(135deg, var(--accent), #4f46e5); border: none; color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.other .msg-body { border-bottom-left-radius: 4px; }
.msg-meta { font-size: 11px; color: var(--muted); margin-top: 4px; padding: 0 4px; }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chat-input input { flex: 1; }

.split { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .nav { padding: 10px 14px; gap: 8px; }
  .container { padding: 18px 14px 50px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---- 导航未读角标 ---- */
.nav-badge {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 5px;
  background: var(--bad); color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 17px; text-align: center; font-weight: 700;
}

/* ---- 标签 chips ---- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--fg); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- 需求墙 ---- */
.post-card { margin-bottom: 14px; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-kind {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.post-kind.demand { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
.post-kind.supply { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.post-title { font-size: 15.5px; }
.post-body { margin-top: 10px; font-size: 13.5px; color: #c3c9de; line-height: 1.7; white-space: pre-wrap; }
.post-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.price-hint { font-size: 12.5px; color: var(--warn, #fbbf24); background: rgba(251, 191, 36, .1); border-radius: 999px; padding: 3px 10px; }
.post-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---- 私信双栏 ---- */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.conv-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s;
}
.conv-item:hover { border-color: var(--accent); }
.conv-item.active { border-color: var(--accent); background: var(--card2); }
.conv-top { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.conv-ref { font-size: 11.5px; color: var(--accent2); margin-top: 3px; }
.conv-preview {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-pane { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.chat-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chat-thread.page { height: 46vh; max-height: 46vh; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { max-height: 30vh; }
}

/* ---- 用户信誉 ---- */
.rep-link { color: var(--accent2); cursor: pointer; text-decoration: none; }
.rep-link:hover { text-decoration: underline; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rep-item { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.rep-v { font-size: 20px; font-weight: 700; color: var(--fg); }
.rep-k { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== 离线交易版新增（暗色） ===== */
.section-title { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.stat-num { font-size: 24px; font-weight: 800; }
.stat-num.earn, td.earn, .earn { color: var(--ok); font-weight: 700; }
.stat-num.spend, td.spend, .spend { color: var(--bad); font-weight: 700; }

/* 价格标签 */
.price-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(52, 211, 153, .14); color: var(--ok); font-weight: 800; font-size: 13px; border: 1px solid rgba(52, 211, 153, .4); }
.price-tag.none { background: rgba(139, 147, 173, .12); color: var(--muted); border-color: var(--line); font-weight: 600; }

/* 交易进度条 */
.deal-steps { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.deal-steps .step { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.deal-steps .step i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card2); color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; border: 1px solid var(--line); }
.deal-steps .step.on { color: var(--accent2); }
.deal-steps .step.on i { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }
.deal-steps .step.done { color: var(--ok); }
.deal-steps .step.done i { background: var(--ok); border-color: var(--ok); color: #06281c; }
.deal-steps em { flex: 1; height: 2px; background: var(--line); min-width: 12px; border-radius: 2px; }
.deal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pay-chip { font-size: 12.5px; font-weight: 700; color: var(--ok); background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .4); border-radius: 999px; padding: 3px 10px; margin-left: auto; }

/* 系统进度消息 */
.msg.sys { display: flex; justify-content: center; margin: 8px 0; }
.msg-sys-body { font-size: 12px; color: var(--muted); background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; max-width: 86%; }

/* 管理后台 */
.row-actions { white-space: nowrap; }
.row-actions .btn { margin-right: 4px; }

/* 图表列（看板/后台） */
.chart { align-items: flex-end; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; flex: 1; height: 100%; min-width: 0; }
.bar-col .bar { width: 60%; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-day { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* 弹窗表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea { width: 100%; box-sizing: border-box; }
.hint { font-size: 12.5px; color: var(--muted); }
.modal-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* 互评星星 */
.rate-stars { font-size: 30px; text-align: center; margin: 12px 0; }
.rate-stars span { cursor: pointer; color: var(--line); transition: color .12s; padding: 0 3px; }
.rate-stars span.on { color: var(--warn); }

/* 会话列表激活态 */
.conv-item.active { background: rgba(99, 102, 241, .12); border-left: 3px solid var(--accent); }

/* ===== 意见反馈 ===== */
.fb-card { margin-bottom: 12px; }
.fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fb-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.fb-reply {
  margin-top: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6;
  background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .3); border-radius: 10px;
}

/* ===== 移动端适配（≤860px） ===== */
.chat-back { display: none; }
@media (max-width: 860px) {
  /* 导航：只留 logo 徽章，链接横向滑动，用户区收紧 */
  .nav { flex-wrap: nowrap; gap: 10px; padding: 10px 12px; }
  .logo { font-size: 0; gap: 0; }
  .logo-badge { flex: none; }
  .nav-links { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; padding: 6px 10px; font-size: 13.5px; }
  .nav-user { gap: 8px; font-size: 13px; }
  .nav-user .muted { display: none; } /* 小屏隐藏用户名，保留余额与退出 */

  /* 私信：单栏，点开会话只看聊天窗，可返回列表 */
  .chat-layout { display: block; }
  .chat-list { max-height: none; }
  .chat-pane { display: none; }
  .chat-layout.open .chat-list { display: none; }
  .chat-layout.open .chat-pane { display: block; }
  .chat-back { display: inline-block; margin-right: 8px; }
  .chat-thread.page { height: 52vh; max-height: 52vh; }
  .chat-pane-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
  .deal-steps { padding: 10px; overflow-x: auto; gap: 4px; }
  .deal-steps .step { font-size: 11.5px; gap: 4px; }
  .deal-steps .step i { width: 18px; height: 18px; font-size: 10px; }
  .deal-steps em { min-width: 8px; }
  .deal-actions { padding: 8px 12px; }

  /* 弹窗：贴近屏幕边缘 */
  .modal-mask { padding: 12px; }
  .modal { padding: 18px 16px; max-height: 92vh; border-radius: 14px; }

  /* 统计网格两列、图表压低 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-num { font-size: 20px; }
  .chart { height: 120px; }

  /* 需求墙工具条与卡片 */
  .toolbar { gap: 8px; }
  .toolbar input[type=search] { min-width: 0; flex-basis: 100%; order: 3; }
  .post-head .muted { flex-basis: 100%; margin-left: 0 !important; }
  .post-actions { flex-wrap: wrap; }

  /* 积分页 */
  .points-hero { gap: 14px; }
  .points-num { font-size: 30px; }

  /* 表格与后台 */
  .table-wrap table { font-size: 12.5px; }
  .row-actions .btn { margin-bottom: 4px; }
  #admin-user-q { max-width: none !important; width: 100%; }

  /* toast 全宽 */
  .toast-root { left: 12px; right: 12px; top: 60px; }
  .toast { max-width: none; }

  /* 互评星星加大触点 */
  .rate-stars span { padding: 0 8px; }
}

/* ===== 图片消息 ===== */
.msg-body.img { padding: 4px; background: var(--card2); }
.msg-body.img img {
  display: block; max-width: 240px; max-height: 240px; border-radius: 8px; cursor: zoom-in;
}
@media (max-width: 860px) {
  .msg-body.img img { max-width: 200px; max-height: 200px; }
}

/* ===== UX 优化：新消息提示 / 待办角标 / 欢迎卡 ===== */
.chat-pane { position: relative; }
.new-msg-pill {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 76px; z-index: 6;
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 6px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(99, 102, 241, .45); animation: pop .15s ease-out;
}
.new-msg-pill:hover { filter: brightness(1.1); }
.tab-dot {
  display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 5px;
  background: var(--bad); color: #fff; border-radius: 8px;
  font-size: 10.5px; line-height: 16px; text-align: center; font-weight: 700;
}
.welcome-card { border-color: rgba(99, 102, 241, .5); background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.06)), var(--card); margin-bottom: 16px; }
@media (max-width: 860px) {
  .new-msg-pill { bottom: 70px; }
  .toolbar select { flex: 1 1 40%; min-width: 120px; font-size: 13px; }
}
.pv-glm { background: rgba(59, 130, 246, .15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, .35); }
.pv-minimax { background: rgba(244, 114, 182, .13); color: #f472b6; border: 1px solid rgba(244, 114, 182, .35); }
