/* =========================================================
   TMS v9.2 视觉规范统一稳定版
   原则：只做 CSS / Design Token，不改业务 JS / action / 数据。
   ========================================================= */

:root{
  --tms-radius-sm:8px;
  --tms-radius-md:12px;
  --tms-radius-lg:16px;

  --tms-space-xs:4px;
  --tms-space-sm:8px;
  --tms-space-md:16px;
  --tms-space-lg:24px;

  --tms-brand:#1677ff;
  --tms-brand-strong:#0958d9;

  --tms-success:#22c55e;
  --tms-warning:#f59e0b;
  --tms-danger:#ef4444;
  --tms-info:#1677ff;
}

/* 品牌主色统一：四主题保持 #1677ff，仅 hover/active 使用 brand-strong */
html[data-tms-theme="light"],
html[data-tms-theme="navy"],
html[data-tms-theme="graphite"],
html[data-tms-theme="indigo"]{
  --tms-brand:#1677ff !important;
  --ui-primary:#1677ff !important;
}

/* 深海蓝 */
html[data-tms-theme="navy"]{
  --tms-bg-page:#07111f !important;
  --tms-bg-sidebar:#081625 !important;
  --tms-bg-top:#091827 !important;
  --tms-bg-panel:#0d1d2e !important;
  --tms-bg-panel-soft:#132a40 !important;
  --tms-text-primary:#eef5ff !important;
  --tms-text-secondary:#b8c7d9 !important;
  --tms-text-muted:#8799ad !important;
  --tms-border:#24415d !important;
  --tms-brand-strong:#0958d9 !important;
}

/* 石墨黑 */
html[data-tms-theme="graphite"]{
  --tms-bg-page:#0d1117 !important;
  --tms-bg-sidebar:#11161d !important;
  --tms-bg-top:#121820 !important;
  --tms-bg-panel:#171d26 !important;
  --tms-bg-panel-soft:#202833 !important;
  --tms-text-primary:#f2f5f8 !important;
  --tms-text-secondary:#c3ccd6 !important;
  --tms-text-muted:#929daa !important;
  --tms-border:#303a46 !important;
  --tms-brand-strong:#0958d9 !important;
}

/* 靛青紫 */
html[data-tms-theme="indigo"]{
  --tms-bg-page:#0f1022 !important;
  --tms-bg-sidebar:#14152a !important;
  --tms-bg-top:#16172d !important;
  --tms-bg-panel:#1b1d36 !important;
  --tms-bg-panel-soft:#25284a !important;
  --tms-text-primary:#f3f4ff !important;
  --tms-text-secondary:#c6c8e8 !important;
  --tms-text-muted:#989cc5 !important;
  --tms-border:#373b68 !important;
  --tms-brand-strong:#0958d9 !important;
}

/* 兼容旧 ui token */
html[data-tms-theme]{
  --ui-bg:var(--tms-bg-page) !important;
  --ui-panel:var(--tms-bg-panel) !important;
  --ui-panel-2:var(--tms-bg-panel-soft) !important;
  --ui-text:var(--tms-text-primary) !important;
  --ui-text-2:var(--tms-text-secondary) !important;
  --ui-muted:var(--tms-text-muted) !important;
  --ui-line:var(--tms-border) !important;
}


/* TMS v9.4 - 橙黄紫暖色主题 */
html[data-tms-theme="orange-purple"]{
  --tms-bg-page:#180e12;
  --tms-bg-sidebar:#211218;
  --tms-bg-top:#24141a;
  --tms-bg-panel:#2b171e;
  --tms-bg-panel-soft:#3b2029;
  --tms-text-primary:#fff5ed;
  --tms-text-secondary:#efd3c7;
  --tms-text-muted:#c39f94;
  --tms-border:#5b3840;
  --tms-brand:#ff8c42;
  --tms-brand-strong:#e96c1d;
  --tms-nav-accent:#ff8c42;
}

/* TMS v9.4 - 四主题品牌色 */
html[data-tms-theme="light"]{--tms-brand:#1677ff !important;--tms-brand-strong:#0958d9 !important;}
html[data-tms-theme="navy"]{--tms-brand:#3b8cff !important;--tms-brand-strong:#1677ff !important;}
html[data-tms-theme="indigo"]{--tms-brand:#7c84ef !important;--tms-brand-strong:#626bd8 !important;}
html[data-tms-theme="orange-purple"]{--tms-brand:#ff8c42 !important;--tms-brand-strong:#e96c1d !important;}
