* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --border: #e4e8ef;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --green: #16a34a;
  --yellow: #d97706;
  --red: #dc2626;
  --gold: #f59e0b;
  --sidebar: #0f172a;
  --sidebar-text: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --radius: 12px;
}
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 登录 / 注册（左右分栏 + 宏观科技感动效背景） */
.login-wrap { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%); }
/* 生成背景图：铺底 + 缓慢呼吸缩放 */
.login-bg { position: absolute; inset: -40px; z-index: -4;
  background: url("/static/img/login-bg.png") center/cover no-repeat;
  filter: brightness(.9) saturate(1.1);
  animation: loginBgZoom 24s ease-in-out infinite alternate; }
@keyframes loginBgZoom { 0% { transform: scale(1); } 100% { transform: scale(1.08); } }
/* 动态极光层 */
.login-aurora { position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(60% 50% at 20% 20%, rgba(99,102,241,.35), transparent 60%),
              radial-gradient(55% 55% at 80% 70%, rgba(168,85,247,.28), transparent 60%),
              radial-gradient(40% 40% at 50% 30%, rgba(59,130,246,.22), transparent 60%);
  filter: blur(30px);
  animation: auroraShift 14s ease-in-out infinite alternate; }
@keyframes auroraShift { 0% { transform: translate3d(-4%, -3%, 0) rotate(0deg); opacity: .8; }
  50% { transform: translate3d(3%, 2%, 0) rotate(3deg); opacity: 1; }
  100% { transform: translate3d(4%, -4%, 0) rotate(-2deg); opacity: .85; } }
/* 科技网格 */
.login-grid { position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(148,163,255,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(148,163,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 100%);
  animation: gridPan 22s linear infinite; }
@keyframes gridPan { 0% { background-position: 0 0, 0 0; } 100% { background-position: 44px 44px, 44px 44px; } }
/* 浮动粒子（JS 生成） */
.login-particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.login-particles .lp { position: absolute; bottom: -12px; border-radius: 50%;
  background: rgba(165,180,252,.55); box-shadow: 0 0 8px rgba(129,140,248,.5);
  animation: lpRise linear infinite; }
@keyframes lpRise { 0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  12% { opacity: .7; } 88% { opacity: .5; }
  100% { transform: translateY(-110vh) translateX(24px) scale(.4); opacity: 0; } }

.login-shell { position: relative; display: flex; width: 900px; max-width: 100%; min-height: 540px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.35); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(129,140,248,.15);
  animation: shellIn .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes shellIn { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
.login-shell::before { content: ""; position: absolute; inset: -2px; border-radius: 22px; padding: 2px;
  background: linear-gradient(135deg, rgba(99,102,241,.6), rgba(168,85,247,.15), rgba(99,102,241,.6));
  background-size: 300% 300%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: borderFlow 6s linear infinite; pointer-events: none; }
@keyframes borderFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.login-brand { flex: 1 1 46%; padding: 48px 42px; color: #fff; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, #4338ca 0%, #4f46e5 55%, #7c3aed 100%); position: relative; overflow: hidden; }
.login-brand::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255,255,255,.07); animation: orbFloat 9s ease-in-out infinite alternate; }
.login-brand::before { content: ""; position: absolute; left: -40px; bottom: -70px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(168,85,247,.18); filter: blur(20px); animation: orbFloat 12s ease-in-out infinite alternate-reverse; }
@keyframes orbFloat { 0% { transform: translate(0,0); } 100% { transform: translate(20px, -16px); } }
.login-logo { width: 48px; height: 48px; border-radius: 13px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 800; margin-bottom: 22px;
  box-shadow: 0 0 0 0 rgba(255,255,255,.25); animation: logoPulse 2.6s ease-in-out infinite; }
@keyframes logoPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.22); } 50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
.login-title { font-size: 28px; font-weight: 800; letter-spacing: .5px; margin-bottom: 10px; }
.login-tagline { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 26px; min-height: 22px; }
.type-caret { display: inline-block; margin-left: 2px; color: #c7d2fe; animation: caretBlink .8s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.login-points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.login-points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,.92); }
.login-points li span { font-size: 16px; }
.login-points .lp-item { opacity: 0; animation: lpIn .5s cubic-bezier(.16,1,.3,1) forwards; }
.login-points .lp-item:nth-child(1) { animation-delay: .25s; }
.login-points .lp-item:nth-child(2) { animation-delay: .4s; }
.login-points .lp-item:nth-child(3) { animation-delay: .55s; }
@keyframes lpIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.login-stats { display: flex; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.login-stats .ls-item { flex: 1; text-align: center; }
.login-stats .ls-item b { display: block; font-size: 20px; font-weight: 800; }
.login-stats .ls-item span { font-size: 11px; color: rgba(255,255,255,.72); }

.login-form-pane { flex: 1 1 54%; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center;
  background: rgba(255,255,255,.4); }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.tab { flex: 1; padding: 9px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }
#auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { position: relative; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
textarea { min-height: 90px; resize: vertical; }
/* 校验失败态 */
.field.error input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.field .err-hint { display: none; margin-top: 5px; font-size: 12px; color: var(--red); }
.field.error .err-hint { display: block; }
/* 密码显隐 */
.eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none;
  cursor: pointer; font-size: 15px; opacity: .55; }
.eye:hover { opacity: 1; }
/* 短信验证码行 */
.sms-row { display: flex; gap: 8px; }
.sms-row input { flex: 1; }
.btn-sms { flex: 0 0 auto; min-width: 100px; padding: 11px 12px; background: #eef2ff; color: var(--primary);
  border: 1px solid #c7d2fe; border-radius: 9px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.btn-sms:hover { background: #e0e7ff; }
.btn-sms:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { padding: 12px; background: var(--primary); color: #fff; border: none;
  border-radius: 9px; font-size: 15px; cursor: pointer; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.btn-ghost:hover { background: #f1f5f9; }
.msg { margin-top: 14px; text-align: center; min-height: 20px; font-size: 13px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.hint { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12px; }
.back-home { display: block; margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-home:hover { color: var(--primary); }

@media (max-width: 720px) {
  .login-shell { flex-direction: column; }
  .login-brand { display: none; }
  .login-form-pane { padding: 32px 24px; }
}

/* 主界面 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 228px; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; }
.brand { padding: 22px 20px; font-size: 18px; font-weight: 800; color: #fff; border-bottom: 1px solid #1e293b;
  display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #6366f1, #a855f7);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; }
#nav { display: flex; flex-direction: column; padding: 10px 0; flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden; }
#nav::-webkit-scrollbar { width: 6px; }
#nav::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
#nav::-webkit-scrollbar-thumb:hover { background: #475569; }
#nav a { padding: 10px 20px; color: var(--sidebar-text); text-decoration: none; cursor: pointer;
  font-size: 13.5px; border-left: 3px solid transparent; display: block;
  transition: background .16s ease, color .16s ease, border-color .16s ease; }
#nav a:hover { background: #1e293b; color: #fff; }
#nav a.active { background: linear-gradient(90deg, rgba(79,70,229,.26), rgba(79,70,229,.04)); color: #fff;
  border-left-color: var(--primary); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid #1e293b; }
.whoami { margin-bottom: 10px; font-size: 12px; color: #94a3b8; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.content { margin-left: 228px; flex: 1; padding: 28px 32px; min-width: 0; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.page-desc { color: var(--muted); margin-bottom: 20px; }

/* 角色徽章（普通账号 vs 管理员 视觉区别） */
.role-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; line-height: 1.4; }
.role-badge.super { background: linear-gradient(90deg, #fbbf24, #f59e0b); color: #78350f; }
.role-badge.admin { background: linear-gradient(90deg, #6366f1, #4f46e5); color: #fff; }
.role-badge.user  { background: #334155; color: #cbd5e1; }
/* 管理员侧栏顶部金色描边 */
.sidebar.admin-mode .brand { border-bottom: 2px solid rgba(245,158,11,.7); }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm); }
.card .num { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.card .label { color: var(--muted); font-size: 13px; }
.card.green .num { color: var(--green); }
.card.blue .num { color: var(--primary); }
.card.yellow .num { color: var(--yellow); }
.card.red .num { color: var(--red); }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 16px; margin-bottom: 14px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #f8fafc; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.ans-cell { max-width: 420px; white-space: normal; word-break: break-word; color: #374151; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: var(--green); }
.tag.err { background: #fee2e2; color: var(--red); }
.tag.gray { background: #f1f5f9; color: var(--muted); }

/* 表单行 */
.row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.row > input, .row > select { flex: 1; min-width: 140px; }
.row > button { white-space: nowrap; }

/* 工具条 */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* 徽章/开关 */
.badge { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.badge.on { background: #dcfce7; color: var(--green); }
.badge.off { background: #f1f5f9; color: var(--muted); }

.toast { position: fixed; bottom: 24px; right: 24px; background: #111827; color: #fff;
  padding: 12px 18px; border-radius: 10px; opacity: 0; transform: translateY(10px);
  transition: all .25s; pointer-events: none; z-index: 999; max-width: 360px; }
.toast.show { opacity: 1; transform: translateY(0); }

.empty { color: var(--muted); text-align: center; padding: 30px 16px; line-height: 1.75; font-size: 13.5px; }
/* 面板内的大空态更醒目一点；密集小空态用内联 padding 覆盖，不受影响 */
.panel > .empty { padding: 38px 16px; }

/* 报告 */
.report-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.meter { height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); }

/* 仪表盘 */
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-side { display: flex; flex-direction: column; gap: 20px; }
.mini-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mini-bar-label { width: 130px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar-val { width: 46px; font-size: 12px; text-align: right; color: var(--text); }
.insight-note { font-size: 13px; line-height: 1.7; background: #fafafa; border-left: 3px solid #7c3aed; padding: 8px 10px; border-radius: 4px; }

/* AI 分析建议 */
.insight-head { margin-bottom: 8px; }
.insight-analysis { font-size: 13px; line-height: 1.7; color: #374151; background: #f8f7ff; border: 1px solid #ede9fe; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.insight-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.insight-item.critical { border-left: 4px solid var(--red); }
.insight-item.warning { border-left: 4px solid var(--yellow); }
.insight-item.good { border-left: 4px solid var(--green); }
.insight-title { margin-bottom: 4px; }
.insight-detail { font-size: 13px; color: #4b5563; line-height: 1.6; }

/* 信源选择器 */
.source-picker { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fbfcfe; }
.source-cat { margin-bottom: 10px; }
.source-cat-name { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.source-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 20px; background: #fff; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--primary); }
.chip.off { opacity: .5; background: #f3f4f6; cursor: not-allowed; }
.chip-name { font-weight: 500; }
.chip-api { font-size: 11px; color: var(--muted); background: #eef2f7; padding: 1px 6px; border-radius: 10px; }
.prov-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* 四段式写作 */
.chan-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chan-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  cursor: pointer; min-width: 150px; font-family: inherit; }
.chan-btn:hover { border-color: var(--primary); }
.chan-btn.active { border-color: var(--primary); background: #eef4ff; box-shadow: 0 0 0 1px var(--primary); }
.chan-name { font-weight: 700; font-size: 14px; }
.chan-range { font-size: 12px; color: var(--muted); }
.chan-tip { margin-top: 10px; font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.wblk { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.wblk-label { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.wblk-body { font-size: 14px; line-height: 1.8; color: #333; white-space: pre-wrap; word-break: break-word; }

/* 写作方法论 / 调研简报 */
.meth-structure { background: #f5f7ff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.7; }
.meth-rules { margin: 0 0 10px; padding-left: 20px; font-size: 13px; color: #444; }
.meth-rules li { margin: 3px 0; }
.meth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.meth-chan { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.meth-chan b { font-size: 13.5px; }
.meth-chan ul { margin: 6px 0 0; padding-left: 18px; }
.meth-chan li { margin: 2px 0; font-size: 12.5px; color: #555; }
.meth-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .meth-topics { grid-template-columns: 1fr; } }
.meth-topic { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.meth-dims { display: grid; grid-template-columns: 1fr; gap: 8px; }
.meth-dim { border: 1px dashed var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.qu-group { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.brief { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 10px; padding: 12px 14px; background: #fbfcff; }
.brief-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* 子用户数据总览 */
.ov-card { margin-bottom: 12px; }
.ov-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ov-cell { border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; background: #fafafa; }
.ov-num { font-size: 22px; font-weight: 800; color: var(--primary); }
.w-prof { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px; }

/* 侧边栏二级分组（可折叠） */
.nav-group { margin: 2px 0; }
.nav-group-head { display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 20px 7px; background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: #64748b;
  text-transform: uppercase; font-family: inherit; user-select: none;
  transition: color .16s ease; }
.nav-group-head:hover { color: #cbd5e1; }
.nav-caret { font-size: 9px; color: #475569; transition: transform .22s ease, color .16s ease; }
.nav-group-head:hover .nav-caret { color: #cbd5e1; }
.nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-group-body { max-height: 0; overflow: hidden; transition: max-height .26s ease; }
.nav-group.open .nav-group-body { max-height: 520px; }
#nav .nav-group-body a { padding-left: 40px; font-size: 13px; }
.nav-group-body { border-bottom: 1px solid rgba(30, 41, 59, .5); }
.nav-group.open .nav-group-body { border-bottom-color: transparent; }

/* 余额显示 */
.balance-box { margin-bottom: 10px; font-size: 13px; color: #fbbf24; }

/* 产品阶梯（树状图） */
.ladder-node { border: 1px solid; border-radius: 8px; padding: 8px 12px; margin: 0 auto;
  text-align: center; }
.ladder-tag { display: inline-block; color: #fff; font-size: 11px; padding: 1px 10px;
  border-radius: 12px; margin-bottom: 4px; }
.ladder-name { font-size: 14px; font-weight: 600; }
.ladder-desc { font-size: 12px; color: var(--muted); }
.ladder-arrow { text-align: center; color: var(--muted); font-size: 14px; line-height: 1; }

/* 表单字段 */
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.fld input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.fld.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.fld.chk input { width: auto; }

.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* 模块权限配置 */
.mod-checks { display: flex; flex-wrap: wrap; gap: 4px; }
.mod-core { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #f0f7ff;
  border: 1px solid #cfe3ff; border-radius: 8px; margin-bottom: 6px; }
.mod-core .core-chk { font-weight: 600; color: #1d4ed8; }
.mod-core-label { font-size: 12px; color: var(--muted); margin: 0 0 12px 2px; }
.mod-group { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 10px; background: #fff; }
.mod-group-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px;
  color: var(--primary); margin-bottom: 8px; }
.mod-group-body { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.btn-mini { font-size: 12px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: #f8fafc; color: #475569; cursor: pointer; }
.btn-mini:hover { background: #eef2ff; color: var(--primary); }

/* 诊断报告 · 问题宇宙（四群问题清单） */
.uni-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.uni-group { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fbfcff; }
.uni-group .uni-title { font-weight: 600; font-size: 14px; color: #1d4ed8; margin-bottom: 6px; }
.uni-group ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; color: #444; }
@media (max-width: 700px) { .uni-grid { grid-template-columns: 1fr; } }

/* 多语言切换器 */
.lang-switch { margin-bottom: 10px; padding: 7px 8px; border-radius: 8px; border: 1px solid #334155;
  background: #1e293b; color: #e2e8f0; font-size: 13px; width: 100%; }

/* 系统监控 · 指标卡片 */
.metric { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fbfcff; }
.metric span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.metric b { font-size: 18px; color: var(--text); }

/* ================= 二级子界面 / 页签（子 tab 导航） ================= */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.subnav a { padding: 7px 14px; border-radius: 8px; color: var(--muted); cursor: pointer;
  font-size: 13px; text-decoration: none; border: 1px solid transparent; }
.subnav a:hover { background: #eef2ff; color: var(--primary); }
.subnav a.active { background: var(--primary); color: #fff; }

/* ================= 公告（格式化卡片） ================= */
.notice-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px;
  margin-bottom: 14px; background: #fff; }
.notice-card.priority-urgent { border-left: 4px solid var(--red); background: #fff7f7; }
.notice-card.priority-important { border-left: 4px solid var(--yellow); background: #fffcf5; }
.notice-card.priority-normal { border-left: 4px solid var(--primary); }
.notice-head { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.notice-title { font-size: 16px; font-weight: 700; }
.notice-meta { font-size: 12px; color: var(--muted); }
.priority-badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 12px; color: #fff; }
.priority-urgent .priority-badge { background: var(--red); }
.priority-important .priority-badge { background: var(--yellow); }
.priority-normal .priority-badge { background: #64748b; }
.cat-badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 12px;
  background: #eef2ff; color: #4f46e5; }
.notice-body { font-size: 14px; line-height: 1.8; color: #374151; white-space: pre-wrap; word-break: break-word; }
.notice-body b, .notice-body strong { color: #111827; }

/* ================= 增长中心 / 指标 ================= */
.growth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.growth-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #fff; }
.growth-card .g-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.growth-card .g-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.growth-card .g-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.growth-card.tone-green .g-num { color: var(--green); }
.growth-card.tone-blue .g-num { color: var(--primary); }
.growth-card.tone-yellow .g-num { color: var(--yellow); }
.growth-card.tone-red .g-num { color: var(--red); }
.delta-up { color: var(--green); font-weight: 600; }
.delta-down { color: var(--red); font-weight: 600; }

/* 键值对排版（权威报告式） */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.kv { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-size: 15px; font-weight: 600; color: var(--text); }

/* 按钮组 / 小按钮 */
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; color: var(--text); }
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; color: var(--red); border-color: var(--red); }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 可读的富文本正文（公告/知识库详情） */
.rich-content { font-size: 14px; line-height: 1.85; color: #374151; white-space: pre-wrap; word-break: break-word; }
.rich-content h4 { margin: 12px 0 6px; color: #111827; }
.rich-content ul, .rich-content ol { margin: 6px 0; padding-left: 22px; }
.rich-content li { margin: 3px 0; }

/* 战列线：更完整的图表容器 */
.battle-chart-wrap { background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; margin-bottom: 12px; }
.battle-summary { font-size: 13px; line-height: 1.8; background: #f8faff; border-left: 3px solid #2563eb;
  padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }

/* 曝光 / 命中样本 */
.exposure-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.exposure-bar .eb-label { width: 130px; font-size: 12px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.exposure-bar .eb-track { flex: 1; height: 10px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.exposure-bar .eb-fill { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.exposure-bar .eb-val { width: 46px; font-size: 12px; text-align: right; color: var(--text); }

/* 仪表盘选择器 / 用户下拉 */
.selector-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.selector-row select { flex: 1; min-width: 200px; }

/* ================= 顶部栏 ================= */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.topbar-title { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search-box { position: relative; }
.search-box input { width: 240px; padding: 8px 12px 8px 32px; border: 1px solid var(--border);
  border-radius: 9px; font-size: 13px; background: var(--card); }
.search-box::before { content: "🔍"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .5; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--card);
  border-radius: 9px; cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.icon-btn:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.topbar-home { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px;
  border: 1px solid var(--border); background: var(--card); border-radius: 9px;
  font-size: 13px; color: var(--muted); text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.topbar-home:hover { border-color: var(--primary); color: var(--primary); }

/* 顶部栏「锁定品牌」选择器 */
.lock-brand-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px;
  border: 1px solid var(--border); background: var(--card); border-radius: 9px;
  transition: border-color .15s ease, box-shadow .15s ease; }
.lock-brand-wrap.is-locked { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.lock-brand-icon { font-size: 13px; line-height: 1; }
.lock-brand-select { border: none; background: transparent; color: var(--text); font-size: 13px;
  padding: 2px 4px; outline: none; max-width: 150px; cursor: pointer; }
.lock-brand-select option { background: var(--card); color: var(--text); }
.lock-brand-wrap.is-locked .lock-brand-select { color: var(--primary); font-weight: 600; }
/* 可输入的品牌框 */
.lock-brand-input { border: none; background: transparent; color: var(--text); font-size: 13px;
  padding: 2px 4px; outline: none; width: 160px; }
.lock-brand-wrap.is-locked .lock-brand-input { color: var(--primary); font-weight: 600; }
.lock-brand-apply { border: none; background: var(--primary); color: #fff; font-size: 12px;
  border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.lock-brand-apply:hover { background: var(--primary-dark); }

/* 知识库 · 品牌锁定面板 */
.lock-profile { background: #f8faff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.lock-profile .lp-line { font-size: 13px; margin-bottom: 6px; color: var(--text); }
.lock-profile .lp-line:last-child { margin-bottom: 0; }
.lock-profile .lp-line b { color: var(--primary); font-weight: 600; }
.bell-wrap { position: relative; }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 4px; }
.search-drop, .bell-drop { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: 90vw;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md);
  z-index: 50; max-height: 420px; overflow-y: auto; padding: 6px; }
.search-drop { width: 360px; }
.search-drop .drop-item, .bell-drop .drop-item { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.search-drop .drop-item:hover, .bell-drop .drop-item:hover { background: #f1f5f9; }
.search-drop .drop-item .dim { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bell-drop .drop-item .t { font-weight: 600; }
.bell-drop .drop-item .d { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bell-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ================= 暗色模式 ================= */
[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --sidebar: #0b1120;
  --sidebar-text: #94a3b8;
}
[data-theme="dark"] .panel, [data-theme="dark"] .card { border-color: #334155; }
[data-theme="dark"] th { background: #16202f; }
[data-theme="dark"] tr:hover td { background: #16202f; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: #16202f; color: var(--text); border-color: #334155; }
[data-theme="dark"] .btn-ghost, [data-theme="dark"] .btn-sm { background: #16202f; color: var(--text); border-color: #334155; }
[data-theme="dark"] .search-drop .drop-item:hover, [data-theme="dark"] .bell-drop .drop-item:hover { background: #16202f; }
[data-theme="dark"] .tabs { background: #16202f; }
[data-theme="dark"] .tab.active { background: #334155; color: #fff; }
[data-theme="dark"] .login-form-pane { background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .login-form-pane input { background: #16202f; color: #e2e8f0; }
[data-theme="dark"] .rich-content, [data-theme="dark"] .ans-cell { color: #cbd5e1; }
[data-theme="dark"] .battle-chart-wrap { background: #1e293b; }

/* ================= 加载骨架屏 ================= */
.loading-skeleton { padding: 4px 0; }
.sk-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #eef1f6 25%, #f8fafc 50%, #eef1f6 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.2s infinite; margin-bottom: 12px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.sk-card { height: 110px; border-radius: 12px; background: linear-gradient(90deg, #eef1f6 25%, #f8fafc 50%, #eef1f6 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.2s infinite; }
@keyframes sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
[data-theme="dark"] .sk-line, [data-theme="dark"] .sk-card { background: linear-gradient(90deg, #1e293b 25%, #273449 50%, #1e293b 75%);
  background-size: 200% 100%; }

/* ================= 商业方案（产品阶梯 / 套餐中心） ================= */
.plan-ladder { display: flex; flex-direction: column; gap: 0; }
.plan-ladder-step { display: flex; gap: 14px; align-items: flex-start; background: #f8faff;
  border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; }
.plan-ladder-level { flex: 0 0 auto; color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.plan-ladder-body { flex: 1; }
.plan-ladder-name { font-weight: 700; font-size: 15px; }
.plan-ladder-price { color: var(--gold); font-weight: 800; margin-left: 6px; }
.plan-ladder-goal { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 2px; }
.plan-ladder-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.plan-ladder-arrow { text-align: center; color: var(--muted); font-size: 14px; padding: 3px 0; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.plan-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.plan-badge { color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.plan-price { font-size: 26px; font-weight: 800; letter-spacing: -.5px; text-align: right; }
.plan-price-note { font-size: 11px; font-weight: 400; color: var(--muted); }
.plan-name { font-size: 17px; font-weight: 700; }
.plan-tagline { font-size: 13px; color: var(--muted); margin-top: 4px; margin-bottom: 12px; }
.plan-sec { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; margin: 10px 0 4px; }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { font-size: 13px; padding: 3px 0 3px 18px; position: relative; color: var(--text); }
.plan-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan-delivery { font-size: 12px; color: var(--muted); background: #f8fafc; border-radius: 8px; padding: 8px 10px; }
.plan-cta { margin-top: 14px; }
[data-theme="dark"] .plan-ladder-step { background: #16202f; }
[data-theme="dark"] .plan-delivery { background: #16202f; }

/* ================= 客户漏斗（线索 / 商机管理） ================= */
.funnel-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 6px; }
.funnel-cell { background: #f8faff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 10px; text-align: center; }
.funnel-stage { font-size: 12px; font-weight: 700; }
.funnel-count { font-size: 26px; font-weight: 800; margin-top: 2px; }
.funnel-amt { font-size: 11px; color: var(--muted); margin-top: 2px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h3 { margin-bottom: 0; }
.muted-sm { font-size: 12px; font-weight: 400; color: var(--muted); }
.lead-form { margin-bottom: 12px; }
.fld select, .fld textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-family: inherit; font-size: 13px; }
[data-theme="dark"] .funnel-cell { background: #16202f; }

/* ================= 仪表盘快捷操作 ================= */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.qa-btn { padding: 8px 14px; border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.qa-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* ================= 仪表盘渐变总览带 ================= */
.dash-hero {
  position: relative; overflow: hidden; margin-bottom: 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #7c3aed 100%);
  border-radius: 16px; padding: 22px 24px; color: #fff;
  box-shadow: 0 12px 34px rgba(79,70,229,.28);
}
.dash-hero::before {
  content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.dash-hero::after {
  content: ""; position: absolute; right: 40px; bottom: -90px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.dh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; position: relative; z-index: 1; margin-bottom: 18px; }
.dh-title { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.dh-sub { font-size: 12.5px; color: rgba(255,255,255,.78); margin-top: 2px; }
.dh-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero .qa-btn { box-shadow: none; border: none; }
.qa-btn-primary { background: #fff; color: #4f46e5; font-weight: 700; }
.qa-btn-primary:hover { background: #eef2ff; color: #4338ca; border-color: transparent; transform: translateY(-1px); }
.qa-btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.qa-btn-ghost:hover { background: rgba(255,255,255,.26); color: #fff; border-color: rgba(255,255,255,.5); }
.dh-body { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; position: relative; z-index: 1; }
.dh-score { display: flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
.dh-score-num {
  font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.dh-score-label { font-size: 13px; color: rgba(255,255,255,.85); }
.dh-stats { display: flex; gap: 0; flex: 1; min-width: 280px; }
.dh-stat { flex: 1; padding: 0 18px; border-left: 1px solid rgba(255,255,255,.22); }
.dh-stat:first-child { border-left: none; padding-left: 0; }
.dh-stat-num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.dh-stat-label { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 3px; }
@media (max-width: 640px) {
  .dh-body { gap: 18px; }
  .dh-stats { flex-direction: column; gap: 12px; min-width: 0; }
  .dh-stat { padding: 0; border-left: none; }
  .dh-score-num { font-size: 40px; }
}

/* ================= 滑动开关（slider toggle） ================= */
input[type="checkbox"].switch {
  -webkit-appearance: none; appearance: none;
  width: 40px; height: 22px; flex: 0 0 auto; margin: 0; padding: 0;
  border-radius: 22px; background: #cbd5e1; position: relative; cursor: pointer;
  transition: background .2s ease; border: none;
}
input[type="checkbox"].switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.35);
  transition: transform .2s ease;
}
input[type="checkbox"].switch:checked { background: var(--primary); }
input[type="checkbox"].switch:checked::after { transform: translateX(18px); }
input[type="checkbox"].switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input[type="checkbox"].switch:disabled { opacity: .5; cursor: not-allowed; }
[data-theme="dark"] input[type="checkbox"].switch { background: #334155; }
[data-theme="dark"] input[type="checkbox"].switch:checked { background: var(--primary); }

/* ================= 抽屉（右侧滑出子界面） ================= */
.drawer-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 92vw;
  background: var(--card); z-index: 210; transform: translateX(100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.3); border-left: 1px solid var(--border);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 17px; margin: 0; }
.drawer-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: rgba(0,0,0,.05); color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ================= 弹窗（居中模态子界面） ================= */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .22s; }
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  width: 640px; max-width: 100%; max-height: 86vh; display: flex; flex-direction: column;
  transform: translateY(14px) scale(.98); transition: transform .25s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.modal-mask.open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; margin: 0; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(0,0,0,.05); color: var(--text); }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ================= 首次引导 ================= */
.onboard-mask { position: fixed; inset: 0; background: rgba(15,23,42,.65); z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.onboard {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  width: 560px; max-width: 100%; max-height: 88vh; overflow-y: auto; padding: 34px 34px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.onboard h2 { font-size: 22px; margin-bottom: 6px; }
.onboard .ob-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.ob-steps { display: flex; flex-direction: column; gap: 0; }
.ob-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.ob-step:last-child { border-bottom: none; }
.ob-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--grad, var(--primary));
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.ob-step b { display: block; font-size: 15px; margin-bottom: 2px; }
.ob-step span { font-size: 13px; color: var(--muted); }
.onboard-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.onboard .btn-primary { background: var(--primary); }

/* ================= 品牌详情抽屉内的小元件 ================= */
.brand-link { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0;
  text-decoration: underline; text-decoration-style: dotted; }
.brand-link:hover { color: #fff; }
.drawer-body h4 { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: none; }
.drawer-body .cards { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.drawer-body .card { padding: 14px; }
.drawer-body .card .num { font-size: 22px; }

/* ================= 动效增强（2026-09 新增） ================= */
/* 视图切换：整页淡入上移 */
#view-container.view-anim { animation: viewIn .38s cubic-bezier(.16,1,.3,1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* 通用入场（用于横幅/结论卡等首屏元素） */
.reveal-in { animation: revealIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to { opacity: 1; transform: none; }
}

/* 卡片悬停抬升 + 微阴影，按钮按压反馈 */
.card, .panel { transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15,23,42,.1); }
.btn-primary, .btn-ghost, .btn-sm, .qa-btn { transition: transform .12s ease, background .2s ease, box-shadow .2s ease; }
.btn-primary:active, .btn-ghost:active, .btn-sm:active { transform: translateY(1px) scale(.99); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: translateX(-100%); transition: transform .5s ease; }
.btn-primary:hover::after { transform: translateX(100%); }

/* 实时脉冲圆点（运行中指示） */
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; margin-right: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* 导航 NEW 徽章 */
.nav-new { margin-left: 6px; font-size: 9px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 1px 6px; border-radius: 20px; vertical-align: 1px; letter-spacing: .3px; }

/* ================= GEO 智能体 ================= */
.agent-verdict { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(168,85,247,.08)); border: 1px solid var(--border);
  border-radius: 14px; }
.agent-verdict .av-icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; font-size: 24px;
  display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1, #a855f7); }
.av-title { font-size: 15px; font-weight: 700; }
.av-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.av-sub b { color: var(--primary); }
.agent-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.agent-node { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; opacity: 0; animation: nodeIn .45s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes nodeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.agent-node.done { border-left: 4px solid var(--green); }
.agent-node.partial { border-left: 4px solid var(--primary); }
.agent-node.todo { border-left: 4px solid #cbd5e1; }
.an-step { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; background: #eef2ff; color: var(--primary);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.an-icon { font-size: 20px; }
.an-body { flex: 1; min-width: 0; }
.an-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.an-state { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; background: #f1f5f9; color: var(--muted); }
.agent-node.done .an-state { background: #dcfce7; color: #15803d; }
.agent-node.partial .an-state { background: #e0e7ff; color: var(--primary); }
.an-desc { font-size: 12px; color: var(--muted); margin: 3px 0 8px; }
.an-meter { height: 6px; border-radius: 3px; background: #eef1f6; overflow: hidden; }
.an-meter span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #6366f1, #a855f7);
  width: 0; transition: width 1s cubic-bezier(.16,1,.3,1); }
.an-detail { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.action-item { padding: 10px 14px; border-radius: 9px; margin-bottom: 8px; font-size: 13px;
  border-left: 4px solid; background: #f8fafc; }
.action-item.todo { border-color: #cbd5e1; }
.action-item.partial { border-color: var(--primary); background: #f5f6ff; }
.action-item.done { border-color: var(--green); background: #f0fdf4; }

/* ================= 合规筛查 ================= */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.comp-cat { padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--card); }
.comp-cat-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.risk-pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.risk-pill.hi { background: #fee2e2; color: #b91c1c; }
.risk-pill.mid { background: #fef3c7; color: #b45309; }
.risk-pill.ok { background: #dcfce7; color: #15803d; }
.comp-result { border-radius: 12px; padding: 16px; border: 1px solid var(--border); }
.comp-result.hi { border-color: #fca5a5; background: #fff5f5; }
.comp-result.mid { border-color: #fcd34d; background: #fffbeb; }
.comp-result.ok { border-color: #86efac; background: #f0fdf4; }
.comp-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.comp-hit { border-top: 1px dashed var(--border); padding: 10px 0; }
.comp-hit:first-of-type { border-top: none; }
.comp-hit-title { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.comp-hit-words { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.comp-hit-advice { font-size: 12px; color: var(--muted); line-height: 1.6; }
.tag.red { background: #fee2e2; color: #b91c1c; }

/* ================= 信源权重 ================= */
.src-table { display: flex; flex-direction: column; }
.src-row { display: grid; grid-template-columns: 1.4fr 2fr .6fr .7fr; gap: 14px; align-items: center;
  padding: 12px 8px; border-bottom: 1px solid var(--border); opacity: 0;
  animation: nodeIn .4s cubic-bezier(.16,1,.3,1) forwards; }
.src-row.src-head { opacity: 1; animation: none; font-size: 12px; color: var(--muted); font-weight: 600; }
.src-cat { font-weight: 600; font-size: 13.5px; }
.src-meter { height: 8px; border-radius: 4px; background: #eef1f6; overflow: hidden; flex: 1; }
.src-meter span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6366f1, #a855f7);
  width: 0; transition: width 1s cubic-bezier(.16,1,.3,1); }
.src-w { margin-left: 8px; color: var(--primary); font-size: 13px; }
.tier { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 6px; }
.tier-s { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.tier-a { background: #e0e7ff; color: #4338ca; }
.tier-b { background: #e2e8f0; color: #475569; }
.tier-c { background: #f1f5f9; color: #94a3b8; }
.src-reason { font-size: 12px; color: var(--muted); padding: 0 8px 12px; border-bottom: 1px solid var(--border); }
.tag.green { background: #dcfce7; color: #15803d; }

/* 暗色模式补充 */
[data-theme="dark"] .agent-verdict { background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(168,85,247,.14)); }
[data-theme="dark"] .an-meter, [data-theme="dark"] .src-meter { background: #273449; }
[data-theme="dark"] .an-step { background: #273449; color: #a5b4fc; }
[data-theme="dark"] .action-item { background: #16202f; }
[data-theme="dark"] .action-item.partial { background: #1e2440; }
[data-theme="dark"] .action-item.done { background: #12261c; }
[data-theme="dark"] .comp-result.hi { background: #2a1a1a; border-color: #7f1d1d; }
[data-theme="dark"] .comp-result.mid { background: #251f12; border-color: #92400e; }
[data-theme="dark"] .comp-result.ok { background: #12261c; border-color: #166534; }
[data-theme="dark"] .tag.red { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .tag.green { background: #14532d; color: #86efac; }

/* 侧栏「一键跑一轮监控」快捷按钮 */
.quick-run { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 10px 12px; margin-bottom: 12px; border: 1px solid rgba(99,102,241,.45); border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(168,85,247,.18)); color: #e0e7ff;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.quick-run:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,.35); background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(168,85,247,.3)); }
.quick-run:active { transform: translateY(1px); }
.quick-run:disabled { opacity: .65; cursor: wait; }
.quick-run-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulseRing 1.8s ease-out infinite; }
.quick-run-dot.spin { background: #a5b4fc; animation: spinDot .9s linear infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@keyframes spinDot { to { transform: rotate(360deg); } }

/* 仪表盘运营健康度评分卡 */
.health-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.health-card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.health-card .hc-num { font-size: 28px; font-weight: 800; line-height: 1.1; }
.health-card .hc-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.health-card .hc-bar { height: 6px; background: #eef1f6; border-radius: 3px; margin-top: 10px; overflow: hidden; }
.health-card .hc-bar span { display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7); transition: width 1s cubic-bezier(.16,1,.3,1); }
[data-theme="dark"] .health-card .hc-bar { background: #16202f; }

/* ================= 三级界面：子标签页 ================= */
.subtabs { display: inline-flex; gap: 6px; padding: 5px; background: #eef1f6; border-radius: 11px; margin-bottom: 16px; }
[data-theme="dark"] .subtabs { background: #1e293b; }
.subtab { border: none; background: transparent; padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--muted); font-weight: 500; transition: all .18s ease; }
.subtab:hover { color: var(--text); }
.subtab.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .subtab.active { background: #0f172a; color: #a5b4fc; }
.ai-tabpane { animation: viewIn .32s cubic-bezier(.16,1,.3,1); }

/* ================= 行业信源地图 ================= */
.tag.violet { background: #ede9fe; color: #6d28d9; }
[data-theme="dark"] .tag.violet { background: #2e1e5c; color: #c4b5fd; }
.sm-card { padding: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.sm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sm-icon { font-size: 24px; line-height: 1.2; }
.sm-cat { font-size: 14.5px; font-weight: 700; }
.sm-core { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sm-tactic { font-size: 12.5px; color: var(--muted); line-height: 1.6; border-top: 1px dashed var(--border); padding-top: 10px; }

/* ================= 常见问题（FAQ） ================= */
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--card); overflow: hidden; }
.faq-item summary { padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none;
  display: flex; align-items: center; gap: 8px; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "＋"; color: var(--primary); font-weight: 800; transition: transform .2s ease; }
.faq-item[open] summary::before { content: "－"; }
.faq-a { padding: 0 16px 14px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ================= 信源抓取（一键抓信源） ================= */
.muted { color: var(--muted); font-size: 12.5px; }
.crossbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px;
  border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 14px; background: var(--card); }
.crossbar-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.crossbar .btn-ghost { padding: 5px 12px; font-size: 12.5px; }
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .sc-grid { grid-template-columns: 1fr; } }
.sc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.field-label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lb-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.lb-meta b { color: var(--text); }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--card); transition: transform .15s ease, box-shadow .15s ease; }
.lb-row:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.lb-rank { width: 26px; height: 26px; flex: 0 0 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #eef2f7; color: var(--muted); font-weight: 800; font-size: 13px; }
.lb-row:nth-child(1) .lb-rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.lb-row:nth-child(2) .lb-rank { background: #e2e8f0; color: #475569; }
.lb-row:nth-child(3) .lb-rank { background: #fde8d7; color: #b45309; }
.lb-main { flex: 0 0 190px; min-width: 0; }
.lb-name { font-weight: 700; font-size: 13.5px; word-break: break-all; }
.lb-url { color: var(--primary); text-decoration: none; font-size: 12px; }
.lb-cats { display: flex; align-items: center; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.lb-bar { flex: 1; height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.lb-bar span { display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7); transition: width .8s cubic-bezier(.16,1,.3,1); }
.lb-refs { flex: 0 0 52px; text-align: right; font-weight: 800; color: var(--primary); font-size: 13px; }
.lb-prov { flex: 0 0 150px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
[data-theme="dark"] .lb-rank { background: #273449; color: #a5b4fc; }
[data-theme="dark"] .lb-bar { background: #16202f; }
[data-theme="dark"] .lb-row:nth-child(3) .lb-rank { background: #3b2415; color: #f59e0b; }

/* 发布账号 / 发布追踪 */
.nowrap { white-space: nowrap; }
code { background: #eef2f7; color: #6d28d9; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
[data-theme="dark"] code { background: #273449; color: #a5b4fc; }

/* 企业背调 */
.bg-items { margin: 0; padding: 0; list-style: none; }
.bg-items li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.bg-items li:last-child { border-bottom: none; }
.bg-item-text { color: #374151; line-height: 1.6; word-break: break-word; }
[data-theme="dark"] .bg-item-text { color: #cbd5e1; }

/* 运营链路 */
.pipe-wrap { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px; }
.pipe-step { display: flex; gap: 16px; align-items: stretch; }
.pipe-node { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.pipe-ico { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #6d7cff, #a56bff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pipe-num { margin-top: 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.pipe-body { flex: 1; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 12px 16px; }
.pipe-name { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pipe-desc { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.pipe-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pipe-arrow { text-align: center; color: var(--muted); font-size: 14px; line-height: 1; margin: 0 0 0 52px; }
[data-theme="dark"] .pipe-body { background: #1a2333; }

/* ================= 交互打磨（2026-09-22）：弹窗表单 · 发布模块增强 ================= */
/* 补齐缺失的红色标签（AI 率「需降 AI」用） */
.tag.red { background: #fee2e2; color: var(--red); }

/* 通用弹窗内表单 */
.ui-confirm-msg { font-size: 14px; line-height: 1.7; color: #374151; }
[data-theme="dark"] .ui-confirm-msg { color: #cbd5e1; }
.ui-field { margin-bottom: 14px; }
.ui-field:last-child { margin-bottom: 0; }
.ui-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
[data-theme="dark"] .ui-field > label { color: #cbd5e1; }
.ui-field input, .ui-field select, .ui-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; background: var(--card); color: var(--text); font-family: inherit;
}
.ui-field input:focus, .ui-field select:focus, .ui-field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.ui-hint { margin-top: 5px; font-size: 12px; color: var(--muted); }

/* 发布模块：工具栏 / 筛选 / 选择条 */
.pt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pt-toolbar .spacer { flex: 1 1 auto; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.pt-filters input, .pt-filters select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
  background: var(--card); color: var(--text);
}
.pt-filters input[type="text"] { flex: 1 1 180px; min-width: 140px; }
.pt-filters .fld-label { font-size: 12px; color: var(--muted); }
.sel-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.sel-bar .count { font-weight: 700; color: var(--primary); }
.mini-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.mini-link:hover { text-decoration: underline; }
.account-picker { max-height: 160px; overflow: auto; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; background: #fbfcfe; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
[data-theme="dark"] .account-picker { background: #131b29; }

/* 行内操作按钮组 */
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.row-actions .btn-sm { white-space: nowrap; }
.btn-sm.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-sm.primary:hover { background: var(--primary-dark); }
.btn-sm.ok { background: #ecfdf5; border-color: #a7f3d0; color: var(--green); }
.btn-sm.ok:hover { background: #d1fae5; }
.btn-sm.danger { color: var(--red); border-color: #fecaca; }
.btn-sm.danger:hover { background: #fef2f2; }
.btn-sm:disabled { opacity: .55; cursor: not-allowed; }

/* 进度条（批量生成发布任务用） */
.progress-inline { flex: 1 1 180px; height: 8px; background: #eef1f6; border-radius: 5px; overflow: hidden; min-width: 120px; }
.progress-inline > span { display: block; height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, #6366f1, #a855f7); transition: width .25s ease; }
[data-theme="dark"] .progress-inline { background: #16202f; }

/* AI 检测结果卡片 */
.ai-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fafbff; }
[data-theme="dark"] .ai-card { background: #131b29; }
.ai-score { font-size: 30px; font-weight: 800; line-height: 1.1; }
.ai-feat { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 4px 0;
  border-bottom: 1px dashed var(--border); color: var(--muted); }
.ai-feat:last-child { border-bottom: none; }

/* 图例 */
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend b { color: var(--text); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.section-title { font-weight: 700; font-size: 13px; margin: 14px 0 4px; }

/* ===== 使用与导出中心（guide） ===== */
.nav-guide { font-weight: 600; }
.guide-section-title { font-size: 15px; font-weight: 800; margin: 22px 0 12px; }
.guide-stage { margin-bottom: 14px; }
.guide-stage-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.guide-stage-badge { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; display: flex;
  align-items: center; justify-content: center; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, #6d7cff, #a56bff); }
.guide-stage-name { font-size: 16px; font-weight: 800; }
.guide-stage-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.guide-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(76,86,160,.12); border-color: #c7d2fe; }
.guide-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gc-icon { font-size: 16px; }
.gc-name { font-weight: 700; }
.gc-go { margin-left: auto; }
.gc-row { display: flex; gap: 8px; align-items: flex-start; margin: 5px 0; font-size: 12.5px; line-height: 1.55; }
.gc-tag { flex: 0 0 42px; text-align: center; border-radius: 5px; font-size: 11px; padding: 1px 0; height: 18px; line-height: 18px; }
.gc-tag.in { background: #e0f2fe; color: #0369a1; }
.gc-tag.out { background: #ecfdf5; color: #047857; }
.gc-tag.exp { background: #fef3c7; color: #b45309; }
.gc-tag.busy { background: #f3e8ff; color: #7c3aed; }
.gc-tag.when { background: #e0e7ff; color: #4338ca; }
.gc-txt { color: var(--text); }
.guide-hero-title { font-weight: 800; margin-bottom: 12px; }
.guide-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.guide-flow-step { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; background: #f7f8ff; border: 1px solid #e6e9ff; }
.gfs-num { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.gfs-title { font-weight: 700; font-size: 13px; }
.gfs-desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.guide-export-panel { border-left: 4px solid #2563eb; }
.guide-export-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.guide-brand-pick { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; }
.guide-brand-pick select { min-width: 180px; }
.guide-export-note { background: #f5f7ff; border: 1px dashed #c7d2fe; border-radius: 8px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.7; color: #374151; margin: 12px 0; }
.guide-exp-table td, .guide-exp-table th { vertical-align: middle; }
.guide-exp-table .nowrap { white-space: nowrap; }
[data-theme="dark"] .guide-card { background: #131b29; border-color: #334155; }
[data-theme="dark"] .guide-card:hover { border-color: #6366f1; }
[data-theme="dark"] .guide-flow-step { background: #131b29; border-color: #334155; }
[data-theme="dark"] .guide-export-note { background: #131b29; border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .gc-tag.in { background: #082f49; color: #7dd3fc; }
[data-theme="dark"] .gc-tag.out { background: #052e1c; color: #6ee7b7; }
[data-theme="dark"] .gc-tag.exp { background: #3b2a06; color: #fcd34d; }
[data-theme="dark"] .gc-tag.busy { background: #2a1145; color: #c4b5fd; }
[data-theme="dark"] .gc-tag.when { background: #1e1b4b; color: #a5b4fc; }

/* ===== 后台任务状态胶囊（顶栏） ===== */
.bg-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 12px; cursor: pointer;
  transition: all .2s ease; }
.bg-status:hover { border-color: #c7d2fe; }
.bg-status.on { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; font-weight: 600; }
.bg-status .bg-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.bg-status.on .bg-dot { background: #6366f1; animation: bg-pulse 1s ease-in-out infinite; }
@keyframes bg-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
[data-theme="dark"] .bg-status { background: #131b29; }
[data-theme="dark"] .bg-status.on { background: #1e1b4b; border-color: #4338ca; color: #a5b4fc; }

/* ===== 企业自动观察卡 ===== */
.obs-panel { border-left: 4px solid #0ea5e9; }
.obs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obs-row { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.obs-k { flex: 0 0 64px; color: var(--muted); font-size: 12.5px; padding-top: 2px; }
.obs-v { flex: 1; line-height: 1.65; }
.obs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.obs-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; border: 1px solid #dbeafe; }
.obs-chip.ind { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.obs-chip.ent { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.obs-q { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 6px; background: #fff; }
.obs-q .obs-q-text { flex: 1; font-size: 13px; line-height: 1.5; }
.obs-q button { flex: 0 0 auto; }
[data-theme="dark"] .obs-chip { background: #0b2540; border-color: #1e40af; color: #93c5fd; }
[data-theme="dark"] .obs-chip.ind { background: #052e1c; border-color: #065f46; color: #6ee7b7; }
[data-theme="dark"] .obs-chip.ent { background: #3b2a06; border-color: #92400e; color: #fcd34d; }
[data-theme="dark"] .obs-q { background: #131b29; }

/* ===== 步骤进度（长任务） ===== */
.step-progress { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.step-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.step-item .st-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.step-item.active { color: var(--text); font-weight: 600; }
.step-item.active .st-dot { border-color: var(--primary); }
.step-item.active .st-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
  animation: bg-pulse 1s ease-in-out infinite; }
.step-item.done .st-dot { background: var(--green); border-color: var(--green); }
.step-item.done .st-dot::after { content: "✓"; }

/* 侧栏左下角 运营链路 入口 */
.footer-link { display: block; margin: 8px 0 2px; font-size: 12.5px; color: var(--muted); text-decoration: none;
  padding: 6px 8px; border-radius: 7px; border: 1px dashed var(--border); }
.footer-link:hover { color: var(--primary); border-color: #c7d2fe; background: #f7f8ff; }
[data-theme="dark"] .footer-link:hover { background: #131b29; }

/* 统一「输入 / 产出」分区标签 */
.zone-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: #4338ca; background: #eef2ff; border: 1px solid #dbeafe; border-radius: 999px;
  padding: 2px 10px; margin: 4px 0 8px; }
.zone-label.out { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
[data-theme="dark"] .zone-label { background: #1e1b4b; border-color: #4338ca; color: #a5b4fc; }
[data-theme="dark"] .zone-label.out { background: #052e1c; border-color: #065f46; color: #6ee7b7; }

/* ===== 移动端响应式：小屏把固定侧栏改为可收起的抽屉，消除横向溢出 ===== */
.topbar .nav-toggle { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { width: 240px; transform: translateX(-100%); transition: transform .22s ease; z-index: 70; }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; }
  .content { margin-left: 0; padding: 16px; overflow-x: auto; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar .nav-toggle { display: inline-flex; }
  .health-strip { grid-template-columns: repeat(2, 1fr); }
  /* 窄屏：面板内表格可横向滚动，避免撑破布局 */
  .panel { overflow-x: auto; }
  .panel table { min-width: 560px; }
}

/* ===== toast 分级：成功绿色 / 失败红色 ===== */
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }

/* ===== 返回顶部按钮（长页面滚动后出现） ===== */
.back-top { position: fixed; right: 22px; bottom: 84px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer;
  font-size: 18px; line-height: 1; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none;
  transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; z-index: 40; }
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { border-color: var(--primary); color: var(--primary); }
[data-theme="dark"] .back-top { background: #16202f; border-color: #334155; }

/* ===== 深色模式补齐：品牌锁定条 / 搜索框 / 下拉 ===== */
[data-theme="dark"] .lock-brand-wrap { background: #16202f; border-color: #334155; }
[data-theme="dark"] .lock-brand-input { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .search-box input { background: #16202f; color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] .search-drop, [data-theme="dark"] .bell-drop { background: #16202f; border-color: #334155; }

/* 顶栏文字不再被挤成竖排 */
.topbar-home, .lock-brand-apply, .lang-switch { white-space: nowrap; }
