/* platform-bridge.css — remaps the dark Tailwind utility classes used across
   the signed-in pages onto the light APWA platform palette (platform.css).
   Load AFTER platform.css. This is the bulk lever of the UI unification:
   pages keep their markup; the dark idiom is translated wholesale.

   Only utilities actually used in this codebase are mapped — grep before
   adding more. Text-on-color pairs: dark buttons keep light text (mapped to
   ink); yellow primaries get ink text explicitly. */

/* ---------- Page grounds ---------- */
.bg-gray-950, .bg-black, .bg-gray-950\/50 { background-color: #f7f6f1 !important; }
body.text-gray-100, body.text-gray-200 { background-color: #f7f6f1; }

/* ---------- Surfaces: cards get white + a real border ---------- */
.bg-gray-900 { background-color: #ffffff !important; border-color: #dddad0; }
.bg-gray-900\/50, .bg-gray-900\/80, .bg-gray-900\/90 { background-color: #ffffff !important; }
.bg-gray-800 { background-color: #fcfbf8 !important; }
.bg-gray-800\/50, .bg-gray-800\/60, .bg-gray-800\/80 { background-color: #fcfbf8 !important; }
.bg-gray-700 { background-color: #efeee8 !important; }
.hover\:bg-gray-800:hover { background-color: #efeee8 !important; }
.hover\:bg-gray-700:hover { background-color: #e6e4da !important; }
.hover\:bg-gray-900:hover, .hover\:bg-gray-900\/50:hover { background-color: #fcfbf8 !important; }

/* ---------- Text ---------- */
.text-white, .text-gray-100, .text-gray-200 { color: #1b2320 !important; }
body.text-gray-100, body.text-gray-200 { color: #1b2320; }
.text-gray-300, .text-gray-400 { color: #4a5450 !important; }
.text-gray-500 { color: #6b746f !important; }
.hover\:text-white:hover, .hover\:text-gray-100:hover, .hover\:text-gray-200:hover,
.hover\:text-gray-300:hover { color: #1b2320 !important; }
.placeholder-gray-500::placeholder, .placeholder-gray-400::placeholder { color: #9aa39e !important; }

/* ---------- Borders / dividers ---------- */
.border-gray-700, .border-gray-800, .border-gray-600,
.border-gray-700\/50, .border-gray-800\/50, .border-gray-800\/30 { border-color: #dddad0 !important; }
.divide-gray-700 > * + *, .divide-gray-800 > * + * { border-color: #dddad0 !important; }
.ring-gray-700 { --tw-ring-color: #dddad0 !important; }

/* ---------- Accent text ---------- */
.text-blue-400, .text-blue-300, .text-sky-400 { color: #1d6fd1 !important; }
.text-emerald-400, .text-green-400, .text-emerald-300 { color: #1f8a5d !important; }
.text-amber-400, .text-yellow-400, .text-amber-300, .text-yellow-300 { color: #b98705 !important; }
.text-red-400, .text-red-300 { color: #cf4433 !important; }
.text-purple-400, .text-violet-400 { color: #6d4aa8 !important; }
.text-brand-400, .text-brand-300 { color: #b98705 !important; }

/* ---------- Tinted chips / notices (dark …-900/20 idiom → light chips) ---------- */
.bg-emerald-900\/20, .bg-green-900\/20, .bg-emerald-900\/30 { background-color: #e7f3ec !important; }
.bg-red-900\/20, .bg-red-900\/30 { background-color: #f9e9e6 !important; }
.bg-amber-900\/20, .bg-yellow-900\/20, .bg-amber-900\/30 { background-color: #fbf3da !important; }
.bg-blue-900\/20, .bg-blue-900\/30, .bg-sky-900\/20 { background-color: #e8f0fb !important; }
.border-emerald-800\/30, .border-emerald-700 { border-color: #1f8a5d55 !important; }
.border-red-800\/30, .border-red-700 { border-color: #cf443355 !important; }
.border-amber-800\/30, .border-amber-700 { border-color: #edb11166 !important; }
.border-blue-800\/30, .border-blue-700 { border-color: #1d6fd155 !important; }

/* ---------- Buttons ---------- */
/* Dark-blue / indigo primaries → ink buttons (light text stays readable) */
.bg-brand-700, .bg-brand-600, .bg-blue-600, .bg-blue-700, .bg-indigo-600, .bg-indigo-700 { background-color: #1b2320 !important; }
.hover\:bg-brand-600:hover, .hover\:bg-blue-500:hover, .hover\:bg-blue-600:hover,
.hover\:bg-indigo-500:hover, .hover\:bg-indigo-600:hover { background-color: #37423d !important; }
.bg-emerald-600, .bg-green-600 { background-color: #1f8a5d !important; }
.hover\:bg-emerald-500:hover, .hover\:bg-green-500:hover { background-color: #1a7550 !important; }
.bg-red-600 { background-color: #cf4433 !important; }
.hover\:bg-red-500:hover { background-color: #b53a2b !important; }
.bg-amber-600, .bg-yellow-600 { background-color: #edb111 !important; color: #1b2320 !important; }

/* ---------- Form fields ---------- */
input.bg-gray-800, select.bg-gray-800, textarea.bg-gray-800,
input.bg-gray-900, select.bg-gray-900, textarea.bg-gray-900 {
  background-color: #fcfbf8 !important; color: #1b2320 !important; border-color: #dddad0 !important;
}

/* ---------- Shadows tuned for light ground ---------- */
.shadow-lg, .shadow-xl, .shadow-2xl { --tw-shadow-color: rgb(27 35 32 / 0.10); }

/* ---------- FIX: dark/colored buttons must keep LIGHT text ----------
   .text-white above remaps to ink, which turned every ink/colored button
   into black-on-black (49 instances across the signed-in pages). These come
   AFTER that rule, so equal-!important specificity resolves to light text on
   the element itself AND on any text-* child inside the button. */
:is(.bg-brand-700,.bg-brand-600,.bg-brand-500,.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-indigo-700,
    .bg-emerald-600,.bg-emerald-700,.bg-green-600,.bg-green-700,.bg-red-600,
    .bg-orange-600,.bg-orange-700,.bg-amber-700,.bg-violet-600,.bg-violet-700,
    .bg-gray-600,.bg-gray-500) { color: #ffffff !important; }
:is(.bg-brand-700,.bg-brand-600,.bg-brand-500,.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-indigo-700,
    .bg-emerald-600,.bg-emerald-700,.bg-green-600,.bg-green-700,.bg-red-600,
    .bg-orange-600,.bg-orange-700,.bg-amber-700,.bg-violet-600,.bg-violet-700,
    .bg-gray-600,.bg-gray-500)
  :is(.text-white,.text-gray-100,.text-gray-200,.text-gray-300) { color: #ffffff !important; }
/* Yellow primaries stay ink-on-yellow (readable) */
.bg-amber-600, .bg-yellow-600, .bg-amber-400 { color: #1b2320 !important; }

/* ---------- Remaining solid accents ---------- */
.bg-emerald-700, .bg-green-700 { background-color: #1a7550 !important; }
.bg-emerald-400 { background-color: #1f8a5d !important; }
.bg-orange-600, .bg-orange-700, .bg-amber-700 { background-color: #e0762b !important; }
.bg-amber-400 { background-color: #edb111 !important; }
.bg-violet-600, .bg-violet-700 { background-color: #6d4aa8 !important; }
.bg-brand-500 { background-color: #37423d !important; }
.bg-gray-600 { background-color: #6b746f !important; }
.bg-gray-500 { background-color: #8a938e !important; }

/* ---------- Modal scrims: stay dark over the light page ---------- */
.bg-black\/60, .bg-black\/70 { background-color: rgb(27 35 32 / 0.55) !important; }
/* gray-950/70 is used as CONSOLE/TERMINAL panes (NTRIP tester) — keep them a
   solid dark panel with light text, a deliberate terminal look on the light
   theme. gray-950/90 is a translucent sticky header → light paper blur. */
.bg-gray-950\/70 { background-color: #161c19 !important; }
.bg-gray-950\/70 :is(pre, .text-gray-300, .text-gray-400, .text-gray-200) { color: #cdd4cf !important; }
.bg-gray-950\/70 :is(.text-white) { color: #ffffff !important; }
.bg-gray-950\/70 :is(.text-gray-500) { color: #8a938e !important; }
.bg-gray-950\/90 { background-color: rgb(247 246 241 / 0.92) !important; }

/* ---------- Dark tint chips at other opacities → light chips ---------- */
.bg-emerald-900\/40, .bg-emerald-900\/60, .bg-emerald-900\/80, .bg-emerald-900\/90,
.bg-green-900\/40, .bg-emerald-700\/30 { background-color: #e7f3ec !important; }
.bg-red-900\/25, .bg-red-900\/40, .bg-red-900\/50, .bg-red-900\/80, .bg-red-900\/90 { background-color: #f9e9e6 !important; }
.bg-amber-900\/40, .bg-amber-900\/60, .bg-amber-950\/20, .bg-amber-950\/30 { background-color: #fbf3da !important; }
.bg-blue-900\/40, .bg-blue-900\/80, .bg-brand-900\/30, .bg-brand-900\/40, .bg-brand-950\/50, .bg-brand-700\/30 { background-color: #e8f0fb !important; }
.bg-purple-900\/30, .bg-purple-900\/40, .bg-indigo-900\/40 { background-color: #efe9f8 !important; }
.bg-orange-900\/40 { background-color: #fdf0e4 !important; }
/* Text inside those chips was pale-on-dark; give it the dark accent tone */
.text-emerald-200 { color: #1f8a5d !important; }
.text-red-200 { color: #cf4433 !important; }
.text-amber-200, .text-amber-500, .text-brand-500, .text-brand-600 { color: #b98705 !important; }
.text-blue-200 { color: #1d6fd1 !important; }
.text-purple-300, .text-indigo-300, .text-indigo-400, .text-violet-300 { color: #6d4aa8 !important; }
.text-orange-300, .text-orange-400 { color: #c25f18 !important; }

/* ---------- Translucent gray surfaces at unmapped opacities ---------- */
.bg-gray-900\/30, .bg-gray-900\/40, .bg-gray-900\/60 { background-color: #ffffff !important; }
.bg-gray-800\/30, .bg-gray-800\/40, .bg-gray-800\/70, .bg-gray-800\/90 { background-color: #fcfbf8 !important; }
.bg-gray-700\/50 { background-color: #efeee8 !important; }
