/* ============================================================
   AIGEP 管理后台主题
   - 明暗双主题（CSS 变量 + [data-theme] 切换）
   - 玻璃拟态顶栏 / 渐变统计卡 / 流畅过渡
   ============================================================ */

:root,
[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6e9f0;
  --text: #1f2430;
  --text-soft: #6b7385;
  --muted: #98a1b3;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --indigo: #6366f1;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --sky: #0ea5e9;
  --violet: #8b5cf6;
  --shadow: 0 8px 30px rgba(31, 36, 48, .06);
  --shadow-lg: 0 18px 50px rgba(31, 36, 48, .12);
  --radius: 16px;
  --sidebar-w: 264px;
}

[data-theme="dark"] {
  --bg: #0e1117;
  --bg-soft: #151a23;
  --surface: #171c26;
  --surface-2: #1d2330;
  --border: #2a3140;
  --text: #e8ebf2;
  --text-soft: #aeb6c6;
  --muted: #6f7889;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }

/* ---------- 布局骨架 ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  /* #1107 双列浅色侧栏（参考全端云风格）：白底 + 右分隔线，dark 走 surface */
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
  /* Phase 6 优化：在 platform-body（flex row，overflow hidden）内 stretch 占满容器高度，
     避免原 height:100vh 在父容器高度 < 100vh 时底部内容被裁切（项目菜单跑到底部） */
  align-self: stretch;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-x: hidden;
  transition: transform .3s ease;
}
[data-theme="dark"] .sidebar { background: var(--surface); border-right-color: var(--border); }

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 20px;
  box-shadow: 0 6px 16px rgba(99,102,241,.45);
}
.brand-text strong { display: block; font-size: 16px; letter-spacing: .5px; color: #fff; }
.brand-text small { color: #8b90b5; font-size: 11px; }

.menu { flex: 1; overflow-y: auto; overflow-x: hidden; margin-top: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px; margin-bottom: 4px;
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s, transform .15s;
}
.menu-item:hover { background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand); transform: translateX(2px); }
.menu-item.is-active {
  background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(139,92,246,.9));
  color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.4);
}
[data-theme="dark"] .menu-item:hover { background: rgba(129,140,248,.14); color: var(--brand); }
.menu-ico { width: 19px; height: 19px; flex-shrink: 0; }

/* ===== #1107 项目态侧栏双列：side-rail（窄图标栏=分组）+ side-panels（宽子菜单栏） ===== */
/* #1107-2：min-height 拉满 nav.menu 全高 → rail 分隔线贯通到底 */
.side-dual { display: flex; gap: 8px; align-items: stretch; min-height: 100%; }
.side-rail {
  width: 62px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 5px;
  padding-right: 8px; border-right: 1px solid var(--border);
}
.side-rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 2px 7px; border-radius: 11px; border: none; background: transparent;
  color: var(--text-soft); font-family: inherit; font-size: 11px; font-weight: 500;
  cursor: pointer; line-height: 1.2;
  transition: background .18s, color .18s, box-shadow .18s;
}
.side-rail-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.side-rail-item.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.side-rail-item .menu-ico { width: 18px; height: 18px; }
.side-rail-name { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-panels { flex: 1; min-width: 0; }
.side-panel[hidden] { display: none; }
.side-panel-title {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); padding: 4px 10px 8px; text-transform: uppercase;
}
.side-panel .menu-item { padding: 9px 11px; font-size: 13.5px; }

.sidebar-foot {
  font-size: 12px; color: var(--muted); padding: 10px 12px;
  display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--border);
}
.sidebar-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

/* 分类标签：非交互小标题，分组下的菜单项统一平铺（无二级菜单，预留分类结构） */
.menu-cat {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: #6a6f95; padding: 16px 12px 6px; font-weight: 700;
  margin-top: 4px;
}
.menu-cat:first-child { padding-top: 8px; }

/* ---------- 主区域 ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.menu-toggle { display: none; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.user-meta { line-height: 1.15; }
.user-meta strong { font-size: 13px; }
.user-meta small { display: block; color: var(--muted); font-size: 11px; }
.logout { font-size: 12px; color: var(--muted); margin-left: 4px; }
.logout:hover { color: var(--rose); }

.content { padding: 24px; flex: 1; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: background .3s, border-color .3s;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 欢迎区 ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.welcome h1 { margin: 0 0 4px; font-size: 22px; }
/* 检测模式徽标（Phase 94：与公开诊断中心同款，透明化「系统检测能力」） */
.dm-prefix { font-size: .78rem; font-weight: 600; color: var(--muted); margin-right: 2px; }
.dx-mode-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 10px;
  padding: 7px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--border); box-shadow: var(--shadow); vertical-align: middle;
}
.dx-mode-dot { width: 7px; height: 7px; border-radius: 50%; }
.dx-mode-good { background: rgba(16, 185, 129, .12); color: #047857; border-color: rgba(16, 185, 129, .35); }
.dx-mode-good .dx-mode-dot { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.dx-mode-warn { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .35); }
.dx-mode-warn .dx-mode-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
[data-theme="dark"] .dx-mode-good { color: #6ee7b7; background: rgba(16, 185, 129, .16); }
[data-theme="dark"] .dx-mode-warn { color: #fcd34d; background: rgba(245, 158, 11, .16); }

/* ---------- 搜索引擎收录地基徽标（Phase 98） ---------- */
.sf-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); }
.sf-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sf-indexed { background: rgba(16,185,129,.12); color: #047857; border-color: rgba(16,185,129,.35); }
.sf-indexed .sf-dot { background: #10b981; }
.sf-not { background: rgba(244,63,94,.12); color: #be123c; border-color: rgba(244,63,94,.35); }
.sf-not .sf-dot { background: #f43f5e; }
.sf-unknown { background: rgba(148,163,184,.14); color: var(--muted); border-color: rgba(148,163,184,.3); }
.sf-unknown .sf-dot { background: var(--muted); }
.sf-locked { background: rgba(245,158,11,.1); color: #b45309; border-color: rgba(245,158,11,.3); border-style: dashed; }
.sf-locked .sf-dot { background: #f59e0b; opacity: .7; }
[data-theme="dark"] .sf-indexed { color: #6ee7b7; background: rgba(16,185,129,.16); }
[data-theme="dark"] .sf-not { color: #fb7185; background: rgba(244,63,94,.16); }
[data-theme="dark"] .sf-unknown { color: #9ca3af; background: rgba(148,163,184,.16); }
[data-theme="dark"] .sf-locked { color: #fcd34d; background: rgba(245,158,11,.14); }
.lg-idx { background: #10b981; }
.lg-noi { background: #f43f5e; }

/* ===== 收录矩阵·逐平台降权明细展开行（Phase 99-3） ===== */
.cov-expand {
  flex: none; width: 22px; height: 22px; margin-right: 8px; padding: 0; cursor: pointer;
  border: 1px solid rgba(148,163,184,.3); border-radius: 7px; background: rgba(148,163,184,.08);
  color: var(--text-soft); font-size: 12px; line-height: 1; transition: all .25s cubic-bezier(.16,1,.3,1);
}
.cov-expand:hover { border-color: var(--brand, #6366f1); color: var(--brand, #6366f1); background: rgba(99,102,241,.1); }
.cov-expand.is-open { transform: rotate(90deg); border-color: var(--brand, #6366f1); color: var(--brand, #6366f1); background: rgba(99,102,241,.14); }
.cov-row { display: flex; align-items: flex-start; }

.cov-detail-row > td { padding: 0 !important; background: rgba(99,102,241,.04); border-top: 1px dashed rgba(148,163,184,.25); }
.cov-detail { padding: 16px 20px 18px; }
.cov-detail-loading, .cov-detail-err { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; }
.cov-detail-err { color: #f43f5e; }
.cov-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(148,163,184,.35); border-top-color: var(--brand, #6366f1); animation: covspin .7s linear infinite; }
@keyframes covspin { to { transform: rotate(360deg); } }

.ex-head { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ex-layer { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: rgba(148,163,184,.08); border: 1px solid rgba(148,163,184,.16); }
.ex-k { font-size: .76rem; color: var(--muted); }
.ex-v { font-size: .95rem; font-weight: 700; color: var(--text); }
.ex-factor { font-size: .8rem; color: var(--muted); }
.ex-mode { font-size: .68rem; font-weight: 600; padding: 1px 7px; border-radius: 20px; }
.ex-mode-real { color: #059669; background: rgba(16,185,129,.14); }
.ex-mode-heur { color: #b45309; background: rgba(245,158,11,.14); }
.ex-layer.ex-sf-indexed { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.08); }
.ex-layer.ex-sf-not { border-color: rgba(244,63,94,.32); background: rgba(244,63,94,.08); }
.ex-layer.ex-sf-unknown { border-color: rgba(148,163,184,.3); }
.ex-layer.ex-sf-locked { border-style: dashed; }

.ex-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ex-reason { font-size: .72rem; color: var(--text-soft); background: rgba(148,163,184,.1); border-radius: 6px; padding: 2px 8px; }

/* 第①层：内容质量 7 维因子分解（Phase 100） */
.ex-grade { font-size: .76rem; color: var(--muted); margin-bottom: 8px; }
.ex-grade-badge { font-size: .74rem; font-weight: 700; padding: 1px 9px; border-radius: 10px; }
.ex-grade-badge.g-s, .ex-grade-badge.g-a { background: rgba(16,185,129,.16); color: #059669; }
.ex-grade-badge.g-b { background: rgba(99,102,241,.14); color: var(--brand, #6366f1); }
.ex-grade-badge.g-c { background: rgba(245,158,11,.16); color: #b45309; }
.ex-grade-badge.g-d { background: rgba(244,63,94,.16); color: #e11d48; }
.ex-fac-title { font-size: .74rem; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.ex-fac-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ex-fac { padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.42); border: 1px solid rgba(148,163,184,.18); }
[data-theme="dark"] .ex-fac { background: rgba(255,255,255,.04); border-color: rgba(148,163,184,.2); }
.ex-fac-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.ex-fac-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.ex-fac-val { font-size: .74rem; font-weight: 700; }
.ex-fac-val.good, .ex-fac-hint.good { color: #059669; }
.ex-fac-val.warn, .ex-fac-hint.warn { color: #b45309; }
.ex-fac-val.bad,  .ex-fac-hint.bad  { color: #e11d48; }
.ex-fac-bar { height: 5px; border-radius: 4px; background: rgba(148,163,184,.18); overflow: hidden; }
.ex-fac-bar > i { display: block; height: 100%; border-radius: 4px; }
.ex-fac-bar > i.good { background: linear-gradient(90deg, #34d399, #059669); }
.ex-fac-bar > i.warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.ex-fac-bar > i.bad  { background: linear-gradient(90deg, #fb7185, #e11d48); }
.ex-fac-hint { font-size: .7rem; margin-top: 5px; opacity: .9; }

/* Phase 101：明细 → 一键跳转到文章优化页 */
.ex-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.ex-fix-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .76rem; font-weight: 600; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 6px 13px; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(99,102,241,.28);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s;
}
.ex-fix-all:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 7px 20px rgba(99,102,241,.38); }
.ex-fac-fix {
  display: inline-block; margin-left: 4px; font-size: .7rem; font-weight: 700;
  text-decoration: none; color: #e11d48; border-bottom: 1px dashed rgba(225,29,72,.6);
  transition: color .15s;
}
.ex-fac-fix:hover { color: #be123c; }
[data-theme="dark"] .ex-fix-all { background: linear-gradient(135deg, #818cf8, #a78bfa); color: #0b1020; }
[data-theme="dark"] .ex-fac-fix { color: #fb7185; border-bottom-color: rgba(251,113,133,.6); }
[data-theme="dark"] .ex-fac-fix:hover { color: #fda4af; }

.ex-pf-title { font-size: .76rem; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.ex-pf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ex-pf { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.4); border: 1px solid rgba(148,163,184,.18); }
[data-theme="dark"] .ex-pf { background: rgba(255,255,255,.04); border-color: rgba(148,163,184,.22); }
.ex-pf-name { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ex-pf-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ex-chip { font-size: .74rem; color: var(--text-soft); background: rgba(148,163,184,.12); border-radius: 7px; padding: 3px 8px; }
.ex-chip b { color: var(--text); font-weight: 700; }
.ex-chip.ex-final { background: rgba(99,102,241,.12); color: var(--brand, #6366f1); }
.ex-chip.ex-final.ok { background: rgba(16,185,129,.14); color: #059669; }
.ex-chip.ex-final.warn { background: rgba(245,158,11,.14); color: #b45309; }
.ex-chip.ex-final.bad { background: rgba(244,63,94,.14); color: #e11d48; }
.ex-op { font-size: .72rem; color: var(--muted); }
.ex-pf-stored { font-size: .72rem; color: var(--muted); margin-top: 7px; }
.ex-pf-stored b { color: var(--text-soft); }
.ex-pf-stored-empty { opacity: .7; }
.ex-bar { height: 5px; border-radius: 4px; background: rgba(148,163,184,.18); margin-top: 8px; overflow: hidden; }
.ex-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand, #6366f1), #8b5cf6); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  border: none; padding: 10px 18px; border-radius: 11px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 20px rgba(99,102,241,.35); transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(99,102,241,.45); }
.btn-primary.block { width: 100%; justify-content: center; padding: 12px; margin-top: 6px; }

/* ---------- 流程引导 ---------- */
.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-step {
  flex: 1; min-width: 150px; position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface-2); transition: .2s; margin: 4px;
}
.flow-step:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.flow-num {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.flow-body { display: flex; flex-direction: column; }
.flow-body strong { font-size: 14px; }
.flow-count {
  margin-left: auto; font-size: 18px; font-weight: 800; color: var(--brand);
}
.flow-arrow { position: absolute; right: -10px; color: var(--muted); font-size: 16px; z-index: 2; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand);
}
.stat-card.accent-indigo::before { background: var(--indigo); }
.stat-card.accent-emerald::before { background: var(--emerald); }
.stat-card.accent-amber::before { background: var(--amber); }
.stat-card.accent-rose::before { background: var(--rose); }
.stat-card.accent-sky::before { background: var(--sky); }
.stat-card.accent-violet::before { background: var(--violet); }
.stat-label { color: var(--text-soft); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.5px; }
.stat-sub { color: var(--muted); font-size: 12px; }

/* Phase 81: 用户归属代理商标签 / 名下用户数 / 开户预填提示 */
.reseller-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 32%, transparent);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tenant-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px;
  padding: 1px 8px; border-radius: 8px; background: var(--surface-2);
  color: var(--text); font-weight: 700; font-size: 13px;
}
.preset-hint {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--text); font-size: 13px; line-height: 1.5;
}

/* ---------- 两栏 ---------- */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 6px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-soft); }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.lg-indigo::before { background: var(--indigo); }
.lg-emerald::before { background: var(--emerald); }
.lg-amber::before { background: var(--amber); }
.chart { width: 100%; height: 240px; }
.chart svg { width: 100%; height: 100%; display: block; }

/* GEO 健康度排名 */
.rank-card { margin-top: 6px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rank-row { display: flex; align-items: center; gap: 14px; }
.rank-badge {
  flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.rank-badge.rank-s { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.rank-badge.rank-a { background: linear-gradient(135deg, #6366f1, #0ea5e9); }
.rank-badge.rank-b { background: rgba(140,150,180,.35); color: var(--text); }
.rank-main { flex: 1; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.rank-title { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-row .rank-bar { height: 7px; }
.fill-s { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.fill-a { background: linear-gradient(90deg, #6366f1, #0ea5e9); }
.fill-b { background: linear-gradient(90deg, #94a3b8, #64748b); }

/* 平台概览 */
.overview { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.overview li { font-size: 13px; }
.ov-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ov-num { color: var(--text-soft); font-weight: 700; }
.bar { height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .9s cubic-bezier(.16,1,.3,1); }

/* ---------- 钻取链接（看板排名 / 平台概览） ---------- */
.rank-link, .ov-link {
  display: block; color: inherit; text-decoration: none;
  border-radius: 10px; padding: 4px 8px; margin: -4px -8px;
  transition: background .18s ease, transform .18s ease;
}
.rank-link { display: flex; align-items: center; gap: 14px; }
.ov-link { font-size: 13px; }
.rank-link:hover, .ov-link:hover {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  transform: translateX(2px);
}
.rank-link:hover .rank-title { color: var(--brand); }
.ov-link:hover .ov-num { color: var(--brand); }

/* ---------- 文章详情页 ---------- */
.crumb { font-size: 13px; margin-bottom: 14px; }
.crumb a { color: var(--brand); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.geo-eff { display: flex; flex-direction: column; gap: 10px; }
.geo-eff-num { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.geo-eff-bar { height: 10px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.geo-eff-bar i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #10b981, #0ea5e9); }
.art-content {
  font-size: 14px; line-height: 1.85; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-soft); border-radius: 12px; padding: 18px 20px;
  max-height: 560px; overflow: auto;
}

/* ---------- GEO 评分拆解 ---------- */
.geo-grade { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.g-s { background: rgba(16,185,129,.16); color: #10b981; }
.g-a { background: rgba(59,130,246,.16); color: #3b82f6; }
.g-b { background: rgba(245,158,11,.16); color: #f59e0b; }
.g-c { background: rgba(239,68,68,.16); color: #ef4444; }
.geo-break { display: flex; flex-direction: column; gap: 14px; }
.gb-row { display: flex; flex-direction: column; gap: 6px; }
.gb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gb-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.gb-val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gb-bar { height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.gb-bar i { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.16,1,.3,1); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- GEO 优化建议 ---------- */
.advice { display: flex; flex-direction: column; gap: 16px; }
.advice-verdict { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text); font-weight: 500; }
.advice-proj { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ap-line { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-soft); margin-bottom: 10px; }
.ap-line b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.ap-bar { height: 9px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.ap-bar i { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.16,1,.3,1); }
.advice-list { display: flex; flex-direction: column; gap: 12px; }
.adv-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; background: var(--surface);
  border-left-width: 3px; transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease;
}
.adv-item:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.adv-item.pri-high { border-left-color: var(--rose); }
.adv-item.pri-mid  { border-left-color: var(--amber); }
.adv-item.pri-low  { border-left-color: var(--sky); }
.adv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.adv-pri { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex: none; }
.pri-high .adv-pri { background: rgba(244,63,94,.14); color: var(--rose); }
.pri-mid  .adv-pri { background: rgba(245,158,11,.16); color: var(--amber); }
.pri-low  .adv-pri { background: rgba(14,165,233,.14); color: var(--sky); }
.adv-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.adv-gain { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--emerald); font-variant-numeric: tabular-nums; }
.adv-title { font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 4px; }
.adv-detail { font-size: 12.5px; line-height: 1.62; color: var(--text-soft); }
.advice-empty { font-size: 13.5px; color: var(--emerald); background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); border-radius: 12px; padding: 14px 16px; }
.advice-foot { font-size: 12px; color: var(--muted); }

/* ---------- GEO 优化成功浮层 ---------- */
.geo-toast {
  position: fixed; left: 50%; bottom: 38px; transform: translate(-50%, 20px);
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 22px; font-size: 14px; font-weight: 600;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .35s cubic-bezier(.16,1,.3,1);
  z-index: 9999;
}
.geo-toast.ok { border-color: rgba(16,185,129,.4); color: var(--emerald); }
.geo-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 撤销优化按钮 ---------- */
.btn-warn {
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #d97706;
}
.btn-warn:hover { background: rgba(245,158,11,.2); }
:root[data-theme="dark"] .btn-warn { color: #fbbf24; }

/* ---------- 优化前后对比 ---------- */
.modal-xl { max-width: 960px; }
.diff-loading { padding: 28px; color: var(--muted); text-align: center; }
.diff-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.dm { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dm-val { font-size: 18px; font-weight: 700; }
.dm-val .up { color: var(--emerald); }
.dm-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.diff-title { margin: 6px 0 12px; font-size: 14px; }
.diff-title s { color: var(--muted); margin-right: 6px; }
.diff-advice { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.25); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; white-space: pre-wrap; color: var(--text-soft); }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.diff-pane { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.diff-pane h4 { margin: 0; padding: 10px 14px; background: var(--bg-soft); font-size: 13px; border-bottom: 1px solid var(--border); }
.diff-pane pre { margin: 0; padding: 14px; max-height: 380px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.6; color: var(--text-soft); }
.diff-pane.after pre { background: rgba(16,185,129,.04); }

/* 优化历史列表（可回滚任意版本） */
.opt-hist { display: flex; flex-direction: column; gap: 8px; }
.oh-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s; }
.oh-row:hover { transform: translateX(2px); border-color: rgba(99,102,241,.4); }
.oh-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oh-idx { font-weight: 700; font-size: 13px; color: var(--text); }
.oh-time { font-size: 12px; }
.oh-score { font-size: 13px; }
.oh-score b { font-size: 15px; }
.oh-score .up { color: var(--emerald); }
.oh-actions { display: flex; gap: 8px; }

/* diff 弹窗头部按钮组 */
.diff-actions { display: flex; align-items: center; gap: 8px; }
.diff-actions .modal-close { margin-left: 4px; }

/* ---------- 收录概率 / 待优化 ---------- */
.stat-mini.sm-warn { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.28); }
.stat-mini.sm-warn .sm-num { color: #f59e0b; }
.stat-mini.sm-warn .sm-label { color: #b9770a; }
:root[data-theme="dark"] .stat-mini.sm-warn .sm-label { color: #fbbf24; }

.prob-cell { display:flex; align-items:center; gap:8px; }
.prob-num { font-weight:600; font-size:13px; min-width:36px; }
.prob-cell .rate-bar.sm { flex:1; max-width:110px; height:6px; }
.prob-cell .rate-bar.sm i { background: linear-gradient(90deg,#10b981,#34d399); }
.prob-reason { font-size:11px; color:var(--muted); cursor:help; border-bottom:1px dotted var(--border); white-space:nowrap; }

/* ---------- 占位页 ---------- */
.placeholder-card { text-align: center; padding: 56px 20px; }
.ph-ico { font-size: 46px; margin-bottom: 8px; }
.placeholder-card h2 { margin: 6px 0; }
.placeholder-card .btn-primary { margin-top: 18px; }
.ph-note { max-width: 620px; margin: 12px auto 4px; font-size: 13px; line-height: 1.75;
  color: var(--text); background: rgba(99,102,241,.07);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; text-align: left; }

/* ---------- 登录页 ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(99,102,241,.18), transparent),
              radial-gradient(900px 500px at 0% 110%, rgba(139,92,246,.16), transparent), var(--bg); }
.login-wrap {
  width: min(880px, 92vw); display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.login-card { padding: 40px 38px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.lb-logo { width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: grid; place-items: center; font-weight: 800; }
.lb-name { font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.login-card h2 { margin: 0 0 4px; font-size: 22px; }
.login-card form { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 13px; color: var(--text-soft); margin-top: 10px; }
.login-card input {
  padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; outline: none; transition: .2s;
}
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.err { color: var(--rose); font-size: 13px; min-height: 18px; margin-top: 8px; }
/* 表单字段容器：全局缺 display 定义时 <label> 是 inline，同一块里的多个 .fld 会被塞进同一个
   行盒 —— 当上一项末尾是未占满宽度的 .hint 时，下一项的标签文字就被拉到**那一行右侧**
   （#1136 P3-C 实测：「显示名」出现在上一条 hint 右边）。`.fld` 的既定写法是「label 包住
   标签文字 + 控件 + 提示」，语义上就是块级，显式声明即可，不影响 --accent 等既有变量。 */
.fld { display: block; }
/* 原写法只有 margin-top，而 margin 对 inline 元素**无效** —— 说明本意就是块级（独占一行）。 */
.hint { display: block; margin-top: 16px; font-size: 12px; color: var(--muted); }
.hint code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; }

.login-aside {
  position: relative; padding: 44px 36px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #4338ca, #7c3aed 60%, #9333ea);
  display: flex; flex-direction: column; justify-content: center;
}
.aside-glow { position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.18); filter: blur(40px); top: -60px; right: -40px; }
.login-aside h3 { font-size: 24px; line-height: 1.4; margin: 0 0 18px; }
.login-aside ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.login-aside li { padding: 12px 14px; background: rgba(255,255,255,.12); border-radius: 11px; backdrop-filter: blur(6px); font-size: 14px; }
.theme-float { position: fixed; top: 18px; right: 18px; z-index: 50; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; z-index: 100; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: grid; }
  .stat-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}

/* ============================================================
   通用后台组件：工具栏 / 数据表格 / 徽标 / 分页 / 模态框 / Toast
   —— 供 keyword / expand / article 等列表页复用
   ============================================================ */

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search {
  flex: 1; min-width: 220px; position: relative; display: flex; align-items: center;
}
.toolbar .search svg {
  position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted);
}
.toolbar .search input {
  width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.toolbar .search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.toolbar select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px;
}
.toolbar .spacer { flex: 1; }

/* 按钮族 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px;
  cursor: pointer; transition: all .2s; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none;
  padding: 10px 16px; font-weight: 600; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(99,102,241,.4); color:#fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--rose); border-color: rgba(244,63,94,.4); }
.btn-danger:hover { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.link-btn { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.link-btn.danger { color: var(--rose); }
.link-btn:hover { text-decoration: underline; }

/* 数据表格 */
.table-wrap { overflow-x: auto; border-radius: 14px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th, table.data-table td {
  padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data-table th { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .02em;
  background: var(--surface-2); }
table.data-table tbody tr { transition: background .15s; }
table.data-table tbody tr:hover { background: var(--surface-2); }
table.data-table td.col-main { white-space: normal; font-weight: 600; color: var(--text); }
table.data-table td .sub { color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag-chip { background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
  padding: 2px 9px; border-radius: 999px; font-size: 12px; }

/* 状态徽标 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-on { background: rgba(16,185,129,.12); color: var(--emerald); }
.badge-on .dot { background: var(--emerald); }
.badge-off { background: rgba(148,163,184,.14); color: var(--muted); }
.badge-off .dot { background: var(--muted); }

/* 空状态 */
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty .em-ico { font-size: 34px; margin-bottom: 10px; }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.pagination .pg { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text);
  font-size: 13px; cursor: pointer; transition: all .15s; }
.pagination .pg.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none; }
.pagination .pg:hover:not(.active) { border-color: var(--brand); color: var(--brand); }
.pagination .pg-info { color: var(--muted); font-size: 13px; margin-right: auto; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,18,28,.5); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-mask.open { display: flex; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn .25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px;
  border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }

/* Phase 102：focus=key 自动定位短板字段的横幅与高亮脉冲 */
.focus-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 11px 14px;
  border-radius: 12px; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 18px rgba(99,102,241,.28); }
.focus-banner .fb-ico { font-size: 16px; line-height: 1; }

/* 账号模态框信息横幅 */
.account-banner { display: none; margin-bottom: 14px; padding: 10px 13px;
  border-radius: 11px; background: var(--bg-soft); border: 1px dashed var(--border);
  font-size: 13px; color: var(--text-soft); }
.account-banner.show { display: block; background: rgba(99,102,241,.07); border-color: rgba(99,102,241,.25); }
.account-banner .ab-line { line-height: 1.7; }
.focus-banner .fb-text { color: rgba(255,255,255,.95); }
.focus-banner .fb-text b { color: #fff; }
.focus-banner .fb-action { margin-left: auto; flex: none; cursor: pointer; font-size: 12px; font-weight: 700;
  padding: 5px 13px; border-radius: 9px; color: #fff; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.55); transition: all .2s ease; }
.focus-banner .fb-action:hover { background: rgba(255,255,255,.34); transform: translateY(-1px); }
@keyframes focusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(99,102,241,.55); border-color: #6366f1; }
  70%  { box-shadow: 0 0 0 9px rgba(99,102,241,0); border-color: #6366f1; }
  100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); border-color: var(--border); }
}
.focus-pulse { animation: focusPulse 1.4s ease-out 1; border-color: #6366f1 !important; }
[data-theme="dark"] .focus-banner { background: linear-gradient(135deg, #818cf8, #a78bfa); color: #0b1020; }
[data-theme="dark"] .focus-banner .fb-text { color: rgba(11,16,32,.92); }
[data-theme="dark"] .focus-banner .fb-text b { color: #0b1020; }
[data-theme="dark"] .focus-banner .fb-action { color: #0b1020; background: rgba(11,16,32,.16);
  border-color: rgba(11,16,32,.32); }
[data-theme="dark"] .focus-banner .fb-action:hover { background: rgba(11,16,32,.3); }
[data-theme="dark"] .focus-pulse { animation: focusPulse 1.4s ease-out 1; border-color: #a78bfa !important; }

/* 表单 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; }
.form-row .req { color: var(--rose); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); background: var(--surface); }
.form-row textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Toast */
.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 400;
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-left: 4px solid var(--brand); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 14px; animation: toastIn .25s ease; min-width: 220px; }
.toast.ok { border-left-color: var(--emerald); }
.toast.err { border-left-color: var(--rose); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 待审徽标（琥珀色） */
.badge-warn { background: rgba(245,158,11,.14); color: #d97706; }
.badge-warn .dot { background: #f59e0b; }

/* 顶部状态统计小卡 */
.stat-mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.stat-mini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.stat-mini.warn::before { background: #f59e0b; }
.stat-mini.on::before { background: var(--emerald); }
.stat-mini.off::before { background: var(--muted); }
.stat-mini .sm-val { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-mini .sm-label { font-size: 13px; color: var(--muted); }
.stat-mini.warn .sm-val { color: #d97706; }
.stat-mini.on .sm-val { color: var(--emerald); }

/* 问题 / 答案列 */
table.data-table td.col-q { white-space: normal; min-width: 240px; line-height: 1.5; }
table.data-table td.col-ans { white-space: normal; min-width: 180px; line-height: 1.4; }
table.data-table td.col-title { min-width: 220px; }

/* GEO 健康度小条 */
.geo-mini { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.geo-mini .geo-num { font-size: 13px; font-weight: 700; width: 22px; text-align: right; }
.geo-mini .geo-track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.geo-mini .geo-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.geo-mini.high .geo-num { color: var(--emerald); }
.geo-mini.high .geo-fill { background: var(--emerald); }
.geo-mini.mid .geo-num { color: #d97706; }
.geo-mini.mid .geo-fill { background: #f59e0b; }
.geo-mini.low .geo-num { color: var(--rose); }
.geo-mini.low .geo-fill { background: var(--rose); }

/* 加宽模态框（长文编辑） */
.modal-lg { max-width: 720px; }

/* 批量操作条 */
.batch-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); }
.batch-bar .chk-all { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-soft); cursor: pointer; }
.batch-bar .muted { font-size: 13px; }
.row-chk, .chk-all input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ---------- 发布任务页专用 ---------- */
/* 统计小卡行（4 列） */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.stat-mini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; background: var(--muted); }
.stat-mini .sm-num { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-mini .sm-label { font-size: 13px; color: var(--muted); }
.stat-mini.sm-pending::before { background: #f59e0b; }
.stat-mini.sm-pending .sm-num { color: #d97706; }
.stat-mini.sm-running::before { background: var(--brand); }
.stat-mini.sm-running .sm-num { color: var(--brand); }
.stat-mini.sm-success::before { background: var(--emerald); }
.stat-mini.sm-success .sm-num { color: var(--emerald); }
.stat-mini.sm-failed::before { background: var(--rose); }
.stat-mini.sm-failed .sm-num { color: var(--rose); }

/* 徽标配色变体 */
.badge-info { background: rgba(99,102,241,.12); color: var(--brand); }
.badge-ok { background: rgba(16,185,129,.12); color: var(--emerald); }
.badge-danger { background: rgba(244,63,94,.12); color: var(--rose); }
.badge-hot { background: rgba(245,158,11,.15); color: #d97706; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(99,102,241,.12); color: var(--indigo); font-size: 12px; margin: 2px 4px 2px 0; }
.tag-mini { display: inline-block; padding: 0 5px; border-radius: 4px; background: rgba(148,163,184,.2); color: #64748b; font-size: 10px; margin-left: 4px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 6px; }
.module-group { margin-bottom: 14px; }
.module-group-label { font-size: 12.5px; font-weight: 700; color: var(--text-soft); letter-spacing: .04em; margin-bottom: 6px; }
.module-group .check-grid { gap: 8px 16px; }
.app-check { padding: 6px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; background: rgba(255,255,255,.04); }
.app-check.is-placeholder { opacity: .65; border-style: dashed; }
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--emerald, #10b981); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.badge-soft { background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border); }
.badge-real { background: rgba(99,102,241,.14); color: var(--brand); border: 1px solid rgba(99,102,241,.35); }

/* 表格列修饰 */
table.data-table td.col-result { white-space: normal; min-width: 160px; color: var(--text-soft); }
table.data-table td.col-muted { color: var(--muted); font-size: 12.5px; }

/* 模态关闭键（兼容 .modal-x） */
.modal-x { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-x:hover { color: var(--text); }

/* 行内操作链接 */
.link { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.link:hover { text-decoration: underline; }
.link-danger { color: var(--rose); }
.link-danger:hover { color: var(--rose); }

/* 模态表单字段（替代 .form-row，语义更清晰） */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; }
.input { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); background: var(--surface); }

/* ---------- 收录检测页专用 ---------- */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.chart-card h3 { font-size: 15px; margin: 0 0 4px; color: var(--text); }
.chart-card .muted { font-size: 12.5px; margin-bottom: 12px; }
.chart-svg svg { width: 100%; height: auto; display: block; }

.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.pf-row:last-child { border-bottom: none; padding-bottom: 0; }
.pf-name { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pf-name b { font-size: 14px; color: var(--text); font-weight: 600; }
.pf-name span { font-size: 12px; color: var(--muted); }
.rate-bar { height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; max-width: 320px; }
.rate-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--emerald)); }
.pf-val { font-size: 16px; font-weight: 700; color: var(--emerald); white-space: nowrap; }

.stat-mini.sm-info::before { background: var(--brand); }
.stat-mini.sm-info .sm-num { color: var(--brand); }
.stat-mini.sm-rate::before { background: #8b5cf6; }
.stat-mini.sm-rate .sm-num { color: #8b5cf6; }

@media (max-width: 720px) {
  .toolbar .search { min-width: 100%; }
  table.data-table { font-size: 13px; }
  .stat-mini-row { grid-template-columns: 1fr; }
  .eff-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- AI 模型配置页专用 ---------- */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 1.7; }
.chip-cap { background: rgba(99,102,241,.12); color: var(--brand); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-soft); }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-soft); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.col-ops { display: flex; flex-wrap: wrap; gap: 4px 12px; line-height: 1.6; max-width: 100%; }
.col-ops .link, .col-ops .link-danger, .col-ops button { white-space: nowrap; }
.star-on { color: #f59e0b; font-size: 16px; }
.req { color: var(--rose); }
.radio-row { display: flex; flex-wrap: wrap; gap: 18px; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-soft); cursor: pointer; }
.radio input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ---------- 平台管理页专用 ---------- */
.stat-mini.sm-warn::before { background: var(--amber); }
.stat-mini.sm-warn .sm-num { color: var(--amber); }
.sort-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px;
  color: var(--text-soft); background: var(--bg-soft);
  border: 1px solid var(--border); cursor: pointer; font-size: 14px; line-height: 1;
  transition: all .15s ease; margin-right: 2px;
}
.sort-btn:hover { color: #fff; background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }

/* ---------- 客户管理页专用 ---------- */
.toolbar-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-form .search, .search {
  height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; min-width: 240px;
}
.toolbar-form .search:focus, .search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.toolbar-form .select, .select {
  height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; cursor: pointer;
}
.toolbar-form .btn { height: 38px; }
.stat-mini-num { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-mini-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.text-ok { color: var(--emerald); }
.text-muted { color: var(--muted); }
.text-info { color: var(--brand); }
.chip-rose { background: rgba(244,63,94,.12); color: var(--rose); }
.chip-warn { background: rgba(245,158,11,.14); color: #d97706; }
.chip-info { background: rgba(99,102,241,.12); color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 文章列表：单篇内联预估收录率 ---------- */
.inc-cell { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.inc-bar { display: inline-flex; align-items: center; gap: 8px; }
.inc-num { font-size: 13px; font-weight: 700; min-width: 38px; }
.inc-track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.inc-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--emerald)); transition: width .4s ease; }
.inc-bar.high .inc-num { color: var(--emerald); }
.inc-bar.mid  .inc-num { color: #d97706; }
.inc-bar.low  .inc-num { color: var(--rose); }
.inc-meta { display: flex; align-items: center; gap: 6px; }
.inc-best { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- 文章详情：实测 vs 预估 收录率 ---------- */
.eff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.eff-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.eff-label { font-size: 13px; color: var(--text-soft); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.eff-num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.eff-accent { color: var(--brand); }
.eff-sub { font-size: 12px; margin-top: 8px; }
.eff-bar2 i { background: linear-gradient(90deg, var(--brand), var(--emerald)); }
.eff-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 界面设置页专用 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.settings-card { padding: 20px 22px; }
.settings-group-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--brand); text-transform: uppercase; margin-bottom: 14px; }
.settings-card .field:last-child { margin-bottom: 0; }

/* ---------- GEO 产物展示（站点管理 / 产物页） ---------- */
.artifact-card { padding: 18px 20px; }
.artifact-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.artifact-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.artifact-sub { font-size: 12px; color: var(--muted); }
.artifact-actions { display: flex; gap: 8px; flex-shrink: 0; }
.artifact-pre {
  margin: 0; padding: 16px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.6; color: var(--text-soft);
  white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

/* FAQ 列表：答案列多行截断 + 关联提示 */
.answer-cell {
  max-width: 420px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.tip-line {
  margin: 4px 2px 0;
  font-size: 13px;
}
.tip-line .link { font-weight: 600; }

/* ---------- 健康度时间线 ---------- */
.line-svg { width: 100%; height: auto; display: block; margin-top: 4px; }
.line-svg .grid { stroke: var(--border); stroke-width: 1; }
.line-svg .ax { fill: var(--muted); font-size: 11px; }
.line-svg .ptlbl { fill: var(--text); font-size: 12px; font-weight: 700; }

.feed { list-style: none; margin: 0; padding: 0; position: relative; }
.feed::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.feed-item { position: relative; padding: 10px 0 10px 28px; }
.feed-dot { position: absolute; left: 2px; top: 16px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--border); }
.feed-create .feed-dot { background: var(--brand); }
.feed-optimize .feed-dot { background: var(--emerald); }
.feed-detect .feed-dot { background: #8b5cf6; }
.feed-body { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feed-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.feed-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.tag-create { background: rgba(99,102,241,.14); color: var(--brand); }
.tag-optimize { background: rgba(16,185,129,.14); color: var(--emerald); }
.tag-detect { background: rgba(139,92,246,.14); color: #8b5cf6; }
.feed-title { color: var(--text); font-weight: 600; text-decoration: none; }
.feed-title:hover { text-decoration: underline; }
.feed-delta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-delta b { color: var(--emerald); }
.feed-time { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* ---------- 媒体账号 OAuth ---------- */
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.flash-ok { background: rgba(16,185,129,.12); color: var(--emerald); border: 1px solid rgba(16,185,129,.3); }
.flash-error { background: rgba(244,63,94,.1); color: #f43f5e; border: 1px solid rgba(244,63,94,.3); }
.flash-x { background: none; border: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }
.flash-x:hover { opacity: 1; }
.link-primary { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-primary:hover { text-decoration: underline; }
.muted.sm { font-size: 12px; margin-top: 2px; }
.badge-danger { background: rgba(244,63,94,.14); color: #f43f5e; border: 1px solid rgba(244,63,94,.3); padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }


/* ==================== 官网站点 / 网站集成（Phase 29 v2） ==================== */

/* ---- 平台选择卡片 ---- */
.plat-picker-inline { padding: 28px 26px 8px; }
.plat-picker-head { margin-bottom: 22px; }
.plat-picker-head h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.plat-picker-head p { margin: 0; font-size: 13px; }

.plat-group { margin-bottom: 26px; }
.plat-group-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.plat-group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.plat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.plat-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 12px 16px; cursor: pointer; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, border-color .2s;
}
.plat-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: var(--shadow);
}
.plat-card.is-off { opacity: .5; cursor: not-allowed; }
.plat-card.is-off:hover { transform: none; box-shadow: none; border-color: var(--border); }

.plat-logo { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; }
.plat-logo svg { width: 100%; height: 100%; }
.plat-name { font-size: 13px; font-weight: 600; color: var(--text); }
.plat-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
}
.plat-tag-on {
  background: rgba(16,185,129,.12); color: var(--emerald); border-color: rgba(16,185,129,.28);
}

/* ---- 绑定表单（两栏：表单 + 指引） ---- */
#editModal .modal { max-width: 900px; }
.cms-form-body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .cms-form-body { grid-template-columns: 1fr; } }

.cms-plat-current {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.cms-plat-current .plat-logo { width: 30px; height: 30px; flex: 0 0 auto; }
.cms-plat-current > div { flex: 1; min-width: 0; }
.cur-plat-name { font-size: 14px; font-weight: 700; }

.cms-form-side {
  padding: 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.side-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-bottom: 10px; }
.cms-guide { font-size: 12.5px; line-height: 1.75; color: var(--text-soft); }
.cms-guide p { margin: 0 0 8px; }
.cms-guide ol { margin: 0 0 8px; padding-left: 18px; }
.cms-guide li { margin-bottom: 5px; }
.cms-guide code {
  background: var(--bg-soft); padding: 1px 5px; border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
}
.cms-guide .tip {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(99,102,241,.08); border-left: 3px solid var(--brand); color: var(--text-soft);
}
.side-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.btn-block { display: block; width: 100%; text-align: center; text-decoration: none; margin-bottom: 6px; }
.btn-block.is-disabled { opacity: .45; pointer-events: none; }

/* ============ 智能体专家 / 多模态创作台 ============ */
.welcome-actions { display: flex; gap: 10px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

.agent-studio {
  display: grid; grid-template-columns: 260px 1fr; gap: 18px;
  height: calc(100vh - 230px); min-height: 480px;
}
.agent-sessions {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px;
}
.as-head { font-size: 13px; font-weight: 600; color: var(--muted); padding: 2px 4px 8px; }
.as-empty { color: var(--muted); font-size: 13px; padding: 20px 6px; text-align: center; }
.as-item {
  display: flex; align-items: center; gap: 8px;
  text-align: left; border: 1px solid transparent; background: var(--surface-2); border-radius: 11px;
  padding: 10px 12px; cursor: pointer; transition: all .18s cubic-bezier(.16,1,.3,1);
}
.as-item:hover { transform: translateY(-1px); border-color: var(--brand); }
.as-item.is-active { border-color: var(--brand); background: rgba(99,102,241,.08); }
.as-main { flex: 1; min-width: 0; }
.as-del {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1;
  opacity: 0; transform: translateX(4px);
  transition: opacity .15s, transform .15s, background .15s, color .15s;
  display: grid; place-items: center;
}
.as-item:hover .as-del { opacity: 1; transform: none; }
.as-del:hover { background: rgba(244, 63, 94, .14); color: var(--rose); }
.as-title { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-preview { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.agent-chat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.chat-title { font-size: 14px; font-weight: 600; color: var(--text); }
.chat-body {
  flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.chat-empty, .chat-hint { margin: auto; text-align: center; color: var(--muted); font-size: 13.5px; }
.ce-ico { font-size: 38px; margin-bottom: 10px; }
.bubble { max-width: 82%; padding: 12px 14px; border-radius: 14px; line-height: 1.65; font-size: 13.5px; position: relative; }
.bubble-text { white-space: pre-wrap; word-break: break-word; }
.bubble-user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-bottom-right-radius: 4px; }
.bubble-bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble-assets { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 单条消息删除按钮（悬停浮现）---------- */
.bubble .b-del {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 20px; height: 20px; border-radius: 6px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 11px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transform: scale(.8);
  transition: opacity .15s, transform .15s, background .15s, color .15s;
}
.bubble:hover .b-del { opacity: 1; transform: none; }
.bubble .b-del:hover { background: rgba(244,63,94,.16); color: var(--rose); }

/* ---------- AI 思考中气泡（loading）---------- */
.bubble-loading { padding: 14px 16px; }
.bubble-loading .bubble-text {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; color: var(--text-soft);
}
.bubble-loading .ld-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  animation: ld-bounce 1.2s infinite ease-in-out both;
}
.bubble-loading .ld-dot:nth-child(1) { animation-delay: 0s; }
.bubble-loading .ld-dot:nth-child(2) { animation-delay: .15s; }
.bubble-loading .ld-dot:nth-child(3) { animation-delay: .3s; }
.bubble-loading .ld-text {
  margin-left: 8px; font-size: .85rem; color: var(--muted);
}
@keyframes ld-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40%           { transform: translateY(-6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble-loading .ld-dot { animation: none; opacity: .7; }
}
.bchip { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: rgba(99,102,241,.14); color: var(--brand); }
.bubble-user .bchip { background: rgba(255,255,255,.22); color: #fff; }

.chat-assets { padding: 8px 18px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ca-label { font-size: 12px; color: var(--muted); }
.ca-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px 3px 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.ca-chip button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 12px; line-height: 1; }

.chat-input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-input textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 13.5px; background: var(--surface-2); color: var(--text); outline: none;
}
.chat-input textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
/* 素材附件按钮（输入框前边的方框 + 号） */
.ci-attach {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
  cursor: pointer; display: grid; place-items: center;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.ci-attach:hover {
  color: var(--brand); border-color: var(--brand); background: rgba(99,102,241,.08);
  transform: translateY(-1px);
}
.ci-attach:active { transform: translateY(0); }
.ci-attach.is-active { color: var(--brand); border-color: var(--brand); background: rgba(99,102,241,.12); }
/* 选中素材后角标 */
.ci-attach .badge {
  position: absolute; transform: translate(14px, -14px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.ci-attach { position: relative; }

/* 素材选择弹窗 */
.agent-asset-modal { max-width: 720px; width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
.agent-asset-tabs { display: flex; gap: 8px; padding: 4px 0 12px; align-items: center; }
.aat { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.aat.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.aat-upload { margin-left: auto; border: 1px dashed var(--brand); color: var(--brand); padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.agent-asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; overflow: auto; padding: 6px 2px; }
.ag-cell { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; background: var(--surface-2); transition: all .18s; }
.ag-cell:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99,102,241,.18); }
.ag-cell.is-sel { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.ag-cell img { width: 100%; height: 92px; object-fit: cover; display: block; }
.ag-cell .ag-video { height: 92px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--brand); background: var(--surface); }
.ag-name { font-size: 11.5px; padding: 6px 8px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-cell input { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; accent-color: var(--brand); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }

/* 素材库页（gallery / videolib） */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.asset-cell { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.asset-cell img { width: 100%; height: 140px; object-fit: cover; display: block; }
.asset-video { height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--brand); background: var(--surface); }
.av-ico { font-size: 30px; }
.av-name { font-size: 12px; color: var(--text-soft); padding: 0 10px; text-align: center; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-top: 1px solid var(--border); }
.asset-name { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-del { border: none; background: none; color: #ef4444; cursor: pointer; font-size: 12px; }

@media (max-width: 860px) {
  .agent-studio { grid-template-columns: 1fr; height: auto; }
  .agent-sessions { max-height: 200px; }
  .chat-body { min-height: 320px; }
}

/* 暗色主题微调（沿用既有 token） */
[data-theme="dark"] .agent-studio,
[data-theme="dark"] .agent-chat,
[data-theme="dark"] .agent-sessions { background: var(--surface); }
[data-theme="dark"] .bubble-bot { background: #1f2733; }
[data-theme="dark"] .chat-body { background: linear-gradient(180deg, #11151d, var(--surface)); }

/* ---------- 竞品对位分析（Rank 页） ---------- */
.rank-comp-list { display: flex; flex-direction: column; gap: 12px; }
.rank-comp-item {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface-2);
}
.rc-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rc-row b { font-size: 14px; }
.rank-comp-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  color: var(--amber, #d97706); background: rgba(245,158,11,.12);
}
.rc-bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 7px; }
.rc-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.rc-meta { font-size: 12px; color: var(--muted); }
.rc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rc-detect { padding: 6px 14px; font-size: 13px; cursor: pointer; }
.rc-detect:disabled { opacity: .6; cursor: progress; }

/* ---------- RBAC 角色徽标（顶栏） ---------- */
.user-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; line-height: 1.5; }

/* ---------- RBAC 角色管理：权限树 ---------- */
.perm-tree { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; max-height: 340px; overflow: auto; padding: 4px 2px; }
.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.perm-group-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.perm-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.perm-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; user-select: none; }
.perm-chk input { accent-color: var(--brand); }
@media (max-width: 640px) { .perm-tree { grid-template-columns: 1fr; } }

/* ---------- 用户管理：表单双列网格 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .form-row { margin-bottom: 14px; }

/* ---------- 用户管理：配额用量展示 ---------- */
.usage-list { display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.urow { display: grid; grid-template-columns: 110px 1fr 92px; align-items: center; gap: 10px; font-size: 13px; }
.uname { color: var(--text-soft); font-weight: 600; }
.uval { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ubar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.ubar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s cubic-bezier(.16,1,.3,1); }
.ubar.over > i { background: linear-gradient(90deg, #f43f5e, #fb7185); }
@media (max-width: 640px) { .urow { grid-template-columns: 84px 1fr 70px; font-size: 12px; } }

/* ---------- 配额超限横幅（Phase 61 · code=402 全局提示） ---------- */
.quota-banner {
  position: fixed; right: 24px; bottom: 24px; z-index: 9999;
  width: min(400px, calc(100vw - 48px));
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(244, 63, 94, .34);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
  backdrop-filter: blur(22px) saturate(160%);
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .32s cubic-bezier(.16,1,.3,1), transform .32s cubic-bezier(.16,1,.3,1);
}
.quota-banner.show { opacity: 1; transform: translateY(0) scale(1); }
.quota-banner .qb-main { flex: 1; min-width: 0; }
.quota-banner .qb-title { font-size: 14px; font-weight: 700; color: #fb7185; margin-bottom: 5px; }
.quota-banner .qb-desc { font-size: 13px; line-height: 1.6; color: var(--text); margin-bottom: 10px; }
.quota-banner .qb-bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.quota-banner .qb-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f43f5e, #fb7185); transition: width .5s cubic-bezier(.16,1,.3,1); }
.quota-banner .qb-meta { margin-top: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quota-banner .qb-close {
  flex: none; width: 24px; height: 24px; line-height: 1;
  border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 19px;
  transition: background .2s, color .2s, transform .2s cubic-bezier(.16,1,.3,1);
}
.quota-banner .qb-close:hover { background: rgba(255,255,255,.08); color: var(--text); transform: scale(1.08); }
@media (max-width: 640px) { .quota-banner { right: 12px; left: 12px; bottom: 12px; width: auto; } }

/* ===== Phase 65 · 用户列表配额迷你进度条 + 套餐徽标 ===== */
.plan-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; }
.plan-badge.plan-self-hosted { background: #f1f5f9; color: #334155; }
.plan-badge.plan-free { background: #e2e8f0; color: #475569; }
.plan-badge.plan-basic { background: #dbeafe; color: #1d4ed8; }
.plan-badge.plan-pro { background: #ede9fe; color: #6d28d9; }
.plan-badge.plan-enterprise { background: #fef3c7; color: #92400e; }
.col-quota { min-width: 220px; }
.quota-mini { display: flex; flex-direction: column; gap: 5px; padding: 6px 0; }
.mq { display: grid; grid-template-columns: 56px 1fr 52px; align-items: center; gap: 8px; font-size: 11px; }
.mq-lbl { color: var(--muted); white-space: nowrap; }
.mq-val { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mq-val.is-warn { color: #d97706; font-weight: 700; }
.mq-val.is-over { color: #e11d48; font-weight: 700; }
.mq-bar { height: 5px; border-radius: 999px; background: rgba(127,127,127,.14); overflow: hidden; }
.mq-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s cubic-bezier(.16,1,.3,1); }
.mq-empty { opacity: .4; }

/* ============================================================
   Phase 75 · 平台-项目两层架构样式
   - 平台层：项目卡片网格
   - 项目层：返回平台徽标 + 顶部应用横排
   ============================================================ */

/* ---------- 通用页面容器 ---------- */
/* 内容区满铺：满铺内容区，根据屏宽自适应内边距。 */
.page { padding: 24px 28px 36px; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.welcome h1 { margin: 0 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.2px; }
.welcome .muted { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ---------- 平台层：项目卡片网格 ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s cubic-bezier(.16,1,.3,1), border-color .3s;
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0; transition: opacity .3s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.project-card:hover::before { opacity: 1; }
.project-card.is-expired { opacity: .72; }

.project-card-head { display: flex; align-items: center; gap: 14px; }
.project-icon {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(99,102,241,.35);
}
.project-meta { min-width: 0; }
.project-meta h3 { margin: 0 0 3px; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-domain { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.project-apps { display: flex; flex-wrap: wrap; gap: 7px; }
.app-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: var(--app-color, var(--brand));
  background: color-mix(in srgb, var(--app-color, var(--brand)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-color, var(--brand)) 26%, transparent);
}
.app-tag-ico { width: 12px; height: 12px; }

.project-info { display: flex; gap: 26px; padding-top: 4px; border-top: 1px dashed var(--border); }
.project-info > div { display: flex; flex-direction: column; gap: 3px; }
.project-info span { font-size: 12px; color: var(--muted); }
.project-info strong { font-size: 13.5px; font-weight: 700; }

.project-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.expired-tip { font-size: 12.5px; font-weight: 700; color: var(--rose); }
.project-card.is-expired .btn-primary { opacity: .5; pointer-events: none; }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; padding: 70px 20px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.empty-state svg { color: var(--brand); opacity: .5; margin-bottom: 14px; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.empty-state .muted { margin: 0; }

/* ---------- 项目层：返回平台徽标 ---------- */
.project-badge {
  margin: 14px 14px 0;
  padding: 9px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
}
.back-to-platform {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: #c7cbe0;
  padding: 5px 10px; border-radius: 9px;
  background: rgba(255,255,255,.05);
  transition: background .2s, color .2s, transform .2s cubic-bezier(.16,1,.3,1);
}
.back-to-platform:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateX(-2px); }
.project-name {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #fff;
  padding: 5px 12px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(99,102,241,.32), rgba(139,92,246,.28));
  max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.25); }

/* 项目切换器 */
.project-switch { position: relative; display: inline-flex; }
.project-name {
  border: none; cursor: pointer; font-family: inherit;
  transition: filter .2s, transform .2s cubic-bezier(.16,1,.3,1);
}
.project-name:hover { filter: brightness(1.12); }
.project-name .chev { transition: transform .25s cubic-bezier(.16,1,.3,1); opacity: .85; }
.project-name[aria-expanded="true"] .chev { transform: rotate(180deg); }
.proj-name-text { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.proj-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 232px; padding: 8px;
  background: rgba(22,24,38,.92);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.42);
  animation: projPop .18s cubic-bezier(.16,1,.3,1);
}
@keyframes projPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.proj-dropdown[hidden] { display: none; }
.proj-dropdown-head {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #8b90ad; padding: 4px 10px 8px; text-transform: uppercase;
}
.proj-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 13.5px; color: #e6e8f5; text-decoration: none;
  transition: background .16s, color .16s;
}
.proj-opt:hover { background: rgba(255,255,255,.08); color: #fff; }
.proj-opt.is-current { background: rgba(99,102,241,.18); color: #fff; }
.proj-opt-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.22); }
.proj-opt-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-opt-check { color: #818cf8; flex: none; }
.proj-dropdown-sep { height: 1px; margin: 6px 4px; background: rgba(255,255,255,.09); }
.proj-opt-all { color: #c7cbe0; font-weight: 600; }
.proj-opt-all:hover { background: rgba(255,255,255,.08); color: #fff; }


/* ---------- 项目层：顶部应用横排 ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(31,36,48,.04);
}
.app-bar-inner {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 30px;
  overflow-x: auto;
}
.app-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; color: var(--text-soft);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s cubic-bezier(.16,1,.3,1);
}
.app-tab-ico { width: 16px; height: 16px; }
.app-tab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #6366f1) 22%, transparent);
  flex: none;
}
.app-tab.is-active .app-tab-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #6366f1) 34%, transparent); }
.app-tab:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.app-tab.is-active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
}

/* =========================================================
   Phase 85 · 项目列表页 v2：Tab 筛选 + 项目卡片网格
   ========================================================= */

/* ---------- 状态 Tab ---------- */
.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}
.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.project-tab:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.project-tab.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 28%, transparent);
}
.project-tab .tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.project-tab.is-active .tab-count { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- 搜索 ---------- */
.project-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search-input-wrap:focus-within {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.search-input-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.project-search .btn-primary { padding: 9px 18px; border-radius: 11px; }
.project-search .btn-ghost { padding: 9px 16px; border-radius: 11px; }
.filter-select {
  appearance: none; -webkit-appearance: none;
  padding: 9px 30px 9px 14px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  max-width: 180px;
  text-overflow: ellipsis;
  transition: border-color .2s, box-shadow .2s;
}
.filter-select:hover { border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.filter-select:focus { outline: none; border-color: color-mix(in srgb, var(--brand) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }

/* ---------- 表单：后缀包裹（子域名 .apex / 自定义域名） ---------- */
.input-suffix-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: border-color .2s, box-shadow .2s;
}
.input-suffix-wrap:focus-within {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.input-suffix-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.input-suffix {
  flex: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}
.input-suffix-wrap.is-ok  { border-color: color-mix(in srgb, #22c55e 45%, transparent); }
.input-suffix-wrap.is-err { border-color: color-mix(in srgb, #ef4444 50%, transparent); }

/* 实时校验提示文案（子域名 / 自定义域名可用性） */
#subHint, #customHint { transition: color .2s; }
#subHint.is-ok,  #customHint.is-ok  { color: #16a34a; }
#subHint.is-err, #customHint.is-err { color: #ef4444; }
#subHint.is-checking, #customHint.is-checking {
  color: color-mix(in srgb, var(--brand) 75%, var(--muted));
}

/* 项目卡片：已绑定自定义域名标识 */
.project-custom-domain {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 9px;
  font-size: 12px;
  color: var(--text);
}
.project-custom-domain svg { flex: none; color: var(--brand); }

/* ---------- 卡片网格 v2 ---------- */
.project-grid-v2 {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}
.project-grid-v2 .project-card {
  position: relative;
  padding: 0;
  gap: 0;
  overflow: visible;
}
.project-grid-v2 .project-card::before { border-radius: var(--radius) var(--radius) 0 0; }

/* 头部 */
.project-card-head-v2 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
}
.project-logo {
  width: 52px; height: 52px;
  flex: none;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 28%, transparent);
  overflow: hidden;
}
.project-logo img { width: 100%; height: 100%; object-fit: cover; }
.project-title-wrap { min-width: 0; flex: 1; }
.project-title-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 5px;
}
.project-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-subtitle {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.project-id {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  font-weight: 600;
}
.project-domain { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-owner { white-space: nowrap; padding: 1px 7px; border-radius: 5px; background: rgba(56,189,248,.14); color: #0ea5e9; font-weight: 600; }

/* 徽章 */
.project-badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.badge-success { color: #0f766e; background: #d1fae5; }
.badge-trial   { color: #7c3aed; background: #ede9fe; }
.badge-warning { color: #b45309; background: #fef3c7; }
.badge-danger  { color: #be123c; background: #ffe4e6; }
.badge-disabled{ color: #4b5563; background: #e5e7eb; }
.badge-trash   { color: #be123c; background: #ffe4e6; }

/* 暗色主题 */
[data-theme="dark"] .badge-success { color: #34d399; background: rgba(52,211,153,.14); }
[data-theme="dark"] .badge-trial   { color: #a78bfa; background: rgba(167,139,250,.14); }
[data-theme="dark"] .badge-warning { color: #fbbf24; background: rgba(251,191,36,.14); }
[data-theme="dark"] .badge-danger  { color: #fb7185; background: rgba(251,113,133,.14); }
[data-theme="dark"] .badge-disabled{ color: #9ca3af; background: rgba(156,163,175,.14); }
[data-theme="dark"] .badge-trash   { color: #fb7185; background: rgba(251,113,133,.14); }

/* 备注 */
.project-remark {
  margin: 0 18px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 应用行 */
.project-apps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
}
.apps-count {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.apps-icons {
  display: flex; align-items: center; gap: 6px;
}
.app-ico-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--app-color, var(--brand));
  background: color-mix(in srgb, var(--app-color, var(--brand)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-color, var(--brand)) 24%, transparent);
}

/* 统计网格 */
.project-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 18px 14px;
}
.project-stat {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.project-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.project-stat strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 操作按钮 */
.project-actions-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px dashed var(--border);
}
.btn-action {
  flex: 1;
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .18s cubic-bezier(.16,1,.3,1);
}
.btn-action:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn-action svg { flex: none; }
.btn-action.btn-restore:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-action.btn-delete:hover { border-color: var(--rose); color: var(--rose); }
.btn-action.btn-disable:hover { border-color: var(--amber); color: var(--amber); }
.btn-action.btn-enable:hover { border-color: var(--emerald); color: var(--emerald); }

/* 卡片主体可点击区域：进入项目 */
.project-card-main {
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background .2s ease;
}
.project-card-main:hover { cursor: pointer; }
.project-card-main:hover .project-title { color: var(--brand); }
.project-card-main:focus-visible {
  box-shadow: inset 0 0 0 2px var(--brand);
}
.project-card-main-disabled { cursor: default; }
.project-card-main-disabled:hover .project-title { color: inherit; }

/* 不同状态卡片强调色 */
.project-card.status-warning::before { background: linear-gradient(90deg, var(--amber), #f59e0b); opacity: 1; }
.project-card.status-danger::before,
.project-card.status-trash::before { background: linear-gradient(90deg, var(--rose), #f43f5e); opacity: 1; }
.project-card.status-disabled::before { background: linear-gradient(90deg, #9ca3af, #6b7280); opacity: 1; }
.project-card.status-trial::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .page { padding: 18px 16px 32px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-grid-v2 { grid-template-columns: 1fr; }
  .app-bar-inner { padding: 10px 16px; }
  .project-info { gap: 18px; }
  .project-tabs { gap: 8px; }
  .project-tab { padding: 7px 12px; font-size: 12.5px; }
  .project-search { flex-wrap: wrap; }
}

/* =========================================================
   Phase 77 · 平台态：顶部横向导航 + 左侧二级菜单
   ========================================================= */

/* 平台态整体骨架：纵向 flex，navbar 在上，body 横向撑满 */
.app-shell.platform-layout {
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶部主导航 ---------- */
.platform-navbar {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 60;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: 10px;
}
.nav-brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 18px;
  box-shadow: 0 5px 14px rgba(99,102,241,.4);
}
.nav-brand-text strong { display: block; font-size: 15px; letter-spacing: .4px; color: var(--text); }
.nav-brand-text small { display: block; color: var(--muted); font-size: 10px; margin-top: -2px; }

.nav-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s, color .18s, transform .15s;
}
.nav-tab:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.nav-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99,102,241,.92), rgba(139,92,246,.92));
  box-shadow: 0 6px 18px rgba(99,102,241,.35);
}
.nav-tab-ico { width: 18px; height: 18px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ---------- 平台态主体：左侧二级菜单 + 内容区 ---------- */
.platform-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.platform-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1e1b4b 0%, #13112b 100%);
  color: #cfd3e6;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}
[data-theme="dark"] .platform-sidebar { background: linear-gradient(180deg, #11131f 0%, #0a0c14 100%); }

.psidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 18px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}
.psidebar-head-ico { width: 20px; height: 20px; }

.psidebar-menu { flex: 1; }
.psidebar-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  /* 默认（未选中）就是浅紫块，与「选中态」形成深浅对比；hover 稍亮，active 走深紫渐变 */
  background: rgba(99,102,241,.14);
  color: #c3c7e0;
  font-size: 14px;
  font-weight: 500;
  transition: background .18s, color .18s, transform .12s, box-shadow .18s;
}
.psidebar-item:hover { background: rgba(99,102,241,.28); color: #fff; transform: translateX(2px); }
.psidebar-item.is-active {
  background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(139,92,246,.9));
  color: #fff;
  box-shadow: 0 5px 14px rgba(99,102,241,.35);
  font-weight: 600;
}

.psidebar-foot {
  font-size: 11px;
  color: #6a6f95;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
}

/* 平台态下主内容区取消 sticky topbar 带来的偏移，navbar 已经 sticky */
.platform-layout .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.platform-layout .content {
  flex: 1;
  padding: 24px;
}

/* ---------- 平台态响应式 ---------- */
@media (max-width: 720px) {
  .platform-navbar { padding: 0 14px; gap: 10px; height: 56px; }
  .nav-brand-text { display: none; }
  .nav-tab { padding: 8px 12px; font-size: 13px; }
  .platform-sidebar { width: 170px; padding: 12px 10px; }
  .platform-layout .content { padding: 18px 16px; }
}

@media (max-width: 520px) {
  .platform-sidebar {
    position: fixed;
    left: 0; top: 56px; bottom: 0;
    transform: translateX(-100%);
    z-index: 55;
    transition: transform .25s ease;
  }
  .platform-sidebar.open { transform: translateX(0); }
}

/* =========================================================
   项目态响应式：侧边栏变抽屉，内容区满铺自适应
   ========================================================= */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    z-index: 55;
    transition: transform .3s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-title { font-size: 14px; }
  .app-bar { padding: 0 14px; }
  .content { padding: 18px 16px; }
  .page { padding: 18px 20px 26px; }
}
@media (max-width: 520px) {
  .user-meta { display: none; }
  .user-chip .avatar { width: 30px; height: 30px; }
  .page { padding: 16px 16px 22px; }
}

/* =========================================================
   Phase 77 · 平台运营首页看板
   ========================================================= */
/* 平台首页需要展示侧边栏 + 多列看板 */
.platform-dashboard .welcome { margin-bottom: 22px; }

.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.data-card .data-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 6px 8px;
}
.data-block { text-align: center; }
.data-block .data-value {
  font-size: 28px; font-weight: 800; color: var(--text);
  line-height: 1.1; margin-bottom: 6px;
}
.data-block .data-label {
  font-size: 13px; color: var(--text-soft); font-weight: 500;
}
.data-block .data-label small {
  display: block; color: var(--muted); font-size: 11px; margin-top: 2px;
}
.data-foot {
  padding: 12px 6px 0; margin-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--muted);
}

.empty-state {
  padding: 42px 20px; text-align: center; color: var(--muted); font-size: 14px;
}

.rank-meta {
  font-size: 12px; color: var(--muted); margin-top: 3px;
}

@media (max-width: 980px) {
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stat-grid-4 { grid-template-columns: 1fr; }
  .data-grid-3 { grid-template-columns: 1fr !important; gap: 14px !important; }
  .platform-dashboard .welcome { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* =========================================================
   Phase 78 · 首页右侧边栏：系统公告 + 帮助中心
   ========================================================= */
.dashboard-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}
.dashboard-main { min-width: 0; }
.dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 84px;
}
.dashboard-aside .card { padding: 18px; }

/* 系统公告 */
.announce-list { list-style: none; margin: 0; padding: 0; }
.announce-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.announce-item:last-child { border-bottom: none; padding-bottom: 0; }
.announce-item:first-child { padding-top: 0; }
.announce-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.announce-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}
.announce-tag.new {
  background: color-mix(in srgb, var(--emerald) 12%, transparent);
  color: var(--emerald);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--emerald) 30%, transparent);
}
.announce-dot {
  font-size: 10px; font-weight: 800;
  color: #fff; background: var(--rose);
  padding: 1px 5px; border-radius: 20px;
}
.announce-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.45;
}
.announce-date {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}

/* 帮助中心 */
.help-body {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 8px 4px 4px;
}
.help-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  margin-bottom: 12px;
}
.help-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.help-desc {
  font-size: 13px; color: var(--text-soft); line-height: 1.6;
  margin: 0 0 14px;
}
.help-card .btn-primary { width: 100%; justify-content: center; }
.help-card .btn-primary:disabled {
  opacity: .55; cursor: not-allowed;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: none;
  box-shadow: none;
}

@media (max-width: 1200px) {
  .dashboard-body { grid-template-columns: 1fr 280px; }
}
@media (max-width: 980px) {
  .dashboard-body { grid-template-columns: 1fr; }
  .dashboard-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
@media (max-width: 640px) {
  .dashboard-aside { grid-template-columns: 1fr; }
}

/* ---------- 应用目录：图标 + 主题色 ---------- */
.app-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: color-mix(in srgb, var(--c, #6366f1) 16%, transparent);
  color: var(--c, #6366f1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #6366f1) 32%, transparent);
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
}
.app-ico .ic { width: 20px; height: 20px; }
tr:hover .app-ico { transform: translateY(-1px) scale(1.04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c,#6366f1) 50%, transparent), 0 6px 16px -8px var(--c,#6366f1); }

.color-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  margin-right: 4px; vertical-align: -1px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

/* ===== 视图切换 tab（列表 / 矩阵） ===== */
.view-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.view-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s, color .2s, background .2s;
}
.view-tab:hover { transform: translateY(-1px); color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.view-tab.is-active {
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent; box-shadow: 0 8px 20px -8px var(--brand);
}

/* ===== 收录覆盖矩阵（文章 × 平台） ===== */
.cov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cov-head h3 { font-size: 15px; margin: 0 0 4px; }
.cov-updated { font-size: 12px; color: var(--muted); }
.cov-scroll { overflow-x: auto; margin-top: 12px; border-radius: 14px; border: 1px solid var(--border); }
table.cov-matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 13px; }
table.cov-matrix th, table.cov-matrix td { padding: 10px 12px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: middle; }
table.cov-matrix thead th { background: var(--bg-soft); position: sticky; top: 0; z-index: 2; }
.cov-corner { text-align: left; font-weight: 700; color: var(--muted); white-space: nowrap; min-width: 200px; }
.cov-th { text-align: center; }
.cov-pfname { font-weight: 700; color: var(--text); margin-bottom: 5px; white-space: nowrap; }
.cov-pfrate { font-size: 12px; }
.cov-rowsum { background: color-mix(in srgb, var(--brand) 8%, var(--bg-soft)) !important; color: var(--text); font-weight: 700; }
.cov-row { text-align: left; background: var(--surface); min-width: 200px; }
.cov-art { font-weight: 600; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov-art-sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cov-art-sub .badge { font-size: 11px; }
.cov-art-meta { font-size: 11.5px; color: var(--muted); }
.cov-td { text-align: center; }
.cov-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; }
.cov-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; }
.cov-probbar { height: 5px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; margin: 6px auto 3px; max-width: 90px; }
.cov-probbar > i { display: block; height: 100%; border-radius: 4px; }
.cov-prob { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cov-ok { background: rgba(16,185,129,.07); }
.cov-ok .cov-st { color: var(--emerald); }
.cov-ok .cov-ico { background: var(--emerald); }
.cov-ok .cov-probbar > i { background: linear-gradient(90deg, #10b981, #34d399); }
.cov-no { background: rgba(245,158,11,.07); }
.cov-no .cov-st { color: #d97706; }
.cov-no .cov-ico { background: var(--amber); }
.cov-no .cov-probbar > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cov-none { background: transparent; }
.cov-none .cov-dash { color: var(--muted); opacity: .4; }
.cov-sum { text-align: center; font-weight: 700; color: var(--text); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); font-variant-numeric: tabular-nums; }
.cov-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.lg-ok { background: var(--emerald); }
.lg-no { background: var(--amber); }
.lg-none { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.lg-sep { width: 1px; height: 14px; background: var(--border); }

/* ========== 新建项目向导（Phase 107） ========== */
/* 内容区与其他内页同标准：满屏自适应（移除原锁宽，由 .page 基类统一 padding/响应式） */
.wizard-page { max-width: none; }
.wizard-steps { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 8px 0 22px; }
.wstep { display: flex; align-items: center; gap: 10px; flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.03); transition: .25s; }
.wstep .ws-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--border); color: var(--muted); transition: .25s; }
.wstep .ws-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.wstep.is-active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.wstep.is-active .ws-num { background: var(--brand); color: #fff; }
.wstep.is-active .ws-label { color: var(--text); }
.wstep.is-done .ws-num { background: var(--emerald); color: #fff; }

.wizard-form { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.wpanel { display: none; animation: wfade .3s ease; }
.wpanel.is-active { display: block; }
@keyframes wfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wpanel-head { margin-bottom: 18px; }
.wpanel-head h3 { margin: 0 0 4px; font-size: 17px; }

/* 方案卡片网格 */
.sol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sol-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 12px; transition: .2s; }
.sol-card:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); transform: translateY(-2px); }
.sol-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sol-card-top { display: flex; gap: 12px; align-items: flex-start; }
.sol-name { font-weight: 700; font-size: 15px; }
.sol-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.sol-from { font-weight: 700; color: var(--brand); font-size: 16px; }
.sol-pick { width: 100%; justify-content: center; }

/* 行业系统 / 增值功能勾选 */
.app-check, .addon-check { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.04); font-size: 13.5px; cursor: pointer; transition: .18s; }
.app-check:hover, .addon-check:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.addon-check { flex-direction: column; align-items: flex-start; gap: 2px; }
.addon-name { font-weight: 600; }
.addon-price { color: var(--emerald); font-weight: 700; font-size: 12.5px; }
.addon-desc { font-size: 11.5px; }

/* 权限块 */
.perm-zone { display: grid; gap: 12px; margin: 14px 0; }
.perm-block { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: rgba(255,255,255,.02); transition: .2s; }
.perm-block.is-disabled { opacity: .45; filter: grayscale(.4); }
.perm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.perm-head .ic { width: 18px; height: 18px; }
.perm-head strong { font-size: 14px; }

/* 价格规格 */
.dur-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.dur-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.03); cursor: pointer; transition: .2s; min-width: 130px; }
.dur-card:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.dur-card.is-selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.dur-card input { position: absolute; opacity: 0; }
.dur-label { font-weight: 600; font-size: 14px; }
.dur-price { color: var(--brand); font-weight: 700; font-size: 17px; }
.dur-tag { font-size: 11px; color: var(--amber); }

/* 管理员选择 */
.manager-pick { display: flex; gap: 10px; align-items: center; }
.manager-pick .input { flex: 1; }
.mgr-list { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.mgr-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.mgr-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.mgr-meta { flex: 1; display: flex; flex-direction: column; }
.mgr-meta strong { font-size: 14px; }

/* 配置字段网格 */
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 6px 0 14px; }
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }

/* 确认框 */
.confirm-box { display: grid; gap: 14px; }
.cf-section { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: rgba(255,255,255,.02); }
.cf-title { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 10px; letter-spacing: .3px; }
.cf-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.cf-row:last-child { border-bottom: none; }
.cf-price { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.cf-total { font-size: 15px; font-weight: 800; }
.cf-total .cf-price { color: var(--brand); font-size: 18px; }
.cf-note { margin-top: 10px; font-size: 12px; color: var(--muted); background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); border-radius: 8px; padding: 8px 10px; }

/* 向导底部 */
.wizard-foot { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.foot-spacer { flex: 1; }

/* 通用小字 */
.small { font-size: 12px; }
.muted.small, .small.muted { font-size: 12px; }

/* ---------- 方案卡片网格 (Phase B · 对标参考站图3) ---------- */
.sol-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 20px; }
.sol-tab {
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.sol-tab:hover { color: var(--text); border-color: var(--brand); }
.sol-tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }

.sol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sol-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s, border-color .28s;
}
.sol-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.sol-card-head { display: flex; align-items: center; gap: 12px; }
.sol-title-wrap { flex: 1; min-width: 0; }
.sol-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.sol-cat { margin-top: 2px; }
.sol-status { flex: none; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.sol-status.on { background: color-mix(in srgb, var(--emerald) 16%, transparent); color: var(--emerald); }
.sol-status.off { background: color-mix(in srgb, var(--rose) 16%, transparent); color: var(--rose); }
.sol-intro {
  margin: 0; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sol-meta {
  display: flex; gap: 18px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.sol-meta-item { display: flex; flex-direction: column; gap: 3px; }
.sol-meta-item b { font-size: 15px; font-variant-numeric: tabular-nums; }
.sol-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.btn-view {
  flex: none; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none;
  padding: 8px 15px; border-radius: 10px; font-size: 13px; cursor: pointer;
  transition: filter .2s, transform .2s;
}
.btn-view:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sol-links { display: flex; gap: 12px; align-items: center; }
.sol-empty { grid-column: 1 / -1; text-align: center; padding: 48px 0; color: var(--muted); }

/* 分类管理折叠 */
.sol-cat-manage { margin-top: 28px; }
.sol-cat-manage > summary {
  cursor: pointer; list-style: none; font-size: 13px; color: var(--text-soft);
  padding: 10px 0; user-select: none; display: flex; align-items: center; gap: 6px;
}
.sol-cat-manage > summary::-webkit-details-marker { display: none; }
.sol-cat-manage > summary::before { content: "▸"; color: var(--brand); transition: transform .2s; }
.sol-cat-manage[open] > summary::before { transform: rotate(90deg); }

/* 查看功能弹窗（对标参考站图4） */
.sol-view-head { min-width: 0; }
.sol-view-body { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.sol-feature-group { margin-bottom: 18px; }
.sol-feature-group:last-child { margin-bottom: 0; }
.sol-feature-group-title { font-weight: 700; font-size: 13px; color: var(--brand); margin-bottom: 9px; letter-spacing: .3px; }
.sol-feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sol-feature-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.55; color: var(--text); }
.ic-check { flex: none; margin-top: 2px; color: var(--emerald); }
.sol-view-preview-title { margin-bottom: 9px; }
.sol-view-gallery { display: flex; flex-direction: column; gap: 12px; }
.sol-preview-img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.sol-preview-empty { padding: 26px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
@media (max-width: 760px) {
  .sol-view-body { grid-template-columns: 1fr; }
}

/* ============ 方案整页编辑（Phase C） ============ */
/* 与其他内页同标准：满屏自适应 */
.sol-edit-page { max-width: none; }
.link-back { display: inline-block; margin-bottom: 6px; font-size: 13px; }
.sol-edit-head h1 { margin: 2px 0 6px; font-size: 22px; }
.sol-tabs-edit { display: flex; gap: 6px; margin: 18px 0 14px; flex-wrap: wrap; }
.sol-tabs-edit .sol-tab {
  padding: 9px 18px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .18s ease;
}
.sol-tabs-edit .sol-tab:hover { border-color: var(--brand); color: var(--brand); }
.sol-tabs-edit .sol-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2, #8b5cf6));
  color: #fff; border-color: transparent; box-shadow: 0 6px 18px -8px var(--brand);
}
.sol-edit-form .card { margin-bottom: 0; }
.sol-edit-form .card-head { padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 14px; }
.sol-edit-form .card-head h3 { font-size: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* 价格规格网格 */
.price-grid-head, .price-row {
  display: grid;
  grid-template-columns: 120px 90px 1fr 1fr 1fr 36px;
  gap: 10px; align-items: center;
}
.price-grid-head { padding: 0 2px 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
#priceRows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.price-row { background: var(--bg-elev, #f7f8fb); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.price-del {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--rose, #f43f5e); font-size: 18px; line-height: 1;
  cursor: pointer; transition: all .15s ease;
}
.price-del:hover { background: var(--rose, #f43f5e); color: #fff; border-color: transparent; }
.btn-add-price { margin-top: 4px; }

/* 权限树 */
.perm-tree { display: flex; flex-direction: column; gap: 16px; }
.perm-group { background: var(--bg-elev, #f7f8fb); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.perm-group-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); }

/* 底部固定操作栏 */
.sol-edit-foot {
  position: sticky; bottom: 0; margin-top: 22px; padding: 14px 18px;
  display: flex; justify-content: flex-end; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 -8px 24px -16px rgba(0,0,0,.35); z-index: 5;
}

@media (max-width: 760px) {
  .price-grid-head { display: none; }
  .price-row { grid-template-columns: 1fr 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .sol-edit-foot { flex-direction: column-reverse; }
  .sol-edit-foot .btn-primary, .sol-edit-foot .btn-ghost { width: 100%; text-align: center; }
}

/* ============ 套餐配置（Phase 1） ============ */
.pkg-layout { display: block; }
/* 顶部类目管理条：替代内容区内嵌侧栏；导航跳转走最左侧主边栏，这里保留类目 CRUD 入口 */
.pkg-cat-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pkg-cat-bar-label { font-size: 13px; font-weight: 700; color: var(--text-soft); margin-right: 2px; letter-spacing: .03em; }
.pkg-cat-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.pkg-cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.pkg-cat-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 35%, transparent); box-shadow: 0 8px 20px rgba(15,18,28,.08); }
.pkg-cat-chip.is-current { background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(168,85,247,.14)); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.pkg-cat-chip.is-off { opacity: .55; }
.pkg-cat-chip-name { font-weight: 600; font-size: 13.5px; }
.pkg-cat-chip-count { font-size: 11.5px; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 1px 7px; }
.pkg-cat-chip-ops { display: none; gap: 9px; margin-left: 4px; font-size: 12px; }
.pkg-cat-chip:hover .pkg-cat-chip-ops { display: inline-flex; }

.pkg-main { flex: 1 1 auto; min-width: 0; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.pkg-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s, border-color .2s;
}
.pkg-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15,18,28,.14); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.pkg-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pkg-type { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pkg-type-credit  { background: rgba(99,102,241,.14); color: var(--brand); }
.pkg-type-storage { background: rgba(16,185,129,.14); color: var(--emerald); }
.pkg-type-addon  { background: rgba(245,158,11,.16); color: #d97706; }
.pkg-status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.pkg-status.on  { background: rgba(16,185,129,.12); color: var(--emerald); }
.pkg-status.off { background: rgba(244,63,94,.12); color: var(--rose); }
.pkg-name { font-size: 16px; font-weight: 700; color: var(--text); }
.pkg-amount { font-size: 13px; color: var(--text-soft); margin-top: 4px; }
.pkg-price { margin: 14px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.pkg-price-row { display: flex; align-items: center; gap: 8px; }
.pkg-price-tag { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.pkg-price-tag.user  { background: rgba(99,102,241,.12); color: var(--brand); }
.pkg-price-tag.agent { background: rgba(168,85,247,.12); color: #a855f7; }
.pkg-price-row b { font-size: 16px; color: var(--text); }
.pkg-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.pkg-actions { display: flex; gap: 12px; font-size: 13px; border-top: 1px solid var(--border); padding-top: 12px; }
.pkg-empty { color: var(--muted); text-align: center; padding: 48px 0; }

@media (max-width: 760px) {
  .pkg-cat-bar { flex-direction: column; align-items: stretch; }
  .pkg-cat-chips { flex-direction: column; }
  .pkg-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Phase A · 代理商白标后台（独立三态面板）
   ========================================================= */
.agent-dash, .agent-list, .agent-orders, .agent-settings, .agent-section, .agent-projects, .agent-apps {
  max-width: 1120px;
  margin: 0 auto;
  animation: agentFade .35s ease;
}
@keyframes agentFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.page-sub { margin: 0; color: var(--muted); font-size: 13.5px; }

/* 代理商头部 Logo 图 */
.nav-brand-logo-img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; box-shadow: 0 5px 14px rgba(99,102,241,.4); }

/* 设置表单 */
.form-card { padding: 24px 26px; max-width: 860px; }
.form-section { padding: 18px 0; border-bottom: 1px dashed var(--border); }
.form-section:last-of-type { border-bottom: none; }
.form-section-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--text); }
.form-section-desc { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
.form-grid .form-row { margin-bottom: 14px; }
.form-err { color: var(--rose); font-size: 13px; min-height: 18px; margin: 6px 0 2px; }
.form-foot { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.logo-preview { margin-top: 10px; }
.logo-preview img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.btn-ghost.sm { padding: 6px 12px; font-size: 12.5px; }

/* switch-track 兼容（settings 视图用 switch-track 而非 slider） */
.switch .switch-track { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }

/* 代理商 · 项目卡片网格 */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proj-card { padding: 18px; transition: transform .18s ease, box-shadow .18s ease; }
.proj-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(99,102,241,.10); }
.proj-card.is-expired { border-color: color-mix(in srgb, var(--rose) 45%, transparent); background: color-mix(in srgb, var(--rose) 4%, var(--surface)); }
.proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.proj-title { display: flex; flex-direction: column; gap: 5px; font-size: 15px; }
.proj-title strong { color: var(--text); line-height: 1.3; }
.proj-plan { font-size: 12.5px; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.proj-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 12px; }
.proj-meta-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proj-meta-item .pm-label { font-size: 11.5px; color: var(--muted); }
.proj-meta-item .pm-val { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-apps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; min-height: 20px; }
.proj-apps .chip { font-size: 12px; color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.proj-actions { display: flex; gap: 8px; }

/* 代理商 · 应用市场卡片 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.app-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: transform .18s ease, box-shadow .18s ease; }
.app-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(99,102,241,.10); }
.app-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,.3); }
.app-name { font-size: 15px; color: var(--text); }
.app-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.app-stat { margin-top: 4px; }
.switch .switch-track::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .switch-track { background: var(--emerald, #10b981); }
.switch input:checked + .switch-track::before { transform: translateX(20px); }
/* 开关旁的「已开启/已关闭」文本（商城配置页） */
.switch .switch-text { display: inline-block; margin-left: 52px; font-size: 13px; font-weight: 600; color: var(--muted); vertical-align: middle; }
.switch input:checked ~ .switch-text { color: var(--emerald, #10b981); }

/* stat-value 内小字（配额已用 / 剩余） */
.stat-value .stat-sub { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 6px; }

/* 轻量 toast（agent.js 调用） */
.toast-pop {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-12px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-left: 3px solid var(--emerald); padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16); z-index: 500; opacity: 0;
  transition: opacity .3s, transform .3s; font-size: 14px; font-weight: 600;
}
.toast-pop.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 18px 16px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Phase B-2：代理商余额展示 */
.balance-amount { color: #059669; font-variant-numeric: tabular-nums; }

/* Phase B-3：分红提现 */
.withdraw-balance {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: rgba(244,63,94,.08); border: 1px solid rgba(244,63,94,.25);
  margin-bottom: 18px;
}
.withdraw-balance .wb-label { color: var(--text-soft,#64748b); font-size: 13px; }
.withdraw-balance .wb-value { font-size: 26px; font-weight: 800; color: var(--rose,#f43f5e); font-variant-numeric: tabular-nums; }

.channel-group { display: flex; gap: 10px; flex-wrap: wrap; }
.channel-opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; user-select: none;
  border: 1px solid var(--border,#e2e8f0); background: var(--bg,#fff);
  font-size: 14px; transition: all .15s;
}
.channel-opt input { display: none; }
.channel-opt .channel-ico { font-size: 16px; }
.channel-opt.is-active { border-color: var(--indigo,#4f46e5); background: rgba(79,70,229,.08); color: var(--indigo,#4f46e5); font-weight: 600; }
.wd-err { color: #dc2626; font-size: 13px; min-height: 18px; margin: 8px 0; }
[data-theme="dark"] .withdraw-balance { background: rgba(244,63,94,.14); }

/* Phase R：通知铃铛 + 下拉面板 */
.notif-bell { position: relative; display: inline-flex; align-items: center; }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--rose,#f43f5e); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg-elev,#fff);
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 340px; max-height: 460px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-elev,#fff); border: 1px solid var(--border,#e5e7eb); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15,23,42,.18);
}
.notif-panel[hidden] { display: none; }
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border,#f0f0f3);
  font-size: 14px;
}
.notif-markall { background: none; border: none; color: var(--indigo,#4f46e5); font-size: 12px; cursor: pointer; font-weight: 600; }
.notif-markall:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--border,#f3f4f6); cursor: pointer; transition: background .12s; }
.notif-item:hover { background: var(--bg-soft,#f9fafb); }
.notif-item.is-unread { background: #fff7ed; }
.notif-item.is-unread:hover { background: #ffedd5; }
.notif-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-item-title { font-weight: 600; font-size: 13px; color: var(--text,#1f2937); }
.notif-item-time { font-size: 11px; color: var(--text-soft,#9ca3af); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notif-item-content { margin-top: 4px; font-size: 12px; color: var(--text-soft,#6b7280); line-height: 1.5; }
/* Phase W 通知→行动闭环：带 link 的通知项显示「查看 ›」入口 */
.notif-item-link .notif-item-title { color: var(--indigo,#4f46e5); }
.notif-item-link:hover .notif-item-title { text-decoration: underline; }
.notif-item-go { margin-top: 6px; display: inline-block; font-size: 12px; font-weight: 600; color: var(--indigo,#4f46e5); }
.notif-item-go::after { content: ''; }
.notif-go-btn { color: var(--indigo,#4f46e5); text-decoration: none; }
.notif-go-btn:hover { text-decoration: underline; }
.notif-empty { padding: 28px 14px; text-align: center; color: var(--text-soft,#9ca3af); font-size: 13px; }
.notif-panel-foot { padding: 10px 14px; text-align: center; border-top: 1px solid var(--border,#f0f0f3); }
.notif-panel-foot a { color: var(--indigo,#4f46e5); font-size: 12px; text-decoration: none; }
.notif-panel-foot a:hover { text-decoration: underline; }
[data-theme="dark"] .notif-badge { box-shadow: 0 0 0 2px var(--bg-elev,#0f172a); }
[data-theme="dark"] .notif-item.is-unread { background: rgba(234,88,12,.16); }
[data-theme="dark"] .notif-item.is-unread:hover { background: rgba(234,88,12,.24); }

/* =========================================================
   应用中心（AppCatalog）：左内侧边栏（类目·行业系统 + 功能插件三级） + 右内容区
   ========================================================= */
.app-center {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: calc(100vh - 220px);
}
.app-center-page .page { padding: 22px 24px 30px; }

/* ---------- 左侧边栏 ---------- */
.app-sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
}
.app-side-sec { margin-bottom: 8px; }
.app-side-sec + .app-side-sec { border-top: 1px dashed var(--border); padding-top: 10px; }
.app-side-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--muted); font-weight: 700; padding: 6px 10px 8px;
}
.side-add {
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-soft); font-size: 11px; border-radius: 8px;
  padding: 3px 9px; cursor: pointer; letter-spacing: 0;
  text-transform: none; font-weight: 600; transition: .18s;
}
.side-add:hover { color: var(--brand); border-color: var(--brand); }
.side-add-mini {
  width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; font-size: 13px; line-height: 1; flex: none;
  opacity: 0; transition: .18s;
}
.plugin-cat-row:hover .side-add-mini { opacity: 1; }
.side-add-mini:hover { color: var(--brand); border-color: var(--brand); }

.app-side-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px; margin-bottom: 3px;
  color: var(--text-soft); font-size: 13.5px; font-weight: 500;
  transition: background .18s, color .18s, transform .12s;
}
.app-side-item:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.app-side-item.is-active {
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.12));
  color: var(--brand); font-weight: 700;
  border: 1px solid rgba(99,102,241,.25);
}
.app-side-item .menu-ico { width: 16px; height: 16px; }
.app-side-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--c, #6366f1); }

.app-side-empty { font-size: 12px; color: var(--muted); padding: 4px 10px 10px; line-height: 1.6; }

/* ---------- 功能插件三级树 ---------- */
.plugin-sys { margin-bottom: 8px; }
.plugin-sys-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--text);
  padding: 7px 10px 4px; letter-spacing: .2px;
}
.plugin-cat { margin: 0 0 3px 8px; }
.plugin-cat-row { display: flex; align-items: center; gap: 6px; }
.plugin-cat-name {
  display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0;
  padding: 6px 9px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-soft);
  transition: background .18s, color .18s;
}
.plugin-cat-name:hover { background: var(--surface-2); color: var(--text); }
.plugin-cat-name.is-active { color: var(--brand); background: rgba(99,102,241,.1); }
.plugin-cat-name .menu-ico { width: 14px; height: 14px; flex: none; }
.plugin-cat-name span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-cat-cnt {
  font-style: normal; font-size: 10.5px; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 1px 7px; flex: none;
}
.plugin-list { margin: 2px 0 4px 16px; display: flex; flex-direction: column; gap: 1px; }
.plugin-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 9px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-soft);
  transition: background .15s, color .15s;
}
.plugin-item:hover { background: var(--surface-2); color: var(--text); }
.plugin-item .app-side-dot { width: 7px; height: 7px; }

.app-side-foot {
  font-size: 11px; color: var(--muted); padding: 10px 10px 4px;
  border-top: 1px solid var(--border); margin-top: auto;
}

/* ---------- 右内容区 ---------- */
.app-main { flex: 1; min-width: 0; }
.card-head-ops { display: flex; align-items: center; gap: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .app-center { flex-direction: column; }
  .app-sidebar {
    position: static; width: 100%; max-height: none; overflow: visible;
    flex-direction: row; flex-wrap: wrap; gap: 6px;
  }
  .app-side-sec { width: 100%; margin-bottom: 0; }
  .app-side-title { width: 100%; }
  .plugin-sys, .app-side-item { width: 48%; }
}

/* ========== 新建/设置项目页：整页自适应（与其他内页同标准） ========== */
@media (max-width: 860px) {
  .wizard-steps { flex-wrap: wrap; }
  .wstep { flex: 1 1 150px; padding: 10px 12px; }
}
@media (max-width: 520px) {
  .wizard-form { padding: 18px; }
  .wizard-foot { flex-wrap: wrap; }
  .wizard-foot .btn-primary, .wizard-foot .btn-ghost { flex: 1 1 auto; }
}

/* ========== 应用中心 · 价格档位编辑器（Phase 6B） ========== */
.pp-wrap { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; }
.pp-row {
  display: grid;
  grid-template-columns: 76px 84px 1fr 1fr 1fr 30px;
  gap: 8px; align-items: center;
}
.pp-row input, .pp-row select {
  width: 100%; padding: 7px 9px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text);
}
.pp-row input:disabled { opacity: .45; }
.pp-del {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.pp-del:hover { color: #ef4444; border-color: #ef4444; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
@media (max-width: 640px) {
  .pp-row { grid-template-columns: 1fr 1fr; }
  .pp-del { width: 100%; }
}

/* ========== 应用中心 · 商城上架状态标签（Phase 6B） ========== */
.tag-listed {
  font-size: 12px; font-weight: 700; color: #10b981;
  background: rgba(16,185,129,.12); padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}
.tag-off {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}

/* ========== 项目态 navbar · 返回平台按钮（Phase 6 优化） ========== */
.nav-back-platform {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 10px;
  color: var(--text-soft); background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background .18s, color .18s, transform .18s;
}
.nav-back-platform:hover {
  background: rgba(99,102,241,.12); color: var(--brand); border-color: rgba(99,102,241,.3);
  transform: translateX(-2px);
}
/* Phase 6 优化：项目态 .main 保持普通块（document 滚动），不沿用平台态的 flex column+overflow auto
   —— 否则项目态 content 被困在 main 内部独立滚动容器，弹窗（fixed 但 DOM 占 main flex 位）会把内容挤出可视区 */
.app-shell.platform-layout > .main { display: block; min-height: auto; }
/* 平台态保持原 .platform-layout .main 的 flex column + overflow-y auto（不覆盖） */
/* 项目态额外：让 .platform-body 不裁切 main 溢出（document 滚动恢复）；用 .project-shell 标识仅项目态生效，平台态不受影响 */
.app-shell.project-shell > .platform-body { overflow: visible; }
.app-shell.project-shell > .main { display: block; min-height: auto; }

/* ========== 项目态 sidebar：隐藏菜单滚动条（视觉隐藏，滚轮仍可滚动） ========== */
.sidebar .menu { scrollbar-width: none; }
.sidebar .menu::-webkit-scrollbar { display: none; width: 0; }

/* ========== 项目态 navbar · 应用商城快捷入口（Phase 6 nav-right 内） ========== */
.nav-shop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(99,102,241,.28);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.nav-shop:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(99,102,241,.4);
  filter: brightness(1.05);
  color: #fff;
}
.nav-shop-ico { width: 15px; height: 15px; flex: none; }
@media (max-width: 640px) {
  .nav-shop-label { display: none; }
  .nav-shop { padding: 7px 9px; }
}
/* 项目态品牌 logo：project.logo 为图片时的兜底 */
.nav-brand .nav-brand-logo-img { object-fit: cover; }

/* ========== 侧栏菜单占位项（系统未开发功能） ========== */
.menu-item.is-placeholder {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px 7px 11px;
  border-radius: 9px;
  color: var(--muted);
  cursor: not-allowed;
  font-weight: 500;
  opacity: 0.85;
  border-left: 2px solid transparent;
  margin-bottom: 2px;
  user-select: none;
}
.menu-item.is-placeholder .menu-ico { opacity: 0.45; }
.menu-item.is-placeholder .placeholder-label { flex: 1; }
.menu-item.is-placeholder .placeholder-badge {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(99,102,241,.12);
  color: var(--brand);
  white-space: nowrap;
}

/* ============ 顶部右侧：用户下拉菜单（Phase 顶部美化） ============ */
/* 外栏：仅一个头像按钮 + 下拉箭头，所有功能（改密/主题/返回/退出）收入下拉面板 */
.user-menu { position: relative; display: inline-flex; align-items: center; }
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 3px; border-radius: 999px;
  background: transparent; border: 1px solid transparent;
  cursor: pointer; color: var(--text); transition: .2s;
}
.user-menu-btn:hover { background: var(--bg-soft, #f7f7fa); border-color: var(--border); }
.user-menu-btn .avatar { width: 32px; height: 32px; font-size: 13px; }
.user-menu-chev { color: var(--muted, #94a3b8); transition: transform .2s; }
.user-menu-btn[aria-expanded="true"] .user-menu-chev { transform: rotate(180deg); color: var(--brand); }

/* 下拉面板 */
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 280px; padding: 14px;
  background: var(--surface, #fff); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.06);
  z-index: 200;
  /* hidden 属性默认 display:none，通过 hidden=true 控制 */
}
.user-dropdown[hidden] { display: none; }

/* 头部：紫色头像 + 昵称 + 角色 + 用户名（参考图样式） */
.user-dropdown-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; }
.user-dropdown-head .avatar-lg {
  width: 44px; height: 44px; font-size: 17px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.user-dropdown-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-dropdown-id strong { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-dropdown-id .user-role {
  display: inline-block; align-self: flex-start;
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: rgba(99,102,241,.12); color: var(--brand); margin-top: 2px;
}
.user-dropdown-id .user-username { font-size: 12px; color: var(--muted, #94a3b8); }

/* 中部：功能图标网格（3 个 quick-btn：改密 / 主题 / 帮助） */
.user-dropdown-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 6px 0 10px;
}
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border-radius: 10px;
  background: var(--bg-soft, #fafafa); color: var(--text);
  border: 1px solid transparent; cursor: pointer;
  font-size: 12px; line-height: 1; text-decoration: none;
  transition: .18s;
}
.quick-btn:hover { background: var(--surface, #fff); border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.quick-btn svg { color: currentColor; }

/* 分隔线 */
.user-dropdown-sep { height: 1px; background: var(--border); margin: 2px 0 6px; }

/* 底部两列：项目态「返回平台」+ 安全退出；非项目态仅安全退出 */
.user-dropdown-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user-dropdown-foot > span:only-child { display: none; }
.foot-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px; border-radius: 10px;
  background: transparent; color: var(--text-soft, #6b7280);
  font-size: 13px; text-decoration: none; cursor: pointer;
  transition: .18s;
}
.foot-link:hover { background: var(--bg-soft, #f7f7fa); color: var(--text); }
.foot-link-danger { color: var(--rose, #f43f5e); }
.foot-link-danger:hover { background: rgba(244,63,94,.08); color: var(--rose, #f43f5e); }

/* 暗色主题下下拉面板 */
[data-theme="dark"] .user-dropdown {
  background: var(--surface, #1f2937); border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 32px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.2);
}
[data-theme="dark"] .quick-btn { background: rgba(255,255,255,.04); color: var(--text); }
[data-theme="dark"] .quick-btn:hover { background: rgba(99,102,241,.15); }
[data-theme="dark"] .foot-link:hover { background: rgba(255,255,255,.06); }

/* 兼容旧版 user-chip（如有遗留样式不再冲突，但不删除旧规则以防外部页面复用） */

/* ===== 文章发布管理（追加平台 / 累计发布目标） ===== */
.pub-cell { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.pub-tag { font-size: 12px; line-height: 1; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pub-tag.ok { background: rgba(16,185,129,.12); color: var(--emerald, #0f9d76); }
.pub-tag.q  { background: rgba(245,158,11,.14); color: #d97706; }
.pub-tag.r  { background: rgba(59,130,246,.13); color: #2563eb; }
.pub-tag.f  { background: rgba(244,63,94,.12); color: #e11d48; }
.pub-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pub-summary .pub-tag { font-size: 13px; padding: 5px 12px; }
.pub-sec-title { font-size: 13px; font-weight: 500; color: var(--text, #111827); margin: 14px 0 8px; }
.pub-hint { font-size: 12px; margin: -4px 0 8px; }
.pub-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.pub-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; font-size: 13px; background: var(--bg-soft, #fafafa); }
.pub-row .pub-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #111827); }
.pub-row .pub-meta { color: var(--muted, #9ca3af); font-size: 12px; }
.pub-row .pub-result { color: var(--muted, #6b7280); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-row input[type="checkbox"] { flex: none; width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; }
.pub-row.disabled { opacity: .62; }
.pub-row.disabled input[type="checkbox"] { cursor: not-allowed; }

/* ===== AI 平台评测（路线B 半自动回填） ===== */
.rv-qbox { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 12px 14px; background: var(--bg-soft, #fafafa); }
.rv-qhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rv-qtext { font-size: 13px; color: var(--text, #111827); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.rv-result { display: flex; flex-direction: column; gap: 8px; }
.rv-urls { font-size: 12px; color: var(--muted, #6b7280); line-height: 1.7; word-break: break-all; }
.rv-urls a { color: #2563eb; text-decoration: none; }
.rv-detail-row { font-size: 13px; color: var(--text, #111827); margin-bottom: 8px; line-height: 1.6; }
.rv-detail-label { display: inline-block; min-width: 52px; color: var(--muted, #9ca3af); font-size: 12px; }

/* ===== 评测优化建议（回流创作闭环） ===== */
.rv-advice { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; background: var(--bg-soft, #fafafa); }
.rv-advice-high { border-left: 3px solid #e11d48; }
.rv-advice-mid { border-left: 3px solid #d97706; }
.rv-advice-ok { border-left: 3px solid var(--emerald, #0f9d76); }
.rv-advice-title { font-weight: 500; color: var(--text, #111827); margin-left: 6px; }
.rv-advice-detail { color: var(--muted, #6b7280); font-size: 12px; margin-top: 3px; }

/* ===== 评测批量矩阵（关键词 × 平台多选） ===== */
.chk-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-group.chk-scroll { max-height: 120px; overflow: auto; padding: 2px; }
.chk-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--bg-soft, #fafafa); user-select: none; }
.chk-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: #2563eb; cursor: pointer; margin: 0; }
.chk-item:hover { border-color: #2563eb; }

/* ===== 情感词库（用户自定义正/负词） ===== */
.word-cols { align-items: start; }
.word-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow: auto; }
.word-item { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; font-size: 13px; background: var(--bg-soft, #fafafa); }
.word-item span { color: var(--text, #111827); }

/* ===== 评测执行工作台（按平台聚合连续回填） ===== */
.run-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.run-tab { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; font-size: 13px; color: var(--muted, #6b7280); text-decoration: none; background: var(--bg-soft, #fafafa); }
.run-tab:hover { border-color: #2563eb; color: #2563eb; }
.run-tab.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.run-tab-n { font-size: 12px; opacity: .8; }
.run-list { display: flex; flex-direction: column; gap: 14px; }
.run-card { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 14px 16px; background: var(--bg-soft, #fafafa); }
.run-card.done { opacity: .72; border-color: rgba(16,185,129,.4); }
.run-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.run-kw { font-size: 14px; font-weight: 500; color: var(--text, #111827); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-seq { font-size: 12px; }
.run-qbox { border: 1px dashed var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; background: #fff; }
.run-qhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.run-qtext { font-size: 13px; color: var(--text, #111827); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.run-ans { width: 100%; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; resize: vertical; font-family: inherit; }
.run-ans:focus { outline: none; border-color: #2563eb; }
.run-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.run-result { flex: 1; min-width: 0; }

/* ===== 平台对接聚合页（platform-connect） ===== */
.pc-section { margin-top: 26px; }
.pc-section:first-of-type { margin-top: 18px; }
.pc-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pc-section-head h2 { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; margin: 0; }
.pc-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); font-size: 12px; font-weight: 700; }
.pc-empty { color: var(--muted); font-size: 13px; padding: 18px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.pc-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s; }
.pc-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(99,102,241,.12); transform: translateY(-2px); }
.pc-card.pc-off { opacity: .72; }
.pc-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.pc-body { flex: 1; min-width: 0; }
.pc-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pc-meta .muted { font-size: 12px; }
.pc-actions { display: flex; align-items: center; gap: 12px; }
.pc-soon { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }

/* ---------- 平台对接 · Local Publisher 桌面端连接区 ---------- */
.pc-pubbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 4px; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, transparent), color-mix(in srgb, var(--brand) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--border)); }
.pc-pubbar-main { flex: 1; min-width: 260px; }
.pc-pubbar-title { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }
.pc-pubbar-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.pc-pubbar-dot.on { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.pc-pubbar-desc { margin: 7px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.pc-pubbar-actions { flex: none; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.pc-stats .stat-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px; }
.pc-stats .stat-num { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.pc-stats .stat-num.stat-ok { color: #10b981; }
.pc-stats .stat-num.stat-off { color: var(--muted); }
.pc-stats .stat-label { font-size: 12px; color: var(--muted); }

/* ---------- 平台对接 · 密钥弹窗 ---------- */
.pc-modal-mask { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.45); backdrop-filter: blur(2px); padding: 20px; }
.pc-modal { width: 520px; max-width: 100%; max-height: 92vh; overflow: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.22); }
.pc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--border); }
.pc-modal-head h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.pc-modal-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.pc-modal-body { padding: 18px 20px; }
.pc-modal-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.pc-modal-tip { margin: 0 0 16px; padding: 10px 12px; font-size: 12px; line-height: 1.6; color: #1d4ed8;
  background: rgba(59,130,246,.09); border: 1px solid rgba(59,130,246,.22); border-radius: 10px; }
:root[data-theme="dark"] .pc-modal-tip { color: #93c5fd; }
.pc-keyrow { margin-bottom: 14px; }
.pc-keyrow label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pc-keyrow input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-family: ui-monospace, Consolas, monospace; }
.pc-keywrap { display: flex; gap: 8px; }
.pc-keywrap input { flex: 1; min-width: 0; }
.pc-modal-warn { margin: 4px 0 0; font-size: 12px; color: var(--rose, #e11d48); }
.pc-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ---------- P2 双视图切换（niucloud 参考重构） ---------- */
.view-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--surface-2, #f1f5f9); border: 1px solid var(--border); flex: none; }
:root[data-theme="dark"] .view-switch { background: rgba(255,255,255,.06); }
.view-switch .vs-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; }
.view-switch .vs-btn:hover { color: var(--text); }
.view-switch .vs-btn.is-active { background: var(--brand, #4f46e5); color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand, #4f46e5) 36%, transparent); }

/* ---------- P3 客户端视图 navbar（niucloud 双视图读取侧收窄） ---------- */
.client-navbar .nav-brand-text small { color: var(--brand, #4f46e5); }
:root[data-theme="dark"] .client-navbar .nav-brand-text small { color: color-mix(in srgb, var(--brand, #4f46e5) 72%, #fff); }
.client-navbar .nav-brand-text strong::after { content: "·"; margin: 0 2px; opacity: .4; }

/* ---------- P6-a 代理商运营概览大屏 ---------- */
.overview-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 4px; }
.overview-head h2 { font-size: 17px; font-weight: 800; margin: 0; }
.stat-foot { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 980px) { .card-grid-2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 5px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--brand, #4f46e5); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--brand, #4f46e5) 36%, transparent); }
.level-dist { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.lv-row { display: grid; grid-template-columns: 84px 1fr 36px; align-items: center; gap: 10px; }
.lv-name { font-size: 13px; color: var(--text); white-space: nowrap; }
.lv-bar { height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.lv-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo, #6366f1), var(--brand, #4f46e5)); border-radius: 999px; }
.lv-cnt { font-size: 13px; font-weight: 700; text-align: right; color: var(--text); }
.trend-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 8px 2px 0; }
.tb-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.tb-bar { width: 60%; max-width: 26px; background: linear-gradient(180deg, var(--sky, #0ea5e9), color-mix(in srgb, var(--sky, #0ea5e9) 55%, #fff)); border-radius: 6px 6px 0 0; min-height: 4px; transition: height .25s; }
.tb-cnt { font-size: 12px; font-weight: 700; margin-top: 6px; color: var(--text); }
.tb-day { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; background: var(--bg-soft); color: var(--muted); }
.rank-badge.rank-1 { background: #f59e0b; color: #fff; }
.rank-badge.rank-2 { background: #94a3b8; color: #fff; }
.rank-badge.rank-3 { background: #b45309; color: #fff; }

/* ---------- P6-b 代理商订单筛选条 ---------- */
.badge-amber { background: rgba(245,158,11,.14); color: #d97706; border: 1px solid rgba(245,158,11,.3); padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field-inline { display: flex; flex-direction: column; gap: 4px; }
.field-inline.grow { flex: 1; min-width: 180px; }
.field-inline > label { font-size: 12px; color: var(--muted); }
