/* ============================================================
   MESSEN · Capa de temas (claro / oscuro)
   - html.theme-dark  → UI oscura (paleta actual #0E1117)
   - html.theme-light → UI clara  (#f8fafc / #ffffff / #0f172a)
   Reglas con mayor especificidad que Tailwind CDN para poder
   sobrescribir las clases generadas.
   ============================================================ */

html.theme-dark  { color-scheme: dark; }
html.theme-light { color-scheme: light; }

/* ---------- zonas ancladas (nunca se invierten) ---------- */
html.theme-light .theme-lock-dark.bg-\[\#0E1117\],
html.theme-light .theme-lock-dark .bg-\[\#0E1117\]        { background-color: #0E1117; }
html.theme-light .theme-lock-dark.bg-\[\#0E1117\]\/85,
html.theme-light .theme-lock-dark .bg-\[\#0E1117\]\/85    { background-color: rgba(14, 17, 23, 0.85); }
html.theme-light .theme-lock-dark.bg-\[\#0E1117\]\/75,
html.theme-light .theme-lock-dark .bg-\[\#0E1117\]\/75    { background-color: rgba(14, 17, 23, 0.75); }
html.theme-light .theme-lock-dark.text-white,
html.theme-light .theme-lock-dark .text-white             { color: #ffffff; }
html.theme-light .theme-lock-dark.text-slate-200,
html.theme-light .theme-lock-dark .text-slate-200         { color: #e2e8f0; }
html.theme-light .theme-lock-dark.text-slate-300,
html.theme-light .theme-lock-dark .text-slate-300         { color: #cbd5e1; }
html.theme-light .theme-lock-dark.text-\[\#00E5FF\],
html.theme-light .theme-lock-dark .text-\[\#00E5FF\]      { color: #00E5FF; }
html.theme-light .theme-lock-dark.border-slate-800,
html.theme-light .theme-lock-dark .border-slate-800       { border-color: #1e293b; }
html.theme-light .theme-lock-dark .border-slate-700\/80   { border-color: rgba(51, 65, 85, 0.8); }
html.theme-light .theme-lock-dark .border-\[\#00E5FF\]\/40 { border-color: rgba(0, 229, 255, 0.4); }

.keep-white, .keep-white * { background-color: #ffffff !important; }

/* ============================================================
   MODO CLARO (invierte la UI oscura actual)
   ============================================================ */

/* superficies */
html.theme-light .bg-\[\#0E1117\]       { background-color: #f8fafc; }
html.theme-light .bg-\[\#0E1117\]\/95   { background-color: rgba(248, 250, 252, 0.95); }
html.theme-light .bg-\[\#0E1117\]\/85   { background-color: rgba(248, 250, 252, 0.85); }
html.theme-light .bg-\[\#0E1117\]\/75   { background-color: rgba(248, 250, 252, 0.75); }
html.theme-light .bg-\[\#0E1117\]\/60   { background-color: #f1f5f9; }
html.theme-light .bg-\[\#141923\]       { background-color: #ffffff; }
html.theme-light .bg-slate-800          { background-color: #f1f5f9; }
html.theme-light .bg-slate-700          { background-color: #e2e8f0; }
html.theme-light .bg-slate-800\/70      { background-color: rgba(241, 245, 249, 0.7); }
html.theme-light .bg-slate-800\/35      { background-color: rgba(226, 232, 240, 0.35); }
html.theme-light .bg-slate-800\/30      { background-color: rgba(226, 232, 240, 0.3); }
html.theme-light .hover\:bg-slate-800:hover  { background-color: #eef2f7; }
html.theme-light .hover\:bg-slate-700:hover  { background-color: #e2e8f0; }
html.theme-light .bg-black\/75          { background-color: rgba(15, 23, 42, 0.45); }

/* texto */
html.theme-light .text-white            { color: #0f172a; }
html.theme-light .text-slate-100        { color: #0f172a; }
html.theme-light .text-slate-200        { color: #1e293b; }
html.theme-light .text-slate-300        { color: #334155; }
html.theme-light .text-slate-400        { color: #64748b; }
html.theme-light .text-slate-500        { color: #64748b; }
html.theme-light .text-slate-700        { color: #334155; }

/* texto blanco que debe seguir blanco sobre fondos de color */
html.theme-light .text-white.bg-\[\#00509E\],
html.theme-light .text-white.bg-\[\#0062C4\],
html.theme-light .text-white.bg-\[\#003F7D\],
html.theme-light .text-white.bg-\[\#004182\],
html.theme-light .text-white.bg-\[\#0A66C2\] { color: #ffffff; }

/* bordes y divisores */
html.theme-light .border-slate-800,
html.theme-light .border-slate-700,
html.theme-light .border-slate-700\/80,
html.theme-light .border-slate-800\/80        { border-color: #e2e8f0; }
html.theme-light .divide-slate-800\/80 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0; }

/* acentos (cyan oscuro → azul corporativo en claro) */
html.theme-light .text-\[\#00E5FF\]       { color: #0284c7; }
html.theme-light .border-\[\#00E5FF\]     { border-color: #0284c7; }
html.theme-light .border-\[\#00E5FF\]\/30 { border-color: rgba(2, 132, 199, 0.3); }
html.theme-light .border-\[\#00E5FF\]\/35 { border-color: rgba(2, 132, 199, 0.35); }
html.theme-light .ring-\[\#00E5FF\]       { --tw-ring-color: #0284c7; }
html.theme-light .text-sky-300            { color: #0369a1; }
html.theme-light .bg-\[\#00E5FF\]\/10     { background-color: rgba(2, 132, 199, 0.1); }

/* ============================================================
   MODO OSCURO (invierte la UI clara de la verificación pública)
   ============================================================ */

html.theme-dark .bg-white               { background-color: #141923; }
html.theme-dark body.bg-white           { background-color: #0E1117; }
html.theme-dark .bg-slate-50            { background-color: #0E1117; }
html.theme-dark .bg-slate-50\/60        { background-color: #0E1117; }
html.theme-dark .bg-slate-100           { background-color: #1e293b; }
html.theme-dark .bg-slate-200\/70       { background-color: #243044; }
html.theme-dark .hover\:bg-slate-100:hover     { background-color: #1e293b; }
html.theme-dark .hover\:bg-slate-200\/70:hover { background-color: #243044; }

html.theme-dark .text-\[\#1F2937\]      { color: #e2e8f0; }
html.theme-dark .text-slate-600         { color: #94a3b8; }
html.theme-dark .text-slate-500         { color: #94a3b8; }
html.theme-dark .text-slate-700         { color: #cbd5e1; }
html.theme-dark .placeholder\:text-slate-400::placeholder { color: #64748b; }

html.theme-dark .border-slate-100       { border-color: #1e293b; }
html.theme-dark .border-slate-200       { border-color: #1e293b; }
html.theme-dark .border-slate-300       { border-color: #334155; }

html.theme-dark .text-rose-800          { color: #fda4af; }
html.theme-dark .bg-rose-50             { background-color: rgba(244, 63, 94, 0.1); }
html.theme-dark .border-rose-200        { border-color: rgba(244, 63, 94, 0.3); }

html.theme-dark .keep-white,
html.theme-dark .keep-white *           { background-color: #ffffff !important; }
