:root {
  --bg: #f7faf9;
  --bg-soft: #eef6f3;
  --card: #ffffff;
  --text: #17201d;
  --text-2: #4b5a55;
  --muted: #8a9893;
  --line: #e3ece8;
  --primary: #10b38a;
  --primary-2: #0a9473;
  --primary-soft: #e3f7f0;
  --accent: #3b82f6;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #c98a12;
  --warn-soft: #fdf4e3;
  --shadow: 0 1px 2px rgba(16, 40, 32, .04), 0 4px 16px rgba(16, 40, 32, .05);
  --shadow-lg: 0 12px 40px rgba(16, 40, 32, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1413; --bg-soft: #151d1b; --card: #171f1d; --text: #e8efec; --text-2: #b4c2bd;
    --muted: #7d8c87; --line: #26312e; --primary: #2ccf9f; --primary-2: #4fe0b4; --primary-soft: #143029;
    --danger-soft: #3a1c1d; --warn-soft: #3a2f17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-2); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #34d8a8, #10b38a 55%, #3b9ef6); display: grid; place-items: center; color: #fff; font-size: 16px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { color: var(--text-2); padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-links a.active { color: var(--primary-2); background: var(--primary-soft); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-2); font-weight: 600; font-size: 13px; }
.menu-btn { display: none; }
main { min-height: calc(100vh - 64px - 90px); }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .container { padding: 0 16px; }
  .nav-inner { gap: 12px; }
}

/* ---------- 基础组件 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.label { display: block; font-size: 13px; color: var(--text-2); font-weight: 500; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; background: var(--bg-soft); color: var(--text-2); }
.tag-green { background: var(--primary-soft); color: var(--primary-2); }
.tag-red { background: var(--danger-soft); color: var(--danger); }
.tag-amber { background: var(--warn-soft); color: var(--warn); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; background: var(--primary-soft); color: var(--primary-2); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.section { padding: 48px 0; }
.section-title { font-size: 28px; font-weight: 700; }
.section-sub { color: var(--text-2); margin-top: 8px; }
.page-head { padding: 36px 0 24px; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--text-2); margin: 6px 0 0; }

/* ---------- 首页 ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 620px; background: radial-gradient(closest-side, rgba(52, 216, 168, .22), transparent 70%), radial-gradient(closest-side at 70% 40%, rgba(59, 158, 246, .14), transparent 70%); z-index: -1; }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; padding: 5px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); box-shadow: var(--shadow); }
.hero-badge b { color: var(--primary-2); }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; margin: 22px auto 0; max-width: 860px; letter-spacing: -.02em; }
.grad { background: linear-gradient(90deg, #10b38a, #3b9ef6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--text-2); max-width: 640px; margin: 18px auto 30px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { padding: 18px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--text); }
.stat span { font-size: 13px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.feature { padding: 24px; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); font-size: 20px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--text-2); margin: 6px 0 0; font-size: 14px; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- 画廊 ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; color: var(--text-2); transition: all .15s; }
.chip:hover { color: var(--primary-2); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.masonry { columns: 3 300px; column-gap: 16px; }
.tile { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile img { width: 100%; height: auto; background: var(--bg-soft); }
.tile-body { padding: 12px 14px; }
.tile-title { font-weight: 600; font-size: 14px; }
.tile-prompt { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.tile-meta { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.empty-icon { font-size: 36px; margin-bottom: 8px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(10, 20, 17, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 18px; max-width: 1000px; width: 100%; max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal-sm { max-width: 440px; }
.viewer { display: grid; grid-template-columns: 1.4fr 1fr; }
.viewer-img { background: var(--bg-soft); display: grid; place-items: center; min-height: 360px; }
.viewer-img img { max-height: calc(100vh - 80px); object-fit: contain; }
.viewer-side { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.prompt-box { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.kv { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 760px) { .viewer { grid-template-columns: 1fr; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- 认证 ---------- */
.auth-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px; }
.auth-card h1 { font-size: 24px; }
.auth-card .sub { color: var(--text-2); margin: 6px 0 24px; }
.tabs { display: flex; background: var(--bg-soft); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; height: 34px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.tabs button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.form-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: -4px 0 10px; }

/* ---------- 工作台 ---------- */
.studio { display: grid; grid-template-columns: 380px 1fr; gap: 20px; padding: 24px 0 40px; align-items: start; }
.studio-panel { position: sticky; top: 84px; }
.seg { display: grid; gap: 8px; }
.seg-2 { grid-template-columns: 1fr 1fr; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-opt { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 10px; cursor: pointer; background: var(--card); text-align: left; transition: all .15s; }
.seg-opt:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.seg-opt.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.seg-opt b { display: block; font-size: 13px; }
.seg-opt span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ratio { display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; margin-bottom: 4px; opacity: .7; }
.cost-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); margin: 16px 0 12px; }
.cost-line b { color: var(--text); }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.result { overflow: hidden; }
.result-img { aspect-ratio: 1; background: var(--bg-soft); display: grid; place-items: center; cursor: zoom-in; }
.result-img img { width: 100%; height: 100%; object-fit: cover; }
.result-body { padding: 12px 14px; }
.result-actions { display: flex; gap: 6px; margin-top: 10px; }
.loading { display: grid; place-items: center; gap: 12px; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .9s linear infinite; }
.shimmer { background: linear-gradient(110deg, var(--bg-soft) 30%, color-mix(in srgb, var(--primary) 10%, var(--bg-soft)) 50%, var(--bg-soft) 70%); background-size: 200% 100%; animation: shimmer 1.6s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-panel { position: static; } }

/* ---------- 充值 ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { padding: 26px; position: relative; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }
.plan-badge { position: absolute; top: -11px; left: 22px; background: var(--primary); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.plan h3 { font-size: 16px; color: var(--text-2); font-weight: 600; }
.plan-price { font-size: 38px; font-weight: 800; margin: 10px 0 2px; }
.plan-price small { font-size: 16px; font-weight: 600; margin-right: 2px; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); flex: 1; }
.plan li::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: 8px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.step { padding: 16px; font-size: 14px; color: var(--text-2); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-2); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .plans, .two-col { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr 1fr; } }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-soft); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.plus { color: var(--primary-2); font-weight: 600; }
.minus { color: var(--danger); font-weight: 600; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 后台 ---------- */
.admin { display: grid; grid-template-columns: 210px 1fr; gap: 24px; padding: 24px 0 40px; align-items: start; }
.side { position: sticky; top: 84px; padding: 10px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-size: 14px; }
.side a:hover { background: var(--bg-soft); color: var(--text); }
.side a.active { background: var(--primary-soft); color: var(--primary-2); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { padding: 18px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-size: 26px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { width: 100%; max-width: 34px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar span { font-size: 11px; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-soft); cursor: zoom-in; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(20px); }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side a { white-space: nowrap; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); animation: fade .2s; }
.toast.err { background: var(--danger); color: #fff; }

/* ========== 新增样式：通知、数据统计、收款码 ========== */

/* 通知按钮 */
.notif-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; transition: background 0.2s; }
.notif-btn:hover { background: var(--bg-soft); }
.notif-badge { position: absolute; top: 6px; right: 6px; background: var(--danger); color: white; border-radius: 10px; padding: 2px 6px; font-size: 11px; font-weight: 600; min-width: 18px; text-align: center; }

/* 通知列表 */
.notif-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.notif-item { display: flex; gap: 16px; padding: 16px; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); transition: all 0.2s; }
.notif-item.unread { border-left: 3px solid var(--primary); background: rgba(16, 179, 138, 0.05); cursor: pointer; }
.notif-item.unread:hover { background: rgba(16, 179, 138, 0.1); }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.notif-icon.info { background: rgba(59, 130, 246, 0.1); }
.notif-icon.success { background: rgba(34, 197, 94, 0.1); }
.notif-icon.warning { background: rgba(251, 146, 60, 0.1); }
.notif-icon.error { background: rgba(239, 68, 68, 0.1); }
.notif-content { flex: 1; min-width: 0; }
.notif-content h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.notif-content p { margin: 0 0 8px; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.notif-content time { font-size: 12px; color: var(--text-muted); }

/* 数据统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card { background: var(--bg-soft); padding: 16px; border-radius: 12px; text-align: center; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); }

/* 图表容器 */
.chart-container { background: var(--card-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border); margin: 16px 0; }
.chart-container canvas { display: block; width: 100%; height: auto; }

/* 进度条 */
.progress-bar { height: 24px; background: var(--bg-soft); border-radius: 12px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #14d4a5); transition: width 0.3s ease; }

/* 模型统计 */
.model-stats { background: var(--card-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border); }

/* 收款码支付 */
.payment-codes { display: flex; justify-content: center; gap: 40px; margin: 30px 0; flex-wrap: wrap; }
.payment-code-item { text-align: center; }
.payment-code-item h3 { margin: 0 0 12px; font-size: 16px; color: var(--text-muted); }
.payment-code-item img { border: 2px solid var(--border); box-shadow: var(--shadow); }

/* Badge 徽章 */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-secondary { background: var(--bg-soft); color: var(--text-muted); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.badge-warning { background: rgba(251, 146, 60, 0.1); color: #fb923c; }

/* ---------- 图片上传 ---------- */
.upload-box { border: 2px dashed var(--line); border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; transition: all .2s; background: var(--bg-soft); }
.upload-box:hover { border-color: var(--primary); background: var(--card); }
.upload-placeholder { padding: 20px 0; }
.upload-preview { position: relative; }
.upload-preview img { width: 100%; max-height: 200px; object-fit: contain; border-radius: 8px; background: var(--bg-soft); }
.upload-preview .btn { position: absolute; top: 8px; right: 8px; }

/* 支付方式选择 */
.payment-modal { min-width: 480px; }
.payment-methods { display: grid; gap: 12px; margin-top: 16px; }
.payment-method-btn {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: all .2s; text-align: left; width: 100%;
}
.payment-method-btn:hover { border-color: var(--primary); background: var(--bg-soft); transform: translateY(-2px); }
.payment-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.payment-name { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.payment-hint { font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
  .payment-modal { min-width: auto; width: 100%; }
}

/* ==================== 站内私信 ==================== */
.chat-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger, #ef4444);
  color: white;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
}
.chat-modal { width: 100%; }
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 0;
}
.chat-header h3 { margin: 0; font-size: 16px; }
.chat-body { display: flex; height: 480px; }
.chat-sidebar {
  width: 220px;
  border-right: 1px solid var(--border, #e5e7eb);
  overflow-y: auto;
  flex-shrink: 0;
}
.chat-conv {
  padding: 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
}
.chat-conv:hover { background: var(--bg-2, #f9fafb); }
.chat-conv.active { background: var(--primary-light, #eff6ff); }
.chat-conv-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.unread-dot {
  background: var(--danger, #ef4444);
  color: white;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
}
.chat-conv-preview {
  font-size: 12px;
  color: var(--muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-conv-order {
  font-size: 11px;
  color: var(--primary, #3b82f6);
  margin-top: 2px;
}
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg { display: flex; }
.chat-msg.mine { justify-content: flex-end; }
.chat-msg.theirs { justify-content: flex-start; }
.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.chat-msg.mine .chat-bubble {
  background: var(--primary, #3b82f6);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.theirs .chat-bubble {
  background: var(--bg-2, #f3f4f6);
  color: var(--text, #111827);
  border-bottom-left-radius: 4px;
}
.chat-text { word-break: break-word; }
.chat-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 6px;
  display: block;
}
.chat-order {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.chat-msg.theirs .chat-order { border-top-color: rgba(0,0,0,0.1); }
.chat-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #e5e7eb);
  align-items: center;
}
