/* ═══════════════════════════════════════════════════════════════════════
   LEFTOVER COLOR REMAP — load LAST so it wins over page/Tailwind CSS.
   Maps leftover slate / navy / generic-blue / indigo utilities and
   inline styles onto Kimba's Academy tokens. Brand docs under Brand/
   are not included.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tailwind slate / gray text → tokens ── */
html.light-mode .text-slate-100,
html.light-mode .text-slate-200,
html.light-mode .text-white,
html.light-mode .text-gray-100,
html.light-mode .text-gray-200,
[data-theme="light"] .text-slate-100,
[data-theme="light"] .text-slate-200,
[data-theme="light"] .text-white,
[data-theme="light"] .text-gray-100,
[data-theme="light"] .text-gray-200 {
  color: var(--ka-text-primary) !important;
}

html.light-mode .text-slate-300,
html.light-mode .text-gray-300,
[data-theme="light"] .text-slate-300,
[data-theme="light"] .text-gray-300 {
  color: var(--ka-text-secondary) !important;
}

html.light-mode .text-slate-400,
html.light-mode .text-slate-500,
html.light-mode .text-slate-600,
html.light-mode .text-gray-400,
html.light-mode .text-gray-500,
html.light-mode .text-gray-600,
html.light-mode .muted-text,
html.light-mode .meta-text,
[data-theme="light"] .text-slate-400,
[data-theme="light"] .text-slate-500,
[data-theme="light"] .text-slate-600,
[data-theme="light"] .text-gray-400,
[data-theme="light"] .text-gray-500,
[data-theme="light"] .text-gray-600,
[data-theme="light"] .muted-text,
[data-theme="light"] .meta-text {
  color: var(--ka-text-muted) !important;
}

/* Never invert text sitting on Volt fills */
html.light-mode .bg-primary:not([class*="bg-primary/"]):not(.btn-primary),
html.light-mode .bg-primary:not([class*="bg-primary/"]):not(.btn-primary) *,
html.light-mode [style*="--ka-accent-volt-fill"],
html.light-mode [style*="--ka-accent-volt-fill"] *,
[data-theme="light"] .bg-primary:not([class*="bg-primary/"]):not(.btn-primary),
[data-theme="light"] .bg-primary:not([class*="bg-primary/"]):not(.btn-primary) *,
[data-theme="light"] [style*="--ka-accent-volt-fill"],
[data-theme="light"] [style*="--ka-accent-volt-fill"] * {
  color: var(--ka-on-volt-fill) !important;
}

/* ── Generic blue / indigo text → accent token ── */
.text-blue-400,
.text-blue-500,
.text-blue-600,
.text-indigo-400,
.text-indigo-500,
.text-indigo-600,
[style*="color:#60a5fa"],
[style*="color: #60a5fa"],
[style*="color:#2563eb"],
[style*="color: #2563eb"],
[style*="color:#3b82f6"],
[style*="color: #3b82f6"],
[style*="color:#818cf8"],
[style*="color: #818cf8"],
[style*="color:#22d3ee"],
[style*="color: #22d3ee"],
[style*="color:#6366f1"],
[style*="color: #6366f1"],
[style*="color:#4f46e5"],
[style*="color: #4f46e5"],
[style*="color:#7c3aed"],
[style*="color: #7c3aed"] {
  color: var(--ka-accent-volt) !important;
}

/* ── Leftover brand-blue / indigo washes ── */
[style*="background:rgba(14,98,255"],
[style*="background: rgba(14,98,255"],
[style*="background:rgba(14, 98, 255"],
[style*="background: rgba(14, 98, 255"],
[style*="background:rgba(99,102,241"],
[style*="background: rgba(99,102,241"],
[style*="background:rgba(99, 102, 241"],
[style*="background: rgba(99, 102, 241"] {
  background: var(--ka-accent-volt-muted) !important;
}

[style*="background:rgba(14,98,255,1)"],
[style*="background: rgba(14,98,255,1)"],
[style*="background:rgba(14, 98, 255, 1)"],
[style*="background: rgba(14, 98, 255, 1)"],
[style*="background:#6366f1"],
[style*="background: #6366f1"],
[style*="background:#8b5cf6"],
[style*="background: #8b5cf6"],
[style*="background:#7c3aed"],
[style*="background: #7c3aed"],
[style*="background:#2563eb"],
[style*="background: #2563eb"] {
  background: var(--ka-accent-volt-fill) !important;
  color: var(--ka-on-volt-fill) !important;
}

[style*="border-color:rgba(14,98,255"],
[style*="border-color: rgba(14,98,255"],
[style*="border:1px solid rgba(14,98,255"],
[style*="border: 1px solid rgba(14,98,255"],
[style*="border-color:rgba(99,102,241"],
[style*="border-color: rgba(99,102,241"] {
  border-color: var(--ka-accent-volt) !important;
}

[style*="color:rgba(14,98,255"],
[style*="color: rgba(14,98,255"],
[style*="color:rgba(14, 98, 255"],
[style*="color: rgba(14, 98, 255"] {
  color: var(--ka-accent-volt) !important;
}

/* Known leftover blue / indigo component classes */
.status-label.do-now,
.ana-kpi-blue,
.rpt-icon-blue,
.sess-pill-mini.prep-progress,
.sess-pill-mini.delivery,
.sess-status-badge.scheduled {
  background: var(--ka-accent-volt-muted) !important;
  color: var(--ka-accent-volt) !important;
}

.mos-btn-primary,
.ad-btn-primary,
.stg-btn-primary,
.stg-modal .stg-btn-primary {
  background: var(--ka-accent-volt-fill) !important;
  border-color: var(--ka-accent-volt-fill) !important;
  color: var(--ka-on-volt-fill) !important;
}

.ad-btn-secondary {
  background: var(--ka-accent-volt-muted) !important;
  color: var(--ka-accent-volt) !important;
  border-color: var(--ka-accent-volt) !important;
}

.sess-upload-fill {
  background: var(--ka-accent-volt-fill) !important;
}

/* Stylesheet fills that still point at --ka-accent-volt (navy in light) */
.task-row input[type="checkbox"]:checked,
.onboarding-dot-active,
.voice-waveform span,
.scroll-to-bottom .unread-badge {
  background: var(--ka-accent-volt-fill) !important;
  color: var(--ka-on-volt-fill) !important;
}

.scroll-to-bottom .unread-badge {
  border-color: var(--ka-accent-volt-fill) !important;
}

/* Compiled Tailwind form / focus leftovers */
[type='checkbox'],
[type='radio'] {
  accent-color: var(--ka-accent-volt-fill);
}

.sess-prep-item input[type="checkbox"],
.ad-client-row input[type=checkbox],
.ad-radio-opt input[type=radio],
.ad-toggle input[type=checkbox] {
  accent-color: var(--ka-accent-volt-fill) !important;
}
