/* =========================================================
   TMS v9.1.1 紧急稳定修复
   目标：
   1) 恢复全站按钮点击
   2) 主题面板仅用 CSS 提升层级，不注入全局事件拦截
   ========================================================= */

.app-global-topbar{
  position:sticky !important;
  top:0 !important;
  z-index:1000 !important;
  overflow:visible !important;
}
.app-global-right,
.theme-switcher{
  position:relative !important;
  overflow:visible !important;
}
.theme-switcher{z-index:1200 !important;}

html[data-tms-theme] #themePanel,
html[data-tms-theme] .theme-panel{
  z-index:2000 !important;
  max-height:300px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  max-width:calc(100vw - 24px) !important;
  background:var(--ui-panel,var(--tms-bg-panel)) !important;
  color:var(--ui-text,var(--tms-text-primary)) !important;
  border:1px solid var(--ui-line,var(--tms-border)) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.24) !important;
}

/* 不创建任何覆盖全屏的透明层 */
.tms-mobile-backdrop:not(.hidden){
  pointer-events:auto;
}
.tms-mobile-backdrop{
  pointer-events:none;
}
.app.tms-menu-open .tms-mobile-backdrop{
  pointer-events:auto;
}

/* 首页/工作台任何装饰层都不得截获点击 */
#c :is(
  [class*="spark"],[class*="chart"] svg,[class*="decor"],[class*="glow"]
){
  pointer-events:none;
}
#c button,
#c a,
#c input,
#c select,
#c textarea,
#c [role="button"]{
  pointer-events:auto;
  position:relative;
}
