/**
 * 引擎OS 白天版可读性补丁 V1。
 *
 * 设计原则：
 * 1. 仅在 html[data-theme="silver"] 下生效，不影响 DSH 已完成的夜间版。
 * 2. 不调整组件结构和业务逻辑，只修复文字对比度、字号和信息层级。
 * 3. 正文以 13px 为最低目标，辅助标签以 12px 为最低目标。
 */

html[data-theme="silver"] {
  --ink: #17202a;
  --soft-ink: #3f4b59;
  --muted: #5d6675;
  --accent: #3858c7;
}

html[data-theme="silver"] body {
  color: #1d2733;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 顶部导航与页面标题：提高小标签字号，并压暗激活色。 */
html[data-theme="silver"] .nav-group-label {
  color: rgba(17, 18, 20, 0.72) !important;
  font-size: 12px !important;
  font-weight: 600;
}

html[data-theme="silver"] .nav-label,
html[data-theme="silver"] .nav-list button.active .nav-label {
  color: #304fb7 !important;
}

html[data-theme="silver"] .overline {
  color: #425ca8 !important;
  font-size: 13px !important;
  font-weight: 700;
}

html[data-theme="silver"] .qc-switcher-type-tag {
  color: #4f5b6a !important;
  font-size: 12px !important;
  font-weight: 700;
}

html[data-theme="silver"] .qc-switcher-name,
html[data-theme="silver"] .qc-switcher-id,
html[data-theme="silver"] .topbar-title p,
html[data-theme="silver"] .topbar-title span:not(.overline) {
  color: #505b69 !important;
  font-size: 12.5px !important;
}

html[data-theme="silver"] .nav-dropdown-panel button.active span {
  color: #304fb7 !important;
}

/* Agent 对话：白天版原先为浅字叠加灰底，实际对比度仅约 1.3。 */
html[data-theme="silver"] .msg-ai .msg-content {
  background: #f5f7fa !important;
  border-color: #d9dfe7 !important;
  color: #273240 !important;
}

html[data-theme="silver"] .msg-user .msg-content {
  background: #eaf2ff !important;
  border-color: #c8d8f4 !important;
  color: #1f2a37 !important;
}

html[data-theme="silver"] .msg-content,
html[data-theme="silver"] .msg-content p,
html[data-theme="silver"] .msg-list li {
  color: #273240 !important;
  font-size: 14px !important;
  line-height: 1.68;
}

html[data-theme="silver"] .msg-content strong {
  color: #111827 !important;
}

html[data-theme="silver"] .msg-sender {
  color: #216e54 !important;
  font-size: 13px !important;
  font-weight: 700;
}

html[data-theme="silver"] .msg-provider,
html[data-theme="silver"] .msg-time,
html[data-theme="silver"] .chat-runtime-strip,
html[data-theme="silver"] .chat-runtime-strip span {
  color: #596575 !important;
  font-size: 12px !important;
}

html[data-theme="silver"] .chat-status-dot {
  color: #147d4f !important;
}

/* 内容中心：修复白底上的浅金、浅绿、浅红表格文字。 */
html[data-theme="silver"] .creative-script-table th {
  color: #465260 !important;
  font-size: 13px !important;
}

html[data-theme="silver"] .creative-script-table td {
  color: #263240 !important;
  font-size: 14px !important;
}

html[data-theme="silver"] .creative-script-table td.positive,
html[data-theme="silver"] .creative-script-table .positive {
  color: #087647 !important;
}

html[data-theme="silver"] .creative-script-table td.warning,
html[data-theme="silver"] .creative-script-table .warning {
  color: #8a5a00 !important;
}

html[data-theme="silver"] .creative-decision.danger {
  color: #b42318 !important;
  font-weight: 700;
}

html[data-theme="silver"] .creative-rule-sync strong {
  color: #176b45 !important;
}

html[data-theme="silver"] .creative-rule-source-list a {
  background: #f5f7fa !important;
  border-color: #d9dfe7 !important;
}

html[data-theme="silver"] .creative-rule-source-list a span,
html[data-theme="silver"] .creative-rule-source-list a small,
html[data-theme="silver"] .creative-reverse-grid span,
html[data-theme="silver"] .creative-reverse-grid p,
html[data-theme="silver"] .creative-table-note {
  color: #566272 !important;
  font-size: 12px !important;
}

html[data-theme="silver"] .drp-chip {
  color: #263240 !important;
  font-size: 12px !important;
}

html[data-theme="silver"] .drp-chip.active {
  color: #263240 !important;
}

html[data-theme="silver"] .creative-date-note {
  color: #566272 !important;
  font-size: 12px !important;
}

/* 运营中心：语义颜色必须在白底上仍能辨认。 */
html[data-theme="silver"] .wb-kpi-num.warn,
html[data-theme="silver"] .wb-goal-pct.warn {
  color: #8a5a00 !important;
}

html[data-theme="silver"] .wb-goal-pct.danger,
html[data-theme="silver"] .wb-kpi-num.danger {
  color: #b42318 !important;
}

html[data-theme="silver"] .wb-kpi-num.good,
html[data-theme="silver"] .wb-goal-pct.good {
  color: #087647 !important;
}

html[data-theme="silver"] .collab-status.open {
  color: #9a3412 !important;
  font-size: 12px !important;
  font-weight: 700;
}

html[data-theme="silver"] .workbench-v3 .warn,
html[data-theme="silver"] .workbench-page .warn {
  color: #8a5a00 !important;
}

html[data-theme="silver"] .wb-decision-agent {
  color: #465260 !important;
  font-size: 12px !important;
  font-weight: 700;
}

html[data-theme="silver"] .wb-decision-rank {
  color: #344054 !important;
}

html[data-theme="silver"] .wb-kpi-meta,
html[data-theme="silver"] .wb-center-card small,
html[data-theme="silver"] .wb-decision small,
html[data-theme="silver"] .workbench-v3 small,
html[data-theme="silver"] .workbench-page small {
  font-size: 12px !important;
}

html[data-theme="silver"] .brain-stage-name {
  color: #344054 !important;
  font-size: 12px !important;
  font-weight: 800;
}

html[data-theme="silver"] .brain-mode-power.on {
  color: #087647 !important;
  font-weight: 800;
}

html[data-theme="silver"] .brain-mode-btn {
  color: #465260 !important;
  font-size: 12px !important;
}

html[data-theme="silver"] .brain-mode-btn.active {
  color: #000000 !important;
}

html[data-theme="silver"] .brain-metric b {
  color: #273240 !important;
}

html[data-theme="silver"] .brain-metric span {
  color: #566272 !important;
  font-size: 12px !important;
}

html[data-theme="silver"] .brain-next-action p {
  color: #304fb7 !important;
}

html[data-theme="silver"] .brain-event em {
  font-size: 12px !important;
}

html[data-theme="silver"] .collab-from,
html[data-theme="silver"] .collab-to,
html[data-theme="silver"] .collab-action,
html[data-theme="silver"] .collab-card em {
  color: #3f4b59 !important;
  font-size: 12px !important;
}

/* 投流中心：实时摘要、风险标签和快捷问题在浅底上使用深色。 */
html[data-theme="silver"] .ai-context-strip,
html[data-theme="silver"] .ai-context-strip span {
  color: #566272 !important;
  font-size: 13px !important;
}

html[data-theme="silver"] .ast-label {
  color: #b42318 !important;
  font-weight: 700;
}

html[data-theme="silver"] .quick-question-row button {
  color: #304fb7 !important;
}

html[data-theme="silver"] .ghost-button.phd-action,
html[data-theme="silver"] .ghost-button.phd-action span {
  color: #111827 !important;
  font-weight: 800;
}

html[data-theme="silver"] .primary-button.phd-action,
html[data-theme="silver"] .primary-button.phd-action span {
  color: #ffffff !important;
  font-weight: 800;
}

html[data-theme="silver"] .date-range-bar small,
html[data-theme="silver"] .date-range-bar em,
html[data-theme="silver"] .date-range-bar span,
html[data-theme="silver"] .wb-range-hint {
  font-size: 12px !important;
}

html[data-theme="silver"] .date-range-bar em {
  color: #304fb7 !important;
}

html[data-theme="silver"] .date-label,
html[data-theme="silver"] .creative-toolbar-title,
html[data-theme="silver"] .drp-sep {
  color: #304fb7 !important;
}

html[data-theme="silver"] .tac-row2-text em {
  color: #304fb7 !important;
}

html[data-theme="silver"] .brand-mark > div > span {
  color: #566272 !important;
  font-size: 12px !important;
}

/* DSH 密度层中被固定为 11px 的常用辅助文字，白天版统一抬高。 */
html[data-theme="silver"] .ai-agent-chip small,
html[data-theme="silver"] .demo-event-phase,
html[data-theme="silver"] .demo-event-copy small,
html[data-theme="silver"] .ai-workbench-caption,
html[data-theme="silver"] .agent-knowledge-stats span,
html[data-theme="silver"] .agent-knowledge-toolbar > span,
html[data-theme="silver"] .agent-directory-list small,
html[data-theme="silver"] .agent-domain-head span,
html[data-theme="silver"] .sticker-text,
html[data-theme="silver"] .model-badge {
  color: #566272 !important;
  font-size: 12px !important;
  line-height: 1.5;
}

html[data-theme="silver"] .ghost-button,
html[data-theme="silver"] .primary-button,
html[data-theme="silver"] .workspace input,
html[data-theme="silver"] .workspace select,
html[data-theme="silver"] .workspace textarea {
  font-size: 13px;
}

/* 键盘焦点在浅色背景上必须清晰可见。 */
html[data-theme="silver"] :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(56, 88, 199, 0.38) !important;
  outline-offset: 2px;
}

@media (max-width: 859px) {
  html[data-theme="silver"] .msg-content,
  html[data-theme="silver"] .msg-content p,
  html[data-theme="silver"] .msg-list li {
    font-size: 14px !important;
  }
}
