/* ============================================================
   鲸云 AI 客服系统 - 全局样式
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --info: #0284c7;
  --info-soft: #f0f9ff;
  --sidebar: #ffffff;
  --sidebar-ink: #334155;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .25);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; color: var(--ink); }
h1 { font-size: 32px; letter-spacing: -.02em; }
h2 { font-size: 24px; letter-spacing: -.01em; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p { margin: 0 0 1em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.muted-light { color: var(--muted-light); }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-sm { width: 15px; height: 15px; }
.icon-rotate { transform: rotate(90deg); width: 14px; height: 14px; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.w-100 { width: 100%; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: #fff; color: var(--ink-soft);
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: .18s ease; white-space: nowrap; font-family: var(--font);
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .7); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-light { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); color: #fff; }
.btn-outline-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片与布局 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-title h2 { margin: 0; font-size: 19px; }

/* ---------- 统计卡片 ---------- */
.stat-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat-card .stat-icon .icon { width: 20px; height: 20px; }
.stat-card .stat-label { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat-card .stat-foot { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-card.accent-green .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.accent-orange .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.accent-blue .stat-icon { background: var(--info-soft); color: var(--info); }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; padding: 12px 16px; color: var(--muted); font-weight: 600;
  background: #fafbfd; border-bottom: 1px solid var(--line); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
table.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: #fbfcff; }
table.table .cell-main { font-weight: 600; color: var(--ink); }
table.table .cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.table-empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.table-empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--muted-light); display: block; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field .req { color: var(--danger); margin-left: 2px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="url"], .field input[type="tel"],
.field select, .field textarea, .input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 14px;
  font-family: var(--font); transition: .15s ease; outline: none;
}
.field textarea { height: auto; min-height: 110px; padding: 10px 12px; line-height: 1.7; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-light); }
.field .help { font-size: 12px; color: var(--muted); line-height: 1.6; }
.field .field-error { font-size: 12px; color: var(--danger); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.checkbox { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink-soft); }
.checkbox input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.checkbox small { display: block; color: var(--muted); font-size: 12px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: .18s; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 6px; }
fieldset { border: none; margin: 0; padding: 0; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.range-row output { min-width: 42px; text-align: center; font-weight: 700; color: var(--primary); }

.form-hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; }
.form-divider { height: 1px; background: var(--line-soft); margin: 20px 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; cursor: pointer; }
.switch-row strong { font-size: 13.5px; }
.switch-row small { display: block; margin-top: 3px; line-height: 1.6; }
.balance-big { font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.tip-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.tip-list li + li { margin-top: 4px; }

/* ---------- 提示 ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.alert-icon { display: flex; margin-top: 1px; }
.alert-icon .icon { width: 17px; height: 17px; }
.alert-text { flex: 1; }
.alert-close { border: none; background: transparent; color: inherit; opacity: .55; cursor: pointer; padding: 2px; display: flex; }
.alert-close:hover { opacity: 1; }
.alert-success { background: var(--success-soft); border-color: #bbf7d0; color: #166534; }
.alert-error { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-soft); border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--info-soft); border-color: #bae6fd; color: #075985; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; line-height: 1.65; }
.notice .icon { width: 17px; height: 17px; margin-top: 2px; }
.notice.warning { background: var(--warning-soft); color: #92400e; }
.notice.danger { background: var(--danger-soft); color: #991b1b; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 14px 18px; flex-wrap: wrap; }
.page-item {
  min-width: 33px; height: 33px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.page-item:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-item.disabled { opacity: .45; pointer-events: none; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .empty-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 16px; }
.empty-state .empty-icon .icon { width: 26px; height: 26px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 18px; }

/* ---------- 进度条 ---------- */
.progress { height: 8px; border-radius: 999px; background: #edf1f7; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s ease; }
.progress.green > span { background: var(--success); }
.progress.orange > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }
.meter-row + .meter-row { margin-top: 14px; }
.meter-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.meter-head strong { color: var(--ink); }

/* ---------- 代码块 ---------- */
.code-block { position: relative; background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm); padding: 16px 16px; overflow-x: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; }
.code-block.light { background: #f8fafc; color: var(--ink-soft); border: 1px solid var(--line); }
.copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.12); color: #e2e8f0; border: none; border-radius: 6px; height: 27px; padding: 0 9px; font-size: 12px; cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,.22); }
.kv-list { display: flex; flex-direction: column; gap: 0; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; word-break: break-all; }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: #fbfcfe; }
.filter-bar .field { gap: 4px; min-width: 130px; }
.filter-bar .field > label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.filter-bar .field input, .filter-bar .field select { height: 36px; font-size: 13px; }
.filter-bar .filter-actions { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.tab { padding: 13px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   官网
   ============================================================ */
.site-body { background: #fff; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-nav { height: 68px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(67, 56, 202, .8); }
.brand-mark .icon { width: 18px; height: 18px; }
.brand-text { font-size: 17px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.site-links { display: flex; align-items: center; gap: 26px; margin-right: auto; }
.site-links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.site-links a:hover, .site-links a.active { color: var(--primary); }
.site-actions { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; align-items: center; justify-content: center; color: var(--ink); }
.site-main { min-height: 60vh; }
.site-main > .alert { margin: 18px auto 0; width: min(1180px, calc(100% - 40px)); }

.hero { padding: 74px 0 60px; background:
  radial-gradient(900px 400px at 80% -10%, rgba(99,102,241,.14), transparent 60%),
  radial-gradient(700px 360px at 8% 8%, rgba(14,165,233,.10), transparent 60%),
  linear-gradient(180deg, #fbfcff, #fff);
  border-bottom: 1px solid var(--line-soft);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-size: 46px; line-height: 1.18; letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-lead { font-size: 16px; color: var(--muted); max-width: 540px; line-height: 1.85; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { width: 14px; height: 14px; color: var(--success); }
.hero-visual { position: relative; }
.chat-preview { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-preview-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.chat-preview-head .avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.chat-preview-head strong { display: block; font-size: 13.5px; }
.chat-preview-head span { color: var(--success); font-size: 11.5px; }
.chat-preview-body { padding: 18px; background: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.preview-msg { max-width: 84%; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.65; }
.preview-msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.preview-msg.user { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-preview-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-soft); background: #fff; }
.chat-preview-input span { flex: 1; height: 36px; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; padding: 0 12px; color: var(--muted-light); font-size: 12.5px; }
.chat-preview-input .send { width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; }

.section { padding: 64px 0; }
.section.alt { background: #fafbfe; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 40px; }
.section-head h2 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 15px; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.feature-icon .icon { width: 21px; height: 21px; }
.feature-card h3 { font-size: 16px; margin-bottom: 7px; }
.feature-card p { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.75; }
.platform-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.platform-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line); background: #fff; border-radius: 999px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.platform-chip .icon { width: 16px; height: 16px; color: var(--primary); }

.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 18px 40px -24px rgba(79,70,229,.5); }
.price-card .featured-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.price-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.price-desc { color: var(--muted); font-size: 12.5px; min-height: 40px; margin-bottom: 14px; }
.price-amount { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-amount strong { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.price-amount span { color: var(--muted); font-size: 12.5px; }
.price-original { color: var(--muted-light); font-size: 12px; text-decoration: line-through; margin-bottom: 16px; }
.price-features { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--ink-soft); flex: 1; }
.price-features li { display: flex; gap: 8px; align-items: flex-start; }
.price-features .icon { width: 15px; height: 15px; color: var(--success); margin-top: 3px; }
.price-card .btn { margin-top: auto; }

.cta-band { background: linear-gradient(120deg, #312e81, #4f46e5 55%, #6366f1); color: #fff; border-radius: 22px; padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 10px 0 70px; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,.75); margin: 0; }

.site-footer { background: #0b1120; color: #cbd5e1; padding: 46px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 13px; margin-bottom: 12px; }
.footer-grid a { display: block; color: #94a3b8; font-size: 13px; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer-desc { color: #94a3b8; font-size: 13px; max-width: 320px; margin: 12px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 18px; color: #64748b; font-size: 12px; }
.brand-footer { color: #fff; }

/* 文档 */
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; padding: 44px 0 70px; align-items: start; }
.doc-nav { position: sticky; top: 92px; border-right: 1px solid var(--line); padding-right: 20px; }
.doc-nav h4 { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; }
.doc-nav a { display: block; padding: 6px 0; color: var(--ink-soft); font-size: 13.5px; }
.doc-nav a:hover { color: var(--primary); }
.doc-content h2 { margin-top: 34px; font-size: 24px; padding-top: 10px; }
.doc-content h3 { margin-top: 24px; }
.doc-content p, .doc-content li { color: var(--ink-soft); }
.doc-content ul { padding-left: 20px; }
.doc-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.doc-content th, .doc-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.doc-content th { background: #fafbfd; }
.doc-content .code-block { margin: 14px 0; }

/* ============================================================
   登录 / 注册
   ============================================================ */
.auth-body { background: #0b1120; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { position: relative; padding: 40px 52px; background:
  radial-gradient(700px 500px at 10% 0%, rgba(99,102,241,.35), transparent 60%),
  radial-gradient(600px 420px at 100% 100%, rgba(14,165,233,.22), transparent 60%),
  #0b1120;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.auth-aside::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 42px 42px; pointer-events: none; }
.auth-aside-content { position: relative; z-index: 1; max-width: 440px; }
.auth-aside-content h1 { color: #fff; font-size: 40px; line-height: 1.25; letter-spacing: -.03em; margin-bottom: 18px; }
.auth-aside-content p { color: #94a3b8; font-size: 14.5px; line-height: 1.85; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 9px; color: #cbd5e1; font-size: 13.5px; }
.auth-points .icon { width: 16px; height: 16px; color: #34d399; }
.auth-aside-foot { color: #64748b; font-size: 12px; position: relative; z-index: 1; }
.auth-main { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1, .auth-card h2 { font-size: 27px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; font-size: 13.5px; }
.auth-card .field { margin-bottom: 15px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-back { margin-top: 26px; text-align: center; font-size: 12.5px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-tabs { display: flex; gap: 6px; background: #f1f5f9; padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; height: 34px; border: none; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; font-family: var(--font); }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ============================================================
   控制台
   ============================================================ */
.app-body { background: var(--bg); }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--sidebar);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 60;
  transition: transform .22s ease;
}
.sidebar-dark { background: #0b1120; border-right-color: #1e293b; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px; border-bottom: 1px solid var(--line-soft); }
.sidebar-dark .sidebar-head { border-bottom-color: #1e293b; }
.sidebar-close { display: none; border: none; background: transparent; color: inherit; cursor: pointer; padding: 4px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 18px; }
.nav-group + .nav-group { margin-top: 16px; }
.nav-label { padding: 6px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-light); }
.sidebar-dark .nav-label { color: #475569; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--sidebar-ink); font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.nav-item:hover { background: #f4f6fb; color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sidebar-dark .nav-item { color: #94a3b8; }
.sidebar-dark .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-dark .nav-item.active { background: rgba(99,102,241,.18); color: #c7d2fe; }
.nav-item .icon { width: 17px; height: 17px; opacity: .85; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line-soft); }
.sidebar-dark .sidebar-foot { border-top-color: #1e293b; }
.plan-card { background: linear-gradient(140deg, #4338ca, #6366f1); border-radius: 12px; padding: 15px; color: #fff; display: flex; flex-direction: column; gap: 3px; }
.plan-card .plan-label { font-size: 11px; color: rgba(255,255,255,.7); }
.plan-card strong { font-size: 15px; }
.plan-card .plan-meta { font-size: 11.5px; color: rgba(255,255,255,.75); margin-bottom: 9px; }
.plan-card.plan-empty { background: #1e293b; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 55; }
.app-main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 45; height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 26px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar-toggle { display: none; border: 1px solid var(--line); background: #fff; width: 36px; height: 36px; border-radius: 8px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.topbar-title { font-size: 15px; font-weight: 700; margin-right: auto; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.balance-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; background: #f1f5f9; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.balance-chip .icon { width: 14px; height: 14px; color: var(--primary); }
.role-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 8px; border: none; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 9px; font-family: var(--font); }
.user-trigger:hover { background: #f4f6fb; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink-soft); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; }
.dropdown.open { display: block; }
.dropdown a, .dropdown .dropdown-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: none; background: transparent; border-radius: 7px; color: var(--ink-soft); font-size: 13px; font-family: var(--font); cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown .dropdown-item:hover { background: #f4f6fb; color: var(--ink); }
.dropdown .icon { width: 15px; height: 15px; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown form { margin: 0; }
.app-content { flex: 1; padding: 24px 26px 46px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin-bottom: 4px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin: 0; font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 14px; height: 14px; transform: rotate(180deg); }

/* 会话 */
.conv-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.conv-list { padding: 0; }
.conv-item { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.conv-item:last-child { border-bottom: none; }
.conv-item:hover { background: #fafbff; color: var(--ink); }
.conv-item.active { background: var(--primary-soft); }
.conv-item-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.conv-item-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.conv-item-time { color: var(--muted-light); font-size: 11px; white-space: nowrap; }
.conv-item-preview { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.conv-item-meta { display: flex; gap: 6px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.unread-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chat-panel { display: flex; flex-direction: column; min-height: 640px; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.chat-header .avatar { border-radius: 50%; }
.chat-header-info { flex: 1; }
.chat-header-info strong { display: block; font-size: 14px; }
.chat-header-info span { color: var(--muted); font-size: 12px; }
.chat-messages { flex: 1; padding: 20px; background: #f7f9fc; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 560px; }
.msg-row { display: flex; gap: 9px; align-items: flex-start; max-width: 82%; }
.msg-row.user { align-self: flex-start; }
.msg-row.assistant, .msg-row.human { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; background: #e2e8f0; color: var(--muted); }
.msg-row.assistant .msg-avatar { background: var(--primary-soft); color: var(--primary); }
.msg-row.human .msg-avatar { background: var(--success-soft); color: var(--success); }
.msg-bubble { background: #fff; border: 1px solid var(--line); padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg-row.assistant .msg-bubble { background: var(--primary); border-color: var(--primary); color: #fff; }
.msg-row.human .msg-bubble { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.msg-meta { font-size: 10.5px; color: var(--muted-light); margin-top: 5px; }
.msg-row.assistant .msg-meta, .msg-row.human .msg-meta { text-align: right; }
.chat-compose { border-top: 1px solid var(--line-soft); padding: 14px 16px; background: #fff; }
.chat-compose textarea { width: 100%; min-height: 76px; max-height: 180px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: var(--font); font-size: 13.5px; resize: vertical; outline: none; }
.chat-compose textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.chat-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.quick-replies { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; color: var(--muted); cursor: pointer; font-family: var(--font); }
.quick-chip:hover { border-color: var(--primary); color: var(--primary); }
.chat-closed { padding: 14px 18px; background: #f8fafc; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line-soft); }

/* AI 测试框 */
.test-chat { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f8fafc; }
.test-log { padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; min-height: 160px; }
.test-log .msg-bubble { font-size: 13px; }
.test-input { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--line-soft); }
.test-input input { flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; font-family: var(--font); outline: none; }
.test-input input:focus { border-color: var(--primary); }

/* Tabs */
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tab { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: #f1f5f9; }
.pill-tab:hover { color: var(--ink); }
.pill-tab.active { background: var(--primary); color: #fff; }

/* 模型行 */
.provider-row { display: flex; align-items: center; gap: 12px; }
.provider-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; text-transform: uppercase; font-size: 13px; flex: 0 0 auto; }

/* 拖拽上传 */
.upload-box { border: 1.5px dashed #c7d2fe; background: #f8faff; border-radius: 12px; padding: 26px; text-align: center; cursor: pointer; transition: .18s; }
.upload-box:hover, .upload-box.dragover { border-color: var(--primary); background: var(--primary-soft); }
.upload-box .icon { width: 26px; height: 26px; color: var(--primary); margin: 0 auto 8px; }
.upload-box strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.upload-box span { color: var(--muted); font-size: 12px; }
.upload-box input[type="file"] { display: none; }
.file-name { margin-top: 8px; font-size: 12px; color: var(--primary); }

/* 模态 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.55); }
.modal[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; display: flex; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }

/* 平台选择 */
.platform-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.platform-option { position: relative; cursor: pointer; }
.platform-option input { position: absolute; opacity: 0; }
.platform-option .option-inner { border: 1px solid var(--line); border-radius: 10px; padding: 13px 10px; text-align: center; transition: .15s; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.platform-option input:checked + .option-inner { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,.12); }
.platform-option .icon { width: 20px; height: 20px; margin: 0 auto 5px; display: block; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item span { color: var(--muted); font-size: 12px; }

/* 图表 */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-stack { display: flex; align-items: flex-end; gap: 3px; height: 150px; width: 100%; justify-content: center; }
.bar { width: 9px; border-radius: 4px 4px 2px 2px; min-height: 2px; transition: height .3s; }
.bar.primary { background: var(--primary); }
.bar.green { background: #34d399; }
.bar.orange { background: #fbbf24; }
.bar-label { font-size: 10px; color: var(--muted-light); white-space: nowrap; transform: rotate(-35deg); }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-legend i.primary { background: var(--primary); }
.chart-legend i.green { background: #34d399; }
.chart-legend i.orange { background: #fbbf24; }

/* 管理后台概览 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-card .stat-value.small-value { font-size: 22px; }
.stat-card .stat-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-soft); color: var(--muted-light); font-size: 11.5px; }
.progress-list { display: grid; gap: 14px; }
.progress-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 6px; }
.quick-links { display: grid; gap: 8px; }
.quick-link { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 9px; font-size: 13px; color: var(--ink-soft); transition: .15s; }
.quick-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.quick-link svg { width: 17px; height: 17px; }
.admin-login-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.admin-login-badge svg { width: 15px; height: 15px; }
.admin-trend { height: 190px; }
.admin-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-soft); }
.admin-delete-form { margin-top: -10px; text-align: right; }
.summary-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--success-soft); color: #166534; font-size: 13px; }
.summary-chip strong { font-size: 15px; }
.raw-json { display: block; max-width: 340px; font-size: 11.5px; color: var(--muted); word-break: break-all; }
.user-summary { display: flex; align-items: center; gap: 12px; }
.user-summary strong { display: block; font-size: 14px; }
.avatar-lg { width: 46px; height: 46px; border-radius: 12px; font-size: 18px; }
.truncate { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.provider-test-result { margin-top: 8px; font-size: 12px; line-height: 1.6; text-align: left; max-width: 320px; }
.provider-test-result.ok { color: #166534; }
.provider-test-result.fail { color: #991b1b; }
.prompt-block { margin: 0; padding: 14px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line-soft); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); max-height: 320px; overflow-y: auto; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; }
.list-row:last-child { border-bottom: none; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.platform-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.platform-tag svg { width: 16px; height: 16px; color: var(--primary); }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: grid; gap: 4px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.settings-nav a { padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-soft); }
.settings-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.settings-layout section.card { scroll-margin-top: 84px; }
.log-action { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #f1f5f9; color: var(--ink-soft); font-size: 11.5px; }

/* 订单与详情 */
.stack { display: grid; gap: 18px; align-content: start; }
.detail-list { display: grid; gap: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); flex: 0 0 auto; }
.detail-value { text-align: right; color: var(--ink); word-break: break-all; }
.detail-value.strong { font-weight: 700; font-size: 16px; color: var(--primary); }
.order-package { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.order-package h3 { margin: 0 0 5px; font-size: 17px; }
.order-package-price { text-align: right; white-space: nowrap; }
.order-package-price strong { display: block; font-size: 22px; color: var(--primary); }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.mini-stat { background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
.mini-stat span { display: block; margin-bottom: 4px; }
.mini-stat strong { font-size: 15px; }
.pay-qr { display: flex; align-items: center; gap: 26px; }
.qr-wrap { flex: 0 0 auto; width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.qr-wrap img, .qr-wrap canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.pay-qr-info { flex: 1; min-width: 0; }
.pay-qr-info h3 { margin: 0 0 8px; font-size: 17px; }
.copy-field { display: flex; gap: 8px; margin-top: 12px; }
.copy-field input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 12px; color: var(--ink-soft); background: #f8fafc; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.summary-list { display: grid; gap: 10px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-soft); }
.summary-total { padding-top: 12px; border-top: 1px dashed var(--line); color: var(--ink); }
.summary-total strong { font-size: 22px; color: var(--primary); }
.timeline-item.done::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

/* 响应式 */
@media (max-width: 1200px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-backdrop.open { display: block; }
  .app-main { margin-left: 0; }
  .topbar-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .hero-visual { max-width: 480px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav { position: static; border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 14px; display: flex; gap: 14px; flex-wrap: wrap; }
  .doc-nav h4 { display: none; }
  .conv-layout { grid-template-columns: 1fr; }
  .grid-side { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; }
  .cta-band { flex-direction: column; text-align: center; }
}
@media (max-width: 720px) {
  .container { width: calc(100% - 28px); }
  .site-nav { gap: 12px; }
  .site-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 18px; flex-direction: column; align-items: flex-start; gap: 4px; box-shadow: var(--shadow); }
  .site-links.open { display: flex; }
  .site-links a { padding: 8px 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .site-actions { margin-left: auto; }
  .site-actions .btn-ghost { display: none; }
  .hero { padding: 46px 0 38px; }
  .hero h1 { font-size: 30px; }
  .hero-lead { font-size: 14px; }
  .section { padding: 42px 0; }
  .section-head h2 { font-size: 24px; }
  .feature-grid, .pricing-grid, .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
  .app-content { padding: 16px 14px 36px; }
  .topbar { padding: 0 14px; }
  .user-name { display: none; }
  .balance-chip { display: none; }
  .topbar-title { font-size: 14px; }
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .filter-bar { padding: 12px 14px; }
  .filter-bar .field { min-width: 100%; }
  .platform-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 21px; }
  table.table th, table.table td { padding: 10px 12px; }
  .cta-band { padding: 30px 22px; border-radius: 16px; }
  .auth-main { padding: 28px 18px; }
  .bar-chart { gap: 5px; }
  .pay-qr { flex-direction: column; align-items: flex-start; }
  .qr-wrap { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-row { flex-direction: column; gap: 4px; }
  .detail-value { text-align: left; }
}

/* 错误页 */
.error-section { min-height: 58vh; display: flex; align-items: center; }
.error-section .container { display: flex; justify-content: center; }
.error-card { width: min(520px, 100%); text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 48px 34px; box-shadow: var(--shadow); }
.error-code { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -.05em; color: var(--primary); margin-bottom: 14px; }
.error-card h1 { font-size: 24px; margin-bottom: 10px; }
.error-message { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 22px; word-break: break-word; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 轻提示 */
.toast-stack { position: fixed; z-index: 9999; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #111827; color: #fff; border-radius: 10px; padding: 10px 16px; font-size: 13px; box-shadow: 0 10px 26px rgba(15,23,42,.28); opacity: 0; transform: translateY(8px); transition: .2s; max-width: 320px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #b91c1c; }

/* 二维码 */
.qr-wrap canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; border-radius: 8px; }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

/* 移动端打开侧栏时锁定背景 */
body.nav-locked { overflow: hidden; }

@media (max-width: 720px) {
  .error-card { padding: 36px 22px; }
  .error-code { font-size: 52px; }
  .toast-stack { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; text-align: center; }
}

/* ============================================================
   帮助中心 / 资讯中心
   ============================================================ */
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.help-hero, .news-hero {
  padding: 68px 0 54px;
  background:
    radial-gradient(circle at 12% 10%, rgba(99, 102, 241, .14), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, .10), transparent 40%),
    linear-gradient(180deg, #fbfcff, #f5f7fb);
  border-bottom: 1px solid var(--line-soft);
}
.help-hero-inner, .news-hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.help-hero h1, .news-hero h1 { font-size: 38px; letter-spacing: -.025em; margin-bottom: 12px; }
.help-hero p, .news-hero p { color: var(--muted); font-size: 16px; margin-bottom: 0; }
.help-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 660px;
  margin: 26px auto 0;
  padding: 7px 7px 7px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 34px -22px rgba(15, 23, 42, .35);
}
.help-search-icon { color: var(--muted-light); display: inline-flex; }
.help-search input { flex: 1; border: none; outline: none; background: transparent; font: inherit; color: var(--ink); min-width: 0; }
.help-search .btn { border-radius: 999px; padding: 9px 22px; }

.help-cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.help-cat-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: inherit; transition: .2s ease;
}
.help-cat-card:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: var(--shadow); color: inherit; }
.help-cat-icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.help-cat-icon .icon { width: 22px; height: 22px; }
.help-cat-body { flex: 1; min-width: 0; }
.help-cat-body h3 { font-size: 17px; margin-bottom: 5px; }
.help-cat-body p { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.help-cat-count { font-size: 12px; color: var(--primary); font-weight: 600; }
.help-cat-arrow { color: var(--muted-light); align-self: center; }
.help-cat-card:hover .help-cat-arrow { color: var(--primary); transform: translateX(2px); }

.article-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: inherit; transition: .2s ease; }
.article-card:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: var(--shadow); color: inherit; }
.article-card-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 9px; margin-bottom: 10px; align-self: flex-start; }
.article-card h3 { font-size: 17px; margin-bottom: 8px; }
.article-card p { color: var(--muted); font-size: 13px; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-more { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.article-card-more .icon { width: 14px; height: 14px; }

.article-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-list-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); color: inherit; transition: background .15s; }
.article-list-item:last-child { border-bottom: none; }
.article-list-item:hover { background: #fafbff; color: inherit; }
.article-list-main { flex: 1; min-width: 0; }
.article-list-main h3 { font-size: 17px; margin-bottom: 4px; }
.article-list-main p { color: var(--muted); font-size: 13px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-list-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

.help-layout, .news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.help-side { position: sticky; top: 90px; display: grid; gap: 18px; }
.help-side .card + .card { margin-top: 0; }
.help-side-links { display: flex; flex-direction: column; gap: 2px; }
.help-side-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink-soft); font-size: 13px; }
.help-side-link:hover { background: #f5f7fb; color: var(--primary); }
.help-side-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.help-related a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }
.help-related a:last-child { border-bottom: none; }
.help-related a:hover { color: var(--primary); }

.breadcrumb { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.article-hero { padding: 52px 0 34px; background: linear-gradient(180deg, #fbfcff, #f5f7fb); border-bottom: 1px solid var(--line-soft); }
.article-hero .container { max-width: 980px; }
.article-hero h1 { font-size: 34px; letter-spacing: -.02em; margin-bottom: 14px; }
.article-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.article-summary { color: var(--muted); font-size: 15px; margin: 0; max-width: 820px; }

.article-body { overflow: visible; }
.article-body .card-body { padding: 34px 40px; }
.article-body h2 { font-size: 24px; margin: 34px 0 12px; padding-top: 8px; }
.article-body h3 { font-size: 19px; margin: 28px 0 10px; }
.article-body h4 { font-size: 16px; margin: 22px 0 8px; }
.article-body h2:first-child, .article-body h3:first-child { margin-top: 0; }
.article-body p, .article-body li { color: var(--ink-soft); }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 1em; }
.article-body li { margin-bottom: 5px; }
.article-body blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--primary); background: var(--primary-soft); color: var(--ink-soft); border-radius: 0 8px 8px 0; }
.article-body blockquote p { margin: 0; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.article-body a { text-decoration: underline; text-decoration-color: rgba(79, 70, 229, .35); text-underline-offset: 2px; }
.article-body code { background: #f1f5f9; border-radius: 5px; padding: 1px 5px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-body .article-code { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 18px 0; }
.article-body .article-code code { background: transparent; color: inherit; padding: 0; font-size: 13px; line-height: 1.6; }
.article-body img { border-radius: 10px; margin: 16px 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article-body th { background: #fafbfd; }
.article-cover { max-height: 420px; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; }
.article-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.article-pager-item { display: flex; flex-direction: column; gap: 3px; padding: 18px 24px; color: inherit; }
.article-pager-item:hover { background: #fafbff; color: var(--primary); }
.article-pager-item.next { text-align: right; border-left: 1px solid var(--line-soft); }
.article-pager-item strong { font-size: 13px; font-weight: 600; }

.news-top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-top-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; transition: .2s ease; }
.news-top-card:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: var(--shadow); color: inherit; }
.news-cover { height: 172px; background: #eef2ff; overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-top-card:hover .news-cover img { transform: scale(1.04); }
.news-cover-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); }
.news-cover-placeholder .icon { width: 42px; height: 42px; opacity: .75; }
.news-top-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-top-body h3 { font-size: 17px; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-top-body p { color: var(--muted); font-size: 13px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-top-body .muted { margin-top: auto; }

.news-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-list-item { display: flex; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); color: inherit; transition: background .15s; }
.news-list-item:last-child { border-bottom: none; }
.news-list-item:hover { background: #fafbff; color: inherit; }
.news-thumb { width: 160px; height: 108px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: #eef2ff; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-thumb.news-cover-placeholder .icon { width: 28px; height: 28px; }
.news-list-body { flex: 1; min-width: 0; }
.news-list-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.news-list-body h3 { font-size: 18px; margin-bottom: 6px; }
.news-list-body p { color: var(--muted); font-size: 13px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 980px) {
  .help-layout, .news-layout { grid-template-columns: 1fr; }
  .help-side { position: static; }
  .article-card-grid, .news-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-cat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .help-hero, .news-hero { padding: 46px 0 38px; }
  .help-hero h1, .news-hero h1 { font-size: 28px; }
  .help-hero p, .news-hero p { font-size: 14px; }
  .help-search { flex-wrap: wrap; border-radius: 16px; padding: 12px; }
  .help-search input { flex: 1 1 100%; padding: 4px 2px; }
  .help-search .btn { width: 100%; }
  .article-card-grid, .news-top-grid { grid-template-columns: 1fr; }
  .article-list-item { flex-direction: column; gap: 8px; padding: 16px 18px; }
  .article-list-meta { flex-direction: row; align-items: center; }
  .article-hero { padding: 36px 0 24px; }
  .article-hero h1 { font-size: 25px; }
  .breadcrumb { justify-content: flex-start; }
  .article-body .card-body { padding: 20px 18px; }
  .article-pager { grid-template-columns: 1fr; }
  .article-pager-item.next { border-left: none; border-top: 1px solid var(--line-soft); text-align: left; }
  .news-list-item { flex-direction: column; }
  .news-thumb { width: 100%; height: 168px; }
}

/* 系统诊断 */
.diag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.diag-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.diag-item .diag-status { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; background: var(--muted-light); }
.diag-item.ok .diag-status { background: var(--success); }
.diag-item.warn .diag-status { background: var(--warning); }
.diag-item.bad .diag-status { background: var(--danger); }
.diag-item strong { display: block; font-size: 13px; }
.diag-item span { color: var(--muted); font-size: 12px; word-break: break-all; }
.diag-log { max-height: 360px; overflow: auto; background: #0f172a; color: #cbd5e1; border-radius: 10px; padding: 14px 16px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (max-width: 720px) {
  .diag-grid { grid-template-columns: 1fr; }
}
