/* == BEGIN a11y-contrast: high-contrast text override (idempotent) == */
:root, [data-theme="light"] {
  --text-1: #0f172a;        /* base text - slate900 family */
  --text-2: #1f2937;        /* secondary */
  --text-3: #374151;        /* muted */
  --text-disabled: #6b7280; /* disabled/placeholder */
  --placeholder-color: var(--text-disabled);
}
[data-theme="dark"] {
  /* Applied only when the dark theme marker exists; otherwise ignored. */
  --text-1: #e5e7eb;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-disabled: #64748b;
  --placeholder-color: var(--text-disabled);
}

/* Improve base body contrast while respecting existing variables. */
body {
  color: var(--foreground, var(--text-1, #0f172a));
}

/* Improve secondary and muted text contrast by removing accidental dimming. */
.celbic-panel small,
.celbic-panel label,
.celbic-panel .muted,
.celbic-panel .subtle,
.celbic-panel .helper,
.celbic-panel .description,
.celbic-panel .text-secondary,
.celbic-panel .text-muted {
  color: #000000 !important;
  opacity: 1 !important;
}

/* Enforce strong text color for CELBIC tables */
.celbic-panel table thead th,
.celbic-panel table tbody td,
.celbic-table thead th,
.celbic-table tbody td {
  color: #000000 !important;
  opacity: 1 !important;
}

/* Prevent placeholders and disabled controls from becoming too faint. */
::placeholder {
  color: var(--placeholder-color, var(--text-disabled, #6b7280))!important;
  opacity: 1 !important;
}
.celbic-panel ::placeholder {
  color: #000000 !important;
  opacity: 1 !important;
}
[disabled], :disabled, .disabled {
  color: var(--text-disabled, #6b7280) !important;
  opacity: .9 !important; /* Keep disabled controls slightly subdued. */
}
/* CELBIC panel: never dim text via disabled styles */
.celbic-panel [disabled],
.celbic-panel :disabled,
.celbic-panel .disabled {
  color: #000000 !important;
  opacity: 1 !important;
}

/* Safe with Tailwind: use the base layer only to minimize duplicate impact. */
@layer base {
  ::placeholder { opacity: 1 !important; }
}
/* == END a11y-contrast == */

