:root, [data-bs-theme=light] {
  /* 统一主色：绿色（#0f6856） */
  --ct-primary: #0f6856;
  --ct-primary-rgb: 15, 104, 86;
  --ct-menu-condensed-link-bg: #0f6856;

  /* 链接与悬停 */
  --ct-link-color: #0f6856;
  --ct-link-hover-color: #0a4d3f;

  /* 成功色系统一映射到主题绿（CT 与 Bootstrap） */
  --ct-success: var(--ct-primary);
  --ct-success-rgb: var(--ct-primary-rgb);
  --bs-success: var(--ct-primary);
  --bs-success-rgb: var(--ct-primary-rgb);

  /* 强调/浅色背景/边框（配套 #0f6856 绿） */
  --ct-primary-text-emphasis: #0a4d3f;
  --ct-primary-bg-subtle: #e6f3f1;
  --ct-primary-border-subtle: #7db8a8;

  /* 焦点环 */
  --ct-focus-ring-color: rgba(15, 104, 86, 0.25);

  /* 同步 Bootstrap token，保证 btn-primary / text-primary 跟随变绿 */
  --bs-primary: var(--ct-primary);
  --bs-primary-rgb: var(--ct-primary-rgb);
  --bs-link-color: var(--ct-primary);
  --bs-link-hover-color: #0a4d3f;
}

/* 菜单与顶栏（浅色方案下的悬停高亮改为绿） */
html[data-menu-color=light] {
  --ct-menu-item-hover-color: #22c55e;
  --ct-menu-item-active-color: #22c55e;
  --ct-help-box-bg: #22c55e;
}
html[data-topbar-color=light] {
  --ct-topbar-item-hover-color: #22c55e;
}

/* 可选：brand 方案左侧菜单背景改为纯色绿，更简约 */
html[data-menu-color=brand] {
  /* 纯绿色导航背景（与主题色一致） */
  --ct-menu-bg: var(--ct-primary);
  /* 导航文字改为白色，提升对比度 */
  --ct-menu-item-color: rgba(255, 255, 255, 0.95);
  --ct-menu-item-hover-color: #ffffff;
  --ct-menu-item-active-color: #ffffff;
}

/* 顶栏 brand 渐变切到清爽绿系 */
html[data-topbar-color=brand] {
  /* 顶部导航纯绿色背景（与主题色一致） */
  --ct-topbar-bg: var(--ct-primary);
  --ct-topbar-item-color: rgba(255, 255, 255, 0.9);
  --ct-topbar-item-hover-color: #fff;
}

/* 强覆盖：按钮/文本/背景/加载器颜色统一为绿色 */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:disabled {
  background-color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
}

.btn-outline-primary {
  color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
  color: #fff !important;
}

.text-primary { color: rgba(var(--ct-primary-rgb), 1) !important; }
.bg-primary { background-color: rgba(var(--ct-primary-rgb), 1) !important; }

.spinner-border.text-primary { color: rgba(var(--ct-primary-rgb), 1) !important; }

/* 复选框选中态与聚焦态 */
.form-check-input:checked {
  background-color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
}
.form-check-input:focus {
  border-color: rgba(var(--ct-primary-rgb), 0.4) !important;
  -webkit-box-shadow: 0 0 0 .25rem rgba(var(--ct-primary-rgb), 0.25) !important;
          box-shadow: 0 0 0 .25rem rgba(var(--ct-primary-rgb), 0.25) !important;
}

/* 将成功类统一为主题绿（更易全局维护） */
.text-success { color: var(--ct-primary) !important; }
.bg-success { background-color: var(--ct-primary) !important; }
.border-success { border-color: var(--ct-primary) !important; }
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success:disabled { background-color: var(--ct-primary) !important; border-color: var(--ct-primary) !important; }
.btn-outline-success { color: var(--ct-primary) !important; border-color: var(--ct-primary) !important; }
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active { background-color: var(--ct-primary) !important; border-color: var(--ct-primary) !important; color: #fff !important; }
.badge.bg-success { background-color: var(--ct-primary) !important; }
.text-success-emphasis { color: var(--ct-primary) !important; }
.bg-success-subtle { background-color: rgba(var(--ct-primary-rgb), 0.12) !important; }

/* SweetAlert2 确认按钮统一用主题绿 */
.swal2-styled.swal2-confirm {
  background-color: var(--ct-primary) !important;
  border: 1px solid var(--ct-primary) !important;
}
.swal2-styled.swal2-confirm:hover,
.swal2-styled.swal2-confirm:focus { filter: brightness(0.95); }

/* 兜底：覆盖常见硬编码绿色（仅覆盖色值，不影响布局） */
[style*="#10b981"],
[style*="#059669"],
[style*="#28a745"],
[style*="#198754"],
[style*="#42d29d"] {
  color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
}
/* 若内联使用背景或渐变的绿色，统一改为纯色主题绿，保证一致性 */
[style*="linear-gradient"][style*="#10b981"],
[style*="linear-gradient"][style*="#059669"],
[style*="linear-gradient"][style*="#28a745"],
[style*="linear-gradient"][style*="#198754"],
[style*="linear-gradient"][style*="#42d29d"],
[style*="background:#10b981"],
[style*="background: #10b981"],
[style*="background:#059669"],
[style*="background: #059669"],
[style*="background:#28a745"],
[style*="background: #28a745"],
[style*="background:#198754"],
[style*="background: #198754"],
[style*="background:#42d29d"],
[style*="background: #42d29d"] {
  background: var(--ct-primary) !important;
  background-color: var(--ct-primary) !important;
  border-color: var(--ct-primary) !important;
}


