/* ================================================================
   700中枢 · 浅色模式可读性补丁
   独立文件，永不禁用；只作用于 html 没有 .dark 的时候
   ================================================================ */

/* ---------- 1. 次级按钮（筛选设置 / 列设置 / 属性配置 等） ---------- */
html:not(.dark) .btn-secondary,
html:not(.dark) button.btn-secondary,
html:not(.dark) .btn.btn-secondary {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05) !important;
  font-weight: 600 !important;
}
html:not(.dark) .btn-secondary:hover,
html:not(.dark) button.btn-secondary:hover {
  background: #f9fafb !important;
  color: #111827 !important;
  border-color: #9ca3af !important;
}
html:not(.dark) .btn-secondary svg,
html:not(.dark) button.btn-secondary svg {
  color: #4b5563 !important;
  stroke: #4b5563 !important;
}

/* ---------- 2. 所有浅色底的小徽章 / 标签 ---------- */
html:not(.dark) [class*="bg-teal-50"],
html:not(.dark) [class*="bg-emerald-50"],
html:not(.dark) [class*="bg-green-50"],
html:not(.dark) [class*="bg-primary-50"],
html:not(.dark) [class*="bg-indigo-50"],
html:not(.dark) [class*="bg-purple-50"],
html:not(.dark) [class*="bg-blue-50"] {
  color: #0f766e !important;
  font-weight: 600 !important;
}
html:not(.dark) [class*="bg-red-50"],
html:not(.dark) [class*="bg-rose-50"] {
  color: #b91c1c !important;
  font-weight: 600 !important;
}
html:not(.dark) [class*="bg-amber-50"],
html:not(.dark) [class*="bg-yellow-50"] {
  color: #b45309 !important;
  font-weight: 600 !important;
}

/* ---------- 3. 表格操作列的小按钮（编辑/禁用/更多） ---------- */
html:not(.dark) table button:not([class*="bg-"]),
html:not(.dark) table a:not([class*="bg-"]) {
  color: #374151 !important;
}
html:not(.dark) table button:hover:not([class*="bg-"]),
html:not(.dark) table a:hover:not([class*="bg-"]) {
  color: #4f46e5 !important;
}

/* ---------- 4. 全部按钮兜底：文字至少 4.5:1 对比 ---------- */
html:not(.dark) button:not([class*="btn-primary"]):not([class*="bg-indigo"]):not([class*="bg-teal"]):not([class*="bg-emerald"]) {
  /* 只保证纯文字按钮可读，不改有品牌背景的按钮 */
}

/* ---------- 5. 输入框 placeholder 加深 ---------- */
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* ---------- 6. 表格表头文字加深 ---------- */
html:not(.dark) table thead th {
  color: #4b5563 !important;
  font-weight: 600 !important;
}

/* ---------- 7. 分页器 / 小号文字 ---------- */
html:not(.dark) .text-xs,
html:not(.dark) [class*="text-gray-400"] {
  color: #6b7280 !important;
}
html:not(.dark) [class*="text-gray-500"] {
  color: #4b5563 !important;
}

/* ---------- 8. 顶部工具条图标按钮 ---------- */
html:not(.dark) header button:not([class*="bg-"]),
html:not(.dark) .nav button:not([class*="bg-"]) {
  color: #374151 !important;
}
