/* KTG CONSTRUCTION MANAGEMENT — DARK READABILITY FINAL
 * Final cascade layer for readable dark-mode typography across operational modules.
 * Loaded after all shared/module CSS. Presentation only.
 */

html.dark {
    --ktg-read-title: #f5f8fc;
    --ktg-read-body: #d9e4ef;
    --ktg-read-muted: #b8c7d8;
    --ktg-read-subtle: #a7b9cd;
    --ktg-read-blue: #9fc8f7;
    --ktg-read-green: #74e2b5;
    --ktg-read-amber: #ffd078;
    --ktg-read-red: #ff9aa5;
    --ktg-read-violet: #cdbbff;
    --ktg-read-orange: #ffb27c;
    --ktg-read-teal: #75dfcf;
}

/* Core neutral scale ------------------------------------------------------ */
html.dark body .triton-page .text-slate-950,
html.dark body .triton-page .text-slate-900,
html.dark body .triton-page .text-slate-800,
html.dark body dialog .text-slate-950,
html.dark body dialog .text-slate-900,
html.dark body dialog .text-slate-800 {
    color: var(--ktg-read-title) !important;
}

html.dark body .triton-page .text-slate-700,
html.dark body dialog .text-slate-700 {
    color: #dce6f0 !important;
}

html.dark body .triton-page .text-slate-600,
html.dark body dialog .text-slate-600 {
    color: #cbd7e3 !important;
}

html.dark body .triton-page .text-slate-500,
html.dark body dialog .text-slate-500 {
    color: var(--ktg-read-muted) !important;
}

html.dark body .triton-page .text-slate-400,
html.dark body dialog .text-slate-400 {
    color: var(--ktg-read-subtle) !important;
}

html.dark body .triton-page .text-slate-300,
html.dark body dialog .text-slate-300 {
    color: #d1dce8 !important;
}

html.dark body main .text-zinc-900,
html.dark body main .text-zinc-800,
html.dark body main .text-gray-900,
html.dark body main .text-gray-800,
html.dark body dialog .text-zinc-900,
html.dark body dialog .text-zinc-800,
html.dark body dialog .text-gray-900,
html.dark body dialog .text-gray-800 {
    color: var(--ktg-read-title) !important;
}

html.dark body main .text-zinc-700,
html.dark body main .text-gray-700,
html.dark body dialog .text-zinc-700,
html.dark body dialog .text-gray-700 {
    color: #dce6f0 !important;
}

html.dark body main .text-zinc-600,
html.dark body main .text-gray-600,
html.dark body dialog .text-zinc-600,
html.dark body dialog .text-gray-600 {
    color: #cbd7e3 !important;
}

html.dark body main .text-zinc-500,
html.dark body main .text-gray-500,
html.dark body dialog .text-zinc-500,
html.dark body dialog .text-gray-500 {
    color: var(--ktg-read-muted) !important;
}

html.dark body main .text-zinc-400,
html.dark body main .text-gray-400,
html.dark body dialog .text-zinc-400,
html.dark body dialog .text-gray-400 {
    color: var(--ktg-read-subtle) !important;
}

/* Corporate colors authored for light mode -------------------------------- */
html.dark body .triton-page [class~="text-[#16365F]"],
html.dark body .triton-page [class~="text-[#17365F]"],
html.dark body .triton-page [class~="text-[#1D3C6A]"],
html.dark body .triton-page [class~="text-[#17345D]"],
html.dark body .triton-page [class~="text-[#173A66]"],
html.dark body .triton-page [class~="text-[#244D82]"],
html.dark body dialog [class~="text-[#16365F]"],
html.dark body dialog [class~="text-[#17365F]"],
html.dark body dialog [class~="text-[#1D3C6A]"],
html.dark body dialog [class~="text-[#17345D]"],
html.dark body dialog [class~="text-[#173A66]"],
html.dark body dialog [class~="text-[#244D82]"] {
    color: #eef5fc !important;
}

html.dark body .triton-page [class~="text-[#315D91]"],
html.dark body dialog [class~="text-[#315D91]"] {
    color: var(--ktg-read-blue) !important;
}

html.dark body .triton-page [class~="text-[#0F766E]"],
html.dark body dialog [class~="text-[#0F766E]"] {
    color: var(--ktg-read-teal) !important;
}

html.dark body .triton-page [class~="text-[#C88415]"],
html.dark body dialog [class~="text-[#C88415]"],
html.dark body .triton-page [class~="text-[#EBA93B]"],
html.dark body dialog [class~="text-[#EBA93B]"],
html.dark body .triton-page [class~="text-[#F5C66B]"],
html.dark body dialog [class~="text-[#F5C66B]"] {
    color: #f5c66b !important;
}

html.dark body .triton-page [class~="text-[#BE1E2D]"],
html.dark body dialog [class~="text-[#BE1E2D]"] {
    color: var(--ktg-read-red) !important;
}

/* Semantic colors retain meaning but meet dark readability ---------------- */
html.dark body .triton-page .text-blue-500,
html.dark body .triton-page .text-blue-600,
html.dark body .triton-page .text-blue-700,
html.dark body .triton-page .text-blue-800,
html.dark body .triton-page .text-blue-900,
html.dark body dialog .text-blue-500,
html.dark body dialog .text-blue-600,
html.dark body dialog .text-blue-700,
html.dark body dialog .text-blue-800,
html.dark body dialog .text-blue-900 {
    color: var(--ktg-read-blue) !important;
}

html.dark body .triton-page .text-emerald-500,
html.dark body .triton-page .text-emerald-600,
html.dark body .triton-page .text-emerald-700,
html.dark body .triton-page .text-emerald-800,
html.dark body .triton-page .text-emerald-900,
html.dark body dialog .text-emerald-500,
html.dark body dialog .text-emerald-600,
html.dark body dialog .text-emerald-700,
html.dark body dialog .text-emerald-800,
html.dark body dialog .text-emerald-900 {
    color: var(--ktg-read-green) !important;
}

html.dark body .triton-page .text-amber-500,
html.dark body .triton-page .text-amber-600,
html.dark body .triton-page .text-amber-700,
html.dark body .triton-page .text-amber-800,
html.dark body .triton-page .text-amber-900,
html.dark body dialog .text-amber-500,
html.dark body dialog .text-amber-600,
html.dark body dialog .text-amber-700,
html.dark body dialog .text-amber-800,
html.dark body dialog .text-amber-900 {
    color: var(--ktg-read-amber) !important;
}

html.dark body .triton-page .text-red-500,
html.dark body .triton-page .text-red-600,
html.dark body .triton-page .text-red-700,
html.dark body .triton-page .text-red-800,
html.dark body .triton-page .text-red-900,
html.dark body dialog .text-red-500,
html.dark body dialog .text-red-600,
html.dark body dialog .text-red-700,
html.dark body dialog .text-red-800,
html.dark body dialog .text-red-900 {
    color: var(--ktg-read-red) !important;
}

html.dark body .triton-page .text-violet-500,
html.dark body .triton-page .text-violet-600,
html.dark body .triton-page .text-violet-700,
html.dark body .triton-page .text-violet-800,
html.dark body .triton-page .text-violet-900,
html.dark body dialog .text-violet-500,
html.dark body dialog .text-violet-600,
html.dark body dialog .text-violet-700,
html.dark body dialog .text-violet-800,
html.dark body dialog .text-violet-900 {
    color: var(--ktg-read-violet) !important;
}

html.dark body .triton-page .text-orange-500,
html.dark body .triton-page .text-orange-600,
html.dark body .triton-page .text-orange-700,
html.dark body .triton-page .text-orange-800,
html.dark body .triton-page .text-orange-900,
html.dark body dialog .text-orange-500,
html.dark body dialog .text-orange-600,
html.dark body dialog .text-orange-700,
html.dark body dialog .text-orange-800,
html.dark body dialog .text-orange-900 {
    color: var(--ktg-read-orange) !important;
}

html.dark body .triton-page .text-teal-500,
html.dark body .triton-page .text-teal-600,
html.dark body .triton-page .text-teal-700,
html.dark body .triton-page .text-teal-800,
html.dark body .triton-page .text-teal-900,
html.dark body dialog .text-teal-500,
html.dark body dialog .text-teal-600,
html.dark body dialog .text-teal-700,
html.dark body dialog .text-teal-800,
html.dark body dialog .text-teal-900 {
    color: var(--ktg-read-teal) !important;
}

/* Common support copy ------------------------------------------------------ */
html.dark body .triton-page .triton-label,
html.dark body dialog .triton-label,
html.dark body main [data-flux-label],
html.dark body dialog [data-flux-label] {
    color: #c7d4e2 !important;
}

html.dark body main [data-flux-description],
html.dark body dialog [data-flux-description] {
    color: var(--ktg-read-muted) !important;
}

html.dark body .triton-page input::placeholder,
html.dark body .triton-page textarea::placeholder,
html.dark body dialog input::placeholder,
html.dark body dialog textarea::placeholder {
    color: #a5b6c9 !important;
    opacity: 1 !important;
}

html.dark body .triton-page input:disabled,
html.dark body .triton-page textarea:disabled,
html.dark body .triton-page select:disabled {
    color: #95a8bd !important;
    opacity: 1 !important;
}

html.dark body .triton-page table thead th {
    color: #c5d2e0 !important;
}

html.dark body .triton-page > nav:first-child {
    color: #afc0d2 !important;
}

/* Low-opacity white support text ------------------------------------------ */
html.dark body .triton-page [class*="text-white/30"],
html.dark body .triton-page [class*="text-white/35"],
html.dark body .triton-page [class*="text-white/40"],
html.dark body .triton-page [class*="text-white/42"],
html.dark body .triton-page [class*="text-white/45"],
html.dark body .triton-page [class*="text-white/48"],
html.dark body .triton-page [class*="text-white/50"] {
    color: #afc0d2 !important;
}

html.dark body .triton-page [class*="text-white/55"],
html.dark body .triton-page [class*="text-white/60"],
html.dark body .triton-page [class*="text-white/65"] {
    color: #c1cedc !important;
}

/* Warehouse proof selector — this must never render navy-on-navy ---------- */
html.dark body .triton-page .warehouse-group-card .warehouse-group-title,
html.dark body .triton-page .warehouse-group-card [class~="text-[#17365F]"] {
    color: #f7fbff !important;
}

html.dark body .triton-page .warehouse-group-card .warehouse-group-desc {
    color: #cbd9e7 !important;
}

html.dark body .triton-page .warehouse-group-card .warehouse-group-badge {
    color: #f4f8fd !important;
    background-color: rgba(8, 18, 31, .68) !important;
}

html.dark body .triton-page .warehouse-group-card-construction .warehouse-group-kicker,
html.dark body .triton-page .warehouse-group-card-construction .warehouse-group-arrow {
    color: #9fcfff !important;
}

html.dark body .triton-page .warehouse-group-card-mep .warehouse-group-kicker,
html.dark body .triton-page .warehouse-group-card-mep .warehouse-group-arrow {
    color: #d5c4ff !important;
}

/* Sidebar support copy ----------------------------------------------------- */
html.dark .triton-sidebar-section-label {
    color: rgba(255,255,255,.72) !important;
}

html.dark .triton-sidebar-subsection {
    color: rgba(255,255,255,.66) !important;
}

html.dark .triton-app-sidebar [class*="text-white/4"],
html.dark .triton-app-sidebar [class*="text-white/5"] {
    color: rgba(255,255,255,.68) !important;
}
