/*
 * theme-fixes.css — WCAG contrast patches for the Metronic admin panel.
 *
 * Why: the brand palette was customised (primary=green #17C653, warning=bright
 * yellow #F6C000) but Metronic's derived `text-*`, `badge-light-*` and muted
 * greys were never re-tuned for it, so several colours fail WCAG AA in one or
 * both themes (measured ratios in comments below, target >= 4.5 normal text).
 *
 * Loaded AFTER style.bundle.css in layouts/backend.blade.php so these win.
 * Scoped per [data-bs-theme] because the same badge has a PALE bg in light mode
 * and a DARK bg in dark mode — the fixes go in opposite directions.
 *
 * ponytail: pure CSS override layer — no SCSS source ships in this repo, and
 * editing the compiled style.bundle.css is forbidden (regenerated on upgrade).
 */

/* ---- Muted / secondary grey text (cascades to text-muted, text-gray-500,
        form-label, breadcrumb, card subtitles, footer) ---- */
[data-bs-theme="light"] {
	--bs-text-muted: #5e6678; /* was #99A1B7 -> 2.49 on white */
	--bs-gray-500:   #5e6678;
}
[data-bs-theme="dark"] {
	--bs-text-muted: #9aa3b5; /* was #636674 -> 3.14 on dark */
	--bs-gray-500:   #9aa3b5;
}

/* ---- Coloured TEXT utilities (used for profit/loss figures, links) ----
        Only the light theme fails: brand colours are too light on white. */
[data-bs-theme="light"] .text-primary { color: #0a7a33 !important; } /* green text: 2.27 -> ~5 */
[data-bs-theme="light"] .text-danger  { color: #c4173f !important; } /* red text:  3.86 -> ~4.7 */

/* ---- badge-light-* : text colour only, keep the tinted-pill look ----
        LIGHT theme — dark text on the pale tint bg. */
[data-bs-theme="light"] .badge-light-warning { color: #8a6d00; } /* 1.58 -> ~5  (amber)  */
[data-bs-theme="light"] .badge-light-primary { color: #0a7a33; } /* 2.12 -> ~5  (green)  */
[data-bs-theme="light"] .badge-light-success { color: #0a5bc4; } /* 3.23 -> ~4.7 (blue)  */
[data-bs-theme="light"] .badge-light-info    { color: #5b21c7; } /* purple              */
[data-bs-theme="light"] .badge-light-danger  { color: #c4173f; }

/* DARK theme — only the cool hues (blue/purple) are too dim on the dark tint;
   warning/primary/danger stay bright enough, leave them on brand. */
[data-bs-theme="dark"] .badge-light-success { color: #6ba8ff; } /* 3.18 -> ~6 */
[data-bs-theme="dark"] .badge-light-info    { color: #b49aff; } /* 3.10 -> ~6 */

/* Loss figures (text-danger) on the dark page bg measured 4.04 — brighten the
   red so financial negatives read clearly. */
[data-bs-theme="dark"] .text-danger { color: #ff5a72 !important; }

/* ---- Coloured TEXT utilities on pale tints ("soft" buttons / labels that
        pair .text-warning etc. with .bg-light-*). Same failure as the badges,
        different class combo — e.g. a `bg-light-warning text-warning` button
        measured 1.58 in light. Light theme only (dark tints keep brand hue). */
[data-bs-theme="light"] .text-warning { color: #8a6d00 !important; }
[data-bs-theme="light"] .text-success { color: #0a5bc4 !important; } /* success = blue in this palette */
[data-bs-theme="light"] .text-info    { color: #5b21c7 !important; }

/* ---- Solid brand surfaces (light mode): the brand green #17C653 is too light
        for white text — solid .btn-primary measured 2.27, the active sidebar
        item 2.41. Darken --bs-primary (light only) to the field-app green
        family, which is AA-safe and already part of the brand. Cascades to
        primary buttons, links, active nav, checkboxes, progress, etc. */
[data-bs-theme="light"] {
	--bs-primary:        #0f7a3f;
	--bs-primary-active: #0c6a36;
}
