/* 法律 / 安全 / 运营 / 声誉 / 命理 — 与主控台浅色风格一致 */
#p-legal.page.active,
#p-security.page.active,
#p-ops.page.active,
#p-reputation.page.active {
  background: var(--bg-main) !important;
  flex: 1;
  width: 100%;
  min-height: 0;
}

#p-legal, #p-security, #p-ops, #p-reputation, #p-divination,
#lc, #sc, #oc, #rc, #dc, #divinationSummary {
  color: var(--text) !important;
}

#lc, #sc, #oc, #rc {
  background: var(--bg-main) !important;
  flex: 1;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

/* 顶层嵌入容器铺满，不要再套一圈卡片边框 */
#lc > .html-content.module-report-embed,
#sc > .html-content.module-report-embed,
#oc > .html-content.module-report-embed,
#rc > .html-content.module-report-embed,
#lc > .module-report-embed.html-content,
#sc > .module-report-embed.html-content,
#oc > .module-report-embed.html-content,
#rc > .module-report-embed.html-content {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-shadow: none !important;
}

#lc > .html-content:not(.module-report-embed),
#sc > .html-content:not(.module-report-embed),
#oc > .html-content:not(.module-report-embed),
#rc > .html-content:not(.module-report-embed) {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  width: 100% !important;
}

#lc .html-content, #sc .html-content, #oc .html-content, #rc .html-content, #dc .html-content,
#lc .module-report-embed, #sc .module-report-embed, #oc .module-report-embed, #rc .module-report-embed,
#lc .pn, #sc .pn, #oc .pn, #rc .pn, #dc .pn,
#lc .section, #sc .section, #oc .section, #rc .section, #dc .section,
#lc .sec-fragment, #sc .sec-fragment, #oc .sec-fragment, #rc .sec-fragment,
#lc .legal-fragment, #oc .legal-fragment, #rc .legal-fragment {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
}

#lc h2, #lc h3, #lc h4,
#sc h2, #sc h3, #sc h4,
#oc h2, #oc h3, #oc h4,
#rc h2, #rc h3, #rc h4,
#dc h2, #dc h3, #dc h4,
#p-divination h3, #p-divination h4 {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-bright) !important;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
  margin: 14px 0 8px !important;
}

#lc table td, #lc table th,
#oc table td, #oc table th,
#rc table td, #rc table th,
#dc table td, #dc table th,
#sc table td, #sc table th {
  border-color: var(--border) !important;
  color: var(--text) !important;
  background: var(--bg-card) !important;
}

#p-divination .divination-form label,
#p-divination .qimen-extra-fields label {
  color: var(--text-muted) !important;
}

#p-divination .qimen-extra-fields {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
}

/* 运营/声誉/法律/安全 API 注入的深色内联样式 → 浅色卡片 */
#lc [style*="background:rgba(15,23,42"],
#sc [style*="background:rgba(13,27,46"],
#oc [style*="background:rgba(13,27,46"],
#rc [style*="background:rgba(13,27,46"],
#dc [style*="background:rgba(15,23,42"],
#dc [style*="background:rgba(13,27,46"],
#lc [style*="background:#0a1628"],
#sc [style*="background:#0a1628"],
#oc [style*="background:#0a1628"],
#rc [style*="background:#0a1628"],
#dc [style*="background:#1a"],
#dc [style*="background:#3a"],
#lc [style*="background:#1a"],
#oc [style*="background:#1a"],
#rc [style*="background:#1a"] {
  background: var(--bg-card) !important;
  color: var(--text) !important;
}

#lc .stat-card, #sc .stat-card, #oc .stat-card, #rc .stat-card, #dc .stat-card,
#lc .stats-4col .stat-card, #sc .stats-4col .stat-card,
#oc .stats-4col .stat-card, #rc .stats-4col .stat-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
}

#lc .stat-value, #sc .stat-value, #oc .stat-value, #rc .stat-value { color: var(--text-bright) !important; }
#lc .stat-label, #sc .stat-label, #oc .stat-label, #rc .stat-label { color: var(--text-muted) !important; }

#sc .html-content body, #lc .html-content body,
#oc .html-content body, #rc .html-content body,
#lc > body, #sc > body, #oc > body, #rc > body,
#lc html, #sc html, #oc html, #rc html {
  background: transparent !important;
  color: var(--text) !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 安全模块 sec-block 与运营/声誉 alert 统一 */
#oc .sec-block, #rc .sec-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

#oc .alert-item, #rc .alert-item, #lc .alert-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
}

#oc .tool-item, #rc .tool-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0;
}
