 /* ══════════════════════════════════════════════════
   components.css — 组件层：侧边栏、Topbar、弹窗、表单、列表、编辑器
   ══════════════════════════════════════════════════ */


 /* ════════════════════════════════
   列1：站点导航
   ════════════════════════════════ */
.sidebar {
  width: 260px; min-width: 260px;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0;
}
.sidebar-logo {
  height: 80px; padding: 0 16px;
  display: flex; flex-direction: column; justify-content: center;
  border-bottom: 1px solid var(--text); flex-shrink: 0;
}
.sidebar-logo .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.sidebar-logo .brand-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white);
  box-shadow: 0 2px 8px var(--accent-30);
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  color: var(--white); font-size: 14px; font-weight: 700;
}
.sidebar-logo .logo-sub { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

 /* ── 侧边栏「所有站点」融入分类列表（方案H）── */
.ind-home-item {
  margin: 6px 8px 0;
  color: var(--sidebar-text);
  background: var(--sidebar-active-bg);
  padding-bottom: 11px;
  border-bottom: 1px solid var(--sidebar-active-bg);
  text-decoration: none;
}
.ind-home-item:hover { background: var(--sidebar-hover); color: var(--border); }
.ind-home-item.active { background: var(--sidebar-active); color: var(--white); }
.sidebar-all-link .s-icon {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--accent-25);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.sidebar-all-link .s-label { font-weight: 500; flex: 1; }
.sidebar-all-link.active {
  background: linear-gradient(135deg, var(--accent-35), var(--accent-20));
  border-color: var(--accent-50); color: var(--white);
}

.site-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; }

.site-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  margin-bottom: 1px; transition: background .12s;
  color: var(--text-faint); font-size: 13px;
}
.site-item:hover  { background: var(--sidebar-hover); color: var(--border); }
.site-item.active { background: var(--sidebar-active); color: var(--white); }
.site-item:hover .badge-glass { background: var(--white); color: var(--text-muted); }
.site-item.dragging { opacity: 0.5; background: var(--accent-light); }
.site-item.drag-over { border-top: 2px solid var(--accent); }
.site-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.site-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-expiry-badge { font-size:9px;font-weight:700;padding:1px 4px;border-radius:4px;flex-shrink:0;line-height:1.4; }
.site-expiry-soon    { background:var(--orange-soft-bg);color:var(--orange-text);border:1px solid var(--orange-soft-border); }
.site-expiry-expired { background:var(--red-bg);color:var(--red-hover);border:1px solid var(--red-border); }
.sidebar-bottom { padding: 8px; border-top: 1px solid var(--text); flex-shrink: 0; display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; }
.sidebar-bottom.sidebar-bottom-2row { display: flex; flex-direction: column; gap: 4px; }
.sidebar-bottom.sidebar-bottom-2row .sidebar-btn-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sidebar-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  flex: 1; padding: 8px 2px; border-radius: 6px; cursor: pointer;
  color: var(--text-muted); font-size: 11px; transition: all .12s;
  white-space: nowrap;
}
.sidebar-btn > span:first-child { font-size: 12px; line-height: 1; width: 14px; text-align: center; }
.sidebar-btn:hover { background: var(--sidebar-hover); color: var(--text-faint); }

 /* ── 种子词区块 ── */
.seed-kw-bar {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  cursor: pointer; user-select: none;
  background: var(--bg); font-size: 12px;
}
.seed-kw-bar:hover { background: var(--sidebar-hover); }
.seed-kw-bar-title { font-weight: 600; color: var(--text-muted); flex: 1; }
.seed-kw-bar-actions { display: flex; gap: 4px; }
.seed-kw-chevron { font-size: 10px; color: var(--text-faint); transition: transform .15s; }
.seed-kw-chevron.collapsed { transform: rotate(180deg); }
.seed-kw-body { overflow: hidden; }
.seed-kw-body.collapsed { display: none; }
.seed-kw-list { padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 2px; }
.seed-kw-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: 4px; font-size: 12px;
  background: var(--white); border: 1px solid var(--border);
}
.seed-kw-item:hover { background: var(--accent-light); }
.seed-kw-word { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-kw-del { background: none; border: none; cursor: pointer; color: var(--text-faint); font-size: 14px; line-height: 1; padding: 0 2px; }
.seed-kw-del:hover { color: var(--danger); }
.seed-kw-empty { padding: 10px; color: var(--text-faint); font-size: 12px; text-align: center; }
.seed-kw-add-row { display: flex; gap: 6px; padding: 4px 6px 6px; }
.seed-kw-add-row input { flex: 1; font-size: 12px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; outline: none; transition: border-color .15s; }
.seed-kw-add-row input:focus { border-color: var(--accent); }

 /* ── 站点模板卡片 ── */
.stm-card { display:flex; flex-direction:column; gap:4px; border:1px solid var(--border); border-radius:8px; padding:12px; margin-bottom:8px; background:var(--white); }
.stm-card.active { border-color: var(--green); background: var(--green-bg); }
.stm-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.stm-card-name { font-size:13px; font-weight:600; color:var(--text); flex:1; word-break:break-all; }
.stm-card-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:auto; padding-top:8px; }
.stm-card-desc { font-size:12px; color:var(--text-muted); margin-top:6px; line-height:1.5; }
.stm-card-meta { font-size:11px; color:var(--text-faint); margin-top:6px; }
.stm-card .pl-dot { flex-shrink:0; margin-top:2px; }

 /* ── 颜色圆点（无内联样式） ── */
.dot-green  { background: var(--green); }
.dot-blue   { background: var(--accent); }
.dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); }
.dot-red    { background: var(--red); }
.dot-gray   { background: var(--text-faint); }
.dot-faint  { background: var(--text-faint); }

 /* ════════════════════════════════
   列2：站点标题 + 目录树
   ════════════════════════════════ */
.col-cat {
  width: 260px; min-width: 260px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0;
}
#col-cat {
  width: 260px; min-width: 260px;
}
#col-sites {
  width: 320px; min-width: 320px;
}
#col-cat-dir-countries {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
#col-cat-normal,
#col-cat-prompts,
#col-cat-templates,
#col-cat-vars {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
#col-dir {
  width: 400px; min-width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: visible;
  flex-shrink: 0;
}
.col-cat-site {
  min-height: var(--panel-hd); padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-shrink: 0;
}
.col-cat-site-left { min-width: 0; }
.col-cat-site-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col-cat-site-name a { color: inherit; text-decoration: none; }
.col-cat-site-name a:hover { text-decoration: none; }
.site-cfg-link { cursor: pointer; }
.site-cfg-link:hover { color: var(--accent); }
.col-cat-site-name .site-cfg-link { cursor: pointer; }
.col-cat-site-name .site-cfg-link:hover { color: var(--accent); }
.col-cat-site-right .site-cfg-link { cursor: pointer; }
.col-cat-site-right .site-cfg-link:hover { color: inherit; }
.col-cat-site-3row .site-cfg-link:hover { color: inherit; }
.col-cat-site-url { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.col-cat-site-url a { color: inherit; text-decoration: none; }
.col-cat-site-url a:hover { text-decoration: none; }
.col-cat-site-stats { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.col-cat-site-idline { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }

/* 多行版站点头部：第1行 站名|状态，第2行 网址|站龄·文章数，第3行 站点ID|日100PV月赚tag，第4行 后台/服务器|搜索与收录图标 */
.col-cat-site-3row { flex-direction: column; align-items: stretch; gap: 3px; }
.col-cat-site-3row .col-cat-site-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
}
.col-cat-site-3row .col-cat-site-name { min-width: 0; }
.col-cat-site-3row .col-cat-site-url { margin-top: 0; min-width: 0; }
.col-cat-site-admin { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.col-cat-site-admin a {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--text-muted); text-decoration: none; opacity: .8;
}
.col-cat-site-admin a:hover { opacity: 1; color: var(--accent); }
.col-cat-site-admin svg { width: 12px; height: 12px; display: block; }
.col-cat-site-right .search-engine-icons, .col-cat-site-3row .search-engine-icons { display: inline-flex; align-items: center; gap: 4px; margin-left: 0; flex-shrink: 0; }
.col-cat-site-right .search-engine-icons a, .col-cat-site-3row .search-engine-icons a { display: inline-flex; align-items: center; opacity: .65; transition: opacity .15s; }
.col-cat-site-right .search-engine-icons a:hover, .col-cat-site-3row .search-engine-icons a:hover { opacity: 1; }
.col-cat-site-right .search-engine-icons svg, .col-cat-site-3row .search-engine-icons svg { width: 12px; height: 12px; display: block; }

/* 站点头部第4行：收录抽查（与目录页同一交互：整站 site 搜索 + 最近5天每天一篇精确 URL 搜索） */
.site-index-probes { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.idx-probe-line { display: flex; align-items: flex-start; gap: 8px; }
.idx-probe-label { flex: 0 0 auto; width: 32px; font-size: 10px; color: var(--text-tertiary, #999); line-height: 18px; }
.idx-probe-slot { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; line-height: 0; }
.idx-probe-slot svg { width: 12px; height: 12px; display: block; }
.idx-probe-slot i { font-style: normal; font-size: 9px; color: var(--text-tertiary, #999); line-height: 1.2; }
.idx-probe-slot.is-empty u { text-decoration: none; font-size: 10px; color: #c9cdd4; line-height: 12px; }
.idx-probe-line a.idx-probe-slot { opacity: .75; transition: opacity .15s; }
.idx-probe-line a.idx-probe-slot:hover { opacity: 1; }
.col-cat-site-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* 统一站点标题块：上排站点名 + 下排网址 */
.site-title-block { margin-bottom: 16px; }
.site-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.site-title a { color: #1890ff; text-decoration: none; }
.site-title a:hover { text-decoration: underline; }
.site-title-url { font-size: 12px; margin-top: 2px; color: var(--text-muted); }
.site-title-url a { color: inherit; text-decoration: none; }
.site-title-url a:hover { text-decoration: underline; }

.col-cat-toolbar {
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-start;
  gap: 4px; flex-shrink: 0;
  min-height: 44px; box-sizing: border-box;
}
.col-cat-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: .04em; text-transform: uppercase;
  margin-right: auto;
}

 /* 目录树 */
.cat-list { flex: 1; overflow-y: auto; padding: 4px 0; }

.cat-l1 { margin-bottom: 1px; }
.cat-l1-row {
  display: flex; align-items: center; padding: 0 8px; cursor: pointer;
  border-radius: 6px; margin: 0 4px; transition: background .1s;
}
.cat-l1-row:hover  { background: var(--bg); }
.cat-l1-row.active { background: var(--accent-light); }
.cat-l1-toggle {
  width: 18px; height: 32px; display: flex; align-items: center;
  justify-content: center; color: var(--text-faint); font-size: 8px;
  flex-shrink: 0; transition: transform .18s; cursor: pointer;
}
.cat-l1-toggle:hover { color: var(--accent); }
.cat-l1-toggle.open { transform: rotate(90deg); }
.cat-l1-info { flex: 1; padding: 6px 0; cursor: pointer; }
.country-flag { width: 18px; height: 13px; vertical-align: middle; margin-right: 4px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); }
.cat-l1-en { font-size: 12px; font-weight: 700; color: var(--text); }
.cat-l1-cn { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.cat-l1-row.active .cat-l1-en    { color: var(--accent); }
.cat-l1-row.active .badge-border-light { background: var(--white); color: var(--accent); }
.cat-l1-row:hover  .badge-border-light { background: var(--white); }
.cat-l2-list {
  overflow: hidden; max-height: 0; transition: max-height .25s ease;
  margin-left: 20px; border-left: 2px solid var(--border);
}
.cat-l2-list.open { max-height: 2000px; margin-bottom: 3px; }
.cat-l2-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 11px; cursor: pointer;
  transition: background .1s; border-radius: 0 6px 6px 0; position: relative;
}
.cat-l2-item::before {
  content: ''; position: absolute; left: -9px; top: 50%;
  width: 9px; height: 1px; background: var(--border);
}
.cat-l2-item:hover  { background: var(--bg); }
.cat-l2-item.active { background: var(--accent-light); }
.cat-l2-item.active::before { background: var(--accent); }
.cat-l2-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border); flex-shrink: 0; transition: background .12s;
}
.cat-l2-item.active .cat-l2-dot { background: var(--accent); }
.cat-l2-icon {
  width: 18px; flex-shrink: 0; text-align: center;
  font-size: 13px; line-height: 1;
}
.cat-l2-icon .country-flag { margin-right: 0; }
 /* 全部文章入口 */
.cat-all-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 12px; margin: 4px 0 6px;
  border-radius: 6px; cursor: pointer;
  border-left: 3px solid transparent; transition: background .1s, border-left-color .1s;
}
.cat-all-item:hover  { background: var(--bg); }
.cat-all-item.active { background: var(--accent-light); border-left-color: var(--accent); }
.cat-all-icon  { display: inline-block; width: 18px; text-align: center; font-size: 14px; color: var(--text-muted); line-height: 1; }
.cat-all-label { flex: 1; font-size: 12px; font-weight: 700; color: var(--text); }
.cat-all-item.active .cat-all-label { color: var(--accent); }
.cat-all-item.active .badge-border-light { background: var(--white); color: var(--accent); }
.cat-all-item:hover  .badge-border-light { background: var(--white); }

 /* 二级目录信息块（含英文） */
.cat-l2-info { flex: 1; min-width: 0; }
.cat-l2-en { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-l2-cn { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.cat-l2-item.active .cat-l2-en { color: var(--accent); font-weight: 600; }
.cat-l2-cnt {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: var(--border-light); padding: 2px 6px; border-radius: 999px;
}
.cat-l2-item.active .cat-l2-cnt { background: var(--white); color: var(--accent); }
.cat-l2-item:hover  .cat-l2-cnt { background: var(--white); }

 /* ════════════════════════════════
   Topbar
   ════════════════════════════════ */
.topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  height: var(--panel-hd); flex-shrink: 0;
  display: flex; align-items: center; padding: 0 14px;
}
.tab-nav {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg); border-radius: 8px;
  padding: 3px;
}
.tab-btn {
  flex: 1; padding: 6px 14px; border-radius: 6px;
  border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  transition: all .15s; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none;
}
.tab-btn:hover  { color: var(--text); background: var(--bg); }
.tab-btn.active {
  background: var(--white); color: var(--accent);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent-light);
}
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px; margin: 8px 10px 8px auto;
  border-radius: 8px; flex-shrink: 0; cursor: pointer; transition: background .12s;
}
.topbar-user:hover { background: var(--bg); }
.topbar-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.topbar-uname { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* 写作顺序预览：话题列（ID + 对应关键词并排），同 topic_id 出现在相邻同分类行时视为异常 */
.topic-cell { display: flex; align-items: baseline; gap: 6px; }
.topic-id   { font-family: monospace; }

.badge { font-size: 10px; padding: 2px 6px; border-radius: 999px; font-weight: 600; }
.badge-xs { font-size: 9px; padding: 2px 6px; border-radius: 999px; font-weight: 600; }
.badge-ymyl { transition: background .12s, color .12s; }
.site-row:hover .badge-ymyl { background: var(--white); }
.badge-ymyl-none { background: var(--border-light); color: var(--text-muted); }
.badge-green  { background: var(--green); color: var(--white); }
.badge-green-soft { background: var(--green-bg); color: var(--green-dark); }
.badge-gray   { background: var(--gray-light); color: var(--gray-darker); }
.badge-blue   { background: var(--accent); color: var(--white); }
.badge-orange { background: var(--orange-bg); color: var(--orange-text); }
.badge-red    { background: var(--red-bg); color: var(--red); }
.badge-purple { background: var(--purple-light); color: var(--purple-text); }
.badge-border-light { background: var(--border-light); color: var(--text-muted); }
.badge-glass { background: var(--glass); color: var(--text-muted); }
.badge-accent-light { background: var(--accent-light); color: var(--blue-text); }
.badge-purple-bg { background: var(--purple-bg); color: var(--purple-text); }
.badge-border { background: var(--border); color: var(--text-muted); }
.badge-outline { background: transparent; border: 1px solid var(--text-faint); color: var(--text-muted); }
.badge-yellow { background: var(--yellow); color: var(--white); }

/* .com 可用性徽标（做站策略选择器/国家信息详情共用）：绿=可用 .com，红=须国别域名 */
.badge-com-ok  { background: var(--green-bg); color: var(--green-dark); }
.badge-com-no  { background: var(--red-bg); color: var(--red); }

/* 做站策略选择器 pool 内的档分组标题 */
.mkt-tier-head { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 8px 2px 3px; border-top: 1px solid var(--border-light); margin-top: 6px; }
.mkt-tier-head:first-child { border-top: none; margin-top: 0; }
.mkt-tier-head-muted { opacity: .75; }

.badge-clickable { cursor: pointer; transition: opacity .12s; }
.badge-clickable:hover { opacity: .75; }

 /* ════════════════════════════════
   左侧列面板（标题列 / 内链词列）
   ════════════════════════════════ */
.writing-page { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.ilink-page   { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.left-panel {
  width: 400px; min-width: 220px; background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}
/* 下拉菜单展开时允许溢出，避免按钮下拉菜单被左侧裁切，效果与 #col-dir 下的配置下拉一致 */
.left-panel:has(.btn-drop.open) { overflow: visible; }
.lp-header { flex-shrink: 0; border-bottom: 1px solid var(--border); }
.lp-header .col-cat-toolbar { border-bottom: none; }
.lp-title { flex: 1; min-width: 0; }
.lp-search-row { padding: 9px 13px; display: flex; gap: 6px; align-items: center; }
.lp-search {
  flex: 1; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; outline: none;
  min-width: 0; color: var(--text);
}
.lp-search:focus { border-color: var(--accent); }
.filter-bar { display: flex; padding: 0 8px; border-top: 1px solid var(--border-light); }
.filter-tab {
  padding: 6px 8px; border: none; background: none; font-size: 12px;
  cursor: pointer; color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color .12s, border-color .12s; font-weight: 500; white-space: nowrap;
}
.filter-tab:hover  { color: var(--accent); }
.filter-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.filter-tab .cnt {
  font-size: 10px; background: var(--border-light);
  padding: 2px 6px; border-radius: 999px; margin-left: 3px; font-weight: 600;
}
.filter-tab.active .cnt { background: var(--accent-light); color: var(--accent); }

.lp-list { flex: 1; overflow-y: auto; min-height: 0; }


.lp-item {
  padding: 12px; cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border-light);
  transition: background .1s, border-left-color .1s;
}
.lp-item:hover  { background: var(--bg); border-left-color: var(--border-hover); }
.lp-item.active { background: var(--accent-light); border-left-color: var(--accent); }
.lp-item-en     { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item.active .lp-item-en { color: var(--accent); }
.lp-item-cn     { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lp-item-foot   { display: flex; align-items: center; gap: 4px; margin-top: 5px; }
.lp-item-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lp-item-title-row .lp-item-en { flex: 1; min-width: 0; }
.lp-item-title-row .role-badge,
.lp-item-title-row .badge { flex-shrink: 0; margin-top: 1px; }
.lp-item-title-row .scfg-interactive-cb { width: auto; padding: 0; margin: 0; border: none; background: transparent; flex-shrink: 0; }
.lp-item-stat   { font-size: 10px; color: var(--text-faint); }
.lp-item-kw     { font-size: 10px; color: var(--accent); opacity: .8; max-width: 100px; overflow: hidden; line-height: 1.3; }
.lp-item-kw-en  { font-size: 9px; color: var(--text-faint); }
.lp-item-slug   { font-size: 10px; color: var(--text-muted); margin-top: 2px; font-family: 'SF Mono', Consolas, monospace; }

 /* 状态标签 */
.tag             { font-size: 10px; padding: 2px 6px; border-radius: 999px; font-weight: 600; }
.tag-draft       { background: var(--border); color: var(--slate); }
.tag-writing     { background: var(--slate-light); color: var(--white); }
.tag-done        { background: var(--green); color: var(--white); }
.tag-warn        { background: var(--red); color: var(--white); }
.tag-optimizing  { background: var(--slate); color: var(--white); }
.tag-optimized   { background: var(--slate-dark); color: var(--white); }
.tag-published   { background: var(--accent); color: var(--white); }
.tag-img         { background: var(--accent-light); color: var(--accent); }

 /* 排班：可点击的发布时间标签 */
.sched-time-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: background .15s ease, color .15s ease;
}
.sched-time-btn:hover { background: var(--slate); color: var(--white); }

 /* 排班：修改时间弹窗（输入框复用 .app-modal-input-field 官方样式） */
.sched-edit-body { display: flex; flex-direction: column; gap: 8px; }
.sched-edit-note { font-size: 12px; color: var(--text-muted); margin: 0; }
.sched-edit-hint { font-size: 11px; color: var(--text-faint); margin: 0; }
.sched-edit-plan { font-size: 12px; color: var(--text-muted); margin: 0; }

 /* 排班：列表里的分类/方案徽标（待排班 tab 用） */
.sched-plan-badge {
  display: inline-block;
  margin-top: 3px;
  margin-right: 4px;
  font-size: 10px;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-light, #eef3ff);
  color: var(--accent, #1a73e8);
  font-weight: 600;
}

 /* 关键词状态标签 */
.kw-tag-new       { background: var(--border); color: var(--slate); }  /*待填充=待写，起点 */
.kw-tag-analyzed  { background: var(--slate-light); color: var(--white); }       /*待拆解=写作中，进行中 */
.kw-tag-used      { background: var(--green); color: var(--white); }       /*已拆解=已发布，绿色完成 */
.kw-tag-excluded  { background: var(--gray-mid); color: var(--white); }       /*已排除=劣势，灰底白字 */
.kw-tag-adjacent  { background: var(--sky-bg); color: var(--blue-text); font-size: 10px; }
.kw-tag-manual    { background: var(--border-light); color: var(--text-muted); font-size: 10px; }
.kw-tag-seed      { background: var(--yellow-pale); color: var(--amber-dark); font-size: 10px; }
.kw-tag-expand    { background: var(--orange-bg); color: var(--orange-deep); font-size: 10px; }
.kw-excluded-reason { font-size: 12.5px; color: var(--text-muted); padding: 6px 0; line-height: 1.6; }

 /* 写作进度条（宽度由 JS 设置） */
.title-progress { height: 2px; background: var(--yellow-bg); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.title-progress-fill { height: 100%; background: var(--yellow); animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0%,100%{opacity:1} 50%{opacity:.4} }


 /* 分页 */
.pagination {
  flex-shrink: 0; padding: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
  min-height: 48px;
}
.page-info { font-size: 11px; color: var(--text-muted); }
.page-btns { display: flex; gap: 6px; align-items: center; }
.page-cur  { font-size: 12px; font-weight: 600; color: var(--accent); min-width: 36px; text-align: center;
  background: var(--accent-light); border: 1px solid var(--accent-light); border-radius: 4px; padding: 2px 8px; }
.page-arrow {
  width: 24px; height: 24px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--white);
  cursor: pointer; font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; transition: all .12s;
}
.page-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-arrow:disabled { opacity: .25; cursor: default; }
.page-jump { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.page-jump-input {
  width: 44px; height: 24px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 11px; text-align: center; color: var(--text); background: var(--white); padding: 0 4px;
}
.page-jump-input:focus { border-color: var(--accent); outline: none; }
.page-jump-btn {
  height: 24px; padding: 0 8px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--white);
  cursor: pointer; font-size: 11px; color: var(--text-muted); transition: all .12s;
}
.page-jump-btn:hover { border-color: var(--accent); color: var(--accent); }

 /* ════════════════════════════════
   右侧详情面板（共用）
   ════════════════════════════════ */
.detail-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: var(--bg); }
.detail-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted); user-select: none;
}
.detail-empty-icon { font-size: 48px; opacity: .12; }
.detail-empty-hint { font-size: 13px; opacity: .4; }

.detail-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 14px 20px; flex-shrink: 0; }
.detail-title-en { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--text); }
.id-chip { font-family: monospace; font-size: 11px; font-weight: 400; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 3px; padding: 1px 5px; letter-spacing: .5px; user-select: all; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.written-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.kw-title-link { cursor: pointer; }
.detail-title-cn { font-size: 13px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.detail-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.detail-stat { font-size: 11px; color: var(--text-muted); }

.detail-actions {
  padding: 10px 20px; background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; flex-shrink: 0; align-items: center;
}

.lp-item-cn-empty      { color: var(--text-faint); font-style: italic; }

.detail-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px; min-height: 0; }


 /* 详情内容块 */
.d-section { margin-bottom: 22px; }
.d-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.d-section-head .d-section-title { margin-bottom: 0; flex: 1; }
.d-section-title {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.d-section-title::after { content:''; flex:1; height:1px; background:var(--border); }
.d-section-title-action {
  color: var(--primary);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.d-section-title-action span {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
  display: inline-block;
}
.d-section-title-action span:hover {
  background: var(--primary-bg);
}
.d-section-title-action::after { pointer-events: none; }


.outline-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.ilink { color: var(--accent); text-decoration: underline; cursor: pointer; }

.ilink-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ilink-tag  {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--accent-light); color: var(--sidebar-active); font-weight: 500;
}

 /* AI 写作进度 */
.ai-prog-box { background: var(--white); border-radius: 8px; padding: 20px; border: 1px solid var(--border); }
.ai-prog-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.ai-steps { display: flex; flex-direction: column; }
.ai-step {
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border-light);
}
.ai-step:last-child { border-bottom: none; }
.step-ico {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.ai-step.s-pending .step-ico { background: var(--border-light); color: var(--text-faint); }
.ai-step.s-pending { color: var(--text-muted); }
.ai-step.s-running .step-ico { background: var(--yellow-bg); color: var(--yellow); }
.ai-step.s-running { color: var(--text); font-weight: 500; }
.ai-step.s-done    .step-ico { background: var(--green-bg); color: var(--green); }
.ai-step.s-done    { color: var(--text-faint); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.pulse, .wp-sync-pulse { animation: pulse .9s infinite; }
.prog-wrap  { height: 5px; background: var(--border-light); border-radius: 4px; margin-top: 16px; overflow: hidden; }
.prog-fill  { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent)); border-radius: 4px; transition: width .5s ease; }

 /* ════════════════════════════════
   文章编辑器
   ════════════════════════════════ */
.art-editor {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden; min-width: 0;
}
.ae-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--white);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  min-height: 44px;
}
.ae-header .tag,
.ae-header .ae-pillar-toggle,
.ae-header .ae-role-badge,
.ae-header .ae-wp-link {
  display: inline-flex; align-items: center;
  padding: 4px 9px; min-height: 26px;
  box-sizing: border-box;
}
.ae-header .ae-stat {
  display: inline-flex; align-items: center;
  padding: 5px 0; min-height: 28px;
  box-sizing: border-box;
}
.ae-stat { font-size: 11px; color: var(--text-muted); }
.ae-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px; min-height: 0;
}

.ae-footer {
  display: flex; gap: 8px; padding: 10px 16px;
  background: var(--white); border-top: 1px solid var(--border);
  flex-shrink: 0; align-items: center;
  min-height: 48px;
}

 /* 编辑器字段 */
.ed-dual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ed-dual-content { align-items: start; }
.ed-field { display: flex; flex-direction: column; gap: 4px; }
.ed-cluster-block { margin-top: 2px; }
.ed-cluster-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 6px;
  overflow-y: auto;
  height: auto;
  max-height: none;
  flex: 0 0 auto;
}
.ed-cluster-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; background: var(--white);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.ed-cluster-row:last-child { border-bottom: none; }
.ed-cluster-row:hover { background: var(--bg); }
.ed-cluster-row-current { background: var(--accent-light); }
.ed-cluster-row-current .ed-cluster-title-en { color: var(--accent); font-weight: 600; }
.ed-cluster-row-current:hover { background: var(--accent-15); }
.ed-cluster-ext { font-size: 12px; color: var(--accent); flex-shrink: 0; margin-top: 1px; text-decoration: none; }
.ed-cluster-role {
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 999px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.ed-cluster-role-pillar { color: var(--red-text); background: var(--red-bg); }
.ed-cluster-role-child  { color: var(--yellow-text); background: var(--yellow-bg); }
.ed-cluster-titles { flex: 1; min-width: 0; }
.ed-cluster-badges {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start;
  gap: 4px; flex-shrink: 0;
}
.ed-cluster-badges .ed-cluster-role { margin-top: 0; }
.ed-cluster-title-en { font-size: 12px; color: var(--text); font-weight: 500; line-height: 1.35; word-break: break-word; }
.ed-cluster-title-cn { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.ed-cluster-slug-chip {
  font-size: 10px; color: var(--accent); background: var(--accent-light);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  text-decoration: none; border: 1px solid var(--accent-15); margin-top: 2px;
}
.ed-cluster-slug-chip:hover { background: var(--accent-light); }
.ed-cluster-noslug {
  font-size: 10px; color: var(--text-faint); background: var(--gray-bg);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--border); margin-top: 2px;
}
.ed-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 4px;
  flex-wrap: nowrap; white-space: nowrap;
}
.ed-label .text-hint { text-transform: none; font-weight: 400; margin-left: 6px; white-space: nowrap; }
.ed-hint     { font-size: 11px; font-weight: 400; color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.ed-required { color: var(--red); margin-left: 2px; }
.ed-meta-counter { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 999px; background: var(--border); color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.ed-meta-counter.mdc-short,
.ed-meta-counter.mdc-ok,
.ed-meta-counter.mdc-long  { background: var(--border); color: var(--text-muted); }
.ed-meta-desc { resize: vertical; min-height: 58px; }

.ed-input {
  padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text);
  background: var(--white); width: 100%;
  height: 34px; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.ed-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
textarea.ed-input { height: auto; resize: vertical; }
.ed-input-readonly { background: var(--bg); color: var(--text-muted); cursor: default; }
.ed-meta-stack { display: flex; flex-direction: column; gap: 8px; }

.ed-textarea {
  padding: 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text);
  background: var(--white); width: 100%; min-height: 260px;
  resize: vertical; line-height: 1.75; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ed-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.ed-select {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text);
  background: var(--white); cursor: pointer; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ed-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* 分类 + 发布时间 横排 */
.ed-meta-row { display: flex; gap: 12px; margin-bottom: 2px; }
.ed-meta-col { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

 /* Slug 行 */
.ed-field-slug .ed-slug-row {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.ed-field-slug .ed-slug-row:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.ed-slug-prefix {
  padding: 8px 10px; background: var(--bg);
  border-right: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
}
.ed-input-slug {
  border: none; border-radius: 0; box-shadow: none;
  flex: 1; min-width: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 13px; color: var(--text);
  padding: 8px 10px; background: transparent;
}
.ed-input-slug:focus { outline: none; box-shadow: none; border: none; }
.ed-slug-link {
  padding: 0 12px; color: var(--accent); font-size: 14px;
  text-decoration: none; border-left: 1px solid var(--border);
  height: 100%; display: flex; align-items: center;
  transition: background .12s;
}
.ed-slug-link:hover { background: var(--accent-light); }

 /* ── 双语上下布局 ── */
.ed-lang-block { display: flex; flex-direction: column; gap: 10px; }
.ed-lang-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.ed-lang-badge {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 999px;
}
.ed-lang-badge-en { background: var(--yellow); color: var(--white); }
.ed-lang-badge-cn { background: var(--border); color: var(--slate); }
.ed-lang-sep { border: none; border-top: 1px dashed var(--border); margin: 2px 0; }

 /* ── 编辑器主体：左栏（固定宽）+ 右侧栏（自适应） ── */
.ae-content {
  flex: 1; display: flex; overflow: hidden; min-height: 0; min-width: 0;
}
.ae-content > .ae-body {
  flex: 0 0 420px; width: 420px;
}
.ae-sidebar {
  flex: 1; min-width: 0;
  border-left: 1px solid var(--border); background: var(--white);
  overflow-y: auto; display: flex; flex-direction: column;
}

 /* 侧边栏表单字段 */
.sb-field { display: flex; flex-direction: column; gap: 4px; }
.sb-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.sb-readonly {
  padding: 4px 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; color: var(--text-muted);
  background: var(--bg); line-height: 1.4;
}

 /* ── 侧边栏折叠块 ── */
.ae-sb-section { border-bottom: 1px solid var(--border); }
.ae-sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; cursor: pointer; user-select: none; transition: background .1s;
}
.ae-sb-head:hover { background: var(--bg); }
.ae-sb-title { font-size: 11px; font-weight: 700; color: var(--text); }
.ae-sb-icon { font-size: 10px; color: var(--text-faint); transition: transform .15s; }
.ae-sb-section.open .ae-sb-icon { transform: rotate(180deg); }
.ae-sb-body {
  padding: 8px 12px 12px; display: none;
  flex-direction: column; gap: 8px;
}
.ae-sb-section.open .ae-sb-body { display: flex; }

/* ── 周边词侧栏条目 ── */
.ae-bk-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ae-bk-kw   { font-size: 12px; font-weight: 600; color: var(--text); }
.ae-bk-cn   { font-size: 11px; color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

 /* ── 档案行 ── */
.arc-row { display: flex; flex-direction: column; gap: 2px; }
.arc-key {
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .04em;
}
.arc-val { font-size: 12px; color: var(--text); line-height: 1.4; }
.arc-val-muted { font-size: 12px; color: var(--text-muted); }
.arc-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 999px; vertical-align: middle; margin-left: 3px;
}
.arc-badge-write { background: var(--accent-light); color: var(--accent-hover); }
.arc-badge-opt   { background: var(--accent-light); color: var(--accent); }
.arc-token-chip {
  font-size: 11px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; background: var(--yellow-bg); color: var(--yellow-text);
}
.arc-snapshot-toggle {
  font-size: 11px; color: var(--accent); cursor: pointer;
  background: none; border: none; padding: 0; font-family: inherit; text-decoration: underline;
}
.arc-snapshot-box {
  margin-top: 4px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 8px; font-size: 10px; color: var(--text-muted);
  max-height: 120px; overflow-y: auto; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all;
}
/* ── 主区配图区块 ── */
.ae-img-block { display: flex; flex-direction: column; gap: 10px; }
.ae-img-block-label { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.ae-img-section { display: flex; gap: 12px; align-items: flex-start; }
.ae-img-prompts { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ae-img-prompt-row { display: flex; flex-direction: column; gap: 3px; }
.ae-img-preview-col { flex-shrink: 0; width: 112px; display: flex; flex-direction: column; gap: 6px; }
.ae-img-preview-box {
  width: 112px; height: 84px;
  background: var(--bg); border: 1.5px dashed var(--border);
  border-radius: 7px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; color: var(--text-faint); font-size: 10px; text-align: center;
}
.ae-img-preview-box:hover { border-color: var(--text-muted); }
.ae-img-thumb { width: 112px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; display: block; }
.ae-wp-img-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-sb-img-thumb { width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; display: block; margin-bottom: 8px; padding: 6px; background: var(--bg); box-sizing: border-box; }
.ae-sb-img-empty { width: 100%; height: 100px; background: var(--bg); border: 1.5px dashed var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 11px; margin-bottom: 8px; }
.ae-sb-img-btns { display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; }
.ae-sb-img-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ae-sb-img-meta .id-chip { align-self: flex-start; }
.ae-sb-img-prompt-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }

/* ── 标签管理弹窗 ── */
.tm-wrap { display: flex; flex-direction: column; gap: 16px; }
.tm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tm-tab { padding: 6px 12px; font-size: 12px; color: var(--text-muted); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.tm-tab:hover { color: var(--text); }
.tm-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tm-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tm-stat-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 12px; text-align: center; }
.tm-stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
.tm-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.tm-stat-card.green .tm-stat-num { color: var(--green); }
.tm-stat-card.yellow .tm-stat-num { color: var(--orange); }
.tm-stat-card.red .tm-stat-num { color: var(--red); }
.tm-actions { display: flex; justify-content: flex-end; }
.tm-section { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.tm-section-title { background: var(--bg-alt); padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tm-section-cnt { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.tm-section-body { max-height: 360px; overflow-y: auto; }
.tm-tag-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border-light); }
.tm-tag-row:last-child { border-bottom: none; }
.tm-tag-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-tag-name { font-size: 13px; color: var(--text); word-break: break-all; }
.tm-tag-cn { font-size: 11px; color: var(--text-muted); }
.tm-tag-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tm-tag-cnt { font-size: 11px; color: var(--accent); font-weight: 600; }
.tm-empty { padding: 16px; text-align: center; color: var(--text-faint); font-size: 12px; }
.tm-loading { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.tm-orphan-actions { display: flex; align-items: center; gap: 6px; }
.tm-confirm-text { font-size: 12px; color: var(--red); font-weight: 500; }
.tm-loading::after { content: ''; width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: tm-spin .8s linear infinite; }
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm-pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 10px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.tm-page { min-width: 28px; padding: 4px 8px; font-size: 12px; color: var(--text-muted); background: #fff; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.tm-page:hover { border-color: var(--accent); color: var(--accent); }
.tm-page.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tm-page-dots { color: var(--text-faint); font-size: 12px; padding: 0 4px; }

/* ── 品牌图（favicon/logo/头像）生图行 ── */
.scfg-brand-img-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.scfg-brand-img-preview { flex-shrink: 0; }
.scfg-brand-img-preview img {
  width: 56px; height: 56px; object-fit: contain;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
  cursor: pointer; display: block;
}
.scfg-brand-img-preview:empty { display: none; }

/* ── 侧边栏流量顶部条 ── */
.ae-sb-traffic { padding: 11px 12px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ae-sb-traffic-label { font-size: 9px; color: var(--text-faint); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.ae-sb-traffic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ae-sb-tc { background: var(--bg); border-radius: 7px; padding: 7px 4px; text-align: center; }
.ae-sb-tc-val { font-size: 14px; font-weight: 700; color: var(--accent); line-height: 1; }
.ae-sb-tc-empty .ae-sb-tc-val { color: var(--text-faint); font-size: 11px; font-weight: 400; }
.ae-sb-tc-key { font-size: 9px; color: var(--text-faint); margin-top: 3px; }

/* ── 收录通知徽章 ── */
.ae-index-row { display: flex; gap: 6px; }
.ae-index-badge {
  flex: 1; text-align: center; font-size: 10px; font-weight: 600;
  padding: 5px 4px; border-radius: 7px; background: var(--bg);
  color: var(--text-faint); border: 1px solid var(--border); cursor: default;
}
.ae-index-badge.is-on {
  color: var(--green-dark); border-color: var(--green); background: var(--green-bg);
}

/* ── 侧边栏 Tab 导航 ── */
.ae-sb-tab-nav { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; padding: 0 4px; }
.ae-sb-tab-btn {
  flex: 1; padding: 9px 0 8px; font-size: 12px; color: var(--text-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer; transition: color .15s; font-family: inherit;
  position: relative; /* 数量角标（.ae-sb-tab-cmt-cnt）绝对定位的锚点 */
}
.ae-sb-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.ae-sb-tab-btn:hover:not(.active) { color: var(--text); }

/* ── 侧边栏 Tab 面板 ── */
.ae-sb-panel { display: none; flex: 1; overflow-y: auto; padding: 12px 12px 24px; }
.ae-sb-panel.active { display: block; }

/* 面板内字段 */
.ae-sb-pfield { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.ae-sb-pfield:last-child { margin-bottom: 0; }
.ae-sb-plabel { font-size: 10px; color: var(--text-faint); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.ae-sb-divider { height: 1px; background: var(--border); margin: 12px 0; flex-shrink: 0; }
.ae-sb-sub-title { font-size: 10px; font-weight: 700; color: var(--text-faint); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.ae-sb-vec-pre { margin: 0; padding: 8px; font-size: 10px; font-family: monospace; white-space: pre-wrap; word-break: break-all; color: var(--text-muted); background: var(--bg); max-height: 70px; overflow-y: auto; line-height: 1.5; border-radius: 6px; cursor: pointer; transition: background 0.15s; }
.ae-sb-vec-pre:hover { background: var(--gray-bg); }
.ae-sb-vec-pre.copied { background: var(--green-light); }

/* ── 评论 Tab ── */
/* 数量角标：绝对定位脱离布局流，出现/消失都不挤压 tab 文字的居中位置 */
.ae-sb-tab-cmt-cnt { position: absolute; font-size: 9px; font-weight: 700; color: var(--accent); margin-left: 1px; margin-top: -3px; }
.ae-sb-cmt-listwrap { margin-bottom: 4px; }
.ae-sb-cmt-btn { width: 100%; display: block; }

/* 评论操作按钮：AI 一行 + 操作一行 */
.ae-sb-cmt-grid {
  display: flex; gap: 4px; margin-bottom: 4px; flex-wrap: wrap;
}
.ae-sb-cmt-grid .ae-sb-cmt-grid-btn {
  flex: 0 0 auto; font-size: 11px; padding: 4px 10px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap;
}
.ae-sb-cmt-grid-btn:disabled { cursor: not-allowed; }
.ae-sb-cmt-other-toggle.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent-light); }

/* ── 评论发布计划弹窗 ── */
.cmt-sched-header { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cmt-sched-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.cmt-sched-sub { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.cmt-sched-section { margin-bottom: 16px; }
.cmt-sched-section-title { font-size: 12px; font-weight: 700; color: var(--text-faint); margin-bottom: 8px; letter-spacing: .03em; }
.cmt-sched-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 8px; }
.cmt-sched-item { padding: 10px 8px; border-bottom: 1px solid var(--border); }
.cmt-sched-item:last-child { border-bottom: none; padding-bottom: 0; }
.cmt-sched-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.cmt-sched-author { font-size: 13px; font-weight: 600; color: var(--text); }
.cmt-sched-sent { font-size: 10px; padding: 1px 6px; border-radius: 999px; font-weight: 600; }
.cmt-sched-sent-positive { background: var(--green-bg); color: var(--green-dark); }
.cmt-sched-sent-negative { background: #fee2e2; color: #b91c1c; }
.cmt-sched-sent-neutral  { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.cmt-sched-sent-mixed    { background: #fff3cd; color: #856404; }
.cmt-sched-content { font-size: 12px; color: var(--text); line-height: 1.55; margin-bottom: 6px; word-break: break-word; }
.cmt-sched-meta { font-size: 10px; color: var(--text-faint); }

/* 站点级：扁平表格 + 状态筛选卡片 */
.cmt-sched-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cmt-sched-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; transition: all .12s;
}
.cmt-sched-card:hover { border-color: var(--accent); }
.cmt-sched-card.active { border-color: var(--accent); background: var(--accent-light); }
.cmt-sched-card-num { font-size: 18px; font-weight: 700; }
.cmt-sched-card-green { color: var(--green-dark); }
.cmt-sched-card-blue { color: var(--accent); }
.cmt-sched-card-yellow { color: #b45309; }
.cmt-sched-card-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.ae-sb-tz-bar { padding: 6px 8px; font-size: 11px; line-height: 1.5; color: var(--text-muted); background: var(--bg); border-radius: 6px; margin-bottom: 10px; }

.cmt-sched-toolbar { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.cmt-sched-search {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; outline: none; font-family: inherit;
}
.cmt-sched-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.cmt-sched-tz { font-size: 11px; line-height: 1.5; color: var(--text-muted); }

.cmt-sched-table-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; overflow-x: auto; }
.cmt-sched-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmt-sched-table thead th {
  position: sticky; top: 0; background: var(--white); text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--border);
  color: var(--text-faint); font-weight: 600; font-size: 11px; white-space: nowrap;
}
.cmt-sched-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmt-sched-table tbody tr:hover { background: var(--bg); }
.cmt-sched-table tbody tr.hidden { display: none; }
.cmt-sched-article-chip {
  display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 11px; color: var(--text-muted);
  background: var(--bg); padding: 2px 8px; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.cmt-sched-article-chip:hover { color: var(--accent); text-decoration: underline; background: var(--accent-light); }
.cmt-sched-table .tag { white-space: nowrap; }
.cmt-sched-table td:first-child { white-space: nowrap; }
.cmt-sched-table .cmt-sched-author { font-weight: 600; }
.cmt-sched-table .cmt-sched-content { max-width: 340px; word-break: break-word; line-height: 1.5; }
.cmt-sched-table .cmt-sched-time { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.cmt-sched-item-head .tag { white-space: nowrap; }

@media (max-width: 760px) {
  .cmt-sched-table, .cmt-sched-table thead, .cmt-sched-table tbody, .cmt-sched-table th, .cmt-sched-table td, .cmt-sched-table tr { display: block; }
  .cmt-sched-table thead { display: none; }
  .cmt-sched-table tbody tr { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 6px; }
  .cmt-sched-table tbody td { border: none; padding: 6px 8px; display: flex; gap: 8px; }
  .cmt-sched-table tbody td::before { content: attr(data-label); color: var(--text-faint); font-weight: 600; min-width: 70px; }
  .cmt-sched-table .cmt-sched-content { max-width: none; }
}

/* 其他面板 */
.ae-sb-cmt-other {
  margin-top: 6px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); overflow: hidden;
}
.ae-sb-cmt-other.hidden { display: none; }
.ae-sb-cmt-other-section { padding: 10px 10px 8px; }
.ae-sb-cmt-other-sep { height: 1px; background: var(--border); }
.ae-sb-cmt-other-label {
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .06em;
}
.ae-sb-cmt-other-row { display: flex; gap: 5px; }
.ae-sb-cmt-other-half-btn { flex: 1; font-size: 11px; padding: 5px 4px; }

/* 导入 JSON */
.ae-sb-cmt-import-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ae-sb-cmt-import-tabs { display: flex; gap: 2px; }
.ae-sb-cmt-import-tab {
  padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 4px;
  border: 1px solid var(--border); background: var(--white); color: var(--text-muted);
  cursor: pointer; transition: all .12s;
}
.ae-sb-cmt-import-tab.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent-light); }
.ae-sb-cmt-import-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.ae-sb-cmt-import-panel { margin-top: 6px; }
.ae-sb-cmt-import-panel.hidden { display: none; }
.ae-sb-cmt-import-hint { font-size: 10px; color: var(--text-faint); line-height: 1.5; margin-bottom: 4px; }


/* 词 Tab — 目标关键词块 */
.ae-sb-kw-block { background: var(--bg); border-radius: 7px; padding: 10px 11px; }
.ae-sb-kw-en { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 3px; }
a.ae-sb-kw-en { display: block; text-decoration: none; }
a.ae-sb-kw-en:hover { text-decoration: none; }
.ae-sb-kw-cn { font-size: 11px; color: var(--text-muted); }

/* 词 Tab — 内链词 & 周边词 统一条目 */
.ae-sb-kw-item { padding: 6px 0; border-bottom: 1px solid var(--border); }
.ae-sb-kw-item:last-child { border-bottom: none; padding-bottom: 0; }
/* 周边词批次分组（本次生成 / 历史生成）*/
.ae-sb-kw-batch + .ae-sb-kw-batch { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ae-sb-kw-batch-title { margin-bottom: 4px; font-weight: 600; }
.ae-sb-kw-batch:not(:first-child) .ae-sb-kw-batch-title { color: var(--text-faint); font-weight: normal; }
.ae-sb-kw-item-foot { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 2px; }
.ae-sb-kw-item-en { font-size: 12px; color: var(--text); line-height: 1.3; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-sb-kw-item-cn { font-size: 10px; color: var(--text-faint); }
.ae-sb-kw-angle { font-size: 10.5px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.ae-sb-kw-tags { display: flex; gap: 3px; flex-shrink: 0; }
.ae-sb-kw-tag { font-size: 9.5px; padding: 1px 5px; border-radius: 999px; background: var(--gray-bg-alt); color: var(--text-muted); }

/* 正文指令预览 — JSON 导入区 */
.art-import-json-box { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.art-import-json-head { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.art-import-json-ta { width: 100%; height: 140px; font-size: 12px; font-family: monospace; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--gray-bg); color: var(--text); resize: vertical; box-sizing: border-box; }
.art-import-json-ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.art-import-json-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.art-import-json-msg { font-size: 12px; }
.art-import-json-msg.ok  { color: var(--green); }
.art-import-json-msg.err { color: var(--red); }

/* 历史 Tab — 档案块 */
.ae-sb-arc-block { background: var(--bg); border-radius: 7px; padding: 10px 11px; margin-bottom: 9px; }
.ae-sb-arc-block:last-child { margin-bottom: 0; }
.ae-sb-arc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.ae-sb-arc-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.ae-sb-arc-badge-write { background: var(--green-pale-bg); color: var(--green-pale-text); }
.ae-sb-arc-badge-opt { background: var(--yellow-cream-bg); color: var(--orange-dark); }
.ae-sb-arc-model { font-size: 11px; color: var(--text-muted); }
.ae-sb-arc-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; }
.ae-sb-arc-key { font-size: 10px; color: var(--text-faint); }
.ae-sb-arc-val { font-size: 11px; color: var(--text-muted); }
.ae-sb-arc-chip { background: var(--border); border-radius: 4px; padding: 1px 5px; font-family: monospace; font-size: 10px; color: var(--text-muted); }

/* 历史 Tab — 流量详情 */
.ae-sb-traffic-detail { background: var(--bg); border-radius: 7px; padding: 8px 11px; }
.ae-sb-traffic-detail .ae-sb-arc-row { padding: 4px 0; }
.ed-collapse .outline-list { padding: 0 14px 12px; }

 /* 内链词关联文章 */
.ilink-art-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px; transition: border-color .12s;
}
.ilink-art-card:hover { border-color: var(--border-hover); }
.art-pri {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ilink-art-info { flex: 1; min-width: 0; }
.ilink-art-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ilink-art-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ilink-art-remove {
  font-size: 11px; color: var(--text-muted);
  padding: 3px 8px; border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; background: var(--white); transition: all .12s; flex-shrink: 0;
}
.ilink-art-remove:hover { border-color: var(--red); color: var(--red); }


 /* ════════════════════════════════
   导出弹窗（所有指令 / 所有模板 / 所有变量，pexpXxx 系列，见 static/js/modules/export-modals.js）
   ════════════════════════════════ */
.pexp-group-label { font-size: 12px; font-weight: 700; color: #64748b; margin: 12px 0 6px; }
.pexp-group-label:first-child { margin-top: 0; }
.pexp-cat-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pexp-cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; user-select: none;
  background: #fff;
}
.pexp-cat-chip:hover { background: #f8fafc; }
.pexp-group { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.pexp-group-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; color: #0f172a; }
.pexp-item { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; cursor: pointer; }

 /* 指令变量面板（编辑器内嵌） */
.pm-vars-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-height: 320px;
  display: flex;
  flex-direction: column;
}
.pm-vars-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.pm-vars-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.pm-vars-title {
  flex: 1; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
}
.pm-vars-group { border-bottom: 1px solid var(--border); }
.pm-vars-group:last-child { border-bottom: none; }
.pm-vars-group-label {
  padding: 5px 12px 2px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-faint);
}
.pm-vars-chips {
  padding: 6px 12px 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 36px;
}
.pvar-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--purple-bg); border: 1px solid var(--purple-border);
  border-radius: 4px; padding: 3px 6px 3px 4px;
  font-size: 12px; cursor: default;
}
.pvar-chip-sys {
  background: var(--bg); border-color: var(--border);
}
.pvar-chip-key {
  font-family: monospace; font-size: 11px;
  color: var(--code-text); cursor: pointer; padding: 1px 4px;
  border-radius: 4px; background: var(--code-bg);
}
.pvar-chip-key:hover { background: var(--code-bg); }
.pvar-chip-name { color: var(--text-muted); }
.pvar-chip-edit {
  font-size: 11px; color: var(--text-faint); cursor: pointer;
  padding: 0 2px; opacity: .7;
}
.pvar-chip-edit:hover { opacity: 1; color: var(--accent); }

 /* 变量管理弹窗 table */
.pvar-mgr-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  margin-top: 6px;
}
.pvar-mgr-table th {
  text-align: left; padding: 6px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-faint);
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.pvar-mgr-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border-light);
  color: var(--text); vertical-align: middle;
}
.pvar-mgr-table tr:last-child td { border-bottom: none; }
.pvar-mgr-table tr:hover td { background: var(--bg); }
.pvar-code {
  font-family: monospace; font-size: 12px;
  background: var(--code-bg); color: var(--code-text);
  padding: 2px 6px; border-radius: 4px;
}
 /* 变量管理弹窗 section 标题 */
.pvar-mgr-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 4px;
}
.pvar-mgr-section-sub {
  font-size: 11px; color: var(--text-faint); font-weight: 400; margin-left: 6px;
}

 /* ════════════════════════════════
   Toast
   ════════════════════════════════ */
#toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--white);
  box-shadow: var(--shadow-md);
  animation: toastIn .22s ease; pointer-events: auto; max-width: 320px;
}
.toast-err  { background: var(--red); }
.toast-ok   { background: var(--green); }
.toast-warn { background: var(--yellow); }
@keyframes toastIn  { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:none} }
@keyframes toastOut { to{opacity:0;transform:translateY(-8px)} }

 /* ════════════════════════════════
   全局告警横幅（global_alert.js）：任何页面置顶，红=危急 橙=预警
   ════════════════════════════════ */
#ga-banner {
  position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 1500;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  color: #fff; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
#ga-banner.ga-crit { background: linear-gradient(90deg, #d33, #b71c1c); }
#ga-banner.ga-warn { background: linear-gradient(90deg, #e08a00, #cc7400); }
#ga-banner .ga-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 600;
}
#ga-banner .ga-btn {
  flex-shrink: 0; background: rgba(255,255,255,.18); color: #fff;
  border: none; border-radius: 6px; padding: 4px 12px;
  font-size: 12px; cursor: pointer; text-decoration: none;
}
#ga-banner .ga-btn:hover { background: rgba(255,255,255,.32); }
/* 横幅存在时把整体布局下移，避免盖住顶栏 */
body.ga-open .layout { margin-top: 44px; height: calc(100% - 44px); }
body.ga-open #toast-container { top: 68px; }
/* 收起后的顶栏角标 */
.ga-badge {
  margin-right: 8px; padding: 2px 8px; border-radius: 10px;
  background: #e08a00; color: #fff; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.ga-badge.crit { background: #d33; animation: gaPulse 1.2s infinite; }
@keyframes gaPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
/* 角标 + 用户区的靠右容器（global_alert.js 动态包裹，替代 .topbar-user 的 margin-left:auto） */
.ga-user-wrap {
  display: flex; align-items: center;
  margin: 8px 10px 8px auto; flex-shrink: 0;
}
.ga-user-wrap .topbar-user { margin: 0; }


 /* ════════════════════════════════
   文章意图标签 / 支柱
   ════════════════════════════════ */
.role-badge {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 700;
  margin-right: 4px; letter-spacing: .3px;
}
.role-pillar  { background: var(--red-bg); color: var(--red-text); }
.role-cluster { background: var(--yellow-bg); color: var(--yellow-text); }
.ae-role-badge {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 700;
  margin-left: 6px;
}
.ae-role-pillar  { background: var(--red-bg); color: var(--red-text); }
.ae-role-cluster { background: var(--yellow-bg); color: var(--yellow-text); }

.ae-pillar-toggle {
  font-size: 11px; cursor: pointer; color: var(--text-muted);
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  transition: all .15s; white-space: nowrap;
}
.ae-pillar-toggle:hover       { border-color: var(--purple-text); color: var(--purple-text); }
.ae-pillar-toggle.active      { background: var(--purple-bg); border-color: var(--purple-text); color: var(--purple-text); font-weight: 600; }

 /* ── footer 下拉菜单（AI 增强 / ···）── */
.det-drop { position: relative; }
.det-more-btn {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid var(--border); background: var(--white);
  color: var(--text-muted); cursor: pointer; font-size: 14px; letter-spacing: 2px;
  transition: all .12s; line-height: 1; padding-bottom: 4px;
}
.det-more-btn:hover { border-color: var(--accent); color: var(--accent); }
.det-drop-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-md);
  min-width: 130px; padding: 4px; z-index: 200;
  display: none;
}
.det-drop-menu.open  { display: block; }
.det-more-btn + .det-drop-menu { left: auto; right: 0; }
.det-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 7px 11px; border-radius: 4px; border: none; background: none;
  font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer;
  transition: background .1s; white-space: nowrap;
}
.det-menu-item:hover       { background: var(--bg); }
.det-menu-item:disabled    { opacity: .5; cursor: default; }
.det-menu-danger           { color: var(--red); }
.det-menu-danger:hover     { background: var(--red-bg); }
.det-menu-sep { height: 1px; background: var(--border); margin: 3px 6px; }

 /* published 状态 header 中的 WP 查看链接 */
.ae-wp-link {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--border); transition: all .12s; white-space: nowrap;
}
.ae-wp-link:hover { color: var(--accent); border-color: var(--accent); }


 /* 指令管理页：用途导航 */
.pm-usage-nav { flex: 1; overflow-y: auto; padding: 4px 0; }

 /* 结构模板页：分类导航 */
.ct-category-nav { flex: 1; overflow-y: auto; padding: 4px 0; }

 /* 结构模板使用说明弹窗 */
.ct-help-section { margin-bottom: 24px; }
.ct-help-title {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.ct-help-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ct-help-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-size: 13px;
}
.ct-help-card-head { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ct-help-card ul { padding-left: 14px; }
.ct-help-card li { margin-bottom: 3px; color: var(--text-muted); font-size: 12px; }
.ct-help-card p  { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.ct-help-steps { display: flex; flex-direction: column; gap: 4px; }
.ct-help-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 12px; background: var(--bg); border-radius: var(--radius); font-size: 13px;
}
.ct-help-step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.ct-help-step-body { line-height: 1.6; color: var(--text-muted); font-size: 13px; }
.ct-help-step-body strong { color: var(--text); font-weight: 600; }
.ct-help-chain { display: flex; flex-direction: column; }
.ct-help-chain-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border); margin-bottom: 3px;
}
.ct-help-chain-item strong { color: var(--text); font-weight: 600; }
.ct-help-chain-arrow { font-size: 11px; color: var(--text-faint); padding: 1px 0 1px 12px; }
.ct-help-badge {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent);
  white-space: nowrap; margin-top: 2px; flex-shrink: 0;
}
.ct-help-numbered { display: flex; flex-direction: column; gap: 0; }
.ct-help-num-item {
  display: flex; gap: 12px; font-size: 13px; color: var(--text-muted);
  line-height: 1.65; padding: 9px 0; border-bottom: 1px solid var(--border-light);
}
.ct-help-num-item:last-child { border-bottom: none; }
.ct-help-num-item strong { color: var(--text); font-weight: 600; }
.ct-help-num-badge {
  font-size: 12px; font-weight: 700; color: var(--accent);
  flex-shrink: 0; min-width: 18px; margin-top: 1px;
}
.ct-help-num-badge.badge-gray   { background: var(--border); color: var(--text-muted); }
.ct-help-num-badge.badge-yellow { background: var(--yellow-bg); color: var(--orange-text); }
.ct-help-num-badge.badge-green  { background: var(--green-bg); color: var(--green-text); }
.ct-help-num-badge.badge-red    { background: var(--red-bg); color: var(--red); }
.ct-help-tip {
  margin-top: 10px; padding: 9px 12px;
  background: var(--accent-light); border-radius: var(--radius);
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
.ct-help-tip strong { color: var(--accent); }
.ct-help-section code {
  background: var(--code-bg); color: var(--code-text);
  padding: 1px 5px; border-radius: 4px; font-size: 11px; font-family: monospace;
}
.ct-help-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

 /* Migrated from pages.css */

 /* ════════════════════════════════
   AI 配置页
   ════════════════════════════════ */

 /* 侧边栏按钮激活态 */
.sidebar-btn.active { background: var(--sidebar-hover); color: var(--border); }

 /* 指令树导航列表 */
 /* 一级类型行 */
.aip-type-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 12px; cursor: pointer;
  border-left: 3px solid transparent; transition: background .1s, border-left-color .1s;
  font-size: 12px; font-weight: 700; color: var(--text); user-select: none;
}
.aip-type-row:hover { background: var(--bg); }
.aip-type-row.active { background: var(--accent-light); border-left-color: var(--accent); color: var(--accent); }
.aip-tree-arrow { font-size: 10px; color: var(--text-muted); width: 10px; flex-shrink: 0; }
.aip-type-row.active .aip-tree-arrow { color: var(--accent); }
.aip-type-row.active /* 二级分类行 */
.aip-subcat-row {
  display: flex; align-items: center;
  padding: 5px 10px 5px 32px; cursor: pointer;
  border-left: 3px solid transparent; transition: background .1s;
  font-size: 12px; color: var(--text-muted); user-select: none;
}
.aip-subcat-row:hover { background: var(--bg); color: var(--text); }
.aip-subcat-row.active {
  background: var(--accent-light); border-left-color: var(--accent);
  color: var(--accent); font-weight: 600;
}

 /* 指令分组树操作按钮 */
.cat-l1-row:hover .aip-group-actions,
.cat-l2-item:hover .aip-group-actions { opacity: 1; }
.aip-group-actions {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; opacity: 0; transition: opacity .1s; flex-shrink: 0;
}
.aip-group-add, .aip-group-edit, .aip-group-del {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 13px; cursor: pointer; color: var(--text-muted);
  transition: background .1s, color .1s;
}
.aip-group-add:hover  { background: var(--accent-light); color: var(--accent); }
.aip-group-edit:hover { background: var(--bg); color: var(--text-muted); }
.aip-group-del:hover  { background: var(--red-bg); color: var(--red); }
.aip-group-empty {
  padding: 10px 12px; font-size: 12px; color: var(--text-faint);
  cursor: pointer; border-radius: 6px; margin: 4px;
  transition: background .1s, color .1s;
}
.aip-group-empty:hover { background: var(--bg); color: var(--accent); }

 /* 主题列表项 */
.topic-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border-light); cursor: pointer; text-decoration: none; color: inherit; }
.topic-item:hover, .topic-item.active { background: var(--accent-light); }
.topic-item-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-item-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; margin-bottom: 5px; }
.topic-badge-pillar { background: var(--green-bg); color: var(--green-text); padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 600; }
.topic-badge-missing { background: var(--yellow-bg); color: var(--orange-text); padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 600; }
.topic-art-count { color: var(--text-muted); font-size: 11px; }
.topic-progress-bar { height: 3px; background: var(--border); border-radius: 2px; }
.topic-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }

/* 终端占比双色条：固定长度横线，前段 PC（蓝）、后段移动（绿） */
.devbar-wrap { display: inline-flex; align-items: center; vertical-align: middle; }
.devbar { display: inline-flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); flex: none; }
.devbar-seg { display: block; height: 100%; }
.devbar-pc { background: var(--accent); }
.devbar-m { background: var(--green); }
.devbar-label { font-size: 11px; color: var(--text-muted); margin-left: 6px; white-space: nowrap; }
/* 竖排模式：横条在上、百分比文字在下（横向空间紧张处用） */
.devbar-stacked { flex-direction: column; align-items: stretch; gap: 2px; }
.devbar-stacked .devbar-label { margin-left: 0; text-align: center; font-size: 10px; }
.topic-list-empty { padding: 24px 16px; color: var(--text-faint); font-size: 12px; text-align: center; }
/* 主题详情区 */
.topic-detail-wrap { padding: 20px; max-width: 760px; }
.tc-header { margin-bottom: 20px; }
.tc-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.tc-header-actions { display: flex; gap: 8px; margin-top: 10px; }
.tc-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tc-cluster-count { font-weight: 400; color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.tc-clusters { display: flex; flex-direction: column; gap: 8px; }
.tc-missing-pillar { font-size: 12px; color: var(--text-faint); padding: 12px 0; }

 /* 文章卡片 */
.tc-art-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tc-pillar-card { border-color: var(--accent); border-width: 2px; background: var(--accent-light); }
.tc-art-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tc-role-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; letter-spacing: .04em; }
.tc-role-pillar  { background: var(--red-bg); color: var(--red-text); }
.tc-role-cluster { background: var(--yellow-bg); color: var(--yellow-text); }
.tc-art-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tc-art-cn { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.tc-art-meta { font-size: 11px; color: var(--text-faint); margin-bottom: 10px; }
.tc-art-actions { display: flex; gap: 6px; flex-wrap: wrap; }

 /* 空状态 */
.topic-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 40px; }
.topic-empty-icon { font-size: 48px; margin-bottom: 16px; }
.topic-empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.topic-empty-sub { font-size: 13px; color: var(--text-muted); max-width: 380px; line-height: 1.6; }

 /* 主题拆解弹窗 */
.tdm-loading { text-align: center; padding: 32px; color: var(--text-muted); font-size: 14px; }
.tdm-pillar { background: var(--accent-light); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.tdm-clusters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tdm-cluster-item { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; }
.tdm-num { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--border); color: var(--text-muted); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.tdm-role-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.tdm-pillar-label { color: var(--accent); }
.tdm-cluster-label { color: var(--text-muted); }
.tdm-title { font-size: 13px; font-weight: 600; color: var(--text); }
.tdm-cn { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tdm-ctr-badge { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--yellow-pale); color: var(--amber-dark); letter-spacing: 0.02em; }
.tdm-field { display: flex; gap: 8px; align-items: flex-start; }
.tdm-field + .tdm-field { margin-top: 4px; }
.tdm-field-label { flex-shrink: 0; width: 34px; font-size: 11px; color: var(--text-faint); padding-top: 2px; }
.tdm-field-value { flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.tc-art-cat { font-size: 10px; padding: 2px 6px; border-radius: 999px; background: var(--gray-bg-alt); color: var(--text-muted); white-space: nowrap; }
.tc-attr-badge { display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: #e8f0fe; color: #1a56db; white-space: normal; word-break: break-word; max-width: 100%; }
.tc-attr-badge-muted { display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--gray-bg-alt); color: var(--text-muted); white-space: normal; word-break: break-word; max-width: 100%; }
.tdm-tip { font-size: 12px; color: var(--text-muted); background: var(--bg); border-radius: 6px; padding: 10px 12px; line-height: 1.5; }
.sem-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; background: var(--white);
  border-bottom: 1px solid var(--border);
}
.sem-item:last-child { border-bottom: none; }
.sem-score {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent);
}
.sem-title {
  flex: 1; min-width: 0;
  font-size: 12px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.sem-title:hover { color: var(--accent); }
.sem-link {
  flex-shrink: 0; font-size: 11px; color: var(--accent);
}
.sem-link:hover { text-decoration: underline; }
.sem-empty {
  display: flex; align-items: center;
  padding: 8px 10px;
  font-size: 12px; color: var(--text-faint);
}

 /* aim model type badge */
.aim-type-badge { font-size: 10px; background: var(--purple-light); color: var(--purple-text); padding: 2px 6px; border-radius: 999px; font-weight: 700; margin-left: 4px; }


 /* ══════════════════════════════════════════════════
   行业分类 + 站点列表 + 编辑器 补充样式
   ══════════════════════════════════════════════════ */

 /* 行业分类树 */

 /* ── Tab 切换 ── */
.sidebar-tabs {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 8px 4px;
  gap: 4px;
  flex-shrink: 0;
}
.sidebar-tabs .sidebar-tab {
  flex: 1 1 calc(33.333% - 4px);
  min-width: 0;
  white-space: nowrap;
}
.sidebar-tab {
  flex: 1;
  padding: 5px 0;
  border: none;
  background: transparent;
  color: var(--sidebar-text-faint);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 8px;
  gap: 4px;
}
.sidebar-tab:hover { color: var(--sidebar-text-hover); }
.sidebar-tab.active { background: var(--sidebar-active-bg); color: var(--white); }

 /* ── 视图容器 ── */
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}
.sidebar-view {
  display: none;
}
.sidebar-view.active { display: block; }

 /* ── 收藏星 ── */
.ind-fav-star {
  font-size: 10px;
  opacity: 0;
  transition: opacity .15s, color .15s;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  margin-right: 2px;
}
.ind-item:hover .ind-fav-star { opacity: 0.4; }
.ind-item:hover .ind-fav-star:hover,
.ind-fav-star.active {
  opacity: 1 !important;
  color: var(--yellow);
}

 /* ── 空状态 ── */
.empty-favorites {
  padding: 40px 16px;
  text-align: center;
  display: none;
}
.empty-favorites.show { display: block; }
.empty-icon  { font-size: 28px; opacity: 0.25; margin-bottom: 10px; }
.empty-text  { font-size: 13px; color: var(--sidebar-text-faint); margin-bottom: 4px; }
.empty-hint  { font-size: 11px; color: var(--sidebar-count-bg); }

.ind-search-box { position: relative; padding: 0 8px; flex-shrink: 0; }
.ind-search-box input {
  width: 100%; padding: 6px 10px 6px 28px; border-radius: 6px; border: 1px solid var(--sidebar-border);
  background: var(--sidebar-input-bg); color: var(--white); font-size: 12px;
  outline: none; transition: border-color .15s, background .15s;
}
.ind-search-box input::placeholder { color: var(--sidebar-text-faint); }
.ind-search-box input:focus { border-color: var(--accent-50); background: var(--sidebar-input-focus-bg); }
.ind-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 11px; opacity: 0.45; pointer-events: none; z-index: 1; }
.ind-search-box .search-wrap { width: 100%; }
.ind-search-box .search-clear { right: 10px; }
.ind-search-mark { background: var(--yellow-faint); color: var(--orange-dark); border-radius: 2px; padding: 0 1px; }

.ind-tree   { flex:1; overflow-y:auto; padding:8px 8px 8px; }

.ind-item   {
  display:flex; align-items:center; gap:6px;
  padding:7px 8px; border-radius:6px; cursor:pointer;
  margin-bottom:1px; transition:background .12s;
  color:var(--text-faint); font-size:13px;
}
.ind-item:hover  { background:var(--sidebar-hover); color:var(--border); }
.ind-item.active { background:var(--sidebar-active); color:var(--white); }

 /* sidebar 中分类名字设为白色 */
.ind-tree .ind-item { color: var(--white); }
.ind-tree .ind-item:hover { color: var(--border); }
.ind-toggle {
  width:16px; display:flex; align-items:center; justify-content:center;
  color:var(--text-muted); font-size:8px; flex-shrink:0;
  transition:transform .18s; cursor:pointer;
}
.ind-toggle.open  { transform:rotate(90deg); }
.ind-toggle.empty { visibility:hidden; pointer-events:none; }
.ind-children { margin-left:16px; display:none; }
.ind-children.open { display:block; }
.ind-counts {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.ind-count,
.ind-dir-count {
  font-size: 10px; font-weight: 600;
  background: var(--sidebar-border); color: var(--white-50);
  padding: 1px 6px; border-radius: 999px;
  flex-shrink: 0;
  min-width: 18px; text-align: center; display: inline-block;
}
.ind-count:empty,
.ind-dir-count:empty { visibility: hidden; }
.ind-item.active .ind-count,
.ind-item.active .ind-dir-count { background: var(--white-22); color: var(--white-95); }
.ind-content-icon {
  font-size: 10px;
  margin-right: 3px;
  opacity: 0.55;
  flex-shrink: 0;
}
.ind-name {
  flex:0 1 auto; min-width:0; color:inherit; text-decoration:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:inherit; cursor:pointer;
  display:flex; align-items:center;
}
.ind-name:hover { color:inherit; }

 /* xm 层次感：树线 + 层级图标 */
.ind-tree .ind-item { position: relative; }

 /*树线：.ind-children margin-left:16px 让它的左边缘刚好对齐父级 toggle 中心 */
.ind-tree .ind-children { position: relative; }
.ind-tree .ind-children.open::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 6px;
  width: 1px; background: var(--sidebar-divider);
}

 /* 左侧激活竖线 */
.ind-tree .ind-item.active::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  border-radius: 0 2px 2px 0;
}

 /* 层级图标（xm 彩色几何符号） */
.ind-tree .ind-name::before {
  content: '\25CF'; font-size: 8px; color: var(--red-hover);
  margin-right: 6px; vertical-align: middle; line-height: 1;
}
.ind-tree .lv-1 .ind-name::before { content: '\25CB'; color: var(--accent-hover); }
.ind-tree .lv-2 .ind-name::before { content: '\25C7'; color: var(--cyan); }
.ind-tree .lv-3 .ind-name::before { content: '\25A1'; color: var(--green-dark); }
.ind-tree .lv-4 .ind-name::before { content: '\25A0'; color: var(--orange-text); }
.ind-tree .lv-5 .ind-name::before { content: '\25AA'; color: var(--purple-text); }

 /* 站点列表 */
.site-list-scroll { flex:1; overflow-y:auto; }
.site-list-panel { padding:4px 0; }
.site-list-drop-zone { display:flex; align-items:center; justify-content:center; gap:6px; margin:4px 8px; padding:8px; border:2px dashed var(--border); border-radius:var(--radius); color:var(--text-muted); font-size:11px; background:var(--bg); transition:all .12s; }
.site-list-drop-zone.hidden { display:none; }
.site-list-drop-zone.drag-over { border-color:var(--accent); background:var(--accent-light); color:var(--accent); }

.site-row {
  display:flex; align-items:center; gap:9px;
  padding:12px 14px; cursor:pointer;
  border-left:3px solid transparent;
  border-bottom:1px solid var(--border-light);
  transition:background .1s, border-left-color .1s;
  text-decoration:none; color:inherit;
}
.site-row:hover  { background:var(--bg); border-left-color:var(--border-hover); }
.site-row.active { background:var(--accent-light); border-left-color:var(--accent); }
.site-row .site-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.site-row-wrap { flex:1; min-width:0; display:flex; flex-direction:column; row-gap:5px; }
.site-row-top { display:flex; align-items:flex-start; gap:10px; }
.site-row-info { flex:1; min-width:0; }
.site-row-name { font-size:13px; font-weight:600; color:var(--text); line-height:1.4; }
.site-row.active .site-row-name { color:var(--accent); }
.site-row-url  { font-size:11px; color:var(--text-muted); margin-top:2px; }
.site-row-id   { margin-top:3px; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.site-row-foot { display:flex; align-items:center; gap:5px; flex-wrap:nowrap; }
.site-row-id-stat { margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:3px; }
.site-row-cnt  { flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:4px; align-self:flex-start; margin-top:2px; }
.site-row-cnt ._siteCfgBadge { cursor:pointer; }
.site-row-cnt ._siteCfgBadge:hover { opacity: 0.85; }
/* 月收入徽标：选中行背景同为 accent-light，加描边保持「tag」观感；描边占 2px，内边距相应减 1px 保持与其它徽标同大 */
.badge-rpm-cny { border:1px solid var(--accent-30); padding:1px 5px; }
.site-row.dragging { opacity:0.5; background:var(--accent-light); }
.site-row.drag-over { border-top:2px solid var(--accent); }
/* 整行可拖拽排序：整行禁止文本选中——.id-chip 的 user-select:all 会让按下时选中文字，
   Chrome 对选中文字发起原生文本拖拽而非行拖拽，表现为中间区域"有时拖不住" */
.site-row, .site-row * { user-select:none; -webkit-user-select:none; }
 /* 竖向国家Tab */
.country-tabs-col {
  width: 56px; min-width: 56px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 4px; gap: 2px;
  overflow-y: auto; flex-shrink: 0;
}
.country-tabs-col::-webkit-scrollbar { display: none; }
.country-tab {
  padding: 6px 2px; border-radius: 6px;
  border: none; background: none;
  font-size: 11px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all .12s; text-align: center; line-height: 1.3;
}
.country-tab:hover { color: var(--accent); background: var(--border-light); }
.country-tab.active {
  background: var(--white); color: var(--accent);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.country-tab-cnt { font-size: 10px; opacity: .6; }
.lang-tab.active {
  background: var(--white); color: var(--accent);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

 /* 编辑器工具栏 */
.ed-toolbar {
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
  padding:8px 14px; border-bottom:1px solid var(--border);
  background:var(--bg); flex-shrink:0;
}
.ed-toolbar-group { display:flex; align-items:center; gap:3px; padding-right:8px; border-right:1px solid var(--border); }
.ed-toolbar-group:last-of-type { border-right:none; }
.ed-toolbar .btn-sm, .ed-toolbar .btn, .ed-toolbar .btn-lg { height:28px; }
.ed-toolbar select.btn-sm, .ed-toolbar select.btn, .ed-toolbar select.btn-lg { padding:4px 8px; height:28px; }

/* 行业洞察判定条 */
.insight-bar {
  display: none; align-items: center; gap: 8px;
  padding: 6px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg); flex-shrink: 0;
}
.insight-bar.visible { display: flex; }
.insight-bar-reason {
  flex: 1; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; background: var(--white); color: var(--text);
  resize: vertical; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.insight-bar-reason:focus { border-color: var(--accent); }

 /* 代码视图 */
.ed-code {
  padding:16px; border:none; outline:none;
  font-size:13px; line-height:1.7; color:var(--text); background:var(--bg);
  resize:none; font-family:ui-monospace,'SFMono-Regular',monospace;
  flex:1; width:100%; min-height:0;
}


 /* ══════════════════════════════════════════════════
   行业分类选择弹窗
   ══════════════════════════════════════════════════ */
.ind-picker-box { display:flex; flex-direction:column; }
.ind-picker-search { padding:12px 16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ind-picker-search input { width:100%; }
.ind-picker-body { flex:1; overflow-y:auto; padding:8px 0; }
.ind-picker-body .ind-item { padding:5px 16px; border-radius:0; margin:0; }
.ind-picker-body .ind-item:hover { background:var(--bg); color:var(--text); }
.ind-picker-body .ind-item.active { background:var(--blue-bg); color:var(--accent-hover); }
.ind-picker-body .ind-item.active .ind-toggle { color:var(--accent-hover); }
.ind-picker-body .ind-count,
.ind-picker-body .ind-dir-count { background: var(--border-light); color: var(--text-muted); }
.ind-picker-body .ind-item.active .ind-count,
.ind-picker-body .ind-item.active .ind-dir-count { background: var(--white); color: var(--accent); }
.ind-picker-body .ind-children { margin-left:18px; display:none; }
.ind-picker-body .ind-children.open { display:block; }
.ind-picker-result { padding:7px 16px; cursor:pointer; border-radius:6px; margin:0 8px 2px; font-size:13px; }
.ind-picker-result:hover { background:var(--bg); }
.ind-picker-result.active { background:var(--blue-bg); color:var(--accent-hover); }
.ind-picker-result-path { font-size:11px; color:var(--text-muted); margin-top:2px; }


 /* ══════════════════════════════════════════════════
   搜索框清除按钮（全局通用）
   ══════════════════════════════════════════════════ */
.search-wrap { position: relative; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; line-height: 15px; text-align: center;
  border-radius: 50%; background: var(--text-muted); color: var(--white);
  font-size: 13px; font-weight: 700; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  user-select: none; z-index: 2;
}
.search-clear:hover { opacity: 1 !important; background: var(--red); }
.search-wrap.has-value .search-clear { opacity: 0.55; pointer-events: auto; }

 /* ══════════════════════════════════════════════════
   站点信息 AI 辅助生成弹窗
   ══════════════════════════════════════════════════ */
.scfg-ai-init-bar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--blue-bg), var(--green-bg));
  border: 1px solid var(--blue-border); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px;
}
.scfg-ai-init-tip { font-size: 12px; color: var(--blue-dark); flex: 1; }

.app-modal-box.site-init-box { padding: 0; }
.site-init-box .app-modal-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); margin-bottom: 0; flex-shrink: 0; }
.site-init-body { padding: 0 24px 24px; overflow-y: auto; }

.si-cards-area { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.si-card {
  min-width: 250px; flex: 1; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s;
}
.si-card:hover { border-color: var(--border-hover); }
.si-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.si-label { display: block; font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }

 /* 版本选择行（站点配置 scfg 上下排版本） */
.si-ver-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.si-ver-row {
  border: 1.5px solid var(--border); border-radius: 8px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer; transition: border-color .15s, background .15s;
}
.si-ver-row:hover { border-color: var(--border-hover); }
.si-ver-row.selected { border-color: var(--accent); background: var(--blue-bg); }
.si-ver-radio { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.si-ver-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.si-ver-name { font-size: 13px; font-weight: 600; color: var(--text); }
.si-ver-name-cn { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.si-ver-domains { font-size: 11px; color: var(--accent-hover); }
.si-ver-author { font-size: 12px; color: var(--text); }
.si-ver-bio-preview { font-size: 11px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.si-ver-img  { font-size: 11px; color: var(--text-muted); font-style: italic; }
.si-ver-del { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 2px 5px; opacity: 0; transition: opacity .15s; align-self: flex-start; }
.si-ver-row:hover .si-ver-del { opacity: 1; }
.si-ver-label { font-size: 10px; color: var(--text-muted); }
.si-ver-save-bar { display: flex; align-items: center; gap: 10px; padding: 10px 2px 2px; }
.si-ver-save-hint { font-size: 11px; color: var(--text-muted); }

 /* ══════════════════════════════════════════════════
   编辑器主区域（左右分栏）
   ══════════════════════════════════════════════════ */
 /* 编辑器 + 右侧方向列 的横向容器（与 .topbar 平级） */
.editor-with-panel {
  flex: 1; display: flex; flex-direction: row; min-height: 0; overflow: hidden;
  position: relative;
}
.editor-with-panel .art-editor {
  flex: 1; min-width: 0;
}
.editor-with-panel .ae-body {
  flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden;
}

 /* ══════════════════════════════════════════════════
   首页 d2 内容区滚动
   ══════════════════════════════════════════════════ */
#overview-ae-body {
  overflow-y: auto !important;
}

 /* ══════════════════════════════════════════════════
   分类洞察「建站方向」列（已移至 col-dir 独立列）
   ══════════════════════════════════════════════════ */
#niche-directions-panel {
  flex: 1;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}

 /* ── 建站方向详情面板（紧贴列右侧滑出） ── */
.dir-detail-panel {
  position: absolute;
  left: 400px;
  top: 0;
  width: 420px;
  height: 100%;
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 16px var(--black-08);
  z-index: 10;
  transform: translateX(-100%);
  transition: transform .2s ease;
  display: none;
  overflow-y: auto;
  flex-direction: column;
}
.dir-detail-panel.show {
  display: flex;
  transform: translateX(0);
}
.dir-detail-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
  flex-shrink: 0;
}
.dir-detail-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.dir-detail-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}
.dir-detail-title-en {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  width: 100%;
}
.dir-detail-close {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.dir-detail-close:hover {
  background: var(--bg);
  color: var(--text);
}
.dir-detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.dir-detail-break { flex-basis: 100%; height: 0; }
.dir-detail-body {
  padding: 20px;
  flex: 1;
}
.dir-detail-section {
  margin-bottom: 24px;
}
.dir-detail-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.dir-detail-section-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}
.dir-detail-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dir-detail-theme {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 4px;
  color: var(--text);
}
.dir-detail-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--white);
  flex-shrink: 0;
}
.dir-detail-foot .btn, .dir-detail-foot .btn-sm, .dir-detail-foot .btn-lg {
  justify-content: center;
}

 /* 详情面板：已建站点列表 */
.dir-detail-sites { display: flex; flex-direction: column; gap: 4px; }
.dir-detail-site-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  background: var(--bg); cursor: pointer;
  transition: background .12s;
}
.dir-detail-site-item:hover { background: var(--accent-light); }
.dds-name { font-size: 12px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.dds-url  { font-size: 11px; color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dds-badge { flex-shrink: 0; }

 /* 详情面板：基本信息 */
.dir-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dir-detail-meta-item {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 4px;
}

 /* ── 详情面板：编辑表单 ── */
.dir-edit-field {
  margin-bottom: 16px;
}
.dir-edit-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.dir-edit-field input,
.dir-edit-field textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}
.dir-edit-field input:focus,
.dir-edit-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.dir-edit-field textarea {
  resize: vertical;
  line-height: 1.6;
}

.niche-dir-header {
  padding: 8px 10px 7px;
  font-size: 11px; font-weight: 600; color: var(--accent-hover);
  border-bottom: 1px solid var(--accent-light);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.niche-dir-header-title { cursor: pointer; }
.niche-dir-header-title:hover { text-decoration: underline; }
.niche-dir-header-actions { display: flex; gap: 4px; align-items: center; }
.niche-dir-list {
  display: flex; flex-direction: column; gap: 0;
  flex: 1;
}
.niche-dir-card {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid transparent;
  display: flex; flex-direction: column; gap: 6px;
  transition: background .1s, border-left-color .1s;
  cursor: pointer;
}
.niche-dir-card:hover { background: var(--bg); border-left-color: var(--border-hover); }
.niche-dir-card.active { background: var(--accent-light); border-left-color: var(--accent); }
.niche-dir-card.active .ndir-dir-name { color: var(--accent); }
.niche-dir-title { font-size: 11px; font-weight: 700; color: var(--blue-dark); }
.niche-dir-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.niche-dir-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: auto; padding-top: 6px; }
.niche-dir-tags { font-size: 10px; color: var(--text-muted); flex: 1; line-height: 1.4; }
.niche-dir-btn { white-space: nowrap; flex-shrink: 0; font-size: 11px; }
 /* 右侧面板卡片顶部行 */
.niche-dir-top { display: flex; align-items: flex-start; gap: 8px; flex-wrap: nowrap; }
.niche-dir-top .drag-handle {
  position: static; transform: none; right: auto; top: auto;
  align-self: center; padding: 2px 4px; user-select: none;
}
.niche-dir-top .niche-dir-title { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.niche-dir-top .niche-dir-title .ndir-dir-name,
.niche-dir-top .niche-dir-title .st-card-name { flex: 0 1 auto; min-width: 0; }
.ndir-top-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ndir-top-actions .btn-sm:disabled { cursor: not-allowed; pointer-events: none; }
.ndir-star { background: none; border: none; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--text-faint); }
.ndir-star:hover { color: #f5a623; }
.ndir-star.ndir-star-on { color: #f5a623; }
.niche-dir-icon-btn {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: var(--text-muted); font-size: 12px; border-radius: 4px;
  line-height: 1; flex-shrink: 0;
}
.niche-dir-icon-btn:hover { background: var(--border); color: var(--text); }

 /* ══════════════════════════════════════════════════
   分类洞察 / 建站方向 AI 配置弹窗
   ══════════════════════════════════════════════════ */
.app-modal-box.niche-cfg-box {
  display: flex; flex-direction: column; padding: 0;
}
.niche-cfg-box .app-modal-head { padding: 14px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.niche-cfg-box .niche-cfg-body { flex: 1; overflow-y: auto; padding: 16px 20px; box-sizing: border-box; }
.niche-cfg-box .app-modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); margin-top: 0; }
.niche-cfg-box .app-modal-foot .pagination { border-top: none; padding: 0; background: transparent; }
.scfg-preview-block { margin-top: 12px; }
.scfg-preview-block-name { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; padding: 4px 8px; background: var(--bg); border-radius: 4px; }

 /* ══════════════════════════════════════════════════
   About 任务包卡片（WP主题 · 指令 Tab）
   ══════════════════════════════════════════════════ */
.wpt-pack { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); padding: 12px 14px; transition: border-color 0.12s; }
.wpt-pack:hover { border-color: var(--accent-50); }
.wpt-pack-head { display: flex; align-items: center; gap: 8px; }
.wpt-pack-badge { flex-shrink: 0; padding: 2px 7px; border-radius: 4px; background: var(--accent-light); color: var(--accent); font-size: 11px; font-weight: 700; }
.wpt-pack-name { font-size: 13px; font-weight: 600; color: var(--text); }
.wpt-pack-actions { margin-left: auto; flex-shrink: 0; display: flex; gap: 6px; }
.wpt-pack-desc { margin-top: 8px; font-size: 11px; color: var(--text-muted); line-height: 1.7; }

 /* ══════════════════════════════════════════════════
   项目方向管理弹窗
   ══════════════════════════════════════════════════ */
.app-modal-box.niche-dir-box {
  display: flex; flex-direction: column; padding: 0;
}
.niche-dir-box .app-modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ndm-body {
  flex: 1; display: flex; flex-direction: row; min-height: 0; overflow: hidden;
}
.ndm-left {
  width: 380px; min-width: 380px; max-width: 380px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.ndm-right {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ndm-col-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .05em; padding: 12px 14px 6px; flex-shrink: 0;
}
.ndm-dir-list { flex: 1; overflow-y: auto; }
.ndm-group-hd {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px 5px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1;
}
.ndm-lang-tag {
  font-size: 10px; color: var(--accent); background: var(--accent-light);
  border-radius: 999px; padding: 2px 6px; font-weight: 600; margin-left: 4px;
}

.niche-dir-box .app-modal-foot {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ndm-import-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
}
.ndm-import-left {
  width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}
.ndm-import-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow-y: auto;
}
.ndm-foot-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
}
.ndm-preview-group {
  margin-bottom: 12px;
}
.ndm-preview-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.ndm-preview-hd span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.ndm-item {
  border-bottom: 1px solid var(--border); padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
}
.ndm-item:hover { background: var(--bg); }
.ndm-item.active { background: var(--accent-light); border-left: 3px solid var(--accent); }
.ndm-item-top { display: flex; align-items: flex-start; gap: 6px; }
.ndm-item-title { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; }
.ndm-item-title-en { font-size: 11px; color: var(--text-muted); margin: 1px 0 3px; }
.ndm-item-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.ndm-item-desc-en { font-size: 11px; opacity: 0.7; }
.ndm-item-tags { font-size: 10px; color: var(--text-muted); display: flex; gap: 4px; flex-wrap: wrap; }
.ndm-item-actions { display: flex; gap: 6px; align-items: center; }
.ndm-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-muted); text-align: center; padding: 40px 20px;
}
.ndm-edit-form {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.ndm-item textarea {
  width: 100%; font-size: 12px; border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; resize: vertical; background: var(--white); color: var(--text);
}
 /* JSON 导入区 */
.ndm-hint { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.ndm-hint code { background: var(--bg); padding: 1px 4px; border-radius: 4px; font-size: 10px; }
.ndm-json-ta {
  width: 100%; flex: 1; min-height: 200px; resize: vertical;
  font-size: 11px; font-family: monospace; border: 1px solid var(--border);
  border-radius: 6px; padding: 8px; background: var(--bg); color: var(--text);
}
.ndm-json-ta:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  outline: none;
}
.ndm-field {
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; background: var(--white); color: var(--text);
}
textarea.ndm-field {
  resize: vertical;
  min-height: 60px;
  line-height: 1.6;
}
.ndm-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  outline: none;
}
.ndm-row { display: flex; align-items: center; gap: 8px; }
.ndm-err { font-size: 11px; color: var(--red-hover); }
.ndm-preview-area { display: flex; flex-direction: column; }
.ndm-preview-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ndm-preview-item {
  display: flex; align-items: flex-start; gap: 8px;
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  background: var(--white);
}
.ndm-preview-item input[type=checkbox] { margin-top: 2px; flex-shrink: 0; }
.ndm-preview-item-body { flex: 1; }
.ndm-preview-title { font-size: 12px; font-weight: 600; color: var(--text); }
.ndm-preview-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ndm-preview-tags { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

 /* ══════════════════════════════════════════════════
   分类预览弹窗（AI 生成目录）
   ══════════════════════════════════════════════════ */
.app-modal-box.cat-gen-box {
  max-width: 95vw;
  display: flex; flex-direction: column; padding: 0;
}
.cat-gen-box .app-modal-head { padding: 14px 20px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.cat-gen-body {
  flex: 1; overflow-y: auto; max-height: 65vh; padding: 16px 24px;
}
.cg-tree { display: flex; flex-direction: column; gap: 10px; }
.cg-parent { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.cg-parent-row, .cg-child-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.cg-indent { color: var(--text-faint); width: 18px; flex-shrink: 0; font-size: 13px; }
.cg-drag-handle { color: var(--text-faint); cursor: grab; flex-shrink: 0; }
.cg-input {
  border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px;
  font-size: 12px; color: var(--text); background: var(--bg);
  outline: none; transition: border-color .12s;
}
.cg-input:focus { border-color: var(--border-hover); background: var(--white); }
.cg-cn { width: 140px; }
.cg-en { flex: 1; }
.cg-btn-del {
  width: 22px; height: 22px; border: none; border-radius: 4px;
  background: transparent; color: var(--text-muted); cursor: pointer; font-size: 12px;
  flex-shrink: 0; transition: background .12s, color .12s;
}
.cg-btn-del:hover { background: var(--red-bg); color: var(--red-hover); }
.cg-children { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.cg-add-child {
  font-size: 11px; color: var(--primary); background: none; border: none;
  cursor: pointer; padding: 3px 6px; border-radius: 4px; margin-top: 4px;
  transition: background .12s;
}
.cg-add-child:hover { background: var(--blue-bg); }
.cg-add-parent {
  font-size: 12px; color: var(--primary); background: none;
  border: 1.5px dashed var(--blue-border); border-radius: 8px; cursor: pointer;
  padding: 8px; transition: background .12s; text-align: center;
}
.cg-add-parent:hover { background: var(--blue-bg); }
.cg-desc {
  resize: vertical;
  min-height: 28px;
  line-height: 1.5;
  display: block;
  width: calc(100% - 36px);
  margin: 0 0 2px 24px;
}
.cg-children .cg-desc {
  width: calc(100% - 46px);
  margin-left: 28px;
}
.cg-lang-label {
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.cg-desc-label {
  margin-left: 24px;
}
.cg-children .cg-desc-label {
  margin-left: 28px;
}

 /* ══════════════════════════════════════════════════
   建站方向面板 — 新格式（优先级分组）
   ══════════════════════════════════════════════════ */
.niche-dir-new { overflow-y: auto; }
.ndir-group { border-bottom: 1px solid var(--gray-border); padding: 8px 0 4px; }
.ndir-group:last-child { border-bottom: none; }
.ndir-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 12px 6px; color: var(--text-muted);
}
.ndir-card-new {
  border-bottom: 1px solid var(--border-light);
  padding: 12px; gap: 6px;
}
.ndir-card-new:hover { background: var(--bg); }
/* 管理页卡片（洞察/方向/站点总览）：固定高度，中部内容区内部滚动 */
#ins-grid .ndir-card-new, #dir-panel-grid .ndir-card-new, #sto-grid .ndir-card-new { height: 240px; }
.ndir-card-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.ndir-card-new.starred { border-color: var(--yellow); background: var(--yellow-bg); }
.ndir-card-new.starred:hover { background: var(--yellow-lighter); }
.ndir-card-new.dropped { opacity: .75; background: #f9f9f9; }
.ndir-card-new.dropped .ndir-dir-name { text-decoration: line-through; color: var(--text-muted); }
.ndir-dir-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; flex: 1; min-width: 0; }
.ndir-dir-name-en { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; line-height: 1.3; }
.ndir-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ndir-badges-col { flex-direction: column; align-items: flex-start; gap: 4px; }
.ndir-build { font-size: 10px; color: var(--text-faint); cursor: pointer; white-space: nowrap; }
.ndir-build:hover { color: var(--accent); }
.ndir-ai-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 999px; flex-shrink: 0; }
.ndir-ai-good    { background: var(--green); color: var(--white); }
.ndir-ai-caution { background: var(--orange-deep); color: var(--white); }
.ndir-ai-poor    { background: var(--gray-mid); color: var(--white); }
.ndir-ai-none    { background: var(--gray-light); color: var(--gray-darker); }
/* ── 内容约束双语并排 ── */
.dir-cc-bilingual { display: flex; gap: 12px; margin-top: 8px; }
.dir-cc-col       { flex: 1; font-size: 11px; line-height: 1.6; }
.dir-cc-col-en    { color: var(--text-muted); }
.dir-cc-col-cn    { color: var(--text); }
.ndir-reason {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.ndir-themes {
  font-size: 10px; color: var(--gray-dark);
  background: var(--gray-bg-alt); border-radius: 999px; padding: 2px 6px;
  line-height: 1.4;
}
 /* ══════════════════════════════════════════════════
   建站向导弹窗
   ══════════════════════════════════════════════════ */
.app-modal-box.wz-box {
  padding: 0; overflow: hidden;
}
.wz-box .app-modal-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--border); margin-bottom: 0; flex-shrink: 0; }
.wz-box .app-modal-foot { padding: 12px 20px 14px; border-top: 1px solid var(--border); margin-top: 0; flex-shrink: 0; }
.wz-step-item.active { color: var(--primary); font-weight: 700; cursor: default; }
.wz-step-item.active .wz-step-num { background: var(--primary); color: var(--white); }
.si-card-selected {
  border: 1.5px solid var(--accent) !important;
  background: var(--blue-bg) !important;
}

 /* ════════════════════════════════
   种子词页（page-seed-kw）
   ════════════════════════════════ */
.lp-empty { padding: 16px 12px; font-size: 12px; color: var(--text-muted); text-align: center; }
.skw-seed-input {
  flex: 1; font-size: 12px; border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; background: var(--white);
}
.skw-seed-input:focus { border-color: var(--accent); outline: none; }
.skw-src-tab {
  padding: 6px 12px; font-size: 12px; border: none;
  border-bottom: 2px solid transparent; background: none;
  cursor: pointer; color: var(--text-muted); margin-bottom: -1px;
}
.skw-src-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.skw-src-tab:hover:not(.active) { color: var(--text); }
.skw-src-panel { display: none; padding-bottom: 4px; }
.skw-src-panel.active { display: block; }
.skw-pg-act { display: inline-flex; gap: 4px; }
.nt-exp-src-btn {
  padding: 4px 10px; font-size: 12px; border: none; background: none;
  cursor: pointer; color: var(--text-muted); border-right: 1px solid var(--border);
}
.nt-exp-src-btn:last-child { border-right: none; }
.nt-exp-src-btn.active { background: var(--accent); color: var(--white); }
.nt-exp-src-btn:hover:not(.active) { background: var(--bg-hover); color: var(--text); }
.lp-act-btn.danger:hover { color: var(--red-hover); border-color: var(--red-hover); }
.skw-expand-act { display: flex; gap: 6px; }
.skw-form-input {
  font-size: 12px; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; background: var(--white); color: var(--text);
  outline: none; transition: border-color .12s;
}
.skw-form-input:focus { border-color: var(--accent); }
.skw-form-ta {
  width: 100%; box-sizing: border-box; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
  resize: none; background: var(--white); color: var(--text);
  outline: none; transition: border-color .12s; font-family: inherit;
}
.skw-form-ta:focus { border-color: var(--accent); }
#skw-history-title { font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--text-faint); }

 /* ════════════════════════════════
   指令编辑器 Tab 布局
   ════════════════════════════════ */
.pm-tab-bar {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg); flex-shrink: 0;
  padding: 0 14px;
}
.pm-tab {
  padding: 9px 14px; font-size: 13px; color: var(--text-muted);
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.pm-tab:hover { color: var(--text); }
.pm-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.pm-pane {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.pm-pane.hidden { display: none; }

 /* 阅读视图：双列并排 */
.pm-read-cols {
  display: flex; flex: 1; overflow: hidden;
}
.pm-read-col {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--border);
}
.pm-read-col:last-child { border-right: none; }
.pm-read-col-head {
  padding: 7px 14px; flex-shrink: 0;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.pm-read-col-body {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  font-size: 13px; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.pm-read-col:last-child .pm-read-col-body {
  background: var(--bg); color: var(--text-muted);
}


 /* 变量插入浮层 */
.pm-vars-popup {
  position: fixed; z-index: 500;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-md);
  min-width: 280px; max-width: 480px; max-height: 360px;
  display: flex; flex-direction: column; overflow: hidden;
}
.pm-vars-popup-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.pm-vars-popup-title {
  flex: 1; font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.pm-vars-popup-body { overflow-y: auto; flex: 1; }


 /* ═══════════════════════════════════════════════════════
   Inline-CSS Cleanup Components
   ═══════════════════════════════════════════════════════ */

.visually-hidden {
  position: absolute; left: -9999px;
  opacity: 0; height: 0; width: 0;
}

.input-count {
  width: 56px !important; text-align: center;
  padding: 4px 6px !important;
  font-size: 12px !important;
  height: 28px;
}

.input-sm-bordered {
  width: 54px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  background: var(--white);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  padding: 4px 8px;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-weight: 500;
  color: var(--text-muted);
}

.data-table td {
  padding: 5px 10px;
  text-align: left;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}

/* ── 预热 URL / 历史表格 ── */
.table-responsive { overflow-x: auto; }
.wpm-warm-url-table,
.wpm-warm-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.wpm-warm-url-table thead th,
.wpm-warm-history-table thead th {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
}
.wpm-warm-url-table tbody td,
.wpm-warm-history-table tbody td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}
.wpm-warm-url-table tbody tr:hover,
.wpm-warm-history-table tbody tr:hover { background: var(--bg-2); }
.wpm-warm-url-table tbody tr { cursor: pointer; }
.wpm-warm-url-table .col-url,
.wpm-warm-history-table .col-msg { width: auto; }
.wpm-warm-url-table .col-type,
.wpm-warm-url-table .col-time,
.wpm-warm-history-table .col-time { width: 110px; }
.wpm-warm-url-table .col-status,
.wpm-warm-history-table .col-status { width: 130px; }
.wpm-warm-url-table .col-count,
.wpm-warm-history-table .col-event { width: 90px; }
.wpm-warm-history-table .col-time { width: 120px; }
.wpm-warm-history-table .col-event { width: 110px; }
.wpm-warm-history-table .col-msg { max-width: 0; }
.wpm-warm-history-table .col-msg,
.wpm-warm-url-table .col-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpm-warm-url-table .col-status { font-size: 11px; }

.wpm-warm-jobs-table,
.wpm-warm-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.wpm-warm-jobs-table thead th,
.wpm-warm-logs-table thead th {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
}
.wpm-warm-jobs-table tbody td,
.wpm-warm-logs-table tbody td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}
.wpm-warm-jobs-table tbody tr:hover,
.wpm-warm-logs-table tbody tr:hover { background: var(--bg-2); }
.wpm-warm-jobs-table .col-job-status { width: 90px; }
.wpm-warm-jobs-table .col-job-type { width: 120px; }
.wpm-warm-jobs-table .col-job-time { width: 140px; }
.wpm-warm-jobs-table .col-job-info { width: auto; }
.wpm-warm-logs-table .col-log-time { width: 150px; }
.wpm-warm-logs-table .col-log-type { width: 120px; }
.wpm-warm-logs-table .col-log-result { width: 80px; }
.wpm-warm-logs-table .col-log-count { width: 80px; }
.wpm-warm-logs-table .col-log-msg { width: auto; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wpm-warm-time { font-size: 12px; color: var(--text); white-space: nowrap; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
}

.seed-kw-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.gen-status {
  font-size: 12px;
  color: var(--hint);
  margin: 8px 0;
}

.preview-head {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}



 /* ═══════════════════════════════════════════════════════
   Country Locales Modal (moved from inline <style>)
   ═══════════════════════════════════════════════════════ */

.link-muted{cursor:pointer}
.link-muted:hover{opacity:.75}
.clm-row{border-bottom:1px solid var(--border,var(--border-light))}
.clm-row:last-child{border-bottom:none}
.clm-row.clm-drag-over .clm-row-hd{box-shadow:inset 0 2px 0 0 var(--accent)}
.clm-drag{cursor:grab;color:var(--text-faint);flex-shrink:0;font-size:13px;padding:0 2px;line-height:1}
.clm-drag:active{cursor:grabbing}
.clm-row-hd{display:flex;align-items:center;gap:8px;padding:9px 20px;cursor:pointer;user-select:none}
.clm-row-hd:hover{background:var(--bg)}
.clm-row.clm-row-open .clm-row-hd{background:var(--accent-light)}
.clm-country{display:flex;align-items:center;gap:5px;min-width:120px;font-size:13px;font-weight:500}
.clm-code{color:var(--text-faint);font-size:11px;font-weight:400;font-family:monospace}
.clm-chips{flex:1;display:flex;flex-wrap:wrap;gap:3px;min-width:0}
.clm-chip{display:inline-block;padding:1px 6px;border-radius:4px;font-size:11px;background:var(--accent-light);color:var(--accent-hover);border:1px solid var(--blue-border)}
.clm-chip.primary{background:var(--green-light);color:var(--green-text);border-color:var(--green-bg)}
.clm-empty{font-size:12px;color:var(--text-faint);font-style:italic}
.clm-arrow{font-size:10px;color:var(--text-faint);margin-left:auto;flex-shrink:0}
.clm-editor{padding:10px 20px 14px;background:var(--bg);border-top:1px solid var(--border)}
.clm-edit-row{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid var(--border-light)}
.clm-edit-row:last-of-type{border-bottom:none}
.clm-edit-label{flex:1;font-size:12px;cursor:pointer;color:var(--text)}
.clm-del-btn{border:none;background:none;color:var(--red);cursor:pointer;font-size:14px;padding:0 2px;line-height:1;flex-shrink:0}
.clm-del-btn:hover{color:var(--red-hover)}
.clm-add-row{display:flex;gap:6px;margin-top:10px}
.clm-add-row select{flex:1;padding:4px 8px;border:1px solid var(--border);border-radius:6px;font-size:12px;min-width:0}
.clm-editor-foot{margin-top:10px;display:flex;justify-content:flex-end}
.clm-loading,.clm-empty-hint{text-align:center;color:var(--text-faint);padding:20px;font-size:13px}
#country-locales-modal .app-modal-box{padding:0}
#country-locales-modal .app-modal-body{overflow-y:auto;min-height:0}

 /* ════════════════════════════════
   文章评论区（编辑器内嵌）
   ════════════════════════════════ */
.ae-comments-wrap {
  margin-top: 12px; border-top: 2px dashed var(--border); padding-top: 14px;
}
.ae-cmt-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.ae-cmt-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.ae-cmt-count {
  font-size: 11px; color: var(--text-faint);
  background: var(--border); padding: 1px 7px; border-radius: 999px;
}
.ae-cmt-empty {
  font-size: 12px; color: var(--text-hint); padding: 10px 0;
}
.ae-cmt-thread {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.ae-cmt-root-num {
  flex-shrink: 0; padding-top: 11px;
  font-size: 10px; font-weight: 700; color: var(--text-faint); text-align: right;
}
.ae-cmt-thread-body { flex: 1; min-width: 0; }
.ae-cmt-replies {
  margin-top: 4px; padding-left: 12px;
  border-left: 2px solid var(--border);
}
.ae-cmt-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 4px;
}
.ae-cmt-item-reply {
  background: var(--bg);
}
.ae-cmt-name-row {
  display: flex; align-items: center; gap: 4px; margin-bottom: 2px;
}
.ae-cmt-author {
  font-size: 12px; font-weight: 600; color: var(--text); flex: 1; min-width: 0;
}
.ae-cmt-email {
  font-size: 10px; color: var(--text-faint); margin-bottom: 2px;
}
.ae-cmt-date {
  font-size: 10px; color: var(--text-faint); margin-bottom: 2px; font-variant-numeric: tabular-nums;
}
.ae-cmt-sentiment-label {
  font-size: 10px; color: var(--text-faint); margin-bottom: 5px;
}
.ae-cmt-sentiment {
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 999px;
}
.ae-cmt-pos          { background: var(--green-bg);    color: var(--green-text); }
.ae-cmt-neu          { background: var(--border);       color: var(--text-muted); }
.ae-cmt-que          { background: var(--accent-light); color: var(--accent); }
.ae-cmt-mix          { background: var(--yellow-bg);    color: var(--yellow-text); }
.ae-cmt-author-reply { background: var(--purple-bg);    color: var(--purple-text); }
.ae-cmt-model-tag {
  font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px;
  background: var(--purple-bg); color: var(--purple-text);
}
.ae-cmt-body { display: flex; flex-direction: column; gap: 6px; }
.ae-cmt-cn, .ae-cmt-local {
  font-size: 12px; line-height: 1.6; color: var(--text-muted);
  display: flex; gap: 6px; align-items: flex-start;
}
.ae-cmt-cn { color: var(--text); }
.ae-cmt-cn .ed-lang-badge, .ae-cmt-local .ed-lang-badge {
  flex-shrink: 0; margin-top: 2px;
}

/* ════════════════════════════════
   变量管理页
   ════════════════════════════════ */
.vars-nav { flex: 1; overflow-y: auto; padding: 4px 0; }
.vars-list-section {
  padding: 6px 12px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint);
}
.vars-nav-section-label {
  padding: 10px 12px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
}
.var-key-wrap {
  font-size: 12px; font-family: var(--font-mono, monospace);
  color: var(--accent); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.var-key-brace { color: var(--text-muted); font-weight: 400; }
.badge-usage {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 4px;
  background: var(--border); color: var(--text-muted);
}
.badge-usage-all {
  background: var(--accent-light); color: var(--accent);
}
.sys-var-key-big {
  display: flex; align-items: center;
  font-size: 18px; font-weight: 700; font-family: var(--font-mono, monospace);
  color: var(--accent); padding: 8px 0;
}
.sys-var-note {
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  background: var(--bg-hover); border-radius: var(--radius);
  padding: 10px 12px; margin-top: 8px;
}
/* 变量详情：解析规则区（默认版 / 环节专属变体，数据来自 core/vars.php 注册表） */
.sysvar-variant {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin-top: 8px; background: var(--bg-hover);
}
.sysvar-variant-hit { border-color: var(--green-text); background: var(--green-bg); }
.sysvar-variant-head { font-size: 13px; font-weight: 600; display: flex; align-items: center; }
.sysvar-variant-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-top: 4px; }
.sysvar-example {
  font-family: var(--mono, monospace); font-size: 12px; line-height: 1.6;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; margin-top: 8px; white-space: pre-wrap; word-break: break-all;
}
.ml-6 { margin-left: 6px; }
/* 指令编辑器：未定义变量警示条 */
.pm-var-warn {
  margin: 10px 16px 0; padding: 10px 14px; border-radius: var(--radius);
  background: var(--red-bg); border: 1px solid var(--red);
  color: var(--red); font-size: 13px; line-height: 1.7;
}
.pm-var-warn code {
  font-family: var(--mono, monospace); font-size: 12px;
  background: rgba(0,0,0,.06); border-radius: 4px; padding: 1px 5px;
}
.sys-var-lock {
  font-size: 11px; color: var(--text-faint);
  background: var(--bg-hover); border-radius: 6px; padding: 2px 8px;
}

/* 只读/禁用字段底色 */
.connect-tab-field input[readonly],
.connect-tab-field textarea[readonly],
.connect-tab-field select:disabled,
.dir-field input[readonly],
.dir-field textarea[readonly],
.dir-field select:disabled,
.scfg-field input[readonly],
.scfg-field textarea[readonly],
.scfg-field select:disabled {
  background-color: var(--bg);
  cursor: default;
}

/* ── 生产动态弹窗（autopilot-log）── */
.apl-statbar { display: flex; align-items: center; gap: 20px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--gray-bg); flex-shrink: 0; }
.apl-stat-group { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.apl-stat-item { display: flex; flex-direction: column; gap: 2px; }
.apl-stat-label { font-size: 11px; color: var(--text-faint); }
.apl-stat-value { font-size: 16px; font-weight: 700; color: var(--text); }
.apl-stat-value-sm { font-size: 13px; color: var(--text-muted); }
.apl-feed { flex: 1; overflow-y: auto; padding: 8px 20px; }
.apl-feed-loading { padding: 40px; text-align: center; color: var(--text-faint); font-size: 13px; }
.apl-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 24px; border-bottom: 1px solid var(--border-light); }
.apl-row.err { background: var(--red-faint-bg); }
.apl-row-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.apl-row-label { font-size: 12px; font-weight: 600; width: 60px; flex-shrink: 0; }

/* ── 广告位「第N段后」设置 ── */
.ad-nth-input { width: 56px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text); background: var(--white); outline: none; font-family: inherit; }

/* ════════════════════════════════
   排班模块
   ════════════════════════════════ */
.sched-tz-bar { padding: 6px 12px; font-size: 11px; line-height: 1.6; color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border); }
/* 排班工具行终端占比条：竖排（条在上、百分比在下），紧跟"排班"标题，留白移到条后把按钮推到最右 */
#page-schedule .col-cat-label { margin-right: 0; }
#sched-device-bar { display: inline-flex; align-items: center; align-self: center; margin-right: auto; }

 /* 中控：冷启动爬坡阶梯编辑（外层 .scfg-panel-v2 已有 16px 20px 内边距，这里不再重复加） */
.sys-ramp-box { padding: 0; }
.sys-ramp-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sys-ramp-del {
  border: 1px solid var(--border); background: var(--card, #fff); color: var(--text-muted);
  width: 24px; height: 24px; line-height: 1; border-radius: 6px; cursor: pointer; font-size: 15px;
}
.sys-ramp-del:hover { border-color: var(--red, #c0392b); color: var(--red, #c0392b); }

 /* 中控：库存预警（外层 .scfg-panel-v2 已有 16px 20px 内边距，这里不再重复加） */
.sys-stock-box { padding: 0; }
.sys-stock-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--border); font-size: 12px; }
.sys-stock-head { font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); position: sticky; top: 0; background: var(--card, #fff); }
.sys-stock-row .c-dot  { width: 18px; flex-shrink: 0; text-align: center; }
.sys-stock-row .c-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-stock-row .c-name a { color: inherit; text-decoration: none; }
.sys-stock-row .c-name a:hover { text-decoration: underline; }
.sys-stock-row .c-num  { width: 130px; flex-shrink: 0; text-align: right; }
.sys-stock-row .c-sm   { width: 56px; flex-shrink: 0; text-align: left; }
.sys-stock-row .c-ap   { width: 70px; flex-shrink: 0; text-align: center; }
.sys-stock-row .c-lvl  { width: 116px; flex-shrink: 0; text-align: center; }
.sys-stock-row.lvl-empty { background: #fdecec; }
.sys-stock-row.lvl-idle   { background: #fdf2e3; }
.sys-stock-row.lvl-gap   { background: #fdecec; }
.sys-stock-row.lvl-low   { background: #fff7e6; }
.sys-stock-row .text-faint { color: var(--text-faint, #94a3b8); font-size: 11px; }
.sys-stock-row .text-ok    { color: var(--green, #1e8e3e); }
.sched-day-group { border-bottom: 1px solid var(--border); }
.sched-day-hd { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.sched-day-date { font-size: 10px; font-weight: 600; color: var(--slate); background: var(--border); padding: 2px 6px; border-radius: 999px; }
.sched-day-count { margin-left: auto; font-size: 10px; color: var(--text-faint); }
.sched-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; line-height: 16px; }
.sched-tag-today { background: #e8f0fe; color: #3b6ef5; }
.sched-tag-past  { background: #f1f1f1; color: #999; }
.sched-tag-done  { background: #e6f9f0; color: #27ae60; }
.sched-art-done  { opacity: 0.6; }

/* ════════════════════════════════
   图片审核弹窗
   ════════════════════════════════ */
.img-review-wrap { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.img-review-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.img-review-content { flex: 1; overflow-y: auto; min-height: 0; padding-top: 16px; }

.stock-search-header {
  flex-shrink: 0;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stock-search-header-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
}
.stock-search-header-tags { margin-bottom: 8px; }
.stock-search-header-cn {
  font-weight: 600; font-size: 13px; color: var(--text);
  line-height: 1.45; max-height: 2.9em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.stock-search-header-local {
  margin-top: 4px; font-size: 11px; color: var(--text-muted);
  line-height: 1.4; max-height: 2.8em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.stock-search-header-meta {
  margin-top: 4px; font-size: 11px; color: var(--text-faint);
  line-height: 1.4; max-height: 2.8em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* 紧凑单行头部：站点 tag + 中文标题一行，描述直接显示在标题下方（弱化样式） */
.stock-search-header-slim { padding: 6px 10px; margin-bottom: 8px; }
.stock-search-header-tags-row { margin-bottom: 0; }
.stock-search-header-cn-line {
  flex: 1; min-width: 0; margin-top: 0;
  display: block; max-height: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 品牌图配图弹窗：生图指令较长，不做两行截断，完整展示 */
.stock-search-header-full .stock-search-header-cn,
.stock-search-header-full .stock-search-header-local,
.stock-search-header-full .stock-search-header-meta {
  max-height: none; -webkit-line-clamp: unset; display: block; overflow: visible;
}

/* ════════════════════════════════
   图库搜索配图弹窗
   ════════════════════════════════ */
.stock-img-grid {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.stock-img-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stock-img-card {
  position: relative;
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.stock-img-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: var(--accent);
}
.stock-img-thumb {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  -webkit-user-drag: none;
  user-select: none;
}
/* OSS m_fill 裁剪预览：悬停卡片时显示被居中裁掉区域的暗色遮罩（JS 按百分比定位） */
.stock-img-thumbwrap { position: relative; }
/* 按原图宽高比预留占位（JS 注入 aspect-ratio），加载完成前卡片位置固定、瀑布流不重新排版 */
.stock-img-thumbwrap[style*="aspect-ratio"] .stock-img-thumb { position: absolute; inset: 0; height: 100%; }
.stock-crop-maskset { display: none; pointer-events: none; }
.stock-img-card:hover .stock-crop-maskset { display: block; }
.stock-crop-mask { position: absolute; background: rgba(10,10,10,.55); }
.stock-crop-keepline { position: absolute; border: 1px dashed rgba(255,255,255,.85); box-sizing: border-box; }
/* 自定义选区：不用悬停也常驻显示，并打角标 */
.stock-crop-maskset.has-crop { display: block; }
.stock-crop-tag {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: rgba(30,144,255,.92); color: #fff; font-size: 10px; line-height: 1;
  padding: 3px 6px; border-radius: 3px; pointer-events: none;
}
.stock-img-info {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stock-img-info .badge { align-self: flex-start; }
.stock-img-info-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px;
}
.stock-img-info-row .text-faint { flex: 1; min-width: 0; }
@media (max-width: 640px)  { .stock-img-grid { gap: 10px; } .stock-img-col { gap: 10px; } }

