/* ============================================================
   MEJORAS DE CONTRASTE EN MODO OSCURO (extras RGA)
   Cubre paletas pastel (50/100/200) y textos oscuros (700/800/900)
   usados en Laboratorio STEM, Cocina y Economía que por defecto
   quedan ilegibles en modo oscuro.
   Se carga después de dark-mode.css para anular los valores base.
   ============================================================ */

/* ---------- Fondos pastel -> tintados oscuros ---------- */
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-stone-50,
[data-theme="dark"] .bg-zinc-50,
[data-theme="dark"] .bg-neutral-50 {
    background-color: rgba(51, 65, 85, 0.35) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-stone-100,
[data-theme="dark"] .bg-zinc-100,
[data-theme="dark"] .bg-neutral-100 {
    background-color: rgba(51, 65, 85, 0.55) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .bg-slate-200,
[data-theme="dark"] .bg-stone-200,
[data-theme="dark"] .bg-zinc-200,
[data-theme="dark"] .bg-neutral-200 {
    background-color: rgba(71, 85, 105, 0.7) !important;
    color: var(--dm-text-primary) !important;
}

[data-theme="dark"] .bg-orange-50  { background-color: rgba(124, 45, 18, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-orange-100 { background-color: rgba(154, 52, 18, 0.45) !important; color: #fed7aa !important; }
[data-theme="dark"] .bg-orange-200 { background-color: rgba(194, 65, 12, 0.55) !important; color: #ffedd5 !important; }

[data-theme="dark"] .bg-amber-50   { background-color: rgba(120, 53, 15, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-amber-200  { background-color: rgba(180, 83, 9, 0.55) !important; color: #fef3c7 !important; }

[data-theme="dark"] .bg-yellow-200 { background-color: rgba(161, 98, 7, 0.55) !important; color: #fef9c3 !important; }

[data-theme="dark"] .bg-rose-50    { background-color: rgba(136, 19, 55, 0.25) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-rose-100   { background-color: rgba(159, 18, 57, 0.40) !important; color: #fecdd3 !important; }
[data-theme="dark"] .bg-rose-200   { background-color: rgba(190, 18, 60, 0.50) !important; color: #ffe4e6 !important; }

[data-theme="dark"] .bg-pink-50    { background-color: rgba(131, 24, 67, 0.25) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-pink-100   { background-color: rgba(157, 23, 77, 0.40) !important; color: #fbcfe8 !important; }
[data-theme="dark"] .bg-pink-200   { background-color: rgba(190, 24, 93, 0.55) !important; color: #fce7f3 !important; }

[data-theme="dark"] .bg-fuchsia-50  { background-color: rgba(112, 26, 117, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-fuchsia-100 { background-color: rgba(134, 25, 143, 0.45) !important; color: #f5d0fe !important; }

[data-theme="dark"] .bg-emerald-50  { background-color: rgba(6, 78, 59, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-emerald-100 { background-color: rgba(6, 95, 70, 0.45) !important; color: #a7f3d0 !important; }
[data-theme="dark"] .bg-emerald-200 { background-color: rgba(4, 120, 87, 0.55) !important; color: #d1fae5 !important; }

[data-theme="dark"] .bg-teal-50    { background-color: rgba(19, 78, 74, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-teal-100   { background-color: rgba(17, 94, 89, 0.45) !important; color: #99f6e4 !important; }
[data-theme="dark"] .bg-teal-200   { background-color: rgba(15, 118, 110, 0.55) !important; color: #ccfbf1 !important; }

[data-theme="dark"] .bg-cyan-50    { background-color: rgba(22, 78, 99, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-cyan-100   { background-color: rgba(21, 94, 117, 0.45) !important; color: #a5f3fc !important; }
[data-theme="dark"] .bg-cyan-200   { background-color: rgba(14, 116, 144, 0.55) !important; color: #cffafe !important; }

[data-theme="dark"] .bg-sky-50     { background-color: rgba(12, 74, 110, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-sky-200    { background-color: rgba(14, 116, 144, 0.55) !important; color: #bae6fd !important; }

[data-theme="dark"] .bg-indigo-50  { background-color: rgba(49, 46, 129, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-indigo-200 { background-color: rgba(67, 56, 202, 0.55) !important; color: #c7d2fe !important; }

[data-theme="dark"] .bg-violet-50  { background-color: rgba(76, 29, 149, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-violet-100 { background-color: rgba(91, 33, 182, 0.45) !important; color: #ddd6fe !important; }
[data-theme="dark"] .bg-violet-200 { background-color: rgba(109, 40, 217, 0.55) !important; color: #ede9fe !important; }

[data-theme="dark"] .bg-lime-50    { background-color: rgba(54, 83, 20, 0.30) !important; color: var(--dm-text-primary) !important; }
[data-theme="dark"] .bg-lime-100   { background-color: rgba(63, 98, 18, 0.45) !important; color: #d9f99d !important; }

[data-theme="dark"] .bg-green-200  { background-color: rgba(22, 101, 52, 0.55) !important; color: #bbf7d0 !important; }
[data-theme="dark"] .bg-red-200    { background-color: rgba(153, 27, 27, 0.55) !important; color: #fecaca !important; }

/* ---------- Textos oscuros (700/800/900) -> claros legibles ---------- */
[data-theme="dark"] .text-slate-900 { color: #f1f5f9 !important; }
[data-theme="dark"] .text-slate-800 { color: #e2e8f0 !important; }
[data-theme="dark"] .text-slate-700 { color: #cbd5e1 !important; }
[data-theme="dark"] .text-slate-600 { color: #b8c4d4 !important; }
[data-theme="dark"] .text-slate-500 { color: #94a3b8 !important; }
[data-theme="dark"] .text-stone-900, [data-theme="dark"] .text-stone-800, [data-theme="dark"] .text-stone-700 { color: #e7e5e4 !important; }
[data-theme="dark"] .text-zinc-900,  [data-theme="dark"] .text-zinc-800,  [data-theme="dark"] .text-zinc-700  { color: #e4e4e7 !important; }
[data-theme="dark"] .text-neutral-900, [data-theme="dark"] .text-neutral-800, [data-theme="dark"] .text-neutral-700 { color: #e5e5e5 !important; }

[data-theme="dark"] .text-orange-900 { color: #fed7aa !important; }
[data-theme="dark"] .text-orange-800 { color: #fdba74 !important; }
[data-theme="dark"] .text-orange-700 { color: #fb923c !important; }
[data-theme="dark"] .text-orange-600 { color: #fb923c !important; }

[data-theme="dark"] .text-amber-900 { color: #fde68a !important; }
[data-theme="dark"] .text-amber-800 { color: #fcd34d !important; }

[data-theme="dark"] .text-yellow-900 { color: #fde68a !important; }
[data-theme="dark"] .text-yellow-800 { color: #fde047 !important; }
[data-theme="dark"] .text-yellow-700 { color: #facc15 !important; }
[data-theme="dark"] .text-yellow-600 { color: #eab308 !important; }

[data-theme="dark"] .text-rose-900 { color: #fecdd3 !important; }
[data-theme="dark"] .text-rose-800 { color: #fda4af !important; }
[data-theme="dark"] .text-rose-700 { color: #fb7185 !important; }
[data-theme="dark"] .text-rose-600 { color: #fb7185 !important; }

[data-theme="dark"] .text-pink-900 { color: #fbcfe8 !important; }
[data-theme="dark"] .text-pink-800 { color: #f9a8d4 !important; }
[data-theme="dark"] .text-pink-700 { color: #ec4899 !important; }
[data-theme="dark"] .text-pink-600 { color: #ec4899 !important; }

[data-theme="dark"] .text-fuchsia-900 { color: #f5d0fe !important; }
[data-theme="dark"] .text-fuchsia-800 { color: #f0abfc !important; }
[data-theme="dark"] .text-fuchsia-700 { color: #e879f9 !important; }

[data-theme="dark"] .text-emerald-900 { color: #a7f3d0 !important; }
[data-theme="dark"] .text-emerald-800 { color: #6ee7b7 !important; }
[data-theme="dark"] .text-emerald-700 { color: #34d399 !important; }
[data-theme="dark"] .text-emerald-600 { color: #34d399 !important; }
[data-theme="dark"] .text-emerald-500 { color: #10b981 !important; }

[data-theme="dark"] .text-teal-900 { color: #99f6e4 !important; }
[data-theme="dark"] .text-teal-800 { color: #5eead4 !important; }
[data-theme="dark"] .text-teal-700 { color: #2dd4bf !important; }
[data-theme="dark"] .text-teal-600 { color: #2dd4bf !important; }

[data-theme="dark"] .text-cyan-900 { color: #a5f3fc !important; }
[data-theme="dark"] .text-cyan-800 { color: #67e8f9 !important; }
[data-theme="dark"] .text-cyan-700 { color: #22d3ee !important; }
[data-theme="dark"] .text-cyan-600 { color: #22d3ee !important; }

[data-theme="dark"] .text-sky-900 { color: #bae6fd !important; }
[data-theme="dark"] .text-sky-800 { color: #7dd3fc !important; }
[data-theme="dark"] .text-sky-700 { color: #38bdf8 !important; }
[data-theme="dark"] .text-sky-600 { color: #38bdf8 !important; }

[data-theme="dark"] .text-indigo-900 { color: #c7d2fe !important; }
[data-theme="dark"] .text-indigo-800 { color: #a5b4fc !important; }

[data-theme="dark"] .text-violet-900 { color: #ddd6fe !important; }
[data-theme="dark"] .text-violet-800 { color: #c4b5fd !important; }
[data-theme="dark"] .text-violet-700 { color: #a78bfa !important; }
[data-theme="dark"] .text-violet-600 { color: #a78bfa !important; }

[data-theme="dark"] .text-purple-900 { color: #e9d5ff !important; }
[data-theme="dark"] .text-purple-800 { color: #d8b4fe !important; }

[data-theme="dark"] .text-lime-900 { color: #d9f99d !important; }
[data-theme="dark"] .text-lime-800 { color: #bef264 !important; }
[data-theme="dark"] .text-lime-700 { color: #a3e635 !important; }

[data-theme="dark"] .text-green-900 { color: #bbf7d0 !important; }
[data-theme="dark"] .text-green-800 { color: #86efac !important; }
[data-theme="dark"] .text-green-600 { color: #4ade80 !important; }
[data-theme="dark"] .text-green-500 { color: #22c55e !important; }

[data-theme="dark"] .text-red-900 { color: #fecaca !important; }
[data-theme="dark"] .text-red-800 { color: #fca5a5 !important; }
[data-theme="dark"] .text-red-700 { color: #f87171 !important; }
[data-theme="dark"] .text-red-600 { color: #f87171 !important; }
[data-theme="dark"] .text-red-500 { color: #ef4444 !important; }

/* ---------- Bordes pastel ---------- */
[data-theme="dark"] .border-slate-200, [data-theme="dark"] .border-slate-300 { border-color: rgba(71, 85, 105, 0.6) !important; }
[data-theme="dark"] .border-slate-100 { border-color: rgba(71, 85, 105, 0.4) !important; }
[data-theme="dark"] .border-stone-200, [data-theme="dark"] .border-zinc-200, [data-theme="dark"] .border-neutral-200 { border-color: rgba(71, 85, 105, 0.6) !important; }

[data-theme="dark"] .border-orange-200  { border-color: rgba(234, 88, 12, 0.45) !important; }
[data-theme="dark"] .border-orange-300  { border-color: rgba(249, 115, 22, 0.5) !important; }
[data-theme="dark"] .border-amber-200   { border-color: rgba(217, 119, 6, 0.45) !important; }
[data-theme="dark"] .border-amber-300   { border-color: rgba(245, 158, 11, 0.5) !important; }
[data-theme="dark"] .border-yellow-200  { border-color: rgba(202, 138, 4, 0.45) !important; }
[data-theme="dark"] .border-rose-200    { border-color: rgba(225, 29, 72, 0.45) !important; }
[data-theme="dark"] .border-rose-300    { border-color: rgba(244, 63, 94, 0.5) !important; }
[data-theme="dark"] .border-pink-200    { border-color: rgba(219, 39, 119, 0.45) !important; }
[data-theme="dark"] .border-fuchsia-200 { border-color: rgba(192, 38, 211, 0.45) !important; }
[data-theme="dark"] .border-emerald-200 { border-color: rgba(5, 150, 105, 0.45) !important; }
[data-theme="dark"] .border-emerald-300 { border-color: rgba(16, 185, 129, 0.5) !important; }
[data-theme="dark"] .border-teal-200    { border-color: rgba(13, 148, 136, 0.45) !important; }
[data-theme="dark"] .border-cyan-200    { border-color: rgba(8, 145, 178, 0.45) !important; }
[data-theme="dark"] .border-sky-200     { border-color: rgba(2, 132, 199, 0.45) !important; }
[data-theme="dark"] .border-sky-300     { border-color: rgba(14, 165, 233, 0.5) !important; }
[data-theme="dark"] .border-violet-200  { border-color: rgba(124, 58, 237, 0.45) !important; }
[data-theme="dark"] .border-purple-200  { border-color: rgba(147, 51, 234, 0.45) !important; }
[data-theme="dark"] .border-lime-200    { border-color: rgba(101, 163, 13, 0.45) !important; }

/* ---------- Variantes hover ---------- */
[data-theme="dark"] .hover\:bg-slate-50:hover,
[data-theme="dark"] .hover\:bg-slate-100:hover   { background-color: rgba(71, 85, 105, 0.6) !important; }
[data-theme="dark"] .hover\:bg-amber-50:hover,
[data-theme="dark"] .hover\:bg-amber-50\/60:hover,
[data-theme="dark"] .hover\:bg-amber-100:hover   { background-color: rgba(120, 53, 15, 0.45) !important; }
[data-theme="dark"] .hover\:bg-emerald-50:hover,
[data-theme="dark"] .hover\:bg-emerald-100:hover { background-color: rgba(6, 95, 70, 0.5) !important; }
[data-theme="dark"] .hover\:bg-rose-50:hover,
[data-theme="dark"] .hover\:bg-rose-100:hover    { background-color: rgba(159, 18, 57, 0.45) !important; }
[data-theme="dark"] .hover\:bg-sky-50:hover,
[data-theme="dark"] .hover\:bg-sky-100:hover     { background-color: rgba(14, 116, 144, 0.5) !important; }
[data-theme="dark"] .hover\:bg-indigo-50:hover,
[data-theme="dark"] .hover\:bg-indigo-100:hover  { background-color: rgba(67, 56, 129, 0.5) !important; }
[data-theme="dark"] .hover\:bg-violet-50:hover,
[data-theme="dark"] .hover\:bg-violet-100:hover  { background-color: rgba(91, 33, 182, 0.5) !important; }

/* ---------- Gradientes pastel (hero cards cocina/economia/stem) ---------- */
[data-theme="dark"] [class*="from-orange-50"],
[data-theme="dark"] [class*="via-orange-50"],
[data-theme="dark"] [class*="to-orange-50"]   { --tw-gradient-from: rgba(124, 45, 18, 0.35) !important; --tw-gradient-to: rgba(124, 45, 18, 0) !important; }
[data-theme="dark"] [class*="from-amber-50"],
[data-theme="dark"] [class*="via-amber-50"],
[data-theme="dark"] [class*="to-amber-50"]    { --tw-gradient-from: rgba(120, 53, 15, 0.35) !important; --tw-gradient-to: rgba(120, 53, 15, 0) !important; }
[data-theme="dark"] [class*="from-yellow-50"],
[data-theme="dark"] [class*="via-yellow-50"],
[data-theme="dark"] [class*="to-yellow-50"]   { --tw-gradient-from: rgba(113, 63, 18, 0.35) !important; --tw-gradient-to: rgba(113, 63, 18, 0) !important; }
[data-theme="dark"] [class*="from-rose-50"],
[data-theme="dark"] [class*="via-rose-50"],
[data-theme="dark"] [class*="to-rose-50"]     { --tw-gradient-from: rgba(136, 19, 55, 0.35) !important; --tw-gradient-to: rgba(136, 19, 55, 0) !important; }
[data-theme="dark"] [class*="from-pink-50"],
[data-theme="dark"] [class*="to-pink-50"]     { --tw-gradient-from: rgba(131, 24, 67, 0.35) !important; --tw-gradient-to: rgba(131, 24, 67, 0) !important; }
[data-theme="dark"] [class*="from-emerald-50"],
[data-theme="dark"] [class*="via-emerald-50"],
[data-theme="dark"] [class*="to-emerald-50"]  { --tw-gradient-from: rgba(6, 78, 59, 0.35) !important; --tw-gradient-to: rgba(6, 78, 59, 0) !important; }
[data-theme="dark"] [class*="from-teal-50"],
[data-theme="dark"] [class*="to-teal-50"]     { --tw-gradient-from: rgba(19, 78, 74, 0.35) !important; --tw-gradient-to: rgba(19, 78, 74, 0) !important; }
[data-theme="dark"] [class*="from-cyan-50"],
[data-theme="dark"] [class*="to-cyan-50"]     { --tw-gradient-from: rgba(22, 78, 99, 0.35) !important; --tw-gradient-to: rgba(22, 78, 99, 0) !important; }
[data-theme="dark"] [class*="from-sky-50"],
[data-theme="dark"] [class*="to-sky-50"]      { --tw-gradient-from: rgba(12, 74, 110, 0.35) !important; --tw-gradient-to: rgba(12, 74, 110, 0) !important; }
[data-theme="dark"] [class*="from-indigo-50"],
[data-theme="dark"] [class*="via-indigo-50"],
[data-theme="dark"] [class*="to-indigo-50"]   { --tw-gradient-from: rgba(49, 46, 129, 0.35) !important; --tw-gradient-to: rgba(49, 46, 129, 0) !important; }
[data-theme="dark"] [class*="from-violet-50"],
[data-theme="dark"] [class*="to-violet-50"]   { --tw-gradient-from: rgba(76, 29, 149, 0.35) !important; --tw-gradient-to: rgba(76, 29, 149, 0) !important; }
[data-theme="dark"] [class*="from-slate-50"],
[data-theme="dark"] [class*="via-slate-50"],
[data-theme="dark"] [class*="to-slate-50"]    { --tw-gradient-from: rgba(51, 65, 85, 0.35) !important; --tw-gradient-to: rgba(51, 65, 85, 0) !important; }
[data-theme="dark"] .bg-gradient-to-r[class*="to-white"],
[data-theme="dark"] .bg-gradient-to-l[class*="to-white"],
[data-theme="dark"] .bg-gradient-to-br[class*="to-white"],
[data-theme="dark"] .bg-gradient-to-bl[class*="to-white"],
[data-theme="dark"] .bg-gradient-to-b[class*="to-white"],
[data-theme="dark"] .bg-gradient-to-t[class*="to-white"],
[data-theme="dark"] [class*="from-white"],
[data-theme="dark"] [class*="via-white"] {
    --tw-gradient-from: rgba(30, 41, 59, 0.6) !important;
    --tw-gradient-to: rgba(30, 41, 59, 0) !important;
}

/* Asegurar color de texto dentro de cards con gradiente pastel */
[data-theme="dark"] .bg-gradient-to-br[class*="-50"],
[data-theme="dark"] .bg-gradient-to-r[class*="-50"],
[data-theme="dark"] .bg-gradient-to-bl[class*="-50"],
[data-theme="dark"] .bg-gradient-to-l[class*="-50"],
[data-theme="dark"] .bg-gradient-to-t[class*="-50"],
[data-theme="dark"] .bg-gradient-to-b[class*="-50"] {
    color: var(--dm-text-primary);
}

/* ---------- thead con fondo coloreado ---------- */
[data-theme="dark"] thead.bg-slate-100,
[data-theme="dark"] thead .bg-slate-100,
[data-theme="dark"] thead.bg-amber-100,
[data-theme="dark"] thead.bg-emerald-100,
[data-theme="dark"] thead.bg-rose-100,
[data-theme="dark"] thead.bg-indigo-100,
[data-theme="dark"] thead.bg-sky-100 {
    background-color: var(--dm-bg-secondary) !important;
}
[data-theme="dark"] thead.bg-amber-100 th,
[data-theme="dark"] thead.bg-emerald-100 th,
[data-theme="dark"] thead.bg-rose-100 th,
[data-theme="dark"] thead.bg-indigo-100 th,
[data-theme="dark"] thead.bg-sky-100 th {
    color: var(--dm-text-primary) !important;
}

/* ---------- Cajas blancas con textos fuertes reforzados ---------- */
[data-theme="dark"] .bg-white .text-slate-900,
[data-theme="dark"] .bg-white .text-slate-800,
[data-theme="dark"] .bg-white .text-slate-700 {
    color: var(--dm-text-primary) !important;
}

/* ---------- SVG stroke/fill slate oscuro ---------- */
[data-theme="dark"] svg [stroke="#0f172a"],
[data-theme="dark"] svg [stroke="#1e293b"],
[data-theme="dark"] svg [stroke="#334155"] { stroke: #cbd5e1 !important; }
[data-theme="dark"] svg [fill="#0f172a"],
[data-theme="dark"] svg [fill="#1e293b"],
[data-theme="dark"] svg [fill="#334155"] { fill: #cbd5e1 !important; }

/* ---------- Paneles translúcidos de Laboratorio STEM ---------- */
[data-theme="dark"] .bg-white\/50,
[data-theme="dark"] .bg-white\/60 {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: var(--dm-text-primary) !important;
}

/* Accent del slider/range */
[data-theme="dark"] input[type="range"] { accent-color: var(--dm-accent); }

/* ---------- Cocina: banner hero intro ---------- */
[data-theme="dark"] .intro-hero-gradient {
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.45) 0%, rgba(120, 53, 15, 0.4) 35%, rgba(136, 19, 55, 0.45) 100%) !important;
}

/* ---------- Tooltips genéricos ---------- */
[data-theme="dark"] .tooltip,
[data-theme="dark"] .chart-tooltip {
    background: var(--dm-bg-card) !important;
    color: var(--dm-text-primary) !important;
    border-color: var(--dm-border) !important;
}

/* ---------- Divide colors ---------- */
[data-theme="dark"] .divide-slate-200 > * + *,
[data-theme="dark"] .divide-slate-100 > * + *  { border-color: rgba(71, 85, 105, 0.5) !important; }
[data-theme="dark"] .divide-amber-100 > * + *   { border-color: rgba(217, 119, 6, 0.35) !important; }
[data-theme="dark"] .divide-emerald-100 > * + * { border-color: rgba(16, 185, 129, 0.35) !important; }

/* ---------- Prose / rich text ---------- */
[data-theme="dark"] .prose,
[data-theme="dark"] .prose * { color: var(--dm-text-primary) !important; }
[data-theme="dark"] .prose strong { color: #ffffff !important; }
[data-theme="dark"] .prose code {
    background: rgba(51, 65, 85, 0.6) !important;
    color: #fbbf24 !important;
}

/* ============================================================
   MÓDULO "MI FIT" (views/teacher_fit.php)
   Las clases .fit-* usan backgrounds hardcodeados claros.
   ============================================================ */
[data-theme="dark"] .fit-card {
    background: rgba(30, 41, 59, 0.78) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .fit-progress-bg { background: rgba(71, 85, 105, 0.6) !important; }
[data-theme="dark"] .fit-tab:not(.active) {
    background: rgba(51, 65, 85, 0.6) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .fit-tab:not(.active):hover {
    background: rgba(71, 85, 105, 0.8) !important;
}
[data-theme="dark"] .fit-metric-card {
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.5), rgba(7, 89, 133, 0.45)) !important;
}
[data-theme="dark"] .fit-metric-val { color: #7dd3fc !important; }
[data-theme="dark"] .fit-metric-label { color: #94a3b8 !important; }
[data-theme="dark"] .fit-input {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(71, 85, 105, 0.7) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .fit-input:focus { border-color: #38bdf8 !important; }
[data-theme="dark"] .fit-btn-secondary {
    background: rgba(51, 65, 85, 0.6) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .fit-btn-secondary:hover { background: rgba(71, 85, 105, 0.8) !important; }
[data-theme="dark"] .fit-stat-card {
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.5), rgba(76, 29, 149, 0.45)) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .fit-stat-label { color: #94a3b8 !important; }
[data-theme="dark"] .fit-pr-row {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.55), rgba(146, 64, 14, 0.5)) !important;
    color: #fde68a !important;
}
[data-theme="dark"] .fit-cal-day { color: #cbd5e1; }
[data-theme="dark"] .fit-cal-day.empty { color: #475569 !important; }
[data-theme="dark"] .fit-badge-sem { background: rgba(30, 64, 175, 0.55) !important; color: #bfdbfe !important; }
[data-theme="dark"] .fit-badge-mes { background: rgba(146, 64, 14, 0.55) !important; color: #fde68a !important; }
[data-theme="dark"] .fit-badge-año { background: rgba(22, 101, 52, 0.55) !important; color: #bbf7d0 !important; }

/* ============================================================
   GENERADOR DE HORARIOS (views/generador_horarios.php)
   Cuadrito verde bg-green-50 con texto green-700 queda ilegible.
   ============================================================ */
[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-green-100 {
    background-color: rgba(22, 101, 52, 0.35) !important;
    color: #bbf7d0 !important;
}
[data-theme="dark"] .border-green-200,
[data-theme="dark"] .border-green-300 { border-color: rgba(34, 197, 94, 0.5) !important; }
[data-theme="dark"] .text-green-700 { color: #86efac !important; }
[data-theme="dark"] .text-green-600 { color: #4ade80 !important; }
[data-theme="dark"] .hover\:bg-green-100:hover { background-color: rgba(22, 101, 52, 0.55) !important; }

/* Cards translúcidas bg-white/30, bg-white/80, glass-card-solid */
[data-theme="dark"] .bg-white\/30,
[data-theme="dark"] .bg-white\/40,
[data-theme="dark"] .bg-white\/80 {
    background-color: rgba(30, 41, 59, 0.55) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .border-white\/20,
[data-theme="dark"] .border-white\/40 { border-color: rgba(71, 85, 105, 0.4) !important; }

/* ============================================================
   LABORATORIO STEM - Fotovoltaica y paneles blancos
   .panel-card + rounded-[28px] bg-white son las "cards" grandes.
   ============================================================ */
[data-theme="dark"] .panel-card,
[data-theme="dark"] .bg-white.panel-card {
    background-color: rgba(30, 41, 59, 0.85) !important;
    color: var(--dm-text-primary) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .panel-card h2,
[data-theme="dark"] .panel-card h3,
[data-theme="dark"] .panel-card h4 { color: var(--dm-text-primary) !important; }

/* bg-white genérico dentro de contenedores STEM/RGA */
[data-theme="dark"] .stem-shell .bg-white,
[data-theme="dark"] .stem-shell [class~="bg-white"] {
    background-color: rgba(30, 41, 59, 0.85) !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .stem-shell .bg-white\/10 { background-color: rgba(51, 65, 85, 0.55) !important; }
[data-theme="dark"] .stem-shell .bg-white\/80 { background-color: rgba(30, 41, 59, 0.75) !important; }

/* Shell STEM: el contenedor raíz usa bg-[var(--stem-paper)] (#f7f7f2) que queda blanco */
[data-theme="dark"] .stem-shell.bg-\[var\(--stem-paper\)\],
[data-theme="dark"] .stem-shell {
    --stem-paper: #0b1220 !important;
    background-color: #0b1220 !important;
    color: var(--dm-text-primary) !important;
}
[data-theme="dark"] .stem-grid {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px) !important;
}

/* Cards de estación fotovoltaica + sensores + graph + component: gradientes blancos */
[data-theme="dark"] .pv-station-card,
[data-theme="dark"] .sensor-card,
[data-theme="dark"] .graph-card,
[data-theme="dark"] .component-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92)) !important;
    border-color: rgba(71, 85, 105, 0.5) !important;
    color: var(--dm-text-primary) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .pv-chip {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .graph-btn {
    background: rgba(30, 64, 175, 0.3) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
[data-theme="dark"] .graph-btn:hover { background: rgba(30, 64, 175, 0.5) !important; }
[data-theme="dark"] .solar-spectrum { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important; }
