/* ============================================================
   ☀️ 日间浅色模式全局覆盖层（light-theme.css）
   加载顺序：必须在 product-batch.css / delivery-inventory.css /
   workbench-design.css / workbench-flow.css / task-detail.css 之后。
   规范：body[data-theme="light"] 前缀 + !important，系统化压制全部深色调色板。
   ============================================================ */

/* ---------- 1. 全局深色背景 → 白/浅卡片 ---------- */
body[data-theme="light"] .panel,
body[data-theme="light"] #pbSinglePanel,
body[data-theme="light"] #pbBatchPanel,
body[data-theme="light"] #wdGroupNav,
body[data-theme="light"] .pb-group,
body[data-theme="light"] .delivery-card,
body[data-theme="light"] .issue-card,
body[data-theme="light"] .badcase-card,
body[data-theme="light"] .modal,
body[data-theme="light"] #diBatchModal .di-modal,
body[data-theme="light"] #deliverySubmitModal .wd-single,
body[data-theme="light"] #ssMainSplitGrid > div,
body[data-theme="light"] .studio-tools-popover,
body[data-theme="light"] .video-preview-box {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
}

/* 内联 & CSS 文件中的深色背景（面板/卡片/输入区/工具条） */
body[data-theme="light"] [style*="background:#0c0d13"],
body[data-theme="light"] [style*="background:#0c0d14"],
body[data-theme="light"] [style*="background:#090a0f"],
body[data-theme="light"] [style*="background:#0b0c10"],
body[data-theme="light"] [style*="background:#0e0f15"],
body[data-theme="light"] [style*="background:#0f1017"],
body[data-theme="light"] [style*="background:#101117"],
body[data-theme="light"] [style*="background:#101118"],
body[data-theme="light"] [style*="background:#111218"],
body[data-theme="light"] [style*="background:#12131a"],
body[data-theme="light"] [style*="background:#12131b"],
body[data-theme="light"] [style*="background:#13141d"],
body[data-theme="light"] [style*="background:#14151d"],
body[data-theme="light"] [style*="background:#14151f"],
body[data-theme="light"] [style*="background:#14171d"],
body[data-theme="light"] [style*="background:#151622"],
body[data-theme="light"] [style*="background:#161823"],
body[data-theme="light"] [style*="background:#161923"],
body[data-theme="light"] [style*="background:#171923"],
body[data-theme="light"] [style*="background:#181926"],
body[data-theme="light"] [style*="background:#181a24"],
body[data-theme="light"] [style*="background:#181b22"],
body[data-theme="light"] [style*="background:#191b26"],
body[data-theme="light"] [style*="background:#1a1b25"],
body[data-theme="light"] [style*="background:#1b2027"],
body[data-theme="light"] [style*="background:#1b2030"],
body[data-theme="light"] [style*="background:#1c1e28"],
body[data-theme="light"] [style*="background:#1e2029"],
body[data-theme="light"] [style*="background:#222d3c"],
body[data-theme="light"] [style*="background:#252733"],
body[data-theme="light"] [style*="background:#282a3c"],
body[data-theme="light"] [style*="background:#292c3d"],
body[data-theme="light"] [style*="background:#101218"],
body[data-theme="light"] [style*="background:#0c0e16"],
body[data-theme="light"] [style*="background:#28384a"],
body[data-theme="light"] [style*="background:#151620"],
body[data-theme="light"] [style*="background:#14151e"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
/* 鼠标悬停/选中态的深灰底 → 浅灰底 */
body[data-theme="light"] [style*="background:#1b2027"],
body[data-theme="light"] .wd-group-link[aria-current="true"],
body[data-theme="light"] .db-record[aria-current="true"],
body[data-theme="light"] #pbBatchPanel .pb-script-table tr:focus-within {
  background: #f1f5f9 !important;
}

/* ---------- 2. 输入框 / 下拉 / 文本域 → 浅底深字 ---------- */
body[data-theme="light"] select,
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="password"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="url"],
body[data-theme="light"] textarea,
body[data-theme="light"] #ssUrl,
body[data-theme="light"] #ssTitle,
body[data-theme="light"] #ssScriptText,
body[data-theme="light"] #deliverySubmitModal input:not([type=file]),
body[data-theme="light"] #deliverySubmitModal select,
body[data-theme="light"] #deliverySubmitModal textarea,
body[data-theme="light"] #pbBatchPanel .pb-script-table input,
body[data-theme="light"] #pbBatchPanel .pb-script-table textarea,
body[data-theme="light"] .studio-ctrl-select,
body[data-theme="light"] .di-common-fields select,
body[data-theme="light"] .di-batch-row input,
body[data-theme="light"] .di-batch-row textarea,
body[data-theme="light"] #deliverySubmitModal .delivery-form-field input,
body[data-theme="light"] #deliverySubmitModal .delivery-form-field select,
body[data-theme="light"] #deliverySubmitModal .delivery-form-field textarea {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body[data-theme="light"] select:focus,
body[data-theme="light"] input:focus,
body[data-theme="light"] textarea:focus {
  background: #ffffff !important;
}
body[data-theme="light"] ::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* ---------- 3. 浅色文字 → 深色正文 ---------- */
body[data-theme="light"] [style*="color:#f1f2f6"],
body[data-theme="light"] [style*="color:#edf0f7"],
body[data-theme="light"] [style*="color:#e6e9ef"],
body[data-theme="light"] [style*="color:#e9ebf2"],
body[data-theme="light"] [style*="color:#dce0ea"],
body[data-theme="light"] [style*="color:#dce2f0"],
body[data-theme="light"] [style*="color:#d5dae5"],
body[data-theme="light"] [style*="color:#d1d5db"],
body[data-theme="light"] [style*="color:#cfd2e2"],
body[data-theme="light"] [style*="color:#cbd2e5"],
body[data-theme="light"] [style*="color:#c6cbd5"],
body[data-theme="light"] [style*="color:#c5cada"],
body[data-theme="light"] [style*="color:#bdc6da"],
body[data-theme="light"] [style*="color:#b5bdd1"],
body[data-theme="light"] [style*="color:#bac2d5"],
body[data-theme="light"] [style*="color:#aeb5c7"],
body[data-theme="light"] [style*="color:#adb3c1"],
body[data-theme="light"] .wd-group-link strong,
body[data-theme="light"] .di-common-fields label,
body[data-theme="light"] .di-row-content label,
body[data-theme="light"] .di-row-extras label {
  color: #1e293b !important;
}

/* ---------- 4. 中灰次要文字 → 次级深灰（保留层级） ---------- */
body[data-theme="light"] [style*="color:#a4adc1"],
body[data-theme="light"] [style*="color:#9399a8"],
body[data-theme="light"] [style*="color:#9297a6"],
body[data-theme="light"] [style*="color:#929aa8"],
body[data-theme="light"] [style*="color:#9aa1b2"],
body[data-theme="light"] [style*="color:#929db8"],
body[data-theme="light"] [style*="color:#8f9db8"],
body[data-theme="light"] [style*="color:#8b8d9b"],
body[data-theme="light"] [style*="color:#727d90"],
body[data-theme="light"] [style*="color:#a0a3bd"],
body[data-theme="light"] [style*="color:#a0a8bd"],
body[data-theme="light"] [style*="color:#b8c0cd"],
body[data-theme="light"] .wd-group-link,
body[data-theme="light"] .wd-group-link span,
body[data-theme="light"] .wd-group-link small,
body[data-theme="light"] .db-number,
body[data-theme="light"] .db-ready,
body[data-theme="light"] .pb-note,
body[data-theme="light"] .studio-save-state,
body[data-theme="light"] .studio-version-field,
body[data-theme="light"] #deliverySubmitModal #deliveryTypeLabel {
  color: #5b6478 !important;
}

/* ---------- 5. 荧光青 → 品牌深青（浅色下保留 TikTok 青色识别） ---------- */
body[data-theme="light"] [style*="color:#25f4ee"],
body[data-theme="light"] [style*="color:#25d8d3"],
body[data-theme="light"] .checklist-title {
  color: #087F82 !important;
}
body[data-theme="light"] [style*="border-color:#25f4ee"],
body[data-theme="light"] [style*="border-color:rgba(37,244,238"],
body[data-theme="light"] [style*="border:1px solid rgba(37,244,238"] {
  border-color: #8ED0CD !important;
}
body[data-theme="light"] #symdBatchCountSelect,
body[data-theme="light"] #symdRatioSelect,
body[data-theme="light"] #symdResolutionSelect {
  color: #087F82 !important;
  border-color: #8ED0CD !important;
  background: #EAF8F7 !important;
}
body[data-theme="light"] .wd-group-link[aria-current="true"] {
  border-left-color: #087F82 !important;
  background: #EAF8F7 !important;
}
body[data-theme="light"] .wd-group-link[aria-current="true"] strong { color: #055E61 !important; }
body[data-theme="light"] .di-tree-button.di-selected {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #087F82 !important;
}
body[data-theme="light"] .module-subnav-btn.active {
  color: #087F82 !important;
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
}
/* 来源卡片选中态：青色承担"选中"语义（红色只留给主动作按钮） */
body[data-theme="light"] .src-card.active {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #055E61 !important;
}

/* ---------- 6. 深色边框 → 浅边框（外部 CSS 文件中的） ---------- */
body[data-theme="light"] #wdGroupNav,
body[data-theme="light"] #pbBatchPanel .pb-group-title,
body[data-theme="light"] #pbBatchPanel .wd-reference,
body[data-theme="light"] #pbBatchPanel .pb-generation-settings,
body[data-theme="light"] #pbBatchPanel .pb-table-wrap,
body[data-theme="light"] #pbBatchPanel .pb-bottom,
body[data-theme="light"] #diBatchModal .di-common-fields,
body[data-theme="light"] #diBatchModal .di-common-pictures,
body[data-theme="light"] #dbRecordList,
body[data-theme="light"] #diBatchModal .db-editor-header,
body[data-theme="light"] #diBatchModal .di-batch-row details,
body[data-theme="light"] #deliverySubmitModal .wd-single-commit,
body[data-theme="light"] #deliverySubmitModal #deliveryScriptPreview,
body[data-theme="light"] .studio-extra-settings,
body[data-theme="light"] .studio-quick-instructions,
body[data-theme="light"] .studio-edit-tools {
  border-color: #e2e8f0 !important;
}

/* ---------- 7. 组件特例 ---------- */
/* 收藏脚本按钮（白字白框问题） */
body[data-theme="light"] #btnSaveFavorite {
  background: #fff7ed !important;
  color: #b45309 !important;
  border-color: #fcd34d !important;
}
body[data-theme="light"] #btnSaveFavorite:hover {
  background: #ffedd5 !important;
  color: #92400e !important;
  border-color: #fbbf24 !important;
}
/* 画布顶部工具条（纯画面/隐藏时间勾选区 + 修订对比） */
body[data-theme="light"] .studio-toggle-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
body[data-theme="light"] .studio-toggle-chip:hover {
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
body[data-theme="light"] .nav-btn.active {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
/* 表格 */
body[data-theme="light"] #pbBatchPanel .pb-script-table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
}
body[data-theme="light"] #pbBatchPanel .pb-script-table td { border-top-color: #e2e8f0 !important; }
body[data-theme="light"] #pbBatchPanel .pb-script-table textarea:focus,
body[data-theme="light"] #pbBatchPanel .pb-script-table input:focus {
  background: #ffffff !important;
  outline-color: #94a3b8 !important;
  border-color: #94a3b8 !important;
}
body[data-theme="light"] #pbBatchPanel .pb-bottom { background: #f8fafc !important; }
body[data-theme="light"] #pbBatchPanel .pb-settings select { background-color: #f8fafc !important; }
body[data-theme="light"] #deliverySubmitModal input:not([type=file]):focus,
body[data-theme="light"] #deliverySubmitModal select:focus,
body[data-theme="light"] #deliverySubmitModal textarea:focus { border-color: #94a3b8 !important; }
/* 五维冻结常量区 */
body[data-theme="light"] #ssConstHeadCard {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
body[data-theme="light"] #ssConstHeadContent { color: #475569 !important; }
/* 视频预览与抽帧条（保持深色：媒体内容白底无意义） */
body[data-theme="light"] .video-preview-box,
body[data-theme="light"] .video-preview-box video,
body[data-theme="light"] .frames-strip { background: #0f172a !important; }
/* 任务详情弹窗 */
body[data-theme="light"] .td-ref { border-color: #cbd5e1 !important; }
body[data-theme="light"] .td-muted { color: #64748b !important; }
/* 警示/成功/危险语义色在浅底的适配 */
body[data-theme="light"] .issue-fix {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}
body[data-theme="light"] .tag-reject { background:#ffe4e6 !important; color:#be123c !important; border-color:#fda4af !important; }
body[data-theme="light"] .tag-warn { background:#fef9c3 !important; color:#a16207 !important; border-color:#fde047 !important; }
body[data-theme="light"] .tag-pass { background:#dcfce7 !important; color:#15803d !important; border-color:#86efac !important; }
body[data-theme="light"] #deliverySubmitError,
body[data-theme="light"] .pb-error { color: #b91c1c !important; }
body[data-theme="light"] #deliveryPaidHint,
body[data-theme="light"] [style*="color:#ffd19b"] { color: #92400e !important; }
/* 风格调教档案按钮（内联深色） */
body[data-theme="light"] #btnTutorMemory {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
/* 批量交付侧栏树 */
body[data-theme="light"] .di-project-view aside {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
body[data-theme="light"] .di-common-pictures { border-color: #cbd5e1 !important; color: #64748b !important; }
body[data-theme="light"] .di-batch-footer { background: #f8fafc !important; }
/* 模态遮罩稍微变淡 */
body[data-theme="light"] .modal-overlay { background: rgba(15, 23, 42, 0.45) !important; }
/* 巨幕视频弹窗保持深底（观影体验） */
body[data-theme="light"] #symphonyVideoModalCard { background: #0f172a !important; }

/* ============================================================
   第三轮：程序化全量审计补丁（覆盖 100% 色值，杜绝漏网）
   基于 luminance 扫描 index.html 内联 + 全部外部 CSS 生成
   ============================================================ */

/* --- A. 高亮度文字（白底不可见）→ 深色可读 --- */
body[data-theme="light"] [style*="color:#ffaa00"] { color: #b45309 !important; }
body[data-theme="light"] [style*="color:#ffd19b"],
body[data-theme="light"] [style*="color:#ffdd88"],
body[data-theme="light"] [style*="color:#ffd79b"] { color: #92400e !important; }
body[data-theme="light"] [style*="color:#a5b4fc"] { color: #4f46e5 !important; }
body[data-theme="light"] [style*="color:#a78bfa"] { color: #6d28d9 !important; }
body[data-theme="light"] [style*="color:#9ca3af"],
body[data-theme="light"] [style*="color:#94a3b8"] { color: #64748b !important; }
body[data-theme="light"] [style*="color:#e2e8f0"],
body[data-theme="light"] [style*="color:#becbd1"],
body[data-theme="light"] [style*="color:#c5cada"],
body[data-theme="light"] [style*="color:#d1d5db"] { color: #334155 !important; }

/* 白色内联文字 → 深色（#fff 与 #ffffff 一并命中） */
body[data-theme="light"] [style*="color:#fff"] { color: #0f172a !important; }

/* --- B. 中间灰/品牌色文字加深 --- */
body[data-theme="light"] [style*="color:#00d26a"],
body[data-theme="light"] [style*="color:#49d393"] { color: #15803d !important; }
body[data-theme="light"] [style*="color:#ff607e"],
body[data-theme="light"] [style*="color:#ff8c9a"],
body[data-theme="light"] [style*="color:#ff6a88"],
body[data-theme="light"] [style*="color:#ffb9c5"] { color: #e11d48 !important; }
body[data-theme="light"] [style*="color:#6b7280"] { color: #475569 !important; }

/* --- C. 白字保护：彩底按钮/徽章内的文字保持白色 --- */
body[data-theme="light"] .btn-submit,
body[data-theme="light"] .btn-submit * {
  color: #ffffff !important;
}
body[data-theme="light"] .studio-action-btn.primary-red,
body[data-theme="light"] .studio-action-btn.primary-red * {
  color: #ffffff !important;
}
body[data-theme="light"] [style*="background:#fe2c55"],
body[data-theme="light"] [style*="background:#fe2c55"] *,
body[data-theme="light"] [style*="background:#e9264c"],
body[data-theme="light"] [style*="background:#e9264c"] *,
body[data-theme="light"] [style*="background:#c63253"],
body[data-theme="light"] [style*="background:#c63253"] *,
body[data-theme="light"] [style*="background:linear-gradient"],
body[data-theme="light"] [style*="background:linear-gradient"] *,
body[data-theme="light"] [style*="background:#25f4ee"] ,
body[data-theme="light"] [style*="background:#00d26a"],
body[data-theme="light"] [style*="background:#00d26a"] * {
  color: #ffffff !important;
}

/* --- D. 遗漏深色背景补齐 --- */
body[data-theme="light"] [style*="background:#2b2114"],
body[data-theme="light"] [style*="background:#132326"] {
  background: #fffbeb !important;
  border-color: #fde68a !important;
}
body[data-theme="light"] [style*="background:#090a0f"],
body[data-theme="light"] [style*="background:#0b0c10"] {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* --- E. 深色边框全面补齐 --- */
body[data-theme="light"] [style*="border:1px solid #333647"],
body[data-theme="light"] [style*="border:1px solid #2d3042"],
body[data-theme="light"] [style*="border:1px solid #343b48"],
body[data-theme="light"] [style*="border:1px solid #2c323d"],
body[data-theme="light"] [style*="border:1px solid #3a3c4c"],
body[data-theme="light"] [style*="border:1px dashed #3a3c4c"],
body[data-theme="light"] [style*="border:1px dashed #2d3040"],
body[data-theme="light"] [style*="border-color:#343b48"],
body[data-theme="light"] [style*="border-color:#303447"],
body[data-theme="light"] [style*="border-color:#2c323d"] {
  border-color: #cbd5e1 !important;
}

/* --- F. CSS 文件级深色规则映射（workbench-design / task-detail 等） --- */
body[data-theme="light"] #pbBatchPanel .pb-script-table tr:hover input,
body[data-theme="light"] #pbBatchPanel .pb-script-table tr:hover textarea {
  border-color: #94a3b8 !important;
}
body[data-theme="light"] #dbRecordList { border-right-color: #e2e8f0 !important; }
body[data-theme="light"] .wd-group-link { border-left-color: transparent !important; }
body[data-theme="light"] #taskDetailModal .modal,
body[data-theme="light"] .td-modal-body {
  background: #ffffff !important;
  color: #0f172a !important;
}
body[data-theme="light"] .td-sec-title { color: #0f172a !important; }
body[data-theme="light"] .td-kv-k { color: #64748b !important; }
body[data-theme="light"] .td-kv-v { color: #0f172a !important; }

/* --- G. 原生控件色彩方案（关键：解决下拉选项框仍是黑色的问题） --- */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body[data-theme="light"] select option,
body[data-theme="light"] select optgroup {
  background: #ffffff !important;
  color: #0f172a !important;
}
body[data-theme="light"] input[type="checkbox"],
body[data-theme="light"] input[type="radio"] {
  accent-color: #fe2c55;
}

/* ---------- H. 交付树侧栏（按产品看）与任务列表浅色修复 ---------- */
/* 交付树：深色项目按钮 → 白底（.di-tree-project 深蓝底 #1b2030） */
body[data-theme="light"] .di-tree-project {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
body[data-theme="light"] .di-tree-button,
body[data-theme="light"] .di-tree-button strong {
  color: #334155 !important;
}
body[data-theme="light"] .di-tree-button span {
  color: #64748b !important;
}
body[data-theme="light"] .di-tree-button:hover {
  background: #f1f5f9 !important;
}
body[data-theme="light"] .di-viewbar label {
  color: #5b6478 !important;
}

/* 任务流水列表：任务名（.td-name 浅白 #e9ebf2）→ 深色可读 */
body[data-theme="light"] .td-name { color: #0f172a !important; }
body[data-theme="light"] .td-name:hover { color: #fe2c55 !important; }
body[data-theme="light"] .td-muted { color: #64748b !important; }
body[data-theme="light"] .td-empty { color: #94a3b8 !important; }
body[data-theme="light"] .td-table th { color: #475569 !important; }

/* 任务详情弹窗浅色化 */
body[data-theme="light"] .td-modal { background: #ffffff !important; }
body[data-theme="light"] .td-modal h3 { color: #0f172a !important; }
body[data-theme="light"] .td-modal header span { color: #64748b !important; }
body[data-theme="light"] .td-body dt { color: #64748b !important; }
body[data-theme="light"] .td-body dd { color: #0f172a !important; }
body[data-theme="light"] .td-prompt-section pre {
  color: #0f172a !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
body[data-theme="light"] .td-ref { color: #475569 !important; }
body[data-theme="light"] .td-error { color: #b91c1c !important; }
body[data-theme="light"] .td-gallery span { background: rgba(15,23,42,0.75) !important; color: #ffffff !important; }
/* 状态色浅底适配：成功绿/失败粉/等待金均加深 */
body[data-theme="light"] .td-done,
body[data-theme="light"] .tag-pass { color: #15803d !important; }
body[data-theme="light"] .td-failed { color: #e11d48 !important; }
body[data-theme="light"] .td-waiting,
body[data-theme="light"] .td-material,
body[data-theme="light"] .td-queued,
body[data-theme="light"] .td-confirming,
body[data-theme="light"] .td-submitting { color: #a16207 !important; }
body[data-theme="light"] .td-running { color: #087F82 !important; }

/* ---------- I. 制作任务视图切换按钮（任务列表/按账号看/按产品看） ---------- */
body[data-theme="light"] .di-viewbar > button[aria-pressed="true"] {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #087F82 !important;
}
body[data-theme="light"] .di-viewbar > button[aria-pressed="false"] {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
body[data-theme="light"] .pb-timing-choices .studio-action-btn[aria-pressed="true"],
body[data-theme="light"] .pb-timing-choices .studio-action-btn[aria-pressed="false"] {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
body[data-theme="light"] .pb-timing-choices .studio-action-btn[aria-pressed="true"] {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #087F82 !important;
}

/* ---------- J. 提交方式/开跑时间标签颜色统一 ---------- */
body[data-theme="light"] .pb-timing label,
body[data-theme="light"] .pb-timing label span,
body[data-theme="light"] .pb-time-field,
body[data-theme="light"] .pb-time-field span {
  color: #5b6478 !important;
}
body[data-theme="light"] .pb-time-trigger i { color: #94a3b8 !important; }

/* ---------- K. 批量确认「查看完整提示词」pre 黑块 → 浅底深字 ---------- */
body[data-theme="light"] .pb-preview-card pre,
body[data-theme="light"] .pb-results pre,
body[data-theme="light"] .pb-preview-card details pre {
  background: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
}

/* ---------- L. 定时任务日历弹层浅色化 ---------- */
body[data-theme="light"] .pb-calendar {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 12px 44px rgba(0,0,0,0.18) !important;
}
body[data-theme="light"] .pb-calendar-week { color: #64748b !important; }
body[data-theme="light"] .pb-calendar-day { color: #0f172a !important; }
body[data-theme="light"] .pb-calendar-day:hover:not(:disabled) {
  background: #f1f5f9 !important;
  border-color: #8ED0CD !important;
}
body[data-theme="light"] .pb-calendar-day[aria-pressed="true"] {
  background: #EAF8F7 !important;
  color: #087F82 !important;
  border-color: #087F82 !important;
}
body[data-theme="light"] .pb-calendar-time { border-top-color: #e2e8f0 !important; }
body[data-theme="light"] .pb-calendar-time select {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body[data-theme="light"] .pb-calendar-error { color: #b45309 !important; }

/* ---------- M. 批量交付弹窗（db-image-mode / dbRecordList）选中态 ---------- */
body[data-theme="light"] #diBatchModal .db-image-mode button[aria-pressed="true"] {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #087F82 !important;
}
body[data-theme="light"] .pb-modebar [aria-selected="false"] {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

/* ---------- N. 批量生成折叠摘要文字（参考图：9张 / 模型摘要 / 调整生成设置） ---------- */
body[data-theme="light"] #pbBatchPanel summary,
body[data-theme="light"] #pbBatchPanel .wd-reference > summary,
body[data-theme="light"] #pbBatchPanel .pb-generation-settings > summary {
  color: #334155 !important;
}
body[data-theme="light"] #pbBatchPanel .pb-generation-settings > summary span {
  color: #087F82 !important;
}
body[data-theme="light"] .pb-generation-settings,
body[data-theme="light"] .pb-generation-settings .pb-settings label {
  color: #475569 !important;
}
/* 折叠摘要里残留的浅灰内联文字兜底 */
body[data-theme="light"] summary[style*="color:#b8c0cd"],
body[data-theme="light"] summary[style*="color:#a0a3bd"],
body[data-theme="light"] summary[style*="color:#929aa8"] {
  color: #334155 !important;
}
/* 工坊扩展设置摘要同步适配 */
body[data-theme="light"] .studio-extra-settings summary,
body[data-theme="light"] .studio-quick-instructions summary {
  color: #475569 !important;
}

/* ---------- O. 主动作红浅色化：品牌红识别保留，实心红底白字换深红保证对比 ---------- */
/* #FE2C55 白字对比约3.68:1（小字不达标），#D91B40 约5.02:1；深色模式不变 */
body[data-theme="light"] .btn-submit {
  background: #D91B40 !important;
}
body[data-theme="light"] .studio-action-btn.primary-red {
  background: #D91B40 !important;
  border-color: #D91B40 !important;
}
body[data-theme="light"] [style*="background:#fe2c55"],
body[data-theme="light"] [style*="background:#e9264c"] {
  background: #D91B40 !important;
}
body[data-theme="light"] input[type="checkbox"],
body[data-theme="light"] input[type="radio"] {
  accent-color: #D91B40;
}

/* ---------- P. 脚本工坊样板视觉层级精修（Codex 评审重点落地） ---------- */
/* 1. 左侧容器减重：去掉卡片套叠、独立阴影与厚重内框，直接融入侧栏 */
body[data-theme="light"] .studio-sidebar {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}
body[data-theme="light"] .studio-source-card {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
body[data-theme="light"] .studio-section-title {
  color: #087F82 !important;
  font-weight: 600 !important;
}
body[data-theme="light"] #ssRefMainDropzone {
  background: #ffffff !important;
  border: 1px dashed #cbd5e1 !important;
}

/* 2. 画布正文纯白底（视觉中心、纸张感，区别于左侧浅灰设置区） */
body[data-theme="light"] #ssScriptText {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

/* 3. 画布顶部工具条与快捷按钮降噪 */
body[data-theme="light"] .studio-toggle-chip {
  background: transparent !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 500 !important;
}
body[data-theme="light"] .studio-toggle-chip:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
body[data-theme="light"] .studio-toggle-chip:has(input:checked) {
  background: #EAF8F7 !important;
  border-color: #087F82 !important;
  color: #055E61 !important;
}
body[data-theme="light"] #btnToggleDiffView,
body[data-theme="light"] #btnSsUndo {
  background: transparent !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 500 !important;
}
body[data-theme="light"] #btnToggleDiffView:hover,
body[data-theme="light"] #btnSsUndo:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* 4. 普通标签与图标中性化（除主动作外不乱用粉红/橙色分散注意力） */
body[data-theme="light"] .studio-field-label {
  font-weight: 500 !important;
  color: #475569 !important;
}
body[data-theme="light"] .studio-toggle-chip i.fa-volume-xmark,
body[data-theme="light"] .studio-toggle-chip i.fa-clock-rotate-left {
  color: #64748b !important;
}
body[data-theme="light"] .studio-toggle-chip i.fa-closed-captioning {
  color: #087F82 !important;
}

/* 5. 常量区次要化：浅灰底表达只读/保护，衬托下方正文白底 */
body[data-theme="light"] #ssConstHeadCard {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
body[data-theme="light"] #ssConstHeadContent {
  background: transparent !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}


/* 2026-11-04 员工反馈：领取任务后的任务栏、常量区解锁按钮、补充产品归属输入框在浅色下仍是深色 */
body[data-theme="light"] #deliveryContextBar { background:#f0fdfa !important; border-color:#99f6e4 !important; }
body[data-theme="light"] #deliveryContextTitle { color:#0f766e !important; }
body[data-theme="light"] #deliveryContextBar details { color:#475569 !important; }
body[data-theme="light"] #deliveryContextBar details summary { color:#0f766e; }
body[data-theme="light"] #ssFinalLockSubText, body[data-theme="light"] #ssFinalLockSubText span { color:#64748b !important; }
body[data-theme="light"] #btnFinalLockToggle:not(.primary-cyan) { background:#fff !important; color:#334155 !important; border-color:#cbd5e1 !important; }
body[data-theme="light"] #btnFinalLockToggle:not(.primary-cyan):hover { background:#f1f5f9 !important; }
body[data-theme="light"] #xpCommonName, body[data-theme="light"] #xpSingleName, body[data-theme="light"] #xpEditName { background:#fff; color:#111827; border-color:#cbd5e1; }

/* 2026-11-04 批量交付左侧条目列表：浅色下原为浅灰字看不清 */
body[data-theme="light"] #dbRecordList { background:#f8fafc !important; border-color:#e2e8f0 !important; }
body[data-theme="light"] #dbRecordList .db-record { background:#fff !important; border-color:#e2e8f0 !important; color:#1f2937 !important; }
body[data-theme="light"] #dbRecordList .db-record strong { color:#111827 !important; }
body[data-theme="light"] #dbRecordList .db-record p { color:#64748b !important; }
body[data-theme="light"] #dbRecordList .db-number { color:#64748b !important; }
body[data-theme="light"] #dbRecordList .db-record[aria-current="true"] { background:#ecfeff !important; border-color:#0f9b9e !important; }
body[data-theme="light"] #dbRecordList .db-account { color:#0f766e; opacity:1; background:#f0fdfa; }
body[data-theme="light"] #dbRecordList .db-ready { color:#047857 !important; }
body[data-theme="light"] #dbRecordList .db-incomplete { color:#b45309 !important; }
