/* Shared visual themes for the application, public pages and administration. */
html.dark { color-scheme: dark; }
.brand-logo-dark { display: none; }
html.dark .brand-logo-light { display: none; }
html.dark .brand-logo-dark { display: block; }
html:not(.dark) { color-scheme: light; }

html.dark .theme-app.mesh { background: radial-gradient(circle at 12% 10%, #16372e 0, transparent 28%), radial-gradient(circle at 90% 12%, #1d244d 0, transparent 25%), #0b1220; color: #e5edf8; }
html.dark .theme-app .bg-white, html.dark .theme-guest .bg-white, html.dark .theme-welcome .bg-white { background-color: #172234 !important; }
html.dark .theme-app .bg-white\/95 { background-color: rgba(23,34,52,.96) !important; }
html.dark .theme-app .bg-slate-50, html.dark .theme-guest .bg-slate-50, html.dark .theme-welcome .bg-slate-50 { background-color: #1d2a3d !important; }
html.dark .theme-app .bg-slate-100, html.dark .theme-guest .bg-slate-100, html.dark .theme-welcome .bg-slate-100 { background-color: #29384d !important; }
html.dark .theme-app .text-slate-950, html.dark .theme-app .text-slate-900, html.dark .theme-app .text-slate-800, html.dark .theme-guest .text-slate-950, html.dark .theme-guest .text-slate-900, html.dark .theme-welcome .text-slate-950, html.dark .theme-welcome .text-slate-900 { color: #f1f5f9 !important; }
html.dark .theme-app .text-slate-700, html.dark .theme-app .text-slate-600, html.dark .theme-guest .text-slate-700, html.dark .theme-guest .text-slate-600, html.dark .theme-welcome .text-slate-700, html.dark .theme-welcome .text-slate-600 { color: #cbd5e1 !important; }
html.dark .theme-app .text-slate-500, html.dark .theme-guest .text-slate-500, html.dark .theme-welcome .text-slate-500 { color: #a7b7ca !important; }
html.dark .theme-app .border-slate-200, html.dark .theme-guest .border-slate-200, html.dark .theme-welcome .border-slate-200, html.dark .theme-app .border-white\/60 { border-color: #35445c !important; }
html.dark .theme-app .bg-emerald-50, html.dark .theme-guest .bg-emerald-50 { background-color: #163a34 !important; }
html.dark .theme-app .bg-indigo-50, html.dark .theme-app .bg-violet-50, html.dark .theme-welcome .bg-violet-50 { background-color: #26234a !important; }
html.dark .theme-app .bg-amber-50, html.dark .theme-guest .bg-amber-50 { background-color: #3b301e !important; }
html.dark .theme-app .bg-rose-50, html.dark .theme-guest .bg-rose-50 { background-color: #3b2635 !important; }
html.dark .theme-app input:not([type=checkbox]):not([type=radio]):not([type=range]), html.dark .theme-app select, html.dark .theme-app textarea, html.dark .theme-guest input:not([type=checkbox]):not([type=radio]):not([type=range]), html.dark .theme-guest select, html.dark .theme-guest textarea { color: #f1f5f9; background-color: #1d2a3d; border-color: #475569; }
html.dark .theme-app input::placeholder, html.dark .theme-guest input::placeholder, html.dark .theme-app textarea::placeholder { color: #94a3b8; }
html.dark .theme-app .mobile-drawer { background-color: #172234 !important; }
html.dark .theme-app .theme-toggle, html.dark .theme-guest .theme-toggle, html.dark .theme-welcome .theme-toggle { background-color: #26354b !important; color: #fde68a !important; border-color: #475569 !important; }
html.dark .theme-welcome { background-color: #0b1220; color: #e5edf8; }
html.dark .theme-welcome .bg-\[\#f7f7fb\] { background-color: #0b1220 !important; }
html.dark .theme-welcome .border-violet-100 { border-color: #39345e !important; }
html.dark .theme-welcome section.bg-\[\#100027\] a.bg-white, html.dark .theme-welcome section.bg-\[\#160032\] a.bg-white { background-color: #fff !important; color: #160032 !important; }
html.dark .theme-guest { background-color: #0b1220; color: #e5edf8; }

/* The administration used to have only a dark palette. Give it a matching light one. */
html:not(.dark) .theme-admin { background: #f5f7fb !important; color: #142033 !important; }
html:not(.dark) .theme-admin .bg-\[\#070b14\] { background-color: #f5f7fb !important; }
html:not(.dark) .theme-admin .bg-\[\#0c1220\], html:not(.dark) .theme-admin .bg-\[\#101827\], html:not(.dark) .theme-admin .bg-\[\#111827\], html:not(.dark) .theme-admin .bg-slate-900, html:not(.dark) .theme-admin .bg-slate-950, html:not(.dark) .theme-admin .bg-slate-800 { background-color: #ffffff !important; }
html:not(.dark) .theme-admin .text-slate-100, html:not(.dark) .theme-admin .text-slate-200, html:not(.dark) .theme-admin .text-slate-300, html:not(.dark) .theme-admin .text-white { color: #172033 !important; }
html:not(.dark) .theme-admin .text-slate-400, html:not(.dark) .theme-admin .text-slate-500 { color: #526177 !important; }
html:not(.dark) .theme-admin .border-white\/10, html:not(.dark) .theme-admin .border-white\/20, html:not(.dark) .theme-admin .border-slate-700, html:not(.dark) .theme-admin .border-slate-800 { border-color: #dce3ed !important; }
html:not(.dark) .theme-admin input:not([type=checkbox]):not([type=radio]), html:not(.dark) .theme-admin select, html:not(.dark) .theme-admin textarea { background-color: #f8fafc !important; color: #172033 !important; border-color: #cbd5e1 !important; }
html:not(.dark) .theme-admin .theme-toggle { background-color: #fff; color: #334155; border-color: #cbd5e1; }
html:not(.dark) .theme-admin .bg-emerald-400 .text-slate-950, html:not(.dark) .theme-admin .bg-emerald-500 .text-slate-950 { color: #081b18 !important; }
html:not(.dark) .theme-admin .bg-emerald-400, html:not(.dark) .theme-admin .bg-emerald-500 { color: #081b18 !important; }

@media (prefers-reduced-motion: reduce) { .theme-toggle { transition: none !important; } }
