/* =========================================================
   TMS v10.3 主题 / 调度细节修复
   1) 修复深海蓝、靛青紫主题下主题菜单文字被顶栏白字规则覆盖的问题。
   2) 左侧品牌区与当前主题统一，不再出现品牌头与侧栏色彩断层。
   3) 调度任务状态筛选保持白底业务控件，仅焦点/选中态使用主题强调色。
   ========================================================= */

/* ---------- 主题切换器：弹层永远白底深字 ---------- */
html[data-tms-theme] .theme-panel,
html[data-tms-theme] #themePanel{
  background:#FFFFFF !important;
  color:#333333 !important;
  border-color:#E5E7EB !important;
}

/* 顶栏在深色主题下会把所有 span 强制成白字；这里对弹层做更高优先级反覆盖。 */
html[data-tms-theme="navy"] .app-global-topbar .theme-panel button span,
html[data-tms-theme="indigo"] .app-global-topbar .theme-panel button span,
html[data-tms-theme="navy"] .app-global-topbar #themePanel button span,
html[data-tms-theme="indigo"] .app-global-topbar #themePanel button span,
html[data-tms-theme] .theme-panel button span,
html[data-tms-theme] #themePanel button span{
  color:#333333 !important;
  -webkit-text-fill-color:#333333 !important;
  opacity:1 !important;
  visibility:visible !important;
}

html[data-tms-theme] .theme-panel button:hover span,
html[data-tms-theme] #themePanel button:hover span{
  color:#222222 !important;
  -webkit-text-fill-color:#222222 !important;
}

html[data-tms-theme] .theme-panel button.active span,
html[data-tms-theme] #themePanel button.active span{
  color:var(--accent-color) !important;
  -webkit-text-fill-color:var(--accent-color) !important;
  font-weight:700 !important;
}

html[data-tms-theme] .theme-panel button em,
html[data-tms-theme] #themePanel button em{
  color:var(--accent-color) !important;
  -webkit-text-fill-color:var(--accent-color) !important;
}

/* 收起后的当前主题名称：浅色顶栏深字，深色顶栏白字。 */
html[data-tms-theme="light"] .theme-btn #themeName{
  color:#333333 !important;
  -webkit-text-fill-color:#333333 !important;
}
html[data-tms-theme="navy"] .theme-btn #themeName,
html[data-tms-theme="indigo"] .theme-btn #themeName{
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF !important;
}

/* ---------- 左侧品牌区：跟随当前主题 ---------- */
html[data-tms-theme] .app > aside > h3{
  background:var(--bg-sidebar) !important;
  border-bottom:1px solid color-mix(in srgb,var(--border-color) 66%,transparent) !important;
  box-shadow:none !important;
}
html[data-tms-theme="navy"] .app > aside > h3,
html[data-tms-theme="indigo"] .app > aside > h3{
  color:#FFFFFF !important;
  border-bottom-color:rgba(255,255,255,.14) !important;
}
html[data-tms-theme="navy"] .app > aside > h3 .brand-cn,
html[data-tms-theme="indigo"] .app > aside > h3 .brand-cn{
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF !important;
}
html[data-tms-theme="navy"] .app > aside > h3 .brand-en,
html[data-tms-theme="indigo"] .app > aside > h3 .brand-en{
  color:rgba(255,255,255,.72) !important;
  -webkit-text-fill-color:rgba(255,255,255,.72) !important;
}
html[data-tms-theme="light"] .app > aside > h3{
  background:#FFFFFF !important;
  color:#243247 !important;
  border-bottom-color:#E5E7EB !important;
}
html[data-tms-theme="light"] .app > aside > h3 .brand-cn{
  color:#243247 !important;
  -webkit-text-fill-color:#243247 !important;
}
html[data-tms-theme="light"] .app > aside > h3 .brand-en{
  color:#718096 !important;
  -webkit-text-fill-color:#718096 !important;
}
html[data-tms-theme] .app > aside > h3 .brand-logo{
  background:var(--accent-color) !important;
  color:#FFFFFF !important;
  box-shadow:0 4px 12px color-mix(in srgb,var(--accent-color) 24%,transparent) !important;
}

/* ---------- 调度中心：任务状态筛选 ---------- */
html[data-tms-theme] .v103-task-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
html[data-tms-theme] .v103-status-filter{
  height:32px !important;
  min-width:112px;
  padding:0 30px 0 10px !important;
  border:1px solid #DDE3EA !important;
  border-radius:7px !important;
  background:#FFFFFF !important;
  color:#333333 !important;
  font-size:12px !important;
  line-height:30px !important;
  box-shadow:none !important;
}
html[data-tms-theme] .v103-status-filter:hover{
  border-color:color-mix(in srgb,var(--accent-color) 42%,#DDE3EA) !important;
}
html[data-tms-theme] .v103-status-filter:focus{
  outline:none !important;
  border-color:var(--accent-color) !important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-color) 12%,transparent) !important;
}
html[data-tms-theme] .v103-task-head-actions #v2TaskCount{
  min-width:42px;
  text-align:right;
  white-space:nowrap;
  color:#666666 !important;
}

/* 云后台已有的状态 Tab 同步使用主题强调色，避免两入口视觉不一致。 */
html[data-tms-theme] .v992-status-tab.active{
  color:var(--accent-color) !important;
  border-color:color-mix(in srgb,var(--accent-color) 35%,#E5E7EB) !important;
  background:color-mix(in srgb,var(--accent-color) 8%,#FFFFFF) !important;
}
html[data-tms-theme] .v992-status-tab.active b{
  color:var(--accent-color) !important;
}

@media (max-width:1100px){
  html[data-tms-theme] .v103-task-head-actions{gap:6px}
  html[data-tms-theme] .v103-status-filter{min-width:104px}
}
