/* ─────────────────────────────────────────────────────────────
   Global contrast fixes for ArtemisBot dashboards
   ───────────────────────────────────────────────────────────── */

/* Solid badges: Tabler doesn't always enforce white text on colored bg */
.badge.bg-secondary {
  background-color: #5c636a !important;
  color: #fff !important;
}
.badge.bg-success {
  background-color: #2fb344 !important;
  color: #fff !important;
}
.badge.bg-danger {
  background-color: #d63939 !important;
  color: #fff !important;
}
.badge.bg-warning {
  background-color: #f8ae0c !important;
  color: #1c1c1c !important;
}
.badge.bg-info {
  background-color: #4aa3df !important;
  color: #fff !important;
}

/* badge *-lt variants: Tabler's light badges use the same hue for text
   and background (e.g. green text on green bg), which fails contrast. */
.badge.bg-success-lt {
  background-color: rgba(47, 179, 68, .22) !important;
  color: #0b5e28 !important;
}
.badge.bg-danger-lt {
  background-color: rgba(214, 57, 57, .22) !important;
  color: #7b1010 !important;
}
.badge.bg-warning-lt {
  background-color: rgba(248, 174, 12, .22) !important;
  color: #5a4200 !important;
}
.badge.bg-info-lt {
  background-color: rgba(74, 163, 223, .22) !important;
  color: #0a4e7a !important;
}

/* text-muted inside colored light-bg cards: the muted gray disappears
   against the tinted surface. Use a neutral dark gray instead. */
.bg-success-lt .text-muted,
.bg-warning-lt .text-muted,
.bg-info-lt    .text-muted,
.bg-primary-lt .text-muted,
.bg-danger-lt  .text-muted {
  color: #374151 !important;
  opacity: 1 !important;
}

/* Field key labels and group headers sit on --tblr-bg-surface-secondary
   (a light gray) — muted text there is barely readable. */
.field-key,
.client-group-label,
.cfield-key,
.cfield-suffix,
.rank-tip {
  color: #4b5563 !important;
}

/* Readonly field text — slightly muted but still legible */
.cfield-ro {
  color: #374151 !important;
}

/* Dark-mode overrides (preserve readability when theme switches) */
html[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #495057 !important;
  color: #f8f9fa !important;
}
html[data-bs-theme="dark"] .badge.bg-success-lt { color: #6ee79f !important; }
html[data-bs-theme="dark"] .badge.bg-danger-lt  { color: #f4a3a3 !important; }
html[data-bs-theme="dark"] .badge.bg-warning-lt { color: #fcd97a !important; }
html[data-bs-theme="dark"] .badge.bg-info-lt    { color: #90cdf4 !important; }

html[data-bs-theme="dark"] .bg-success-lt .text-muted,
html[data-bs-theme="dark"] .bg-warning-lt .text-muted,
html[data-bs-theme="dark"] .bg-info-lt    .text-muted,
html[data-bs-theme="dark"] .bg-primary-lt .text-muted,
html[data-bs-theme="dark"] .bg-danger-lt  .text-muted {
  color: #d1d5db !important;
}

html[data-bs-theme="dark"] .field-key,
html[data-bs-theme="dark"] .client-group-label,
html[data-bs-theme="dark"] .cfield-key,
html[data-bs-theme="dark"] .cfield-suffix,
html[data-bs-theme="dark"] .rank-tip {
  color: #9ca3af !important;
}
