fix(ui): comprehensive dark-theme hardcoded color pass

Phase 1 — globals.css: add ~45 new dark-mode override rules covering 250+
component instances at once:
- bg-*-50 (red/green/blue/yellow/amber/purple/indigo/orange/brand/emerald)
- border-*-200 (colored alert/badge borders)
- hover:bg-*-50/100 (colored hover states)
- text-amber-700/orange-600/green-600/emerald-700/brand-700 (missing overrides)
- divide-gray-50 (ChargeabilityWidget sticky section dividers)

Phase 2 — targeted component fixes:
- Button.tsx: add dark variants to secondary (bg-gray-800) and ghost variants
- DynamicFieldEditor.tsx: add dark variants to INPUT_NORMAL and INPUT_ERROR constants
- WidgetContainer.tsx: replace slate-900 (blue-tinted) gradient with neutral
  surface-card values (rgb 22,23,26 / 16,17,19)
- status-styles.ts: add explicit dark variants to PROJECT_STATUS_BADGE and
  ORDER_TYPE_BADGE (consistent with other badge maps in same file)

Phase 3 — dashboard widget tables:
- TopValueWidget: dark thead, tbody divider, row hover
- DemandWidget: dark thead, tbody divider, row hover
- ChargeabilityWidget: dark sticky h3 headers (bg-white→surface-card),
  border-gray-100 thead rows, divide-gray-50 tbodys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 22:37:43 +02:00
parent 13262b5cec
commit d1a21a79b2
8 changed files with 65 additions and 26 deletions
@@ -413,7 +413,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
handleSectionScroll(event, topVisibleCount, top.length, setTopVisibleCount)
}
>
<h3 className="text-xs font-semibold text-gray-500 uppercase tracking-wider px-1 mb-1 sticky top-0 bg-white flex items-center">
<h3 className="text-xs font-semibold text-gray-500 uppercase tracking-wider px-1 mb-1 sticky top-0 bg-white dark:bg-[rgb(var(--surface-card))] flex items-center">
Top Chargeability
<InfoTooltip content="Resources ranked by highest actual chargeability this month. Chargeability = chargeable booked hours divided by holiday- and absence-adjusted available hours." />
<span className="ml-1 font-normal normal-case text-gray-400">
@@ -425,7 +425,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
) : (
<table className="w-full text-xs">
<thead>
<tr className="text-gray-400 border-b border-gray-100">
<tr className="text-gray-400 border-b border-gray-100 dark:border-gray-800">
<th className="px-2 py-1 text-left font-medium w-6">#</th>
<th className="px-2 py-1 text-left font-medium">
<button
@@ -471,7 +471,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-50">
<tbody className="divide-y divide-gray-50 dark:divide-gray-800">
{visibleTop.map((r, i) => (
<tr key={r.id} className="hover:bg-gray-50 dark:hover:bg-gray-800/40">
<td className="px-2 py-1 text-gray-400">{i + 1}</td>
@@ -519,7 +519,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
handleSectionScroll(event, watchVisibleCount, watchlist.length, setWatchVisibleCount)
}
>
<h3 className="text-xs font-semibold text-gray-500 uppercase tracking-wider px-1 mb-1 sticky top-0 bg-white flex items-center">
<h3 className="text-xs font-semibold text-gray-500 uppercase tracking-wider px-1 mb-1 sticky top-0 bg-white dark:bg-[rgb(var(--surface-card))] flex items-center">
Watchlist <span className="font-normal text-gray-400">(below target)</span>
<InfoTooltip content="Resources whose actual chargeability is more than 15 percentage points below their individual target. These may need more project assignments." />
<span className="ml-1 font-normal normal-case text-gray-400">
@@ -531,7 +531,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
) : (
<table className="w-full text-xs">
<thead>
<tr className="text-gray-400 border-b border-gray-100">
<tr className="text-gray-400 border-b border-gray-100 dark:border-gray-800">
<th className="px-2 py-1 text-left font-medium">
<button
type="button"
@@ -570,7 +570,7 @@ export function ChargeabilityWidget({ config: _config, onConfigChange }: WidgetP
</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-50">
<tbody className="divide-y divide-gray-50 dark:divide-gray-800">
{visibleWatchlist.map((r) => (
<tr key={r.id} className="hover:bg-gray-50 dark:hover:bg-gray-800/40">
<td className="px-2 py-1 text-gray-800 dark:text-gray-200 max-w-[240px] align-top">